« first day (77 days earlier)      last day (1458 days later) » 

00:42
@chrispsn I created them, same as in q
 
10 hours later…
10:18
from latest \h update: asof <0 3!10 20
hmm
10:46
20190522
?2 3 5
^2 3 5
that could explain why sort is now a primitive (deferred)
Possibly dumb question: is it impossible to define new infix functions in k? So eg 1 {x+y} 2
ngn
ngn
@chrispsn afaik it's impossible. lambdas are nouns
@ngn thanks. and tacit doesn't get you there either? "hello" (^:,) "world"
ngn
ngn
@chrispsn parens nominalize (turn into a noun) whatever's in them
ahhh
@ngn @chrispsn But is there anything syntactically preventing this? IIRC, there is a hacky way to do so in K4 by adding your function to .q which is how Q's infix functions are made.
ngn
ngn
10:57
so it parses like "hello" ((^:,) "world"). the part on the right evaluates to a projection and then "hello" is indexed with that projection, so the result consists of char nulls, i.e. spaces
why 2 spaces instead of 1 ... i've no idea
Ah, Q does allow defining infix functions.
Is Q on topic here?
Sure
@ngn just to complete what you said:
 `p "\"hello\" (^:,) \"world\""
"hello"
((.;^:;,);"world")
ngn
ngn
@Adám the problem is when you name a dyad f:{y} and use it later 1 f 2 - the parser can't know that f is a dyad (without doing some sort of analysis of the whole program or using runtime information like in apl), so it's better just to assume that all names and all lambdas are nouns
@chrispsn interesting. . is used to create a composition. it was ' before
and that k7 output formatter really sucks...
@Adám what i used to point out to you as a big advantage of k5/k6 is now gone in k7 - the ability to copy the output, feed it back into the interpreter and get the exact same result :(
the REPL occupies this weird spot between being an exploratory tool and... the main way to access the language
i really like things like tables being represented as tables
but coming from a spreadsheet background, it feels strange to not have my past work persist
@ngn wasn't it suggested that there may be a flag that starts the interpreter in a "raw" mode?
or there could be in the future
ngn
ngn
11:27
@chrispsn i don't know
@chrispsn with proper indentation, an expression generating a table could still be made to look like a table
 +`a`b!(1 2 3;4 5 6) /currently printed as:
a b
- -
1 4
2 5
3 6
 +`a`b!(1 2 3;4 5 6) /it could have been something like:
+!/(`a`b
   +(1 4
     2 5
     3 6))
@ngn at least there's `k
ngn
ngn
11:44
@chrispsn i see the repl as something ephemeral. work worth persisting should be done in a .k file
@ngn oh, i could have used ![..] instead of !/(..)
12:02
is it normal to always get the same rand results on startup?
(base) chris@chris-VirtualBox:~/Desktop/test$ k
2019-05-23 15:34:17 2core 1gb avx2 © shakti l2.0 test
 rand 4
0.5 0.9078156 0.269656 0.5607996


(base) chris@chris-VirtualBox:~/Desktop/test$ k
2019-05-23 15:34:17 2core 1gb avx2 © shakti l2.0 test
 rand 4
0.5 0.9078156 0.269656 0.5607996
@ngn I hope we can get that in Dyalog 18.0 using the new array notation.
ngn
ngn
@chrispsn yes, the initial prng seed is fixed. \S is supposed to change it but it looks like it's not done in k7 yet
 
3 hours later…
15:06
@ngn I was thinking: given that (+) is a noun, would it be helpful if (f) were a verb? x(f)y
 
3 hours later…
ngn
ngn
18:31
@AlexanderBelopolsky so, (2*3)+4 would parse like (2*3)[+4]?
18:52
@ngn sure - maybe that will teach folks not to use redundant ()!
ngn
ngn
@AlexanderBelopolsky :)
ngn
ngn
19:15
/, makes f infix :) a f/,b <-> f[a;b]

« first day (77 days earlier)      last day (1458 days later) »