Hacker News new | past | comments | ask | show | jobs | submit login
Circa is a programming language for live coding, in development (circa-lang.org)
116 points by barrybe on April 19, 2012 | hide | past | favorite | 32 comments



How can you have a website displaying a live-coding language, without a video displaying someone actually live-coding? :P

Seriously though, I'd love to see a video of someone doing live-coding. I've been looking for a good live-coding environment ever since I found fluxus[1], and subsequently found out that development of it had stopped.

[1] http://www.pawfal.org/fluxus/


That is an excellent point. I have some videos up (https://vimeo.com/user6866395/videos) but I neglected to add them to the new site.


Wow, hats off to you. I love the part when it watches cpp files for changes, recompiles and then uses the library to patch the live application.

Who said C++ is not productive, please? Alright, all credits goes to Paul. :)


Yeah, that was a fun hack! I think live C++ recompilation is something that is occasionally theorized about, but rarely attempted.


Super cool. Maybe think about just cutting those videos into a 30-second montage to drop onto your landing page until you want to do a proper demo-- for live coding, showing beats telling any day of the week.


That's a great idea. The landing page is definitely looking a little dry.


That looks awesome! Great work.


Why would you think development of fluxus "has stopped"? The mailing list [1] is active enough for such a minority project, and the git repo [2] shows a reasonable activity for a mature (i.e. "done") project, with functionality commits from October last year, and French localisation commits from April this year (last one on the 19th, so less than 24h ago).

[1] http://lists.pawfal.org/pipermail/fluxus-pawfal.org/ [2] https://savannah.nongnu.org/git/?group=fluxus


Excepting crashing bugs development depends a bit on when people have time or a need for a new feature but Fluxus is indeed still actively developed. As I see it it's indeed "done" in the sense of being useful for it's intended purpose right now, but there is space for big improvements like redoing the editor itself in Scheme, morefunctionality in the Windows version, etc. I'm personally working on and off on a little library for new ways of interacting with generative music in it. We're alive and well, I'd say.


I say its stopped because it is lacking a lot to get it working on OS X, so its not "done", and the latest release is for 10.5


Fair enough, but "OSX is not as well supported as I'd like" is a far cry from "has stopped development". FWIW, I get the updates just fine through Ubuntu PPAs.


The project hasn't stopped, but you can find a load more live coding environments at http://toplap.org/


Obligatory mention of "Inventing on Principle" by Bret Victor (https://vimeo.com/36579366) which explores a lot of similar turf. With Circa though we get to have these things today though, and with C integration to boot. Great work.


I initially shrugged and said "gee, another programming language," but as I've been looking, I just see more and more to squee about.

They aren't the decisions I'd have made but they're good decisions. The inlined state stuff especially looks exciting and clever.


True, I was also hesitant to check out the site. Glad I didn't resist the temptation!


Significant whitespace in a live coding language? I like and use Python, but that seems like a show-stopper of a bad idea for a language designed for throwing code around in real time.


Can you expand on this? If I get my indentation wrong then it will be obvious very quickly. I'm guessing that it will only update if the basic syntax is correct though.


> If I get my indentation wrong then it will be obvious very quickly

Not if the language allows you to mix tabs and spaces; in that case semantic details can be invisible.


Using # for both comments and colors does not sound like a good idea! Just stick to --, I think. It looks prettier anyhow :P.

Also, how do you do scoping without a var or val keyword? E.g. what if I want to have a variable local to a function (or method, I guess?). Or what if I want to reassign a variable outside of the current scope?


Definitely a good point and I'll make that change. I was hesitating to only use -- because I thought it might be unfamiliar to some. But it works great for Lua & Haskell!

For variable scoping, if you use the same name inside a "for" or "if" block then it'll assign that name in the outer scope. A function however can't assign to names outside of the function - each function needs to explicitly declare its inputs & outputs. There's some holes in the current design, so adding a "val" keyword is the current plan.


I wish more languages had the right-apply function. It looks similar to piping and sounds great.


Anyone got it working?

I managed to compile both build/circa and build/circa_d (build/circa_t is broken).

  circa ➤ export CIRCA_HOME=`pwd`
  ~CIRCA_HOME ➤ export PATH=$PATH:$CIRCA_HOME/build
  ~CIRCA_HOME ➤ python tools/prebuild.py
  ~CIRCA_HOME ➤ scons build/circa build/circa_d
I can run the tests:

  ~CIRCA_HOME ➤ tools/ca-tests.py
  Ran 105 tests, 0 failed, 11 disabled.
But I can't launch the repl (circa_d --repl) nor get anything from the samples. On some of the samples I get errors, on others I get nothing.

Am I missing something?


For the repl, can you try "circa_d -repl" (one dash instead of two)?

There is definitely some breakages in there, and most of those samples won't run currently. I'm rewriting the app that runs things in a graphical shell and I hope to have that ready soon. If you are feeling brave, you can go back in time to use Plastic (the SDL-based shell that I was relying on for a while). Instructions for that:

Checkout revision efb5300

Delete the files at src/generated/*.cpp and run prebuild.py again

scons build/plas_r (this will require SDL)

Launch with: build/plas_r samples/asteroids.ca (or some other sample)


  circa_d -repl
This works fine. Not sure why I used -- :-)

With that version I can build build/plas_r but there are some missing Box2D files. Might come back to it later when I have more time or when the the next app is out :-)

The project looks awesome btw! :-)


Thanks! Yeah, might as well wait for the next release rather than debug an old version.


I always wonder why so many languages eschew multiline comments. Is it monumentally harder to make a parser that supports it or is this a conscious decision?


It's not too hard, it was just a combination of laziness plus not being able to decide on a multiline comment syntax that looks nice. Anyway I just added it, using {- and -} separators (as in Haskell)


Ah, interesting :-)

I was just curious since there seem to be a few languages that only have single line comments. But usually it just results in people finding "hacks" so they can make them anyway (like Python's doc-strings) which just ends up being uglier than supporting them natively.


When I saw the wall appear and get moved I instantly thought about some variation of a programmers pong of sorts. Or other games!


Code reflection seems like an awesome feature to play around with, and it seems really cool that you can modify the AST and have the changes saved back to the source text.

Until Cicra is ready, where else can I learn to use these features?


I really like this! One thing that wasn't shown is having variables in the CPP code get modified from in game. Would that be possible?


Definitely possible, though you would store those tweakable variables in special MyVariable objects (rather than have them be normal C++ variables). With Circa you could grab the object that holds then variable's data, and then have C++ code that reads it as often as you want.

Game devs love to have tweakable variables, so there's a lot of libraries that will help with this. One example: http://www.antisphere.com/Wiki/tools:anttweakbar




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: