IRC channel logs
2024-11-07.log
back to list of logs
<wingo>ACTION cannot remember why psyntax labels are strings instead of integers <dpk>wingo: i was wondering that myself … <morenonatural>hey, y'all can/should I serialize a vhash table into a file? Should I use a different key-value storage that I can write to/read from a file? <wingo>morenonatural: easiest is an alist tbh <morenonatural>how do I serialize an alist? sxml->xml complained on '(("a" .1)) <ekaitz>morenonatural: you can just `write` it <ekaitz>morenonatural: if you need xml for any reason, you should make proper sxml <wingo>object->string if you need to embed a datum in sxml as text <ekaitz>wingo: i'm trying to make fix the lightening riscv port, i have some segfault that i don't know how to debug, any suggestion? <ekaitz>wingo: I just build guile with the jit activated and when it starts it segfaults, but I if I gdb on it, i don't have any reference to where it happened <wingo>ekaitz: have you tried bisecting to find the function whose JIT causes the error? <ekaitz>wingo: bisecting how? you mean git bisect? <wingo>GUILE_JIT_STOP_AFTER=42 guile <wingo>also turn up GUILE_JIT_LOG, etc <ekaitz>and how can I find the proper one? <ekaitz>the LOG i tried, and it made sense <wingo>well. you run your program with GUILE_JIT_STOP_AFTER=10000000000 and then if it fails you try half that, etc <morenonatural>ekaitz, what function should I use to read it back to an object? <ekaitz>morenonatural: i suggested `read` and `write` <ekaitz>morenonatural: those are the basic functions to write and read scheme data/code <wingo>ekaitz: yeah manual bisection <ekaitz>wingo: GUILE_JIT_STOP_AFTER=8 is ok and 9 is broken <wingo>great :) now you know the broken code <ekaitz>but how? haha i don't know what it represents very well <wingo>try GUILE_JIT_LOG=3, then GUILE_JIT_PAUSE_WHEN_STOPPING=1 to attach with gdb <wingo>then disassemble that code range <wingo>goal is to figure out which op caused bad code, or maybe guile is using registers in an unexpected way, etc <ekaitz>so i stop at 8, but then it doesn't fail so how can i find the issue with gdb? <ekaitz>should I stop in 9 and pause when stopping? <ekaitz>oh i think i'm starting to figure out the idea <ekaitz>jit: entering mcode: 0x3fbb9f3820 <ekaitz>it segfaults right after that, better said <ekaitz>jit: mcode: 0x3faca0e820,+4384 <-- then i try to disassemble that and 'Cannot access memory at address 0x3faca0e820' <ekaitz>okay so i think i know what's wrong, there's a huge value in t2 <ekaitz>wingo: now I know how to debug this, thanks for explaining, it wasn't obvious without the explanation <ekaitz>wingo: we'll see if I manage to fix it <wingo>ekaitz: good luck and do poke me whenever you like, will respond when i can <ekaitz>thanks! i may write a little bit about how to do this in the guile docs or something <wingo>working on this level is a bit gnarly :) <ekaitz>how do you call the data you introduce between the instructions? <ekaitz>not immediates but from one instruction to the next <ekaitz>i think it's read in the wrong byte order or something <ekaitz> 0x0000003fbaa65060:»·lw»·a5,84(a0) <ekaitz>those unimp are the values i need to read <ekaitz>0x3fbaa6505c:»··0x00000000»·0xbaa6497c»·0x0000003f»·0x00000397 <ekaitz>and it loaded this to t2 0xbaa6497c00000000 <ekaitz>i think that should be: 0x3fbaa6497c <ekaitz>so imho there might be two problems here: the immediate is not inserted properly <ekaitz>no, it's in the patch, that's patching in the wrong place <ekaitz>ACTION runs but will try to fix it later <jfred>God I love how hackable guile programs can be. I was just trying to add a table to my haunt blog post using the skribe reader, and realized that the skribe reader didn't expose the HTML table tags. But I peeked at the source and noticed that the skribe reader can take a 'modules' param that lets you load your own. Couple minutes later, and now I've got tables <jfred>thanks dthompson for making haunt so malleable <ekaitz>wingo: it was a packing issue in a veneer <ekaitz>that uncovered another problem :) <old>anyway to use parameterize around top-level defines? <old>e.g: (parameterize ((foo 1)) (define-public fuz 1)) <old>looks like fuz is not been exported like I would've expected <dpk>there is no splicing-parameterize <dpk>can you say why you want to do this? <dpk>what you probably want is (define your-variable (parameterize ((current-whatever something)) ...)) <dpk>but it won’t close over the parameterization … <old>I define a parameter P and a GOOPS class C in module M1. C use P as a #:init-value. I want to be able in M2 to change P around a set of definitions <old>I guess I could just write a syntax and use it to set the #:init-value to something else implicitely <dpk>you should still be able to parameterize around something more specific than the definition itself <dpk>i’m not familiar enough with GOOPS to say