HNHacker News
TopNewBestAskShowJobs

0x1ceb00da

369 karma · joined December 16, 2023

submissionscomments
0x1ceb00da··on Stepping down as Mockito maintainer after ten years
> some attacks that can be done in JS or Python cannot be done in Java

Examples?

0x1ceb00da··on Jonathan Blow has spent the past decade designing 1,400 puzzles
The programming language will ship with a smaller version of sokoban as demo.
0x1ceb00da··on Jonathan Blow has spent the past decade designing 1,400 puzzles
> I found them quite boring since they are all repetitions on the same theme - just drawing lines on a square.

And programming is just pressing buttons on a keyboard.

0x1ceb00da··on Jonathan Blow has spent the past decade designing 1,400 puzzles
I think release trailers and announcement trailers are different things. This is what came up when I searched for announcement trailer of witness.

https://www.youtube.com/watch?v=amR6LmU6bzg

0x1ceb00da··on The era of jobs is ending
We're at the bargaining stage now.
0x1ceb00da··on Decreasing Certificate Lifetimes to 45 Days
What kind of issues do you usually face?
0x1ceb00da··on My dad could still be alive, but he's not
Malpractice can turn a simple case into a repeat customer. Infinite money glitch.
0x1ceb00da··on Dark mode by local sunlight (2021)
This should be an OS feature and apps should just use the system theme.
0x1ceb00da··on Futurelock: A subtle risk in async Rust
> I always said if your code locks or use atomics, it's wrong.

Why atomics?

0x1ceb00da··on Show HN: Lights Out: my 2D Rubik's Cube-like Game
What if there was only one white block on the grid?
0x1ceb00da··on Cancellations in async Rust
> an insane amount of things

List a couple

> TCP connections are an illusion of safely

Why?

0x1ceb00da··on Cancellations in async Rust
I'm curious. Can you talk a little about that function?
0x1ceb00da··on Cancellations in async Rust
tokio-postgres handles this by just dispatching the "ROLLBACK" command in impl Drop and ignoring the response. https://github.com/rust-postgres/rust-postgres/blob/a7a49a90...

Is this not enough? What could go wrong? If the network connection dies or the task is cancelled, I'm assuming the database server cleans up the connection state and does a rollback automatically.

And adding async Drop will probably add a whole new set of footguns.

0x1ceb00da··on Fernflower Java Decompiler
Intellij
0x1ceb00da··on Man still alive six months after pig kidney transplant
A human counting is also a mechanical watch made of cells.
0x1ceb00da··on Man still alive six months after pig kidney transplant
But why cows and pigs and not chimps?
0x1ceb00da··on Wild performance tricks
You can enable overflow panics in release build, so if you're a library, you have to play it safe because you don't know how people will build your library.
0x1ceb00da··on Wild performance tricks
> A safe section of code that panics unexpectedly might preserve memory safety invariants but hork the higher-level logical invariants of your application

The usual way of dealing with this is to use impl Drop to cleanup properly. Resources are guaranteed to be dropped as expected on panic unwinds. Eg the database transaction rolls back if dropped without committing.

> Imagine an attacker who can force a panic in a network service, aborting his request but not killing the server, such that the panic on his next request grants him some kind of access he shouldn't have had due to the panic leaving the program in a bad state.

You need to be more specific. Why would the web server be left in a bad state because of such panics (in safe rust). All the memory will be cleaned up, all the database transactions will be cleaned up, mutexes might get poisoned, but that's considered a bug and it'll just cause another panic the next time someone tries to lock the mutex.

0x1ceb00da··on Wild performance tricks
> If you panic in the middle, the money is lost.

Wouldn't a relational database help deal with this?

> Without noexcept, it's hard to reason about which calls can panic and which can't, so it's hard to make bulletproof cleanup paths.

Unsafe blocks usually contain very low level code, so you can understand what your code does very accurately. If the unsafe code calls a dependency which calls 150 other dependencies transitively, yeah, that's going to be pretty bad.

0x1ceb00da··on Wild performance tricks
I see. These optimisations might not be UB as understood in compiler lingo, but it is a kind of "undefined behaviour", as in anything could happen. And honestly the problems it might cause don't look that different from those caused by UB (from compiler lingo). Not to mention, using unsafe for writing optimised code will generate same-ish code in both debug and release mode, so DX will be better too.
0x1ceb00da··on Wild performance tricks
> That's why wild has performance tests, to ensure that if a change breaks rustc's ability to optimize, it'll be noticed, and therefore fixed.

But benchmarks won't tell us which optimisation suddenly stopped working. This looks so similar to the argument against UB to me. Something breaks, but you don't know what, where, and why.

0x1ceb00da··on Wild performance tricks
> Great example of Rust being built such that you have to deal with error returns and think about C++-style exception safety.

Not really. Panics are supposed to be used in super exceptional situations, where the only course of action is to abort the whole unit of work you're doing and throw away all the resources. However you do have to be careful in critical code because things like integer overflow can also raise a panic.

0x1ceb00da··on Wild performance tricks
> It’d be reasonable to think that this will have a runtime cost, however it doesn’t. The reason is that the Rust standard library has a nice optimisation in it that when we consume a Vec and collect the result into a new Vec, in many circumstances, the heap allocation of the original Vec can be reused. This applies in this case. But what even with the heap allocation being reused, we’re still looping over all the elements to transform them right? Because the in-memory representation of an AtomicSymbolId is identical to that of a SymbolId, our loop becomes a no-op and is optimised away.

Those optimisations that this code relies on are literally undefined behaviour. The compiler doesn't guarantee it's gonna apply those optimisations. So your code might suddenly become super slow and you'll have to go digging in to see why. Is this undefined behaviour better than just having an unsafe block? I'm not so sure. The unsafe code will be easier to read and you won't need any comments or a blog to explain why we're doing voodoo stuff because the logic of the code will explain its intentions.

0x1ceb00da··on Zed's Pricing Has Changed: LLM Usage Is Now Token-Based
Intellij wasn't immune to it either. Number of bugs has exploded since they started adding ai features to their ide, none of which I used for more than 5 minutes.
0x1ceb00da··on If you are reading this obituary, it looks like I'm dead
The joke is "be positive"
0x1ceb00da··on Microsoft memo advises H1B employees to return immediately if currently abroad
Yep, it's definitely designed to target indians. Navratri starts on monday lol.
0x1ceb00da··on Microsoft memo advises H1B employees to return immediately if currently abroad
It's exactly like the tariff war with china. India refused to put sanctions on russia (who helped india in its wars with pakistan, who received help from USA), so now trump is saying we don't want your people in here. The outcome is probably going to be similar to the tariff war as well. They'll start out with totally absurd bullshit and then come down to something more reasonable. Maybe $10-20k per worker per year. From the point of view of the state, humans are just another resource, like crude oil. If you don't have something, you import it. And what's happening right now is haggling at the global scale. It's just a bunch of gorillas thumping their chests. Nobody cares about the citizens.
0x1ceb00da··on Claude can sometimes prove it
How many LOC?
0x1ceb00da··on Claude can sometimes prove it
80-100 will take orders of magnitude more time (might even be impossible) if you don't understand 0-80 thoroughly.
0x1ceb00da··on KDE is now my favorite desktop
Last time I used kubuntu ~5-6 years ago and it was pretty buggy. Has that improved? I'm on pop os and would probably just apt install to try it out. Is the kde version on pop os lts buggy?
← PreviousPage 4 of 11Next →