This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-01
Channels
- # announcements (7)
- # babashka (10)
- # beginners (60)
- # clerk (4)
- # clojure (19)
- # clojure-conj (5)
- # clojure-europe (48)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-uk (2)
- # clojurescript (12)
- # conjure (2)
- # core-async (24)
- # cursive (3)
- # datalevin (18)
- # events (1)
- # figwheel-main (5)
- # fulcro (22)
- # honeysql (29)
- # hyperfiddle (60)
- # jobs (3)
- # leiningen (18)
- # lsp (47)
- # meander (21)
- # missionary (6)
- # off-topic (35)
- # reagent (14)
- # remote-jobs (1)
- # ring (1)
- # shadow-cljs (32)
- # sql (10)
- # transit (12)
Just wanna say that playing with Electric is a blast and I can't wait until you guys publish instructions for how to build for production (uberjar etc).
so like, some clientside atoms that keep current viewname, and then change those on click.
Hi! On master, I have this error Could not initialize class hyperfiddle.electric.impl.env$maybe_load_clj_ns_BANG_$fn__30671
with this code:
(e/def foo)
(e/defn App []
(e/server
(binding [foo "Foo"]
(e/client
(dom/h1 (dom/text "foo"))))))
I miss something?Thank you for the report. You did not miss something. We are looking into it
please post your user.clj, user.cljs and also what commands do you use to start the app?
Here, the files => https://gist.github.com/jeans11/b0e5dbc68d2ac13623774c55aeac0aa5
To start the app, I launch the main
function in the dev
namespace.
what happens if you require electric in dev.core
Hello! Awesome project, thanks for doing that! I have tried the "demo-6-two-clocks" and can not figure out why after a few manual page reloads, the server clock (e/server e/system-time-ms) loses its reactivity? The client clock (e/client e/system-time-ms) is going forward, but the server's one is just halted, so I need to restart the clj.
that shouldn't happen
Are there any errors in the server log? What is your OS and system specs?
How are you running the demos?
No, that is happening without any errors. I just compile and run from the master branch of Electric using the VSCode terminal. I am running it on Apple M1 macOS Ventura 13.2.1. Clojure CLI version 1.11.1.1224, OpenJDK Runtime Environment Temurin-17.0.6+10
Can you try a non-Temurin JDK
Sure, thanks I will try. And sorry, there is an error after I reload a page. Here is the log:
Are you using firefox?
I saw that error in a user call once from Firefox ā the error comes from the prior page instance and somehow leaks across a hard refresh into the new page
the error simply means that the websocket connection was killed
Try Chrome to confirm this
Yes, I tried it exactly in Chrome (version 110 - arm64) and it gives me that error on page refresh. As you suggested I'll try a non-Temurin install.
I have run master branch with non-Temurin java version "17.0.6" 2023-01-17 LTS and still get the same behaviour and error message. In Safari browser it also halts after 3-4 page refreshes, but with no logging of the error.
thinking
There's a java tool to inspect threads and detect deadlocks. Do you happen to know how to use it?
"VisualVM"
Oh, I have no experience in using Java dev tools (new to me). Mostly I programming Smalltalk and JavaScript. I just wonder if someone else experience the same as me?
thanks for the report!
We'll get it fixed, the issue is almost certainly constrained to the two clocks demo
@U04RB45M8J3 we investigated; the deadlock is an interaction with hard refresh (which tears down the system and the teardown can deadlock with the sleep scheduler). If you don't refresh the two clocks page you won't get a deadlock.
We'll fix it obviously but we've backlogged it because it's not something that happens in real world circumstances
(This is a Missionary bug btw, in https://github.com/leonoel/missionary/blob/master/java/missionary/impl/Sleep.java, its very localized)
Also, if necessary we can slow down the timer from 1000hz to 100hz which will dramatically lower the probability (increasing the speed of the timer recently is what made the problem surface)
Dustin, thank you very much for letting know and clarifying things! Yes, this is not so critical and does not prevent making very fantastic things with Electric just right now.
@dustingetz and team, just wanted to thank you guys for releasing this to the world. The hype is warranted and iām still wrapping my head around the implications. Even React is converging into co-located server and client components, but having access to that paradigm within the context of Clojure and a single unifying layer / ecosystem protects us from much fragmentation at the org / human resource level and helps us really get into deeper flow states š . Still hacking around, demos on the way!
good read to keep up with where the React world is headed: https://beta.nextjs.org/docs/rendering/server-and-client-components
Thank you Allen, appreciate the kind words! any interest in a zoom onboarding?
SVG is in master example code: https://github.com/hyperfiddle/electric/blob/master/src-docs/user/demo_svg.cljc implementation is https://github.com/hyperfiddle/electric/blob/master/src/hyperfiddle/electric_svg.cljc#L8-L19 (plus a 10 line improvement to electric-dom to support DOM attribute namespaces)
Hi, how can I use this in electric-starter-app? The latest version on Clojars seems to be from Feb 19?
@U04P1F17B2N you can do {:git/url "
in the deps.edn
i need to do a proper release, it's coming - not actually sure if there are any breaking changes
In the new master e/wrap is marked as deprecated? What to use for blocking calls now?
e/offload
; please migrate (e/wrap (teeshirt-orders db search))
to (e/offload #(teeshirt-orders db search))
note the #
We'll release a proper versioned artifact soon and provide a changelog
yeah, thanks