IRC channel logs

2021-03-17.log

back to list of logs

<flatwhatson>did anyone make progress rebasing the wip-elisp branch to 2.2.x or beyond?
<rekado_>flatwhatson: here’s my stalled attempt: https://git.elephly.net/?p=software/guile.git;a=shortlog;h=refs/heads/wip-elisp
*janneke -> zZzz
<flatwhatson>rekado_: thanks, do you recall any of the challenges around it?
<rekado_>flatwhatson: when the rebased Guile Emacs uses it there’s a segfault.
<rekado_>flatwhatson: I’m not sure if it’s because of changes to wip-elisp or Guile Emacs
*rekado_ –> zzzZ
***scs is now known as Guest72788
<davexunit>daviid: the bug has been filed and the patch is included: https://lists.gnu.org/archive/html/bug-guile/2021-01/msg00028.html
<daviid>davexunit: oh great, sorry for the noise, tx
<davexunit>np :)
<davexunit>I don't know if anyone is going to merge it before the release but we'll see
<daviid>davexunit: yes, we'll see :) ... this 'noise' of mine might serve as a gentle ping after all :) ...
<davexunit>;)
*davexunit gets back to working on exercises in "software development for flexibility"
<davexunit>er, I mean "software design for flexibility"
<lispmacs>in guile-sdl2, there is keyboard input procedure (key-pressed? key)
<lispmacs>but I'm having trouble figuring out what is the format of KEY
<lispmacs>simply passing in the ASCII doesn't work, and I tried passing the name of the SDL constant
<davexunit>lispmacs: it's a symbol. 'a, 'b, 'c, etc.
<davexunit>lispmacs: see https://git.dthompson.us/guile-sdl2.git/tree/sdl2/input/keyboard.scm#n36 for the mapping of scheme symbols to sdl2 key constants
<lispmacs>davexunit: I'm expect (while (not (key-pressed? 'q)) '()) to block until the letter q is pressed, but this doesn't seem to work
<davexunit>lispmacs: it doesn't block. it simply returns the state of the key at the time of the call.
<davexunit>if you want to be notified of key presses, you'll want to poll for input events instead.
<lispmacs>davexunit: right, but just for understanding: if I have a while loop that does nothing until (key-pressed? 'q) returns true, shouldn't my program block until the letter q is pressed?
<lispmacs>or held down
<flatwhatson>you would need some theoretical "wait for something to happen" function inside that loop
<flatwhatson>aka. polling for events
<davexunit>lispmacs: it will block in the sense that it will loop as fast as possible, doing nothing but burning cpu
<davexunit>(while (key-released? 'q) #t) would create a loop that would use 100% of a CPU doing nothing until the Q key is pressed
<lispmacs>davexunit: makes sense, but it doesn't.
<davexunit>then your code is wrong
<davexunit>ah, hold on
<davexunit>I see the confusion.
<davexunit>so, SDL2 doesn't update input state unless you ask it to
<lispmacs>ah
<davexunit>so if you're stuck in a loop nothing will ever change
<lispmacs>which procedure does that?
<davexunit>poll-event in (sdl2 events)
<lispmacs>there we go
<davexunit>I recommend reading sdl2 tutorials to get a hang of the basics and then translate the C code to scheme. guile-sdl2 tries its best to provide a 1 to 1 mapping from the C API to Scheme procedures.
<davexunit>poll-event will return #f when there are no more events left to process. you will want to call poll-event in a loop every so often until it returns #f
<lispmacs>davexunit: i tried that but got bored way too quickly. and I've already got 200 lines of scheme code
<lispmacs>anyway, thanks
<davexunit>np
<davexunit>and now that you're polling for events, you can replace a loop that would burn 100% of a CPU with an event callback :)
***scs is now known as Guest39650
<ArneBab>Can you estimate whether it would be viable to get a guix.scm package-dependency-resolver that usess guildhall under the hood for pure Scheme dependencies when the user has no Guix installed?
***scs is now known as Guest25016
<janneke>spk121: okay, finally got the new mini-mpz approach to work; now to clean-up the patch set
<janneke>in order to get it to work, /me probably changed too many instances of long => scm_t_inum and such...
<wingo>janneke: would be happy to review the patch on gitlab btw
*wingo likes the clicky web patch review things
<janneke>wingo: great, i'll let you know once i cleaned it up a bit
<wingo>thumbs up
*janneke missed "typedef long SCM_STACKITEM;" all night yesterday, and this morning until just now...
<janneke>that was probably it
<wingo>humm, is that a problem?
<wingo>ah pointers are 64-bit
<wingo>ok :)
<wingo>yes that sounds like a problem :)
<janneke>yeah, i went to eradicate all instances of "long", just to be sure; i hope most of that can be reverted
<rekado>ArneBab: I’m not sure I understand. Do you want to extend a “guix.scm” file containing a Guix package definition, so that it can be used to install the package when used without Guix? How would that be used?
<ArneBab>rekado: I’d like to have some dependency mapping, so guildhall can check whether it has packages matching the guix packages.
<wingo>sounds excruciating, janneke. highfives for doing the work
<ArneBab>rekado: that would allow me to just provide a guix.scm file with dependencies, and for all plain Scheme dependencies just tell people "if you don’t run guix, just use guildhall [some way …] to install dependencies"
<ArneBab>that would provide a single point of dependency information
<janneke>wingo: thanks, ... i'm at least somewhat ambivalent about this work
<wingo>janneke: why do you say that? you think we are taking the wrong strategy by making 64-bit fixnums on mingw64 ?
<janneke>wingo: ah no, this is the right approach; it's just, throwing good enegry towards supporting something as stupid as windows, that needs to die ;-)
<wingo>haha yeah
<wingo>~ users ~
<wingo>you are doing $deity's work tho :)
<janneke>yeah thanks---just hoping it may inspire some people leave that all behind
<wingo>need to get it working on wine eventually for it to not bitrot
<dsmith-work>Wednesday Greetings, Guilers
<lloda>when there is an error while autocompiling there is no source info printed out
<lloda>i have to resort to (compile-file ...) by hand to see that
<lispmacs>did somebody have a procedure that is the same as `map', but that works on lists with arbitrary nesting? I.e., applies the procedure to the non-list elements?
***leoprikler_ is now known as leoprikler
***DadeBonetti1 is now known as DadeBonetti
<tohoyn>lispmacs: see https://paste.debian.net/1189759/ (the procedure is not my own)
<dsmith-work>tohoyn: ISTR the ssax stuff having something like that. Not sure..
***DadeBonetti1 is now known as DadeBonetti
***DadeBonetti1 is now known as DadeBonetti
<rlb>wingo: OK, so if we switch stringbufs to be say ~6% index or whatever (i.e. sparse byte offset index followed by the chars), that means that we can swap the entire content by swapping the stringbuf (pointer), and I *think* that also means that we'll still want shared strings as a separate type that points to another string, so we can swap that other string's stringbuf to affect them all. Sound vaguely plausible offhand?
<rlb>(I've gotten some of that roughed in and then got around to the shared string bits.)