Hacker Newsnew | past | comments | ask | show | jobs | submit | lionkor's commentslogin

Yes a human can hack together a compiler in two weeks.

If you can't, you should turn off the AI and learn for yourself for a while.

Writing a compiler is not a flex; it's a couple very well understood problems, most of which can be solved using existing libraries.

Parsing is solved with yacc, bison, or sitting down and writing a recursive descent parser (works for most well designed languages you can think of).

Then take your AST and translate it to an IR, and then feed that into anything that generates code. You could use crainlift or whatever it's called, you could roll your own.


Meanwhile:

> I spent a good part of my career (nearly a decade) at Google working on getting Clang to build the linux kernel.

https://news.ycombinator.com/item?id=46905771


Afaik the Linux Kernel strongly depends on GCC extensions and GCC specific behavior, so maybe that's why this is such an interesting part? Also extensions like inline assembly seem wildly complicated to add to an existing compiler WHILE replicating the syntax and semantics of another compiler (which has a different software architecture).

If you spend a decade working on something, you’re not “hacking it”.

> Parsing is solved with yacc, bison, or sitting down and writing a recursive descent parser (works for most well designed languages you can think of).

No human being writes a recursive descent parser for "Linux Kernel C" in two weeks, though. And AFAIK there's no downloadable BNF for that you can hand to an automatic generator either, you have to write it and test it and refine it. And you can't do it in two weeks.

Yes yes, we all know how to write a compiler because we took a class on it. That's like "Elite CS Nerd Basic Admission". We still can't actually do it at the cost being demonstrated, and you know it.


I wrote a couple hobby compilers. The only difficulty with C is the ambiguous syntax.

Now compare the article's setup with a single senior engineer who uses an agent or two at the same time.


> I wrote a couple hobby compilers.

So did most of us, join the club. What you can't do is write such a compiler for $20k if you want to put food on the table, or do it in two weeks (what it costs to buy your time currently until AI eats your job). And let's be honest: it's not going to build something of the complexity of Linux either. Hobby compilers run hobby code. Giant decades-old source trees test edge cases like no one's business.


Oh no it's a new key and it's on your keyboard.

Apparently it's Win+Shift+F23.

The issue is less that it is a new key and more that the menu key is missing instead.

Fragmentation means competition, and competition is usually good as long as it lasts

exactly and in case of free software it is not even competition with financial incentive and (not always) so many projects can live long without a good output because of this. i think many people do not appreciate the usefulness of 'non-useful' things

Yes, except the calculator is right 100% of the time. LLMs are right ??% of the time, where ?? constantly changes, changes with prompts, etc.

For $100/hour I can fill in those gaps for you!

It sounds like a hook, like "don't like all the space debris? use our management platform" and then it'll suddenly start costing money

SpaceX has a very, very large financial interest in avoiding collisions. Providing this service helps ensure that.

Several governments have an even bigger interest in avoiding these collisions, so, these systems should have existed for decades now.

But, you can always trust the government to spend 10x more to do 10x worst...


The US already provides publicly accessible conjunction avoidance data based on data points they have. They don't have the same number of satellites in the sky to make real time observations in as many different directions though.

> so, these systems should have existed for decades now.

Dubious. Perhaps if Congress could be persuaded to invest in tons of radio telescopes / radars, positioned all around the world, but good luck with that. The space-based approach used by SpaceX is something that presently only SpaceX is equipped to implement. Tracking star conjunctions only gives you high quality data on space debris / satellite maneuvers if you have a huge net of star trackers in orbit, and that's something which only SpaceX has been able to do.


I don't think you can get professionals to review code that you didn't even bother typing yourself.

You aren't learning much. You're vibe coding, which means you learn almost nothing, except maybe prompting your LLM better.


Say it with me:

If I wanted an AI written tool for this, I would have prompted an AI, not opened HN.


Do you enjoy ads? If not, install an adblocker. There is no technical skill involved.

Chrome says no.

Of course that's why I use firefox now.


uBlock Origin Lite works perfectly well, FWIW. The features that only "full" (MV2/Firefox) uBlock Origin supports are fairly advanced.

Agreed. Still blocks all the ads, but is much more efficient. Zero complaints here.

Work is value and produces sweat, and OpenAI sells just the sweat.

I fully agree. Not reading your own references should be grounds for banning, but that's impossible to check. Hallucinated references cannot be read, so by definition,they should get people banned.

>Not reading your own references

This could be considered in degrees.

Like when you only need a single table from another researcher's 25-page publication, you would cite it to be thorough but it wouldn't be so bad if you didn't even read very much of their other text. Perhaps not any at all.

Maybe one of the very helpful things is not just reading every reference in detail, but actually looking up every one in detail to begin with?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: