Skip to main content

Timeline for Print a Block-Diagonal Matrix

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Dec 14, 2023 at 14:12 comment added Tbw Replying now after 8 years, but ∘.=⍨⊢⊢⍤/⍋ is shorter and tacit.
Feb 11, 2015 at 11:57 comment added FUZxxl That makes sense.
Feb 11, 2015 at 11:56 comment added marinus @FUZxxl: nope, it works from a function as well, and it does actually print the result and doesn't return it: i.imgur.com/Qh8NA3a.png
Feb 11, 2015 at 11:44 comment added FUZxxl Ah, I see. I was under the impression that this only happens when you are using the interpreter interactively.
Feb 11, 2015 at 11:41 comment added marinus @FUZxxl: no, the output of an expression is printed automatically if nothing else is done with it.
Feb 11, 2015 at 11:31 comment added FUZxxl If it has to print out the result, wouldn't you need a ⎕← anyway, even without the dfn?
Feb 11, 2015 at 11:10 comment added marinus @FUZxxl: it says "However, the result must be printed to STDOUT (or closest alternative), as opposed to returned from a function, say.", so {∘.=⍨⍵/⍋⍵} isn't valid. You'd need {⎕←∘.=⍨⍵/⍋⍵}, which not only costs two characters but still wouldn't work on TryAPL. (And in general, TryAPL is too limited to be useful.)
Feb 11, 2015 at 10:53 comment added FUZxxl To test this on http://tryapl.org, you might want to use the dfn {∘.=⍨⍵/⍋⍵}, as the site filters all uses of (except for ⎕IO and stuff like that).
Feb 10, 2015 at 20:34 history edited Martin Ender CC BY-SA 3.0
fix header for leaderboard :)
Feb 10, 2015 at 20:29 history answered marinus CC BY-SA 3.0