Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
proto_lambda
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
151.
▲
by
proto_lambda
4y ago
https://archive.ph/YjOfv
152.
▲
by
proto_lambda
4y ago
That's the wrong repeat(), I was talking about str::repeat(): https://doc.rust-lang.org/std/primitive.str.html#method.repe...
153.
▲
by
proto_lambda
4y ago
Rust uses `repeat()`, which sounds much more descriptive to me. The types in the function signature make the "clone" part of the name redundant.
154.
▲
by
proto_lambda
4y ago
Other than that being a terrible name (it's almost impossible to be sure what it does without consulting documentation), I personally do prefer fewer implicit/overloaded operations.
155.
▲
by
proto_lambda
4y ago
Title should be "PAM", not "Pam".
156.
▲
by
proto_lambda
4y ago
Qm.n notation is for fixed point numbers, not floating point. As OP said, floating point was not a viable option at the time.
157.
▲
by
proto_lambda
4y ago
A typo of "compiler", I'm fairly certain.
158.
▲
by
proto_lambda
4y ago
> It basically won’t compile if your code would have runtime errors or memory leaks While Rust does move a lot of errors from runtime to compile time, there are still a lot of ways to create runtime errors (which must obviously the cas
159.
▲
by
proto_lambda
4y ago
Wait, what? How could electric resistive heating with its 100% efficiency possibly be less efficient than gas or oil, which are the main alternatives in use at this point? Heat pumps have >100% efficiency, which makes them stand way out
160.
▲
by
proto_lambda
4y ago
Not just heat pumps, but also electric water heaters, which are standard issue for older apartment buildings (those without central hot water).
161.
▲
by
proto_lambda
4y ago
From Carbon's FAQ[1]: > Why not Rust? If you can use Rust, ignore Carbon. So that's probably one reason. [1]: https://github.com/carbon-language/carbon-lang/blob/trunk/do...
162.
▲
by
proto_lambda
4y ago
Of all the examples in this thread, this is the only one that isn't a plain HTML page, but rather a pile of javascript that takes several seconds to load and shows nothing but an "enable javascript" banner without JS. Despica
163.
▲
by
proto_lambda
4y ago
While I think shadowing is great for code readability and I've never encountered a bug caused by it, you can always make sure clippy doesn't let you do it by putting a `#![deny(clippy::shadow_reuse, clippy::shadow_same, clippy::sh
164.
▲
by
proto_lambda
4y ago
> I'd rather program fail at compile than runtime, and rather it fail loudly than quietly. I agree! I was just illustrating the kind of tradeoff that has to be made for that to be possible.
165.
▲
by
proto_lambda
4y ago
To expand on your float sorting example, sorting a slice[1] in Rust requires the element type to implement the Ord trait, i.e. be totally ordered. Trying to sort a slice of floats will result in a compiler error, even though it might be tot
166.
▲
by
proto_lambda
4y ago
Not on stable, but you can on nightly (though it's still quite wonky): https://play.rust-lang.org/?version=nightly&mode=debug&editi...
167.
▲
by
proto_lambda
4y ago
What kind of primitives are you talking about here? In my experience you don't really have to manually instantiate anything other than a PLL or maybe a multiplier unless you're doing something very specialized.
168.
▲
by
proto_lambda
4y ago
I remember them offering a software (or maybe a webpage, though it would've likely been a Java of Flash applet at the time) that allowed users to create official-looking manuals for their own creations by interactively specifying the b
169.
▲
by
proto_lambda
4y ago
Quoting from the last time this was posted ( https://news.ycombinator.com/item?id=31456007 ): I'd proceed with caution. Apparently it doesn't support Wayland, so when you run it under Wayland it offers you a "F
170.
▲
by
proto_lambda
4y ago
At time of writing, bing translator translates this: January 2022 February 2022 March 2022 April 2022 May 2022 June 2022 July 2022 August 2022 September 2022 October 2022 November 2022 Decem
171.
▲
Bing translator mixes up month names in dates
(bing.com)
2 points
by
proto_lambda
4y ago
|
2 comments
172.
▲
by
proto_lambda
4y ago
We'd need an even more unholy name for `unsafe { foo.unwrap_unchecked() }`!
173.
▲
by
proto_lambda
4y ago
There is a problem here - it's verbose and prone to silent-ish breakage if the surrounding context changes e.g. due to refactors (well, probably not with this tiny example, but I hope you know what I mean). Thankfully, there is also a
174.
▲
by
proto_lambda
4y ago
> Matrix.org which nobody seems to want to use and I’m not sure why Lots of people are using it (and probably more every day), but there are also some quite vocal haters. Of course it has its share of problems (availability of non-Electr
175.
▲
by
proto_lambda
4y ago
Oh yeah, that's indeed not great. For messages with up to ~5 lines, the bridge actually just sends several messages, but as soon as the message has more lines than that, it only shows the first line as a preview. I could've sworn
176.
▲
by
proto_lambda
4y ago
> Use a pastebin That's not a solution, that's a bad and inconvenient workaround. Having to use an external service just to share a couple lines of code is horrible for usability. Funnily enough, its also exactly the thing that
177.
▲
by
proto_lambda
4y ago
Ben Eater makes amazing educational videos, unfortunately he's been MIA for half a year now. His patreon sneakily got updated from a "per video" to a "per month" payment model a couple months ago (this has since bee
178.
▲
by
proto_lambda
4y ago
Well, good thing people don't need your approval for their cooking. You should still stop spreading rhetoric like this because, as the central topic of the article demonstrates, some people will still take it to heart even though their
179.
▲
by
proto_lambda
4y ago
I would argue ducks are more mobile than your average glass of kefir.
180.
▲
by
proto_lambda
4y ago
One big hurdle for C++ programmers learning Rust that I've seen time and time again in various community support channels is fixing their trust issues with the compiler. They are so used to compiler output being useless or worse than u
More ›