Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
verdagon
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
40 ms
·
391.
▲
by
verdagon
6y ago
Thanks! We're really excited to see how they work out too, there's some exciting potential in there. I can imagine having programs which are tree-like hierarchies of regions, but I'm starting to suspect we can have directed a
392.
▲
by
verdagon
6y ago
Thanks! We stand on the shoulders of giants, this method has been in use in the wild for a while, and Gel introduced it back in 2007. Behavior will be the same in all three modes. There is however a chance that testing and development didn&
393.
▲
by
verdagon
6y ago
Absolutely. It's a hard sell because popular opinion is that Rust gives you compile-time safety with zero cost, and showing people that that's not the case will be difficult. There are three things that we'll have to show the
394.
▲
by
verdagon
6y ago
Absolutely right! Both Rust and Vale have their respective overheads. Fast mode is as fast as even C++, and strictly safer than e.g. the C++ + ASan approach, but Resilient Mode is where the speed+safety story gets interesting. I didn't
395.
▲
by
verdagon
6y ago
Thanks! There are three things preventing someone from using the object after destroying it: * If it was an owning reference, the compiler will ensure nobody else uses it. * The program will halt if there are any live constraint ref
396.
▲
by
verdagon
6y ago
I'm not familiar with that particular flavor of monads, is that kind of like how Javascript's Promise has a .then() and a .catch()? Also, someone mentioned yesterday that this is a form of linear typing, since everything must be d
397.
▲
by
verdagon
6y ago
Great question! In C++, yes. When I did a clasp in C++, I had a mutex on each side, where the "primary" one locked its mutex then locked the other, and the "secondary" one would instead lock its mutex and try -lock the
398.
▲
by
verdagon
6y ago
Yes indeed! Cell types can be used for a lot of different situations depending on the specific requirements, but there's no good way (that I've found) to really represent the Plane/Airport example in a way that doesn't d
399.
▲
The Next Steps for Single Ownership and RAII
(vale.dev)
102 points
by
verdagon
6y ago
|
37 comments
400.
▲
The Next Steps for Single Ownership and RAII
(vale.dev)
5 points
by
verdagon
6y ago
|
0 comments
401.
▲
by
verdagon
6y ago
Do you think Swift has a future for WASM? Rust is faster and Swift is easier, and I genuinely wonder how that particular tradeoff will shake out for web.
402.
▲
by
verdagon
6y ago
Is reference counters really a smell? I thought it was the main way to write Rust when the borrow checker is too strict for something you want to do. Vec + generational indices might be the other way, is that preferred over Rc?
403.
▲
by
verdagon
6y ago
I'd love to know where C++ got it from, but I can't find it. Any ideas?
404.
▲
by
verdagon
6y ago
IIRC, languages like Java and Go compile quite fast, and they are even safer than Rust...
405.
▲
by
verdagon
6y ago
I'm not sure safety has anything to do with long compile times, can you enlighten?
406.
▲
by
verdagon
6y ago
I dont know Haskell that well, but I thought it had strong static typing? Though, Haskell figures out the types for you, instead of you typing them in, maybe thats a big difference. In Haskell, do you find you have to think about the types
407.
▲
by
verdagon
6y ago
Wow, thanks for this beautiful post! I'm coincidentally about to publish a language similar to Rust which addresses #2, and I'm now seeing perhaps I should improve a lot of these other things! I've been looking for someone kn
408.
▲
by
verdagon
6y ago
Would love to hear more about this! Are there benefits to splitting binaries which regular architecture techniques in a single monolith cant achieve?
409.
▲
by
verdagon
6y ago
I'll add a bit of caution for readers: CBT is useful to many but might not be enough, or the right tool, for everyone. I tried it for years with multiple psychologists and had no progress. Eventually, I found a great psychologist who h
410.
▲
by
verdagon
6y ago
How did you fix it? I'm going through that exact thing. I think I have to retrain myself to relax my chest and stomach muscles and breathe deeply at the same time, but it's super difficult and I can only do 2/3.
411.
▲
by
verdagon
6y ago
Dont we in Rust still conceptually modify the vector multiple times, just through different means (usually a generational index or something)?
412.
▲
by
verdagon
6y ago
Is this still bad practice if the container can detect when this happens, like Java's? Not saying that it always has to throw like Java, I could imagine implementing a weak iter which we'd check before each operation.
413.
▲
by
verdagon
6y ago
Can you explain why multiple mutable pointers is bad practice? I understand the benefits and the risks of them, and understand how Rust prevents both, but I dont yet understand why it's bad practice, and am interested to learn why.
414.
▲
by
verdagon
7y ago
Are you saying school is an adequate substitute for a father?
415.
▲
by
verdagon
7y ago
Fascinating! I thought Rust was built around the borrow checker. Did Rust ensure memory safety back then? Back then, was their goal to make a more modern C++ with functional influence maybe?
416.
▲
by
verdagon
7y ago
For case #2, isn't it a bit presumptious of the MyRAIIFile to make the decision to abort the entire program? It would be nice if the destructor could report the error upward to whoever called it, so they can decide whether to log or ab
417.
▲
by
verdagon
7y ago
I ran into something like this (very simplified): MyRAIIFile temp_file = ...; AddSomeStuffToFile(&temp_file); // threw something where MyRAIIFile has a destructor: ~MyRAIIFile() { underlying_file.close(); 
418.
▲
by
verdagon
7y ago
Question about proper destructor/RAII use: C++'s unfortunately falls over when you throw an exception from a destructor, and also doesn't let us return error codes from destructors (not that any other language does). How do y
419.
▲
by
verdagon
7y ago
Yep, I think GP meant DI frameworks.
420.
▲
by
verdagon
7y ago
I have the opposite experience. My simple OO plane->setSpeed(400) function would become a functional monstrosity that takes in the entire previous world, and return a new World, Military, AirForce, and Fleet objects based on the old ones
More ›