Threads for banana_oatmeal

  1. 3

    If ya wanna use this on macOS, I think you’ll need to replace -q with -G to set the timeout interval. Very cool!

    1. 2

      Or just omit -q all together.

    1. 3

      Factor is such a gem of a language. The tooling it shipped with was also totally remarkable.

      1. 85

        Risky posting this on lobsters…

        you know…because shellfish.

        1. 1

          Page doesn’t render on Safari. That’s frustrating.

          1. 2

            I hadn’t noticed that! You are totally right. Looks like Safari is explicitly blocked in the stylesheet 🤷

            1. 5

              PocketLang - a small, fast and friendly language for scripting and embedding

              From the GitHub page:

              The language is written using Wren Language and their wonderful book Crafting Interpreters as a reference.

            1. 3

              I love Nils’s work. Good to know he’s still at it. Has anyone worked through the scheme 9 from empty space book? Can you recommend it to someone who has worked through (most of) SICP?

              1. 2

                From my memory of it, the Scheme 9 From Empty Space book is more about implementing a scheme.

                1. 1

                  Yes, so my hope is that it goes into the nitty-gritty that was left out of SICP: hygienic macros, call/cc, threads.. I’m guessing it has to be the case since s9 does R4RS.

                  1. 2

                    Answering myself, for posterity: This is what the book is about (from http://www.t3x.org/s9book/index.html)

                        How does automatic memory management work?
                        How is macro expansion implemented?
                        How does lexical scoping work?
                        How is arbitrary precision arithmetics implemented?
                        How does tail call elimination work?
                        How are first-class continuations implemented?
                    
              1. 1

                This is probably a dumb question, but what’s wrong with passing an anonymous word to the activate-toaster word?

                [ my-custom-code-here ] activate-toaster
                
                1. 2

                  That’s what I’d do, too. and then I would just : warm-toaster [ warm ] activate-toaster ; and do forth like Chuck would. At uni I wrote a lot of Forth esp on FlashForth and such and never ever found myself ever using defer, hooks and such, because they are anti-patterns imo.

                  1. 1

                    Hooks are best used when you have something you need to be able to temporarily replace. For instance, output. The c:put is a hookable word. By setting a new target, you can capture all displayed data until the word is unhooked to a buffer or file.

                  2. 2

                    I may well be misunderstanding the context here, but my understanding is that, while your solution would 100% work, it solves a different problem than what a hook seeks to solve – I imagine the scenario where, for example, a toaster manufacturer includes hooks in the toaster’s code that an enthusiast home-toaster-programmer could extend without having to gain direct access to the toaster’s core code. Your solution (I think) assumes direct access to the point of invocation of a word, whereas, with a hook, you could extend an existing interface without having to touch it directly.

                    1. 1

                      Think along the lines of git hooks.

                    1. 12

                      From the readme,

                      Each commit of this project corresponds to a section of the book. For this purpose, not only the final state of the project but each commit was carefully written with readability in mind. Readers should be able to learn how a C language feature can be implemented just by reading one or a few commits of this project.

                      1. 2

                        On GitHub is there an easy way to view the commits of the project in chronological order?

                        1. 1

                          I’m not heaps familiar with github’s web interface. I know you can do this from the git cli with git log –reverse

                      1. 6

                        When the ziglings came up on the orange site someone started a list but it seems some of the other repos suggested are more complete, if a bit out of date.

                        1. 1

                          Thanks for the heads up! This by example includes some things I’d missed!

                          1. 2

                            Cool to see this here. Big fan of the podcast, been listening since the beginning! :)

                            1. 2

                              I’m the host, thanks for listening!

                              1. 1

                                in a similar thrust to Casey’s making this entire game from scratch, have you seen Charles Childers’ The Code It Yourself Manifesto? It is the second to bottom-most link in the left-hand column, I can’t find a way to link to it directly!

                                Loved the episode, too!

                                1. 2

                                  Thanks! This forth guide is interesting itself.

                                  1. 2
                              1. 9

                                I’ve been waiting for episode 2 of this to drop for 3 years 😂

                                1. 3

                                  There’s a “drop” word joke here.

                                  1. 3

                                    glad you could pick it out? I hope it didn’t cause your eyes to roll?

                                    1. 3

                                      Thx, I didn’t catch that.

                                  1. 3

                                    I would appreciate a high-level overview on stack machines. e.g. how do they work, what can they do, why did they disappear, and why are some people missing them?

                                    1. 4

                                      A little on the dry-side, but I think that this offers a really solid overview of a stack machine from a technical vantage point, https://users.ece.cmu.edu/~koopman/stack_computers/sec3_2.html

                                      As to why they disappeared, I’m not 100% certain but as for why folks miss them, at least for me, it is because they offer a way to hold more of the “problem space” of computing in my head all at once. I like to work with systems where I can understand the entire stack, from hardware all the way up. A stack machine reduces the available pallet enough to be understandable while also preserving the majority of the power of a computer.

                                      Edited, formatting issue

                                    1. 11

                                      I wrote a script to let me type in morse code by opening and closing my laptop lid: https://github.com/veggiedefender/open-and-shut

                                      And also recently modified the chrome dinosaur game to use a projector and webcam so that you play by physically jumping in front of a wall: https://github.com/veggiedefender/projectordino

                                      For the dino game I also wrote a blog post about some of what I learned: https://blog.jse.li/posts/projectordino/

                                      1. 4

                                        These are all absolutely phenomenal!

                                        1. 4

                                          Innovative SIGTERM-based concurrency control. Semaphores who??

                                          You’re hilarious. These are among the dumbest projects I’ve ever heard of. 10/10, following you on GitHub.

                                          1. 2

                                            This is my kind of tech. Keep it up!

                                          1. 1

                                            The last one I remember writing was a pomodoro timer – not to ever use, but to play with the logical structures of lua.

                                            I am currently learning forth and doing the same.

                                            1. 2

                                              I’m excited to hide this in my next project as a way to quickly extend it. Usually I’d lean on lua or a scheme, but this looks like a lot of fun; sort of like a teeny tiny forth, living in the space between fe and retro.

                                              1. 4

                                                I’m gonna ask. I’ve seen a lot of references to ZNC on the self hosting thread, I’ve did some research, but at the end I couldn’t find a clear answer: could someone explain the purpose of an IRC bouncer like I’m five?

                                                1. 9

                                                  No problem! IRC (internet relay chat) is a type of real-time chat. Sort of like telegram or signal, but not really at all.

                                                  With it folks can chat with one another online. A major difference between IRC and other chat protocols is that if you aren’t actively connected to an IRC server you won’t receive any messages. So, whereas with telegram or signal you can close/quit the app and still get messaged, the same isn’t true for IRC.

                                                  This is where bouncers, like this, and ZNC come in. A bouncer is a program that you run on a server or any computer that is always online – the bouncer connects to one or more IRC servers and then when you want to log on, you (re)connect to your bounce instead of directly to the IRC server. This way you are able to have a log of messages, and sort of fake persistent connection, because the bouncer is always online, even when you aren’t connected.

                                                  1. 2

                                                    Thanks! That explain it all. I was getting mixed information between privacy, persistent logs and mobility.

                                                    1. 4

                                                      Yeah – there is a lot more to bouncers than first meets the eye!

                                                      The privacy angle is that usually, unless you’ve configured it elsewise or unless the server is explicitly masking it, connecting to an IRC server reveals your IP address. Using a bouncer can help to prevent that if that is a concern.

                                                      The mobility angle is that there are no (that I know of) persistent IRC clients for mobile. The way to use IRC from a mobile device with intermittent connection to the server is through a bouncer. If it is always connected, it doesn’t matter if your IRC client is always connected.

                                                1. 5

                                                  I use Retro a lot. Especially for writing programs like one might use Perl or something, short but not short enough for a oneliner, or as a supplementary tool. The programs packaged with it are also intermittently useful, unu actually being really great. The Freenode channel #retro is dead quiet but the developer (crc) is always around. This is the other homepage.

                                                  1. 4

                                                    Do you have any examples of the programs you write in retro?

                                                    I’ll I’ve played with it a lot, I haven’t written anything “useful” as of yet and would like to start doing so.

                                                    1. 3

                                                      I would like to see some real-world examples too.

                                                  1. 2

                                                    I’ve played with retro quite a bit! It is a little different from other forths, but I love how it treats literate programs as first-class-citizens.

                                                    1. -4

                                                      What is this?

                                                      1. 4
                                                        1. 2

                                                          Not 100% sure on what the this is referring to, but if it is Gemini, here is more info on that: < https://gemini.circumlunar.space/>

                                                          The tl;dr is that Gemini is a relatively young protocol somewhere in between http and gopher for serving text.