Can openFrameworks do live coding and how


im also still invested in using lua as well. so im sure that something will also pop up on ofxGLEditor in the future


hmm, let me check it out later i think my build was a hodge-podge of the command line and the actual makefile.

that project looks cool, i used LOVE2D for all my stuff before i found openframeworks (they seem similar).

have you used shadertoy? that project is inspirational for me, they just added a networked broadcast of whoever is livecoding:


Poco::DirectoryWatcher was introduced in Poco 1.5, but OF 0.8.4 currently ships with Poco 1.4. I’ll wait until the next OF release to see if script watching can be added. In the meantime, the ofxIO addon provides similar functionality, so you could use it coupled with ofxLua.


oooh. thanks ill have a look at ofxIO


I would like to mention the projucer, an IDE for editing JUCE code in realtime.
Here is a demo of the projucer. Unfortunately, it has not been released, as far as I know.
Probably not very helpful, but interesting concept.


aye, i saw projucer, wow, cant remember actually, think when that first came out, in 2012?. but do remember i was doing a bit of juce, but there were things i didnt like about it. but the concept is great though


It’s amazing what people do in C++, I won’t be so quick to judge the boundaries of the language next time. @danomatika I think the master branch currently uses poco 1.4.3 do you know if they plan to update it?


Apparently so, since Apothecary targets to build POCO 1.6.0 in master branch


i’ve been messing with recently.

this video uses OF84 for osx,
xcode for editor,
dynamically recompiled c++ for scripting

however, there is a huge restriction at the moment: the parts of the code that get recompiled cannot make any calls to OF (e.g. no drawRect or other smililar stuff).
for this to work OF would have to be compiled as a dylib (should be possible, just haven’t had time to look into it).


like that. very nice


Holy moly, that’s awesome, @kritzikratzi! Can you share it??? Please say you can, please say you can :pray: * praying intensely *


sure, but the project is really in a sorry state.

i followed the guide here to integrate the library:

it’s quite straight forward to have “simple” c++ files dynamically reloaded (ie. files where you only use core c++, no libraries except stl).

after i got this to work i modified it a bit to see if i can include ofMain.h in my dynamic files, but the result wasn’t glorious. at the moment, by accident, i’m linking the dylib statically to OF, so now there’s a second OF inside the dylib and obviously it doesn’t really work. so it’s really utterly broken at the moment, but maybe you can get some value out of this mess.

you’ll have to search+replace /Users/hansi/Documents/OF/of_v0084_osx_release/ and put your own path there.
it’s possible that i changed some build settings for OF (wasn’t much more than fiddling with 32/64 bit and build active arch yes/no if i remember correctly).

you’ll probably find the notes most interesting. those are also not complete, but i roughly wrote down the steps i took:



ps. one more thing:
there’s another interesting project.
it’s called cling and is developed by CERN (it’s a c++ interpreter, there are some really cool demos.)

upside is that it seems lighter than RCPP (it also adds ~100mb to your binaries, but lets you evaluate snippets of code), downside is that c++ isn’t supported in their windows builds (only c).

i’ve also uploaded my test to github:
(just xcode, doesn’t use OF)


That’s NOT a problem! C++ is broken by not allowing to do what you did in the video by default :stuck_out_tongue: Your code at least working AND uses openFrameworks, which is a perfect combination for me! I’ve always wanted to try out RCCpp but I have very hard time starting projects like these from scratch, thanks again for sharing it!


And I like how I and @armadillu liked the repo in first 10 minutes. We sense where the good work happens! :blush:


i wish i had more time to fiddle with this, but i’ll definitely come revisit it in a few weeks (that’s when i plan to use it in the app i’m currently writing). i hope i’ve figured out more about shared libraries by then!


Actually, the easiest method using ofxLua and what I used with early versions of Visual is to reload the current script with a key command, say CMD+E. So I’d code in Sublime or whatever, the CMD+TAB to Visual and hit CMD+E, then CMD+TAB back. Slightly different workflow but easy to implement.


@kritzikratzi maybe we can join forces, i have my livecoded c++ recompiling as a .dylib so i am able to use all the OpenGL calls (and all the other openFrameworks calls)

the only clunky part is that you have to set a shell variable before you begin.


@racarate sounds pretty cool! you have something on github somewhere?


@kritzikratzi not yet, its basically the project i linked to above but with a new makefile updated for 0.8.4. i wonder if makefile will have to change for 0.9 as well.