Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sapiogram
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
211.
▲
by
sapiogram
3y ago
Focus on laying out all the pieces, such that there are no dead ends. There's very few ways to do that, afterwards you can quickly brute-force the rest. The winning move might be to not play, tbh. It was by far my least favorite level.
212.
▲
by
sapiogram
3y ago
Can someone just provide me the solution to #3? I literally cannot figure it out.
213.
▲
by
sapiogram
3y ago
> I’ve been writing Go for a while but never really thought about it. Don't feel bad, I've tried to do this in some places, but I'm not sure it's worth it. It adds a ton of boilerplate to Go's already verbose err
214.
▲
by
sapiogram
3y ago
His method was fundamentally sound though. He realized that moonlight is reflected sunlight, and that if you observe the angle between the sun and the moon in the sky at exactly half moon, you can calculate the distance to the sun relative
215.
▲
by
sapiogram
3y ago
Removing the GIL requires more locking/unlocking operations. For single-threaded program, it's a performance penalty on average: https://peps.python.org/pep-0703/#performance
216.
▲
by
sapiogram
3y ago
Housing isn't bitcoin, it's possible to make more of it. And that's the point: Rent control often ends up disincentivizes construction, making it worse for tenants in the long run.
217.
▲
by
sapiogram
3y ago
I only took a brief look, but from an API perspective, this seems identical to "normal" garbage collectors? In the sense that from the programmer's perspective, all the allocations live forever?
218.
▲
by
sapiogram
3y ago
> The fact that the author calls it a slab arena makes me think they did, indeed, intend for it to be used with a single type per arena. Maybe? But that seems strange, since they seem to have intended it to be used for http servers makin
219.
▲
by
sapiogram
3y ago
> I might be a bit ignorant here, but I was under the impression that this is what every program already does. It is not. Arena allocators have a fundamentally different API, because they don't allow you to de-allocate individual ob
220.
▲
by
sapiogram
3y ago
Looks like the arena is completely unsound if you mix types with different alignments? arena := NewSlabArena(8182, 1) // 8KB var b *byte = New[byte](arena) var i *int = New[int](arena) fmt.Printf("Pointer address:
221.
▲
by
sapiogram
3y ago
She has a PhD in astrophysics, with her academic work centered around the co-evolution of supermassive black holes and their host galaxies. As far as I can tell, she's still an active researcher, even though she clearly spends a lot of
222.
▲
by
sapiogram
3y ago
A rising tide lifts all boats. Maybe "most valuable tech company in the world" would be a more convincing argument, since the tide receded shortly afterwards.
223.
▲
by
sapiogram
3y ago
There just isn't enough memory bandwidth. Afaik dual-channel DDR5 still can't hit 100GB/s? Meanwhile the $270 RX 7600 has 288GB/s on-board memory.
224.
▲
by
sapiogram
3y ago
You also have to know whether it's `cd cmd; go run main.go` or just `go run cmd/main.go`. And you have to know to set CGO_ENABLED=0 if you want to run it on Linux instead of MacOS.
225.
▲
by
sapiogram
3y ago
> Level 2 - memory safe and data races allowed > Languages where parallelism is memory safe, but can still lead to data races. > This includes Java and Go. Despite this common misconception, parallel Go is absolutely not memory
226.
▲
by
sapiogram
3y ago
> So there is some plan :) How does that follow from the rest of your comment?
227.
▲
by
sapiogram
3y ago
> I read that each image generated might produce the same amount of carbon as driving four miles I can safely assure you that this is bullshit. Any electric car will use well over 1 Kwh to travel that distance. You can run two high-end G
228.
▲
by
sapiogram
3y ago
Can this also generate "universal" balancers? I've found them more useful in practice: https://wiki.factorio.com/Balancer_mechanics#Universal_balan...
229.
▲
by
sapiogram
3y ago
> The critique of induced demand is pretty much centered on the fact that urban sprawl is widely considered as bad, which the author does not seem to even acknowledge. Isn't this exactly what the author's point #2 ("More a
230.
▲
by
sapiogram
3y ago
I'm not sure how important the difference is in practice, offshore oil drilling sounds like something that can be easily disrupted during a war.
231.
▲
by
sapiogram
3y ago
In terms of military strategy, your argument might make sense, but it's unsound from a purely economic perspective. Norway's solution is far better: Drill the oil now, export it, and invest the money abroad . From the perspective
232.
▲
by
sapiogram
3y ago
It does. Not exactly surprising, since Rob Pike and Ken Thompson made both Golang and UTf-8.
233.
▲
by
sapiogram
3y ago
> According to some benchmarks I've seen (sorry no link), a system call in the middle of a memory heavy inner loop can impact performance for 100 us before performance is back to steady state. This is 100x longer than the system cal
234.
▲
by
sapiogram
3y ago
No scrolling with the scroll wheel though :(
235.
▲
by
sapiogram
3y ago
Go's "red" is also "function may return an error"
236.
▲
by
sapiogram
3y ago
> To me control flow is "if", "switch", "?:", etc. What article describes are abstractions. Thank you for articulating this, I also don't understand why the author puts operator overloading in the same
237.
▲
by
sapiogram
3y ago
A few counterpoints: * If going by the article, price has decreased from €130 to €95, a significant reduction even if not accounting for inflation. * RAM has doubled from 2GB to 4GB. * Per-core CPU performance has presumably increased consi
238.
▲
by
sapiogram
3y ago
No it's not.
239.
▲
by
sapiogram
3y ago
Or alternatively, the vector was created with `Vec::with_capacity()` or `ExactSizeIterator::collect()`, and had the correct capacity all along.
240.
▲
by
sapiogram
3y ago
It doesn't copy the elements if the source vector is already at max capacity, which you can often arrange for beforehand.
More ›