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” :^).
Hi - I don't understand, can you clarify please? Also, https://xyproblem.info/
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))))i.e., (e/snapshot x) will freeze x , i.e. sever the expression with respect to updates to x
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 :^)
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
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
@lsenjov it is a known recent regression, we are working on it
action required, fix is in userland entrypoint, see https://clojurians.slack.com/archives/C7Q9GSHFV/p1738591790727399
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
https://github.com/tommy-mor/llm-history/blob/main/src/electric_starter_app/llm.clj
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
I built one in about 1000 lines of code with chat folders etc which is open source about 14 months ago
awesome! link?
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.
Sweet!
Claude approves of hyperfiddle’s work:
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 😉
Ha ha thank you Claude!