November 2010
1 post
oc vs rock - the state of the Llama
So, I’ve been working on a new ooc compiler in my spare time, with the end-of-the-road goal to replace rock completely. This post should address a few concerns/questions some of you have regarding this new project. Q: Why a new compiler? Isn’t rock fine? No. rock’s not fine. It’s awful. If you disagree, it’s because we have done a good job at patching it up for...
Nov 14th
September 2010
2 posts
Error reporting improvements - parser generator...
Several had noticed that rock error reporting was particularly sucky these last few weeks. I’m happy to announce that it has been fixed and even improved, as you can see: Which, surely you agree, is much much nicer to work with. (Disclaimer: the code below is greg syntax, not ooc code) Turns out it was broken by my fault. I had changed things like FunctionCall = Name OPEN_PAREN Args...
Sep 28th
.fr ooc talks - OSDC & JDLL, 9 and 16 october
After EmergingLangs’ incredible success, I now have two more occasions to get embarassed in front of people talking about our awesome llamaness. On the 9-10th of October 2010, OSDC.fr will happen. It’s huge, it’s all open-source developers in arms, and it’s in Paris (the capital of Love, as everyone knows). There are even english talks! So fly to Paris for a magical...
Sep 22nd
August 2010
2 posts
Aug 27th
1 note
How to make a hacker hate his keyboard
Documentation, standardization. I almost ripped out my hand when writing those two words. And still, that’s what is happening right now. Tired of asking questions on IRC about the ins and outs of the ooc language? Wish you could study it all by yourself in a dark corner of your room without feeling silly for asking questions that were asked a thousand time before? Well, here you...
Aug 14th
July 2010
1 post
Channels and Coroutines in ooc
Hey there, tumbr’ling directly from OSCON, watching Mr. Shapiro talk about BitC. So I watched Rob Pike’s talk (of Limbo/Go fame) about CSP, and Steve Dekorte (of Io fame) told me: “I wonder if it couldn’t be done simply as a library for an existing language” So, I hereby present you ooc-channels. It steals its API right-out from the Go language. The go() function...
Jul 22nd
June 2010
14 posts
An ooc mode for thou, oh Emacs. →
Sup Dawg, I herd you liked ooc so we put ooc in your emacs so you can rock while you rock. (Yes, repeating old memes makes me feel smugly superior. Also, I hear lack of sleep has the same effect has drugs. Never tried drugs though, couldn’t tell.)
Jun 23rd
ØMQ bindings for ooc →
ØMQ is a software library that lets you quickly design and implement a fast message-based application. The client/server example was particularly enjoyable to port from C++, as it gives shorter and easier to read/comprehend code. Reminder: ‘||’ in a function call creates a closure. One could use func {} instead but my personal preference goes to the double bars, because it’s...
Jun 17th
A grep ripoff in ooc →
Jun 15th
Synchronizing threads using mutexes →
In the high-level world, we prefer to use Actors or the STM model - but it has to rely on something, right? Here’s the low-level part of concurrency in ooc: threads and mutexes. Implemented on PThreads for Unix-y platforms, and with Win32 threads on Windows. Meanwhile, here’s a small example of mutex usage in ooc. EDIT: Mutex works on Linux, OSX, and Windows now - enjoy!
Jun 13th
The compiler is your friend
When you do something like: main: func {     blah := Process new("ls")     blah execute()  } The compiler now tells you: missingimport.ooc:4:13 [ERROR] Undefined symbol 'Process' (Hint: there's such a type in os/Process)     blah := Process new("ls")             ~~~~~~~           [FAIL] Neat, eh?
Jun 13th
OpenAL + libvorbis example usage in ooc →
Jun 8th
A GTK+ one-liner with call chaining →
'Tis the dream of each programmer Before his life is done, To write three lines of APL And make the damn thing run. Call chaining just got better. It used to allow you to do things like: fw write(“Hey, my name is “). write(name). write(“, what’s yours?”). flush() But it used to be restricted on a scope-level. Now it’s not anymore, which means you can...
Jun 8th
4 tags
Arrays demystified - on the way to a treasure... →
Rewrote some of @wandernauta’s code to use arrays of arrays. Until we get proper docs on everything (ha!), I thought taking this as an example couldn’t hurt. Just to be clear: objects are references in ooc, so when I declare Tile[][], it holds pointers to tiles, hence 1) they need to be initialized properly, 2) they only take 4/8 bytes in the array depending on your platform. Also,...
Jun 4th
Does ooc support UTF-8? →
Yes and no. String length() returns the number of bytes, not in characters. UTF-8 is tricky. There are no strict boundaries between characters, or rather, ‘grapheme clusters’. Integrating something like utf8proc could be interesting, but every lib has its limitations. The most important thing is to know how far you have to go for your app. But as this yajl example shows, you can...
Jun 3rd
Mealy automaton in ooc →
Here’s a simple way to do code a mealy finite simple machine, using enums, a class, booleans, iterating through a string, slicing, match.. all kinds of goodies! EDIT: here’s a little background info for the uninformed (Note to self: make ‘match’ play nice with enum values so that we don’t have to qualify them everytime.)
Jun 3rd
5 tags
rock 0.9.1 - arrays, closures syntax, iterators,... →
it’s out there, and it’s coming out to get you. in there: smarter partial recompilation, lib-caching so your compile times are greatly reduced, awesome closure syntax, native ooc arrays (with literals, multi-dimensional, bound-checked, etc.), backward iterators, cleanup of threading/Thread, fixes, and much more!
Jun 2nd
CPU Caches and Why You Care →
Lovely presentation by Scott Meier on CPU caches. Not exactly ooc-centric, but - you should care. Trust me.
Jun 2nd
4 tags
The Ruby connection →
Birds of a feather flock together. In that spirit, Kaspar Schiess is working on an ooc compiler written in Ruby - another language with outstanding syntax, in order to get a compiler easy to understand and tinker with. May this be the beginning of a long and fruitful collaboration!
Jun 1st
A few pointers →
Despite all the high-level goodness ooc provides, it still allows you to cut both your feet with a machete, if you’re a badass Mexican. Here’s a little tutorial on pointers and references that should give you a good feel of how we handle those kind of things in the ooc world. (Beware though - once you try postfix syntax for pointers, there’s no going back!)
Jun 1st
May 2010
3 posts
GCC moves from prehistory to antiquity →
So this means compiling gcc will take even longer now? Thank god for clang/LLVM.
May 31st
Behind the trees lies the foorest →
Or, how to simply build tree data structures in ooc. Needs the latest rock from git, so you may want to wait until 0.9.2 comes out.
May 31st
Your new favorite tumblog.
Hi everyone. It’s time to put tumblr to real good use now. These last days, it struck me as obvious that a community only advances if everyone takes it personal. Big organizations die. Individuals breathe life into the community. In that spirit, I will try to describe the happenings of the ooc world right here. The increasing dose of awesomeness lately is quite impossible to squish in a...
May 31st
August 2009
1 post
Aug 6th