« first day (927 days earlier)      last day (608 days later) » 

00:55
the other problem with generating JS is that all your programs will be welded to the browser permanently
01:54
given the general arc of the software world toward a browser monoculture owned or funded exclusively by ad companies it doesn't seem like a great idea to design new standards and tools which are reliant on this substrate. it should instead be the goal to support the browser as one of many platforms
 
1 hour later…
03:15
@coltim Indeed, fixed
@coltim Nice one, < and > are useful on booleans which I hadn't considered
@chrispsn Thanks, appreciated
ngn
ngn
@JohnE isn't iKe welded to the browser too?
ngn
ngn
03:30
what are some popular non-browser platforms for games? sdl?
the only aspect of native browser APIs iKe exposes is css colors, and that's a problem of bounded complexity
Adobe AIR used to be a thing
sdl is a popular portable 2d graphics abstraction layer
SFML, Allegro, and DirectFB are also options
ngn
ngn
@Razetime flex?
ah, pretty much
03:38
and then there's a whole zoo of OpenGL wrappers for different platforms
GLUT being perhaps the best known but also pretty creaky
ngn
ngn
everything non-browser depends on 2: ("load library")
i think i should be working on that
for the browser, the wasm editor just needs a rendering loop and keyboard events, and tetris will become possible :)
@JohnE so, theoretically there could be an iKe impl for sdl or something similar
how do games render scenes in practice? it would be madness to do it pixel by pixel
and i guess it would be also too costly to cross the language boundary for every object drawn on screen
is there a language with which to describe everything to be drawn in a frame as a single string? svg?
03:55
@ngn polygons, I think?
04:20
@ngn that's the idea
old games used either a framebuffer or "graphics modes" which would do some configurable sequence of compositing operations; background layers, sprites, etc. modern graphics cards are built for rendering 3d scenes. You prepare big buffers representing meshes in one of a handful of formats and then pump those through a shader pipeline, the most basic of which includes vertex and fragment shader programs
even if you want to draw a 2d image, it is logically drawn in 3d on these systems; perhaps as a chunk of texture memory being drawn on a quad made of two triangles
you really don't even want to know how much shit goes into something as apparently simple as text rendering
ngn
ngn
@JohnE well.. if you're doing it from scratch, it's gonna be complicated
if you just use canvas's method for rendering text, it's easy :)
and computing sines is easy if you link libc
ngn
ngn
yeah, good analogy
ngn
ngn
04:41
@JohnE why did you choose 160x160 as the size of the drawing area?
a power of two would have seemed more natural to me
the palm pilot had a 160x160 pixel display. seemed like a nice size.
i like 400x400 for some reason
ngn
ngn
05:03
the most natural size should be 1x1 :)
400x400 was the khanacademy animation size :)
ngn
ngn
actually, i tried to make it 1x1 (logical size, not physical pixels) but canvas doesn't let me draw rectangles in that
that might have something to do with the fact that polygons are drawn without their rightmost pixels
tetris could be implemented as 1 pixel per block, and then scaled up.
ngn
ngn
right
@JohnE i think the result from the draw function in iKe would be nicer if it was allowed to be hierarchical, with nodes representing translations, rotations, and scaling
05:26
how about 3 overloads for ' bin/win/lin: x'y (bin) n'x (win) x y'X (linear interpolation)?
ngn
ngn
@ktye lol. they should be overloads of & ("min") :)
btw i removed keywords from the parser. the most useful was "in", which is annoying to use with brackets. i overloaded x':y for in. i'll have to see how it works out.
 
6 hours later…
11:11
@ngn how do i make it not seg fault and what generaly happening here ?
`K("{!x}",(int)10);`
why does {x} doesn't seg fault but {x+1} does ?
I think the tail arguments to K have to be k objects, not raw integers. passing (int)10 is invalid, but {x} doesn't touch the invalid object and so things go fine
yup, i get ya. k("{!x}", k("10")) this works but i want to know how to i make it happen in c. i am so lost with all the macros and the basic stuff.
i have no clue either how to make an integer k object ¯\_(ツ)_/¯
soon, soon.. we will know, and we will REVOLT!!!
11:28
ai(10) maybe?
didn't check, went to look where its defined. didn't find it in the macros. is it this (codeberg.org/ngn/k/src/commit/…) ?
yea, works. thank you.
@meyt4r yeah. Type functionName(arguments)_(code) is how ngn defines functions
11:50
@ngn after doing K("2 2 2#!10") in c , how do i access the different atoms ?
and how does it look when it !"ab" or !1.0 ( string or float ) in c code ?
12:05
`
r0= K("{ 2 3 #!x }",ai(10));
ov( (_n(_V(r0) )) ); // 2
ov( (_n(_V(r0)[0])) ); // 3
r0= K("{ 2 3 #!10}" );
ov( (_n(_V(r0) )) ); // 5
ov( (_n(_V(r0)[0])) ); // d
`
this is what i got , but i don't understand the 5 and d .
in the second case you're reading the length of a function, which doesn't really make sense since a function isn't an array
I think r0 = K("{ 2 3 #!x }",ai(10)); (A*)_V(r0) should be a pointer to the two items of 2 3#!x
r0 = K("{!x}",ai(10)); (B*)_V(r0) should be a pointer to the items of the result. But that's only for 8-bit results, you'd need H* for 16-bit, I* for 32-bit, L* for 64-bit
(i'm guessing everything here, i don't have ngn/k set up to play around with)
@dzaima yes, this is my mistake.
so how do i get to the second element of the first list ?
i can't seem to manage to figure it out.
12:29
((A*)_V(r0))[1]?
nope, i am checking it on the result of K("`$i 2 3#!10")
ok, thank you very much for the help.
((I*)((A*)_V(r0))[1])[0] this is what i got right now and it seems to give a right answer
12:45
yeah that seems about right
 
2 hours later…
14:37
@ngn could work. there should definitely be a leading symbol or something identifying the operation; iKe's approach doesn't really scale out to a wider set of drawing operations
 
7 hours later…
ngn
ngn
21:33
@meyt4r if instead of "r0" you use "x" as the name of the result, you'll be able to write "xn" for the length and "xx" for the first item

« first day (927 days earlier)      last day (608 days later) »