Better HN
topnewbestaskshowjobs
Log inSign up

nmilo

1,205 karma · joined Jan 2, 2022 (4y ago) · 235 submissions

Submissions

comment 1y ago · link · parent

There’s a severe crisis every 10 years. Do you really want to be at a point where the next one topples us?

comment 1y ago · link · parent

No, GenericWriter takes a function at compile time and it gives you a GenericWriter struct that calls that function (at compile time), no function pointers needed.

comment 1y ago · link · parent

This is exactly Zig's strength, not its problem. The flexibility/lack of interfaces allows you to choose the correct abstraction for the given task. In C++, every writer is `anytype`, in Java every writer is `AnyWriter`, in Rust every writer is `GenericWriter`. They all have tradeoffs but "fits better due to language design" shouldn't be one of the tradeoffs considered.

comment 1y ago · link · parent

The line of thinking is right there: "not sending any info to anyone else anywhere at any time"

There are way more egregious privacy concerns than sending non-reversibly encrypted noisy photos to Apple. Why draw the line here and not the far worse things happening on your phone and computer right now?

comment 1y ago · link · parent

I'm not really sure what to say to this, other than watch this video and apply similar thinking to this problem: https://www.youtube.com/watch?v=EK32jo7i5LQ

The leaf structure itself doesn't really have anything to do with ZF set theory or Von Neumann ordinals, other than supplying the inspiration for the base structure. Same way prime numbers don't generate the spirals in the video, all numbers do. So leave the ordinals out of this, experiment with different tree construction methods and you might uncover something cool about trees (but not necessarily about set theory)

comment 1y ago · link · parent

The author misses the whole point of abstractions, and that is a layer B that covers layer A so completely that no one using layer B needs to know how layer A works at all, except for those working on the layer A/B bridge.

For example, binary logic is a perfect abstraction over semiconductor physics. No one doing computer science needs to understand anymore the complexities of voltages and transistors and whatever. TCP is a perfect abstraction over IP. Memory as a big array of bytes is a perfect abstraction over the intricacies of timing DRAM refreshes.

And that's about it. No one reading this post has written an abstraction ever. (a leaky abstraction is not an abstraction). So yes, actually, abstractions are free, and they don't leak. That's the whole point. The problem is that what you call an abstraction isn't an abstraction.

Computer science's complete failure to create a new abstraction since like TCP intrigues me. Why don't we have a system X that abstracts over memory accesses so well that no one needs to know anymore how caches or memory locality works? Why aren't there entire subfields studying this?

comment 1y ago · link · parent

You can just pop the second stack at each function return, though that does limit its use to only really scratch-space for dynamically sized objects. Like this: https://nullprogram.com/blog/2023/09/27/. “Arenas” are passed by value so their end pointer will auto reset when the function returns.

comment 1y ago · link · parent

The 2 stacks is really cool. Seems like it solves a lot of problems dynamic allocation + RAII solves. Is there more written about this?

comment 1y ago · link · parent

It should be easier now with const generics, I know the popular C++ library looks like Value<Unit, T, L, M, ...> where the letters are numbers representing the dimension of time, length, mass, etc. So m/s^2 would always be Value<f64, -2, 1, 0, ...>. By keeping it normalized you don't need Equivalent or whatever

comment 1y ago · link · parent

> However, the most vocal opposition came from a static analysis perspective: Making null pointers well-defined for zero length means that static analyzers can no longer unconditionally report NULL being passed to functions like memcpy—they also need to take the length into account now.

How does this make any sense? We don't want to remove a low hanging footgun because static analyzers can no longer detect it?

comment 1y ago · link · parent

No shit. The whole point of being a parent is to give your kids as much privilege as you can. Why are you talking like it's a bad thing? My parents moved here to bring me a better life than them and I'm working to give my kids a better life than me. Are you planning on hoarding all your money and making your kids stock shelves to keep them away from "privilege"?

comment 1y ago · link · parent

Almost the perfect language. I don't get why it's they didn't make it compatible with normal Go. It should have been like Typescript where you can compile plain Go, it just adds features on top it. The "let" and struct changes are totally unnecessary. Then you can interop with existing libraries and convert large Go projects to this incrementally.

comment 2y ago · link · parent

You can encode a promotion as the destination file plus rank 1-4 for the 4 different kinds, since pawns can't move backwards

comment 2y ago · link · parent

Not sure the author's use case the naive solution seems like just using 6 bits for the piece's original position, 6 bits for the destination, and 2 bits to designate promotion type, for 14 total bits. Everything else can be found from the board state, and I can't imagine a scenario where you have a move, want to convert to algebraic notation, and also don't know what the board is.

comment 2y ago · link · parent

I'm not sure... wasm is an assembly, not a C implementation. It can define what happens if you load from 0 but it doesn't get to define if the C code `*nullptr` actually loads from 0. Whether or not it does is defined by your compiler, which is probably the clang frontend if you're on emscripten. But then again I think there's a clang flag to disable optimizing away reads/writes to nullptr.

comment 2y ago · link · parent

This is nice. I tried to set up something similar using wasm-pack and npm but the whole thing was kind of a mess. Though I heard the emscripten backend is deprecated/unsupported/WIP? Anyone know if that's still the case?

comment 2y ago · link · parent

Haha this is awesome, Good Will Hunting 2 is probably my favourite bit from a comedy movie.

comment 2y ago · link · parent

How so?

comment 2y ago · link · parent

David Graeber in Utopia of Rules:

> "When historians write the epitaph for neoliberalism, they will have to conclude that it was the form of capitalism that systematically prioritized political imperatives over economic ones. That is: given a choice between a course of action that will make capitalism seem like the only possible economic system, and one that will make capitalism actually be a more viable long-term economic system, neoliberalism has meant always choosing the former."

> [...]

> "If the ultimate aim of neoliberal capitalism is to create a world where no one believes any other economic system could really work, then it needs to suppress not just any idea of an inevitable redemptive future, but really any radically different technological future at all. There’s a kind of contradiction here. It cannot mean convincing us that technological change has come to an end—since that would mean capitalism is not really progressive. It means convincing us that technological progress is indeed continuing, that we do live in a world of wonders, but to ensure those wonders largely take the form of modest improvements (the latest iPhone!), rumors of inventions about to happen (“I hear they actually are going to have flying cars pretty soon”), even more complex ways of juggling information and imagery, and even more complex platforms for the filling out of forms."

The system we are in is inert and we need more than ranked voting to fix it.

comment 2y ago · link · parent

Agreed. Even "AI" is a bit loaded; we had half a century of Terminator, Asimov, 2001, etc. We should call them by implementation; neural networks, transformers, language models, etc. The plus side is that it's harder to generalize statements about all three---there is very little to generalize in the first place---and that asking "is a transformer conscious" at least sounds more ridiculous than asking "is AI conscious."

comment 2y ago · link · parent

This to me is the real problem, "AI safety" can mean about a million things but it's always just whatever is most convenient for the speaker. I'm convinced human language/English is not enough to discuss AI problems, the words are way too loaded with anthropomorphized meanings and cultural meanings to discuss the topic in a rational way at all. The words are just too easy to twist.

comment 2y ago · link · parent

Self-replication is only dangerous because it creates more physical "stuff" to cause harm, exponentially fast. But the exponential is the dangerous part, not the replication. A software program replicating itself might seem dangerous until you realize that it's limited by the hardware of the single machine it runs on, so you can only really call it one total "organism." Otherwise a fork bomb would have already killed the human race.

comment 3y ago · link · parent

If a border agent called me suspicious based only on my passport then yeah that is racism

comment 3y ago · link · parent

Ok so if you're not going to switch then don't talk about it. Google will continue to make Chrome shittier and more user-hostile much like every product they've ever released since they were founded and people like you will continue to go "yeah but what about app mode or whatever." It's not ideology, it's history.

comment 3y ago · link · parent

I'm so glad you got to be technically correct today.

comment 3y ago · link · parent

You're right actually, I forgot all Russians share a bank account with Putin.

comment 3y ago · link · parent

This is literally just racism.

comment 3y ago · link · parent

This would only work if the chromium source was included in the training set.

comment 3y ago · link · parent

So switch then instead of just talking about it. It's not a big deal, it takes like 1 minute, and no one can seriously tell me you have a significantly different browser experience on Chrome vs FF.

comment 3y ago · link · parent

It's pretty obvious if you click the link:

> We’ll require creators to disclose when they’ve created altered or synthetic content that is realistic, including using AI tools. When creators upload content, we will have new options for them to select to indicate that it contains realistic altered or synthetic material. For example, this could be an AI-generated video that realistically depicts an event that never happened, or content showing someone saying or doing something they didn’t actually do.

It's for faked realistic videos. Scripts are unrelated.

12345
8