Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:14
    Travis gambit/gambit (master) still failing (1223)
  • 02:53

    feeley on master

    Don't use sysctl and sysctlbyna… Merge pull request #412 from ab… (compare)

  • 02:53
    feeley closed #412
  • 02:32
  • 02:13
    abdelq review_requested #412
  • 02:12
    abdelq synchronize #412
  • 00:31
  • 00:11
    abdelq opened #412
  • Oct 12 00:32
    gambiteer commented #411
  • Oct 12 00:29
    feeley commented #411
  • Oct 12 00:27
    feeley commented #411
  • Oct 12 00:25
    gambiteer commented #411
  • Oct 12 00:24
    gambiteer edited #411
  • Oct 12 00:13
    lassik commented #411
  • Oct 11 21:17
    gambiteer commented #411
  • Oct 11 21:11
    lassik closed #407
  • Oct 11 21:11
    lassik commented #407
  • Oct 11 21:04
    gambiteer commented #411
  • Oct 11 20:58
    gambiteer commented #411
  • Oct 11 20:40
    feeley commented #411
Guillaume Cartier
@jazzscheme
I can vouch for that. I’ve been using Gambit in real life applications for 20 years and I’ve never encountered a GC bug
Marc-André Bélanger
@belmarca
Great thank you.
nymacro
@nymacro
@belmarca I can't speak with any confidence about performance. But my little Game of Life simulation built on u8vector has been pretty nice. It has about ~50 life ticks/s and allocates ~56MB/s with collection times between 100us and 150us. With a constant 83K live heap. By no means is it stressing the GC as much as other things -- but thus far I have found it to outperform Chez Scheme for the same program. I'm by no means an expert on either implementation, so take this with a grain of salt. :)
Although I believe the GC currently stops all threads during collection? For my little programs, this isn't a problem (I'm using green threads) -- I'm not sure how this compares to Go's collector
Marc-André Bélanger
@belmarca
nice.
amirouche
@amirouche
gambit js backend is almost as fast as javascript (compared to my own (pseudo) scheme to JS compiler)
ben.txt
@bentxt
I try to run a simple test with the javascript port that reverses a list. I doesn't work and there is not much documentation.
with gsi-script: (display (reverse (list 88 99)))
output: (99 88)
with js there is the error: "g_peps.reverse is not a function". So why is the 'reverse' function from the standard library not used?
amirouche
@amirouche
@bentxt are you compiling the runtime or jusst lib.scm + app.scm ?
@bentxt the runtime is somewhat big, the lib.scm + app.scm like I do in scheme fuss doesn't come with most scheme procedures
you have the implement them.
ben.txt
@bentxt

I'm not sure what you mean. Here is how I build it:

cat app_.js libjs.js app.js > linked_app.js

libjs.js are user defined functions

amirouche
@amirouche
yeah then you have to implement reverse yourself.
ben.txt
@bentxt
and how do you do it?
amirouche
@amirouche
you don't know scheme?
ben.txt
@bentxt
I've meant the compilation process. How do you integrate the standard library? I guess 'reverse' is written in scheme and therefor should be usable for the universal backend.
amirouche
@amirouche
ben.txt
@bentxt
@amirouche thanks. does this build a library _gambit.js inside gambits source tree?
Marc Feeley
@feeley
@bentxt yes it builds lib/_gambit.js which is most of the normal Gambit Scheme library
@amirouche I've looked at your JS performance experiment... what is the Scheme code that you are compiling? factorial wouldn't be my first choice of benchmark because very soon you need bignums to compute factorials of > 20 or so
I typically use fib which exercices function calls and fixnum arithmetic and it is very easy to scale to a larger time by incrementing the argument
when you say "almost as fast as JS" do you mean compared to factorial written directly in JS or through your compiler?
John Cowan
@johnwcowan
I sometimes ask candidates if they know of an O(1) way to implement factorial. Only one or two have actually come up with the answer.
amirouche
@amirouche
@feeley ok for fib, tx for the hint. As fast as iterative factorial written in JavaScript (which is the fatest factorial compared to recursive and tail recursive)
@johnwcowan using a memo?
@feeley it is a tail recursive factorial
John Cowan
@johnwcowan
Using a precomputed array of all possible factorials that can be represented as 64-bit floats.
There are really very few.
amirouche
@amirouche
amirouche
@amirouche
@johnwcowan I missed an opportunity to look smart
John Cowan
@johnwcowan
As I say, almost everyone does.
ben.txt
@bentxt
@feeley @amirouche ok that is producing a 21M large _gambit.js file, I guess I'll try other solutions then, ... thanks anyway
Marc Feeley
@feeley
@bentxt As was mentioned before, if your application is small (you need reverse and just a few other things), then you should build your own runtime library and you will get a reasonable JS code size, especially if you minify the code. See the mentioned link.
amirouche
@amirouche
I am around if you want to discuss the issue I just posted at gambit/gambit#404
Marc Feeley
@feeley
@amirouche did you see my response? call/cc is just:
(define (call/cc f)
  (##continuation-capture
   (lambda (k)
     (f (lambda (r) (##continuation-return-no-winding k r))))))
Marc Feeley
@feeley
if you wonder about the rationale for those continuation primitives they are explained here: http://www.iro.umontreal.ca/~feeley/papers/FeeleySW01.pdf
amirouche
@amirouche
tx a lot!
I think I have all i need :)
Marc-André Bélanger
@belmarca
> (##include "~~lib/_std#.scm")
*** ERROR IN "/usr/local/Gambit/v4.9.3/lib/_std#.scm"@11.2 -- Unbound variable: define-library-type-of-exception
Marc Feeley
@feeley
(##include "~~lib/_gambit#.scm")
Marc-André Bélanger
@belmarca
😣thanks
amirouche
@amirouche
use TAB + ENTER or click TODO to validate input
Marc-André Bélanger
@belmarca
13kb for everything amirite?
amirouche
@amirouche
amirite?
Marc-André Bélanger
@belmarca
"am I right" :)
amirouche
@amirouche
where do you see this number?