jonas
01/06/2020, 1:01 AMjonas
01/06/2020, 2:20 AMDon Abrams
01/06/2020, 5:37 AMDoug Moen
01/06/2020, 1:35 PMjonas
01/06/2020, 3:28 PMjonas
01/06/2020, 3:37 PMIvan Reese
Doug Moen
01/06/2020, 8:13 PM@jonas Did you run into any major roadblocks implementing this?Lots of things. • GPU programming is terrible. • I wrote a multi-stage compiler that performs partial evaluation and optimization. It is difficult to write, and I'm still working on it. • I use reference counting to manage memory. I don't know any online resources that explain how to create recursive function closures without cycles, but I figured it out. • I use signed distance fields and implicit functions to represent geometric shapes. That's a niche technology, and I'm doing original research and inventing new techniques to overcome some of the limitations I have run into. • Conal's design for the Reactive part of FRP is looks complicated to implement. I'm not working on that bit right now, but I expect to encounter some challenges when I do.
Conditional looping typically isn’t available in shaders for exampleMy oldest test machine has a 2010 Nvidia GPU: the GPU driver will accept
for
loops with a compile time bound on the number of iterations, but it will not accept while
loops, so a subset of the Curv language doesn't work on that machine. Modern GPUs have no problem with looping, and loops are required for general 3D fractals and noise based procedural modelling. My eventual plan is to drop support for GPU hardware that predates 2012, and migrate to a modern, cross-platform GPU API (probably WebGPU).Ivan Reese
I use signed distance fields and implicit functions to represent geometric shapes. That's a niche technology [...]Is it niche? I'm pretty sure both implicits and SDF are pretty common in games. If I recall correctly, it's common to use implicit surfaces for physics and SDF for some lighting effects, for instance. Am I missing something?
Ivan Reese
Doug Moen
01/06/2020, 8:30 PM@Ivan Reese Conal wants everything to be exactly precise real numbers, rather than approximations using rational numbers.I could do cool things with that technology if it was practical, but obviously it isn't. Besides being too slow to actually use, you also can't compare exact real numbers (computational reals) for equality--that's the same as solving the halting problem. On a GPU, 32 bit floating point arithmetic is never slower than 32 bit int arithmetic, and is typically faster. So on the GPU, I just use 32 bit floats for everything, unless I actually need an int. I honestly didn't put a lot of thought into that, it just seemed like the only good choice. Sounds like you are doing something more clever than that.
Ivan Reese
Doug Moen
01/06/2020, 8:34 PMIvan Reese
Doug Moen
01/06/2020, 8:39 PMIvan Reese
Ivan Reese
jonas
01/06/2020, 8:58 PMjonas
01/06/2020, 9:01 PMjonas
01/06/2020, 9:02 PMfor
loops but I didn’t know while
is available on some machinesDoug Moen
01/06/2020, 9:15 PMDoug Moen
01/06/2020, 9:26 PMEdward de Jong / Beads Project
01/07/2020, 2:43 AMIvan Reese
Doug Moen
01/07/2020, 5:35 AMEdward de Jong / Beads Project
01/07/2020, 7:21 AMStefan
01/07/2020, 8:03 AMDoug Moen
01/07/2020, 9:03 PMIvan Reese
I don't know what you mean by functional.FRP is "functional" in the sense of Functional Programming — it's an approach to specifying animations using function composition, where each function describes how to transform some input graphic according to some input time. What the animation does is captured by the combination of functions and their return values as you vary the time input. It sounds like CA works a bit like Greensock or Web Animations and other OO animation tools, where you create some state object to represent the animation, specify properties and values on the object, and then submit that object to some engine. What the animation does is captured by the data in that object and what the engine does based on it. Then there are the procedural animation tools, like Processing or the HTML Canvas, where you write code that is executed every frame. What the animation does is a side effect of your code directly manipulating or generating the graphic.
Edward de Jong / Beads Project
01/08/2020, 7:41 AMDon Abrams
01/08/2020, 7:41 AMEdward de Jong / Beads Project
01/08/2020, 7:51 AMEdward de Jong / Beads Project
01/08/2020, 7:55 AMjonas
01/12/2020, 2:56 AMjonas
01/12/2020, 3:04 AMjonas
01/12/2020, 3:13 AMDoug Moen
01/12/2020, 7:21 PMa==b
is an equivalence relation: `a==a`; a==b
implies `b==a`; a==b
and b==c
implies a==c
. Unlike most dynamic languages, the boolean operations obey all the axioms of a boolean algebra. For example, unlike in Python Javascript Lisp, the boolean and operator is commutative. This all falls under ease of use: simple language semantics, no surprises.
However, there are some kinds of mathematical purity in Haskell culture that are detrimental to my goals.
• Lazy function calls are a net loss; Curv uses strict argument evaluation in function calls.
• Static typing is a big barrier to learning a language, and is incompatible with live programming, so Curv is dynamically typed.
• I haven't built a Turing complete reactive API yet, but DCTP looks really hard to understand. The Elm language transitioned from "mathematically pure" FRP to "the Elm architecture", which is much easier to understand, and it is still "pure functional" and "reactive". So I'll probably take my lead from Elm, begin with the Elm architecture, and iterate from there.wtaysom
01/13/2020, 12:53 AMDoug Moen
01/13/2020, 2:22 AMwtaysom
01/15/2020, 6:14 AMEdward de Jong / Beads Project
01/15/2020, 8:38 AMwtaysom
01/15/2020, 11:31 AM