« first day (1712 days earlier)      last day (947 days later) » 

1:02 AM
@Adám is the array literal notation in dyalog yet?
 
@nathanrogers Still only implemented as models (with some limitations).
 
how would you pass data to a script?
probably dump it to some intermedate representation and read it in within Dyalog
 
What do you mean by "a script" here?
And what type of data?
 
The approach we discussed a short while ago, using $ dyalog -load=my.ws i think
with ⎕LX
and what type of data is ?
I've been toying with the idea of using another language to orchestrate array language programs
 
@nathanrogers OK, so you're running a function which could do anything.
@nathanrogers I don't understand that message.
 
1:07 AM
handling pipes/sockets/rest somewhere else, and using APL or K to handle the data processing
so I'm wondering how one might do that with APL, though I suppose a simple socket server running in a dyalog instance could work
 
Fair enough, so you just want a general method. How about using JSON or XML?
 
or ⎕CSV
 
Right, but CSV can only represent very limited data structures.
 
that's what I mean, it seems like, aside from direct socket messages, it might be good to dump data to an intermediate representation in a known file location, that the dyalog functions would then read in
and just calling whatever workspace file as a script, using ⎕LX
 
Indeed.
 
1:09 AM
do you have any recommendations for alternatives?
is there any sort of data literal message passing to Dyalog?
Clojure has this idea that one clojure instance can pass fully formed clojure data to another clojure application
 
Not using a format non-APL systems would easily create.
 
But with clojure, you can write macros ;)
 
@nathanrogers Right, and Dyalog can pass APL arrays to other Dyalog instances too.
 
is there a place I can learn about that message format?
 
@hyper-neutrino Can you give chat.stackexchange.com/users/526521/user17055097 access?
 
1:11 AM
@Adám done
 
@nathanrogers Look at Conga's Command mode.
@hyper-neutrino Thanks!
@user17055097 Hi C L, I figure you're interested in APL, since you quote Perlis in your profile?
 
@Adám is this using conga, or is this an implicit feature of the dyalog interp?
 
Conga.
 
How can I learn about the representation of data passed via conga which allows passing structured APL data via conga?
I see the usage documentation, but not about the data format
 
I don't think that's documented. I think it is literally the memory dump of the array pocket.
 
1:46 AM
What do you all think of this version?
 
 
5 hours later…
7:03 AM
@rak1507 Should I read this as '# '[× (((((∘.⌊)⍨)⍤⌊)∘⌽)⍨) ⍳⎕]?
Like
'# '[× (((((∘.⌊)⍨)⍤⌊)∘⌽)⍨) ⍳⎕]
       ------------------>
     <-----------------------
?
 
7:30 AM
I found it really hard to understand what ∘.⌊⍨⍤⌊∘⌽⍨⍳⎕ does just by looking at it and had to break it down step by step "from right to left" like
∘.⌊⍨⍤⌊∘⌽⍨⍳n
        ^
(⍳n)(∘.⌊⍨⍤⌊∘⌽)⍳n
           ^
(⍳n)(∘.⌊⍨⍤⌊)⌽⍳n
         ^
(∘.⌊⍨)(⍳n)⌊⌽⍳n
    ^
((⍳n)⌊⌽⍳n)∘.⌊(⍳n)⌊⌽⍳n
 
@Adam that tacit function is quite cool! But we still need to output hollow square made of # character. So, the whole solution would be as follows:

⎕←(' #'⌷⍨1∘+)¨(∘.∨⍨⍳∊1∘,)5

Can this solution be shortened even further? What do you think?
 
8:31 AM
⎕←∘.∨⍨⍳∊1∘,
 
@pVCaecidiosporeadduced
   ┌─┴─┐
   ⍨ ┌─┼─┐
 ┌─┘ ⍳ ∊ ∘
 .      ┌┴┐
┌┴┐     1 ,
∘ ∨
 
8:47 AM
' #'⌷⍨(⊂1+(∘.∨⍨⍳∊1∘,)) ?
{' #'[1+∘.∨⍨1⍵∊⍨⍳⍵]} is two characters shorter though
 
9:02 AM
Added a in the wrong place when experimenting and got an interesting looking result.
⎕←' #'⌷⍨(⊂1+(∘.∨⍨∘⍳∊1∘,))5
 
@rabbitgrowth
#####
# # #
## ##
# # #
#####
 
9:30 AM
@rabbitgrowth ' #'⌷⍨∘⊂1+⍳∘.∨⍨⍤∊1∘, so same length as the dfn, but probably harder to read.
 
Thank you!
 
@rabbitgrowth ⋄ F←{'#'@1⌽⍉⍵}⍣4,⍨⍴''⍨ is two characters shorter: ⋄ F 5
 
@Adám
#####
#   #
#   #
#   #
#####
 
Can also be written as fully tacit: ('#'@1⌽⍤⍉)⍣4,⍨⍴''⍨ and similar.
 
 
4 hours later…
1:18 PM
I think that I think that this is the best so far:
 
2:04 PM
@rabbitgrowth yeah it's a bit tricky to read without 'unwrapping'
 
 
1 hour later…
3:24 PM
I like how it gives off the same vibe as the APL font, with its soft rounded corners and everything
 
@rabbitgrowth Interesting aspect. That is kind of lost if on opposite backgrounds:
 
Yeah I definitely like it better with the border!
@Adám This one took me a while to understand, but it was so satisfying when it finally clicked
 
3:42 PM
@rabbitgrowth Happy you like it :-)
 
yeah, it's pretty cool, same size as my one but nicer, tacit > full programs
 
@rak1507 Wait, what is your solution of same size?
 
'# '[×∘.⌊⍨⍤⌊∘⌽⍨⍳⎕]
 
 
2 hours later…
6:11 PM
@Adám is it possible to use conga to communicate with other socket server patterns?
 
wdym
 
@nathanrogers Certainly, but you'll have to use a raw connection and implement whatever protocol they use.
 
probably, all tcp sockets are just the same
 
Say there is a server that uses socket io, how would I use conga to send message to that server?
@Adám That's what I figured
Are there any existing protocols already packaged with conga, or is that a no?
 
I don't think any are.
 
6:15 PM
and conga is the right tool for using raw tcp sockets? (in dyalog)
 
there's TCPSocket
 
I think that even for raw connections, it is the right thing, however, there's also the built-in TCPSocket (^)
 
6:29 PM
Groovy, I'll take a peek. Thanks
 

« first day (1712 days earlier)      last day (947 days later) »