Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gaigalas
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
181.
▲
by
gaigalas
7mo ago
Took some time to look at onramp, it looks awesome!
182.
▲
by
gaigalas
7mo ago
A linter, not yet. You can use what I use: https://github.com/alganet/shell-versions It's a container with lots of shells that you can test. Like esvu but for the shell. Might have a little outdated docs, hit me w
183.
▲
by
gaigalas
7mo ago
This shell.c can be compiled from c89cc.sh itself: https://gist.github.com/alganet/1513d7b6abef5c1a53a324d897c3... Ouroboros self-hosting. They can self-host one another. The idea is to make shell.c compile from an eve
184.
▲
by
gaigalas
7mo ago
The main show are the techniques for writing portable shell scripts, not the compiler. If you want something one would actually use, try my project tuish: http://github.com/alganet/tuish
185.
▲
by
gaigalas
7mo ago
Just bash? Sure. Anyone can do just bash.
186.
▲
by
gaigalas
7mo ago
Most people think shell is just bash, and portability is impossible. It is also common sense that shell scripts are just glue code, and it's impossible to do anything else with it. I think they're wrong. Never said one should use
187.
▲
by
gaigalas
7mo ago
It is AI assisted, but way less than one might think. All the portability tricks are authored by me (I have previous repos from before the AI era that feature them). The parsing structure is also authored by me (also have pre-AI proof). Wha
188.
▲
by
gaigalas
7mo ago
You want to know what kinds of programs it can run, right? Look at this one: https://gist.github.com/alganet/1513d7b6abef5c1a53a324d897c3... shell.c is a shell interpreter written for c89cc.sh. It can do the full self-
189.
▲
by
gaigalas
7mo ago
Here's a prototype parser from 10 months ago, when this was not possible yet: https://gist.github.com/alganet/23df53c567b8a0bf959ecbc7b689... Here is me 10 years ago experimenting on parsing stuff with sed: https
190.
▲
by
gaigalas
7mo ago
One main reason is performance. Forking for other tools is very expensive. That said, using larger sed or awk programs instead of ad-hoc calls for small snippets would perhaps be net-positive for performance and readability. I'm curren
191.
▲
by
gaigalas
7mo ago
This is a hand-written parser for the shell itself (portable shell parsing portable shell): https://gist.github.com/alganet/23df53c567b8a0bf959ecbc7b689... It's an incomplete idea from around a year ago. The appro
192.
▲
by
gaigalas
7mo ago
The source for BNF generator is here: https://gist.github.com/alganet/4dfd501a3377a60f7825901114d6... Roughly 70% of c89cc was generated from it (parser, emitter). It can generate parsers for C, ES6 and XML for example
193.
▲
by
gaigalas
7mo ago
Yes! The main parser and emitter come from a BNF parser generator, also written in portable shell (to be released though).
194.
▲
by
gaigalas
7mo ago
That sounds like pnut: https://github.com/udem-dlteam/pnut
195.
▲
by
gaigalas
7mo ago
This gist is a concatenation of several shell script modules which form a comprehensive parser library for the portable shell. The main parser and emitter are BFN-generated (that's why they look so mechanical). The BNF parser generator
196.
▲
C89cc.sh – standalone C89/ELF64 compiler in pure portable shell
(gist.github.com)
201 points
by
gaigalas
7mo ago
|
59 comments
197.
▲
by
gaigalas
7mo ago
Single standalone file, no external tools used, PATH='' (empty), portable (bash, dash, ksh, zsh), produces x86 ELF executables, has mini-libc builtin. Usage: printf 'int main(){puts("hello");return 0;}' | sh c8
198.
▲
by
gaigalas
7mo ago
Don't put words on my mouth.
199.
▲
by
gaigalas
7mo ago
> The by far nastiest part is CI. But that's the most important part. A repository without CI is basically dead. The biggest challenge of this era is automated verification, and proper CI infrastructure is essential. GitHub feels li
200.
▲
Teaching AI to Verify Sources
(alganet.github.io)
1 points
by
gaigalas
7mo ago
|
0 comments
201.
▲
Apysource – Verifies if sources say what you think they say
(github.com)
1 points
by
gaigalas
7mo ago
|
1 comments
202.
▲
by
gaigalas
7mo ago
Kind of an RDF tool in disguise, extra useful if you need annotated metadata.
203.
▲
by
gaigalas
7mo ago
It's curious when agents remember traumatic events and replay them instead of avoiding them. I was stuck on a task for a couple of days. Deleted the memory about some debugging sessions, thing just unlocked itself again. The harness wa
204.
▲
by
gaigalas
7mo ago
I considered it, this is my conclusion: > In practical terms, "productivity" is any metric that people with power can manipulate (cheating numbers, changing narratives, etc) to affect behavior of others to their interests. Metr
205.
▲
by
gaigalas
7mo ago
I'll look into it, thanks! It might sound nihilistic (what does that even mean in this context? anyway), but it's not. There are lot of good discussions about what good work actually means. I'm dismissing productivity discus
206.
▲
by
gaigalas
7mo ago
In practical terms, "productivity" is any metric that people with power can manipulate (cheating numbers, changing narratives, etc) to affect behavior of others to their interests. ALL OF IT is meaningless. It's a pointless
207.
▲
by
gaigalas
7mo ago
Basic dicts, arrays and templates might be the killer feature set for declarative data languages. If everyone coalesces to those eventually, it means there's something to it.
208.
▲
by
gaigalas
7mo ago
I'm getting close to my goal of fitting an entire bootstrappable-from-source system source code as context and just telling Claude "go ahead, make it better".
209.
▲
by
gaigalas
7mo ago
Model distillation is gift sharing then. It's settled, Carmack said it.
210.
▲
by
gaigalas
7mo ago
Seems nice. I launched https://github.com/alganet/tuish yesterday (pure shell backend). Exporting to pure shell could be a killer feature, especially for smaller and ad-hoc apps (no dependencies, no compilation, etc).
More ›