« first day (269 days earlier)      last day (1266 days later) » 

7:50 AM
on wc, if we're purely golfing:
+/+1,(1=;<':4=)@\:" \n\t\r"?
also thought moving \n to the first position in the string and then using ~: instead of 1= would help, but it seems to be very slightly slower (at least for now)
 
8:18 AM
(on the above golf - also assumes order doesn't matter)
 
 
3 hours later…
ngn
11:33 AM
@chrispsn nice. also \t could be a literal ctrl+i
 
12:06 PM
@ngn does... that count?
 
ngn
@chrispsn well, if we're purely golfing
\t is 2 bytes, 0x09 is 1 byte
 
 
5 hours later…
4:50 PM
i updated ktye/wasm building with tinygo to 300kB. I removed the ui stuff and use a normal textarea now. everything builds to a single file and can be loaded from a file url.  image output is still possible with the w 9:i io verb. example:
ktye.github.io/#(w%3Bh)%3A800%20600%3Bu%3A(w*h)%230%3Bcmap%3A%7B(65536*x)%2B(256*256-x)%2B64%2F(x-127)*x-128%7D%5B!256%5D%3Bmandel%3A%7Bd%3A1.5%202.5%3Bc%3A%7Cd-2*d*(!n)%250.%2Bn%3Ax%3Bs%3A%7B(-%2Fx*x%3B2*%2Fx)%7D%3Bm%3A%7B%2B%2Fx*x%7D%3Bu%3A%3A%2C%2Fw%23'cmap%4016*(!16)%40%2B%2F(*%5C15%234)%3C%5C%3An%23m%2010(c%2Bs%40)%2F0%200%3B%7D%3Bmandel(h%3B
? is an error (the message can only be seen in the js console). running the above twice is a ws error, e.g.
 
 
5 hours later…
ngn
9:32 PM
@ktye 300kB could be "tiny" or "huge" depending on the point of view :)
 
@ngn did you try the new site? At least it should load 10x faster.
 
ngn
@ktye yes, it seems faster
 
10:10 PM
@ngn \r too then (as ^M)
 
ngn
@AntonioNikishaev i tried that but got a parse error
(^V^M in an rlwrapped k7, in bash, in gnome-terminal)
 
ah. Works in kdb's k4. But you can replace \n in k7 (?!): echo $'+/+1,(1=;<\':4=)@\:" \n\t\\r"? "foo bar quux"' | ./shakti-2019.09.20/bin/k
 
ngn
@AntonioNikishaev i'm not sure
$ echo -e '"\n"' | shakti/bin/k
"
^
parse error
 
@ngn but echo $'"\n\t"' | ./shakti-2019.09.20/bin/k"\n\t"
 
ngn
10:28 PM
@AntonioNikishaev you're right. i've no idea what's going on there in the k7 parser.
it's probably the rule that any line that starts with a space or tab is a continuation line
this rule was present since at least k5
so, echo $'"\n "' behaves the same way, but if you put any other char after \n, it should fail
why does arthur even bother with tabs?! :) it would be better if he supported "}" (too)
k scripts should be expected to contain code like this:
f:{
 screw the poor customers of this bank
}
while k forces you to write code like:
f:{
 screw the poor customers of this bank}
 
@ngn yes!
 
ngn
@chrispsn it's probably that ; and \n are always equivalent
and if you have a \n before the }, that means the last expression in your function is empty, and therefore evaluates to ::
which is also the result from the function
 
@ngn yeah. I vaguely remember oK being able to handle it but could be mistaken
 
ngn
10:44 PM
@chrispsn yes, it does handle it as a newcomer from other languages would expect
ngn/k is in line with atw/k in this case, but now i might reconsider it
i do accept } in the first column (unlike atw/k), but it still evaluates to :: (which is not printed)
btw, today's traffic in the google group makes me sad - so many people solve and golf in k7 without even thinking about whether k7 is better than k5/k6
 
@ngn was k5/k6 ever available? when/where?
 
ngn
it makes me think once again whether i should start mimicking k7, even though i'm unsure about the quality of its design
 
@ngn also - the group is the k7 discussion group
 
ngn
@ktye i got a copy of k5, complete with z (the graphical interface of an early kOS) in 2014, but i lost it in a hard disc failure after i accidentally dropped my laptop
 
@ngn was that publicly available, or a privat copy?
 
ngn
10:56 PM
@ktye private. from arthur himself. i wasn't familiar with his work or j, and even not so familiar with dyalog apl back then.
 
@ngn why don't you reply back with examples of how the solns would look in k5/6?
Things are still reasonably in flux regarding language design IMO
 
ngn
@chrispsn i put mine in the repo
 
Attila and I got #1 down to:
1_*++/\+1_(0|-2+3/)\`i$0:`1.txt
 
i just struggled implementing k7-style dot indexing. usually a single enlisted dict is converted to a table, but this is prevented in some cases. You add nulls in a.b.c:3;a
But what is this?
https://tio.run/##y9bNS8/7/z8hUTEhSTEhWdH4/38A
 
ngn
@ngn i don't want to stir up the k7 group. if i talk too much, i might say things they don't like to hear, and i might get kicked out.
it wouldn't be hard to get access to what's being said there again, but anyway, out of decency..
 
11:07 PM
Depends on how you frame it, I guess
 
ngn
@ktye this is a bug. `b! sees `c!3 as a 2-element (keys;values) list. it shouldn't.
 
@ngn i think k7 does for x!y : if x is an atom, enlist x and enlist y (even if y is not an atom itself)
it's hard to read it the current state of the half-removed dict literals
 
ngn
 `b!`c!3
`b!{c:3}
@ktye ^ {c:3} doesn't look enlisted there
i think it simply allows another dict as values
 
@ngn when printing it removes one level (instead of printing (,a)!,1 2 it is a!1 2
if you take away the literal form
 
ngn
@ktye damn.. you're right
 (,`b)!,`c!3
`b!{c:3}
 (`b!`c!3) ~ (,`b)!,`c!3
1
so, ,{c:3} (the values of the dict) must actually be a table
 
11:20 PM
 ,`a!3
+{a:,3}   it is
 
ngn
gtg to sleep now. will fix next evening. thanks everyone for teaching me how it should be.
 

« first day (269 days earlier)      last day (1266 days later) »