Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 02 11:15
    Windows-mingw build of CI run 613765175 failed
  • Mar 02 10:50

    feeley on master

    fix too few arguments passed to… Merge pull request #668 from Fr… (compare)

  • Mar 02 10:50
    feeley closed #668
  • Mar 02 10:50
    feeley commented #668
  • Mar 02 03:28
    FredericHamel opened #668
  • Mar 01 20:02
    Windows-mingw build of CI run 611643033 failed
  • Mar 01 19:37

    feeley on master

    Remove redundant definition of … Precompute (- ##min-fixnum) (compare)

  • Mar 01 14:30
    Windows-mingw build of CI run 610706164 failed
  • Mar 01 14:01

    feeley on master

    Avoid uninitialized variables (compare)

  • Feb 28 00:46
    feeley commented on ecc608c
  • Feb 27 23:01
    gambiteer commented on ecc608c
  • Feb 27 16:49
    Windows-mingw build of CI run 605860457 failed
  • Feb 27 16:23

    feeley on master

    Add ##dead-end primitive Fix optimize-dead-local-variabl… (compare)

  • Feb 26 16:03
    Windows-mingw build of CI run 603179127 failed
  • Feb 26 15:33

    feeley on master

    Avoid needlessly wrapping quasi… (compare)

  • Feb 26 13:05
    Windows-mingw build of CI run 602742716 failed
  • Feb 26 12:39

    feeley on master

    Expose procedure to raise synta… Add ##c-id? to check C identifi… (compare)

  • Feb 25 21:22
    Windows-mingw build of CI run 600717985 failed
  • Feb 25 20:52

    feeley on master

    Use define-prim&proc for make-p… (compare)

  • Feb 25 16:28
    Windows-mingw build of CI run 599975967 failed
Jason Felice
@eraserhd
I just discovered that (equal? (make-table) (make-table test: equal?)) ;=> #f, and it's probably because (equal? equal? ##equal?) ;=> #f. This is non-obvious from the docs, is it bad?
amirouche
@amirouche
re javascript backend: that said I stumbled upon an error that says something along the lines of r1 register undefined... Next time I will try to pin point a simple way to reproduce, I mostly debug with print but before convert argument to string with write
The error I mentioned above is a javascript error, 99 time out of 100 the error raise a popup with a REPL with where the error is.
Marc Feeley
@feeley
@eraserhd nice catch! yes definitely what I consider to be a bug… will come up with a fix...
François-René Rideau
@fare
what is the Right Way™ to cond-expand on the presence of symbols in openssl?
use #ifdef in C, and export dummies if not present?
François-René Rideau
@fare
I ended up doing a #if in C that returns NULL when the thingie is undefined, so you get a #f at runtime on the Scheme side.
François-René Rideau
@fare
Has anyone here experience with SchemeSpheres and/or LambdaNative ? Which should I use if I wanted to write applications targetting iOS, Android, JS, etc.?
François-René Rideau
@fare
is there a way to tell the FFI that an EVP_PKEY* is a special case of EVP_MD* or must I somehow cheat via void* ?
François-René Rideau
@fare
^ I assume that's what the tags in (pointer ...) are for, though I'm a bit surprised by the "T’s primary tag is a member of E’s tags" criterion.
junkerjoe
@junkerjoe

I'm getting a failed unit test from make check when trying to build the Gambit master branch with the options:

./configure --prefix=/usr/local/gambit 
                       --enable-single-host
                       --enable-multiple-versions
                       --enable-shared
                       --enable-smp 
                       --enable-gcc-opts
                       --enable-openssl
                       --enable-absolute-shared-libs
                       --enable-poll
                       --enable-bignum

The relevant make check output is:

LD_LIBRARY_PATH=../lib:../gsi:../gsc: ../gsi/gsi -:tl,~~bin=../bin,~~lib=../lib,~~include=../include -f ./run-unit-tests.scm
[226|  0]  90% ##############.. 6.9s 13-modules/prim_exception.scm
*** FAILED 13-modules/prim_exception.scm WITH EXIT CODE HI=1 LO=0
(with-exception-handler ##list (lambda () (##cons 1 (##raise 123)))) in (include "~~lib/gambit/prim/exception#.scm") returned #<unbound-global-exception #2> but expected (1 123)
(with-exception-handler ##list (lambda () (##cons 1 (##raise 123)))) in (namespace ("##")) returned #<unbound-global-exception #3> but expected (1 123)
[250|  1] 100% ################ 7.5s
FAILED 1 UNIT TESTS OUT OF 251 (.4%)

This is my first time building Gambit with this many options. Any insights to share on why this might be happening?

Bob Coleman
@skilldown

@junkerjoe Those tests rely on the optional module system. From a fresh clone build with a normal make and build the module system with make modules before running the make check. This fixed the issue for me.

Make sure to use a fresh clone to avoid issues with build artifacts.

Jaime Fournier
@ober
@junkerjoe you should not need the --enable-gcc-opts any longer
junkerjoe
@junkerjoe
@skilldown I thought --enable-smp required make bootstrap; make bootclean; make before make modules; make check. I can try it without.
@ober Noted. I'll get rid of this option
junkerjoe
@junkerjoe
Decided to revert back to non-SMP, but I made a ticket on the issue I was having to get clarity on whether it was expected behavior: gambit/gambit#502
junkerjoe
@junkerjoe
Linked the wrong ticket woops. Correction: gambit/gambit#640
Bradley Lucier
@gambiteer
Marc: Simple file:
(define-structure point x)

expands to

gsc -c -expansion crap.scm
Expansion:

(define ##type-1-point
  ('#<procedure #2 ##structure> ##type-type ('#<procedure #3 ##string->uninterned-symbol> "##type-1-point") 'point 8 #f #(x 0 #f)))

(define make-point (lambda (p1) ('#<procedure #2 ##structure> ##type-1-point p1)))

(define point-copy (lambda (obj) (##structure-copy obj)))

(define point? (lambda (obj) ('#<procedure #4 ##structure-direct-instance-of?> obj ('#<procedure #5 ##type-id> ##type-1-point))))

(define point-x
  (lambda (obj)
    (let ((temp.3 point-x) (temp.2 ##type-1-point))
      (if ('#<procedure #4 ##structure-direct-instance-of?> obj ('#<procedure #5 ##type-id> temp.2))
          ('#<procedure #6 ##unchecked-structure-ref> obj 1 temp.2 temp.3)
          ('#<procedure #7 ##direct-structure-ref> obj 1 temp.2 temp.3)))))

(define point-x-set!
  (lambda (obj val)
    (let ((temp.8 point-x-set!) (temp.7 ##type-1-point))
      (if ('#<procedure #4 ##structure-direct-instance-of?> obj ('#<procedure #5 ##type-id> temp.7))
          ('#<procedure #8 ##unchecked-structure-set!> obj val 1 temp.7 temp.8)
          ('#<procedure #9 ##direct-structure-set!> obj val 1 temp.7 temp.8)))))

(define point-x-set (lambda (obj val) (##direct-structure-set obj val 1 ##type-1-point point-x-set)))

How do I get rid of point-copy? I want to define my own with that name.

Bradley Lucier
@gambiteer
If it's not easy to get rid of point-copy I'll just rename my function.
Marc Feeley
@feeley
@gambiteer (define-structure point x copier: #f)
junkerjoe
@junkerjoe
Should I expect an executable to be killed off, after exceeding a certain memory limit, when providing the -:max-heap runtime option to gsc?
junkerjoe
@junkerjoe
I'd love to see an example program compiled with the -:max-heap setting and heap overflow. I think I just don't understand how it works.
Bradley Lucier
@gambiteer

-:max-heap is a runtime setting, so if c.scm is

[Bradleys-Mac-mini:~] lucier% cat c.scm
(do ((r '() (cons (make-vector 1000000) r)))
    (#f))

then you get

gsi -:max-heap=1000 c.scm
*** ERROR IN ##make-vector -- Heap overflow
junkerjoe
@junkerjoe
does that mean -:max-heap cannot be used with gsc?
Bradley Lucier
@gambiteer
If you use it with gsc then that means that you're restricting the heap size of gsc when it runs. Perhaps you want to do
[Bradleys-Mac-mini:~] lucier% gsc -exe c.scm
[Bradleys-Mac-mini:~] lucier% ./c -:max-heap=1000
*** ERROR IN ##make-vector -- Heap overflow
junkerjoe
@junkerjoe
i think that's just what i needed
thank you!
from gsc -:help i would've thought the option would need to be provided with the compilation command
anyways that's great, and really simple too
Riley Levy
@rileylevy95_gitlab
To build a gambit program with emscripten, how do I get an emscripten version of libgambit.a?
Marc Feeley
@feeley
@junkerjoe you can also use the following trick... if your source program contains a shebang line gsc will read the runtime options on the shebang line and embed them in the executable. This is convenient if you program starts off as an interpreted script that is compiled when ready for production. For example :
% cat limited.scm
#! /usr/bin/env gsi -:max-heap=100M
(##gc-report-set! #t)
(##gc)
(define (go)
  (let loop ((size 1000000) (last #f))
    (println size)
    (loop (* size 2) (make-vector size))))
(with-exception-catcher pp go)
% chmod +x limited.scm
% ./limited.scm
*** GC: 135us, 130K alloc, 12M heap, 84K live (1% 84288+1488)
1000000
2000000
*** GC: 2.4ms, 135K alloc, 52M heap, 23M live (44% 85168+24001584)
4000000
*** GC: 5.1ms, 139K alloc, 101M heap, 46M live (46% 85168+48001584)
8000000
*** GC: 9.3ms, 143K alloc, 105M heap, 92M live (88% 85168+96001584)
16000000
*** GC: 17ms, 147K alloc, 108M heap, 61M live (57% 85168+64001536)
#<heap-overflow-exception #2>
% gsc -exe limited.scm
% ./limited
*** GC: 109us, 71K alloc, 12M heap, 64K live (1% 64464+1488)
1000000
2000000
*** GC: 525us, 75K alloc, 36M heap, 15M live (42% 64928+16001536)
4000000
*** GC: 260us, 79K alloc, 69M heap, 31M live (45% 64928+32001536)
8000000
*** GC: 1.9ms, 82K alloc, 108M heap, 61M live (57% 64928+64001536)
16000000
*** GC: 3.4ms, 86K alloc, 12M heap, 65K live (1% 64928+1488)
#<heap-overflow-exception #2>
@rileylevy95_gitlab Please check the file misc/build-gambit-emscripten.tgz... it is quite likely that it has suffered from bitrot, but it shouldn't be too hard to get it working again. This biggest problem is probably the evolution of emscripten, so doing a checkout of an old version of emscripten may be needed if you just want to quickly experiment with this.
Riley Levy
@rileylevy95_gitlab
Thank you
Ideally, would i run that script instead of ./configure?
junkerjoe
@junkerjoe
That is really useful. Thanks @feeley
luca regini
@lucaregini
Hi @feeley , how do you debug the gambit compiler? Do you run it completely in the interpreter? Do you start with the binary and then load in the interpreter what you'd like to debug?
luca regini
@lucaregini
By "debugging" I really intended single-stepping in the source of the compiler. What's the most convenient way to do that?
Bradley Lucier
@gambiteer
Try gsc/igsc.scm.
9 replies
François-René Rideau
@fare
In a clean git checkout of master, if I try to git checkout v4.9.3, I get an error about "local changes" to some files. My workaround was to use git worktree add v4.9.3 v4.9.3.
is it OK if the makefile tries to build some modules that fail with errors on some targets?
François-René Rideau
@fare
looks like gambit has been trying to compile _digest for riscv-64 at 100% cpu for 40 minutes.
Jaime Fournier
@ober
local changes happens I found when you are using a modified tree. git clean -xfd always fixed it for me. as per @belmarca advice
luca regini
@lucaregini
How to specify additional include directories in gsi?
luca regini
@lucaregini
(load "/home/lucar/gambit/gsc/igsc.scm")
  • ERROR -- Can't open file "/home/lucar/gambit-stage/usr/local/Gambit/lib/header.scm"
    1>
luca regini
@lucaregini
@drewc I saw that section, which is the right option? I see only The ‘=DIRECTORY’ option overrides the setting of the central installation directory.
and
The ‘~~DIR=DIRECTORY’ option overrides the setting of the DIR installation directory.
These options are not what I am looking for
I need to add paths, not to ovveride the installation directory
Drew Crampsie
@drewc
If you (or the code) is using "~~" as a prefix to the libs, is that not by its very nature an installed gambit library?