Validark

Joined 2 years ago

Karma
368
Submissions
130
Member since
Mar 23
https://validark.github.io
View on Hacker News

Recent submissions

Comment · 2 months ago
I hesitate to repeat it, but I've seen reels where a woman has remarked that she realized her husband spent more time inside of his mom than inside of her. That's a pretty weird mountain to climb if you ask me.

In my view, putting a number to some things profanes or perverts it. I don't think relationships or meaning is an equation that you solve by having the right number of hours allocated to them. I only think the numbers should come up when they are close to zero.

When I have free time, I think to myself I should try to do something with friends, especially going over to their homes. Playing games remotely is fun too, but being with someone in person I think ultimately has a bigger impact. Everyone has to find a balance that works for them.

But if you did get the real numbers, I've spent more time pooping, showering, sleeping, or chilling in utero than spending time with friends.

People in my family who have spent a ton of time with me get sick of me. I'm glad my friends mostly haven't gotten sick of me. I think there's a happy medium.

Comment · 3 months ago
The Big-O for sorting algorithms is typically on the number of comparisons. The problem with that is that a comparison takes 1 cycle and you can do 4 per cycle in scalar code or much more in SIMD. Obviously comparisons of doubles are going to be a bit more expensive. Memory reads, on the other hand, take 4 cycles from L1, 10 from L2, and it goes up from there. If you have a predictable memory access pattern, the CPU can preload everything into cache for you, and if you have a deep enough pipeline you can cover up memory reads. Memory access is often completely ignored when analyzing sorting algorithms.

Heapsort has the minimum number of comparisons. Search up "An optimal algorithm for deleting the root of a heap" by Svante Carlsson. Notice how Heapsort is commonly used only as a fallback sort? That's because minimizing comparisons isn't the most important.

Comment · 3 months ago
FACT CHECKED VERIFIED
Comment · 3 months ago
Thank you.

For wasting my time.

The only thing someone could learn from this is that CPU registers can be 8 bytes.

Comment · 4 months ago
I stand corrected! I stand by what I said about the old README though.
Comment · 4 months ago
I take issue with the statement that "tiger style" is marketed along with Zig. Tiger Style is neither convention nor standard, it's not on ziglang.org, it's not referenced by the Zig Core Team as the end all be all. At present I don't recall them ever referencing it, but I'm sure they have talked about it somewhere.

On the subject of Data-oriented design, it's mostly just the default way of thinking about software in most contexts. The DoD movement is not so much building on predecessors as it is ignoring predecessors who tell us to use OOP and "clean code" for everything.

LLVM is the part of Zig that breaks the most, it's the slowest part of the compiler by leaps and bounds, and takes the most time of the core team to fix the constant breakages it introduces. I'm glad it exists obviously, to some extent, but I wouldn't praise it for much more than its widespread appeal and ease of "adding another pass" compared to GCC and having more of a company-friendly license. It could have been designed a lot better and could be managed very differently and we'd see better results.

GPUI - I bet it's great. I guess I just tend to dislike phrasing like "stand on the shoulders of giants" because I tend to think the best thing hasn't been built yet. "Real engineering has never been tried!" I agree though that an AI port of a Rust library to Zig is probably not what any of us consider the holy grail of engineering.

In short, I think Zig and TigerBeetle and the Handmade Ethos exist not primarily because others paved the way, but because others went astray. Andrew Kelley used to argue with people online about how cross-compilation should be easy for systems languages and got hit by the excuse parade every time. Eventually he decided to quit his day job and solve it himself. Is that standing on the shoulders of giants? I don't think so. Yes, he has technically picked up where others left off, but he's picking up on abject failures and fixing them.

Now there is good engineering within LLVM and Clang, and good developers have done good work on it. I'm not saying everyone who worked on it is stupid or did bad work. However, there are glaring issues at a macro level and organizational level that individual contributors can't fix.

Comment · 4 months ago
Glad to see "Together we serve the users" come back. I miss the old Zig readme that said Zig comes with an MIT license and a humble request to build software that serves the users.
Comment · 5 months ago
What giants do "we" stand on?
Comment · 5 months ago
Justine, first I'll say I love APE and redbean and your articles on the code trickery you get up to. Of course, I hope you keep creating amazing software for us all to enjoy.

I want to zoom in on this:

"I am the intersection of so many unliked groups whose minds I've come to understand. If you were to use bayesian inference to compute the probability that I'm a good person, it would underflow a double. In practice, this just means I'm a curious person who hasn't had much to fear, since I've never had much to lose. If the day should ever come when society chooses to accept me, then the negative attention I've received will be viewed for what it really was, and then people will be able to safely examine my lifelong track record of kindness and conspicuous public service. All of the people I've talked to in my life will be influenced by my example and then stand a better chance of flourishing thanks to an increased interest in understanding."

I don't know your life, but I think it's more than possible that it's not merely a coincidence that you're at the intersection of so many unliked groups.

My brother once sent me a picture of a furry wearing a swastika armband asking if it's a real thing. My first reaction was a giant "WTF?!". My second thought was, you know, on some level, I gotta respect the hustle.

Someone really thought, "How can I be as revolting as possible to everyone? I can't LARP as a nazi, because then nazis would like me. Becoming a furry isn't enough either, because then furries would like me. But if I can stand at the intersection of all causes of disgust aimed at our fellow beings, then I will have proved my case."

I think the point of this line of thinking is different for different people, but the motivation could be a) because you want the world to hate you as you hate yourself b) you want to embody the negative underbelly of humanity to be a mirror so society or individuals within it can see their true nature. You want to have stones casted at you to prove that the rest of us are, in fact, the type of people who cast stones. Or c) it's just funny in some depraved way, "for the lulz" as they say. But, I assume you're already way past the point of laughing at the ridiculousness of this tired dance. You're a middle-aged adult who is struggling.

Well I, for one, won't cast a stone your way. I genuinely don't hate you at all. I admire your boldness and tenacity. "Donate so I can buy a private jet" is gold. I didn't really appreciate the mania or hyper-fixation roller coaster the article took me on, but I just found it unfortunate because I don't think this is the best way of thinking you could employ.

If at all possible, I think you should just try to be a "normal person" and think that that's an okay thing to be. By "normal", I mean not putting yourself in the crossfire. I still think you can and always will be technically extraordinary, and I don't think that's contradictory. You merely stop seeking rejection.

It seems to me, even as divisive as you may be, there have been many earnest attempts to integrate you into regular society, give you a super high paying job, and bring you into a context where you can innovate and push humanity forward. Why not just let that happen? Why not de-politicize just a little bit?

People will hate me for saying this or think I've licked too many frogs (I've never not been sober btw), but I have come to see a lot of political posturing as more arbitrary than not. I still know people have different visions for the world, and ideological differences that matter at a macro level, but to me, what really matters in life is looking other human beings in the eyes and having a connection to them. Sitting inside, alone, typing on a keyboard or phone, is anti-social, and it is against the nature of a human being.

I'm not telling you to give all of it up. But hopefully I've evoked at least one thought that encourages you to walk a path with a better outcome. You don't deserve to suffer your whole life, waiting for the world to accept you. I am sorry to hear about the tax situation and people who really have targeted you. I genuinely care and hope you find peace and healing on the inside. And stop reading internet comments.

Comment · 5 months ago
Comment · 5 months ago
I'm team Zig in most cases but I genuinely think they are better off with Rust. They have had a lot of buffer overruns and segfaults as a result of undisciplined Zig code. I think Rust actually is a better technical choice for them.
Comment · 5 months ago
Are you kidding? IIRC Oven gave $5k/month to Zig for years. And btw that was before they got acquired for billions, when they had no income at all.
Comment · 5 months ago
I'm a full time Zig developer, and I see this as an absolute win. I know Jarred has said in the past he feels Zig makes him more productive, but I also think it's fair to say Bun was programmed in a way that's quite cavalier towards buffer overruns. I think Jarred and the Oven team will have significantly better luck with Rust.

Some commenters have remarked they only heard of Zig because of Bun, therefore this is bad for Zig. Not so. In my opinion, there has always been a mismatch. I say with no ill will that a divorce is likely better for both parties. I genuinely believe Bun will be better software once fully converted to Rust.

Comment · 6 months ago
I am personally moving in the opposite direction. I haven't meaningfully used a signed integer in years, and I see signed integers as being for more niche use-cases. I mainly only use a signed types when I want to do a "signed shift right". If there was a >>> operator in Zig I wouldn't even think of signed integers.

Given your examples, I think you'd have fewer issues if you were working with unsigned integers exclusively. Although I'm curious about what other code you were referencing with this: "But seeing how each change both made the code easier to reason about and more correct, I couldn’t deny the evidence."

With regards to modulo, in Zig if you try to use it with a signed integer it will tell you to specify whether you want `@mod` or `@rem` semantics. In my case, I'd almost never write `x % 2`, I'd write `x & 1`. I do use unsigned division but I'd pretty much never write code that would emit the `div` instruction.

I'm not saying you're wrong though! Everyone has a different mind. If you attain higher correctness and understandability through using signed integers, that's great. I'm just saying I'm in the opposite camp.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton