IRC channel logs


back to list of logs

<sneek>Yey! dsmith is back :)
<dsmith>sneek, botsnack
<dsmith>civodul, print-prettier perhaps?
<civodul>heh :-)
<flatwhatson>the Lisp Game Jam looms
<dthompson>yes, yes it does
<old>is there anything like set-cdr! and set-car! that have an atomic semantic?
<flatwhatson>old: do you mean something more than what an atomic-box gives you?
<flatwhatson>you could cobble together an atomic pair datatype with atomic-box
<flatwhatson>but if you have a regular pair that you want to mutate in a thread-safe way, you probably just need to use a mutex
<old>I want to modify for example cdr of a pair atomically
<old>without an atomic-box
<old>right for the mutex, but I'm implementing a lock-less data-structure so that can't work ^^
<old>But I guess that settig the cdr as an atomic box is an option
<old>I will try
<dcunit3d>what type are objects with this reader syntax:
<dcunit3d> #((("tasks" . #((("vars" ("var1" . "value"))) ))
<dcunit3d>oh nevermind it's gexp. i've just haven't seen the hashtag by itself
<flatwhatson>dcunit3d: #() is a vector. this structure looks like what guile-json produces as its scheme representation of json data
<dcunit3d>ahhh thanks flatwhatson, that's what i'm leaning towards for most things in guix home.
<wingo>civodul: moin :) wrt pretty-print, was going to make it so that truncated-print would use custom ports and abort if too many chars are written. but then just started noodling; didn't get terribly far though
<wingo>but if we should replace guile's pretty-printer that is fine with me too :)
<civodul>howdy wingo!
<civodul>heh, good :-)
<civodul>i've felt the need for something similar to TeX's paragraph breaking algorithm, with badness values and all
<civodul>maybe someday
<wingo>well, maybe if i just improve the code that is there and add the early-exit-truncation then that would at least make it so that i understand the existing algorithm ;)
<wingo>goal is to fix backtraces with circular records
<civodul>oh, i see
<lloda>would you rather do (if b (f x) (g x)) or ((if b f g) x)
<RhodiumToad>I would always write the first one unless there were some overriding reasom
<wingo>me too
<lloda>would you avoid having (...) in the operator position generally
<RhodiumToad>I personally would, unless it looked clearer that way
<RhodiumToad>though I wouldn't usually take it to the extent of substituting (apply (...) ...)
<RhodiumToad>but I wouldn't consider myself an authority on good style
<lloda>oh in (apply (...) ...) i wouldn't think of (...) as being in the operator position, but rather apply
<RhodiumToad>no, I mean I wouldn't change ((foo) x) to (apply (foo) x '()) or whatever
<RhodiumToad>unless I needed to
<lloda>i see
<RhodiumToad>I'm thinking of stuff like ((hook-parameter) thing)
<lloda>right, i guess if it's just (identifier) then it's obvious enough
<RhodiumToad>well, then there's cases like ((get-hook self) self)
<flatwhatson>another option is to wrap in it a let and give it a name
<RhodiumToad>but yeah, anything more complicated than a parameter or a getter method and I'd do it differently
<RhodiumToad>also some of these cases might end up as examples of using and=>
<RhodiumToad>(and=> (get-hook self) self) to allow the hook to be absent
<RhodiumToad>oh, that's backwards
<RhodiumToad>(too much brain capacity devoted to build issues)
<RhodiumToad>-- Could NOT find Guile (missing: GUILE_EXECUTABLE GUILE_ROOT_DIR) (found version "2.2.7")
<RhodiumToad>I really hate this "could not find X (but I really did find X)" from build tools
<RhodiumToad>error: ("pkgconf" "--variable=prefix" "guile-3.0") exited with non-zero error code 127
<RhodiumToad>well, nuts
<RhodiumToad>now I have to go patch guile-3.0.9 to not die in spawn
<wingo>i also avoid () in operator position
<wingo>better to name it if you can
<mirai>is there some (guile or not) sorcery that would allow me to perform preprocessor like operations but is S-expression aware? Paste containing the input & expected output: <>
<RhodiumToad>transforming s-expressions is the easy part, keeping the original source code layout is probably harder
<mwette>wrt the pretty-printer, I always wanted to add option to provide indenting hints, like emacs's (put 'when 'scheme-indent-function 1)
<civodul>yeah, we have tons of that in (guix read-print)
<RhodiumToad>the problem with those kinds of hints is keeping up with new added syntax
<civodul>it's like .dir-locals.el, you have to keep it up-to-date indeed
<civodul>if you care about layout in your code, you'll keep it up-to-date anyway ;-)
<RhodiumToad>yeah, but in scheme you're possibly adding syntax on the fly :-)
<lloda>there are some cases in truncated-print where it will create the possibly big untruncated string and then decide to just print '#'
<_graywolf>Do people order use-modules by alphabet? And if yes, do you order SRFIs also by alphabet or numerically?
<old>_graywolf: I do
<old>I use sort-lines in emacs for that. so wathever it does
<ArneBab>_graywolf: I don’t — but I use (only (srfi :1) first second) and such a lot, because I then always see in the file where an identifier comes from, instead of having to start the REPL.