Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
josephg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
35 ms
·
781.
▲
by
josephg
10mo ago
Why? Lots of people more or less use their computer as a glorified web browser, with some zoom calls and document editing thrown in for good measure. 256gb seems overkill. My girlfriend is somehow still rocking a 2011 MacBook Air. She mostl
782.
▲
by
josephg
10mo ago
Yes I think I mentioned in another comment that that would be another way to code it up. It’s ugly in a different way to the interface approach. I haven’t written enough go to know which is the least bad. What are you “fighting all day” in
783.
▲
by
josephg
10mo ago
Npm is all source based. Nobody is compiling binaries of JavaScript libraries. Cargo is the same. I’m not really sure what you think a maintainer adds here. They don’t audit the code. A well written npm or cargo or pip module works automati
784.
▲
by
josephg
10mo ago
It is. Though in their defence, I think this api was added after the leftpad fiasco. Also not many people seem to know this, but in the aftermath of leftpad being pulled from npm, npmjs changed their policy to disallow module authors from e
785.
▲
by
josephg
10mo ago
And yet… https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
786.
▲
by
josephg
10mo ago
I really like this analogy. In a sense, C restricts what you can do compared to programming directly in assembly. Like, there's a lot of programs you can write in assembly that you can't write in the same way in C. But those restr
787.
▲
by
josephg
10mo ago
I think there's 2 kinds of systems we're talking about here: 1. Capabilities given to a program by the user. Eg, "This program wants to access your contacts. Allow / deny". But everything within a program might st
788.
▲
by
josephg
10mo ago
> When people say "js doesn't have a stdlib" they mean "js doesn't have a robust general purpose stdlib like C++ ... It does though! The JS stdlib even includes an entire wasm runtime. Its huge! Seriously. I can
789.
▲
by
josephg
10mo ago
> i dont know what the solution here is other than stop using npm Personally I think we need to start adding capability based systems into our programming languages. Random code shouldn't have "ambient authority" to just d
790.
▲
by
josephg
10mo ago
Sure it does. The JS standard library these days is huge. Its way bigger than C, Zig and Rust. It includes: - Random numbers - Timezones, date formatting - JSON parsing & serialization - Functional programming tools (map, filter, reduce
791.
▲
by
josephg
10mo ago
I've worked in plenty of javascript shops and unfortunately its not so far off the mark. Its quite common to see JS projects with thousands of transitive dependencies. I've seen the same in python too.
792.
▲
by
josephg
10mo ago
> They're an end-run around the underlying version control system I assume by "underlying version control system" you mean apt, rpm, homebrew and friends? They don't solve this problem either. Nobody in the opensource
793.
▲
by
josephg
10mo ago
> C has unions, but they're not tagged. You can roll your own tagged unions, of course, but that's moving beyond it being a feature of the language. This feels like a distinction without a real difference. Hand-rolled tagged un
794.
▲
by
josephg
10mo ago
C has numeric enums and tagged unions, which are sum types without any compile time safety. That’s idiomatic C. Go doesn’t have any equivalent. How do you do stuff like this in Go, at all? I’ve been programming for 30+ years. Long enough to
795.
▲
by
josephg
10mo ago
In typescript I typed my text editing operations like this: type Operation = {type: “insert”, …} | {type: “delete”, …} | …; It’s trivial to switch based on the type field. And when you do, typescript gives you full type checking fo
796.
▲
by
josephg
10mo ago
This hasn't been my experience at all. I still regularly use typescript. One problem I run into from time to time is "spooky action at a distance". For example, its quite common to create some object and store references to i
797.
▲
by
josephg
10mo ago
Yep. This was the biggest thing that turned me off Go. I ported the same little program (some text based operational transform code) to a bunch of languages - JS (+ typescript), C, rust, Go, python, etc. Then compared the experience. How we
798.
▲
by
josephg
10mo ago
Sounds like exactly the sort of thing the IETF's IPv6-only network is trying to shake out. I went to IETF a few years ago and ran into issues on their IPv6 only network because I host some stuff from home, and my residential ISP doesn&
799.
▲
by
josephg
10mo ago
Urgh I wish it were like that here in Australia! We have a fast, modern fiber internet connection in inner Melbourne. But my ISP still doesn't support IPv6 at all. I file a ticket about once a year, and I'm always met with more or
800.
▲
by
josephg
11mo ago
> then sampling to see if it excludes something important. But how? That’s the question.
801.
▲
by
josephg
11mo ago
I'd be happy to support the low power variants as well, but without spending a bunch of money, I have no idea what features they have and what they're missing. Its very annoying. For anyone not familiar with caniuse, its indispens
802.
▲
by
josephg
11mo ago
If you're going to plug your own project, you might want to mention that in your comment. There's dozens of rust osdev projects. Its an open question if any become relevant like linux.
803.
▲
by
josephg
11mo ago
> when you start using rust in the real world to get real work done a lot of the promises that were made about safety have to be dropped because you need to boot your computer before the heat death of the universe. Safe rust isn't s
804.
▲
by
josephg
11mo ago
Saying "appeal to authority" doesn't refute the point made above. Expertise is real. Someone with 25 years of experience with the linux kernel will know a lot more about linux and C than the average HN commenter. Almost certa
805.
▲
by
josephg
11mo ago
> - Intel's technical docs will say "if CPUID leaf 0x3aa asserts bit 63 then the CPU is affected". (There is no database for this you can only find it out by actually booting one up). I’m doing some OS work at the moment a
806.
▲
by
josephg
11mo ago
I've been writing a little port of the SeL4 OS kernel to rust, mostly as a learning exercise. I ran into a weird bug yesterday where some of my code wasn't running - qemu was just exiting. And I couldn't figure out why. I ask
807.
▲
by
josephg
11mo ago
> As far as I know, there is nothing to prevent Samsung from selling you a TV, then sending out a software update in two years which forces you to accept a new terms of service that allows them to serve you ads. If you do not accept, the
808.
▲
by
josephg
11mo ago
True. But it does work for food safety, and to help curb underage drinking and smoking, to stop lousy restaurants from serving unsafe food and for lots of other stuff we take for granted. Top down governance isn't a silver bullet, but
809.
▲
by
josephg
11mo ago
When I get email like that, I mark it as spam. That trains the spam filters to remove their marketing email from everyone's inbox. I see it as a community service.
810.
▲
by
josephg
11mo ago
I've done this in production plenty of times. Under load, nginx is insanely efficient. Practically all the CPU time ends up spent in your nodejs application server. The worst part of a setup like this is deployment. There's just a
More ›