Fork me on GitHub
#juxt
<
2019-12-06
>
p-himik07:12:05

A question about Clip. I'm watching https://www.youtube.com/watch?v=-RaFcpNiYCo where Stuart Sierra talks a bit about his Component library. There, he mentions that since all of the components are records, he can easily change any system definition to use it in different scenarios by just using data manipulation functions like merge. Integrant seem to have the same advantage as all of the arguments are just described as maps. But in Clip, the arguments are passed right away. Of course, it's still a list that can be manipulated, but you can no longer do something like (update-in system [:component-a :param-b] inc) . Do you have any thoughts on this?

dominicm07:12:51

That's what aero and #profile is for. That works perfectly for this case.

p-himik07:12:32

Yes, that works for the cases when you know beforehand what must be changed. Of course I may be wrong but after watching the video, I had the impression that Stuart was talking also about being able to just experiment with it. I'm not sure how useful such ability to experiment is, so I thought that maybe Clip doesn't include it for a reason.

dominicm07:12:30

I'd just replace the whole start key. The definitions should be simple enough to do that.

dominicm07:12:37

The other thing is, I'd probably experiment by just running the code, rather than doing a system. I'd copy the code and run it in my repl directly. Obviously you take over the graph then, so it's not always suitable if you have a massive graph. Depends :)

p-himik07:12:22

I see. Yeah, replacing a definition sounds reasonable. Thanks!

dominicm08:12:03

It's an interesting idea though. I will have a think about it. You could do something like graphql where you separate arguments from the call by using parameters. But I'm not sure how much it would be useful.