wusticality 2018-02-26T00:22:52.000043Z

writing code in the lisp way is a hell of a lot more sane than doing it imperatively


Anyone here using play-cljs? I'm liking it so far but having an issue where the canvas element doesn't show anything when using :optimizations :advanced. It's added to the dom but my game isn't showing.

spiralganglion 2018-02-26T17:16:55.000661Z

@iwannaseethelight — I'm building a number of large simulations in CLJS over the next year (for work). It's certainly do-able. I think you just need to be strategic about how you structure your system, so that you don't accidentally slow down the fast parts, so to speak. And CLJ(S) gives you some helpful tools — for instance, volatile! and set! — that allow you to gradually opt for more performance as needed, before you drop all the way down to the host language. You might find parts of this article helpful: There was an amazing episode of the HaskellCast where they interview Conal Elliott about his original design of FRP, which was created for making animations in a function language that'd run at a crazy high frame rate (and this was back in the mid 90s). I'm not a Haskeller, but I still found this episode superbly helpful for figuring out how to design similar systems in CLJS.