1. 5

    I used to use <input type="image"> to display fancy submit buttons, not realizing they did anything else. Then one day I noticed an x=12&y=34 thing on the submission… and then i realized what that meant - it was a form submit of the click coordinates! The form-based equivalent to the link-based ismap discussed in the link.

    I rarely see this mentioned even on sites trying to describe the image type specifically. It is a cute little feature, though of course, like the link says it isn’t ideal for most of… anything.

    1. 1

      That’s really neat! I did not know about that.

      I could have used that to allow a color selector in that canvas demo app.

    1. 4

      Retro is not a standard Forth, but I feel that it is the best starting point for anyone who wants to get started with Forth. It is simpler for modern programmers to grasp than older more traditional Forths. It is incredibly well documented also.

      1. 4

        cc @banana_oatmeal

        Could you describe some ways that Retro differs from other Forths?

        1. 6

          Not in any particular order, and certainly not complete, but:

          • portability: Retro runs on a tiny, easy to implement virtual machine, which allows any non-host dependent code to work across systems. As such, it runs on bare x86 hardware, or under an
          • uses a somewhat literate source format with code blocks, test blocks, and commentary, typically written in a Markdown subset
          • the language uses prefixes/sigils to denote actions for tokens (similar to colors in colorforth)
          • word behaviour at compile/interpret time grouped into classes (an idea borrowed from helforth)
          • more packaged data structures (arrays, strings, etc) in the core language
          • flat namespace, using short prefixes to group related words
          • extensive use of quotations and combinators
          • no forward parsing of input stream
          • it’s used daily for a variety of real-world, non-embedded, tasks (I use Retro to implement significant parts of a browser-based application my employer uses for order management, in addition to running tools written in it for many of my own purposes)
          • documentation: I find most Forths to be lacking on this front, so I try to provide useful documentation, and work to continually improve on it based on feedback I receive.
          1. 2

            You should consider applying for a hat

          2. 3

            The big differences are:

            • There are no only a few “immediate” words, a concept which can be confusing to newcomers
            • There are no “parsing words”, words that operate on the entire buffer of text input. You can do some cool stuff with parsing words, but I always felt like it was too much power and made it hard to read other people’s code.
            • Forth and Retro are both untyped (not to be confused with dynamically typed), which is a big change for most newcomers. In Retro, you get more syntax than a normal Forth for dealing with different types of data. In regular Forth, everything is either a number or a dictionary entry. Retro adds “word classes” so that numbers start with #, strings start with ', chars start with $, etc…
            • Retro does not have the historic baggage that Forth might have, since Forth was invented in 1969. A lot of Forth systems will still make reference to things like “blocks”. Although a lot of devs like working with blocks, I feel like they are just a remnant of the past, given that few people work on machines that have decent filesystem support in 2021.
            • Retro also uses quotations in a way that is different than traditional Forths, though I do believe quotations were added to Forth in the last 10 years.

            I write more Retro than Forth. No hard feelings if someone reading this wants to fact check me.

            1. 6

              A minor correction: there are immediate words, but very few.

              In the core language:

              hook } { ) ( again repeat ] [ ; 0; pop push

              And I flag the prefix handlers as immediate as well.

              1. 2

                Thanks for the fact-check, Charles!

              2. 3

                Thank you!

          1. 3

            If you like VB inspired programming environments, Gambas BASIC is a similar Linux-only project that uses a specialized BASIC dialect.

            1. 2

              If you use a serial terminal a lot for work/play, I highly recommend giving this one a try. Unlike the alternatives, it was written recently, so it doesn’t have much legacy baggage. It just “feels right”.

              1. 2

                When I read this article, I immediately think of Forth. In Forth, you can have multiple “tasks” (somewhat similar to threads or fibers in modern languages). One of these tasks is the operator task, an interactive interpreter/compiler. It is possible to change how numbers are parsed and formatted, and many other aspects of how the language behaves. Just about everything is done through this interface.

                Interactive development has been a part of the language since day one (~1969) and can be supported on even the tiniest of targets. There are no external libraries or toolchains that need to be added- it has always been there, and numerous assumptions have been baked into the language. Non-interactive Forth systems are the exception rather than the norm.

                Unfortunately, I don’t have much experience in Lisp, so I am not able to compare it to Forth. I would be interested in hearing from someone who has experience with both languages to see how they compare.

                1. 4

                  I’m pretty religious about my yearly goals and New Year’s resolutions for about 4 years running now.

                  This is my list:

                  • Todoist. the “recurring tasks” feature is good for goal chasing.
                  • The “Daylio” recurring journal app, which I wrote about here.
                  • a “mastermind group” of humans, described below. I use the term differently than some mastermind group adherents.

                  The most effective tool I use is that last one- it’s very low tech. I formed a group of humans that also have yearly goals. I found them by asking on a Slack channel at my local maker space.

                  We meet for 45 minutes every Wednesday. We decide a start date and end date for the meetings, decide when we will stop meeting or swap out members, etc.. I’ve found that you can’t form a group with more than 4 people, and a group of three is optimal.

                  In the first meeting, we introduce our goals to know what we are trying to do.

                  In subsequent meetings, we follow a straightforward agenda. A proctor is chosen to lead each meeting. The only software we use is a video conferencing app and a Google Doc for tracking meeting notes. We go in a circle asking the following questions:

                  • What did you do last week?
                  • What will you do next week?
                  • Do you have any stretch goals or “hand-wavy” goals that you want to talk about?
                  • Where are you struggling / what’s on your mind?

                  Member responses are tracked in a Google Doc to make it easier to remember where we left off at the end of the week. I recommend deleting notes that are more than two weeks old. It creates much clutter with a group of 3-4 people.

                  As participants, we try to help each other by:

                  • Keeping members on track and accountable to their goals.
                  • Help members figure out why they are/are not meeting their goals.

                  Having a group of people to support me and keep me accountable has been critical. When we disbanded the group, we all noticed that we began to slip on our goals and unanimously decided to re-form the group. It’s been the most effective tool for me so far.

                  1. 5

                    If you want to dive deeper on the subject of stack-based computation, a good free resource is Philip Koopman’s Stack Computers: The New Wave.

                    The whole thing is available online for free. Although it is dated, it has some good information still.

                    1. 3

                      Thanks for the suggestion! I’ll take a look.

                      I’ve also been looking at Nisan and Schocken’s The Elements of Computing Systems.

                      1. 2

                        Incredible book, highly recommended

                        1. 1

                          I think you should post the link to the book as a submission by itself.

                          1. 2

                            OK, I will. Thanks for the suggestion.

                            EDIT: It looks like it was posted 5 months ago. It seems that we crustaceans have an insatiable appetite for stack machines.

                            1. 1

                              Are you referring to the Koopman text or The Elements of Computing Systems here?

                              1. 1

                                The New Wave book that is free online. I’d do it (I have even bought the Kindle version) but since @rickcarlino mentioned it, I wouldn’t want to “steal” any upvotes.

                                I also own the Nisan book, but I’ve never found time to seriously go through it.

                                1. 1

                                  Thanks for the clarification! Probably better to have it posted by someone who’s read it – can’t say I’ve gotten there yet ;)

                                  FYI, looks like the Koopman text has an existing story submission here (albeit from 2 years ago): https://lobste.rs/s/sxassm/stack_computers_new_wave_survey

                          1. 2

                            I’ve used Kiwix in the past to keep an offline copy of StackOverflow and Wikipedia.

                            I do agree that offline time is useful for tasks related to productivity, though I find it makes research tasks more difficult.

                            1. 0

                              This is why I like lobste.rs more than other tech news sites. Great work!

                              1. 1

                                more than other tech news sites.

                                🤔 - the submitter wasn’t the author, and the same post was seen on every other link aggregator of tech related posts… Help me understand why this is the example that sets Lobsters apart?

                                1. 3

                                  I guess because you get to see the good stuff, without the most of the chaff on the other aggregators.

                                  1. 1

                                    I didn’t realize that the submitter was not the author- whoops! I still appreciate that the submitter found it, and I appreciate that the author took the time to share a very fun looking project with the rest of the world.

                                    Here’s my short love letter to Lobste.rs:

                                    Using technology for its own sake or for self expression or to scratch one’s own itch rather than for more “serious” purposes is one of the key distinctions to a lot of the articles on Lobste.rs. It’s nice to see people using software for fun. I feel that a lot of the “fun” content out there is overshadowed by some of the more serious stuff such as tech business happenings, the politics / tech intersection, industry news, career trends, etc.. Anecdotally, I’ve seen more hobby content in decades past, such as BYTE magazine, 2600 and similar publications but the trend appears to have died down by the mid 2000s. On Lobste.rs though, it seems that such content is alive and well as the upvote count makes evident.

                                1. 6

                                  We used the Raspberry Pi as the onboard computer for the FarmBot project (open source gardening robot).

                                  1. 2
                                    • Firefox
                                    • Todoist
                                    • jrnl.sh
                                    • Slack / IRC
                                    • Fish shell
                                    • VSCode
                                    1. 2

                                      jrnl.sh is awesome. It helped me organize my life.

                                    1. 17

                                      Excellent doggo detection. 8/10 would listen to bark.

                                      As the ESP32 can do voice/wakeword detection I was kind of hoping this would be some kind of wake word detection rejigged to detect barks. But still an impressive detector (and much simpler!) :)

                                      (Full disclosure: I work on ESP32 software at Espressif.)

                                      1. 4

                                        Wow I had no idea. Thanks for letting me know about that. Perhaps there is a need for Woof Alert v2 :-P

                                      1. 5

                                        Does Barry have his own email address?

                                        1. 5

                                          He does!

                                        1. 5

                                          For all those who think that the 60 characters ergonomics rule doesn’t matter: show some empathy for dyslexic coders. Even when accounting for indentation, it’s not easy for everyone to read lines > 80 characters. Anecdotally, I think the developer population has a higher number of dyslexics than the general population so it’s surprising to not see this come up more in these discussions.

                                          1. 33

                                            They’re more popular than ever, as AWS Lambda.

                                            1. 27

                                              If I was good at writing satire, I would write a satire article that is a CGI scripting tutorial, but never use the word CGI and instead call it a “new Open Source function as a service library”.

                                              Similar twist: “Hi folks, I wrote a new library that converts JVM byte code to WebAssembly. For the first time ever, we can write Java that runs in the browser! Never before seen!”

                                              1. 11

                                                They are both stack machines, so it should be simple enough I guess. Don’t give me ideas.

                                                1. 5

                                                  Do it.

                                                2. 3

                                                  I started trying to write this article a while back, not as satire, but as a direct comparison to the evolution of serverless. But then I realized it’s probably been done better than I could do and aborted.

                                                  1. 7

                                                    I have literally never not published something just because I think it might have been done. If I see something that is almost entirely what I wrote, sure, I’ll axe it. (Even retroactively, in one case, where I read someone else with a better take and thought, “oh, never mind then.”) But if I haven’t specifically read an article of what I want to write, then:

                                                    1. I might have a unique take after all.
                                                    2. Even if my take isn’t unique, it might be different enough to be helpful to someone else.
                                                    3. Even if it’s neither unique nor different enough, if I’m not aware of it (and after deliberately cursory search can’t find it, if applicable), it will likely reach a different audience.

                                                    In the draft post you’ve got, I think you are heading in a good direction, and it might be worth continuing. I’d suggest dropping the FastCGI/SCGI/WSGI/Rack section in favor of diving a lot more into early attempts to speed up CGI requests and how those relate to lambdas (you touch on mod_perl, but I’d also at least touch on PHP in particular, and quite possibly AOLServer, as close peers), highlighting similar issues with startup time and how lambdas are trying to solve them in their own ways/differently.

                                                    The other way to approach this kind of thing, incidentally, which I like for my equivalent writings on these axes, is to walk through how trying to solve the problems with the old old-and-busted resulted in the new old-and-busted. You can write that kind of article sarcastically, but you definitely don’t have to; my article comparing Win32 to Flux has a bit of humor in it, but I deliberately avoided anything past that. If you went that route, the FastCGI/SCGI section fits better, but also pairs very nicely with talking about things like the Danga Interactive products (Gearman, memcache, Perlbal, etc.), which turn out to be necessarily reinvented whenever a PaaS-like environment is used.

                                                    Anyway, all this to say: I’d love to see someone actually write a post along these lines. If you really don’t want to finish yours, you’ve given me half a mind to take my own stab.

                                                  2. 3

                                                    I have that as a laptop sticker. I don’t know if commercial advertising on lobste.rs is appropriate (even for an enterprise which makes me on the order of $2/month) so I won’t link it directly, but you could probably find it quite easily by searching redbubble.com for “serverless cgi-bin”

                                                    There is the reasonable objection that using a FaaS platform you have the expectation that it will autoscale to performance levels far in excess of anything that cgi-bin of yore managed, but really, that’s a implementation detail not an attribute of the API

                                                    1. 2

                                                      Kelsey Hightower made a similar comparison at Gophercon: https://youtu.be/U7glyWYj4qg

                                                      1. 2

                                                        “This is xinetd… the new hotness”

                                                        Love it.

                                                  1. 8

                                                    I’m not sure if it’s appropriate to talk about CGI like it’s dead. OpenBSD ships slowcgi(8) and their man page viewer in mandoc is a genuine CGI application. The BCHS people endorse pure CGI with C, too.

                                                    (Whether these are good ideas is another story, but they exist right now.)

                                                    1. 5

                                                      I use them for a couple things (the order form on https://atreus.technomancy.us being one of them), and they’re fantastically useful for sites like that which can be 99% static. I wish more people realized that not everything has to be full of moving parts everywhere.

                                                      1. 3

                                                        Whenever I have some sort of local web thing, I still use CGI. It’s easy and, like you say, works well when the site is mostly static. Adding all that other stuff seems like a complete waste.

                                                      2. 4

                                                        Author does write

                                                        CGI scripting was undoubtedly useful and continues to be useful for small scale web applications, such as developer utilities, simple form data collection and local intranet tools.

                                                        (my emphasis)

                                                        1. 1

                                                          Oh, I see. My bad. I skimmed the article too quickly.

                                                        2. 2

                                                          In the first draft of this article, I used the term “near obsolescence” rather than just the term “obsolescence”, because you’re right, there are still people out there using CGI scripts (I am one of them).

                                                          Ultimately, I removed the weakening word. Determining when a technology is obsolete is a tough call, and often opinion based. In this case, it’s my opinion. If the definition of obsolete is “no longer produced or used; out of date.”, then there are very few technologies that can truly and in all cases be described as obsolete. In the case of CGI scripts as they were used in the late 90’s, I think it’s safe to say that that train left the station a long time ago.

                                                          1. 4

                                                            First I thought no one needs this article, but then I realized I’m now old. ;)

                                                            By the way, why your website keeps making requests to https://rickcarlino.com/owa/blank.php ?

                                                            1. 1

                                                              I realized I’m now old


                                                              making requests to https://rickcarlino.com/owa/blank.php

                                                              Open Web Analytics

                                                              1. 2

                                                                It sounds like a rather intrusive approach, and for people on mobile, it’s not free of charge either.

                                                        1. 3

                                                          Chuck’s words on the importance of fun cannot be understated. Anecdotally, it seems that programming as a hobby is becoming less and less common. Many of the great breakthroughs in computing were created by or for hobbyists. I hope more people can see the fulfillment in programming creatively or as a hobby.

                                                          1. 1

                                                            Setting up the serial line as a separate network adapter on the laptop and setting up IP forwarding in the kernel is probably the “right” way to do it, but it’s generally a lot easier to run a getty on the serial port (to ask for login/password and launch a shell), and then have Trumpet just launch SLiRP, a userspace implementation of SLIP/PPP and NAT.

                                                            1. 2

                                                              Aha! I wish I knew what SLiRP was a month ago. I will give it a try on my next project.

                                                              I had so many failed attempts with PPPD that I gave up.

                                                              Thanks for pointing me in the right direction!

                                                            1. 9

                                                              If you were broke in the 90’s, you may want to say thanks for Trumpet Winsock now: https://thanksfortrumpetwinsock.com/

                                                              1. 3

                                                                Purchased a license last night! I hope others do the same.

                                                              1. 3

                                                                I would have gone for Ethernet, personally. I’ve definitely had to do SLIP before, on a laptop where I didn’t have a PCMCIA ethernet card; I set up an NT 4 VM to do it. Once I got the Ethernet card, I decided to use ZModem to transfer the drivers for it over.

                                                                1. 3

                                                                  I picked up an old ethernet card that was new in box, but it expected Windows for Workgroups. This machine only had the standard home edition of 3.1. I never was able to get the card running, which is unfortunate given the slow speeds of the serial line.

                                                                  1. 1

                                                                    Now that you do have Internet, you could transfer windows 3.11 to the machine.