Recent submissions

Comment · 3 months ago
I haven't figured out how to flag a comment as offense - but the term "zog soldier" is anti-semitic and does not belong on HN.
Comment · 4 months ago
"Defenestrate" was not in my list, but it's a word I would have gotten, as I know it from: (1) An A.C. Clarke short story ("The Defenestration of Ermintrude Inch", in "Tales from the White Hart", if I remember correctly); and (2) The Defenstration of Prague (I have visited Prague Castle - there were apparently multiple defenestrations there). It's an interestingly (amusingly?) macabre word. (It also helps that I know high-school French and German plus understand Swedish as being very close to Norwegian.)
Comment · 4 months ago
"Frugal" most definitely does not mean "rather over the top" unless that is some new slang meaning I've never heard of.
Comment · 6 months ago
Not always, but in this case the superior product (i.e. VHS) won. At initial release, Beta could only record an hour of content, while VHS could record 2 hours. Huge difference in functionality. The quality difference was there, but pretty modest.
Comment · 8 months ago
Kawa predates Clojure by a decade. (Kawa work started 1996; Clojure's initial release was 2007.) Also, Clojure isn't really focused on high performance, while that has always been a priority for Kawa, which generates bytecode similar to Java, especially if you include suitable type annotations. (It is likely Clojure have have improved in this respect - they have a lot more people working on it.)
Comment · 8 months ago
What a blast from the past! I too remember with pleasure the days working with Anthony Green (and others) at Cygnus. I like to boast that (apart from Java) Kawa Scheme is the oldest compiler-based language implementation still available for the JVM.
Comment · 1 year ago
"COBOL uses a fixed width character format for all data (yes even for COMP). If you want a four digit number, then you have to use 4 character positions."

That is incorrect. USAGE COMP will use binary, with the number number of bytes depending on the number of digits in the PIC. COMP-1 specifically takes 4 bytes. COMP-3 uses packed decimal (4 bits per digits).

Comment · 1 year ago
For me Tauri/Wry starts up pretty instantaneous. This is using Wry as the renderer for the DomTerm terminal emulator (https://domterm.org), invoked with 'domterm -Bwry'. This is on Fedora Linux 41 x64. Admittedly using a rather old version of Wry (0.43.1) with webkitgtk 2.46.5 - I haven't had time to update.
Comment · 2 years ago
The libwebsockets server (https://libwebsockets.org) supports serving directly from zip archives. Furthermore, if a URL is mapped to a compressed archive member, and assuming the browser can accept gzip-compressed files (as most can), then the compressed data is copied from archive over http to the browser, without de-compressing or conversion by the server. The server does a little bit of header fiddling but otherwise sends the raw bytes to the browser, which automatically decompresses it.
Comment · 2 years ago
Completion for program P should be written and maintained by the "owner" of program P - and installed with program P. This is of course difficult when there are many different "shells" that each have their own "language" for specifying completions. A multi-shell completion library can help with this problem.

To me it make sense that completion for program P should be handled by program P itself. That way, completions are unlikely to get out of sync with the application, and the completion handler can use the same option parser as the application. A way to do this is to use a special "hidden" switch to request completion.

Specifically the DomTerm terminal emulator (https://domterm.org) handles its own completions. Bash allows you to register a command that handles completions for some other command. The following tells bash that to handle completions for the domterm command it should call domterm with the magic "#complete-for-bash" option followed by the existing line and position.

    complete -o nospace -C 'domterm "#complete-for-bash" "$COMP_LINE" "$COMP_POINT"' domterm
When domterm is run with "#complete-for-bash" as the first argument (chosen to avoids accidental use) it processes the remaining arguments, and prints out the completion suggestions to bash.

I don't know how to do something similar for other shells; suggestions welcome. Some other shells (such as Fish) include help text as part of the suggested completions. Handling that would require a more complex protocol. Perhaps one that returs a result in JSON format?

If a such a protocol were standardized (perhaps invoked by a "#completions-as-json" option?), we just need to solve a final piece of the puzzle: How does a shell know if a command understands the "#completions-as-json" option? My suggestion is that we define a new keyword-value pair in the "desktop" file specification; the shell would search for a P.desktop file,

Comment · 2 years ago
On Gnome, the Super (Windows) key does an Expose (show windows reduced-size and non-overlapping) and lets you launch applications (and more). On KDE 5, the Super key brings up the Application Launcher, which is nice. And Super+W (which isn't too painful to type) does an Expose. But it would be nice if there was an option for Super to do an Expose and bring up Application Launcher.
Comment · 2 years ago
And people may judge you if you don't react in the way people think "normal people" react. People have been convicted of murder because police or juries though they didn't react the way they were "supposed to".
Comment · 2 years ago
Comment · 2 years ago
I am working on a re-write (https://github.com/xtermjs/xterm.js/issues/4800) of the xterm.js "BufferLine" data structures that (among other benefits) could potentially support variable-width fonts in the terminal. Instead of a 2-dimensional grid of character cells, the primary data structure will be a list of logical lines, each consisting of characters and attributes.

A rather modest enhancement to the vt100/xterm escape sequences would be a mode where screen addressing would be in terms of logical characters and logical lines. The application should not need to know the width of characters or how lines are broken into screen rows. This makes use of variable-width fonts practical - which is necessary for decent rendering of many scripts.

DomTerm's display engine (https://domterm.org) does support lines containing a mix of monospace and variable width characters, and know how to wrap such lines. I'm working on long-term replacing DomTerm's native display engine with xterm.js (for speed and other reasons) which requires making xterm.js more versatile.

Comment · 2 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton