17 Jul, 2009, Igabod wrote in the 21st comment:
Votes: 0
Metsuro said:
you'd want gems, rake, irb, ruby-dev… eventmachine for your network stuff… rails for web development…

I looked for all of those and never found anything remotely similar except the ruby IOO scripting language and I looked in every category twice just to make sure I didn't miss anything. Though I don't think I'll be needing some of the things mentioned since I'm not into web development and I'm not planning on doing anything very intricate with networking or anything.

I'm just learning ruby so all I need is the basic setup here.
17 Jul, 2009, Tyche wrote in the 22nd comment:
Votes: 0
Igabod said:
I'm installing ruby in cygwin right now and was curious if there's anything else I need to install to use ruby in cygwin. I'm installing ruby which is under the devel header in the package manager. Are there any specific libs I need to install too?


Any dependencies are installed automatically by cygwin's setup. Unless you screw around in the package manager and uncheck what it picks to install.
The only thing that might not be installed is rubygems. I don't recall whether or not whether it is included with the cygwin ruby package.
If after you install ruby, the command 'gems' isn't found, then you have to go get gems from rubyforge and install it.
That is if you want to use gems, which you probably will.
17 Jul, 2009, Igabod wrote in the 23rd comment:
Votes: 0
Tyche said:
Igabod said:
I'm installing ruby in cygwin right now and was curious if there's anything else I need to install to use ruby in cygwin. I'm installing ruby which is under the devel header in the package manager. Are there any specific libs I need to install too?


Any dependencies are installed automatically by cygwin's setup. Unless you screw around in the package manager and uncheck what it picks to install.
The only thing that might not be installed is rubygems. I don't recall whether or not whether it is included with the cygwin ruby package.
If after you install ruby, the command 'gems' isn't found, then you have to go get gems from rubyforge and install it.
That is if you want to use gems, which you probably will.


I don't think it's included with cygwin, I couldn't find it anywhere. But just to make sure I went into cygwin and typed gems update cause the rubyforge website said that command would update it to the latest version if I have any version installed. The output from that is a little confusing cause it leads me to believe that I have gems installed but that it's a bad copy or something.

Quote
bash: /cygdrive/c/Ruby/bin/gem: D:/Users/Luis/projects/oss/oci/installer2-trunk/ruby/bin/ruby.exe^M: bad interpreter: No such file or directory


note the D:/Users/Luis part, that's not my path for cygwin or my user name. Quite confusing there.
17 Jul, 2009, Metsuro wrote in the 24th comment:
Votes: 0
btw, when you did .length.to_i thats not need.
irb(main):001:0> "david".length
=> 5
17 Jul, 2009, Igabod wrote in the 25th comment:
Votes: 0
Metsuro said:
btw, when you did .length.to_i thats not need.
irb(main):001:0> "david".length
=> 5

I thought it was needed cause I was adding them together and needed to convert the string to integer. I see where I got it messed up though, the .length portion is an integer until it is puts'ed so the to_i was redundant. Thanks for pointing that out to me.
17 Jul, 2009, Kayle wrote in the 26th comment:
Votes: 0
Igabod said:
but I don't know unix commands well enough to switch to linux or any other unix clone. I also don't feel like learning it so I'll deal with the eccentricities of Cygwin.


I'm sorry, but this is like saying you don't want to learn C++ because it looks different then C.

andLinux has a GUI side. You don't need to learn anything new. You can just open Synaptic and install any packages that you need. Or if you know the package sudo apt-get install <package name or names>. You're also not limited to what the Cygwin developers feel like adding. If it can be added to Debian/Ubuntu, you can add it to andLinux. Using Cygwin is like limiting your options to what existed in the 90's.
17 Jul, 2009, Tyche wrote in the 27th comment:
Votes: 0
Igabod said:
I don't think it's included with cygwin, I couldn't find it anywhere. But just to make sure I went into cygwin and typed gems update cause the rubyforge website said that command would update it to the latest version if I have any version installed. The output from that is a little confusing cause it leads me to believe that I have gems installed but that it's a bad copy or something.

Quote
bash: /cygdrive/c/Ruby/bin/gem: D:/Users/Luis/projects/oss/oci/installer2-trunk/ruby/bin/ruby.exe^M: bad interpreter: No such file or directory


note the D:/Users/Luis part, that's not my path for cygwin or my user name. Quite confusing there.


Yeah it's finding the windows version of gems, because you don't have it (a rubygems for cygwin) installed, which is okay.

Assuming you have cygwin's ruby installed, which you can verify with:
$ cygcheck -c ruby
Cygwin Package Information
Package Version Status
ruby 1.8.7-p72-2 OK

or

$ ruby –version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]

That's all you need to install with cygwin's setup.

…then you need to go get rubygems from rubyforge and install it.
http://rubygems.org/ is the home site.

Gems is ruby's package management utility.
Many of the utilities/libraries that Metsuro mentioned are "gems" and are installed with the gem command.
17 Jul, 2009, Igabod wrote in the 28th comment:
Votes: 0
Kayle said:
Igabod said:
but I don't know unix commands well enough to switch to linux or any other unix clone. I also don't feel like learning it so I'll deal with the eccentricities of Cygwin.


I'm sorry, but this is like saying you don't want to learn C++ because it looks different then C.

andLinux has a GUI side. You don't need to learn anything new. You can just open Synaptic and install any packages that you need. Or if you know the package sudo apt-get install <package name or names>. You're also not limited to what the Cygwin developers feel like adding. If it can be added to Debian/Ubuntu, you can add it to andLinux. Using Cygwin is like limiting your options to what existed in the 90's.


I'm not going to rehash everything I said in the other threads about andLinux, it'll suffice to say that it didn't work how it's supposed to for me and even with several people helping me we couldn't solve the problem so it became too much of a hassle to be worth the switch. And no I'm not saying I don't wanna learn linux cause it looks different, I'm saying I'm happy with windows for every other use of my computer aside from the programming aspect, so it would be more of a hassle to have linux installed when I want to play games or just surf the web. I'm not adverse to learning difficult things, I am however adverse to switching to something that causes more problems than it solves.
17 Jul, 2009, Igabod wrote in the 29th comment:
Votes: 0
Tyche said:
Yeah it's finding the windows version of gems, because you don't have it (a rubygems for cygwin) installed, which is okay.

Assuming you have cygwin's ruby installed, which you can verify with:
$ cygcheck -c ruby
Cygwin Package Information
Package Version Status
ruby 1.8.7-p72-2 OK

or

$ ruby –version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]

That's all you need to install with cygwin's setup.

…then you need to go get rubygems from rubyforge and install it.
http://rubygems.org/ is the home site.

Gems is ruby's package management utility.
Many of the utilities/libraries that Metsuro mentioned are "gems" and are installed with the gem command.


Right, thanks. Got gems installed.
17 Jul, 2009, Chris Bailey wrote in the 30th comment:
Votes: 0
I have a new and better solution for you! Vmware's free VM server utility that runs in windows! You can install your favorite flavor of linux onto a virutal machine and run it from the vm client application, you can even make it full screen so you can't even tell you aren't in linux! =)
17 Jul, 2009, Igabod wrote in the 31st comment:
Votes: 0
Chris Bailey said:
I have a new and better solution for you! Vmware's free VM server utility that runs in windows! You can install your favorite flavor of linux onto a virutal machine and run it from the vm client application, you can even make it full screen so you can't even tell you aren't in linux! =)

link please? I'll check it out.

[edit to add]
virtual machine? this isn't something that requires me to be online to use is it? cause for that I can just log onto my shell account. I need this for when I'm offline.
17 Jul, 2009, Igabod wrote in the 32nd comment:
Votes: 0
One thing I've noticed is that with the p alias for puts it prints " marks.

puts 'Hello, what is your name?'
name = gets.chomp
p 'Welcome, ' +name+ '.'
if name == 'Igabod'
puts 'Greetings master!'
end
gets


note only the line that says Welcome name uses the p alias

output:
Quote
Hello, what is your name?
Igabod
"Welcome, Igabod."
Greetings master!


and note the quotes around only the line that says Welcome, Igabod. Is there a reason for the quotes?
17 Jul, 2009, Metsuro wrote in the 33rd comment:
Votes: 0
And VM means your hosting a virtual machine. So if your running say windows vista, you log in and do all your windows stuff double click on VM it gives you an option thats like… Boot what!? if you installed fedora (i did once on a VM) it booted fedora in that window, so it was like… i was remoting into a shell account, but on my own machine. So its like cygwin in that it works inside windows, but it gives you a true linux distro with its full gui interface to play in. If your scared about learning commands / or just to busy fedora is really easy and helps you make the root and main user, not to mention yum and its GUI are so easy you just search for packages click and install.
17 Jul, 2009, Igabod wrote in the 34th comment:
Votes: 0
Metsuro said:
And VM means your hosting a virtual machine. So if your running say windows vista, you log in and do all your windows stuff double click on VM it gives you an option thats like… Boot what!? if you installed fedora (i did once on a VM) it booted fedora in that window, so it was like… i was remoting into a shell account, but on my own machine. So its like cygwin in that it works inside windows, but it gives you a true linux distro with its full gui interface to play in. If your scared about learning commands / or just to busy fedora is really easy and helps you make the root and main user, not to mention yum and its GUI are so easy you just search for packages click and install.


Ok, sounds good to me, can I get a link to check it out?

I probably won't be using the VM for anything except coding so I won't need to learn very many new commands right away. I'll probably end up learning them over time anyway but I like not being forced to learn them right off the bat.

[edit to add] No need to provide me the link, I found it with a little google search. Problem is you have to register to download it and the registration service is temporarily unavailable. I'll try again tomorrow.
17 Jul, 2009, Tyche wrote in the 35th comment:
Votes: 0
Igabod said:
One thing I've noticed is that with the p alias for puts it prints " marks.


Kernel.p is not an alias for Kernel.puts
p executes Object.inspect on each of its arguments.
17 Jul, 2009, Chris Bailey wrote in the 36th comment:
Votes: 0
Tyche said:
Kernel.p is not an alias for Kernel.puts
p executes Object.inspect on each of its arguments.


Tyche is absolutely correct, sorry for the mistake in my previous post. =)
17 Jul, 2009, quixadhal wrote in the 37th comment:
Votes: 0
Hehehe, I've been pushing virtual machines for a while now. :)

If you can't get that free one to work (I should look for it myself too), and you don't NEED to install things yourself, you can download vmware's free "vmplayer" and then grab a pre-installed VM of debian/gentoo/etc from VM Planet. If you're a GUI person, it's hard to go wrong with Ubuntu.

If you configure it to use "bridged" networking, it will look just like a real computer to anything else on your LAN. If you use private networking, it will only be accessible to you from your windows machine.
17 Jul, 2009, Igabod wrote in the 38th comment:
Votes: 0
So I don't need to download the virtual server? just vmplayer? I'll take a look at that when I try and download it again tonight. Thanks.
17 Jul, 2009, David Haley wrote in the 39th comment:
Votes: 0
Quote
So if you ask questions using a prompt without a newline you either need to flush stdout or make sure the sync flag is set to true like above.

Oh. You weren't talking about flushing on exit then, but flushing without writing a newline. That's actually fairly common.



As a general remark, high-level languages are often a lot of fun to work with at first; people compare the experience to "feeling free", "flying", etc. The nice thing about Ruby and Python in particular is that you have a huge standard library to solve many common tasks. Lua is in many ways a simpler and more elegant language, while being just as powerful, but is somewhat less appropriate for somebody who just wants to write general stuff because it doesn't come with "batteries included". Lua is more appropriate as a language to build domain-specific languages with, for example. I wouldn't want to put too much of a downer on all this enthusiasm, but I still have my doubts about the suitability of languages like this for writing very large systems.

As to why people refuse to change languages, well, that's a big question, but I suspect it has to do with being scared of things they don't know or that look different. It's probably similar to why so many people utterly refuse to even consider C++ and stay with C, even though the things they're trying to do would be far easier in C++ than in C. And C to C++ is a far smaller shift than C to e.g. Ruby…
17 Jul, 2009, tphegley wrote in the 40th comment:
Votes: 0
DavidHaley said:
As to why people refuse to change languages, well, that's a big question, but I suspect it has to do with being scared of things they don't know or that look different. It's probably similar to why so many people utterly refuse to even consider C++ and stay with C, even though the things they're trying to do would be far easier in C++ than in C. And C to C++ is a far smaller shift than C to e.g. Ruby…


This is pretty much absolutely the reason why it's hard for me to switch. I am just now getting better with C, C++ is still something I'd like to mess with later. I spend maybe 3-5 hours per week (sometimes more, sometimes less) on my hobby, which are my games. I am still getting my feet wet so to say with learning C, but I just don't have the time to learn something new. Putting Lua into smaug was a big step for me in looking at another language. I still need to pursue this more, but I will admit Ruby has intrigued me as well with it's ease of use, as stated by the people in the Ruby forums here.

I want to learn new languages, but time permitting(working two jobs, raising a 17 month old, being a good husband), it's hard. So I stick with what I know for now and slowly kind of peer into these threads to see what's out there. I would say over 3/4's of the people that visit this site (not just ones who post) are amateur programmers and don't really have an education of computer science, but just do this for a hobby. I'm sure they are waiting for something that they can look at (via an actual game made from Ruby, or Lua, or Python, or whatever). This is how I learn and I'm sure it's how others learn.

I really didn't mean this to be a rant, but it seems it may come off as one. This is just my opinion though. I guess this is just an insight into why I don't want to learn new languages right away. :blues:
20.0/79