Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
skitter
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
151.
▲
by
skitter
4y ago
It absolutely is common. People see there is a len function that takes one argument, they call len(some_collection), see that it indeed returns the number of items in the collection like they expect and move on. They don't expect len t
152.
▲
by
skitter
4y ago
Because people who don't want to access Wikipedia already can decide to not access it, but the ones who want to can't. Pakistan is not a singular person.
153.
▲
by
skitter
4y ago
These are also easier to read and write than the Python version, as you can just follow the dataflow from top to bottom (or left to right if it fits into a single line). In Python, your eyes have to jump around to find where to the next bit
154.
▲
by
skitter
4y ago
> There are so many Ruby features built in to the language itself. In the very first episode of this series, we dove deep into the internals of one such gem bundled with Ruby's standard library: IRB. Keeping on theme, I'd like
155.
▲
by
skitter
4y ago
Article mentions images embedded in the application, not computers embedded in another device.
156.
▲
by
skitter
4y ago
rustc got bootstrapped already, so download it. If you want to run the compiler itself on a new architecture, cross-compile. If you still decide to bootstrap it again, that's something that will only need to be done once. And even in t
157.
▲
by
skitter
4y ago
I have asked this question before, but why write an entirely new frontend, which is an enormous task if you want to reach a similar quality to rustc? rustc_codegen_gcc¹ adds gcc as a backend to rustc alongside llvm, miri and (wip) craneli
158.
▲
by
skitter
4y ago
You don't need to write an new frontend for that, just add libgccjit as a backend for rustc.
159.
▲
by
skitter
4y ago
Interestingly, on OpenBSD /usr/share/misc/airport lists IATA codes, but only adds airports where an OpenBSD developer has landed and confirmed it actually exists. Quoting the manpage: > There are also railway stations
160.
▲
by
skitter
4y ago
That's how it should work. But of course last week I revisited a project I wrote in C# too, this only 3 years old, and apart from dotnet complaining about the target framework not being supported any more, I couldn't get it workin
161.
▲
by
skitter
4y ago
I guess it's not strictly necessary to require a ':', but it tells people that a new variable is getting defined, instead of an existing one getting narrowed.
162.
▲
by
skitter
4y ago
If you want to have a Zig compiler written in Zig, you need to bootstrap it once initially. Cross compilation makes it so you don't need to do that again when you want the compiler to work on a different architecture. Of course, there&
163.
▲
by
skitter
4y ago
MemorySegment::adress only returns an address, which fits in 64 bit even on CHERI.
164.
▲
by
skitter
4y ago
> z and forward slash for left and right bumpers. Press and hold space to pull back launch plunger and release to launch. x and period to tilt table. Apparently these are used regardless of keyboard layout.
165.
▲
by
skitter
4y ago
Despite its name, libgccjit does aot just fine, e.g. as used in rustc's gcc backend. That said, I find your definition is the most meaningful.
166.
▲
by
skitter
4y ago
Since you have the concrete type, you can do stuff like storing it inline (which may not be possible if you don't know its size).
167.
▲
by
skitter
4y ago
Any optimization that causes undefined behavior is bugged – please report them to your compiler's developers.
168.
▲
by
skitter
4y ago
If UB happens¹, anything can happen. So if the check can only happen after UB, or leads to UB, it can be removed. That isn't the case in your example – testSomeState() can return false (and if it can't, it getting optimized out is
169.
▲
by
skitter
4y ago
You don't need to switch editions, new language feature generally are available in old editions too. For example, generic associated types, which came out two weeks ago, work fine in edition 2015.
170.
▲
by
skitter
4y ago
Things might be better now, but the previous false advertisement makes it really hard to tell. For example, vlang.io claims no undefined behaviour¹, but with struct Foo { bar int } println(&Foo(voidptr(some_address
171.
▲
by
skitter
4y ago
> Rust, has the same syntatic grey areas? I don't know enough about Rust, but from what I know it should have the same issues called out in the HAL paper OP cites. Which ones? Afaik in Rust it's always clear whether an identifi
172.
▲
by
skitter
4y ago
> the == equality operator is a bitwise comparison With floats being the exception
173.
▲
by
skitter
4y ago
++x and x++ just seem so unnecessary. Two extra operators for a very specific case, in which they either safe one character verses x+=1 or mix different mutations into the same line. Iterating a list by incrementing an index doesn't ev
174.
▲
by
skitter
4y ago
In this case `query_params` works well, but it's sometimes hard to find descriptive and reasonably concise names for the intermediate value. In those cases, the ideal would be using only postfix chaining, so that you can read it by onl
175.
▲
Cppfront
(github.com)
9 points
by
skitter
4y ago
|
0 comments
176.
▲
by
skitter
4y ago
Though I don't think looking at e.g. Pando and adding one to your count is particularly useful in this context.
177.
▲
by
skitter
4y ago
They are two byte per item; it's the bitmaps (>4k entries) that use 1 bit per item.
178.
▲
by
skitter
4y ago
Typically caching is not supposed to affect correctness, 'only' performance behavior.
179.
▲
by
skitter
4y ago
But in C, the first half of the 'or'-dtatement applies.
180.
▲
by
skitter
4y ago
A quick search turned up https://news.ycombinator.com/item?id=30178655
More ›