HN user

hibbelig

1,247 karma
Posts0
Comments672
View on HN
No posts found.

How's that going with the numbers? Microsoft had this page where they explained that monetary amounts are formatted one way whereas other numbers are formatted another way. I found that most fascinating, but I don't know whether it matches reality. Also, how does software cope?

(Back in the eighties,) I had a teacher who taught both French and geography (I think), and he used the apostrophe as the thousands separator. With a twist. For example, he would write three million as 3'000'000, and then he would abbreviate that to 3''. Very fascinating. I wonder if that was somehow inspired by Swiss conventions.

I believe GNU Emacs was created in 1984 or 1985, and it's still going strong. I guess it's not easy to work on it due to the long history, but I understand it's been refactored as the developers went along.

Recursion. Very interesting. My daughter didn’t know much about programming, then started CS. The first semester language was Ocaml and they of course used recursion quite heavily and she’d didn’t know it was supposed to be complicated. The second semester had assembly, C and Java and suddenly it was a problem. I had to remind her that she’s had already done it in the first semester.

Hammerspoon 4 months ago

I used to be a fan of tiling window managers, but I found out that I tend to use fairly visually heavy apps on a Mac. By this I mean apps that need quite a bit of screen real estate to show everything that needs to be shown:

The mail program has a folder tree on the left, the list of messages in the center, and the current message on the right. The IDE has all these tool windows that need showing, in addition to the actual editor. Websites also like it if the window size is a bit more.

Back when I was using Emacs and xterm, mainly, it was nice to show Emacs in the left half and then two xterms on the right.

So instead of tiling, I've come to realize that I only need a couple of window positions and sizes: Mail program and IDE are full screen. The browser occupies 70% width and height, in the top right corner, and the terminal is in the bottom left corner, 200 columns by 44 rows or so. (Lazygit works better if the terminal is a bit larger.) The chat program is full height, 60% width, left edge.

In this way, while the IDE is building or running tests, I can summon the web browser and still see at the bottom and on the left what is the progress of build or test. Also, when I use the software through the browser, I can see a couple of lines of log messages, which is enough to tell me whether to switch.

So I'm now happy with hotkeys in Hammerspoon that reposition and resize the current window to one of these presets, and to jump to a specific app with a keypress. I use a modal for this.

I dig the idea of having multi-level modals, somehow this idea never occurred to me.

Vim 9.2 5 months ago

I switched from screen to tmux due to rumor about the screen code base. Maybe not a good reason. But I don’t regret it, tmux works well.

Just an honest opinion of someone who didn’t have skin in the game. Not sure if it helps.

I used to use tiling window managers on Linux, but I found out that my Mac usage contains lots of “graphical” apps that don't like to live in a quarter of the screen or something like that.

So I've embraced overlapping windows. I strategically place them so that the import parts are visible. For example, my IDE is full screen, but the browser is only 70% with and height or so (so that the left 30% and the bottom 30% of the IDE are visible, which conveniently lets me peek into the log of the currently running program.

I have a Hammerspoon configuration that conjures up a modal window on a keypress, and then additional keypresses move the current window to a predefined position and size, e.g. m to maximize and p for the top right corner (70% width and 70% height).

I also have some keybindings in that modal window to jump to an app, e.g. w for the browser, i for the IDE, t for the email client, space for the terminal.

I very very rarely manually move a window around, one of the preset positions/sizes usually works for me.

Here is one thing: I work on a feature branch off of main. It takes me a bit and I want to rebase my branch onto the newest changes.

It seems with the git command line the way to do it is to switch to main then pull then switch back to my feature branch then rebase.

With lazygit i hit f on the main branch which pulls its changes then i can rebase (r) right away.

I also like to review the diff of each file before staging it. I get a nice list of changed files, i can select one and see the diff in it, then I can stage it.

Data point: I develop in Java and I use IntelliJ. I run everything in debug mode. So it’s really easy for me to enter the debugger.

But I find that if I have to step around more than a handful of times to find the issue then I forget what happened five steps ago. So I teach for print debugging quite often.

It’s very interesting. I’ve tried to observe myself. It seems that if I can see a breakpoint somewhere and then examine state and then see what the problem is, a debugger is great.

If, however, it’s something where I need to examine state at multiple times in the execution, I lose track in my mind of the state I’ve seen before. This is where print debugging shines: I can see how state evolved over time and spot trends.

It’s autocomplete being based on words. It knows computer and it knows keyboard and so in English it is trivial to type computer keyboard.

In German it also knows Computer and Tastatur, but I can’t use autocomplete to type Computertastatur.

Actually I just learned I can. Apparently this word is in the dictionary. But there are just so many compound nouns, it’s impossible for them all to be in the dictionary.

To make it work in such a language it has to understand about constructing compound nouns.

I wanted to like dark mode (before it was called that, back in the nineties), and I try again from time to time, but I've never been successful.

I'm also not happy with Solarized because it's so low contrast.

Some programs have Github themes that seem to be okay.

I tried Catppuccin but I'm not sure if I like it or not. It's better than Solarized but still pretty low contrast.

Is there a color scheme I might like that's supported across multiple applications? IntelliJ, iTerm2, lazygit, neovim come to mind.

Thank you. I wonder: is FTP that old? I kind of thought UUCP predated FTP. My parent mentioned email possibly being a special mode of FTP.

_some poking around in Wikipedia_

Indeed, FTP is from 1971 and UUCP is from 1979. And the SMTP page describes that it all started as a mode in FTP.

You may not be aware that it's a false friend. The German word Billion exists, and it means trillion.

So the German reader will read the English article (in English, not auto-translated), see the word billion, think “oh that looks familiar” and might assume it means the same as the German word Billion.

Machine translation makes quite a few mistakes, so I think if you have some decent knowledge of a language, you might be better off reading the original rather than a machine translation. At least my point of view from a couple of years ago. But it's also possible that machine translation has gotten WAY better in the last couple of years, I'm not sure.

Bun 1.1 2 years ago

Java is compiled, too. The Java runtime is the JVM which runs byte code.

The relationship between thoughts and proofs is analogous to the relationship between noise and music.

It’s a subset kind of relationship.

There is also the social aspect: people have to agree on it. Noise becomes music, and thoughts become proofs, only if several people agree.

I think you need to go down the conditionals in order anyway, if cond* it’s like cond in that it evaluates the conditions top to bottom. So keeping track of “all the bindings so far” makes intuitive sense to me.

I also see a parallel to if/else if/else cascades. You can “break” and else if leg into … else { zzz; if (…) … } and then you can declare new variables at the zzz spot that are then available for the rest of the cascade.

I don’t know much about pcase and cond* so I can’t speak to the more general point. I just wanted to mention one specific aspect.

I miss emacs but as a Java developer what can you do…