2,678 karma · joined Nov 28, 2019 (7y ago) · 1,132 submissions
comment 2y ago · link · parent
Example:
1. https://www.newscientist.com/article/2445967-astronomers-puz...
2. https://waybackinator.com/https://www.newscientist.com/artic...
3. "That URL is not available via the internet archive API."
Oh well.
comment 2y ago · link · parent
My experience with arena allocators comes from Bloomberg's C++ libraries[1]. For example, here's the documentation[2] for a thread safe heterogeneous allocator and header[3] for the underlying thread safe pool.
It uses a mutex, but at a glance only when it needs to consult the fallback allocator (which could involve a system call). If you knew that the fallback allocator were a pre-allocated arena, maybe you could do with atomics only. The free list is already lock-free, and so too could be the block list.
[1]: https://github.com/bloomberg/bde/wiki/BDE-Allocator-model
[2]: https://bloomberg.github.io/bde-resources/doxygen/bde_api_pr...
[3]: https://bloomberg.github.io/bde-resources/doxygen/bde_api_pr...
comment 2y ago · link · parent
I hope that there are people out there who know the true answer.
It takes a special kind of person to seek the truth about something that people feel so strongly about. The truth doesn't care about us or how we feel. Finding it is a thankless task full of distractions and dead ends. If a perspective makes sense and rings true to me, that says more about me than it does about whether the perspective describes reality.
comment 2y ago · link · parent
comment 2y ago · link · parent
It reminds me of <https://xkcd.com/627/>, but when you're launching a product that isn't good enough.
It's hard enough to open up a port even with uPNP (typically disabled) and other made-for-purpose tech. Torrent clients end up trying to poke holes and such. Service discovery might work via local UDP broadcast, or it might not. LAN clients might live at 10.* or 192.* or be isolated by default. It's easier to just go onto the public internet and contact some mysterious server. Botnet by design.
comment 2y ago · link · parent
I don't know if the circuit was through the running water or if it was the metal tap handles, but it was quite a jolt.
edit: Now that I try to remember it, it was definitely either the tap handle or the metal pipes. ZAP.
comment 2y ago · link · parent
The physicist's tensor is a matrix of functions of coordinates that transform in a prescribed way when the coordinates are transformed. It's a particular application of the chain rule from calculus.
I don't know why the word "tensor" is used in other contexts. Google says that the etymology of the word is:
> early 18th century: modern Latin, from Latin tendere ‘to stretch’.
So maybe the different senses of the word share the analogy of scaling matrices.
comment 2y ago · link · parent
Here's `isAsyncSafePoint`: https://github.com/golang/go/blob/d36353499f673c89a267a489be...
edit: The comments at the top of that file say:
// 3. Asynchronous safe-points occur at any instruction in user code
// where the goroutine can be safely paused and a conservative
// stack and register scan can find stack roots. The runtime can
// stop a goroutine at an async safe-point using a signal.comment 2y ago · link · parent
Then there's the async case for tight loops that I remember reading about back in 2020 (it uses unix signals), but don't yet fully grok the specifics.
comment 2y ago · link · parent
Now the Lorem ipsum is computer generated English instead of rote Latin, that's all.
comment 2y ago · link · parent
But when I hit the URLs with curl, without a cookie, I get a valid looking page, but it's just a hundred listings for "Baby Bok Choy." Maybe a test page?
After a little more fiddling, the server just responded with an empty response body. So, it looks like I'll have to use browser automation.
comment 2y ago · link · parent
3b. Realize that your outline is wrong. You did not fully understand the problem when you wrote it. Go back to step 1.
5. Realize that you are never completely done. You will not go back and perfect.
The result is... better than not making an outline, but it's hardly a game-changing approach.
I'm reminded of something that Mike Bloomberg wrote in his book: Make a detailed plan for your work. Write down every detail until you're satisfied that you know how to proceed. Then throw the plan away, because it is now worthless.
comment 2y ago · link · parent
Here's another approach. The AST of a .proto file is itself a protobuf. That's how the codegen plugins work. Protobuf also has a canonical mapping to JSON, so...
What you can do is use protoc to parse the .proto file, spit it out as JSON, and then process that data using your favorite pattern matching language. I wrote a [tool][1] that helps with that. For example, here's some [js code][2] that translates protobuf message definitions into "types" for use in an ORM.
[1]: https://github.com/dgoffredo/protojson
[2]: https://github.com/dgoffredo/okra/blob/master/lib/proto2type...
comment 2y ago · link · parent
I don't know if the renovation delay is classic lowest bidder contractor failure, grift, by design, or some combination. Anyway, no running water for people sleeping outside in my neighborhood.