« first day (841 days earlier)
← previous day
next day →
last day (694 days later) »
Razetime
08:49
how would i get cartesian product using a dyad?
aka the equivalent of
∘.=
='
doesn't seem to work
ktye
@Razetime each-left/right combination:
ngn.bitbucket.io/k/…
Razetime
interesting
ktye
@Razetime watch this:
youtube.com/watch?v=ZGIPmC6wi7E&t=775s
Razetime
ah each left and right
3 hours later…
Razetime
12:19
@JohnE is there a way to take input from STDIN in iKe?
2 hours later…
ngn
14:23
@Razetime what is stdin in a browser environment?
Razetime
maybe an <input> element
I just wrote a function instead
ngn
15:05
@ktye
works now
, thanks
ktye
15:18
@ngn i see, and the functional form works like that:
ngn.bitbucket.io/k/#eJzTizZWMFU2sNawsrI21LS2sjaPBQAnNQQV
ngn
@ktye yes. i'm not sure what to do with missing items in list literals. it doesn't feel right to make "missing" and "::" the same
ktye
@ngn what is :: anyway? isn't it just a special "null" marker?
ngn
@ktye it's the identity function - the monadic verb with id 0
treated as a special case in some circumstances like here
ktye
@ngn my "null" is the k-value 0. it's type field (also 0) is a verb.
ngn
that makes sense. testing for it should be fast
ktye
15:25
why don't you fill :: at parse time, e.g. (1;;2)?
ngn
i could, but then people familiar with k4 might expect it to be equivalent to {(1;x;2)}
also, to add to the confusion, if f is a function, f[1;;2] should not be equivalent to f[1;::;2]
ktye
does (1;;2) make a projection in k4?
ngn
i think i've seen code using (;) as {(x;y)} somewhere
ktye
i just tried. it does indeed.
ngn
fun side effect
coltim
15:39
@ngn if I recall correctly doesn't k4 have a different null/nothing value in addition to
::
? I think I saw it
here
ngn
@coltim right. also
this
coltim
@ngn ah, so that explains half of
this
ktye
16:00
Which kind of scans are important and could have optimized implementations? +\I ? anything else?
coltim
@ktye &\ is useful on boolean lists for zeroing everything after the first zero
ngn
16:36
@coltim if order doesn't matter it could be a little shorter:
{1_x@&'+!x:'2}
coltim
16:47
in my golfs I've used
+\ ,\ *\ =\ ~:\ &\ -\
@ngn neat! I have to play around with
:'
more. also it's even shorter if the empty list is included (which I didn't in the other b/c it didn't seem like there was a super easy way to do so...)
ngn
@ktye interesting question. *\ &\ |\ ,\ seem important to me. -\ can be implemented as seeded +\
coltim
17:03
I guess more broadly if you're doing a scan with a binary associative operator there are opportunities to parallelize it
(c.f.
cs.cmu.edu/~guyb/papers/Ble93.pdf
)
3 hours later…
ktye
19:49
@coltim thanks. interesting paper.
@ngn seed +\? can you give an example?
ngn
x:20 8 5 2 -\x 20 12 7 5 (2**x)+\-x 20 12 7 5
@ktye ^
ktye
@ngn ah, ok.
« first day (841 days earlier)
← previous day
next day →
last day (694 days later) »
all rooms
Transcript for
Jun
25
Jun '21
26
Jun
27
the k tree
app.element.io/#/room/#ngnk:matrix.org
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2025 Stack Exchange Inc;
legal
mobile