HNHacker News
TopNewBestAskShowJobs

phforms

643 karma · joined April 29, 2022

submissionscomments
phforms··on Advent of Code 2025: Number of puzzles reduce from 25 to 12 for the first time
It is unfortunate, but I can absolutely understand it. Keeping up such open-ended, time-consuming projects year after year while the person doing it changes inevitably – their personal life, habits, job, interests, etc. – must feel like a burden at some point, even if it is out of love and passion (I know that from personal experience with my voluntary work, from which I had to take a break after 10+ years).

I am truly thankful for all of Eric Wastls work on Advent of Code, no matter how much time he can invest and how much puzzles we get. I already look forward to the challenge at the start of autumn and consider what programming language I will choose (this year it’ll be Uiua :)). I am very slow at these puzzles, so I mostly quit at around puzzle 12 anyway, but I learn so much from them and they are a lot of fun.

phforms··on The Little Book of Linear Algebra
As an autodidact who never learned this stuff at school/uni, his lectures are what made linear algebra really click for me. I can only recommend them to anyone who wants to get a visual intuition on the fundamentals of LA.

What also helped me as a visual learner was to program/setup tiny experiments in Processing[1] and GeoGebra Classic[2].

- [1] https://processing.org - [2] https://www.geogebra.org/classic

phforms··on Graphical Linear Algebra
Years ago when I was reading this (just a couple of chapters, not all of it), it opened my eyes to the power of diagrammatic representation in formal reasoning unlike anything before. I never did anything useful with string diagrams, but it was so fun to see what is possible with this system!
phforms··on Emacs dired-mode as a file manager
Okay, I can see the issue now, maybe I haven’t really used dired intensely enough for it to bother me. I just tried your snippet and having the cursor remain on the dired buffer for a quick preview is a feature I didn’t know I needed. Thanks for sharing!
phforms··on Emacs dired-mode as a file manager
I guess you already know the command `dired-find-file-other-window` (bound to `o` by default), which reuses the right split window, if already there and opens a new window if there is none. Horizontal splits do not seem to be reused though (they often don’t have enough vertical space for dired anyway, which is why I guess they designed it this way).
phforms··on Graphics livecoding in Common Lisp
Processing is what ignited my passion for programming and Quil has become my favorite way of writing it. It is amazing that you can re-evaluate the draw/update function in a running sketch and immediately see the changes, without having to reload the whole thing. And on top of it you have the beauty of the whole Clojure Stdlib with its immutable datastructures.

I just learned that there is now a tweak mode in Processing that lets you tweak certain parameters in the code (via draggable values, etc.) while the sketch is running, which is pretty awesome for experimenting with values. However, you still have to reload the whole sketch when you want to change other parts of the code, you can’t just eval a function in the editor and get immediate feedback like in Quil.

phforms··on Graphics livecoding in Common Lisp
I am not sure if this is what you mean, but the original UCBLogo (which I think is used in the Turtle Geometry book) is still alive and maintained[1] (not by the original authors, but Brian Harvey seems to chime in every now and then) and it does run well on modern computers.

Now that I think about it, Logo seems to be pretty much a livecoding environment (not surprising given that it is a Lisp, but with less parentheses). You can define and edit functions from the REPL while the program continues with the same state, the same canvas. You can even pause e.g. a running procedure that draws a polygon, rotate and move the turtle and then continue the polygon procedure with that new state (at least this is possible with UCBLogo).

[1]: https://github.com/jrincayc/ucblogo-code

phforms··on Emacs Lisp Elements
My Emacs wouldn’t be the same without Prots modus themes[1], which I found to be a great foundation to build my own theme on top of. I am grateful for all the work he did for the Emacs community.

I also enjoy watching his videos where he talks about various philosophical topics from a very clear, pragmatic and down-to-earth perspective. My impression is that he is a really kind and humble person and that he lives by his philosophical insights, without bragging about his lifestyle or judging about how other people live their lifes.

[1]: https://protesilaos.com/emacs/modus-themes

phforms··on Gemini 2.5 Pro vs. Claude 3.7 Sonnet: Coding Comparison
I like using LLMs more as coding assistents than have them write the actual code. When I am thinking through problems of code organization, API design, naming things, performance optimization, etc., I found that Claude 3.7 often gives me great suggestions, points me in the right direction and helps me to weigh up pros and cons of different approaches.

Sometimes I have it write functions that are very boilerplate to save time, but I mostly like to use it as a tool to think through problems, among other tools like writing in a notebook or drawing diagrams. I enjoy programming too much that I’d want an AI to do it all for me (it also helps that I don’t do it as a job though).

phforms··on Parinfer: Simpler Lisp Editing
I’ve been considering Parinfer, but my issue was that it is a bit unpredictable where parens end up and I have to be careful to not mess up my code structure. Maybe I should give it another try for a longer time period.

My favourite structural editing tool for about a year now is symex[1], which is an Emacs package (and unfortunately not that well known compared to paredit, lispy, etc.). It takes some getting used to at first but after a while you only move around and think in terms of s-expressions, you don’t even see parentheses anymore. It really feels like you are a squirrel climbing trees (hence the image on the repo, I guess). I just hope the dev(s) will be able to get rid of the heavy dependencies on other packages soon.

[1]: https://github.com/drym-org/symex.el/

phforms··on Show HN: Tetris in a PDF
Apparently, it is set to false by default in Zen Browser. In my Firefox it was still true.
phforms··on Siyuan: Privacy-first, self-hosted personal knowledge management software
I believe convenience and actually wanting to give something back to the creators would have many people pay for pro features, since it’s actually “Pay once, use for life”, which is a rare and welcome sight in this subscription-flooded world. And it still leaves people with low income the option to (legally?) circumvent payment. Not sure how sustainable this is as a business model, but I think it’s pretty nice compared to being forced into continuous payment.
phforms··on Siyuan: Privacy-first, self-hosted personal knowledge management software
It seems like they borrowed heavily from Notion, Obsidian and RemNote, as far as I can tell (wouldn’t call it a knock-off though, since there are sooo many apps in this space that you don’t really know who came up with what anymore). But the app doesn’t feel janky to me at first glance, it definitely feels more responsive than Notion and less “slippy” than RemNote. Although it is quite noisy with all the tooltips popping up immediately.

My first impression is that they really wanted to include everything (even RemNote-like spaced-repetition flashcards, Notion-like Databases and of course there has to be AI too) and it seems like they did a pretty decent job at that. I also appreciate that there are so many export options, even for Org-Mode (preserving internal links, images, code-blocks, etc.).

I like that it provides a solid, feature-rich alternative to all the cloud-first, closed-source apps in this space. But it may be too distracting/overwhelming for my use-cases with all the advanced layout capabilities and features though. Tana is a similar all-in-one solution that is really well done (and more innovative than this one), but I always seem to gravitate toward more focussed apps.

phforms··on Org Mode Syntax Cheat Sheet (2017)
Good idea to update the radio targets along with the wrapping. Also, I didn’t know `insert-pair` exists, could have saved me some typing. :)
phforms··on Org Mode Syntax Cheat Sheet (2017)
To quickly link to bullet points, just use [[*My bullet point]] (if you omit the *, it may still work but Org also finds non-heading elements like table names with the same text).

Personally, I like to create custom ids for bullet points so that I can easily change the text in the bullet point later without breaking my links:

  * My bullet point
  :PROPERTIES:
  :CUSTOM_ID: foo
  :END:
This is easier with C-c C-x p (org-set-property).

Elsewhere, I can just write [[#foo]] to create a link to that bullet.

phforms··on Org Mode Syntax Cheat Sheet (2017)
I couldn’t find the command you mentioned “org-insert-radio-target-brackets” in my Emacs and it doesn’t appear to be in the manual[1] either. But of course it is very trivial to write, in case anyone else needs this:

  (defun org-insert-radio-target-brackets (start end)
    "Wraps a region with angular brackets to create a radio target."
    (interactive "r")
    (save-excursion
      (goto-char end)
      (insert ">>>")
      (goto-char start)
      (insert "<<<")))

  (keymap-set org-mode-map "C-c n r" #'org-insert-radio-target-brackets)

[1]: https://orgmode.org/manual/Radio-Targets.html
phforms··on A dictionary of single-letter variable names
Clojure developers also often make use of single-letter variable names, following conventions in `clojure.core`: https://guide.clojure.style/#idiomatic-names

My rule of thumb is to only use short names in the local scope of a function and have them follow conventions within the language community. Constrained like this, I see no harm in using them, since their meaning is clear within the context of their usage and there is usually no need to search for them. Of course, if the variable has a more specific meaning, I choose a more specific name.

phforms··on Show HN: Flyon UI – Tailwind Components Library
In case anyone finds this who is also interested: I just stumbled upon an implementation of shadcn/ui components with css modules that looks pretty solid: https://github.com/qwalker8408/shadcn-css/tree/main

Hopefully something like this will be made official - at least there is some discussion going on in the shadcn/ui repo: https://github.com/shadcn-ui/ui/discussions/2832

phforms··on Show HN: Flyon UI – Tailwind Components Library
I love the approach of shadcn and the fact that they use Radix primitives, which have a focus on accessibility. But I wish they would have a pure CSS option without tailwind style classes. It took me some time to translate the classes shadcn uses from tailwind to CSS (which sometimes require more research) and the variables for colors, sizes, etc. into the CSS-to-js system I use (which is stitches - yes, its deprecated, but still the best one I know).

Tailwind is nice for prototyping and simple projects, but often I find that it obscures things too much and when I need more control over the CSS it is too abstract and awkward to use.

phforms··on Ask HN: What's the best documentation site you've come across?
I second that. One of my favourite things to do when I’m bored is to flip through the INFO manuals and see what functionality of Emacs (or some of the often equally-well documented packages) I haven’t explored yet. It is so pleasent to navigate them from within Emacs once you get used to the info mode keybindings.

In general, I like how it is easy to access any kind of information about Emacs (keybindings, commands, variable values, active modes, text/face styles, etc.) from anywhere within Emacs through the C-h shortcuts or via “Help” in the menubar. Contrast that with what is usually offered as “Help” in most other applications and how hard it is to find just some basic piece of information.

phforms··on What you can get out of a high-quality font
Would also love to see v2 finally get released, since I'm a big fan of Berkeley Mono and would like more weights and widths to make my Emacs look nicer.

From their update in february[1] this year it seems like it is basically complete but personal things got in the way and maybe they struggle to set up the systems for custom builds, ecommerce, etc. to ship it. People are constantly asking for the release, so I think it will eventually arrive, but good things often take longer than expected. :)

[1]: https://x.com/usgraphics/status/1762128387483824160

phforms··on Home to Anything JavaFX Related
As an aside for Clojure users, there is a nice “declarative, functional and extensible” wrapper for JavaFX called cljfx[1] that has been around for some years now. When I tried it last time to prototype a desktop app, I found it really pleasent and simple to work with, it felt like a more modern way to build JavaFX GUIs.

[1]: https://github.com/cljfx/cljfx

phforms··on Discrete Mathematics – An Open Introduction, 4th edition
Without any solutions or even problems to begin with and without having a teacher by your side, I found that LLMs can be a good-enough learning assistant. Of course, you cannot rely on their answers and they sometimes lead you astray, but what works for me is to:

- throughout the text, use the LLM to ask questions, generate problems (I haven’t tried this yet, so it might not work very well) and give you hints on how to close the gaps in your understanding

- reduce a given problem to the simplest possible case and ask how to solve that (if you want to check if your solution seems plausible) or if it can give you hints on how to approach the problem (when you are stuck)

- vary the problem description to see if different approaches are suggested

- critically ask questions about the (steps to the) solution or any provided hints (does something seem odd or logically inconsistent?)

- other LLMs sometimes give you better answers (or contradict each other), so, if possible, try asking different LLMs the same questions

Having this “conversation” with the LLM where you need to critically check everything it says has the added benefit of being more actively engaged with the material as opposed to simply looking up the solution. It may be a huge waste of time if you’re not careful, but I think if you use it intelligently to guide your own thinking, it can be very helpful.

phforms··on Discrete Mathematics – An Open Introduction, 4th edition
As an autodidact without an “official” CS degree, discrete Mathematics seemed to me like a key area to open up more advanced topics and solve many practical problems in programming. And indeed it helped me on many such occasions (although I am still studying).

I really like the book “A Primer of Discrete Mathematics”[1] by Finkbeiner II and Lindstrom from 1987. It’s a bit old and unfortunately not free but still holds up pretty well and has many good exercises with selected answers.

I will absolutely check out this book though, looks like a more modern approach with interactive exercises and it even is completely free!

[1]: https://archive.org/details/isbn_0716718154

phforms··on Show HN: Wikipedia Browser a La Andy Matuschak's Evergreen Notes
I was trying out Arc and almost forgot about it, but now knowing about this feature changes everything, thanks for pointing it out! Very often I need to see two or more pages side by side and I just hate making a mess in my browser with multiple windows open. They just tend to get lost and I have to move them out of the way or close them one by one, it is just annoying.

You can even have more than two splits, which I did not expect. Also, holding the option/alt key when clicking on a link opens it in a new split which is super convenient.

phforms··on CSS Grid Areas
I think you can get away without learning grids, but flexbox is a must - given its convenience over the old “float-hacks” and its omnipresence in modern CSS.

Besides the already mentioned css-tricks articles, I recommend checking out the guide to flexbox from mdn[1] (in the side menu there is also one for grids) as well as the reference to “CSS flexible box layout”[2]. These helped me get a deeper understanding about the concepts behind flexbox and how the properties and their shorthands actually work.

[1]: https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layou...

[2]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexibl...

phforms··on Emacs: Contextual Interfaces in Casual Calc
I am also a big fan of hydras, but I use them more for workflow things like window movement, editing org tables or quicker navigation in org headings/trees and it complements my keybinding system in `meow`[1] (similar to Evil or the Kakoune/Helix text editing scheme).

[1]: https://github.com/meow-edit/meow

phforms··on Emacs: Contextual Interfaces in Casual Calc
Whenever I find myself learning about something where I know that I will not use it frequently enough to actually remember its keystrokes/commands/etc. I create a new “personal documentation” for it as an .org file (I have a central folder and a git repo for all of them). Here I’ll write all the information (like keybindings, details of commands, common procedures, concepts, etc.) down that is specific to my own use-cases and organize it in a way that makes sense to me.

It takes some time and effort and may seem redundant when there is good documentation out there already (as with most of Emacs). But still I find myself wasting a lot of time looking for that one piece of information in the docs where I forgot how to even search for it. Maybe it works so well for me because I kind-of enjoy the process of writing it (which many people might not). But I feel much less frustrated afterwards when I come back to some tool or language after years of not using it and find it really easy to remember what was important to me at the time and how to do X.

Tools like Casual Calc are great because they reduce the need to do that manual work of going through the docs and writing down what one want to remember in a (for them) more clear/concise/practical way. However, the way they select and organize knowledge/commands only reflect the common use cases, so there may still be a need to write stuff down.

As a more general helper, I really like to use Emacs Calc with `which-key`, which provides a similar interface to see what keybindings are available under a specific prefix-key. What also helps is if you press `h` and then search for a specific function (`h f`), key (`h k`), etc. or just type `x` to enter a function name directly (or by keyword using text-completion).

phforms··on How to build quickly
I suspect that the “crap applications” issue arises not necessarily due to the method being wrong, but more likely due to people disregarding step 4 in the article: “Finally, once completely done, go back and perfect”.

It may be because of tight deadlines, lazyness (it’s “good enough” so why bother?) or eagerness to jump to the next project (because it is more exciting or profitable than doing the hard work of getting the details right).

I guess there is also a personality type factor that plays into it, because many people seem to just care about the hard requirements and cannot be bothered about things like performance, accessibility, design consistency, simplicity, maintainability, good documentation, etc., at least as long as nobody complains about it.

phforms··on p5.js
Some more context: Ben Fry posted a thread on X in 10/2023[1] where he announced and explained his decision to resign from the Processing Foundation.

Seems like Processing got left out from expenses despite their large budget, running against their original reason to start the foundation: “I was soon shocked to learn that the Foundation spent nearly $800,000 last year. $0 of that went to Processing 4. This year, the proposed Foundation budget is around $1.2 million. But for Processing, there is budget for just two people: one developer, one community lead. You know what that sounds like? The reason we started a Foundation in the first place. Two people is not enough for any of the Processing software projects (i.e. anything that lives at a http://processing.org domain.)”

I wonder if most of the money went into p5 or the new website or whatever, but it made me a bit sad to see that the original Processing got left behind. It is what got me into programming and there are still lots of good reasons to choose it over p5. I can, however, understand if they prioritised p5 due to the rise of web apps and mobile devices, sharability, JS being everywhere and so on. Maybe it’s nostalgia, but it just doesn’t bring me as much joy as the original.

[1]: https://x.com/ben_fry/status/1709400641456501020

← PreviousPage 2 of 5Next →