practicalli

https://practicalli.github.io/ http://yt.vu/+practicalli (youtube)
practicalli-john 2020-11-07T09:52:24.136900Z

Code for Space Age challenge is at https://github.com/practicalli/exercism-clojure-guides/tree/master/space-age

2020-11-07T09:53:28.138Z

Thanks for the session today, greatly appreciated 👍😀

👍 1
2020-11-07T10:57:45.138400Z

👍 Thanks John, much appreciated.

2020-11-07T10:59:02.139200Z

FYI my solution (which I refactored to within an inch of its life) is here: https://exercism.io/my/solutions/c086e2903b3c46f9b4647b9775637e7f … I ended up making a higher order function that returns a lambda that, in turn, computes the age on different planets.

👍 1
practicalli-john 2020-11-08T16:16:21.143400Z

Its a great solution, really like this. Unless its under a restrictive copywright, it would be a good example for the Practicall Clojure book 🙂

2020-11-08T19:02:38.143800Z

You’re more than welcome to use it!

2020-11-07T11:03:45.142Z

Looking at other people’s solutions to this problem, some people took that idea even further… there are great solutions that e.g.: • use partial to avoid the need to return an fn • do clever meta-programming tricks (that i need to learn) to convert a keyword to a symbol so that you don’t need to repeat the name… check out this one https://exercism.io/tracks/clojure/exercises/space-age/solutions/07c4952a06aa4c87aab7d745fda87a78 … it is my hope that I will one day know Clojure well enough to stuff like this (and wise enough to know when to use this power and when not to)

👍 1
practicalli-john 2020-11-08T16:20:37.143600Z

I avoid clever meta-programming tricks unless its the only way (which it rarely is) 🙂 macros and meta-programming tricks I leave for others to have a maintenance hangover with...