« first day (2032 days earlier)      last day (919 days later) » 

03:34
I don't know who to thank for TryAPL. The community at large? This was the first link in the help on that page that seemed like I could quickly send off a message. I haven't crossed the APL event horizon, but I'm slowing being drawn in. I... I think I'm okay with that.
 
6 hours later…
09:21
@LoremIpsum There's a Credits section at the bottom of the HELP tab
 
6 hours later…
15:00
Welcome to APL Quest 2015-9! Today's quest is I’d Like Mine Scrambled Please:
> Write a function that takes a character vector word as its argument and returns the word’s letters juxtaposed as described above.
@user19797600 Hi ed Z. If you want access here, simple email [email protected]
{{,⌽(2÷⍨≢⍵)2⍴⍵}@(1↓(-1+2|≢⍵)↓⍳⍴⍵)⊢⍵}
I have a feeling I might be overcomplicating things, but couldn't simplify it further.
Let's see…
I have this idea for using grade.
{(⊃⍵),⍵[1+⍒⍋⍒|-\⍳≢2↓⍵],⊢/⍵}
{⍵[⌽⍒0,'a',⍨⌈2÷⍨⍳¯2+≢⍵]} only fails on 1-char words.
@rak1507 Yours fails on 1-char words too.
ah :(
15:11
{⍵[⌽n↑⍒1,n,⍨⌈2÷⍨2↓⍳n←≢⍵]}
Oh wow, I could never have come up with these on my own
I had {(⊃⍵),∊,⍨/¨⍵⊂⍨⊖1@⎕IO⊖0 1⍴⍨≢⍵}
I'm working on a Stencil-based solution now.
@xpqz Fails on 1-char word.
15:16
@rak1507 ⍒⍋⍒ is just rude
@Adám Maybe a test case for that on problems.tryapl.org?
Yeah, I'll add that.
{(⊃⌽⍵),⍨2{⍺>¯1+≢⍵:⍵⋄(2+⍺)∇⌽@(⍺,1+⍺)⊢⍵}¯1↓⍵}
not nice.... but my first thought
Recursive, eh?
eh yea hehe
Any idea how to fix this? ⎕←{⍵∩⍨,{⌽⍵}⌺(⍪2 2)⊢' ',⍵,' '}¨'this' 'is' 'awesome'(,'a')
15:23
@Adám
┌────┬──┬───────┬─┐
│tihs│is│aewosem│a│
└────┴──┴───────┴─┘
It flips the final two of odd-length words.
@JamesHeslip Long time no see!
Aha: ⎕←{(⊢/⍵),⍨⍵∩⍨,⌽⊢⌺(⍪2 2)⊢' ',' ',⍨¯1↓⍵}¨'this' 'is' 'awesome' 'awesomes'(,'a')
@Adám
┌────┬──┬───────┬────────┬─┐
│tihs│is│aewosme│aewosems│a│
└────┴──┴───────┴────────┴─┘
Crazy tacit version: ⊢/,⍨⊢∩⍨∘,∘(⌽⊢⌺(⍪2 2))≢⊣@1∘⌽⍣2≢,⊢
@dzaima Hm, that resists my attempts at translation.
ovs
ovs
15:44
grade up instead of grade down: {⍵[n,⍨⍋¯1(⊢+*)⍳¯1+n←≢⍵]} (The grade could probably be replaced, it just increases every value - except the last for odd inputs - by 1)
Nice.
@Adám very horrible - {x←1⌽⍵ ⋄ ¯1⌽x⊣(i⍴x)←⌽(i←2,⍨0⌈⌊.5ׯ2+≢x)⍴x}
{∊⌽¨⍵⊂⍨⌽1@1⌽1,1 0⍴⍨¯1+≢⍵}
{∊⌽¨⍵⊂⍨1@1⍤⌽⍣2⊢0 1⍴⍨≢⍵}
∊⊢⌽¨⍤⊂⍨≢1@1⍤⌽⍣2⍤⍴0 1⍨ is a tacit version of that.
∊⊢⌽¨⍤⊂⍨∨∘⌽⍨⍤⍷⍨∨=\⍤≠⍨
Look ma, no constants!
{∊⌽¨⍵⊂⍨1@1⍤⌽⍣2=\≠⍨⍵} is easier to read, imo.
All done, I guess.
See you next week for the last 2015 problem, Blaise’ing a Trail!
16:02
{⍵[n↑1,+\1,⍨⍣(2|n)⊢2,⍨3 ¯1⍴⍨0⌈2×⌊2÷⍨2-⍨n←≢⍵]}
What have I done...

« first day (2032 days earlier)      last day (919 days later) »