HNHacker News
TopNewBestAskShowJobs

tkcranny

237 karma · joined August 28, 2023

submissionscomments
tkcranny··on Introducing tmux-rs
I agree the underlying technology doesn’t ultimately matter, but as user of a lot of fairly modern rust-based cli tools there definitely is something in the air worth mentioning.

I suspect it’s a couple of things. A new generation of programmers are hitting the scene, wanting to do things in new ways. Not inherently good or bad, but the new tools sure usually are at least very _pretty_, and have a lot of affordances and usability improvements over the ancient tools that can never be changed for the sake of compatibility. Rust and Go make this nicer, and are the languages de jour with good cli ecosystems and performance characteristics around them.

I genuinely do like most of my replacements. ripgrep for grep, eza for ls, zoxide for cd, fd for find, podman for docker, and a few more. Developer tooling is a rich and interesting space to be in, but there’s plenty of bandwagons I’m not getting on, like this or zellij for tmux, or jj for git.

tkcranny··on Boeing uses potatoes to test wi-fi (2012)
Should be nice when airlines upgrade to that in the 2040s or so.
tkcranny··on Pipelining might be my favorite programming language feature
I wouldn’t hold your breath for TypeScript introducing any new supra-JS features. In the old days they did a little bit, but now those features (namely enums) are considered harmful.

More specifically, with the (also ironically gummed up in tc39) type syntax [1], and importantly node introducing the --strip-types option [2], TS is only ever going to look more and more like standards compliant JS.

[1] https://tc39.es/proposal-type-annotations/

[2] https://nodejs.org/en/blog/release/v22.6.0

tkcranny··on Find the Odd Disk
18/20 on an iPhone – they’ve have Display P3 wide colour for many years.
tkcranny··on Apache ECharts
Thought that felt very “Svelte-like”. And of course, turns out it was by Rich Harris himself back when he was at the NYT.

Beautiful charts, shame it looks defunct now.

tkcranny··on Gene-edited cane toad that never grows up created to eat its siblings
The Economist wrote about this recently too [1]. The most fascinating part is how they’re evolving to spread faster and faster:

Attempts to control the toads have been going on for decades, yet their advance has accelerated. In the tropics, they now travel up to 70km westward every wet season, compared with 10km when they first arrived. They are thus poised to enter some of Western Australia’s most treasured ecological areas.

Toad biologists call this acceleration the Olympic Village effect. It is a superb example of evolution in action. Only the most athletic toads make it to the invasion front, where they breed. Over the generations, toads on the front have thus developed larger size, longer legs and even an urge to travel in a single direction.

[1] https://economist.com/science-and-technology/2025/01/22/gene...

tkcranny··on A Man Out to Prove How Dumb AI Still Is
As much I think AI is overhyped too, that is a prime use case that would be better solved by passing the text to a tool, rather than jam a complex transformations like that into its latent space.
tkcranny··on You Need Subtyping
Java has made some big strides here to catch up with the functional and data-oriented features other languages are all adding.

I was pretty surprised and impressed to see a modern example lately. There’s Record data types, stronger type inference with `var`, pretty great structural pattern matching, switch expressions (that return a value), stream apis for map, filter, and reduce etc. All of these move it further away from strictly OOP.

And separate but still cool is a pretty neat virtual thread system too. Java has definitely had a bit of a glow up since I learned it in uni.

tkcranny··on Philosophy of Coroutines (2023)
I’ve been fascinated by coroutine code for ages – this was a great read.

For one of the best work projects I’ve done, I used Redux-Saga. It was so elegant for a heavily live-updating ui app. Using coroutines for making API requests, watching sockets, sending and receiving updates, and reacting to data conflicts felt so natural and all just came together so beautifully.

The term he uses for “turning functions inside out” is spot on for how they feel. In particular, the way a good coroutine only focuses on the pure state, while being independent of side effects and even time itself really expanded my view of code. It made testing and reasoning about logic so much easier too. It’s a model I really wish was more widespread in languages and the industry.

tkcranny··on How to Use Em Dashes (–), En Dashes (–), and Hyphens (-)
Presently re-reading this book, The Elements of Typographic Style. It’s one of the few books I’ve gone out of my way to get a physical copy of – it’s just beautiful.

And I totally agree, space-set en dashes are vastly superior to em. I dislike the way it connects the word more closely to the word in the next clause than the phrase itself.

E.g. He left—no explanation. Vs. He left – no explanation.

To me, left—no feels like a weird gluing together than a separator for a different section.

tkcranny··on The Frontend Treadmill
Reminds me of: https://xkcd.com/1367/

Webpages being rendered framebuffers would be terrible for consistency and accessibility. All the logic for layout computation, responsive design, font rendering, and literally thousands of other things browser have developed over the decades would go out the window.

But on the topic of multi-architecture, that’s really what web assembly is. I’d be surprised if it didn’t continue too become more important, it looks like it’s escaping the browser and into backend apps and server code too.

tkcranny··on CSS Custom Functions are coming
I agree Google has too much market share and sway over plenty of browser features.

However… CSS features are a W3C specification and are an early stage [1]. It’s a process that vendors draft and agree on and can terminate.

On top of that I wouldn’t characterise improving css with functions isn’t a _churnful trendchasing_. If anything this will improve accessibility because it’ll be easier to manage size, colour, and motion preferences with better abstractions than media queries everywhere.

[1] https://drafts.csswg.org/css-mixins/

tkcranny··on I ate and reviewed every snack in our office kitchen
There are dozens of us, dozens!
tkcranny··on Math4devs.com: List of mathematical symbols with their JavaScript equivalent
I happily use Fira Code [1] with ligatures. It has nothing to do with pushing coding style away from monospace, and everything to do with readability. Aesthetics are certainly a part of it but perfectly compatible with it too.

Of particular note is that the JS arrow function becomes a real arrow ⇒, which is nicer than the operator-ish rendering of equals and a greater than sign. Other quality of life improvements are reshaping ripples of characters to be clearer, such as a reshape to www and **. Triple bar equals is nice too given the differences in JS.

[1] https://github.com/tonsky/FiraCode

tkcranny··on Wikipedia Now with Dark Mode
The ways to enable it are contrived for logged in and logged out users both. I hope there’s a path to it just using users’ OS mode and `prefers-color-scheme` in CSS before long.
tkcranny··on Use a work journal
Wonderfully written piece. I love how it builds up that idea of finally making progress, “seeing the matrix”, and then:

> It’s Mitch, your PM. He’s asking the url for a doc he wrote

Boy that’s too real. Really reminds me of the comic from a decade ago about programmer focus [1].

But welcome to the world of Note taking, I agree it’s like a superpower once you develop the habit. Obsidian is fantastic, but even daily markdown notes are great. The whole “second brain” idea hasn’t panned out for me, but a hotkey to jump to today’s note, and another insert the current time has been a mainstay of my workflow for years now.

[1] https://imgur.com/never-interrupt-programmer-3uyRWGJ

tkcranny··on Sharing details on a recent incident impacting one of our customers
> ‘Google teams worked 24x7 over several days’

I don’t know if they get what the seven means there.

tkcranny··on Pacific squid flashes its attack 'headlights'
It’s Sydney mate.
tkcranny··on Syntax highlighting is a waste of an information channel (2020)
It’s an interesting idea to use colours for more information in a text editor.

A lot of the suggestions here are things VS Code has been incrementally adding as visual guides over time though. For example the way VS Code highlights other instances of the same symbol (variable/function name) under the cursor goes a long way to address the specific Import, Argument, Type, and Exception cases listed in the article.

Combined with heat maps for test coverage and git commit recency in the gutter, I am skeptical that switching out syntax highlighting on demand (I.e keyboard shortcuts I’m assuming) would be ergonomic and viable.

That said, I love that there’s thinking in this space on how to improve the visual comprehension of code. There still are plenty of crutches I use, such as expanding the selection along the syntax tree (⌃⇧⌘→ on Mac) just to trace all the parenthesis and braces in JS/TS – I don’t find the rainbow braces very useful at all.

tkcranny··on What happens to Google Maps when tectonic plates move? (2020)
From the article:

> WGS 84 is a global standard tied to no one plate. In essence, it is fixed to Earth’s deep interior.

Those drift vectors are based on GPS, which the article also says relies on WGS 84z

tkcranny··on Show HN: Frontend Fuzzy Search
Looks like a neat library.

I’m curious if there’s a tl;dr on how this is better or different to Fuse, which is a very popular established client side fuzzy searching library.

https://github.com/krisk/fuse

tkcranny··on CSS WG resolved to officially work on native custom functions and mixins
They have examples there; it’s just pure CSS, and “declarative” still.

Granted the `@function` and `var(--variable)` syntax is as clunky as ever, but it’s still distinctly not JS in any way.

tkcranny··on Noisy brain may underlie some of autism's sensory features
Not uncommon at all, it sounds like you’re describing the literal “Fever Dream” phenomena, where you have strange and intense dreams and thoughts while asleep and drifting off.
tkcranny··on Z – Jump around
Speaking with no actual knowledge on Z’s naming, there is a long history and important relationship in CPU design between the “Zero flag” (Z), and “jump” instructions.

The zero flag stores a status from the last instruction the cpu ran, which the jump cpu instructions then reference to affect what happens to code execution. This logic is the most basic form of conditionals, and underpins the implementations of higher level flow control like if statements and loops.

I’d guess that this relationship between Z and jumping is where it comes from. As for Baulders Gate I have no idea, but lean to that being a coincidence.

← PreviousPage 2 of 2