Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - shamanas

Pages: [1]
1
SFML projects / ooc bindings for sfml2 (ooc-sfml)
« on: July 01, 2011, 10:45:56 am »
I am updating ooc-sfml to the latest commit of sfml2 :)
Just letting everyone know this project is revived.

2
SFML projects / "Bugger!" -- a game about debugging
« on: December 28, 2010, 07:34:07 pm »
Hey :)
Very nice game, I love tha gameplay, nice work

As an improvement, you could add code lines on the walls or on the ground, it would be very nice and of course it sticks to the theme of the game :P

3
SFML projects / ooc bindings for sfml2 (ooc-sfml)
« on: December 28, 2010, 02:57:45 pm »
ooc (not OOC  :evil: :P ) is first translated to C and then compiled (thought id mentioned that?). And yes, it is a static language. However you could use first-class functions to change an object's methods during execution (but not add new ones)

4
SFML projects / ooc bindings for sfml2 (ooc-sfml)
« on: December 28, 2010, 01:32:52 pm »
Quote from: "Hiura"
Quote from: "shamanas"
Messages look like another way of calling member functions (or are there other differences?).
The main difference that I've understood by practicing Obj-C is that messages can be sent to anyone – even if they don't understand them – unlike methods. But I'm not sure about that – and Apple often use methods and messages for the same thing so...

So you mean you can just do someObject someMessage, even if the object has no message named someMessage? I don't quite get how this is helpful.


Quote from: "Hiura"
Quote from: "shamanas"
ooc's syntax is alot cleaner than objective-c's
cleaner maybe, but not «a lot cleaner» – it's a quite different from what I've seen very quickly. In fact I looks more like Scala (in the Java way) than Obj-C to me.

Yep it is true that Objective-C and ooc don't have very much in common. However, every time i've seen Obj-C code, i turned my head and closed my eyes in horror.
I mean, how can you say that
Code: [Select]

o := MyObject new(myString)


is not alot cleaner than

Code: [Select]

MyObject *o = [[MyObject alloc] initWithString: myString];


However, they share some common aspects, like the way you can do foreach'es (yep, I know it is done in many other languages this way too)
Code: [Select]

for(cat in cats) {
...
}


Also ooc supports function suffixes, wich are, i believe, an  obj-c feature (not sure about this). For example you can do taht in ooc:
Code: [Select]

MyClass : class {
    init : func ~withString (str : String) { // Do something ... }
    init : func ~withInt (num : Int) { // Do something ... }
}

Of course, when calling the funcion, you dont have to write the ~ part, wich is only here to help debugging and read the code. Always in this example, you could then do
Code: [Select]

obj1 := MyClass new("foo")
obj2 := MyClass new(42)

Note: new is actually not a keyword, but a static function wich is added by default to your class (it can be overwritten of course) and that calls init

5
SFML projects / ooc bindings for sfml2 (ooc-sfml)
« on: December 28, 2010, 10:50:58 am »
Well I never programmed in smalltalk, but i just googled it for 2 seconds. Messages look like another way of calling member functions (or are there other differences?). I honestly do not know exactly where the ooc syntax/grammar was inspired from, although i do know that ooc's creator talks alot with the creator of io (http://www.iolanguage.org) and that these two langiuages are similar in many ways (decl-assign operator, object member syntax [no dots])

P.s: ooc's syntax is alot cleaner than objective-c's

6
SFML projects / ooc bindings for sfml2 (ooc-sfml)
« on: December 28, 2010, 01:59:28 am »
Hello everybody :)
I just finished writing some ooc bindings for sfml2, so I thought I'd come and post a link for my github repo. But first, I am sure that very few of you have heard of ooc. Ooc ( which originally meant object orientated c but has been renamed to out of class ), is an awesome language with cool syntax ( I know it's subjective but anyways, how can you not like pure awesomeness ?  :P ). It is translated to C, which makes it very practical as writing bindings for C libraries is extremely easy. As you may have guessed by that last sequence, ooc-sfml is actually a binding for csfml and not for sfml itself. However, the fact that ooc is an object orientated langugage makes the usage of ooc-sfml closer to sfml than to csfml.

Links
------

ooc-sfml: http://www.github.com/shamanas/ooc-sfml
Ooc website: http://www.ooc-lang.org

Please let me know about any bugs/comments and post your feedback here

Pages: [1]
anything