IRC channel logs

2025-02-27.log

back to list of logs

<taylan>lechner: I seem to have gotten it to work with this one weird trick https://paste.debian.net/1356514/
<taylan>using "1" as a marker to dispatch to internal "helper" patterns. (it's important that they appear first, and the dispatcher last, otherwise the "1" will match the alist pattern variable)
<taylan>this is one of those annoying things where syntax-case may be overkill, yet syntax-rules is too weak and forces one to use hacks.
<taylan>(unless there's an obvious easy solution I'm missing. didn't write syntax-rules macros in a long time.)
<taylan>ACTION afk
<lechner>sneek / later tell taylan / thanks!
<sneek>Got it.
<cow_2001>okay, now i see that when compiling libgit2 with that experimental sha256 flag it outputs the header files into /include/git2-experimental* but some of them have a line that #includes stuff named git2, not git2-experimental and that is very annoying
<cow_2001>it seems i've come across an alien source repository. now things are beginning to make sense. more later
<cow_2001>if you are confused why pkg-config would not give you flags for a certain library, remember pkg-config --list-all to see if the library you need was given a weird name
<old>cow_2001: don't forger to add pkg-config to your shell for the PKG_CONFIG_PATH to be update on Guix
<old>and yeah, pkg-config is really .. not great. Something so simple, yet it fails at it
<cow_2001>old: i wrote something https://kaka.farm/posts/2025/02/27/work-on-guile-git-and-therefore-gnu-guix-sha256-hash-function-support.html
<lechner>+1 on the pkg-config perception
<cow_2001>lechner: thank you
<old>why is syntax-source sometime returning #f ?
<dthompson>because not all syntax objects have source
<old>that's like saying the color red is red because it is red
<old>To be more specific, what determine wheter a syntax object has a source or not
<dthompson>depends on the situation. a procedural macro could do datum->syntax and not specify source, for example
<dthompson>read-syntax annotates everything with source *if* the input port has file name/line/column info, otherwise it will be #f
<old>dthompson: I see thanks for the explanation
<dthompson>np. generally I'd say that if that syntax object without source was created by a macro then it's a bug in the macro (provided that the input syntax objects had source to begin with)
<dthompson>sourceless syntax objects happen all the time if you are defining things at the repl/using geiser
<old>Well I do have a syntax that create another syntax transformer
<old>this second transformer, I can see its source fine
<old>but the datum that its transform seems to be loosing the source
<old>I'll investigate this
<old>I usually do: (datum->syntax stx my-datum)
<old>I've always assume that my-datum will have the same source as `stx' (syntax-case stx () ...
<dthompson>yes that is true
<old>hmm actually it does not seem to hold all the time
<old>really need to put #:source stx
<old>So this is weird
<old>I get the syntax location whenever my macro is used in a module
<old>but not in a script file
<old>hmm maybe not. I think the problem is from nested syntaxes
<old>hmm I see. I lost the syntax source whenever the expression is in a delay form
<old>or a lambda
<old>Oh god I figured it out. I don't know why, but transforming the syntax to datum then back to syntax was loosing the source location
<old>anyway, fixed
<ArneBab>rlb: your review already prompted a second reviewer to become active ⇒ thank you a lot!
<rlb>glad it helped.