Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jph00
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
151.
▲
by
jph00
2y ago
https://archive.is/WEX1n
152.
▲
by
jph00
2y ago
If you don't want to add a dep on numpy (which is a big complex module) then it's nice to have a stdlib option. So there are certainly at least some cases where you're not better off with numpy.
153.
▲
by
jph00
2y ago
Yup that's what I do too. Works great. And nbdev auto-generates __all__ so I don't have to think about anything -- it all just works. (Besides which, when you do have __all__ just regular wildcard imports work well anyway. I'
154.
▲
by
jph00
2y ago
I wrote a few things with each of FT and htpy, and looked at the resulting code -- I felt like the htpy approach was slightly less neat personally. htpy has the benefit that '.' and '#' can have special meanings, but the
155.
▲
by
jph00
2y ago
FastTags (FT) are a 1:1 mapping to HTML. It takes ~5 mins to learn. There's no transformation other than that the function name is the tag, the positional args are children, and the kwargs are attributes. (Oh and we have to rename `for
156.
▲
by
jph00
2y ago
I'm a big fan of Locality of Behavior (LoB): https://htmx.org/essays/locality-of-behaviour/ . I don't think this need be incompatible with SoC. But even if you did think so, I believe that it's bett
157.
▲
by
jph00
2y ago
After creating fastmail.fm in 1999, and then fast.ai, this felt like the right name and domain to me! :D
158.
▲
by
jph00
2y ago
You can just use `@app.get` and name your function whatever you like, just like FastAPI, if you prefer. Although I don't see why flake8 should care - multi-dispatch is built into the python stdlib so having multiple functions with the
159.
▲
by
jph00
2y ago
We've been using Starlette's testclient, which works really well.
160.
▲
by
jph00
2y ago
Yes lots! The "idiomatic" todo app is a nice simple example: https://github.com/AnswerDotAI/fasthtml/blob/main/examples/a...
161.
▲
by
jph00
2y ago
It was just launched today so the ecosystem is just what we've built so far. I've create initial starting points for UI libs for boostrap and flowbite, and we have examples showing how to use daisyUI.
162.
▲
by
jph00
2y ago
The home page was running on a $5/month hobby account at launch today and reached 1% use of 1 VCPU -- so speed seems pretty good to me! Having said that, not all the example apps are well optimised, since we're aiming largely to t
163.
▲
by
jph00
2y ago
In this case, it's a 1:1 mapping to what's on the page, so your concern doesn't apply here. Debugging and refactoring is far easier with Python functions than templates, and CSS programmers just use CSS the usual way. To answ
164.
▲
by
jph00
2y ago
Fast enough for YouTube, Instagram, and Dropbox. If you need to scale up bigger than that then maybe reach for something else I guess. Today's HN launch of FastHTML's home page was running on a $5/month hobbyist account at Ra
165.
▲
by
jph00
2y ago
Yes htpy is nice! Other interesting examples of functional HTML include Elm-html (Elm), hiccl (Common Lisp), hiccup (Clojure), Falco.Markup (F#), Lucid (Haskell), and dream-html (OCaml). FastHTML's system, called "FastTag" (F
166.
▲
by
jph00
2y ago
Reflex converts the Python code into a react frontend and fastapi backend. It's an abstraction that hides much of the underlying foundation, which is a very differently philosophy to FastHTML -- which endeavors to make the underlying f
167.
▲
by
jph00
2y ago
I'm not seeing that. What browser/device are you using? The interactivity on the home page is just using Tailwind. I don't see why it would be slow for you (other than that the site is quite visually complex, so it naturally
168.
▲
by
jph00
2y ago
I doubt you'd need pyscript with this. Pyscript uses WASM in the browser, whereas FastHTML uses Python on the server directly -- the FastHTML approach avoids the need for your phone/laptop to download an entire python implementati
169.
▲
by
jph00
2y ago
Shiny and FastHTML are both built on top of Starlette, so both use the same routing implementation. FastHTML by default uses a `RouteX` subclass that adds quite a bit of functionality to Starlette routes (mainly around automatically passing
170.
▲
by
jph00
2y ago
Yes it should be a great fit. If you give it a try, and have any issues, we have a Discord community that can help: https://discord.gg/qcXvcxMhdP
171.
▲
by
jph00
2y ago
This might sound kinda retro/boring, but I've been really enjoying Bootstrap v5 -- it's come a long way! https://about.fastht.ml/ is written with it. I've started creating a FastHTML wrapper for bootstra
172.
▲
by
jph00
2y ago
Regarding (1), I think you might be misunderstanding how FastHTML works. If you want to write JS code in FastHTML, then you can just do that. But you can focus entirely on using it for the bits it works well for. For instance, I wrote a lit
173.
▲
by
jph00
2y ago
Flask or Django users should be able to get started pretty quickly with FastHTML, and users of the preview that have switched over tell us that they're finding it easier and faster to create what they want in FastHTML. Having said that
174.
▲
by
jph00
2y ago
Both of the co-authors of the popular book series "Two Scoops of Django" are now FastHTML users and contributors, and they tell me that they're able to reduce the complexity of their Django software by quite a lot by rewritin
175.
▲
by
jph00
2y ago
I possibly misunderstand your q3 -- if so apologies. You shouldn't generally run your AI model directly on your web server, but instead run it on a dedicated server. Or just use an inference service like Together, Fireworks, Lepton, et
176.
▲
by
jph00
2y ago
1. I don't think we mention conda afaict? We suggest pip since it's already available and works fine, and most people are familiar with it. uv works fine too, but we always like to show how to do things the way with the fewest ste
177.
▲
by
jph00
2y ago
Hi all. Jeremy here -- I created this project. Thank you @bpierre for sharing it! I wrote my first web app ~30 years ago, and have built some pretty big projects, including founding fastmail (written in Perl) and leading the first major pro
178.
▲
Gpu.cpp: Portable C++ GPU Compute Using WebGPU
(gpucpp.answer.ai)
5 points
by
jph00
2y ago
|
0 comments
179.
▲
by
jph00
2y ago
Australia's peak HPC has a total of: "2 nodes of the NVIDIA DGX A100 system, with 8 A100 GPUs per node". It's pretty meagre pickings!
180.
▲
by
jph00
2y ago
Inline PTX is hardly an obscure feature. It's pretty widely used in practice, at least in the AI space.
More ›