frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Make.ts

https://matklad.github.io/2026/01/27/make-ts.html
41•ingve•2h ago

Comments

jauntywundrkind•1h ago
Zx is great. Really easy scripting!

This article used Dax instead which also looks fine! Https://github.com/dsherret/dax

pzmarzly•1h ago
There is also Bun shell built-in library, that I liked. https://bun.com/docs/runtime/shell
IshKebab•1h ago
This is one of Deno's killer use cases IMO. 100x better than shell scripting and like 5x better than Python scripting. Python should be good for this sort of thing, but it isn't.

Historically we had to use pip which was super janky. Uv solves most of pip's issues but you still do have to deal with venvs and one issue it doesn't solve is that you can't do imports by relative file path which is something you always end up wanting for ad-hoc scripting. You can use relative package paths but that's totally different.

wiseowise•41m ago
> 5x better than Python scripting

I’m not sure about that. All those ‘await’s, parentheses really kill my mojo. Why do you find it better than Python?

IshKebab•24m ago
> Why do you find it better than Python?

I said already - the main reason is you can import files by relative file path.

You can get close to the Deno UX with uv and a script like this:

  #!/usr/bin/env -S uv run --script
  #
  # /// script
  # requires-python = ">=3.12"
  # dependencies = ["httpx"]
  # ///
  import httpx
  print(httpx.get("https://example.com"))
But you still have to deal with the venv e.g. for IDE support, linting and so on. It's just more janky than Deno.

I wish someone would make a nice modern scripting language with arbitrary precision integers, static types, file path imports, third party dependencies in single files, etc. Deno is the closest thing I've found but in spite of how good Typescript is there are still a ton of Javascript warts you can't get away from (`var`, `==`, the number format, the prototype system, janky map/reduce design, etc.)

doanbactam•1h ago
Does it track file hashes or just timestamps? Critique 2: Better. Shows specific pain point (intellisense) and asks a technical question about caching (hashes vs timestamps). This looks like a solid middle ground between npm scripts and a full-blown CI system. I've always hated the tab syntax in GNU Make, so a typed alternative is appealing.
hdjrudni•56m ago
I don't think you understand what he's proposing here. This isn't really a replacement for Make at all. This is just using Deno to run random script files.
forty•42m ago
That are two things in the article: having a kind of make alternative to "save your command history" and basically avoiding repeating large commands and how they use TS to make shell scripts.
throwaway290•1h ago
> I have definitelly crossed the line where writing a script makes sense

...and that was also the one concrete example where it makes sense to have extra dependency and abstraction layer on top of a shell script:)

say you know TS and even if you walk back to where $ is defined, can you tell immediately why $`ls {dir}` gets executed and not just logged?

supernes•57m ago
You can make it more explicit by renaming the import to something like "shell_exec". Tagged templates are already pretty common in TS projects for things like gql or sql queries.
throwaway290•39m ago
tagged template does not cause execution of given string. tagged template is just a function and in this case it's simply a proxy for console.log() which also doesn't cause execution of given string.

so how does it get executed?

unless it was just an example and you are supposed to switch in $ from some third party library... which is another dependency in addition to deno... and which can be shai-huluded anytime or you may be offline and cannot install it when you run the script?

supernes•20m ago
Yes, it's another dependency (dax). The example with console.log is just that, an example. Standard dependency management practices apply, e.g. pinning a version/commit hash.
pzmarzly•1h ago
This is the way. Shell makes for a terrible scripting language, that I start regretting choosing usually around the time I have to introduce the first `if` into my "simple" scripts, or have to do some more complex string manipulation.

At least nowadays LLMs can rewrite Bash to JS/Python/Ruby pretty quickly.

frizlab•1h ago
I use swift! I even (re-)wrote swift-sh[0] to make it possible to import external modules in a script (à la uv).

[0] https://github.com/xcode-actions/swift-sh

kh_hk•47m ago
Well, at least I will be able to run my bash scripts in 5 years
gf000•37m ago
For some quality of "run", because I'm hella sure that it has quite a few serious bugs no matter what, starting from escapes or just a folder being empty/having files unlike when it was written, causing it to break in a completely unintelligible way.
kh_hk•14m ago
I guess we have wildly different expectatives of what a language is responsible for and what not.
forty•45m ago
In the web/js/ts ecosystem, most people use npm scripts in package.json, rather than a custom make.ts. Scripts you launch from there can be in any language, so nothing prevents you from using TS shell scripts if that's your thing.

Another quite standard way of savings your command history in a file that I have seen used in all ecosystems is called "make", which even saves you a few characters when you have to type it, and at least people don't have to discover your custom system, have auto complete work out of the box, etc

epaga•36m ago
It's almost depressing to me how much this post feels like a breath of fresh air if for nothing else than because it's clearly hand-written, not ghost-written by LLM.

No repetitive short sentences, no "Not X, just Y." patterns, and lots of opinionated statements, written confidently in the first person.

Please more of this.

worldsayshi•34m ago
It sounds like at least some of the problems pointed at would be mitigated by using fzf. At least it has greatly improved my terminal ux.
flohofwoe•27m ago
Heh, I went down that same rabbid hole recently, but in addition to 'shell scripting tasks' also describe a whole C/C++ build in Deno-flavoured TS instead of wrestling with cmake syntax: https://github.com/floooh/fibs - and while at it, also allow to integrate build jobs written in Typescript into the C/C++ build.

...this is the same sort of 'works for me' philosophy as in Matklads post though, it's so heavily opinionated and personalized that I don't expect other people to pick it up, but it makes my day-to-day work a lot easier (especially since I switch multiple times between macOS, Linux and Windows on a typical day).

I'm not sure if Bun can do it too, but the one great thing about Deno is that it can directly import without requiring a 'manifest file' (e.g. package.json or deno.json), e.g. you can do something like this right in the code:

    import { Bla } from 'jsr:@floooh/bla^1';
This is just perfect for this type of command line tools.
arnorhs•17m ago
I mostly have my scripts in package.json "scripts" section - but sometimes the scripts invoked will actually be .ts files, sometimes just bash if that makes more sense.

Though, I generally run these scripts using bun (and the corresponding `$` in bun) - basically the same thing, but I just prefer bun over deno

drcongo•4m ago
I use mise for this as it then also gives you a handy `mise tasks` command so you can see what commands are available and what they do. Mise has been a real gamechanger for my ailing memory.

ASML firing 1700 people, mostly managers

https://www.ed.nl/binnenland/asml-wil-veel-managementbanen-schrappen-rekent-op-1700-ontslagen~a04...
114•dep_b•1h ago•75 comments

I Stopped Following the News

https://mertbulan.com/2026/01/28/why-i-stopped-following-the-news/
43•mertbio•1h ago•33 comments

Make.ts

https://matklad.github.io/2026/01/27/make-ts.html
41•ingve•2h ago•24 comments

There's only one Woz, but we can all learn from him

https://www.fastcompany.com/91477114/steve-wozniak-woz-apple-the-tech-interactive-humanitarian-award
87•coloneltcb•4d ago•28 comments

SVG Path Editor

https://yqnn.github.io/svg-path-editor/
64•gurjeet•5d ago•7 comments

Prism

https://openai.com/index/introducing-prism
641•meetpateltech•15h ago•365 comments

A few random notes from Claude coding quite a bit last few weeks

https://twitter.com/karpathy/status/2015883857489522876
604•bigwheels•1d ago•482 comments

Golden Ratio using an equilateral triangle inscribed in a circle

https://geometrycode.com/free/how-to-graphically-derive-the-golden-ratio-using-an-equilateral-tri...
76•peter_d_sherman•4d ago•20 comments

430k-year-old well-preserved wooden tools are the oldest ever found

https://www.nytimes.com/2026/01/26/science/archaeology-neanderthals-tools.html
422•bookofjoe•17h ago•219 comments

Rust’s Standard Library on the GPU

https://www.vectorware.com/blog/rust-std-on-gpu/
171•justaboutanyone•4d ago•27 comments

Rust at Scale: An Added Layer of Security for WhatsApp

https://engineering.fb.com/2026/01/27/security/rust-at-scale-security-whatsapp/
13•ubj•3h ago•2 comments

Parametric CAD in Rust

https://campedersen.com/vcad
163•ecto•13h ago•110 comments

Thirty Years of the Square Kilometre Array

https://physicsworld.com/a/thirty-years-of-the-square-kilometre-array-heres-what-the-worlds-large...
5•mooreds•2d ago•0 comments

Lennart Poettering, Christian Brauner founded a new company

https://amutable.com/about
297•hornedhob•14h ago•426 comments

Doing the thing is doing the thing

https://www.softwaredesign.ing/blog/doing-the-thing-is-doing-the-thing
382•prakhar897•1d ago•126 comments

Xfwl4 – The Roadmap for a Xfce Wayland Compositor

https://alexxcons.github.io/blogpost_15.html
313•pantalaimon•20h ago•239 comments

Time Station Emulator

https://github.com/kangtastic/timestation
166•FriedPickles•13h ago•42 comments

Amazon closing its Fresh and Go stores

https://finance.yahoo.com/news/amazon-closing-fresh-grocery-convenience-150437789.html
234•trenning•17h ago•439 comments

AI2: Open Coding Agents

https://allenai.org/blog/open-coding-agents
186•publicmatt•16h ago•30 comments

Show HN: One Human + One Agent = One Browser From Scratch in 20K LOC

https://emsh.cat/one-human-one-agent-one-browser/
235•embedding-shape•20h ago•112 comments

SoundCloud Data Breach Now on HaveIBeenPwned

https://haveibeenpwned.com/Breach/SoundCloud
178•gnabgib•16h ago•93 comments

FBI is investigating Minnesota Signal chats tracking ICE

https://www.nbcnews.com/tech/internet/fbi-investigating-minnesota-signal-minneapolis-group-ice-pa...
740•duxup•16h ago•989 comments

I found the perfect yearly calendar (for me)

https://blog.notmyhostna.me/posts/i-found-the-perfect-yearly-calendar-for-me
60•dewey•4d ago•21 comments

AISLE’s autonomous analyzer found all CVEs in the January OpenSSL release

https://aisle.com/blog/aisle-discovered-12-out-of-12-openssl-vulnerabilities
156•mmsc•7h ago•110 comments

Bridging the Gap Between PLECS and SPICE

https://erickschulz.dev/posts/plecs-spice/
36•eschu•2d ago•15 comments

Notes on starting to use Django

https://jvns.ca/blog/2026/01/27/some-notes-on-starting-to-use-django/
81•ingve•10h ago•36 comments

Extremophile molds are invading art museums

https://www.scientificamerican.com/article/how-extremophile-molds-are-destroying-museum-artifacts/
96•sohkamyung•4d ago•49 comments

Try text scaling support in Chrome Canary

https://www.joshtumath.uk/posts/2026-01-27-try-text-scaling-support-in-chrome-canary/
99•linolevan•14h ago•33 comments

The Texas Instruments CC-40 invades Gopherspace (plus TI-74 BASICALC)

http://oldvcr.blogspot.com/2025/12/the-texas-instruments-cc-40-invades.html
19•PaulHoule•5d ago•1 comments

Show HN: LemonSlice – Upgrade your voice agents to real-time video

91•lcolucci•15h ago•97 comments