4 ms·
This is so cool! Just finished my implementation and it runs the fib example flawlessly†! https://github.com/tkahn6/dcpu16-haskell/ https://github.com/tkahn6/d
by tkahn6 15y ago
This is so cool! Just finished my implementation and it runs the fib example flawlessly†!
https://github.com/tkahn6/dcpu16-haskell/ https://github.com/tkahn6/dcpu16-haskell/
† Because mine is a pure state machine and Haskell is lazy, I had to introduce a HLT instruction instead of using `:crash SET PC, crash`. Nothing ever gets printed using the latter convention.
- carterschonwald 15y agoYou can use a monad to thread the computation for strictness while retaining purity.