frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Mbake – A Makefile formatter and linter, that only took 50 years

https://github.com/EbodShojaei/bake
99•rainmans•2d ago

Comments

jtwaleson•3h ago
Nice, would be good to package this as a https://pre-commit.com/ hook.
foma-roje•3h ago
It really doesn’t have to be complicated for it to be useful. Plenty thanks for sharing this.
x3n0ph3n3•3h ago
I don't understand why people like make so much. Interacting with CLI tools using only env vars as arguments is cartoonishly bad dev experience.
zabzonk•2h ago
You can pass arguments via the command line (it is, after all, a CLI tool): https://stackoverflow.com/questions/2826029/passing-addition...
lmz•2h ago
I mean there's really not much difference between "VAR=val make x" and "make x VAR=val" now is there?
marginalia_nu•2h ago
Syntactically? No. Semantically? Yes.
hiAndrewQuinn•2h ago
I often prefer to work in in extremis environments where there is no internet access, and hence, no easy way to get ahold of make; it's given me a bad habit of just waiting a build.bash script to do what make does most of the time. I haven't really found myself missing it that much.
M0r13n•2h ago
I am confused, because this means that you won't be able to install anything. No compiler, no 3rd party libraries and no text editor that isn't preinstalled
0points•2h ago
If you can install bash on your airgapped dev box, why wouldn't you install make on it? Make is part of the core dev environment on just about every disto under the sun.
georgyo•2h ago
I'm not so sure most people would agree with you. Though I think plenty would.

I dare say that developers like environment variables more than before. Consider that Docker images, and hence Helm charts, are entirely controlled via environment variables. These very popular dev tools suffer from the same problem of having near-zero easy discoverability of what those environment variables might be. Yet they are very popular.

But I don't think Make usually uses all that many environment variables. You're usually specifying build targets as the command line arguments. Automake and autogen usually generate these makefiles with everything hard-coded.

Also, it makes it very easy to get started with, and it is universally available. Makes it very easy to like.

globular-toast•2h ago
It's 80% of what you want and it's installed everywhere.

You could go for something closer to exactly what you want, but now you've got an extra set up step for devs and something else for people to learn if they want to change it.

I would say if you're looking for cli args then you shouldn't be using any wrapper like make at all. Just call the underlying tool directly. Make is for doing big high level things in the standard way, nowadays quite often in CI pipelines.

zelphirkalt•2h ago
Yep, that's how I used it on the job before. "make test" would run tests locally and in CI pipeline, keeping the CI file refreshingly short at that point.
zelphirkalt•2h ago
Make allows you to specify dependencies for you targets, which are also targets. As such you do not need to rely on brittle string concatenation approaches. It is a tool build for this.

I personally like going to a project folder and run "make run", no matter what language or setup I have, to run the project. It enables me to unify access to projects.

I also take great care to make these runs reproducible, using lock files and other things of the ecosystems I am using, whenever possible. I work on another machine? git clone, make run. Or perhaps git clone, make init, make run.

danlitt•1h ago
Make is in POSIX, so it's generally available. Same reason people write shell scripts (even if the scripts are not generally POSIX-only).
PhilipRoman•1h ago
You don't have to write Make invocations by hand... It's just a tool that can be called from any editor or IDE (or by automatic file watchers). Environment variables aren't really relevant to Make either, unless you really want to misuse it as a command runner.
cerved•1h ago
I like it because it's language and tooling agnostic, declarative, fast and ubiquitous.

Where it's less great is complicated recipes and debugging

aboardRat4•42m ago
Because make is a prolog in disguise.
Crier1002•2h ago
ive always wanted this. im going to give it a go!

does this happen to support IDE like vscode?

antonhag•57m ago
From the readme:

  VSCode Extension
    1. Open VSCode
    2. Go to Extensions (Ctrl+Shift+X)
    3. Search for "mbake Makefile Formatter"
    4. Click Install
s4i•2h ago
Does this support inline ignoring specific rules with some syntax? Couldn’t find this from the README. Would be good to have as an escape hatch.
waqar144•2h ago
Uh, why Python?
exe34•2h ago
Presumably because the author is comfortable with python and it is easy to do string manipulation with.
legends2k•1h ago
Why not Python? I primarily program in C++ but I see it as a decent choice as Python is available in almost all recent machines. Of course Windows is a notable exception but given it's a tool for developers I guess Python should be present.
IshKebab•1h ago
1. Terrible performance.

2. Terrible installation UX.

The number of issues we've had with pre-commit because it's written in Python and Python tooling breaks constantly...

In fairness, the latter point may be finally solved by using `uv` and `uv tool install`. Performance is still a major issue though. Yamllint is easily the slowest linter we use.

(I'm tempted to try rewriting it in Rust with AI.)

pjmlp•1h ago
I am quite certain to have used such kind of tooling during 1990's, with ads on The C/C++ Users Journal and Dr. Dobbs developer magazines.
1oooqooq•49m ago
ewwww. consolidated phony lines. everyone knows these should be right before each rule declaration.

LibRedirect – Redirects popular sites to alternative privacy-friendly frontends

https://libredirect.github.io
130•riffraff•5h ago•35 comments

TPU Deep Dive

https://henryhmko.github.io/posts/tpu/tpu.html
209•transpute•9h ago•17 comments

Sound As Pure Form: Music Language Inspired by Supercollider, APL, and Forth

https://github.com/lfnoise/sapf
104•mindcrime•9h ago•25 comments

Mbake – A Makefile formatter and linter, that only took 50 years

https://github.com/EbodShojaei/bake
99•rainmans•2d ago•28 comments

P-Hacking in Startups

https://briefer.cloud/blog/posts/p-hacking/
178•thaisstein•4d ago•85 comments

Remote MCP Support in Claude Code

https://www.anthropic.com/news/claude-code-remote-mcp?campaignId=13926158&source=i_email&medium=email&content=Oct2024AnalysisTool&messageTypeId=140367
75•surprisetalk•3d ago•24 comments

Show HN: I made beautiful screenshot generator, that's free forever

https://moocup.jaydip.me/
15•jdsane•3h ago•17 comments

The AIpocalypse is here for web sites as search referrals plunge

https://www.theregister.com/2025/06/22/ai_search_starves_publishers/
18•rntn•1h ago•2 comments

LaborBerlin: State-of-the-Art 16mm Projector

https://www.filmlabs.org/wiki/en/meetings_projects/spectral/laborberlin16mmprojector/start
179•audionerd•15h ago•34 comments

Samsung embeds IronSource spyware app on phones across WANA

https://smex.org/open-letter-to-samsung-end-forced-israeli-app-installations-in-the-wana-region/
771•the-anarchist•1d ago•432 comments

The bad boy of bar charts: William Playfair (2023)

https://blog.engora.com/2023/05/the-bad-boy-of-bar-charts-william.html
65•bryanrasmussen•3d ago•5 comments

Type Inference Zoo

https://zoo.cuichen.cc/
105•mpweiher•4d ago•2 comments

Denmark's Archaeology Experiment Is Paying Off in Gold and Knowledge

https://www.scientificamerican.com/article/denmark-let-amateurs-dig-for-treasure-and-it-paid-off/
152•sohkamyung•3d ago•80 comments

What is the most realistic submarine movie? (2019)

https://www.usni.org/magazines/proceedings/2019/october/what-most-realistic-submarine-movie-ever-made
35•bookofjoe•3d ago•18 comments

Airpass – Easily overcome WiFi time limits

https://airpass.tiagoalves.me/
318•herbertl•3d ago•214 comments

Show HN: I'm building an app to replace Overleaf and Notion

17•WolfOliver•3d ago•3 comments

When Humans Learned to Live Everywhere

https://www.nytimes.com/2025/06/18/science/ancient-human-adaptation-environments.html
15•pepys•3d ago•2 comments

U.S. bombs Iranian nuclear sites

https://www.bbc.co.uk/news/live/ckg3rzj8emjt
828•mattcollins•11h ago•2349 comments

uBlock Origin Lite Beta for Safari iOS

https://testflight.apple.com/join/JjTcThrV
274•Squarex•1d ago•60 comments

Show HN: Luna Rail – treating night trains as a spatial optimization problem

https://luna-rail.com/en/home-2
92•ant6n•4d ago•38 comments

Phoenix.new – Remote AI Runtime for Phoenix

https://fly.io/blog/phoenix-new-the-remote-ai-runtime/
563•wut42•1d ago•246 comments

Requiem for a Solar Plant

https://7goldfish.com/articles/Requiem_for_a_solar_plant.php
64•akkartik•13h ago•70 comments

Announcing the Clippy feature freeze

https://blog.rust-lang.org/inside-rust/2025/06/21/announcing-the-clippy-feature-freeze/
56•jmillikin•4h ago•6 comments

Delta Chat is a decentralized and secure messenger app

https://delta.chat/en/
264•Bluestein•1d ago•155 comments

Using Microsoft's New CLI Text Editor on Ubuntu

https://www.omgubuntu.co.uk/2025/06/microsoft-edit-text-editor-ubuntu
259•jandeboevrie•4d ago•271 comments

Scaling our observability platform by embracing wide events and replacing OTel

https://clickhouse.com/blog/scaling-observability-beyond-100pb-wide-events-replacing-otel
185•valyala•1d ago•79 comments

Tell HN: Beware confidentiality agreements that act as lifetime non competes

326•throwarayes•19h ago•206 comments

AllTracker: Efficient Dense Point Tracking at High Resolution

https://alltracker.github.io/
88•lnyan•18h ago•9 comments

Unexpected security footguns in Go's parsers

https://blog.trailofbits.com/2025/06/17/unexpected-security-footguns-in-gos-parsers/
196•ingve•4d ago•109 comments

'Gwada negative': French scientists find new blood type in woman

https://www.lemonde.fr/en/science/article/2025/06/21/gwada-negative-french-scientists-find-new-blood-type-in-woman_6742577_10.html
164•spidersouris•1d ago•63 comments