Live Coding or REPL for linux

Hi I am new to OF from processing. The build times for even simple things are a little bit annoying. Is there a recommended ‘live coding’ or REPL available for OF?

I’m looking for something general-use. Cyril is a bit too specific and it’s own language to boot so its not what I’m really looking for. I know there are a few options out there, but what I could find is either old or Mac specific.

If there are no options is there a way to speed up build and compilation?

you could try Gamuza or ofxLua:


Please pardon my ignorance, but the only way to get what I’m looking for is to use another language with API bindings? The only problem with Gamuza is the current version doesn’t support Linux yet.

Do people do things to speed up compilation or do most OF users simply code, compile and run their app?

If you’re coding on a Raspberry Pi or other resource constrained device, then there are really nice techniques for speeding up compilation ( as one example) but in general I think people use OF in the way you’re describing: code, compile, run. If there’s something you need to see realtime feedback on then you can always parameterize it and create a gui to modify values. Another technique is to do a lot of your graphics work in GLSL, which can be reloaded at runtime without affecting the program running it. Combining that with a filewatcher for textures, models, and a GUI gives you a lot of control.

Thanks for educating me on that aspect of openFrameworks Josh.

With respects to the GLSL concept are you inferring that I use an addon like this to tweak GLSL shaders and graphics?

You can, you can also see examples of live-reloading shaders in the examples/gl/vboMeshDrawInstancedExample example

What kinds of compilation times are you seeing? The main library takes a couple of minutes or so to compile, but you only do that once. How long do your projects compile??

Awww man, I hope I don’t sound whiney now.

It takes about 10-15 seconds minimum for drawing and animating graphical elements. I have become accustomed to the near instant gratification of processing and wanted to make sure that waiting for an admittedly quick compilation was normal.

I’d say this is normal. Also, I totally feel your pain, that’s one of the reasons I like interpreted languages so much… it’s really hard to come back to C++ from Python, sometimes. :slight_smile:

This is probably basic to pretty much everyone here, but I read up a bit on the make process. It turns out I can compile in parallel with

make -j
and even get more specific, for example to use 2 cores:
make -j2

Compiling with all 4 cores on my laptop made things alot more comfortable for me.

I also left code::blocks and setup the Eclipse environment per the instructions. Eclipse allows me to easily check multicore compiling as I setup the project. (code::blocks svn doesnt have vim-bindings and is a tiny bit buggy on arch-linux)

I like Eclipse so far, its just kind of a bummer to set up the debug, references, etc for each project. Is there a way to expedite this?