Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 24 05:49
    CI run 1161317361 passed
  • Aug 24 05:08

    feeley on master

    Improve hashing of uninterned s… (compare)

  • Aug 24 04:57
    MacOS build of CI run 1161242223 failed
  • Aug 24 04:32

    feeley on master

    Fix collision handling bug in _… (compare)

  • Aug 20 18:24
    CI run 1151566506 passed
  • Aug 20 17:43

    feeley on master

    Fix issue with macro body that … (compare)

  • Aug 14 19:38
    CI run 1131109944 passed
  • Aug 14 19:00

    gambiteer on master

    Allow Karatsuba multiplication … (compare)

  • Jul 31 20:18
    janus synchronize #715
  • Jul 30 20:49
    gambiteer reopened #659
  • Jul 30 20:49
    gambiteer commented #659
  • Jul 30 20:17
    CI run 1083377048 passed
  • Jul 30 19:39
    gambiteer commented on 47f2eb7
  • Jul 30 19:39

    gambiteer on master

    Revert "Fix reordering of claus… (compare)

  • Jul 30 19:27
    gambiteer commented on 47f2eb7
  • Jul 30 19:19
    Windows-msvc build of CI run failed
  • Jul 30 19:16
    MacOS build of CI run 1083262967 failed
  • Jul 30 19:14
    Windows-mingw build of CI run 1083262967 failed
  • Jul 30 19:08
    Linux build of CI run 1083262967 failed
  • Jul 30 18:54
    gambiteer closed #659
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.
Drew Crampsie
@drewc
And, of course, without anything "running" the async promise is always pending as the heartbeat needs to pump blood and run the async queue loop (which is brilliant, btw!). I mean, I cannot believe I thought that it would be running after exit .... that's totally nonsensical.
Marc Feeley
@feeley
yes you have to be careful with “primordial thread termination” because it can be a signal to the RTS that your program is “done”… one strategy (which is designed to work that way) is to not create a separate event handling thread but rather have the primordial thread run the event handling loop (after all initialisation is done)

so instead of having lib/_univlib.scm call (##start-callback-loop-thread) :

(define (##start-callback-loop-thread)
  (let* ((tgroup
          (##make-tgroup 'callback-loop #f))
         (callback-loop-thread
          (##make-root-thread
           ##callback-loop
           'callback-loop
           tgroup)))
    (##thread-start! callback-loop-thread)))

(##start-callback-loop-thread)

you should just end the program with the call (##callback-loop) so that it is the primordial thread that runs the callback handling loop

drewc @drewc gives @feeley big virtual hugs
Drew Crampsie
@drewc
That is exactly what I'm working on at this very moment, a default process that is loaded by the init of the VM.scm module. My (let lol () (thread-sleep! 100) (lol))works, don't get me wrong, but that's a much better idea.
I'll likely make my own event handler as I'll not be doing any modifications to _univlib.scm, but thank you so much for laying in out in such a simple fashion, that helps so much!
adam-7
@adam-7

@feeley Dear Marc, just curious how are C/C++ atomics kind of functionality done in Scheme?

Say you want to |set!| a variable in Gambit processor A, in such a way that Gambit processor B when it sees that variable, is guaranteed to see all of its contents.

Do you have an |atomic-set!| or such variant of |set!| that will have that guarantee, a la C/C++ atomics?

(This in practice will only be of concern on weakly ordered architectures as in ARM64 and is it RISCV.)