Public Voice Network
- What are you listening to… 47024702
- Beeeees! 1212
- Minimum rate? 33
- Aging = Scary 88
- FACE EATER 1313
- alternatives to chrome?? 99
- blog 5626556265
- Chick of the Day 1538315383
- Outfit of the Day 33
- Coda 2 3636
- Show your latest Pics 32953295
- Vid of the Day 1203412034
- the gif animation thread 1283512835
- News of the day... 138138
- Battlefield 3 305305
- New York 88
- Pic of the Day 6330263302
- Music over 5.1 System 66
- Random Fascinations? 55
- What is THEIR work? 55
- Meme of the day 1414
- Letterpress process video 33
- Video Cameras Under $2000 77
- ATTN: Greedy Republicans 2323
Ruby-Processing 3939 Responses
Last post: 1 year, 4 months ago | Thread started: Mar 20, 10, 5:06 p.m.
- stewdio
If you already know Processing every one of those commands should be familiar to you. They're just the "Ruby-ized" version. (Java makes a lot of use of CamelCase variable names, while Ruby prefers under_scores instead.) Here's a complete list of Processing commands : http://processing.org/reference
And here's everything you need to know about Ruby.
http://www.ruby-lang.org/en/docu…I highly recommend their "Ruby in Twenty Minutes" tutorial. They're not kidding. It's quick. And it makes sense.
http://www.ruby-lang.org/en/docu…
- Dog-earMar 20, 10, 5:17 p.m. – Permalink
- stewdio
Ok. If you want to get all psychedelic with your color theory try this update and save it as MyCubes2.rb (or whatever you want to call it, it doesn't matter). And here's a little HSB-related color review while you're at it :
http://en.wikipedia.org/wiki/HSL…. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
class MyCubes < Processing::App
load_library :opengldef setup
size 640, 360, OPENGL
frame_rate 30
@x_degree = 45
@y_degree = 0
@color_hue = 0
color_mode HSB, 360
no_stroke
enddef draw
background_hue = ( @color_hue + 180 ).modulo 360
background background_hue, 360, 360, 360
lights
push_matrixtranslate width / 2, height / 2, 0
rotate_x radians( @x_degree )
rotate_y radians( @y_degree )
fill @color_hue, 360, 360, 320
box 100pop_matrix
@x_degree = ( @x_degree + 1 ).modulo 360
@y_degree = ( @y_degree + 2 ).modulo 360
@color_hue = ( @color_hue + 1 ).modulo 360
endend
MyCubes.new :title => "My COLORFUL Cubes!"

- Dog-earMar 20, 10, 5:29 p.m. – Permalink
- stewdio
Ruby + Processing = RubyProcessing
Or for the more visual crowd :
.
+ Processing
http://processing.org= RubyProcessing
http://wiki.github.com/jashkenas…
- Dog-earMar 20, 10, 5:57 p.m. – Permalink
- stewdio
@drgss. Yes. Typographically clean. Compare Ruby to Java for instance and you'll see that Ruby does a great job getting rid of excessive semicolons, curly braces, parenthesis, etc. There's a real flexibility with how you write Ruby code so instead of just writing code that the computer can understand you can write code that looks clean and better communicates to other humans what your intent is. There's a great quote from the book Structure and Interpretation of Computer Programs: "Programs should be written for people to read, and only incidentally for machines to execute."
I have a deep appreciation for clean coding. When I work with other designers and they hand me code that is concise and legible it draws my instant respect.


- Dog-earMar 21, 10, 8:16 a.m. – Permalink
- lukus_W
Ruby's a really nice programming language - said to be easier to use than Java ..
With many high-level languages, there are a lot of weird quirks that are necessarily to write code that won't break.
Because of this, a lot of the time, a beginner often can't get to grips with creating anything worthwhile, because they need to know about things like 'casting' and 'precedence', the number of bits each datatype is going to consume or where to add a semicolon to end each statement. The details get in the way.
With ruby, a lot of the time this knowledge isn't needed - stuff just works. It's a much nicer language to code in.

- Dog-earMar 21, 10, 8:21 a.m. – Permalink
- stewdio
@detritus
Ruby is a fairly young programming language, first publicly released in 1995. It was created by Japanese programmer Yukihiro "Matz" Matsumoto. And if you're running OS X you already have Ruby installed :) For more historical info I found the Ruby Wiki page to be decent: http://en.wikipedia.org/wiki/Rub…)
Ruby gained significant popularity with the rise of Ruby on Rails. (Rails is a web application framework written in Ruby.) In fact, web searches for things having to do with Ruby will usually land you on a page that's actually discussing Rails. Here's the homepage for RoR: http://rubyonrails.org
But Ruby is good for more than just building websites. Right now I'm excited about using it to create animated data visualizations. Ruby-Processing takes the commands and libraries I was used to in Processing and allows me to use them in Ruby. That means I can hit the ground running. And I found programming in Ruby to be much more rewarding that coding in Java (Processing).


- Dog-earMar 21, 10, 8:36 a.m. – Permalink
- stewdio
Made with Ruby-Processing (Using OpenGL).
http://ashkenas.com/codework/a_f…

- Dog-earMar 21, 10, 9:03 a.m. – Permalink
- acrossthesea
I always wanted to get into this. How's the learning curve coming from an AS3 background?


- Dog-earMar 21, 10, 9:37 a.m. – Permalink
- stewdio
@acrossthesea
Forget learning curves ;) Just follow my instructions at the top of this post and in about 5 minutes you'll be playing with a red cube rotating in space. And you'll want to mess with it.
That's all you need, the urge to mess with the code. Little thoughts like "I bet I could make the cube larger." Or "I wonder if I can just copy what he's doing with the X-axis and make it rotate on the Z-axis instead." Before you know it you'll be tackling much bigger stuff. You'll be golden.


- Dog-earMar 21, 10, 10:15 a.m. – Permalink
- ukit
Twitter, Github, YellowPages dot com and Hulu are all written in Ruby on Rails to various degrees.
For some reason Ruby inspires serious devotion from its users. I used to work with a programmer who was really into it. He talked about Ruby like it was his girlfriend, kinda weird if you ask me ;)

- Dog-earMar 21, 10, 10:42 a.m. – Permalink






