Please try it out. I hope you enjoy it. Criticism, questions, suggestions, insults and any other sorts of comments welcome.
Name:
Anonymous2014-09-18 23:38
>>1 I remember you showing us this. Thank you for sharing it. you've given away a piece of your soul and you'll never get it back. munch, munch, munch...
>>2 I know. You noticing and acknowledging that really affected me. I felt that offering this genuine thing, whether people think its good/bad/useless/whatever is worth doing just for the sake of being genuine. If it brings another programmer some enjoyment, that would be great.
>>4 Feel free to remove it. (Not being snarky) Add callbacks to forthCallbacks.cpp and lispCallbacks.cpp according to your taste. I'll be doing that anyway, but you can do it in the meantime.
>>12 I don't have a machine that runs OS X, but it might work with a few (or several) tweaks if you ensure that the #define __PRAXIS_LINUX__ is set. You need to link against sdl and freetype.
>>17 Holding the right mouse button lets you pan (it lets you grab the universe by the pick position and moves the universe around you like a demiurge), scrollwheel moves the camera forward and back.
>>28 Thank you. Thank you very much for appreciating this program. Its good to know that this program found its way to people who can understand it and enjoy it.
Name:
Anonymous2014-09-23 9:33
I'm very impressed, OP. The next time I want to do some protyping visualization work, I'll be using Praxis to help me.
Name:
Anonymous2014-09-23 20:36
This is pretty cool, OP. Although Lua is shit, it's fun to play around.
Major opcode of failed request: 155 (GLX) Minor opcode of failed request: 3 (X_GLXCreateContext) Value in failed request: 0x0
I'll find out more about it later.
Name:
Anonymous2015-05-08 11:40
>>45 Try removing GLUT_OFFSCREEN from line 87 in SingleWorldConfiguration.cpp. That should fix it, however you'll end up with a second window that displays the contents of the offscreen scratch buffer.
Good to see the Lisp implementation embedded in Praxis can run the metacircular evaluator pretty well.
A simple spirograph for praxis:
edSetRenderMode(0)
glColor = colorGL
function glVec(v) vectorGL(v.x, v.y, v.z) end
function pointOnCircle(angle, radius) local v = vec3d(radius * math.sin(angle), radius * math.cos(angle), 0); return v end
------------------
if spirowidget == nil then spirowidget = WidgetLib.newSimple() end
streamer = Queue.new() function addPointToStreamer(s, p) Queue.pushfirst(s, p) if Queue.size(s) > 1000 then Queue.poplast(s) end end
function renderStreamer(s) beginLinGL() colorGL(255,255,255,255) for i=1,Queue.size(s)-1,1 do local p1 = Queue.get(s,i) local p2 = Queue.get(s,i+1) glVec(p1) glVec(p2) end if Queue.size(s) > 50 then local i = 40 local p1 = Queue.get(s,i) local p2 = Queue.get(s,i+5) local p3 = p1 * 0.8 local p4 = p2 * 0.8 glVec(p1) glVec(p3) glVec(p2) glVec(p4) glVec(p3) glVec(p4) end endGL() end
do spirowidget.cogs[1].speed = 1 spirowidget.cogs[2].speed = 4 spirowidget.cogs[3].speed = 7 streamer = Queue.new() end
function spirowidget.render(w) setmetatable(_G, { __index = function(t,k) return spirowidget[k] end } ) glColor(190,190,10)
local p1 = vec3d(0,0,0) local p2 = pointOnCircle(cogs[1].angle, cogs[1].radius) drawLine(p1.x,p1.z,p1.y, p2.x,p2.z,p2.y) for i=2,#cogs,1 do p1 = p2 p2 = p2 + pointOnCircle(cogs[i].angle, cogs[i].radius) drawLine(p1.x,p1.z,p1.y, p2.x,p2.z,p2.y) if i==#cogs then addPointToStreamer(streamer, vec3d(p2.x, p2.z, p2.y)) end end
renderStreamer(streamer)
for i=1,#cogs,1 do cogs[i].angle = cogs[i].angle + ((cogs[i].speed / 180) * 3.14159) end setmetatable(_G, nil) end