frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

France's homegrown open source online office suite

https://github.com/suitenumerique
469•nar001•4h ago•222 comments

British drivers over 70 to face eye tests every three years

https://www.bbc.com/news/articles/c205nxy0p31o
154•bookofjoe•2h ago•135 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
447•theblazehen•2d ago•160 comments

Leisure Suit Larry's Al Lowe on model trains, funny deaths and Disney

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
32•thelok•2h ago•2 comments

Software Factories and the Agentic Moment

https://factory.strongdm.ai/
33•mellosouls•2h ago•27 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
93•AlexeyBrin•5h ago•17 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
780•klaussilveira•20h ago•241 comments

First Proof

https://arxiv.org/abs/2602.05192
42•samasblack•2h ago•28 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
36•vinhnx•3h ago•4 comments

Reinforcement Learning from Human Feedback

https://arxiv.org/abs/2504.12501
59•onurkanbkrc•5h ago•3 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
1034•xnx•1d ago•583 comments

StrongDM's AI team build serious software without even looking at the code

https://simonwillison.net/2026/Feb/7/software-factory/
24•simonw•2h ago•23 comments

Coding agents have replaced every framework I used

https://blog.alaindichiappari.dev/p/software-engineering-is-back
180•alainrk•4h ago•255 comments

A Fresh Look at IBM 3270 Information Display System

https://www.rs-online.com/designspark/a-fresh-look-at-ibm-3270-information-display-system
27•rbanffy•4d ago•5 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
171•jesperordrup•10h ago•65 comments

Vinklu Turns Forgotten Plot in Bucharest into Tiny Coffee Shop

https://design-milk.com/vinklu-turns-forgotten-plot-in-bucharest-into-tiny-coffee-shop/
9•surprisetalk•5d ago•0 comments

72M Points of Interest

https://tech.marksblogg.com/overture-places-pois.html
16•marklit•5d ago•0 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
107•videotopia•4d ago•27 comments

What Is Stoicism?

https://stoacentral.com/guides/what-is-stoicism
7•0xmattf•1h ago•1 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
265•isitcontent•20h ago•33 comments

Making geo joins faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
152•matheusalmeida•2d ago•43 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
278•dmpetrov•20h ago•148 comments

Ga68, a GNU Algol 68 Compiler

https://fosdem.org/2026/schedule/event/PEXRTN-ga68-intro/
36•matt_d•4d ago•11 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
546•todsacerdoti•1d ago•264 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
421•ostacke•1d ago•110 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
365•vecti•22h ago•166 comments

What Is Ruliology?

https://writings.stephenwolfram.com/2026/01/what-is-ruliology/
65•helloplanets•4d ago•69 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
338•eljojo•23h ago•209 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
460•lstoll•1d ago•303 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
373•aktau•1d ago•194 comments
Open in hackernews

Bash-ini-parser: Advanced bash INI parser library

https://github.com/lsferreira42/bash-ini-parser
35•lsferreira42•10mo ago

Comments

theamk•10mo ago
My rule has always been that once a shell script gets too complex, it's time to rewrite it in real language. This library is way, way beyond that threshold.

My recommendation for rewrite is "python with only stdlib". Using pip-installed libraries brings in the famous packaging problems, but you don't have to use it! Python's stdlib is fully "batteries included", and it has lots of useful things like ini file parser. And if your system has bash, it often has python as well, or at least it's easy to install. Things might get a bit more verbose, but they would be much more reliable and debuggable.

quotemstr•10mo ago
People are generally bad about following their own advice. They're worst at following advice to avoid shell scripts. :-) We all know in theory we should move things to Python or another robust language once they become sufficiently complex, but in the moment, adding just this one feature takes precedence. Iterate "just one feature" a few times and you end up with a 1,000-line bash program. (The word "script" becomes inapplicable.) Now what? You want to add configuration support to your bash program? Well, you might as well use something robust to do it.
theamk•10mo ago
It does not have to be all-at-once.

Your bash program takes 10 input args and requires 15 env variables to be set? Don't reach out for that bash ini parser, create a python script which parses configs and invokes the original bash script. Next time you change feature, move it to python. Eventually you'll be mostly python.

Something that helps greatly with that is that you can embed bash in python. So initial conversion can be as simple as file rename + 3 lines of code.

    import subprocess
    subprocess.run(["bash", "-c", """
    echo This is bash
    if hostname | grep box; then
       echo running on a box
    fi
    """], check=True)
this lets you start by trivial .sh -> .py conversion, and then you can change one block at a time. Variables are tricky so do them first; or in the worst case, "declare -p" + "eval" + temporary files will save you.
quotemstr•10mo ago
It's not that simple. How are you passing argv to the bash script? What about how `subprocess.run` changes the error output to include Python exception spam? Plus, in most editors, you lose all the bash syntax highlighting in the bash program chunk. I haven't seen a lot of hybrid programs like this work well.
pwdisswordfishz•10mo ago
That's why it's just the first stage of an incremental rewrite.

argv is easy to pass, though.

theamk•10mo ago
It is that simple. You can pass arguments to `bash -c` with no problems(just don't forget a dummy $0). If you don't want exception spam, replace `check=True` with explicit exit. Here you go, it's 5 lines now.

    #!/usr/bin/env python3
    import sys
    import subprocess
    result = subprocess.run(["bash", "-c", """
    echo I am in bash, I have $# args, arg1 is "$1"
    set -x
    "$@"
    """, "dummy.sh"] + sys.argv[1:])
    sys.exit(result.returncode)
python's shell tooling is really good (if a bit verbose). And another cool thing is "shlex.quote", so you can write something like:

    subprocess.run(["bash", "-c", f"rsync {shlex.quote(filename)} somehost: | some-script"])
and have "filename" safely inserted into script fragment.. No command escapes, and newlines, quotes, backticks etc... are all handled properly.

The bash syntax highlighting will disappear, correct, and that is a downside. But hey, you are supposed to be rewriting this in python, so it's just more motivation :)

pwdisswordfishz•10mo ago
Which is why you rewrite in Python long before reaching that threshold. I start considering it as early as when I need to add any non-trivial command line parsing: argparse is just so much better than "while getopt".
thyristan•10mo ago
This is why my threshold for not using any shell is "does it have more than one loop, more than one if-statement, an argument or file format parser or more than 10 lines?". Meaning that only very trivial things can be shell scripts and you rewrite early enough such that it isn't really a hassle or painful.
quickslowdown•10mo ago
Have you seen the x-cmd package? It's nuts

https://x-cmd.com

It's legitimately impressive, the person/people behind this wrote some pretty interesting code, I've learned some things about Bash reading through parts of the code. But it's crazy at the same time.

rollcat•10mo ago
Long before systemd took over the init world, Debian led a huge effort to switch their entire infrastructure to dash[1], specifically making heavy use of checkbashisms[2]. The main reason behind it was performance: POSIX sh implementations were much simpler, and easier to optimise.

[1]: http://gondor.apana.org.au/~herbert/dash/

[2]: https://linux.die.net/man/1/checkbashisms

My rule of thumb is that if a shell script calls for a Bash-only feature, exceeds 100 lines, defines more than three functions, includes a nested loop, or a pipeline that exceeds 80 characters, it's probably time to reach for Python.

There are reasonable cases for exceptions - my backup script has about 200 lines and 6 functions, but it's 100% portable between Linux & macOS.

akx•10mo ago
> Using pip-installed libraries brings in the famous packaging problems, but you don't have to use it!

These days, with uv and PEP 723 inline script metadata, that's not an issue either.

    # /// script
    # dependencies = ["numpy"]
    # requires-python = ">=3.12"
    # ///
    import numpy as np
and

    uv run myscript.py
will just Do The Right Thing.
indentit•10mo ago
And if you come back to this script in a few years time and it pulls a newer version of numpy with an incompatible api, there is no easy way of knowing which version it was designed to be used with...
akx•10mo ago
You can of course absolutely use `"numpy~=1.12"` as a requirement.
zanecodes•10mo ago
Only if you didn't run `uv lock --script` [0] and commit the lockfile. If you don't want that second file sitting next to the script, you could instead specify an `exclude-newer` timestamp, and uv won't resolve any dependency versions newer than that.

It might be cool if uv ignored dependency versions newer than the script's last modified timestamp, but this behavior would probably need to be very explicit to avoid the situation where a working script is mysteriously broken by making an innocuous change which updates its last modified timestamp, causing uv to resolve a newer, incompatible dependency version.

[0] https://docs.astral.sh/uv/guides/scripts/#locking-dependenci...

mschuster91•10mo ago
> And if your system has bash, it often has python as well, or at least it's easy to install.

The problem is, bash is a universal target. Every unixoid system has bash in one way or another, usually at /bin/bash or in a pinch /usr/bin/env bash. No matter if your target system is Debian oldoldstable or bleeding edge Gentoo, it will run.

Python however is a hot mess. Some operating systems are at `python` yielding v2, others v3. Others (Macports) have python2 and python3 binaries if the user doesn't also do a `port select` afterwards. The user may have overridden this with virtualenv's (that this exists at all is a disgrace in itself). And that all is before `pip` even has entered the stage, or before you try to figure out what whitespace format Python expects and what whitespace format you just used in the last YAML file you edited.

(The whitespace shit is what will keep me from using Python if at all possible.)

thyristan•10mo ago
That is why you don't use Python, you use Perl. Every Unix has Perl, and Perl has backward compatibility into the last millenium. Always use 'strict' and proper linting for readability and typo avoidance.

If you are able to install modules, add 'IPC::Run' and 'Getopt::Declare' or 'Getopt::Euclid'. Never again will you be able to tolerate anything else ;)

IshKebab•10mo ago
uv has pretty much solved those issues, but it does need to be installed. Fortunately it's very easy to install.

Another option I've used is Deno.

theamk•10mo ago
Yeah, the naming was pretty bad for a while, but it seems today `#!/usr/bin/env python3` is a safe bet. And pip/virtualenv should not matter - remember, we've are talking about "python-without-dependencies"

As for tabs vs spaces - I really don't get it... My editor (emacs) picks the style automatically, I don't think I even had to set this up. But most of the python code I see use 2 or 4 spaces, so if someone puts tabs, it's immediately visible 8-character indents, which makes me alert (and then I turn on whitespace highlighting in my editor).

xelxebar•10mo ago
> rewrite it in a real language

This refrain shows up in every shell script discussion here, and hot take, I find it mostly ill-founded hogwash. Some of the worst spaghetti code I've seen is such Python and Javascript rewrites.

Choice of language only really helps when it encourages developers to use patterns that fit the underlying problem domain. However, Python's path of least resistance is OOP architecture, which usually fits terribly in the domains where shell scripts are ubiquitous, e.g. glue code between systems, infra administrative tasks, etc.

Almost all shell script tasks boil down to executing a linear collection of steps, and by organizing code thusly, I find shell scripts to keep code short, sweet, and very maintainable. Using a data-first design, with well-designed global state typically meshes well with shell's strengths—dynamic scope, pipes, word-splitting, etc, not to mention coreutils, grep, awk, etc.

IMHO, all the shell hate boils down to not recognizing an impedance mismatch between the programming paradigms of the programmer and language. Try writing Haskell like you would write Java or vice-vesa, and you'll end up with just as much of a mess.

</rant> This topic is a bug-bear of mine, for whatever reason. :shrug:

ndsipa_pomu•10mo ago
That's all well and good, but if you're looking for a language that will survive for decades, then BASH or shell scripts are a better choice. Often, there'll be some ancient machine that's been almost forgotten about and will die and need replacing. I can trivially copy a 30-year old BASH script and run it on a new machine, but can you do that with a 30-year old Python programme? How will today's Python survive the next 30 years?
theamk•10mo ago
python 3.0 code, released back in 2008, is still compatible with latest released python, with some exceptions like asyncio or obscure file formats which are unlikely to appear in scripts. The pip packages likely did break, but we are talking about python-with-stdlib here.

Granted, it's not 30 years old, but 17 years is pretty impressive. And I don't think there will be another big break, the 2.0->3.0 transition was so painful they'll likely avoid another one for decades.

ndsipa_pomu•10mo ago
17 years is very good. I don't have anything against Python, but there's a particular niche that shell/BASH scripts are ideal for. I keep considering writing more stuff in Python, but BASH operates at just the right level for tying systems together (computer duck tape).
lsferreira42•10mo ago
I agree with you on that, but I had this task on a legacy project with over 50k lines of shell scripts, and out of nowhere, it needed to start reading INI files and loading those values into environment variables. That's why this was written!
sebazzz•10mo ago
> My rule has always been that once a shell script gets too complex, it's time to rewrite it in real language

Is Powershell a real language? Because it is a shell script too.

I think you meant to say "data types" and "data structures"?

hiccuphippo•10mo ago
I used to do the same but lately I've been enjoying writing scripts using bun.js and its shell API: https://bun.sh/docs/runtime/shell

The main reason is piping commands, way easier than python. It's very easy to convert a bash script to bun.

albert_e•10mo ago
OT:

There is a initiative around bringing Indian languages into today's tech.

Named BHASHINI.

I initially thought the title was referring to that project given the similarity in name.

(Bhasha = Language)

cryptonector•10mo ago
An ini->JSON converter + jq should be enough.
mschuster91•10mo ago
For ingestion, yes, but if you want to write back the ini, you have now lost all comments. Besides, jq's syntax is ... arcane.
cryptonector•10mo ago
You get to choose the JSON schema for ini, and so you can choose to preserve comments. As to jq as a language, if you get used to it it's really awesome.
rastignack•10mo ago
Hint: for cicd usage you can parse ini files with git, often present in such situations.
IshKebab•10mo ago
Definitely one of those "if you're using it you've made a big mistake somewhere" pieces of software.
pixelbeat•10mo ago
For similar functionality have a look at crudini, which is a utility designed for interacting with ini files from shell scripts:

https://github.com/pixelb/crudini