Other [New idea] Super programming language - Super programming interface

  • Thread starter Deleted member 66267
  • Start date
Let's imagine we dropped the ancient Unix shell but glued everything through a super glue programming language, just call it: Bython.

Python is very close to this, but not yet, and of course it must be BSD licensed, so call it: Bython.

Shell is not even a programming language, but a loosely way to put other small utilities together to form a script.

The shell will be replaced. The small utilities will be dropped in favor of one central controlled environment.

Imagine:

Instead of writing, ls -a, we would open our super glue programming language REPL and type this:

>>> SysUtils.list()

Another example:

Instead of writing sysctl vfs.zfs.min_auto_ashift=12, we would write something like this:

>>> SysCtl.set(vfs.zfs.min_auto_ashift, 12)

We could optionally provide compatible layer for old Unix shell scripts to continue running, but:

/bin/sh will be a Bython script:

#!/bin/bython

SysUtils.shell.exec()

/bin/ls, /bin/cp,... all of these small utilities will now be just a Bython script.

Bython will need to be part of the base system. But who care about the bloat? All of the small utilities now just plain text scripts, we really saved space! And the benefit of having a proper programming language rather than a "shell" is much bigger than that!

Completely integrated. We now have total control of everything!

Let's abandon the old outdated Unix's way, let's start doing it the failure's way!
OpenVMS calls it DCL, so the concept's pretty old. ;):eek:
 
It started to go downhill after abandoning the button boards for toggeling peek/poke addresses. You know? After that, there were punchcards. Everybody could use them! And everybody did...

Ok, I'll get my coat.
 
without disrespect you failure ,
sounds like "one to rule them all"
like one virus in the world of linux that all people knows
the concept as it, sound too bad
horrible
I saw nothing wrong with that. I even dreamed someday on FreeBSD instead of invoking ifconfig I could just write sysctl network up, done. sysctl has the very potential to involve to be a super utility to manage the system, like systemctl, instead of just a tool to change kernel state now.

Almost forgot, we are able to do network management with SystemD for a while, check networkd.
 
Is that Bythonesque? It should really be:

Code:
freebsd.system.internal.get_sysctl.set(freebsd.system.internal.identifiers.vfs.get_zfs().get_min_auto_ashift().get_id(), value=12)

easy, efficient, effective. You get to choose exactly 0.

In some ways, this feels a little bit like Windows Powershell. It is too close to a programming language, making it a little too awkward to use as an interactive shell. And yet not a particularly good programming language either.
Bython should get things simplified more than the generic Python because it role as a system super glue language, not as much as generic as Python.

BTW, whenever you write Python you already need at IDE. Bython is the same. If you want to play with simple scripts, the REPL is enough. But if something more complicated, fire up an IDE with intellisense code completion, the only thing you have to do is type the dot and it will give suggestions for you. Do not need to remember anything!

I hate the shell because I have to remember too much. I recall on my Windows days, I only need to know the language and the design patterns, typing the dot will help me anything else with the libraries, no need to remember anything, oh CSharp and Visual Studio, I remember them!
 
There is something strange in this thread: no one proposed lua as a shell. Where are the luanatics?
I hate Lua :) Used to download ZeroBrane Studio on Windows to play with it a bit but have never able to have a running program!
I have nothing surprise if the new Lua bootloader sucks. Lua is a terrible language anyway.
 
That, dear sir, is the Linux way. Perhaps failure is a Linux mole.. :)
Is there anything wrong with the Linux way?
I really changed my mind after read a Linux forum a long time ago.
People on the internet cursing SystemD like it's 'shit', but the actual people using it daily praise it and pretty much happy with it.
I have learned one important lesson: don't care about the naysayers, they just hate you regardless of what you do is right or not :)

The only downside with SystemD is lacking of competitors, so I pretty much appreciate the Init Freedom movement, too, but of course without the BS about SystemD from them :)
 
Is there anything wrong with the Linux way?
Yes, as I've mentioned before. A recap: The NIH syndrome is strong in Linux community (that's kernel and userland but more so userland). They love to re-invent the wheel, and even if the wheel is perfect, they'll replace the axle and tyres/tires and call them spindles and rubber-thingies. They see an init system that hasn't been maintained for years and no bugs as a reason to re-write it because, well, you can.

The real problem is too many project have been 'hijacked' by Linux people, maybe through financial investment or because there's more of 'them'. Either way, things like X suffer death by a thousand cuts as they try to push the less than stellar protocol Wayland as an alternative. How many years, now and counting?

But, I digress, I didn't reply to this thread to defecate on systemd/Linux, so I'll stop now.

I really changed my mind after read a Linux forum a long time ago.
People on the internet cursing SystemD like it's 'shit', but the actual people using it daily praise it and pretty much happy with it.
Well that's great. I hear a lot of people like Windows and MacOS. More power to them. Just because some other kernel or OS uses X does not make it fit for purpose for another OS.

Final thing: My personal opinion is systemd is shit. It's a faux copy of Solaris SMF and a direct rip-off of launchd. Neither of them get any love from me. Systemd is a solution looking for a problem, and as it finds that problem it creates more solutions for the ever expanding scope creep.

I have learned one important lesson: don't care about the naysayers, they just hate you regardless of what you do is right or not :)
Yes, I'm no racist: I hate everyone equally. :D

The only downside with SystemD is lacking of competitors, so I pretty much appreciate the Init Freedom movement, too, but of course without the BS about SystemD from them :)

Well systemd had competitors, in all the other init systems, but it branched out into userland and, from all accounts, has not stopped. Doesn't it have as many lines of code (a poor metric I know) as Linux? The definition of an init system, no doubt... :-/ (yes, that's an ironic statement).
 
I hate the shell because I have to remember too much.
Code:
# System-wide .cshrc file for csh(1).
# (environment variables are set in login.conf)
# Interactive shell
if ( $?prompt ) then
    set completions = /usr/share/examples/csh/dot.cshrc
    if ( -f $completions ) then
        source $completions
    endif
    set aliases = /etc/csh.alias
    if ( -f $aliases ) then
        source $aliases
    endif
    set prompt = "%B%N@%m:%c02 %# "
    set promptchars = '$#'
    set ellipsis

    set autoexpand
    set autolist
    set autorehash
    set filec
    set histdup = erase
    set history = 5000
    set mail = "/var/mail/$user"
    set noclobber = notempty
    set printexitvalue
    set savehist = (5000 merge lock)
    set symlinks = ignore
    if ( $?tcsh ) then
        bindkey "^W" backward-delete-word
        bindkey -k up history-search-backward
        bindkey -k down history-search-forward
    endif

    # csh(1) can't test a nonexistent variable...
    #eval `reset -s`
    if ( $?DISPLAY ) then
        [ -n "$DISPLAY" ] && eval `/usr/local/bin/resize`
    else resizewin -z
    endif
endif
Code:
alias .         source
alias ..        cd ..
alias ...       cd ../..
alias ....      cd ../../..
alias .....     cd ../../../..

alias cls       clear           # clear screen
alias h         history
alias j         jobs -l
alias hgrep     'history|bsdgrep'

# human-readable number format (kB,MB,GB,...) for various commands:
alias df        df -h
alias du        du -h
alias swap      swapinfo -h

#alias ls       ls -G           # XXX Better switched on/off via CLI_COLOR
set listflags   = A             # 'listflags' apply only to the builtin 'ls-F'
alias lf        ls-F
alias la        ls -A
alias ll        ls -lah

# be verbose & do not accidently remove/overwrite files
alias rm        rm -Iv
alias cp        cp -iv
alias ln         ln -iv
alias mv        mv -iv

# 'resize' comes with x11/xterm
alias resize    '[ -n "$DISPLAY" ] && eval `/usr/local/bin/resize`'

# be welcoming to Linux'ers
alias lsmod     kldstat
alias insmod    kldload
alias rmmod     kldunload

alias vi        vim
alias view      vim -R

alias freq      sysctl dev.cpu.{{0,1,2,3}.cx_usage,0.freq}
alias temp      sysctl dev.{acpi_ibm.0.fan_speed,cpu.{0,1,2,3}.temperature} hw.acpi.thermal.tz0.temperature
alias sysctl    sysctl -e
alias top       top -tzs 5
I recall on my Windows days, I only need to know the language and the design patterns, typing the dot will help me anything else with the libraries, no need to remember anything, oh CSharp and Visual Studio, I remember them!
Try devel/kdevelop.
 
BTW is this your 1st account in this Forums? The tone of your sentences sounds very familiar.
Honestly I learned most of these things (SystemD, The Shell, Linux's way,...) from Reddit and YCombinator and this help formed my own opinion. Due to limitation of English skill sometime I do copy the whole comment of people and only modify it a bit to suit the context and post on this forum. It's nothing surprise you found it's like dejavu because you might really did read the similar content somewhere somehow.

This is not my 1st account. I'm honest. But the 1st since I come back since 2017, I have left this forum for more than 3 years because I went back to Windows dual boot with Linux Mint.

Sometimes I hate myself. I think I'm like a robot just do rearranging words to form a sentence is difficult for me and I did it unnaturally. Sometimes I was mistaken as a chat bot by people. This usually more serious when I'm stress.
 
i
i
i
i
i
Well maybe this isn't the first time we've met after all. :)

If not, and we've spoken before, then this isn't the place to discuss old times. There has been enough of that already and spambots now use that text in their babble on several different sites I found by chance recently while waxing nostalgic...

I know a nice HTML chatroom more appropriate where I would love to chat about old times with that person. They won't be happy to see me there, but as long as it's not them I'm there to chat with I doubt they would object.
 
Honestly I learned most of these things (SystemD, The Shell, Linux's way,...) from Reddit and YCombinator and this help formed my own opinion.
And THAT explains EVERYTHING! You formed your opinion from the worst places on earth. It's like living in the gutter, then trying to present your views business leaders as fact for how to run things. Never, EVER use reddit as a reference for ANYTHING! And YCombinator/HN can be just as bad.
 
They see an init system that hasn't been maintained for years and no bugs as a reason to re-write it because, well, you can.
Unfortunately this is happening everywhere, that was also my complaint against lua in the loader.

TeX versions converge to pi, every new version add a new decimal digit. The idea is clear, when it
gets perfect, then the version becomes exactly pi, then there is not a little change more, perfection
is eternal. But TeX (and Metafont) are exceptions. Today good working programs are declared bitrotten
and substituted.
 
You formed your opinion from the worst places on earth. It's like living in the gutter, then trying to present your views business leaders as fact for how to run things.
Agreed. Please form opinions from personal experience. This is what adds to ideas and improvements. Not just regurgitating reddit. This is how religious cults full of "anti GPL or anti BSD" teens are formed.

From what I can see, about 50% of the Linux community still dislike SystemD. This is not impressive.
 
"Enterprisy" code, representative example: https://thedailywtf.com/articles/Enterprise-Incrementation

(no, it's not a compliment)

EDIT: "enterprisy" is when you have a factory, several observers and maybe a singleton with a model for something that can be done in a single line of code.
I find that I really need to use the controller advice pattern in most of my Enterprise software.
There is something strange in this thread: no one proposed lua as a shell. Where are the luanatics?
Present! I actually tried to write this. I got as far as reading a couple of chapters of Linux Application Development and getting the sample ladsh therein working on my Gentoo system.

If this forum allowed custom titles, I'd adopt "Luanatic". I love it!
 
I occasionally use irb for file manipulation. Not sure if it would be possible to make a Unix-style shell out of it.
 
I actually tried to write this.
Till now no lua shell in spite of so much luanatics that want lua everywhere?!

I do not know if lua can call external functions, but sure can be extended to that using C.

Tcl has its exec. And now there is a modular, small footprint tcl interpreter:


And although there are also a lot of tcl fans, till now no tcl shell. And there are sure good reasons.
 
In the CDE days there was dtksh which was basically a standard ksh shell with the ability to access Motif functions via inbuilt bindings. You can see how that works on the example on this page: https://docstore.mik.ua/orelly/unix3/korn/appa_04.htm

Now I thought this was fantastic for small interactive scripts requiring the odd bit of input from the user. It doesn't seem that there has ever been a Tk equivalent. Generally people use dialog or xdialog for this instead. However in my opinion it has never quite had such tight integration to do more sophisticated layouts.
 
Tcl/Tk serves that purpose, but is not 100% suitable for a shell. You can call programs with exec.
Yeah it is kind of similar to Awk in that it can, however it is a little bit less seamless than shell scripts. I.e having exec everywhere does sometimes suggest that the wrong tool is being used.

As a language, Tcl is a little bit unscalable in that you can't return arrays or structures from a function. This can be worked around by passing in the data to be operated on but then has a knockon effect to structures inside structures. Awk has this same issue. Both however are much more suitable than i.e shell scripts for larger programs.

One of tcl and awk best features is that they are *not* extensible. You don't get all these stupid PIP/CPAN/crates/NPM dependency mess generators. So if you grab an i.e tcl snippet, you know that it should work without some old deprecated string splitting library that some kid decided to drag in. I think "modern" Tcl has a package repo but it isn't really the cuture to use it.
 
Back
Top