IRC channel logs

2021-03-23.log

back to list of logs

<dustyweb>pkill9: I'm not sure what you mean by list metadata
<pkill9>eg list in the metadata
<pkill9>like you have title, date
<pkill9>one of those but instead of a string, a list
<chrislck>have a list of records instead of strings
<rekado_>pkill9: a common way to annotate lists is to use keyword lists
<rekado_>e.g. '(#:title "My Title" #:date (current-time) #:text "Once upon a time…")
<rekado_>sorry, needs quasiquoting: `(#:title "My Title" #:date ,(current-time) #:text "Once upon a time…")
<pkill9>oh nice
<pkill9>so how would you use that?
<leoprikler>depends on what you're planning to do in the end
<leoprikler>e.g. format, write to sxml, …
<nly>hi
<dsmith-work>Tuesday Greetings, Guilers
***kiroul3 is now known as kiroul
<ArneBab>wingo: is there a way for the lilypond folks to change the optimization level (to maybe benefit from the baseline compiler)? it looks like they are using compile-bytecode from module/language/tree-il/compile-bytecode.scm
<Bumblehorse>Is there a function for adding up a list of integers? Right now I am doing something like this: (fold + 0 '(1 2 3)) which returns 6.
<RhodiumToad>(apply + '(1 2 3))
<Bumblehorse>Oh geez, I thought that worked like map. Thank you
<RhodiumToad>+ takes any number of args and returns the sum
<lle-bout>hello! how can I get more precise line information for syntax errors?
<lle-bout>I get something like this: https://bpa.st/raw/QHPA
<lle-bout>I am unable to find the error manually
<stis>sometimes you are left with commenting out stuff in the scm file
<stis>guile is lacking sometimes whenerror reporting
<janneke>to state the obvious...sometimes git diff helps
<stis>yes all these debugging skills are useful when the tool is not supporting you
***DadeBonetti1 is now known as DadeBonetti
<lle-bout>janneke: I have been using git diff to find it for hours already :-S
<lle-bout>I can't comment stuff there's too much
<janneke>lle-bout: oh, that's terrible
<lle-bout>I would need something like bisect but for individual patch hunks
<lle-bout>janneke: going to commit everything and bisect
<lle-bout>commit everything as individual commits
<lle-bout>what a rough day
<janneke>lle-bout: sometimes it's just that way, good luck
<wingo>evening
<lle-bout>wingo: hello! :-D
<wingo>hi :)
*wingo pokes at cross-module inlining
<RhodiumToad>I see that FSF can't resist playing with the foot-howitzer again
<wingo>it's amazing isn't it
<pinoaffe>RhodiumToad: if it wasn't oh so deeply saddening I would be laughing right now
<lle-bout>wingo: in JIT?
<wingo>lle-bout: no, AOT
<zzappie>RhodiumToad: Im too curious not to ask what are you refering too
<wingo>for a subset of declarative definitions
<davexunit>RhodiumToad: yup, the board is hopelessly out of touch. I feel bad for the staff.
<wingo>zzappie: apparently rms is back on the fsf board of directors. a bit of a confusing situation, with no official communication from the fsf afaik, but private communications that appear to confirm this is the case
<lle-bout>janneke: weirdly after committing it seems the error has disappeared
<wingo>there is a fair amount of organizing about it, cf https://rms-open-letter.github.io/
<lle-bout>I discarded some commits that didnt apply though..
<davexunit>my experience is from 6 years ago now, but working at the fsf was eye opening in an unfortunately bad way.
<lle-bout>I mean, did apply in the patch sense but were incorrect
<zzappie>wingo: oh! Wow this is unexpected. At least for me
<davexunit>fsf staff are unionized but there's no power there. it basically just kept rms from arbitrarily firing people when he was president.
<janneke>lle-bout: good :)
<lle-bout>janneke: my wrist hurts
<lle-bout>GNU Guile lack of error reporting caused actual physical pain, I have at least one documented case
<janneke>well...
<wingo>lle-bout: apologies! we should make a point release that focusses on improving errors :)
<lle-bout>janneke, wingo: it was a it of a joke heh do as good as you can but better error reporting welcome :-)
<wingo>:)
<lle-bout>wingo: I wonder what the tooling is for inline documentation in GNU Guile code, I feel like that's the best way to maintain documentation, e.g. how Rust communities do it
<lle-bout>It would be awesome if we got self-documented GNU Guix core if not package code
<janneke>lle-bout: yes, i got that...and i know the experience of feeling glued to the computer until it's fixed
<janneke>i feel a lot better, though, when i manage to break such a streak and take a break in time
<lle-bout>I mean I got my wrist hurting due to making so many commits manually to use bisect
<lle-bout>hands moving around in repetition
<lle-bout>117 commits
<janneke>wow
<daviid>janneke: I have a copy of define-method*, slightly changed, it was written by Mark ...
<daviid>changed to use receive, not let-values, which unlike others :),I do find much better then any other *values forms ...
<daviid>janneke: here https://git.savannah.nongnu.org/cgit/grip.git/tree/grip/goops.scm#n62 (a comment to credit Mark at the beginning of the file, line 26 ...
<daviid>i should add this and other goops utilities to guile-lib really ... one day i will
<janneke>daviid: thanks, yes that't it!
<janneke>fwiw, i also liked receive best until i discovered srfi-71 ;)
<janneke>iwbn to have this in goops
<daviid>janneke: Mark was a maintgainer when he wrote it, I think that it is because it is not part of the (clos) protocol, that he didn't want to add it in guile 'proper', don't know
<mbakke>srfi-71 changed all my scripts overnight :P
<leoprikler>lle-bout: there are a few ways of leveraging texinfo to do your formatted/unformatted inline documentation
<soda__hobart>ok, i have a guile procedure defined in C/C++ where i allocate some memory on the heap to initialize a struct, and return a SCM pointer object using `scm_from_pointer`... i do some stuff with it (serializing to bytevector and sending thru socket), then i call another guile procedure (also defined in C/C++) where i call scm_to_pointer on the SCM pointer obj, and then free this pointer and return SCM_UNDEFINED.
<soda__hobart>am i leaking memory there? it seems that i am
<soda__hobart>i initialized the struct with regular malloc, not scm_gc_malloc
<leoprikler>I think in that way it should be safe, but you ought to think about non-local exits.
<leoprikler>I.e. if you go the full way of malloc → scm_from_pointer → scm_to_pointer → free, there should not be a leak, but note, that the second half seems to be manual in your case (which we don't really like here in garbage collector land)
<leoprikler>also I'm assuming here, that "free" is an appropriate way of deallocating all the resources acquired by your struct
<soda__hobart>i think it is, but i need to do more research on that
<soda__hobart>i have a char* data element, but just using htop, it looks like i'm leaking even when i don't initialize that member
<soda__hobart>however, for the C/C++ program that receives that data, i know from using valgrind that i'm leaking memory
<leoprikler>I think you have two potential leak sources here and you should focus on each individually
<leoprikler>First, check the malloc to free route on its own, then do the socket stuff extra.
<soda__hobart>yeah, i think that is a good idea
<leoprikler>also manually invoking (gc) might help detect cases in which the memory is only growing because you're too lazy to recall it :P