Commit Graph

548 Commits

Author SHA1 Message Date
Abdulaziz Ghuloum 9f7196d11a better contextual error messages for invalid numeric sequences. 2008-06-03 22:27:33 -07:00
Abdulaziz Ghuloum be37f629c5 the reader now understands some complex numbers. 2008-06-02 00:01:59 -07:00
Abdulaziz Ghuloum a492d318e1 - fixed minor bug in current-directory
- changed implementation of string->number.
2008-05-31 20:10:17 -07:00
Abdulaziz Ghuloum 53905b9eea Changes from Derick Eddington supporting file system info:
- 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;
2008-05-31 10:43:55 -07:00
Abdulaziz Ghuloum 6437aa98e0 - exp now understands complex numbers.
- expt of complex exponent is implemented in terms of exp.
2008-05-28 23:50:36 -07:00
Abdulaziz Ghuloum fec5dcd419 sqrt, log, and expt now understand complex numbers. 2008-05-28 22:21:08 -07:00
Abdulaziz Ghuloum b74e3976df allocation check was still incorrect when the ap+size overflows and
shows up to be less than the end of allocation pointer.
2008-05-25 15:32:22 -07:00
Abdulaziz Ghuloum 7f0f127081 Allocation overflow check was incorrectly using signed comparison
instead of an unsigned one.
2008-05-25 14:39:03 -07:00
Abdulaziz Ghuloum 467095677e +, -, *, and / now handle inexact complex numbers. 2008-05-25 10:37:41 -07:00
Abdulaziz Ghuloum ab2e05e8b0 Added inexact complex numbers. 2008-05-24 10:13:01 -07:00
Abdulaziz Ghuloum 8827b98972 fasl reader/writer now understands complex numbers. 2008-05-21 00:40:42 -07:00
Abdulaziz Ghuloum 0a6df79e3b ikarus.reader is now loadable separately. 2008-05-20 23:21:37 -07:00
Abdulaziz Ghuloum ebcc042ea1 = now handles complex numbers. 2008-05-18 22:33:49 -07:00
Abdulaziz Ghuloum 4cb8165181 +, -, *, / now handle complex numbers. 2008-05-18 21:41:53 -07:00
Abdulaziz Ghuloum 82140f87ba - Added complex numbers representation (exact complex only).
- Added make-rectangular.
- Added the ability to display complex numbers.
2008-05-18 20:39:41 -07:00
Abdulaziz Ghuloum da7cedfe64 Added bitwise-xor. 2008-05-18 03:21:05 -07:00
Abdulaziz Ghuloum de4276124b added bitwise-ior. 2008-05-18 02:27:55 -07:00
Abdulaziz Ghuloum 0cd61369b2 added some preliminary work for known-types. 2008-05-16 23:27:08 -07:00
Abdulaziz Ghuloum 71640d11bf Fixed a problem with forward references in the repl which used to
get a location different from the one assigned when the variable is
defined.
2008-05-15 06:40:07 -07:00
Abdulaziz Ghuloum 6511dd1002 Fixed a paren mismatch in "macro?" helper in printer. 2008-05-13 06:09:58 -07:00
Abdulaziz Ghuloum 5d3ab96c2c fixed "inaccurate error message" bug in map when applied a non-list
argument.
2008-05-12 02:39:28 -07:00
Abdulaziz Ghuloum 4133bd73d3 Added copyright notice to pretty-formats.ss 2008-05-12 00:37:55 -07:00
Abdulaziz Ghuloum 4acf71d6d2 moved pretty-printing formats to their own library. 2008-05-12 00:35:19 -07:00
Abdulaziz Ghuloum f05f171f28 exported pretty-format, a parameter maker for setting the pretty
format for various forms.  The pretty format structure is not
documented yet and there is no error-checking mechanism for
verifying proper input.
2008-05-12 01:00:01 -04:00
Abdulaziz Ghuloum f8b0e949d9 - syntax-case now raises a syntax violation when _ appears in the
literals
- syntax-rules points to the invalid literal when raising an
  exception.
2008-05-10 19:05:40 -04:00
Abdulaziz Ghuloum 5c21f9995e source annotations for r6rs-script and r6rs-libraries are now in
chars instead of bytes.
2008-05-06 15:38:05 -04:00
Abdulaziz Ghuloum b5fc5624ec Fixed a bug in enum-set-universe not returning an enum type. 2008-05-05 23:53:48 -04:00
Abdulaziz Ghuloum 3bcc3249e5 Fixed another source of "annotations being revealed". This time,
it's a reader bug of not inserting enough annotations for reader
macro forms.
2008-05-05 03:52:08 -04:00
Abdulaziz Ghuloum c3b8e50b23 Fixed a minor exposure of annotation records. 2008-05-03 06:49:36 -04:00
Abdulaziz Ghuloum 3f9b567a5b with-syntax now gives more informative error messages:
> (with-syntax ([(x y) #'(a 1)] [(q) #'(a b c)]) 12)
Unhandled exception
 Condition components:
   1. &assertion
   2. &who: with-syntax
   3. &message: "pattern does not match value"
   4. &irritants: ((q) #<syntax (a b c)>)

instead of the previous behavior:

> (with-syntax ([(x y) #'(a 1)] [(q) #'(a b c)]) 12)
Unhandled exception
 Condition components:
    1. &message: "invalid syntax"
    2. &syntax:
        form: ((a 1) (a b c))
        subform: #f
2008-05-03 06:23:35 -04:00
Abdulaziz Ghuloum 373edfc969 Fixes typos in (rnrs enumeration) error messages. 2008-05-03 04:25:58 -04:00
Abdulaziz Ghuloum 5f92e4b96d Added current-directory parameter that gets/sets cwd. 2008-05-03 02:39:49 -04:00
Abdulaziz Ghuloum 7e5d053fb2 Fixed a bug causing syntax-error traces to print as
#[annotation ---]
instead of
  #<syntax --- [position ---]>
2008-05-02 14:34:03 -04:00
Abdulaziz Ghuloum d87ced74d1 cleaned up some stale primitive names. 2008-05-01 18:13:11 -04:00
Abdulaziz Ghuloum db70f9751f Made all unimplemented procedures raise errors when called. 2008-05-01 17:52:52 -04:00
Abdulaziz Ghuloum b56b0fbd85 fixed a problem causing free-id=? to intern unbound identifiers
into the interaction environment.
2008-05-01 15:04:43 -04:00
Abdulaziz Ghuloum d49aed209a Added (interaction-environment). 2008-05-01 06:02:36 -04:00
Abdulaziz Ghuloum e7386cd7d7 Major changes to the interactive repl:
- 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.
2008-05-01 04:21:07 -04:00
Abdulaziz Ghuloum 1389f239fe Added process-nonblocking which is like process but returns
nonblocking ports.
2008-04-30 22:55:59 -04:00
Abdulaziz Ghuloum f69e82e6c5 Added with-output-to-port:
> (let-values ([(p e) (open-string-output-port)])
    (with-output-to-port p (lambda () (printf "Hello\n")))
    (e))
"Hello\n"
2008-04-29 00:20:29 -04:00
Abdulaziz Ghuloum d8cd4f0acf Added engine-handler parameter and a ($swap-engine-counter! <neg-fx>)
to (ikarus system $interrupts).
2008-04-29 00:10:49 -04:00
Abdulaziz Ghuloum 478719cf32 Fixed names of procedures <, <=, =, >, >=. They used to be
printed as #<procedure f>.
2008-04-28 16:52:44 -04:00
Abdulaziz Ghuloum b97b568e36 Reader now explicitly checks for valid unicode range when reading
#\xHHHH  "\xHHHH;" and foo\xHHHH;bar sequences.
2008-04-28 15:01:45 -04:00
Abdulaziz Ghuloum 89def78c3c Fixed the definition of identifier? and id? in expander so that only
top-make-wrapped (possibly annotated) symbols are identifiers.  It
used to be that symbols were considered identifiers by the previous
definition.
2008-04-28 14:01:49 -04:00
Abdulaziz Ghuloum 3ce6d037e4 Fixed a bug in module imports where some marks were missing in action.
(Note from Kent, extracted from chez scheme release notes, follows)

This always worked:

(let ()
  (define-syntax from
    (syntax-rules ()
      [(_ m v) (let () (import m) v)]))
  (module a (x) (define x 'x-of-a))
  (from a x))

Didn't work before this change:

(let ()
  (define-syntax x-from-a
    (syntax-rules ()
      [(_) (let () (import a) x)]))
  (module a (x) (define x 'x-of-a))
  (x-from-a))
2008-04-19 17:55:30 -04:00
Abdulaziz Ghuloum 66d085713f Made interrupted conditions &serious so that you can interrupt R6RS
scripts.
2008-04-19 16:55:40 -04:00
Abdulaziz Ghuloum 177f6b84a7 Fixed a reader bug that causes '#!eof not to read properly.
Used to be:
> '#!eof
Unhandled exception
 Condition components:
  1. &lexical
  2. &message: "invalid eof after quote read macro"
  3. &lexical-position:
      file-name: *stdin*
      character: 7

Now:
> '#!eof
#!eof
2008-04-14 22:18:56 -04:00
Abdulaziz Ghuloum 139ff2f33c First complete (but broken) build of ikarus in 64-bit. 2008-04-14 22:02:03 -04:00
Abdulaziz Ghuloum d02e9fe035 Passing 709 tests in 64-bit mode 2008-04-12 15:06:55 -04:00
Abdulaziz Ghuloum df0aa2de1f Added input-socket-buffer-size and output-socket-buffer-size
parameters.
2008-04-11 14:02:43 -04:00
Abdulaziz Ghuloum bdd81e2b05 accept and accept-nonblocking now set the port-id to a string
representing the incoming address like "nnn.nnn.nnn.nnn:pppp"
2008-04-11 07:01:27 -04:00
Abdulaziz Ghuloum 25344fa1d0 Added nanosleep as per bug 210678. 2008-04-11 05:36:54 -04:00
Abdulaziz Ghuloum 191a82e007 Passing 685 tests in 64bit including handling of some foreign calls. 2008-04-09 07:04:02 -04:00
Abdulaziz Ghuloum 866b2b1c17 Now passing 682 tests in 64-bit mode. 2008-04-09 05:34:36 -04:00
Abdulaziz Ghuloum f63f85e1cc 570 tests in 64-bit mode 2008-04-09 03:05:19 -04:00
Abdulaziz Ghuloum aa44ce2733 Passing 548 tests in 64-bit mode. 2008-04-08 03:57:13 -04:00
Abdulaziz Ghuloum 5eaa2ff469 fixed a couple of bugs in 64bit assembler. 2008-04-08 02:22:26 -04:00
Abdulaziz Ghuloum 6bdb38ca16 fixed bug in ($make-vector 0) 2008-04-07 12:32:55 -04:00
Abdulaziz Ghuloum 42e3d53d00 I CAN HAZ CONS in 64BIT! 2008-04-07 10:20:05 -04:00
Abdulaziz Ghuloum bf6138f86f - Added reset-output-port! which sets the write index to 0 and
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)
2008-04-06 10:57:56 -04:00
Abdulaziz Ghuloum afd7592ae1 Added &i/o-read, &i/o-write, and &i/o conditions to read/write
errors.
2008-04-05 05:15:30 -04:00
Abdulaziz Ghuloum 8d8f6d39f7 Fixing bug 210744: Interrupts and IO callbacks not interacting
properly
2008-04-02 20:28:45 -04:00
Abdulaziz Ghuloum 30bc1b7be9 apply error now shows the procedure before the number of args. 2008-03-25 22:15:10 -04:00
Abdulaziz Ghuloum 398ff23992 Fixes bug 206847: default exception handler expected to return for
non-&serious conditions
2008-03-25 21:38:11 -04:00
Abdulaziz Ghuloum c01f3049e4 Fixes bug 206842: syntax tracing not working by default when
syntax-case fenders fail
2008-03-25 21:23:23 -04:00
Abdulaziz Ghuloum c2e20a3a68 Fixes bug 206839: map not failing with invalid arguments 2008-03-25 21:03:26 -04:00
Abdulaziz Ghuloum 48f7c88e2d made time macro not depend on format. 2008-03-24 21:50:37 -04:00
Abdulaziz Ghuloum 81c17da20b Fixes bug 190373: `time' macro's "running stats for" can be misleading 2008-03-24 21:45:36 -04:00
Abdulaziz Ghuloum 3c3fec3908 Fixed problem shutting down servers on cygwin. 2008-03-24 13:25:59 -04:00
Abdulaziz Ghuloum 12a3f7e19b Fixes bug 205988: sockaddr_in not recognized on cygwin. 2008-03-24 13:18:39 -04:00
Abdulaziz Ghuloum fc92ec8e9f Fixes bug 205437: socket errors not being reported 2008-03-24 00:01:22 -04:00
Abdulaziz Ghuloum 884f3fe921 Added tcp-server-socket-nonblocking, tcp-accept-connection-nonblocking
and register-callback for handling nonblocking servers and connections.
2008-03-23 05:02:12 -04:00
Abdulaziz Ghuloum 0f55361b19 Fixes bug 205427 in letrec*. 2008-03-23 04:14:53 -04:00
Abdulaziz Ghuloum 2119f44125 Added a simple tcp server facility. See lab/greeting-server.ss. 2008-03-23 03:44:20 -04:00
Abdulaziz Ghuloum 9aaf306f16 Nonblocking sockets no longer raise a continuable exception when a
read or write operation would block.  Instead, they are schedules
with an event handler that `selects' on the pending file descriptors
and dispatches the appropriate callback.
2008-03-23 02:14:00 -04:00
Abdulaziz Ghuloum 6e599c4c72 refactored nonblocking code in ikarus-io.c and ikarus.io.ss 2008-03-23 00:41:49 -04:00
Abdulaziz Ghuloum ec69dc4a7c Added more tests for div0 and mod0. 2008-03-22 21:25:42 -04:00
Abdulaziz Ghuloum 48a86cbaa3 Fixed bug in (mod 3 5/6). 2008-03-22 21:23:51 -04:00
Abdulaziz Ghuloum ce496aebaf * Better error message when a tcp connection is refused.
* implemented udp connections (not working yet).
2008-03-22 19:29:41 -04:00
Abdulaziz Ghuloum 85d09cbc1c fxarithmetic-shift-left now detects overflows properly. 2008-03-18 00:49:24 -04:00
Abdulaziz Ghuloum 97507bce08 Fixes bug in reader now recognizing the following comment:
> #|| hello ||# '12
2008-03-15 21:12:43 -04:00
Abdulaziz Ghuloum 50888bef94 Fixes issues/warnings in bug 193327. 2008-03-15 21:06:47 -04:00
Abdulaziz Ghuloum d35566081b import now recognizes and ignore ``for'' spec. 2008-03-15 21:00:16 -04:00
Abdulaziz Ghuloum a3f6e3e039 Cut down bootstrap time by 10% by caching the values of scheme-stx.
Macroexpansion time is reduced by 25%.
2008-03-12 18:12:57 -04:00
Abdulaziz Ghuloum 1943212436 - Added tests for fasl objects
- fasl-read can now read bignums, flonums, and ratnums.
2008-03-09 00:25:03 -05:00
Abdulaziz Ghuloum 8f0b606609 sin, cos, tan, asin, acos, and atan now support rational numbers. 2008-03-03 13:49:47 -05:00
Abdulaziz Ghuloum 5210f1448b Fixed part of bug 162334. Reason: (inexact -1/2) lost the sign and
returned 0.5.  It now correctly return -0.5.
2008-03-01 21:54:27 -05:00
Abdulaziz Ghuloum f6ee3618ba (+ 1/2), (+ 0.5), (* 1/2) and (* 0.5) used to raise "not a number" errors. 2008-03-01 21:48:42 -05:00
Abdulaziz Ghuloum db54cd0074 Fixes bug 191116: rationalize broken 2008-03-01 21:45:48 -05:00
Abdulaziz Ghuloum 755843e251 196894: --compile-dependencies misnamed in error message 2008-03-01 21:14:35 -05:00
Abdulaziz Ghuloum ed9f85ea7c Fixes bug 194232: fasl-write error message wrong about textual
output ports
2008-02-26 04:07:33 -05:00
Abdulaziz Ghuloum e36b0029f6 Fixes bug 194259. R6RS records can now be written and read back
through fasl-write and fasl-read.
2008-02-26 03:53:00 -05:00
Abdulaziz Ghuloum c8f9b1dc3d Added fluid-let-syntax.
See http://www.scheme.com/csug7/syntax.html#./syntax:s15
for details.
2008-02-25 02:15:51 -05:00
Abdulaziz Ghuloum 7a9526ec91 removed a macos-specific dependencies in ikrt_file_ctime procedure. 2008-02-19 03:28:40 -05:00
Abdulaziz Ghuloum 523fa2e588 minor fixes to warning messages. 2008-02-19 00:15:18 -05:00
Abdulaziz Ghuloum 81f6c50341 fixed struct initialization problem in fasl-read. 2008-02-18 23:37:01 -05:00
Abdulaziz Ghuloum 259d43ca37 Changed fasl extension from ".ikfasl" to ".ikarus-fasl" 2008-02-18 23:29:49 -05:00
Abdulaziz Ghuloum 405c7dc9e2 fixed a missing put-mark call in fasl-read. 2008-02-18 23:26:54 -05:00
Abdulaziz Ghuloum f45a74c115 removed the separate-compilation.ss file because it was not needed. 2008-02-18 22:07:58 -05:00
Abdulaziz Ghuloum 8564000d0d ikarus --compile-dependencies seems to be working now. 2008-02-18 22:05:29 -05:00