frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: I reinvented PHP in TypeScript (demo)

https://github.com/vseplet/morph
18•vseplet•3d ago
I built Morph, an experimental fullstack HTML-first library for Deno, Node, and Bun.

Everything returns HTML, not JSON. No React, no Vite — just plain HTML with server-side rendering.

No build steps, no preprocessors, no complex configs — everything runs from a single file.

Perfect for Telegram Web Apps, internal tools, simple admin panels, dashboards, or anywhere a full-blown SPA feels like overkill.

Important: I built this entirely for myself — to solve my own problems. I hate complex frontend. I hate writing it. And I don’t want to waste time on it. But maybe it’ll help you too.

Comments

askonomm•6h ago
So this is supposed to be following the practices that were common in PHP ten years ago? Modern PHP is not written in such a way where business logic is mixed with templating. For good reason.
bovermyer•2h ago
For applications you're right.

For trivial scripts, though, that practice is still pretty common. You don't necessarily need Twig or whatever if you just need a script to spit out the rows from a single database query.

oaiey•5h ago
My naive question: so if I have node, express, and JS tagged template literals. Is not that what PHP does. Route some url to a html interpolated with code.

What is the add-on from this library? The only thing I read out of it, is some css and other templating benefits. Which is not the essence of PHP. The essence of PHP is that you mix html and code (which many JS tagged templates support).

This goes more in the direction of component oriented development (e.g. what Blazor does... even Angular). So my rant is about comparing it with PHP.

Not a node & browser dev, but I have my past in PHP and currently some Blazor.

Oxodao•2h ago
php has not been "mix html & code" for the last 10 years if you use it properly
ZYbCRq22HbJ2y7•1h ago
You mean that the general patterns that people implement when using PHP changed. The language hasn't changed in a fundamental way that prevents it from being utilized in this way.
bdcravens•5h ago
You should call it NodeFusion
PetahNZ•5h ago
I think this misses one of the main selling points of PHP, the shared nothing, single thread, fire and forget methodology that I can throw behind a load balancer and spin up 100 servers.
ChocolateGod•1h ago
You can probably use something like https://www.cgi-node.org/ to get close to the PHP model in the JS world.

But, I wouldn't be surprised if its slower than PHP due to the overhead of starting up NodeJS for each request, as PHP has been optimised to have fast start times.

ZYbCRq22HbJ2y7•1h ago
PHP can be multi-threaded, share many things. So can nodejs.
DonHopkins•5h ago
PHP is a templating languages designed to be so inadequate that you have to implement other templating languages in it.

https://news.ycombinator.com/item?id=32961202

>PHP was already a templating language, but somebody got it in their head that there should be an iron-clad separation between designers and programmers, and that PHP gave designers too much power and confused them, and that their incompetent untrustworthy designers who refused to learn anything about programming deserved something even "simpler" than PHP, so they came up with Smarty.

>Then over time the realized that their designers were powerless, so their programmers would have to learn TWO languages so they could wade into the Smarty templates to make them actually work with all the extra code they had to write because Smarty was so crippled, so they nickle-and-dimed more and more incoherent programming language elements into Smarty, making it EVEN HARDER to use and more complicated and less consistent than PHP, yet nowhere near as powerful.

askonomm•4h ago
Modern PHP is not a templating language. It can be, much like many other languages can be, but it's not how it is used. Most other languages also implement their own templating languages. Have you seen modern PHP ... I don't know, sometime in the last 10 or so years, or is this just another circle jerk of hating on something you have little clue about?

Now if you see that as a bad thing, separating business logic and presentation, and sandboxing presentation so it has no larger access to the system, then I'm afraid you're just not a good programmer.

ZYbCRq22HbJ2y7•1h ago
> Modern PHP is not a templating language. It can be

Modern PHP has the same capabilities as PHP 5 had, and more. There was nothing fundamental removed from the language that keeps it from being used as it was in PHP 5.

cess11•54m ago
Object-oriented PHP, i.e. PHP 5, was released in 2004. PHP 4 was killed in 2008.

Separating out templates was already something one used to do back when Laravel added Blade back in 2010-2011 sometime, in one of the first iterations of the framework. It's not like they experienced pushback because of Blade.

nusl•1h ago
The title originally threw me off but reading the link made me quite like the idea. Keep existing skills and use them in other contexts better suited for the application.
hu3•1h ago
Interesting pattern. This is specially nice to me:

"No build steps, no preprocessors, no complex configs".

I worked on a project recently that followed this and Devs loved it. The DX was amazing.

lylejantzi3rd•36m ago
A lot of people here are comparing it to PHP, but it looks more like python to me.
buttocks•8m ago
This project is cool but the author seems to have never actually touched PHP that he compares it to.

Don't Guess My Language

https://vitonsky.net/blog/2025/05/17/language-detection/
364•e-topy•4h ago•202 comments

ClawPDF – Open-Source Virtual/Network PDF Printer with OCR and Image Support

https://github.com/clawsoftware/clawPDF
44•miles•1h ago•7 comments

Telum II at Hot Chips 2024: Mainframe with a Unique Caching Strategy

https://chipsandcheese.com/p/telum-ii-at-hot-chips-2024-mainframe-with-a-unique-caching-strategy
66•rbanffy•3h ago•15 comments

InventWood is about to mass-produce wood that's stronger than steel

https://techcrunch.com/2025/05/12/inventwood-is-about-to-mass-produce-wood-thats-stronger-than-steel/
229•LorenDB•1d ago•217 comments

How scrolling becomes a religious act

https://etymology.substack.com/p/youre-literally-worshipping-your
58•ZeroTalent•3h ago•37 comments

Monitoring Node.js: Key Metrics You Should Track

https://last9.io/blog/node-js-key-metrics/
25•unripe_syntax•3h ago•0 comments

Ugly infrastructure: Why can't we have nice things?

https://jordanwtaylor2.substack.com/p/ugly-infrastructure-why-cant-we-have
29•bilsbie•2d ago•15 comments

Show HN: Goboscript, text-based programming language, compiles to Scratch

https://github.com/aspizu/goboscript
126•aspizu•8h ago•42 comments

Emulator Debugging: Area 5150's Lake Effect

https://martypc.blogspot.com/2025/05/emulator-debugging-area-5150s-lake.html
31•rbanffy•5h ago•6 comments

Side projects I've built since 2009

https://naeemnur.com/side-projects/
113•naeemnur•4h ago•61 comments

Show HN: Cogitator – A Python Toolkit for Chain-of-Thought Prompting

https://github.com/habedi/cogitator
17•habedi0•3d ago•0 comments

“There are people who can see and others who cannot even look”

https://worldhistory.substack.com/p/there-are-people-who-can-see-and
186•crescit_eundo•13h ago•33 comments

Llama from scratch (2023)

https://blog.briankitano.com/llama-from-scratch/
80•sebg•4d ago•1 comments

New research reveals the strongest solar event ever detected, in 12350 BC

https://phys.org/news/2025-05-reveals-strongest-solar-event-bc.html
204•politelemon•4d ago•104 comments

Ditching Obsidian and building my own

https://amberwilliams.io/blogs/building-my-own-pkms
377•williamsss•21h ago•437 comments

Show HN: Job board aggregator for best paying remote SWE jobs in the U.S.

https://www.remoteswe.fyi
113•xitang•13h ago•66 comments

About Asteroids, Atari's biggest arcade hit

https://www.goto10retro.com/p/about-asteroids-ataris-biggest-arcade
4•rbanffy•3d ago•0 comments

The principles of database design, or, the Truth is out there

https://ebellani.github.io/blog/2025/the-principles-of-database-design-or-the-truth-is-out-there/
74•b-man•11h ago•66 comments

Programming in Martin-Lof's Type Theory: An Introduction (1990)

https://www.cse.chalmers.se/research/group/logic/book/
33•todsacerdoti•2d ago•0 comments

Show HN: I modeled the Voynich Manuscript with SBERT to test for structure

https://github.com/brianmg/voynich-nlp-analysis
355•brig90•22h ago•116 comments

Is Winter Coming? (2024)

https://www.datagubbe.se/winter/
74•rbanffy•3h ago•77 comments

'Significant amount' of private data stolen in UK Legal Aid hack

https://www.bbc.co.uk/news/articles/cgr5g4pv2l0o
28•neversaydie•2h ago•17 comments

KDE is finally getting a native virtual machine manager called “Karton”

https://www.neowin.net/news/kde-is-finally-getting-a-native-virtual-machine-manager-called-karton/
128•bundie•15h ago•69 comments

Attack of the Sadistic Zombies – Paul Krugman

https://paulkrugman.substack.com/p/attack-of-the-sadistic-zombies
16•rbanffy•1h ago•1 comments

France Endorses UN Open Source Principles

https://social.numerique.gouv.fr/@codegouvfr/114529954373492878
533•bzg•15h ago•175 comments

Procolored printer drivers contained malware

https://www.neowin.net/news/this-printer-company-served-you-malware-for-months-and-dismissed-it-as-false-positives/
119•bundie•2d ago•52 comments

$30 Homebrew Automated Blinds Opener (2024)

https://sifter.org/~simon/journal/20240718.html
291•busymom0•21h ago•127 comments

Spaced repetition memory system (2024)

https://notes.andymatuschak.org/Spaced_repetition_memory_system
245•gasull•22h ago•30 comments

Font Activations: A Note on the Type

https://robhorning.substack.com/p/font-activations
45•prismatic•2d ago•5 comments

K-Scale Labs: Open-source humanoid robots, built for developers

https://www.kscale.dev/
114•rbanffy•18h ago•53 comments