Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
messe
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
181.
▲
by
messe
10mo ago
> This explains several Raspberry Pi oddities: > The Raspberry Pi has No BIOS / UEFI This isn't really that strange for an ARM SoC.
182.
▲
by
messe
10mo ago
I think Hiberno-English uses them even more.
183.
▲
by
messe
10mo ago
An integral trick I picked up from a lecturer at university: if you know the result has to be of the form ax^n for some a that's probably rational and some integer n but you're feeling really lazy and/or it's annoying to
184.
▲
by
messe
10mo ago
The context: > Do not fall into the trap of anthropomorphising Larry Ellison. You need to think of Larry Ellison the way you think of a lawnmower. You don't anthropomorphize your lawnmower, the lawnmower just mows the lawn, you stic
185.
▲
by
messe
10mo ago
> Refactoring and plumbing code to change where io happens is going to be a nightmare. I doubt it. It's pretty rare that I want to change something deep in my code to suddenly want to do IO. This has been a non-issue for me with Zig
186.
▲
by
messe
10mo ago
> I think EU should go back to build good relationships with Russia This is horribly naïve at best. You're suggesting building good relationships with a country waging a war of aggression with a neighbour it shares with the EU. A co
187.
▲
by
messe
10mo ago
> Observe how quiet your conversation can be at 80mph. It might change your perspective a bit. Take a train some time. It might change yours.
188.
▲
by
messe
10mo ago
I was slightly wrong. You can manually mirror things, but they have removed a feature that allowed one to automatically mirror repositories hosted elsewhere. It was originally intended as an ease of migration tool, but ended up consuming to
189.
▲
by
messe
10mo ago
The function being called has to take into account thread safety anyway even if it doesn't do IO. This is an entirely orthogonal problem, so I can't really take it seriously as a criticism of Zig's approach. Libraries in gene
190.
▲
by
messe
10mo ago
> You just accept passing it around in every function In every function that needs to allocate yes. Sometimes, it'll be stored in a struct, but that's rare. And not every function needs to allocate. > and now passing around
191.
▲
by
messe
10mo ago
> Seriously though the big problem to solve will be squatters, when there are three logical places for a module to be hosted I suspect Codeberg, which is focused on free software, will frown on them. They already disallow mirroring.
192.
▲
by
messe
10mo ago
How so? Aside from regular old thread safety issues that is.
193.
▲
by
messe
10mo ago
It doesn't and likely never will. This has been a non-issue for years with Allocator. I fail to see why it will be a problem with IO.
194.
▲
by
messe
10mo ago
Storing an Allocator alongside the container is an additional 16-bytes. This isn't much, but starts adding up when you start storing other objects that keep allocators inside of those containers. This can improve cache locality. It als
195.
▲
by
messe
10mo ago
> Whether the implementation of a function performs IO is in principle an implementation detail that can change in the future. I think that's where your perspective differs from Zig developers. Performing IO, in my opinion, is categ
196.
▲
by
messe
10mo ago
What about it? It gets called without an Io parameter. Same way that a function that doesn't allocate doesn't get an allocator. I feel like you're trying to set me up for a gotcha "see, zig does color functions because i
197.
▲
by
messe
10mo ago
You will need to pass that for synchronous IO as well. All IO in the standard library is moving to the Io interface. Sync and async. If I want to call a function that does asynchronous IO, I'll use: foo(io, ...); If I want to
198.
▲
by
messe
10mo ago
Let me rephrase, you can't call it like any other function. In Zig, a function that does IO can be called the same way whether or not it performs async operations or not. And if those async operations don't need concurrency (whi
199.
▲
by
messe
10mo ago
Ah, I think we might have been talking over each other. I'm referring to the interface not guaranteeing anything, not the particular implementation. The Io interface itself doesn't guarantee that anything will have started until t
200.
▲
by
messe
10mo ago
> The article makes it seem like "the plan is set" so I do wonder what that Todo looks like. Is this simply the plan for async IO? There's currently a proposal for stackless coroutines as a language primitive: https:/
201.
▲
by
messe
10mo ago
But you can't call it from synchronous rust. Zig is moving toward all sync code also using the Io interface.
202.
▲
by
messe
10mo ago
It's not guaranteed in Zig either. Neither task future is guaranteed to do anything until .await(io) is called on it. Whether it starts immediately (possibly on the same thread), or queued on a thread pool, or yields to an event loop,
203.
▲
by
messe
10mo ago
> The one thing you could say is that using some kind of token makes it dead simple to have different tokens. But that's really not something I run into often at all when using async. It's valuable to library authors who can no
204.
▲
by
messe
10mo ago
Synchronous Io also uses the Io instance now. The coloring is no longer "is it async?" it's "does it perform Io"? This allows library authors to write their code in a manner that's agnostic to the Io runtime th
205.
▲
by
messe
10mo ago
> Every struct or bare fn now needs (2) fields/parameters by default. Storing interfaces a field in structs is becoming a bit of an an anti-pattern in Zig. There are still use cases for it, but you should think twice about it being
206.
▲
Zig's new plan for asynchronous programs
(lwn.net)
341 points
by
messe
10mo ago
|
264 comments
207.
▲
by
messe
10mo ago
Nope, a[b] is equivalent to *(a + b) regardless of a and b.
208.
▲
by
messe
10mo ago
What networks are you using without ICMP? Presumably you're also using systems that don't support Unix Domain Sockets which can be configured as SOCK_STREAM, SOCK_DGRAM, and even gasp SOCK_SEQPACKET (equivalent to SOCK_DGRAM in
209.
▲
Addressing the adding situation
(xania.org)
272 points
by
messe
10mo ago
|
99 comments
210.
▲
by
messe
10mo ago
And you think you're more likely to get those four hours in an open office environment with distractions aplenty, as opposed to my effectively noise-proofed home office where I can actually focus?
More ›