HNHacker News
TopNewBestAskShowJobs

vdupras

358 karma · joined October 13, 2024

http://duskos.org/
submissionscomments
vdupras··on The Weird Concept of Branchless Programming
In that context, it's not very small, it's 20% (all instructions are register-to-register instructions, so they all have the same weight). It's huge.

Yes, there's the possibility that ecx is used elsewhere, and in that case, my second comment is irrelevant, because I was answering to the possibility that such big wart is to be expected from compilers because they crop up regularly.

But then again, it's unlikely that it's used elsewhere, because eax has the return value of the C snippet, there's nothing else to do, the function can return. So the original question remains: did this come from a C compiler? If yes, it's crappy code.

vdupras··on The Weird Concept of Branchless Programming
So why does conventional wisdom say that compilers will, in the vast majority of the time, outperform programmers doing assembly by hand? It seems contradictory to me.
vdupras··on The Weird Concept of Branchless Programming
In the part about "abs", there's an assembly breakdown:

mov eax, edi

sar eax, 31

mov ecx, eax

add edi, ecx

xor eax, edi

Has this been generated by a C compiler? If yes, it's a bit puzzling, because can't you remove "mov ecx, eax", replace "add edi, ecx" by "add edi, eax" and have the exact same result?

vdupras··on Trump Clears Way for Cronies to Buy TikTok for $14B
Is this coordinated with other countries? In other countries, people will stay on the ByteDance TikTok, no? Won't this make the "isolated" TikTok much less interesting?
vdupras··on The Theatre of Pull Requests and Code Review
A while ago at a past job, I was working on OpenERP (now called Odoo I think). This "community" had instated this kind of "mandatory community review" policy so that each change had to be reviewed by X developers from other organizations. I kind of virtuous web of review.

But the thing is: this code is terrible and huge chunks of it are a unholy mix and match of code written for very specific purpose for this or that client, with this very weird "falsely generalized" code. I don't know how to call that: you have some very specific code, but you insert useless and probably buggy indirections everywhere so that it can be considered "general". The worst kind of code.

Anyways, I was asked by my boss to do such a review. I look at it and I realize that building a database setup to be able to properly run that code is going to take me weeks because I'm going to have to familiarize myself with tons and tons of modules I don't know about.

So I write down my estimate in our tracker: 1 month.

He comes back to me, alarmed. A whole month? Well yeah, otherwise I can't even run the code.

All you have to do is look at the code! What? No way, that ain't a review. Well, I ask you to do it as such. I'm not writing LGTM there.

So I was never asked to do reviews there again (in fact, I stopped working on OpenERP at all), but I could see "LGTM" popping up from my colleagues. By the way, on OpenERP tracker, all you ever saw in review logs was "LGTM" and minor style suggestions. Nothing else. What a farce.

So yeah, as the article says, there are some "LGTM-inducing" type of PRs, but the core of the problem is developers accepting to do this "LGTM-stamping" in the first place. Without them, there would only be reviewable PRs.

vdupras··on Easy Forth (2015)
I remember, many years ago, when I was learning programming. When I grokked recursion, it was a revelation to me. Could I be a programmer without that revelation? Yeah, kind of, but I'd be a lesser one.
vdupras··on Easy Forth (2015)
It's fine, I can't force you in either. Maybe one day you'll dive into the subject. From the look of the comments here, you have all the hints you need.
vdupras··on Easy Forth (2015)
The mapping to assembly of:

42 = if ."hey!" then

is much more straightforward than

if (n == 42) printf("hey!");

I understand that to the newcomer, it might not appear that way, but implementing a Forth is really eye-opening in that regard.

If I might allow myself a bit of promotion, I wrote https://tumbleforth.hardcoded.net/ as such an eye-opening process. It's less "gentle" than Easy Forth here, but it digs deeper.

vdupras··on Easy Forth (2015)
No, that's not it. It's much simpler than that, yet has much deeper implications than you think. You don't see it in other languages. The closest thing would maybe be compile-time macros in Zig? But in Forth, the power it unlocks comes in its purest form, without any fluff around it.
vdupras··on Easy Forth (2015)
As @addaon writes, your missing ingredient is immediateness. This is one of the most powerful, yet mind-boggling aspects of Forth. I encourage you to check it out, it will make you grow as a developer.
vdupras··on Easy Forth (2015)
Unlike most languages, Forth has two stacks. It sounds trivial, but it changes many things. It allows for a leaner call convention. With a single stack, every function call has to "shovel forward" its arguments over the function return address, where Forth "glides" through its arguments, making function calls significantly lighter.
vdupras··on You did this with an AI and you do not understand what you're doing here
What if it was some kind of "meta DDoS"? I mean, you can DDoS a server with simple requests, but here the effect is meta: it "DoS"es real humans. What if someone had something to gain from doing this? The tools to do this seem to all be there.
vdupras··on The sordid reality of retirement villages: Residents are being milked for profit
I think that saying this is a convenient cover up of the shortcomings of our own culture. I really don't think that in all of human history, there's been no culture having a more healthy relationship with their elderly. I'd even wager that it's pretty easy to find counter-examples.
vdupras··on Slack has raised our charges by $195k per year
HN moderation is routinely put in front of the most interesting dilemmas! Your response is, of course, sensible. Let's hope that if Slack does something similar to another non-profit, then it will rise again on the top of the front page, so that it doesn't end up being a story of "I got my free pass because I was lucky enough that the press talked about me", when others get a similar treatment, without the deserved PR nightmare that comes with it.

I mean, objectively, unless it was an honest mistake, which we can generously assume because this is HN, this was a really cheap shot, worthy of Broadcom and friends.

vdupras··on Hosting a website on a disposable vape
"we'd", you mean in a collapse scenario? Forths are, by nature, "collapse-friendly", but one particularity with Collapse OS and Dusk OS is that they are fully self-hosted. This includes the tools necessary to improve upon themselves.

From a quick glance, it looks like BogdanTheGeek's Forth is written in C, which means that it's not self-hosted. If all you have is that disposable vape with this Forth in it, you lack the tools to deploy it on another machine or to improve it in place.

One could also port Collapse OS to ARM. I guess it wouldn't be a very big effort.

vdupras··on Hosting a website on a disposable vape
ARM is an interesting proposal if you want to order a SBC online and run software on it. Soldering an ARM CPU with low tech tools? That's something else.
vdupras··on Hosting a website on a disposable vape
Even for a Forth, 3KB of RAM is rather tight. Dusk OS intentionally de-prioritize compactness and it couldn't run on that amount of RAM. It can get a C compiler loaded in about 100KB of RAM, but 3? not enough to boot.
vdupras··on Hosting a website on a disposable vape
You're much more likely to stumble one something more modern, but that modern something is also much less repairable. It's great if it works and if it can run Linux or Dusk OS, but when it can't, you're out of luck.

With a 6502 or other such CPU, the machines you scavenge them from are much more repairable and adaptable. You can use those components like lego blocks. It breaks? either repair it or strip the working parts to use in another frankenstein computer.

vdupras··on Hosting a website on a disposable vape
You begin by making a pen "from just the elements", then work your way up to there.

In other words, it's a huge challenge, but 6502 is closer, in complexity, to the pen than to the, say, AMD Ryzen.

But the primary idea behind Collapse OS isn't to run from 6502 built from the ground up (although it partly is), but to run from frankenstein cobbled up machines made from scavenged parts.

vdupras··on 'Block Everything' protests sweep across France, scores arrested
... and then the second republic, and then the second empire, and then a republic again. All part of the same movement.
vdupras··on 'Block Everything' protests sweep across France, scores arrested
I agree that the way I framed the comparison of the american civil war and the french revolution might appear disingenuous because of the omission of the napoleonic wars. It crossed my mind to include it, but because the parent comment was specifically about the Terror and because it doesn't change the core or outcome of the argument, I left it out to avoid the fluff.

I would also be tempted to begin arguing that it might be reasonable to leave out the napoleonic casualties out of the "what good has ever come from getting rid of rich people as a society?" question and I think I could make a case that stands, but I prefer to yield right now :)

vdupras··on Show HN: I built a minimal Forth-like stack interpreter library in C
Your experiment is certainly a good tool to grok stack mechanics, but that is only one element of what makes a Forth what it is. You're missing out on other crucial ingredients: colon definition and immediateness.

I wrote a series of articles that can help in that kind of discovery: http://tumbleforth.hardcoded.net/

vdupras··on 'Block Everything' protests sweep across France, scores arrested
I stated this as a matter of course (as in, we'd see broad support for absolute monarchy in France if that wasn't the case), I have no insider information, I'm not even French. It seems I need to clarify "good move".

If your question is "was the Terror awful?", I'm sure you'll have a near totality of french people agreeing with you. If you ask "in retrospect, was the Terror awful enough so that the French nation would have been better off without its Revolution?", then I don't think you'll get many agreement.

The deaths associated with the Terror were plentiful, that's true, but this period was also carefully framed by the bourgeois class who took power afterwards. In terms of deaths, it's around 40k people. The american civil war was 700k deaths. Before Trumpism, would any american say out loud that abolishing slavery wasn't worth it?

vdupras··on 'Block Everything' protests sweep across France, scores arrested
As Tocqueville writes in "De l'ancien régime et la révolution", centralization was already underway since Louis XIV, and heavily. Napoleon just picked up on it and continued the process.
vdupras··on 'Block Everything' protests sweep across France, scores arrested
Do you know of a french person who wants to return to the Bourbon rule? me neither. They like that they live within a republic. A revolution was necessary to achieve this. Hence my parent comment.
vdupras··on 'Block Everything' protests sweep across France, scores arrested
You'll see a lot more of the "dirt poor" class in american cities than in french ones. On that aspect, America is closer to third world countries than France.
vdupras··on 'Block Everything' protests sweep across France, scores arrested
The French Revolution is generally regarded as a good move. It did get rid of a lot of rich people.
vdupras··on 'Block Everything' protests sweep across France, scores arrested
10 years of covering 100% of spending? That sounds like a really sweet deal to me, and more than enough to invest into the nation enough to go back to a balanced budget in that time frame.

I mean, try it with yourself. Imagine that you take your current salary, keep it for 10 years, and have 100% of your spending covered? How life changing would that be to you? Probably a lot.

vdupras··on South Korea: 'many' of its nationals detained in ICE raid on GA Hyundai facility
Going from an empire/reich to a democracy ain't quite the same thing as a presidential election. The USA will have a hard time recovering from institutional damage being done to it right now.
vdupras··on South Korea: 'many' of its nationals detained in ICE raid on GA Hyundai facility
I think it's important to note that they were friends after a regime change.
← PreviousPage 5 of 11Next →