Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
josephg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
40 ms
·
841.
▲
by
josephg
11mo ago
> The difference is only in the failure mode. Rust panics, whereas Haskell throws a runtime exception. Fun facts: Rust’s default panic handler also throws a runtime exception just like C++ and other languages. Rust also has catch blocks
842.
▲
by
josephg
11mo ago
First, again, that’s not the issue. The bug was in their database code. Could this codebase be improved with error messages? Yes for sure. But that wouldn’t have prevented the outage. Almost every codebase I’ve ever worked in, in every prog
843.
▲
by
josephg
11mo ago
Ah thanks for the clarification. That wasn’t clear to me reading your comment. You’re right that rust forces you to explicitly decide what to do with Result::Err. But that’s exactly what we see here. .unwrap() is handling the error case e
844.
▲
by
josephg
11mo ago
> People are betting trillions that you're the one who's "on the wrong axis." People are betting trillions of dollars that AI agents will do a lot of useful economic work in 10 years. But if you take the best LLMs in
845.
▲
by
josephg
11mo ago
> The point is Rust provides more safety guarantees than C. But unwrap is an escape hatch Nope. Rust never makes any guarantees that code is panic-free. Quite the opposite. Rust crashes in more circumstances than C code does. For example
846.
▲
by
josephg
11mo ago
I'm sure lots of bystanders are surprised to learn what .unwrap() does. But reading the post, I didn't get the impression that anyone at cloudflare was confused by unwrap's behaviour. If you read the postmortem, they talk in
847.
▲
by
josephg
11mo ago
> Cloudflare had its unwrap fiasco, Was it a fiasco? Really? The rust unwrap call is the equivalent to C code like this: int result = foo(…); assert(result >= 0); If that assert tripped, would you blame the assert? Of cou
848.
▲
by
josephg
11mo ago
In rust, handing out indexes isn’t that common. It’s generally bad practice because your program will end up with extra, unnecessary bounds checks. Usually we program rust just the same as in C - get a reference (pointer) to an item inside
849.
▲
by
josephg
11mo ago
Yes. And there’s still lots of places where you can get significant speed ups by simply applying those old techniques in a new domain or a novel way. The difference between a naive implementation of an algorithm and an optimised one is ofte
850.
▲
by
josephg
11mo ago
Lately rust is my primary language, and I couldn't agree more with this. I've taken to using typescript for prototyping - since its fast (enough), and its trivial to run both on the server (via bun) or in a browser. The type syste
851.
▲
by
josephg
11mo ago
The C compiler will still make working programs every time, so long as your code isn’t broken. But sometimes the code chatgpt produces won’t work. Or it'll kinda work but you’ll get weird, different bugs each time you generate it. No t
852.
▲
by
josephg
11mo ago
> OK, you just added requirements the previous poster had not mentioned. Lol of course! The real requirements for a piece of software are never specified in full ahead of time. Figuring out the spec is half the job. > Firstly, how oft
853.
▲
by
josephg
11mo ago
This is exactly the level of code I've come to expect from chatgpt. Its about the level of code I'd want from a smart CS student. But I'd hope to never use this in production: - It always uses the last item as a pivot, which
854.
▲
by
josephg
11mo ago
I don't think this disproves my claim, for several reasons. First, I don't know where those human participants came from, but if you pick people off the street or from a college campus, they aren't going to be the world'
855.
▲
by
josephg
11mo ago
Even the exact same model isn't enough. There are several sources of nondeterminism in LLMs. These would all need to be squashed or seeded - which as far as I know isn't a feature that openai / anthropic / etc provide.
856.
▲
by
josephg
11mo ago
Well.. except the AI models are nondeterministic. If you ask an AI the same prompt 20 times, you'll get 20 different answers. Some of them might work, some probably won't. It usually takes a human to tell which are which and fix p
857.
▲
by
josephg
11mo ago
Well yeah. And because when an expert looks at the code chatgpt produces, the flaws are more obvious. It programs with the skill of the median programmer on GitHub. For beginners and people who do cookie cutter work, this can be incredible
858.
▲
by
josephg
11mo ago
It really depends on what you’re doing. AI models are great at kind of junior programming tasks. They have very broad but often shallow knowledge - so if your job involves jumping between 18 different tools and languages you don’t know very
859.
▲
by
josephg
11mo ago
> Now if you wrote a small piano piece, there is no way you could predict if it will become a hit or not. It depends on factors that are really far from being limited to "the piece in question". This is where I think we really
860.
▲
by
josephg
11mo ago
(Hi from Australia!) > There is no absolute junk art-artefact, because humanity potentially extends timewise to so many instances of different humans that you cannot know in advance if something will be considered "good" at som
861.
▲
by
josephg
11mo ago
> Charisma depends on your audience, and audiences can differ quite a lot. There is no "right/wrong" because what please you as an audience may be considered wrong by another one. Yes; one of the most aspects of charisma i
862.
▲
by
josephg
11mo ago
> But is there a real connection between being wrong and not being read or are you yourself wrong ? You don’t need to be a standup comedian yourself to spot bad comedy. > Furthermore, I doubt there are any chances "right/wro
863.
▲
by
josephg
11mo ago
Yeah I’ve occasionally mentioned things at work, and had someone say “I think I read a blog post about that once”. Only to discover they read about it on my blog! Incredibly satisfying. I’ve also seen screenshots of my blog posts show up in
864.
▲
by
josephg
11mo ago
If you are happy to pay the cost of a garbage collector, why C at all and not Java, C#, Go, Typescript, or any of the other fine options? They’re simpler languages with better tooling and cleaner syntax. I understand Fil-C for running legac
865.
▲
by
josephg
11mo ago
This is also true of a lot of other disciplines. I’ve been learning filmmaking lately (and editing, colour science, etc). There’s functionally infinite beginner friendly videos online on anything you can imagine. But very little content tha
866.
▲
by
josephg
11mo ago
Except ChromeOS and webOS are both based on linux, which is written in normal, fast C. The computer on my desk cost about $3000. If all my programs ran twice as slow, thats sort of like removing $1500 of my computer away. Could I get away w
867.
▲
by
josephg
11mo ago
Yeah. I remember seeing the circuit board for official Xbox controllers vs cheap 3rd party ones. The official controllers had about 10x as many components. I don’t know what all that stuff does, but I’m sure it all contributes to the contro
868.
▲
by
josephg
11mo ago
What shared frameworks are multiple gigabytes in size?? If that’s the case I don’t think the problem is dynamic linking. A hoarder shouldn’t solve their problem by renting more houses. Honestly I’ve been thinking of making my own toy OS and
869.
▲
by
josephg
11mo ago
> Linux relies on dynamic linking extensively in two ways: > > - A dynamic library may be updated independently of its dependents. You can’t do this in Rust, see above. This isn't a linux thing. Its a popular linux distributi
870.
▲
by
josephg
11mo ago
> The ergonomics of C are excellent That is a matter of opinion. Personally when I write C, I miss memory safety. And thread safety. I miss non-nullable types. I miss having a good way to return results. And generics. And tuples. And rea
More ›