# LittleCoder 0.4

**URL:** <https://www.ruby-forum.com/t/littlecoder-0-4/90711>\
**Category:** Ruby\
**Created:** [March 31, 2007, 9:52am UTC](https://www.ruby-forum.com/t/littlecoder-0-4/90711 "2007-03-31T09:52:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harold\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Post date:** [March 31, 2007, 9:52am UTC](https://www.ruby-forum.com/t/littlecoder-0-4/90711/1 "2007-03-31T09:52:49Z")

</div>

Hello all,

[http://www.danceliquid.com/LittleCoder/](http://www.danceliquid.com/LittleCoder/)

Years ago, \_why wrote an article titled “The Little Coder’s  
Predicament” where he suggests that it’s a problem that programming is  
not as accessible as it was in the Commodore 64 days.

I happen to agree with him, and as an attack on that problem I’ve  
written some software.

## What is it?

LittleCoder is essentially a Ruby interpreter bolted on to DirectX.

It hopes to be a fun and easy way to do simple graphics on Windows for  
kids of all ages.

Rather than expose the eternal foul suffering of DirectX directly, it  
tries to wrap everything up into a lovely Rubyish facade that’s all  
smiles.

Pretty much everything has been traded in favor of the simplicity of  
scripting it. Loading and displaying images is a one liner. Playing  
sounds is a one liner. But there is still a bit of depth as it can  
respond to mouse and keyboard input, and even do some animation.

It is far from complete, but a few of us have been using it to good  
effect and I thought, ‘the more the merrier’.

So check it out. It’ll be fun!

## Learn more

Some examples and documentation are available as links from the main  
page at [LittleCoder](http://www.danceliquid.com/LittleCoder/)

Highest regards,  
-Harold

---

<div class="post-metadata">

**Author:** ![Harold\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Post date:** [March 31, 2007, 2:02pm UTC](https://www.ruby-forum.com/t/littlecoder-0-4/90711/2 "2007-03-31T14:02:12Z")

</div>

That’s way cool, Harold. I happen to teach programming and I often  
talk about that predicament (even though I did not know about \_why’s  
article until I read your post).

I’m a Linux and OSX user however, so I think having LittleCoder run on  
top of SDL [1] would make it even cooler.

[1] [http://www.libsdl.org/](http://www.libsdl.org/)

There are already a couple of Ruby-SDL bindings available. How hard  
would it be to port LittleCoder? I’d like to check that, but I’m not  
sure when I’ll be able to look deeper into this, though.

Nevertheless, great idea, Harold!

Cheers,

Luciano

---

<div class="post-metadata">

**Author:** ![Harold\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Post date:** [March 31, 2007, 7:27pm UTC](https://www.ruby-forum.com/t/littlecoder-0-4/90711/3 "2007-03-31T19:27:01Z")

</div>

On Sat, Mar 31, 2007 at 09:01:11PM +0900, Luciano R. wrote:

> would it be to port LittleCoder? I’d like to check that, but I’m not  
> sure when I’ll be able to look deeper into this, though.
> 
> Nevertheless, great idea, Harold!

There’s always the cross-platform open source UCBLogo, which provides  
an excellent advancement path from simple and easy (think “Turtle  
Graphics”) all the way up to m-expression based Lisp dialect with  
macros. It’s not strictly on-topic for a Ruby list, but still a very  
good idea, in my opinion.

---

<div class="post-metadata">

**Author:** ![Harold\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Post date:** [April 1, 2007, 3:52am UTC](https://www.ruby-forum.com/t/littlecoder-0-4/90711/4 "2007-04-01T03:52:29Z")

</div>

On 3/31/07, Luciano R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> That’s way cool, Harold. I happen to teach programming and I often  
> talk about that predicament (even though I did not know about \_why’s  
> article until I read your post).

Thanks for the kind words. (:

> I’m a Linux and OSX user however, so I think having LittleCoder run on  
> top of SDL [1] would make it even cooler.
> 
> [1] [http://www.libsdl.org/](http://www.libsdl.org/)

SDL is a different kind of animal, and one I’m only a little familiar  
with. On interesting feature of LittleCoder is that _ALL_ of the  
boiler-plate code for booting up a window, getting a drawing context,  
etc, is hidden in the C++ portion of the app. This was a top priority,  
because we wanted to be able to express single line Ruby programs that  
did interesting things like draw pictures and make noises. (Strangely,  
opening a window is not considered interesting. 😉

The other difference here is that LittleCoder builds the Ruby  
interpreter into the application.

Getting RubySDL to run anything at all is a non-trivial exercise in  
installing Ruby, using gems to get RubySDL, and if you’re unlucky,  
some .dll dancing becomes necessary. LittleCoder on the other hand can  
be downloaded, unzipped, and double clicked.

Definitely something similar could be done on other platforms, perhaps  
using SDL, but unfortunately the only computer I have right now is  
running Windows. I’m looking to get some linux in my life, so perhaps  
an OpenGL linux version of LittleCoder is somewhere over the horizion.

> Nevertheless, great idea, Harold!

Thanks again!  
-Harold

---

<div class="post-metadata">

**Author:** ![Harold\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Post date:** [April 1, 2007, 6:22am UTC](https://www.ruby-forum.com/t/littlecoder-0-4/90711/5 "2007-04-01T06:22:37Z")

</div>

Harold H. wrote:

> Definitely something similar could be done on other platforms, perhaps  
> using SDL, but unfortunately the only computer I have right now is  
> running Windows. I’m looking to get some linux in my life, so perhaps  
> an OpenGL linux version of LittleCoder is somewhere over the horizion.

Besides, today’s C64 / Apple ][ or other “beginning computer” of the  
70s/80s is a Windows PC with DirectX already included. This a much wider  
traget audience for the moment.

This is a nice project. And if I had kids, I’d introduce them to  
LittleCoder, especially as Windows is really, really lacking in this  
department (so is Linux, as far as I know, but that’s a different beast  
altogether).

Good stuff, really.

–  
Phillip “CynicalRyan” Gawlowski  
[http://cynicalryan.110mb.com/](http://cynicalryan.110mb.com/)

Rules of Open-Source Programming:

1. Backward compatiblity is your worst enemy.

2. Backward compatiblity is your users’ best friend.

---

<div class="post-metadata">

**Author:** ![Harold\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Post date:** [April 2, 2007, 6:42am UTC](https://www.ruby-forum.com/t/littlecoder-0-4/90711/6 "2007-04-02T06:42:06Z")

</div>

On 4/2/07, Peña, Botp [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> From: Harold H. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] :
> 
> # LittleCoder is essentially a Ruby interpreter bolted on to DirectX.
> 
> if you can bolt form widgets on it (like text boxes, dropdown list, menus, etc) w dazzling eye-candy/presentation-like features, then that would be a killer.

A killer of what?

Those do sound like interesting features, but I’m not sure who would  
use them, and for what?

Can you elaborate?

Regards,  
-Harold

---

<div class="post-metadata">

**Author:** ![Harold\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Post date:** [April 2, 2007, 11:55am UTC](https://www.ruby-forum.com/t/littlecoder-0-4/90711/7 "2007-04-02T11:55:47Z")

</div>

From: Harold H. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] :

# Those do sound like interesting features, but I’m not sure who would

# use them, and for what?

because i have yet to see gui apps that are directx (or opengl) driven.  
true they’re being used in games, but why not for gui apps? people are  
now realizing this, that is why there is xgl for linux and vista for  
windows. if you can build a set of gui form widgets to start with (so we  
can build/contribute from there) that are as easy to use as ruby, i  
would think it would pave way for a new wave of gui apps that is  
pioneered once again by ruby (think rails pioneering rapid web dev).  
imagine having access to directinput/media/sound/draw with ease using  
simply ruby.

ok, i’ve seen the bouncing ball and the stretchable boxes. Can you demo  
a text input with transparency and that zooms when you drag it?

🙂

kind regards -botp

---

<div class="post-metadata">

**Author:** ![Harold\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Post date:** [April 2, 2007, 6:15am UTC](https://www.ruby-forum.com/t/littlecoder-0-4/90711/8 "2007-04-02T06:15:03Z")

</div>

From: Harold H. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] :

# LittleCoder is essentially a Ruby interpreter bolted on to DirectX.

if you can bolt form widgets on it (like text boxes, dropdown list,  
menus, etc) w dazzling eye-candy/presentation-like features, then that  
would be a killer.

kind regards -botp
