IRC channel logs

2024-11-23.log

back to list of logs

<dokma>Is there a Guile implementation in Javascript? Would be nice to just run the same thing on the server and in the browser and for DB access.
<dthompson>dokma: no js implementation, but there is a wasm implementation in development which is way better than what could be done in js https://spritely.institute/hoot/
<dokma>oh, nice. will take a look
<mwette>There was a (GSoC?) project to run Guile on JS but I think it was never completed. I found this: https://github.com/aconchillo/guilescript ; if you're looking for something to run in a browser, hoot has to be your best bet
<dthompson>here's the largest program I'm aware of that was made with hoot (I helped make it) https://davexunit.itch.io/cirkoban
<dthompson>and here's an in-depth blog post about doing client-side rendering with it https://spritely.institute/news/building-interactive-web-pages-with-guile-hoot.html
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>!uptime
<sneek>I've been faithfully serving for one month and 22 days
<sneek>This system has been up 17 weeks, 5 days, 1 hour, 54 minutes
<marmalade>Anyone know why Guile would be ignoring my $GUILE_LOAD_PATH?
<lilyp>without context? no
<marmalade>lilyp: I mean, there's not much to tell. I set my GUILE_LOAD_PATH envvar immediately invoked Guile, typed %load-path and what I added to the env var just isn't there.
<lilyp>perhaps a bash weirdness ā€“ did you use export? what if you set it on the same line?
<marmalade>oh I'm using zsh. I set it in my .zshenv which is the top loaded dotfile afaik, checked using echo $GUILE_LOAD_PATH that it was there, then started guile
<marmalade>I'll try doing it on the same line
<mwette>what shell; and how? you may need to `export GUILE_LOAD_PATH'
<mwette>or `$ GUILE_LOAD_PATH=a:b:c guile'
<marmalade>looks well
<marmalade>*looks like exporting it works?
<marmalade>i don't understand if the env var is set it's set, no?
<mwette>if you want shell executed commands to see variables you need to export
<mwette>try this: $ foo=1 ; echo "foo=$foo"; bash -c 'echo "foo=$foo"'
<marmalade>huh
<marmalade>i didn't know that
<marmalade>err, also i'm getting hardstuck trying to just install and use artanis
<marmalade> https://paste.debian.net/1336554/
<marmalade>i have no real idea what is going on here
<marmalade>as far as i can tell the guix repos don't have a glibc 2.8?
<ArneBab>I finished a first version of my programming essentials guide: https://www.draketo.de/software/programming-basics-wisp.pdf ā€” 64 pages to teach programming basics with Wisp. https://www.draketo.de/software/programming-basics-wisp.html For the last week of Nanowrimo Iā€™d like to convert that to Scheme. Do you see something that has to be added? And the hardest part: is the deployment part good enough? https://www.draketo.de/software/
<ArneBab>programming-basics-wisp#deploy (took me quite long to get guix pack to actually include binaries that find their library packages)
<marmalade>this is intensely frustrating, the guile manual really should have a section that explains the usage of external modules
<RavenJoad>Has anyone already modified the Haunt static website generator to generate valid HTML in the RSS/Atom builders? I want my site's RSS to include HTML in the <content:encoded> portion of the <item> so elfeed can render/highlight new posts when they go out.
<mwette>marmalade: if you're on guix, did you try asking in #guix ?
<RavenJoad>dthompson: Can Haunt generate CDATA-escaped HTML in RSS/Atom feeds? I want elfeed to see this HTML properly and do heading highlighting.
<dthompson>RavenJoad: I don't think there's anything for that. I'm unfamiliar with what that does.
<dthompson>if it's a correctness issue then let's patch it :)
<RavenJoad>In RSS, the description is overloaded. By itself, it should be the content. But you can add <content:encoded> as a field to embed the post's content. You can then do <content:encoded><![CDATA[...]]></content:encoded> and put the normal XML/HTML in the dots. If the ... are HTML, then elfeed can recognize that and use the <h1> blocks to do minor highlighting of the post.
<RavenJoad>This is not correctness, but would make reading Haunt-generated RSS posts nicer in the long run.
<dthompson>okay so this is specifically rss or atom as well?
<Arsen>CDATAs are generally an XML feature
<dthompson>would it make sense to always use content:encoded or provide it as an option?
<Arsen> https://www.rssboard.org/rss-profile#namespace-elements-content-encoded
<Arsen>it's kinda orthogonal to the description (kinda like summary vs real text)
<RavenJoad>I have not fully investigated atom yet, but I image its content block (which is already marked as HTML by Haunt) is also escaped (< is replaced with &lt;, etc.).
<RavenJoad>I think providing it as an option would make more sense, though I think it should default to #t. It seems like everyone I follow via RSS puts the entirety of their post in <content:encoded>, so readers can read the whole post without needing to go to the site.
<RavenJoad>dthompson: I have tracked the changes down to the sxml->xml step in (haunt builder rss). The hardest thing seems like teaching Guile's sxml how to handle CDATA. ssax:xml->sxml knows how to handle CDATA, but just removes it and returns the contained XML as a string.
<RavenJoad>Hold on, let me paste-bin an example. https://paste.debian.net/1336564/
<dthompson>well ssax:xml->sxml is a parser so that doesn't seem important here
<dthompson>need to see if sxml has a notation for cdata
<dthompson>but I suppose it doesn't if the parser is stripping it out
<dthompson>there's no way to do this without cdata? I find cdata really odd
<Arsen>are you sure it must be CDATA? I see no reason for that
<RavenJoad>According to Wikipedia, https://en.wikipedia.org/wiki/CDATA, the way everything currently works and using CDATA are equivalent, so just content:encoded is required.
<Arsen>right
<Arsen>its "just" convenience
<dthompson>okay
<dthompson>well that's good
<Arsen>it'd make the document significantly more hand-readable, so if a node could be marked as "use cdata please", that'd be nice, but in general not a bocker
<RavenJoad>Agreed. I was toying with the CDATA version too, and was worried that would be a problem. If we can avoid that, that will make life a lot easier.
<dthompson>if the sxml tools don't natively handle cdata then I'm inclined to not go out of my way
<RavenJoad>re ssax:xml->sxml: The SSAX example was just to see if SXML had any way to represent CDATA.
<dthompson>yeah I see that now m bad
<dthompson>my bad*
<RavenJoad>I'll toy with something and send a patch. We'll need to add the content namespace too.
<dthompson>how is that done?
<RavenJoad>The same way you already did it with xmlns:atom in (haunt builder rss). '(xmlns:content "http://purl.org/rss/1.0/modules/content/"), right beneath the xmlns:atom one.
<RavenJoad>I'll put a patch together and send it in, so everything is done together.
<dthompson>ah okay just another tag. great that's easy enough
<dthompson>sounds good!
<dthompson>thanks!
<mwette>the SXML spec should probably have used (*CDATA* "charsequence")
<Arsen>would've been nice