« first day (758 days earlier)      last day (1902 days later) » 

12:07 PM
@amajola_ Showing Us @dyalogapl vs Javascript For The Second @JoziJs Here @bbdsoftware 💻 ✖ @SimonCodes_ @mikegeyser @GerybBg @JavaScriptDaily @the_jsf @bbdatc @richardyoung00 #javascript #development #dyalog #Google #programmer
@dyalogapl A just giving page in John's memory- https://www.justgiving.com/fundraising/john-scholes
 
12:42 PM
I have a question, is there a better way to convert a decimal number to another radix than the following?
⎕←3{⍵⊤⍨⍺⍴⍨⌈⍺⍟⍵}16
 
@Sherlock9
1 2 1
 
@Sherlock9 {⍺⊥⍣¯1⊢⍵} is the general case for your problem
It converts any decimal into base
⎕←3{⍺⊥⍣¯1⊢⍵}16
 
@J.Sallé
1 2 1
 
Okay I get the magic of ⊥⍣¯1 but why does it need the ?
I'm not sure why without the , I get a "Missing right argument" syntax error
 
1:05 PM
@Sherlock9 I'm not entirely sure myself, but iirc it has something to do with the way the language is parsed
I'm sure @Adám can explain in detail
 
@Sherlock9 @J.Sallé The operator needs an array operand and the derived function ⍎⍣¯1 needs an array argument. Both the operand and the argument need to be on the right, next to each other, but must be separated somehow. Possibilities are a monadic function (e.g. ⍺⊥⍣¯1⊢⍵), parenthesis ⍺(⊥⍣¯1)⍵ and naming Inv←⍣¯1 ⋄ ⍺⊥Inv⍵. Think about it, without any separation, how would you parse Fn DyadicOperator 1 2 3 4? (Fn DyadicOperator 1 2 3)4 or (Fn DyadicOperator 1 2)3 4 or…
 
2:09 PM
@Adám Ohhh that makes sense
⎕← f←⊥⍣¯1 ⋄ 3 f 16
 
@Sherlock9
 ⍣
┌┴┐
⊥ ¯1
 
⎕← 3 f 16 ⋄ f←⊥⍣¯1
 
@Sherlock9
VALUE ERROR
 
⍞← f←⊥⍣¯1 ⋄ 3 f 16
 
@Sherlock9 ⊥⍣ ¯1
 
2:14 PM
⎕← 3(⊥⍣¯1)16
 
@Sherlock9
1 2 1
 
Okay, how should I do "assign a dfn and then use that dfn in a separated statement", how did I do the parse tree, and how should I do the parse tree?
 
@Sherlock9 When causing more than one output line, use ⎕←. If you want to do assignments without output before causing output, begin with ⋄ and use ⎕← for subsequent output:
⋄ f←⊥⍣¯1 ⋄ ⎕←3 f 16
 
@Adám
1 2 1
 
Ahh
 
2:17 PM
Yeah the bot's syntax always gets me too
 
@Sherlock9 dfns are in {braces} and you can't "just" get a parse tree for those (since it may be ambiguous until call time). ⊥⍣¯1 is a derived function, not a dfn.
 
Sorry. I forget the definitions
How do you get a parse tree for a derived function?
 
@Sherlock9 Just output it:
⎕←+⌿÷1⌈≢
 
@Adám
  ┌─┼───┐
  ⌿ ÷ ┌─┼─┐
┌─┘   1 ⌈ ≢
+
SYNTAX ERROR
 
Ooh
And in the REPL?
 
2:21 PM
@Sherlock9 ]box on -t=tree and after that they will all display as a tree
 
You gotta enable the tree option in that case
 
Thanks :D
Also is there any way to get ]box to stay on?
 
@Sherlock9 Just save your session. Though, which OS are you on?
 
Between sessions, I mean
Windows
 
@Sherlock9 Sure, then in the menu, Session>Save
 
2:23 PM
@Adám Any way to shorten this ⌈/≢¨⊆⍨2⊥⍣¯1⊢?
 
@J.Sallé Not in regular Dyalog. Extended, yes.
 
Basically, find the largest concurrent run of 1's in a number's binary representation
 
Ooh turns out I hadn't been loading the session all this time
Silly me
 
@Sherlock9 The file at Options>Configure>Session>Configuration file tells APL which session to load at startup.
 
@Adám Okay one more thing. When I try to close it says "Save Session Configuration", "Save Continue Workspace", and "Save Session Log", I know (now) what session configuration and log mean, but what's a continue workspace?
(This is probably very obvious in hindsight, but I am confused)
 
2:31 PM
@Sherlock9 It is just in case you didn't save your workspace, it can save a generically named workspace for you so you won't loose stuff.
@Sherlock9 You can "save as generic name and immediately quit" with )continue
@Sherlock9 If you type )off instead of closing the window or using the File menu, it won't bother you with any questions.
 
Ooh duly noted
 
Dyalog is so polite it will leave you alone when you tell it to bracket off
 
And now the big silly question, what's the difference between a session and a workspace?
(second big silly question is, "is there a manual for this so I can stop asking you silly questions?")
 
@Sherlock9 The session is the ⎕SE root namespace and everything in it. The workspace is the # root namespace and everything in it.
@Sherlock9 I don't mind at all, but I do think it is all covered somewhere in the programming and language reference guides. The user commands which begin with ] are all documented their in-session help system; just enter ] and it will guide you from there.
@Sherlock9 However, I do think we need an introduction to the "structure of everything". I'll pass that on to appropriate parties.
 
Dyalog are sponsoring @jojo_236 to play on the prestigious @IPAPool Ladies Tour this year. You can read about what Jo has been up to and her return to playing competitive pool in our latest blog post https://www.dyalog.com/blog/2019/02/pool-stories-fergus-back-on-form/
 
2:45 PM
@Adám Thank you for your help
 
@Sherlock9 My pleasure. Really.
 
I did find the book "Mastering Dyalog APL" but 800 pages seem a little daunting
 
@Feeds This is really cool. I love snooker and its derivatives
 
@Sherlock9 The later parts are very specific, but it begins with good general stuff. I can highly recommend it, even if you don't plan on going through it all.
 
Excellent! I'll put it on my to-read list
And at last I found the User Commands documentation :D
 
2:51 PM
Mastering really helped me kickstart my APL knowledge
 
@Sherlock9 Btw, all documentation is available at docs.dyalog.com
 
Oohoohoo many thanks
Aha! I found the reference card on there. Haven't seen that in a while
 
@Sherlock9 You can always ask the bot when you forget:
)docs
Uh, or not.
)ref
 
)about
 
3:05 PM
@Adám 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.
 
#tio alias message )docs %handle% Dyalog APL Documentation
 
@Adám Added alias for )docs
 

« first day (758 days earlier)      last day (1902 days later) »