« first day (98 days earlier)      last day (2566 days later) » 

4:28 AM
@Adám does K have tacit?
 
5:24 AM
@LeakyNun Yes, but no hooks or forks, just atops, so (f g h) B is f(g(h B)) and A (f g h) B is f(g(A h B))).
 
:o
that sucks
 
@LeakyNun Actually, this makes sense for financial application programming. Usually, you want to do this, than that, then something to finish up.
 
I see
 
@LeakyNun Remember that K has one purpose: Complete financial computations - fast.
 
I see
 
5:36 AM
@LeakyNun Also, atops-only allows arrays as left tine (which errors in J and APL). E.g. =2+ is the identity matrix (=) of size 2+n, while =2+- is the identity matrix of size 2+the difference between A and B.
 
I see
 
Makes it much easier to do cut-and-paste programming. The functions always do the same, no matter where they appear.
K's overloading is spectacular. Function application is the same as indexing!
 
how so?
 
@LeakyNun Take A[B] for example. if A is a function, and B is an array, then A is applied to B. If A is an array, and B is an array, then B selects from A.
 
I see
 
5:42 AM
@LeakyNun Pretty neat actually. Instead of fighting the syntactic anomaly of bracket indexing (gone in J, "deprecated" in APL), K embraces it and makes it a core syntax.
 
I see
 
 
5 hours later…
10:36 AM
@KritixiLithos {(2|(+/A)∘-)¨A⊣A←⍵} Nice, but no need to assign A←⍵; just use instead of A: {(2|(+/⍵)∘-)¨⍵}
 
10:51 AM
@KritixiLithos However, you're over-complicating it. For each of the items, subtract the item from the total sum is the same as total sum minus each of the items: +/-¨⊢
 
@Adám If I change it to 2|+/-¨⊢, then does the 2|+/- apply to ¨?
 
@KritixiLithos No, remember that trains go 3-at-a-time and operators bind stronger than functions, so 2|+/-¨⊢ is 2|((+/)(-¨)⊢)
@KritixiLithos Verify it online!
 
11:14 AM
Now I'm confused, so in the ¨, each element is negated... or are they subtracted from the total?
 
11:25 AM
@KritixiLithos the parsing goes three-at-a time from the right, so the tines are left←+/ ⋄ middle←-¨ ⋄ right←⊢. left and right are applied to the argument, and then middle is applied between their results.
 
Ah, okay
I have a lot to learn about trains
 
@KritixiLithos Yeah, unfortunately Mastering Dyalog APL doesn't cover them.
@KritixiLithos ∧
 
Thanks
 
 
4 hours later…
3:46 PM
@Adám That is certainly very helpful
 
@KritixiLithos On you local machine, you can just do ]box on -t=parens (no need to load salt). But experiment with ]box -t=box and ]box -t=tree to see what fits you best in each situation. Sometimes one is clearer than the others.
 
@Adám Is there a way to make ]box on as default instead of having to type it out every session?
 
@KritixiLithos Does ⎕SE.File give you /opt/mdyalog/15.0/64/unicode/default.dse?
 
I'm on macOS, so it gives me something slightly different: /Applications/Dyalog-15.0.app/Contents/Resources/Dyalog/default.dse
 
4:01 PM
@KritixiLithos Great, you can set all your settings, like ]box on -t=parens and ]rows on, etc. When ready, do 2⎕NQ'⎕SE' 'FileWrite'
2 ⎕NQ puts something in the queue of things to be done. In this case, to write the session file to disk.
 
It doesn't seem to do anything after the quit the session (using )off) and opened it again
 
]box isn't on?
 
No, it was off
 
You may not have write permission to the file.
Do this:
Copy /Applications/Dyalog-15.0.app/Contents/Resources/Dyalog/default.dse to your home directory.
Edit $HOME/.dyalog/config.dyalog
Stick a line in there that says export SESSION_FILE=$HOME/default.dse
Now try it again. Check ⎕SE.File, then 2⎕NQ'⎕SE' 'FileWrite'.
I'm going home now, I'll be back online in half an hour or so.
 
⎕SE.File appears to be unchanged
I think I might need to reboot
 
4:33 PM
@KritixiLithos Any luck?
 
I'm getting the same results, maybe it's just because macs are weird
 
@KritixiLithos Did you edit the config file?
 
What does ⎕SE.File have now?
 
It's still /Applications/Dyalog-15.0.app/Contents/Resources/Dyalog/default.dse
 
4:43 PM
@KritixiLithos That's odd. I'll sort this out, but it may take until tomorrow.
 
Thanks
When running dyalog from my terminal, it outputs nothing when I do ⎕SE.File. Is that normal?
 
5:02 PM
@KritixiLithos No, that means that it has picked up a session file.
Looks like something isn't connected right in that Dyalog doesn't pick up its settings.
 
I got it! @Adám
Apparently I had to edit ~/.dyalog/dyalog.config
 
@KritixiLithos You got that that is what happens, or you solved it?
Ah.
 
I got ⎕SE.File to show the expected output, now to test if it loads settings...
 
remember to save them 1st
 
It loads the box settings now (after saving them)!
What does the 2 do in 2⎕NQ ...?
 
5:13 PM
On Windows we have a GUI IDE which includes many such menu items, but on remote connections and when running a terminal version, you need to enqueue commands manually. RIDE is just a GUi frontend on a terminal APL process.
 
 
4 hours later…
9:34 PM
3 messages moved to Trash due to wrong info
 

« first day (98 days earlier)      last day (2566 days later) »