Skip to main content

Ruby-Processing 3939 Responses

Last post: 1 year, 4 months ago | Thread started: Mar 20, 10, 5:06 p.m.

RespondNew TopicDisable Images

  • lukus_W

    This is a nice guide for ruby:

    http://www.planb-security.net/wh…

    • Ah. You posted before I could finish my last tid-bit of links ;)stewdio1/2
      Good work stewdio .. you've created an interesting thread in amongst a sea of COMPLETE SHITElukus_W2/2
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 20, 10, 5:13 p.m. – Permalink
  • lukus_W

    Not really for the ruby version of processing, but useful nevertheless:

    http://www.openprocessing.org/

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 20, 10, 5:15 p.m. – Permalink
  • 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…

    • CamelCase - first time I've read that one...DoktorDavid
    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 20, 10, 5:17 p.m. – Permalink
  • lukus_W

    This is a nice editor for ruby - it's new, and improving all the time .. works a bit like textmate (uses textmate bundles), and it's free. Check it out.

    http://redcareditor.com/

    • Works for loads of other file types / languages too..lukus_W1/4
      Cool. Trying it out now.stewdio2/4
      Gave it a shot. Interesting stuff, but I think I'll stick with TextMate for now.stewdio3/4
      Yeah, it has a way to go - I'm using linux, so textmate isn't possible for me.lukus_W4/4
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 20, 10, 5:18 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 :opengl

    def setup
    size 640, 360, OPENGL
    frame_rate 30
    @x_degree = 45
    @y_degree = 0
    @color_hue = 0
    color_mode HSB, 360
    no_stroke
    end

    def draw
    background_hue = ( @color_hue + 180 ).modulo 360
    background background_hue, 360, 360, 360
    lights
    push_matrix

    translate width / 2, height / 2, 0
    rotate_x radians( @x_degree )
    rotate_y radians( @y_degree )
    fill @color_hue, 360, 360, 320
    box 100

    pop_matrix
    @x_degree = ( @x_degree + 1 ).modulo 360
    @y_degree = ( @y_degree + 2 ).modulo 360
    @color_hue = ( @color_hue + 1 ).modulo 360
    end

    end
    MyCubes.new :title => "My COLORFUL Cubes!"

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 20, 10, 5:29 p.m. – Permalink
  • stewdio

    Ruby + Processing = RubyProcessing

    Or for the more visual crowd :

    .

    Ruby
    http://ruby-lang.org

    http://yellosoft.us/images/icons/ruby128.png

    + Processing
    http://processing.org

    http://violentcoding.com/blog/wp-content/uploads/2008/11/processing_icon.png

    = RubyProcessing
    http://wiki.github.com/jashkenas…

    http://s3.amazonaws.com/jashkenas/images/ruby.jpg

    • Bookmarked. Nice post!ismith
    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 20, 10, 5:57 p.m. – Permalink
  • stewdio

    Hmmmm... I'd love to get some other QBNers excited about this besides Lukus and myself.

    • how about post examples of what youre working on, not pages of codedrgss1/2
      Hmm... Your last two posts were titled "Powerful Dicks" and "YouTube Porn Day"stewdio2/2
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 4:24 a.m. – Permalink
  • drgss

    "typographically clean programming language"
    what?

    • evil language purists who've never had to write kludge code to make a deadline!vaxorcist1/5
      Vaxorcist, you are mistaken.stewdio2/5
      I may open my mind.... I worked with a ROR egotist/cult member who gave me PTSD about ruby....vaxorcist3/5
      Good point. I've run into that too. (I hope I don't come off that way!)stewdio4/5
      Ruby programmers seem very cool... ROR cult members seem not to use Ruby outside ROR....vaxorcist5/5
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 5:07 a.m. – Permalink
  • detritus

    I'm barely getting to grips with Processing Java running local, hacking others' code - I've still no clue what Ruby actually *is*.

    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 6:35 a.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.

    • gah - got there before melukus_W1/2
      Ruby is great... and fun, and elegant, as long as you are within it's boundaries.... otherwise SUCKSvaxorcist2/2
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    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.

    • Ha. This time you beat me to it.stewdio
    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 8:21 a.m. – Permalink
  • lukus_W

    I always like this guy's processing work - but it's a bit old now maybe:

    http://complexification.net/timeline/WThappyPlaceWideB.jpg

    http://complexification.net/gall…

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 8:27 a.m. – Permalink
  • lukus_W

    This guy's stuff is amazing .. the pic is a still from a algorithmically generated animation of Mt. Fuji created for the Wing Luke Asian Museum.

    http://www.flight404.com/blog/images/fuji_05.jpg

    http://www.flight404.com/blog/

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 8:34 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).

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 8:36 a.m. – Permalink
  • stewdio

    http://ashkenas.com/images/codework/hawking.jpg

    Made with Ruby-Processing (Using OpenGL).
    http://ashkenas.com/codework/a_f…

    • Wow, that must be the nicest looking color coding I've ever seen;)ukit1/2
      the exe just didnt open or anything for me : /mikotondria32/2
    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 9:03 a.m. – Permalink
  • lukus_W

    I think the live coding feature could be great for visualisations / vjing.

    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 9:07 a.m. – Permalink
  • acrossthesea

    I always wanted to get into this. How's the learning curve coming from an AS3 background?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    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.

    next note >+ add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    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 ;)

    • Ruby is nice, RoR has a very steep learning curve after the basicscomicsans
    + add note

    You must be logged in to add a note. Login now or register for an account.

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

    I'm interested

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earMar 21, 10, 11:04 a.m. – Permalink

Login or Register to respond to this

Skip to main content