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

16 sources
FWIW this wiki page I started may help frame discussions like this: Survey of Config Languages - https://github.com/oilshell/oil/wiki/Survey-of-Config-Langua... It puts a bunch of languages in 5 cateogires. Terraform is at least not a YAML DSL, a very common pattern which I don't understand the appeal of. I guess the main appeal is that you can copy and paste, and pretend it's data in simple cases. But even Terraform suffers from the problem of "external" DSLs -- you end up needing a general purpose language. And yes this pattern has repeated itself so many times. Awk and Make both grew into general purpose languages, and in Make's case it's particularly bad. Most SQL dialects have also grown a pretty bad stored procedure language. So I do think making internal DSLs in general purpose languages is more promising. But they have to be de
Read the rest
signed for it. There have been many attempts to use Python as a DSL/config language, but it's missing a few things for that, and gets awkward pretty quickly. Ruby does a bit better, but it's not perfect either. It's fairly big and heavy if you just want a config file.
In DSLs are a waste of time
(author here) This is good feedback 1) I think you mean stuff like **/*.py from zsh, which bash now emulates with shopt -s globstar. This has come up several times, and we should have it. But I'm actually not entirely sure how ** behaves -- if someone can write an exhaustive shell script that shows what it does (e.g. a bunch of mkdir and touch commands and output), we can copy it in our spec tests: https://github.com/oilshell/oil/tree/master/spec https://www.oilshell.org/release/0.17.0/test/spec.wwz/osh-py... and then implement it. Generally once the behavior is spec'd out, it's not too hard to implement 2) Completion has a long history in the project -- we emulate bash completion very faithfully, but yeah I've realized that's not enough This comment elaborates on a different plan -- I think something like "fishcomp" to emulate fish wou
Read the rest
ld be both useful and pretty feasible: https://lobste.rs/s/fdqbhk/oils_0_17_0_ysh_is_becoming_real#... We can definitely use help with that, and it's relatively self-contained. 3) What exactly do you mean by "programmable input" ? We support GNU readline so everything there should work (maybe the ./configure detection didn't find it for you?) --- But there is a bigger reason for the "struggle" -- the main focus of the project now is YSH, the language with data tYpes, influenced by pYthon, JavaScript, Lisp, etc. That is, a shell is both a language and an interactive UI, and I've long emphasized the language part, e.g. in the FAQ - http://www.oilshell.org/blog/2021/01/why-a-new-shell.html The theory was/is that the language is not only important for the system level tasks, but also a good foundation for the UI, e.g. like Emacs is written in Emacs Lisp So I think structured data (in the form of languages/protocols) in YSH is really the killer feature of Oils, that will hopefully bring many other people into the project, who can help with filling out the interactive features you mention, e.g. polishing completion. I wrote FIVE posts about YSH in June: https://www.oilshell.org/blog/2023/06/release-0.16.0.html#so... As mentioned in this post, the biggest risk is that we don't have enough help. All the technical pieces are there now, and the risks are about project management, not the code. I appreciate everyone who contributed while the codebase was undergoing this big transformation to native code -- this was kind of risky and the most unusual part of the project, but I think it paid off! (We also have big ideas for the interactive shell in the form of a headless protocol for GUIs, but again need help -- https://www.oilshell.org/blog/2023/06/release-0.16.0.html#he... )
In Oils 0.17.0 – YSH Is Becoming Real
I really want this to succeed¹, but I struggle to use it. How are people that are testing/using it coping without the normal niceties of their regular setup? I'm wondering if there are just some tricks I'm missing. Off the top of my head, things I'm thinking of include: * Just a minute ago realising that without zsh globs I have to remember find syntax, and then have to figure out how to sort the results(probably decorate →sort(1) → undecorate). My laziness led me to just C-d and execute my task with zsh. * No context sensitive completion; I don't realise how much I rely on this until it is gone. Using bash-completion gets some completion, but it is a big step backwards. * No programmable input, you can fake some with ~/.inputrc hacks but only basic text support(no macros). (Edit to add: The guard name is "oil" not "osh", if you're l
Read the rest
ooking to do this yourself.) There is a document in the wiki², but it doesn't really cover much. I'd be interested in seeing the configs of people who are using it. -- Should say I really like the idea of hijacking '#!/bin/sh' to inject osh, it feels like a really good way to round out testing of scripts you'd otherwise forget about. I wonder if a LD_PRELOAD'able solution that would work outside osh would be a good idea. ¹ Strong déjà vu on this comment, but if it is real it is because I truly like the goals set out for oil. ² https://github.com/oilshell/oil/wiki/How-To-Test-OSH
In Oils 0.17.0 – YSH Is Becoming Real
Yes totally, I keep seeing people mention these arena / flattened tree and graph structures, without mentioning memory safety. And also weird claims that arenas solve memory safety problems in C, when it's equally likely (depending on the program) that they CAUSE dangling pointers, use-after-free, etc. The same issue comes up in slightly different ways in both C/C++ and Rust --- My comment on this post from 2 months ago: https://old.reddit.com/r/ProgrammingLanguages/comments/1350d... Summary: the upsides are very real, but we should mention the downsides too: - Arenas punt on memory safety; Ownership can be nontrivial (a bunch of examples) - Mutation, and appending to list/vectors are complications - Pointer representations are more friendly to debuggers My wiki page is linked at the bottom of this article (which I appreciate because it
Read the rest
In Flattening ASTs and other compiler data structures
The author of Oil Shell has some of the best writing on why unix shells are an important niche to push forward. Unix (and later the internet), by enforcing "narrow waists" [1] like a flat stream of octets for all communication, is inherently polyglot. You can have richer data types inside programming languages, and indeed Python, JS, Rust etc. all have vibrant ecosystems of packages with rich internal APIs. But at some point you want to interface software written in widely different languages, and Unix encourages a particular style of command-line interface which is "dumber" — array of arguments, flat file(s) I/O — but is easy to compose across languages. Therefore, whatever you do in "better" languages, there remains a need for a glue layer whose main job is not doing computation itself but invoking external processes. There is tons o
Read the rest
f arguing about the threshold — whether a particular task is better expressed inside a "rich" language or by plumbing together commands — but it doesn't change the need for a good shell language to exist. Now, is bash a great shell language? NO. It's a pragmatic choice for historic reasons. One day we'll do much better. [2] [1] https://www.oilshell.org/blog/2022/03/backlog-arch.html [2] https://github.com/oilshell/oil/wiki/Alternative-Shells
In Ask HN: Why is bash a popular scripting language?
I look forward to that blog post, I hope that can clear up some of the confusion. Personally I found that the best introduction for me to actually understand what the different parts do (mainly OSH and Oil Shell) was the Github wiki, particularly "OSH versus Oil" and the two Migration guide posts. Even reading several of your posts, I didn't fully understand what being "an upgrade path from bash" actually meant until I saw the mechanics of how the process would go, and then it all clicked for me. I think a guided walkthrough of the "upgrade" process would be very valuable to help people understand what the goal is, and would be a good introduction to the project. https://github.com/oilshell/oil/wiki
In Oil 0.14.2 – Interactive Shell, and Conceding to autoconf
(Oil author here) We're making great progress on polishing Oil -- namely semi-automatically translating it to C++ -- but can still use more help. In particular, starting in October, contributor Melvin Walls has almost single-handedly enabled the interactive shell to be translated, including some of the hardest bits like shell traps, signal handling, and GNU readline bindings. I was a little worried that we'd run into difficulties with our style of Python and this "inverted" / callback-heavy component, but the result is better than I expected. Melvin came up with creative and solid solutions. So we have a tiny garbage-collected runtime, and the rest is statically-typed, memory safe Python code. (We learned first hand that memory safety is especially important when you're interfacing with a garbage collector.) ----- So we need more people
Read the rest
who can put in some elbow grease. You can even be paid to work on open source code! We just got a second grant from NLnet, which I mentioned on the blog. https://news.ycombinator.com/item?id=34221617 https://www.oilshell.org/blog/ ----- There are a few misconceptions in this thread which make me realize I need to update the blog: 1) The Oil project contains OSH, which is not only POSIX- compatible, but bash-compatible. Some people don't believe that it could be both things -- how could it be both compatible and new? But that is absolutely true (and a major reason why it's a big project!) You can type 'osh' and it will run your existing shell scripts, or type 'oil', and it's a brand new language. ( Tour: https://www.oilshell.org/release/latest/doc/oil-language-tou... ) (Note: I also plan to slightly rename the project, to address this confusion, since I've encountered it before. It's confusing that "Oil" is both the whole project and a component of the project.) ----- 2) On the other hand, the Oil language is NOT "just waiting to be deployed". There are a few TODOs in that doc, and they're actually quite big. Though filling them in is going to lead to something pretty great which spans a variety of domains, IMO. I hope to write a few blog posts about that in the coming months. As always feel free to check out the code and join Zulip. On most Linux distros you can get a working bin/osh in about 30 seconds: https://github.com/oilshell/oil/wiki/Contributing The code is in great shape, and completely different than it was 6 months ago. Especially the C++ side. But you can just hack on Python, with MyPy, and it just works! The tools are also very solid now, with dozens of cleanups/fixes even in the last few weeks. Getting the GC working was a big breath of fresh air that unlocked a lot of possibilities.
In Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
Hm yes now I remember that point about how the file system targets are anonymous Python objects that you can pass around to functions. Are there any open source examples? I looked around the github account, but I mostly remember this tool https://github.com/stb-tester/apt2ostree I'd be interested in seeing the Python config and Ninja output, to see how it works. Right now it looks to me like the dependencies are more implicit than explicit, e.g. with your copen example --- The system I ended up with is more like Bazel, but it's not building containers, so it's a slightly different problem (although I guess Bazel can do that now too). But I'm interested in building containers incrementally without 'docker build'. I made some notes on #containers in the oilshell Zulip about incorrect incremental builds with docker build. It's also slow
Read the rest
and has a bunch of ad hoc mechanisms to speed it up I like the apt lockfile idea definitely ... However I also have a bunch of other source tarballs and testdata files, that I might not want to check into git. How do you handle those -- put them in OSTree? Our config looks like this https://github.com/oilshell/oil/blob/master/core/NINJA_subgr... and there are other /NINJA_subgraph.py files. The library they all use is in build/ninja* of the same repo. Thanks for any details!
In Why Use Make (2013)
So I'd say Oil's collector is highly unusual and not applicable most problems! (I now think that "every GC is a snowflake" -- it's such a multi-dimensional design space) It's unusual because it's a precise collector in C++, and what I slowly realized is that that problem is basically impossible for any non-trivial software, without changing the C++ language itself :) It seems like that hasn't happened, despite efforts over decades. I added this link about C++ GC support to the appendix, which also explains our unique constraints. Garbage collection in the next C++ standard (Boehm 2009) https://dl.acm.org/doi/abs/10.1145/1542431.1542437 http://www.oilshell.org/blog/2023/01/garbage-collector.html#... --- The reason that precise GC can work for Oil is because it's a shell that links with extremely little 3rd-party code, and has relatively
Read the rest
low perf requirements. We depend on libc and GNU readline, just like bash. And those libraries are basically old-school C functions which are easy to wrap with a GC. (Also as Aidenn mentioned, shells use process-based concurrency, which means we don't have threads. The fact that it's mostly generated C++ code is also important, as mentioned in the post) --- The funny thing is that one reason I started this project is because I worked with "big data" frameworks on clusters, but I found that you can do a lot on a single machine. (in spirit similar to the recent "Twitter on one machine post" https://news.ycombinator.com/item?id=34291191 ) I would just use shell scripts to saturate ~64 cores / 128 G of RAM, rather than dealing with slow schedulers and distributed file systems. But garbage collectors and memory management are a main reason you can't use all of a machine from one process. There's just so much room for contention. Also the hardware was trending toward NUMA at the time, and probably is even more now, so processes make even more sense. All of that is to say that I'm a little scared of multi-threaded GC ... especially when linking in lots of third party libraries. And AFAIK heaps with tens or hundreds of gigabytes are still in the "not practical" range ... or they would take a huge amount of engineering effort --- But of course there are many domains where you don't have embarrassingly parallel problems, and writing tight single- or multi-threaded code is the best solution. Some more color here: https://old.reddit.com/r/oilshell/comments/109t7os/pictures_... I wonder if Clasp has any support for multi-process programming? Beyond Unix pipes, you could also use shared memory and maybe some semaphores to synchronize access, and avoid copying. I think of that as sort of "inverting" the problem. Certain kinds of data like pointer-rich data is probably annoying to deal with in shared memory, but there are lots of representations for data and I imagine Lisps could take advantage of some of them, e.g. https://github.com/oilshell/oil/wiki/Compact-AST-Representat...
In Pictures of a working garbage collector

Showing the 15 most recent of 16 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.