IRC channel logs
2025-09-21.log
back to list of logs
<omentic>any idea why guile might not be able to find define-public? <omentic>ah hm maybe this is a hoot backend error? hrm. <sneek>Welcome back euouae, you have 3 messages! <sneek>euouae, ArneBab says: But I don’t know how to get regular texinfo into that format. <euouae>ArneBab: what is org-info? Is that .org to info? <euouae>I really don't understand that orgmode.org link :P <euouae>yeah I realized that there should be a CSS file after I peeked into gnu.org's HTML source <euouae>I am going to publish my first Guile library soon -- ropes. I'll include a manual with it that should be viewable online at codeberg.page <euouae>I'll ANNounce it in guile-users together with another thread on "How to publish your library on codeberg.org with a manual updated by CI every time you push a version tag" <euouae>which I think is important for guile users to have a guide on <rlb>euouae: I didnt' realize you were gone -- earlier I also said: don't know that I've tried it for texinfo, and it's a "big" tool, but if you have pandoc, I've had decent results from that for some other formats. <rlb>(Main thing I've used it for is manpage -> html.) <rlb>Defaults aren't fancy, but servicable. <euouae>rlb: yeah I don't stay online unless I'm actively on the computer <euouae>Okay so you're using man pages -- that's fine but I want to show a different setup <rlb>pandoc can render from "anything" to "anything" :) <euouae>I know but I want to stick to the GNU stuff as much as I can <euouae>Ultimately I want to show one way to do things and let users decide if they want to do something else -- but at least one way <euouae>Im having some really weird output right now that I cant figure out <euouae>for some reason everything is fine in the REPL but fails in the unit test <euouae>I should be getting a string but I'm getting actual-value: K9¿}§·ÁUÁþØÃ¢}¦9w7w instead <rlb>If you have any C code involved, I'd guess just offhand, it's uninit memory, or insufficiently gc-protected, or... <euouae>I have a data structure that can be converted to a stream of strings; that works fine e.g. (string-concat (stream->list (rope->string-stream r))) <euouae>some other code that references characters by independent means also breaks. I'm really lost <euouae>marvel at the bizarrity of this result <euouae>expected-value: (#<<rope> left: "h" right: "i" length: 2 depth: 1> 104 105) <euouae>actual-value: (#<<rope> left: "h" right: "i" length: 2 depth: 1> 0 0) <euouae>on the expected value I have constructed a rope by hand, on the actual value it's randomized. The data structure agrees but the result of the character function is different. <euouae>It's something to do with my use of substring/shared and accessings the characters. something is being triggered there <euouae>I think it was because I was using (srfi srfi-9 gnu) in conjunction with substring/shared; now that I used substring/read-only it works fine again <euouae>Hm. I seem to be losing something by using substring/read-only. It seems to allocate new memory for the strings. <omentic>euouae: a guide on auto-generating documentation would be very cool :^) <euouae>oh yeah I'll make that for sure; the documentation is manually written by the way. it's just the publishing to codeberg.apge that's automated <euouae>the codeberg CI should have a hook on version tag push to run `make html` and publish those static HTML files <ArneBab>euouae: that sounds good. I know how to do that with Gitlab and having it for codeberg would be good. <ArneBab>(re substring/shared if someone wants to investigate) <omentic>what is the guile (void) or (none) equivalent called again? i.e. the value of (unless #t 5) <rlb>scheme@(guile-user)> (eq? (if #f #f) *unspecified*) <omentic>ahh *unspecified* was what i was looking for. tried #<unspecified> earlier <euouae>I'm still working on that rope implementation, I've made good progress; now writing the "editing" aspects of a rope <euouae>e.g. leaf-to-root slices that fold into a new rope <ekaitz>i'm struggling with guile's internals and I don't know what to do now hehe <rlb>euouae: I forget, are you treating strings as read-only, or do you need them to be mutable? <euouae>rlb: I'm treating them as read-only. I did figure out what the correct approach is. Instead of taking ownership, the rope should (substring/read-only str 0). Then /inside/ the rope, I am free to now use substring/shared for slices. <euouae>I believe that won't trigger any CoW despite using substring/shared. You can see with `object-address' that substring/read-only *always* duplicates, which I want to avoid. <ekaitz>euouae: i'm not reading the C code yet, but I have read some of it in the past <ekaitz>i never read the part I need though <ekaitz>so the problem I have is I don't know very well how guile keeps track of macros so it's able to `load` files and use the macros from the loader file in the "loadee" <euouae>ekaitz: it maintains a difference of host versus target, I listened to a Wingo talk yesterday on WasmGC and he talked about it <ekaitz>i'm making GNU Mes a bytecode interpreter, and the first thing I did is to separate macro expansion from evaluation <euouae>I did not understand a whole lot, but he did address that issue you mentioned <ekaitz>euouae: that's the wasm talk with igalia? <ekaitz>it has define-macro (classic Lisp style macros), and then other macro systems implemented on top of that <ekaitz>not very well implemented though because we have some hygiene problems but... <ekaitz>for most of the things it works (it can even load Guile modules!) <euouae>In 23:05 he shows a dependency graph and talks about what you mentioned <ekaitz>oh thank you, how did I skip this one!? <euouae>I don't even watch talks, I just happened to go on a walk with my baby/toddler yesterday and put it on to play <ekaitz>heh, classic, mine is in the shouting stage of life so it's hard for me to listen to anything :) <ekaitz>the talk mentions it but not much... I would need to ask wingo directly <ekaitz>i'll read that carefully but I think it doesn't solve my issue <ekaitz>mostly what I think I need to do is to add some "syntax" object to (load ...) and family that contains the macros available until that point, and then when the load happens inject them in the macro-expander that makes the load <euouae>I'm not the right person to talk to because I don't have experience with Scheme implementations <euouae>nor do I fully grasp the macro system <ekaitz>in chicken the load only sees the macros from the current file, but guile is very clever about them <ekaitz>and also, yeah the talk mentions the macros might use procedures... <ekaitz>and that's also very interesting, because if we separate things in two, the load must happen both in the evaluation but also during expansion, because we need to steal the procedures for expansion time <euouae>well clearly there's some sequence that permits all this <euouae>he does show a dependency graph and talks about upper/lower strata <euouae>so probably Guile has to carefully load things in an order that permits the eventual birth of a full Guile system <ekaitz>yes, but there is some magic there that looks pretty hard to make simple and effective