Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
von_lohengramm
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
121.
▲
by
von_lohengramm
5y ago
One of the bigger problems of transpiling to C is inheriting its oddities, such as the definition of overflow (or lack thereof) depending on the signedness of integers, etc., etc. Personally, I'd argue that transpiling to C combines mo
122.
▲
by
von_lohengramm
5y ago
The Soviet Union, for one.
123.
▲
by
von_lohengramm
5y ago
Note that Serenity OS also has its own stdlib "AK" that excludes a lot of criticized C++ "features". If the Linux devs were to carefully splice out the Good from the Bad and Ugly of C++, then maybe it'd suit their t
124.
▲
by
von_lohengramm
5y ago
To be fair, Windows 11 did directly rip a ton of its design too, especially from Chrome OS of all things.
125.
▲
by
von_lohengramm
5y ago
I'm on a 2019 16" MBP 2.6GHz i7 with a 5300M. This machine isn't a powerhouse, but it can drive 1080p240Hz + 1440p144Hz buttery smooth for a million Firefox tabs and a couple IntelliJ projects (if everything's all indexe
126.
▲
by
von_lohengramm
5y ago
If I was really that hungry, then maybe I'd walk to the grocery store & get some store-brand pasta instead of getting pizza delivered. It's not like spending money is an absolute thing where you spend all or nothing. If I know
127.
▲
by
von_lohengramm
5y ago
TSMC recently tried to poach me & offered paid on-site training in Taiwan before heading back to the States for the actual position. I reckon it's the modern job-hop game that killed this phenomenon outside of "lifer" com
128.
▲
by
von_lohengramm
5y ago
Exactly. If holding onto money made it go up in value, then why would you ever spend it? If you had BTC in 2010 and knew what would happen to its value over the years, would you still buy a pizza with it?
129.
▲
by
von_lohengramm
5y ago
The rich proportionally have less wealth in $, so this affects them less. Additionally, slight inflation tends to produce economic growth, furthering the value of their investments.
130.
▲
by
von_lohengramm
5y ago
Anecdotally, I've never used or seen anyone use a pure NxN grid. It's always a series of horizontal or vertical splits (a tree). I'll admit that this being Rust is likely the cause, but this is a simple binary tree. There
131.
▲
by
von_lohengramm
5y ago
How on earth would a two-dimensional array be their first approach? And then acting like a tree is a novel concept? I had to double-check that this wasn't a dev.to article.
132.
▲
by
von_lohengramm
5y ago
Game Boy Camera
133.
▲
by
von_lohengramm
5y ago
Destructors bring about complications with lifetimes and move vs copy semantics among other things. Simple scope-based defers are trivially understandable (if you don't abuse text replace macros...) and are mostly just syntactic sugar
134.
▲
by
von_lohengramm
5y ago
API contracts aside, signed indices do have a major benefit: https://godbolt.org/z/q4eTdPdcd
135.
▲
by
von_lohengramm
5y ago
I'd like to follow this advice, but it falls apart when you have a service that interacts with or worse relies on state in external services. Best case, you can create new test data on each run in those services as part of your tests i
136.
▲
by
von_lohengramm
5y ago
That hardly defeats the argument. Saying that 40% of "urban journeys" are <=2 miles does not convince me that I want to make the other 60% of "urban journeys" that much more inconvenient as well as the 100% of non-&qu
137.
▲
by
von_lohengramm
5y ago
That does not describe all Forths. A Forth running on a Forth CPU would certainly be a 2nd level, but depending on how the Forth is implemented and designed, it could easily be seen as a 3rd level. Arguably, Forth is (can be) more abstract
138.
▲
by
von_lohengramm
5y ago
It is different in implementation, for better or worse. Instead of stack unwinding, it's a part of the return value.
139.
▲
by
von_lohengramm
5y ago
Because it's a part of the type signature and cannot be accidentally ignored. Every possible error case must be handled when unwrapping the error value.
140.
▲
by
von_lohengramm
5y ago
Technically the shortest UTF-8 representation is _the_ representation and _correctly_normalized_ Unicode is uniquely represented, but fair enough. The unknown input may be slightly malformed. Complexities like this is why one shouldn't
141.
▲
by
von_lohengramm
5y ago
> a way to not allow byte slice functionality on a thing that is clearly not a byte slice This already exists in the form of structs or opaque types. Both of these approaches would end up being implemented in "userspace" anyway
142.
▲
by
von_lohengramm
5y ago
> representing strings as character slices Zig does not do this. It represents strings as byte slices. A UTF-8 character could be multiple codepoints with each codepoint being multiple bytes. A big thing about Zig is not hiding complexit
143.
▲
by
von_lohengramm
5y ago
It's not that simple. Obviously, you'd choose UTF-8, but that exposes another issue: a codepoint is not a character. There's no simple & elegant solution to this at the language level.
144.
▲
by
von_lohengramm
5y ago
In addition to the other recommendations, the Zig Zen[0] and The Road to Zig 1.0[1] are pretty convincing. [0] https://ziglang.org/documentation/master/#Zen [1] https://www.youtube.com/watch?v=Gv2I
145.
▲
Zig 0.9.0
(ziglang.org)
316 points
by
von_lohengramm
5y ago
|
240 comments
146.
▲
by
von_lohengramm
5y ago
Most programming isn't implementing the specific most efficient algorithm. Usually it's mostly architecting, bricklaying, and tweaking.
147.
▲
by
von_lohengramm
5y ago
Being a current engineer at Amazon, reading these stories and comments feels so foreign to me. I've literally never seen any of the toxic behavior & mechanisms that I've read about time and time again. I know that usually eith