This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-27
Channels
- # announcements (9)
- # aws (1)
- # aws-lambda (12)
- # babashka (18)
- # beginners (37)
- # calva (27)
- # clerk (15)
- # clojure (16)
- # clojure-conj (13)
- # clojure-europe (44)
- # clojure-germany (3)
- # clojure-norway (27)
- # clojure-uk (1)
- # cursive (6)
- # data-science (24)
- # datahike (7)
- # datomic (40)
- # fulcro (5)
- # hoplon (33)
- # hyperfiddle (9)
- # introduce-yourself (6)
- # jobs (1)
- # lsp (22)
- # nbb (2)
- # off-topic (15)
- # pathom (37)
- # pedestal (3)
- # polylith (7)
- # portal (1)
- # re-frame (7)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (6)
- # sci (1)
- # scittle (1)
- # xtdb (7)
"ECL ... wasm port"? Time for me to dust off https://github.com/kennytilton/Cello! That's my OpenGL-grounded UI framework--when you pushed a button, it really did go deeper into the screen. Too much fun.
Gotta say, programming OpenGL from Common Lisp made programming new again. I imagine audio would be the same. I had this idea for a computer music centered code camp. Sadly, I know nothing about music.
Common Lisping the past few years had the effect on me the past few years
when i crack open Cello and see beauties like define-symbol-macro
... š
Symbol macros! It's a huge language, but after ten years I had used it all. Except iterate
. š
on the last Clojure survey i requested *macroexpand-hook*
, i try to request at least one CL feature a year
https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/277/commits btw. and http://turtleware.eu/static/ecl/ecl.html is a (very) rough demo, but on that page is a genuine ECL image running in a wasm blob
the era of True Cells (tm) in the browser is nigh š ā” šŖļø
World domination cannot be far behind. Fascinating to see this project. Thx for the heads up! š
Btw, re changes dispatched in formulas, that's pretty wild. In my hack I allow changes to be dispatched by watches, which run right when formulas are recalculating, but the changes must be explcitly deferred for execution as soon as the current state change has fully propagated. Just arrange an internal queue and, when one change completes, look to see if other changes got enqueued. The one trick here is having any such change return a bogus :CHANGE-DEFERRED token, instead of the expected value of an assignment, the new value, so anyone availing theselves of this feature get a quick reminder š if they try to use the return value. Overall, we can bind various dynamic vars regulating what is allowed and when, so at run-time transgressions can be trapped. Might be worth a try for H/J. I do not find such constraints have mush dimished the d/x.
in javelin we're pretty good about signalling you've modified a dependency; your browser locks up immediately š
an improvement here could be, we probably know enough to tell you the loop before locking
That will teach them! š Yeah, I imagine you have the dependency chain at hand. In Cells, I dump the chain, I think including each cell body, which gets captured in symbolic form by the cell-generating macros. Ain't macros grand?!
hell yeah
unfortunately capturing compile-time stuff and doing cool things with it at runtime in cljs has always been fraught because of the gclosure shenanigans
and, you know, no EVAL-WHEN š§
in Cells do you walk the chain to find the loop a priori? or do you detect the loop on the 2nd iteration
Ah, I will keep my eye open for that. Thx for the heads up. EVAL_WHEN! Less, :compile, :load, :eval? And there were two syntaxes: :*-toplevel.
re the loop: Cells is all run-time, no code inspection. Each formulaic cell gets pushed onto a dynamic stack var when it starts calculating. When a cell needs recalculation, we check if it is already calculating, ie in the stack. If so, we go boom, displaying the stack members.
If I ever get a good use case for supporting cycles, I'll add an :on-cycle
handler, but it has never come up.
Fun stuff!
very nice, makes sense, thanks for explanation
that seems like the optimal solution in javelin too
Ain't *specials*
grand? (I seem to be repeating myself.)
the best
we already do https://github.com/hoplon/javelin/blob/master/src/javelin/core.cljs#L213-L227 to suspend propagation within a transaction, as i imagine you do
which was always something i could never really express the awesomeness of to people who were more excited about having one big everything-atom they could swap!
on
Suspend propagation? In transactions? That might be one problem with my hack, no transactions. We could roll back the cascading calculations, but side-effects are dispatched as each value changes, and we would not be able to roll those back since they operate outside the Cells system. One big atom? That came up in the call. I was already yapping too much so I did not want to make things worse, but I hope H/J stays granular. Flux et al was a prima facie good idea that just made everything harder, when we already had existence proofs like H/J that a DAG could be maintained "in place", property by property. Twenty-four Redux training videos later... don't get me started! :rolling_on_the_floor_laughing:
Hoplon Phalanx #2 is on for Tuesday 2023-05-09 at 12:00pm Pacific Time ā¢ :spiral_calendar_pad: https://calendar.google.com/calendar/event?action=TEMPLATE&tmeid=MzBoMG1tMjdiazVwYWI2ZGRmZzgwMGhpcTAgY18wYmZhNDU0ZWIzYjQ0NjMxZjE3ZWRlMWY1NWEwOWVkOTkwYjRlNmI4MGQwYmY1YTU5MjM5MzJmODM4MWY3Yjc2QGc&tmsrc=c_0bfa454eb3b44631f17ede1f55a09ed990b4e6b80d0bf5a5923932f8381f7b76%40group.calendar.google.com ā¢ https://meet.google.com/xdq-tjiu-dat
Like the last one, feel free to post topics you'd like to lodge for discussion, or anything you'd like to present, and I'll make sure we get you on deck
One thing I'd be happy to do is walk through what's discussed https://clojurians.slack.com/archives/C08BDAPRA/p1682618921457579, or the grimy details of what happens in a situation where a formula calls itself indirectly. and collect ideas about what we could do better. What Ken proposed sounds easy (and way better than just locking up) Update: made an issue https://github.com/hoplon/javelin/issues/43
ā¬ļø thanks for pollinating us @hiskennyness
My pleasure! Not sure it matters, but in Cells I used a LIFO stack (just a CLJ list
onto which I cons the current cell), not a set. Having a list allowed me to show the dependency cycle in order. Hth!
yep, solid. though i think we'll use a clojure set to get random order for a little extra job security