Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Rusky
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
101 ms
·
901.
▲
by
Rusky
10y ago
Rust's inference and checks are actively limited to function level, not crate level- function types are not inferred, generics are type-checked before instantiation, the borrow checker works on individual functions, etc.
902.
▲
by
Rusky
10y ago
That 1970s abstraction is certainly closer to modern computers than any higher level language, and is quite a nice introductory route to learning more accurate models. We still start with the Bohr model in chemistry for the same reasons.
903.
▲
by
Rusky
10y ago
Looks like you're using the GNU toolchain- for reference, the MSVC toolchain gives me a 107Kb exe from a 43-byte hello world.
904.
▲
by
Rusky
10y ago
Rust's borrow checker actually helps with this a lot- you can hand out references to the Rc-ed data without modifying the count, and the compiler will enforce that the count is not decremented until the references are dead. Combined wi
905.
▲
Why Rust's `std::collections` is absolutely fantastic
(ticki.github.io)
4 points
by
Rusky
10y ago
|
0 comments
906.
▲
Eulex – Bare-metal x86 FORTH
(davazp.net)
3 points
by
Rusky
10y ago
|
0 comments
907.
▲
by
Rusky
10y ago
This is handled by the borrow checker, the same as anything else that might hold references to stack data - you get a compiler error and then can decide how to resolve the conflict, either by extending the lifetime of the referent (perhaps
908.
▲
by
Rusky
10y ago
Because Rust doesn't do exceptions the way other languages with futures do, there's no special handling. Just use a future representing a Result, like you would for synchronous errors.
909.
▲
by
Rusky
10y ago
In Rust, closures don't need to be boxed, because they're just bytes like everything else. In this case, they can be stored by-value as a generic type in the future itself, which can be stored on the stack. The one time that you d
910.
▲
by
Rusky
10y ago
Hard in C, which your example is not, and which FreeType is.
911.
▲
by
Rusky
10y ago
It's 800 lines including setup code, not 800 lines of code solely to draw a triangle.
912.
▲
by
Rusky
10y ago
Rust does have such a syntax: map_err(ToString::to_string).
913.
▲
by
Rusky
10y ago
Rust has had iron oxide puns for names for a very long time, even from people who know where Graydon got the name.
914.
▲
by
Rusky
10y ago
Ah, okay. I was aware of those, and was thinking maybe people were talking about compile-time introspection rather than code generation.
915.
▲
by
Rusky
10y ago
Any discuss threads or RFCs I could look at? I'm also interested in those use cases.
916.
▲
by
Rusky
10y ago
A declared-private but unimplemented method shouldn't have any runtime cost. =delete is just a syntactic convenience.
917.
▲
by
Rusky
10y ago
You can control the GC by not allocating, or by allocating off-heap, when you need to. It is totally possible to write kernels, DBMSes, network stacks, etc. in GC languages. Whether a particular language makes that nice enough to be more wo
918.
▲
by
Rusky
10y ago
Interest in dealing with the consequences of global warming is interest towards your fate. Regardless of where you live, you will be affected. The temperature in your backyard is irrelevant.
919.
▲
by
Rusky
10y ago
No, it does not appear that Rust has any overhead over C, except in cases that use SIMD. That is not a generally applicable result.
920.
▲
by
Rusky
10y ago
Nightly Rust is also "currently released and available," and a significant part of the ecosystem can take advantage of it. Besides, the vast majority of the work to close the gap between C and Rust in the benchmark game was from p
921.
▲
by
Rusky
10y ago
Yes, in a hypothetical platonic code-only way you can separate Yarvin from his work to some degree. But you're underestimating the impact of the word "personal" here- some people avoid communities like this not as a boycott,
922.
▲
by
Rusky
10y ago
Where we seem to differ is in the importance of those people who avoid Yarvin (or Torvalds, or other more or less abrasive open source contributors), as well as the reasons they avoid him. It's more than merely ideological for many peo
923.
▲
by
Rusky
10y ago
It's not about your beliefs or what people infer about them. In fact it's not about you at all- it's about the other potential contributors and users that Yarvin is alienating, despite all the claims in this thread that his v
924.
▲
by
Rusky
10y ago
LFS is how to compile and configure a bunch of existing software. This is how to write an OS from scratch, totally different.
925.
▲
by
Rusky
10y ago
By definition no, of course. But I have never done a non-trivial amount of open source-style work (coding or otherwise) with someone who shares their political views online, without learning about them somehow. And in fact, every Urbit cont
926.
▲
by
Rusky
10y ago
Because people don't just see Urbit, if they end up participating long-term. They see Yarvin, and he definitely is not one to hide his worldview. As much as some people like to pretend it's only about tech, tech is made by people
927.
▲
by
Rusky
10y ago
There are plenty of people working on this problem who aren't self-inflated racists. For example, https://sandstorm.io/ tackles a lot of the same questions without any of the deliberate obfuscation or insular community
928.
▲
by
Rusky
10y ago
Sticking the free in a destructor doesn't help you at all with memory safety, it just makes it easier to avoid leaks. Simple rules are, again according to the evidence, not good enough. There are simple rules you can follow in C as wel
929.
▲
by
Rusky
10y ago
Probably getting downvoted because the assertion that modern C++ solves memory leaks is getting kind of tired as far as Rust discussions go, and is also missing the point. Rust doesn't solve memory leaks, it solves memory unsafety - t
930.
▲
by
Rusky
11y ago
"A compiler is a computer program (or a set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language)" [0] Haxe does everything a typical
More ›