IRC channel logs
2025-01-05.log
back to list of logs
<lechner>Hi, I wrote a procedure to find duplicates comparing adjacent elements after sorting. Is something like it available from a standard library? Thanks! https://bpa.st/HMIQ <lechner>Hi, can a syntax-case fender produce a more meaningful error message, especially when checking multiple syntax objects with 'and'? <amano>How do I wait for the first value from multiple data sources in guile? <graywolf>I really need to learn how to do poll() in guile. I know there is (ice-9 poll), but it is not even mentioned in the manual :/ <dsmith>Hah. had no idea there was a poll interface. No docs. No tests either! <jason>I'm trying to use `guix pack -S /bin=bin -RR guile-next artanis guile-srfi-197 ...` to a non-guix machine. I can `bin/guile` just fine but all of the modules are in `/gnu/store/...` and not on the guile load path so I can't use them. Does the guile load path accept wildcards? I'm under the impression it doesn't. Is there a more idiomatic way I should be doing this? <graywolf>I guess you could use wrap-command to produce an entrypoint binary that would set the path <jason>I do have a good spot to just go through the entire store directory, just seems unintended <jason>another things I'm interested in is getting a minimal distribution. Is there any way to compile a module AND all of it's dependencies into the same file and just use that? I'm under the impression you can only compile 1:1 scm:go which is fine for my source files but a pain for getting the compiled dependencies together <graywolf>I wonder whether you could just make an amalgamation the way C project do. There is no restriction for just one (define-module) per file afaik. <graywolf>I am not aware of anything built-in though. <jason>wow yeah that is interesting and seems doable <ttz>Does anyone know how does match fare performance-wise ? I was writing a tree algorithm and I like pattern matching on my nodes, however I have no idea how much performances I am sacrificing. <dthompson>it generates the optimal code whenever I've checked <ttz>Also, is there a way to match the value of a variable in scope? I may have missed something but I couldn't find the syntax. <ttz>rather matching the value of k in (let ((k ...)) (match node (($ *node* k v) v) ...)) <dthompson>what does "match the value" mean here? eq? eqv? equal? something else? <ttz>Is a closure created there or is it pure syntax transformation? <graywolf>Closure. But since ? expects a predicate, you need *some* procedure to put in there <ttz>Can it be inlined by the compiler? <dthompson>but if you're optimizing to this degree, check bytecode disassembly <dthompson>reason it's likely not a closure is that it's a small procedure used in exactly one place <ttz>that's what I would have guessed too but I don't know how well Guile optimizes this kind of things <ttz>I guess you're right, I will try having a look at the disassembly <ttz>but I am really not familiar with any kind of assembly so it is rather cryptic to me, I was looking here for a short-cut ahah <ttz>oh I didn't see this one thanks a lot <graywolf>thx for the link, based on the title sounds interesting :)