Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Rusky
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
77 ms
·
781.
▲
by
Rusky
9y ago
The shit being sold in the file manager is... space in the cloud for your files. Which is managed by the file manager.
782.
▲
by
Rusky
9y ago
Who says the same people set it up and receive the data?
783.
▲
by
Rusky
9y ago
Right- error_chain is just a bit too much magic for me compared to what #[derive(From)] would do.
784.
▲
by
Rusky
9y ago
You can definitely reuse other library's error types. I often do that while prototyping. The benefit of lib-specific error types, though, is that they can be far more specific.
785.
▲
by
Rusky
9y ago
I would love a `#[derive(From)]` for newtype structs and enum variants. Would bring Rust error handling back below Java in boilerplate levels. :)
786.
▲
by
Rusky
9y ago
By manually deciding when to `git commit` in the first place, you're already losing some history. Nobody argues to keep the history of every keystroke, so clearly there is some point in between that and "no history" that is u
787.
▲
by
Rusky
10y ago
> Copy one less than the number you told it, so it would have room to append a NULL? Yep. Or perhaps return an error.
788.
▲
by
Rusky
10y ago
I'm well aware of that. Safe Rust, however, allows you to put that pointer in an Rc cycle, or call mem::forget on it, etc.
789.
▲
by
Rusky
10y ago
Rust doesn't guarantee no memory leaks any more than C++.
790.
▲
by
Rusky
10y ago
"Systems language" usually refers to lower-level programming. For example: an OS kernel or its drivers where you're poking at hardware and need control over memory layout, a library to be called from many other languages that
791.
▲
by
Rusky
10y ago
Rust's + implementation consumes the String on the left, so the default behavior doesn't do any allocation unless the string needs more capacity. This makes it impossible to "get it wrong" in the way you seem to be suspe
792.
▲
by
Rusky
10y ago
> Why are fundamental things like resource allocation at least not standardised in the kernel? They are. The slab allocator mentioned in the article is one part of that. The problem here was not that allocation is ad hoc, but that the au
793.
▲
by
Rusky
10y ago
The free list can be stored almost entirely within the free buckets, giving it a constant cost in memory you can't allocate.
794.
▲
by
Rusky
10y ago
https://www.audioasylum.com/messages/pcaudio/119979/re-a-rev... > also most players use malloc to get memory while new is the c++ method and sounds better.
795.
▲
by
Rusky
10y ago
Rust does the inverse- it doesn't extend the lifetime of the input data, it restricts the lifetime of the output struct.
796.
▲
by
Rusky
10y ago
This... isn't cloud. It's a server that runs locally, to implement the functionality of an IDE in a way that multiple editors can share.
797.
▲
by
Rusky
10y ago
You can't always swap. For example, you may want to use a movable but non-copyable type to keep un-aliased access to a single resource (see linear/affine types) and the compiler treating the move source as dead is useful there. Or
798.
▲
by
Rusky
10y ago
You can get those benefits without the complexity of C++ if you're willing to break with the past (and as for the newer features, it's possible C++ could have implemented them more straightforwardly, though maybe they were already
799.
▲
by
Rusky
10y ago
It can help there exactly as much as it can help non-desktop web apps.
800.
▲
by
Rusky
10y ago
Your analogy doesn't sound right to me- there's nothing about wasm that would make it slow to manipulate the DOM, while there is plenty about Javascript that makes it slow to process images. Manipulating the DOM from wasm shouldn&
801.
▲
by
Rusky
10y ago
TypeScript's type system is intentionally unsound in a handful of places- function parameters are bivariant, for example. I believe Flow is at least closer to being sound. I suspect switching from Flow to TypeScript would be relatively
802.
▲
by
Rusky
10y ago
They're often using native code because they have much stricter performance requirements, which means they have everything to gain by doing so. (Though yes, there is an aspect of your last sentence as well)
803.
▲
by
Rusky
10y ago
There are vast gulfs between Steam Greenlight candidates and AAA. Nobody here, least of all me, has claimed that Rust cannot be used for any game at all, nor have they disputed your own experiences. Grow up.
804.
▲
by
Rusky
10y ago
Good thing nobody's claiming otherwise, then. Quit trolling (or, on the off chance you're sincere, learn some basic logic).
805.
▲
by
Rusky
10y ago
> memory management > It's just a lack of library support AFAICT. Libraries could help, but game often have a lot of one-off memory stuff too that you can't put in a library and you can't do in safe Rust. Maybe there ar
806.
▲
by
Rusky
10y ago
> > omitting the constructor call Oops, too late to edit but that was meant to say "destructor."
807.
▲
by
Rusky
10y ago
I honestly don't know how fundamental an issue it is. I suspect the console vendors and engine/library developers would all have to be on board at some level. For some idea of the timeline- most consoles transitioned from assembly
808.
▲
by
Rusky
10y ago
It's not. There's a reason Mozilla is pushing Servo.
809.
▲
by
Rusky
10y ago
They seem to be aware: ", but it has memory and data race safety, OS threads, and futures, so no problem." However, futures are certainly not boilerplate-free. They destroy your ability to use native control flow the way you can w
810.
▲
by
Rusky
10y ago
This is nonsense. I would love to use Rust in games (I currently work in games) but it's not clear that it would work out. That opinion is shared by game developers far more experienced and prominent than myself. I (and I presume many
More ›