/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
Polystate: Composable Finite State Machines
(github.com)
115 points
goless
| 5 comments |
23 Jun 25 01:47 UTC
|
HN request time: 1.093s
|
source
1.
jasonthorsness
◴[
23 Jun 25 03:18 UTC
]
No.
44352187
[source]
▶
>>44351817 (OP)
#
The automatic diagrams are great. Almost worth using a library like this just for that, since then you know the diagram actually reflects the implementation.
replies(1):
>>44352228
#
ID:
GO
2.
goless
◴[
23 Jun 25 03:29 UTC
]
No.
44352228
[source]
▶
>>44352187 (TP)
#
Yes, all my examples have state diagrams, they are automatically generated and are an effective way for me to understand the structure of the program.
replies(1):
>>44360204
#
3.
irq-1
◴[
23 Jun 25 21:15 UTC
]
No.
44360204
[source]
▶
>>44352228
#
shouldn't the check pin example end with 'exit' rather than 'ready'?
.{ Atm.checkPin, Atm.session, Atm.ready } } }),
It was the diagram that made me think this.
replies(1):
>>44361667
#
4.
goless
◴[
24 Jun 25 00:31 UTC
]
No.
44361667
{3}
[source]
▶
>>44360204
#
Haha, this is just a demo, written casually, you can change this to exit, and then as you expected, the program will exit directly.
replies(1):
>>44361958
#
5.
goless
◴[
24 Jun 25 01:18 UTC
]
No.
44361958
{4}
[source]
▶
>>44361667
#
Try modifying it yourself, you will fall in love with this way of programming.
↑