it lives!  JVM in Bash

for now it only has ~5 opcodes implemented, and one virtual method (println). So this is literally the minimal amount of Stuff to get a hello world working

next up, conditionals?

for all the “yeah sure” people, code here
@domi Almost wish it would be POSIX / Korn Shell because it would be a completely ridiculous way to bootstrap OpenJDK from source…

@lanodan @domi

You could write a bash shell in posix shell with only the needed features

(I never finished my posix shell in posix shell project so unfortunatly not useful here)

@sertonix @domi Well issue with that is GNU is typically awful at even just well documenting their programs so it would mean a lot of either gnu-source spelunking or reverse engineering…

@lanodan @sertonix bash has a lot of bugs. i’d argue that if you don’t implement all of those, it’s not Bash, it’s bash-like

for instance, my favorite way to split a string into characters:

IFS=$'\x01' echo "meow"$asdf # $asdf has to be nonexistent

@domi @lanodan

Wha-

apk add !bash

@sertonix @lanodan you’re gonna break world, bash is a dependency of a surprising amount of packages :D

@domi @lanodan

(I don't have it installed)

I will add that to the list of packages which people tell me that I can't live without but do anyways 🙃