Slashdot Mirror


Announcing Ozma: Extending Scala With Oz Concurrency

setori88 writes "Programming for concurrency makes sense in developing for both large scales (cloud computing) and small (multicore CPUs). Some languages were designed for concurrency and distribution; One of those languages is Oz, which provides advanced primitives regarding concurrency and distribution. Oz is mostly declarative, a paradigm that encompasses functional and logic programming. Despite its innovative features and expressiveness, Oz never made it into the wide developer community; one reason is its unusual syntax." Read on to learn about an effort to bring Oz's concurrency features to more programmers. setori88 continues: "But first, some background: Martin Odersky, in designing the Scala programming language, recognized the need for community acceptance of the kind that Oz lacked. He designed Scala as being both close to Java (in terms of syntax and concepts) and interoperable with existing Java libraries. Today, Scala seems to be the best hope for making functional programming accessible to programmers.

Although Scala has no language feature related to concurrency, the advanced library Akka, inspired by Erlang, provides Scala programmers with concurrent and distributed concepts.

Now comes a project attempting to popularize the concurrency concepts of Oz, called Ozma. Ozma implements the full Scala specification and runs on the Mozart VM. It extends Scala with dataflow variables, declarative concurrency, lazy declarative concurrency, and message-passing concurrency based on ports. Ozma extends the duality of Scala, namely the combination of functional and object styles, to concurrent programming."

6 of 38 comments (clear)

  1. [] X#nil then Z=X by Islemaster · · Score: 3, Informative

    The syntax can be weird, (why the double square-bracket? why?) but I wouldn't call that Oz's biggest misstep in gaining wide acceptance. In my experience, the biggest problems while learning were

    1. Almost zero documentation on getting the language to (partially) compile and/or run outside of Eclipse. I'm not sure how I ever figured this out, to be honest.
    2. Lack of a decent file I/O library. When was the last time you had to write your own streamreader for a business application?

    I am thrilled to see Oz getting more mainstream attention - the whole dataflow concept is very cool, and it's fun to write.

    1. Re:[] X#nil then Z=X by GargamelSpaceman · · Score: 2

      Eclipse? WTF?

      Not sure if it even runs in Eclipse... It's pretty tied to Emacs though. I think the Browser is ok for seeing concepts, but I doubt I'd care to use it for serious programming though. I've been compiling what I code in oz with vi, and running it on the command line.

      The documentation needs to be better though. I did buy http://www.info.ucl.ac.be/~pvr/book.html, but the online docs need some polishing and completing, especially section 12 of the tutorial since that's where much of the cool stuff would be.

      Someday, if I ever get the energy/time/oz-expertise, I want to try implementing a network protocol using oz's determinacy driven execution and definite clause grammers. Wouldn't it be neat to (almost) paste in the specification for HTTP to implement a web browser/server with the same sort of simplicity as one can almost paste in the BNF for URIs from the RFC to implement a URI parser?

      Not an Oz expert though... Oz is still on my list of 'things to do when I get around to it.'

      Another annoying thing is that Oz only runs in 32 bit so far.

      --
      ...
    2. Re:[] X#nil then Z=X by sourcerror · · Score: 2

      "Another annoying thing is that Oz only runs in 32 bit so far."

      When I tried it around 1.5 year ago, the database libraries were quite buggy (they borrowed them from tcl IIRC). So I don't think it can be considered a production ready language.

  2. Re:I still have nightmares with Oz by sourcerror · · Score: 2

    I bought the MIT book about Oz, and it was really fun. (Read only 3 chapters) However I can't imagine learning it from PowerPoint slides. (Especially if you got shown a constraint statisfaction problem right-away.) By the way it seems less weird for me than Haskell or Common Lisp. * (I'm just fiddled with them, don't know them at any usable level.)

    I think when you understand the canonic representation of program structures, and how the flow of control goes, it does seem quite sensible.

    On the other hand when I tried Scala, the type system always got in the way. The guys in the forum were really helpful, but they referred to things that wasn't in the documentation/ was hard to find in the documentation. (It was pretty badly organized.) It was too much time to statisfy the compiler, and I didn't see the gain in code roboustness. I started to really appreciate Java's half-baked generics. (Where usually you don't actually need to use generics due to type erasure, but if you do, the IDE will offer better auto-completition.)

  3. Re:I still have nightmares with Oz by sourcerror · · Score: 2
  4. CSP by sourcerror · · Score: 3, Informative

    If I remember correctly, "#" is for constraint statisfaction problems (delayed goal), and I think that operator shouldn't be taught to an Oz newbie, as Constraint Logic Programming is a paradigm onto itself (and not just paradigm, as in thinking pattern, but it involves quite a lot of complex algorithm that run in the background (demons), and non-sequantial execution).

    Last time I installed Oz, it came with Emacs bundled by default.