Better HN
topnewbestaskshowjobs
Log inSign up

phforms

644 karma · joined Apr 29, 2022 (4y ago) · 152 submissions

Submissions

comment 2y ago · link · parent

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).

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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!

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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...

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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).

comment 3y ago · link · parent

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!

comment 3y ago · link · parent

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...

comment 3y ago · link · parent

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).

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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).

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

123456