hyperfiddle

oλv 2025-02-02T00:59:20.209599Z

I have an (e/fn Finaliser [state event suggestion]) and I would like to call it in a transactional manner, such that (reset! !state …) won’t make Finaliser re-execute its code. I realise this is not the semantics of Electric, so I’m happy to be told “do ___ instead” :^).

Dustin Getz (Hyperfiddle) 2025-02-02T14:40:25.855969Z

Hi - I don't understand, can you clarify please? Also, https://xyproblem.info/

Dustin Getz (Hyperfiddle) 2025-02-02T14:41:28.934269Z

e/snapshot is a helpful primitive, demonstrated in the https://electric.hyperfiddle.net/blog/y20250123_waveform to implement a timer:

(e/defn Timer [] (ex/Throttle 1 (- (e/snapshot (e/System-time-ms)) (e/System-time-ms))))

Dustin Getz (Hyperfiddle) 2025-02-02T14:42:46.004169Z

i.e., (e/snapshot x) will freeze x , i.e. sever the expression with respect to updates to x

oλv 2025-02-02T14:44:33.833149Z

Sorry, for the confusing post. I was hastily writing it at 2 AM from a hackathon 😅. e/snapshot sounds like what I’m looking for, I’ll check it out later today :^)

lsenjov 2025-02-02T01:25:40.278879Z

The ring request seems to not be getting passed through to Main. • Fresh checkout of the current starter app • Cookie is getting passed onto the WS request • Prn shows the ring-request is fine inside the function at src-dev/dev.cljc L34 • Prn inside of Main shows ring-request as nil

JAtkins 2025-02-02T05:18:25.258519Z

JAtkins 2025-02-02T05:20:17.659559Z

Here's my diff vs the electric starter app 86ed9f149211. I see that the EntryPoint ring-request is populated as expected, but both the client or server blocks I introduced in Main print nil

Dustin Getz (Hyperfiddle) 2025-02-02T13:40:03.341209Z

@lsenjov it is a known recent regression, we are working on it

👍 2
Dustin Getz (Hyperfiddle) 2025-02-03T14:13:25.892529Z

action required, fix is in userland entrypoint, see https://clojurians.slack.com/archives/C7Q9GSHFV/p1738591790727399

❤️ 1
2025-02-02T03:26:32.155959Z

random idea but: i think a open source llm chat app in electric would be a really cool project. like just a simple api wrapper, dropdown for wich api/llm provider. i think it could be like 150 lines of code in electric, would be super cool tweetable app that would also be fun to use. like t3.chat but electric. we already have a snippet floating around here that has llm streaming token by token in electric/missionary

2025-02-02T03:34:11.395049Z

there are multiple competing profitable products: t3.chat, glhf.chat, etc which are basically that, and showing this comparison could be attractive to investors. like their product fits in our tweet! also would fit the vibe of the open source llm movement which is hitting a fever pitch because of deepseek

grounded_sage 2025-02-02T06:02:09.512319Z

I built one in about 1000 lines of code with chat folders etc which is open source about 14 months ago

2025-02-02T06:20:49.881629Z

awesome! link?

grounded_sage 2025-02-02T07:49:09.179409Z

https://github.com/groundedsage/clj-chatbot-ui I don’t know current status of this. I majorly deviated from it for private work (completely different interface and integration across different chats like Telegram etc). But as far as I remember it was working.

2025-02-02T15:52:36.757039Z

Sweet!

prnc 2025-02-02T13:40:35.055489Z

Claude approves of hyperfiddle’s work:

🙂 1
prnc 2025-02-02T13:41:49.412579Z

I got curious about how much Claude would know about current landscape of interesting tech companies (great people, interesting tech etc.)—this was very nice to see 😉

Dustin Getz (Hyperfiddle) 2025-02-02T14:39:16.769649Z

Ha ha thank you Claude!