IRC channel logs

2024-11-08.log

back to list of logs

<daviid>old: you should use #:init-thunk, not #:init-value
<daviid>#:init-thunk (lambda () (my-param)), which will be called when a new instance is created
<daviid>old: actually it can be #:init-thunk my-param
<daviid>old here - https://paste.debian.net/1334866/
<daviid>with a typo line 8, set-bar, not seet-bar
<old>daviid: the problem is not around make
<old>the problem is around define
<old>anyway, I found a workaround that suite me better so that's okay :-)
<daviid>i don't get what the problem is, but you solved it so ... fine
<daviid>the important thing is, #:init-value is only for fixed value, and it is cached by goops, when you need the value to be the result of a call, use #:init-thunk or #:init-form
<daviid>and fwiw, if you think you need a syntax to fix 'a goops problem', chances are that there is a better way, using a simple goops approach (as above) or the mop ... my 2c
<old>I think the issue comes down to not being able to do: (parameterize ((...)) (define ...) ...)
<old>I can remove goops from the picture to make it more clear
<old> https://paste.sr.ht/~old/44ff7802e63929fa286d8b03044add09ee450cc8
<daviid>that i dont know, i don't use none top level define, never ever
<old>I could ofc just do the parameterize inside the define, but that's cumbersome when ahving multiple defines
<old>anyway, I think that's just the syntax limit of define in Scheme
<ekaitz>wingo: i have a very stupid question about the JIT threshold
<ekaitz>if the functions count up
<ekaitz>and the threshold is the limit before JIT-ing
<ekaitz>why does it fail in my case for 9 and not for 8?
<ekaitz>wouldn't 9 mean less functions are JIT-ed?
<ekaitz>wingo: forget it
<ekaitz>i just need to compare the vcode with the mcode now
<ekaitz>now I understood
<ekaitz>finally
<morenonatural>is there something like emacs' (ignore some-var-I-do-not-use) for guile? I'd like to avoid warnings
<morenonatural>or other way to deal with explicitly ignored variables in match-lambda
<ekaitz>morenonatural: _?
<civodul>morenonatural: there’s no nice way, although you could simply refer to the variable, even if you don’t use it
<civodul>as in (match x ((dontcare x) dontcare (+ x 2)))
<civodul>which silences the unused-variable warning for ‘dontcare’ without changing the generated code
<ekaitz>civodul: can i disassemble a .go file?
<ekaitz>or a piece of it?
<morenonatural>thx y'all
<civodul>ekaitz: yes: ‘guild disassemble x.go’
<ekaitz>and if it's only a piece? i'd like to disassemble between two memory addresses...
<civodul>if you’re into optimizations, “,compile” and “,compile-cps” at the REPL are often more useful (because higher-level)
<ekaitz>i have a function that is jit-ed
<ekaitz>and i want to see what was that function before
<civodul>‘guild disassemble’ only does whole-file disassembly, but then the API prolly lets you disassemble only part
<ekaitz>the only thing I have the vcode of the function
<civodul>oh hmm
<ekaitz>i'll try with the API
<civodul>so you’d like to disassemble native code (JIT’ed) and map it back to the original bytecode?
<civodul>sounds tricky, at best
<ekaitz>no, i want to disassemble the virtual machine code
<ekaitz>to compare it more easily to the JIT-ed code
<ekaitz>what I have right now is the raw memory of both
<civodul>ok
<ekaitz>oh also I'm using my PEG reimplementation to parse Zig code and it works with a HUGE and pretty complex peg file
<civodul>woow!
<civodul>oh, i should check your updated patches i guess?
<civodul>or were we done?
<civodul>ACTION is lost
<ekaitz>civodul: no, we didn't merge
<ekaitz>civodul: last time I sent a new version because I found a couple of bugs, but now i'm pretty confident
<ekaitz>civodul: no pressure anyway, thanks for the help
<ekaitz>ACTION runs away but will read later
<civodul>alright, thanks
<morenonatural>does guile have thousand separator? (Python & Julia has thousand separator, if you don't know what that is)
<dsmith>Like 2_000_000 ? No.
<morenonatural>dsmith, yes. oh, bummer.
<dsmith>For output ~:d does ','
<dsmith>scheme@(guile-user)> (format #t "~:d\n" 2000000)
<dsmith>2,000,000
<singpolyma>Syntax for thousands separators might be the weirdest bad idea I've ever seen in a language syntax
<dsmith>I like it. I've currently got a config file (JSON) with a 20 minute timeout in microseconds! 1200000000 Ugh.
<dsmith>Sure with I had '_' there.
<dsmith>I'd rather it be in seconds, but there is a lot of ceremony to change it.
<k4r4b3y>hello
<k4r4b3y>I am trying to learn guile scheme using the guile packages from debian 12 repos
<k4r4b3y>especially I have installed: emacs/bookworm-backports guile-3.0 guile-3.0-dev elpa-geiser
<k4r4b3y>however, I am unable to get the guile scheme code buffer talk to the geiser repl
<k4r4b3y>I cannot get the geiser-eval-definition command have affect
<k4r4b3y>I can run that command, but nothing happens
<k4r4b3y>in the repl buffer, I can't reach the definitions that I just tried eval'ing
<morenonatural>you may want to uninstall elpa-geiser and install (the same) geiser in Emacs
<morenonatural>since debian packages are most of the time lagging behind
<k4r4b3y>morenonatural: what's the current version of geiser?
<k4r4b3y>this is what debian 12 currently has: https://packages.debian.org/bookworm/elpa-geiser
<k4r4b3y>it is v 0.10-1
<k4r4b3y>I would like to use packages from debian's stable repos
<k4r4b3y>I would like to believe that they work, since they got packaged
<morenonatural>that you can do, although it will add some friction to solving your problem since using Emacs packages (versions) from debian is not a common custom
<k4r4b3y>I will try to repeat my question in #debian room
<morenonatural>hope you do better there
<k4r4b3y>ty
<ekaitz> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74269 the explanation is not the greatest but that env variable was missing