IRC channel logs
2024-10-17.log
back to list of logs
<ArneBab>mwette: I rather think that I don’t know the replacement. I’m currently using a sledgehammer approach where I start binaries in a guix container with --emulate-fhs and lots of --expose and --share options and a manifest with all needed dependencies (and quite a few more that I don’t take the time to trim). <mwette>OK. No issue. I have hyperfine running. It could be a while. The "ETA" field keeps going up, currently at 100,000,000 days. <ArneBab>yes, hyperfine runs the command at least 10 times to get uncertainty data. <mwette>results are the same, looks suspect? default: 233+-43 w/8meg: 230+-45 <lampilelo>ArneBab: linked lists aren't very cache friendly, and every cons invocation is an allocation, you can fold and map over vectors too with srfi-43 <old>in which case does current-source-location returns #f ? <old>I would have expect for it to always return something meaninful <marmalade>Hey there, I'm having trouble loading guix modules in guile, and I'm not quite sure why? Even though i've installed artanis, I can't seem to load it, I just get 'no code for module' <ArneBab>mwette: thank you for running the tests! <ArneBab>sneek: later tell lampileo: I can map over vectors, but they are still further from the integration of lists. And cons and cdr are extremely fast, and the linked list is the natural unit of recursion (thanks to data-sharing; but only without list-set!). That’s why list and alist are my natural choice whenever I deal with small amounts of data. When I realize I need more, I choose another datastructure, but only then. pfds are a great <ArneBab>How well optimized is vector-map (srfi-43)? <dpk>using SRFI 133/(scheme base) vector-map is probably better style <dpk>(SRFI 43 passes you an extra index argument, which (scheme base) doesn’t, to be the same as regular list map) <dpk>i think you’re down in the performance weeds before you need to start worrying about the performance problems that any given vector-map procedure might have <dpk>vectors are a lot more efficient than lists in both time and space when the length of the sequence is known (i.e. no additions to left or right), and when updates are either non-functional mutations to individual indexes, or, as in the case of vector-map, when every item in the sequence is updated at the same time <dpk>that performance boost might also apply in situations where neither of those things are the case, depending on the access pattern <ArneBab>dpk: when the length is known, yes — but that usually has not been the case for me. <dpk>because vectors are still more memory-efficient than lists by a factor of two, and also make better use of the CPU cache: if you access an element from a vector, the CPU will then have all of its neighbours warm in its cache, whereas moving to the next item in a linked list might involve chasing a pointer to a completely different memory location the CPU hadn’t considered you might want to access next <ArneBab>if I understand it correctly, chasing the pointer should usually not happen with recursive code, because it is allocated consecutively. So while that’s not guaranteed, it’s likely to be in close vicinity. <dpk>right, hence it depends on the access pattern <ArneBab>yes — there are cases where lists are the correct tool, there are cases where they are the convenient tool and not too bad, and there are cases where I need something else. <ArneBab>One more case are macros: code is naturally built from linked lists. <dpk>measure, measure, then optimize. (unfortunately many Scheme implementations have no profiler or only a comparatively useless one. i think Guile is an exception though) <ArneBab>that goes from two dimensional linked list over vectors to using a pfds queue. And from over 100 hours to 10 seconds. <mwette>ArneBab: 373+-5 @ default; and 369+-6 @ 8MB <ArneBab>mwette: thank you for testing! That’s little (I guess it rarely expands the heap compared to the total runtime). <ArneBab>For ctak (from r7rs benchmarks) the difference is huge — but that is absolutely GC bound. <mwette>ArneBab: yw ; btw rlb's utf8 string impl' speeds up my stuff by 20% <marmalade>(Just re-asking in case I missed any responses) Hey there, I'm having trouble loading guix modules in guile, and I'm not quite sure why? Even though i've installed artanis, I can't seem to load it, I just get 'no code for module' <ekaitz>marmalade: what do you mean by guix modules? <ekaitz>software you installed from guix or guix itself? <marmalade>basically i used to guix package manager to install artanis so i could use it to try building a project <marmalade>packages installed using guix seem to work fine, and they're properly in my PATH <ekaitz>marmalade: guix install guile artanis <ekaitz>marmalade: if you forget to add guile to the shell it doesn't find artanis <ekaitz>i just did `guix shell guile artanis` and then `guile` and `(use-modules (artanis artanis))` in the guile shell and worked <marmalade>ekaitz: sorry, yes - it did work, thank you! <shcv>how do you use the (logging logger) module with a syslog handler? It mentions briefly that it's possible, but there are no examples or indications in the code <shcv>I half wrote a wrapper around libc, but it seems like something that's probably been before