Live data from Hacker News

FSL: A programming language to make complex finite state machines easy to create

fsl.tools

41–50 of 74 posts

Re: FSL: A programming language to make complex finite state machines easy to create

#41
post #26

I feel like we don’t need a novel language for this. There’s already a pretty-well-known language that’s almost a DSL for “making complex finite-state machines easy to create”: Erlang. I know that sounds wacky, so let me pitch you on that idea :) In ‘primitive’ Erlang (i.e. Erlang without OTP), each FSM state is just a function, that can contain its own event loop (`receive` statement) to accept input, and then can t…

I do not know anything about erlang, but I’m intrigued about your proposal.

Could you make a github repo with an example project implementing your solution?

Re: FSL: A programming language to make complex finite state machines easy to create

#43
Since I'm here, any tool recommendations for visualizing state machines, and state charts in particular? XState's [1] is ok but only works on the web and offers to export, and I found its layout algorithm a bit sub-par. Writing graphviz code by hand, or using google draw/draw.io/... gets painful very quickly.

[1]: https://xstate.js.org/viz/

Re: FSL: A programming language to make complex finite state machines easy to create

#45

Earlier quoted context omitted.

This is an, albeit somewhat comical, bug. I've got the same thing. A lot of other things in the site are broken too, most of the links at the top default to the /# link. My guess is something is broken in their back-end, or this got found and posted before the creators were ready for it to get publicity. The sample code also links out to /#todo, so I think my "not quite ready" idea may be what's up. Shame, this looks…

It's not a bug, and there exists no backend I just haven't written the site yet

Lorem ipsum for next time you don't write a site :)

Re: FSL: A programming language to make complex finite state machines easy to create

#46
Very cool. I looked through jssm but get the sense that fsl or jssm might be adapted so that it can be used to declaratively generate an FSM for any language?

I wish my colleagues knew what an FSM was and how to create one. Getting tired of seeing 400 nested IF statements sprinkled across 10 classes.

Something that makes it easy to create an FSM declaratively for any language might help raise awareness and spur adoption.

Re: FSL: A programming language to make complex finite state machines easy to create

#47
I've been dreaming of (ab)using C's "goto" statement to make easy to read finite state machines.

An actual, proper language, for making FSMs probably makes more sense. Lol. But still, the conceptual similarity between a thread-of-execution and FSMs must remain in the back of most programmer's minds. All turing machines are FSMs, and your code determines the state. (When executing "foo" function, you're in the "foo" state. And the "foo" function easily tells you either to return to the previous state, or which states to move forward in).

Re: FSL: A programming language to make complex finite state machines easy to create

#48
post #26

I feel like we don’t need a novel language for this. There’s already a pretty-well-known language that’s almost a DSL for “making complex finite-state machines easy to create”: Erlang. I know that sounds wacky, so let me pitch you on that idea :) In ‘primitive’ Erlang (i.e. Erlang without OTP), each FSM state is just a function, that can contain its own event loop (`receive` statement) to accept input, and then can t…

I do not know anything about erlang, but I’m intrigued about your proposal. Could you make a github repo with an example project implementing your solution?

I was very much in favour of (abstract) state machines, especially the Rebel DSL that was developed in Rascal.

A very nice thing about Rebel is that it can do (bounded) model checking using SMT solvers.

Currently, I believe (Pure) Objects (with restrictions!) are a better approach because it doesn't require a paradigm switch. We already know them and they are also little state machines, right?

If done right, we can also do explicit model checking etc, version control.

Actors/Erlang/Akka is also a good choice, although they add some complexity compared to objects: it's hard to do synchronous calls with Actors for instance.

Re: FSL: A programming language to make complex finite state machines easy to create

#49
post #26

I feel like we don’t need a novel language for this. There’s already a pretty-well-known language that’s almost a DSL for “making complex finite-state machines easy to create”: Erlang. I know that sounds wacky, so let me pitch you on that idea :) In ‘primitive’ Erlang (i.e. Erlang without OTP), each FSM state is just a function, that can contain its own event loop (`receive` statement) to accept input, and then can t…

I agree with you. Especially breaking out of the abstraction when needed. I believe Akka also has a FSM abstraction on top of Actors.

Re: FSL: A programming language to make complex finite state machines easy to create

#50
post #33

Earlier quoted context omitted.

Hi, I'm the author. I just haven't made the site because the repo is complete I'll go change the site. It had never been released, announced, or indicated. This is being shared because there's a complete programming language in active use by many people

Where is the repo? Its not available at all from the website

[deleted]
Post reply on HN