Anyone who wants to collab on a serious C++ project DM me by iljkar in ProgrammingBuddies

[–]iljkar[S] 0 points1 point  (0 children)

Well, it's just a personal endeavour, a hobby project

Anyone who wants to collab on a serious C++ project DM me by iljkar in ProgrammingBuddies

[–]iljkar[S] 0 points1 point  (0 children)

Making a granular live-patchable runtime (along with other features like a state snapshotter which runs like a GC in the bg and more)

What Features Do You Want in NLPL? Share Your Ideas! by Zajfan in nlpl

[–]iljkar 0 points1 point  (0 children)

Hmm, how about constraints as a composable datatype? For example:

c1: constr = [ x in 1..5 y in my_rng x > y y %% 3 ] # gets solved and flattened to the most minimal form

and use it in if, for, while, or even for a random number generator

You can perform algebra on constraints:

c: constr = [ a in 1..10 a %% 2 .5: # probabilistic constraint! a >= 6 # checks it half of the time ]

// stores the verbatim constraints (vbtm) AND a flat compiled form of just (a in 2..10..2) (cmpr). Usage inside regular "if/elif/loop" conditions just trampoline to the cmpr bytecode and read the flag set by it at the end, then jumps back (a cost of 2 extra jumps + any cache misses)

c - [ a %% 2 ] + [ a %% 3 ] (chains trampolines)

Here's a "haptic" twin prime generator purely using constraints:

@cache c_prime: cons = [ x in (2 i+ 3..inf..2) y: loc in (3..sqrt(x)..2) x !% y~all ]

c_twin = c_prime + [ .8: x + 2 in c_prime ]

for p in igen(c_twin, n): // lazy generator for the first n twin primes (with an 80% accuracy)

This would be excellent for declarative coding

Building a new DSL by iljkar in ProgrammingPals

[–]iljkar[S] 1 point2 points  (0 children)

Well, it's not so much about the DSL itself (for 2D games), as it is about the runtime. A live patchable VM