Better HN
topnewbestaskshowjobs
Log inSign up

RustyRussell

1,432 karma · joined May 20, 2011 (15y ago) · 286 submissions

[ my public key: https://keybase.io/rusty; my proof: https://keybase.io/rusty/sigs/uWS-VceJTes_fyFrtfO5WNTj-smrhHV67zLX0yUDzhI ]
Submissions

comment 4y ago · link · parent

(2013)

Though I responded in 2012, so it may be older (the log on the site says 2013 though).

FWIW, my response, as FHS editor:

https://rusty.ozlabs.org/?p=236

comment 4y ago · link · parent

It says not to combine refactoring with bug fixing. But like any advice, it's relative: a drive-by cleanup can be easier for everyone than reviewing a separate PR. And sometimes a refactor makes the bug (and all related ones!) vanish or trivially caught.

To quote Kernighan and Plauger: "Don't patch bad code: rewrite it".

comment 4y ago · link · parent

I once submitted a bug fix for an obscure issue to valgrind. They asked for a test case, which I managed to provide, but I was a bit nervous as I couldn't immediately see how to fit in their test suite.

The response from Julian Seward was so nice it set a permanently high bar for me when random people I don't know report bugs on my projects!

We still run our entire testsuite under valgrind in CI. Amazing tool!

comment 4y ago · link · parent

From TFA:

"And it’s not just servers. With about 8 billion transistors on a single die, a mobile phone can get so hot it might need to spend a few minutes in a refrigerator. When that happens, the apps will fail to function correctly."

Such a weird way to phrase this! All I can think is ".. and it's hard to use your phone when it's in the fridge"?

comment 4y ago · link · parent

Me too! Awesome, thanks!

comment 4y ago · link · parent

We autogenerate our CHANGELOG.md extract from Changelog-[section] our git commit messages (Release Captain massages them if necessary), and have a GH bot which checks that you have a Changelog- note somewhere in your PR commits (can be Changelog-None: ....).

This avoid merge hell on the CHANGELOG.md file.

comment 4y ago · link · parent

Yes, your recollection matches mine. Various bases were searched, after being given a hint.

The point was that this is what proof of a Creator would look like (and the aliens suggested there were others).

It was, IMHO, a giant gauntlet thrown down to religious folk. And elegantly done, too.

comment 4y ago · link · parent

I read an internet review of Starship Troopers so good that it made me go and watch that (terrible) film again.

Took me a few minutes on DDG, but enjoy: https://agapow.net/misc/humour/starship-troopers-a-review/

comment 4y ago · link · parent

I felt this way at the first company I worked for; fortunately I started hacking on g++ where I definitely was not in the same grade as the other devs. That started a life-long career in Open Source, where I never maxxed out again.

But I agree with everyone else here: time to move to a bigger pond.

comment 4y ago · link · parent

Indeed, we're seeing this happening. Bitcoin mining will pay $$$ for your waste power, and an increase in waste power is the problem with wind and solar.

We need a shitload of green generation infrastructure, and Bitcoin is going to pay for it. Sometimes the world is weird, sorry.

comment 4y ago · link · parent

I use JSON schema for this, by integrating it into our CI so it checks all the JSONRPC calls and responses.

(Helps that our test suite is in Python, which has great JSON schema support).

comment 4y ago · link · parent

I'm sorry, this simply isn't true. Lightning is exactly a method of settling Bitcoin fast, and not centralized.

(Source: I implemented the first Lightning node, was original chair of the spec process, and have worked full-time on Lightning for over 6 years).

comment 4y ago · link · parent

Sure, but when I was a kernel dev I considered it a reasonable line: it's not that hard to create your own kernel if you want a different licence.

It was one reason I worked on the kernel: that all your software should be hackable. I probably would have found something else to do if the licence were different.

comment 4y ago · link · parent

Anyone know how this compares with jsmn? https://github.com/zserge/jsmn

comment 4y ago · link · parent

Importantly, prior to this (and, hell, even since) state of the art was to try atomically, then yield (or sleep(0)) then try usleep.

The kernel had no idea what was going on, so had no idea how to schedule such a thing. It particularly didn't know to wake you when the lock (which it has no idea about) became available.

comment 4y ago · link · parent

> Its name unfortunately looks similar to mutex but it's not a lock.

Hmm, looking at the latest source code, my original quote has been split, but:

* Fast Userspace Mutexes (which I call "Futexes!").

* (C) Rusty Russell, IBM 2002

...

* "The futexes are also cursed."

* "But they come in a choice of three flavours!"

https://github.com/torvalds/linux/blob/master/kernel/futex/c...

comment 4y ago · link · parent

I still retch when told memcpy and memset cannot take NULL and 0 length.

Try asserting that they're not NULL in glibc and try to boot your machine! Oops... bad compiler people, bad!

comment 4y ago · link · parent

As the person who originally proposed what Jon ended up calling the Maniacal Supporter level, I've asked him to double the rate.

$1k a year (deductible) is a bargain when Linux and FOSS is literally your career.

(Disclosure: I let mine lapse after I retired from kernel maintenance, but I'm thinking of renewing since I still get value mainly be following links from HN)

comment 4y ago · link · parent

That's weird, because I don't see it that way.

I look at Ingo, Dave Miller, Richard Henderson and Andrew Tridgell who are ~ my generation, all both better coders than I will ever be and really nice people to work with.

Then I look at young coders like Olaoluwa Osuntokun and Bastien Teinturier who are also great to work with and who I can only keep up with because I have years of experience, and it completely keeps my massive ego in check!

comment 4y ago · link · parent

I disagree, but it's really up to Linus.

I'd expect it'll go in in pieces, after a bit of bikeshedding and a few iterations of archs fixing up compilation (struct task changes mainly).

comment 4y ago · link · parent

Ingo Molnar was always one of my favourite scary kernel devs. This kind of massive rewrite was always a key strength of OG devs, who were prepared to tackle maintenance tasks beyond the limits of mortal sanity. The result of such ongoing struggles is why the Linux kernel still works after decades of active development, despite radical changing requirements.

comment 4y ago · link · parent

I am reminded of The Simpsons here, in a different context:

"Even the car chase seemed tacked on!"

I'm not sure a Hollywood version of this history would benefit the world in any way.

comment 5y ago · link · parent

The core of the Linux kernel, in my experience. It's regularly refactored by grizzled oldtimers, which helps as standards rise.

comment 5y ago · link · parent

I've heard horror stories from Google engineers, but I don't think they're public so I shan't quote them.

I am tempted to put a reminder in my calendar for a few years' time to see where this engineer is, though...

comment 5y ago · link · parent

Ok, I have to admit I LOL at the bottom of this critique of MySQL code quality to hear he was going to work on Google Chrome!

comment 5y ago · link · parent

You want this:

https://rusty.ozlabs.org/?p=560

Hope that helps!

(And yes, the CCAN memeqzero routine is the same as yours above in form).

comment 5y ago · link · parent

No, he's not, and he's stated he's not.

(Disclaimer: I work for Blockstream)

comment 5y ago · link · parent

I didn't know it even supported Eth!

comment 5y ago · link · parent

CCAN's htable uses open addressing, and bit stealing from the pointers for maximal density (extra hash bits go here to avoid derefs for misses).

The result is that performance tends to be great up to about 95% full. The resize operation is a dumb double-and-rehash, but for most programs, the lower cache impact is a win.

comment 5y ago · link · parent

I disagree: BTCPayServer is pretty smooth these days.
1
456
10