Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And just like that, you find yourself implementing a compiler (specs to plan) and a virtual machine (plan to actions)!


> And just like that, you find yourself implementing a compiler (specs to plan) and a virtual machine (plan to actions)!

Not just any compiler, but a non-typesafe, ad-hoc, informally specified grammar with a bunch of unspecified or under-specified behaviour.

Not sure if we can call this a win :-)


Greenspun's tenth rule in action!


It can be type safe and testable with free monads

This is why I think things like devops benefit from the traditional computer science education. Once you see the pattern, whatever project you were assigned looks like something you've done before. And your users will appreciate the care and attention.


I think you're already doing that? The only thing that's added is serializing the plan to a file and then deserializing it to make the changes.


Yeah any time you're translating "user args" and "system state" to actions + execution and supporting a "dry run" preview it seems like you only really have two options: the "ad-hoc quick and dirty informal implementation", or the "let's actually separate the planning and assumption checking and state checking from the execution" design.


I was thinking that he's describing implementing an initial algebra for a functor (≈AST) and an F-Algebra for evaluation. But I guess those are different words for the same things.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: