LambdaConf is a great conference! And I just so happen to also be giving a talk there on recursion schemes. https://x.com/lambda_conf/status/1885251695761883553
you can say that again
LOL. So tempted to post the link again. π
could go on forever... sometimes thats useful but probably not here
good topic, looking forward
Getting a compile error on electric-fiddle:
@dustingetz Seems main is broken again:
Caused by: java.io.FileNotFoundException: Could not locate hyperfiddle/electric_forms5__init.class, hyperfiddle/electric_forms5.clj or hyperfiddle/electric_forms5.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
Good news is that I finally got around to finishing the pipeline:
https://gitlab.com/hyperfiddle/electric-fiddle/-/merge_requests/4Here, I applied the ci-pipeline branch on top of main, and this pipeline should indicate that the build is currently broken (if I have enough CI minutes π
) :
https://gitlab.com/mikkelg/electric-fiddle/-/jobs/9275828838
this is going to keep happening, i have given you bad instructions, let me correct it
β’ electric-fiddle runs on electric master (we work out of essentially a monorepo which we only partially publish) β’ electric master is not published, we publish snapshots every few weeks β’ therefore, public use of electric-fiddle needs to be keyed to the latest electric snapshot β’ i.e., set your electric-fiddle commit to approximately the day of the latest electric snapshot
electric-fiddle is not intended for the public to depend on and run today, we publish it in secret so we can link to demo source code sometimes
furthermore, i'm about to reorg everything again this weekend, unclear what impact this will have to anyone trying to build off of electric-fiddle
a better strategy might be to just run the electric starter app, and copy in any electric fiddle demos that you are playing with
Ah, got you. Thanks for the clarification π
@grav If you checkout commit 1600bf2 that error will go away. You wonβt be fully up-to-date, but you will be able to play around.
I just pushed a new electric snapshot, this should be resolved now
Now I get java.io.FileNotFoundException: Could not locate electric_fiddle/fiddle_index__init.class, electric_fiddle/fiddle_index.clj or electric_fiddle/fiddle_index.cljc on classpath.
pull latest electric-fiddle?
electric-fiddle.fiddle-index has been moved into the hyperfiddle artifact (without renaming the ns - for compat), and electric-fiddle depends on com.hyperfiddle/hyperfiddle {:mvn/version "v0-alpha-SNAPSHOT"} unless you pruned it locally?
I ended up deleting my ~/.m2/repository/com/hyperfiddle and now all is good.
Thanks
So it downloaded all the new things π
snapshot releaes are supposed to revalidate every time, something is not right
ISTR that snapshots re-download once a day
It now compiles OK and I can get the UI up, but then I see errors that seem to be related to Datomic connections. Maybe thereβs an assumption that Datomic is available.
The top of the stack is:
Feb 24, 2025 8:07:00 PM org.apache.tomcat.jdbc.pool.ConnectionPool init
SEVERE: Unable to create initial connections of pool.
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Connection is broken: "java.net.ConnectException: Connection refused (Connection refused): localhost:4335" [90067-214]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:678)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:477)
at org.h2.message.DbException.get(DbException.java:212)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:437)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:325)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:122)
at org.h2.Driver.connect(Driver.java:59)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:277)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:181)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:738)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:670)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:482)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at datomic.sql$connect.invokeStatic(sql.clj:16)
at datomic.sql$connect.invoke(sql.clj:13)
at datomic.sql$select.invokeStatic(sql.clj:77)
at datomic.sql$select.invoke(sql.clj:75)
at datomic.kv_sql.KVSql.get(kv_sql.clj:60)
at datomic.kv_cluster.KVCluster$fn__15760$fn__15764$fn__15765.invoke(kv_cluster.clj:240)Anyway, no urgency on this. I can use that commit I mentioned a little earlier.
Oh, the snapshots mean that I donβt have the same state as before, so Iβm now getting compilation errors relating to contrib stuff. Anyway, still no urgency. π
what is the compilation error related to contrib?
and is it in your code our ours?
This is with commit 1600bf2 in electric-fiddle. It was working for me an hour ago, but now Iβm getting java.io.FileNotFoundException: Could not locate contrib/str__init.class, contrib/str.clj or contrib/str.cljc on classpath β I assume because my Maven snapshots are different to before
ah good, that is dustingetz.str now per the release notes in the channel
you do have to upgrade/rebase electric-fiddle to stay aligned, electric-fiddle only builds on master
OK.
Did you see the message above where I said > It now compiles OK and I can get the UI up, but then I see errors that seem to be related to Datomic connections. Maybe thereβs an assumption that Datomic is available. This is with the latest commit on the main branch of electric-fiddle.
yeah sorry about that, i will look into it
OK; thanks
No such var: contrib.data/group-by
Repro:
$ git clone git@gitlab.com:hyperfiddle/electric-fiddle.git
$ npm install
$ clj -A:dev:electric-tutorial:dustingetz -X dev/-main
Performance warning, hyperfiddle/electric/impl/runtime3.cljc:1802:5 - case has int tests, but tested expression is not primitive.
Performance warning, hyperfiddle/electric/impl/runtime3.cljc:1811:5 - case has int tests, but tested expression is not primitive.
INFO dustingetz.datomic-m: Datomic APIs detected: #{datomic.api}
Exception in thread "main" Syntax error compiling at (dustingetz/datomic_contrib.clj:292:5).
at clojure.lang.Compiler.analyze(Compiler.java:7340)
at clojure.lang.Compiler.analyze(Compiler.java:7277)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:4296)
[snip]
Caused by: java.lang.RuntimeException: No such var: contrib.data/group-by
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler.resolveIn(Compiler.java:7918)that is surprising
checking
confirmed, can repro
it's going to be a couple days, you caught me in the middle of a massive refactor
you might be able to fix it locally, i'm not actually sure what's wrong
it could be mismatched electric snapshot
electric-fiddle runs master. in fact yes that is what it is
Checked quickly, and there doesn't seem to be a contrib.data namespace
electric does have contrib.data (the horrible ns name is on our backlog to fix), but group-by was added recently
pretty sure you can just use clojure.core/group-by and then the app will boot
i think its a perf optimization in an unreleased demo
changing into core's group-by, I get some additional errors, though. But no worries - I'm still dipping my toes in electric3, will concentrate on the starter app instead π
Do you accept PRs for build pipelines, btw?
we generally don't accept PRs currently not because of licensing issues but because of the eng overhead on my team to align and land them, but what exactly did you want to propose?
To build the project from master, just as I did now. Wanted to try my luck with Gitlab pipelines anyway, and thought it might be useful π
i would love to see it
@dustingetz I said: > ISTR that snapshots re-download once a day That seems to be true. If I add the following to deps.edn I get downloads every time:
:mvn/repos
{"clojars" {:url " "
:snapshots {:enabled true
:update :always}}}(Search for :update at https://clojure.org/reference/deps_edn)
oooo ty
we will add this to electric-fiddle, i don't think it matters for the starter app
I just started over on the starter app and seem to hit the same problem with Datomic. Adding that snippet to the deps.edn didn't fix it.
you're saying the starter app boots datomic?
The starter app launched, but when I went to localhost:8080 it said "Datomic transactor not found, see Readme.md"
i can reproduce, somethign is extremely wrong
christ, I have overwritten the starter app with the datomic browser
i was doing git subtree gymnastics over the weekend
just pushed the fix (force push), you'll probably want to reclone the starter app
Works now