Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jruby newbie question

 
bryan lim
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

i read that jruby is a Java implementation of the Ruby interpreter.

what is an interpreter? is it like a ide?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An interpreter is a program which reads code in some computer language and immediately executes it. Some languages, like Java, are "compiled" into a special format (class files, in Java's case) before being executed, while other languages, like Ruby, are interpreted, with no intermediate format. jruby is a Java program you can just run from the command line to execute your Ruby code.

An IDE for Ruby will generally include an interpreter so you can execute the code you're working on; but an IDE is something different altogether from an interpreter.
 
bryan lim
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for your reply.

so ruby does not need to be compiled?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it does not. You can run the Ruby (or JRuby) interpreter interactively, and type in a line of code and see it executed immediately. Of course, you can also save your code in one or more files and run it all at once.
 
bryan lim
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i see. learn something new again.

thank you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic