IRC channel logs
2025-01-02.log
back to list of logs
<jfred>woohoo, congrats on the oaken ngi0 funding :) oaken's exciting! <dthompson>jfred: yeah! we've been waiting forever to know if we were accepted/rejected so it's nice to finally know and even nicer to know that it was accepted! <dthompson>we haven't had a chance to announce it for ourselves yet <dthompson>for anyone lurking that is missing context: Oaken is the codename for Spritely's proposed "safe Scheme" environment, where you can evaluate untrusted code safely <jfred>yup, haha - specifically because you boosted it actually :P <dthompson>we just got our grant application approved by the wonderful NLnet <dthompson>and it's really dpk's application, who will be the lead developer! <Zarutian_iPad>Meigi dagar þess verða góður fengur, njótið vel! (May its days become good catch, enjoy/use well!) <Zarutian_iPad>dredging up from distant memory. How did you solve the 'endless loop' issue/problem? W7 used 'batteries' which is basically analogous to Ethereum gas. <Zarutian_iPad>but iirc there was in the future work section some mention on of doing cps context/thread switching on basic block boundaries only <dthompson>are you talking about having some untrusted code enter an unbounded loop? <Zarutian_iPad>untrusted code containg a while (true) { } loop is the 'endless loop' issue <dthompson>guile provides some means to place limits on time, allocation, and call stack height <dthompson>oaken will take guile's existing eval sandbox further <dthompson>there's plenty of things to figure out still, but between W7 and WebAssembly I think we have excellent prior art for this project <msavoritias>is it going to be a separate scheme than guile or a "safe guile" ? <msavoritias>it would be nice to have the pieces as general pieces. in the sense that it would be nice for guix to get capabilities to emulate permissions flatpak has <dthompson>it will be a separate language on the guile vm that is scheme with some differences <dthompson>the module system will be different, we know that much already <msavoritias>hmm. that makes me tempted now :P because i would really like a safer scheme but also leaving all the guile ecosystem behind is a big ask <msavoritias>then again maybe it can be module specific and can be interacted from guile <dthompson>the basic idea is that there would be a new compiler frontend that oaken code would go through, the result will still be the same as any other compilation in guile <dthompson>guile's compiler tower makes all this interop possible <jfred>I hadn't thought about just how useful guile's compiler tower can be until recently. just watched robin's guile-emacs talk earlier today and it's also using that for elisp support <jfred>lots of good tools in the toolbox :) <dthompson>the elisp support is a great example of how useful it can be <dthompson>and since it's relatively easy to define new languages it can also be used for fun tricks like compiling a machine readable specification to scheme <jfred>oh that's kinda wild, so that's like... autogenerated guile bindings to x11? <dthompson>I never released this, but back when I was doing AWS stuff full-time I was bored while at re:invent and wrote something that compiled the the cloudformation json spec to scheme <jfred>huh. I wonder if you could do something like that for openapi specs too <dthompson>anything that is well specified enough to be usable <dthompson>it's neat because you just define the language and specify that it lowers to scheme and the compiler tower will figure out how to get it lowered to bytecode <jfred>oh and I had forgotten that languages are supported in the guile repl, so once it's there I suppose you could just run ,language oaken and end up in an oaken repl <dthompson>yup, though it's unclear exactly what that will mean <dthompson>in terms of what is available in the environment. in oaken you won't be able to just import whatever from a load path. <jfred>right, makes sense - you'll need imports passed in from outside somehow <dthompson>fun fact: the ,enter-vat REPL command in goblins builds a guile language on the fly specifically for that repl instance <dthompson>it changes the prompt to include the vat name and wraps the expressions like: (call-with-vat some-vat (lambda () (your-exp))) <dthompson>because the language defines the evaluator and the repl uses that <jfred>clever, and turning that "language" into scheme is of course simple because it still is scheme haha <dthompson>right it's all just a little trick to eval the scheme in the particular context we want <jfred>out of curiosity, have you (or anyone else here I suppose) tried out guile-ares-rs in place of geiser? its readme links to guile-goblins's geiser workaround as one quirk it's meant to avoid <jfred>my mind goes back to that anytime I find myself with a hung geiser buffer, but I still haven't tried it out <dthompson>I'm a little unsure how to even use it, honestly <robin>jfred, hope you enjoyed it :) i haven't tried that geiser alternative but i'm excited to see what happens with r7rs swank support, i used to use slime48 (slime for scheme48) and it was great <robin>(r7rs is of course not really sufficient, but it does appear to support a decent number of schemes) <jfred>robin: I'm excited about guile-emacs! And, seeing you calling guile code from within elisp, I'm daydreaming a bit about running goblins software inside emacs too :P <robin>jfred, i imagine that will be possible; the erights folks were very negative about CL(-style-lisps), but i have no doubt interesting progress can be made with a sufficiently expressive dialect :) <robin>oh, i meant the erights.org lists, but yes (there was also a partial E-on-CL implementation by kevin reid though ofc that's rather different than language-level support) <Zarutian_iPad>I am not familiar enough with CommonLisp to judge but was it due to the untamed libraries size? <robin>Zarutian_iPad, too long ago for me to remember the exact details :) but iirc things like the package system (which would indeed need some customization) and CLOS's approach to OO <Zarutian_iPad>multi dispatch in the latter and no equiv of a namespace object in the former? <dthompson>yeah CLOS style generics don't align with language level ocaps <dthompson>I guess I can think of them as a sort of very scary capability because if you have a reference to one you can extend its functionality :P <Zarutian_iPad>whilist in Scheme objects are closures that dispatch on the first argument, the selector, yes? <dthompson>standard Scheme has no equivalent to CLOS. Guile has GOOPS, though, which is a somewhat close approximation to CLOS and thus the same issues wrt ocaps <dthompson>you couldn't have a safe execution environment that allowed untrusted code to define methods <Zarutian_iPad>well the canonical SICP oo examples uses the objects as closure way <robin>Zarutian_iPad, right (i see no fundamental issue with generic OO -- though it requires a change of perspective and a sufficiently powerful MOP -- but we'll see what can be done) <dthompson>Zarutian_iPad: I wouldn't call those "canonical" but idk maybe I'm splitting hairs <dthompson>single dispatch methods where the methods are associated with object instances is easy to be ocap safe <dthompson>CLOS style extensible methods are much more useful but much more dynamic <Zarutian_iPad>to me objects in E just were closures whose code was the script of the object <Zarutian_iPad>maybe ya can answer, what is the difference between multiple dispatch and just straight up procedural/structural programming? <robin>Zarutian_iPad, extensible & dynamic runtime dispatch on multiple argument types (traditionally simple classes but potentially other criteria such as object identity, predicate classes, etc.), i guess? <dthompson>with multiple dispatch you are calling the method that most specifically matches the arguments <Zarutian_iPad>so basically one could think of it as one big (cond ...) whose conditionals are class/type checks? <Zarutian_iPad>to be able say call (+ a b) where a and b are something else than just fixnums or such? <dthompson>not really a syntax thing in the sense that it's not determined at compile time <dthompson>but like yeah you can turn + into a generic method that dispatches on the arg types <dthompson>if you import goops in guile, arithmetic becomes generic and I could then extend it for matrix/vector multiplication or something <dthompson>in CLOS, methods exist on their own, they are not associated with classes