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
17•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•4h 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•1h 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•4h 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•1h ago
php has not been "mix html & code" for the last 10 years if you use it properly
ZYbCRq22HbJ2y7•13m 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•4h ago
You should call it NodeFusion
PetahNZ•4h 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•43m 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•10m ago
PHP can be multi-threaded, share many things. So can nodejs.
DonHopkins•3h 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•2h 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•15m 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.

nusl•37m 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•36m 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.

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

https://github.com/aspizu/goboscript
118•aspizu•7h ago•35 comments

Show HN: Jar.tools – View, Change, Decompile Java Jar Files

https://jar.tools
2•Igor_Wiwi•28m ago•0 comments

Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

https://github.com/Blackmamoth/sshsync
29•blackmamoth•17h ago•36 comments

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

https://www.remoteswe.fyi
98•xitang•12h ago•59 comments

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

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

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

https://github.com/brianmg/voynich-nlp-analysis
350•brig90•20h ago•110 comments

Show HN: Find startup founders near you

https://www.foundersaround.com/
2•leonagano•1h ago•0 comments

Show HN: I reinvented PHP in TypeScript (demo)

https://github.com/vseplet/morph
17•vseplet•3d ago•14 comments

Show HN: Open-Source AlphaEvolve Clone Using GPT-4.1 and Genetic Programming

3•Sai_Praneeth•1h ago•0 comments

Show HN: A platform to find tech conferences, discounts, and ticket giveaways

https://www.tech.tickets/
89•danthebaker•2d ago•25 comments

Show HN: Vaev – A browser engine built from scratch (It renders google.com)

https://github.com/skift-org/vaev
206•monax•19h ago•120 comments

Show HN: Python Simulator of David Deutsch’s “Constructor Theory of Time”

https://github.com/gvelesandro/constructor-theory-simulator
76•SandroG•16h ago•11 comments

Show HN: Hardtime.nvim – break bad habits and master Vim motions

https://github.com/m4xshen/hardtime.nvim
193•m4xshen•1d ago•75 comments

Show HN: Berlin Swapfest #2 – Electronics flea market (July 20th, 2025)

https://www.swapfest.berlin/?number=2
4•mirshko•2h ago•0 comments

Show HN: Buckaroo – Data table UI for Notebooks

https://github.com/paddymul/buckaroo
94•paddy_m•21h ago•8 comments

Show HN: Chat with 19 years of HN

https://app.camelai.com/log-in?next=/hn/
134•vercantez•1d ago•104 comments

Show HN: A web browser agent in your Chrome side panel

https://github.com/parsaghaffari/browserbee
140•parsabg•1d ago•59 comments

Show HN: Model2vec-Rs – Fast Static Text Embeddings in Rust

https://github.com/MinishLab/model2vec-rs
57•Tananon•22h ago•13 comments

Show HN: Turn any workflow diagram into compilable, running and stateful code

https://workflows.diagrid.io/
98•yaronsc•4d ago•31 comments

Show HN: A Wolfenstein3D-like raycaster made in Windows Batch

https://github.com/nTh0rn/batch-raycaster
12•nthornton•15h ago•3 comments

Show HN: Stack Error – ergonomic error handling for Rust

https://github.com/gmcgoldr/stackerror
25•garrinm•18h ago•11 comments

Show HN: Racketmeter – Measure Badminton String Tension Using Sound Frequency

https://www.racketmeter.com/
38•zhacker•19h ago•12 comments

Show HN: Datetime.app – open-source alternative to time.is

https://datetime.app
2•Airyisland•9h ago•3 comments

Show HN: I built a knife steel comparison tool

https://new.knife.day/blog/knife-steel-comparisons/all
139•p-s-v•1d ago•83 comments

Show HN: Merliot – plugging physical devices into LLMs

https://github.com/merliot/hub
79•sfeldma•2d ago•23 comments

Show HN: Pixelagent – Build your Stateful Agent Framework in 200 lines of code

https://github.com/pixeltable/pixelagent
29•pierrebrunelle•3d ago•14 comments

Show HN: Grace – Orchestrate Hybrid Mainframe and Cloud Workflows with YAML

https://graceinfra.org
2•arnavsurve•11h ago•0 comments

Show HN: Muscle-Mem, a behavior cache for AI agents

https://github.com/pig-dot-dev/muscle-mem
224•edunteman•4d ago•51 comments

Show HN: Commander – AI-Powered Browser Automation

https://www.commander-ai.com/
5•kadarla•14h ago•0 comments

Show HN: AI web scraper (no selectors, $2/1k pages, built by 1 dev)

https://web.instantapi.ai/
2•zeeb0t•14h ago•0 comments