Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Rusky
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
81 ms
·
871.
▲
by
Rusky
10y ago
Rust doesn't have a new operator (its equivalent to malloc is Box). When that's used, it forces the value onto the heap- but that's not what you would write most of the time. Local variables that are not explicitly heap-alloc
872.
▲
by
Rusky
10y ago
The description here applies to both.
873.
▲
by
Rusky
10y ago
The Switch supports Vulkan but it also has its own native API. It's a bit early to tell but it looks from my perspective a lot like OpenGL on PS3, though perhaps with a bit more adoption since Vulkan is more suited to console-style dev
874.
▲
Introducing PIX on Windows (beta)
(blogs.msdn.microsoft.com)
2 points
by
Rusky
10y ago
|
0 comments
875.
▲
by
Rusky
10y ago
> In my opinion Rust's safety is overhyped and entirely dependent on good implementation of unsafe code. ...as is true of any safe language, which is dependent on a good implementation of its compiler or interpreter. Rust just happe
876.
▲
by
Rusky
10y ago
As far as the kernel-side implementation goes, IO is always asynchronous. The CPU is not involved in the actual movement of data between memory and the network interface. When you make a synchronous syscall, the kernel initiates the operati
877.
▲
by
Rusky
10y ago
Sibling comment by lucozade is good. To be more specific, it's because OS-level threads are the only way the kernel gives applications to run any code at all. When an OS-level thread makes a syscall, it ceases to run any application co
878.
▲
by
Rusky
10y ago
> They just let an other coroutines execute during the syscall. They do this by using async IO under the hood (for network sockets at least- convincing disk-based read() calls to be async is much tricker and Go doesn't do it).
879.
▲
by
Rusky
10y ago
Go has different memory layout and calling conventions in part because of its green threads implementation. It has to switch stacks to call C code because the Go stacks are small and relocatable, to make growing more efficient, which is o
880.
▲
by
Rusky
10y ago
You can't really do IO in coroutines without async IO in the implementation, and (depending on your baseline) you can't make them zero-cost without something like async/await.
881.
▲
by
Rusky
10y ago
PNG also explicitly specifies image dimensions, so there's no need for that at all.
882.
▲
by
Rusky
10y ago
Vim for Rust and C, with just the Rust syntax highlighting plugin (I have Racer installed but don't tend to use it). It's lightweight and gets out of my way when editing text. Visual Studio 2015 for C++, with the VsVim addon. I mo
883.
▲
by
Rusky
10y ago
The challenges in parallelizing JS have very little to do with its implementation language and almost everything to do with JS itself. Rust can't help you there.
884.
▲
by
Rusky
10y ago
Rust has something else more general that's much closer to existentials- you can use trait objects to erase a value's type and restrict methods on it to those in the trait. The difference between trait objects and `impl Trait` is
885.
▲
by
Rusky
10y ago
It's not really existential types in the general sense. A function returning `impl SomeTrait` can still only return values of a single type, it's just that the compiler infers that type from the function body and then restricts th
886.
▲
by
Rusky
10y ago
System-wide package managers give you a single, global version of a package built to interact solely with the rest of that one distribution. I absolutely do want to control how dependencies are built- I want to build them in debug mode, lin
887.
▲
by
Rusky
10y ago
Everyone wants to build a package manager these days because OS-wide package managers don't provide the same feature set that language-specific package managers do.
888.
▲
by
Rusky
10y ago
I haven't experimented with it too much and I believe there are a few others as well, but you could take a look at https://www.conan.io/
889.
▲
by
Rusky
10y ago
That sort of package manager has a totally different purpose and does absolutely nothing to help build your code, manage dependency versions, or control how dependencies are built.
890.
▲
by
Rusky
10y ago
More because Option is not really intended to handle errors while Result and ? are.
891.
▲
by
Rusky
10y ago
Because while you may not care at first, you will later, and Rust will help you out then.
892.
▲
by
Rusky
10y ago
Further, all stack allocations for a frame can be coalesced into a single add/sub.
893.
▲
by
Rusky
10y ago
I suspect they're referring to graphs of Drop implementors, based on the sibling thread. If you for some reason have a linked-sea-of-nodes data structure that has to traverse itself on drop, that can behave similarly to dropping an Rc
894.
▲
by
Rusky
10y ago
Lifetimes are compile-time only and do not do any reference counting. So Rust has the same latency guarantees as C, for example.
895.
▲
by
Rusky
10y ago
It gets used most to enable returning from the outer function while within loop-body-like procs. Rust iterators used to be like that too (pre-1.0), but they switched to the current style to get rid of that complexity.
896.
▲
by
Rusky
10y ago
The software they originated, yes. Software they got from elsewhere (like GCC), not necessarily.
897.
▲
by
Rusky
10y ago
The main problem with normal promises is you can no longer use native control structures, because the code before and after the operation has to go into separate functions. Loops no longer look like loops, the bodies of conditionals are les
898.
▲
by
Rusky
10y ago
Oh, that's fantastic- how recent is this? Last time I tried debugging an -msvc binary was only a couple months ago.
899.
▲
by
Rusky
10y ago
Probably the biggest drawback of the MSVC backend is that its debugging symbols only have line numbers, no variable/type information. The rest is mostly Windows-specific issues like manifests and subsystems.
900.
▲
by
Rusky
10y ago
The question, though, is what are you oversampling? Depending on how the line gets rasterized, supersampling (or multisampling) may or may not help you at all.
More ›