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

Pages: 1-4041-

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 2014-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...

Name: Anonymous 2014-09-18 23:47

>>2
No I haven't. Souls are indestructible (the immaterial is indestructible), whole, and non-quantifiable things. No such thing as a ``part'' of it.

Name: Anonymous 2014-09-18 23:51

luaInterface.cpp
I see two things wrong here.

Name: praxis 2014-09-19 0:10

>>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.

>>3 isn't me.

>>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.

Name: Anonymous 2014-09-19 0:40

>>2
suck on it theist-kun

>>5
it was delicious. I can't wait until you give out more. munch, munch, munch...

Name: Anonymous 2014-09-19 1:27

>>6
You're like that guy in those series of shock images; dressed in overalls with his dick out and pissing on his stuffed animals.

Name: Anonymous 2014-09-19 2:46

When I tinker with this I get the feeling of exploring a child's imaginary world.

Name: Anonymous 2014-09-19 7:11

That is TDavis quality code.

Name: praxis 2014-09-19 8:25

>>8
Thank you. That was the idea. Programming is supposed to be play in this environment. Everything you see is accessible and programmable.

>>9
Thank you? I haven't read his code but I can understand his motivation to create his own computing environment.

Name: Anonymous 2014-09-19 10:32

.cpp
NO THANK YOU

Name: Anonymous 2014-09-19 14:39

Any plans for OS X support?

Name: Anonymous 2014-09-19 15:19

>>11
This is why you'll get nowhere in life

Name: Anonymous 2014-09-19 15:23

Any plans for Arch support?

Get it?

Name: Anonymous 2014-09-19 16:40

>>13
And this is why you're a shit apper

Name: [Feature request] 2014-09-19 17:41

Make it so I can code while dead as well.

Name: Anonymous 2014-09-19 20:05

I can look around by moving the mouse. Can I move as well?

>>14
yes

Name: praxis 2014-09-19 21:55

>>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.

Name: Anonymous 2014-09-20 4:38

>>18

OSX - a better Linux.

Name: Anonymous 2014-09-20 5:03

>>19

dumbass

Name: Anonymous 2014-09-20 6:15

>>18
if you ensure that the #define __PRAXIS_LINUX__ is set
But that's undefined behavior

Name: Anonymous 2014-09-20 8:46

>>20
No calling people names. Have a timeout.

Name: Anonymous 2014-09-20 10:50

>>20
I know, it's a better BSD. What a moron.

Name: Anonymous 2014-09-20 11:20

>>23
Fool! It's a worse Mach.

Name: Anonymous 2014-09-20 12:48

>>1
It's beautiful.

Name: Anonymous 2014-09-20 14:22

A live coding environment based on Lua,
http://reddit.com/r/programming

Name: praxis 2014-09-20 15:25

>>25
Thank you.

I've uploaded a couple of demonstration videos:
https://www.youtube.com/watch?v=6rB39AXPmQQ
https://www.youtube.com/watch?v=1VRtRazMYSA

>>26
My program is insufficiently webscale for reddit.

Name: Anonymous 2014-09-20 15:37

This is really cool. "The Cave" looks like a dream I had. I love you, OP.

Name: Anonymous 2014-09-20 15:44

>>26
Why are you directing him to a programming site for his ``coding''?

Name: Anonymous 2014-09-20 15:56

Name: praxis 2014-09-20 17:03

>>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: Anonymous 2014-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: Anonymous 2014-09-23 20:36

This is pretty cool, OP. Although Lua is shit, it's fun to play around.

Name: praxis 2014-09-25 9:57

>>32,33
Thank you. It does include Lisp (in the form of s7 scheme), I just haven't provided callbacks to C for it yet.

Name: Anonymous 2015-05-05 21:25

this needs a bump

Name: Anonymous 2015-05-05 21:47

>>35
I am honoured. Thank you.

Name: Anonymous 2015-05-05 22:31

>>36
If you add Io support I can get a few Io nerds to use it.

Name: Anonymous 2015-05-05 22:43

>>37
At the risk of getting flamed, what is "Io"? Searching for "Io" is a fruitless excercise.

Name: Anonymous 2015-05-05 23:11

>>38
http://iolanguage.org/

It's not a popular language, but it is discussed here sometimes.

It's like if Lisp was Lua and Lua was Smalltalk and Smalltalk was Lisp.

Name: Anonymous 2015-05-05 23:16

>>39
Looks interesting! I'll try it out.

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

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