Happy to announce that I just published my #PolyglotScript v2.0.0 research report for #cli #commandline #shell. It consolidates #batchfile, #PowerShell, and #POSIXShell together into 1 single file that can run anywhere, everywhere without requiring to install anything.

Tested on #linux, #windows, and #macos. For #FreeBSD, still pending because GitHub does not officially facilitate #FreeBSD yet.

Check it out at:

https://doi.org/10.5281/zenodo.19805433

Polyglot Scripts Continuous Research

Conventional scripting practices remain tethered to platform-specific interpreters, forcing developers to maintain redundant codebases like batch, PowerShell, and POSIX shell. This poses a significant problem when there is a requirement to unify all of them under a single common command especially seen in continuous integration (CI) implementations. Moreover, the situation worsens considerably for cross-platform implementations where the initializer must locate not only the correct interpreter but also OS-specific and architecture-specific executables before running them. Unlike programming languages, there are requirements where these scripts run first to initialize the environment, such as setting up a programming language interpreter. Therefore, there is a need for these initializer unifications. This research project introduces the Polyglot Scripts, a novel unification layer that enables a single unified script file to execute seamlessly across Windows OS, UNIX, and UNIX-like OSes without modification. It is done by exploiting the syntactic intersections and conditional parser directives among the shell scripts, achieving true write-once-run-anywhere semantics at the shell level. Beyond cross-platform utility, these scripts simplify the user command into a single launch file, permit on-site editing instead of compiling|cross-compiling every time, and remain adaptive across all operating systems' technological advancements. For automation engineers/developers, this project produces a set of usable Polyglot Scripts to quickly eliminate environment anxiety, shrink maintenance overhead, and deliver future-proof workflow portability without increasing the learning curve. Polyglot Scripts: a universal runtime contract between the human and any machine in the past, present, and future. This is a self-sufficient independent research report. Therefore, you MUST ALWAYS approach it with full skepticism before reading. Let the report's data and presentation convince you. Verify the findings by reproduction and check its reference validity before concluding your judgment.

Zenodo
by the way this site script now automatically converts every photo to 8-bit png on the site using imagemagick. 8-color dithering cuts file sizes dramatically.

also for testing purposes it generates an index pages with total size of all photos in bytes. loving it!

https://romanzolotarev.com/.ssg.imgs.html

#dithering #smallweb #posixshell #imagemagick

#Poll: Curious about people's attitudes towards shell scripting.

Two part question:

  • Are you a DEVeloper (or working in a development-heavy role), OTHER-IT worker (such as a sysadmin, architect, anything in a non-development-heavy role), or NON-IT (accountant, doctor, whatever)
  • Do you HATE shell scripting, are you INDIFferent towards (or ignorant of) shell scripting, or do you LOVE it?
  • #Unix #UnixShell #ShellScript #ShellScripting #POSIX #PosixShell #sh #bash #zsh #csh #tcsh #ksh #pdksh #oksh #mksh

    dev - hate
    10.4%
    dev - indif
    15.6%
    dev - love
    22.9%
    other-it - hate
    2.1%
    other-it - indif
    9.4%
    other-it - love
    24%
    non-it - hate
    1%
    non-it - indif
    7.3%
    non-it - love
    7.3%
    Poll ended at .

    Should've made this a long time ago:

    function ciglob { #case-insensitive glob generator echo "$*" |while read -N1 c; do case "$c" in [a-zA-Z]) echo -n "[${c^^}${c,,}]";; *) echo -n "$c" esac done } ~ $ ciglob "Hello, world!" [Hh][Ee][Ll][Ll][Oo], [Ww][Oo][Rr][Ll][Dd]! ~ $ ls -ld $(ciglob documents) drwxr-xr-x 52 ~~~ ~~~ 20,480 Apr 10 11:45 Documents

    (Not the most useful example, but I did have a use case in mind when I wrote it ;)

    P.S. (This is a valid way to close a parenthesis. Fight me ;)

    #bash #ksh #sh #shell #UnixShell #POSIX #PosixShell #ShellScripting

    🤔 Ah, the noble pursuit of reinventing the wheel with a POSIX shell in 2023! Kalua promises to turn your Wi-Fi #dreams into a reality (assuming you can navigate the labyrinthine #GitHub pages without losing your mind). 🌐 And don't worry, it's equipped with all the #buzzwords you need to impress your local IT club. 😂
    https://github.com/bittorf/kalua #reinventingthewheel #POSIXshell #WiFi #HackerNews #ngated
    GitHub - bittorf/kalua: hardware-independent openWRT-extension (using POSIX-shell as main-language) for setting up, monitor and manage many, large wifi-mesh-networks for different locations including billing, captive portal / splash screen / weblogin, accounting, data retention and layer7/8-QoS

    hardware-independent openWRT-extension (using POSIX-shell as main-language) for setting up, monitor and manage many, large wifi-mesh-networks for different locations including billing, captive port...

    GitHub

    @computerfact

    foo $(bar) $(baz 1)

    "They made me stop using the backtick because on non-U.S.A. keyboards it is often a dead key. So I picked the U.S.A. dollar as its more international replacement."

    (-:

    #PowerShell #POSIXShell