Settings

Theme

Circa is a programming language for live coding, in development

circa-lang.org

116 points by barrybe 14 years ago · 33 comments

Reader

ique 14 years ago

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/

  • paulhodge 14 years ago

    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.

    • pestaa 14 years ago

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

      • paulhodge 14 years ago

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

    • Cushman 14 years ago

      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.

    • reustle 14 years ago

      That looks awesome! Great work.

  • candeira 14 years ago

    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

    • Kassen 14 years ago

      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.

    • ique 14 years ago

      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

      • candeira 14 years ago

        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.

  • yaxu 14 years ago

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

rbxbx 14 years ago

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.

drostie 14 years ago

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.

  • pestaa 14 years ago

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

drobilla 14 years ago

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.

  • iandanforth 14 years ago

    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.

    • technomancy 14 years ago

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

tikhonj 14 years ago

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?

  • paulhodge 14 years ago

    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.

skaushik92 14 years ago

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

jonasb 14 years ago

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?

  • paulhodge 14 years ago

    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)

    • jonasb 14 years ago

        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! :-)

      • paulhodge 14 years ago

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

zmmmmm 14 years ago

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?

  • paulhodge 14 years ago

    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)

    • zmmmmm 14 years ago

      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.

vasco 14 years ago

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

pinchyfingers 14 years ago

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?

iandanforth 14 years ago

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?

  • paulhodge 14 years ago

    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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection