roc-lang / book-of-examples

Software Design by Example in Roc
Other
23 stars 15 forks source link

topic proposal: discrete event simulator #21

Open gvwilson opened 2 months ago

gvwilson commented 2 months ago

Simulation was one of the reasons OOP was invented, and interacting objects with their own state and control flow is a natural way to represent things like the flow of messages through a complex tangle of microservices. Showing how to do such simulations in a pure functional language would put a spotlight on the differences between the two paradigms.

lukewilliamboswell commented 2 months ago

DES is fun. I've experimented a little using Elm.

This would be a great topic I think. It would be a good excuse to implement a priority queue data structure for the event list 😀

If I get the text editor done I would be happy to chip away at this of no one else picks it up.

HajagosNorbert commented 2 months ago

I'll happily take this on! (and no more chapters unless I'm done with this and ftp, I promise) Talked with @lukewilliamboswell about this on zulip and said he's ok with me doing this, but I don't want to talk on his behalf. Realized it would have been better to keep communication under the issue, so will do so in the future.

gvwilson commented 2 months ago

it's yours - thank you.

HajagosNorbert commented 2 months ago

I thank you.

lukewilliamboswell commented 2 months ago

I look forward to seeing this develop. I'm no expert, just think simulation is cool. 😃