News for hackers. Stuff that matters.
Re:Category Theory for Programmers (2014) [pdf] by michael-ax on Thursday December 26, 2019 @09:26AM (#21883977)
aaah! thanks for explaining that its about fun things to do with isomorphic conversions and transforms -- which makes it such a fundamental thing that i can likely continue to invent the bits i need of it as i go.
Re:Category Theory for Programmers (2014) [pdf] by crimsonalucard on Thursday December 26, 2019 @08:39PM (#21888406)
It's not just fun, there's a practicality to the method as well which I believe, judging from the responses, that my example failed to convey.

In another comment, I came up with another example that uses the same pattern that uses a more "practical" example. I'll paste it below:

the goal is to convert:

   {"1":"2", "3":"4", "5":"6"} to {6:1, 2:3, 4:5}
Or essentially the ordered dict, rotated. Which space is a rotation more intuitive? A list space. [1,2,3,4,5,6] is more readily rotated into [6,1,2,3,4,5] with one operation and converted back into a dict.

If you tried to do the above directly by manipulating the dictionary it would not be as straightforward. Use a functor to lift the dict into a list, do the rotation and use the opposite functor to lift it back down to a dict.

Re:Category Theory for Programmers (2014) [pdf] by crimsonalucard on Friday December 27, 2019 @02:03AM (#21889706)
Also totally don't appreciate the sarcasm. I hate people who have this type of attitude. What's your intention? Just to piss me off? I'd flag your post, but this thread is pretty much dead already.