ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
100% Positive
Analyzed from 652 words in the discussion.
Trending Topics
#qbe#https#com#don#backend#support#code#news#ycombinator#item

Discussion (24 Comments)Read Original on HackerNews
https://news.ycombinator.com/item?id=48058644
There’s also cproc which has a few HN posts about it.
https://news.ycombinator.com/item?id=24076603 https://news.ycombinator.com/item?id=28242024 https://news.ycombinator.com/item?id=32466098 https://news.ycombinator.com/item?id=25273918
Can you provide the code somewhere? Is it complete? Does it really work? I have a hard time to believe that an LLM really can generate a complete and working backend for a target architecture with "one prompt". From my experience with such tools, by the end of the day it takes longer until it covers all edge cases and actually works than when writing it myself.
https://gist.github.com/SuperDisk/1aa50263a773143c82a39d4771...
Can you contribute it? I don't see it listed as an official backend.
I don't think anyone wants AI generated contribution to QBE (neither do I).
It's certainly fun as a toy though!
IMO when the intended usage is AOT with an external assembler, which is another subprocess, text-based IO is actually the more natural approach.
I love QBE, but it does have its limitations: - It handles the ABIs for passing and returning structures in registers, but only with superfluous copies to and from the stack. - Can't generate debug info for data. This is probably due to lack of assembler support and/or complexity in the DWARF format. - The line number debug info directives are currently undocumented and don't support inlined functions.
But it's smol, effective, and it doesn't make you deal with phi nodes!
It looks like it doesn't have native support for identifying GC roots, so it's either conservative GC or explicit stack management. I would really like to see something that is (mostly) memory-safe and has string-as-bytes. It's a bit wild that people use Chez Scheme as a target IR for lack of better options.
https://codemadness.org/git/
Tons of these tools I use are from these guys (among 2f30). Small, predictable, usable, such as pointtools and catpoint. Sfeed for RSS, scc for gopher and so on, and smu for markdown from git repos > html.