> (import (ikarus system $foreign))
> (((ffi-prep-cif 'void '(uint32))
(dlsym (dlopen #f) "hello_world"))
10)
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
>
exported by the environment. Try
> (environment-symbols (environment '(rnrs)))
- Added an internal export mechanism so that identifiers can be
exported from within a library. The syntax is the same:
(export export-spec* ...)
when appears in a library's top level, adds the export specs to
the set of exported identifiers. So, one can do:
(library (A)
(export)
(import (ikarus))
(export a)
(define a 17))
When appearing in non-library definition context, the export form
is ignored.
indices (r6rs requirement).
- file-options are now represented as enum-sets (r6rs requirement)
- odd?, even?, lcm, remainder, etc., now accept inexact integers.
continuations work, more assembly instructions are testing in 64-bit
mode, and some arithmetic operations (shift-right, etc.) have been
fixed by removing some 32-bit dependencies.
- Deleted old optimizer and changed the meaning of optimize level to
be:
0: bypass the optimizer
1: copy propagation, constant folding, no inlining
1: copy propagation, constant folding, with inlining
The default is set to 1.
- (optimize-level [0,1,2]) and ikarus -O[0,1,2]
where -O0 = no optimizations
-O1 = using old optimizer
-O2 = using the new cp0 optimizer
defaults to -O1 for now.
- (cp0-size-limit n) which is the limit of the residual size for
each inlining attempt
- (cp0-effort-limit n) which is the limit on the effort expended
for each inlining attempt
- Rewrote the syntax-match macro to make use of the same technology
used in syntax-case itself resulting in reduced code size.
- Added (system-value <symbol>) which returns the system value.
E.g., (system-value 'car) => #<procedure car>
This is pretty much the same as
(eval <symbol> (environment '(ikarus)))
except that it does not involve compiling the expression or
consulting the library/expander systems.
- Fixed the fasl loader to make it understand complex numbers.
- Added file-regular?, file-directory?, file-symbolic-link?,
directory-list, make-directory, delete-directory, change-mode,
and make-symbolic-link.
- Bug fix in ikrt_open_input_fd and ikrt_open_output_fd which
considered a 0 FD as an error.
- Bug fix in ikrt_getcwd about len+1.
- Bug fix of &i/o-file-protection which didn't have &i/o-filename as
its parent.
- There is a new src/ikarus-errno.c file.
- Made tcp-connect and friends tell when they "failed to resolve
host name or connect".
- To support the uses of &i/o-filename subtypes, I modified
print-condition so it will cleanly print the parents' fields of a
condition;
- We can now redefine imported identifiers.
- We can now use let-syntax, letrec-syntax, and modules at
top-level.
Hand-wavey Repl Semantics:
- Imported identifiers mean what they meant previously. In
particular, you cannot set! imported identifiers.
- An imported identifier may be redefined using define. Once
something is defined at the top-level, a specific location for it
is created, and all definitions, references, and set!s to that
variable go through the top-level location.
- Re-importing an identifier shadows the top-level location.
- Redefining re-exposes the top-level location.
- and do on.
- A reference to an unbound variable also fabricates a top-level
location for that variable.
Let's see how this goes.
unregisters any callbacks associated with the buffer.
- commented out the call for unblocking the stdin for now
(for reason yet unknown to me, it causes stdout to be unblocked
as well, making writes to the console to come out in bizarre
mixed order)
socket in nonblocking mode. An operation that would block now
raises (continuable) a condition of type &i/o-would-block which
contains the port in question. There's no way to handle the
condition gracefully yet.
name (e.g. "www.google.com" and "http") and returns two binary ports:
the first for output and the second for input.
Both ports must be closed for the connection to close.
Also added an example in lab/tcp-connect-example.ss which connects
to an http server, sends "GET /\n" and prints the responde.
args to it, and returns 4 values:
* the process's pid
* the process's standard-input-port (for writing)
* the process's standard-output-port (for reading)
* the process's standard-error-port (for reading)
See lab/process-example.ss for a sample usage.
(include-into ctxt "filename") included the contents of the file
as if they were present in the context ctxt (which must be an
identifier).
(include-into here "filename") would do the same thing as
(include "filename")