IRC channel logs

2024-08-07.log

back to list of logs

<Xeroine>It looks like the REPL ,d command gets the docstrings using object-property but wouldn't symbol-property be better? That way docstrings for variables and procedures could be accessed and set the same way. From what I understand, currently for procedures the docstring is somehow stored inside the procedure and for non-procedure variables you have to set it on the symbol otherwise the docstring would
<Xeroine>apply to the value of the variable which looks like isn't an issue for procedures but the ,d command uses object-property regardless so you have to prefix non-procedures with ' when using ,d.
<Xeroine>Gonna be here as Guest54 in case anyone answers btw
<robin>Xeroine, a symbol property sounds not quite right since variables denoted by the same symbol can be defined in different modules; idk offhand where variable documentation is stored, assuming it's stored
<robin>idk, also, how you'd easily store variable documentation since e.g. (define var 'val "docstring") isn't permitted, could be forgetting something though
<ArneBab>weary-traveler: they are from my wisp examples: hg clone https://hg.sr.ht/~arnebab/wisp && cd wisp/examples && wget https://ecraven.github.io/r7rs-benchmarks/all.csv && for i in $(grep -o '^[^-]*-' all.csv | sort -u | sed s/-//); do ./evaluate-r7rs-benchmark.w all.csv $i | grep -A2 Geometr | sort | xargs; done | sort -g
<weary-traveler>i see
<weary-traveler>ArneBab: is there something like a wisp overlay for languages that don't support reader macros such as elisp?
<weary-traveler>the idea would be for said mode to present elisp wisp-like, and also permit entering wisp syntax, however the file on disk would be regular lisp
<ArneBab>weary-traveler: the wisp repository contains wisp2lisp, a script that transforms code via string-manipulation. It’s been used — for example — in c-indent: http://sph.mn/computer/guides/c/c-indent.html
<weary-traveler>i see, a pre-processor. i suppose that could work, by adding it to the byte-compilation step
<weary-traveler>ArneBab: is wisp2lisp packaged on guix?
<ArneBab>weary-traveler: if you want the other way round (save with parens, edit without), parinfer may be better https://github.com/DogLooksGood/parinfer-mode https://shaunlebron.github.io/parinfer/
<ArneBab>weary-traveler: yes: guix shell guile-wisp
<weary-traveler>TIL about parinfer
<ArneBab>parinfer seems to have some performance issues (that’s why the native elisp parinfer mode was abandoned: https://github.com/DogLooksGood/parinfer-mode). It does something similar to wisp, but on every changed character, and in both directions.
<weary-traveler>wisp2lisp as a pre-processor seems like a feasible approach
<weary-traveler>ArneBab: in an unrelated topic, are you aware of multiprocessing/message-passing libraries for guile? skimming through the manual it's not clear that it's builtin
<adhoc>good question, I wonder if you can find something suitable here; https://srfi.schemers.org/
<ArneBab>weary-traveler: I use guile-fibers; multi-processing has ice-9 threads, but that’s platform threads.
<weary-traveler>i'm looking for something that allows for message-passing based IPC among multiple guile processes
<ArneBab>ah, for that I don’t know.
<ArneBab>(besides plain (ice-9 popen))
<ArneBab>⇒ open-pipe
<ArneBab>But that’s for hierarchical communication.
<adhoc>weary-traveler: were you after something that used a broker in the middle ?
<ArneBab>weary-traveler: if you build something neat with wisp, please tell me so I can link it on https://www.draketo.de/software/wisp#wisp-users
<weary-traveler>adhoc: it could, i suppose. the core requirement right now is simply for the processes to have bi-directional communication. in python i might use something like the multiprocessing library with a queue. queues or mailboxes or channels are the kind of abstraction i'm looking for
<weary-traveler>specifically, i don't need scaling that something like an actor system may provide, but if that's there it wouldn't hurt either
<weary-traveler>ArneBab: the use case that comes to mind is for a better-yaml. i.e., wisp sexp instead of yaml. not sure if other existing prjects (such as GWL) already implement something like this
<weary-traveler>yaml is quite terrible in terms of standardization. sexps meanwhile are quite well-structured, but have parentheses that some are allergic to. latter could be addressed by something like wisp2lisp
<weary-traveler>i suppose wisp2lisp already does that. note to self: try converting an elisp file full of configuration constants to wisp
<ArneBab>weary-traveler: you could look at spritely, that has multi-processing at its core.
<ArneBab>⇒ goblins.
<ArneBab>(sorry that I didn’t think of that right from the start)
<ArneBab> https://spritely.institute/goblins/
<weary-traveler>ArneBab: thanks for the reference
<weary-traveler>if fsbot were here i'd give you a ++
<ArneBab>:-)
<ArneBab>ACTION needs to sleep now, have fun!
<weary-traveler>goodnight!
<ArneBab>thank you!
<Xeroine>robin: yeah but procedures could also be defined with the same name in different modules
<Xeroine>and so far I've been using a macro for adding docs to variables. I'm not super comfortable with macros yet but this is what I wrote https://bpa.st/ZWFQ
<reyman>hi Guilers ! After following 2/3 of the great course of guile from systemcrafters, i'm trying to start building my own website using haunt. I manage to have two part, one academic with classic theming, and one more freestyle to publish garden zettelkasten notes. What the best in your opinion, one haunt with two different theming ? or one haunt for each website ?
<reyman>if i rewrite my question, is it possible to have two different theming on the same website for haunt ?
<weary-traveler>any spritely goblins users here? i'm trying to understand how to use it to set up two processes on the same machine that communicate over stdin and stdout. the tutorials here seem to only cover the case where the vats are running in the same process: https://spritely.institute/files/docs/guile-goblins/0.13.0/Tutorial.html
<weary-traveler>is there an example where the vats are in separate nodes, i.e., distinct processes?
<old>weary-traveler: You might have more answer on #spritely
<weary-traveler>ah, indeed. thanks old
<RavenJoad>If I want to make a software key-remapper like https://github.com/samvel1024/kbct or https://github.com/jtroo/kanata, kmonad, etc. Would Guile be a good language for that? Would the core event loop make sense to write in C and link into Guile? I am also considering writing this in Common Lisp. This would be a toy project for now.
<RavenJoad>I would also re-use the sexp configuration language used by kmonad, which inspired my consideration of this project. https://github.com/kmonad/kmonad/blob/master/keymap/tutorial.kbd
<RavenJoad>Final goal would be an X11- and Wayland-compatible key remapper for myself so I can make CapsLock behave as escape when tapped and LCtrl when held.
<mwette>RavenJoad: I have all-guile (well almost) interface to wayland server. There is demo that gets key events. https://github.com/mwette/guile-wl-play
<mwette>I added C code for mmap and unix sockets.