« first day (971 days earlier)      last day (79 days later) » 

5:22 AM
Is there a good way to write Dyalog APL on your phone? I have a J REPL but nothing for APL yet
 
5:44 AM
@Sherlock9 TryAPL should work, but please email support@dyalog.com asking for this. Dyalog APL can already run under Android, we just need an interface for it, but this exists, so I think it'd be relatively easy to do.
 
6:27 AM
@Adám Sent off an email. Thanks!
 
@JoKing Welcome! Interested in APL now?
 
7:05 AM
@Sherlock9 obligatory self-advertisement, though it is lacking some pretty important features, is hard to compile because processing doesn't like java 8, and its only connection to Dyalog is through JSONServer to a PC (which might no longer work as i have almost never used it), by default it interprets dzaima/APL
 
 
1 hour later…
8:10 AM
)refs
)about
 
@Sherlock9 You can evaluate a single line of APL by typing it into chat prefixed by ⍞←. Use ⎕← instead for boxed display and multi-line results and use ⋄ instead to silence the first statement. Use ] to call user commands, including ]help ⍣ for help on a glyph etc. Do not use markdown, but fixed-width (4 initial spaces) is fine. Commands: )lb for language bar, )docs for full documentation, )ref for PDF reference card, )idioms for idiom list.
 
)ref
 
8:38 AM
⋄ p ← 11 7 5 3 2 1 1 ⋄ ⎕←{-/⍵{⍵(⍺{+/⍺⍺[⍺{(⍺≥⍵)/⍵}2÷⍨(3×⍵*2)+⍵,-⍵]})¨⍳⍵}≢⍵}p
 
@Sherlock9
15
 
This code is ugly as sin, but it's the first draft that's worked :D
 
8:49 AM
{-/⍵{⍵(⍺{+/⍺⍺[⍺{(⍺≥⍵)/⍵}2÷⍨(3×⍵*2)+⍵,-⍵]})¨⍳⍵}≢⍵}

              ⍺{(⍺≥⍵)/⍵}2÷⍨(3×⍵*2)+⍵,-⍵  ⍝ Basically, get (3×⍵*2 +- ⍵) and check if
                                         ⍝ each element is smaller than the length of our list
{-/⍵{⍵(⍺{+/⍺⍺[...]})¨⍳⍵}≢⍵}  ⍝ We use these indices to get the elements from the list we're building
                             ⍝ sum up, take the alternating sum, and then return
 
⎕←{-/{+/w[i/⍨l≥i←2÷⍨(3×⍵*2)+⍵,-⍵]}¨⍳l←≢w←⍵} 11 7 5 3 2 1 1 ⊣ 'WIP'
 
@Adám
15
 
Assignment! Of course!
The next two issues are: 1) appending the new thing to the growing list, 2) repeating until one of the elements is divisible by 1000000
Carefully not asking the bot to run the following: {r←1000000|-/{+/w[i/⍨l≥i←2÷⍨(3×⍵*2)+⍵,-⍵]}¨⍳l←≢w←⍵ ⋄ 0=r:l ⋄ ∇ r,w}1 1
 
⍞←(-/⊂{+/⍺[(2÷⍨(3×⍵*2)+⍵,-⍵)∩⍳≢⍺]}¨⍳∘≢) 11 7 5 3 2 1 1 ⊣ 'WIP'
 
@Adám 15
 
9:07 AM
It occurs to me that I should have included the code that limits the number of {...}¨⍳l to check, {...}¨⍳⌊6÷⍨1+0.5*⍨1+24×l
And with that addition, it spits out the number in seconds XD
I love APL
 
9:24 AM
@Adám What does do here? Does it give ⊂⊢ as the dfn's ?
 
@Sherlock9 It gives the whole of 11 7 5 3 2 1 1 as to the inner dfn.
 
Ahh
 
10:00 AM
Hm, having trouble turning ⍳⌊6÷⍨1+0.5*⍨1+24×≢ into a train
 
@Sherlock9 ⍳∘⌊
 
Ahh XD I was trying to get it to work with a ton of
 
 
2 hours later…
11:39 AM
⎕←{r←1000000|-/{+/w[i/⍨l≥i←2÷⍨(3×⍵*2)+⍵,-⍵]}¨⍳⌊6÷⍨1+0.5*⍨1+24×l←≢w←⍵ ⋄ 0=r:l ⋄ ∇ r,w}1 1
 
@Sherlock9
55374
 
@ngn ^ is my port of your k answer in APL
Heck, I just technically posted the numerical answer to a Project Euler problem to a public channel
@Adám, do you think it's okay to leave the bot's response or should it be deleted?
 
11:55 AM
@Sherlock9 It'll drown.
 
@dzaima @dzaima any chance you could put an .apk release of your app on GitHub?
 
12:35 PM
@RichardPark sure, doing that makes a lot of sense. just got home, so will set things up soon
seems i also hadn't pushed my layout refactor (finally including a mode with digits at top-level)..
 
@dzaima Also, your repo should really have a screenshot.
 
@Adám Haha, not really. Just lurking
 
12:51 PM
@JoKing You should give it a try though. You might just enjoy it.
 
I think the biggest part of my reluctance to learn APL (and by extension, most golfing languages) is the non-ASCII codepage.
huh, there is an APL keyboard for Android... but it doesn't work very well :(
 
1:08 PM
@JoKing there also is this mentioned by Adám above, and this as a Hacker's keyboard modification I made
..and then there's also my android ide i'm about to publish an apk for (but that restricts input to only the app as making a proper IME is probably more difficult)
@dzaima (apk for my thing here and you do need to add the APL input "language" in settings or something like that)
 
Err, I should probably test the keyboard somewhere else
 
1:25 PM
@JoKing and... Adám also has this in-browser thing for inputting non-ascii characters that is for more than just APL
 
So with the Hackers Keyboard version I'll have to just memorise where the characters are?
 
@JoKing I can teach you that. Very easy to remember.
 
@JoKing somewhere, i dont know where, in the settings you can enable 1st extra char displaying
fn → settings → theme and label settings → labelled alternative keys → show all hint labels
not that helpful for the top row but still exists
 
Oh yeah+ thar's much easier
 
also, with the 5-row compact layout you may have to get the 6th row on-screen (it's set to swipe up for me, no idea what's the default) to access some keys (e.g. [ for ..)
 
1:34 PM
@dzaima How do I actually use the APL Hacker's Keyboard? You didn't make a new .apk/release, did you?
 
@Adám i linked to an apk 2 messages down
 
@dzaima Oh, I misread that as answering Richard about an .apk for your IDE.
 
@Adám that I'm still working on (as it turns out, there are several problems i always one-off fixed when compiling the thing)
 
 
at least i'm finally semi-forced to actually finish out the couple little things, meaning more things for everyone to use yay
 
1:37 PM
Wow, 5 row keyboard is a lot
I'm thinking I might be better off with just modifying my existing keyboard to include APL characters so I don't lose my shortcuts
 
@JoKing i've set to use the full 5-row on landscape only, where it works beautifully, and compact 5-row on portrait (as i do use the keyboard as my main one)
 
@JoKing Do you only use a mobile device, never a… computer computer?
 
@JoKing heh, that's exactly the same reason my hackers keyboard modification exists
 
I mostly use my phone for recreational progamming
 
We really need to release Dyalog for Android.
 
1:44 PM
@RichardPark and there's that
 
How many non-ASCII characters are there in APL anyway?
 
@JoKing 62
 
@JoKing depends on the APL. dzaima/APL has this list of APLy unicode characters, though most are only on that list because it was easier to make that way
 
Oh, that's not so bad. I'm sure I can can add them somewhere on my keyboard
I'll probably just add them as I go
Is there a tutorial you recommend I browse through?
 
@JoKing I'll be happy to give you a personalised into-course, but there is this.
@JoKing There's also an excellent book
@JoKing While I don't personally recommend it, many seem to enjoy this very ancient-looking online tutorial (don't choke!).
@JoKing Finally, there's the Learn tab of tryapl.org
 
1:52 PM
to add to the list of places to learn APL, here's a list of places to learn things about APL
 
Brilliant. I'll have a look through the links tomorrow and give it a decent go. Thanks for the help!
 
@JoKing Any time. And again, please do not hold yourself back from pinging me. I'll be happy to teach you directly too.
 
2:31 PM
@Adám screenshots also added (+ otherwise a readme that would actually be useful to people)
@dzaima i now notice that i completely forgot about recoloring the landscape layout from the early versions still using bright blue..
 
3:35 PM
@dzaima Awesome thanks
 
 
2 hours later…
ngn
5:08 PM
@Sherlock9 don't worry, many PE answers are a web search away anyway, especially those below №100
 
Just as well, I looked up what the answer was beforehand to see how hard this was going to be XD
Incidentally, what was your answer, ngn?
 
ngn
@Sherlock9 well done. how did you figure it out? for instance how did you know -6!x is x div 6?
@Sherlock9 same as yours
 
Oh I borrowed the formulae off of Wikipedia :D
Exactly the same?
Up to variable names, I mean?
 
ngn
oh, i thought you meant the result... my code is slightly different, of course
 
Ah sorry I was using answer in the CGCC sense :P
 
ngn
5:14 PM
for example, i translated k's { }/ as { }⍣≡ in apl, and you used recursion. both are fine
 
I'm now wondering what the best way to actually "draw" partitions of n would be, for some definition of drawing (tallies, boxes with numbers in them, simple vectors, etc)
Okay the following doesn't work:
⎕←(⍉2⊥⍣¯1⊢¨7+⍳8)⊂¨4⍴1
 
@Sherlock9
RANK ERROR
 
ngn
@Sherlock9 draw them for what purpose? for instance ferrers/young diagrams are a good visual representation to explain the concept of conjugate partitions
 
@ngn As a fun challenge. I'm considering drawing Young diagrams as well
It would help if I could figure out how to generate partitions ⍨
Maybe I could repurpose my old code based off of Dennis' code
 
ngn
@Sherlock9 the easiest way is recursion with 2 parameters: remaining sum and max element
 
5:41 PM
⎕←1{0=≢k←(⍺-1)↓⍳⌊⍵÷2:⍵⋄⍵,⊃(⍺,¨⊢ ∇ ⍵-⊢)¨k}9
 
@Sherlock9
┌─┬───┬─────┬───────┬─────────┬───────────┬─────────────┬───────────────┬─────────────────┐
│9│1 8│1 1 7│1 1 1 6│1 1 1 1 5│1 1 1 1 1 4│1 1 1 1 1 1 3│1 1 1 1 1 1 1 2│1 1 1 1 1 1 1 1 1│
└─┴───┴─────┴───────┴─────────┴───────────┴─────────────┴───────────────┴─────────────────┘
 
It lives!
It doesn't work! But it lives!
⎕←1{0=≢k←(⍺-1)↓⍳⌊⍵÷2:⍵⋄⍵,⊃(⍺,¨⊢ ∇ ⍵-⊢)¨k}5
 
@Sherlock9
┌─┬───┬─────┬───────┬─────────┐
│5│1 4│1 1 3│1 1 1 2│1 1 1 1 1│
└─┴───┴─────┴───────┴─────────┘
 
⎕←1{0=≢k←(⍺-1)↓⍳⌊⍵÷2:⍵⋄⍵,(⍺,¨⊢ ∇ ⍵-⊢)¨k}5
 
@Sherlock9
┌─┬─────────────────────────────────────┬─────┐
│5│┌───┬───────────────────────┬───────┐│┌───┐│
│ ││1 4│┌─┬───┬───────────────┐│┌─┬───┐│││1 3││
│ ││   ││1│1 3│┌─┬───┬───────┐│││1│1 2│││└───┘│
│ ││   ││ │   ││1│1 2│┌─┬───┐│││└─┴───┘││     │
│ ││   ││ │   ││ │   ││1│1 1││││       ││     │
│ ││   ││ │   ││ │   │└─┴───┘│││       ││     │
│ ││   ││ │   │└─┴───┴───────┘││       ││     │
│ ││   │└─┴───┴───────────────┘│       ││     │
│ │└───┴───────────────────────┴───────┘│     │
└─┴─────────────────────────────────────┴─────┘
 
5:42 PM
And this, meanwhile, makes very little sense
I'll keep working at it
 

« first day (971 days earlier)      last day (79 days later) »