hyperfiddle

Jim Duey 2025-02-21T00:05:11.859589Z

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

πŸ‘€ 2
Kurt Harriger 2025-02-21T00:05:30.237329Z

you can say that again

🍭 1
Jim Duey 2025-02-21T00:06:06.404609Z

LOL. So tempted to post the link again. πŸ˜€

Kurt Harriger 2025-02-21T00:07:37.254199Z

could go on forever... sometimes thats useful but probably not here

Dustin Getz (Hyperfiddle) 2025-02-21T11:40:07.313289Z

good topic, looking forward

grav 2025-02-21T20:04:05.480849Z

Getting a compile error on electric-fiddle:

grav 2025-02-28T13:20:25.481189Z

@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/4

grav 2025-02-28T13:26:48.464459Z

Here, 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

Dustin Getz (Hyperfiddle) 2025-02-28T14:47:35.768299Z

this is going to keep happening, i have given you bad instructions, let me correct it

Dustin Getz (Hyperfiddle) 2025-02-28T14:49:35.386989Z

β€’ 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

πŸ’‘ 1
Dustin Getz (Hyperfiddle) 2025-02-28T14:50:16.983649Z

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

Dustin Getz (Hyperfiddle) 2025-02-28T14:51:00.894529Z

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

Dustin Getz (Hyperfiddle) 2025-02-28T14:51:29.742089Z

a better strategy might be to just run the electric starter app, and copy in any electric fiddle demos that you are playing with

πŸ†— 1
grav 2025-02-28T15:46:18.660249Z

Ah, got you. Thanks for the clarification πŸ‘

2025-02-24T19:33:59.108829Z

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

Dustin Getz (Hyperfiddle) 2025-02-24T19:36:37.612199Z

I just pushed a new electric snapshot, this should be resolved now

2025-02-24T19:45:55.589579Z

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.

πŸ€” 1
Dustin Getz (Hyperfiddle) 2025-02-24T19:47:32.608509Z

pull latest electric-fiddle?

Dustin Getz (Hyperfiddle) 2025-02-24T19:48:30.754809Z

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?

2025-02-24T19:55:38.028999Z

I ended up deleting my ~/.m2/repository/com/hyperfiddle and now all is good.

πŸ€” 1
2025-02-24T19:55:47.139999Z

Thanks

2025-02-24T19:56:21.972759Z

So it downloaded all the new things πŸ™‚

Dustin Getz (Hyperfiddle) 2025-02-24T19:56:43.002669Z

snapshot releaes are supposed to revalidate every time, something is not right

2025-02-24T19:58:33.647669Z

ISTR that snapshots re-download once a day

πŸ‘€ 1
2025-02-24T20:10:18.808949Z

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.

2025-02-24T20:10:25.964879Z

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)

πŸ‘€ 1
2025-02-24T20:11:04.544869Z

Anyway, no urgency on this. I can use that commit I mentioned a little earlier.

2025-02-24T20:19:42.489999Z

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. πŸ™‚

Dustin Getz (Hyperfiddle) 2025-02-24T20:21:18.262119Z

what is the compilation error related to contrib?

Dustin Getz (Hyperfiddle) 2025-02-24T20:21:49.852249Z

and is it in your code our ours?

2025-02-24T20:24:12.324179Z

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

Dustin Getz (Hyperfiddle) 2025-02-24T20:24:36.187269Z

ah good, that is dustingetz.str now per the release notes in the channel

Dustin Getz (Hyperfiddle) 2025-02-24T20:25:34.201049Z

you do have to upgrade/rebase electric-fiddle to stay aligned, electric-fiddle only builds on master

2025-02-24T20:36:44.611979Z

OK.

2025-02-24T20:38:04.070889Z

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.

Dustin Getz (Hyperfiddle) 2025-02-24T20:38:39.317719Z

yeah sorry about that, i will look into it

2025-02-24T20:38:48.819609Z

OK; thanks

grav 2025-02-21T20:05:20.333829Z

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)

Dustin Getz (Hyperfiddle) 2025-02-21T20:06:16.738879Z

that is surprising

Dustin Getz (Hyperfiddle) 2025-02-21T20:06:39.711139Z

checking

Dustin Getz (Hyperfiddle) 2025-02-21T20:07:25.431179Z

confirmed, can repro

πŸ‘ 1
Dustin Getz (Hyperfiddle) 2025-02-21T20:15:51.129259Z

it's going to be a couple days, you caught me in the middle of a massive refactor

Dustin Getz (Hyperfiddle) 2025-02-21T20:16:39.247399Z

you might be able to fix it locally, i'm not actually sure what's wrong

Dustin Getz (Hyperfiddle) 2025-02-21T20:17:07.952779Z

it could be mismatched electric snapshot

Dustin Getz (Hyperfiddle) 2025-02-21T20:17:25.414839Z

electric-fiddle runs master. in fact yes that is what it is

grav 2025-02-21T20:17:34.081349Z

Checked quickly, and there doesn't seem to be a contrib.data namespace

Dustin Getz (Hyperfiddle) 2025-02-21T20:18:09.179349Z

electric does have contrib.data (the horrible ns name is on our backlog to fix), but group-by was added recently

Dustin Getz (Hyperfiddle) 2025-02-21T20:18:29.029859Z

pretty sure you can just use clojure.core/group-by and then the app will boot

Dustin Getz (Hyperfiddle) 2025-02-21T20:18:50.342059Z

i think its a perf optimization in an unreleased demo

grav 2025-02-21T20:22:39.728179Z

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 πŸ‘

πŸ‘€ 1
grav 2025-02-21T20:42:50.535539Z

Do you accept PRs for build pipelines, btw?

Dustin Getz (Hyperfiddle) 2025-02-21T21:30:29.091079Z

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?

grav 2025-02-21T21:51:34.248679Z

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 πŸ™‚

Dustin Getz (Hyperfiddle) 2025-02-21T23:46:13.906339Z

i would love to see it

2025-02-25T11:05:30.712909Z

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

❀️ 1
2025-02-25T11:05:39.248089Z

(Search for :update at https://clojure.org/reference/deps_edn)

Dustin Getz (Hyperfiddle) 2025-02-25T11:33:46.367519Z

oooo ty

Dustin Getz (Hyperfiddle) 2025-02-25T11:42:20.557229Z

we will add this to electric-fiddle, i don't think it matters for the starter app

πŸ‘ 1
Jim Duey 2025-02-25T14:34:08.977329Z

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.

Dustin Getz (Hyperfiddle) 2025-02-25T14:37:20.508799Z

you're saying the starter app boots datomic?

Jim Duey 2025-02-25T14:38:05.362059Z

The starter app launched, but when I went to localhost:8080 it said "Datomic transactor not found, see Readme.md"

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

i can reproduce, somethign is extremely wrong

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

christ, I have overwritten the starter app with the datomic browser

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

i was doing git subtree gymnastics over the weekend

Dustin Getz (Hyperfiddle) 2025-02-25T14:45:48.980449Z

just pushed the fix (force push), you'll probably want to reclone the starter app

Jim Duey 2025-02-25T14:57:03.681759Z

Works now

πŸ™ 1