announcements

Project/library announcements ONLY - use threaded replies for discussions. Do not cross post here from other channels. Consider #events or #news-and-articles for other announcements.
mihaelkonjevic 2020-10-15T11:34:01.198900Z

I’ve just released a functional statecharts library for Clojure and ClojureScript. Documentation is missing at the moment, but there are over 100 tests you can consult to check the functionality. Semantics are based on the SCXML standard https://github.com/retro/state-machete

👍 15
🆒 4
Lucy Wang 2020-10-15T11:56:59.199300Z

What's your major use case for inventing this lib? I've also created a clj/cljs statecharts library for better state management in re-frame apps and some custom script https://github.com/lucywang000/clj-statecharts

mihaelkonjevic 2020-10-15T12:02:52.199700Z

@wxitb2017 I didn’t know about your lib, I’ll definitely check your implementation! As for the usecase, I’ve started working on it last year as part of the research for https://github.com/keechma/keechma-next (In the end I’ve went with a different approach for keechma/next), but I’ve never finished it. I’m starting some work on a backend system that needs to have a pretty flexible business logic, so I’m planning to use statecharts + https://github.com/agentbellnorm/dativity (or an approach similar to it) to implement it.

mihaelkonjevic 2020-10-15T12:05:04.200100Z

I wanted to implement statecharts as a pure function without internal state to ensure I can use it in any context I need (and provide my own persistence on top of it). This was inspired by the https://github.com/cark/cark.behavior-tree library

Lucy Wang 2020-10-15T12:05:10.200400Z

Cool. You could also take a look the most popular js statecharts lib xstate (if not yet) https://github.com/davidkpiano/xstate , my lib borrowed most of the design from it.

mihaelkonjevic 2020-10-15T12:07:09.200700Z

Yeah, I’ve used XState previously and it’s a great library, but in the end I went with an implementation that’s closer to the SCXML standard because SCION project has a great test suite (https://gitlab.com/scion-scxml/test-framework) which I was able to port, and it ensured that the algorithm is correct for more complex transitions

Lucy Wang 2020-10-15T12:28:34.201Z

Great to know these projects like dativity, lots of food for thought! > implementation that’s closer to the SCXML standard because SCION project has a great test suite XState doesn't use scxml-like syntax but this doesn't prevent it to https://github.com/davidkpiano/xstate/blob/3dcf91861964f0e3c581b08fcb3357f658b75bea/packages/core/test/scxml.test.ts. My lib doesn't put conforming to SCXML as a top priority, but focus mostly on what I need in real world projects. For example I need delayed transitions, eventless transitions (transient states), first-class re-frame integration, so I implemented these features. OTOH so far I don't see any need for history states, so I just leave it out.

👍 1
Lucy Wang 2020-10-15T12:34:32.201600Z

Just created the #statecharts channel so people interested could talk there

p-himik 2020-10-15T12:38:35.201800Z

The re-frame integration looks really interesting, especially the epoch support. Thanks!

🙂 1
schmee 2020-10-15T14:09:10.202400Z

really interesting links in here, thanks for the inspo! :thumbsup:

➕ 1
alexmiller 2020-10-15T21:32:58.204900Z

Clojure tools 1.10.1.716 is now available: • Make edn reading tolerant of unknown tagged literals • Update to latest dependencies for maven-resolver and aws-api

👀 2
🔥 1
🦜 1
🙂 4
🎉 25