IRC channel logs
2023-12-13.log
back to list of logs
<jfred>Doing a bit of debugging this morning on the last remaining test failure in my Horton implementation and I'm facepalming a bit right now at the bug I just figured out <jfred>I like to think I've largely gotten the hang of the higher-order programming methods you use a lot in Scheme, but every so often something catches me off-guard haha <cwebber>there was a bug in Goblins at one point where methods *did* re-run extends every time <cwebber>in Terminal Phase there were enemies who kept having certain effects applied over and over <cwebber>even though they shouldn't have been <jfred>sounds like a nice way to track down bugs in goblins! <cwebber>it also has been a nice reason to track down bugs in Hoot :) <cwebber>"you don't really know if a design works until you write a game in it" <jfred>side note, I think I'd either not realized or had forgotten that you can write (lambda args ...) and you'll just get the args as a list. nice and simple but took me a bit to find that <jfred>it makes sense too, the parenthesized form just destructures it I guess <dthompson>cwebber: heh yup! games are great for raising bugs to the surface <encryptedwhisper>I've been working on a "guiledocs" website a la "clojuredocs". the hope is to get guile's documentation a bit more accessible to folks less acquainted with gnu Info, and improve other issues with ux of the documentation <sneek>isaneran, you have 1 message! <sneek>isaneran, jfred says: you can build a digital house out of parentheses ;) <isaneran>would be sweet to have something like hoogle for guile but <isaneran>we don't really have type info on the args <cwebber>encryptedwhisper: link an http link ;P <isaneran>I guess you're parsing it with the info thing? <encryptedwhisper>I'm just using the built in guile documentation strings, not actually the guile manual <encryptedwhisper>obviously it's all extremely wip and messy, it'll be a lot nicer very soon. just got it thrown together last night <encryptedwhisper>and also using it for a Playground. folks will be able to contribute code examples, and then open the code in a playground / repl <isaneran>will be almost like a wiki type thing then <isaneran>does it support users upvoting code examples etc? <encryptedwhisper>i don't think janetdocs has upvotes right now. but we are hoping that Goblins will allow us to have more flexible things like that <isaneran>but likes or whatever could be useful for sorting code examples by popularity <isaneran>but then we need a hatred/brain feature to balance it out <Zarutian_iPad>stuff like the dreaded Duffs Device and such would fall into that category <encryptedwhisper>report feature would be good too. I'm not sure how clojure/janet do this but i suspect it's just an acl that allows for modification of the entries <jfred>of course in that case programs are run in response to HTTP requests and aren't long-running, so there may be an impedance mismatch there... not sure <jfred>then again cloudflare durable objects is similar I think, and maybe it's fine so long as programs can be suspended/rehydrated in response to incoming captp messages <Zarutian_iPad>jfred: been fiddling with how to do the suspend resume thing on val.town <Zarutian_iPad>or use cryptographic techniques of handing the http requestor a huge cake to get back at their next request <jfred>I'm thinking an ocap-style val.town would likely be cleaner if you did the OO thing of making the "vals" classes and letting people spawn multiple instances of them, each with their own storage <jfred>then capabilities would be associated with the instances rather than the code snippets themselves <jfred>mmm sure - I guess that's what goblins does isn't it? (I'm admittedly not super clear on the distinction) <dthompson>encryptedwhisper: that is quite the ambitious project! sounds very cool <dthompson>seems they compile janet's C source via emscripten to produce a janet.wasm file <encryptedwhisper>It feels like something like this is very needed for Guile, at least to get new users onboard <encryptedwhisper>My current experience with docs on guile is very frustrating, and I am frustrated with the frustration. <dthompson>hmmm for me it's easier to discover things than most manuals <encryptedwhisper>like, I was trying to figure out how open a file to read text the other day, and it took me maybe a half hour and asking friends, looking all over... <dthompson>I'm curious what the disparity between our experiences is caused by <dthompson>there are certainly things *missing* from the manual, but for the stuff that's adequately documented I can generally find what I'm looking for without much trouble. <encryptedwhisper>If I go to janet, for example, I can look up IO, then go to janetdocs, and see a "see also" or an example that shows exactly how to use it <dthompson>oh so there was an example missing in the guile docs? <encryptedwhisper>My goal: Advent of code. I have done all the actual logic, and I need to actually load the input file line by line. <encryptedwhisper>"io" returns a bunch of text with io in the name but if I filter those out using the browser search <dthompson>ohhh well yeah the html view isn't the best out there. it's completely static. no js <dthompson>but load up the manual in emacs and you've got everything at your fingertips and it's very easy to search <encryptedwhisper>i see a very large number of procedures with a thing saying they are the same as the core library <dthompson>get-line reads lines, isn't that what you were after? <encryptedwhisper>or, perhaps I start trying to find out how to open a file, and call get-string on it or something <encryptedwhisper>In an ideal world I would automatically find my way very easily to call-with-input-file <fjl>dthompson: Compared to Racket docs Guile docs are super hard to approach <encryptedwhisper>you also have to train your brain to ignore all the extraneous text like "Scheme Procedure:" <encryptedwhisper>If you didn't know scheme/lisp at all, it's really a very inaccessible experience compared to any other language <fjl>When I was starting with Guile I used to be checking stuff in Racket docs for clear explanation and examples and then go to Guile Procedure index and check if it is present in Guile <encryptedwhisper>I actually can't find it at all. The only way to really use the guile docs is either to use the full HTML page view, or GNU Info <encryptedwhisper>unless you already know exactly how it's structured, and want to reference it <dthompson>Janet has the advantage of being a brand new language <dthompson>I completely agree that the web view is not great. it's having the manual open in emacs that is very powerful. <encryptedwhisper>Anyway, the goal of our project is to bring this kind of modern UX to guile. Hopefully as a companion in the same way that janetdocs.com is a companion to janet-lang.org/api <dthompson>the existing guile manual could be adapted to have a web export that looks more like racket's <fjl>what is missing in texinfo comparet to racket scribble are the links to procedure definitons <dthompson>the texinfo web export just sucks. for hoot and goblins we follow guix's lead and post-process the output. <encryptedwhisper>I have a lot of problems with the manual in emacs too, but it's likely just because i use spacemacs <dthompson>to make it look a lot better, add syntax highlighting, etc. <fjl>guix postprocessing of docs should be upstreamned <fjl>to all trexinfo html <dthompson>encryptedwhisper: sounds like a spacemacs thing. <dthompson>fjl: would be a better use of time to abandon texinfo <encryptedwhisper>But, aside from that, I found the Emacs Info interface somewhat confusing and hard to navigate <dthompson>I think there have been attempts to improve texinfo in this way that haven't gone well <fjl>replace it with what? <fjl>guix got it to pretty decent astate <dthompson>fjl: guile can parse a subset of texinfo, so improving that and having full control over the output, at least for the html version, would be better. <dthompson>people have made alternative texinfo html viewers that are pretty darn good <encryptedwhisper>Is there a way in emacs to search for something in the manual and show a list of results? <fjl>Use one of existing markups, more scheme friendly? <dthompson>rewriting the entire manual would be a hard sell <encryptedwhisper>Also, the guile manual highlights function names in the documentation, but does not appear to make them links, which adds friction <fjl>good example how it could look like <dthompson>encryptedwhisper: yes, the html export is not great. <fjl>here you see scanr is similar to foldr, <fjl>scanr is not a link but foldr is <fjl>it must be postprocessing <fjl>as source is like that <fjl>@racket[scanr] is similar to @racket[foldr], but returns a list of successive reduced values from the right. <fjl>so scribble html renederer is handling taht <dthompson>ah yeah if that's the source then it would be some kind of post-processing <fjl>there is a couple of nice procedures in guix docs build and guix artwork that could be upstreamed to Haunt and guile-syntax-highlight <dthompson>that's the single most useful keybinding in the info viewer <encryptedwhisper>I think for me the friction mostly comes from the fractal of learning.. to learn guile you have to learn how to use the manual, to learn that you have to learn how to use emacs, to learn emacs comfortably you have to learn basics of lisp / elisp ... etc <encryptedwhisper>specifically for Info, the main issue I encounter is I can't remember how to go back to the page I was just on. <encryptedwhisper>like, I just hit 'i' and searched for current-input-port but now I want to go back to the page I was on and I can't remember how to. <encryptedwhisper>(I did do the info tutorial thing, but it didn't stick in my mind so now I've forgotten) <dthompson>encryptedwhisper: when you forget what keybindings are available, use C-h b <dthompson>and you'll find Info-history-back mapped to the 'l' key <dthompson>I 100% agree that a non-emacs learning route is needed. that's a direction we're trying to promote at spritely. <dthompson>need non-emacs lispers to build the tools to make it pleasant <dthompson>knowing some of the C-h _ commands is important for emacs. you can discover just about everything you need with them. <dthompson>yeah I've never used spacemacs so I don't know what it does <fjl>dthompson: Ask Robin when guile-emacs, one level of lisp less then <dthompson>when I switched from vim 10 years ago I just re-trained my hands <dthompson>if someone could make editing scheme pleasant in vscode or something, that would go a long way <fjl>Heresy, here, when I need to scheme quickly I use Pycharm witch scheme plugin, as it is where my best muscle memory is :) <dthompson>I thought LSP was going to be the answer, but apparently it's not built with REPL driven development in mind. it's more about static code analysis, which is unfortunate. <fjl>and repl in another window <dthompson>fjl: can you send stuff to the repl from the editor? <dthompson>copy/pasting is fine for small things, but REPL integration is a must-have for anything more serious. <fjl>but I have load in Ctrl+R so it is quick <dthompson>true repl integration cuts out that save/recompile/load cycle <dthompson>you can just eval a single expression in a module without having to reload the whole thing <dthompson>anyway encryptedwhisper I think your project would definitely be a huge help so good luck with it and let us know how things go! <dthompson>I'm working on something that is a small step towards having an in-browser REPL that we'll be sharing soon <Zarutian_iPad>jfred: the distinction is that a constructor function can make more than one object at a time. Objects that are in cahoots with each other such as facets of a composite object. A class just describes and constructs one object at a time and only of that form. <robin>fjl, i was actually tinkering with guile-emacs again in late 2022, but there's this "hoot" project that's been distracting me lately <robin>(it's probably a programmer-year away from being up-to-date and reasonably usable, hard to find the right programmer and year though) <fjl>Awesome. Is it at least constantly rebased? <fjl>Anyway, any progress is better then stale code rotting. <fjl>Hoot is the valid excuse. <robin>nope, it's "stuck" on the release from my final summer of code, and the emacs side of rebasing always took a decent chunk of internship time (and guile-emacs essentially only changed emacs c code). the commit history is pretty clean though, i'd optimistically say three months for rebasing onto today's emacs <robin>re: guile docs, i do think they could use a good overhaul, from the actual content to the web ui (texinfo just isn't that good outside of emacs, especially the lack of search)... <robin>("Diátaxis is an approach to quality in technical documentation. It describes an information architecture that emerges from a systematic approach to understanding the needs of documentation users.") <fjl>Diataxis is a great documentation methodology. I participated in the workshop by the creator of it during the Djangocon year ago. <fjl>That resulted in my patch to Django docs during the sprints after the conference. <fjl>In the scheme land the best docs in my opinion is Racket. It is not strict Diataxis, but very close effectively. <robin>oh wow, that's really cool re: djangocon <robin>i'm still getting started with it but it looks very promising (i've got lots of doc work in the queue for hcoop (internet hosting consumer coop) and of course it would be useful for hoot/spritely/guile too) <robin>and yeah, i don't use racket much personally but the docs are consistently excellent (i'd probably have to experiment with it more if they weren't!) <fjl>But maybe the right direction to consider is postprocessing of texinfo for html presentation in direction of Racket docs. Scribble is bit nicer markup an the fact that it is just a DSL on top of Racket makes it even better, but we can live with texinfo. <fjl>Could Hoot provide scheme replacement for the js tipue search?