Fork me on GitHub
#hyperfiddle
<
2023-03-01
>
tobias00:03:15

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).

šŸ™‚ 2
ā˜‘ļø 2
Dustin Getz01:03:48

deploy examples imminent!

šŸ‘ 3
šŸ”„ 1
vincent03:03:14

Hello, I need some help figuring out how to change stuff on click.

vincent03:03:20

I think I want (dom/on ...)

vincent03:03:56

Ah okay need to do (e/fn ...)

duckie 1
vincent03:03:10

I want to make clientside views

vincent03:03:26

so like, some clientside atoms that keep current viewname, and then change those on click.

vincent03:03:02

woot i got it working

duckie 1
J08:03:13

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?

āœ… 2
šŸ‘€ 1
Geoffrey Gaillard08:03:24

Thank you for the report. You did not miss something. We are looking into it

Dustin Getz11:03:35

please post your user.clj, user.cljs and also what commands do you use to start the app?

J11:03:17

Here, the files => https://gist.github.com/jeans11/b0e5dbc68d2ac13623774c55aeac0aa5 To start the app, I launch the main function in the dev namespace.

Dustin Getz11:03:35

what happens if you require electric in dev.core

J12:03:39

Yes it works now! Thank guys!

šŸ‘ 1
Nikolai13:03:48

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.

āœ… 2
Dustin Getz13:03:25

that shouldn't happen

Dustin Getz13:03:05

Are there any errors in the server log? What is your OS and system specs?

Dustin Getz13:03:37

How are you running the demos?

Nikolai15:03:39

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

šŸ‘€ 1
Dustin Getz15:03:48

Can you try a non-Temurin JDK

Nikolai16:03:49

Sure, thanks I will try. And sorry, there is an error after I reload a page. Here is the log:

Dustin Getz17:03:42

Are you using firefox?

Dustin Getz18:03:30

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

Dustin Getz18:03:50

the error simply means that the websocket connection was killed

Dustin Getz18:03:08

Try Chrome to confirm this

Nikolai20:03:35

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.

šŸ‘€ 1
Nikolai21:03:59

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.

Dustin Getz21:03:55

There's a java tool to inspect threads and detect deadlocks. Do you happen to know how to use it?

Dustin Getz21:03:49

oh hey i reproduced it

šŸ‘€ 1
Nikolai21:03:02

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?

Dustin Getz21:03:32

thanks for the report!

Dustin Getz21:03:10

We'll get it fixed, the issue is almost certainly constrained to the two clocks demo

šŸ™Œ 1
Nikolai21:03:43

Will looking forward to this, am very excited with Electric, Thanks!

šŸ™‚ 1
Dustin Getz21:03:51

@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.

šŸ‘ 2
Dustin Getz21:03:50

We'll fix it obviously but we've backlogged it because it's not something that happens in real world circumstances

Dustin Getz21:03:01

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)

Nikolai23:03:34

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.

šŸ™‚ 2
coetry17:03:37

@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!

āž• 2
šŸ™‚ 1
ā¤ļø 1
coetry17:03:22

good read to keep up with where the React world is headed: https://beta.nextjs.org/docs/rendering/server-and-client-components

Dustin Getz18:03:39

Thank you Allen, appreciate the kind words! any interest in a zoom onboarding?

coetry19:03:49

lmk details

Dustin Getz18:03:51

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)

šŸŽ‰ 12
Dag18:03:12

Hi, how can I use this in electric-starter-app? The latest version on Clojars seems to be from Feb 19?

Dustin Getz19:03:59

@U04P1F17B2N you can do {:git/url "" :git/sha "...."} in the deps.edn

Dustin Getz19:03:40

i need to do a proper release, it's coming - not actually sure if there are any breaking changes

Dag19:03:32

Thanks! I guess the dependency should be electric and not electric-starter-app though?

Dag19:03:38

Have updated the electric-clojure-painter repo now, SVG works beautifully šŸ™‚

āš” 2
Michael W18:03:54

In the new master e/wrap is marked as deprecated? What to use for blocking calls now?

āœ… 2
Dustin Getz19:03:12

e/offload ; please migrate (e/wrap (teeshirt-orders db search)) to (e/offload #(teeshirt-orders db search))

šŸ‘ 1
Dustin Getz19:03:55

We'll release a proper versioned artifact soon and provide a changelog

tatut20:03:58

That feels like a better name that suggests what it does