oils
xonsh
oils | xonsh | |
---|---|---|
246 | 116 | |
2,809 | 8,295 | |
0.4% | 1.1% | |
8.7 | 9.7 | |
6 days ago | 8 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.
oils
- Oil Shell: Our upgrade path from bash to a better language and runtime
-
The Modern CLI Renaissance
Switching away from being bash compatible would be really unexpected. Maybe something like http://www.oilshell.org/ has a chance though?
If we were breaking away from the old style shells completely, then https://www.nushell.sh/ would be my preferred upgrade.
-
Which open-source projects are widely used but maintained by just a few people?
bash and readline - Chet Ramey. Both originally by Brian Fox https://twobithistory.org/2019/08/22/readline.html
maybe less of a bus factor now with OSH approaching feature/speed parity and having more maintainers https://www.oilshell.org/
-
Optimizing a Bignum Library for Fun
Hm I'm not familiar with that library (or really any others in the landscape). Why pick that one?
I'd be interested in a review / survey, and the strategy for testing. Basically the tests should "argue" that the code is correct, and documentation / blog posts also count!
(I'm honestly not sure how hard it is to make a correct big num library. But I think the original article in this series said there were probably bugs, so I'm guessing it's not trivial)
To give a flavor, we publish test results and and coverage numbers like this [1], and any new library should be consistent with this:
https://www.oilshell.org/release/0.22.0/quality.html
Our GC runtime has less than 5000 lines of hand-written C++ now, so any solution should be in proportion to that. That is, we probably wouldn't take on 3000 lines of code just for big nums.
So we favor correctness over performance. Hopefully there would be little perf loss in the small int case, but it's OK if the big int case is slow. It's the rarer case for sure.
---
As far as the grant, we pay in 2500 euro or 5000 euro increments, and I don't try to parse it any more than that. I care about the result, not if it's easy for a particular person :)
For example earlier this year we had a contributor Justin who worked on the pretty printer, with Wadler's algorithm (which I was unfamiliar with).
https://www.oilshell.org/blog/2024/06/release-0.22.0.html
And he had co-authored a paper on pretty printing, so it was probably not too difficult overall. But that's a good thing as far as I'm concerned!
So if you or anyone else thinks it's easy, please feel free to contact me / play around with the code, etc.
https://github.com/oilshell/oil/wiki/Where-Contributors-Have...
[1] our unit test coverage is reported at 83% or so, but we favor "exterior" tests, so it's really close to 95% or 99%. Also of course line coverage is a misleading metric.
-
The Software Crisis
All these programs will output ANSI color if `isatty(stdout)` is true (roughly speaking).
Most people didn't quite get that -- they thought we should use "nREPL" or something -- but my opinion is that you really need a specific protocol to communicate with a shell, because a shell spawns other programs you still want to work.
---
Here is a pure Python 3 implementation of the recv() side of FANOS in only ~100 lines
https://github.com/oilshell/oil/blob/master/client/py_fanos....
It uses the recvmsg() binding . I'm pretty sure node.js has that too? i.e. it has Unix domain socket support
---
Anyway, thanks for taking a look - we're interested in feedback!
-
The Pre-Scheme Restoration project is now underway
This is similar to how https://www.oilshell.org/ is written
There are two complete implementations
1. one that runs under a stock Python interpreter (which doesn't use static types)
2. one that's pure C++, translated from statically typed Python code, and from data structures generated in Python
In the second case, everything before main() is "burned off" at build time -- e.g. there is metaprogramming on lexers, flag parsers, dicts, etc. that gets run and then into static C data -- i.e. pure data that incurs zero startup cost
Comparison to Pre-Scheme: https://lobste.rs/s/tjiwrd/revival_pre_scheme_systems_progra... (types, compiler output, and GC)
Brief Descriptions of a Python to C++ Translator - https://www.oilshell.org/blog/2022/05/mycpp.html
...
And related to your other point, I remember looking at Racket's implementation around the time it started the Chez Scheme conversion. I was surprised that it was over 100K lines of hand-written C in the runtime -- it looked similar to CPython in many ways (which is at at least 250K lines of C in the core).
-
POSIX.1-2024 Is Published
Is it an array of strings because it's a "simple command"? Or does it behave like an assignment? You get two different answers depending on how you look at it.
The bottom line is that assignment builtins are special and they don't follow the normal rules of simple commands. Shells have differed, but POSIX decided on this awhile ago.
---
This is all of course mind numbing trivia that has no real reason for existing ... YSH fixes it, and it's now pure native C++, no more Python.
YSH Doesn't Require Quoting Everywhere - https://www.oilshell.org/blog/2021/04/simple-word-eval.html (Oil was renamed to YSH since this blog post was written)
Simple Word Evaluation in Unix Shell - https://www.oilshell.org/release/latest/doc/simple-word-eval...
In YSH you can tell just by looking it's a single string or an array.
ls $a # identical to ls "$a"
-
New Programming Langauge Makes Bash Scripting Easier
Oils is a different approach to this - the base “OSH” language is pretty much identical to bash, and then you can incrementally opt in to more checks and QOL improvements.
The key selling point is that you never have to totally rewrite your existing bash scripts - there’s an incremental upgrade path.
https://www.oilshell.org/
-
Elvish, expressive programming language and a versatile interactive shell
While I don't agree with most of your analysis - in particular for the second example, I'd invite you to read its explainer that goes into much more depth (https://elv.sh/learn/scripting-case-studies.html#update-serv...) - I think you might be more interested in the Oil Shell project, which is trying to chart a smooth upgrade path from bash: https://www.oilshell.org
I think we simply can't say for sure which path is better for the future of shells, and I'm quite excited by the fact that different projects are exploring different directions. I will just stick to the path I find best and won't try to convert you :)
-
The life and times of an Abstract Syntax Tree
Some related references (on a somewhat messy wiki page) - https://github.com/oilshell/oil/wiki/Compact-AST-Representat...
Feel free to add others
xonsh
-
Reasons I still love the fish shell
If you like this sort of thing, I strongly recommend also checking out the xonsh shell.
It's bash-like, but Python based. Works on both Windows and Linux. Has several of the benefits mentioned in this article. It's really nice that I don't need to learn another language for shell scripting - its language is Python, with some extensions to make it less tedious (e.g. easily executing commands without using os.system or subprocess).
Been using it since 2018.
https://xon.sh/
- Xonsh is a Python-powered shell
-
Streamlining Project Automation with Makim
Makim extends its functionality beyond conventional script execution by supporting various interpreters and shell languages, facilitating a versatile development environment. While xonsh is the default interpreter - blending the capabilities of Bash and Python for an enriched command-line experience - Makim's architecture allows for seamless integration with other environments. For developers seeking to leverage this feature, a foundational understanding of xonsh can be beneficial. Comprehensive details and usage guidelines are available in the official xonsh documentation.
- AIM Weekly for 10 June 2024
-
This Week In Python
xonsh – Python-powered, cross-platform, Unix-gazing shell
- FLaNK Stack Weekly 19 Feb 2024
- Xonsh is a Python powered shell
-
Xonsh: Python-powered, cross-platform, Unix-gazing shell
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.
- Xonsh – A Python-Powered Shell
What are some alternatives?
nushell - A new type of shell
fish-shell - The user-friendly command line shell.
elvish - Powerful scripting language & versatile interactive shell
ipython - Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
FaceFusion - Next generation face swapper and enhancer
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.
ngs - Next Generation Shell (NGS)
PowerShell - PowerShell for every system!
zx - A tool for writing better scripts