You are not logged in.
Pages: 1
Arch is an OS that almost 100% if it is written in bash programming language.
I was curious to know why?
Is there any advantage for bash here? For example, why not use Python or C? I don't want say that they're better technologys or something like that. But Despite the inherent differences that these languages have, was there any specific reason for choosing bash?
Offline
Arch is an OS that almost 100% if it is written in bash programming language.
Some of the Arch specific scripts are written in bash but these aren't usually things that require a more performant language. Ease of maintenance and contribution can be more important than saving the odd millisecond here and there.
Are there any specific utilities that you are thinking of? One of the best Arch utilities (pacman) is already written in C. The archinstall script is python. What do you think could be improved by switching to a different language?
Offline
Can you clarify what you mean by "Written in bash"?
The GNU/Linux kernel is written almost entirely in C, going to https://github.com/archlinux/linux/ shows us that 98.3% of the project is written in C.
Offline
Arch is an OS that almost 100% if it is written in bash programming language.
No. This is completely false. Did you see this in an article published 8 days ago?
Bash is the default interactive shell in arch. But that's true of a very wide range of other distros (I'd bet the vast majority of distros even). Bash is also far too often assumed, or required by scripts that really shouldn't need bash specifically - this is a personal pet peeve of mine - but this too is not an issue exclusive to arch linux (in my experience, the *buntus are worse in this regard).
Makepkg is a bash script (or set of bash scripts). And that is a (mostly) uniquely arch bit of software. But it's definitely not 100% of the OS ... one would have to have a pretty liberal definition of "OS" for it even to be included in that.
Last edited by Trilby (2022-04-09 21:49:20)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm guessing this is based on PKGBUILDs being all bash. And so stats on Arch code will be heavily skewed there.
What is packaging apart a wrapper around running a set of shell commands to build software? What better language to run a series of shell commands in than bash? There have been proposals to use other approaches/languages for PKGBUILDs to better specify packaging dependencies etc. But plain bash gives so much flexibility!
Offline
Allan, how about a pacman rewrite in bash?
Offline
Allan, how about a pacman rewrite in bash?
I'd prefer haskell. Then we'll get frequent pacman updates due to new ABI releases.
Last edited by schard (2022-04-10 13:07:57)
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
What do you think could be improved by switching to a different language?.
i did not do any research or testing, so I prefer to don't repeat the buzz that is all over the net
Last edited by junux (2022-04-11 04:40:46)
Offline
Can you clarify what you mean by "Written in bash"?
The GNU/Linux kernel is written almost entirely in C, going to https://github.com/archlinux/linux/ shows us that 98.3% of the project is written in C.
No, I didn't mean the kernel, was talking about Arch scripts.
Offline
Bash is the default interactive shell in arch. But that's true of a very wide range of other distros (I'd bet the vast majority of distros even). Bash is also far too often assumed, or required by scripts that really shouldn't need bash specifically - this is a personal pet peeve of mine - but this too is not an issue exclusive to arch linux (in my experience, the *buntus are worse in this regard).
Makepkg is a bash script (or set of bash scripts). And that is a (mostly) uniquely arch bit of software. But it's definitely not 100% of the OS ... one would have to have a pretty liberal definition of "OS" for it even to be included in that.
oh, I agree, it's a little tricky to separate and label different parts of an OS in Linux based systems.
No. This is completely false. Did you see this in an article published 8 days ago?
no I didn't, do you have an address about it?
Offline
Slithery wrote:What do you think could be improved by switching to a different language?.
i did not do any research or testing, so I prefer to don't repeat the buzz that is all over the net
Can you provide any links to this 'buzz that is all over the net'? I haven't seen any.
Trilby wrote:No. This is completely false. Did you see this in an article published 8 days ago?
no I didn't, do you have an address about it?
8 days ago when Trilby posted was April Fools day...
Offline
No, I didn't mean the kernel, was talking about Arch scripts.
Because some kind of shell must already be present in the system. So why not use it?
Last edited by mpan (2022-04-11 12:42:01)
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
This is really setting off my troll alarm.
Online
My first guess was that we're being asked to do somebodies homework ("Describe the differences between C and bash. List 10 pros and cons of each. In what context is C/bash the better choice?")
The question is vague and the premise wrong … sounds like a school teachers inquiry
Offline
Pages: 1