« first day (205 days earlier)      last day (1330 days later) » 

ngn
ngn
12:06
@ktye why not put the html+js in a separate file or files?
I'll do that later. If it grows, the ui k code will be separated from the display driver. I just want a minimal k-terminal built-in with the -u option.
Did you check the speed of the current version? What display size do you use? I tested on 1920x1080.
ngn
ngn
@ktye speed seems ok for a terminal. my screen is 1920x1080 too.
Do you have an idea if the js/screen update can be optimized?
ctx.putImageData(new ImageData(new Uint8ClampedArray(s), w.innerWidth),0,0)
I'm not sure if that does not allocate too much each time.
ngn
ngn
mashing on the keyboard fills half the fishtank (half of my cpu cores run at 100%), but i'm sure that can be optimized later
@ktye js in html in k in go is hard to read...
12:22
I'm using single quotes on purpose for html tags.
The only problem are k symbols, because `go string` cannot be escaped. So I have to type `symbol:`+"`"+`name`
ngn
ngn
@ktye so, you send an http get for every keystroke?
yes.
Does k7 has websockets?
ngn
ngn
that explains the cpu usage when i mash on the keyboard
@ktye idk. if it doesn't, it certainly should have them
@ngn I think a request per key is not the issue. But sending the complete screen as a response and updating it...
ngn
ngn
@ktye yeah, that's the heaviest part
12:30
@ngn That's why I though about invalidation rectangles. Should be easy for characters. But tracking it for each ui operation could be messy.
ngn
ngn
@ktye why not let the k app decide what it wants to update?
in any case, you need websockets to reduce latency
@ngn If k7 adds them, I'll do too. I want to keep the ui compatible. But I don't even know how .Z.P should work, and if it's implemented already. Could not figure out.
ngn
ngn
@ktye what is .Z.P?
@ngn I mean .Z.G. That's what I use as the web handler. I guessed from the doc. q has .z.g?
ngn
ngn
i've no idea what any of those are
@ngn @ktye no websockets yet afaik. you can use shakti-python and a websockets library as a workaround
on a separate note - i admit i struggle to build a mental model of why these two cases parse differently (it's the same in oK afaik so not just a shakti thing):
2019-09-20 14:00:39 2core 3gb avx2 © shakti l test
 (</){(x*x;y*2)}/\(2;100)
2 100
4 200
16 400
256 800
65536 1600

 </{(x*x;y*2)}/\(2;100)
0 0
 `p "</{(x*x;y*2)}/\(2;100)"
(/;<)
((/;{(x*x;y*2)});(;2;100))

 `p "(</){(x*x;y*2)}/\(2;100)"
(/;{(x*x;y*2)})
(/;<)
(;2;100)
12:52
@chrispsn what is the /\? Are you sure that works in a string without quoting?
@ktye very good point:
 `p "(</){(x*x;y*2)}/\\(2;100)"
(\;(/;{(x*x;y*2)}))
(/;<)
(;2;100)

 `p "</{(x*x;y*2)}/\\(2;100)"
(/;<)
((\;(/;{(x*x;y*2)}));(;2;100))
needed to escape the backslashes. forward slashes should be ok
@chrispsn The difference is that (</) is a noun, where as </ is a verb. The noun is taken as an argument.
ngn
ngn
@chrispsn i wasn't trying to build anything with shakti. i only wanted to help ktye optimise his pixel-rendering server.
but i cannot understand the first one either.
I updated the fonts directory. It took me a the complete yesterday to draw a 16x32.
ngn
ngn
13:09
in the first expression (</) is the left argument to { }/\ , it's like the condition in a while loop
@ngn yeah. i was confused as to why brackets made a difference
this reads cleaner to me: {(x*x;y*2)}/\[</;(2;100)]
ngn
ngn
@chrispsn (2;100) -> 2 100
true!
ngn
ngn
13:41
@chrispsn so, monad monad\ is a while loop where the first monad is the condition and the second the body. a natural extension would be to allow dyad monad\ and evaluate dyad between consecutive elements of the sequence
afaik no k version does that

« first day (205 days earlier)      last day (1330 days later) »