frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Do not download the app, use the website

https://idiallo.com/blog/dont-download-apps
797•foxfired•10h ago•446 comments

Open Sauce is a confoundingly brilliant Bay Area event

https://www.jeffgeerling.com/blog/2025/open-sauce-confoundingly-brilliant-bay-area-event
88•rbanffy•2d ago•25 comments

Turn any diagram image into an editable Draw.io file. No more redrawing

https://imagetodrawio.com/
31•matthewshere•1h ago•8 comments

CCTV Footage Captures the First-Ever Video of an Earthquake Fault in Motion

https://www.smithsonianmag.com/smart-news/cctv-footage-captures-the-first-ever-video-of-an-earthquake-fault-in-motion-shining-a-rare-light-on-seismic-dynamics-180987034/
108•chrononaut•5h ago•19 comments

It's time for modern CSS to kill the SPA

https://www.jonoalderson.com/conjecture/its-time-for-modern-css-to-kill-the-spa/
438•tambourine_man•11h ago•249 comments

Show HN: Auto Favicon MCP Server

https://github.com/dh1011/auto-favicon-mcp
7•dh1011•1h ago•0 comments

Users claim Discord's age verification can be tricked with video game characters

https://www.thepinknews.com/2025/07/25/discord-video-game-characters-age-verification-checks-uk-online-safety-act/
35•mediumdeviation•4h ago•20 comments

Simon Tatham's Portable Puzzle Collection

https://www.chiark.greenend.org.uk/~sgtatham/puzzles/
9•sogen•1h ago•2 comments

It's a DE9, not a DB9 (but we know what you mean)

https://news.sparkfun.com/14298
378•jgrahamc•19h ago•244 comments

Never write your own date parsing library

https://www.zachleat.com/web/adventures-in-date-parsing/
174•ulrischa•14h ago•226 comments

Windsurf employee #2: I was given a payout of only 1% what my shares where worth

https://twitter.com/premqnair/status/1948420769945682413
541•rfurmani•1d ago•364 comments

Vanilla JavaScript support for Tailwind Plus

https://tailwindcss.com/blog/vanilla-js-support-for-tailwind-plus
244•ulrischa•14h ago•116 comments

Why MIT switched from Scheme to Python (2009)

https://www.wisdomandwonder.com/link/2110/why-mit-switched-from-scheme-to-python
217•borski•15h ago•186 comments

Efficient Computer's Electron E1 CPU – 100x more efficient than Arm?

https://morethanmoore.substack.com/p/efficient-computers-electron-e1-cpu
196•rpiguy•16h ago•69 comments

Animated Cursors

https://tattoy.sh/news/animated-cursors/
177•speckx•14h ago•38 comments

Experimental surgery performed by AI-driven surgical robot

https://arstechnica.com/science/2025/07/experimental-surgery-performed-by-ai-driven-surgical-robot/
91•horseradish•12h ago•94 comments

Why I Do Programming

https://esafev.com/notes/why-i-do-programming/
9•artmare•2h ago•3 comments

What is X-Forwarded-For and when can you trust it? (2024)

https://httptoolkit.com/blog/what-is-x-forwarded-for/
22•ayoisaiah•2d ago•5 comments

Steam, Itch.io are pulling ‘porn’ games. Critics say it's a slippery slope

https://www.wired.com/story/steam-itchio-are-pulling-porn-games-censorship/
477•6d6b73•16h ago•629 comments

The future is not self-hosted

https://www.drewlyton.com/story/the-future-is-not-self-hosted/
303•drew_lytle•20h ago•283 comments

Developing our position on AI

https://www.recurse.com/blog/191-developing-our-position-on-ai
206•jakelazaroff•2d ago•65 comments

A Union Pacific-Norfolk Southern combination would redraw the railroad map

https://www.trains.com/trn/news-reviews/news-wire/a-union-pacific-norfolk-southern-combination-would-redraw-the-railroad-map/
52•throw0101c•11h ago•81 comments

CO2 Battery

https://energydome.com/co2-battery/
125•xnx•16h ago•112 comments

Women dating safety app 'Tea' breached, users' IDs posted to 4chan

https://www.404media.co/women-dating-safety-app-tea-breached-users-ids-posted-to-4chan/
416•gloxkiqcza•16h ago•528 comments

Programming vehicles in games

https://wassimulator.com/blog/programming/programming_vehicles_in_games.html
263•Bogdanp•17h ago•59 comments

Generic Containers in C: Vec

https://uecker.codeberg.page/2025-07-20.html
19•uecker•3d ago•14 comments

Researchers value null results, but struggle to publish them

https://www.nature.com/articles/d41586-025-02312-4
111•Bluestein•2d ago•41 comments

Steve Jobs' cabinet

https://perfectdays23.substack.com/p/steve-jobs-cabinet
74•padraigf•3d ago•62 comments

Show HN: Apple Health MCP Server

https://github.com/neiltron/apple-health-mcp
174•_neil•2d ago•35 comments

Show HN: Open IT Maintenance Planner

https://maintenance-planner.vangemert.dev/
9•spmvg•2d ago•3 comments
Open in hackernews

Modernish – A library for writing programs for POSIX-based shells and utilities

https://github.com/modernish/modernish
73•sundarurfriend•4d ago

Comments

pimlottc•1d ago
This could really use a short, pithy code example at the start of the readme to show what it looks like. Otherwise, you have to get pretty far into the docs to see any actual commands, or click the example link which doesn’t display well on mobile.
lioeters•1d ago
Comparison with Bash, from https://github.com/modernish/modernish/blob/master/EXAMPLES....

# Plain POSIX sh

    #! /bin/sh
    git status >/dev/null || exit
    if ! git diff-index --quiet HEAD; then
        echo 'Working dir not clean' >&2
        exit 1
    fi

    find . -name .git -prune \
    -o -exec sh -c '
        # Ask Git for latest commit'\''s timestamp,
        # formatted for POSIX '\''touch -t'\''.
        timestamp=$(git log --format=%cd \
          --date=format:%Y%m%d%H%M.%S \
          -1 HEAD -- "$1") || exit
        [ -n "$timestamp" ] || exit

        set -x
        touch -t "$timestamp" "$1"
    ' dummy {} \;

# Modernish

    #! /usr/bin/env modernish
    #! use safe
    #! use sys/cmd/harden
    #! use var/loop
    harden git
    harden -e '>1' -f wd_is_clean \
        git diff-index --quiet HEAD
    harden -pt touch

    git status >/dev/null
    wd_is_clean || exit 1 'Working dir not clean'

    total=0
    LOOP find repofile in . -name .git -prune \
    -or -iterate; DO
        # Ask Git for latest commit's timestamp,
        # formatted for POSIX 'touch -t'.
        timestamp=$(git log --format=%cd \
          --date=format:%Y%m%d%H%M.%S \
          -1 HEAD -- $repofile)
        str empty $timestamp && continue

        # 'touch' is traced by 'harden -t'.
        touch -t $timestamp $repofile
        let "total+=1"
    DONE
    exit 0 "$total timestamps restored."
cb321•21h ago
Their `use` shell function should really be `use1` and `use` should process its whole argument list. Then their opening example could be `use safe sys/base` and "dialect tweaking" can be just one line with the option but not requirement to be multiple lines. Just a thought.
amterp•21h ago
Modern cmd line scripting is an interesting area and I like seeing people's different approaches to improving it. Personally, I want to get as far away from writing control flow, loops, etc in Bash as I can. I'm working on https://github.com/amterp/rad which is a CLI scripting language that takes a more Python-like approach, which people here might find interesting, though it serves slightly different cases than Modernish.
leonheld•19h ago
It's all written in shell, no other dependencies. This is what so many shells that tried to "revitalize" sh missed! I'll definitely adopt this.
cmcconomy•18h ago
I greatly appreciate these kinds of tools but I always err on the side of what's installed by default wherever possible so I can work across hosts as soon as i land
alterae•18h ago
agreed. and the setup for this tool in particular looks… complicated and annoying, at least at first glance

for myself, if i want a shell script to be _portable_ i just write it in POSIX sh and try to be smart about dependencies

and if i don't care about portability, i'd rather just use a nicer shell like bash or zsh or fish (i'd actually like to mess with ysh at some point)

i feel like i'm much more likely to encounter a system with one of those shells available than one with modernish installed, and the idea of introducing a bundling/build step into shell scripts is deeply unappealing to me.

i can see why this exists, i think, and i imagine there are people who find it useful. i simply am not among them.

i also find it disappointing that their most basic example shows the setup in bash instead of sh, but that might just be me.

dataflow•18h ago
I get wanting some level of portability, but what kind of systems do you still encounter (and want to run your scripts on) that have sh yet lack Bash? I would've expected that to be the baseline nowadays.
timeinput•17h ago
For me it's small alpine containers running in k8s, and trying to get weird stuff running on my kobo ereader (can quickly get to a chroot with bash, but the base system doesn't have it).
lorenzohess•18h ago
Perfect name!
jonathaneunice•18h ago
Said with love: This is lipstick on a pig.

A very old and beloved pig, but still alas, a pig.

It's great to extend the shell idiom, to patch up its inconsistencies and unportabilites, to make it better. I love the progression of sh, csh, tcsh, ksh, bash, zsh, fish, and others. But it's also Sisyphean. At the end, you still have a shell experience not a programming language experience. And as long as we're talking about programming things, the full toolset will remain more direct, more powerful, more maintainable—and thus more apt.

I hate gol-lumping over the gap between a dashed-off Bash or Zsh script and the Python equivalent (say), but the full language has better semantics, typing, exceptions, modules, data structures, expressive power, and tooling. As the person who not only has to dash off the initial POC but extend and maintain it over time, and someone who's tried both routes, if there's any complexity at all—any datetimes, timestamps, or timezones to be wrangled; any complex JSON to be parsed out of an API; any significant parsing or concurrency to be managed—going to prefer the full tools every time.