IRC channel logs

2023-11-21.log

back to list of logs

<festerdam>Is there a way to use traditional xpaths with sxml, rather than sxpaths? I'm having some difficulty understanding the documentation on sxpaths.
<Kolev>Having a hard time with Haunt. https://codeberg.org/csh/personal-site/issues/6
<Kolev>dthompson, ^
<dthompson>Kolev: pagination-template is not currently in a released version of haunt. if you're using 0.2.6 it's not available.
<Kolev>dthompson, I tried copying from your blog. https://codeberg.org/csh/personal-site/issues/6#issuecomment-1344258
<Kolev>dthompson, your manifest.scm is being used, so I should be getting the latest Haunt.
<apteryx>what would be the best way to implement a FIFO in Guile?
<dthompson>Kolev: what does 'haunt --version' say? should say 0.3.0
<dthompson>that's the upcoming but unreleased version
<dthompson>apteryx: any particular features that your queue needs?
<apteryx>maybe I don't mean FIFO; more like a size-limited list to which adding one item above its max size would cause the oldest item to be discarded
<dthompson>apteryx: oh a ring buffer
<Kolev>dthompson, oh dear, it says 0.2.6. Hm. Maybe I need to `guix shell` again.
<apteryx>I want to keep track of recently opened ports file names, which could be in theory infinitely large, so I need to place a cap on that
<Kolev>dthompson, ah, the manifest.scm does not give me 0.3.0.
<dthompson>Kolev: make sure you are using a recent commit from master
<dthompson>apteryx: here's a ring buffer implementation, in case it's what you're looking for: https://gitlab.com/spritely/guile-goblins/-/blob/main/goblins/utils/ring-buffer.scm?ref_type=heads
<Kolev>dthompson, why doesn't the manifest.scm give me Haunt 0.3.0? It looks like it would. The manifest pulls Haunt from your site.
<apteryx>that looks neat; I think I may be constrained to use something more primitive -- for the include bug fix I'm reworking, I'd like to define a fluid in libguile/fports.c that is loaded very early in boot-9.scm
<apteryx>a fluid whose value is a ring buffer of recently opened port file names
<dthompson>Kolev: could be something wrong in your environment. do you happen to have haunt installed in your guix profile or something? what does 'which haunt' say?
<apteryx>that I could then try in most recent to least recent order in a call-with-include-port override later defined in boot-9.scm
<Kolev>dthompson: /gnu/store/igrdyj5hgxj8w8k05aqz0p5j5m62iwqh-profile/bin/haunt
<dthompson>apteryx: ah you're really in the weeds, huh?
<apteryx>the fluid would have a name like %file-port-original-relative-names
<Kolev>I do not have Haunt installed into my user profile.
<apteryx>which would preserve the original port file names before they get stripped according to the 'relative canonicalization scheme (when they also happen to be found on %load-path)
<dthompson>Kolev: which commit are you building?
<apteryx>dthompson: indeed :-)
<dthompson>apteryx: I'm not sure what advice to offer in your situation :(
<Kolev>dthompson, the manifest.scm lists commit 63afd408c890aec7d62c754ae1399c901ff2a794 for Haunt.
<apteryx>I'll try stuff, it's good to a have a ring buffer reference around :-)
<dthompson>Kolev: have you tried 'guix shell --container -- haunt --version' or 'guix shell --pure -- haunt --version'?
<apteryx>it also kinda feels like I'm papering over the actual problem, so if someone has a bright idea, feel free to chime (see bug #66046)
<dthompson>and is the manifest file actually including the customized haunt?
<dthompson>or rather, the actual manifest object
<dthompson>something is missing here
<dthompson>but I'm not on your system so I couldn't say what
<Kolev>dthompson, those commands do not read manifest.scm.
<dthompson>Kolev: but you know what I mean right? add in -m manifest.scm
<Kolev>`guix shell -m manifest.scm --pure -- haunt --version` gives 0.2.6. 😞️
<dthompson>something wrong with the manifest then
<Kolev>dthompson, I copied manifest.scm directly from 2f40ed6841d4c61a8a1660c1f81012af73c336c4 of your blog.
<Kolev>(And your site builds on my machine.)
<dthompson>if you have my site repo, what does 'guix shell -m manifest.scm --pure -- haunt --version' say there?
<Kolev>dthompson, hm, it says 0.2.6 in your repo too. I'm so confused.
<dthompson>but 'haunt build' works?
<Kolev>dthompson, yes.
<dthompson>can I see the actual code you're trying to run that uses pagination-template?
<dthompson>something is weird with your environment
<Kolev> https://codeberg.org/csh/personal-site/commit/f8474c3519#diff-b4959683d9ec46623cb62b44c99d8ca71d540cc2
<dthompson>okay the code in that file looks fine. the manifest.scm file at that commit is using haunt 0.2.6 though
<Kolev>dthompson, right. The pagination-template error is old. https://codeberg.org/csh/personal-site/issues/6#issuecomment-1344258 is the most recont error.
<Kolev>In the commit for that error, manifest.scm is the copy from your repo.
<dthompson>Kolev: have you tried 'guix shell --rebuild-cache'
<dthompson>might be a cached profile issue
<Kolev>dthompson, I hate to say this, but I still get 0.2.6 after --rebuild-cache.
<dthompson>I dunno what it is, something is not right with your environment. you could check the guile source modules in that guix shell profile and verify that #:pagination-template is not a keyword argument for 'theme' in (haunt builder blog)
<dthompson>that would be a clear indicator that you've got the wrong version somehow. I can't explain why it's not the right version but it isn't.
<Kolev>Great.
<Kolev>I'm drowning in code. I can't get this site to work.
<Kolev>I'm sorry i cant figure this out. ☹️
<apteryx>is it possible to return multiple values from C?
<apteryx>seems yes: scm_c_values
<apteryx>or just 'scm_values'
<euouae>Hello, I'm trying to install guile-hall manually using <https://gitlab.com/a-sassmannshausen/guile-hall>
<euouae>I've cloned guile-config but after autoreconf, the ./configure step gives me invalid syntax
<euouae>"./configure: line 2541: syntax error near unexpected token `3.0' ./configure: line 2541: `GUILE_PKG(3.0 2.2 2.0)'"
<apteryx>do you have pkg-config and guile available?
<euouae>yeah
<euouae>wait maybe this is an issue with the latest commit
<euouae>hm.
<euouae>I tried other commits as far as 2021 but I'm still getting these errors
<apteryx>hmm, I'm not sure. I've built it successfully recently
<euouae>My bad. Wow. I was missing guile-3.0-dev on debian because I didn't bother with apt.
<euouae>I thought I had all the necessary dependencies
<apteryx>glad you pinpointed the issue
<apteryx>how do I make use of a scm_values returned value in C ?
<apteryx>ah! scm_c_value_ref
<cow_2001>was mucking about and this results in a segmentation fault in my guile 3.0.9 on guix c07a5f050f67fa9054e93479cdda2f298c567460 http://0x0.st/Hw8k.scm
<cow_2001>(using it alongside a debian, not a full guix installation)
<isaneran>hooray, I made a lame compiler from rpn math expression to risc-v assembly haha
<isaneran>using registers for the stack
<cow_2001>somehow not providing a procedure what it wants makes guile explode with a segmentation fault
<cow_2001>i mean, the right number of arguments
<cow_2001>it also explodes when run in a guix shell -C
<euouae>isaneran: nice
<isaneran>I might wanna post it later to get some feedback, I often feel like I get a bit too much nesting when I write code in lisp
<isaneran>or, at least when I write it with more functional style
<chitochi>it's really flaky but i finally succeeded in linking guile to a flutter android app \o/
<isaneran>ooo
<dthompson>chitochi: oh neat!
<chitochi>\o/
<isaneran>I guess the JIT probably doesn't work?
<chitochi>to be honest i don't know xD
<chitochi>but i did nothing special about the JIT
<isaneran>ah, I thought maybe you would have to disable it to make it work
<isaneran>I guess it's also possible that your example code didn't trigger it
<isaneran>or it is also possible that it runs without any problem on android
<chitochi>do you have any idea of how to test if the JIT is running?
<chitochi>(if not don't worry i will look for that myself!)
<isaneran>hmm you can set a GUILE_JIT_LOG environment variable to 1 2 or 3
<isaneran>but idk if you can do that for android
<chitochi>i use `setenv` via the dart ffi, so i can try
<chitochi>but i have this issue right now where i can't see any logs coming from guile
<isaneran>ah
<chitochi>(i know it's working because it's exchanging messages with dart)
<isaneran>then I suspect that logging would be missing as well
<chitochi>i think so too :'(
<isaneran>and I'm not sure if you can set native code breakpoints with the dart debugger
<chitochi>but i am working on fixing the logging issue right now so i will be able to try that soon!
<chitochi>i don't know, i never used the dart debugger :/
<chitochi>but honestly i don't think i will stay with flutter + guile for long, i want to find a way to do the ui in guile too
<chitochi>but i want to finish this thing xD
<isaneran>if you can settle for doing the ui in scheme you might want to give kawa a look
<isaneran>it's also a gnu project so
<chitochi>oo never heard of that one :O
<chitochi>i want to use Goblins too tho, i don't think it will be possible using kawa?
<isaneran>hmmmm
<chitochi>thank you for teaching me about Kawa!
<isaneran>probably not without doing some kind of polyfilling for missing features or incompatible functions
<isaneran>also I don't think kawa fully supports continuations all the way (tho it supports a subset)
<isaneran>so if goblins is dependent on that to work then it might be trouble
<isaneran>one approach though, could be to do the UI in kawa, while also embedding guile
<isaneran>just for the luls
<chitochi>XD
<isaneran>"which scheme do you use?" => Yess B)
<chitochi>the schemerger
<chitochi>since i am doing this for fun, i may try to build a hobby gui toolkit in guile
<chitochi>i always wanted to try doing something like that
<chitochi>maybe with some work Chickadee can work on android?
<isaneran>yeah that could work
<isaneran>it's using SDL so
<isaneran>the main thing would probably be if it's not able to wrk with opengl ES
<isaneran>but that could be fixed
<isaneran>I guess there could be other things too though, like file system access assumptions etc
<chitochi>a quick search for SDL + Android is giving results \o/
<isaneran>but idk
<chitochi>maybe, idk too :/
<Kolev>How do I get CSS applied to my Haunt site? https://codeberg.org/csh/personal-site
<chitochi>i just started learning haunt, but maybe you can use the static thing to store the css, and then import it using a link tag in the html layout?
<chitochi>there is probably a better way, but i don't know it xD
<chitochi>the static thing is `static-directory`
<chitochi>in this page: https://dthompson.us/manuals/haunt/Assets.html, it says "Common types of assets include CSS, JavaScript, images, and fonts."
<cddr>Hi how do I use geiser to browse guile sources
<cddr>My %load-path in guile repl shows all relevant directories but I can't jump to symbol definition
<rebiw>Is there a way to define a module with "stub functions" ? .  Functions that will be implemented in some other module.