Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hmry
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
211.
▲
by
hmry
1y ago
> This is one of the reasons why I switched to CLion You switched to CLion because MS does not allow forks of their editor to run MS-developed extensions?
212.
▲
by
hmry
1y ago
Of all the strengths that Java and C have, I would not call syntax one of them. :) So this title seems quite strange. Not the sales pitch I would make. It is understandable though, considering this language is 30+ years old. Probably not th
213.
▲
by
hmry
1y ago
I think the current plan is to integrate never-panic into the upcoming effect system (formerly keyword generics), along with const and async. So all these function annotations can share the same behavior and syntax, and higher order functio
214.
▲
by
hmry
1y ago
> Rust cares a lot about the contract of function signatures, and partial borrows violate the signature People want to be able to specify partial borrowing in the signatures. There have been several proposals for this. But so far nothing
215.
▲
by
hmry
1y ago
Neither of those gives memory safety, which is what the parent comment is about. If you release the temporary allocator while a pointer to some data is live, you get use after free. If you defer freeing a resource, and a pointer to the reso
216.
▲
by
hmry
1y ago
Level 4 / total programming languages are not turing complete. Because you can't simulate every turing machine in them, only some subset that provably halts. (And because the halting problem is undecidable, there will always be so
217.
▲
by
hmry
2y ago
The solution is to ask the OS to detect it for you. Linux offers a syscall for this (riscv_hwprobe). Has the drawback that it requires OS support, of course. But RVV requires OS support anyway (e.g. managing mstatus, saving vector registers
218.
▲
by
hmry
2y ago
Read-only parameters should be contravariant, write-only parameters should be covariant, and read-write parameters should be invariant.
219.
▲
by
hmry
2y ago
I hope lots of websites adopt this, mainly because I want to see more happy jackal girls while browsing.
220.
▲
by
hmry
2y ago
Every time that image goes viral, it's fun to see how many people in the comments are surprised by this. You're the lucky 10,000! "Why is Japanese like this" Not just Japanese! Subject-Object-Verb is the most common word
221.
▲
by
hmry
2y ago
Use $state()! to fix the undefined is not assignable error.
222.
▲
by
hmry
2y ago
Bringing a new meaning to silicon lottery. If you get lucky, you'll have 5% less of it!
223.
▲
by
hmry
2y ago
I generally agree, but the same thing also happens to Mullvad exit nodes (though not to the same degree.) Imgur is perpetually "over capacity", breaking images across multiple websites. Twitch tells me "your browser is not su
224.
▲
by
hmry
2y ago
Is there any place that actually sells the Musebook for that price? I was only able to find articles about it being "available for pre-order at $299.00", and one Aliexpress seller who wants 740,69€.
225.
▲
by
hmry
2y ago
The firewall just got ten feet taller
226.
▲
by
hmry
2y ago
3 hex digits = 12 bits = 4096 entries, the size of each address translation table on ARM. So it does make some (twisted) sort of sense. Assuming you're using 4k page size
227.
▲
by
hmry
2y ago
For those who don't know, Mitt Romney said this. "Some wonder why there was such overwhelming support for us to shut down potentially TikTok or other entities of that nature. If you look at the postings on TikTok and the number of
228.
▲
by
hmry
2y ago
I don't know what to tell you, there are just multiple ways to use the same words. What Rust calls enums are called tagged unions in most other languages. Enum usually refers to a simple collection of named values, what Rust calls fiel
229.
▲
by
hmry
2y ago
My best guess is they're referring to writing functions that initialize something using an "out" parameter in Hylo, which would be equivalent to a "&mut MaybeUninit<...>" parameter in Rust.
230.
▲
by
hmry
2y ago
> Golang has even better memory safety guarantees than Rust I don't think that's true at all. For one, Go has data races, which lead to undefined behavior and memory corruption. For example, appending to the same slice from mul
231.
▲
by
hmry
2y ago
> The time people spend fighting the Rust compiler for a project, they could have just written secure C I simply don't believe this anymore, based on the number of buffer overflow and memory corruption CVEs coming out of even mature
232.
▲
by
hmry
2y ago
"no longer developer friendly" referring to them re-pricing their API to make aggregating data for fun monetarily infeasible.
233.
▲
by
hmry
2y ago
Good question! It's 1/(2**23), because 32 bit floats have 23 bits after the decimal point
234.
▲
by
hmry
2y ago
FLT_EPSILON is not 0.01, it's 0.00000011920929. But it's impossible to have a number that's 0.00000011920929 less than 5.0, or 0.00000011920929 more than 5.0, because the floats with enough magnitude to represent 5 are spaced
235.
▲
by
hmry
2y ago
If the numbers you are comparing are greater than 2, abs(a - b) < FLT_EPSILON is equivalent to a == b. Because it's not possible for two large numbers to not be equal, but also closer together than FLT_EPSILON.
236.
▲
by
hmry
2y ago
This code is incorrect, but I don't blame them. :) Probably one of the most common float-related mistakes, even among people who "know how floats work". FLT_EPSILON is the difference between 1.0 and the next larger float. It&
237.
▲
by
hmry
2y ago
It's because that's what the GIF file format uses :)
238.
▲
by
hmry
2y ago
It's Godot but their twitter account is "less political"
239.
▲
by
hmry
2y ago
YES! It's so unbelievably annoying when websites just remove stuff from your playlists / bookmarks / whatever without telling you what was removed. For anyone stuck in this situation and willing to spend a few (many) hours to
240.
▲
by
hmry
2y ago
I don't know of any Unix that allows forward slashes in file names. On macOS you can use : which is displayed as / in Finder, but in exchange you can't put a : in file names...
More ›