Adventures with Scribble!: The Basics of Basics

Scribble! has been undergoing many changes lately to prepare for the mystical and (at least in my case) anticipated 0.1 release.

But the important thing to remember about Scribble!, is that, just like Hackety Hack, its goal is to teach people how to program without breaking out the boring lectures about “Hey this is syntax. Do it.” It’s a tool for beginners to learn a little bit about graphics using Cairo and Ruby to have a little fun and expand their knowledge.

So, you ask me, how does Scribble! do it?

Pretend we take the following code and drop it into Scribble!:

#Set Canvas Size to 500x500!
brush.fill = 0, 0, 0.9, 0.04 #Uses standard "Red, Green, Blue, Opacity" values
brush.stroke = 0, 0, 0, 0.1 #Same as above

#I like circles too! ^_^
30.times do
  circle :center => [rand(size[0]), rand(size[1])], :radius => (rand(size[0]) - 150)

#Draw a cool spiral thing that Evan Farrar came up with. B)
scribble(250,250) do |s|
  s.curve 250, 300
  s.curve 300, 250
  s.curve 250, 200
  s.curve 200, 250
  s.curve 250, 350
  s.curve 350, 250
  s.curve 250, 150
  s.curve 150, 250
  s.curve 250, 400

## And to top it off, a blue smiley face over everything!
scribble(100, 10) do |s|
  s.line(100, 60)
  s.jump(150, 10)
  s.line(150, 60)
  s.jump(80, 70)
  s.curve(125, 90)
  s.curve(170, 70)

The code is, of course, a little commented (mainly because I’m a nice guy, <3), so it shouldn’t take too much explanation. In fact, once you look at the image below, it shouldn’t take any at all!

Scribble! here, Scribble! there…. hell Scribble! everywhere!

So, I encourage you to go pick up Scribble from SVN and play around some:
svn co svn:// scribble

To run it, cd to ‘/path/to/scribble’ and run ‘bin/scribble’. If you come up with anything neat, share it with me!


2 Responses to “Adventures with Scribble!: The Basics of Basics”

  1. 1 July 15, 2014 at 10:32 pm

    It’s actually a cool and useful piece of information. I’m happy that you shared this helpful
    information with us. Please stay us informed like this.
    Thanks for sharing.

  2. 2 glutathione before and after philippines August 23, 2014 at 3:43 pm

    Perhaps it will come as no real surprise that many people have problems
    with digestive disturbances. GSH is generally shaped elements termed thrills decreased GSH, and oxidized
    disulfide form. If you study my material you know that I really don’t typically try to convince you
    to purchase the products I speak about.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: