frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Omarchy First Impressions

https://brianlovin.com/writing/omarchy-first-impressions-CEEstJk
1•tosh•55s ago•0 comments

Reinforcement Learning from Human Feedback

https://arxiv.org/abs/2504.12501
1•onurkanbkrc•1m ago•0 comments

Show HN: Versor – The "Unbending" Paradigm for Geometric Deep Learning

https://github.com/Concode0/Versor
1•concode0•2m ago•1 comments

Show HN: HypothesisHub – An open API where AI agents collaborate on medical res

https://medresearch-ai.org/hypotheses-hub/
1•panossk•5m ago•0 comments

Big Tech vs. OpenClaw

https://www.jakequist.com/thoughts/big-tech-vs-openclaw/
1•headalgorithm•8m ago•0 comments

Anofox Forecast

https://anofox.com/docs/forecast/
1•marklit•8m ago•0 comments

Ask HN: How do you figure out where data lives across 100 microservices?

1•doodledood•8m ago•0 comments

Motus: A Unified Latent Action World Model

https://arxiv.org/abs/2512.13030
1•mnming•8m ago•0 comments

Rotten Tomatoes Desperately Claims 'Impossible' Rating for 'Melania' Is Real

https://www.thedailybeast.com/obsessed/rotten-tomatoes-desperately-claims-impossible-rating-for-m...
2•juujian•10m ago•0 comments

The protein denitrosylase SCoR2 regulates lipogenesis and fat storage [pdf]

https://www.science.org/doi/10.1126/scisignal.adv0660
1•thunderbong•12m ago•0 comments

Los Alamos Primer

https://blog.szczepan.org/blog/los-alamos-primer/
1•alkyon•14m ago•0 comments

NewASM Virtual Machine

https://github.com/bracesoftware/newasm
1•DEntisT_•16m ago•0 comments

Terminal-Bench 2.0 Leaderboard

https://www.tbench.ai/leaderboard/terminal-bench/2.0
2•tosh•16m ago•0 comments

I vibe coded a BBS bank with a real working ledger

https://mini-ledger.exe.xyz/
1•simonvc•17m ago•1 comments

The Path to Mojo 1.0

https://www.modular.com/blog/the-path-to-mojo-1-0
1•tosh•20m ago•0 comments

Show HN: I'm 75, building an OSS Virtual Protest Protocol for digital activism

https://github.com/voice-of-japan/Virtual-Protest-Protocol/blob/main/README.md
4•sakanakana00•23m ago•0 comments

Show HN: I built Divvy to split restaurant bills from a photo

https://divvyai.app/
3•pieterdy•25m ago•0 comments

Hot Reloading in Rust? Subsecond and Dioxus to the Rescue

https://codethoughts.io/posts/2026-02-07-rust-hot-reloading/
3•Tehnix•26m ago•1 comments

Skim – vibe review your PRs

https://github.com/Haizzz/skim
2•haizzz•27m ago•1 comments

Show HN: Open-source AI assistant for interview reasoning

https://github.com/evinjohnn/natively-cluely-ai-assistant
4•Nive11•27m ago•6 comments

Tech Edge: A Living Playbook for America's Technology Long Game

https://csis-website-prod.s3.amazonaws.com/s3fs-public/2026-01/260120_EST_Tech_Edge_0.pdf?Version...
2•hunglee2•31m ago•0 comments

Golden Cross vs. Death Cross: Crypto Trading Guide

https://chartscout.io/golden-cross-vs-death-cross-crypto-trading-guide
3•chartscout•34m ago•0 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
3•AlexeyBrin•37m ago•0 comments

What the longevity experts don't tell you

https://machielreyneke.com/blog/longevity-lessons/
2•machielrey•38m ago•1 comments

Monzo wrongly denied refunds to fraud and scam victims

https://www.theguardian.com/money/2026/feb/07/monzo-natwest-hsbc-refunds-fraud-scam-fos-ombudsman
3•tablets•43m ago•1 comments

They were drawn to Korea with dreams of K-pop stardom – but then let down

https://www.bbc.com/news/articles/cvgnq9rwyqno
2•breve•45m ago•0 comments

Show HN: AI-Powered Merchant Intelligence

https://nodee.co
1•jjkirsch•47m ago•0 comments

Bash parallel tasks and error handling

https://github.com/themattrix/bash-concurrent
2•pastage•47m ago•0 comments

Let's compile Quake like it's 1997

https://fabiensanglard.net/compile_like_1997/index.html
2•billiob•48m ago•0 comments

Reverse Engineering Medium.com's Editor: How Copy, Paste, and Images Work

https://app.writtte.com/read/gP0H6W5
2•birdculture•53m ago•0 comments
Open in hackernews

FastHTML Best Practices

https://www.fastht.ml/docs/ref/best_practice.html
33•tosh•8mo ago

Comments

CraigJPerry•8mo ago
Another day, another FastHTML post on HN, someone is active on the marketing front ;-)

Joking aside, enough of the premise resonated with me that i've been test driving it the past few days - i'm definitely target audience - and generally finding it pretty good.

I like the fact it's just functions and data, a lot of complexity has just been thrown in the bin. No bundler, no build/packaging step required etc etc but you'd have to be in the target audience to be happy with this[1]

For example when it comes to organising my thoughts, i don't need to learn some new paradigm, it's just functions, so i was able to just use regular basic concepts i'd use to organise any code. Concrete example: a template expressed as a function that takes a couple of parameters to inject somewhere makes for an easy to live with approach to reuse - since unlike a base.html in jinja2 for example, i can navigate to usages in my editor because it's just function composition. No templating DSL.

Another concrete example - i wanted something akin to a component in react, something with some state and an ability to render() - so i created a dumb plain old class, put the state as fields on the class and had a render method. Refreshingly basic. I didn't need a conventions guide or anything like that "here's how we do this in Framework X" - i just used basic how to write code principles.

I don't find the docs that consistent - for example the linked page (which i've never seen before) points out using @rt with function name for the route - i saw this was possible in an annotated claude chat they link from the github and immediately figured that's a 1000 better than @app.route("xxx") def post|get ... - but it has gotchas, AIUI just using rt creates a post and get handler by default - but it has benefits that i can use the function itself as the way to resolve the path (think url_for in other frameworks like django) - the docs are mostly littered with the awkward "you'll have lots of functions called get or post with a decorator specifying the route" approach.

The types .pyi is good enough for my use case (letting my editor look up what functions exist etc.) but it's incomplete if you want something like pyright to be happy on its strictest settings.

Their development process seems quite intriguing - all written in notebooks!

Their coding style is different from the approach you'd more commonly see (e.g. Black style formatting) but actually quite nice, it's more like Peter Norvig style (which i see as gold standard).

[1] i just want a python SSR webapp with html, minimal css and minimal js - to make it performant i'll lean on reverse proxying and etags in front of it

CoolCold•7mo ago
mind sharing your etags idea - i.e. how it will help you to not generate content twice on Python side of things? or you mean transfers only?
CraigJPerry•7mo ago
The trick i learned was just to add a last updated timestamp to the sqlalchemy model. You'll still incur the full overhead of the full db query (don't try to return just the timestamp field, maybe different in your case but when i test i find the overhead of RTT'ing to the database twice completely negates any benefit - maybe if i had memcached or redis in my stack that would make a better place for the timestamp, but i always just have a postgres and nothing else)

With that last updated time as a seed for the etag value for dynamic pages, it means when the cache control public header times out, and a request arrives then in the request handler i can do the orm query, and then short circuit out before template rendering or page transfer if the last updated vs etag match.

I hope that rubbish attempt at describing made sense :-) basically i like this approach because it works even for logged in per-user pages that don't change much. I know there are slightly faster approaches for non-logged in pages but i just handle everything with the same pattern.

CoolCold•7mo ago
okay, I got the idea here, thank you. Gonna save some CPU cycles on app side, but will keep DB loaded - better than nothing. Having field in table with last_updated is needed (if I translate your "sqlachemy model" terms correctly).
all2•8mo ago
1. I don't use the internal DB stuff, I've been using Peewee ORM instead because it is more declarative (less magical) and fits in my head better.

2. I use app.get/post/etc. because it is more declarative. I like to know without thinking what sort of message an endpoint is expecting.

3. Query params: I don't know how I feel about this. There's some ambiguity in my head still about URL params vs query params.

4. Leveraging return values for DB model creation: This is syntactic sugar. It looks nice, but I prefer to have my code broken out so I can parse it mentally one piece at a time.

5. Use .to() for URL Generation: This is pretty cool I'll have to give this a try.

6. PicoCSS: I've been using this exclusively and it comes out rather nicely with a minimal amount of custom CSS.

7. Smart Defaults: Again, I prefer more declarative code, so I don't like this and I don't use it.

8. FastHTML Handles Iterables: I don't use this. I prefer list comprehensions when building out lists of components. An extra function call reads as confusing to me. Potato tomato.

9. Minimal Code: This is growing on me. I like one-liners for very short components or endpoints. It means I can fit more code on the screen at any given point in the file.

10. Use POST for All Mutations: I do this exclusively. I know htmx has other tags, but I don't use them because they muddy my understanding.

11. Modern HTMX Event Syntax: I haven't made enough use of HTMX to have to use this.

---

In all I've been very pleased with FastHTML and the speed at which I can build out an app. I'm nearly ready to release my first project in all its glory. It isn't much, but I've learned a bunch about web stuff by putzing around with it in the in-between times.

daft_pink•8mo ago
I’m really curious if they’ve created a way to use FT components but use FastAPI to serve the HTMX
librasteve•8mo ago
an intriguing post with the ubiquitous todo example

here’s how that looks in https://harcstack.org

  model Todo does Component::Red[:C:R:U:D] {
    also does HxTodo;

    has UInt   $.id      is serial;
    has Bool   $.checked is rw is column = False;
    has Str    $.text    is column is required;

    method toggle is controller {
        $!checked = !$!checked;
        $.^save;
        self
    }

    method HTML {
        tr
            td( input :type<checkbox>, |$.hx-toggle, :$!checked),
            td( $!checked ?? del $!text !! $!text),
            td( button :type<submit>, |$.hx-delete, :style<width:50px>, '-'),
    }
  }
  Todo.^create-table;
full code is here https://github.com/librasteve/Air-Play/blob/main/lib/Air/Pla...
all2•8mo ago
Is this maybe in the wrong place? How does this relate to FastHTML best practices?
librasteve•8mo ago
the HARC stack is quite similar to FastHTML … both are back end libraries that leverage HTMX to help build web apps on the server side and reduce the complexity of modern web development

specifically the OP references the todo example app and I thought readers here who are interested in server side web coding would like to see the same example done in another stack that is less hampered by the limitations of Python