hyperfiddle

Vincent 2025-10-02T17:12:51.845419Z

I just rebooted NextApex at https://nextapex.org It's a hacker news clone I wrote in Electric (V2). It would probably be good to update it to the latest Electric, sometime. If you'd like to see the source code I can share a link.

๐Ÿ‘€ 1
Dustin Getz (Hyperfiddle) 2025-10-06T11:03:49.574259Z

no promises, our roadmap can and does pivot on a dime

๐Ÿ‘ 1
Vincent 2025-10-02T17:17:21.772359Z

The most interesting bit to me is the gravity calculation. Hacker News has a gravity measure that allows them to sort the list based on points and hours-alive. I show the gravity next to the little up arrow โ†‘ and it's what determines the sorted order of things.

Vincent 2025-10-02T17:18:06.978759Z

One thing I had a hard time figuring out in V2 was recursion -- I could not infinitely nest comments for some reason or other. So the comments are hardcoded to go 4 deep. Maybe doing this with V3 will be easier.

2025-10-03T07:14:21.176879Z

i love the ui. very retro.

2025-10-03T07:15:10.472209Z

id absolutely love to see the source

Vincent 2025-10-03T14:18:14.189639Z

https://github.com/eleCush/NextApex/blob/main/src/app/todo_list.cljc Just about everything is in that one file, with a couple things in the electric_server for handling logins, and a latest-db> in the xtdb_contrib to watch the database

2025-10-03T16:01:27.725969Z

i seriously love the styling. i have been dying to see a bezel on a button for years

2025-10-03T16:02:18.166249Z

what is the vision for the tribe feature?

Vincent 2025-10-03T16:20:57.772179Z

The vision is for multiple people to be part of a tribe and share content relevant to the group's interests. Right now, when you want to share a link you've got to choose a tribe to submit it through. Long-term, when there's a lot of content, I was thinking people would choose which tribes they want to subscribe to/join. It's kinda like subreddits, now that I think about it.

2025-10-03T16:22:19.310769Z

Very cool. Kinda reminds me of Google+ circles too. Tribe is a better word though. Google didn't have electric though!

Dustin Getz (Hyperfiddle) 2025-10-03T20:15:04.245439Z

v2 is just broken in too many ways to express recursion properly. v3 is a lot better, but currently has performance problems, which we're starting to tackle now. The recursive comment thread UI is a bit of a pathological case, I'm not sure if Electric v3 will be up to it or not. Our own "recursive" UIs tend to be in the style of the macos finder, which is actually a tree that has been flattened into a grid. Electric v3 is great at those

2025-10-03T20:56:59.932109Z

Although maybe it's using the macos finder pattern after all. But the component calls itself. I can't tell

Dustin Getz (Hyperfiddle) 2025-10-03T20:58:28.916579Z

It's a very small example, compared to a large hacker news thread

Dustin Getz (Hyperfiddle) 2025-10-03T20:58:55.051689Z

everything works for small apps ๐Ÿ™‚

๐Ÿš€ 1
Vincent 2025-10-03T23:03:33.306549Z

I will have to make a V3 version of NextApex and report back ๐Ÿซก

๐Ÿ™‚ 1
2025-10-06T06:46:44.187299Z

great to hear you're working on performance issues! do you have a sense of timeline for the v3 performance work? asking because i'm scoping out a project that needs to ship in 3-6 months and trying to figure out if electric v3 is the right fit

2025-10-06T06:57:23.510069Z

btw, unmounting feels faster than before, did you guys update that recently?

denik 2025-10-02T18:53:35.756079Z

are there electric3 specific LLM rules for AI aided code editors one can add? without I notice the LLMโ€™s struggle between versions of electric.. here is an example of this by some friends who launched a DB startup: https://www.instantdb.com/docs/using-llms

denik 2025-10-02T18:54:31.212319Z

specifically the rules file (not MCP): https://www.instantdb.com/llm-rules/next/cursor-rules.md

2025-10-03T04:16:36.057109Z

i doubt there's a canonical rules file, but fwiw here's my vibe-coded CLAUDE.md that I put in my app/ui/ directory with all the electric cljc files. it's far from perfect but it works for me, would love to get improvements on it https://gist.github.com/yayitswei/630c4b290debcb96a82ef9a854f127c7

๐Ÿ‘ 2
๐Ÿ™Œ 3
Dustin Getz (Hyperfiddle) 2025-10-03T10:24:36.823999Z

thanks, i hired a tech writer to help us make faster progress on the electric v3 docs, we will consider adopting these mannerisms, agents are definitely an intended consumer

๐Ÿš€ 9
2025-10-11T12:03:32.518169Z

@wei thanks for sharing that! Is the doc/electric-clojure.md you refer to in the prompt the google docs one?

2025-10-11T12:14:01.459169Z

no, that's a longer vibe-coded one. I'm less attached to this one, might be a good idea to replace it with the google doc

2025-10-11T12:15:32.050419Z

here's another one that i attempted with code from the hyperfiddle tutorial. too long for most contexts but you can ask an agent to search it for examples

2025-10-11T12:16:21.050299Z

Woah, cheers!

2025-10-11T12:19:21.344689Z

This is increbibly helpful for me, even if it contains "vibes".

2025-10-11T12:20:11.348909Z

Do you find it adherese to the "check the tail" instruction well?

2025-10-11T12:20:47.787179Z

I had extended claude code post tool hook to inject any compilation errors, that was super helpful.

2025-10-11T12:22:06.071939Z

But I kinda broke that hook code so I'll need to rewrite it, I think it makes sense to invest some time in a proper hook that checks the log and extracts at least those pretty electric and shadow-cljs errors. I also spent some time to add more log extraction from the browser console via mcp.

2025-10-11T12:23:11.889229Z

doing it well is tricky (logs get spammy so quickly, that [truncate} from the middle is kind of a requireent)

2025-10-11T12:23:56.320629Z

a tip for not rolling your own wrt browser console extraction: https://github.com/ChromeDevTools/chrome-devtools-mcp/tree/main Well made one that

2025-10-11T17:01:33.787939Z

i've been using https://github.com/microsoft/playwright-mcp but devtools seems more lightweight and better suited for iterative debugging

2025-10-11T17:02:34.779849Z

Yes, also used that. Good mcp too.

2025-10-11T17:04:22.961189Z

thinking more about it, the hook should actually look for build completed messages to verify success, e.g.

[:dev] Build completed. (308 files, 2 compiled, 0 warnings, 1.06s)
instead of errors, since the stacktrace can be long and the agent may miss the actual error if it only looks at the last few lines

2025-10-11T17:06:40.084029Z

Yeah I had some heuristics to parse out the nice parts of the stack traces. But indeed some are very long.

2025-10-11T17:07:27.957129Z

i've never gotten around to trying hooks. but that seems like a more foolproof way of doing things

2025-10-11T17:08:35.859269Z

tangentially, i would love a tool that balances parens. all the LLMs seem to have trouble with this and it's one of the few things i regularly need to step in and help with

2025-10-11T17:09:32.600289Z

clojure-mcp makes a decent attempt with its edit commands. But I am gravitating more to its native edit tool nowadays.

2025-10-11T17:10:34.116509Z

is it good for working with electric? i've just been using vanilla claude code + CLAUDE.md with decent results

2025-10-11T17:12:22.055669Z

Hmm I modified it heavily myself and took out most of the tools. Nowadays only the clojure eval that I manually extended with clojurescript eval via shadow

2025-10-11T17:12:48.438519Z

That is more important than the paren balancing, giving it a repl

2025-10-11T17:13:03.198559Z

i prefer a more lightweight setup as well

2025-10-11T17:13:20.859549Z

Yes, but eval is super valuable

2025-10-11T17:14:05.779859Z

I often tell claude to โ€œgroundโ€ or โ€œtraceโ€ with โ€œreal dataโ€ and that works really well.

2025-10-11T17:14:21.819969Z

my repl eval is literally a python nrepl client that it wrote itself

2025-10-11T17:14:40.369139Z

Good enough!

2025-10-11T17:15:40.514219Z

I notice if my cljs repl is down it will just use the devtools mcp and call cljs symbols directly. Itโ€™s interesting how resourceful it is.

2025-10-11T17:19:41.212349Z

for sure, super resourceful! i have a bunch of observations like that too.