←back to thread

115 points goless | 3 comments | | HN request time: 0.002s | source
Show context
jasonthorsness ◴[] No.44352187[source]
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 #
goless ◴[] No.44352228[source]
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 #
1. irq-1 ◴[] No.44360204[source]
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 #
2. goless ◴[] No.44361667[source]
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 #
3. goless ◴[] No.44361958[source]
Try modifying it yourself, you will fall in love with this way of programming.