IRC channel logs

2023-02-03.log

back to list of logs

<cwebber>vv[m]1 implemented a tic tac toe game with Goblins, which is interesting in its meta-conversation about what actor based sealers/unsealers do and don't protect against https://octodon.social/@cwebber/109801606543196882
<cwebber>Zarutian_iPad: I bet you have thoughts about crypto vs actor sealers/unsealers btw :)
<Zarutian_iPad>sure but I do not know what actor sealers/unsealers are yet
<cwebber>sure you do Zarutian_iPad
<cwebber>that's just what I call addressable object sealers/unsealers ;P
<cwebber>language sealers/unsealers
<vv[m]1>oh it's not tic tac toe yet, it's just rock paper scissors for now
<cwebber>oh right rock paper scissors goddamn
<vv[m]1>the goal of rps is to determine who goes first though.
<vv[m]1>for the eventual tic tac toe
<cwebber>:D
<cwebber>I really ought to do a blogpost talking about sealers/unsealers in detail
<cwebber>it's such an interesting topic
<cwebber>the Heart of Spritely talks about them a bit
<cwebber>actually I should link you to that part, 1sec vv[m]1
<cwebber> https://spritely.institute/static/papers/spritely-core.html#appendix-implementing-sealers-unsealers
<vv[m]1>I did read it a while back but probably forgot some of the details
<Zarutian_iPad>oh, using sealers unsealers to enforce non-reputation (‘committed and no take backsies’)
<cwebber>ah ok cool :)
<cwebber>Zarutian_iPad: right
<cwebber>and across a captp boundary, that can't be guaranteed with language sealers/unsealers
<vv[m]1>probably need to reread the heart!
<cwebber>anyway
<cwebber>back to porting Aurie to Guile
<Zarutian_iPad>so it is more of a Stamp or Trademark use than access inhibitation
<cwebber>Zarutian_iPad: yes
<Zarutian_iPad>Aurie was which sprite again? persistance?
<cwebber>yup
<cwebber>we're going to make Aurie part of Goblins proper in the Guile version
<cwebber>so that persistence is more core
<Zarutian_iPad>ACTION waves around a electronic copyof the jhu-paper
<cwebber>the problem with not doing so is eg nothing in the actor-lib defined a way to be serialized
<cwebber>yes Zarutian_iPad, you waved that in front of me for years, and when I finally read it I implemented Aurie ;)
<Zarutian_iPad>that Fallout Preston has nothing on me regarding persistance in that matter (pun intented)
<cwebber>btw
<cwebber>you ready
<cwebber>for some BIG NEWS?!
<cwebber> https://spritely.institute/news/guile-on-web-assembly-project-underway.html
<cwebber>"How's spritely going to get in the browser though?"
<cwebber>Guess what, we've got funding to compile Guile to Webassembly!
<Zarutian_iPad>oh, a WAmmy of a news!
<cwebber>we're going to be working with an external contractor AND
<cwebber>and we're also hiring for it:
<cwebber> https://spritely.institute/jobs/compiler-engineer.html
<cwebber>(yes Zarutian_iPad before you say it, it's still US-only, we know. we're working towards not having that restriction in future job postings. for this one we do have it though.)
<vv[m]1>very very cool
<RandyFarmer[m]>We literally got the grant money 10 days ago and we're running as fast as we can to get this started. :-)
<RandyFarmer[m]>Wait, 9 days ago.
<ocdtrekkie>very neat, wasm does seem to be a handy way to solve the "how do I do this in the browser" problem without having to suffer javascript
<Zarutian_iPad>a big cheque like in those prize shows or donation news blubrs?
<cwebber>ohai jess
<cwebber>nice to have you in #spritely
<jess>:3
<jess>ACTION builds a nest
<cwebber> https://news.ycombinator.com/item?id=34643457
<cwebber> https://lobste.rs/s/fmxp81/spritely_institute_launches_guile
<cwebber> https://www.reddit.com/r/lisp/comments/10spjep/spritely_institute_launches_guile_scheme_wasm/
<cwebber>spreadin' the word :>
<cwebber>okay lunchtime
<isd>So I finally decided to sit down and actually play with goblins, rather than just reading about it and relying on my understanding of similar systems. To get a dev environment up and running I just did guix shell guile guile-goblins, and (use-modules (goblins)) works, but I can't import actor-lib or methods. Do I need to grab another package for that, or...?
<isd>I just get:
<isd>;;; WARNING: compilation of /home/isd/scratch/goblins/scratch.scm failed:
<isd>;;; no code for module (methods)
<isd>I'm just using the guile repl, not the emacs setup recommended; I'm probably one of the only lisp hacker on the planet who really doesn't like emacs :/
<isd>repl/cli tool; as suggested the above is from just doing guile scratch.scm
<dthompson>isd: does this work?: ,use (goblins actor-lib methods)
<dthompson>if ',use (goblins)' works then that should, too. it's all part of the same library.
<isd>Hm, it doesn't complain. But apparently at the repl neither does use-modules. But then it can't find spawn-vat and I get the above error if I try to use use-modules for it in a file
<dthompson>isd: "no code for module (methods)" suggests that you tried to import (methods) instead of (goblins actor-lib methods).
<dthompson>isd: if you'd like to share a source file or a copy/paste of your repl session I can try to help you
<isd>Ah, figured it out! I'd been assuming each of those was a module, so when I got to the part of the tutorial where it said to do (use-modules (goblins actor-lib methods)), I did that and deleted (use-modules (goblins)). I have learned something about guile modules
<isd>Unfortunately guile was not previously in the top 3 scheme dialects I've worked with... yay standards?
<isd>Anyway, thanks.
<dthompson>isd: yw. looks like maybe the manual could mention some import details earlier?
<dthompson>newer scheme standards have modules, but guile's module system long predates their existence. thaaaat's scheme.
<vv[m]1>one thing that confused and frustrated me was that sub modules don't recompile when you reload the root module
<dthompson>yeah they aren't really related at all. it's just an organization thing.
<vv[m]1>I still have to figure out if there is a good way to avoid having to type ,reload a bunch when hacking in a repl. in emacs
<vv[m]1>I imagine there is a better way to auto reload with a binding or whatever
<isd>Yeah, probably subsections that briefly explain guile-specific stuff would be helpful those of us coming from other schemes.
<isd>I'm idly toying with the idea of writing a guile binding to capnp-c++, and making it integrate very nicely with goblins. would be a very quick way of bridging the two systems.
<isd>...and I'm hoping if I build that I can provoke some goblins people into writing sandstorm apps :P
<dthompson>hmm that's an interesting idea!
<dthompson>isd: is there a particular spot in the manual where you encountered this confusing situation?
<dthompson>vv[m]1: I can't speak to everyone else's workflow but I never use ,reload.
<dthompson>like I know it's there but I never need it.
<vv[m]1>what is the alternative?
<vv[m]1>I very much would love to see/hear about workflow. or links to resources
<dthompson>I'll answer with another question: what situation(s) do you find yourself using it?
<vv[m]1>when I'm writing code in a file, IDK how to get that code updated.... I'm probably missing something obvious though
<dthompson>ah okay. do you use emacs or something else?
<vv[m]1>emacs yeah
<dthompson>do you use geiser?
<vv[m]1>yeah, though. I need to dig through it more
<vv[m]1>I have a geiser repl open, but if I change code I don't see it reflected in the repl
<vv[m]1>I'm sure I'm doing something silly though.
<dthompson>when you change code, are you doing it in the repl buffer or in the source file? (sorry for all the questions, just trying to understand better)
<vv[m]1>no yeah, it's fine.
<vv[m]1>I have a scm file open. I have a geiser repl open. I do (use-modules (goblins)) in the repl (sometimes the repl closes unexpectedly and I have to repeat this process???)
<vv[m]1>then I do ,module (gib-gab-gob rps)
<vv[m]1>then I can run stuff defined in the scm. but if I change the file it does not do anything by default.
<dthompson>ah okay, thanks for the extra details.
<vv[m]1>so I've been repeatedly writing to the file and then executing ,reload on any of the modules I change.
<dthompson>ah! yeah I get it now.
<dthompson>let's say (gib-gab-gob rps) has a procedure 'foo' that you want to re-define. you can edit the source, move your cursor to the closing paren for that procedure, and press C-x C-e to evaluate it.
<vv[m]1>also sometimes geiser gets confused and is not run in the right dir so doesn't know where the module is.
<dthompson>ah yeah, you'll want to make sure that the module you are editing is on guile's load path so geiser knows what to do.
<dthompson>the big thing to understand is that editing and saving the file doesn't actually change anything within the running repl process.
<vv[m]1>what if i have code I am changing in actors.scm but I want to evaluate a function in rps that calls into actors.scm code?
<dthompson>you need to send geiser code to evaluate, and it has a bunch of tools for doing so. C-x C-e (geiser-eval-last-sexp) is just one tool for doing that.
<dthompson>in that case, you'd first re-evaluate the necessary code in actors.scm, then switch to rps and make the calls.
<vv[m]1>it's definitely a different workflow than I'm used to. hard to remember what is updated and what is not
<dthompson>if you ever forget, you can do C-c C-k to recompile an entire buffer.
<dthompson>sometimes that is the easiest way to go.
<vv[m]1>the thing is that recompiling doesn't seem to update what the repl has loaded?
<vv[m]1>I was doing c-k as you mention
<dthompson>hmm, it should.
<isd>dthompson: the top of https://spritely.institute/files/docs/guile-goblins/0.10/Methods-aren_0027t-essential-but-they-are-useful.html is where I got into trouble; I replaced my existing `(use-modules (goblins))` with the import at the top of that first snippet
<isd>instead of just adding it
<dthompson>isd: awesome, thanks for the context. v helpful
<isd>I interpreted it as "also import actor-lib and methods" rather than "also import (goblins actor-lib methods)"
<dthompson>ohhhhh I see!
<isd>no problem
<dthompson>yeah
<dthompson>I see how that would be confusing if you haven't been looking at guile code for too long like I have
<vv[m]1>dthompson: I suspect that it has to do with how I am creating the repl context. I will try to use more of the built in stuff to get it set up and see if that helps
<vv[m]1>I also may have just been misinterpreting and thinking that reload was doing something important after c-c c-k
<dthompson>vv[m]1: good luck! happy to help more in the future. this environment takes a little getting used to. a screenshare might be a good option at some point for any difficult to describe over irc situatoin.
<dthompson>situation*
<vv[m]1>unfortunately it seems that guile and guix documentation style is not compatible with the chaotic way that I learn systems. not enough examples for how I learn.
<dthompson>yeah the guile docs could use more example code
<vv[m]1>I also don't know how to properly use the doc browser in emacs efficiently which makes it very hard!
<dthompson>vv[m]1: the best tip I can offer there is use the 'i' key to search the index.
<dthompson>that's how I look up most things
<dthompson>(the goblins docs don't have an index yet... next time!)
<vv[m]1>appreciate all the advice. basically I'm working with a shit ton of new tech and it has been making things inefficient, but I know from my experience with vim that this phase will pass eventually
<vv[m]1>basically in the past few days I have learned fresh without prior knowledge, in no particular order:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/09be7c1a925adaf13ccf86601c24c9d32a47a6ea>)
<dthompson>yeah that's *a lot*
<vv[m]1>oh and this is on gentoo base system which doesn't make it any easier.
<dthompson>oh wow
<vv[m]1>to even get guix I had to enable an experimental third party overlay
<dthompson>:o
<dthompson>uhhh remember to take breaks and stay hydrated!
<vv[m]1>most of my pain has come from not reading docs carefully enough. some has been from docs being outdated. but it's mostly me just reading through the docs too fast and missing critical things. but it's fine. it's all a fun time
<dthompson>glad you're having fun!
<vv[m]1>I also have not really written lisp before. I learned it about 12 years ago in college but this is basically the beginning of me actually applying the knowledge
<vv[m]1>I am decently experienced with Haskell, at least.
<isd>FP helps, yeah.
<isd>...I really should put some work into the haskell-capnp APIs. They could be a lot nicer; this is what I get for starting the project when I was still ~advanced-beginner
<vv[m]1>Okay I can confirm that building the file does reload the module, which greatly, greatly reduces the headache and I shouldn't need to use ,reload anymore ^_^
<jfred>The GNU build system stuff involved with writing Guile code is something I still haven't gotten used to. There's a lot of what feels like boilerplate just to get started once you get past toy stuff at the REPL
<vv[m]1>agreed :(
<vv[m]1>If you use Hall because gnu build is confusing, you have this:
<vv[m]1>Hall [> guix] > autoreconf > configure > makefile > scripts for setting some env variables > guile
<dthompson>vv[m]1: hey great glad it's working!
<dthompson>jfred: yeah it's not the best! would love something different that still results in the familiar ./configure; make; make install sequence for users/packagers.
<dthompson>at the very least it would be nice if guile had a cli command for generating that boilerplate.
<vv[m]1>I wasted a bit of time because I didn't see that I had to use hall build -- but hall is as close as possible to that, at least.
<jfred>Admittedly I haven't yet tried using Hall and I probably should
<jfred>It likely would alleviate some of that
<vv[m]1>it's pretty nice! Just needs a little docs love really.
<dthompson>maybe this is something that spritely can look at sometime to make dev onboarding easier