hoplon

kennytilton 2023-04-27T01:11:17.688169Z

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

👀 1
kennytilton 2023-04-27T01:48:27.772839Z

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.

2023-04-27T17:29:37.224789Z

Common Lisping the past few years had the effect on me the past few years

2023-04-27T17:30:05.149429Z

when i crack open Cello and see beauties like define-symbol-macro ... 💓

kennytilton 2023-04-27T17:35:33.434729Z

Symbol macros! It's a huge language, but after ten years I had used it all. Except iterate. 🙂

2023-04-27T17:36:14.786559Z

haha

2023-04-27T17:36:52.991669Z

on the last Clojure survey i requested *macroexpand-hook*, i try to request at least one CL feature a year

2023-04-27T17:38:58.775799Z

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

2023-04-27T17:40:02.678499Z

the era of True Cells (tm) in the browser is nigh 📖 🌪️

kennytilton 2023-04-27T17:49:47.662049Z

World domination cannot be far behind. Fascinating to see this project. Thx for the heads up! 🙏

👍 1
kennytilton 2023-04-27T11:11:09.557579Z

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.

2023-04-27T18:08:41.457579Z

in javelin we're pretty good about signalling you've modified a dependency; your browser locks up immediately 😂

2023-04-27T18:10:00.209089Z

an improvement here could be, we probably know enough to tell you the loop before locking

kennytilton 2023-04-27T18:24:20.829919Z

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

2023-04-27T18:24:35.607359Z

hell yeah

2023-04-27T18:25:07.931459Z

unfortunately capturing compile-time stuff and doing cool things with it at runtime in cljs has always been fraught because of the gclosure shenanigans

2023-04-27T18:26:31.686049Z

and, you know, no EVAL-WHEN 🧔

2023-04-27T18:28:42.011929Z

in Cells do you walk the chain to find the loop a priori? or do you detect the loop on the 2nd iteration

kennytilton 2023-04-27T18:37:57.969799Z

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!

2023-04-27T18:41:25.239189Z

very nice, makes sense, thanks for explanation

2023-04-27T18:46:44.266839Z

that seems like the optimal solution in javelin too

kennytilton 2023-04-27T19:05:48.585109Z

Ain't *specials* grand? (I seem to be repeating myself.)

2023-04-27T19:06:14.243369Z

chef_kiss the best

2023-04-27T19:06:52.087909Z

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

2023-04-27T19:07:26.276819Z

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

kennytilton 2023-04-27T19:15:16.321699Z

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

1
2023-04-27T19:17:37.167959Z

don't worry, complete Hoplon training video series forthcoming

🍿 2
2023-04-27T18:54:51.653729Z

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

2023-04-27T18:57:01.192649Z

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

2023-04-27T19:03:22.866689Z

⬆️ thanks for pollinating us @hiskennyness simple_smile

kennytilton 2023-05-08T13:24:58.898839Z

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!

2023-05-08T16:30:32.313789Z

yep, solid. though i think we'll use a clojure set to get random order for a little extra job security

🧠 1