« first day (1294 days earlier)      last day (1361 days later) » 
03:00 - 14:0014:00 - 00:00

3:47 AM
0
Q: How to access the standard output stream (stdout) from Dyalog APL

PavelThere are some possibilities to utilize standard output (stdout) by Dyalog APL language?

 
3:57 AM
@Adám <moon-child> ⋄ ⎕←'this message printed to stdout'
Illegal code
<moon-child> ...oh. Well, point stands; ⎕←whatever writes whatever to stdout
 
4:26 AM
@Adám lots of copy-pasting code around and the clash with ctrl+a/ctrl+c/ctrl+v has driven me to install your alternative APL keyboard, and it's much more forgiving of ordinary shortcut combos!
 
@TessellatingHeckler Of course. AltGr is actually intended for alternate graphemes. I just wish I could get "the people in charge" to try it. They stubbornly refuse, while pretty much every not-in-charge person that tries it, loves it.
 
@Adám Oh, that's a sensible use for it. (I wonder how many also realise they never knew what the "Gr" meant).
 
@TessellatingHeckler The Gr actually was for Graphic in the very oldest of days, i.e. for typing line drawing characters. True to that spirit, AltGr+Shift+S, followed by a number (or .) will draw lines. This is 1,5,6: └─┤
 
4:42 AM
@Adám so not totally free from clashes, I use AltGr+Shift+S to write Ŝ using AutoHotkey
 
@TessellatingHeckler Is that not AltGr+Shift+W,S on my keyboard?
 
@Adám with that disabled, I can get └┼┤ from 1 5 6
@Adám why yes, for capital s it is Ŝ but lower case ^s
 
@TessellatingHeckler Seems like an oversight to me. I'll fix that. While at it, I'll also add ¿ and ¡.
 
@Adám Does ¿ have a use outside Spanish?
Rudimentary array formatting, but a huge mismatch between how APL handles arrays and how PowerShell loves to unroll them.
 
@TessellatingHeckler No, except in languages related to Spanish. However, Spanish is a pretty common language.
 
4:57 AM
@Adám True; I didn't mean to be dismissive about Spanish, but was wondering more about Math or Hebrew or Danish or something less widely known.
 
@TessellatingHeckler It is sometimes used for irony or sarcasm.
 
Important uses
 
5:27 AM
@TessellatingHeckler (just to format integer vectors and 2D matrices like that takes 125 lines of XML containing 5857 characters, over half of them indentation spaces)
 
5:43 AM
@TessellatingHeckler So it keeps understands the shape in reverse? What about 3D arrays?
 
@Adám wait, are they reversed? I don't really understand the shape enough to notice, but they look like what I get from 4 3⍴ ⍳ 12 in Dyalog
 
@TessellatingHeckler Oh, no, I misread. So what did you mean by a huge mismatch between how APL handles arrays and how PowerShell loves to unroll them?
 
@Adám 3D arrays come out as System.Int[,,], 4D as System.Int16[,,,] etc. up to 15D. I haven't added any code to print them because it would be a big copy-paste job, and I want to settle on some understanding of boxing and nesting and maybe not printing too big for the screen - and probably offloading the code from PowerShell to a C# helper for speed
also I need to pad out to the width of the widest number in the array, and powershell can't find that easily, but C# + Linq could
 
@TessellatingHeckler Ah, I think I understand now. All this fancy array handling on the PS side is all your magic. PS doesn't actually understand.
 
@Adám well, APL has an array as a single thing, and then does implicit maps over it. PowerShell does not do implicit maps, but it still wants to be able to send multiple things down the pipeline (e.g. a directory listing into a "move-file" command), so it tends to gather results up into an array, then unroll the array and send the results down the pipeline one at a time
so if I want to write PS C:\> dir | ⍎ 5 ↑ | measure-object and have it count 5 things coming out, then my APL side needs to emit 5 things separately, not a vector of 5 things.
if I want to write ⍎ ⍳5 and have measure-object count 5 things, they need to be emitted separately
if I want to write ⍎ ⍳5 and have a single Int16[] array, it needs to be emitted as a sinlge thing, but then when PowerShell tries to format it for display, it sees a collection and does a second round of unrolling to show the items in the collection, and the structure is lost
APL is built for handling arrays without destructuring, PowerShell is built for handling them by destructuring.
so to get that formatting working I need to ⊂ once so when powershell unrolls it into the formatters there's a nested array there, and ⊂ again so that the formatters unroll it into an int16[,] and type-match on that and run my code
@TessellatingHeckler (and that array shaping is Dyalog bridge magic)
 
6:09 AM
@TessellatingHeckler OK, new version with ŝ has been released.
 
@Adám that was quick! (is there a key combination for ŭ with a downward accent?)
 
@TessellatingHeckler No, I've not added any support for ˘ or ˇ. I'm out of dead keys.
I also want to add the superscript a and o for Spanish ordinals, but again, I don't know where to place them.
I guess I could stop having dedicated keys for Danish letters, thus freeing H for Haček and B for Breve.
 
@Adám keyboard shortcuts used to be a poweruser secret, now every program has tons of them, every key is so overloaded I'm surprised there aren't more mechanical keyboard people pushing for twice as big keyboards - at least going back to F1-F24 if not a lot more
@Adám do you have any idea if it's possible to have the .Net Bridge open a persistent session to Dyalog?
so variables could persist between invocations
 
@TessellatingHeckler F13–24 is simply Shift+F1–12. The series continues with F25=Ctrl+F1, F37=Ctrl+Shift+F1, etc. until F96=Ctrl+Alt+Shift+F12. Do we really need more‽
 
@Adám I didn't know that. More F-keys, surely not; more configurable physical keys to avoid having to remember all the combinations, why not
 
6:30 AM
@TessellatingHeckler a dedicated APL hardware key would be nice. (Microsoft managed to get ⊞ and ▤ added as a dedicated keys)… Yeah, a set of dead keys for all the accents would be nice.
@TessellatingHeckler Any reason you post screenshots instead of pasting plain text?
 
because the pipeline handling isn't so great, I added a way to get the data out avoiding it, so maybe I can understand it better
 
@TessellatingHeckler Not sure. Maybe some of this or related things. I can ask John.
 
@Adám only I think it looks nice and stands out; in here code-formatted text I assume is an APL (or J) session rather than a powershell one
 
@TessellatingHeckler Yeah, it'd be nice to mark blocks with language ```apl and ```ps
 
```powershell
PS c:\> test-thing
```
hm, that works in Discord to add syntax highlighting
 
6:36 AM
in TopAnswers too.
 
@Adám actually this makes me realise (sadly) that it would be much easier to make the cmdlet in C#, with a wrapper, and have that hold an APL class instance open which just has a simple evaluate method
 
@TessellatingHeckler On the other hand, the PS prompt gives it away, while APL begins with 6 spaces, J with 3, and K with 1.
 
@Adám If you'd prefer not-screenshots, I can do that
@TessellatingHeckler I wonder if it could then handle multi-line input by writing it to a file, and sending a ]load instruction through
 
6:59 AM
@TessellatingHeckler Personally, I don't care, but if someone wants to play around with what you wrote, it is much easier to copy plain-text. Also, some have slow connections or imgur blocked.
 
@TessellatingHeckler I should just do that; it's not like there's much code - 120 lines of code and 100 lines of comment. Just so attached to implementing the cmdlet in APL.
 
RGS
@Adám congratulations :)
 
@RGS ?
 
RGS
@Adám isn't it a special day in RL for you?
 
@RGS Oh, as part of my Jewish life, it goes by the Hebrew calendar, so while it was Aug 11 when it happened, it is Aug 21 this year.
@marcellothearcane Welcome. Interested in APL?
 
7:11 AM
Hello! Just looking around :)
 
RGS
@Adám hm, that is weird! So the congratulations are only due in 10 days? Is that it? And next year it'll be on the 22nd?
 
@Adám True, but I haven't got anyone on the PowerShell Discord to want to play around with it either :( :P
 
RGS
@marcellothearcane look no further; I dare you to type your first lines of APL; you'll get hooked
 
@RGS Next year, it'll be Aug 9.
@TessellatingHeckler I think I might use it, if I get to know PS a bit more. The combo of cmdline + APL sounds powerful.
@marcellothearcane It is extremely likely that you've already written some APL, without knowing it.
 
7:34 AM
@RGS 'hello world'
I did it!
 
@marcellothearcane Well done. Now, how might you reverse that string?
 
@Adám With difficulty
⌽'Hello world'
 
@marcellothearcane See, that wasn't so hard, was it? I think is one of the most mnemonic symbols in APL. Can you, given that string and 'l', generate a Boolean mask (a list of 0s and 1s) that indicates where 'Hello world' has *"l"*s?, i.e. 0 0 1 1 0 0 0 0 0 1 0?
 
7:50 AM
@Adám Looks like the C# wrapper approach will lead to a persistent session
 
@TessellatingHeckler So you don't need me to ask John? (He really should hang out here anyway, imo.)
 
@Adám Correct, I don't need John's help (with this bit!)
 
Cool. I'm looking forward to seeing where this leads. I, for one, am excited about APL integrations. I'm working on a an online execution engine, so you can send APL expression requests and get a result back. It'll include the possibility of sending a state too.
 
@Adám 'l'⍷'hello world'
Sorry to interrupt
 
@marcellothearcane Sure, that'll work. You can also use the simpler 'l'='hello world' since APL uses = with the obvious meaning (assignment is ). Now can you use that to count how many ls there are?
@marcellothearcane Interrupt what? Your exploration of APL is the most on-topic content possible for this room.
 
8:05 AM
@Adám Oh right! So = is comparison rather than assignment?
 
Indeed.
 
Why would you use the epsilon underbar?
 
It finds occurrences of entire arrays:
⋄ 'issi'⍷'Mississippi'
@Moonchild Was ^ not supposed to work?
      'issi'⍷'Mississippi'
0 1 0 0 1 0 0 0 0 0 0
@marcellothearcane See ^
 
I get easily mixed up with = ∊ and ⍷ and which way round the arguments go
 
is membership:
      'hello world'∊'aeiou'
0 1 0 0 1 0 0 1 0 0 0
@TessellatingHeckler I find that confusion strange. = should be pretty obvious as being the "equal" comparison (which is commutative). should be well known as meaning member-of, i.e. the argument being tested is on the left, and the look-up array is on the right. is the only "new" symbol, so it has to be the special array look-up, with the same order of arguments as .
 
8:11 AM
because

'L'='HELLO'
0 0 1 1 0
'L'∊'HELLO'
1
'HELLO'∊'L'
0 0 1 1 0
'L'⍷'HELLO'
0 0 1 1 0
three different ways of getting the same result, one with the arguments switched
 
RGS
      'EL' ∊ 'HELLO'
1 1
      'HELLO' ∊ 'EL'
0 1 1 1 0
      'EL' ⍷ 'HELLO'
0 1 0 0 0
      'EL' = 'HELLO'
LENGTH ERROR: Mismatched left and right argument shapes
      'EL'='HELLO'
      ∧
But that is because you had a scalar as one of the arguments; cf. the example above
 
then
'EL'∊⍨'HELLO'
0 1 1 1 0
'EL'⍷'HELLO'
0 1 0 0 0
both of these do *something* with a vector on both sides, but from the 0 1 0 1 pattern there's no hint what except by manually confirming they're an unwanted bit pattern
it means I end up trying both ∊ and ⍷ both ways round - especially when it comes to trying to avoid () and using trains where the data can't be written the other way, commute needs to be used
 
RGS
I do not understand what you mean by "but from the 0 1 0 1 pattern there's no hint [...]"
 
@Adám Finally!
+/ 'l' = 'hello world'
 
@RGS indeed it is. It's not "the most confusing thing ever", but
I mean look at the example from the tooltip
'ana'∊⍨'banana'
0 1 1 1 1 1
'ana'⍷'banana'
0 1 0 1 0 0
one of these finds "ana" in "banana"
the other one indicates the positions of the letters "ana" in "banana"
 
8:20 AM
@TessellatingHeckler You don't need to any more, now that we have the constant operator. (Assuming you've upgraded, of course.)
 
but isn't right
 
@marcellothearcane Amazing. Having fun?
 
the outputs are both 6 bools with some on and some off
 
@Adám It seems so obtuse!
 
What part?
 
8:21 AM
@RGS if the words were variables and I didn't know what the words or the characters were in advance, I would just do left ∊ right and get 0 1 0 1 0 and have no hint whether that was the thing I wanted to do, or the thing I'd got confused with
 
I haven't 'got' the array-oriented bit I don't think.
 
@marcellothearcane Oh, that comes with practice. I'm still learning, though I've used APL most of my life.
@marcellothearcane You previously reversed a string. Can you find an expression that determines if a given string S is a palindrome?
 
Hmm. I'd do that by reversing the string, then seeing if it equals the first.
 
@RGS by comparison, I have never confused $txt.Contains("ana") with foreach ($char in $text) { $char -in ('a', 'n', 'a') }
 
@marcellothearcane Right. Now you found out that you can sum with +/ but really you can use any dyadic (two-argument) function instead of +, even logical AND:
 
RGS
8:26 AM
@TessellatingHeckler ah ok, so it feels like you are saying something like this: by just trying ∊, ∊⍨, ⍷, ⍷⍨ with arbitrary strings it is difficult to understand which is which, if you don't know already. But I'd argue that reading the description, or having a go with your own examples, it becomes pretty easy to understand which is which
 
@Adám my dad has been easing into C++ to use with an Arduino recently, and he just got "is string a palindrome?" working yesterday! I'm so pleased about it. He's been an electronics guy for years, worked in IT, but avoided code, and now he has an envelope covered in string indexing offsets.
 
@TessellatingHeckler But why do you need to resort to ^^ when the glyphs read so readily? is "member(s) of", ∊⍨ is "contains", is "appears as a sequence in", ⍷⍨ is "has the sequence".
 
RGS
@TessellatingHeckler this is really cool :D
 
@Adám Oh that's handy
^/ ⌽'racecar' = 'racecar'
Next step, variables!
 
you got it!
@marcellothearcane They are easy: ∧/ ⌽S = S←'racecar'
 
8:32 AM
Great!
 
You may want to learn that you can have multiple statements on a line by separating them with a diamond ('cause diamonds are unbreakable): S←'racecar' ⋄ ∧/ ⌽S = S
 
@marcellothearcane not quite
 
@dzaima Oh, you're right. There is one issue there.
 
Need to remove spaces?
 
No, the spaces don't matter (APL is like mathematics).
 
8:34 AM
@Adám that's the mathematician in you speaking; the glyphs read "e" and "e commute". And what's easy or memorable about 'ana' contains 'banana'? I'm OK as far as 5 ∊ 1 2 3 4 5 but 4 5 6 ∊ 1 5 6 is much less clear
 
In the string I mean - 'a man a plan canal panama' for example?
 
@marcellothearcane That'll be the next step, but for now: Every APL function takes everything (until the end of the line/statement/parenthesis) as its right argument. So in your code, takes 'racecar' = 'racecar' as its argument, while you intended only 'racecar'.
 
Hmm okay
Brackets?
 
RGS
@marcellothearcane to better understand, check what your code gives if you replace 'racecar' with something like 'abcd' which is not a palindrome :)
 
@TessellatingHeckler "Four, five, and six are members of one, five, and six"?
@marcellothearcane Sure, that's one possibility.
 
8:36 AM
^/S = ⌽S←'abcd'
That's a bit hacky
Doesn't solve the problem really
 
@marcellothearcane Not hacky at all. That's great.
 
@Adám ' wasn't handled properly. Fixed. Also, you don't need the if it's already in a code block (though it doesn't hurt)
 
@marcellothearcane (to extend Adám's reply, that's probably the way pretty much every APLer would do it, given the current limitations)
 
@Moonchild Wait, so it'll execute all code blocks? Maybe that's a bit aggressive…
 
@dzaima Haha okay!
 
8:38 AM
@marcellothearcane Round parentheses work like in traditional mathematical notation.
 
Yep, I tried that too
But as a subset of code golf, it seems extraneous
 
Hehe, The "is palindrome" function can be golfed much more in APL, but you'll get there. How about learning how to define your own simple functions?
 
Alright!
 
The simplest form of function uses curly braces around its statement(s) and the right argument is represented by the right-most letter of the Greek alphabet, omega:
So you can define IsPalindrome←{∧/ ⍵ = ⌽ ⍵}
 
@Adám hmm, you're probably right. Changed it to require ⋄ even at the beginning of code blocks
 
8:43 AM
⋄
'Let''s see!'
'Does this work?'
@DyalogAPL :-(
 
RGS
⋄ 'Let''s see!'
 
⋄ 'Let''s see!'
@Moonchild Um?
 
RGS
I thought it could've been from the first newline
 
@marcellothearcane Let's see if you can amend IsPalindrome to remove spaces first.
 
@Adám after thinking about it, i think i'd prefer a∊b to have been b∋a. Of course then there's the problem of not having a reversed counterpart (in which case it'd still keep its argument order)
 
8:46 AM
Got distracted - How can I run this?
F←{+/⍺⍵}
If it'll run at all!
 
@marcellothearcane Like this.
 
sorry, regex is a pain
⋄'let''s see!'
 
@Moonchild let's see!
 
⋄ F←{+/⍺⍵} ⋄ 3 F 4
 
@Adám Awesome
 
8:48 AM
@Adám 7
 
Thanks!
 
@marcellothearcane Or like that. You're welcome to experiment with the bot. It is a bit green still, but Moonchild is getting there.
Btw, you can also use functions anonymously, inline:
⋄ 3{+/⍺⍵}4
 
@Adám 7
 
⋄ 42 ⍝ do comments work?
 
@Adám 42
 
8:49 AM
Yay!
⋄ -⍣=1 ⍝ time to break the bot!
 
@Adám Execution timed out
 
Nice.
⋄ ÷0
 
@Adám DOMAIN ERROR
 
@Adám heh, that's your own handiwork
 
⋄ ]box on
 
8:51 AM
@TessellatingHeckler VALUE ERROR
 
@TessellatingHeckler No user commands.
⋄ ⎕SH 'rm -rf /
⋄ ⎕SH 'rm -rf /'
 
@Adám Illegal code
 
@DyalogAPL Yeah, it'd better be!
@Moonchild Would it be an idea for the bot to not backtick errors? That makes it possible to distinguish ÷0 from 'DOMAIN ERROR'.
 
⋄ ⎕USING←'System.IO' ⋄ Directory.GetDirectories⊂'C:\'
 
⋄ ⍳2 3
 
8:54 AM
@Adám Would you create an array map with ' ' = 'this is not a palindrome'
?
@Adám How do you do it?
 
@marcellothearcane Simply begin a message with
@marcellothearcane That's one way to do it. Then you just have to know that mask⌿data filters the data according to the mask:
⋄ 1 0 1 0 1⌿'hello'
 
:55212641
:55212659
```hlo```
 
@Moonchild ^ that looks like it combined two requests, and things went downhill.
 
RGS
My finger slipped there;
⋄ (⌽∘,¨,\∘⌽)'Downhill' ⍝ cf. aplcart.info/?q=suffix#
 
@RGS ``` l ll ill hill nhill wnhill ownhill Downhill ```
 
RGS
8:58 AM
Editing the message doesn't make the bot re-evaluate it, right?
⋄ ⌽(⌽∘,¨,\∘⌽)'Downhill'
 
@RGS ``` Downhill ownhill wnhill nhill hill ill ll l ```
 
⋄ {(' '=⍵)⌿⍵} 'hello world'
NOPE.
 
⋄ {(' '=⍵)⌿⍵} 'hello world'
 
RGS
@marcellothearcane you have to ask "please" :P
 
Aww
Please?
 
9:00 AM
⋄ {(' '=⍵)⌿⍵} 'hello world'
 
@Moonchild (no output)
 
third time's the charm
 
RGS
⋄ ⎕←{(' '=⍵)⌿⍵} 'hello world' ⍝ Please
 
@RGS (no output)
 
It's wrong anyway
 
9:00 AM
@Moonchild Except, that's wrong. The result should have been a lone space.
@marcellothearcane Well, it'd give you the spaces, while you want the non-spaces.
 
@Adám hmmm. Open to suggestions for a better way to represent that
 
@Moonchild If the result begins or ends with a space (or if it has multiple lines), then switch to block mode. Alternatively, you can just stick to block mode always.
Errors could be inline. That'd allow differentiation too.
 
@Adám the problem is, it's not really clear what the output signifies—it would be empty
 
⋄ 3 4⍴⎕A
 
ABCD
EFGH
IJKL
 
9:03 AM
@Adám {(' '≠⍵)⌿⍵}
 
@marcellothearcane Yes. That's a "remove spaces" function. Can you put it all together to a single, stand-alone palindrome checker function?
@Moonchild I don't get it. However, now I notice that SE doesn't allow all-space/newline messages, so I guess in that case, you could respond shape⍴' ' inline.
CMQ: Does anyone want to assist me with scoring the competition's phase II?
 
@Adám also it strips all trailing spaces from code blocks
 
⋄ x←⍞⋄'result',x
 
⋄ {∧/ ((' ' ≠ ⍵)⌿⍵) = ⌽ ((' ' ≠ ⍵)⌿⍵)} 'race car' ⍝ Pretty please with a cherry on top
 
@TessellatingHeckler And where would the bot get the input from?
@marcellothearcane Works!
 
9:09 AM
@Adám Some say it's still waiting for input to this very day
 
@marcellothearcane sorry, bot was elsewhere while I was testing a change
 
@Adám Amazingly
 
@TessellatingHeckler I'm surprised it didn't protest. should be illegal.
 
⋄ {∧/ ((' ' ≠ ⍵)⌿⍵) = ⌽ ((' ' ≠ ⍵)⌿⍵)} 'race car'
 
@Moonchild 1
 
9:10 AM
also, other nicety:
 
@marcellothearcane If you assign the result of ((' ' ≠ ⍵)⌿⍵) (which btw doesn't need an outer parenthesis), you can use that variable later, and avoid the double work.
 
⋄3[¯1]
 
@Moonchild RANK ERROR
 
Nice.
⋄ 3 4⍴⎕A
 
ABCD
EFGH
IJKL
 
9:11 AM
@Adám How does one assign things? I wondered whether it was possible
 
@Moonchild Multi-line output needs 4 spaces before each line.
@marcellothearcane name←value
 
If you try without brackets, it doesn't like it
 
@marcellothearcane On the right, you don't need parentheses, but on the left, you do. Otherwise that left-most sees ⍵=⌽(' '≠⍵)⌿⍵ as its right argument, instead of just .
 
@marcellothearcane APLs function evaluation is right-to-left, i.e. 1+-2×-5+1 is 1+(-(2×(-(5+1)))), so you can only freely remove parenthesis which continue to the end of the expression
 
@Adám ah—apparently se doesn't format messages as code if there's a blank (non-indented) line following lines of indented code
⋄3 4⍴⎕a
 
9:18 AM
@Moonchild It seems to work for me. You can experiment in the sandbox room.
 
@Moonchild the :id needs to be indented too
 
@dzaima Are you sure?
@Moonchild Turns out replying with a block doesn't work. You'd have to @id instead. And then the @id should just be a separate line at the top, prefixed with 4 spaces.
 
yay for SE chat "markdown" weirdness
 
RGS
@Adám sure
 
@Adám I could swear it worked during testing...can't reproduce now, though
 
9:28 AM
@Moonchild Alternatively, the bot could post two consecutive messages, one with the reply part, and one with the result.
 
RGS
@Adám or maybe respond with [ ]SE.Dyalog.Utils.repObj
 
@RGS It'd give that anyway.
 
@Adám that could work. Problem is, the reply wouldn't be linked to the actual code result, and given ratelimiting there could be more messages in between the reply message and the result message
 
@Moonchild True. I'd just go with the @id since it usually won't be confusing, even if a user enters a second expression before the bot responds. Does the bot handle requests sequentially or in parallel?
 
@Adám yeah, that's what I did
 
9:32 AM
⋄ 3 4⍴⎕A
 
@Adám
ABCD
EFGH
IJKL
 
@Adám in parallel
 
Ah.
⋄ -⍣=1
⋄ 0.5
 
@Adám 0.5
@Adám Execution timed out
 
⋄ 3 4⍴''
 
9:33 AM
@Adám ` `
 
@Moonchild Oops ^
 
@Moonchild (mainly to ameliorate the rate-limiting problem)
 
@RGS Wanna zoom?
 
RGS
@Adám can I get [30-60] minutes first? I need to do some life admin stuff before I can zoom with human beings
 
@Adám SE will automatically squish blank trailing lines
 
9:37 AM
@RGS Sure. Ping me when available.
@Moonchild Right, leading too. That isn't terrible. But if the result is all-blank (or empty, which is a subset of all-blank, no?) then you can maybe return shape⍴' ' as an inline message?
 
@Moonchild it'll remove any trailing whitespace, both horizontal or vertical (or both, both as in OR and AND)
 
@marcellothearcane Do you want more?
 
I'm stuck
 
With/in?
 
@Adám This
 
9:41 AM
@marcellothearcane What do you mean? You already solved that:
32 mins ago, by marcellothearcane
⋄ {∧/ ((' ' ≠ ⍵)⌿⍵) = ⌽ ((' ' ≠ ⍵)⌿⍵)} 'race car' ⍝ Pretty please with a cherry on top
 
Joining it all in one function
And removing the repetition of the space removal
TryAPL keeps shouting at me, so I'm sad
 
@marcellothearcane TryAPL isn't very good at pointing out where your issue is. A real offline APL system does a much better job. You should be able to download one here.
@marcellothearcane If you show me what you've got, I can guide you towards the solution.
 
@Adám done. Also handles arrays with a zero dimension
 
⋄ 0⍴⊂'abc'
 
@Adám 0 ⍴ ' '
 
9:49 AM
⋄ ⍳2 0
 
@Adám 2 0 ⍴ ' '
 
@Adám Pfff well...
 
⋄¯3↑2 3⍴''
 
⋄ B←'race car' ⋄ A←(' '≠B)⌿B ⋄ ∧/A=⌽A
 
@Adám 3 3 ⍴ ' '
@marcellothearcane


1
 
9:50 AM
By this point I'm randomly trying braces/brackets
@DyalogAPL Whoa, did that just work?
 
@Moonchild Why do the no-result assignments cause empty lines in the output?
@marcellothearcane Well, that's perfect. To make it a function, just remove the initial assignment of B, use instead of B, and put braces around the whole thing.
 
⋄ {A←(' '≠⍵)⌿⍵ ⋄ ∧/A=⌽A} 'race car'
 
@marcellothearcane 1
 
@Adám small regression (now fixed). Also array prototypes are detected properly
 
9:52 AM
⋄⍬
 
@Adám 0 ⍴ ' '
 
@Moonchild What do you mean regarding the prototypes?
@marcellothearcane Some tricks: checks if two arrays are identical, so you can write A≡⌽A instead of ∧/A=⌽A and ~ is the set subtraction function, so ⍵~' ' will remove spaces from .
 
@Adám I overlooked that 1=∧/⍬
⋄⍬
 
@Moonchild 0 ⍴ ' '
 
. . .
 
10:00 AM
@Adám So like this? {A←' '≠⍵ ⋄ A≡⌽A} 'abba'
 
⋄⍬
 
@Moonchild 0 ⍴ 0
 
@marcellothearcane Yup. Spot on.
⋄⍳2 0
 
@Adám 2 0 ⍴ ' '
 
@Moonchild ?
 
10:05 AM
⋄⍳2 0
 
@Moonchild 2 0 ⍴ 0
 
RGS
10:36 AM
@Adám what about now?
 
@RGS Sure. You still have my meeting ID, right?
 
RGS
11:07 AM
@Adám I can't seem to find it anywhere :'(
 
@RGS Uh, what?
 
RGS
@Adám It's just a joke for posterity; looks like I spent 30 min looking for your meeting ID
 
Oh, :D
 
There should be an APL version of this: xkcd.com/2343
 
↑ and ↓ are longer.
 
RGS
11:09 AM
@xpqz ⍋⍒ look dangerous
 
Those are star destroyers.
Almost as powerful as the death-star: ⍟ (if you see it from this angle, you're in trouble)
 
RGS
← and → are also pointy
 
Edit mess-up.
Actually, a lot of APL in that comic: > ∪ ⍺ ∊ + ≠ # ~ ∆ . ⍴ → ⊥
⌺ is great for defence.
 
RGS
@Adám ⍠⎕⌹ also seem suitable
 
Does anyone here have the graphics skills to create an APL version of the xkcd?
⋄ '%ISO%'(1200⌶)1⎕DT⊂⎕TS
 
11:23 AM
@Adám Illegal code
 
⋄ 1⎕DT⊂⎕TS
 
@Adám 44053.18332
 
⋄ 'YYYY-MM-DD'(1200⌶)44053
 
@Adám Illegal code
 
@Moonchild ^ That's odd. It works for me.
 
ngn
12:06 PM
@Adám xkcd is more about wit than graphical skills
 
 
1 hour later…
1:16 PM
@Adám I'd be interested in helping score Part II, though I won't be free until ~30th, and then I'll have only free time, too much! What would that look like? I'm super surprised we'd be allowed to help since some have submitted sections, though!
Also, that's the same for the bit re: APLcart I said I'd do ages ago. Still in Europe from studying abroad, so still trying to minimize time on the computer and maximize time outside!
 
1:52 PM
@AviFS RGS already helped me. It wasn't a matter of judging solutions, only a mathematical problem in computing the final scores from "sub-totals".
 
03:00 - 14:0014:00 - 00:00

« first day (1294 days earlier)      last day (1361 days later) »