Better HN
topnewbestaskshowjobs
Log inSign up

knuckleheads

1,063 karma · joined Jul 28, 2020 (6y ago) · 251 submissions

humble proprietor of various web properties
Submissions

comment 4d ago · link · parent

In about an hour or so, I'll have a rough automatic informalization of this up on https://digestivo.dev. I've been working on a way to digest these proofs faster via parsing lean and translating it into natural language and this is as good as time as any to finally launch this thing.

2.

GraalVM fixed the java4shell bug in September(github.com ↗)

2 points · by knuckleheads · 6d ago · discuss

comment 1w ago · link · parent

I've wanted these for measuring how much force is applied via the hands during partner dancing for a long time. There's a lot of subtly there that isn't visible and I've long wondered how to measure and visualize that. Very neat! Hope I get to try one someday.

comment 1w ago · link · parent

Thanks! Great Friday night reading, thank you! Will return when I have some questions.

comment 1w ago · link · parent

Doing my best to do this in such a way that it could be! Can't make any promises at this point. Headstart I don't think could be as it stands, but I have high hopes for Breakneck. As well, I think it'll be possible to offer Breakneck as a continually updated extension of nightly, so it could just be another version of nightly that one could install and use until maybe someday hopefully something like it is upstreamed.

comment 1w ago · link · parent

After working on https://github.com/PowderworksCode/headstart and some good conversations with the compiler team, I've been working on finding a way to make big changes to speed up rust while also respecting their wishes around the usage of LLM's. I don't really want to support a vibe slopped fork of rustc/cargo that is full of patches that are pretty much immediately out of date, and I don't think anyone else does either, at least not in a long term dependable way. I also don't feel like recreating daemons from the ground up, I would rather build on top of what already exists and make that compile faster and have better performance.

https://breakneck.powderworks.dev/

It's not done yet nor do I have enticing numbers to show, but I think in a few weeks Breckneck Rust will be someplace nice. For big changes such as getting all crates in the same process, I've been having Claude develop and use a mass static code rewriting tool. So instead of having an agent go and found all the places where LOCAL_CRATE_ID is defined and used, a query finds it and then rewrites can target it and it's surroundings.

My hope is that mass code rewrites are more acceptable to the compiler team, in that they can author, review and debate the rewrites ahead of time without any time pressure. Listening to the team, there were things they might want to do/try (dropping memory, all crates in one process), but the changes are so comprehensive that to do them by hand is effectively a stop the world process. With mass code rewriting tools, it should be possible to rerun the rewrite on main whenever, and as well, any work that others have going on in pr's can likewise be transformed without any impact. This way takes a bit of coordination, but not years and years of it.

Similarly, it's not clear that any of the big changes are actually worth it yet. Maybe dropping memory is a meh, or compiling all the crates at once is not that big a win. I can run this on nightly and keep up to date with what's going on there while experimenting with weird stuff, without wandering out into the wilderness with a hard fork. Maybe there's a way to 100x perf on the other side, and if a pathway can be shown to get there in theory via agents, then the team can find their own path there that fits their attitudes around use or none use of agents and we all benefit. Exciting times!

comment 2w ago · link · parent

hahah great project, the video had me laughing. and yes! exactly that for me. very silly now in retrospect, because they were just copy pasting the title of my project, and I can only imagine how it sounded when they were sending you stuff about a talking bass.

comment 2w ago · link · parent

About two weeks ago I posted a project I've been working on to Show HN[0], and I included an email address in the post itself, curious about what would happen. It received 0 votes and spent about 30 minutes on the Show page. Safe to conclude, a handful of people saw it at most and I need to work on my marketing.

I received no less than 20 automated low effort email about this post, telling me about how they had added my project to their website, and how they wanted to help me promote it. All I had to do was sign up for their service, create an account, verify that everything looked good on their prefilled out post, etc. I tried this for one of the emails to see what would happen, and at the very end, they say, oh, we have a queue of several hundred projects right now actually, but if you want to jump to the front it only costs $28, limited time offer, just for you!

I had one nice conversation with somebody otherwise, they were also pitching a sort of lead gen sales thing built on AI but more hand made? Unclear, but it was a cute back and forth. On the whole an interesting experiment, though not one I'll be repeating again anytime soon if I can help it.

[0] https://news.ycombinator.com/item?id=50187882

comment 2w ago · link · parent

Ur is an (very in-progress) universal formatter and linter for every programming language. It's in preview right now, which just means friends are messing around with it and having a good time pointing out all the bugs. Docs are mostly up to date, but buyer beware. Implementation wise, it's the Rascal meta language reimagined in Rust with some features from JastAdd thrown in there for good measure. Ur is incremental/persistent between runs, it's built on top of Mambo, a library that drops in as a replacement for Salsa and persists all queries to disk automatically.

https://ur.dev/en/

Ur has some pretty good static analysis and code rewriting tools hidden inside of it that'll get documented later on. These tools have been developed in tandem with a static mass rewrite of some core parts of the Rust compiler. It's very much not done, but it's made pretty good progress towards putting all crates in one process, dropping memory after a crate is done compiling, and full incremental support across all commands. Here is a literate program that explains why, how and which changes are being made (I haven't read all of it myself yet, lots still changing). Aiming to have this out by end of the month.

https://breakneck.powderworks.dev/

comment 3w ago · link · parent

Ur is an (in-progress) universal formatter and linter for every programming language. It's in preview right now, which just means friends are messing around with it and having a good time pointing out all the bugs. Docs are mostly up to date, but buyer beware.

https://ur.dev/en/

11.

Show HN: Professionally maintained Tree-sitter compatible WASM grammars(powderworks.dev ↗)

1 points · by knuckleheads · 1mo ago · discuss

comment 1mo ago · link · parent

If others find beauty in something, should I not want to also try and see it?

Some things take time to learn to enjoy. I've bounced off things in the past several times before I started to really enjoy them later on. I'd like to think my experience with media is not just a random walk through whatever is in front of me and that I can direct that experience, at least a bit.

comment 1mo ago · link · parent

I’ve tried both! Both fun in their own ways but they never caught me long term. Sausage rolls was fun but it just got too hard.

14.

Endgame: Singularity(emhsoft.com ↗)

2 points · by knuckleheads · 1mo ago · discuss

comment 1mo ago · link · parent

I am generally not a fan of Sokoban puzzles, but I told myself that Order was the best chance to fix that so I’ve been forcing myself to play it. I don’t find myself actively wanting to sit down and play it, the puzzles don’t attract me that way, but once I do, I’ll play for about five hours at once. Great game.

comment 1mo ago · link · parent

Good question! They get marked as such and then typechecked as part of the early work before metadata is written/sent out. If they error out, crate fails, nothing happens, same as today. In practice, on the crates I was testing, there was more "regular" functions than these, so we could still get some good perf gains. https://github.com/PowderworksCode/headstart/blob/1c9d5cd691... https://github.com/PowderworksCode/headstart/blob/1c9d5cd691...

comment 1mo ago · link · parent

It’s a neat idea. My impression is that it would go against the grain of the compiler currently. The rmeta file and lots of the other rust outputs aren’t meant to be that stable that it could be portable like that. I’ll certainly mess around with this some and see if anything comes of it though!

comment 1mo ago · link · parent

I would be very curious to know how that test went please!

comment 1mo ago · link · parent

Yes, if you mostly have no extra cores already or if you have very wide unrelated deps, this mostly does nothing. Typically, this is not the case though so there is some good perf gains.

comment 1mo ago · link · parent

I wanted everything in one repo and this worked well enough. For presenting to rust compiler team I forked the repos in question and made branches for review with the patches.

comment 1mo ago · link · parent

Yes it's a pretty well thought out policy. It feels bad for someone to put in a month of work and have their code ultimately rejected, but if an llm does something sloppy with some light guidance in a few days, then great, experiment with some weird stuff and see what happens, then once you know it probably should work, go in for that month of work and make it happen.

comment 1mo ago · link · parent

(Copying and pasting from what I posted in rust zulip)

There is an .early-rmeta file that is generated that contains the result of type checking the outer part of the functions (arguments, returns) that is then passed down to all the other dependencies that can use it and get a "headstart" on their work. -Zearly-metadata is the flag for Rustc here to turn that on. It also needed to learn how to swap the real metadata in for the early stuff that it was previously using, once the real stuff showed up.

Rustc needs to be able to pause and resume at certain points and Cargo needs to be know how to look for and react to that, which is what -Zheadstart does for Cargo. So there's some changes job_queue that happen to there. I haven't checked this directly yet, but my understanding is that it doesn't kill the process, it just has it sit and wait, which normally would occupy a slot, but doesn't any longer. ---

So not a cache, just being able to pause and start work and better utilize the available slots.

comment 1mo ago · link · parent

Talking with them presently! This specific set of changes won't get in (LLM written, little to no thinking through of the broader design), but I am hoping something like it shows up sometime.

24.

Emitting metadata early makes building/checking Rust up to twice as fast(github.com ↗)

157 points · by knuckleheads · 1mo ago · 43 comments

comment 1mo ago · link · parent

https://github.com/PowderworksCode/headstart

^ run setup and give it a whirl. Will send to Rust compiler team when I have some pr's up etc.

comment 1mo ago · link · parent

Depends on what you are editing I would say, if it's something deeper in the stack then it should help. The last numbers I have is that this is a 6-8% improvement for incremental editing of the code for cargo itself, but I'm having the benchmark be rerun now, as I've landed a fair amount of changes since then.

comment 1mo ago · link · parent

Result:

Headstart on codex-rs (16 cores, clean builds, median of 3 alternating off/on pairs):

                          off       on     saved
  cargo check           383.8s   277.1s    28%
  cargo build           530.7s   330.8s    38%
  check, -Zthreads=8    220.0s   190.5s    13%
  build, -Zthreads=8    317.3s   249.2s    21%
Not helpful for compilation yet, but it's something :)

comment 1mo ago · link · parent

I will email you when I have something up for sure! First cargo check has it at about 28% reduced on codex rs, from 383 seconds down to 277 seconds on a 16 core machine. No -Zthreads yet though, and that typically has a similar effect and reduces the speed up the early meta data gives.

comment 1mo ago · link · parent

Yes I think I read a post of his from like 2019 were something was tried like this before. My guess is that this will be an interesting and hopefully informative PR for you all to see, but will likely not be merged as is. I had to add the ability for rustc to pause after early meta data emission and that was hacked together I feel, not well designed per se.

I view this as speculative execution/compilation and just throw out any errors from a crate that depended on another crate that ultimately errors out. It has the same outcome (same errors are printed in both cases) you just have a chance of having totally wasted some cpu time (that was otherwise just sitting around though).

comment 1mo ago · link · parent

This thing is a monster, blows out the disk space on a Claude code web session. Will run it on my test server later and let you know.
12345
9