IRC channel logs

2023-04-19.log

back to list of logs

<jfred>Pro tip: when porting a program, make sure you have the most recent version checked out and not an old buggy version 😭
<jfred>I got my Horton implementation ported to Guile-Goblins, and it didn't quite work... then I realized what version I had checked out on that machine
<jfred>I'm close though
<jfred>Wanted to get back to working on that and it makes sense to be on Guile at this point
<dckc[m]>tonight's goal: figure out the inter-vat API in goblins chat, so I can implement it in JS on the other end of an OCapN bridge
<dckc[m]>challenge: what's "define*"? which of these modules does it come from? ah... none of them... it's a guile thing, says https://spritely.institute/static/papers/scheme-primer.html
<dckc[m]> https://gitlab.com/spritely/guile-goblin-chat/-/blob/main/goblin-chat/gui.scm#L32
<dckc[m]>`(make <gtk-scrolled-window>)` where does `make` come from?
<dckc[m]>there's probably some way to get emacs to tell me what make is... Meta-. doesn't work 1st try... asks me what TAGS file to use
<dckc[m]>guile manual index, maybe? no joy: https://www.gnu.org/software/guile/manual/html_node/Concept-Index.html#Concept-Index_cp_letter-M
<dckc[m]>"Run inferior scheme" bloops out an error about finding a scheme program
<dckc[m]>back to scheme primer... Guile Scheme + GNU Emacs + Geiser ... hm...
<dckc[m]>M-x package-install guile-geiser also bloops out: https://elpa.gnu.org/packages/xref-1.6.2.tar: Not found
<dckc[m]>maybe I'll try guix's emacs instead of Ubuntu's...
<flatwhatson>dckc[m]: it's from GOOPS, guile's object system
<dckc[m]>starting with guix pull... let's see how long that takes...
<dckc[m]>hmm... not seeing GOOPS in https://www.gnu.org/software/guile/manual/html_node/Concept-Index.html#Concept-Index_cp_letter-G ...
<flatwhatson> https://www.gnu.org/software/guile/manual/html_node/GOOPS.html
<dckc[m]>but I find https://www.gnu.org/software/guile/manual/html_node/GOOPS.html
<flatwhatson>specifically make is documented here: https://www.gnu.org/software/guile/manual/html_node/Instance-Creation.html
<dckc[m]>do you know a way that I could have used emacs to tell me that? some sort of "describe-thingy-at-point"?
<flatwhatson>yes, that's what geiser is for :)
<dckc[m]>ok... and how did make get in scope? which module did it come from?
<flatwhatson>if you're not attached to a particular emacs configuration, guile-studio is a reasonable way to quickly start a guile+geiser environment
<flatwhatson>guix shell guile guile-studio guile-goblins -- guile-studio
<dckc[m]>(guix pull done: 9edb3f6 to b82a18c (1,307 new commits))
<dckc[m]>I am indeed not attached...
<dckc[m]>I assume my computer will go kerflewey at any moment and I like to be able to get a bog standard PC, install linux, and resume my work using bits from the internet
<dckc[m]>I suppose I could put my emacs config in the internet, but I have somehow not managed to do that
<dckc[m]>meanwhile, the incantation you gave seems to have made something go...
<dckc[m]>Cannot open load file: No such file or directory, ivy
<dckc[m]>^ it gripes a little. benign?
<dckc[m]>ok... now in this studio thingy... how do I get it to tell me about the symbol under point?
<dckc[m]>"run inferior scheme" boops again: start-process: Searching for program: No such file or directory, schem
<flatwhatson> https://www.nongnu.org/geiser/Cheat-sheet.html#Cheat-sheet
<dckc[m]>C-c C-s is undefined
<flatwhatson>it's already loaded up a guile environment, you shouldn't need to do any of that
<flatwhatson>you have a buffer on the left and a repl next to it, ready to go
<dckc[m]>well, M-. is still asking about TAGS files
<dckc[m]>geiser-edit-symbol-at-point is not defined
<flatwhatson>hmm, i wonder if it's alien guix load-path shenanigans
<flatwhatson>do you have an EMACSLOADPATH env variable defined already?
<dckc[m]>nope; env | grep EMACS is empty.
<dckc[m]>trying again with guix shell --pure --no-grafts. same symptoms. Maybe the ivy thing is not benign? maybe my .emacs file is trying to do something that doesn't work?
<dckc[m]>moved .emacs out of the way... ivy boop symptoms persist
<flatwhatson>yeah the ivy error is probably a symptom of some load-path problem
<dckc[m]>load-with-code-conversion: Cannot open load file: No such file or directory, ivy
<dckc[m]>^ help me google?!
<flatwhatson>can you C-h v load-path
<flatwhatson>it should be a bunch of /gnu/store paths and nothing else
<dckc[m]>I think that's what I've got. a little hard to tell.
<dckc[m]>there's a way to debug init files, IIRC...
<dckc[m]>--debug-init
<dckc[m]>guix shell --pure --no-grafts guile guile-studio guile-goblins -- guile-studio --debug-init doesn't seem to pay attention to it
<flatwhatson>ah, guile-studio skips all the inits and launches its own guile-studio.el directly
<dckc[m]>guix shell --pure --no-grafts guile guile-studio guile-goblins emacs -- emacs --debug-init starts without error. (oddly, that caused guix to download another version of emacs.)
<flatwhatson>it's not really that odd in guix
<dckc[m]>guile-studio got bound to an older emacs?
<dckc[m]>considering using strace
<dckc[m]>really should call it a night instead, though
<dckc[m]>`guix shell --pure --no-grafts guile guile-studio guile-goblins strace -- strace -f guile-studio 2>,trace` ...
<flatwhatson>i guess guile-studio on alien guix needs a little debugging, unfortunately
<dckc[m]>something really wants a guix ivy thingy:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/9b16c1369f0719838d8f6b72edb6b5048a85e96a>)
<flatwhatson>emacs-ivy is an input of guile-studio, it shouldn't be missing
<flatwhatson>if you "guix edit guile-studio" you should see emacs-ivy listed in propagated-inputs
<dckc[m]>chuckle... that brings up pico...
<flatwhatson>that's your fault for not setting EDITOR :)
<dckc[m]>see point earlier about leaving defaults alone :)
<dckc[m]>EDITOR=emacs guix edit guile-studio ...
<flatwhatson>so emacs-ivy is an input, and some /gnu/store/...-emacs-ivy-.../share/emacs/site-lisp should be in load-path inside guile-studio
<dckc[m]>does guix have an equivalent to nix-store --query --tree ?
<dckc[m]>no ivy in load-path
<dckc[m]>`guix graph guile-studio >,x.dot` is promising... though `dot` is taking a _long_ time to chew on the result
<flatwhatson>emacs is a bit of a dependency graph monster :)
<flatwhatson>when you "guix edit guile-studio", what commit do you see? it's dd0ad42e here
<flatwhatson>i'm a bit suspicious you're somehow still stuck on the old guix
<dckc[m]>dd0ad42e51feafebda7cc29afe7c8bc7a182a842 . yup
<dckc[m]>"the old guix"?
<flatwhatson>"which guix" should show ~/.config/guix/current/bin/guix
<dckc[m]>yes, it does
<flatwhatson>what's the commit on the first line of "guix -V"?
<dckc[m]>yeah.. this graphviz is hopeless. is there an indented text thingy like nix-store --query --tree?
<dckc[m]>guix -V
<dckc[m]>guix (GNU Guix) b82a18c8a33482249c634de1e91be18ac10a3c76
<flatwhatson>that's the latest. hmm.
<dckc[m]>guix refresh is showing a bunch of stuff such as gnu/packages/xorg.scm:5835:13: xterm would be upgraded from 377 to 379
<flatwhatson>oh, that's more for maintainers than users, "try your luck with the latest from upstream" is going to break more than it fixes :)
<dckc[m]>^C
<flatwhatson>what distro are you on? did you "sudo apt install guix" to get it?
<dckc[m]>wow... emacs depends on, as dajobe would say, 0.5 internets. perl, python, rust, ...
<dckc[m]>I'm on Ubuntu. I think I did some curl | bash thing to install guix
<dckc[m]>how many versions of gcc does emacs depend on??? and are these all runtime dependencies?
<flatwhatson>latest emacs uses libgccjit to compile elisp to native code
<dckc[m]>ah. well, that would do it
<flatwhatson>you might be looking at build inputs there, and bootstrapping means gcc depends on gcc depends on gcc...
<dckc[m]>the graph does seem to bottom out at guile-bootstrap@2.0
<flatwhatson>"guix graph --list-types", maybe "guix graph -t references emacs" is what you want
<dckc[m]>yeah; that's more like it
<flatwhatson>well, i didn't mean to send you down a guix debugging rabbit hole, that was *supposed* to be beautiful and easy :)
<dckc[m]>well, it is something I'm interested to learn.
<dckc[m]>$ guix graph -t references guile-studio |grep ivy
<dckc[m]> "/gnu/store/mmg2x38i4zpgffp8lcvil0p9kga3jg39-guile-studio-0.1.1-1.dd0ad42" -> "/gnu/store/dmxggz0pcca24qhzpkacsx1l03jlqlr9-emacs-ivy-0.14.0" [color = darkviolet];
<dckc[m]> "/gnu/store/dmxggz0pcca24qhzpkacsx1l03jlqlr9-emacs-ivy-0.14.0" [label = "emacs-ivy-0.14.0", shape = box, fontname = sans];
<flatwhatson>yeah, exactly, it should be there. could you look at "C-h v load-path" in guile-studio and paste the contents somewhere?
<dckc[m]>but the strace doesn't show stuff looking for that version
<dckc[m]>load path: https://gist.github.com/dckc/216b3678faf5018e06a58bb7751b64fd
<flatwhatson>ah, yeah it's missing all the emacs-xyz paths, only has emacs' own paths there!
<dckc[m]>is there a quick command to build guile-studio?
<dckc[m]>ACTION sent a code block: https://libera.ems.host/_matrix/media/v3/download/libera.chat/e7fcc0932d898ae90d84a029215f366ca25aa772
<flatwhatson>i suspect you have a valid guile-studio, but there's some wrong assumption in the launch script which is leading to a broken env
<flatwhatson>sorry i need to go afk for a few hours
<dckc[m]>no, you owe me! (j/k)
<flatwhatson>happy to continue debugging later, or whenever you're around :)
<dckc[m]>I'll keep taking notes whenever I'm at it
<flatwhatson>cool, ciao!
<dckc[m]>promising: `guix shell --pure --no-grafts guile-goblins guile emacs emacs-geiser emacs-geiser-guile -- emacs`
<dckc[m]>but: ` No Geiser REPL for this buffer (try M-x geiser)` which leads to: ` No such file or directory, sh`. That's hard core! no sh!
<dckc[m]>aha! C-c C-d C-d geiser-doc-symbol-at-point is working...
<dckc[m]>guix shell --pure --no-grafts guile-goblins guile emacs emacs-geiser bash emacs-geiser-guile -- emacs got me there
<dckc[m]>it griped about missing git, so let's add that in there...
<dckc[m]>ooh! I have a lisp machine now! boy does that take me back
<dckc[m]>At U.T. Austin we had one of those machines where the CPU had car and cdr instructions... and garbage collection, I think
<dckc[m]>IIRC, it was CS 351 Lisp and Symbolic Computation with Dr. Kuipers
<dckc[m]>yup. spring of '89. strange to remember the course number
<dckc[m]>looks like Kuipers moved on https://www.cs.utexas.edu/people/faculty-researchers/benjamin-kuipers ...
<dckc[m]>but still at it: https://web.eecs.umich.edu/~kuipers/
<dckc[m]>M-. on $ isn't helping. :-/
<dckc[m]>this seems to have the API I'm interested in. I think.
<dckc[m]> https://gitlab.com/spritely/guile-goblin-chat/-/blob/main/goblin-chat/backend.scm
<dckc[m]>is ^foo a naming convention? or is the ^ syntax a reader-macro or something?
<dckc[m]>doesn't seem to be explained when it first appears in https://spritely.institute/files/docs/guile-goblins/0.10/A-simple-greeter.html
<dckc[m]>> Goblins-specific operations such as $ and spawn happen within a context (typically a vat, though there is an even lower-level structure called an actormap which we will see more about later).
<dckc[m]>how does that work? dynamic bindings or something? is that a thing in scheme? it's usually an ocap no-no, I think
<dckc[m]>aha...... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/d888f42ce70ea1a30ed7204015efae5981c23edc>)
<dckc[m]>ACTION sent a code block: https://libera.ems.host/_matrix/media/v3/download/libera.chat/c99b1fe5833abba4e45df09668bbc63d4e870d46
<dckc[m]>`call/ec` <- what's that? delimited continuations? the lisp machine isn't finding it for me
<dckc[m]>(I'm looking at core.scm now, btw)
<dckc[m]>aha... https://www.gnu.org/software/guile/manual/html_node/Prompt-Primitives.html#index-call_002fec (from https://www.gnu.org/software/guile/manual/html_node/Procedure-Index.html#Procedure-Index_fn_letter-C )
<dckc[m]>hm... monte on guile would be fun.
<dckc[m]> https://monte.readthedocs.io/en/latest/index.html
<flatwhatson>oh, nice you got it working!
<dckc[m]>:)
<flatwhatson>^foo is a naming convention for behaviors
<flatwhatson>scheme doesn't have dynamic binding exactly, but it can be simulated with "parameter" objects
<dckc[m]>right
<flatwhatson>(foo) returns the current value, (foo "xyz") sets it, and (parameterize ((foo "abc")) body ...) sets it for the dynamic scope of body
<cwebber>flatwhatson: dckc[m]: close! ^foo is a naming convention for constructors
<flatwhatson>ah :)
<cwebber>good morning
<flatwhatson>hello!
<cwebber>dckc[m]: I see you've been doing more spelunking!
<cwebber>and thank you for helping flatwhatson
<cwebber>jfred: oooohhhhh!
<cwebber>I really wanna see your Horton implementation :D
<flatwhatson>is there any precedent or discussion for a boring TLS over TCP/IP netlayer?
<flatwhatson>based on what i've read of the netlayer stuff it seems possible, aside from the problems with clients behind nats not providing a stable machine id
<cwebber>flatwhatson: yes there's interest
<cwebber>flatwhatson: especially in a store 'n forward netlayer
<cwebber>over websockets maybe?
<flatwhatson>store and forward for smoothing over unreliable links, instead of just erroring "disconnected"?
<cwebber>flatwhatson: yup.
<flatwhatson>hmm ok. i was thinking of being lazy with just plain sockets, but websockets do make sense
<pukkamustard>re: store and forward. There's the Bundle Protocol 7 (https://www.rfc-editor.org/rfc/rfc9171.html) and I kind of like it. Might that be a good basis for disruption-tolerant networking?
<sneek>Zarutian_iPad: Greetings!
<cwebber>pukkamustard: oooh innnnnteresting
<Zarutian_iPad>sneek, botsnack.
<sneek>:)
<Zarutian_iPad>pukkamustard: eh, the bundle protocol was _made_ for DTN
<Zarutian_iPad>Disruption and delay Tolerant Networking
<jfred>cwebber: The Racket version is here: https://git.sr.ht/~jfred/goblins-test/tree/master/item/horton.rkt
<Zarutian_iPad>who let the owls out? because horton heard a whoo
<jfred>Where I left off last I believe I got it working, though it didn't do much beyond log accesses (no revocation, etc)
<jfred>I'm packaging it up for Guix with the Guile port, and then I want to get back to adding more of the functionality that you'd actually want from a Horton implementation haha - revocation, some sort of user management (since it's sort of the gateway between ocap land and identity land), etc
<flatwhatson>i have guile-websocket client working with wss! preparing a patch.
<jfred>On the subject of a TCP/TLS netlayer, I stumbled upon a mailing list thread about YURLs the other day (which are sort of HTTPS links that include a hash of the server's pubkey). Can't seem to find it immediately, and it got pretty heated, but a few participants brought up something that has also concerned me in the past: if you hand out references that include a hash of a key, you can't then rotate that key (e.g. in the event of compromise)
<jfred>without coordination with all clients that might have it
<Zarutian_iPad> https://web.archive.org/web/20070729004742/http://yurl.net/
<vvvvmvr[m]>sadly i had a similar annoying experience with guix the first time due to messed up links
<dckc[m]>> boring TLS over TCP/IP netlayer... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/6f31fa2fd3fc5ca9f16fe9a8fa5d01d8518094d5>)
<dckc[m]>> i have guile-websocket client working
<dckc[m]>excellent!
<dckc[m]>right, jfred , you'd have to layer a key rotation protocol on top of yurls
<dckc[m]>I gather some of the DID thingies claim to have key rotation included. I haven't studied detail except in one case, and that one went defunct
<dckc[m]>heads over to prepare for Agoric Dev office hours https://github.com/Agoric/agoric-sdk/wiki/Office-Hours
<dckc[m]>_waves to cwebber first_
<dthompson>flatwhatson: read the backlog from when I was offline and saw you mention guile-websocket. I didn't realize the patch you sent me was spritely related. what have you been doing with websockets and goblins?
<jfred>dckc[m]: It's tricky because URIs are an attractive way to bootstrap connectivity and thus will tend to end up in places outside of programmatic control. Maybe the key is to never hand out URIs referring to long-lived objects directly and only ever make them refer to "bootstrap" objects (at which point you have bidirectional communication and can have a key rotation protocol take over)
<sneek>wb Zarutian_iPad
<Zarutian_iPad>sneek, botsnack.
<sneek>:)
<cwebber>meep
<dckc[m]>by way of orientation: is this primarily a matrix room, where rich text sorts of things are normal, or is it primarily an IRC channel, and I'm just annoying people by using Element's rich text support?
<cwebber>primarily an irc channel :)
<dckc[m]>noted
<Zarutian_iPad>primary an IRC channel and it is wierd that matrix does not translate the rich text into irc compatble escape coded version
<jfred>FWIW, my IRC client does render Markdown, so some of them come through
<jfred>No multiline messages though
<sneek>wb Zarutian_iPad!!
<Zarutian_iPad>sneek, botsnack.
<sneek>:)