HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
oils-for-unix
oils
Python2016–2025
oils-for-unix / oils

oils

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!

35Distinct people
225Mentions
1Explicit recommenders
3.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

There are Usenix papers on bash and ksh -- I archived the ksh one here: http://www.oilshell.org/archive/ksh-usenix.pdf The surprising thing to me is that ksh was Lua-like in…

chubot used a recommendation phrase. 4 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 4:59:52 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year225 dated mentions

Observed mentions: 2016-11-26 10:24:57 UTC to 2025-11-06 22:34:08 UTC.

02040602016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 13 mentions; 0 submissions, 13 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 27 mentions; 2 submissions, 25 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 52 mentions; 3 submissions, 49 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 41 mentions; 2 submissions, 39 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 27 mentions; 3 submissions, 24 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 16 mentions; 1 submissions, 15 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 17 mentions; 2 submissions, 15 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 20 mentions; 2 submissions, 18 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC303
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC13013
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC909
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC27225
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC52349
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC41239
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC27324
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC16115
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC17215
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC20218

What Hacker News says

27 sources
I think this is a compelling idea, and I did some experiments with it a few years ago, but I don't think it works. I think you have to rewrite all your code in C++ to get smaller pointers, e.g. see my comments on Zig and Sorbet (C++) in this thread. Also some on this wiki page: https://github.com/oilshell/oil/wiki/Compact-AST-Representat... I don't think there is any way to retrofit existing software with this technique. In addition to the issues you mentioned, you would have to deal with pointer arithmetic (interior pointers), Base* and Derived* semantics (covariance, arrays, templates, etc.), composition with other pointer-like types, etc. Not to mention dealing with external code that doesn't traffic in compressed pointers
In Pointer Compression in Oilpan
All of these problems are fixed in OSH. It runs your bash scripts but you can also opt into correct error handling. The simple invariant is that it doesn't lose an exit code, and non-zero is fatal by default. See https://www.oilshell.org/release/latest/doc/error-handling.h... Oil 0.10.0 - Can Unix Shell Error Handling Be Fixed Once and For All? https://www.oilshell.org/blog/2022/05/release-0.10.0.html This took quite awhile, and I became aware of more error handling gotchas than I knew about when starting the project: e.g. it's impossible in bash to even see the error status of a process sub like diff <(sort left.txt) <(sort OOPS) If you have bash scripts that you don't want to rewrite, try 1) run them with OSH 2) Add shopt --set oil:upgrade at the top to get the error handling fixes. Tell me what happens :) https://github.com/oilshell/oi
Read the rest
l I spent a long time on that, but the post didn't get read much. I think it's because it takes a lot of bash experience to even understand what the problem is. (rehash of https://news.ycombinator.com/item?id=33075915 which came up the other day :) )
In Why doesn't Bash’s ‘set -e’ do what I expected? (2021)
I agree, and that was out of the motivations for https://www.oilshell.org/ It runs your bash scripts but you can also opt into correct error handling. The simple invariant is that it doesn't lose an exit code, and non-zero is fatal by default. Oil 0.10.0 - Can Unix Shell Error Handling Be Fixed Once and For All? https://www.oilshell.org/blog/2022/05/release-0.10.0.html This took quite awhile, and I became aware of more error handling gotchas than I knew about when starting the project: https://www.oilshell.org/release/latest/doc/error-handling.h... e.g. it's impossible in bash to even see the error status of a process sub like diff <(sort left.txt) <(sort OOPS) If you have bash scripts that you don't want to rewrite, try 1) run them with OSH 2) Add shopt --set oil:upgrade at the top to get the error handling fixes. Tell me what happens
Read the rest
:) https://github.com/oilshell/oil I spent a long time on that, but the post didn't get read much. I think it's because it takes a lot of bash experience to even understand what the problem is.
In Xonsh: I don't remember how to write a for loop in Bash [video]
Sure you can check it out here: https://github.com/oilshell/oil $ wc -l NINJA* */NINJA* 64 NINJA_config.py ... 260 cpp/NINJA-steps.sh 361 cpp/NINJA_subgraph.py 305 mycpp/NINJA-steps.sh 605 mycpp/NINJA_subgraph.py 1615 total I borrowed the little Python library that Ninja itself uses to bootstrap its Ninja files. There are a few missing things like some textual code generation, but overall it should make sense. It's structured a bit like a lightweight Bazel -- each directory has a NINJA_subgraph.py file that specifies what to build. And then the "actions" are shell scripts in NINJA-steps.sh. At the top of one file it shows the directory structure for variants, which is basically _bin/$compiler-$variant/foo_test and _build/obj/$compiler-$variant/foo_test.o The variants control the c
Read the rest
ompile and link flags: https://github.com/oilshell/oil/blob/master/cpp/NINJA-steps.... Overall this is the best build system I've used :) My pet peeve is having to 'make clean' when changing the variant, and this avoids that, making everything available at once. I'm sure it's reinventing some of the 120K lines of CMakeLists.txt that comes with CMake, but this way I don't have to learn and debug a wonky shell-ish language! One downside of the pattern is that you probably don't want to invoke shell on Windows (which doesn't affect my project). I find that very useful though, so I'm not sure what would replace it for Windows projects. (I guess batch files, but I don't think they're powerful enough)
In A Tutorial on Portable Makefiles (2017)
Oil Shell | C++ / Python Language Engineer | Remote, Flexible, Open Source, Europe preferred | https://oilshell.org I have a slightly unusual job funded by a grant under https://nlnet.nl ! They prefer to pay Europeans, although it's not set in stone, so feel free to contact me if it's otherwise a fit. Everything about the job is flexible -- think of it as an open source project where you happen to get paid for specialized skill. The job is to work on a garbage-collected language runtime and OS bindings in C++. This is the foundation of an open source shell. Most of the project's code is written in statically typed Python, and this is the "unsafe core". There is also related work on a Python translator/compiler in Python. I found one person through Hacker News in June (Jesse), which is working great, but we can use more help. The good
Read the rest
news is that this process has made the code more accessible, cleaner, and open to contribution (updated docs, cleaned up the build system, CI, etc.) Everything about the project is open, so please take a look and contact me at andy@oilshell.org if interested. We can chat online or do a video call (I'm based in the USA). We can also arrange a code walkthrough or PAID "trial period". We want people who will have fun working on these problems. https://github.com/oilshell/oil/wiki/Where-Contributors-Have... https://github.com/oilshell/oil/wiki/Compiler-Engineer-Job -- slightly older, the work is more concrete now, less open-ended A Garbage-Collected Heap in C++, Shaped Like Typed Python https://www.oilshell.org/blog/2022/05/gc-heap.html Recent blog posts may give you a sense of what we're doing: http://www.oilshell.org/blog/ andy@oilshell.org
In Ask HN: Who is hiring? (August 2022)
I use the CommonMark reference implementation, which I assume stops at CommonMark :) I just download their tarball, and it's pure C, tiny, and very easy to use e.g. from shell or Python: https://github.com/oilshell/oil/blob/master/soil/deps-tar.sh... Nothing happened to Python 2! I still use it, and it's trivial to build and run anywhere, even if distros drop it. Just download the tarball and run ./configure and make, which I've done hundreds of times for various purposes. (The same is not true for node.js, Go, or Rust, which as mentioned is one reason I don't use them for my site. If people stopped making binaries for them, I'd be lost.) Ironically, if you want something that will last 30 years without maintenance and upgrades, Python 2 is better than Python 3. (I use both; Python 3 is very good for many/most things.) There are mem
Read the rest
es about "security" mostly based on misunderstandings IMO. As you point out, the real problem is PIP packages, but that's why my site doesn't depend on any. Or if it does, I again make sure I can download a tarball, and not rely on transitive dependencies and flaky solvers. The Python 2 stdlib is definitely good enough for making a website. It's not good enough for bigger apps, but it's great for simple website automation. ---- The higher level point is that you can always "plan for the future" at the expense of the present. IMO avoiding things like CommonMark and Python will just make your site worse right now, which defeats the purpose of preserving it in the future. So there has to be a balance against extreme conservatism, and there has to be a way of making progress (new standards) while not succumbing to bad fashions. Likewise I think Oil looks like a "retro" project to some, but it does a lot of new things, and that is the whole point.
In How Websites Die
FWIW this is the same reason you can't implement implement a portable Unix shell in portable Go. (And similar issues with an init daemon) Go only exports os.ForkExec() -- there is no os.Fork() or os.Exec(), because the things you can do between the calls could break Go's threaded runtime. (Goroutines are implemented with OS threads.) Some elaboration on that: https://lobste.rs/s/hj3np3/mvdan_sh_posix_shell_go#c_qszuer That is, the space between fork and exec is where pipelines are implemented, but also entire subinterpreters/subshells. The shell actually uses copy-on-write usefully. (And yes I'm aware that there's a good argument that the shell is almost the ONLY program that needs fork() !) ---- A lot of people have asked me why not implement Oil in Go and various other languages, so I wrote this page: https://github.com/oilshell/oil
Read the rest
/wiki/FAQ:-Why-Not-Write-Oil-... So the funny thing is that Python is a lower level language than Go for this particular problem. It doesn't do anything weird with regard to syscalls. I'm still looking for help on this (and donations to pay people other than me): Oil Is Being Implemented "Middle Out" https://www.oilshell.org/blog/2022/03/middle-out.html
In Fork() without exec() is dangerous in large programs (2016)

Showing the 15 most recent of 27 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.