squint

borkdude 2025-04-17T10:52:58.060729Z

Sorry about that, fixed

🎉 1
Chris McCormick 2025-04-17T13:42:01.513639Z

All good I just noticed it passing by and thought you might want to know.

m3tti 2025-04-17T17:31:32.381689Z

anyone tried that withsquint? https://cycle.js.org i guess i'm gonna give it a try 😄

m3tti 2025-04-18T11:52:41.060779Z

i'm currently trying this in the squint web repl thing but it doesn't work 😞 i guess it has to do with the xstream lib right https://squint-cljs.github.io/squint/?repl=true&src=KHJlcXVpcmUgJ1siaHR0cHM6Ly9lc20uc2gveHN0cmVhbUAxMS4xNC4wIiA6YXMgeHNdKQoocmVxdWlyZSAnWyJodHRwczovL2VzbS5zaC9AY3ljbGUvcnVuQDUuNy4wIiA6cmVmZXIgW3J1bl1dKQoocmVxdWlyZSAnWyJodHRwczovL2VzbS5zaC9AY3ljbGUvaHR0cEAxNS40LjAiIDpyZWZlciBbbWFrZUhUVFBEcml2ZXJdXSkKKHJlcXVpcmUgJ1siaHR0cHM6Ly9lc20uc2gvQGN5Y2xlL2RvbUAyMy4xLjAiIDpyZWZlciBbbWFrZURPTURyaXZlciBkaXYgYnV0dG9uIGgxXV0pCgooZGVmbiBpbnRlbnQgW0RPTV0KICAoLT4gRE9NCiAgICAgICguc2VsZWN0ICIuYnV0dG9uIikKICAgICAgKC5ldmVudHMgImNsaWNrIikpKQoKKGRlZm4gc3RhdGUgW0hUVFBdCiAgKC0%2BIEhUVFAKICAgICAgKC5zZWxlY3QgInVzZXJzIikKICAgICAgLmZsYXR0ZW4KICAgICAgKC5tYXAgIygtPiAlIC4tYm9keSkpCiAgICAgICguc3RhcnRXaXRoIG5pbCkpKQoKKGRlZm4gdmlldyBbdXNlcl0KICAoZGl2ICIudXNlcnMiCiAgICAgICBbKGJ1dHRvbiAiLmJ1dHRvbiIgIkdldCBVc2VyIikKICAgICAgICAod2hlbiB1c2VyCiAgICAgICAgICAoZGl2ICIudXNlci1kZXRhaWxzIgogICAgICAgICAgICAgICBbKGgxICIudXNlci1uYW1lIiAoLT4gdXNlciAuLW5hbWUpKV0pKV0pKQoKKGRlZm4gcmVxdWVzdFVzZXIgW10KICAobGV0IFtyYW5kb20gKE1hdGgucm91bmQgKCsgKCogKE1hdGgucmFuZG9tKSA5KSkgMSldCiAgICB7OnVybCAoc3RyICJodHRwczovL2pzb25wbGFjZWhvbGRlci50eXBpY29kZS5jb20vdXNlcnMvIiByYW5kb20pCiAgICAgOmNhdGVnb3J5ICJ1c2VycyIKICAgICA6bWV0aG9kICJHRVQifSkpCgooZGVmbiBtYWluIFt7OmtleXMgW0RPTSBIVFRQXX1dCiAgezpIVFRQICgtPiAoaW50ZW50IERPTSkKICAgICAgICAgICAgICgubWFwIHJlcXVlc3RVc2VyKSkKCiAgIDpET00gKC0%2BIChzdGF0ZSBIVFRQKQogICAgICAgICAgICAoLm1hcCB2aWV3KSl9KQoKKGRlZm9uY2UgZWx0IChkb3RvIChqcy9kb2N1bWVudC5jcmVhdGVFbGVtZW50ICJkaXYiKQogICAgICAgICAgICAgICAoanMvZG9jdW1lbnQuYm9keS5wcmVwZW5kKSkpCgoocnVuIG1haW4gezpET00gKG1ha2VET01Ecml2ZXIgZWx0KQogICAgICAgICAgIDpIVFRQIChtYWtlSFRUUERyaXZlcil9KQ%3D%3D

borkdude 2025-04-18T15:06:31.522269Z

It seems this is the smallest repro: https://squint-cljs.github.io/squint/?repl=true&src=KHJlcXVpcmUgJ1siaHR0cHM6Ly9lc20uc2gveHN0cmVhbUAxMS4xNC4wIiA6YXMgeHNdKQ%3D%3D so just loading the library produces that error

borkdude 2025-04-18T15:09:38.591239Z

it seems to rely on this other lib: https://github.com/staltz/xstream/blob/fee5f0d1ea23becc5aa89064624b609a105104b3/src/index.ts#L2

❤️ 1
1
m3tti 2025-04-17T17:33:24.801279Z

is there a way to use https://cycle.js.org/getting-started.html#getting-started-coding-consider-jsx with squint? snabbdom-pragma

m3tti 2025-04-17T19:14:42.848149Z

doesn't look that bad i guess

(ns App
  (:require
   ["xstream$default" :as xs]
   ["@cycle/run" :refer [run]]
   ["@cycle/dom" :refer [makeDOMDriver h1]]))

(defn main []
  {:DOM (-> xs
            (.periodic 1000)
            (.map #(h1 (str % " hello seconds elapsed"))))})

(run main {:DOM (makeDOMDriver "#mount")})

borkdude 2025-04-17T19:29:03.926739Z

I don't see why that Snabbdom thing wouldn't work since it doesn't require any special syntax, but you will need to build it using node

m3tti 2025-04-17T19:43:59.881719Z

how does the #jsx pragma work 🙂 can i configure it somehow i don't get it 😄

m3tti 2025-04-17T19:46:22.123569Z

https://github.com/m3tti/squint-cycle

borkdude 2025-04-17T20:05:53.354819Z

what pragma? you can just write #jsx [:a ...] right?

borkdude 2025-04-17T20:06:53.763709Z

squint just outputs jsx, the tooling does the rest

m3tti 2025-04-17T20:27:16.649919Z

yeah i guess i'm to dumb for the tooling 😄 currently wanted to set it up on my own 😄 but you know to much fiddeling and the cycle/dom functions are okay i'm a simple man 😄