13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 5y ago · link · parent
That said, the mitigations are assurances, and it also lets us point a finger at intel and say "fix your shit you just caused a global performance regression".
comment 5y ago · link · parent
From what I can tell the vast majority of changes to Rust are small things like "Adding a method to Vec". These aren't really the type of things that turn into cruft/ radically change the language, but we also don't have to wait years for them.
comment 5y ago · link · parent
In an actor system the TcpStream would be local to an actor. You'd say "parse_line" by sending it a message. That message would be processed to-completion before another message could be processed - even if there is yielding internally.
You could also wrap TcpStream with some sort of wrapper that doesn't expose its internal mutability - that would let the type system ensure there isn't shared mutability across tasks I think...
comment 5y ago · link · parent
I don't believe this requires a change to async-await though. It just means you want to wrap up your async-await in its own synchronization primitive, or just avoid the need for it.
This is easy to do with a channel system, or an actor system, where the queue is the synchronizing primitive. An actor's message handler can internally be asynchronous, so long as it processes messages one at a time (but it can yield during processing to another actor).
We can get actors in rust pretty trivially imo. It's just a task with state and a message interface.
comment 5y ago · link · parent
This is sort of true, in that I might take reference where I used to take a value, or vice versa, but it's pretty trivial. It's extremely rare for borrow checking or memory layout to slow me down at all when refactoring.
comment 5y ago · link · parent
Ugh I hate these. It's almost worse than the "only happens sometimes". I'd rather walk down a longer path fast than a shorter path miserably slow.
> there’s no output at all
Hangs!! I hate hangs. I hate them. Crashes give information. Hangs could be so many things, but it is the absence of information.
> 4. one of your assumptions is wrong
#1 assumption I always make sure to check now is "is the code that's running actually from the source code I'm looking at". So may "impossible" bugs I run into are in fact impossible... in the codebase I'm looking at. And it turns out what's deployed is some other code where it is very much possible.
comment 5y ago · link · parent
This is exactly my experience. This comes up a lot when someone tries to take a 'DSL' approach to solve a general problem. "Look what you can do in just one simple line!", and it's true, one line and you've got something working.
Then you ask questions that weren't anticipated. How do I reuse the 5 lines I wrote here in another place? How do I write a test for those 5 lines? Can I log outputs in-between lines?
Those aren't exactly scary questions for any programming language - the answer is trivial, and what those languages solve for. But in these fancy no-code systems the answer is "you can't", more often than not. I care way more about how a system is going to evolve and how it will be maintained than solving trivial problems in one line.
They end up being completely unmaintainable and you lose more time than you save.
Frankly, coding isn't that hard. You don't need to be an expert to be effective, and there's a massive amount of tooling, knowledge-sharing, and investment already there.
All of this no-code shit is such a waste of time.
comment 5y ago · link · parent
No one's on the other side of that argument.
> Actix Web is a very good example
A very good example of a project using unsafe and the community rejecting that?
> just not zero effort to keep it safe.
No one said it was.
comment 5y ago · link · parent
Ada is the only language you've mentioned that really fits IMO. One of the safe languages like P would be interesting but it's unproven in the space.
As for Ada, it's a sad story, but ultimately the language is unlikely to gain traction after too many early mistakes (particularly around licensing).
comment 5y ago · link · parent
> Ideally everything would just be in a single process.
Processes are an amazing boundary, probably the most powerful abstraction in existence.
> Why are new systems exposing the ability to dereference raw pointers to user programs?
This shouldn't be possible today - SMAP/SMEP are standard now.
> obsoleting the need for hardware isolation
I think if the last 3 years (sidechannel frenzy) has taught us anything, it's that software-isolation is extremely difficult. Even hardare isolation is difficult.
comment 5y ago · link · parent
Yes, that's an incredible capability - that a human can actually look to find bugs, that's insane, that's huge.
> Most of the time those humans are even rarer than those that validate unit tests are properly written.
Maybe, maybe. Is it rarer than fuzzing with sanitizers though? Or rarer than serious sandboxing efforts? When unsafe has been used gratuitously in Rust libraries the community has pushed back, to a fault.
I don't know what it is you want to try to argue here though. My questions were really targeted to someone at Google who can speak more directly to what I've been seeing for years.