Looking at this Twitter thread, we see a task which is exactly the kind of thing which greenery is intended to accomplish: building finite state machines and then converting them to regular expressions. I decided to apply greenery to this problem, and as an intermediate phase of this work, I ended up with the following finite state machine:
This FSM is simple enough that it's possible to convert it to a regular expression by hand. The result is:
(DLURULLDRD|ULDRDLLUR)L
However, running greenery.lego.from_fsm against this FSM seems to take minutes, at least, on my machine - long enough that it hasn't finished in the time it's taking me to raise this issue.
This indicates some kind of performance problem in greenery, or possibly some kind of accidental infinite loop.
Looking at this Twitter thread, we see a task which is exactly the kind of thing which
greenery
is intended to accomplish: building finite state machines and then converting them to regular expressions. I decided to applygreenery
to this problem, and as an intermediate phase of this work, I ended up with the following finite state machine:which can be built using the Python expression:
This FSM is simple enough that it's possible to convert it to a regular expression by hand. The result is:
However, running
greenery.lego.from_fsm
against this FSM seems to take minutes, at least, on my machine - long enough that it hasn't finished in the time it's taking me to raise this issue.This indicates some kind of performance problem in
greenery
, or possibly some kind of accidental infinite loop.