Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Measter
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
Measter
11mo ago
There's no push to add Debian's officially supported platforms to Rust because Rust already supports those platforms.
32.
▲
by
Measter
11mo ago
Based on this, and many other similar threads, it's the anti-Rust zealots insulting Rust users.
33.
▲
by
Measter
11mo ago
Zig only does bounds checking by default in Debug and ReleaseSafe builds. If you build with ReleaseFast or ReleaseSmall it will happily do an out of bounds read: https://godbolt.org/z/733PxPEPY
34.
▲
by
Measter
11mo ago
There's already upstream rust support in GCC, so I don't reckon it's that far off from being usable, at least for projects choosing to target it specifically. The GCCRS project can't even build libcore right now, let alo
35.
▲
by
Measter
11mo ago
Not even close. Borrow checking takes less time than type checking.
36.
▲
by
Measter
1y ago
Wouldn't this also mean that if a user was using one of those browser extensions that automatically click "yes" to close the pop, then the site would not have informed consent, and therefore would not be allowed to collect th
37.
▲
by
Measter
1y ago
You have to get the bindings from somewhere, which means you either need to write them yourself, or use someone else's work.
38.
▲
by
Measter
1y ago
A few years ago I did some testing with a quick Arduino-based setup I cobbled together and got some interesting results. The first test was the simple one-light-one-button test. I found that I had reaction time somewhere in the 220-270ms ra
39.
▲
by
Measter
1y ago
For me it doesn't think I'm reading the prompt correctly, and refuses to accept the input. I'm also British, from Devon.
40.
▲
by
Measter
1y ago
It's not the lifetime of T, but the lifetime of whatever is storing T.
41.
▲
by
Measter
1y ago
You're right that Rust doesn't have constructors or assignment operators, but its abstract machine also views memory as simply being a bag of bytes, rather than inherently typed like C/C++'s model.
42.
▲
by
Measter
1y ago
Ironically, Rust doesn't need any of that, you literally can just cast to a different pointer type between arbitrary types and start using it without it inherently being UB (you know, as long as your access patterns are more generally
43.
▲
by
Measter
1y ago
Here's my experience of recommendations right now: videos I've already seen, videos on topics I have no interest in, or a completely empty page.
44.
▲
by
Measter
1y ago
You've misunderstood what Steve is saying, and what safe/unsafe means in Rust. In Rust, if I have a block of code that doesn't use any operations that require the unsafe keyword, then I am guaranteed (modulo compiler bugs) th
45.
▲
by
Measter
1y ago
It can be preferable to avoid unsafe when reasonable to do so. Programmers are merely human and will make a mistake at some point, and by avoiding unsafe you at least get the guarantee that the buggy behaviour is sound and (aside from race
46.
▲
by
Measter
1y ago
RefCell does do runtime checks, but the cost is checking the counter, a conditional branch, then incrementing/decrementing the counter twice. Because the counter is non-atomic and non-volatile the optimiser can sometimes optimise out t
47.
▲
by
Measter
1y ago
pub(crate) came later. I think it's something an edition could change, but I don't remember seeing people suggest it.
48.
▲
by
Measter
1y ago
The same Andrew who rejected even basic interfaces in favour of duck-typed generics or manually written vtables?
49.
▲
by
Measter
1y ago
In the section about the ambiguous provenance from synthesising pointers, it's explained that the compiler will infer the correct provenance from usage. Would it not be worth having some way for the programmer to inform the compiler di
50.
▲
by
Measter
1y ago
Prove it. Show me the stats that the standard library is over 50% unsafe.
51.
▲
by
Measter
1y ago
But many of those valid criticisms require some familiarity with the language. With syntax they can just point at it and claim it's bad without having to learn anything first.
52.
▲
by
Measter
1y ago
Oh this is simple, this is just a bit of basic expansion to generate boilerplate. The real experts can do some gnarly and amazing stuff with macros.
53.
▲
by
Measter
1y ago
For giggles, here's one I whipped up, along with an example use: https://godbolt.org/z/Eezj35dzc
54.
▲
by
Measter
1y ago
My biggest issue with the whole "function colour" thing is that many functions have different colours. Like, these two: fn foo() -> String fn bar() -> Result<String, Error> I can't just treat `bar` th
55.
▲
by
Measter
1y ago
I wouldn't agree with that. Jon's content is great, but it's really not aimed at beginners, and some of his stuff really gets into the weeds.
56.
▲
by
Measter
1y ago
It can do. Additionally, because each part is now smaller it's now easier to ensure that each part, in isolation, does what it says on the tin. It also means that other projects can reuse the parts. An example of the last point would b
57.
▲
by
Measter
1y ago
What you're calling "tree shaking" is more commonly called "dead code elimination" in compilers, and is one of the basic optimisations that any production compiler would implement.
58.
▲
by
Measter
1y ago
You could have a two-stage process. Stage 1 would be the proposal, where you have the discussion on whether the feature is desirable or not, which can then be provisionally accepted. At this point it is not in the standard. Then you have St
59.
▲
by
Measter
1y ago
I think one cause of this (and some other issues with LLM use) is that people see it exhibiting one human-level trait, its capability to use language at a human level, and assume that it then comes with other human-level capabilities such a
60.
▲
by
Measter
1y ago
I gave o4-mini-high a cropped version of a photo I found on Facebook[0][1], and it quickly determined that this was in the UK from the road markings. It also decided that it was from a coastal city because it could see water on the horizon,
More ›