Won't Go

Cant get Ruby to run it seems. Windows XP. downloaded with 1.8.6 one
click installer. try to run "puts gets". works in irb. "gets" does not
work in sciTE - it does nothing, but i can close it. if run from command
prompt, the window closes immediatly. if i try to run a sample program.
window closes after input into sample program. i am looking for a good
language to learn oop. but i cant get this one to run. Please help.

···

--
Posted via http://www.ruby-forum.com/.

try running irb from the command line

···

On Wed, Sep 23, 2009 at 3:22 PM, Ill Everbe <illeverbe@yahoo.com> wrote:

Cant get Ruby to run it seems. Windows XP. downloaded with 1.8.6 one
click installer. try to run "puts gets". works in irb. "gets" does not
work in sciTE - it does nothing, but i can close it. if run from command
prompt, the window closes immediatly. if i try to run a sample program.
window closes after input into sample program. i am looking for a good
language to learn oop. but i cant get this one to run. Please help.
--
Posted via http://www.ruby-forum.com/\.

--
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can’t hear a word you’re saying."

-Greg Graffin (Bad Religion)

Ill Everbe wrote:

Cant get Ruby to run it seems. Windows XP. downloaded with 1.8.6 one
click installer. try to run "puts gets". works in irb. "gets" does not
work in sciTE - it does nothing, but i can close it. if run from command
prompt, the window closes immediatly. if i try to run a sample program.
window closes after input into sample program. i am looking for a good
language to learn oop. but i cant get this one to run. Please help.

Thanks for reply. i think i mentioned irb works. but i don't guess i can
run programs or edit code in irb.

···

--
Posted via http://www.ruby-forum.com/\.

I've never used sciTE so I can't say for sure, but I've heard it said
that Kernel#gets (which is what is actually used when you call gets)
does not work in sciTE, but $stdin.gets does. Alternativly there are
several different IDEs availiable in which Kernel#gets will work fine.
I personally use Aptana Radrails.

There is a list of IDEs being built atm. Hava a look at:

Hope this helps!

···

-----Original Message-----
From: illeverbe@yahoo.com [mailto:illeverbe@yahoo.com]
Sent: Wednesday, September 23, 2009 3:23 PM
To: ruby-talk ML
Subject: Won't Go

Cant get Ruby to run it seems. Windows XP. downloaded with 1.8.6 one
click installer. try to run "puts gets". works in irb. "gets" does not
work in sciTE - it does nothing, but i can close it. if run from command
prompt, the window closes immediatly. if i try to run a sample program.
window closes after input into sample program. i am looking for a good
language to learn oop. but i cant get this one to run. Please help.
--
Posted via http://www.ruby-forum.com/.

You can test your code in real time. If you want to write a program and run
it you need to write it in a text editor and then run it from the command
line with ruby <filename>

···

On Wed, Sep 23, 2009 at 3:42 PM, Ill Everbe <illeverbe@yahoo.com> wrote:

Ill Everbe wrote:
> Cant get Ruby to run it seems. Windows XP. downloaded with 1.8.6 one
> click installer. try to run "puts gets". works in irb. "gets" does not
> work in sciTE - it does nothing, but i can close it. if run from command
> prompt, the window closes immediatly. if i try to run a sample program.
> window closes after input into sample program. i am looking for a good
> language to learn oop. but i cant get this one to run. Please help.

Thanks for reply. i think i mentioned irb works. but i don't guess i can
run programs or edit code in irb.
--
Posted via http://www.ruby-forum.com/\.

--
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can’t hear a word you’re saying."

-Greg Graffin (Bad Religion)

thanks much. seems to work if i use text editor and then run from
command line.
i will also check out the ide's.

clearly i am no pro. i need to solve complex engineering problems. i now
have 2000 lines of code in liberty basic but wind up passing dozens of
parameters into subroutines. its pretty ugly. now runs but a bit too
complex for me to debug. so i figure oop is the way to go, but
unsuppported by most basic languages. i am a bit fearful to start over
in a new language. i am thinking it is worth effort to learn ruby.

any advice? thanks, craig.

···

--
Posted via http://www.ruby-forum.com/.

Ill Everbe wrote:

thanks much. seems to work if i use text editor and then run from command line.
i will also check out the ide's.

clearly i am no pro. i need to solve complex engineering problems. i now have 2000 lines of code in liberty basic but wind up passing dozens of parameters into subroutines. its pretty ugly. now runs but a bit too complex for me to debug. so i figure oop is the way to go, but unsuppported by most basic languages. i am a bit fearful to start over in a new language. i am thinking it is worth effort to learn ruby.

any advice? thanks, craig.
  

What kind of problems for what kind of engineering?

Try taking a small piece of basic code and making just the syntactic changes to get it running in Ruby. Then review the code's control structures and change them to use Ruby idioms. When you have a problem, look up the language elements that seem to be involved in a Ruby book. Check that all the paired things are where they should be( parens, brackets, braces, quotes, do's, end's etc.).

When you are comfortable with straight procedural Ruby, look for groups of variables that are usually used together. Replace them with arrays, hashes, or simple data holding objects. Look for pieces of code that only involves one kind of object. Make that code into a method on the object. Explore your program and Ruby together. Every now and then you will have an an "aha" moment when everything gets smaller, clearer, and cleaner.

Learn to Ruby's unit test facilities early on. Write little tests for everything and run them after each change to your code.

Good luck and have fun.

--Bill

Any language you learn will probably help you think about programming better.

I find Ruby friendly and expressive. It's far from being the language I'm
best at (I'm definitely better in C and sh, probably better in awk, perl,
and GNU make), but it's a very versatile language.

I have never tried to learn Ruby except as an experienced programmer, so I
am not sure what to recommend. I found the pickaxe book ("Programming Ruby")
quite pleasant and well-written, but I suspect that it helps a lot that
I'm used to programming. I liked Chris Pine's "learning to program", which I
read to see if I could recommend it to people, and I could.

-s

···

On 2009-09-24, Ill Everbe <illeverbe@yahoo.com> wrote:

clearly i am no pro. i need to solve complex engineering problems. i now
have 2000 lines of code in liberty basic but wind up passing dozens of
parameters into subroutines. its pretty ugly. now runs but a bit too
complex for me to debug. so i figure oop is the way to go, but
unsuppported by most basic languages. i am a bit fearful to start over
in a new language. i am thinking it is worth effort to learn ruby.

--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
| Seebs.Net <-- lawsuits, religion, and funny pictures
Fair game (Scientology) - Wikipedia <-- get educated!

Craig,

Don't know if this is still of use to you _but_ visit
www.rubylearning.com to get in with a community of users who learn ruby
in a collaborative way.

you'll be rubbing shoulders with very experienced programmers be they
sys admins or web developers.

but everyone (in the classes I've been in are starting at a similar
place) and i think if you have done some programming in basic you'll fit
fine.

ruby core is FREE to join.

cheers,

dave.

Ill Everbe wrote:

···

thanks much. seems to work if i use text editor and then run from
command line.
i will also check out the ide's.

clearly i am no pro. i need to solve complex engineering problems. i now
have 2000 lines of code in liberty basic but wind up passing dozens of
parameters into subroutines. its pretty ugly. now runs but a bit too
complex for me to debug. so i figure oop is the way to go, but
unsuppported by most basic languages. i am a bit fearful to start over
in a new language. i am thinking it is worth effort to learn ruby.

any advice? thanks, craig.

--
Posted via http://www.ruby-forum.com/\.

engineering problem
if you really want to know
- structural and machinery analysis to dermine the load capacity for
offshore cranes- including impact effects due to wave motion on load
lifted from a workboat, as well as forces due to tilt and veerical and
horizontal acceleration of crane itself mounted on a non level floating
vessel.

ruby looks sweet. i hope to get the hang of oop

thanks much bill, walton and glenn

···

--
Posted via http://www.ruby-forum.com/.