Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gaigalas
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
91.
▲
by
gaigalas
4mo ago
That's really impressive, congratulations. It's nice to see novel applications of browser models.
92.
▲
by
gaigalas
4mo ago
That's... how the web works? You download things on demand. There are JS files larger than 7MB in the wild. They run on JIT engines that displayed severe CVEs over the years. PDFs, video running directly on special hardware encoders. T
93.
▲
by
gaigalas
4mo ago
It will affect jobs because the investment strategy works to degenerate the economy, but not because of the tech. Like a dog that barks at a truck and thinks he scared it away.
94.
▲
by
gaigalas
4mo ago
1. Find a problem that LLMs suck and you're good at. Then you'll have no choice but to enter the flow state. There's lots of those still. Portable shell programming is my favorite. Even the most capable models limp at it, but
95.
▲
by
gaigalas
4mo ago
Author here! This is a proof of concept for a tiny word -> palette model. I extracted data from all kinds of sources, and I plan to do more (Wikidata ingredient lists so I can color stuff like "burger" and "guacamole"
96.
▲
Wordpalette – what color is a word?
(alganet.github.io)
1 points
by
gaigalas
4mo ago
|
1 comments
97.
▲
by
gaigalas
4mo ago
Have you ever tried to implement it?
98.
▲
by
gaigalas
4mo ago
One of the reasons for using dash is speed. It's so fast, it allows people to write programs that were not viable before. The pure shell C compiler is an example of that: https://gist.github.com/alganet/2b89c4368f8
99.
▲
by
gaigalas
4mo ago
Reminds me of https://www.opensourceecology.org/ , but way more low tech. One could actually try the Open Source Low Tech designs without having a small fortune to spare or gathering a considerable community to cooperate.
100.
▲
by
gaigalas
4mo ago
Here's how I deal with it using feature detection: case "$({ printf %b "\\061" || print -r -- 2 || echo -n -e "\\063" || command -p printf %b "\\064"; } 2>
101.
▲
by
gaigalas
4mo ago
Nope, implementors are worried about shaping the spec (which iterates much faster than POSIX) and the overall community around JS has plenty of portability solutions. That simply doesn't happen with portable shell script. There's
102.
▲
by
gaigalas
4mo ago
You shouldn't. You should audit the tool. It's open source, and I offer build checksums for reproducibility, it's made to be auditable.
103.
▲
by
gaigalas
4mo ago
That is another can of worms. For now, I'm worried only about the shell interpreter and builtins. `echo` in most shells is not `/bin/echo`, it's actually an internal implementation (external echo means forking at every
104.
▲
by
gaigalas
4mo ago
yash also has something similar, ECHO_STYLE var. https://magicant.github.io/yash/doc/_echo.html Additionally, the ksh family has `print`, which solves some of the issues. And the story repeats all over again, each
105.
▲
by
gaigalas
4mo ago
I honestly don't know! What I know is that there is an intersection of features that work with polyfills and tweaks in all shells. That intersection has a lot of the spec, but also has a lot that is not specified anywhere. I started to
106.
▲
by
gaigalas
4mo ago
ksh2020 is `v-` based, the repo I mentioned is an `u+` fork with backports from the failed attempt. Most notably, it doesn't change the build system. It's what Debian and Fedora use, so AT&T doesn't matter anymore. Real-w
107.
▲
by
gaigalas
4mo ago
https://github.com/ksh93/ksh Last commit was 11 hours ago, still maintained.
108.
▲
by
gaigalas
4mo ago
Can you imagine? Using that fancy new gen JavaScript today? Oh wait, that's exactly babel's headline! It's just so old now that people don't need to say what it does. Actually funny that the spec drift got solved by poly
109.
▲
by
gaigalas
4mo ago
I particularly like ksh93. It's a virtual machine, which makes it super fast for a lot of scenarios. The ksh family is my personal favorite, in particular mksh and ksh93. Both with excelent feature sets. I even made a platformer game t
110.
▲
by
gaigalas
4mo ago
These are all in the shell-versions toolkit I recommended. docker run -it --rm alganet/shell-versions:all /opt/mksh_R59c/bin/mksh -c 'echo $KSH_VERSION' docker run -it --rm alganet/shell-ver
111.
▲
by
gaigalas
4mo ago
The post is not about shell differences, there's too many of them. It's about portability. I want users to test instead of rote memorizing. And I'm giving them tools: docker run --rm alganet/shell-versions:all -c &
112.
▲
by
gaigalas
4mo ago
You can run this pup to find out what's underneath! https://www.in-ulm.de/~mascheck/various/whatshell/
113.
▲
by
gaigalas
4mo ago
Most shell families precede the spec. Both bash and ksh had features at the time the spec was written that are not in it. It's weird. My main point is that following the spec doesn't guarantee shell scripts will be portable, which
114.
▲
by
gaigalas
4mo ago
They are the same, kinda! ash and dash are from the Almquist family. https://en.wikipedia.org/wiki/Almquist_shell It's just poetic license.
115.
▲
by
gaigalas
4mo ago
No one says "Let's write ECMAScript for portability". If someone did, I would probably be writing about that too.
116.
▲
by
gaigalas
4mo ago
You can target POSIX if you want to, but doing that doesn't guarantee shell scripts will work. The blog post stresses this, the difference between POSIX and portability. If you want portability, testing is better for now. One of the go
117.
▲
by
gaigalas
4mo ago
The spec is not that good. `local` for example is present in many shells (almost all of them), but they decided to leave it out uniquely because of ksh93 (scope is different). It became undefined behavior. When the spec was written, ksh was
118.
▲
by
gaigalas
4mo ago
Author here. It definitely builds outside docker. It's a musl-cross-make toolchain, you can procure the dependencies locally if you don't like the Docker recipes. Feel free to open an issue if you feel like that's a challenge
119.
▲
POSIX Is Not a Shell
(alganet.github.io)
56 points
by
gaigalas
4mo ago
|
64 comments
120.
▲
by
gaigalas
4mo ago
I've been using shell to blog for a while. Engine: https://github.com/alganet/alganet.github.io/blob/master/bui... Result: https://alganet.github.io/ Does RSS, updates old pages whe
More ›