IRC channel logs
2024-10-18.log
back to list of logs
<ArneBab>mwette: rlb’s utf8-string work is in review right now, right? <mwette>ArneBab: I don't know. I would like to see it in the next minor release. <rlb>(I think if it goes, it'll have to go in a Y release at least, because it changes the string layout (i.e. wrt .go files, etc.). Also, I'm not sure anyone's looked at it seriously yet, *and* now I have to find/fix some problem on 32-bit that I discovered when helping with that recent 32-bit compilation issue. I started on it, but haven't finished, and am side-tracked for the moment.) <rlb>...but nice to hear it's faster in some cases. <rlb>(very likely more low-ish hanging fruit there on the perf front) <fnat>Hey, when I see '(match (pk x) ...)', can anyone give me some pointers on the nature of that 'pk'? <fnat>I had a quick look at ice-9 but I wasn't able to find any apparent reference to it. <nckhexen>If it's not too basic an answer: PK just prints the value of x for debugging purposes and return the value of x, so it is transparent and equivalent to (match x …). <fnat>nckhexen: Ha, absolutely not too basic of an answer for me, very helpful, thanks! <fnat>Is it just a match/ice-9 thing? I hadn't seen it before. <nckhexen>Yay! It's apparently short for 'peek' (I'm stuck reading it as 'printk'—my trusty friend when debugging Linux. <nckhexen>fnat: No, it's not related to match, you can use it anywhere, as many times on a line as needed, and it's built into Guile AFAIK. <nckhexen>It's not something I'd expect to see in production code. <fnat>Ha!! Gotcha. This is why I wasn't able to find any reference to it. I kept searching for "ice-9 match pk guile scheme" lol! <fnat>nckhexen: Oh well, re the production bit, there seem to be a few occurrences in Guix - perhaps it facilitates logging/debugging? <nckhexen>I'm a bit surprised that it's not in the manual, or at least I can't find it. And 'it's undocumented' isn't the reason: there's an unexplained pk invocation in a code example. <nckhexen>In Guix I see a lot of usage in tests/, which aren't 'really' production code, and indeed 2 packages, where it seems to be used as a cheap way to log. Not what I'd do myself. <fnat>Ha, I'd just done a grep without noticing it was (mostly) tests. Sorry. <ds-ac>fnat: it seems to be defined in (ice-9 boot-9) if you want to have a look.