3 ms·
Whatever I'm doing this is wrong. Simple example - I have Python sequence [0...N) to process. If members are independent, I could split it with easy in Python a
by Iwan-Zotow 7y ago
Whatever I'm doing this is wrong. Simple example - I have Python sequence [0...N) to process. If members are independent, I could split it with easy in Python and do it in parallel: [0...N) -> [0...M) + [M...N) for any M between 0 and N. Basically, Python sequences/ranges/etc are monoids in many cases. Simplest composition rule - monoid, with unit element and associative composition. In Julia it really looks ugly, you have to make some effort to do it right.
For me, Julia people don't get range/sequence composition right, so ...
- JustFinishedBSG 7y agoYou're inventing problems that don't exist. Every thing you said is applicable exactly with 1, 2 or whatever based indexing. It literally doesn't matter. Julia's sequences/arrays are monoids too, I don't see what it has to do with anything.
- Iwan-Zotow 7y ago> Every thing you said is applicable exactly with 1, 2 or whatever based indexing. read my statement again, it is about open vs closed interval. Python ranges/sequences are composable, Julia ones are not. > Julia's sequences/arrays are monoids too really? suppose you compute sum, and got two results: S(1, M) and S(M, N) Could you compose them in Julia?
- newen 7y agoYou compute S(1, M-1) and S(M, N) instead and compose them. That's it. This is not complicated stuff.