Live data from Hacker News

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

fsl.tools

11–20 of 74 posts

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

#14
While most of the site seems broken, at least the online editor is working. There's an example of a traffic light that gives some insight as to the design of the language: https://stonecypher.github.io/jssm-viz-demo/graph_explorer.h...

One thing I've learned personally writing live editors is that while recompile on every key seems neat, in practice it is very jarring to have things jump around every keystroke. The problem with this is that mid-typing you may express an invalid program, so your rendered output jumps wildly from something coherent to something completely wrong, only to resolve itself when you're done typing. This is why I think it's best practice to explicitly recompile on ctrl+enter, even if you have the ability to do it every keystroke.

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

#15
Anyone with experience using finite state machines in production apps want to share their experience? I love the concept, but not sure how to implement a POC so my teams can see the value. We have a few areas that have a ton of dense business logic, and I think something like xState could be beneficial.

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

#16
Any Regular Expression can be represented as a Finite State Machine. Knowing this, I usually look at things like this because I'm hoping that someday someone will come up with a new concise & readable way of writing both regular expressions and finite state machines.

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

#17
post #16

Any Regular Expression can be represented as a Finite State Machine. Knowing this, I usually look at things like this because I'm hoping that someday someone will come up with a new concise & readable way of writing both regular expressions and finite state machines.

I have always hope for that, RegEx syntax is not human and terrible.

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

#18
post #10
post #2

How does this compare to Ragel? http://www.colm.net/open-source/ragel/

From playing with it a bit, the differences I see... Ragel compiles its source into a separate file in the target language (C, Ruby, ASM, etc). FSL instead has a library that parses and runs the FSL source at run time. Ragel supports (or plans to support) C, C++, ASM, Objective C, D, Go, Ruby, and Java. FSL supports (or plans to support) Javascript, C and Erlang. The live editor does seem to be somewhat unique to FSL…

I think i still rely on ragel more. Its based on lots of research and the author knows the problem area very well.

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

#20
post #16

Any Regular Expression can be represented as a Finite State Machine. Knowing this, I usually look at things like this because I'm hoping that someday someone will come up with a new concise & readable way of writing both regular expressions and finite state machines.

Regular Expression in formal language theory sense can be represented as FSM's.

Many real world string pattern matching engines (regexes) implement features that can't be expressed using regular languages. Backreferences or any context sensitive extensions are not really regal expressions in that sense.

Post reply on HN