« first day (405 days earlier)      last day (1130 days later) » 

11:34 AM
@JohnE this is sick
did you change anything about your approach to parsing/writing a subset of k as compared to oK?
on the 'where' impl, maybe a division or mod or decode would work?
 
 
3 hours later…
2:23 PM
@chrispsn the parser in this case is still a recursive-descent approach riddled with special-cases, but I'm working on simplifying it. The ASTs are much simpler, and I rationalize adverbs and all forms of application into verbs and dot-apply, respectively, at parse time. Special K has a more clearly delineated tokenize-parse process than oK, and the compiler is totally different from the oK interpreter; among other things I have to perform static type inference.
 
2:34 PM
@JohnE very interesting! is it building an array of pixels for each frame?
btw, i do similar things (type inference) in w, that compiles from k/apl syntax to wasm.
 
@ktye that's essentially how a fragment shader works, yes. The shader program is run in parallel for every pixel which is drawn. All the program knows, in each instance, is the x/y/z screen-space coordinates that the rendering pipeline has produced so far, and any other "uniforms" of metadata that are automatically fanned out to every fragment. The output of the program is an RGBA color value for that pixel.
 
@JohnE but glsl also works on 3d types, triangles, viewport, rotation etc. do you plan to do that as well?
 
3:01 PM
that stuff all happens in vertex shaders. Maybe eventually.
 
 
1 hour later…
ngn
4:05 PM
@chrispsn very fast permutations, not in lexicographic order: {,/'@[;y,!y]\:x,,(#*x)#y}/(,0 1#0),! thanks to @dzaima
 
 
1 hour later…
5:07 PM
it would be mostly trivial to make the special-k compiler emit vertex shaders, too (it's the same target language), but it would make the setup of the sandbox quite a bit more elaborate and you'd want a few features that are currently still nyi like the matrix types
 

« first day (405 days earlier)      last day (1130 days later) »