HNHacker News
TopNewBestAskShowJobs

kmstout

875 karma · joined May 1, 2019

https://www.reindeereffect.com

https://reindeereffect.github.io

submissionscomments
kmstout··on Don’t build a general purpose API to power your own front end (2021)
I'm torn. On the one hand, there are many websites I hate interacting with because they are unnecessarily structured as JS clients exchanging data with a remote server via a network link. On the other hand, it's easier for me to develop libraries and CLI clients of my own, these days getting quite far with Firefox dev tools' network view and "copy as curl," and only occasionally having to actually read the code in those JS clients. In the old days, I would have to resort to some ugly and comparatively brittle page scraping.

This new world sucks for the interactive user in a browser (which is me often enough), but it's great for the guy who wants to treat a website as just a remote provider of some kind of data or service (also me often enough).

kmstout··on Bath-obsessed ancients (2016)
I attended Grey Fox Bluegrass Festival several years. It's held in NY state for four or five days in July, with people on-site longer for setup and teardown. While I was there, I marveled at many things, e.g., the music, the friendliness of the people, and the cleanliness of the outhouses.
kmstout··on Cyberdecks (2013)
Imagine cleaning out the case of a Kaypro II [0], replacing the internals with a RPI or something more capable; the display with an LCD of the same size; and a large battery pack. After leaving a dedicated space for a flask of whiskey, you'd still have a lot of space to put in modules for extra capabilities.

[0] https://www.old-computers.com/museum/computer.asp?c=550

kmstout··on The problem with slow tools (2021)
As with anything in engineering, it depends.

https://www.walmart.com/browse/health/adult-diapers/depend/9...

kmstout··on Forth: The programming language that writes itself: The Web Page
"I always considered that size and speed were important for amateurs. But in the modern context, there's only three parameters that matter: power, power, and power."

--Chuck Moore

https://youtu.be/0PclgBd6_Zs?t=389

kmstout··on Full Text of the Federalist Papers
Project Gutenberg also does EPUBs.

https://gutenberg.org/ebooks/1404.epub3.images

kmstout··on Storing Data in Control Flow
The game that I'm working on in my spare time has a lot of state machines in it compiled to CLOS, letting me use method calls as a means of directly sending sending events. Rather than write all those methods myself, with `case` forms on the state, I spent an afternoon writing this [0]

  (defmacro defdelta (class &body body)
    (let* ((body `(,@body
                   (- enter - - -)
                   (- leave - - -)))
           (acc (group-by
                 1
                 (let ((-q0) (-e) (-w) (-q) (-a))
                   (loop for (q0 e w q a) in (cdr body) do
                     (setf -q0 (tc q0 -q0)
                           -e  (tc e  -e)
                           -w  (tc w  -w)
                           -q  (tc q  -q)
                           -a  (tc a  -a))
                         collect (list -q0 -e -w -q -a))))))
      (push (cons class acc) *delta*)
      `(progn
         ,@(loop for (e . clauses) in acc collecting
                 `(progn
                    (defevent ,e)
                    (defmethod ,e ((me ,class) &rest args)
                      (when (member *@* args)
                        (apply #'emit ',e (state me) me args))
                      (case (state me)
                        ,@ (loop for (q0 . deltas) in (group-by 0 clauses)
                                 collecting
                                 `(,q0 (random-case
                                         ,@ (loop for (- -- w q a) in deltas
                                                  collecting
                                                  `((,@(or w 1))
                                                    ,@(when (and q (not (eq q0 q)))
                                                        `((change-state me ',q args)))
                                                    ,@(when a
                                                        `((apply ',a me args)))))))))))))))

which allows me to write, for example, this

  (defdelta door
    (  q0        event       -  q         action       )
    ;;--------------------------------------------------
    (  locked    challenge   -  -         test-lock    )
    (  ^         unlock      -  unlocked  -            )
    (  ^         enter       -  -         to-locked    )
    ;;--------------------------------------------------
    (  unlocked  enter       -  -         to-unlocked  )
    (  ^         challenge   -  open      -            )
    (  ^         lock        -  locked    -            )
    ;;--------------------------------------------------
    (  open      enter       -  -         to-open      )
    (  ^         arrival     -  blocked   -            )
    (  ^         shut        -  unlocked  -            )
    ;;--------------------------------------------------
    (  blocked   departure   -  open      -            )
    (  ^         enter   -   -            to-blocked   ))
along with some support code (e.g., the action functions) to define the auto-closing, auto-locking behavior of doors.

---

[0] Some helpers have been omitted. `defevent` defines a generic function with the given name and a particular set of arguments, and a default method that does nothing. `change-state` handles the mechanics of updating the state variable, sending a `leave` event just before the transition and `enter` just after.

kmstout··on GPT-4 details leaked?
> their product will work better, and they will win the market

Like Betamax?

kmstout··on Space After Periods (1993)
Fibonacci tab stops!

- https://old.reddit.com/r/emacs/comments/3m6yhd/fibonacci_ind...

- https://codegolf.stackexchange.com/questions/171031/indent-y...

kmstout··on The 90s Developer Starter Pack
"Hungarian Notation is the tactical nuclear weapon of source code obfuscation techniques; use it! Due to the sheer volume of source code contaminated by this idiom nothing can kill a maintenance engineer faster than a well planned Hungarian Notation attack."

https://cs.fit.edu/~kgallagher/Schtick/How%20To%20Write%20Un...

kmstout··on A toy programming language in 137 lines of Python code
Ignoring all the work implementing a parser generator, here's a crappy language in fewer than 100 lines:

https://reindeereffect.github.io/2019/01/16/index.html

kmstout··on Flattening ASTs and other compiler data structures
> nothing to do with the memory allocator

It's an application-specific memory allocator.

kmstout··on Code the shortest path first
"I myself find it faster to work out algorithms in APL; then I translate these to PL/I for matching to the system environment."

--Fred Brooks, The Mythical Man Month, Ch. 12.

kmstout··on Bytes are all you need: Transformers operating directly on file bytes

  All you need is harm (ba da-da da-da)
  All you need is harm (ba da-da da-da)
  All you need is harm
  Harm, harm is all you need
kmstout··on Tell HN: The “Y” logo in the top-left corner has been upgraded to SVG
Which browser? So far, everything seems fine in Firefox, Chromium, and Nyxt, which uses WebKit.
kmstout··on Tell HN: The “Y” logo in the top-left corner has been upgraded to SVG
Why work so hard?

  ▲  U+25B2  BLACK UP-POINTING TRIANGLE
  ▼  U+25BC  BLACK DOWN-POINTING TRIANGLE
[0] https://en.wikipedia.org/wiki/Geometric_Shapes_(Unicode_bloc...
kmstout··on Ask HN: What is new in algorithms and data structures these days?
Isn't everything since the Renaissance considered modern?
kmstout··on I want to talk about WebGPU
After disabling Javascript [0], everything is fine.

--

[0] The aptly named "Javascript Toggle On and Off" plugin for Firefox sets up a keybinding for toggling. It's very convenient and great for scaling many a paywall.

kmstout··on A social media site for chatbots to talk to each other
I am now the proud shepherd of @thedude and @walter_sobchak. I'm hoping that Walter says glorious things while His Dudeness takes it easy for all of us sinners.
kmstout··on WikiIndex
And what's the first thing we learn about when hitting the site? Wiki gnomes [0]. Smashing <:-)

--

[0] https://wikiindex.org/Wiki_gnome

kmstout··on Rational Dress Society
My solution for years is to hit the thrift store and opportunistically grab pants that are in good shape but too big, and then take them for alteration. For a few bucks plus tailoring, I can have something that will fit me better than anything off the rack.
kmstout··on Show HN: Shhhbb, an SSH BBS
Since you're looking for feature ideas, you might want to check out what others have done with their boards; see [0] for a good list organized by software. Even within one base software group (e.g., Mystic), you'll find a lot of variation.

Be advised that a lot of them use CP438, so you might want to get your hands on a BBS client that can handle it gracefully, like Netrunner.

[0] https://www.ipingthereforeiam.com/bbs/?step=software&all=0 [1] http://www.mysticbbs.com/downloads.html

kmstout··on F**k Teams
"Stop worrying. Your worries are like the safety instructions that flight attendants give before take off. One day when you are about to die you will not remember them and they will not matter. So don't worry."

--Masood Boomgaard

https://www.youtube.com/watch?v=S6XhrbcXEd0

kmstout··on Black widows are losing to brown widows in the fight for attics and garages
We usually try to capture the ones we encounter and send them outside. If we find ourselves doing that again soon after for the same part of the house, we'll give that room an extra thorough cleaning, on the theory that the spiders have food because the spider food has food because of us.
kmstout··on Shaking Ordinary Ice (Hard) Transformed It into Something Never Seen Before
Disabling JavaScript works well, too.
kmstout··on 30 years of Brainfuck
The proceedings of SIGBOVIK 2022 has an article [0] detailing brainfuck++, which includes a number of helpful enhancements.

[0] http://sigbovik.org/2022/proceedings.pdf, page 23.

kmstout··on The empty list
> you could de-serialize false into, say, :false ...

That's the approach that st-json [0] builds on:

- true and false become :true and :false, respectively

- [] becomes nil

- {} becomes #s(st-json:jso :alist nil)

---

[0] in QuickLisp and at https://github.com/marijnh/ST-JSON

kmstout··on So, what can you do with a process ID?

  Way hay we're out of memory
  Way hay our disk is thrashing
  Way hay I need more coffee
  Early in the morning!

  What can you do with a process ID
  What can you do with a process ID
  What can you do with a process ID
  Early in the morning?

  Send a SIGKILL to its process
  Send a SIGKILL to its process
  Send a SIGKILL to its process
  Early in the morning!
kmstout··on Common Lisp (1986)
If you get an account on Bottomless Abyss BBS [0], the message base has a USENET archive, but it only goes back to 2019 for comp.lang.lisp. So, useless for historical research, but fun for reading recent stuff.

[0] https://bbs.bottomlessabyss.net/

kmstout··on How to rebuild social media on top of RSS
In many cases, following the links in the item entries will get you full text. Just to get something going quickly, you can do a `links -dump <url>` to get just text and then cut it down with some bash-fu. That said, if you pull a lot from a given source, it's worth figuring out a reliable way of cracking out the title and text so you can format them sensibly.
← PreviousPage 3 of 7Next →