HNHacker News
TopNewBestAskShowJobs

whacked_new

1,729 karma · joined March 19, 2007

brain & neuroeconomics -> hpc -> semiconductor

en/zh/ja/emacs/vim

mainly python, clojure, typescript

whacked on gh

also whacked on hn but that one's now a placeholder

submissionscomments
whacked_new··on The Emacs Widget Library: A Critique and Case Study
The tradeoffs are very shallow, mainly I just wanted the maximum chance of seeing something working ASAP.

Staying vanilla reduces dependencies, which also makes testing easier during iteration. I forgot which agent (CC or codex) I used for the bulk of the code generation, but some times I manually do some one-off dialog and those get unbalanced parens.

In the agent I ask it to do `emacs -q -nw -l ...` to iterate, so it starts a bare emacs instance. This seems to have worked well when adding [Submit and Close] and [Cancel] buttons, as well as "move the cursor into the first text input widget when inserting a new array item" (the default action is to keep the cursor on the [INS] widget after inserting the list item).

The next consideration is just that I am less confident in the agent's ability to just ingest a .el library and use it correctly vs something more popular like python. Maybe it can, I just wanted results fast and not have to dig too deep myself. I had to go in and do some (setq debug-on-error t) toggles a few times while it was figuring out the json schema load into alist/hashmap differences and I didn't want to spend more time doing plumbing.

But as you probably can imagine, dynamic inline forms immediate gives us state issues, so I asked the agent to create a buffer-local alist (or hashmap?) to track the states of the form input, so it can be cleaned up on close. It's a bit unreliable now. If vui.el already has a solution I'll switch over next.

whacked_new··on The Emacs Widget Library: A Critique and Case Study
I'm happy more people are interested in this critique! And thanks for d12frosted for joining the discussion.

I was searching for what's the latest in emacs widgets developments because I was interested in using widgets. Emacs Customize for example, renders text-based widgets in an editable buffer, which is very uncommon nowadays. Emacs seems like the best candidate for this kind of interactivity. I'm sure it's possible in other editors, but with significantly more effort and significantly slower rendering. I also considered lem, but the barrier also seems much higher.

His post also led me to his vui.el project, but I ended up not trying it, since after understanding the tradeoffs, I pushed the widget code creation to an LLM. I still get frequent unbalanced parentheses errors so I still stay close to the defaults.

The PoC is about testing a method to render a widgets-based, json-schema-validated input form that you can embed dynamically into an emacs buffer, enter the data, then do something post-validation. If anyone's interested, here's the latest state of the LLM-generated and human-fixed code: https://gist.github.com/whacked/6875c5117b48528e619755e13e24...

whacked_new··on There is No Quintic Formula [video]
The 2swap lambda calculus video (https://www.youtube.com/watch?v=RcVA8Nj6HEo) is a masterpiece!
whacked_new··on “One Student One Chip” Course Homepage
The organizers presented this at COSCUP 25 [1]. It's both extremely ambitious and impressive. They said there are basically no restrictions on who can join -- high schoolers to postdocs, and it's completely based on personal aptitude. The fastest students can finish in a few months, and some go on for years. Students who graduate finish an actual chip that (probably among other things) runs a video game.

[1] https://coscup.org/2025/sessions/SNHFTW

whacked_new··on Nix Derivation Madness
Comparing nix style (hash head, package tail), and spack style (package head hash tail), and speaking from my own limited experience, the need arises in different cases, which also depends on the ease of tooling,

sometimes I'm grepping in /nix/store and you have (as shown earlier) a list of derivation paths like this

$ ls /nix/store | grep nodejs-2 | head | sed 's/^/ /'

    0a9kkw6mh0f80jfq1nf9767hvg5gr71k-nodejs-22.18.0.drv
    0pmximcv91ilgxcf9n11mmxivcwrczaa-nodejs-22.14.0-source.drv
    0zzxnv3kap4r4c401micrsr3nrhf87pa-nodejs-20.18.1-fish-completions.drv
    2a7y7d38x8kwa8hdj6p93izvrcl9bfga-nodejs-22.11.0-source.drv
    2gcjb0dibjw8c1pp45593ykjqzq5sknm-nodejs-20.18.1-source.drv
and thus as designed, your eyes ignore the block of hashes and you see the "nodejs-..." stuff

You might ask why are you grepping? Because it's fast and familiar and I don't know the native tooling as easily (possibly a UX problem).

Then in spack (see https://spack.readthedocs.io/en/latest/package_fundamentals....) they have

$ spack find --paths

    ==> 74 installed packages.
    -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
        ImageMagick@6.8.9-10  ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/ImageMagick@6.8.9-10-4df950dd
        adept-utils@1.0       ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/adept-utils@1.0-5adef8da
        atk@2.14.0            ~/spack/opt/linux-debian7-x86_64/gcc@4.4.7/atk@2.14.0-3d09ac09
and

$ spack find --format "{name}-{version}-{hash}"

    autoconf-2.69-icynozk7ti6h4ezzgonqe6jgw5f3ulx4
    automake-1.16.1-o5v3tc77kesgonxjbmeqlwfmb5qzj7zy
    bzip2-1.0.6-syohzw57v2jfag5du2x4bowziw3m5p67
    bzip2-1.0.8-zjny4jwfyvzbx6vii3uuekoxmtu6eyuj
    cmake-3.15.1-7cf6onn52gywnddbmgp7qkil4hdoxpcb
you get the package name immediately from the left, which is nice, and you can pipe that straight to `sort`, but where the hash starts is more jagged on the right so there's a bit more noise when you're looking at the numbers. In the end the information is identical and it's a UX difference.

Tradeoffs wise I think they both made the right choice. Because for nix, the packages are almost always in /nix/store, so the path length including the hash is almost always the same.

For spack you can place your packages anywhere so the base directories can be highly variable, and so it's sensible to have the package names immediately after the package directory.

Or, I'm just trying to rationalize the choices each designer made post-hoc. But after using both I appreciate the design considerations that went in. In the end, humans are inefficient. When I make name / version / hash identifiers in my own applications I end up using one or the either design.

whacked_new··on Nix Derivation Madness
I can't find the video of the talk where either Eelco Dolstra (nix) or Todd Gamblin (spack) talks about this, but IIRC it's a design decision; you generally don't go spelunking in the nix store, but if you do, and you ls /nix/store, you'll see a huge list of packages, and due to the hash being a constant length, you can visually separate the tails of the package names like

    0009flr197p89fz2vg032g556014z7v1-libass-0.17.3.drv
    000ghm78048kh2prsfzkf93xm3803m0r-default.md
    001f6fysrshkq7gaki4lv8qkl38vjr6a-python-runtime-deps-check-hook.sh.drv
    001gp43bjqzx60cg345n2slzg7131za8-nix-nss-open-files.patch
    001im7qm8achbyh0ywil6hif6rqf284z-bootstrap-stage0-binutils-wrapper-boot.drv
    001pc0cpvpqix4hy9z296qnp0yj00f4n-zbmath-review-template.r59693.tar.xz.drv
Spack, another deterministic builder / package manager, IIRC uses the reversed order so the hash is at the tail. Pros/cons under different search / inspection conditions.
whacked_new··on Show HN: Timelinize – Privately organize your own data from everywhere, locally
Thanks for the reply! I'll have to try this out... it almost looks like what perkeep was meant to become.

One interesting scenario re time traveling is if we use an LLM somewhere in data derivation. Say there's a secondary processor of e.g. journal notes that yield one kind of feature extraction, but the model gets updated at some point, then the output possibilities expand very quickly. We might also allow human intervention/correction, which should take priority and resist overwrites. Assuming we're caching these data then they'll also land somewhere in the database and unless provenance is first class, they'll appear just as ground truth as any other.

Bitemporal databases look interesting but the amount of scaffolding above sqlite makes the data harder to manage.

So if I keep ground truth data as text, looks like I'm going to have an import pipeline into timelinize, and basically ensure that there's a stable pkey (almost certainly timestamp + qualifier), and always overwrite. Seems feasible, pretty exciting!

whacked_new··on Vibe engineering
so the progression of human technological revolutions is looking like industrial -> information -> AI -> vibe
whacked_new··on Show HN: Timelinize – Privately organize your own data from everywhere, locally
Super interested in this as well (and thank you for Caddy)

How does this handle data updating / fixing? My use case is importing data that's semi structured. Say you get data from a 3rd party provider from one dump, and it's for an event called "jog". Then they update their data dump format so "jog" becomes subdivided into "light run" vs "intense walk", and they also applied it retroactively. In this case you'd have to reimport a load of overlapping data.

I saw the FAQ and it only talks about imports not strictly additive.

I am dealing with similar use cases of evolving data and don't want to deal with SQL updating, and end up working entirely in plain text. One advantage is that you can use git to enable time traveling (for a single user it still works reasonably).

whacked_new··on Babel is why I keep blogging with Emacs
I was a long time org mode user and used babel extensively [1]. It was a marvelous experience, but the market chose markdown. I still drop into org-mode some times for specific features, and the babel integration is still in its own league, but technically there's nothing preventing something similar for markdown.

I pulled some org-babel code to make a code fence evaluator for markdown a while back [2] but haven't found myself needing it that much. So without a need to wrangle reports or run exports, I think it's a 1% feature for text file connoisseurs.

[1] https://ess.r-project.org/ with babel is an experience I find superior to jupyter tools even after all these years

[2] https://github.com/whacked/emacs-markdown-babel

whacked_new··on Managing dotfiles with Make
Oh right, I do this too!

At the same time it often feels like a veneer of control, like you can control exactly where to place the door, but what's in the messy room (like emacs profiles if you do that) might be hidden behind the very nice and solid door.

It's like in python projects I lock python3 and uv, and beyond that it's wild west. Still beats everything else, still feels a bit incomplete, and still feels somewhat unresolvable.

whacked_new··on Managing dotfiles with Make
I advocate (and use) nix + home manager too but when you need a one-off change or test and realize you need to do the whole commit and switch thing, or when you are debugging and spelunk through the read only nix store, or when you set up a new (non-nix) computer and do the nix install, home-manager install, run the switch and get a deluge of errors...

it's simultaneously awesome but "can I really recommend this to <colleague>?"

whacked_new··on Learning the soroban as an adult (2022)
Wow, thanks for digging! Looks like I haven't committed that file! It's an incomplete description of the android app that I wrote to output the jsonl in the self-logging piece going through some comparisons of existing options in 2019 and design decisions for the app. In short, it's like myfitnesspal tailored to my use case. 3 years later, the data is still a sprawl, but the logging strategy is stable.
whacked_new··on Learning the soroban as an adult (2022)
I wanted to track my progress to the highest level of detail possible. The motor motions are somewhat similar, but slightly more complex, than typing on the keyboard. But since I already type fluently I wouldn't be able to get as fresh data, so the soroban was a nice other task.

The main goals were to track learning progress and truly experience what it meant to have a virtual abacus in my mind's eye.

Honored to get a comment from you!

whacked_new··on Learning the soroban as an adult (2022)
Author here. Very surprised to see this on HN years after I stopped!

Also, thanks for the UI critique, points taken! The design decision was to hide nitty gritty detail about the background unless the reader was extra interested, in hopes of making an article with gradual / adjustable depth so readers who aren't as interested can get a tl;dr for each section (I still don't know how a nice UI to do this, although LLMs make the idea more in reach now).

whacked_new··on Clojure Async Flow Guide
so is this something like core's interpretation of things like ztellman's manifold (https://github.com/clj-commons/manifold)?

EDIT:

gpt says,

Choose core.async.flow when you want a declarative, monitorable process graph over channels (pause/resume, error channel, flow monitor).

Choose Manifold when you need deferreds/streams as general primitives, precise per-op backpressure, error-aware chaining, or you’re in the Aleph/Netty stack.

very abstract but based on this, the answer is no.

whacked_new··on Sleep apnea pill shows striking success in large clinical trial
I have been doing something like this, every day, for several years now. I started with a more gentle kind of tape that doesn't go over your lips. But after trying different kinds of tape, I just stick a small piece of medical tape over my lips now.

I don't have sleep apnea but had a tendency to breath through my mouth at night. It worked almost immediately for me. And what's more, after my body got used to it, I could have a stuffy nose before sleeping, stick on the tape, and when I lie down, my nose would clear up, like it was conditioned to do that.

10/10 would recommend

whacked_new··on Show HN: Real-time AI Voice Chat at ~500ms Latency
does uv play well with cuda?

I use nix-shell when possible to specify my entire dev environment (including gnumake, gcc, down to utils like jq)

it often doesn't play well with venv and cuda, which I get. I've succeeded in locking a cuda env with a nix flake exactly once, then it broke, and I gave up and went back to venv.

over the years I've used pip, pyenv, pip env, poetry, conda, mamba, younameit. there are always weird edge cases especially with publication codes that publish some intersection of a requirements.txt, pyproject.toml, a conda env, to nothing at all. There are always bizarro edge cases that make you forget if you're using python or node /snark

I'll be happy to use the final tool to rule them all but that's how they were all branded (even nix; and i know poetry2nix is not the way)

whacked_new··on Show HN: eli – Embedded Lisp Interpreter
I like this, but forgive me for asking a bunch of obvious, ungrateful armchair questions

    - what are the core concepts that you've distilled from 15 years of hosted lisp?
    - are these thus the most foundational types?
    - how fundamental is cross-language data interop in your design so far / in the future?
    - what are the main driving principles in eli (as compared to say shen)
    - will there be host language interop?
    - what main use cases are you targeting with eli?
clojure has been my poison, but as I've worked with teams I swung back on types and almost entirely stopped using it. but its hosted implementation, syntax, and data interop (edn) is probably the most usable in my experience, although something has always been missing, and in python land hylang is the most credible, but the DX never feels quite right

thanks!

whacked_new··on The Emacsen family, the design of an Emacs and the importance of Lisp (2023)
For anyone running nix/nixos, looks like there isn't a nix-shell-able package but `nix run github:dariof4/lem-flake` starts the ncurses version
whacked_new··on Pkl, a Programming Language for Configuration
I doubt it; edn seemed like _that_ rebranding effort. It looked json-like enough, but clearly didn't have the draw. People who complain that json has no comments obviously have a secret list of other gripes.

The general tooling wasn't there, apart from clojure. I tried one of the edn libs for python/node and it always felt second class. The full power was just never there outside of clojure projects.

It's like how everybody still uses QWERTY (including me) and are happy to buy better keyboards, but they must still be in QWERTY

whacked_new··on Pkl, a Programming Language for Configuration
I might sound like heretic but as someone who always keeps an eye out for configuration systems (I've tried edn, raw json, dhall, cue, hcl to name a couple) over the years, I'm sticking to jsonnet + jsonschema. Some reasons in favor of what might seem like an antiquated / type-poor system:

  - jsonnet fixes almost all of the superficial complaints people have about json (no comments, invitations to inconsistent layouts, no composition, no functions)
  - jsonnet has a very handy formatter and has trailing commas (simple diffs)
  - jsonnet can import jsonnet as well as json so you can "refactor" your configs using code and/or plain data
  - json is everywhere and nearly every language has a parser the standard libraries
  - jsonnet is not turing complete; I consider this a huge plus as effectively you are always operating in "data space"; everything is a shape transform, nothing more, nothing less
  - you can do further slicing and dicing with other mature tools like jq, jc, yq, gron, whatever
  - your outputs being plain old json, leverage whatever json schema ecosystem tools you have
  - json schema being old, you have lots of codegen tools available
  - the jsonnet library has go, python, node, C++ bindings
  - super easy to learn and run interactively
the biggest thing that's sorely lacking in this ecosystem are whatever jsonschema doesn't support in its spec for validation, like complex XOR relationships. Sometimes I wish these are declarable in data space, but on the other hand, configs with complex relationships like these often have business code backing them. Another weakness is if you have a large anthology of schemas/templates/source data you need to figure out a management method and hierarchy yourself.

Maybe pkl has a nice answer to these but J+J is really quite robust. I'd even go further and say it's beneficial to adopt a schema-first mindset and make it a habit to generate schemas. These tools are so lightweight and ubiquitous, it makes quick work for cranking out a schema and validating everything as you go.

whacked_new··on Pkl, a Programming Language for Configuration
edn + clojure was the most pleasant configuration system I've worked with, but I have never convinced anybody else to use it. Jsonnet on the other hand, people get productive in it pretty quickly. It's my default choice for all configuration now.
whacked_new··on Pkl, a Programming Language for Configuration
I use jsonnet for templating and transformation and jsonschema for validation. Very happy with this combination. One big reason is that there are lot of libraries and codegen tools to choose from once you have the JSON generation pipeline (including schema generation) down.
whacked_new··on Reviewing 1 year of my progress from practicing mental calculation (flash anzan)
yikes! do you have javascript blockers? The site is unusable without javascript.

FWIW, it's a custom rerender of https://github.com/whacked/cow/blob/main/learning%20soroban%...

whacked_new··on Reviewing 1 year of my progress from practicing mental calculation (flash anzan)
I started learning the soroban (Japanese abacus) 2 years ago because I wanted to understand how people used it to perform calculation feats. I spent a year practicing using the abacus mechanics, and another year replacing the physical abacus with a mental abacus, so I can operate it all in my mind.

So here's some analysis of my progress. My results aren't impressive, but cultivating the mental abacus has been quite interesting!

whacked_new··on Ask HN: Does anyone here use Haxe?
I used it for a few research projects around the same time. Overall it was a good experience, even after wresting with the macro system, and I was very sad it didn't reach wider adoption.

A few years later I tried to rebuild an old project running openfl 3.0 and failed miserably. I ended up building a docker running an old base image to get it working. That made me realize that the haxe community toolchain also evolves quickly in a non-compatible way.

The TypeScript ecosystem already way too large and way too fast. It's hard to follow both. It's also harder to find collaborators / hires.

In a fantasy world a megacorp would pick up haxe as a main driver and pump money into the ecosystem and make lots of people haxers.

whacked_new··on Ask HN: What are some unpopular technologies you wish people knew more about?
The missing link for me is nix-copy-closure, which I learned about from a post by mitchellh: https://mitchellh.com/writing/nix-with-dockerfiles

conceptually a game changer for me. In practice it's far from a silver bullet (because every language prefers its own package management so you still have to manage those), but when it works it's quite magical.

whacked_new··on Show HN: React Spreadsheet 2
https://ui.toast.com/tui-grid is MIT
whacked_new··on Why can't you multiply vectors? [video]
clicked out of curiosity and was hooked to the end. fantastic, masterful talk, thanks.
← PreviousPage 2 of 33Next →