Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

praxis - An interactive programming environment

Name: praxis 2014-09-18 23:13

Hello /prog/, here is praxis, an interactive programming environment.

https://github.com/createuniverses/praxis

Please try it out. I hope you enjoy it. Criticism, questions, suggestions, insults and any other sorts of comments welcome.

Name: Anonymous 2015-05-06 1:12

>>38
lolilang.org

Name: Anonymous 2015-05-07 11:46

>>37,39

After getting Io to compile, I managed to cram the Io language into praxis.

The Io interpreter can be invoked with iolang(""). It returns the response from the Io interpreter.

The Io render function is called every frame and can be redefined. Run iolangexample.lua to see a simple example.

I've only added a drawLine callback so far.

Enjoy!

Name: Anonymous 2015-05-07 13:29

>>42
that was quick

I'm building it now, I'll try it out after work

Name: Anonymous 2015-05-07 22:16

Bump for Io in praxis

Name: Anonymous 2015-05-08 1:54

>>42
Well, X_GLXCreateContext fails.

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: Anonymous 2015-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.

Name: Anonymous 2015-05-09 0:51

>>46
That works, ta.

Name: Anonymous 2015-06-24 22:53

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 = {}
spirowidget.cogs[1] = { radius = 10, angle = 0, speed = 1 }
spirowidget.cogs[2] = { radius = 5, angle = 0, speed = 4 }
spirowidget.cogs[3] = { radius = 7, angle = 0, speed = 7 }
--spirowidget.cogs[4] = { radius = 9, angle = 0, speed = 4 }
--spirowidget.cogs[5] = { radius = 11, angle = 0, speed = 2.5 }
--spirowidget.cogs[6] = { radius = 4.3, angle = 0, speed = 3.7 }
--spirowidget.cogs[7] = { radius = 8, angle = 0, speed = 2.3 }
streamer = Queue.new()
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

Name: Anonymous 2015-08-01 14:37

48
That looks like an acceptable lisp.

Name: Anonymous 2015-10-29 10:14

BUMP THIS EXCELLENT THREAD

Name: Anonymous 2015-10-29 12:20

>>49
what makes it an "acceptable lisp"?

Name: Anonymous 2015-10-29 13:52

>>51
XML

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List