the operation I want to do is condense consecutive 1 down to a single 1, but this will make the rows different lengths, so I can't work out how to do it with reduce or similar as they want fixed amount of inputs and outputs
@ngn that works so well it instantly shows me how it's the wrong thing for me to be doing. Now the 1 will also have moved so I can't use their positions as indexes into the text. Ooops
really seems like about 50% of APL's functions all do the same thing as each other
@ngn yes in that example I had booleans not characters. Now I realise I can't do this removal of consecutive things until after I convert everything to characters, because if I do it first, I lost the information which tells me which characters to take. So instead, I need to convert to characters first, then remove consecutive asterisks
@ngn oh no, I don't, good point
I generate booleans for all combinations of asterisk positions, by counting 1..(2^length-1), in binary, and then overlay the asterisks on many copies of the original text
@ngn No, but I am solving a golf / challenge; it's not that I need an answer, but that I want to work through something in APL and try to solve (as much as I can) myself
whenever I'm quickly reaching for a dfn/each like {⍺..⍵}¨... that feels like it's not idiomatic APL and I should avoid it if possible; is there anything to that feeling?
@TessellatingHeckler @dzaima @ngn Iverson deliberately made it so because base conversion is matrix multiplication by the base powers and matrix multiplication traditionally "transposes" its left argument:
@ngn On tryapl 1 ⋄ '' ⋄ 2 will give you an extra newline between 1 and 2. For the bot (and TIO, because that's what it uses) you need ⎕← in front of everything yo want to print. So ⎕←1 ⋄ ⎕←'' ⋄ ⎕←2 gives you an extra newline.
@TessellatingHeckler Create an new axis of length ⌈/⍴¨'Hip' 'Hop' (3) "before axis 1" where "axis 1" is length ⍴'Hip' 'Hop' (2), so the result will have shape 3 2.
@TessellatingHeckler That is by definition ⍸1 0 1 0 1
this was my test setup - ⎕ex-ed in my APL, and the output executed in Dyalog: https://tio.run/##hVLLattAFN3rKwZtxg/VlpSkDSFxMXjThWiQvQuhKHJaDG1iGlNohXalGCcTugnurtBsjAl00ZqAl/afzI@4594ZKaUEOouZc8899zUzaXL2IbnYbNqR/vI18J0uDpnl@vrmxUtAX@jLzyLLE@Dnoc9Lq98FffIYjdjhEI5d6YxSASC8ZkWC7b8VjUAKGdZD6QicWn1P5MOZ4AztWdgnONnkgBrTNRbVtng3DMlqVrSeMreeopZZZFiOhGSwss5k/S@dZUhVN6Jkn4zkgPf9xg71M54n3NalleirCbkbO/pqzJSQgZ7Cy0NasMWA9Kuf1gsUlsj6q47jXAzNvWVaLT04Pa0WeTOTWAQ9AvlqNkqhdXCx9GZCPorM0uq668T8wrzW91rN2hE91Wjw7nQ1E8hlgtxOzLVdj6u7AFxdq5vVLC7rdYsaPWwZcDI4Co/zsnQvMhOk2Hta3fHPSM/7p7CRj81XFOrryS3aIxdG0uoXqppvpJbcZ…
@Adám so it was actually something fixable? now i'm more intrigued
@dzaima We naively did the singleton extension and then log, instead of doing ln on the arguments and then the computation based on that. Furthermore, Java used to use the library C functions that we currently use, but they recently switched to assembler code supplied by Intel. We will have a look at using that too, or at least start special-casing log₂ and log₁₀ as the C library has dedicated functions for those.
woah those arc-trigs https://tio.run/##xZjNahRBEMfveYo570LZVd3VHxD1WWYTFEGiKAh6Eg8STCI5RNaD4MWTCLkseMkp@ybzIrHmq7uDMzlOhyVMd8jOj6r6/6u6j@qTd/Xbu7u6@XxJ66ekup/mYkfqYDOxd9BcnTdXH//7/JnfnPzTA/v951Le9On1m1fPq0oejt9XVfdw1C4@VMNqv320/1uNK/mPH1NfdTO/eTPz9psH2X61bM3Xb8cvK0B5rFApoPYhLnRLJ2gIEjq9OBytqY@J/FagRrRu0dK8OHlWKGzUXPysRzaPXdiedAtC8KpLalVpcGRCcThOcAq8jnABiReHqwUuZtWbrvIiHPMAZ0AF9EXg6qzkMJac9oChU4OWiPqAtgjcZoQzmEVO4MyYVpGqDcvDDYHr4SyBi3AYwHGsOXRMywtiFZOqGXxKqhOBJotj7ZZP6iq3OE4Wp8GaAc0Bea0LoOkRDRWEFLUAiAOaBvYeC6ClhDrQuUqNSgmlAkKoV1GjrWfkaBSydsrLR22VFGp0104HhTJ0omwVKsp1avmo0X6b@67JdcB2CJsX36UCEt…
my apl would have the advantage of all numbers being doubles already always, but it's not that big of an advantage