The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
The Soda Languages

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
The Soda Languages Posted: Oct 19, 2006 12:00 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: The Soda Languages
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

Whoa, get ready to spend your whole afternoon tooling around with a small pile of little languages and compilers. I am completely hooked on Idst, a compiler for a hybrid prototype-based Smalltalk-plus-C language by Ian Piumarta. And atop the bedrock of Idst: the soda languages.

I first heard about Ian’s stuff in a #camping discussion where Pepsi (the Smalltalk/C hybrid) was brought up. Well, it turns out Idst also comes with a Lisp-like soda language called Jolt (see examples/jolt.) Other examples are just great and include a teensy Squeak VM (examples/sqvm) and some X11 samples (examples/x11.)

He explains the Pepsi syntax in an interview a few days ago on the Weekly Squeak:

You can mix C-code and ���Id��� code in a very simple way. So it is easy to integrate with O.S. services. The idea is quite the opposite of Objective-C: you think in terms of objects all the time (as in SmallTalk). Then you ���come back��� to C-Language for the dirty part of your work.

The syntax is suprisingly terse. You use curly braces to break out into a method written in C. Square brackets for Smalltalk-style.

 X11Display newWindow [ ^X11Window withDisplay: self ]
 X11Display _createSimpleWindow_: _x _: _y _: _w _: _h _: _bw _: _b _: _bg
 {
 return (oop)XCreateSimpleWindow((Display *)self->v__dpy,
 DefaultRootWindow((Display *)self->v__dpy),
 (int)v__x, (int)v__y, (int)v__w, (int)v__h,
 (int)v__bw, (int)v__b, (int)v__bg);
 }
 X11Display createWindow: bounds borderWidth: borderWidth 
 border: border background: background
 [
 ^self newWindow
 _win_: (self _createSimpleWindow_: (bounds _x) _: (bounds _y) 
 _: (bounds _w) _: (bounds _h)
 _: borderWidth _integerValue
 _: border _integerValue
 _: background _integerValue)
 ]

Can you get over that?

Read: The Soda Languages

Topic: Warm, fuzzy feeling Previous Topic   Next Topic Topic: Testing Ruby

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use