
ClojureScript de Jong Attractor - mindbat
https://github.com/cjlarose/de-jong
======
cjlarose
Author here! I experimented a bunch with different ways to calculate the
plotted points. WebGL shaders outperformed everything by a mile, though it was
weird dropping down into what's essentially a low level C-like language. Check
it out [https://github.com/cjlarose/de-
jong/blob/master/src/de_jong/...](https://github.com/cjlarose/de-
jong/blob/master/src/de_jong/components/point_cloud.cljs#L7-23)

~~~
mikekchar
Obviously I'm showing my lack of knowledge here. I really only know enough
about Open GL to look stupid on the internet ;-)

I've often wondered, though, how hard it would be to write a lisp compiler
that outputted ARB, rather than use GLSL for coding shaders. Is this possible?

I may be completely wrong, but my gut feeling is that shader coding seems like
it would be a natural fit for functional languages.

~~~
th0ma5
I think there have been a few efforts to do such a thing. A quick search of
github and I found
[https://github.com/kovasb/gamma/blob/master/README.md](https://github.com/kovasb/gamma/blob/master/README.md)

~~~
cjlarose
I stumbled upon gamma when I first starting looking into shaders--it's pretty
incredible what it's doing. mikekchar is exactly right, I think, in thinking
that lisp is a good candidate for creating what's described as embedded
domain-specific languages (EDSLs). When I first explored writing my own shader
for this project, I opted for doing it myself just so I could get a better
understanding of what's happening under the covers, with the intention of
maybe introducing gamma later. It ended up that my shader was super simple--
just a for loop and some basic trig math, so it wasn't super necessary to
migrate. But, from what I've heard, even mildly complex shaders can get out of
hand quickly, so gamma and projects like it are super promising.

------
balloob
My favorite is the cube: [http://goo.gl/qnDIFW](http://goo.gl/qnDIFW)

~~~
cjlarose
Make sure to check out the perfectly circular ones, too!
[http://goo.gl/zilq50](http://goo.gl/zilq50)

------
jsprogrammer
Destroyed my back button.

------
currentoor
This cjlarose guy sure is talented!

