xonsh
oil
Our great sponsors
xonsh | oil | |
---|---|---|
112 | 230 | |
7,899 | 2,703 | |
4.8% | 1.3% | |
8.7 | 9.9 | |
9 days ago | 4 days ago | |
Python | Python | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
xonsh
-
This Week In Python
xonsh – Python-powered, cross-platform, Unix-gazing shell
- FLaNK Stack Weekly 19 Feb 2024
-
Xonsh: Python-powered, cross-platform, Unix-gazing shell
Take a look at https://github.com/xonsh/xonsh/issues before deciding to abandon the devil you know.
I prefer sticking with bash where necessary (where a script is the only thing that will reasonably work), and elsewhere using a programming language with testing, type checking, modularity, and compilation into something with zero or minimal runtime dependencies.
You need to downgrade ptk version. Look here - https://github.com/xonsh/xonsh/issues/5241#issuecomment-1961...
-
Google ZX – A tool for writing better scripts
Friends, I'm not saying that tools like zx are not good. I do like to write some scripts using js/ts. I believe pythoners prefer https://xon.sh/ . Perl is also attractive and interesting. Fish is friendly.
However, I still believe that posix-shell has its own advantages. The balance among size, code length, and expressiveness. I think the only possible competitors are tcl and perl, maybe lua.
-
Shh: Simple Shell Scripting from Haskell
Those of you who use (or used) this as your shell: care to share your experience?
It seems a lot less full-featured than https://xon.sh/, but maybe you don't need a lot of bells and whistles for regular usage. I mostly run build, execute, and install commands.
I'm somewhat enticed at the possibility of being able to wrap common executables into forms that are typed (like nushell or elvish) and manipulate them in a way that leverages the type checker.
-
Marcel the Shell
In that case, is it even more similar to xonsh?
> Marcel pipes python values in streams
That's indeed much better, all those untyped strings in shells in a bad old design
Though hopefully xonsh will implement this as well https://github.com/xonsh/xonsh/issues/3967
- Shshsh is a bridge connects Python and shell
oil
-
The secret weapon of Bash power users
in your bashrc to enable it. I've used it for probably ~18 years now.
It also works with https://www.oilshell.org/ since we use GNU readline. Just 'set -o vi' in ~/.config/oils/oshrc
-
Pipexec – Handling pipe of commands like a single command
No other shell does that.
But I didn't know it was called MULTIOS until now. (I guess that's read "mult I/O's"? I have a hard time not reading it was multi-OS :) )
It seems a bit niche to be honest, but it's possible to support in Oils.
---
Oils also uses Unix domain sockets already for the headless shell protocol
https://github.com/oilshell/oil/wiki/Headless-Mode
We could do something like dgsh, but so far I haven't seen a lot of uptake / demand. Every time it's mentioned, somebody kinda wants it, and then it kinda peters out again ... still possible though.
I think flat files work fine for a lot of use cases, and once you add streaming, you also want monitoring, more control over backpressure/queue sizes, etc.
-
Show HN: Hancho – A simple and pleasant build system in ~500 lines of Python
which works well. You don't have to clean when rebuilding variants. IMO this is 100% essential for writing C++ these days. You need a bunch of test binaries, and all tests should be run with ASAN and UBSAN.
---
I wrote a mini-bazel on top of Ninja with these features:
https://www.oilshell.org/blog/2022/10/garbage-collector.html...
So it's ~1700 lines, but for that you get the build macros like asdl_library() generating C++ and Python (the same as proto_library(), a schema language that generates code)
And it also correctly finds dependencies of code generators. So if you change a .py file that is imported by another .py file that is used to generated a C++ header, everything will work. That was one of the trickier bits, with Ninja implicit dependencies.
I also use the Bazel-target syntax like //core/process
This build file example mixes low level Ninja n.rule() and n.build() with high level r.cc_library() and so forth. I find this layering really does make it scale better for bigger projects
https://github.com/oilshell/oil/blob/master/asdl/NINJA_subgr...
Some more description - https://lobste.rs/s/qnb7xt/ninja_is_enough_build_system#c_tu...
-
Re2c
This is sort of a category error...
re2c is a lexer generator, and YAML and Python are recursive/nested formats.
You can definitely use re2c to lex them, but it's not the whole solution.
I use it for everything possible in https://www.oilshell.org, and it's amazing. It really reduces the amount of fiddly C code you need to parse languages, and it drops in anywhere.
-
Ask HN: Looking for a project to volunteer on? (February 2024)
SEEKING VOLUNTEERS - https://www.oilshell.org/ - https://github.com/oilshell/oil/
I'm looking for people to help fill out the "standard library" for Oils/YSH. We're implementing a shell for Python and JavaScript programmers who avoid shell!
On the surface, this is writing some very simple functions in typed Python. But I've realized that the hardest parts are specifying, TESTING, and documenting what the functions do.
---
The most recent release announcement also asks for help - https://www.oilshell.org/blog/2024/01/release-0.19.0.html (long)
If you find all those details interesting (if maybe overwhelming), you might have a mind for language design, and could be a good person to help.
Surveying what Python and JavaScript do is very helpful, e.g. for the recent Str.replace() function, which is nontrivial (takes a regex or string, replacement template or string)
But there are also very simple methods to get started, like Dict.values() and List.indexOf(). Other people have already contributed code. Examples:
https://github.com/oilshell/oil/commit/58d847008427dba2e60fe...
https://github.com/oilshell/oil/commit/8f38ee36d01162593e935...
This can also be useful to tell if you'll have fun working on the project - https://github.com/oilshell/oil/wiki/Where-Contributors-Have...
More on #help-wanted on Zulip (requires login) - https://oilshell.zulipchat.com/#narrow/stream/417617-help-wa...
Please send a message on Github or Zulip! Or e-mail me andy at oilshell dot org.
-
The rust project has a burnout problem
This is true, but then the corrolary is that new PRs need to come with this higher and rigorous level of test coverage.
And then that becomes a bit of a barrier to contribution -- that's a harness
I often write entirely new test harnesses for features, e.g. for https://www.oilshell.org, many of them linked here . All of these run in the CI - https://www.oilshell.org/release/latest/quality.html
The good thing is that it definitely helps me accept PRs faster. Current contributors are good at this kind of exhaustive testing, but many PRs aren't
- Unix as IDE: Introduction (2012)
-
The bash book to rule them all
No, I've been deep in the bash manual and source code during my work on https://www.oilshell.org, which basically reimplements a "cleaned up" spec-driven bash, as OSH.
But I also used bash for 15 years before that, and I never really used the manual either. I got by with a minimal / sane dialect, and I read a few books about Unix and one about POSIX shell.
The main recommendation I have for anyone who wants to learn bash is to learn Unix and C. Learning the underlying model explains many things, explains the bad error messages, and makes it easier to use.
https://www.oilshell.org/blog/2020/04/comics.html - Three Comics For Understanding Unix Shell
So yeah I don't think "learning shell" or "learning bash" is actually a great goal -- it's part of the operating SYSTEM, and you want to learn the OS, and its philosophy.
related - https://www.oilshell.org/blog/2021/01/philosophy-design.html - Unix Shell: Philosophy, Design, and FAQs
-
I Accidentally a Scheme
FWIW we also test the Oils GC with a X-to-Y to generator, where X is Python and not Scheme, and Y is C++ and not C :)
For example here's some Python code to make various types of linked lists and traverse them, making sure the GC can follow all the pointers, with field inheritance, vtable pointers, etc.
https://github.com/oilshell/oil/blob/master/mycpp/examples/c...
-
Servo announces grant from the NLnet Foundation
Yes, my project https://www.oilshell.org/ has been funded by NLnet since 2022, and it's helped a lot. I needed some help to push through a few problems, and that happened :)
It is very forward thinking since we happen to be mostly in North America, but the funding comes from the EU.
What are some alternatives?
nushell - A new type of shell
fish-shell - The user-friendly command line shell.
ipython - Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
oh-my-bash - A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
PowerShell - PowerShell for every system!
zx - A tool for writing better scripts
elvish - Powerful scripting language & Versatile interactive shell
zsh-vi-mode - 💻 A better and friendly vi(vim) mode plugin for ZSH.