Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 22 20:34
    lassik commented #698
  • Oct 22 20:33
    lassik synchronize #698
  • Oct 18 15:46
    gambiteer closed #718
  • Oct 16 18:59
    CI run 1349680538 passed
  • Oct 16 18:13

    feeley on master

    Fix bootstrap Add web REPL example of reading… (compare)

  • Oct 16 14:17
    Windows-msvc build of CI run failed
  • Oct 16 14:17
    MacOS build of CI run 1349271071 failed
  • Oct 16 14:16
    Windows-mingw build of CI run 1349271071 failed
  • Oct 16 14:10
    Linux build of CI run 1349271071 failed
  • Oct 16 14:00

    feeley on master

    Add write-file-string, write-fi… (compare)

  • Oct 16 13:57
    feeley commented #698
  • Oct 16 13:53
    feeley commented #698
  • Oct 16 12:40
    lassik commented #698
  • Oct 16 11:46
    feeley commented #698
  • Oct 16 11:44
    lassik commented #698
  • Oct 16 11:43
    lassik commented #698
  • Oct 16 11:42
    lassik commented #698
  • Oct 16 11:21
    feeley commented #698
  • Oct 16 11:08
    lassik commented #698
  • Oct 16 03:26
    CI run 1348215633 passed
Marc Feeley
@feeley
gzip compressing the JS code of the interpreter (including the Gambit runtime library) gives 640KB… gzip compressing the x86 code of the interpreter gives 1.5MB (down from 6.1MB)… I would have thought that machine code is rather compressed to start with
Bradley Lucier
@gambiteer
Aha. The C back end includes a number of tables of floating-point numbers, which are likely somewhat difficult to compress, plus a bit more code for bignum algorithms.
Marc Feeley
@feeley
sure… but 640KB! that means the “information content” of Gambit’s interpreter is <= 640KB… doesn’t sound like much
Drew Crampsie
@drewc
I'm still in shock over that small number.
Bradley Lucier
@gambiteer
Well, that's a good thing, right? Does that include the module code?
Drew Crampsie
@drewc
It also means an increase in performance due to _i being a tiny lookup...
Marc Feeley
@feeley
yes a super good thing… and yes the runtime system includes dynamic module loading (but all the usual modules are preloaded)
Drew Crampsie
@drewc
and changes my entire strategy when it comes to minimal js downloads ... it's so tiny, for almost everything, that it's well worth the little tiny bits of bytes.
Marc Feeley
@feeley
I saved quite a bit by compressing the Unicode tables… they went from 600KB of JS to 5.2KB… more than 100x more compact (and I’m not including the gzip compression factor)
François-René Rideau
@fare
So that's what they meant when they said that nobody needs more than 640KB...
Drew Crampsie
@drewc
I'm still somewhat in shock lol... it's so much in such a small package.
5 and a quarter, it's a small package as it's still floppy!!
Drew Crampsie
@drewc
@feeley I also have to give you some major big-ups on the @async_call@ and the ##callback-loop. That is exactly what I was needing to attempt this week as, I'm sure you well know, that bloody stack and FFI and async do/did not get along.
Marc Feeley
@feeley
yes I’m quite pleased with the solution which interfaces JS async functions and Scheme threads
Drew Crampsie
@drewc
Having most of the interaction be in a promise saves so much headscratching and will totally get rid of my "fake" js#function where I copy the stack and sp. I never thought I'd enjoy the JS universe so much, but 4 odd months of Universal Runtime and interactions with it, I'm now quite a fan.
Uniting threads and async was what I needed to have IndexedDB interactions without having to pass callbacks.
That was my plan this week, with mutexes and a loop, so 10% of what you did in 1000% of a timesink due to my lack of clue... so I'm very happy :) What a fun Monday.
Marc Feeley
@feeley
too bad you don’t also like SIX… but I’ll give you some time
Drew Crampsie
@drewc
I've thought about that as well and already figured a number of reasons to get along with it, so likely next week you'll hear my praise \infix('of)
Marc Feeley
@feeley
I don’t want praise… I want the happy dance
Drew Crampsie
@drewc
lol, it could happen!
Drew Crampsie
@drewc
Question: why does my gsc and _gambit.js seem to have glo as _i or RTS.i while it most certainly seems to be _g? Is there an easy way to find/see that mapping?
Marc Feeley
@feeley
You’ll find the mapping in gsc/_t-univ-1.scm :
(define (univ-rts-field-low-level-name ctx name)
  (if (univ-compactness>=? ctx 5)
      (case name
        ((r0)        'r)
        ((r1)        'a)
        ((r2)        'b)
        ((r3)        'c)
        ((r4)        'd)
        ((glo)       'g)
        ((stack)     's)
        ((sp)        't)
        ((nargs)     'n)
        ((peps)      'e)
        ((pollcount) 'q)
        ((inttemp1)  'o)
        ((inttemp2)  'h)
        (else        name))
      name))

(define (univ-rts-method-low-level-name ctx name)
  (if (univ-compactness>=? ctx 5)
      (case name
        ((poll)                 'p)
        ((wrong_nargs)          'w)
        ((make_interned_symbol) 'i)
        ((check_procedure_glo)  'u)
        ((ctrlpt_init)          'j)
        ((returnpt_init)        'k)
        ((entrypt_init)         'l)
        ((parententrypt_init)   'm)
        ((flonumbox)            'F)
        ((flonump)              'f)
        ((vectorbox)            'V)
        ((vectorp)              'v)
        ((stringbox)            'Z)
;;        ((stringp)              'z)
        ((cons)                 'X)
        ((pairp)                'x)
        ((jsnumberp)            'y)
        ((base92_decode)        'z)
        (else                   name))
      name))
Drew Crampsie
@drewc
Brilliant, thanks!
Jaime Fournier
@ober
Jaime Fournier
@ober
without --enable-multiple-threaded-vms I can't reproduce.
Marc Feeley
@feeley
@ober should be fixed now
Jaime Fournier
@ober
ty sir
Drew Crampsie
@drewc
Marc Feeley
@feeley
it seems the whole CS department’s network is down… I can’t reach any of the machines
Drew Crampsie
@drewc
I'll have to make try myself then, which I wanted to do anyway, so there you go. Yay! :)
Jaime Fournier
@ober
Removing child 0x7fb5a11017e0 PID 1633 from chain.
make[1]: Leaving directory '/opt/gambit-src/lib'
make[1]: * [makefile:179: _io.c] Segmentation fault (core dumped)
still failing for me
Drew Crampsie
@drewc
make try failed for me at first but it's all my 'fault' for running NixOS, but when I got rid of the npx and the /user/local/ docs, it worked wonderfully.
Upon playing with it, I really started to enjoy the \globalThis.Object.create(null) syntax, so, before bed, it's true.
drewc @drewc does a happy dance
Marc Feeley
@feeley
@drewc Wonderful! 1 down 9999 to go…
if you have a more portable solution for the make try makefile rules please do a PR
Drew Crampsie
@drewc
So, how very right you are about the performance difference by using declarative Environment Recordsvs. object Environment Records for the runtime system. I'm very happy my opinions and beliefs are not my knowledge and are quite mutable, for \I.really(globalThis.appreciate) certain things my opinion was against and am in total disbelief about the performance difference.
Like, 500% difference.
Drew Crampsie
@drewc
Question: When can I / is it ever safe to use _host2scm_call?
drewc @drewc know nows how needed ##heartbeat! is. :)
Drew Crampsie
@drewc
Or, at least, to have the main thread running/sleeping or at least doing something in order to have other threads actually run as well. I have done so in the past but without any know-how of what I was actually doing and conceptually why it matters.
Marc Feeley
@feeley
all highly evolved living things need a heatbeat...
but for the JS backend I think the heartbeat is optional and only required if you want preemptive threads
Drew Crampsie
@drewc
I seem to remember there was a setTimeout() in VM.scm at one point, I'll have to lookup the git history and see if that was to solve what a running primordial now does :). Learning so very much about SpiderMonkey and V8.
To not think of everything as eventually being C and/or with POSIX and libc is a hard one.
Drew Crampsie
@drewc
I personally found that without "anything" running, where node will exit as the program is 'finished', but of course the browser and SPA are still up, the threads will of course not run and therefore though the scm2host "function" will the system is not where it wants to be when finished it.
And it's all my fault for not treating it as a process that I am operating but, rather, an operating system process.