frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: An open source access logs analytics script to block bot attacks

https://github.com/tempesta-tech/webshield
22•krizhanovsky•6h ago•2 comments

Show HN: Metorial (YC F25) – Vercel for MCP

https://github.com/metorial/metorial
43•tobihrbr•11h ago•15 comments

Show HN: Wispbit - Linter for AI coding agents

https://wispbit.com
24•dearilos•6h ago•11 comments

Show HN: CSS Extras

https://github.com/sindresorhus/css-extras
98•mofle•6d ago•60 comments

Show HN: PlayMyMood – Generate YouTube Music playlists based on your mood

https://playmymood.com/
2•speeq•4h ago•0 comments

Show HN: Relaya – Agent calls businesses for you

https://relaya.ai/
5•rishavmukherji•5h ago•0 comments

Show HN: SQLite Online – 11 years of solo development, 11K daily users

https://sqliteonline.com/
448•sqliteonline•1d ago•138 comments

Show HN: Free API to extract PDF data

6•leftnode•10h ago•0 comments

Show HN: Pathwave.io – MCP and mobile app to manually approve AI actions

https://web.pathwave.io/docs
2•felipe-pathwave•5h ago•0 comments

Show HN: AI toy I worked on is in stores

https://www.walmart.com/ip/SANTA-SMAGICAL-PHONE/16364964771
146•Sean-Der•2d ago•164 comments

Show HN: Nofan Framework 16 Fan Controller

https://github.com/laktak/nofan
2•laktak•5h ago•0 comments

Show HN: I built a simple ambient sound app with no ads or subscriptions

https://ambisounds.app/
295•alpaca121•2d ago•117 comments

Show HN:I built a free AI tool that scans and sorts financial news for traders

https://www.fxradar.live/
4•LuckyAleh•8h ago•1 comments

Show HN: Get a PMF score for your website, based on simulated user data

https://semilattice.ai/demos/pmf-report
2•jtewright•9h ago•0 comments

Show HN: I made an esoteric programming language that's read like a spellbook

https://github.com/sirbread/spellscript
172•sirbread•2d ago•55 comments

Show HN: GoHPTS-TCP/UDP Transparent Proxy with ARP Spoofing and Traffic Sniffing

https://github.com/shadowy-pycoder/go-http-proxy-to-socks
2•shadowy-pycoder•11h ago•0 comments

Show HN: Aidlab – Health Data for Devs

55•guzik•3d ago•17 comments

Show HN: Daily install trends of AI coding extensions in VS Code

https://bloomberry.com/coding-tools.html
23•AznHisoka•12h ago•9 comments

Show HN: Baby's first international landline

https://wip.tf/posts/telefonefix-building-babys-first-international-landline/
221•nbr23•6d ago•54 comments

Show HN: A Digital Twin of my coffee roaster that runs in the browser

https://autoroaster.com/
155•jvkoch•1w ago•37 comments

Show HN: docker/model-runner – an open-source tool for local LLMs

https://github.com/docker/model-runner
17•ericcurtin•13h ago•9 comments

Show HN: Wordle-Style Daily Wikipedia Game

https://hyperlinked.wiki
4•Mistri•13h ago•1 comments

Show HN: A Lisp Interpreter for Shell Scripting

https://github.com/gue-ni/redstart
113•quintussss•6d ago•25 comments

Show HN: I extracted BASIC listings for Tim Hartnell's 1986 book

https://github.com/nzduck/hartnell-exploring-ai-book
60•nzduck•4d ago•6 comments

Show HN: I invented a new generative model and got accepted to ICLR

https://discrete-distribution-networks.github.io/
649•diyer22•4d ago•90 comments

Show HN: Lights Out: my 2D Rubik's Cube-like Game

https://raymondtana.github.io/projects/pages/Lights_Out.html
80•raymondtana•4d ago•25 comments

Show HN: AI visuals that feel the music

https://www.trackart.io/
2•feskk•19h ago•0 comments

Show HN: Rift – A tiling window manager for macOS

https://github.com/acsandmann/rift
212•atticus_•3d ago•120 comments

Show HN: Open source, logical multi-master PostgreSQL replication

https://github.com/pgEdge/spock
150•pgedge_postgres•5d ago•60 comments

Show HN: FFTN, faster than FFTW in 700 lines of C

https://gitlab.sac-home.org/sac-group/fftn
7•thomaskoopman•1d ago•0 comments
Open in hackernews

Show HN: A Lisp Interpreter for Shell Scripting

https://github.com/gue-ni/redstart
113•quintussss•6d ago
Redstart is a lightweight Lisp interpreter written in C++ with a focus on shell scripting. It lets you combine the expressive power of Lisp with the practicality of the Unix shell: you can run commands, capture output, pipe between processes, and still use Lisp syntax for logic and structure. Think of it as writing your shell scripts in Lisp instead of Bash.

Comments

esrh•2d ago
awesome! I have wanted something like this for a long time. Currently I use a janet fork <https://github.com/eshrh/matsurika> with some trivial additions, the most important of which is a `$` macro that does what the `sh` does here. I have two questions:

- I see that `sh` does not take in strings but instead lisp forms. How do you distinguish between variables that need to be substituted and commands? In my fork, the way to do variable substitution involves quasiquoting/unquoting. - Almost all of the features that make your language good for shell scripting are essentially syntactic features that can easily be implemented as a macro library for say, scheme. Why'd you choose to write in C++? Surely performance is not an important factor here. (I'm interested because I am currently working on a scheme-based shell scripting language).

em-bee•2d ago
can you give an example of how variable substitution in your language looks like?

one of the things i think a lisp for shell should have, and i agree that this may not be easy, but unix commands should be first class functions, as in, you should not need a $ or sh macro to make them work. the other thing is that strings should not be quoted, and so you need something else to designate variables like $path or ($ path)

esrh•2d ago
Yes, i agree that unix commands should be first class. I did this for the super common stuff like ls and cp. As for substitution, I did exactly $ for substitution. You'd do something like ($ rsync -avP $src $dst), but I don't think I ever got around to implementing $() to evaluate forms. If you really need to do that then you have to quasiquote the whole expression and unquote the form you need to evaluate. This has been relatively ok for me though. I never implemented anything like pipes or redirection, I instead just send everything like that to bash.

This is not really relevant to your question, but I regret choosing janet for this, it's too opinionated and hacking on C is not as fun as lisp. I started writing my own version of schemesh in racket, but I never got far enough.

antics9•2d ago
This looks good! I've seen other tries of shell scripting with lisp dialects but Redstart syntax looks more intuitive (from a shell scripting standpoint) and easy to read.
ctenb•2d ago
Very nice! I've often wondered how close you could get to a POSIX-like syntax with something like this while maintaining a LISP semantics as much as possible. Especially pipelines are much easier to read with the | and > operators. I guess you need some sort of LISP dialect that supports infix operators
lycopodiopsida•2d ago
Would take threading macros over pipelines every other day of the week.
sshine•2d ago
You can have regular shell infix pipes combined with Lisp/Scheme macros as control flow. I think the tradeoff that Schemesh is nice, even though it does sacrifice POSIX:

The best of both worlds of shell and Lisp is quick ability to run and pipe processes, and full programming functionality without the shell scripting shenanigans like obscure semantics and lack of good data structures.

cess11•2d ago
Unless someone has already provided a library for it, write some wrappers around pipes and forks and use OCaml utop.

It's not a Lisp but close enough, I'd say. If I didn't have the rather extensive background of using Picolisp and some other REPL-like tools as a form of shell I'd probably have settled for utop, at least until I reached my iex era.

sakesun•2d ago
If you don't mind .NET, BraidLang is another interesting project.
sshine•2d ago
Related: Schemesh — A Unix shell and Lisp REPL, fused together

https://github.com/cosmos72/schemesh

https://news.ycombinator.com/item?id=43061183 (7 months ago, 177 upvotes)

shorden•2d ago
For a blend between Lisp and a more traditional POSIX shell, I enjoy Emacs' [eshell](https://www.masteringemacs.org/article/complete-guide-master...).
vindarel•2d ago
> writing your shell scripts in Lisp instead of Bash.

in a Lisp ;)

Related, for Common Lisp:

- unix in lisp https://github.com/PuellaeMagicae/unix-in-lispMount Unix system into Common Lisp image.

- kiln https://github.com/ruricolist/kiln - an infrastructure (managing a hidden multicall binary) to make Lisp scripting efficient and ergonomic.

- CIEL https://github.com/ciel-lang/CIEL/ - CIEL Is an Extended Lisp is a collection of dozens of libraries useful for mundane tasks (HTTP, JSON, regexps…). It also comes as a binary that is able to run scripts from sources. Scripts that use the built-in libraries start fast without a compilation step. [project of mine]

- discussed here: https://news.ycombinator.com/item?id=41401415

- Lish https://github.com/nibbula/lish - maybe someday a Lisp shell

- SHCL https://github.com/bradleyjensen/shcl - a POSIX shell in CL (stalling)

- lserver https://notabug.org/quasus/lserver/ - live-coding remote function calls for the shell. Write a command in the REPL, and run it instantly in the shell.

I use CIEL ;)

And, built-in: use the --load flag or build a self-contained binary, compiled to machine code with SBCL. It can contain your web assets (html, js etc). A compressed binary weights ±30MB and starts fast. A stripped off binary with LispWork$ (no compiler, no debugger etc) is ±5MB. There's ECL too.

bitwize•2d ago
And don't forget scsh: https://scsh.net/
drob518•2d ago
The OG.
chubot•2d ago
Many of these projects are on:

Alternative Shells - https://github.com/oils-for-unix/oils/wiki/Alternative-Shell...

Internal DSLs for Shell - https://github.com/oils-for-unix/oils/wiki/Internal-DSLs-for... - nearly every language: Python, many schemes and Lisps, Haskell, OCaml, JavaScript, etc.

Feel free to add them if they're not there

vindarel•2d ago
nice thanks, I'll check them out.

They are also on https://github.com/CodyReichert/awesome-cl/

em-bee•2d ago
this made me wonder why guile isn't designed for shell scripting too. i mean, wouldn't that make sense? if you want guile to be the designated extension language for gnu applications, why not also make it the designated language for shell scripts?
rcarmo•2d ago
Added to http://taoofmac.com/space/dev/lisp
tanelso2•2d ago
Very nice! A similar tool is [babashka](https://github.com/babashka/babashka) for Clojure
drob518•2d ago
Babashka rocks!
waynesonfire•2d ago
This misses the point of shell scripts.

OUTPUT=$(some_command)

is the killer app of sh scripts among other things, like being universally available. Any language, including this, can execute a command. It's the ergonomics that matter. Shell scripts reduce the impedence of interacting with the shell to control the OS. At first sight, this tool does'nt improve on that impedendance. It also invents it's own esoteric syntax, so what's the gain?

On a separate point but equally important, I don't understand why sh scripts are exempt fom unit tests. Do these tools alleviate that?

zem•2d ago
this has a `$` - you can do

    (defvar output ($ some_command))
suspended_state•2d ago
> On a separate point but equally important, I don't understand why sh scripts are exempt fom unit tests.

Likely because:

- it's an older culture than unit testing

- people write shell scripts for one shot tasks, or to automate tasks which are system setup/configuration specific

- if a shell script becomes useful enough, it gets rewritten in a more apt language

bheadmaster•1d ago
Combining power of Bash programming with the practicality of Lisp. Awesome!
masfoobar•11h ago
interesting project.