Giter Club home page Giter Club logo

ikarus's People

Contributors

azizghuloum avatar derickeddington avatar hyln9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ikarus's Issues

rationalize broken

larceny
Larceny v0.961 "Fluoridation" (Jan 2 2008 08:01:50, precise:Linux:unified)
larceny.heap, built on Wed Jan 2 08:11:02 EST 2008

(rationalize 1.2345678 0.001)
1.2352941176470589
(exit)

gsi
Gambit v4.1.2

(rationalize 1.2345678 0.001)
1.2352941176470589
(exit)

ikarus
Ikarus Scheme version 0.0.3+ (revision 1378, build 2008-02-11)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(rationalize 1.2345678 0.001)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: quotient+remainder
  3. &message: "not a number"
  4. &irritants: (1/8)
    (exit)

Launchpad Details: #LP191116 Ken Dickey - 2008-02-11 18:22:50 -0500

Referencing a variable before importing it, causes identifier conflict

This is low priority for me. I just happened to notice it in passing.

$ cat import-bug.ss
(library (import-bug)
(export foo)
(import (rnrs))
(define foo 1))

$ # Ordinary way to do things. Works.
$ rlwrap ikarus import-bug.ss
Ikarus Scheme (Build 2007-11-14)
Copyright (c) 2006-2007 Abdulaziz Ghuloum

(import (import-bug))
foo
1

$ rlwrap ikarus import-bug.ss
Ikarus Scheme (Build 2007-11-14)
Copyright (c) 2006-2007 Abdulaziz Ghuloum

foo ;; First forget to import import-bug
Unhandled exception
Condition components:

  1. &error
  2. &who: eval
  3. &message: "unbound variable"
  4. &irritants: (foo)
    (import (import-bug)) ;; Then remember that you have to import it.
    Unhandled exception
    Condition components:
    1. &error
  5. &who: expander
  6. &message: "identifier conflict"
  7. &irritants: ((import (import-bug)) foo)
    ;; Now you're hosed.

Launchpad Details: #LP162785 Michael D. Adams - 2007-11-14 21:15:19 -0500

Quasiquote broken

(let ((x '(a b c))) ``(,,x ,@,x ,,@x ,@,@x))

should evaluate to:

`(,(a b c)
,@(a b c)
(unquote a b c)
(unquote-splicing a b c))

Launchpad Details: #LP192222 Abdulaziz Ghuloum - 2008-02-15 15:05:58 -0500

fx* does not check for overflow

Not sure if this is classified as a bug. The behaviour is not defined in R6RS (is it part of the IEEE floating point spec maybe?). There also seems to be inconsistency between fx*/fx+ and fx-/fx/ expected results in terms of exceptions and the 'correct' vs the 'mathematically correct' answer.

(fx* 429496728 2)
-214748368
(fx+ 429496728 429496728)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: fx+
  3. &message: "overflow when adding numbers"
  4. &irritants: (429496728 429496728)

Launchpad Details: #LP191310 leppie - 2008-02-12 13:21:49 -0500

Interrupts and IO callbacks not interacting properly

Ikarus Scheme version 0.0.3+ (revision 1434, build 2008-03-25)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(Hello

^C
;;; get interrupted correctly

12
12
;;; now press ^D and you get:
Unhandled exception
Condition components:

  1. &lexical
  2. &message: "end of file encountered while reading list"
  3. &lexical-position:
    file-name: stdin
    character: 18

Launchpad Details: #LP210744 Abdulaziz Ghuloum - 2008-04-02 06:17:22 -0400

String comparison procedures broken

Ikarus Scheme version 0.0.3+ (revision 1677, build 2008-11-14)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(string<? "asdf")
Unhandled exception
Condition components:

  1. &assertion
  2. &who: string<?
  3. &message: "not a string"
  4. &irritants: ("asdf")
    (string<? "asdf" "blah")
    #t
    (string<? "asdf" "blah" "foo")
    Unhandled exception
    Condition components:
    1. &assertion
  5. &who: string<?
  6. &message: "not a string"
  7. &irritants: ("foo")
    (string<? "asdf" "blah" "foo" "zab")
    Unhandled exception
    Condition components:
    1. &assertion
  8. &who: string<?
  9. &message: "not a string"
  10. &irritants: ("zab")

(string>? "asdf" "blah" "foo" "zab")
Unhandled exception
Condition components:

  1. &assertion
  2. &who: string>?
  3. &message: "not a string"
  4. &irritants: ("blah")
    (string=? "asdf" "blah" "foo" "zab")
    #f
    (string>=? "asdf" "blah" "foo" "zab")
    Unhandled exception
    Condition components:
    1. &assertion
  5. &who: string>=?
  6. &message: "not a string"
  7. &irritants: ("blah")

Launchpad Details: #LP298291 Derick Eddington - 2008-11-15 01:27:35 -0500

call-with-port should not close port when dynamic extent exited

call-with-port is currently using dynamic-wind to close the port, but:

R6RS 8.2.6 says of call-with-port:
"If proc does not return, port is not closed automatically, except perhaps when it is possible to prove that port will never again be used for an input or output operation."

Since they use call-with-port, it looks like this would also make with-output-to-file, with-input-from-file, call-with-output-file, call-with-input-file not meet their similar requirement.

I'm doing some cool stuff with custom ports and generators/coroutines, but this is preventing it from working when using these with-port procedures.

Launchpad Details: #LP244899 Derick Eddington - 2008-07-02 11:15:45 -0400

(bitwise-arithmetic-shift-left <bignum> 32) in the 32-bit build returns junk

(bitwise-arithmetic-shift-left 32) in the 32-bit build returns junk mixed in with the original number:

Ikarus Scheme version 0.0.4-rc1+ (revision 1843, build 2009-08-03)
Copyright (c) 2006-2009 Abdulaziz Ghuloum

(number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"B79BFF7CC0E79300"
(number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"17CC0E79300"
(number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"B701EE7CC0E79300"
(number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"367CC0E79300"
(number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"2C7CC0E79300"
(number->string (bitwise-arithmetic-shift-left #x7CC0E793 32) 16)
"7CC0E79300"

etc etc

This is the bug you found when you ran my DES test suite. :)

Launchpad Details: #LP408338 Göran Weinholt - 2009-08-03 07:33:16 -0400

Need non-blocking way to know if child process failed

Currently, there's no non-blocking way to test if a child process succeeded or not. The only way is to try reading from the err port to see what string it returns, but this might block forever, and then waitpid returns weird values because waitpid(2) packs various info in the status.

Ikarus Scheme version 0.0.2patched+ (revision 1366, build 2008-01-23)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-values (pid to from err) (process "asdfasdf"))
(define errt (transcoded-port err (native-transcoder)))
(get-string-all errt) ;; But I don't know if this will block
"failed to exec asdfasdf: No such file or directory\n"
(waitpid pid)
65280
(waitpid pid)
-141090988
(waitpid pid)
-141091004
(waitpid pid)
-141091020
(waitpid pid)
-141091036
(waitpid pid)
-141091052
(waitpid pid)
-141091068
(waitpid pid)
-141091084

To be able to test if executing the process succeeded, I made the following changes:

[d@eep:~/ikarus.dev]-> bzr diff
=== modified file 'scheme/ikarus.posix.ss'
--- scheme/ikarus.posix.ss 2007-12-15 13:22:49 +0000
+++ scheme/ikarus.posix.ss 2008-01-24 11:35:04 +0000
@@ -37,10 +37,15 @@
[else (parent-proc pid)]))))

(define waitpid

  • (lambda (pid)

  •  (unless (fixnum? pid)
    
  •    (die 'waitpid "not a fixnum" pid))
    
  •  (foreign-call "ikrt_waitpid" pid)))
    
  • (case-lambda

  •  [(pid)
    
  •   (waitpid pid #t)]
    
  •  [(pid block?)
    
  •   (unless (fixnum? pid)
    
  •     (die 'waitpid "not a fixnum" pid))
    
  •   (unless (boolean? block?)
    
  •     (die 'waitpid "not a boolean" block?))
    
  •   (foreign-call "ikrt_waitpid" pid block?)]))
    

    (define system
    (lambda (x)

=== modified file 'src/ikarus-process.c'
--- src/ikarus-process.c 2008-01-02 02:08:07 +0000
+++ src/ikarus-process.c 2008-01-24 11:45:08 +0000
@@ -74,8 +74,15 @@
}

ikptr
-ikrt_waitpid(ikptr pid, ikpcb* pcb){
+ikrt_waitpid(ikptr pid, ikptr block, ikpcb* pcb){
int status;

  • waitpid(unfix(pid), &status, 0);
  • return fix(status);
  • int options = 0;
  • int r;
  • if (block == false_object)
  • options = WNOHANG;
  • r = waitpid(unfix(pid), &status, options);
  • if (r > 0 && r == unfix(pid) && WIFEXITED(status))
  • return fix(WEXITSTATUS(status));
  • else
  • return false_object;
    }

Maybe this is a good way to accomplish this. I disclaim all copyright to this patch. Do what thou wilt with it :)

With this patch, I can do:

Ikarus Scheme version 0.0.2patched+ (revision 1366, build 2008-01-24)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-values (pid to from err) (process "asdfasdf"))
(waitpid pid #f) ;; Don't block
255 ;; Oh no, the forked process already exited
(waitpid pid) ;; Just to demonstrate

f ;; means this waitpid test did not show the process exited normally (it was already tested)

(define errt (transcoded-port err (native-transcoder)))
(get-string-all errt)
"failed to exec asdfasdf: No such file or directory\n"

And:

Ikarus Scheme version 0.0.2patched+ (revision 1366, build 2008-01-24)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-values (pid to from err) (process "cat"))
(waitpid pid #f) ;; Don't block

f ;; It's alive

(define tot (transcoded-port to (native-transcoder)))
(define fromt (transcoded-port from (native-transcoder)))
(put-string tot "blah")
(flush-output-port tot)
(get-string-n fromt 4)
"blah"
(close-port tot)
(close-port fromt)
(close-port err)
(waitpid pid) ;; old blocking behavior
0

If my patch isn't the right thing, I request some non-blocking way to test if the executed process died or not.

Launchpad Details: #LP185601 Derick Eddington - 2008-01-24 07:09:28 -0500

ikarus.io.ss bugs?

refill-bv-buffer: lines 714-716 use j but should they be using c1?

lookahead-char-utf8-mode: line 840 uses get-char but should it be? get-char will see the same decoding error and ignore it by advancing passed it and doing another get-char which will advance more, but since this was lookahead-char should it be consuming characters? I.e.:

(define tip (open-bytevector-input-port '#vu8(#b10000000 65 66 67) (make-transcoder (utf-8-codec) (eol-style none) (error-handling-mode ignore))))
(lookahead-char tip)

\A

(lookahead-char tip)

\B

(lookahead-char tip)

\B

I know the port position stuff is not finished, but I noticed these:

refill-bv-buffer: lines 706-708: should refilling the buffer be advancing the port's position?

Should these give 0?

(input-port-byte-position (open-string-input-port "foobar"))
1
(input-port-byte-position (open-bytevector-input-port '#vu8(1 2 3 4 5)))
1

Launchpad Details: #LP238400 Derick Eddington - 2008-06-08 16:24:45 -0400

make-string crashes when given large values

Ikarus Scheme version 0.0.4-rc1+ (revision 1791, build 2009-05-24)
Copyright (c) 2006-2009 Abdulaziz Ghuloum

(string-length (make-string (greatest-fixnum) #\a))
Segmentation fault

Launchpad Details: #LP380049 Abdulaziz Ghuloum - 2009-05-24 16:26:12 -0400

apply crashes when passed large lists

Ikarus Scheme (Build 2007-11-18)
Copyright (c) 2006-2007 Abdulaziz Ghuloum

(apply + (make-list 10000000 1))
Bus error

Launchpad Details: #LP163689 Abdulaziz Ghuloum - 2007-11-18 20:08:45 -0500

Segfault in add_object_proc on amd64

I saw that you announced amd64 support in revision 1547, but I'm getting a segfault during compilation. dmesg has this message (the "at" and sp change between each run):
[29197.586126] ikarus[7533]: segfault at 2ac14541f4e4 ip 404e4c sp 7fff679b9980 error 6 in ikarus[400000+19000]

I'm running Debian testing with gcc version 4.3.1-2. Please let me know if you need more information.

(gdb) run -b ./ikarus.boot.8.prebuilt --r6rs-script makefile.ss
Starting program: /home/weinholt/src/ikarus.dev/src/ikarus -b ./ikarus.boot.8.prebuilt --r6rs-script makefile.ss

Program received signal SIGSEGV, Segmentation fault.
0x0000000000404e4c in add_object_proc (gc=0x7fffd72ea410, x=140251312533509) at ikarus-collect.c:197
197 gc->segment_vector[i] =
(gdb) bt
#0 0x0000000000404e4c in add_object_proc (gc=0x7fffd72ea410, x=140251312533509) at ikarus-collect.c:197
#1 0x000000000040642d in ik_collect (mem_req=96, pcb=0x1743010) at ikarus-collect.c:423
#2 0x0000000000414b48 in L_zero_args () at ikarus-enter.S:197
#3 0x000000000000002f in ?? ()
#4 0x0000000000000000 in ?? ()

(gdb) p *gc
$1 = {meta = {{ap = 140251304507072, aq = 140251304505344, ep = 140251304509440, base = 140251304505344}, {ap = 140251304472144, aq = 140251304468480,
ep = 140251304472576, base = 140251304468480}, {ap = 0, aq = 0, ep = 0, base = 0}, {ap = 0, aq = 0, ep = 0, base = 0}, {ap = 140251304492832, aq = 140251304488960,
ep = 140251304493056, base = 140251304488960}, {ap = 140251304493152, aq = 140251304493056, ep = 140251304497152, base = 140251304493056}}, queues = {0x0,
0x1744910, 0x0, 0x0, 0x1743350, 0x0}, pcb = 0x1743010, segment_vector = 0x7f6ee9507000, collect_gen = 1, collect_gen_tag = 42, tconc_ap = 0, tconc_ep = 0,
tconc_base = 0, tconc_queue = 0x0, forward_list = 0x0}

Launchpad Details: #LP250545 Göran Weinholt - 2008-07-21 11:12:50 -0400

fasl-write problem with records because of struct-type-field-names

Ikarus Scheme version 0.0.3+ (revision 1403, build 2008-02-21)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-record-type my-thing (fields x))
(define t0 (make-my-thing 123))
(define-values (bvop bvop-getter) (open-bytevector-output-port))
(fasl-write t0 bvop)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: struct-type-field-names
  3. &message: "not an rtd"
  4. &irritants: (#)

Launchpad Details: #LP194259 Derick Eddington - 2008-02-22 01:00:16 -0500

refill-bv-buffer setting wrong index

Running the below program either raises an &i/o-decoding (but never &i/o-encoding it seems) or the read-back-in string is not equal to the original written-out string. What the program does is create a random-sized string filled with random characters, write it to a file, and read it back in and compare it. If creating such arbitrary random strings and writing them out works, shouldn't reading them work and shouldn't they always be equal for every possible random string? Playing with the value of max-string-size alters if it raises an exception or if the strings aren't equal and how long it will go before one of those happens. [This is similar to what I'm pumping through my forked-workers sockets test.]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(import (ikarus))

(define max-string-size #e1e5)

(define (make-test-string)
(let ([s (make-string (+ 1 (random max-string-size)))])
(do ([i 0 (+ 1 i)])
[(fx=? i (string-length s))
s](let loop %28%29
%28let %28[x %28random #x110000%29]%29
%28if %28fx<=? #xd800 x #xdfff%29
%28loop%29
%28string-set! s i %28integer->char x%29%29%29%29))))

(define transcoder
(make-transcoder (utf-8-codec) (eol-style none) (error-handling-mode raise)))

(define tmp-file "/tmp/random-strings")

(let loop ()
(let ([fop (open-file-output-port tmp-file
(file-options no-fail) (buffer-mode block) transcoder)]
[s (make-test-string)])
(put-string fop s)
(close-output-port fop)
(let ([r (call-with-port (open-file-input-port tmp-file
(file-options) (buffer-mode block) transcoder)
get-string-all)])
(if (string=? r s)
(display ".")
(assertion-violation 'check "not equal" s r))))
(loop))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Launchpad Details: #LP237976 Derick Eddington - 2008-06-06 15:02:27 -0400

when a letrec* binding clause expression is a lambda with a reference

The reference to h1 in (set! f0 (lambda () h1)) is causing h1 to not be assigned the correct value of 'C. The 2nd example, with (set! f0 (lambda () 0)), is correct.

Ikarus Scheme version 0.0.3+ (revision 1421, build 2008-03-22)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(letrec* ([f0 (void)]
[g0 (void)]
[h0 (void)]
[dummy (begin
(set! f0 (lambda () h1))
(set! g0 'B)
(set! h0 'C)
'#f)]
[f1 f0]
[g1 g0]
[h1 h0])
(values f1 g1 h1))

B

;;; this should be 'C

(letrec* ([f0 (void)]
[g0 (void)]
[h0 (void)]
[dummy (begin
(set! f0 (lambda () 0))
(set! g0 'B)
(set! h0 'C)
'#f)]
[f1 f0]
[g1 g0]
[h1 h0])
(values f1 g1 h1))

B
C

Launchpad Details: #LP205427 Derick Eddington - 2008-03-23 02:02:41 -0400

enum-set-complement takes the car of ()

There is a problem with the order of enum-sets when given to enum-set-complement:

Ikarus Scheme version 0.0.3+ (revision 1543, build 2008-07-19)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-enumeration prefix
(operand address cs ds es fs gs ss lock repz repnz rex rex.w rex.r
rex.x rex.b vex vex.l vex.w)
prefix-set)
(enum-set->list
(enum-set-complement (prefix-set repz operand repnz)))
Unhandled exception
Condition components:

  1. &assertion
  2. &who: car
  3. &message: "argument does not have required pair structure"
  4. &irritants: (())
    (enum-set->list
    (enum-set-complement (prefix-set operand repz repnz)))
    (address cs ds es fs gs ss lock rex rex.w rex.r rex.x rex.b
    vex vex.l vex.w)

Launchpad Details: #LP250091 Göran Weinholt - 2008-07-19 08:46:31 -0400

socket errors not being reported

I found three. Two in do_connect in src/ikarus-io.c and one in socket->ports in scheme/ikarus.io.ss

Ikarus Scheme version 0.0.3+ (revision 1421, build 2008-03-23)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(tcp-connect "localhost" "12345")
errno=111 Connection refused ;;; I turned on the #if 1
Unhandled exception
Condition components:

  1. &who: tcp-connect
  2. &message: "unknown error"
  3. &i/o-filename: "localhost:12345"

I've made the following fixes:

--- scheme/ikarus.io.ss 2008-03-23 04:41:49 +0000
+++ scheme/ikarus.io.ss 2008-03-23 07:20:16 +0000
@@ -2066,7 +2066,7 @@
(unless block?
(let ([rv (foreign-call "ikrt_make_fd_nonblocking" socket)])
(unless (eq? rv 0)

  •            (io-error who id socket))))
    
  •            (io-error who id rv))))
       (values 
         (fh->output-port socket
            id output-file-buffer-size #f close who)
    

=== modified file 'src/ikarus-io.c'
--- src/ikarus-io.c 2008-03-23 04:41:49 +0000
+++ src/ikarus-io.c 2008-03-23 07:19:58 +0000
@@ -158,27 +158,29 @@
return fix(-1);
}
struct addrinfo* i = info;

  • int sock = -1;
  • int sock = fix(-1);
    while(i){
    if(i->ai_socktype != socket_type){
    i = i->ai_next;
    } else {
    int s = socket(i->ai_family, i->ai_socktype, i->ai_protocol);
    if(s < 0){
  •    sock = ikrt_io_error();  /\* to pass error code along, if no next */
     i = i->ai_next;
    
    } else {
    int err = connect(s, i->ai_addr, i->ai_addrlen);
    if(err < 0){
  •      sock = ikrt_io_error();  /\* to pass error code along, if no next */
       i = i->ai_next;
     } else {
    
  •      sock = s;
    
  •      sock = fix(s);
       i = 0;
     }
    
    }
    }
    }
    freeaddrinfo(info);
  • return fix(sock);
  • return sock;
    }

ikptr

Now I get:

Ikarus Scheme version 0.0.3+ (revision 1421, build 2008-03-23)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(tcp-connect "localhost" "12345")
Unhandled exception
Condition components:

  1. &who: tcp-connect
  2. &message: "connection refused"
  3. &i/o-filename: "localhost:12345"

Launchpad Details: #LP205437 Derick Eddington - 2008-03-23 03:29:34 -0400

uninitialized mark error

Importing the attached library into Ikarus-1689 (banner checkout
number) with installed precompiled file I get this:

(import (scmobj))

Unhandled exception
Condition components:

  1. &error
  2. &who: fasl-read
  3. &message: "uninitialized mark"
  4. &irritants: (522)

it does not happen if I remove the fasl file and
import from the source. I noticed that with an
older Ikarus the irritant was 523 (at least this
is what I cut and pasted days ago).

I am precompiling it with the top-level program:

(import
(only (scmobj))
(only (scmobj utils)))

and installing the files through a package.
"(scmobj utils)" is not loaded.

Launchpad Details: #LP302274 Marco Maggi - 2008-11-26 00:13:18 -0500

Revision 1426 does not compile on Cygwin

make[3]: Entering directory /home/leppie/ikarus.dev/src' gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -DNDEBUG -O3 -Wall -m32 -MT ikarus-io.o -MD -MP -MF .deps/ikarus-io.Tpo -c -o ikarus-io.o ikarus-io.c ikarus-io.c: In functionikrt_listen':
ikarus-io.c:225: error: storage size of 'servaddr' isn't known
ikarus-io.c:226: error: invalid application of sizeof' to incomplete typesockaddr_in'
ikarus-io.c:228: warning: implicit declaration of function htonl' ikarus-io.c:228: error:INADDR_ANY' undeclared (first use in this function)
ikarus-io.c:228: error: (Each undeclared identifier is reported only once
ikarus-io.c:228: error: for each function it appears in.)
ikarus-io.c:229: warning: implicit declaration of function htons' ikarus-io.c:225: warning: unused variableservaddr'
make[3]: *** [ikarus-io.o] Error 1
make[3]: Leaving directory /home/leppie/ikarus.dev/src' make[2]: *** [all] Error 2 make[2]: Leaving directory/home/leppie/ikarus.dev/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/leppie/ikarus.dev'
make: *** [all] Error 2

More hints:
configure:8798: checking for getaddrinfo
configure:8854: gcc -o conftest.exe -g -O2 -DNDEBUG -O3 -Wall -m32 -Wl,-E -Wl,--export-all-symbols -m32 conftest.c -lgmp -lgmp >&5
/cygdrive/c/Users/leppie/AppData/Local/Temp/cc7UpBOi.o: In function main': /home/leppie/ikarus.dev/conftest.c:98: undefined reference to_getaddrinfo'
collect2: ld returned 1 exit status
configure:8860: $? = 1
configure: failed program was:

Launchpad Details: #LP205988 leppie - 2008-03-24 08:52:54 -0400

Order of definitions in REPL

Definitions that call functions defined later in the file don't seem to be handled as I would expect when loaded at the REPL. When run as a script, they work as I expect. For example:

jnear@sandstone r6mk $ cat test.scm

!/usr/bin/env scheme-script

(import (rnrs))

(define foo
(lambda ()
(bar)))

(define bar
(lambda ()
(display "bar!")
(newline)))

(foo)
jnear@sandstone r6mk $ ikarus --r6rs-script test.scm
bar!
jnear@sandstone r6mk $ ikarus test.scm
Ikarus Scheme version 0.0.3+ (revision 1477, build 2008-05-13)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

Unhandled exception:
Condition components:

  1. &assertion
  2. &who: eval
  3. &message: "unbound variable"
  4. &irritants: (bar)

Launchpad Details: #LP230395 Joe Near - 2008-05-14 13:29:27 -0400

map exceptions missing &irritants

Ikarus Scheme version 0.0.3+ (revision 1430, build 2008-03-25)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(map + 1)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: map
  3. &message: "improper list"

(map + 1 2)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: map
  3. &message: "not a list"

Launchpad Details: #LP206838 Derick Eddington - 2008-03-25 18:13:51 -0400

fx+/carry with non-fixnum segfaults

The irritants from fx+/carry are wrong, and some of them cause segfaults when printed:

Ikarus Scheme version 0.0.4-rc1+ (revision 1844, build 2009-08-03)
Copyright (c) 2006-2009 Abdulaziz Ghuloum

(fx+/carry (+ (greatest-fixnum) 1) 1 0)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: -
  3. &message: "not a number"
  4. &irritants: ((# . 536870912))
    (fx+/carry (* 1000 (greatest-fixnum) ) 1 0)
    Unhandled exception
    Condition components:
    1. &assertion
  5. &who: -
  6. &message: "not a number"
  7. &irritants: ((31 . #<procedure #>))
    (fx+/carry (* 10000 (greatest-fixnum) ) 1 0)
    Unhandled exception
    Condition components:
    1. &assertion
  8. &who: -
  9. &message: "not a number"
  10. &irritants:
    Segmentation fault (core dumped)

Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision 1844, build 2009-08-03)
Copyright (c) 2006-2009 Abdulaziz Ghuloum

(fx+/carry (+ (greatest-fixnum) 1) 1 0)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: -
  3. &message: "not a number"
  4. &irritants:
    Segmentation fault (core dumped)

Launchpad Details: #LP417755 Göran Weinholt - 2009-08-23 12:17:11 -0400

chi-global-macro complains when loading a serialized variable transformer

There's a problem with serializing or loading serialized variable transformers:

$ cat foo.sls

!r6rs

(library (foo)
(export p.car)
(import (rnrs))

(define p (cons 4 5))
(define-syntax p.car
(make-variable-transformer
(lambda (x)
(syntax-case x (set!)
[(set! _ e) #'(set-car! p e)]
[(_ . rest) #'((car p) . rest)]
[_ #'(car p)])))))
$ cat foo.sps

!r6rs

(import (rnrs) (foo))
(display p.car)
(newline)
$ export IKARUS_LIBRARY_PATH=.
$ ikarus --r6rs-script foo.sps
4
$ ikarus --compile-dependencies foo.sps
Serializing "/home/weinholt/.ikarus/precompiled/tmp/foo.sls.ikarus-64bit-fasl" ...
$ ikarus --r6rs-script foo.sps
Unhandled exception:
Condition components:

  1. &assertion
  2. &who: chi-global-macro
  3. &message: "BUG: not a procedure"
  4. &irritants: ((macro! . #<procedure [char 142 of ./foo.sls]>))

I'm running Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision 1859, build 2009-09-30).

Launchpad Details: #LP452535 Göran Weinholt - 2009-10-15 16:52:24 -0400

symbols incorrectly GC'ed

I'm not sure whether this is a bug in Ikarus, or the xitomatl srfi's or lack of my understanding of R6RS libraries, but I encountered this strange behavior (sorry for the non-minimal example, but the code beyond the SRFIs is basically just aliasing 2 of this SRFIs under a different name, and one providing a naive implementation of define-values):

~$ mkdir bug-p && cd bug-p
~/bug-p$ mkdir xitomatl && cd xitomatl
~/bug-p/xitomatl$ bzr branch lp:~ikarus-libraries-team/ikarus-libraries/srfi
[...]
~/bug-p$ wget http://rottyforge.yi.org/~rotty/tmp/spells-ik-bug.tar.gz # tarball is also attached to the bug report
~/bug-p$ tar -xzf spells-ik-bug.tar.gz
~/bug-p$ cat problem.sps
(import (spells define-values) (spells char-set) (spells strings))
~/bug-p$ ikarus --r6rs-script problem.sps # Note this doesn't give any error message
~/bug-p$ cd ..
~$ export IKARUS_LIBRARY_PATH=pwd/bug-p
~$ ikarus --r6rs-script bug-p/problem.sps # I'd expect this to behave in exactly the same way as above, but:
Unhandled exception:
Condition components:

  1. &who: check-substring-spec
  2. &message: "unbound identifier"
  3. &undefined
  4. &trace: #

Launchpad Details: #LP308348 Andreas Rottmann - 2008-12-15 17:43:09 -0500

syntax-case bug

Ikarus Scheme version 0.0.3+ (revision 1452, build 2008-04-20)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(syntax-case '(lambda (x) x) (lambda) [(lambda (x) y) #'x])
Unhandled exception
Condition components:

  1. &assertion
  2. &who: stx-mark*
  3. &message: "not a struct of required type"
  4. &irritants: (lambda #)

(syntax-case '(lambda (x) x) (lambda) [(lambda (x) y) 'x])
Unhandled exception
Condition components:

  1. &assertion
  2. &who: stx-mark*
  3. &message: "not a struct of required type"
  4. &irritants: (lambda #)

Petite Chez Scheme Version 7.4
Copyright (c) 1985-2007 Cadence Research Systems

(syntax-case '(lambda (x) x) (lambda) [(lambda (x) y) #'x])
x
(syntax-case '(lambda (x) x) (lambda) [(lambda (x) y) 'x])
x

Cheers

leppie

Launchpad Details: #LP223362 leppie - 2008-04-27 19:08:14 -0400

Warnings in r1403

Found with "CFLAGS='-W -Wall -padantic'". I've removed all the "unused var", "comparison of signed and unsigned", "printf format wrong" and a few other warnings.

ikarus-fasl.c:292: warning: pointer of type ‘void *’ used in arithmetic

Due to "(void_)(long)x + y", I think this should be "(void_)((long)x + y)". Could be very serious.

ikarus-collect.c:1047: warning: comparison of unsigned expression >= 0 is always true
ikarus-collect.c:1657: warning: comparison of unsigned expression >= 0 is always true

Due to "unsigned int x; ... assert(x >= 0)" (I'm on the fence about whether this is a problem.)

ikarus-main.c:43: warning: string length ‘960’ is greater than the length ‘509’ ISO C89 compilers are required to support

Due to the help/usage message you could split it into multiple strings but probably not a problem.

ikarus-runtime.c:988: warning: ISO C does not allow extra ‘;’ outside of a function

Due to "void foo(...) { ... } ;" should be "void foo(...) { ... }". Trivial but an easy fix.

Launchpad Details: #LP193327 Michael D. Adams - 2008-02-19 11:02:59 -0500

Flushing zombie process's broken pipe port kills the ikarus process

Ikarus Scheme version 0.0.2patched+ (revision 1357, build 2008-01-20)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-values (pid to from err) (process "tar"))
pid
7100
^Z
[1]+ Stopped $HOME/bin/ikarus-mine.sh
[d@eep:/t1]-> ps fxu | grep tar
d 7100 0.0 0.0 0 0 pts/7 Z+ 19:04 0:00 | | _ [tar]
[d@eep:
/t1]-> fg
$HOME/bin/ikarus-mine.sh
(exists port-closed? (list to from err))

f

(put-u8 to 123)
(define tot (transcoded-port to (native-transcoder)))
(write 'blah tot)
[d@eep:~/t1]-> echo $?
141

Launchpad Details: #LP184993 Derick Eddington - 2008-01-21 22:19:43 -0500

Expander tries to take the car of some #{thingamabob ...}

I want to learn more about how syntax-case etc works, so I'm reading Waddell and Dybvig's paper "Extending the Scope of Syntactic Abstraction". There's an example in section 5.2 that I thought wouldn't work in R6RS, so I modified it a little and here's what happened:

Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision 1834, build 2009-08-01)
Copyright (c) 2006-2009 Abdulaziz Ghuloum

(library (M)
(export a b)
(import (rnrs))
(define-syntax a
(syntax-rules ()
[(_ e0 e1 ...) (e0 (quote c) e1 ... )]))
(define b (lambda () c))
(define c 3)
(lambda () (set! c 5))) ;make Ikarus believe c is mutable
(import (M))
(let ()
(define-syntax f
(syntax-rules ()
[(_ (any id)) id]
[(_ (any id) value) (set! id value)]))
(let ([original (a f)])
(a f 4)
(list original (b)))) ; (3 4)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: car
  3. &message: "argument does not have required pair structure"
  4. &irritants: (#{c |&qTay!6SOGg0MwBL|})

I'm still pretty sure this isn't supposed to work, but the exception raised indicates a bug in the expander, rather than in the code above.

Btw, it works without error in Ypsilon. :)

Launchpad Details: #LP407754 Göran Weinholt - 2009-08-01 13:41:55 -0400

put-bytevector dies with an out of range bytevector-copy!

$ ikarus
Ikarus Scheme version 0.0.3+ (revision 1719, build 2008-12-14, 64-bit)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(call-with-values open-bytevector-output-port (lambda (p e) (do ((i 0 (+ i 1))) ((= i 86)) (put-bytevector p '#vu8(0)) (put-u8 p 0))))
Unhandled exception
Condition components:

  1. &assertion
  2. &who: bytevector-copy!
  3. &message: "out of range"
  4. &irritants: (0 257)

Launchpad Details: #LP307795 Göran Weinholt - 2008-12-13 19:03:38 -0500

Multiple values errors are sometimes optimized away

Unreferenced variables are optimized away in Ikarus, leading to optimizing away some error situations:

(let ([x (values 1 2 3)]) 1)
1

Here, the code is optimized to (begin (values 1 2 3) 1)* which is incorrect.
If x was referenced, we get the following instead:

(let ([x (values 1 2 3)]) x)
Unhandled exception
Condition components:

  1. &error
  2. &who: apply
  3. &message: "incorrect number of values returned to single value context"
  4. &irritants: ((1 2 3))

This should be fixed.

  • The code should ideally (but also incorrectly) have been optimized to 1 had the optimizer been more decent.

Launchpad Details: #LP165137 Abdulaziz Ghuloum - 2007-11-26 04:38:16 -0500

macro-introduced variables clobber the top-level

(define-syntax def
(syntax-rules ()
[(_ name val)
(begin
(define tmp val) ;;; this should be fresh
(define (name) tmp))]))
(def x 12)
(x)
12
(def y 13)
(y)
13
(x)
13 ;;; should be 12
tmp
13 ;;; should not be visible

Launchpad Details: #LP183680 Abdulaziz Ghuloum - 2008-01-16 22:51:34 -0500

Is utf-16-codec supported or not?

Found this when running Larceny's R6RS "cat3" benchmark.

While (latin-1-codec) and (utf-8-codec) work just fine, using (utf-16-codec) causes the following error.

Unhandled exception:
Condition components:

  1. &assertion
  2. &who: slow-get-char
  3. &message: "BUG: codec not handled"
  4. &irritants: (utf-16-codec)

I don't presently have a need for this particular codec, but if you don't support this codec yet, then it should be documented in the User's Guide under "Missing Features".

Launchpad Details: #LP189605 Michael D. Adams - 2008-02-06 10:45:37 -0500

Only supported eol-style is none

The first example works with `tot' having (eol-style none); the second example fails when the eol-style is not 'none.

[d@eep:~]-> ikarus
Ikarus Scheme version 0.0.2patched+ (revision 1360, build 2008-01-21)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-values (pid to from err) (process "cat"))
(define tot (transcoded-port to (make-transcoder (utf-8-codec) (eol-style none))))
(define fromt (transcoded-port from (make-transcoder (utf-8-codec))))
(write-char #\A tot)
(flush-output-port tot)
(read-char fromt)

\A

^D
[d@eep:~]-> ikarus
Ikarus Scheme version 0.0.2patched+ (revision 1360, build 2008-01-21)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-values (pid to from err) (process "cat"))
(define tot (transcoded-port to (make-transcoder (utf-8-codec) (eol-style lf))))
(port-closed? tot)

f

(write-char #\A tot)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: write-char
  3. &message: "port is closed"
  4. &irritants: (#<output-port (textual) "cat">)
    (port-closed? tot)
    #f

Launchpad Details: #LP185007 Derick Eddington - 2008-01-22 02:00:51 -0500

Request: let-syntax at top-level REPL

My (xitomatl keyword-args) from the latest revision 37 of my xitomatl branch now uses let-syntax in a cool way. But it can't be used from ikarus's top-level REPL because:

Ikarus Scheme version 0.0.3+ (revision 1430, build 2008-03-25)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(import (xitomatl keyword-args))
(define/kw/e (f [a 1] b) (values a b))
(f [:- [b 2]])
Unhandled exception
Condition components:

  1. &assertion
  2. &who: chi-top*
  3. &message: "BUG: not supported yet at top level"
  4. &irritants: (let-syntax)

I'm in no rush over it.

Launchpad Details: #LP206849 Derick Eddington - 2008-03-25 18:46:36 -0400

Bug in interaction of closures, set! and `fxarithmetic-shift-right'

The following program produces a bogus result:

;; ----------------------------------
(import (rnrs))

(define-syntax trace
(syntax-rules ()
((_ . args)
(begin
(for-each display (list . args))
(newline)))
#;
((_ . args) (begin))))

(define (make-bit-reader port)
(let ((buf 61) (buflen 8))
(lambda (count)
(let ((v (fxbit-field buf 0 count)))
(trace "BEFORE READ (c=" count "): buf=" buf ", buflen=" buflen)
(set! buf (fxarithmetic-shift-right buf count))
(set! buflen (fx- buflen count))
(trace "AFTER READ: buf=" buf ", buflen=" buflen)
v))))

(let ((get-bits (make-bit-reader
(open-bytevector-input-port #vu8(#b00111101 #b11000011 #b10100000)))))
(get-bits 3))
;;--------------------------------

Running this with "ikarus --r6rs-script ikarus-set-bug.scm" results in
the following output:

BEFORE READ (c=3): buf=61, buflen=8
AFTER READ: buf=61, buflen=5

Note that the value of buf' is unchanged after theset!', even
though the shift amount count' is 3. When one changes fxarithmetic-shift-right' to `bitwise-arithmetic-shift-right', the
problem goes away and the correct output is displayed:

BEFORE READ (c=3): buf=61, buflen=8
AFTER READ: buf=7, buflen=5

This is all with: Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision
1856, build 2009-09-29).

I suspect this is some kind of compiler bug.

Launchpad Details: #LP438835 Andreas Rottmann - 2009-09-29 13:05:41 -0400

"unhandled string" error after specific sequence of printing

Ikarus does this every time, but only if the same sequence of expressions is done, and only if I let the print-outs go for at least a second before ^C interrupting them.

[d@eep:~]-> ikarus
Ikarus Scheme version 0.0.3+ (revision 1713, build 2008-12-09)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define v (make-vector #e1e5))
v

(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[...]
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ^C
(car v)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: car
  3. &message: "argument does not have required pair structure"
  4. &irritants: (#(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    [...]
    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ^C
    (car v)
    Unhandled exception
    Condition components:
    1. &assertion
  5. &who: car
  6. &message: "argument does not have required pair structure"
  7. &irritants: (#(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    [...]
    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ^C
    v
    unhandled string 0x00000000b6d611c6 with fst=0x0000000065206465
    [d@eep:~]->

Launchpad Details: #LP306684 Derick Eddington - 2008-12-09 17:46:46 -0500

(command-line) cannot handle multi-byte command-line arguments

$ cat command-line

!/usr/bin/env scheme-script

(import (rnrs))
(write (command-line)) (newline)
$ ./command-line λ # goes berserk
Unhandled exception:
Condition components:

  1. &interrupted
  2. &message: "received an interrupt signal"
    $ ikarus -- λ
    Ikarus Scheme version 0.0.3+ (revision 1579, build 2008-08-09)
    Copyright (c) 2006-2008 Abdulaziz Ghuloum

(command-line) ;; goes berserk
Unhandled exception:
Condition components:

  1. &interrupted
  2. &message: "received an interrupt signal"
    $

Note the REPL did not reset, the ikarus process terminated.

I don't yet know why it's going berserk.

There's another issue I noticed that led me to discover the above:

ikarus-main.c, line 79:

      string_set(str, i, integer_to_char(s[i]));

this will transcode the command-line arguments as Latin-1. Instead, I suggest the command-line arguments be put in bytevectors and then in Scheme code the bytevectors are transcoded using (native-transcoder). I'll try it out.

Launchpad Details: #LP256453 Derick Eddington - 2008-08-09 16:05:42 -0400

invalid char representations and raising &lexical

According to R6RS 4.2.6, these should all raise &lexical. See my comments for each one.

Ikarus Scheme version 0.0.3+ (revision 1452, build 2008-04-19)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

\x0001z ;; should raise &lexical

\3

\alarmx ;; &irritants is ("xalarm")

Unhandled exception
Condition components:

  1. &lexical
  2. &message: "invalid character after sequence"
  3. &irritants: ("xalarm")
  4. &lexical-position:
    file-name: stdin
    character: 23
    #\x00110000 ;; should raise &lexical
    Unhandled exception
    Condition components:
    1. &assertion
  5. &who: integer->char
  6. &message: "integer does not have a unicode representation"
  7. &irritants: (1114112)
    #\xD800 ;; should raise &lexical
    Unhandled exception
    Condition components:
    1. &assertion
  8. &who: integer->char
  9. &message: "integer does not have a unicode representation"
  10. &irritants: (55296)

Launchpad Details: #LP223417 Derick Eddington - 2008-04-27 22:37:13 -0400

annotation structs being revealed

Sorry I couldn't find a way to reproduce this more simply. Running the file srfi/compare/examples.scm from the latest revision of the SRFIs is printing #[annotation ...] structs which must mean these annotations are escaping (what I assume is their intended restricted use) somehow.

(every?-ec (:list x (index ix) my-booleans)
(:list y (index iy) my-booleans)
(result-ok?
(boolean-compare
#["annotation" x ("./examples.scm" . 9791) x]
#["annotation" y ("./examples.scm" . 9793) y])
#["annotation" (#["annotation" ci ("./examples.scm" . 9797) ci] #["annotation" ix ("./examples.scm" . 9800) ix] #["annotation" iy ("./examples.scm" . 9803) iy]) ("./examples.scm" . 9796) (ci ix iy)]))
=> #t ; correct (4 examples)

...

Launchpad Details: #LP178334 Derick Eddington - 2007-12-23 15:19:45 -0500

with-syntax should give more informative error

Should tell it came from a failed with-syntax matching at least.

Ikarus Scheme version 0.0.3+ (revision 1430, build 2008-03-25)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(with-syntax ([a #'()])
(with-syntax ([(b) #'a]) #'b))
Unhandled exception
Condition components:

  1. &message: "invalid syntax"
  2. &syntax:
    form: (())
    subform: #f

Launchpad Details: #LP206844 Derick Eddington - 2008-03-25 18:28:27 -0400

flatten-codes "invalid D"

To help narrow it down, I think this is happening when the library is instantiated because check-report should just evaluate to a procedure. It works in r1513.

Ikarus Scheme version 0.0.3+ (revision 1514, build 2008-06-11)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(import (xitomatl srfi lightweight-testing))
check-report
Unhandled exception
Condition components:

  1. &error
  2. &who: flatten-codes
  3. &message: "invalid D"
  4. &irritants: (#["fvar" 1])

Ikarus Scheme version 0.0.3+ (revision 1513, build 2008-06-12)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(import (xitomatl srfi lightweight-testing))
check-report

Launchpad Details: #LP239588 Derick Eddington - 2008-06-12 19:06:41 -0400

fasl-write error message wrong about textual output ports

`sop' is not a binary-port so fasl-write is erroring, but it is an output-port. It looks like you can just make that message be "not a binary output port".

Ikarus Scheme version 0.0.3+ (revision 1403, build 2008-02-21)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-record-type my-thing (fields x))
(define t0 (make-my-thing 123))
(define-values (sop sop-getter) (open-string-output-port)) ;; oops
(fasl-write t0 sop)
Unhandled exception
Condition components:

  1. &assertion
  2. &who: fasl-write
  3. &message: "not an output port"
  4. &irritants: (#<output-port (textual) "string-output-port">)

Launchpad Details: #LP194232 Derick Eddington - 2008-02-21 22:56:50 -0500

exact->inexact, sqrt, and log are broken for rationals

(inexact (* 5 (expt 10 -324))) should return 5e-324, instead, it returns 0.0.

(sqrt (+ 1 (expt 5/2 1400))) should be 3.614149143438584e278, not +inf.0

From other bug report:

32e-45
3.2000000000000004e-44

Launchpad Details: #LP162334 Abdulaziz Ghuloum - 2007-11-12 22:12:50 -0500

syntax tracing not working by default when syntax-case fenders fail

Ikarus Scheme version 0.0.3+ (revision 1430, build 2008-03-25)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(define-syntax use-me
(lambda (stx)
(syntax-case stx ()
[(_ x) (identifier? #'x) #'(define x 'OK)])))
(define-syntax use-it
(syntax-rules ()
[(_ x) (use-me x)]))
(use-it 123)
Unhandled exception
Condition components:

  1. &message: "invalid syntax"
  2. &syntax:
    form: (use-me 123)
    subform: #f

;;; Above exception should show syntax trace, like below

(define-syntax use-me2
(lambda (stx)
(syntax-case stx ()
[(_ x)
(or (identifier? #'x) (syntax-violation #f "invalid syntax" stx))
#'(define x 'OK)])))
(define-syntax use-it2
(syntax-rules () [(_ x) (use-me2 x)]))
(use-it2 123)
Unhandled exception
Condition components:

  1. &who: use-me2
  2. &message: "invalid syntax"
  3. &syntax:
    form: (use-me2 123)
    subform: #f
  4. &trace: #<syntax (use-me2 123)>
  5. &trace: #<syntax (use-it2 123)>

Launchpad Details: #LP206842 Derick Eddington - 2008-03-25 18:22:26 -0400

map not failing with invalid arguments

Ikarus Scheme version 0.0.3+ (revision 1430, build 2008-03-25)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

(map + 1 2 3)

(Found me some of that in'ernet stuff... :-)

Launchpad Details: #LP206839 Derick Eddington - 2008-03-25 18:15:53 -0400

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.