Hacker News new | past | comments | ask | show | jobs | submit login
Oils 0.20.0 – Eggex, JSON, and Android (oilshell.org)
15 points by todsacerdoti 9 months ago | hide | past | favorite | 3 comments



One weird thing about the Oils project is that they seem to have so many sub-projects. For example, this release has improvements to J8, "a collection of data languages based on JSON."

This project also introduces FANOS, "File descriptors And Netstrings Over Sockets." And a YAML-like config language called Hay. And OPy, "a Python bytecode compiler based on pgen2 and compiler2."

Have they bitten off more than they can chew? "Just" making a new shell is a lot of work, without inventing several new config languages, a new network protocol, a fork of CPython, etc.


Author here - there are indeed many parts of the project, and it has a lot of functionality.

But it's paradoxically small -- I point that out at the very end of the post - https://www.oilshell.org/blog/2024/02/release-0.20.0.html#sl...

It's only 56K lines of source code, which expands to 112K lines of generated code.

For comparison, bash is over 140K lines of hand-written C code.

So you get a bash-compatible shell, but you also get much of the power of Python / JSON / YAML "for free". That's the idea behind the slogan at the end - Oils: A Small Tool That Unifies Shell, Python, JSON, and YAML

---

Many users won't care about the difference between JSON and J8 Notation -- as mentioned in the post, the point is that it's 100% backward compatible. If you don't want the new stuff, you can ignore it. But it adds significant functionality, at almost no cost. The main cost is coming up with the design in the first place :)

Another way to explain the motivation for J8 Notation is that if you "just" fix shell, but you don't fix the DATA it operates on, programs are still a mess. This was what we found by testing and trying the language!

There is an analogy between code and data, i.e. OSH -> YSH and JSON -> J8 Notation.

(BTW OPy is obsolete, that was an experiment. There were a few "wrong turns", which I've written about on the blog.)


Hi chubot -- thanks for your response. I guess it's always a judgment call how much to "pull in" to the project -- whether you choose to live with janky workarounds about (for example) representing binary data in the shell, or whether you try to solve that at the same time. Oils is clearly pulling in a lot.

Good luck to you and the team!




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

Search: