HNHacker News
TopNewBestAskShowJobs

jalbertoni

70 karma · joined February 8, 2020

submissionscomments
jalbertoni··on Unprecedented flooding in Brazil leaves hundreds of thousands displaced
> These are the factors I would like to know more about for the Brazil and China flooding... Is it just bad governmental town planning?

The systems Porto Alegre and Canoas had in place used to work. When the river there goes over 3 meters it starts to flood some places, okay? Once every few years there was a flood of like, 3.5 meters, 3.7 sometimes. Those were floods that rose slowly, giving ample time to answer to situations as they arose.

In this case, on the 2nd of May, the river reached 3 meters. By midnight, the river was at 3.60 meters already. 24 hours later, the river was at 4.9 meters, and it still rose, slowly now, to 5.3 meters.

The system that was in place was completely overwhelmed. Pumping stations failed and the water started coming through the pumping stations, for example.

That said, yes, the writing was on the wall. If a place regularly floods a bit to the point you need to have dykes and pumping stations in place, eventually it will flood a lot.

jalbertoni··on Non-Euclidean Doom: what happens to a game when pi is not 3.14159 (2022) [video]
You're confusing things a bit here, Boom is already an enhanced port and it got the kind of line-to-line teleport that allows you to do this.

Crispy and Chocolate Doom are what the community calls "vanilla" Doom, with no enhancements at all.

That said, if you are willing to hex-edit the map data, you can have non-euclidean geometry in vanilla Doom: https://doomwiki.org/wiki/Linguortal

jalbertoni··on Brazil judge orders temporary suspension of Telegram
> There's plenty wrong with the literal concentration camp they set up in Brasília too. People imprisoned without any charges. Only recently did they vote to turn some of them into actual defendants.

Welcome to the life of anyone accused of any charge in Brazil. The Criminal Process Code (Código de Processo Penal) allows for up to 81 days of jail without a charge. After that time ends they can just release you without a charge and you can't do anything about it.

If at any time before that period ends, if the prosecutor's office has started any form of case you can still be held for at least more 102 days before your trial, up to 180 if anything that delays any part of the process happens.

This happens every single day in this country to many persons and the media is only making a fuss because now it happened to a bunch of rich white people with a charge that doesn't allow for bail / habeas corpus. I am totally in favor of changing it, but I don't think my reasons are the same as yours, sadly.

> There's videos of him literally saying his objective is to install socialism in Brazil.

Lula is just like Joe Biden. Makes for nice strawman arguments, but anyone who stops and thinks on what they can realistically accomplish will see they're more of the same, except with a rainbow flag coating.

Words are empty without action, and Congress is set to stop any action; Just like for the previous 10 years PT was in power, where they at best passed a few stopgap measures that did nothing to stop the long term destruction of the middle class that started in the 80s, further throwing Brazil into inequality.

jalbertoni··on Brazil judge orders temporary suspension of Telegram
> The stroke of a pen makes police do whatever they want so yeah.

You mean like when an order telling the police to remove people camped in front of military bases asking for a coup was signed in early December, but it took until the actual coup attempt in January for the police to actually do anything about it?

Okay, no, let's be completely fair. The police was since December making sure the camped people didn't spill over into the street and block traffic. So yeah, the supreme court controls at least Judy Hopps.

> Hell, I remember watching a video of one of these judges literally say out loud he was proud of being partial towards the communists.

Assuming this is true, I'd really like to know what communists they were talking about. The current party in government was already considered in the 80s to be center-left, and they only mellowed more towards the center in recent years, with pretty much all internal factions that had moderately radical ideas leaving the party. Emphasis mine on the last line.

https://en.wikipedia.org/wiki/Workers%27_Party_(Brazil)#Fact...

- Workers' Cause (CO) – seceded from the party in 1990 as the Workers' Cause Party (PCO)

- Socialist Convergence [pt] (CS) – seceded in 1993 as part of Unified Workers' Socialist Party (PSTU)

- Workers' Socialist Current (CST) – seceded in 2004 to form the Socialism and Liberty Party (PSOL)

- Socialist Left Movement (MES) – seceded in 2004 to form the Socialism and Liberty Party (PSOL)

- Popular Socialist Action (APS) – seceded in 2005 and joined the Socialism and Liberty Party (PSOL)

- Tendency for the Workers' Revolutionary Party (TPOR) – Trotskyist faction that seceded in 1990 as the Workers' Revolutionary Party (POR)

- Marxist Left (EM), the Brazilian section of the Trotskyist International Marxist Tendency. Marxist Left released a statement saying that "for the revolutionaries, there is no more room for the construction of socialist ideas within PT".

jalbertoni··on Brazil judge orders temporary suspension of Telegram
Taken case by case, no. The absolute majority of those cases are used to get ISPs to block pirate streaming sites, or sites selling personal data.

However, once every few years, a high profile case suspending something like Whatsapp, Youtube, LinkedIn or Facebook appears. They are usually thrown out of appeals court so fast there's no time for the block order to actually reach the ISPs.

The ones that actually do result in a block have a police investigation behind it, making the whole bureaucracy more slow as there needs to be some back and forth between the police and the company. The fact that Telegram's entire team in Brazil is one lawyer might make this worse.

For example, this particular incident may have come from a misunderstanding. The police asked for all available data on all users of a group chat called "Movimento Anti-Semita Brasileiro" and another with a similar name. I hope the translation should be obvious.

What did Telegram deliver? The requested data of the group admin, not all users.

So now they get blocked until they deliver all the data.

Source for this incident, that is, the legal order for the block: https://www.conjur.com.br/dl/telegram-decisao-suspensao.pdf

jalbertoni··on The Bitcoin whitepaper is hidden in every copy of macOS
Older versions might be difficult to get in the future, difficulty reproducing results due to that, yadda yadda.

It works for most cases, but I can see why changing every year might be a deal breaker for some.

jalbertoni··on My Hardest Bug Ever (2013)
I once did some low-level GPU programming on a project aimed for the Samsung Galaxy S8. It was a case with extra features like an iris and fingerprint scanner, connected via the USB port.

It would work perfectly on our test phone and occasionally crash on other phones. Long story short, we narrowed it down to it crashing on phones with a specific SoC that was used in other parts of the world.

For some reason, when you copied an image straight from the phone camera (used to recognize and align eyes compared to the infrared iris camera) to the GPU and tried to access it, it would segfault in the non-western SoC. The data wasn't initialized yet.

My (hurried, we were releasing next month) fix was to add a rsdebug("This fixes a crash!\0"); to the code. The extra delay to go to the kernel and back fixed the race condition almost all the time. Someone later fixed my code from 99.99% stable to 100%, but I was in another project by that time, so I have no idea what they did.

jalbertoni··on Reverse engineering a mysterious UDP stream in my hotel (2016)
There's a very simple way around this. Grab any encoding that uses a dictionary, like, I think zip does. Sent tiny zip files with an excerpt of a .wav file or something that needs to be compressed.

The decompressed data is always the same, but the data in the dictionary used is where you store your sneaky bits.

Sure, that's still mildly suspicious. But way less than the actual music data changing all the time.

jalbertoni··on Ambient: The Multiplayer Game Engine
> Yes, this is performant enough for games. Yes, it's being done in AAA games.

Every time someone says something mildly controversial about weird technology being used for UI in games, I like to point out Skyrim used Flash for its UI. Bunch of .swf files inside the packed data file. It used some weird non-100%-standard player, but it was still Flash.

jalbertoni··on Furby source code (1998)
It really isn't that hard once you have to do it, as long as you have the time to get a test / feedback loop with the client going. They probably had a dozen test versions of the Furbies for whoever was doing QA to play around with.

With the moon lander code, they surely had a very good specification of what it was supposed to do.

I worked with the second case once, some IoT-ish sensors that would be buried in the ground in greenhouses, to monitor soil data. The business logic was 90% specified, and of course, the remaining 10% took 50% of the time. Before you ask why we didn't do it in C at the very least, we had a very solid codebase from the previous products. Sure, we had to port things from a Toshiba microcontroller to an STM8, different architectures, but since we were working with 8 or 16 bits inputs it was kinda trivial to test every single possible input to make sure things matched.

My only previous experience with assembly at a Computer History college course where we coded for the PDP-11, the 6502 and a stack machine. So yeah, not a lot. Winging it while admitting you don't know what you're doing can get you decently far in some circumstances.

jalbertoni··on “Unexplainable” core dump (2011)
Reminds me of what we dubbed "the cosmic ray incident."

During college, we were arranged in groups of 2 or 3 to do some pair programming for the more complicated exercises.

I had attached the debugger and had set a variable to 99, so the loop would execute one more time and we could test if our changes would work.

Went through the instructions step by step, and suddenly we got a segmentation fault. Between setting it to 99 and it accessing some data later on, the value changed to 107.

Quite a bit of confusion ensued. I made a backup of the executable before recompiling. Running them again, both the new version and the backup worked perfectly. The files matched bit for bit. To this day we have no idea what caused that bit flip.

jalbertoni··on Ask HN: What Happens to Older Designers?
This sort of Java is almost all about boilerplate and patterns. Two or three decent engineers taking a few days to plan for the rest of the project can write 90% of the huge amount of boilerplate that Spring Boot needs.

One might say not as agile as starting to code from day one, but I'd rather take an extra week than risk a major rewrite in the middle of development.

jalbertoni··on Ryzen 7000 amdgpu boot hang
How would it know if you haven't changed your RAM?

Consider that using the same settings with different parts might lead to subtle instability, not a full on-boot crash.

jalbertoni··on Ask HN: Is it still possible to live in a terminal?
I'm curious, how would you handle collaborative editing in nano? All the others seem doable if a bit hacky, but that one confused me.
jalbertoni··on CCPS, a Capcom CPS-1 SDK
A bit hard to get things to work. In case anyone else is trying, I got it to compile with go 1.19, and you also need a Street Fighter 2 rom. The roms folder needs both an original sf2.zip and a folder named sf2 with the extra files it generates.

From the github issues, the need for a rom may be removed someday, but until then, that's what you need.

jalbertoni··on Brazil's answer to the Sichuan pepper
It's a very local thing in the sense that outside Brazil it isn't well known. But nearly everyone in the country will have eaten one, it's quite popular. Hell, I like them so much, my wife gets me birthday pastels instead of birthday cake.
jalbertoni··on Doom Builder
The original Doom engine does not have it, but a very popular port called Boom added many new things and one of them was a silent teleporter, as in, walk over a line and get teleported to the same position in a line of the same length somewhere else. It can be used to make many interesting effects. I used them in... I don't want to say every single one of my maps, but 90% for sure. The one caveat is that they don't render what's on the other side, so you have to recreate the geometry manually and monsters will suddenly disappear or appear.

Vertical, floor-to-ceiling portals are a bit more new. I think only the Eternity Engine and GZDoom support those. They also support portals that render the other side, monsters and everything.

Edit: Oh, I forgot that you can get portal-like behavior in the Vanilla engine by hacking the BSP tree used for rendering, see https://doomwiki.org/wiki/Linguortal and also here for a more visual demonstration: https://www.doomworld.com/vb/thread/74354

jalbertoni··on Doom Builder
Came here to say this, yeah.

UDB supports a lot of the fancy new features from ports, like the Eternity Engine portals, or the 3d floors GZDoom gives you.

Even if someone wanted to map for good old vanilla limits, the newer nodebuilders can both minimize things like slime trails and add effects like infinite horizons (this one is fun, it rotates the wall rendering by 180 degrees and since it's a single-sided wall, it just keeps rendering the same floor and ceiling texture forever).

jalbertoni··on Ask HN: What game do you wish existed?
From my experience a boss battle or a dungeon run in Valheim takes all afternoon, and that's if you have a group supporting each other to make things quicker.
jalbertoni··on A single person answered 76k questions about SQL on StackOverflow
I guess he just really likes SQL. Can't blame him.
jalbertoni··on I hacked an office telephone to play Doom
I mean, Newton and Leibniz figured out calculus at the same time in slightly different ways. It is common enough, but still a nice coincidence when it happens.
jalbertoni··on Why is the US Green Party's site blocked?
Don't forget scaring away most of her leftist supporters by getting too cozy with megachurches; At least it sounds like you're talking about Marina Silva lol
jalbertoni··on What does 100% mean in CSS? (2020)
Not gonna lie, the last example made me happy, but my practical side was screaming "just use flexbox, jeez"
jalbertoni··on Main is usually a function, so when is it not? (2015)
Oh, I think you misunderstood me. Sorry.

I meant like, how can you be sure a compiler would interpret them correctly and give you the exact binary value you wanted.

And by different architectures, I meant more like, if you compiled it on Intel and AMD, could the results be different? Though I guess this part of the question makes no sense now that I think more on it.

jalbertoni··on Main is usually a function, so when is it not? (2015)
Genuine question, can you be sure the conversion wouldn't introduce a wrong bit here or there? Maybe in a different architecture or something?

I'm not that good with CPUs past 16 bits, this is really out of my comfort zone heh

jalbertoni··on How Fake Money Saved Brazil (2010)
Ah yes, what a good article; The one time the Brazilian Mises Institute admitted a leftist position in politics was right because it fixed a problem right-wing-economy politicians made it worse over the last decade.

One can genuinely laugh at how far they try to push a pro-huge-corporation view in the article, only to say the opposite two paragraphs later, blessing government regulations for fixing the economy.

jalbertoni··on I Made a Spotify Roulette Game
The first sentence, so we know what to expect. Right now, it's very "okay, this is a game, but how does it work?"

A pair of screenshots of a game in progress would also help wonders.

jalbertoni··on I Made a Spotify Roulette Game
You might want to add that to the site, so people don't have to create a game to know how it works.
jalbertoni··on Transiting the Suez Canal in a Private Sailboat (2003)
See, the problem is it's cheaper to pay all the bribes. Morality is good and commendable but in the end money speaks, at least in the shipping industry. The trip around it is way, way more expensive, both in time and fuel.
jalbertoni··on Duke Nukem 3D Mirror Universe
Didn't Quake require the 487 because it absolutely needed floating point operations, or did it just have horrible framerates without the 487 co-cpu?
Page 1 of 2Next →