HNHacker News
TopNewBestAskShowJobs

phforms

643 karma · joined April 29, 2022

submissionscomments
phforms··on Daylight Computer – New 60fps e-paper tablet
If I could afford it, I would buy this just to support the idea and invest in an industry that focusses more on reducing the “virtual noise” and creating computers that are more like natural tools/artefacts that blend in with our environments instead of separating us from them and from each other and distracting us from what we actually value in life. I hope you succeed on your mission!
phforms··on Try Clojure
I know a lot of people think that you write more parentheses in Lispy languages, but actually in most cases you just type them in a different order, e.g. instead of `foo(x, y)` to call a function, you type `(foo x y)` and you even save a comma.

Of course, there are constructs such as `let` and `cond` that are more parenthetically noisy (not so much in Clojure though), but on the flip side you don’t have to remember a lot of special syntax like in non-lisp languages.

Most Lisp-people also use structural editing tools like paredit[1], which make it really easy to write and edit s-expressions. I found that after some time I didn’t really think that much about parentheses anymore.

[1]: https://paredit.org

phforms··on Try Clojure
Reagent is nice and has been around for about a decade now, but I moved away from it towards very thin wrappers around React[1], because I felt like it was adding too much additional complexity on top of React, which is already quite complex on its own. I wanted a clearer view at what is going on and a simpler way to interop with native React components.

Although it seems to catch up with experimental support of React 18 now, Reagent has fallen behind the latest developments in React and may not benefit from all of its performance optimizations. It is still using class components instead of hooks and there have been concerns that the runtime conversion of Hiccup may drag down performance. I guess in most cases it is not really an issue or in any way noticable, so if you’re not doing any fancy stuff it should be fine. I may even come back to Reagent at some point, since I have to admit that I miss the UI-as-data model with Hiccup.

What I highly recommend, however, is using re-frame[2] for state management. It has also been around for a long time (2014, around the same time Reagent came along) and pioneered some popular ideas in that area. It may seem a bit overwhelming at first, but the docs provide a great introduction and I find the model very clear once you wrap your head around it. At the moment it depends on Reagent, but there are ways around that. [3]

[1]: see Helix (https://github.com/lilactown/helix) or UIx (https://github.com/pitch-io/uix)

[2]: https://day8.github.io/re-frame/

[3]: refx (https://github.com/ferdinand-beyer/refx) is an almost drop-in replacement without the Reagent dependency, but hasn’t been updated in a while. Alternatively, re-frame can be integrated with UIx/Helix by adding some interop code https://github.com/pitch-io/uix/blob/master/docs/interop-wit...

phforms··on The evolution of a Scheme programmer (2020)
I also came back to B&W because I’ve noticed that with structural editing I think more in terms of s-expressions than parentheses and distinguishing them isn’t that much of a problem anymore.
phforms··on Štar: an iteration construct for Common Lisp
TIL that there is a whole package for “Common Lisp Emulation”[1] in Emacs that adds functions and control structures from CL “to make Emacs Lisp programming significantly more convenient”. Never developed a package for Emacs myself, but I feel like this can be of great help if I ever wanted to.

I know that there are projects like Lem[2] that try to build some kind of editor (Emacs-like, I guess) on top of CL, which made me wonder if we would have a CL-based Emacs today if it would have been standardized by the time and if this would have been a better choice than creating a custom dialect.

[1]: https://www.gnu.org/software/emacs/manual/html_node/cl/ (C-h R "cl" in Emacs)

[2]: https://lem-project.github.io

phforms··on I rewired my brain to become fluent in math (2014)
This is interesting and reminds me of the idea of “thinking in action” where insights/understanding happens while interacting with the concrete subject matter in exploration, experimentation, etc., which seems to be exactly what the author described she was doing when learning Russian or physics equations.

I don’t think that from “dull” memorization and mindless practice alone (how it was often done in school) understanding at a deeper level somehow magically happens. What I do believe is that both (“smart”) memorization and explorative/playful interaction with the subject matter (turning it upside down, interrogating it, relating it in different ways, etc.) support each other, which, after some time, creates enough structure in ones neural pathways such that deeper insight can emerge from intuition.

When we try to learn math conceptually, we focus a lot on metaphorical or contextual understanding (“what is this like?”, “how does this apply to the real world?”, etc.), which may divert attention away from the actual subject matter, which is the symbols, formulas, equations, axioms, theorems, diagrams and so on. It is all one really needs to understand.

Sometimes I read texts where the author talks about mathematical ideas in a very vague and abstract language, mystifying and obscuring it or entangling it with other subjects. But then it turns out what they write makes no actual sense in the language of mathematics, which itself is very concrete and clear. Maybe they have fallen into the trap of thinking that they knew about the subject when all they have is a broad conceptual perspective without any grounding in the actual rules of the formal system.

phforms··on Beautifying Org Mode in Emacs (2018)
I actually don’t like the text that I am working on to look like a refined press article in a magazine, a beautifully typeset page from a book or a nice looking website. It is not a published text. It should look rough, unfinished, unrefined and functional (to me). When I write on a piece of paper, my handwriting looks ugly, irregular, misaligned and maybe there are some drops of ink splattered around, so I don’t want my editor to make me believe that my writing looks presentable.

For Org Mode, my main concern is that I want to quickly identify the structure of my documents and differentiate all the relevant parts visually. I like to keep font sizes and spacings small to fit as much text (= context) on my screen as possible. I also like using monospace fonts because it feels more like working on a draft (e.g. with a typewriter) to me and I can work more spatially with text (e.g. making little diagrams or figurative text arrangements) which would not be possible with proportional fonts.

When everything looks too good/refined, I get distracted by wanting to shape my text to make it fit in that perfect environment. Then there is no space for swift notes, unfinished drafts, rough edges and this becomes a problem, since I am already a compulsive perfectionist and like to waste a lot of time with irrelevant details. Of course, this is just my personal preference, so I am not saying that this is how it should be. Maybe I am just trying to understand why I like it better this way.

phforms··on Emacs bug: describe-key and lambda too poetic
I actually just checked and it isn’t, but it would not surprise me if it was real, given there are commands such as `M-x butterfly`, `M-x fortune` or `M-x doctor` in Emacs [1].

[1]: https://www.masteringemacs.org/article/fun-games-in-emacs has a list of fun Emacs commands (mostly games) to try

phforms··on The Emacsen family, the design of an Emacs and the importance of Lisp (2023)
Take a look at the GitHub readme[1]: “Lem supports other programming languages thanks to its built-in LSP client. You can choose between an Emacs and a Vim mode.”.

Although I wish they’d explore the Kakoune/Helix style of editing too, which I think will become a major competitor to Vim (and I personally prefer it myself).

However, I am also worried that Lem won’t gain any traction because the Emacs ecosystem is just too vast and has too many killer apps (Magit, OrgMode, Dired, the amazing built-in Help/Documentation - to name a few).

But it may very well become a modern Emacs alternative if they focus on better user experience, leave behind some idiosyncrasies of the past and create great alternatives or ports of Emacs’s most appreciated plugins. There is a great opportunity in starting from scratch, but I guess it is also a huge challenge to compete against decades of development, a huge community and a rich ecosystem.

[1]: https://github.com/lem-project/lem

phforms··on Mastering Programming (2016)
Many of these suggestions made me remember my own experiences, some where I intuitively followed them and some where I did not. Reading this write-up made me realize their value and will hopefully remind me that I need to do these things more often.

As someone who is not an expert but tries to gain wisdom from past experiences, it helps me to see where my intuitions might have been right or wrong, even if I may not get the point right away.

phforms··on Sapling: Experimental vi-inspired editor where you edit code, not text
I also recommend symex[1]. Although it is more “locked-in” to s-expressions than other solutions (which takes some getting used to at first), I find that for me this is exactly what makes movement feel much more intuitive and editing much more precise.

The one thing I don’t like is that symex depends on so many other plugins (especially Evil, which I am trying to swap out with the more lightweight meow), but this will apparently change soon. They are also working towards support for non-Lisp languages via tree-sitter, but I don’t know how well it works.

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

phforms··on Mathematica 14
I recommend to watch some of his regular livestreams on Twitch [1], where I have learned that he is also a quite humble, honest and kind person. Albeit one who likes to hear himself talk (and is aware of that), but I also really enjoy his ramblings on science somehow.

With all the things he has accomplished and his competence across different fields, I don’t mind him being arrogant sometimes. He is working in the area of fundamentals of science, so of course there will be bold claims made - anyone can judge for themself if they hold water.

Science in institutions is often stuck in its entrenched paths and few people dare (or cannot afford) to step outside and try new things, especially across different fields. I believe people like Wolfram, who have earned the knowledge and experience to be able to make a serious attempt on advancing science in new and different ways, are a very valuable resource for humanity, even if they may not succeed.

[1]: https://livestreams.stephenwolfram.com

phforms··on Ask HN: Does anyone here use Haxe?
Not using it myself, but there is an insanely well done fan-made game called “MegaMan X: Corrupted”[1][2] which uses Haxe for a custom-made game engine. It has been years (and is still) in development and they sometimes live-stream development and game testing on Twitch.

- [1] https://jkbgames.com/w/index.php/MegaMan_X:_Corrupted_Wiki

- [2] https://www.youtube.com/user/jkbproductions

phforms··on The most interesting book cover designs are often left on the cutting room floor
I think it is important that the designer gets a feel for the character and “vibe” of the book by actually reading the manuscript and gathering as much context information as they can, ideally in direct exchange with the author(s) to align with their artistic vision. Book cover design can be an art in itself and as a reader, I appreciate it if it is done well and communicates some of the subtleties and nuances of the content in an interesting way. Of course, as you mentioned, it should not be about the ego/self-marketing of the designer, but that does not exclude artistic expression.

I believe it is a disservice to the author and the reader to focus solely on the marketing side of things. After all, the design of the book is part of the product, which, as a whole, sets the frame for the reading experience. Physical books today have to compete with digital content and ebooks, so as a reader I would expect that more effort is being made to make a product that also looks and feels good and not only carries the content to my eyes. That also applies to the layout and typesetting of the inner pages, which is unfortunately often careless and not aligned with the cover design (let alone the choice of paper and binding, which is of course seldom in control of the designer).

phforms··on Ask HN: What are you passionate about at the moment?
Can relate. I get excited about so many things I want to do, but ultimately lack the energy and abilities (executive dysfunction) to do even a tiny fraction of them. And there is this constant self-pressure of “I should do so much more”, which is not helping. Anyway, hope you have a great time and success with your indie game studio!
phforms··on Lindenmayer Systems
Thanks for sharing, I never heard about this before! The Wikipedia article on shape grammar has a link to an old website[1] from a workshop at MIT that links to many more interesting resources, including the “Shape” book by George Stiny you mentioned as a free download (not sure if the author agreed to this, so I’ll just use it as a reading sample and buy the book if I like it), course material, presentations, etc.

I also found a more recent book[2] by George Stiny called “Shapes of Imagination: Calculating in Coleridge's Magical Realm” that is also about shape grammars and is actually open access. Coming from a design background, I am sure to take a closer look at some of this stuff.

- [1] https://web.archive.org/web/20190405160829/http://shapegramm...

- [2] https://direct.mit.edu/books/oa-monograph/5489/Shapes-of-Ima...

phforms··on Why Git Is Hard
I actually understood Git much better as soon as I switched from a graphical interface (which was Git Tower at the time) to just using the Git CLI. I feel like the graphical interface/overhead obscured what was really going on and made me not so much learn Git, but the tool on top of it.

Git Tower is actually a great tool, but I believe Gits core concepts cannot be understood well without lots of experiments with the bare Git CLI (what helped me most was making toy repos → testing my hypotheses on how things work → observing/inspecting results).

phforms··on What every software developer must know about Unicode in 2023
Regarding UTF-8 encoding:

“And a couple of important consequences:

- You CAN’T determine the length of the string by counting bytes.

- You CAN’T randomly jump into the middle of the string and start reading.

- You CAN’T get a substring by cutting at arbitrary byte offsets. You might cut off part of the character.”

One of the things I had to get used to when learning the programming language Janet is that strings are just plain byte sequences, unaware of any encoding. So when I call `length` on a string of one character that is represented by 2 bytes in UTF-8 (e.g. `ä`), the function returns 2 instead of 1. Similar issues occur when trying to take a substring, as mentioned by the author.

As much as I love the approach Janet took here (it feels clean and simple and works well with their built-in PEGs), it is a bit annoying to work with outside of the ASCII range. Fortunately, there are libraries that can deal with this issue (e.g. https://github.com/andrewchambers/janet-utf8), but I wish they would support conversion to/from UTF-8 out of the box, since I generally like Janet very much.

One interesting thing I learned from the article is that the first byte can always be determined from its prefix. I always wondered how you would recognize/separate a unicode character in a Janet string since it may have 1-4 bytes length, but I guess this is the answer.

phforms··on Flexbox Froggy
I actually frequently use the Tailwind docs (https://tailwindcss.com/docs/) to lookup CSS property names and what they do, especially with flexbox and grid, since I mostly learned them through Tailwind. It’s just a nicely organized quick reference with lots of examples.

Not using Tailwind as much these days (more inclined to CSS-in-JS solutions like Stitches, which unfortunately has been abandoned by the developers), but for prototyping it’s still amazing.

phforms··on macOS Sonoma is available today
I’ve been using Rectangle Pro for more than a year now and it works pretty great. However, I found that I don’t actually use snapping that much (maybe I’m just not used to it). My most used features is actually the move and resize modifier keys, which let me drag/resize a window without having to go through the pain (more or less, depending on the window clutter) of having to move my mouse to that small area where I can do that. Seriously, it’s been such a game changer for me that I wish Apple would make this a built-in feature.
phforms··on When I stopped trying to self-optimize, I got better
I think what the author describes has a lot to do with relaxation and letting intuition take over (which is how I believe this “flow” state is achieved), instead of thinking too hard or making too much conscious choices and putting the mind under pressure with expectations of success.

It is natural that this “strategy” would lead to more success in the end, which applies to any kind of challenging activity. I like the description as “subtracting”, since you kind-of have to empty your mind before doing the thing. But I believe this does not apply to practicing, where you do have to make conscious efforts and “add to” yourself a lot of stuff in order to internalize it and hopefully build up the intuition required for this flow state to work.

As some here pointed out, doesn’t have to do anything with self-optimization. Although self-optimization may lead someone to believe that a lot of conscious effort is the key to success, when it can actually set them up for failure.

phforms··on It's okay to make something nobody wants
I think I get what the author trying to say. In my years as a graphic designer (mostly print), I intuitively knew when something “felt right”, and when that happened, I often have made something that I am still proud of today. It may have not been for everyone and it may have been hard to sell to clients (who often prefer what they have already seen in successful examples), but I didn’t care, because I saw the value in it and often a few other people also did.

Those were the projects that I redesigned multiple times, because the previous approach just didn’t “feel right”. I invested a lot of research into that feeling, it was somehow addictive (and sometimes equally frustrating) to me.

As a developer, I now have a similar experience with personal projects that grew out of my own curiosity. When doing something for clients, I often feel myself torn between what feels “right” to me and what the client actually wants or prefers. It may often not be what they really need, and I know that, but this is why I must have my personal projects, because client work often feels unfulfilling to me (however, it is fulfilling in a different way).

phforms··on Nonograms - Japanese Crosswords
As a teenager, I loved solving Nonograms in puzzle magazines on train rides or when I was bored, they are the perfect time killer. Somehow I forgot about them but recently rediscovered them through a Twitter post, which was a real pleasure.

The linked website seems to be very nice, especially since there is a community aspect to it, where people can send in their own puzzles (it seems like).

My recent goto app for Nonograms is https://nonograms-katana.com , which works great on browsers and mobile alike with lots of well thought-out features (e.g. it asks you if you want cells automatically crossed out if a line is complete) and beautiful artwork, good interaction, etc.

phforms··on The Power of Prolog
For anyone interested in “The Art of Prolog”, which seems to be quite expensive as a print book, there is an Open Access version available as a PDF at MIT Press: https://mitpress.mit.edu/9780262691635/the-art-of-prolog/

I might be buying the book if I really like it to support the authors, but it’s great that they made it available for everyone.

phforms··on God writes Haskell
In Clojure, where lazy evaluation is also the default (although only for sequences), someone recently wrote an in-depth article about the issues caused by this choice: https://clojure-goes-fast.com/blog/clojures-deadly-sin/

I haven’t read the whole article yet, but maybe it could be interesting to compare it with Haskell and see if some of the same problems occur or if Haskells compiler or overall design around (pervasive) lazyness makes it easier to work with and more performant.

phforms··on Just Build It...
What helped me the most in programming and design was to shift my thinking away from trying to create a complete (or “perfect”) product right from the start and towards creating a minimal product with the most essential feature set first and iterating from there. I guess this is what the author wanted to point out.

It helps me to avoid getting overwhelmed with complexity and, as a nice side-effect, to avoid premature abstraction and optimization. Most of all, it helps me (as mentioned in the article) to actually build something. It is also quite satisfying and motivating to quickly get to a state where your product already works and to build on top of that, making something better that already works.

I used to work like that when I began programming, because I just wanted to solve a problem for myself and put it out there as quickly as possible. I had to re-learn this way of thinking as my ambitions grew and as I wanted to make things “perfect” and be “professional”.

Of course, in this approach lies the danger of accumulating features and complexity, so it is important to keep the focus on the problem or the “essence” of what the product is supposed to be.

phforms··on Tell HN: UC Berkeley's CS61A/B/C are the best courses to learn CS and coding
You probably know this already, but if anyone wants to learn “old-school” SICP with Scheme via video lectures, I recommend MIT 6.001 (taught by Abelson and Sussman themselves): https://ocw.mit.edu/courses/6-001-structure-and-interpretati...

The book is amazing, but it is also very extensive/overwhelming and I found that the lectures provide a better guiding structure for myself and the lecturers are also quite entertaining at times. The website also provides additional material related to the course such as exams, projects and lecture notes.

phforms··on Programming Language choices: Pascal, LOGO, Forth, Prolog, C (1986) [video]
Although NetLogo can be considered a Logo, there are some important differences, such as:

- focus on agent-based modelling (feels more like a DSL to me)

- lexical scoping of local variables and inputs instead of dynamic scoping

- no “word” data type (similar to symbols in Lisp) - instead, NetLogo uses strings in most cases where words would be used in Logo

- control structures (if, while, etc.) are special forms instead of ordinary functions

- NetLogo is a Lisp 1, while Logo has been a Lisp 2 (separate namespaces for values and functions)

See http://ccl.northwestern.edu/netlogo/docs/programming.html#co... for a more detailed comparison.

Despite its educational focus and reputation as a language for children, UCBLogo (a dialect of Logo from 1992 intended for being a “minimum Logo standard”) seems to be quite advanced and also has some “adult” features (partially derived from its Lisp heritage), such as higher-order functions, eval & apply, recursion, anonymous functions (or rather something similar called “templates”) and macros.

However, NetLogo feels more like a modern version of Logo without some of the weird/unfamiliar stuff (like dynamic scoping and words). It is heavily used and taught at https://www.complexityexplorer.org , so if anyone is curious enough I recommend taking a look at their free courses/tutorials such as “Fundamentals of NetLogo” or “Introduction to Agent-Based Modeling” - they are probably the best resources out there to learn NetLogo.

phforms··on Emacs 29.1
I use Doom Emacs with the Yamamoto port of Emacs [1] on MacOS (M1) and the startup time is quite slow: it takes around 6-7 sec. for the editor window to show up. It doesn’t bother me too much since I usually start it once a day and just never close it, as you mentioned.

However, I also have many plugins installed, so it might be just that. I wonder if it is possible to install a separate instance of Emacs, then I would be able to test the performance without all the plugins and configuration.

[1]: https://github.com/railwaycat/homebrew-emacsmacport

phforms··on How the Cheesecake Factory defied the restaurant industry’s rules of success
This may still hold up 10 years later: as a European myself (Germany), I actually just learned from this post that the cheesecake factory is a real thing.
← PreviousPage 3 of 5Next →