IRC channel logs

2022-05-14.log

back to list of logs

***dostoevsky8 is now known as dostoevsky
***dostoevsky2 is now known as dostoevsky
***dostoevsky3 is now known as dostoevsky
***dostoevsky6 is now known as dostoevsky
<stis>cheme@(guile-user)> 'Stefan-ISraelSSon
<stis>$2 = Stefan-ISraelSSon
<stis>scheme@(guile-user)>
<stis>but I have now a soft output port that colors the S in red on my terminal
<stis>fun
<stis>(set-current-output-port (mk-color-port #\S (current-output-port)))
<acdw>hi schemers
***dostoevsky7 is now known as dostoevsky
***dostoevsky2 is now known as dostoevsky
***dostoevsky3 is now known as dostoevsky
***dostoevsky3 is now known as dostoevsky
***dostoevsky5 is now known as dostoevsky
***dostoevsky3 is now known as dostoevsky
***dostoevsky4 is now known as dostoevsky
<ArneBab>I needed a break, so I continued the Advent of Wisp Code. Day 12, Puzzle 1: All the exciting trails: https://www.draketo.de/software/advent-of-wisp-code-2021#day-12-puzzle-1
<ArneBab>tricon: thank you! :-)
<ArneBab>tricon: Christine (cwebber) was awesome in that presentation!
<ArneBab>Is there an SRFI to map over the lines of a file? I wish I had map-over-lines and stream-over-lines
***dostoevsky5 is now known as dostoevsky
***dostoevsky5 is now known as dostoevsky
***b4284 is now known as b4283
***dostoevsky2 is now known as dostoevsky
***dostoevsky9 is now known as dostoevsky
***dostoevsky9 is now known as dostoevsky
***dostoevsky7 is now known as dostoevsky
<janneke>hah! using binutils-2.34 and libtool-2.4.6, the guile-mingw build current guile
<janneke>dongcarl: ^^, now "only" to bisect between those two
*janneke suspects libtool 2.4.7 and goes to try with binutils-2.37 and libtool-2.4.6 first
<janneke>*the guile-mingw build works with current guix
***littlebo1eep is now known as littlebobeep
<janneke>so...it's something in binutils between 2.34 and 2.37
<lilyp>ArneBab: lazily or not lazily?
***dostoevsky2 is now known as dostoevsky
***dostoevsky7 is now known as dostoevsky
***dostoevsky0 is now known as dostoevsky
***dostoevsky0 is now known as dostoevsky
***dostoevsky7 is now known as dostoevsky
<dongcarl>janneke: Spooky!
<ArneBab>lilyp: both — map would be eager, stream would be lazy
<ArneBab>lilyp: I only have an eager version
<ArneBab>map-over-lines string-downcase "path/to/some-file.txt"
<ArneBab>or (map-over-lines (cut string-split #\, <>) "path/to/some-file.txt")
<ArneBab>That’s the one function that would have saved me the most lines of code in the advent of code 2021 (I copied it over into most of my solutions).
<lilyp>hmm, for most practical applications I'd usually whip out LALR/PEG/SAX parsing, but if you just want to lazily read lines you could use stream-take-while with a negated newline predicate to get a stream that's a single line
<lilyp>loop that over and you have a stream of streams :)
***dostoevsky8 is now known as dostoevsky
<janneke>dongcarl: i'm (lslowly) rebuilding toolchains and bisecting, i'll keep you posted...
<ArneBab>lilyp: can’t I do something with (only (ice-9 rdelim) read-line) and eof-object?
<ArneBab>lilyp: or do you mean port->stream + stream-take-while?
<lilyp>port->stream for maximum laziness, but rdelim would work if you want to do something generator-style
<lilyp>OTOH if it's basically dump-port, eager is probably better
<ArneBab>it’s basically processing by lines. The stream version would only be to have a version usable for continuous parsing that can re-use the same logic.
<ArneBab>lilyp: but you don’t know an SRFI for that either? Than I should maybe just write it.
***dostoevsky4 is now known as dostoevsky
<daviid>ArneBab: if you split on comma, why not using guile-dsv
<daviid>fwiw, https://github.com/artyom-poptsov/guile-dsv
***dostoevsky9 is now known as dostoevsky
***dostoevsky2 is now known as dostoevsky
***dostoevsky1 is now known as dostoevsky
***dostoevsky1 is now known as dostoevsky
***dostoevsky3 is now known as dostoevsky
<stis>using write to print a vector of 1M numbers to /dev/null is similar in speed between the C write and the scheme write I did
<stis>I'm using a nice SCM type dispacher base on guile's bit representation of type and grovel the tc3 and tc7 values mimicing what's done in C print
<stis> https://gitlab.com/tampe/guile-persist/-/blob/master/ice-9/type-dispatcher.scm
<ArneBab>daviid: I actually split at -, just wanted to give an obvious example :-)
<ArneBab>stis: wow!