frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

pi-nes

https://twitter.com/thomasmustier/status/2018362041506132205
1•tosh•1m ago•0 comments

Show HN: Crew – Multi-agent orchestration tool for AI-assisted development

https://github.com/garnetliu/crew
1•gl2334•2m ago•0 comments

New hire fixed a problem so fast, their boss left to become a yoga instructor

https://www.theregister.com/2026/02/06/on_call/
1•Brajeshwar•3m ago•0 comments

Four horsemen of the AI-pocalypse line up capex bigger than Israel's GDP

https://www.theregister.com/2026/02/06/ai_capex_plans/
1•Brajeshwar•4m ago•0 comments

OpenClaw v2026.2.6

https://github.com/openclaw/openclaw/releases/tag/v2026.2.6
1•salkahfi•4m ago•0 comments

A free Dynamic QR Code generator (no expiring links)

https://free-dynamic-qr-generator.com/
1•nookeshkarri7•4m ago•1 comments

nextTick but for React.js

https://suhaotian.github.io/use-next-tick/
1•jeremy_su•6m ago•0 comments

Show HN: I Built an AI-Powered Pull Request Review Tool

https://github.com/HighGarden-Studio/HighReview
1•highgarden•6m ago•0 comments

Git-am applies commit message diffs

https://lore.kernel.org/git/bcqvh7ahjjgzpgxwnr4kh3hfkksfruf54refyry3ha7qk7dldf@fij5calmscvm/
1•rkta•9m ago•0 comments

ClawEmail: 1min setup for OpenClaw agents with Gmail, Docs

https://clawemail.com
1•aleks5678•16m ago•1 comments

UnAutomating the Economy: More Labor but at What Cost?

https://www.greshm.org/blog/unautomating-the-economy/
1•Suncho•22m ago•1 comments

Show HN: Gettorr – Stream magnet links in the browser via WebRTC (no install)

https://gettorr.com/
1•BenaouidateMed•23m ago•0 comments

Statin drugs safer than previously thought

https://www.semafor.com/article/02/06/2026/statin-drugs-safer-than-previously-thought
1•stareatgoats•25m ago•0 comments

Handy when you just want to distract yourself for a moment

https://d6.h5go.life/
1•TrendSpotterPro•27m ago•0 comments

More States Are Taking Aim at a Controversial Early Reading Method

https://www.edweek.org/teaching-learning/more-states-are-taking-aim-at-a-controversial-early-read...
1•lelanthran•28m ago•0 comments

AI will not save developer productivity

https://www.infoworld.com/article/4125409/ai-will-not-save-developer-productivity.html
1•indentit•33m ago•0 comments

How I do and don't use agents

https://twitter.com/jessfraz/status/2019975917863661760
1•tosh•39m ago•0 comments

BTDUex Safe? The Back End Withdrawal Anomalies

1•aoijfoqfw•42m ago•0 comments

Show HN: Compile-Time Vibe Coding

https://github.com/Michael-JB/vibecode
5•michaelchicory•44m ago•1 comments

Show HN: Ensemble – macOS App to Manage Claude Code Skills, MCPs, and Claude.md

https://github.com/O0000-code/Ensemble
1•IO0oI•48m ago•1 comments

PR to support XMPP channels in OpenClaw

https://github.com/openclaw/openclaw/pull/9741
1•mickael•48m ago•0 comments

Twenty: A Modern Alternative to Salesforce

https://github.com/twentyhq/twenty
1•tosh•50m ago•0 comments

Raspberry Pi: More memory-driven price rises

https://www.raspberrypi.com/news/more-memory-driven-price-rises/
2•calcifer•55m ago•0 comments

Level Up Your Gaming

https://d4.h5go.life/
1•LinkLens•59m ago•1 comments

Di.day is a movement to encourage people to ditch Big Tech

https://itsfoss.com/news/di-day-celebration/
3•MilnerRoute•1h ago•0 comments

Show HN: AI generated personal affirmations playing when your phone is locked

https://MyAffirmations.Guru
4•alaserm•1h ago•3 comments

Show HN: GTM MCP Server- Let AI Manage Your Google Tag Manager Containers

https://github.com/paolobietolini/gtm-mcp-server
1•paolobietolini•1h ago•0 comments

Launch of X (Twitter) API Pay-per-Use Pricing

https://devcommunity.x.com/t/announcing-the-launch-of-x-api-pay-per-use-pricing/256476
1•thinkingemote•1h ago•0 comments

Facebook seemingly randomly bans tons of users

https://old.reddit.com/r/facebookdisabledme/
1•dirteater_•1h ago•2 comments

Global Bird Count Event

https://www.birdcount.org/
1•downboots•1h 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