IRC channel logs

2023-11-22.log

back to list of logs

<Kolev>chitochi, I already have the CSS in a static dir. That's covered. I just don't know how to get the blog pages to use it.
<samplet>Kolev: You need a theme. See https://git.dthompson.us/blog/tree/theme.scm
<samplet>You then pass the theme to the ‘blog’ procedure: https://dthompson.us/manuals/haunt/Blog.html#Blog
<samplet>In the theme, you pass a procedure as the ‘#:layout’ argument.
<samplet>The “layout” procedure gives the HTML template for each blog post.
<samplet>In that HTML, you link your stylesheet in the ‘head’ tag.
<Kolev>samplet, I tried to do it just now. I get an error. https://codeberg.org/csh/personal-site/issues/6#issuecomment-1345418
<samplet>Could it be the code that generates the tags in ‘post-template’?
<samplet>If that ‘assq-ref’ returns ‘#f’, you will get an error.
<samplet>A quick fix would be to wrap it in ‘(or ... '())’.
<samplet>If that works, you can decide to remove the tags section or add tags to your post or whatever you like.
<Kolev>samplet, ok: https://codeberg.org/csh/personal-site/issues/6#issuecomment-1345420
<Kolev>Didn't work.
<samplet>Kolev: Wrap only the ‘assq-ref’ form – not the whole lambda.
<samplet>ACTION goes afk for a bit
<Kolev>samplet, THANK YOU! 😀
<samplet>Kolev: You’re welcome.
<Kolev>Now my blog posts get linked to from / instead of /csh.
<Kolev>Fixed.
<apteryx>yay, got the improved include test case passing with some changes
<apteryx>now to clean it
<apteryx>sneek: later tell cddr I'd also like to know how to tell Geiser to browse the Guile's source.
<sneek>Okay.
<apteryx>I guess it's related to https://gitlab.com/emacs-geiser/guile/-/issues/33
<isaneran>I second that
<isaneran>it would be fire to jump to definition of core guile procedures
<isaneran>It does have a hyperlink to the source when you look at the documentation
<isaneran>But it isn't working
<apteryx>exactly what I see too
<apteryx>is there something like srfi-1's 'take' available from C?
<apteryx>there's no 'scm_take', it seems
<apteryx>I want to limit the size of an alist
<apteryx>oh, perhaps an idea: https://lists.gnu.org/archive/html/guile-devel/2003-05/msg00025.html
<apteryx>list-head and list-tail
<isaneran>should hopefully not be too hard to wrap calls to things that are in scheme
<isaneran>cuz srfi-1 is in guile so you should be able to use it
<apteryx>yes, it'd be another thing to do :-)
<apteryx>scm_list_head does the same it seems
<isaneran>scm_list_head
<isaneran>yeah
<apteryx>Copy the first @var{k} elements from @var{lst} into a new list
<isaneran>it will error if k is too big though
<isaneran>oh, take is literally just (define take list-head)
<isaneran>(I think, since typing take in the repl gives back list-head)
<isaneran>btw is there any built in procedure for checking if a list is at least of a certain length?
<isaneran>I am a bit scared of using length on inputs because if I get a really long list it will take a long ass time
<isaneran>but if I just wanna check like (at-least-length? lst 9) or something it would be nice
<isaneran>(I know how to implement it, I just wanted to know if there is something built in)
<apteryx>isaneran: yeah, I saw that too at the REPL
<apteryx>I have to check the length before using it
<apteryx>neat, I have a near polished version of the solution, with the stripped_prefixes alist kept to 100 items and deduplicated
<apteryx>should be able to send it tomorrow, along with SRFI 160
<isaneran>if you're sure the lists are never very long it should be fine, but if your goal is to limit the length of potentially really long lists it could be troublesome
<apteryx>isaneran: in my case the list length will be cropped to 100 on every set
<apteryx>so it won't be able to grow longer
<isaneran>cropped with list-head ?
<apteryx>yes
<isaneran>I'm talking about the cropping though
<isaneran>if you're doing like (if (> (length lst) 100) (list-head lst 100) lst)
<isaneran>the call to length could take a very long time if lst is very long
<apteryx>it's controlled in my case, growing from 0
<isaneran>ah ok
<apteryx>not some external input I have no idea about
<isaneran>yeah then no problem
<isaneran>though if you are controlling the construction you might wanna pass the length around so you dont have to traverse
<apteryx>thanks for bringing this to my consideration :-)
<apteryx>there are a couple things that could be passed around to shave some computation, yes
<apteryx>ACTION -> zzz
<isaneran>gn!
<apteryx>good night / day!
<apteryx>has someone else stumbled on 'FAIL: asyncs.test: preemption via sigprof' at times?
<apteryx>I'm also seeing 3 program-source test failures in compiler.test
<dthompson>chitochi, isaneran: regarding the client-side scheme discussion from yesterday... guile hoot is quickly becoming the best option in this space.
<isaneran>on android?
<isaneran>guile hoot is very exciting
<chitochi>once guile hoot can run Goblins, i will totally use it on android too
<chitochi>it's be waaay more stable than the monster i am creating right now xD
<chitochi>it's going to be*
<dthompson>isaneran: oh I thought we were talking about web browsers
<dthompson>a lot of mobile apps just embed a web page anyway soo....
<old>Is the info manual up to date for Hoot? Just looking at the tutorial right now and I get an error at the first prompt
<old>scheme@(guile-user)> (use-modules (hoot compile))
<old>While compiling expression:
<old>In procedure resolve-interface: no binding `define-custom-primcall-converter' in module (language tree-il compile-cps)
<civodul>apteryx: the occasional asyncs.test failure rings a bell
<dthompson>old: you need guile built from main currently
<dthompson>bleeding edge, etc. etc.
<old>dthompson: ah okay!
<dthompson>0.2.0 is coming next week and it is much improved
<old>awesome! I'm keeping an eye on this
<dthompson>:)
<dthompson>more to share next week.
<dthompson>I'm writing some new hoot docs now
<chitochi>so hyping \o/
<dthompson>but yeah I guess hoot couldn't replace something like kawa if you need jvm integration
<dthompson>but for web browser usage it will be a good fit
<dthompson>(or really any wasm runtime that supports gc and tail calls)
<chitochi>i was thinking about embedding a wasm runtime in the app, but maybe it's not a good idea xD
<dthompson>lots of devs, myself included, hate electron apps, but it suddenly becomes a lot less awful when you remove npm from the picture and use wasm...
<chitochi>that's interesting, i will consider this option more
<dthompson>I saw chickadee on android get mentioned, too. that should be possible but I'm sure chickadee will need a little patching.
<dthompson>I haven't done android dev since college so I'd have to relearn how to do everything from scratch but I would like to try making games with guile that run on android, too.
<chitochi>yes!! i think chickadee on android would be really fun
<dthompson>I've seen a CL friend of mine get their games running on android so I know it's possible
<chitochi>that's really good to know
<dthompson>and you have guile running on android sooo
<dthompson>chitochi: do you know if jit works?
<dthompson>that's a must-have for games
<chitochi>isaneran asked me the same question yesterday, and i still don't know the answer ><'
<dthompson>ah okay, np1
<dthompson>np!*
<chitochi>i can't see the stdout and the stderr of guile right now so it's kinda hard to debug
<dthompson>no worries :)
<chitochi>i tried making a custom port but it's not working (and i don't have logs to debug it) :'(
<chitochi>but when i know i will share!
<dthompson>👍
<isaneran>I don't really hate electron because of npm
<isaneran>just more because I don't wanna spawn an entire web browser for a relatively simple graphical application
<dthompson>yeah I know :)
<isaneran>but I still see what you mean of course
<isaneran>I don't like npm either so
<isaneran>ACTION kinda wants to work on AOT compiling for guile but is currently too much of a compiler noob
<dthompson>so, guile-hoot is an AOT compiler so feel free to check out what's going on there.
<dthompson>hoot should provide the foundation for doing native AOT in the future
<dthompson>in that it's fixing a number of things in upstream guile to make it possible
<isaneran>oh sweet
<isaneran>I'll take a look, at least when it's upstream
<isaneran>right now I'm just doing silly compilation of arithmetic expressions
<isaneran>it's kind of all I have time and energy for after work at the moment
<dthompson>all the changes to guile itself are upstream
<isaneran>won't hoot also be upstream eventually?
<dthompson>probably not.
<isaneran>oh :(
<dthompson>but who knows... maybe if it gets widespread adoption and becomes really stable
<isaneran>makes sense to have them seperate while it's an experimental thing but, feels like it would eventually be a great feature to have in mainland guile
<dthompson>yeah I agree. I guess if hoot is a big success and stabilizes well then it could happen.
<chitochi>is it possible to create a port type without the read function, only the write one?
<chitochi>(is passing null to the read argument ok?)
<dthompson>chitochi: not sure but you could just make a no-op that returns some constant value, right?
<chitochi>ok, i will try that, thank you!
<apteryx>civodul: hi! the program-sources tests in compiler.test appears to fail (but silently?) in the guile test suite, e.g.: https://paste.debian.net/1298958/
<civodul>i don’t recall seeing this but i haven’t checked recently
<civodul>it seems to be fine at https://ci.guix.gnu.org/jobset/guile
<apteryx>program-sources always return '()
<apteryx>in these 3 tests
<apteryx>civodul: for the ci, indeed, strange
<apteryx>maybe using program-sources at the REPL does not produce the source-properties that would otherwise exist?
<apteryx>or rather, compiling expressions at the REPL
<apteryx>seems unrelated to my changes (I see this on the 'main' branch as well)
<ArneBab>With Firefox 120 "WebAssembly GC is now enabled by default": https://www.mozilla.org/en-US/firefox/120.0/releasenotes/ dthompson: does this mean that hoot now runs on the standard released FF?
<dthompson>ArneBab: kind of. they backed off on enabling tails by default until 121. you can go into about:config in 120 and enable them, though.
<dthompson>121 will release on like dec 19th or something and then we'll be all set
<ArneBab>dthompson: nice! Thank you for the info! Now it would be totally awesome to be able to merge the squashed SRFI-119 patch¹ into Guile until then and be able to write interactive web-based wisp tutorials ¹: https://lists.gnu.org/archive/html/guile-devel/2023-08/msg00011.html
<dthompson>it will be a bit of time before we have a web REPL... we'll get there though :)
<dthompson>we have a metacircular REPL working, but that is of course interpreting a subset of scheme in scheme, SICP style.
<apteryx>reworked 'include' fix submitted to bug #66046
<ArneBab>dthompson: one step at a time :-) — thank you for doing that awesome work!
<dthompson>it's almost entirely not me doing the work but I'll take that as "thanks igalia and spritely" ;)
<dthompson>if the docs suck you can blame me, though. I wrote those.
<apteryx>how can I alias the (srfi srfi-128) module as (scheme comparator) ?
<apteryx>do I have to create a new module and re-export stuff imported from it?
<apteryx>done deal