hoplon

2023-05-15T01:40:05.941259Z

This is interesting: https://xstate.js.org/docs/

2023-05-16T09:35:29.001329Z

As I articulate my thoughts I think the critical distinction is concurrency vs sequentiality. The more concurrent and intricate (i.e multi-playered) the model the more ER will be useful, the more sequential and structured the process, the more statecharts will be useful.

2023-05-16T09:37:03.195099Z

I modeled a couple of processes in xstate and it was absolute delight from the get go and in the long term in the face of changes. On the other hand I used it for less sequential\structured processes and it felt a little useless, just a bunch of concurrent state nodes with a lot of transitions to themselves.

dave 2023-05-15T02:24:07.510869Z

We use XState in the newer parts of the Kevel UI. I think it's awesome!

2023-05-20T18:25:31.213569Z

Thank you for your kindness. Hmm 🤔 I never organized my thoughts into a talk before. I might have enough "juice", I'm not entirely sure, but with enough time ahead to prepare I'd love to give it a shot.

2023-05-20T18:35:50.133889Z

Excellent! Doesn't need to be especially formal of course, though composing your thoughts ahead of time is ideal 😆 Just let me know when works for you and we can set it up. Weekdays at 12p PT are when we usually meet but other times could work too

👍 1
2023-05-20T18:44:45.486949Z

P.S I just thought about: xstate also offers a higher abstraction over statecharts, and that abstraction happens to be the actor model - almost a synonym to concurrency and open world interaction (telecommunication).

2023-05-19T17:33:55.076929Z

thanks Lidor, very intriguing

2023-05-19T17:34:44.837729Z

would you be interested in presenting or leading a discussion in a future Hoplon Phalanx? would love hear you expound

2023-05-15T10:59:27.253619Z

I used it from svelte, it was great. There is #statecharts and some clojure(script) libraries that implement statecharts including serialization to a common data format that is xml IIRC.

2023-05-15T18:17:59.926149Z

From my experience (and mental model) abstractions like reactive cells are useful for state that is a good fit for entities and relations. I.e you represent your state as actions on those entities and relations and most of your BL is just computed state over those ER. Statecharts (like xstate) are a good fit for stateful processes that should be modeled as a flowcharts.

2023-05-15T18:28:08.840749Z

Hm, can you elaborate on your idea of the difference between a process and entities/relations? My own understanding is something like, you care more about invalid states of processes, and are willing to put in extra work ahead of time to get better errors when you hit an unexpected state

dave 2023-05-15T18:41:07.285769Z

I think the value of statecharts is actually that they help you avoid there being unexpected states to begin with! The act of writing (and visualizing) the statechart helps you discover states that you didn't realize existed. So you add them to your statechart or prevent them from happening.

2023-05-15T18:43:49.464249Z

That is my experience also. And that there are madness trying to type the statechart itself using typescript. But after writing the statechart I found lots of untreated states/actions on the example I was converting to statecharts.

2023-05-15T18:46:52.590069Z

Sure, imagine the following: Algorithm vs open world game engine. Algorithm you can and should probably express as a flow of steps (first 1 then 2 or 3 depends on the result of 1 then 4 or 5 etc.). You have a very limited and clear set of valid states and transitions that you want to stick to. However, trying to express an open world as a sequence of steps is a bit problematic, so you don't express all the possible sequences but just the players, objects and their relation, you invalidate some states by expressing constraints on properties and relations and then let the engine "run". The actual statechart that represents such world is massive and you can think of all the entities and relations as representing Cartesian product of all possible states. On the other hand representing a single process with a relatively small flow as an ER while possible will be very ugly (you'll basically represent steps as entities, transitions as relations and will hold some kind of property to tell in which step you're on and so on...)

2023-05-16T02:13:26.697759Z

The open world part sounds like the critical distinction, is that accurate?

2023-05-15T11:06:22.362089Z

My son is learning how to type, and we built a typing game using hoplon yesterday. I only tested in chrome and the visuals/audio were chosen/recorded by him. It is inspired by space shooting typing games but with a more slimy theme currently 🤣 https://mynomoto.github.io/buuummm/

2023-05-19T00:55:37.970409Z

it rocks! need to make something like this too, for my daughter

2023-05-19T00:55:46.668499Z

how does your son like it?

2023-05-19T13:43:28.274349Z

He is enjoying it a lot, everyday he plays a little and has a growing wish list of new features. Looks like he was born to be a product manager 😆 So when I have the time there will be scores, levels with different creatures and other fun stuff. I also have to optimize the giant background, I only noticed that is has several megas after deploying it 😅 Also this is my first new Hoplon project in a while, it is amazing how fast is to build with it.