« first day (50 days earlier)      last day (2898 days later) » 

07:28
Okay, so who do I contact?
@KritixiLithos Feel free to email me on adam@
 
4 hours later…
11:26
It's at dyalog.com right?
@KritixiLithos Yes.
Okay, then I sent you the email
@KritixiLithos Yes, I saw. Thank you. We'll get back to you.
12:35
So after I graduate from high school next year can I apply to Dyalog?
I installed Dyalog. How do I create programs and run them (like on TIO)?
@betseg Certainly.
@KritixiLithos Are you able to start Dyalog?
Yes, everything is in immediate execution mode
Are you able to type APL characters?
12:45
Great, so now type Avg←+/÷≢ and press enter
Next, Avg 3 1 4 1 5
You've defined a program.
Ah, I see. When I click on Avg it opens a separate tab where I can edit it
Right. Oh, you're using RIDE.
A good way to stay organized is to put things in namespaces.
)ed ⍟MyStuff
Then write your definitions in there.
Later you can reference things in there with e.g. MyStuff.Avg
@Adám So there also is a command-line version?
finally, you can save it to a plain text file with ]save MyStuff /tmp/
@KritixiLithos Yes, you can run in TTY.
@KritixiLithos What OS are you on?
Just out of curiosity, in what language is Dyalog written in (if it's APL, what was the first version written in), and how big is the code?
12:51
@Adám macOS
@KritixiLithos I see, then RIDE is the default interface.
So there is not command-line interface for macOS?
@Adám That gives me an error
@betseg Dyalog is written mostly in C. There's some C++ too. 13MB on 618 thousand lines.
*ValueError
@KritixiLithos Did you close the editor?
12:56
No, it's still open
Oh, it works after I close it
Exactly. CLosing the editor saves the changes.
Oops, that was just C. another 1MB on 19 thousand lines of C++. There's also a little bit of assembler.
When you are done in APL, you type )off. Next time you want your stuff, type ]load /tmp/MyStuff
So I can save stuff using ]save MyStuff /home/betseg/apl/?
@betseg yes.
13:26
@KritixiLithos You can also open the preferences and assign a keystroke (e.g. Ctrl+S) to "FX". This allows you to save your changes and keep the editor open.
14:02
How do you edit the previous expression? Say I do 5+4 and hit enter to get the result. And then I want to copy it to the current expression and edit, say to 5+5.
Like how in the Terminal you can use the arrow keys to move between previous commands
Just hitting ENTER on the previous expression runs it instead of allowing me to edit it
you can use right arrow key, edit the previous expression, then hit enter
@KritixiLithos Ctrl+Shift+Enter
You can also use the up arrow to go modify in-place. Pressing Enter will restore the old line, and make your edits into a new line at the bottom.
@Adám That gives me a "There is no next line" error but thanks for the tip on using arrow keys to modify it in-place
@betseg Doesn't work in the IDE apparently
@KritixiLithos right arrow key after scrolling up to the previous expression :)
i basically said the same thing as @Adám
14:09
@KritixiLithos Sorry, Ctrl+Shift+Backspace steps back, Ctrl+Shift+Enter steps forward.
oh thats more useful
You also use the IDE @betseg?
ıt's easier to start the IDE :P
How do you change the prefix to the control key? Right now it's set to the backtick `
edit->preferences
14:13
@KritixiLithos Click the Keyboard icon on the top right.
@Adám I did that
@KritixiLithos You should then get a dialog that allows you to set it.
But apparently I can only set it to another character
@KritixiLithos Yes, that is a prefix key.
@KritixiLithos Oh, now I get it.
@KritixiLithos See the MacOS tab at dyalog.com/apl-font-keyboard.htm
14:16
Yeah, for example I want Ctrl+r to result in rho (if that's possible)
APL keyboard configuration exists in Linux, in Linux and Windows you can quickly swap between different configurations, I imagine macOS has both features.
@Adám Thanks, it works now!
@betseg Yes, I can swap between several keyboards in macOS
APL keyboard configuration exists in Linux but for some reason GNOME doesn't want to show any configuration that isn't based on a spoken language :/
14:34
I was looking through the tutorial and found one example that puzzled me. Why does 10 20>(2 14 25) (3 15 29 37) equal 1 0 0 1 1 0 0? What are 10 and 20 being compared with?
If 14 became 0, then why does 15 result in 1?
10>(2 14 25), and 20>(3 15 29 37)
That... makes sense
15:13
@KritixiLithos The so-called "scalar" primitives operate pairwise on the items of their arguments. Scalar primitives are: + - × ÷ ⌈ ⌊ | * ⍟ ○ ! Monadic only: ? ~ Dyadic only: < ≤ = ≥ > ∨ ∧ ⍱ ⍲
 
1 hour later…
16:22
@betseg CLI does what GUI can't do! I found a command to do this.
 
1 hour later…
17:46
@KritixiLithos which tutorial btw
18:08
What's the difference between = and ?
18:25
...what
There are a few bugs here and there
I'm really confused between =, and now
19:05
You know what I find fun about Dyalog– there are no if-statements. You have to devise of a way to use "boolean" function to get the result you want
19:17
      ∇ var ← greaterthanzero var
[1]  :If var > 0
[2]      'true'
[3]  :Else
[4]      'false'
[5]  :Endif
[6]  ∇
      greaterthanzero ¨ ¯1 0 1
false
false
true
¯1 0 1
@KritixiLithos ^
Wow
But it's ungolfy
@betseg Mind explaining me what the , ¨, var does?
greaterthanzero←{⍵>0:'true' ⋄ 'false'}
greaterthanzero←'false' 'true'⊃⍨1+>∘0
@KritixiLithos if i understand correctly is just a function about functions (there are other uses though), ¨ makes greaterthanzero run with everything after it on order, and this better code will be better explanatory for var: hastebin.com/aporehoqes
(was just browsing wikipedia and saw that btw)
greaterthanzero←{'true'⊣⍣(⍵>0)⊢'false'}
@Adám wow that one looks really cool
19:32
greaterthanzero←{'false' 'true'[1+⍵>0]}
like python
@betseg ∇ marks the beginning and end of defined functions/operators. In a "dfn" (braces-style function/operator) it refers to the function itself.
@KritixiLithos ¨ is a monadic operator. It takes a single function on its left and returns a new function which is the original function applied to each element of the argument. Thus, it takes the place of a FOR-loop.
@KritixiLithos var in the given code, indicates what name the argument should be refered to in the body of the function. In this case (which is unusual) it also indicates the name of the result of the function. So, when the function is called, var has the value of the argument that the function was called with. When the function terminates, it will return the value of var at that time.
@Adám Just curious, does Dyalog have infinite loops?
@KritixiLithos Yes. Tail-recursion is free, so you can loop infinitely like that. There is also an operator which repeats a function application a certain number or until a condition applies. If the condition never applies, it will never stop.
You can also do explicit GOTO statements.
The shortest infinite loop (you may want to not do this): ~⍣=0

« first day (50 days earlier)      last day (2898 days later) »