Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gnuvince
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
gnuvince
4y ago
It's not enormous, but it's good for the simplicity and would probably be sufficient for quite a number of use cases. And I'd guess that it's also probably more than what many programmers get by Lego stacking 14 differen
32.
▲
by
gnuvince
4y ago
That's one side of the expression problem; the other is adding a new operation. With dynamic dispatch, you can add new shapes without altering the others, but if you want to add a new operation (e.g., perimeter()) then you have to modi
33.
▲
by
gnuvince
4y ago
The table version also has something really interesting going for it: it just begs to be thrown out and replaced should new requirements come in that don't fit with that design. If a new type of shape comes in that doesn't fit wit
34.
▲
by
gnuvince
4y ago
Another quote from Knuth, from that same paper: > The improvement in speed from Example 2 to Example 2a is only about 12%, and many people would pronounce that insignificant. The conventional wisdom shared by many of today's softwar
35.
▲
by
gnuvince
4y ago
> To me, the most understandable function (lowest context needed, lowest cognitive overhead) is a black box that takes type x as input and produces type y as output, without side-effects True, however we must be careful not to go complet
36.
▲
by
gnuvince
4y ago
The Rust dev builds are very often (1) slower to build than the equivalent Go program, (2) slower to run than the equivalent Go program. Rust programs really need the `--release` flag to shine—and in some cases, the dev builds of a program
37.
▲
by
gnuvince
4y ago
Fixed timestamp: https://youtu.be/LjFM8vw3pbU?t=1613
38.
▲
by
gnuvince
4y ago
There's a story by Bryan Cantrill [1] about how he went to Twitter to help them understand why it would take 400 milliseconds of compute to process a request (I'll leave the reveal to Bryan). Scaling horizontally is probably neces
39.
▲
by
gnuvince
4y ago
I like D's approach of using `d[$]` to get the last element, `d[$-1]` to get the element before last, etc.
40.
▲
by
gnuvince
4y ago
> To be clear, I'm not anti-ORM and use them all the time, but it really helps to understand SQL well when using them and to know when it's appropriate to switch to SQL. When I did web development, I saw it as a "hack"
41.
▲
by
gnuvince
4y ago
> Unless there is clear evidences upfront that the project will be a piece of software where local performance is highly critical, it makes sense to favor code readability and maintainability over optimality. Sure, but let's also no
42.
▲
by
gnuvince
4y ago
I'm not an expert on this topic, so I'd like to know as well. My own personal theory is that most people, whatever their intelligence level, feel that they are smarter than the average person and their intelligence is part of thei
43.
▲
by
gnuvince
4y ago
For junior developers reading this: frameworks are great, but they will become an increasing source of technical debt, performance loss, and frustration. They will allow you to ship your first version faster, but every release after tha
44.
▲
by
gnuvince
4y ago
It hasn't. It's possible for programmers to get massive speedups by re-architecting their code to make better use of the CPU caches or avoid branch mispredictions and that happens because the compiler was not sufficiently smart to
45.
▲
by
gnuvince
4y ago
That line of reasoning reminds me of the fabled sufficiently smart compiler: one day, the sufficiently smart compiler will understand what we mean in our programs and generate code that is faster than what an expert could write in C or even
46.
▲
by
gnuvince
4y ago
Unfortunately, the terms "data-oriented design " and "data-oriented programming " refer to two different styles of programming. Data-oriented design is the approach to programming made popular by Mike Acton's CppC
47.
▲
by
gnuvince
4y ago
That's a program name that I haven't heard in a while and which brings back memories :D When I was a teenager, sometimes around 1996 or 1997, I watched the movie "Hackers" for the first time and my immature mind was imme
48.
▲
by
gnuvince
4y ago
A few months ago, I wrote a blog post[1] about the word "just" that echoes the thesis of Tim's article: avoid using the word "just" if you can, it's reductive. [1] https://vfoley.xyz/just/
49.
▲
by
gnuvince
4y ago
Oh, that guy and his stupid habit of putting an asterisk in the font name—impossible to use in Emacs.
50.
▲
by
gnuvince
4y ago
In Helix, you can use `maf` to mark the outer function and then press `d` to delete it.
51.
▲
by
gnuvince
4y ago
I'm a long-time user of Emacs, and although I don't see myself switching to Helix, one thing that I really liked when I looked at Helix was how good the out-of-the-box experience was. As I get older, I am annoyed at the amount of
52.
▲
by
gnuvince
4y ago
> We want to abdicate responsibility of this kind of memory management to the interpreter, just like we want to abdicate responsibility for handling processor cache levels. If you can articulate how all the data you use is laid out in me
53.
▲
by
gnuvince
4y ago
It has macros.
54.
▲
by
gnuvince
4y ago
Odin and Zig are the two up-and-coming languages that I keep my eye on. I like how they are trying to find a sweet spot where they offer more than plain old C, but without becoming overbearing like Ada, C++, or Rust.
55.
▲
by
gnuvince
4y ago
Odin is currently at the top of my Rust exit-ramp strategy (for personal work). As I grow older, I find myself wanting to use languages that are more conservative in their designs. Back in my 20s, I was all about expressivity and meta-progr
56.
▲
by
gnuvince
4y ago
From the webpage: > An enourmous amount of time spent profiling, benchmarking and optimizing things. The answer is different for every part of Bun, but one general theme: Zig's low-level control over memory and lack of hidden contro
57.
▲
by
gnuvince
4y ago
Haven't read it, but my reaction to the 2 minute video is "excrement" [1]. [1] https://www.youtube.com/watch?v=LjHORRHXtyI
58.
▲
by
gnuvince
4y ago
The outrage is two-fold. First, this is removing a right that used to be guaranteed for 50 years and had been reaffirmed, by the Supreme Court. With the stroke of a pen, 6 judges removed a protection that more than 2/3 of citizens supp
59.
▲
by
gnuvince
4y ago
Rust has been my primary language for the past 5 years, but it's moving in a direction that gets it farther away from my own values about what software ought to be like. As more features are added to the language, the ways they interac
60.
▲
by
gnuvince
4y ago
A post about writing means that I need to plug a couple talks by Larry McEnerney. [1,2] The tool described in this blog post is all about text-based rules: what the _text_ ought to look like. To improve your own writing (a) learn who your r
More ›