Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
verdagon
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
241.
▲
by
verdagon
4y ago
I think it makes sense for some segments of the programming world and not others. On Google Earth, garbage collection pauses weren't really acceptable, but we also wanted to add new functionality without being slowed down. Rust is grea
242.
▲
by
verdagon
4y ago
Can you elaborate on the savings lives part? I sense a good story, would love to hear.
243.
▲
by
verdagon
4y ago
One thing I particularly like about Lobster is its memory management. It uses rust-like borrowing rules automatically under the hood to make one of the fastest RC implementations ever seen. I think this is the direction languages should hea
244.
▲
by
verdagon
4y ago
What's "hiding" in this context?
245.
▲
by
verdagon
4y ago
Shameless relevant plug: that's the exact goal of Vale! [0] It turns out, when one removes the borrow checker, they get something that's much more readable, because a lot of Rust's complexity was added to help support the bor
246.
▲
by
verdagon
4y ago
Context switching costs are slightly higher for OS threads, but the real bottleneck is in the physical memory usage. An OS thread will start with an entire 4kb (page size on most OSs) for its stack and grow by 4kb as needed. A virtual threa
247.
▲
Vale 0.2 Released: Higher RAII, Concept Functions, Const Generics, FFI, Modules
(verdagon.dev)
1 points
by
verdagon
4y ago
|
0 comments
248.
▲
by
verdagon
4y ago
Something I really appreciate about Zig is its "colorblind async/await" [0]. To my eyes, it's the best of both worlds. It doesn't require a GC like Go's "contiguous stacks" approach [1] or Loom's
249.
▲
by
verdagon
4y ago
I see now what you mean, youre talking about structural interfaces, like Go and Typescript have. Yes, concept functions are those applied to generics. You may not like structural interfaces, but they're much better at decoupling data f
250.
▲
by
verdagon
4y ago
That sounds promising. Ever done it this way? Howd it turn out?
251.
▲
by
verdagon
4y ago
That's not quite correct. Concept functions can easily be checked ahead of time, theyre basically generics under the hood. C++ uses duck typing, but Vale doesn't have to. If it helps, think of it this way: a concept function is a
252.
▲
by
verdagon
4y ago
> The limitations of &mut cannot be trivially worked around. > The "trivial" equivalent to JavaScript is not RefCell, but plain old Cell, applied at the level of individual fields you want to write to. No panics and no (
253.
▲
by
verdagon
4y ago
Of course, Cell has its own overhead, which is why using large Cells is often worse than just using Rc. It's also very situational; we often have types which don't work with Cell, and it often doesn't make sense to copy objec
254.
▲
by
verdagon
4y ago
I've been using higher RAII with Vale for quite a while, and it doesn't have the problems Rust seems to have. It's actually not difficult to design APIs to properly use handles and other RAII'd objects. Either don't
255.
▲
by
verdagon
4y ago
That's true, one should not overuse Rc. And the other extreme, avoiding Rc entirely, railroads one into a certain architecture which is good for only some use cases and not others. I like to think the community will someday learn when
256.
▲
by
verdagon
4y ago
In Rust, drop() can't return anything, it must return void.
257.
▲
by
verdagon
4y ago
Something I find interesting about Rust is that we can do those safe patterns, as long as we're willing to lose some performance. The way I think of it: Rust forces us to choose between flexibility and zero-cost memory safety. If we
258.
▲
by
verdagon
4y ago
As far as I know, Vale is the only language that can statically ensure we handle that error with its Higher RAII [0], a form of linear typing. Basically, File's drop() returns a Result, and the compiler enforces that we use it. I hear
259.
▲
by
verdagon
4y ago
You might enjoy Cone, which is basically Rust with GC (and RC, and any other strategy).
260.
▲
by
verdagon
4y ago
To clarify, I was talking about making RAII, not using RAII. And it surprised me too, when I learned that the borrow checker rejects it. To see it in action: Have a Database object, and try to have multiple Transaction objects that might co
261.
▲
by
verdagon
4y ago
Everything I said is true. They all rely on having a mutable member reference to affect the outside world, which the borrow checker rejects. You can try to make it happen with a generic lifetime parameter for your structs, but you end up ma
262.
▲
by
verdagon
4y ago
What's the difference? (for a legal layperson like me)
263.
▲
by
verdagon
4y ago
If you've never written a line of Rust in your life, then your position could be more informed. I've written a lot of Rust, and see how much one sacrifices to get the memory safety guarantees without losing speed or memory safety.
264.
▲
by
verdagon
4y ago
Honestly, I don't blame him, after the onslaught he's been defending against in every other thread since Hare's launch. It's really embarrassing to see that side of the Rust community acting this way.
265.
▲
by
verdagon
4y ago
It's not that hard to out-safety Rust, with its unsafe operations and FFI. The Actix fiasco a while ago was a good example of this. Javascript is the gold-standard here IMO. I can also imagine a systems language that is much safer than
266.
▲
Added to Vale 0.2 Beta: Concept Functions
(verdagon.dev)
2 points
by
verdagon
4y ago
|
1 comments
267.
▲
by
verdagon
4y ago
> ... from a programmer's perspective, I would love to see a mix of compile-time lifetime analysis, Automatic Reference Counting (like in the lobster programming language), and manual memory management (marked as unsafe) for when ex
268.
▲
by
verdagon
4y ago
If you have renter's insurance, they'll likely cover thefts like this. Sorry for your trouble and best of luck!
269.
▲
by
verdagon
4y ago
I say this as a fellow language developer: Nim is impressive as hell! I'm particularly excited about their region isolation [0]. A lot of new languages are exploring it, and it has a lot of potential to change the way we program over t
270.
▲
by
verdagon
4y ago
Yep, I worked at Google until they silently started sunsetting all the small endeavors and funneling everyone into Ads/Cloud/Search. Back in 2014, the internal position listings were full of fascinating projects that could bring a
More ›