apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
lukeshu has joined #ruby
stephenjudkins has joined #ruby
sohocoke has quit [Quit: sohocoke]
tripitakit has quit [Ping timeout: 260 seconds]
<shadoi> why are you using a global?
<shadoi> and why is it nil when you think it's a number?
kevinbond has quit [Quit: kevinbond]
<tris> looks like neither of these work in irb, either, same error
<tris> if I don't use a global, will it work? again, this is just a simple erb template
oskarth has quit [Read error: Connection reset by peer]
davidpk has quit [Quit: Computer has gone to sleep.]
<shadoi> 0.upto(5) {|i| puts i}
igotnolegs has joined #ruby
<shadoi> should work fine
<shadoi> just make sure your $foo var is actually what you think it is
snip_it has quit [Quit: snip_it]
sohocoke has joined #ruby
<lukeshu> Is there a way to make .collect{...} give back an instance of a class that extends Array?
<tris> ah, got it now. missed the |i|. duh.
<tris> thanks!
<stephenjudkins> tris: never use a global unless you understand that it's terrible thing to do, and then under only very specific circumstances
davidpk has joined #ruby
heph has joined #ruby
<shadoi> lukeshu: collect can return a collection of anything
<heph> i want to set an arbitrary value within a hash at the command line. i'd like to use some ux like '--set hash.subhash.key=value'. does anyone have an example of this or can suggest where I should get started?
pdtpatrick_ has joined #ruby
nari has joined #ruby
schovi has quit [Remote host closed the connection]
<lukeshu> shadoi: "([1,2,3].collect{|x| x}).class" gives "Array", I understand that it can be an array of anything; I would like it to give a subclass of Array.
pdtpatrick has quit [Read error: Connection reset by peer]
pdtpatrick_ is now known as pdtpatrick
looopy has quit [Remote host closed the connection]
Xtek- has quit [Read error: Connection reset by peer]
Xtek has joined #ruby
<Alantas> .collect puts together a new Array, not a new instance-of-class-you-called-it-on.
<Alantas> (0..5).collect{|x| x%2} can't be expected to return a Range, for example.
<shadoi> lukeshu: oh, yeah it always returns an array, you should probably just write your own collect that returns what you want, you can call collect from Enumerable and have it wrap the results in your stuff.
<Alantas> Or manually implement the behavior of 'collect'; it's not difficult.
<lukeshu> shadoi: Alantas: Currently I'm doing:
<lukeshu> out = MySubclass.new
<lukeshu> in.each{|x| out.push(...)}
<lukeshu> but figured collect was more efficient
<Alantas> That's pretty much what collect does anyway, I figure.
<Alantas> in.each{|x| out.push(yield x)}
nari has quit [Ping timeout: 250 seconds]
<lukeshu> how would I go about implementing my own collect, that runs quickly, it looks like it's compiled code
<Alantas> That's about as fast as it can get from within Ruby itself.
malkomalko has quit [Remote host closed the connection]
<lukeshu> Alantas: ok, thanks!
khakimov has joined #ruby
<Alantas> And unless you're dealing with a zillion items, it probably won't be noticable.
<lukeshu> That's the thing, I very well might be dealing with a zillion items :)
jlogsdon has quit [Remote host closed the connection]
<lukeshu> ah, the "..." in out.push(...) is probably more expensive anyway
looopy has joined #ruby
<Alantas> Does your class override push()? If so, maybe it would in fact be faster to use the stock 'collect' behavior, then repackage the resulting Array into your type, to take advantage of Array's underlying push() implementation.
perryh_away is now known as perryh
moshef has joined #ruby
<lukeshu> I don't override push(). But, how would I go about repackaging the Array into my type?
<Alantas> Well, you might alias 'collect' to '_old_collect' or such, and call the stock behavior that way (from within your class's overridden collect()); *maybe* "super" to get it more elegantly.
<Alantas> As for how to repackage it, that's up to you. If it works closely enough to a stock Array, you might call 'replace', passing in the stock Array.
manizzle has joined #ruby
<Alantas> def collect; self.class.new.replace(super); end # Best-case.
adamkittelson has quit [Remote host closed the connection]
amalvagomes has joined #ruby
Haydos has joined #ruby
pygmael_ has joined #ruby
<lukeshu> Alantas: thanks
<Alantas> Yeah, some tests in irb says that should work.
berserkr has quit [Quit: Leaving.]
<Alantas> (The use of "super", specifically.)
khakimov has quit [Quit: Computer has gone to sleep.]
pygmael has quit [Ping timeout: 265 seconds]
pygmael_ is now known as pygmael
cs[tc] has joined #ruby
<Alantas> class Array;def to_mysubclass;MySubclass.new.replace(self);end;end
<Alantas> ^ another approach, letting you convert arbitrary stock Arrays to your subclass.
<Alantas> ...Or, for that matter, assuming you don't override initialize(), you can just do MySubclass.new(array).
joaoh82 has quit [Remote host closed the connection]
krz has quit [Quit: krz]
icy` has quit [Quit: Leaving]
<Alantas> And if you do: def initialize(*args); return super if args.collect(&:class) == [Array]; ...; end
Zyclops has joined #ruby
Zyclops has left #ruby [#ruby]
ilyam has quit [Quit: ilyam]
Paradox has joined #ruby
<Paradox> norman clarke hang out in here?
dagnachewa has quit [Quit: Leaving]
mvangala has joined #ruby
kevinbond has joined #ruby
liluo has quit [Remote host closed the connection]
cephalopod has joined #ruby
<Boohbah> Paradox: who's that?
<Paradox> HAML's lead maintainer
<Paradox> was going to pester him to see if he could put redcarpet support in natively so i dont have to write a helper every time i want to use it in ruby
M- has joined #ruby
<Paradox> erm
<Paradox> in rails
snip_it has joined #ruby
<Boohbah> Paradox: tried email?
<Paradox> i might send him a GH message
<Paradox> i just like to check if people are in IRC
moshef has quit [Quit: moshef]
robotmay has quit [Remote host closed the connection]
trollstyre is now known as nisstyre
sbanwart has joined #ruby
banjara has quit [Quit: Leaving.]
moshef has joined #ruby
rasbonics has quit [Quit: rasbonics]
savage-_ has quit [Remote host closed the connection]
pjn_oz has joined #ruby
cj3kim has quit [Quit: Leaving]
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
cj3kim has joined #ruby
sohocoke has quit [Quit: sohocoke]
jchauncey has joined #ruby
jchauncey has quit [Client Quit]
h4mz1d has joined #ruby
nfk has quit [Quit: yawn]
iamjarvo has joined #ruby
jonathanwallace has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
snip_it has quit [Quit: snip_it]
ConstantineXVI has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
mykeus has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
L-----D has joined #ruby
snip_it has joined #ruby
iamjarvo has quit [Quit: Leaving.]
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
liluo has joined #ruby
dhaskew_ has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
sohocoke has joined #ruby
davidcelis has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
akem has quit [Ping timeout: 255 seconds]
dv310p3r has joined #ruby
mikepack has joined #ruby
catfired has quit [Ping timeout: 245 seconds]
nlc has joined #ruby
vitor-br has joined #ruby
Ontolog has joined #ruby
Solnse has joined #ruby
replore_ has joined #ruby
<CannedCorn> guys is it possible to return two values from a block?
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
<sepp2k1> CannedCorn: No, but it's possible to return an array containing two elements from a block (which you can then take apart with "a,b = yield")
CannedCorn has quit [Quit: Computer has gone to sleep.]
jlogsdon has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
sohocoke has quit [Quit: sohocoke]
kevinbond has quit [Quit: kevinbond]
Boohbah is now known as Boohbii
Boohbii is now known as Boohbah
subbyyy has quit [Quit: Leaving.]
busybox42 has quit [Quit: Leaving.]
Paradox has left #ruby [#ruby]
xaq has joined #ruby
busybox42 has joined #ruby
benatwork has quit [Remote host closed the connection]
L-----D has quit [Quit: Leaving]
c0rn has joined #ruby
Araxia has quit [Quit: Araxia]
vertroa has quit [Read error: Connection reset by peer]
davidpk has quit [Quit: Computer has gone to sleep.]
vertroa has joined #ruby
snip_it has quit [Quit: snip_it]
thorncp has joined #ruby
snip_it has joined #ruby
sbanwart has quit [Ping timeout: 245 seconds]
ConstantineXVI has joined #ruby
Constant_ has joined #ruby
ConstantineXVI has quit [Read error: Connection reset by peer]
sbanwart has joined #ruby
chson has joined #ruby
TorpedoSkyline has quit [Quit: Leaving]
c0rn has quit [Quit: Computer has gone to sleep.]
shadoi has quit [Remote host closed the connection]
xaq has quit [Remote host closed the connection]
rexbutler has joined #ruby
Ontolog has quit [Remote host closed the connection]
iamjarvo has joined #ruby
nfluxx_ has joined #ruby
khakimov has joined #ruby
nfluxx has quit [Ping timeout: 244 seconds]
nfluxx_ has quit [Ping timeout: 272 seconds]
cads has joined #ruby
sbanwart_ has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
Solnse has quit [Read error: No route to host]
radic_ is now known as radic
sbanwart has quit [Ping timeout: 272 seconds]
keithcelt has quit [Remote host closed the connection]
kenperkins has joined #ruby
Gavilan has joined #ruby
tommyvyo has joined #ruby
cyb3r3li0g has joined #ruby
indian has quit [Ping timeout: 240 seconds]
Chryson has quit [Quit: Leaving]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
indian has joined #ruby
fbernier has joined #ruby
x0F_ is now known as x0F
sbanwart__ has joined #ruby
eka has quit [Remote host closed the connection]
CheeToS has joined #ruby
cyb3r3li0g has quit [Max SendQ exceeded]
sbanwart_ has quit [Ping timeout: 272 seconds]
cyb3r3li0g has joined #ruby
cyb3r3li0g has quit [Max SendQ exceeded]
graspee has quit [Quit: past my bed time]
niku4i has joined #ruby
cyb3r3li0g has joined #ruby
vitoravelino is now known as vitoravelino`afk
googya has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
eywu has quit [Quit: Leaving.]
niklasb has quit [Ping timeout: 244 seconds]
cyb3r3li0g has quit [Max SendQ exceeded]
cyb3r3li0g has joined #ruby
jlogsdon has quit [Ping timeout: 248 seconds]
niklasb has joined #ruby
yonggu has joined #ruby
sohocoke has joined #ruby
EzeQL has quit [Ping timeout: 252 seconds]
uris has joined #ruby
niku4i has quit [Remote host closed the connection]
EzeQL has joined #ruby
CannedCorn has joined #ruby
<CannedCorn> dope, thanks sep
joaoh82 has joined #ruby
Tref has joined #ruby
Solnse has joined #ruby
sepp2k1 has quit [Remote host closed the connection]
mdhopkins has quit [Quit: mdhopkins]
C0deMave_ has joined #ruby
snip_it has quit [Quit: snip_it]
Shahor has quit [Read error: Connection reset by peer]
niku4i has joined #ruby
C0deMaver1ck has quit [Quit: ZNC - http://znc.in]
C0deMave_ is now known as C0deMaver1ck
C0deMaver1ck has quit [Changing host]
C0deMaver1ck has joined #ruby
Constant_ has quit [Remote host closed the connection]
ConstantineXVI has joined #ruby
cyb3r3li0g has quit [Read error: Operation timed out]
SegFaultAX has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 252 seconds]
ConstantineXVI has quit [Ping timeout: 240 seconds]
niku4i has quit [Remote host closed the connection]
albemuth has joined #ruby
h4mz1d has joined #ruby
C0deMave_ has joined #ruby
C0deMaver1ck has quit [Ping timeout: 245 seconds]
C0deMave_ is now known as C0deMaver1ck
C0deMaver1ck is now known as Guest97584
kenperkins has quit [Quit: Computer has gone to sleep.]
cyb3r3li0g has joined #ruby
cordoval has joined #ruby
cyb3r3li0g has quit [Max SendQ exceeded]
Guest97584 is now known as C0deMaver1ck
C0deMaver1ck has quit [Changing host]
C0deMaver1ck has joined #ruby
cordoval has left #ruby [#ruby]
yosinof has quit [Ping timeout: 252 seconds]
araujo has quit [Ping timeout: 265 seconds]
emmanuelux has quit [Ping timeout: 264 seconds]
albemuth has quit [Read error: Connection reset by peer]
rushed has joined #ruby
noodletraveler has joined #ruby
c0rn has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
dbgster has joined #ruby
Ontolog has joined #ruby
sebastor_ has joined #ruby
yugui_zzz is now known as yugui
sebastorama has quit [Disconnected by services]
yosinof has joined #ruby
BrokenCog has joined #ruby
albemuth has joined #ruby
BrokenCog has quit [Client Quit]
sebastor_ has left #ruby [#ruby]
sebastorama has joined #ruby
Ontolog has quit [Remote host closed the connection]
prometheus has joined #ruby
luxurymode has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Client Quit]
yugui is now known as yugui_zzz
stefanp_ has joined #ruby
albemuth has quit [Read error: Connection reset by peer]
EzeQL has quit [Ping timeout: 248 seconds]
EzeQL has joined #ruby
stefanp has quit [Ping timeout: 265 seconds]
albemuth has joined #ruby
krusty_ar has quit [Ping timeout: 245 seconds]
snip_it has joined #ruby
davidpk has joined #ruby
prometheus has quit [Ping timeout: 252 seconds]
C0deMaver1ck is now known as beau
Solnse has quit []
beau is now known as C0deMaver1ck
mvangala has quit [Remote host closed the connection]
fbernier has quit [Ping timeout: 272 seconds]
sbanwart__ has quit [Ping timeout: 245 seconds]
niklasb has quit [Read error: Operation timed out]
ananthakumaran has joined #ruby
Faris1 has quit [Ping timeout: 272 seconds]
aries has joined #ruby
jkarayusuf has joined #ruby
xaq has joined #ruby
snip_it has quit [Quit: snip_it]
khakimov has quit [Quit: Computer has gone to sleep.]
xaq has quit [Remote host closed the connection]
Targen has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
rexbutler has quit [Remote host closed the connection]
amalvagomes has quit [Quit: amalvagomes]
Guedes_out has quit [Ping timeout: 265 seconds]
<CannedCorn> best way to group an array of key/value pairs
<CannedCorn> ?
td123 has quit [Read error: Connection reset by peer]
pdtpatrick has joined #ruby
Guedes_out has joined #ruby
td123 has joined #ruby
<bnagy> in a Hash?
<bnagy> group like how?
dbgster has quit [Quit: dbgster]
webusnix has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
moshef has quit [Quit: moshef]
ryanf has joined #ruby
kenichi has quit [Remote host closed the connection]
dbgster has joined #ruby
yoklov has joined #ruby
ipsifendus has joined #ruby
indian has quit [Read error: Connection reset by peer]
snip_it has joined #ruby
yugui_zzz is now known as yugui
nlc has quit [Quit: Leaving]
yugui has left #ruby [#ruby]
<CannedCorn> so ive got date keys and values in an array [{date => date, value => value})
<CannedCorn> err [{:date => date, :value => value}]
<CannedCorn> and i want to make a hash of {:date => [value, value value…]}
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ has joined #ruby
dhaskew_ is now known as dhaskew
Haydos has quit [Read error: Connection reset by peer]
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
tomb_ has quit [Quit: Computer has gone to sleep.]
googya has quit [Quit: Leaving.]
pygmael_ has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
savage- has joined #ruby
jcromartie has quit [Quit: jcromartie]
pygmael has quit [Ping timeout: 272 seconds]
pygmael_ is now known as pygmael
mikepack has joined #ruby
C0deMaver1ck is now known as beau
beau is now known as C0deMaver1ck
alek_b has quit [Read error: Connection reset by peer]
alek_b has joined #ruby
yugui has joined #ruby
lukeshu` has joined #ruby
C0deMaver1ck has quit [Quit: Leaving...]
yugui has left #ruby [#ruby]
yugui has joined #ruby
lukeshu has quit [Remote host closed the connection]
yugui has left #ruby [#ruby]
h4mz1d has quit [Ping timeout: 252 seconds]
aries has quit [Ping timeout: 252 seconds]
yugui has joined #ruby
Solnse has joined #ruby
mikeycgto has quit [Remote host closed the connection]
ipoval has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
digitalcakestudi has quit [Quit: Leaving.]
<bnagy> doable, but you might not like it :)
vinraec has joined #ruby
<bnagy> [{d: 3, v: 4}, {d: 3, v: 5}].group_by {|h| h[:d]}.each.with_object({}) {|(k,v),h| h[k]=v.map {|hsh| hsh[:v]}} => {3=>[4, 5]}
lukeshu` has quit [Remote host closed the connection]
azm has quit [Ping timeout: 248 seconds]
lukeshu` has joined #ruby
Solnse has quit [Remote host closed the connection]
Solnse has joined #ruby
greyEAX has quit [Remote host closed the connection]
<bnagy> I would probably break it into steps for real code.
Carson__ has joined #ruby
simao has quit [Ping timeout: 245 seconds]
<Carson__> I'm trying to install a gem but when issue the command require 'awesome_print' in irb instead of returning true i get this error message
mikepack has quit [Remote host closed the connection]
<Carson__> ff
greyEAX has joined #ruby
mikepack has joined #ruby
c0rn has quit []
<Carson__> something about saying nomethoderror
cephalopod has quit [Remote host closed the connection]
simao has joined #ruby
<bnagy> probably something about doing something wrong
luxurymode has quit [Quit: Computer has gone to sleep.]
khakimov has joined #ruby
Kwpolska has quit [Read error: Operation timed out]
<Carson__> wel I'm entering this... require 'rubygems' then gem 'awesome_print' then i get an error when i enter require
<Carson__> 'awesome_print'
jkarayusuf has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 244 seconds]
<bnagy> you don't need to require 'rubygems' in irb
<bnagy> can you pastie the actual error?
greyEAX has quit [Remote host closed the connection]
<bnagy> my wife does this. :( "I have an error" "what does it say" "I don't know, it says the computer hates me" >:(
iamjarvo has quit [Quit: Leaving.]
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
<Carson__> here it is .... http://pastie.org/pastes/3918578/text
Hunner has quit [Ping timeout: 276 seconds]
yugui is now known as yugui_zzz
<bnagy> hm. My bet is that it's not backwards compat with 1.8
vjt has quit [Ping timeout: 272 seconds]
vjt has joined #ruby
vandemar has quit [Ping timeout: 264 seconds]
vandemar has joined #ruby
<Carson__> okay sorry i'm a really new when it comes to ruby ... so you're saying I should try to update my version of ruby to something newer?
jayrulez_ has quit [Ping timeout: 252 seconds]
<bnagy> what version is it? Quick google suggests that even 1.8.7 should have that
<Carson__> i'm running 1.8.5
<bnagy> ahhhh
<bnagy> yeah upgrade
<banisterfiend> Carson__: haha, your version of ruby is like 6 years old
mikepack has joined #ruby
Watcher7 has quit [Remote host closed the connection]
yugui_zzz is now known as yugui
<bnagy> Carson__: out of interest, how did you come to have such a dinosaur installed?
<Carson__> okay thanks ... this may sound liek a stupid question but should i uninstall ruby first before i use something like rvm upgrade
<Carson__> i just did a yum install ruby
<bnagy> yum... is this centos, the OS that time forgot?
<Carson__> yeah it's centos
<bnagy> don't uninstall ruby - rvm needs some kind of ruby to get started, even if it's old
<bnagy> hahaha
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
<bnagy> sorry, I shouldn't laugh, but rhel / centos both suck so badly I can't help it
alexim has quit [Read error: Operation timed out]
<bnagy> btw, don't do a 'system' install with rvm unless you like cutting yourself
<Carson__> okay i have another really noob error when i do rvm instaa 1.9.3 http://pastie.org/pastes/3918598/text
<bnagy> ok, a) see above re not doing a system install
<Carson__> okay so i shouldn't do rvm install .... ?
<bnagy> no, don't do it as root
<bnagy> although you've already done it now, I guess
<Carson__> okay thanks i'll try as a regular user
<bnagy> I guess you're probably missing autoconf or something delightful
dbgster has quit [Quit: dbgster]
<bnagy> you need to read that log it mentions to find out
mikepack has quit [Ping timeout: 256 seconds]
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Carson__> okay thanks i'm getting the same error while doing it as a regular user... i'll try reading the log
<bnagy> I don't want to sound distro-bigoted, but any chance you could use a distro that doesn't suck donkey balls?
<banisterfiend> bnagy: sup bnaggy
<bnagy> banisterfiend: all good man. Shagged any good sheep lately?
<Carson__> I suppose i can use debian... it's just i've only played around with fedora and centos
<banisterfiend> bnagy: your mom
<bnagy> fedora will be much better, as would debian
vjt has quit [Ping timeout: 272 seconds]
<bnagy> not that I am a fedora fan either, but it beats the hell out of rhel / centos
vjt has joined #ruby
bpgoldsb has quit [Remote host closed the connection]
bpgoldsb has joined #ruby
<bnagy> banisterfiend: did you dag her while you were at it? That stuff is getting out of hand...
<banisterfiend> bnagy: No, i like it there
<bnagy> :D
<Carson__> bnagy: thanks for the suggestions... i'm primarily a Mac user so I'm not too familiar with linux distros
<bnagy> Carson__: why can't you just use OSX then?
sparc_ has joined #ruby
<bnagy> once you install ports it's almost a real *nix OS
heftig has quit [Quit: leaving]
vng|afk_ has joined #ruby
<Carson__> bnagy: I just decided to do this on my linode VPS and get some more experience with linux
vng|afk__ has joined #ruby
<bnagy> Ok, sounds good. In general, get a recent FC or ubuntu server or debian or whatever
<bnagy> use the system ruby to do a user-based install via rvm or rbenv
<bnagy> then everything should be good
mikepack has joined #ruby
vng|afk has quit [Ping timeout: 244 seconds]
<Carson__> okay thanks
c0rn has joined #ruby
looopy has quit [Remote host closed the connection]
vinraec has quit [Quit: Leaving]
vng|afk_ has quit [Ping timeout: 245 seconds]
uris has quit [Ping timeout: 256 seconds]
macmartine_ has joined #ruby
jayrulez has joined #ruby
<shevy> Carson__ if rbenv or rvm does not work for you, you can still use ruby from sources and compile into a specific --prefix :>
vng|afk__ has quit [Ping timeout: 240 seconds]
prometheus has joined #ruby
macmartine has quit [Ping timeout: 272 seconds]
macmartine_ is now known as macmartine
td123 has quit [Ping timeout: 245 seconds]
uris has joined #ruby
EzeQL has quit [Ping timeout: 252 seconds]
looopy has joined #ruby
rippa has joined #ruby
vng|afk_ has joined #ruby
EzeQL has joined #ruby
<Carson__> shevy: Thanks I'll try that as a last attempt
<shevy> :)
SeySayux_ has quit [Read error: Connection reset by peer]
CheeToS has quit [Ping timeout: 260 seconds]
<bnagy> Carson__: don't listen to shevy, he is just trolling :)
tomzx has quit [Ping timeout: 245 seconds]
greyEAX has joined #ruby
<shevy> my rubies reside at the prefix /Programs/Ruby/ with version 1.8.7p358 and 1.9.3p194 with one symlink pointing to the latest called "Current", these get symlinked into an equivalent /usr/bin /usr/lib equivalent (but it could work with these directories just as well)
<bnagy> he has 'making life hard for yourself' disorder... we try to be supportive, but...
<Carson__> bnagy: I read the error logs and these are the errors http://pastie.org/pastes/3918645/text ... i think i need to install a C compiler
<shevy> bnagy AppDirs really are 100x better than dumping things directly into somewhere
jkarayusuf has joined #ruby
<shevy> (the contents of directories)
<bnagy> Carson__: just set your centos DVD on fire and install a real linux
<shevy> on debian, when I stumble into /usr/bin/file, I need to ask the package manager to what this binary belongs to. with AppDirs, I immediately know just by doing "ls -l" or stat
<Carson__> lol
<shevy> checking for gcc... no
<shevy> checking for cc... no
<shevy> yeah ... on debian based distributions, this usually gets done via "apt-get build essential" or something like that
<bnagy> shevy: yeah I think it's their idea of a security feature
<shevy> or essentials
<bnagy> shevy: it's centos
<bnagy> did you see the part where the system ruby is 1.8.5?
<shevy> hmm omg
<shevy> let's see
<shevy> Carson__ http://www.cyberciti.biz/faq/centos-linux-install-gcc-c-c-compiler/ ... says yum groupinstall 'Development Tools'
<bnagy> NO BURN THE WHOLE THING
<shevy> lol
<shevy> or ... try this ...
<shevy> yum install gcc gcc-c++ autoconf automake
<bnagy> NO NO NO you're putting lipstick on a pig
bambanx has joined #ruby
<shevy> yeah
yosinof has quit [Quit: Leaving]
uris has quit [Quit: leaving]
<bambanx> sup guys
monzie has joined #ruby
deobald__ has joined #ruby
<Carson__> shevy: Thanks I was actually just doing that
Mon_Ouie has quit [Ping timeout: 245 seconds]
<shevy> \o/
<shevy> bnagy, we'll end up with a flying pig :)
<bnagy> it's all going to end in tears, you mark my words
Mon_Ouie has joined #ruby
savage- has quit [Remote host closed the connection]
<bnagy> yum install stuff-from-this-decade
<bambanx> we have a framework for program in ruby using html5 like bowline for mac and linux , but in windows?
monzie has quit [Remote host closed the connection]
<Carson__> bnagy: hahaha noted
jkarayusuf has quit [Remote host closed the connection]
CannedCorn has quit [Quit: Computer has gone to sleep.]
tvw has joined #ruby
vng|afk_ has quit [Ping timeout: 248 seconds]
vng|afk has joined #ruby
<bambanx> which editor is cool for ruby with intellisence code highlight ... for windows? (not rubymine )
MrGando has quit [Read error: Connection reset by peer]
<shevy> hmmmmmm "intellisence code highlight"
<shevy> how many editors actually do that kind of highlighting
monzie has joined #ruby
<bambanx> i dunno
<bambanx> sorry for my bad english
<shevy> you can however try out some editors to see if they are useful. notepad++ geany bluefish sublime-text
<bnagy> vim
<bambanx> thanks
lkba has quit [Ping timeout: 245 seconds]
SeySayux has joined #ruby
Eldariof-ru has joined #ruby
vng|afk has quit [Remote host closed the connection]
kenperkins has joined #ruby
wargasm1 has joined #ruby
MrGando has joined #ruby
jgrevich has joined #ruby
<Carson__> bnagy: okay so it looks like rvm completed the install of 1.9.3 without any errors but when i run ruby --version it still says 1.8.5 http://pastie.org/pastes/3918692/text
minijupe has joined #ruby
<bnagy> Carson__: you need to make some changes to get the path etc correct
<bnagy> it's all on the rvm site
tchebb has quit [Ping timeout: 272 seconds]
<bnagy> modify your shell to fix up the path and source the rvm script
wargasm has quit [Ping timeout: 248 seconds]
<bnagy> .bashrc or probably .cshrc knowing centos
macmartine has quit [Quit: macmartine]
yoklov has quit [Quit: bye!]
michaeldeol has joined #ruby
michaeldeol has left #ruby [#ruby]
<Tref> has attr_accessor been deprecated in 1.9.3
<bnagy> no
jrist is now known as jrist-afk
<Tref> Im having a hard time finding it in the api
<Tref> can someone point me to it?
<Carson__> bnagy: sorry I'm not really sure what you mean
kenperkins has quit [Quit: Computer has gone to sleep.]
<shevy> Tref unlikely, it is doing only very little anyway. attr_accessor :foo is same as ... def foo;@foo;end and def foo=(i);@foo = i; end
<bnagy> Carson__: read the install docs on the rvm site. After you install RVM you also need to change your shell init script so it 1. modifies your path so your local .rvm directory is before the system bin dirs and 2. sources the RVM init script thingy
Juul has quit [Quit: Leaving]
ilyam has joined #ruby
<shevy> Tref hmm I think it used to be in Module
<bnagy> otherwise rvm will put the new binaries in the right place, but you won't be using them because of bad path
tchebb has joined #ruby
<Tref> shevy: yeah thats what I thought
<shevy> but I dont find it there...
<Tref> me either
ilyam has quit [Client Quit]
<shevy> the old pickaxe points to Module http://www.ruby-doc.org/docs/ProgrammingRuby/html/ref_c_module.html#Module.attr_accessor
<Tref> I want to see the source implementation of it
<shevy> yeah hmmm
bambanx has quit [Quit: Saliendo]
yxhuvud has joined #ruby
bambanx has joined #ruby
EzeQL has quit []
davidpk has quit [Ping timeout: 272 seconds]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<shevy> object.c:rb_mod_attr_accessor(int argc, VALUE *argv, VALUE klass)
<shevy> I think it may be in Object
tommyvyo has joined #ruby
<Carson__> bnagy: thanks ... is it the Reload shell configuration & test?
<shevy> but it seems undocumented (???)
<banisterfiend> shevy: hey shev
<bambanx> ok
offby1 has joined #ruby
<shevy> Tref that is the C source I think http://pastie.org/3918716
<offby1> Just making sure: is there really still no support for keyword arguments?
cyb3r3li0g has joined #ruby
headius has quit [Quit: headius]
<bnagy> what are 'keyword arguments' and why should I care?
c0rn has quit []
<shevy> offby1 some little support exists for it I think
fukushim_ has joined #ruby
fukushima has quit [Ping timeout: 240 seconds]
<offby1> bnagy: I don't know that you should care. However, _I_ care.
michaeldeol has joined #ruby
nipra has joined #ruby
<bnagy> offby1: well you phrased the question as if it's some glaring oversight
michaeldeol has quit [Remote host closed the connection]
<offby1> it's the ability to call a method with arguments in any order, resolving the confusion by giving each actual parameter a name. Some other languages have this feature; it's handy. e.g. drive(:miles => 3, :direction => :northeast)
<shevy> well you can use a hash still
<banisterfiend> offby1: oh hey how's things
<offby1> shevy: yes, I'm aware of that
<offby1> banisterfiend: ahoy!
<bnagy> offby1: that will just work? They'll be parsed as a hash
<banisterfiend> offby1: rubyists 'fake' that by using a hash
<offby1> bnagy: there appear to be various gotchas with the syntax. According to the three minutes of Googling that I just did :)
<offby1> banisterfiend: yes, I know
<shevy> hmm
<offby1> banisterfiend: heck, Perl doesn't even have named arguments _at all_
<banisterfiend> offby1: we're getting true named parameters in ruby 2.0, coming next yearh
<shevy> isn't it possible to do ... def foo(i, b='bla',*c) now?
<shevy> \o/
<offby1> shevy: dunno. Is there a bot in the channel? :)
<shevy> other than bnagy no
* shevy runs away!
<shevy> ;D
<offby1> shevy: anyway that looks like you're defining a default value but not necessarily a keyword.
<shevy> I dont think there is any bot here, on #ruby-lang there is though
<bnagy> there is?
cyb3r3li0g has quit [Max SendQ exceeded]
<bnagy> I thought it died
* offby1 sniffs
<shevy> offby1 hmm I always thought something changed there between 1.8 and 1.9
ABK has joined #ruby
<shevy> but hey, ruby 1.9 works for me fully only since yesterday, so... :P
<offby1> shevy: well, I saw some docs that said "keywords are coming in 1.8", then I found something from Matz that said "they'll be here in 1.9" ...
snip_it has quit [Quit: snip_it]
<offby1> *shrug*
<offby1> looks like the answer is "not yet".
<shevy> yeah
<shevy> they prefer to implement features nobody needs first... :P
<shevy> like hashrocket!
<banisterfiend> offby1: are you enjoying your time in ruby, last time we spoke u said 'ruby shouldn't exist' :P
<shevy> what!
<banisterfiend> hehe
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<offby1> actually, yes.
<shevy> !
<offby1> I never expected it to be hard, and it wasn't.
<shevy> well
<offby1> shevy: well, I already know perl and python, and from what I could tell, ruby is very similar to both.
<offby1> I _still_ think so, but hey.
<shevy> on #python there are +1000 folks, on #ruby +600
frishi has quit [Read error: Connection reset by peer]
frishi has joined #ruby
<shevy> I am ok with python
<shevy> but perl ......
<shevy> ................
<offby1> *shrug*
<offby1> heh
<shevy> you get all my . for that
tchebb has quit [Ping timeout: 256 seconds]
<offby1> one thing that I always say about perl: you can get shit done with it :)
<shevy> with ruby too!
<shevy> hmm
<shevy> what language is more complex
<shevy> ruby or perl?
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
davidpk has joined #ruby
kylemcgill has quit [Remote host closed the connection]
tchebb has joined #ruby
shruggar has joined #ruby
<offby1> perl no question
<offby1> crazy syntax
<offby1> really only one implementation.
<offby1> ruby's been redone a buncha times, yes? jruby etc?
diRect_z1 has joined #ruby
<banisterfiend> offby1: yeah, and more recently: rubymotion
<banisterfiend> offby1: www.rubymotion.com
diRect_z has joined #ruby
dhaskew has quit [Quit: dhaskew]
<shevy> hmm that is actually a good point
<shevy> it would be easier to implement a simpler language
<offby1> sure
<shevy> I also find ruby complex though
<offby1> well, compared to what? Forth?
<offby1> scheme?
<shevy> lua
<shevy> :)
indian has joined #ruby
<offby1> never learned enough lua to judge
<shevy> and perhaps even php
<offby1> *shudder*
<offby1> php might be more complex than perl, to judge by the recent famous rant
<shevy> been years since I last used php hmm
<shevy> perhaps I should give it a try again
jgrevich has quit [Quit: jgrevich]
adamkittelson has joined #ruby
jgrevich has joined #ruby
macmartine has joined #ruby
deobald__ has quit [Ping timeout: 260 seconds]
ananthakumaran has quit [Quit: Leaving.]
kylemcgill has joined #ruby
CheeToS has joined #ruby
Eldariof59-ru has joined #ruby
davidpk has quit [Ping timeout: 245 seconds]
indian has quit [Remote host closed the connection]
univers has joined #ruby
davidpk has joined #ruby
snip_it has joined #ruby
Eldariof-ru has quit [Ping timeout: 260 seconds]
Draco_ has joined #ruby
Draco_ has quit [Remote host closed the connection]
Draco_ has joined #ruby
shevy has quit [Read error: Operation timed out]
Draco_ has quit [Remote host closed the connection]
davidpk has quit [Ping timeout: 244 seconds]
davidpk has joined #ruby
davidpk has quit [Client Quit]
<Carson__> I finally got ruby 1.9.3 installed but when i run gem i -r rails I'll get an error saying loading commad: install (LoadError) cannot load such file --zib .... error while executing gem ... (NameError) uninitialized constant Gem :: Commands::InstallCommand
cantonic has joined #ruby
gokul has joined #ruby
univers has quit []
h4mz1d has joined #ruby
c0rn has joined #ruby
prometheus has quit [Ping timeout: 248 seconds]
djdb has joined #ruby
tonini has joined #ruby
wvdschel_ has quit [Ping timeout: 245 seconds]
shruggar has quit [Quit: Leaving.]
apeiros_ has quit [Remote host closed the connection]
shevy has joined #ruby
apeiros_ has joined #ruby
macmartine has quit [Quit: macmartine]
snip_it has quit [Quit: snip_it]
bambanx_ has joined #ruby
diRect_z1 has left #ruby [#ruby]
h4mz1d has quit [Ping timeout: 272 seconds]
neersighted is now known as neersighted|AFK
looopy has quit [Remote host closed the connection]
<bnagy> Carson__: real OS. Rails is a whole new ballgame
<bnagy> find a guide for installing rails
bambanx has quit [Ping timeout: 255 seconds]
<bnagy> there are a lot of OS packages you will need
jackiechan0 has joined #ruby
Tref has quit [Quit: Tref]
<Carson__> bnagy: Okay I'l just trying to install a basic package awesome_print and I get the same error
<bnagy> ok, maybe pastie the exact error
ananthakumaran has joined #ruby
schovi has joined #ruby
apeiros_ has quit [Remote host closed the connection]
joppe has quit [Ping timeout: 252 seconds]
greyEAX has quit [Read error: Connection reset by peer]
greyEAX has joined #ruby
Eldariof59-ru has quit []
diRect_z has left #ruby [#ruby]
eph3meral has quit [Quit: Leaving]
stewart_ has quit [Quit: Leaving.]
indeterminate has joined #ruby
minijupe has quit [Quit: minijupe]
mikepack has quit [Remote host closed the connection]
d3c has joined #ruby
mikepack has joined #ruby
bambanx__ has joined #ruby
<bnagy> you're still using the wrong ruby by the looks
<Carson__> bnagy: when i run ruby -v i get ruby 1.9.2p320 (2012-04-20 revision 35421) [i686-linux]
cs[tc] has quit [Ping timeout: 255 seconds]
yugui is now known as yugui_zzz
cs[tc] has joined #ruby
yugui_zzz is now known as yugui
bambanx_ has quit [Ping timeout: 255 seconds]
mikepack has quit [Ping timeout: 250 seconds]
<bnagy> ok well that error is referring to a system install
looopy has joined #ruby
tvw has quit [Remote host closed the connection]
schovi has quit [Remote host closed the connection]
lolmaus has joined #ruby
<Carson__> bnagy: do you have any recommendations as to what i should do now?
ph^_ has joined #ruby
<bnagy> format the box, install a real OS, do an rvm user install then follow a rails install guide
<bnagy> or you could try #rvm
joppe has joined #ruby
<Carson__> bnagy: okay thanks
crodas has quit [Quit: Disconnecting from stoned server.]
<bnagy> whenever I try and recover from a system install I just rm -rf all the rvm stuff
<shevy> hehe
<bnagy> cause the way it works is...
crodas has joined #ruby
<shevy> Carson__ you could give the shevy-way a try too
<shevy> and compile from the source :>
kryptek_ has joined #ruby
kryptek_ has quit [Excess Flood]
kryptek_ has joined #ruby
Hanmac1 is now known as Hanmac
Faris has joined #ruby
Juul has joined #ruby
adamkittelson has quit [Remote host closed the connection]
<Carson__> shevy: hahaha I might give that try .... when i go into irb it says this now Readline was unable to be required, if you need completion or history install readline then reinstall the ruby.
shruggar has joined #ruby
senny has joined #ruby
<shevy> hmm
<shevy> you probably miss readline on your system
<shevy> you dont have to reinstall ruby per se however
<shevy> I tell you how I do it. I compile ruby from source, then sometimes the base system lacks readline
<shevy> so I make sure that readline works first (I compile readline from source into /usr prefix)
<shevy> then, when it was compiled, I enter the ruby directory, where it was extracted
<shevy> I go into ext/readline and run the ... extconf.rb file that is there
<shevy> do make, then start irb, and readline will work
joaoh82 has quit [Remote host closed the connection]
<shevy> Readline is very useful to have by the way
Ontolog has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
Faris has quit [Quit: Leaving.]
Ontolog has quit [Remote host closed the connection]
keanehsiao has joined #ruby
replore_ has quit [Remote host closed the connection]
TheFuzzball has quit [Quit: Leaving...]
<Carson__> shevy: sorry where can i find the directory that has Readline?
maesbn has joined #ruby
Drewch has quit [Read error: Operation timed out]
Morkel has joined #ruby
dhaskew has joined #ruby
Juul has quit [Remote host closed the connection]
Drewch has joined #ruby
apeiros_ has joined #ruby
ryanf has quit [Ping timeout: 272 seconds]
jjxtsys_ has joined #ruby
jjxtsys has quit [Ping timeout: 272 seconds]
kil0byte has quit []
LyonJT has joined #ruby
cache_za has joined #ruby
crekev has joined #ruby
ryanf has joined #ruby
cwill747 has quit [Read error: Operation timed out]
Eldariof-ru has joined #ruby
tewecske has joined #ruby
jprovazn_away is now known as jprovazn
dhaskew has quit [Quit: dhaskew]
L-----D has joined #ruby
LyonJT has quit [Ping timeout: 272 seconds]
vladiim has joined #ruby
suppp has left #ruby [#ruby]
iocor has joined #ruby
ymasory has quit [Quit: Ex-Chat]
vladiim has quit [Client Quit]
ryanf has quit [Quit: broken pipes |||]
schovi has joined #ruby
ryanf has joined #ruby
zeromodulus has quit [Remote host closed the connection]
mucker has joined #ruby
cha1tanya has quit [Ping timeout: 272 seconds]
robotmay has joined #ruby
bambanx__ has quit [Read error: Connection reset by peer]
zommi has joined #ruby
ipsifendus has quit [Quit: ipsifendus]
vladiim has joined #ruby
zommi_ has joined #ruby
cads has quit [Ping timeout: 245 seconds]
heftig has joined #ruby
altious has quit [Quit: Leaving]
eka has joined #ruby
tvw has joined #ruby
MrGando has quit [Quit: Bye]
arturaz has quit [Ping timeout: 272 seconds]
wagle has quit [Remote host closed the connection]
crekev has quit [Remote host closed the connection]
cyb3r3li0g has joined #ruby
zz_chrismcg is now known as chrismcg
cyb3r3li0g has quit [Max SendQ exceeded]
shruggar has quit [Ping timeout: 244 seconds]
scb has joined #ruby
wagle has joined #ruby
scb has quit [Remote host closed the connection]
<forestbird> ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●j
<forestbird> oops
foofoobar has joined #ruby
jackiechan0 has quit [Ping timeout: 245 seconds]
sparrovv has joined #ruby
jackiechan0 has joined #ruby
nfluxx has joined #ruby
aruntomar has joined #ruby
<shevy> Carson__ you mean the ruby bindings?
pawdro has joined #ruby
<shevy> Carson__ if you download ruby, i.e. from ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.bz2
neil__ has joined #ruby
<shevy> when you download this, then extract it
jimeh has joined #ruby
<shevy> then enter this extracted directory, then enter the directory ext/readline/
<shevy> I think "ext" means external. Perhaps external bindings
<shevy> there are other directories there, like zlib and tk and win32ole
M- has quit [Quit: This computer has gone to sleep]
<Carson__> shevy: how do access this if i install from rvm?
<shevy> no idea with rvm, sorry
<shevy> I use the source-only method. the #rvm guys should know about their software
<Veejay> rvm info would give you some information about the paths
<Carson__> okay thanks you know what I might just try to reinstall from source tomorrow
lallala has joined #ruby
<jackiechan0> /join #metasploit,#corelan
ludo4ka has joined #ruby
nfluxx has quit [Quit: nfluxx]
<Carson__> hmm i see ext/readline in rvm info
<Carson__> shevy: can i update ruby from source? or do i have to uninstall and reinstall?
<bnagy> you also need readline installed from the OS side, of course
monzie has quit [Quit: monzie]
<shevy> Carson__ well if you want another ruby version, you'd have to get the source again and compile that. the only way to avoid using the source is to download binaries which other people did for you, i.e. in your distribution
<shevy> Carson__ what ruby version are you planning on using? 1.8.x or 1.9.x ?
<Carson__> shevy: 1.9.3
havenn has joined #ruby
<shevy> Carson__ you could always compile ruby into a special directory, and if you dont like it anymore, you just remove that directory
<shevy> "./configure --prefix=/opt/ruby" for instance
<shevy> Carson__ one advantage that binaries have in theory is that you can just download & install them without much work on your side, and they work
<shevy> in theory :P
arturaz has joined #ruby
<shevy> distributions like to do fancy stuff. they also tend to lag behind source releases i.e. new versions
<Carson__> shevy: yeah I don't know why when I did a yum install ruby it would install such an old version
<shevy> Carson__ can you download ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.bz2 into a directory, extract it via "tar -vjxf ruby-1.9.3-p194.tar.bz2", then change directory into this, then do "./configure --prefix=/opt/ruby", then make, and tell me if there are any errors?
<shevy> if you ever are tired of this, you can simply remove the directory /opt/ruby
<shevy> so there is no harm, nothing will be installed outside /opt/ruby
<bnagy> you guys could just spend the afternoon slamming your hands in car doors, if you like pain this much, that would be less complicated
<Carson__> shevy: okay I'll give it a try
<Carson__> bnagy: lol
<shevy> \o/
<shevy> \o/
<shevy> oops
dangerousdave has joined #ruby
<shevy> my ascii man shifted...
TheHunter_1039 has quit [Quit: TheHunter_1039]
ronniy has joined #ruby
CheeToS has quit [Ping timeout: 272 seconds]
heftig has quit [Quit: leaving]
iocor has quit [Quit: Computer has gone to sleep.]
robotmay has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
tomb_ has joined #ruby
jgrevich has quit [Quit: jgrevich]
hoelzro|away is now known as hoelzro
luke3321 has joined #ruby
nilg` has quit [Read error: Connection reset by peer]
ananthakumaran1 has joined #ruby
zeromodulus has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
zeromodulus has quit [Remote host closed the connection]
pygmael_ has joined #ruby
bier_ has quit [Read error: Operation timed out]
pygmael has quit [Ping timeout: 252 seconds]
pygmael_ is now known as pygmael
<Carson__> shevy: damn doing this from source takes forever
<banisterfiend> Carson__: shevy always gives the best advice
lallala has quit [Quit: Page closed]
shruggar has joined #ruby
heftig has joined #ruby
dangerousdave has quit [Quit: Leaving...]
<bnagy> almost two hours since I recommended installing a reall OS... you would have been done by now ;)
pjn_oz has quit [Read error: Connection reset by peer]
Beoran has quit [Remote host closed the connection]
vladiim has left #ruby [#ruby]
Natch has joined #ruby
<banisterfiend> bnagy: arent you the dude always trying to write code for windows
<Carson__> shevy: okay it just finished .. now what?
<Carson__> bnagy: hahaha maybe I'll try that next
<shevy> Carson__ without error? that is cool, you could now try "make install"
<shevy> I would have expected an error though :)
nilg` has joined #ruby
zommi has quit [Remote host closed the connection]
<shevy> Carson__ when it is installed, you probably have to add /opt/ruby/bin to your $PATH variable. export PATH="$PATH:/opt/ruby/bin" should work, you could add this to ~/.bashrc if you use bash or wherever else you set your PATH variable
zeromodulus has joined #ruby
<shevy> Carson__ another way would be to alias ruby to ruby=/opt/ruby/bin/ruby
bikcmp has quit [Ping timeout: 265 seconds]
<shevy> if that ruby however works well for you, you could also compile it with --prefix=/usr, then it would "behave" like a "system ruby"
<shevy> hmm also
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<shevy> Carson__, try "gem env" or "/opt/ruby/bin/gem env" if you haven't changed PATH yet
x0F_ is now known as x0F
iocor has joined #ruby
luke3321 has quit [Quit: leaving]
iocor has quit [Client Quit]
Beoran4 has joined #ruby
<shevy> Carson__, this is how my gem env paths look http://pastie.org/3919234
<shevy> if your prefix is, for instance, /usr, the path would be /usr/lib/ruby/gems/1.9.1
vertroa has quit [Read error: Connection reset by peer]
bpgoldsb has quit [*.net *.split]
DefV has quit [*.net *.split]
Natch| has quit [*.net *.split]
Natch is now known as Natch|
imami|afk is now known as banseljaj
vertroa has joined #ruby
<shevy> hmm
simao has quit [Ping timeout: 248 seconds]
mengu has joined #ruby
<Carson__> shevy: okay make install just finished without errors
<shevy> why is my 1.9.3 rubygems version lower than my 1.8.7 rubygems version...
<bnagy> banisterfiend: yeah I write code for windows because I have to, not because I want to
<shevy> good Carson__ !
<shevy> Carson__ you could try to install a test gem
<shevy> "gem install pry" :D
Guest70427 has joined #ruby
<shevy> or, if you want something small
<Carson__> shevy: you want me to addPATH="$PATH:/opt/ruby/bin" to my ~/.nashrc?
<banisterfiend> shevy: you're a good girl
<Carson__> bashrc
<shevy> "gem install wirble". wirble makes colours for irb
<shevy> Carson__, well for now, you dont have to add this to any file
<shevy> simply try this in your shell:
<shevy> export PATH="$PATH:/opt/ruby/bin"
<shevy> then try "ruby -v" from any directory
<Carson__> okay what does that do?
<bnagy> you probably want /opt/ruby/bin:$PATH
<shevy> it adds that path to where bash can find executables
<Carson__> kk
<shevy> bash usually knows only /usr/bin and /usr/local/bin
<shevy> that's why you have to fiddle with $PATH
<shevy> hmm also do "echo $PATH"
bpgoldsb has joined #ruby
<Carson__> shevy: still says it's 1.8.5 from my home directory
<shevy> I dont know what centos $PATH does
<shevy> from your home dir?
<shevy> hmm the home dir is non standard, I wonder who added it there. anyway what is your $PATH showing to you?
simao has joined #ruby
<bnagy> you probably want /opt/ruby/bin:$PATH
<shevy> well, just set $PATH to values that you need anew
bier_ has joined #ruby
<shevy> you can exclude your home dir from $PATH
<Carson__> i get a no such file or directory error
Nicke\ has joined #ruby
<Hanmac> shevy is trying to push everyone to rvm ... and then it fails
<bnagy> shevy: it's not finding it IN his home dir, he's just running 'ruby' from there
<bnagy> I am guessing
<shevy> Hanmac I never recommend RVM, where did you get that?
<shevy> I recommend people to compile from source all the time :)
<bnagy> Hanmac: no shevy tries to push everyone into insane installing from source
<shevy> yeah!
<chiel> installing from source isn't hard, really
<shevy> bnagy, hmm he has added ./ to his $PATH?
<bnagy> no, it's switching that's hard
<bnagy> shevy: no it's just picking up the system ruby because you gave him a bad export command
<bnagy> usr local bin is before opt bin
<shevy> but he said home dir not /usr/local/bin
<shevy> Carson__ can you show what does "echo $PATH" give you?
<bnagy> forget it, you're driving this (on fire) bus (off a cliff)
<shevy> hey hey hey
<shevy> he compiled ruby from source without errors!
brianpWins has quit [Quit: brianpWins]
<shevy> so his ruby will work
<bnagy> so did the broken rvm
<Carson__> shevy:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/rvm/bin:/home/matrix/bin:/opt/ruby/bin
<bnagy> so I don't believe your induction is sound
moshee has quit [Ping timeout: 244 seconds]
iocor has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<bnagy> see - both system bindirs before opt ruby bin
zeromodulus has quit [Remote host closed the connection]
<shevy> Carson__ ok the "/usr/local/rvm/bin" thing we wont need
cj3kim has quit [Quit: This computer has gone to sleep]
<shevy> let's set you a new $PATH now
jjxtsys_ has quit [Ping timeout: 265 seconds]
<Carson__> so remove it from my .bashrc?
<bnagy> Unix! How does it work!
<shevy> moment
<shevy> Carson__, you can modify your .bashrc at a later time anyway
Ammar01 has joined #ruby
<bnagy> <dog meme> I HAVE NO IDEA WHAT I'M DOING!
<shevy> export PATH="/opt/ruby/bin:/usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin"
<shevy> let's also ignore /home/matrix/bin for now, I dont know what is in that
<bnagy> <studio applause>
<shevy> bnagy is like the ultimate solo cheerleader ... ;)
the-newsman has joined #ruby
iocor has quit [Client Quit]
<shevy> Carson__, with that $PATH, try "ruby -v" again
<the-newsman> Hello all
<chiel> shevy: you could just get him to put the dir in front of his existing $PATH, no?
<Carson__> shevy: wait so does this only temporarily change my path?
<bnagy> I'm just sad I don't have popcorn
<shevy> Carson__ yeah
<bnagy> chiel: that's what I said (twice) 10 minutes ago
<the-newsman> what is the best ruby IDE ?
<shevy> Carson__ at this point we just want "ruby -v" to return the correct output
<chiel> bnagy: :D
<bnagy> the-newsman: there are no good ruby IDEs, use vim
<shevy> if it returns 1.8.5 then something is still wrong :)
<bnagy> the-newsman: *comment contains opinion
<chiel> vim <3
francisfish has joined #ruby
<shevy> we need to make baby steps before we can fly
<the-newsman> vim stands for ?
<bnagy> VI Improved
<shevy> vi improved
<chiel> i got an HJKL t-shirt a few weeks ago :D
<shevy> with boobs?
<chiel> uhm
<chiel> no? :p
<the-newsman> bnagy do u mean no single ide exist for ruby ?
<bnagy> no if I meant that, that's what I would have said
FatherCarbon has joined #ruby
iocor has joined #ruby
<shevy> the-newsman, usually ruby is simple, an IDE is not that useful
<Carson__> shevy: it sayssudo: export: command not found
<bnagy> -> NOTE: IMHO <- The existing IDEs suck, and the need for autocomplete etc is not as great as many other languages
<shevy> Carson__, hmm that confuses me
<chiel> if you really wanted autocompletion you could have it though, in vim. :D
<the-newsman> shevy i was used to use ide for writing applications. the ide helps to remember stuff and have auto-complete services etc
<bnagy> plus, once you learn a proper editor you can use it forever
<shevy> why would export not work ...
mucker has quit [Ping timeout: 248 seconds]
<banisterfiend> bnagy is saying you should learn emacs
<Carson__> shevy: nvm it works when i take out sudo
<chiel> not sure if it's as dyanmic as some IDEs, but still. :D
<Carson__> shevy: okay so it nows says 1.9.3
<chiel> banisterfiend: and so it begins! :D
<shevy> yay!!!
<bnagy> *shudder* vim, but even emacs better than redmine or whatever
<shevy> Carson__ it finds the right ruby now!
<bnagy> <studio applause>
<Carson__> yum when i said ruby -v
<shevy> Carson__ let's see if gem works too ... "gem --version" says what?
<banisterfiend> even the original author of vi abandoned it as being a broken piece of junk
<shevy> it should say 1.8.23
<Hanmac> "what"
<chiel> that's why you don't use vi
the-newsman has left #ruby [#ruby]
<shevy> and have a look at "gem env" output too to check if the paths look ok to your Carson__
<chiel> :D
<shevy> *to you
<bnagy> Hanmac: it's almost 8:30 in NZ, banisterfiend is drunk already ;)
mucker has joined #ruby
DefV has joined #ruby
skogis has joined #ruby
<Carson__> shevy: it says this http://pastie.org/pastes/3919310/text
<shevy> ah yes
robotmay has joined #ruby
<banisterfiend> i dont come to #ruby to talk programming, but to see Hanmac's adorably teutonic attempts at english
<shevy> this is for yaml, in 1.9.3 it defaults to psych.rb and uses libyaml
<banisterfiend> Und
<bnagy> 'adorably teutonic' would not likely score highly in 'most common phrases'
<Carson__> shevy: so ... -_-
<shevy> Carson__, now two solutions ... you must pick one
<shevy> the first is to use yum to install libyaml
<shevy> the second is to download this http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz and install it into /usr prefix (with ./configure --prefix=/usr)
<Carson__> shevy: i don't even know what the second option is but i think i'll go with yum
<shevy> Carson__ ok but remember the important part in all of this! you now know that you can install ruby from source any time
<bnagy> the third option is to set your centos dvd on fire and install a distro that doesn't suck
<Carson__> shevy: if i do the yum method do i have to configure anything?
<shevy> Carson__ no you should not, it should just download all the required files and install them
* bnagy gets popcorn
<chiel> i've never used centos, but i've only ever heard bad things about it. :D
<chiel> i just use debian
<shevy> bnagy is like a cheerleader really
<bnagy> is there a Guiness Record for 'longest time to perform a trivial unix task' ?
<shevy> oh god, debian
<Hanmac> i wonder why my system has ruby1.9.3 without building anything self
<shevy> Hanmac, how many ruby versions do you use?
<Carson__> shevy: okay it's done installing with yum
<Hanmac> i can use two
<chiel> debian can be a pain as well, no doubt
ephemerian has joined #ruby
<chiel> but so can any linux distro
<shevy> Carson__ ok good... hmm
<chiel> just depends on what you're used to, i suppose
<shevy> Carson__ you have to go to the directory again where you extracted the ruby 1.9.3
<bnagy> centos is not a distro, it's a passive agressive bitchy wife
<chiel> haha :p
<bnagy> when you run the installer it's full of useless dialog boxes
<Carson__> shevy: okay so /opt/ruby
<bnagy> "I'M LONELY! HOLD ME!" [OK]
<shevy> Carson__, hmm no, where you have the sources
<shevy> the extracted .tar.bz2
L-----D has quit [Quit: Leaving]
<Carson__> shevy: yeah i wget the files there
<shevy> hmm ok
<bnagy> "I DID A THING! DID YOU SEE?" [OK]
<shevy> a bit confusing :D
<chiel> :D
<shevy> Carson__, in the directory where you ran the ./configure thing
<chiel> i need to start using capistrano.
<shevy> do "make uninstall", "./configure --prefix=/opt/ruby","make","make install"
<shevy> IF yum really installed libyaml, then psych will work and no longer report this annoying error
<shevy> I dont trust package managers
Vainoharhainen has joined #ruby
DanAutoTester has joined #ruby
<bnagy> <studio OOOOoohhh...>
<shevy> :)
<Carson__> shevy: lol make again
<shevy> Carson__ yeah
<DanAutoTester> Hello Everyone - Hope alll is well?
ryanf has quit [Read error: No route to host]
<shevy> but it should be the last thing you have to do Carson__
<shevy> if libyaml would have been installed before, the configure script would have found it, and enabled it
<Carson__> it says make: *** No rule to make target `uninstall'. Stop.
<shevy> oh wait
<shevy> try "make clean"
<shevy> or do the shevy fool proof way and remove the extracted dir, then extract the .tar.bz2 again :D
<shevy> hmm
<shevy> you are right
francisfish has quit [Remote host closed the connection]
<shevy> in a moment I'll know what works
<Carson__> shevy: okay i'm just go through the .configure
<shevy> yay \o/
<DanAutoTester> I could do with some help. I have currently have Xampp but, I will like to install Ruby on it. But I having a number of problems with reference to installing - Im beginner. Reason for installing Ruby - I want to install Bromine, I hope.
<shevy> DanAutoTester does ruby work on your machine?
jackiechan0 has quit [Ping timeout: 245 seconds]
Hanmac has quit [Ping timeout: 244 seconds]
banseljaj is now known as imami|afk
<Carson__> shevy: okay now it's doign make ... probably will take a while =(
<shevy> by the way Carson__ the libyaml/psych bindings are in ext/psych
simao has quit [Ping timeout: 244 seconds]
ukwiz has joined #ruby
<Carson__> do i have to do something with them later?
<shevy> yeah Carson__ this is usually done by the distribution folks, they compile things once, then they create binaries/packages
oskarth has joined #ruby
<shevy> Carson__ no, the configure script will have picked it up this time (hopefully), I am just telling you so you know a tiny bit about the structure
<shevy> i.e. ext/readline bindings ext/psych bindings and so on
Hanmac has joined #ruby
<Carson__> okay
<shevy> ext/tk if you want an ugly graphical user interface ... :P
<Carson__> shevy: okay well do i install readline after or will it already be installed?
<shevy> Carson__ hmm we will find out soon
<shevy> you know how to start "irb" right?
<shevy> in irb you can then do:
<shevy> require 'readline'
<shevy> if this works, your readline works
<shevy> readline should be no problem though
<Carson__> okay cause last it said it wasn't working when i started irb I'm assuming readline is used so i can check the history for irb and backspace
<shevy> I usually go into ext/readline and run the .rb file there
<shevy> Carson__ we'll know soon!
<DanAutoTester> shevy: I have done basic programs and have ran them, ok.
Telg has quit [Ping timeout: 272 seconds]
<shevy> DanAutoTester ok, so you say that ruby works on your system
<shevy> DanAutoTester I dont know what is Bromine, is that a gem? or installable as a gem?
jimeh has quit [Quit: bye]
simao has joined #ruby
monzie has joined #ruby
<bnagy> I think it's a co-op version of minecraft
<shevy> lol
<DanAutoTester> shevy: Bromine is a Test Management Software, which works with Selenium. And I think I need to install Ruby inorder to install Bromine.
iocor has quit [Quit: Computer has gone to sleep.]
<shevy> Bromine... Selenium ... all things I heard only in chemistry so far :D
<shevy> DanAutoTester, usually the easiest way to install something in ruby is by
<shevy> gem install NAME
<shevy> gem install wirble
<shevy> gem install pry
<shevy> hmm
<shevy> lemme try gem install bromine
<shevy> ERROR: Could not find a valid gem 'bromine' (>= 0) in any repository
<shevy> ok, that does not work
<shevy> so I conclude that it has no .gem :(
<shevy> DanAutoTester how is one supposed to install this Bromine thingy?
<DanAutoTester> shevy: wow yes indeed, my friend.
<bnagy> it doesn't look like it's anything to do with ruby
<shevy> Carson__, by the way, I just tried "make clean" and it works for me
<bnagy> maybe you can write tests in ruby for it somehow *shrug*
<shevy> the dir I extracted it to was /Depot/j/ruby-1.9.3p194/
Guest70427 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
<shevy> hehe
<shevy> it indeed does not seem to have much to do with ruby :)
<shevy> though I saw someone else link to the selenium website some days ago here hmm
<shevy> it was the atlantis guy I think
tatsuya_o has joined #ruby
Telg has joined #ruby
<Carson__> shevy: okay right on
<shevy> "make install" finished? if so, try to start irb
<shevy> then require 'readline'
<shevy> by the way, you can save this into a irbrc file
<shevy> then on every irb startup, you have this all already required
<shevy> hmm also you can try ...
jackiechan0 has joined #ruby
<shevy> YAML::ENGINE.yamler = 'syck'
<shevy> if you dont want to use psych :D
<shevy> for yaml files
<chiel> is it possible to `raise`, but attach an error code as well as a message?
timonv has quit [Remote host closed the connection]
<bnagy> not afaik, like there is no concept of error codes at all
demian`_ has joined #ruby
<bnagy> you could put one in your exception string I guess
<Carson__> shevy: nope hasn't finished yet... I'm doing this on my vps so it's a little slow
<shevy> okies
<shevy> I just compiled it again, I swear the rdoc installation took 50% of the compiled time... :P
<DanAutoTester> shevy: Here is image of sort of errors Im getting when installing Bromine with Ruby. http://i.imgur.com/q9MVu.png
<chiel> bnagy: ah okay
<shevy> DanAutoTester that is very strange
<chiel> was just wondering since I have a User class that throws UserError, but the reason for throwing can vary
<chiel> so ideally i wanted to return some error code with it, to help me differentiate
<shevy> DanAutoTester I believe it somehow wants you to tell it where it could find your ruby binary
<DanAutoTester> shevy: Oh the Binary verson of Ruby?
foofoobar has quit [Quit: bb]
<shevy> DanAutoTester no, the location, so that it can find it
<shevy> I dont know where you have ruby installed
<shevy> perhaps there is some config file or where you can set the paths in bromine
<bnagy> chiel: usually you would create your own exception domains as subclasses of Exception::StandardException (I think) and use those to differentiate
<DanAutoTester> shevy: C:\xampp\htdocs
<shevy> DanAutoTester really???
<bnagy> chiel: but ruby code, imho, tends to be less finicky about super fine grained exception classes
<shevy> I cant believe that right now DanAutoTester
<shevy> DanAutoTester without knowing more, I would suspect that no ruby binary is installed at that location
<chiel> bnagy: yeah, i mainly want to report back the reason of failure, since this stuff is in an ajax call
jjxtsys has joined #ruby
<chiel> differentiating on an integer can be easier than a string
<DanAutoTester> shevy: Oh, I need to install Binary verson of Ruby?
<bnagy> DanAutoTester: that's only a warning anyway, the error is a PHP thing
jbw has quit [Read error: Connection reset by peer]
<bnagy> it's only if you want to run ruby tests
<bnagy> you don't need ruby to run this bromine thing
c0rn has quit []
<shevy> DanAutoTester, hmm on the image you showed, you only have one ERROR
<shevy> "max executing time"
<Carson__> shevy: okay finally done make .. what now?
<shevy> and it tells you to modify php.ini file to allow a higher executing time or something
<DanAutoTester> Oh I see I need to change it?
<shevy> Carson__ ok when "make install" has finished, try to start irb. "irb" should hopefully work
<DanAutoTester> In the PHP.ini file...
<shevy> DanAutoTester yeah and then I think restart wampp
<bnagy> chiel: yeah that's what you'd normally use subclasses for, like Connection::Timeout Connection::Refused (probably bad example, but..)
<Carson__> shevy: it does
<shevy> Carson__ if irb started, look if there were errors. if not... try to input "5+5" :D and then... do require 'readline'
<DanAutoTester> Oh brillant I will try that now, my friends.
<shevy> ok good!
<shevy> Carson__, you should also install a test gem
<chiel> bnagy: ahh okay, but I can catch them all with a single rescue, or so?
<bnagy> chiel: you can rescue the superclass yeah
<shevy> Carson__, I think you can do this in IRB too... try ... 'system "gem install wirble"' in irb
<bnagy> or just 'rescue' which will catch any kind of StandardException
<bnagy> and then case from there
<chiel> bnagy: ok cool. so i could have, for example UserError::Exists as an error, but simply catch on `UserError`
<bnagy> uh you would need to assign it to do that
<chiel> bnagy: hmm yeah, but I also catch Sequel errors, in case the db goes wonky
<bnagy> rescue UserError => ue
<DanAutoTester> rbr - cheers mates!
<Carson__> shevy: okay when i do require 'readline' i get this http://pastie.org/pastes/3919437/text
<shevy> Carson__ ok that means that you currently do not have all components of readline installed
simao_ has joined #ruby
<bnagy> chiel: you can also have multiple rescue statements
<shevy> Carson__ have you asked yum to install readline?
<chiel> bnagy: yep, i do already
<bnagy> rescue UserError; # deal; rescue DBError; #do db stuff; rescue; #the rest
<Carson__> shevy: really? readline works on my 1.8.5 install
<chiel> bnagy: but would prefer to catch all the User related ones in a single one :)
<shevy> Carson__, I think this may be because they compiled this with readline included
roolo has joined #ruby
<shevy> Carson__, and then only distributed the binaries to your system
simao has quit [Ping timeout: 244 seconds]
<shevy> Carson__, you probably have *readline* names in your /usr/lib
<shevy> but I think you may lack the .h files
<Carson__> shevy: yeah yum says i already have it installed
yugui is now known as yugui_zzz
<shevy> Carson__, in /usr/include you do not have a /usr/include/readline directory right?
yugui_zzz is now known as yugui
timonv has joined #ruby
<Carson__> shevy: nopei don't have it
<shevy> ok, I have that dir here
<shevy> second question
<shevy> in /usr/lib do you have a libreadline.so file? try "stat /usr/lib/libreadline.so"
<bnagy> if that's where c*ntos puts it
<shevy> Carson__ there must be some way for yum to also install the devel parts of packages
* bnagy munches more popcorn
<shevy> bnagy lol
<banisterfiend> bnagy: naggy
<Carson__> shevy: this the file? libreadline.so.5
<shevy> aha
<shevy> mine is at libreadline.so.6 and libreadline.so.6.2
havenn has quit [Remote host closed the connection]
<shevy> readline 6.2
<shevy> you probably have 5.x something
<shevy> The source to readline is here: http://ftp.gnu.org/gnu/readline/
<Carson__> yeah well when i stat it this is the output File: `libreadline.so.5' -> `libreadline.so.5.1' Size: 18 Blocks: 0 IO Block: 4096 symbolic link Device: ca00h/51712d Inode: 33712 Links: 1 Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2011-04-11 14:58:30.000000000 -0400 Modify: 2011-04-11 14:49:25.000000000 -0400 Change: 2011-04-20 15:36:34.000000000 -0400
<shevy> yeah, probably version 5.1
<shevy> the source to that is most likely http://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
<shevy> Anyway, I googled a bit
<shevy> on yum it seems things like this work:
<shevy> sudo yum install libxml libxml2-devel
<shevy> so, perhaps...
<shevy> sudo yum install readline-devel
<shevy> could work for you
<shevy> but perhaps not, who knows :)
<Carson__> okay i'll try that
<shevy> I really think you only lack the /usr/include/readline/* things
<shevy> if you manage to install the "devel" package, you should have a complete readline though
<Carson__> okay it installed
<shevy> ok can you check
<bnagy> so far
<shevy> in /usr/include if there is now a readline/ directory?
<bnagy> we're still not up to irb even working properly yet - can't wait for rails XD
<shevy> bnagy have some hope for centos :)
<Carson__> shevy: yup it's there now
<bnagy> yay! let's reconfigure / recompile again! Ninth time lucky!
<Carson__> bnagy: lmao
<shevy> ok good Carson__
<shevy> nah
<shevy> wont need a recompile
<Carson__> shevy: okay good
<shevy> Carson__, go to the extracted dir of ruby, into the ext/readline subdir
yugui is now known as yugui_zzz
<shevy> when you are there, do "ruby extconf.rb"
ananthakumaran has joined #ruby
<shevy> you should get several lines, like:
<shevy> checking for readline() in -lreadline... yes
<shevy> checking for rl_getc() in stdio.h,readline/readline.h,readline/history.h... yes
<shevy> though
<shevy> who knows what else is missing on your system :P
<shevy> the last message that is shown is:
<Carson__> shevy: okay there done
<shevy> "creating Makefile"
<shevy> really? it worked?
<shevy> wheee
<shevy> do "make" then
<shevy> then "make install", then start irb again, in irb try
<shevy> require 'readline'
<shevy> this works for me, hopefully it does for you too
<Carson__> shevy: lol i thought you said i wouldn't have to do that again -_-
ananthakumaran1 has quit [Ping timeout: 260 seconds]
<shevy> only the readline bindings
<shevy> hmm
<shevy> it would have worked before at ./configure time too
<bnagy> Carson__: shevy is a mythomaniac, I thought you would have realised that by now
<shevy> if the readline*.h files would have been there
<Carson__> shevy: wait so i actually enter creating Makefile?
<shevy> Carson__ nope
<shevy> it is just some output generated when you do run "ruby extconf.rb"
heftig has quit [Quit: leaving]
<Carson__> okay so make > make install
<shevy> extconf.rb creates the Makefile
mneorr has joined #ruby
<shevy> yeah but you must run extconf.rb first so you have the Makefile in that directory
<shevy> and then make and then make install
<shevy> hmmm
<shevy> actually
<shevy> perhaps you dont even have to use make at all
<Carson__> shevy: okay make and make install done
<shevy> it seems something changed from ruby 1.8.7 and 1.9.3 here
<shevy> on 1.8.7, running extcong.rb seems to be enough
<shevy> anyway, if no errors happened, start irb Carson__
<shevy> then do require 'readline' again
ananthakumaran has quit [Ping timeout: 272 seconds]
<Carson__> shevy: it says false
monzie has quit [Quit: monzie]
<shevy> hmm
<bnagy> wooo!
IPGlider has joined #ruby
<bnagy> (that's good)
<shevy> it is??
<bnagy> barely four hours in and we have reached step 0!
ananthakumaran has joined #ruby
<bnagy> yeah false means it has already been required
<shevy> aha
<Carson__> lol
<shevy> I would have now recommended to get rid of centos :)))
<shevy> but if readline works finally... then we are indeed at step 0 now
nilg`` has joined #ruby
<shevy> Carson__ try -> system 'gem install wirble'
<shevy> in irb
<Carson__> seems to work since i can't now backspace
<shevy> what
<shevy> backspace does not work??
<shevy> oh man
nilg` has quit [Ping timeout: 248 seconds]
<shevy> here on my system, backspace and readline both work fine
<bnagy> I am hoping that was a typo for 'can now'
<Carson__> awesome it worked .. well i tried with awesome_print
<Carson__> bnagy: lol yeah that was a typo
<shevy> well good
<shevy> now we know that gem works, and that you can use gem to install things too
<shevy> and now you really want to go to rails straight? :\
<shevy> :/
<shevy> though
<shevy> you could try "gem install rails"
<Carson__> okay how do i make this ruby my default so it doesn't go back to 1.8.5?
<shevy> it works for me
<bnagy> Carson__: the good news is that rails is waay less complex and has less dependencies than readline
<shevy> Carson__, well it depends really
<bnagy> so it should all be easy now
<shevy> Carson__, you could remove all of 1.8.5 for instance
<shevy> or
* bnagy giggles
<shevy> you just store the $PATH somewhere
<Carson__> shevy: i'll go with the path method
<Carson__> how do i do that>?
<shevy> hmm try at bashrc first
jbw has joined #ruby
<shevy> I think other files are sourced in too though, like /etc/profile
jds_ has quit [Remote host closed the connection]
<shevy> but $PATH in bashrc should work
<bnagy> .bash_profile but .bashrc I guess is ok
<shevy> yeah some of these
jjxtsys has quit [Ping timeout: 252 seconds]
<Carson__> okay what do i add to to bashrc?
<shevy> I usually source several files. one file alone for instance holds my $PATH settings
<shevy> Carson__, the export $PATH command that should work there too
<shevy> output your current $PATH
<shevy> copy/paste this into your bashrc... export $PATH="insert here the output of that..."
<Carson__> okay the output of the $PATH command just add it to the end of my bashrc file?
tonini has quit [Remote host closed the connection]
<shevy> Carson__ yeah, inside "quotes"
<shevy> for instance
senny has quit [Remote host closed the connection]
<shevy> export PATH="/usr/bin/:/opt/ruby/bin"
<bnagy> (except you need /opt/ruby/bin first)
<shevy> oh yeah
<shevy> see, bnagy is paying attention to details :)
<shevy> Carson__, bash processes the entries at : one after the other, so whatever you want to have "highest priority", should come first in your $PATH setting
heftig has joined #ruby
<banisterfiend> heftig: hi
foofoobar has joined #ruby
berserkr has joined #ruby
<shevy> Carson__ I must be afk for ~20 minutes or such, sorry. be back after ~20 mins
jjxtsys has joined #ruby
cyb3r3li0g has joined #ruby
<Carson__> shevy:
<Carson__> shevy: okay
<Carson__> wait quick question/opt/ruby/bin:/usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/home/carson/bin under user specific aliases and fucntions?
<bnagy> it can go anywhere in that file
cyb3r3li0g has quit [Max SendQ exceeded]
<Carson__> bnagy: okay so exacly like that
<bnagy> but it should look like export PATH=/opt/ruby/bin:$PATH
<bnagy> or similar
<bnagy> you can spell out the whole thing if you really want
<Carson__> do i need the export or can it be thisPATH= /opt/ruby/bin:/usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/home/carson/bin
<bnagy> no the export command is optional I just said it because I like wasting people's time
<bnagy> :|
<Carson__> bnagy: lol okay thanks
francisfish has joined #ruby
foofoobar has quit [Quit: bb]
cyb3r3li0g has joined #ruby
G3DinUA has joined #ruby
LyonJT has joined #ruby
cyb3r3li0g has quit [Max SendQ exceeded]
sepp2k has joined #ruby
workmad3 has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
monzie has joined #ruby
<schovi> Hello. Have simple quiz for you. How to convert OpenStruct back to hash?
jbw has quit [Ping timeout: 272 seconds]
<bnagy> ostruct.marshal_dump ?
<heftig> ostruct.send(:table), but this violates encapsulation
<apeiros_> schovi: instance_variable_get(:@table) iirc
* apeiros_ patched OpenStruct and added #to_hash
<schovi> bnagy: looks promising!
<bnagy> reading the docs makes you a GENIUS ;)
jackiechan0 has quit [Ping timeout: 245 seconds]
<heftig> well, there's no way to do it that doesn't depend on implementation details
simao_ has quit [Ping timeout: 244 seconds]
<apeiros_> I think patching it is the most proper way, though
<apeiros_> that way only your implementation of OpenStruct#to_hash depends on impl. details
<apeiros_> but not your "consumer" code
<heftig> sounds better
<apeiros_> think refactoring in case of change - #to_hash is a single place vs. all other variants means multiple places.
<bnagy> ...marshal_dump is built in
<bnagy> why would you patch it to do something that's already there?
<apeiros_> yes, but that it dumps the internal hash is "coincidence", if you want
arturaz has quit [Remote host closed the connection]
<heftig> whatever it outputs is internal and marshalable
simao has joined #ruby
arturaz has joined #ruby
<apeiros_> gotta go for lunch, cya guys
<heftig> to be used by marshal_load only
<banisterfiend> apeiros_: CYa
<heftig> so you patch it by doing alias_method :to_hash, :marshal_dump
<bnagy> well it's documented, as opposed to poking about in its ivars ;)
fermion has joined #ruby
cha1tanya has joined #ruby
DanAutoTester has quit []
ecolitan has joined #ruby
jbw has joined #ruby
greyEAX has quit [Remote host closed the connection]
Shoobdidoo has joined #ruby
ph^_ has quit [Remote host closed the connection]
Shoobdidoo has quit [Client Quit]
ph^ has joined #ruby
Guest46698 has quit [Ping timeout: 240 seconds]
shiki has joined #ruby
sparc_ has left #ruby [#ruby]
cha1tanya has quit [Ping timeout: 244 seconds]
moshee has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
elliot98 has joined #ruby
elliot98 has quit [Changing host]
elliot98 has joined #ruby
<Carson__> bnagy: when i log out off and log back on and do a ruby -v it still shows 1.8.5 now instead of 1.9.3
<chiel> Carson__: you need to add the export statement to your bashrc
<chiel> or errr, ~/.profile or ~/.bash_profile or ~/.zsh_profile
<chiel> depending on your setup
medik has quit [Read error: Connection reset by peer]
<Carson__> chiel: okay so what would the line be?
heftig_ has joined #ruby
bluenemo has quit [Ping timeout: 265 seconds]
<chiel> Carson__: whatever you put into your terminal earlier, I got bored of the conversation so didn't really follow it. :p
heftig has quit [Disconnected by services]
heftig_ is now known as heftig
<Carson__> chiel: lol i have the path ... so is it $PATH="path"?
<chiel> Carson__: export PATH="bla"
<chiel> Carson__: it's in the scrollback... :P
moshef has joined #ruby
<Carson__> chiel: okay thanksgot it
<chiel> Carson__: you'll need to logout/in of your shell to see the change though
moshef has quit [Client Quit]
<Carson__> chiel: yup did that thanks
piotr_ has joined #ruby
<shevy> Carson__ if you know that you dont need 1.8.5 I would actually remove it, or move it to its own dir
whowantstolivefo has joined #ruby
<Carson__> shevy: okay I'll probably remove 1.8.5 tomorrow once i spend some more time with 1.9.3
<shevy> :)
<shevy> as long as your centos package manager works you can also reinstall 1.8.5 at any time
<Carson__> shevy: bnagy: chiel: okay thanks for all the help but I'm super exhausted... cheers
nipra has quit [Quit: Leaving]
maesbn has quit [Remote host closed the connection]
<bnagy> (this would have been over hours ago had you chosen to install a real OS)
<Carson__> have a good one all
<Carson__> bnagy: lol
<bnagy> cya! :)
nipra has joined #ruby
bluenemo has joined #ruby
Carson__ has quit [Quit: Page closed]
ctp_ has joined #ruby
maesbn has joined #ruby
<ctp_> Hi folks. How to get a subset of hash key/values pairs. e.g. i need only hosts/ips from this hash array:
<ctp_> [{"host"=>"192.168.1.1", "port"=>"80", "notes"=>"foo"}, {"host"=>"192.168.1.2", "port"=>"8080", "notes"=>"bar"}]
<shevy> this is an array
<ctp_> shevy: yepp, array of hashes
<ccooke> ctp_: so you want to turn that into an array of hosts?
<ccooke> ctp_: array.map { |i| i["host"] } will do it.
jonathanwallace has joined #ruby
<ctp_> ccooke: ah, ok. thx :)
vectorshelve has joined #ruby
<vectorshelve> shevy: hai dear :)
<vectorshelve> shevy: not a day passes with wishing shevy :)
<ctp_> ccooke:hm, not exactely what i need. i need an array of hashes containing only host/port: [{"host"=>"192.168.1.1", "port"=>"80"}, {"host"=>"192.168.1.2", "port"=>"8080"}]
<shevy> vectorshelve yeah I wish you'd stop using rails ;P
<ccooke> ctp_: well, you can still use map to do it.
<chiel> does any of you use capistrano to deploy non-rails apps?
Neil___ has joined #ruby
<ccooke> ctp_: array.map { |i| { :host => i["host"], :port => i["port"] } } will work
<shevy> chiel not me
<ctp_> ccooke: cool, this works
<vectorshelve> shevy: what to do... my bread and butter
neil__ has quit [Ping timeout: 244 seconds]
<chiel> shevy: boo, i wanted long explanations on how to use it for non-rails stuff! :p
includex has joined #ruby
<bnagy> ctp_: just as a note, using |i| as your block variable there is the kind of habit that makes maintainers hate you
<bnagy> I'd suggest |hsh| or |h|
<shevy> or |hash| !
<shevy> or |_|
d3c has quit [Quit: Sleep]
medik has joined #ruby
<bnagy> I don't like using identifiers that would be methods in other contexts - just imho
<ctp_> bnagy: yepp, named it |hash| cause of all the other i's :)
<bnagy> I really wish there were a nicer way than that, as well. It looks ugly :(
<ctp_> shevy: what't the meaning of _ in such a case?
<shevy> ctp_ no, it's just a variable that does not want to have a name :)
<ctp_> ok
<shevy> it's a shy variable
<ctp_> :)\
<shevy> it's saying "hey... let's just do this, then leave"
<ccooke> I prefer single-letter variables where the code is short, fully descriptive if it's more than a line or two.
<bnagy> usually (opinion, again) _ is used for variables you want to ignore
<shevy> yeah
<bnagy> so not really appropriate in this case
<ccooke> and yes, 'h' is a vastly better idea than 'i'
etehtsea has joined #ruby
<ccooke> 'hash' is... not a great idea, because it's very likely to clash with something in scope.
<ccooke> (whereas if 'h' clashes in scope, you shouldn't have ever used it)
Morkel has quit [Quit: Morkel]
Guedes_out is now known as Guedes
Guedes has quit [Quit: Saindo]
heftig has quit [Quit: leaving]
Guedes has joined #ruby
Guedes has quit [Remote host closed the connection]
Guedes0 has joined #ruby
LyonJT has quit [Remote host closed the connection]
<Mon_Ouie> Since block variables shadow outer variables, it doesn't matter if there's a name clash
LyonJT has joined #ruby
<banisterfiend> Mon_Ouie: can u hink of a way to access the outer variable
<bnagy> I agree it will work, I just don't like it cause it's creepy
<shevy> banisterfiend is french better than german?
<banisterfiend> shevy: french is less scary
<banisterfiend> but also sounds kind of effeminate
LyonJTill has joined #ruby
<Mon_Ouie> You can't, that's the point of shadowing (well, you could keep the outer binding object and use eval but that's not the point)
liluo has quit [Remote host closed the connection]
<bnagy> cheese, yes, mustard, no
<banisterfiend> Mon_Ouie: well i'm not arguing that, im just wondering if there's an evil hack
<bnagy> wine, yes, bread, tie
<bnagy> language, who cares, they'll both fall into disuse once europe goes broke :>
davidcelis has quit [Read error: Connection reset by peer]
heftig has joined #ruby
<shevy> heeh
<shevy> we just need to print more euros
<bnagy> yeahhhh...see the thing about the ecb...
<bnagy> anyway, no politics. I apologise
jkarayusuf has joined #ruby
LyonJT has quit [Ping timeout: 265 seconds]
greyEAX has joined #ruby
davidw has quit [Read error: Operation timed out]
<bnagy> banisterfiend: have you heard the south eastern dialect / accent? (french)
<bnagy> it's horr riii bulll :>
<banisterfiend> bnagy: i think u mean 'orr ii bull' the french have an aversion to 'h'
<banisterfiend> they steadfastly refuse to pronounce them
<banisterfiend> even though their words are littered with 'h'
<banisterfiend> they still refuse
<bnagy> I wasn't trying to imitate it
<banisterfiend> my bro used to have a cute little french piece as a gf, and she would always say she's 'appy
<shevy> banisterfiend, do you know the german word for dog?
<banisterfiend> when my brother would pull her up on it, she'd struggle to pronounce the 'h' but i just sounded like she was doing a long exhale before again saying 'appy
<bnagy> or I would have said (pinch nose) mearci parr le coo de meng
<banisterfiend> it*
davidcelis has joined #ruby
Whoop has quit [Ping timeout: 250 seconds]
codebeaker has joined #ruby
EddieS has joined #ruby
EddieS is now known as Guest63712
<banisterfiend> anyone nkow what the resolution should be for an osx taskbar icon?
Whoop has joined #ruby
<shevy> 1x1
<bnagy> shevy: hmm, I see your point
<banisterfiend> shevy: when i visit u in austria later this year im going to spank u with a mechanical courset
<shevy> no please :(
<shevy> can I pay you to not come?
<banisterfiend> shevy: im going to drag u out of the gloom of yoru house and into the sun, adn we're going to boogie woogie our way round the viennese night life
<banisterfiend> into the sun --> night life
BrokenCog has joined #ruby
<shevy> omg
<banisterfiend> yes a confused sentence, but u know what i mean
<shevy> seems I will have to die this year
<bnagy> this is getting more and more win win
<shevy> :(
fr0gprince_ma has quit [Quit: Leaving...]
Codif has joined #ruby
Guest54355 has quit [Ping timeout: 245 seconds]
yosinof has joined #ruby
iamjarvo has joined #ruby
Guest54355 has joined #ruby
Codif has quit [Remote host closed the connection]
noodletraveler has quit [Quit: leaving]
<bnagy> ok quiz night
<bnagy> shevy: try not to break anyone else's linux boxes while I'm gone
headius has joined #ruby
cephalopod has joined #ruby
Beoran_ has joined #ruby
<cephalopod> tpb still unavailable
* cephalopod wants moar kung fu moviez
crankycoder has joined #ruby
cephalopod is now known as octobrainz
avirahmed has joined #ruby
<avirahmed> hi
<octobrainz> sorry, wrong chan
Beoran4 has quit [Ping timeout: 252 seconds]
avirahmed has left #ruby [#ruby]
jakeanq has joined #ruby
linduxed has quit [Ping timeout: 246 seconds]
shiki has quit [Remote host closed the connection]
BuGo has joined #ruby
<BuGo> i want to use rake without bundler and when running rake i get : Could not locate Gemfile
<BuGo> why rake requires Gemfile and how to make it skip it
jakeanq has left #ruby [#ruby]
mwyrobek has joined #ruby
amalvagomes has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
etehtsea has quit []
uris has joined #ruby
uris has quit [Client Quit]
M- has joined #ruby
M- has quit [Remote host closed the connection]
akemrir has joined #ruby
Solnse has quit [Read error: No route to host]
mucker has quit [Quit: leaving]
<BuGo> anyone?
DefV has quit [Ping timeout: 272 seconds]
StoSun has joined #ruby
StoSun has quit [Client Quit]
akem has joined #ruby
<Mon_Ouie> Rake doesn't need a Gemfile
<Mon_Ouie> It will only do that if you somehow have code in it that uses one
StoSun has joined #ruby
znake has joined #ruby
<BuGo> Mon_Ouie: then why it complains that it does?
_md has joined #ruby
<Mon_Ouie> Because you somehow have code in it that uses one
dv310p3r has quit [Ping timeout: 272 seconds]
<BuGo> Mon_Ouie: how to find that code?
cs[tc] has quit [Ping timeout: 260 seconds]
headius has quit [Quit: headius]
cs[tc] has joined #ruby
DefV has joined #ruby
liluo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Client Quit]
jcromartie has joined #ruby
blacktulip has joined #ruby
amalvagomes has quit [Ping timeout: 252 seconds]
<shevy> BuGo you could try to use "grep" if you are linux
codebeaker has quit [Quit: codebeaker]
<BuGo> shevy: grep what?
krusty_ar has joined #ruby
<BuGo> more like - what should i search for?
<shevy> BuGo good question
<shevy> what project do you try to install?
tommyvyo has joined #ruby
<BuGo> shevy: i am not trying to install anything :) i am simply running rake
tommyvyo has quit [Client Quit]
<shevy> BuGo but then there must be a Rakefile
<shevy> and inside that Rakefile there are the tasks defined that are possible
tommyvyo has joined #ruby
s0ber has quit [Quit: leaving]
berserkr has quit [Quit: Leaving.]
s0ber has joined #ruby
iamjarvo has quit [Quit: Leaving.]
nari has joined #ruby
RoUS has joined #ruby
ecolitan has quit [Read error: No route to host]
<BuGo> shevy: nah. There is more magit to that
graspee has joined #ruby
demian`_ has quit [Quit: demian`_]
<shevy> I hate magic
<BuGo> same
<ctp_> Howdy. Anyone here's coding EventMachine? Why doesnt the EM loop get the same data struct the callback in the function above returns? https://gist.github.com/2709886 line 26 and 39 *confused*
`brendan has joined #ruby
jcromartie has quit [Quit: jcromartie]
rorymckinley2 has joined #ruby
<vectorshelve> hemanth: bhai kaise ho ? bahut din ho gaya aapse baat karke
headius has joined #ruby
<apeiros_> vectorshelve: this is an english channel. if you wish to converse in hindu, join/found a language specific channel or use private messages. thank you.
<BuGo> 16:17 < vectorshelve> hemanth: bhai kaise ho ? bahut din ho gaya aapse baat karke
<BuGo> The fcuk?
<vectorshelve> apeiros_: ok.. sorry.. but it's hindi not hindu.. hindu is a religion in India :)
<apeiros_> ok
oponder has joined #ruby
<BuGo> its indian
<oponder> hey guys, im having an issue with Timeout and DRB hanging when i try to connect to a server that isnt up. wrapping it in a timeout block doesn't cause anything to get raised as I expected... http://pastie.org/3920186
dnyy has quit [Remote host closed the connection]
<oponder> i think its because DRB is locking the whole things trying to connect to the server
BuGo has left #ruby [#ruby]
headius has quit [Quit: headius]
<oponder> and there was a gem that got around this for 1.8, but they say that it wasnt needed in 1.9.3 (which is what im using)... but am running into it in this case
bgupta has quit [Ping timeout: 244 seconds]
<oponder> the gem was called SystemTimer, for those wondering
etehtsea has joined #ruby
crekev has joined #ruby
crekev has quit [Client Quit]
nari has quit [Ping timeout: 260 seconds]
mdhopkins has joined #ruby
fbernier has joined #ruby
jgarvey has joined #ruby
niklasb has joined #ruby
h4mz1d has joined #ruby
christianrojas has joined #ruby
wangr has joined #ruby
cyb3r3li0g has joined #ruby
stepnem has quit [Quit: ZNC - http://znc.sourceforge.net]
tommyvyo has quit [Remote host closed the connection]
tommyvyo has joined #ruby
amalvagomes has joined #ruby
stepnem has joined #ruby
cyb3r3li0g has quit [Max SendQ exceeded]
lxsameer has joined #ruby
pu22l3r has joined #ruby
<lxsameer> hi, i'm a python developer, i need to learn ruby as fast as possible to make some changes on a ruby on rails project, what should i read first?
rorymckinley2 has quit [Ping timeout: 245 seconds]
monzie has quit [Quit: monzie]
iamjarvo has joined #ruby
cyb3r3li0g has joined #ruby
pipu has joined #ruby
<lxsameer> ccooke: thanks
pipu has quit [Client Quit]
cyb3r3li0g has quit [Max SendQ exceeded]
sbanwart__ has joined #ruby
sbanwart__ is now known as sbanwart
tomzx has joined #ruby
pu22l3r_ has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
pu22l3r_ has joined #ruby
pu22l3r has quit [Ping timeout: 244 seconds]
lorandi has joined #ruby
jimeh has joined #ruby
ConstantineXVI has joined #ruby
geekbri has joined #ruby
yugui_zzz is now known as yugui
nari has joined #ruby
nilg`` has quit [Remote host closed the connection]
cyb3r3li0g has joined #ruby
<shevy> lxsameer if you know python well, you can read through http://pine.fm/LearnToProgram/ quickly and try the examples. it should be very easy as you can already program, but you get a very nice simple overview
nipra has quit [Ping timeout: 272 seconds]
dhaskew has joined #ruby
<lxsameer> shevy: nice thanks
imami|afk is now known as banseljaj
cyb3r3li0g has quit [Max SendQ exceeded]
ConstantineXVI has quit [Ping timeout: 245 seconds]
Jackneill has joined #ruby
nilg` has joined #ruby
Morkel has joined #ruby
nilg` has quit [Remote host closed the connection]
true_techie has joined #ruby
nilg` has joined #ruby
nilg` has quit [Read error: Connection reset by peer]
<true_techie> i need a crash course on ruby. also what is => and why are colons attached to variables?
amalvagomes has quit [Read error: Connection reset by peer]
nilg` has joined #ruby
<banisterfiend> true_techie: not a variable, it's a symbol
<banisterfiend> true_techie: buy a book :)
amalvagomes has joined #ruby
<banisterfiend> true_techie: or read one of the free books online
<banisterfiend> such as 'learn ruby the hard way'
* hoelzro is reading "The Ruby Programming Language"
<hoelzro> it's quite good so far.
<true_techie> harf way? Im a fast learner
<banisterfiend> hoelzro: yeah that's the best one
llaskin has joined #ruby
<shevy> true_techie :foo is a symbol
<true_techie> hard..
<hoelzro> I chose wisely then =)
<chiel> true_techie: symbols are a bit like strings
<shevy> => is used in a hash , { :your_key => 'some value here' }
<chiel> but like light-weight strings, used as keys, for example
davidw has joined #ruby
davidw is now known as Guest81769
<llaskin> is there any reason why a object might "switch" casting types without any specific reason?
<workmad3> symbols are an interesting conjunction of 'sort-of string, sort-of enumerable, sort-of interesting' :)
<llaskin> I am having a weird issue where I have an item going from a WebElement to an Array of WebElements randomly
<workmad3> *enumeration, not enumerable
rorymckinley2 has joined #ruby
dv310p3r has joined #ruby
ph^ has quit [Read error: Connection reset by peer]
<shevy> llaskin there is always a specific reason
<llaskin> shevy i honestly can't find one
<shevy> something must do something like return an array
<llaskin> one sec
<llaskin> i'm making a gist
linduxed has joined #ruby
maesbn has quit [Remote host closed the connection]
<banisterfiend> workmad3: i was thinking u meant Enumerator for a minute there before i figured u meant C enum ;)
h4mz1d has quit [Ping timeout: 245 seconds]
<workmad3> banisterfiend: yeah, C/C++/java style enum... sort of (certainly used in similar contexts :) )
<shevy> llaskin and what is "webelement"
ph^ has joined #ruby
<llaskin> WebElement is an Element from Selenium
<llaskin> its a "single" item, not an array.
emmanuel__ has joined #ruby
jjxtsys has quit [Ping timeout: 256 seconds]
<shevy> well but it looks like an array
<shevy> row = webelement[0]
<shevy> first element is assigned to the variable called row
<llaskin> here's why that is there
<llaskin> for some reason i am having find_element basically u can get elements by either a) find_element(which returns an element) or b) find_elements
<llaskin> woops
<llaskin> basically u can get elements by either a) find_element(which returns an element) or b) find_elements
znake_ has joined #ruby
<shevy> also I wonder why you are unable to find where exactly the problem is
<llaskin> find_elements returns an array of elements
<shevy> simply do require 'pp' and debug, add pp row.class
<llaskin> i have spent ~3 days trying to figure
<shevy> then you know which line is the culprit
<llaskin> i can do that
<llaskin> hrm
<shevy> or puts row.class should work too
jrist-afk is now known as jrist-mtg
<shevy> but right now this all seems odd
<shevy> you write "somewhere between do_a and do_z, row becomes an array", why do you not know yet where exactly the error happens
jrbing has joined #ruby
maesbn has joined #ruby
znake has quit [Ping timeout: 244 seconds]
znake_ is now known as znake
snearch has joined #ruby
looopy has quit [Remote host closed the connection]
h4mz1d has joined #ruby
true_techie has quit [Quit: Lost terminal]
<llaskin> i know shevy
<llaskin> i'm tracking it now to see what happens
<llaskin> boy this is gonna be fun to parse
sbanwart has quit [Ping timeout: 260 seconds]
Gavilan has left #ruby [#ruby]
jjxtsys has joined #ruby
<Hanmac> llaskin: ruby has stict typing ... an object itself can not change its type
<llaskin> i know
<banisterfiend> Hanmac: it can with wonderful hacks
<llaskin> which is why i am like "what the fuck"
<llaskin> (pardon my french)
fragrant has joined #ruby
fragrant has left #ruby [#ruby]
<vectorshelve> any suggestions on implementing single sign on using AES encryption algorithm on rails app
<vectorshelve> sorry wrong channel
Boohbah has quit [Remote host closed the connection]
sbanwart has joined #ruby
Boohbah has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
CannedCorn has joined #ruby
chson has quit [Remote host closed the connection]
linduxed has quit [Ping timeout: 272 seconds]
mstratman has joined #ruby
cmarques has joined #ruby
Poapfel has quit [Ping timeout: 256 seconds]
Poapfel has joined #ruby
Guedes0 has quit [Quit: Saindo]
Guedes has joined #ruby
nilg` has quit [Remote host closed the connection]
tomzx has quit [Ping timeout: 272 seconds]
nilg` has joined #ruby
macmartine has joined #ruby
CannedCorn has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
bglusman has joined #ruby
petercs has joined #ruby
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
G3DinUA has quit [Quit: Leaving.]
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
rippa has quit [Quit: derp herp]
Zolrath has quit [Quit: Computer has gone to sleep.]
dhaskew has quit [Quit: dhaskew]
snearch has quit [Quit: Verlassend]
gokul has quit [Quit: Leaving]
Targen has quit [Ping timeout: 260 seconds]
Ontolog has joined #ruby
Poapfel has quit [Ping timeout: 256 seconds]
PeterB has joined #ruby
blacktulip has quit [Remote host closed the connection]
<macmartine> Is there a way to make this verify there are 3 or more non-space characters total, while spaces are allowed? http://rubular.com/r/Nu87gXs3Qj
Poapfel has joined #ruby
amalvagomes has quit [Quit: amalvagomes]
mdhopkins has joined #ruby
blacktulip has joined #ruby
<apeiros_> macmartine: (?:[^ ] *){3,}
vectorshelve has quit [Quit: Page closed]
<apeiros_> depending on how you use the regex, just {3} instead of {3,}
<macmartine> apeiros_: Well, sorry I didn't specify this, but I only want letters and numbers
<banisterfiend> apeiros_: i told u about that compiler course a while ago, we learned that regex actually form an algebra with well defined operations and u can actually prove that two regular expressions are equivalent
<apeiros_> macmartine: then adapt the character class accordingly.
<banisterfiend> pretty interesting
philcrissman has quit [Remote host closed the connection]
<apeiros_> banisterfiend: heh, that'd probably go over my head
<apeiros_> but nice… I'd certainly love to have the knowledge
* apeiros_ wants matrix-learning
PeterB has left #ruby ["Leaving"]
<banisterfiend> apeiros_: well it's just 2 hours of video lectures and you'd have it :)
<banisterfiend> all free
<banisterfiend> and pretty accessible
Shahor has joined #ruby
<iamjarvo> is there downloadable version of the bastards book?
Shahor has quit [Client Quit]
philcrissman has joined #ruby
<macmartine> apeiros_: not sure how
yugui is now known as yugui_zzz
yugui_zzz is now known as yugui
spacebug has joined #ruby
mike has joined #ruby
spacebug has quit [Client Quit]
mike is now known as Guest77979
jcromartie has joined #ruby
nanderoo has joined #ruby
Guest81769 has quit [Ping timeout: 260 seconds]
oskarth has quit [Read error: Connection reset by peer]
kaneda_ has joined #ruby
kedare has joined #ruby
fowl has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
Guest77979 has left #ruby ["WeeChat 0.3.7"]
mneorr has joined #ruby
Guest54355 has quit [Ping timeout: 265 seconds]
<Synthead> I have a stream of XML with repetitious tags, like <this><that>stuff</that></this><this>...</this>, etc., and I'm parsing it with Nokogiri::XML. If I do .xpath('//this').each { |xml| puts xml.xpath('//this').to_s }, I get the entire stream of XML to #{xml} every loop. Why?
td123 has joined #ruby
LBRapid has joined #ruby
gtuckerkellogg has joined #ruby
<jcromartie> is there some drama over Rails or Rack going on right now?
<jcromartie> or some general community drama?
<banisterfiend> jcromartie: always is in the rails world
<shevy> jcromartie no idea but I guess the guys on #rubyonrails would know
<banisterfiend> rails is a circus
<banisterfiend> i hope rubymotion refocuses the ruby community, it's embarrassing having the language so closely associated with the pack of witless ninnies that is "rails programmers"
<apeiros_> macmartine: just replace the [^ ] with your [a-zA-Z\d]
jjxtsys has quit [Ping timeout: 272 seconds]
<kalleth> banisterfiend:
<kalleth> you got your ""'s the wrong way round
<kalleth> it's rails "programmers"
<banisterfiend> hehe
<macmartine> apeiros_: ah! thanks
<kalleth> "i want to implement oauth and facebook api into my rails app anyone link mei want guide copy paste plz"
philcrissman_ has joined #ruby
apeiros_ has quit [Remote host closed the connection]
fr0gprince_mac has joined #ruby
perryh is now known as perryh_away
carloslopes has joined #ruby
amalvagomes has joined #ruby
ph^ has quit [Ping timeout: 272 seconds]
<Synthead> any clue? :s
lolmaus has quit []
kaneda_ has quit [Ping timeout: 248 seconds]
TheHunter_1039 has joined #ruby
znake has quit [Quit: znake]
Xylo1 has quit [Quit: Leaving.]
Squarepy has joined #ruby
king313 has joined #ruby
king313 has quit [Changing host]
king313 has joined #ruby
simao_ has joined #ruby
<shevy> Synthead dunno sorry, I stopped using XML years ago
crankycoder has quit [Ping timeout: 244 seconds]
crankycoder has joined #ruby
Kwpolska has joined #ruby
chson has joined #ruby
albemuth has joined #ruby
akemrir has quit [Quit: WeeChat 0.3.7]
<workmad3> Synthead: because your xpath-fu is off
simao has quit [Ping timeout: 252 seconds]
<workmad3> Synthead: // will search within the entire document (not scoped)
philcrissman has quit [Remote host closed the connection]
<Synthead> workmad3: oooooh
<Synthead> workmad3: even if it's matched bits within a block?
<workmad3> Synthead: I'm not an xpath expert... I'd suggest looking up the w3c stuff for more details, but from what I remember, // lets you break out of the context of the current node to search the rest of the document
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<workmad3> Synthead: it's basically saying 'match any path to a node called <this> from the root'
<Synthead> workmad3: oooh, this conforms to W3C standards? wow, I never knew that! That's very cool :D
<workmad3> Synthead: xpath is a w3c standard, yes... and nokogiri is a ruby wrapper around libxml2 to 'rubyify' it :)
<fowl> you're definition of very cool is different than mine
<fowl> your* :(
kpshek has joined #ruby
<Hanmac> thats why i like nokogiri ... its the ruby way :P
bbttxu has joined #ruby
axl_ has joined #ruby
linduxed has joined #ruby
b1rkh0ff has joined #ruby
robbyoconnor has quit [Ping timeout: 272 seconds]
simao_ is now known as simao
<workmad3> fowl: heh :) 'cool' along with 'xml' and 'w3c standard' does seem a bit oxymoronic :)
b1rkh0ff has quit [Client Quit]
b1rkh0ff has joined #ruby
the-newsman has joined #ruby
<the-newsman> Hello all
<the-newsman> what does :: mean ?
b1rkh0ff has quit [Read error: Connection reset by peer]
kevinbond has joined #ruby
<DefV> double double colon
<chiel> the-newsman: means something is inside a module
b1rkh0ff has joined #ruby
ipoval has quit [Quit: ipoval]
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby
ikaros has joined #ruby
nari has quit [Ping timeout: 252 seconds]
uris has joined #ruby
BeLucid has quit [Read error: Operation timed out]
BeLucid has joined #ruby
<Synthead> workmad3: also, I removed '//' from the xpath string and it works :D
<carloslopes> the-newsman, chiel: or inside a class
<chiel> carloslopes: ah, can you nest classes?
withnale has quit [Read error: Connection reset by peer]
withnale has joined #ruby
savage- has joined #ruby
<carloslopes> chiel: i think you don't, but you can declare a constant inside it, and call the constant using MyClass::CONSTANT
<chiel> ahh right, of course, my bad :)
<carloslopes> chiel: ;)
<chiel> i am very much a ruby noob, still. :D
ABK has quit [Read error: Operation timed out]
<carloslopes> chiel: i think that we all are :)
<lectrick> class Config < BasicObject; end #=> TypeError: Config is not a class ... uh, what??
<chiel> carloslopes: lies! :D
cantonic_ has joined #ruby
bbttxu has quit [Quit: bbttxu]
<lectrick> lol I basically just want a simple container that holds a single attr_accessor
<llaskin> is there a reason why one would use a do end instead of {} on a multi line block?
Morkel has quit [Quit: Morkel]
<carloslopes> llaskin: it's just convention..
thone_ has joined #ruby
<lectrick> omg Config is an RbConfig and is somehow already defined in the root ruby namespace. Who knew??
<llaskin> i see
king535 has joined #ruby
king313 has quit [Read error: Connection reset by peer]
thone has quit [Read error: Operation timed out]
<carloslopes> llaskin: but IMO it's better to follow it :) ... i only escape from it when i need nested blocks, in this case i always use {}
asobrasil has joined #ruby
rorymckinley2 has quit [Ping timeout: 248 seconds]
yugui is now known as yugui_zzz
nfk has quit [Quit: yawn]
cantonic has quit [Ping timeout: 250 seconds]
cantonic_ is now known as cantonic
<lectrick> Is there an object that acts like a hash but lets you access the keys as method calls?
jrist-mtg is now known as jrist
<Hanmac> lectrick do you look after a struct or OpenStruct?
minijupe has joined #ruby
<lectrick> Hanmac: Yes that's an idea I will look at those
snip_it has joined #ruby
yugui_zzz is now known as yugui
oskarth has joined #ruby
sahli has joined #ruby
heftig has quit [Quit: leaving]
trivol has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
cywill has joined #ruby
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest97592
dustybrains has joined #ruby
Boohbah has quit [Ping timeout: 276 seconds]
sahli has quit [Remote host closed the connection]
rorymckinley2 has joined #ruby
Guest97592 is now known as C0deMaver1ck
nfk has joined #ruby
C0deMaver1ck has quit [Changing host]
C0deMaver1ck has joined #ruby
luxurymode has joined #ruby
savage- has quit [Remote host closed the connection]
ThatDudeGuy_ has joined #ruby
v0n has joined #ruby
rasbonics has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
fangwen has joined #ruby
pablo_ has joined #ruby
seivan has joined #ruby
etehtsea has quit []
fangwen has left #ruby [#ruby]
fangwen has joined #ruby
jchauncey has joined #ruby
oooPaul has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
thatRD has joined #ruby
Boohbah has joined #ruby
dknight has joined #ruby
fr0gprince_ has quit [Ping timeout: 252 seconds]
cyb3r3li0g has joined #ruby
dknight_ has joined #ruby
<dknight_> what is realm in $ua->credentials($netloc, $realm, $uname, $pass) in http://oreilly.com/openbook/webclient/ch05.html ? and how does it map to Net::HTTP basic_auth?
mneorr has quit [Remote host closed the connection]
<banisterfiend> dknight_: that's not ruby
wvms has left #ruby [#ruby]
<dknight_> banisterfiend: I know; but in case someone understands perl please explain how to convert this
apeiros_ has joined #ruby
<dknight> what is realm in $ua->credentials($netloc, $realm, $uname, $pass) in http://oreilly.com/openbook/webclient/ch05.html ? and how does it map to Net::HTTP basic_auth?
dknight has quit [Quit: Reconnecting]
<hoelzro> dknight_: you mean what does the realm variable signify?
<oooPaul> dknight_: Look up "realm" and "basic auth" on Google.
<dknight_> hoelzro: yeah
<dknight_> oooPaul: okay
<hoelzro> dknight_: what oooPaul said.
yugui is now known as yugui_zzz
cyb3r3li0g has quit [Max SendQ exceeded]
visof has joined #ruby
cache_za has quit [Remote host closed the connection]
sparrovv has quit [Ping timeout: 244 seconds]
CheeToS has joined #ruby
bbttxu has joined #ruby
fowl has quit [Ping timeout: 244 seconds]
pablo_ has quit [Ping timeout: 272 seconds]
crankyco_ has joined #ruby
crankycoder has quit [Ping timeout: 255 seconds]
cantonic has quit [Quit: cantonic]
prometheus has joined #ruby
dekroning has joined #ruby
snip_it has quit [Quit: snip_it]
jprovazn is now known as jprovazn_away
tommyvyo has quit [Ping timeout: 244 seconds]
<dekroning> i'm having something strange happening on CI server that I can't replicate on any other system that I have. I've got a method def sort(obj) ... end which i'm sending something like a = [ { ... }, { ... }, { ... }, { ... } ] and the error message i'm getting is. sort received 4 arguments expected 1 so it looks like the method was called with the splat operator e.g. sort(*a) however, it isn't it's just sort(a)
<dekroning> is there perhaps so default splatting of array arguments, in a specific version of ruby ?
<apeiros_> there are places where ruby auto-splats/auto-unsplats. but not when passing arguments to methods.
tommyvyo has joined #ruby
nlc has joined #ruby
<dekroning> apeiros_: i couldn't find anything like that either, but since i'm really confused how this could happen, I ended up here :-)
zacstewart has quit [Quit: leaving]
<apeiros_> dekroning: well, debug the code. figure where the exception happens, get the backtrace, inspect the data…
ckrailo has joined #ruby
khakimov has joined #ruby
zacstewart has joined #ruby
<dekroning> apeiros_: well my issue is that it only happens on CI and only when our Jenkins server runs the code, when I run it on my local machine, or manually on the server it's working correctly
cantonic has joined #ruby
pablo_ has joined #ruby
trivol has quit [Quit: trivol]
ckrailo has quit [Client Quit]
ckrailo has joined #ruby
<apeiros_> and you can't debug code that runs on your jenkins?
azm has joined #ruby
<dekroning> yeah now that you mention it, i'm going to try and run this single spec via jenkins... my full suite currently takes 1hour 20 minutes to run /me shame
macer1 has joined #ruby
<macer1> hey
<macer1> is there a way to get list of all classes that extends my class?
chimkan has joined #ruby
<shevy> macer1 hmm tried .ancestors yet?
davidcelis has quit [Quit: K-Lined]
<macer1> no, will try, wait a sec :P
ananthakumaran1 has joined #ruby
bbttxu has quit [Quit: bbttxu]
<macer1> grr, I have a small problem. isn't local dir in load path?
fr0gprince_ma has joined #ruby
<macer1> I am doing require 'class_name'
<macer1> and the file is class_name.rb
<shevy> I think in 1.9.x not anymore
mikepack has joined #ruby
<shevy> I think you can somehow add the current dir
jchauncey_ has joined #ruby
<shevy> monkeys overrun the ruby core team :(
<macer1> ./class_name
<macer1> works
<macer1> ;p
<Hanmac> macer1 its now "require_relative 'class_name'"
ABK has joined #ruby
<Hanmac> without "
<macer1> thank you :)
<shevy> damn long to type
LyonJTill has quit [Quit: Leaving...]
<shevy> Hanmac we should make a new language!
<shevy> in C++!
ikaros_ has joined #ruby
ananthakumaran has quit [Ping timeout: 248 seconds]
<ccooke> Hanmac: the world needs a non-quotable quote character. A universally-understood quoting character that never quotes things indirectly :-)
<workmad3> shevy: flex and yacc ftw!!!
<shevy> hmmmm
fr0gprince_ has joined #ruby
ghanima has joined #ruby
fr0gprince_mac has quit [Ping timeout: 244 seconds]
francisfish has quit [Remote host closed the connection]
jchauncey has quit [Ping timeout: 240 seconds]
jchauncey_ is now known as jchauncey
<Hanmac> shevy if require_relative is to long for you, you chould add a def rr(s);require_relative(s);end;
pushp0p has quit [Ping timeout: 250 seconds]
<macer1> or just use ./
<macer1> :P
<shevy> that would be better, but the problem is, if I were to use that a lot in my projects, when I want to distribute them I'd have to distribute my modifications too and that is too cumbersome
maesbn has quit [Remote host closed the connection]
savage- has joined #ruby
kenperkins has joined #ruby
<shevy> I once thought I would include EEEEVERYthing in std_includes.rb
tsou has quit [Remote host closed the connection]
ikaros has quit [Ping timeout: 252 seconds]
<Synthead> I want to run a function that builds a hash so I can run myHash = generateHash. How can I return a hash from a function, generating it with a block?
<shevy> but that makes it hard to release subcomponents that are supposed to be run stand alone
<shevy> Synthead def foo; return Hash.new; end; myHash = foo
<shevy> as for the block ... I am not sure what you want to do with the block? can you give an example?
<macer1> shevy: ancestors doesn't work
<shevy> macer1 waaaah!
<shevy> hmm
<shevy> you need to get a list of all classes that modify your class?
<arturaz> i have wrote jruby<->scala integration layer! behold!
<macer1> Well my class is kind of interface
<shevy> can you give a specific code example macer1 ?
<macer1> I have a class LoginChecker
<Hanmac> macer "./" is bad
<arturaz> >> a = Set.new([1,2,3]); {3=>a}.to_scala.apply(3).send(:"+=", 5); a => #<Set: {1, 2, 3, 5}>
alexim has joined #ruby
<macer1> and like AuthmeChecker and OtherChecker
<macer1> And I need to know what options there are
<macer1> for user to choose
<macer1> hanmac: because of windows?
snip_it has joined #ruby
oponder has quit [Remote host closed the connection]
snip_it has quit [Client Quit]
luxurymode has quit [Quit: Computer has gone to sleep.]
ABK has quit [Read error: Connection reset by peer]
<Hanmac> no, because the file can be called from an other place,
jkarayusuf has quit [Remote host closed the connection]
<macer1> makes sense
ABK has joined #ruby
<macer1> shevy: any ideas?
<macmartine> Is there a way to do something like this: return an array of arrays? @clients.collect([&:first, &:last])
<shevy> macer1, not really, but I also did not understand it hehehe
<macer1> understand wut?
<shevy> your parent is LoginChecker, and you have two subclasses? AuthmeChecker and OtherChecker
<shevy> what you wrote
<macer1> yes
<macer1> correct
<shevy> "<macer1> And I need to know what options there are"
<shevy> I dont know what is options
<macer1> sorry I mean
<macer1> what options there are for user :>
Targen has joined #ruby
<macer1> classes that check login and pass
<Synthead> shevy: well, imagine .map, right? I could build out an array with it. I'm trying to do the same with a hash. suppose I could use a block to build a hash, then "return myHash"
<Synthead> shevy: but I'm trying to avoid declaring it and returning it when I can just return it
prometheus has quit [Quit: leaving]
<shevy> hmm
ABK has quit [Read error: Connection reset by peer]
MasterIdler has joined #ruby
hal-j has joined #ruby
BeLucid has quit [Remote host closed the connection]
lkba has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<workmad3> Synthead: sounds like you want each_with_object({})
<workmad3> Synthead: with a block :)
ABK has joined #ruby
<Synthead> shevy: if I could do something like stuff.map { |that| { :my => that } } or something along those lines
<shevy> my head is a bit confused
<Synthead> workmad3: what would that look like?
<macer1> there aren't anything like java interfaces?
<shevy> I am glad that workmad3 has come to the rescue
<Synthead> haha
<Synthead> I've scratched my head at this a few times, have gotten confused, and avoided it so far
robdodson has joined #ruby
<workmad3> Synthead: stuff.each_with_object({}) {|i, hsh| hsh[value.key] = value}
<robdodson> Is it possible for a module to load a file the first time it's used?
<robdodson> i see #autload but i'm not sure if it's what i want. I need to load a configuration file into my module which it should parse first
fr0gprince_ma has quit [Quit: Leaving...]
mikepack has quit [Remote host closed the connection]
<Synthead> workmad3: you're defining hash elements to the block variable?
gyre007 has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
mwyrobek has quit [Quit: Konversation terminated!]
khakimov has joined #ruby
blacktulip has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
<workmad3> Synthead: I don't follow what you're asking
<Synthead> workmad3: I'll pastebin something
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
dknight_ has quit [Quit: leaving]
ABK has joined #ruby
mneorr has joined #ruby
BeLucid has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
<macer1> how can i make kindof interface?
<shevy> workmad3 I felt like this the last hour ;)
<shevy> macer1 and Synthead confuse me a lot
<macer1> hehe
<workmad3> :)
<Synthead> hahaha
schovi has quit [Remote host closed the connection]
<Synthead> I'm trying to make this a good one :)
<shevy> Synthead, at least you are not using odd words
ABK has quit [Read error: Connection reset by peer]
<shevy> but for example, I dont know what is a "kindof interface"
<workmad3> macer1: java interfaces? as in a declared 'you need to declare you're using this formal interface'? nothing like that in ruby no
ABK has joined #ruby
<macer1> :(
<shevy> see, I am so glad for workmad3
<workmad3> macer1: ruby is duck-typed, so basically any combination of methods can be turned into an ad-hoc interface
<workmad3> macer1: and anything that implements those methods can be used to fulfil that interface
jhunter has quit [Ping timeout: 260 seconds]
ph^ has joined #ruby
<workmad3> macer1: for example, the Enumerable module relies on being used in a class that provides a .each method that acts like Array's each method... if you provide that, then you can use Enumerable to add all the extra stuff
ABK has quit [Read error: Connection reset by peer]
<macer1> makes sense
ABK has joined #ruby
<macer1> module module.. so like module MyInterface? ;p
jhunter has joined #ruby
<jimeh> macer1: the closest of what you're thinking about would probably be TomDoc, it's documentation based, and not a large portion of the ruby community uses it, but check it out if you like: http://tomdoc.org/
<workmad3> macer1: or the Rack library for web services... it requires that a 'rack application' provide a 'call' method that takes the request environment and returns an array of [status_code, {headers}, [body_content] ]
serpa has joined #ruby
showy has joined #ruby
<macer1> thanks
<macer1> I think I will do a module
<macer1> :D
serpa has quit [Client Quit]
Morkel has joined #ruby
<workmad3> macer1: anything that provides that can be used as a rack application, whether it has a declared 'Rack application' module or interface or not (in fact, Rack doesn't provide any 'interface' modules, so you can't use one :) )
ABK has quit [Read error: Connection reset by peer]
Diranged has joined #ruby
luxurymode has joined #ruby
ABK has joined #ruby
<Diranged> Can anyone tell me how to setup a super reliable/fast gemrc file.. that is, one that lists several mirrors (or even points to a mirror list?), has good retry/failover settings if one of the mirrors is down, etc..?
<Hanmac> macer1 you can check for an possible "interface" with obj.respond_to?(method) or obj.is_a?(module)
<Diranged> It seems like the .gemrc file isnt documented terribly well..
<macer1> so, anything that has method a, b and c can be my LoginChecker :P?
<workmad3> macer1: that's the idea, yeah
<Synthead> workmad3, shevy: here: http://codepad.org/otg6uCQp
<workmad3> macer1: or rather, anything that has method a, b and c and methods a, b and c behave appropriately
zmoazeni_ has quit [Ping timeout: 245 seconds]
<Synthead> workmad3, shevy: If I could just do a hash.map and splat a hash, I wouldn't need to do "return", but I'm not sure how to do it that way
<macer1> hmm in the module I will make something like add_to_list(class) that will check if the class has my methods.
rippa has joined #ruby
<Synthead> shevy: I hope this makes more sense
ABK has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
<robdodson> Is there a way to tell a module to autoload a yaml file when it's first used?
<robdodson> maybe that's a really bad practice… I'm trying to build a formatter and it needs to run off of a yaml file to know which categories go with which formats
alanp has quit [Read error: Operation timed out]
alanp_ has joined #ruby
davidcelis has joined #ruby
<carloslopes> robdodson: i don't know your context, but, maybe will be better you use a class
da3d is now known as daed
<Synthead> robdodson: could do something like @settings = load_the_yaml if @settings.defined?
<Synthead> or
<Synthead> ! @setttings.defined?
<robdodson> Synthead: yah that's kind of what i was thinking. I just hate running a check every single time but that might be my only option
<showy> robdodson: a classes would definitively be a better choice
luxurymode has quit [Quit: Computer has gone to sleep.]
<Synthead> robdodson: if you don't want to explicitly declare it, you need to check it somehow
<robdodson> ok thanks guys
luxurymode has joined #ruby
Ontolog has quit [Remote host closed the connection]
kaneda_ has joined #ruby
robdodson has quit [Quit: robdodson]
jeebster has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
khakimov has quit [Quit: Computer has gone to sleep.]
headius has joined #ruby
<arturaz> anybody got a suggestion how to make my custom class to return true on .is_a?(Hash) besides inheriting from it?
khakimov has joined #ruby
cha1tanya has quit [Read error: Connection reset by peer]
thecreators has joined #ruby
<arturaz> oh, this is ruby... def is_a?(klass); klass == Hash ? true : super(klass); end
<the-newsman> the best ruby ide is ?
<shevy> the-newsman please
<deryl> the one that works best for you
<shevy> the-newsman the human brain is the name
<jeebster> eww, ruby and ide together in the same sentence...
<shevy> the-newsman I use bluefish 1.0.7 because of the default colours :P
<jeebster> hehe
bluenemo has quit [Remote host closed the connection]
<deryl> best is subjective. it all depends on who you're talking to. try them all and decide for yourself
codebeaker has joined #ruby
<the-newsman> wow ! i got many answers. lets analyze them
kedare has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
lorandi has quit [Remote host closed the connection]
<deryl> that's your job, not our's
ABK has joined #ruby
<the-newsman> deryl i cannt decide since i know none abt ruby's ides
<the-newsman> deryl what is ur fav. ide ?
<deryl> the-newsman, dude, go hit google for that crap
<deryl> seriously
<chiel> or just use vim ;D
ABK has quit [Read error: Connection reset by peer]
<shevy> emacs!
<chiel> the-newsman: didn't you ask the EXACT same question yesterday?
<shevy> I think he did chiel
<chiel> and didn't you get a similar answer then?
ABK has joined #ruby
<shevy> he cant make a decision
<chiel> so why ask again?
Diranged has left #ruby [#ruby]
<the-newsman> chiel i did not like the answers of yesterday
<deryl> because he's trolling
<shevy> hehehe
<deryl> tough shit
<the-newsman> :)
<chiel> trololol :D
<shevy> the-newsman, use bluefish 1.0.7
maletor has joined #ruby
<Synthead> shevy: this what I'm trying to do, but working, or course :) http://codepad.org/D2ruF7sB
<the-newsman> shevy ok i can try
european-guy has joined #ruby
<shevy> Synthead that code looks so strange
<shevy> is line 13 even valid at all?
jrist is now known as jrist-afk
* european-guy hi
<Synthead> shevy: no, but I'm trying to do this http://codepad.org/otg6uCQp without declaring a hash and returning it
<the-newsman> hello european-guy
<the-newsman> how is greece nowadays ?
znake has joined #ruby
Eldariof-ru has quit [Ping timeout: 252 seconds]
<shevy> workmad3, can you help Synthead, it is all somehow over my head
robotmay has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
<shevy> the-newsman soon the military can move in to "restore order"
<Synthead> shevy, workmad3: I really appreciate all this help, you guys are great :)
hoelzro is now known as hoelzro|away
ABK has joined #ruby
jackiechan0 has joined #ruby
ABK has quit [Read error: Connection reset by peer]
<codebeaker> Synthead: what are you trying to do ?
ABK has joined #ruby
<Synthead> codebeaker: return a hash from a block inside of a function without declaring it
<codebeaker> where should the block inside the function get the data from ?
Morkel has quit [Quit: Morkel]
ABK has quit [Read error: Connection reset by peer]
visof has quit [Ping timeout: 272 seconds]
<the-newsman> shevy i think the whole outnry should have some tolerance and suffer lil bit to pass the problems. the spoiled ppl r ruinign everything. i wonder why the greek guys burn their ebautiful coutnry. this is insane
ABK has joined #ruby
schovi has joined #ruby
davidpk has joined #ruby
<the-newsman> i love greece
<the-newsman> sample and sympol of old civilization
<Synthead> codebeaker: that's kinda irrelevant in this case, but here: this is what works (by declaring a hash, building it with a block, and returning it): http://codepad.org/otg6uCQp ...and this is what I'm trying to do, although the syntax isn't right (yet): http://codepad.org/D2ruF7sB
<codebeaker> Synthead: sorry - I genuinely can't see what you are trying to fo
alex__c2022 has quit [Quit: alex__c2022]
<shevy> the-newsman well, it's not only greece, the debts are spread throughought europe and the banks
khakimov has quit [Quit: Computer has gone to sleep.]
`brendan has quit [Ping timeout: 252 seconds]
ABK has quit [Read error: Connection reset by peer]
JohnBat26 has joined #ruby
<codebeaker> expected inputs and outputs, and I could help you
alex__c2022 has joined #ruby
kevinbond has quit [Quit: kevinbond]
jrist-afk is now known as jrist
univers has joined #ruby
<Synthead> codebeaker: I'll make it a little simpler with another pastie
ABK has joined #ruby
alex__c2022 has quit [Client Quit]
znake has quit [Remote host closed the connection]
znake has joined #ruby
cha1tanya has joined #ruby
iamjarvo has quit [Quit: Leaving.]
cywill has quit [Quit: Quitte]
sbanwart has quit [Ping timeout: 252 seconds]
queequeg1 has quit [Read error: No route to host]
<llaskin> does anyone know why indians use the word "baba" after their name? is it something special? like a nickname or something?
ABK has quit [Read error: Connection reset by peer]
gmci has joined #ruby
ymasory has joined #ruby
<shevy> ali baba
<shevy> was he indian??
<llaskin> no he was persian
nej has joined #ruby
<Synthead> codebeaker: here you go http://codepad.org/VlV7B58c
gosshedd has joined #ruby
pdtpatrick has quit [Ping timeout: 248 seconds]
<Synthead> codebeaker: I'm trying to build a hash from a block and return it without defining it as a variable
<codebeaker> you're looking for #tap if you are 1.9 (you should be)
<showy> Synthead: whats the purpouse ?
<Synthead> showy: better written code, but I'd be using it in a much larger project
altiouz has joined #ruby
banjara has joined #ruby
CheeToS has quit [Ping timeout: 265 seconds]
<Synthead> showy: I have a large hash declared in my real project that defines what elements in an XML stream is valid for what I'm looking for, then what I can capture, and I want to run a function that is something like data = getData(xmlStream)
<codebeaker> you want #tap
<codebeaker> see the article I linked :)
<codebeaker> the counter-example is exactly what you psoit
<codebeaker> posted*
<Synthead> codebeaker: I'm reading it :D I was just halfway done typing my last message when you sent the link so it was just poorly-timed :)
<Synthead> codebeaker: this looks exactly like what I need! is this 1.8-compatible too?
<codebeaker> Synthead: no, but there's no good reason to be doing anything on 1.8 at the moment
<codebeaker> and you can implement a `tap` method in 4 LOC (see the example) for 1.8 if Object doesn't respond_to?(:tap)
<codebeaker> it really is that simple
gyre007 has quit [Quit: Ex-Chat]
<Synthead> codebeaker: hmmmmm
<Synthead> codebeaker: this is where I experiment! hah
pushp0p has joined #ruby
pushp0p is now known as Guest88833
ChampS666 has joined #ruby
banjara has quit [Ping timeout: 260 seconds]
jackiechan0 has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
visof has joined #ruby
jackiechan0 has joined #ruby
<Synthead> codebeaker: so if I'm reading this right, .tap allows you to change the contents of whatever |variable| is defined for the block, and it naturally returns it?
<codebeaker> yes
eywu has joined #ruby
<codebeaker> you do Hash.new.tap { |thehash| ...... something here ..........}
<workmad3> Synthead: .tap basically executes the block of code and then returns what you called .tap on
pdtpatrick has joined #ruby
<codebeaker> and because Hash.new.tap is the (first and) last statement in the functyion, it's the implcit return value
<Synthead> codebeaker: what if you want to build a totally new hash?
<workmad3> Synthead: and it passes the target for .tap into the block for you to use
<codebeaker> Hash.new.tap { |the_new_hash| }
jimeh has quit [Ping timeout: 244 seconds]
Guest88833 is now known as midrange
midrange has quit [Changing host]
midrange has joined #ruby
<workmad3> codebeaker: you could also do {}.tap {|my_hash| ...} ;)
<codebeaker> workmad3 - sure, but I prefer reading at least one keyword in my methods :)
<codebeaker> [] and {} look too alike :)
ananthakumaran has joined #ruby
ABK has joined #ruby
jimeh has joined #ruby
<workmad3> carloslopes: :)
<shevy> hey
<shevy> why carloslopes ?
<workmad3> err, codebeaker even
<workmad3> shevy: because I suck at tab-complete, ok? :P
<shevy> oh
<shevy> and I fail at reading
<shevy> I thought his nick is "codebReaker"
niku4i has joined #ruby
<Synthead> workmad3, codebeaker: oooh, this works :o http://codepad.org/pVLdRM5J it shows an error on codepad, but works on my system
<Synthead> workmad3, codebeaker: is there a cleaner way of writing this function?
ABK has quit [Read error: Connection reset by peer]
Araxia_ has joined #ruby
<burgestrand> Synthead: codepad runs an old version of ruby :)
<codebeaker> I prefer to call `result` something more descriptive
<burgestrand> 1.8.6, it’s older than what I’ve been doing ruby for, kinda neat
<codebeaker> but otherwise that's pretty clean
<codebeaker> but, great if that works for you :)
<Synthead> burgestrand: I figured :D
<burgestrand> Synthead: http://19pad.charlie.bz/1372 :)
<Synthead> burgestrand: niiice, bookmarking this
ukwiz has quit [Quit: Leaving]
<Synthead> codebeaker: now that I see both laid out on the table, I can't decide which one I like more, haha
<Synthead> codebeaker: hashThisWay (with return) seems easier to read
<Synthead> codebeaker, burgestrand: any thoughts on efficiency, memory usage, etc. between the two ways of doing it?
<burgestrand> Synthead: also, camelcase not idiomatic ruby, just fyi :)
ikaros_ has quit [Remote host closed the connection]
<Synthead> burgestrand: most people prefer underscoring_their_variable_names ?
zacstewart has quit [Ping timeout: 265 seconds]
<burgestrand> Synthead: stringThatWay for one
<burgestrand> Synthead: the only thing that gets camelcased in Ruby is pretty much class/module names, sometimes constants
<burgestrand> anything else is snake cased, yeah
<Synthead> burgestrand: interesting, hmmmm
<Synthead> burgestrand: habits, habits :)
<burgestrand> Yeah, I know, I switch between Ruby, JS, ObjC a lot :p
<codebeaker> ok, guys i'm out Synthead: hash.tap is more modern, and clearer, and *proibably* better/more efficnent
<burgestrand> Synthead: also, http://19pad.charlie.bz/1373
<codebeaker> but unless you are really kicking Ruby's ass, that won't matter at your scale
<burgestrand> Synthead: don’t worry too much about the efficiency, once it matters you should measure it and fix it where it hurts
codebeaker has quit [Quit: codebeaker]
dekroning has quit [Ping timeout: 252 seconds]
brasten has joined #ruby
neersighted|AFK is now known as neersighted
<Synthead> I love it, you guys
<Synthead> this has been bugging me for days! thanks so much for all your support!
Neil___ has quit [Remote host closed the connection]
<burgestrand> Synthead: also, avoid to_sym, you sometimes need it but often it’s better to do it the other way around (take a symbol and to_s it)
neil__ has joined #ruby
<burgestrand> you should never do it to some input that could potentially be an infinite number of different values, in this specific case it was fine though
eighty4 has quit [Ping timeout: 265 seconds]
mohits has joined #ruby
<workmad3> burgestrand: well, it's fine to .to_sym something that could potentially be an infinite number of values as long as it only takes one value during program execution ;)
<burgestrand> workmad3: :trollface:
<burgestrand> :p
fowl has joined #ruby
fowl has quit [Changing host]
fowl has joined #ruby
d3vic3 has quit [Ping timeout: 244 seconds]
ghanima has quit [Quit: Leaving.]
fahadsadah has quit [Ping timeout: 264 seconds]
Jck_true has quit [Quit: No Ping reply in 180 seconds.]
nopper has quit [Ping timeout: 260 seconds]
schovi has quit [Remote host closed the connection]
d3vic3 has joined #ruby
Whoop has quit [Ping timeout: 272 seconds]
iamjarvo has joined #ruby
sparrovv has joined #ruby
nopper has joined #ruby
visof has quit [Ping timeout: 272 seconds]
ephemerian has quit [Quit: Leaving.]
eighty4 has joined #ruby
n1x has joined #ruby
kuranai|off has joined #ruby
znake has quit [Quit: znake]
Whoop has joined #ruby
thatRD has quit [Quit: leaving]
Jck_true has joined #ruby
<macer1> hymm
<macer1> I have a module
<macer1> and
ABK has joined #ruby
<macer1> something like enum, result = { :ok =>0, :fail => 1 [...] }
m_3 has quit [Remote host closed the connection]
<macer1> but the "result" is not avaible when I include module ;/
tatsuya_o has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
<macer1> I tried using @
ABK has joined #ruby
jrist is now known as jrist-mtg
nlc has quit [Quit: Leaving]
llaskin has left #ruby [#ruby]
<Hanmac> macer if you want result as a constant you need "Restult" with an uppercase letter
ABK has quit [Read error: Connection reset by peer]
fahadsadah has joined #ruby
stephenjudkins has joined #ruby
ABK has joined #ruby
<macer1> interesting...
<macer1> ;p
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
banjara has quit [Quit: Leaving.]
kichawa has joined #ruby
kichawa has quit [Quit: leaving]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
simao has quit [Quit: Lost terminal]
abra has joined #ruby
cbuxton1 has joined #ruby
ABK has quit [Read error: Connection reset by peer]
pu22l3r_ has quit [Ping timeout: 255 seconds]
adamkittelson has joined #ruby
ABK has joined #ruby
zacstewart has joined #ruby
<the-newsman> shevy
ABK has quit [Read error: Connection reset by peer]
cbuxton has quit [Ping timeout: 244 seconds]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
<Hanmac> macer1 but beware in ruby constants are not so const as you maybe thought ... you can change the hash you assigned to the constant
brasten has quit [Quit: brasten]
ABK has joined #ruby
<lectrick> How do I ask a class if it already included a module?
`brendan has joined #ruby
ABK has quit [Read error: Connection reset by peer]
<workmad3> Hanmac: hell, you can change the constant itself, all you get is a warning :)=
mdhopkins has quit [Quit: mdhopkins]
ABK has joined #ruby
<workmad3> lectrick: instance.is_a?(ModuleName)
<lectrick> workmad3: awesome
<Hanmac> workmad3 i mean like Constant.replace if its a string
<lectrick> workmad3: there's also the .ancestors call
<workmad3> lectrick: or ClassName.ancestors.includes?(ModuleName)
<workmad3> lectrick: was just getting there :)
<workmad3> Hanmac: yeah, it's a constant reference, not a constant value :)
d3vic3 has quit [Ping timeout: 250 seconds]
m_3 has joined #ruby
ABK has quit [Read error: Connection reset by peer]
<Hanmac> lectrick & workmad3 ClassName.include?(ModuleName) works too
alanp_ has quit [Remote host closed the connection]
<workmad3> Hanmac: does it? cool :)
ABK has joined #ruby
<lectrick> Hanmac: ah nice!
<arturaz> https://gist.github.com/2712236 <-- is that an evil thing to do? ;]
d3vic3 has joined #ruby
includex has quit [Remote host closed the connection]
cha1tanya has quit [Quit: Leaving]
shruggar has quit [Quit: Leaving.]
ABK has quit [Read error: Connection reset by peer]
<workmad3> arturaz: it looks evil
neersighted is now known as neersighted|AFK
<Hanmac> arturaz if you extend your little gimick so it excepts more then one klass it would more cool :P
alanp has joined #ruby
<workmad3> arturaz: or at least, I'd consider it evil in production code :)
<arturaz> no need for that now
<Hanmac> and maybe in object form like: object.fake_identy(Hash)
<arturaz> workmad3, ruby is stupid for not having interfaces. I cannot say that this object is a Hash :) And yes, i know of respond_of?, but many things respond to :[]
Solnse has joined #ruby
the-newsman_ has joined #ruby
<Hanmac> arturaz: what do you think about that: https://gist.github.com/2712321
hynkle has quit [Read error: Connection reset by peer]
hynkle has joined #ruby
the-newsman has quit [Ping timeout: 246 seconds]
the-newsman_ is now known as the-newsman
<lectrick> what's the diff between Hash#update and Hash#merge ?
jayrulez has quit [Ping timeout: 252 seconds]
<the-newsman> like the diff between girl and woman
mikepack has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
kil0byte has joined #ruby
<Hanmac> lecktrick merge without an "!" makes a new hash, merge! and update are the same and does not make a new one
mikepack has joined #ruby
jgrevich has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
jrist-mtg is now known as jrist
baroquebobcat has joined #ruby
etehtsea has joined #ruby
emmanuel__ has quit [Remote host closed the connection]
TheFuzzball has joined #ruby
manizzle has quit [Ping timeout: 244 seconds]
MTXsCript01 has joined #ruby
fangwen has quit [Quit: Page closed]
nfluxx has joined #ruby
the-newsman has left #ruby [#ruby]
Vainoharhainen has quit [Quit: Leaving...]
* MTXsCript01 ( : m[T]x :ï: Closing Script ( ºêÒºÒÂ..ä»áÅéǹêÒÒ... ) :ï: sCript : )
MTXsCript01 has quit [Client Quit]
hynkle has quit [Read error: Connection reset by peer]
hynkle has joined #ruby
kenichi has joined #ruby
azm has quit [Ping timeout: 265 seconds]
Vainoharhainen has joined #ruby
heisenmink has joined #ruby
Vainoharhainen has quit [Client Quit]
jlogsdon has joined #ruby
<heisenmink> is there an array method that return the firsts value that makes a passed lambda return true, or similar?
PaciFisT has joined #ruby
CannedCorn has joined #ruby
<heisenmink> I have an array of image nodes and want to return the first that matches a criterion
ronniy has quit [Ping timeout: 250 seconds]
<heisenmink> (I did search on the array class docs but I didn't find anything)
<CannedCorn> $stderr << "WAS A HASH!"
<CannedCorn> whoops
<CannedCorn> hey guys, if i have an array that is [key, value, key, value] where key is a string and value is a hash, and i want to transform it into a hash where key is an array of values would you use inject?
ABK has joined #ruby
ringotwo has joined #ruby
<heisenmink> CannedCorn, I would use each_slice
<rippa> heisenmink: find
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<heisenmink> rippa, there is no Array#fin
<rippa> Enumerable#find
ABK has quit [Read error: Connection reset by peer]
banjara has joined #ruby
<heisenmink> rippa, does Array inherit Enumerable?
<CannedCorn> whoops, i actually got that wrong
<CannedCorn> the array is [[key, value], [key, value]…]
<rippa> heisenmink: yes
<CannedCorn> and i want a hash that is {:key => [values], :key => values}
<CannedCorn> shouldn't that be a groupby
jackiechan0 has quit [Ping timeout: 245 seconds]
<rippa> group_by
<CannedCorn> right
<CannedCorn> but is that what i want
<CannedCorn> i might be able to use Hash[]
<heisenmink> thanks rippa!
PigDude has joined #ruby
_md has quit [Ping timeout: 272 seconds]
<PigDude> Any Rack people here? I was wondering about a way to make directories map to index.html or index.htm
<PigDude> that is, for Rack::Static
chrismcg is now known as zz_chrismcg
Dan4sure_ has quit [Ping timeout: 244 seconds]
<carloslopes> PigDude: hmmm if you put /public/dir/index.html and points localhost:4567/dir/index.html it will map the file instead hit the route
Tearan has quit [Quit: Sleepy Badger....]
<carloslopes> s/points/run
<PigDude> yep, that is how Rack::Static works
thecreators has quit [Quit: thecreators]
dangerousdave has joined #ruby
<PigDude> but I would like to have the index.html be optional (I do something similar, and quite simple, with Python's Tornado; I wasn't sure if this too would require me to write custom Ruby code)
<lxsameer> which version of ruby is suit for a newbie?
<PigDude> I also was curious about how to run a simple Rack script ... I am using Rack so I can host static files in a simple fashion on Heroku
<carloslopes> lxsameer: the latest stable
<lxsameer> carloslopes: thanks
<PigDude> but of course, ruby config.ru falls flat: https://gist.github.com/2712525
<PigDude> I also tried (naiively, of course) ruby -rubygems -rrack config.ru
shruggar has joined #ruby
<workmad3> PigDude: rackup config.ru
<workmad3> PigDude: or, as config.ru is the default, just 'rackup'
<PigDude> workmad3, oh, thanks!
tomb_ has quit [Quit: Computer has gone to sleep.]
kirun has joined #ruby
<carloslopes> PigDude: did this solve your question?
<Hanmac> arturaz did you look at my gist ?
jackiechan0 has joined #ruby
<workmad3> PigDude: also for consideration - https://github.com/adaoraul/rack-jekyll <-- lets you put jekyll sites on heroku (jekyll is a static site generator for ruby)
<workmad3> although for jekyll, I tend to go through github rather than heroku
<arturaz> Hanmac, yes
<Hanmac> and your comment? ;P
<arturaz> scary
digitalcakestudi has joined #ruby
<PigDude> Jekyll has far too many dependencies for my liking, but I will consider it for a larger project. This is a small thing I am setting up
<PigDude> carloslopes, I'm just going to write a custom handler for rack
<workmad3> np :)
<PigDude> carloslopes, I am learning how to write rack code now
<PigDude> I can't imagine Rack::Static being all that complex internally
<Hanmac> arturaz: how to use: you may have function1_cs_abc and function2_cs_abc you can call both with only cs_abc
<workmad3> PigDude: rack hello-word: '->{[200, {}, ["Hello world"]]}'
davidpk has joined #ruby
<PigDude> neat
<workmad3> oh, sorry, should be '->{|e| [200, {}, ["Hello world"]]}'
shruggar has quit [Ping timeout: 248 seconds]
<PigDude> that is the complete file?
<workmad3> PigDude: stick 'run' in front of it
<PigDude> ah
<PigDude> -> is the new lambda notation i guess
<Hanmac> workmad3 shoundnt it be '->(e) {[200,{},["Hello world"]]}' ?
dekroning has joined #ruby
<workmad3> Hanmac: it should indeed :)
stkowski has quit [Quit: stkowski]
stkowski has joined #ruby
stefanp_ has quit [Quit: Linkinus - http://linkinus.com]
statix has quit [Remote host closed the connection]
<PigDude> osx lion ships with 1.8.7 o.O
statix has joined #ruby
<PigDude> so I will be using lamdba do :^)
Solnse has quit []
altiouz has quit [Ping timeout: 240 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
h4mz1d has quit [Ping timeout: 244 seconds]
<workmad3> yeah... having issues getting it to just work, but it's the right idea at least :)
jaystay has joined #ruby
afallows_ is now known as afallows
<workmad3> ah, having issues because I had another server on the same port
<Hanmac> imo i hate the "->" form
ZifreCL has quit [Remote host closed the connection]
dekroning has quit [Ping timeout: 244 seconds]
banjara has left #ruby [#ruby]
<workmad3> Hanmac: yeah, I'm not thrilled with it myself
tvw has quit [Read error: Connection reset by peer]
<workmad3> Hanmac: but it's shorter and I was golfing :)
tayy has joined #ruby
lllllalexanderll has joined #ruby
<lllllalexanderll> hi
mucker has joined #ruby
<lllllalexanderll> i want to programme with ruby
shruggar has joined #ruby
ludo4ka has quit [Ping timeout: 245 seconds]
<lllllalexanderll> how do i can define a variable as a string ? =)
<Hanmac> a = "abc"
voodoofish430 has joined #ruby
pablo_ has quit [Quit: Ex-Chat]
<lllllalexanderll> i have a variable... in the variable is the number "10" ,,, how can i hold the number 10 in the variable and invert the variable to a string ?
Spechal has joined #ruby
roolo has quit [Quit: Linkinus - http://linkinus.com]
niku4i has quit [Remote host closed the connection]
<Spechal> I am using Net::SSH and trying to change directories on a Linux box ... this doesn't work due to cd being a built in shell command ... I found a mail thread that said to use Dir#chdir, but I am not sure how to implement it as I though it was the the local file system
<Spechal> Does anyone have an idea?
nbit001 has joined #ruby
<nbit001> hello everyone
[eko] has quit [Ping timeout: 244 seconds]
nbit001 has quit [Client Quit]
dawe has joined #ruby
Synthead has quit [Ping timeout: 244 seconds]
<Hanmac> lllllalexanderll var.to_s ?
lxsameer has quit [Quit: Leaving]
<dawe> what is best book for a beginner ?
CannedCorn has quit [Read error: Operation timed out]
shruggar has quit [Ping timeout: 248 seconds]
<dawe> someone help :(
<workmad3> PigDude: https://gist.github.com/2712594 <-- there we go, complete rack app for heroku ;) and online here: http://deep-waterfall-5668.herokuapp.com/
Eldariof-ru has joined #ruby
stephenjudkins has joined #ruby
mrsolo has joined #ruby
bluenemo has joined #ruby
<Spechal> fowl, thanks!
<lllllalexanderll> variable.to:s i did
dawe has left #ruby [#ruby]
keithcelt has joined #ruby
roolo has joined #ruby
eko has joined #ruby
eko has quit [Changing host]
eko has joined #ruby
Zifre has joined #ruby
Zifre has quit [Changing host]
Zifre has joined #ruby
Zifre has quit [Disconnected by services]
Zifre has joined #ruby
Zifre has quit [Changing host]
Zifre has joined #ruby
Zifre is now known as Guest90260
lllllalexanderll has quit [Quit: WeeChat 0.3.7]
mneorr has quit [Remote host closed the connection]
anax has joined #ruby
eywu has quit [Quit: Leaving.]
shruggar has joined #ruby
eywu has joined #ruby
kish has quit [Remote host closed the connection]
thecreators has joined #ruby
Synthead has joined #ruby
minijupe has quit [Quit: minijupe]
h4mz1d has joined #ruby
Guest90260 is now known as ZifreCL
kenichi has quit [Remote host closed the connection]
wmoxam has joined #ruby
fayimora has joined #ruby
compara20 has joined #ruby
fayimora has quit [Remote host closed the connection]
fayimora has joined #ruby
berserkr has joined #ruby
stkowski has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
luxurymode has quit [Ping timeout: 260 seconds]
carloslopes has quit [Ping timeout: 252 seconds]
hynkle has quit [Read error: Connection reset by peer]
hynkle has joined #ruby
rorymckinley2 has quit [Ping timeout: 260 seconds]
brasten has joined #ruby
<fayimora> Hey guys, can i make this code(http://pastie.org/3921703) any simpler? I want an array of entries containing one per day
rorymckinley2 has joined #ruby
Guest83564 has quit [Ping timeout: 260 seconds]
kish has joined #ruby
mikey has joined #ruby
mneorr has joined #ruby
mikey is now known as Guest51338
mneorr has quit [Read error: Connection reset by peer]
<fayimora> The one below is my solution but apparently I can do better
h4mz1d has quit [Ping timeout: 260 seconds]
<deryl> fayimora, dude, you've been told so many times that hitting multiple channels at the same time ir flat out rude and in most cases will stop you from getting th ehel you want
roolo has quit [Quit: Linkinus - http://linkinus.com]
<shevy> fayimora your code is perfect
<shevy> there is no way to make it simpler
<fayimora> deryl: was never told that :( Anyways sorry bout that.. I didn't know people would be in both ruby channels at the same time..
<fayimora> shevy: Hmmm I guess ma friend is just toying with me.. Thanks
<deryl> dude, radar told you, i told you, spaceghost told you, davidcellis told you, how many do i have to name?
<fayimora> deryl: My brother uses my account.. Some of my friends do too.. Definitely wasn't me..anyways its all good
n1x has quit [Read error: Operation timed out]
<Veejay> Right now some dude is using your account too
<Veejay> And he's got some nerve
<Veejay> Thinking deryl is a fucking idiot
<deryl> hehe
<deryl> i can deal with that :)
jjxtsys has joined #ruby
kichawa has joined #ruby
<kichawa> hi folks
robotmay has joined #ruby
anax has quit [Ping timeout: 256 seconds]
indian has joined #ruby
neil__ has quit [Remote host closed the connection]
neersighted|AFK is now known as neersighted
fayimora has quit [Quit: Busy…..zzzzz]
pu22l3r has joined #ruby
fayimora has joined #ruby
c0rn has joined #ruby
brasten has quit [Quit: brasten]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
cjk101010 has quit [Ping timeout: 252 seconds]
banseljaj is now known as imami|afk
brasten has joined #ruby
kaneda_ has quit [Ping timeout: 252 seconds]
kaneda_ has joined #ruby
<geekbri> How does one take a gem down from rubygems.org?
mengu has quit [Quit: Konversation terminated!]
<Mon_Ouie> All you can do is yanking the gem AFAIK
<geekbri> I accidentally made a spelling error in the gemspec so its named improperly... whoops! :X
philcrissman has joined #ruby
h4mz1d has joined #ruby
heftig has joined #ruby
imami|afk is now known as banseljaj
shruggar has quit [Ping timeout: 272 seconds]
tvw has joined #ruby
cjk101010 has joined #ruby
alek_b_ has joined #ruby
ChampS666 has quit []
bbttxu has joined #ruby
LowValueTarget has joined #ruby
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
alek_b has quit [Read error: Operation timed out]
anax has joined #ruby
mohits has quit [Ping timeout: 245 seconds]
mneorr has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
mneorr has quit [Read error: Connection reset by peer]
<lectrick> So my method takes an *args, right? And those args might be hashes or strings. Should I generally make sure I don't modify whatever args points to? In other words, minimize side effects at the cost of memory?
<kichawa> i'd like use ruby like virtualenv in python
headius has quit [Quit: headius]
carloslopes has joined #ruby
mneorr has joined #ruby
<kichawa> so RVM is the best way ?
mneorr has quit [Read error: Connection reset by peer]
<heftig> lectrick: yes.
<oooPaul> rvm seems to be the most popular way to have self-contained ruby installations.
<heftig> I would, at least
<Hanmac> lectrick you could dup your args
<geekbri> rbenv is fairly popular as well
mneorr has joined #ruby
<Hanmac> kichawa whats your OS?
Xtek has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
mneorr has quit [Read error: Connection reset by peer]
<lectrick> heftig: Hanmac: Thanks. Yes, I could dup.
<kichawa> Hanmac: ubu 10.04
sohocoke has quit [Quit: sohocoke]
<kichawa> id like to test new redmine 2.0
<Hanmac> kichawa: you could also use "update-alternatives --config ruby"
<kichawa> every time i forgot how use rvm :<
nilg` has quit [Remote host closed the connection]
alek_b has joined #ruby
Guest__ has joined #ruby
<Guest__> hi
Guest__ is now known as shellox_
sbanwart has joined #ruby
xaq has joined #ruby
jjxtsys has quit [Ping timeout: 240 seconds]
<shellox_> anyone around
mneorr has joined #ruby
<shellox_> i try to connect to an irc server..
mneorr has quit [Read error: Connection reset by peer]
<Spechal> fowl, I've used gem install net-ssh-shell and now I get Unable to activate net-ssh-shell-0.2.0, because net-ssh-2.3.0 conflicts with net-ssh (~> 2.1.0) (Gem::LoadError) ... is there a file I need to edit to allow net-ssh 2.3?
<shellox_> i don't get an error message and have no idea why it doesn't connect..
EzeQL has joined #ruby
alek_b_ has quit [Ping timeout: 244 seconds]
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
sebastorama has joined #ruby
mneorr has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
alek_b_ has joined #ruby
bgupta has joined #ruby
jackiechan0 has quit [Ping timeout: 248 seconds]
<fowl> Spechal, no idea, that repo hasnt been updated in 11 months
beneggett has joined #ruby
vertroa has quit [Read error: Connection reset by peer]
<fowl> if there are no api changes you can just edit the spec to your version
kenichi has joined #ruby
sebastorama has quit [Read error: Connection reset by peer]
<fowl> maybe there is a more up to date repo tho
vertroa has joined #ruby
ananthakumaran has left #ruby [#ruby]
azm has joined #ruby
alek_b has quit [Ping timeout: 245 seconds]
sebastorama has joined #ruby
sebastorama has quit [Read error: Connection reset by peer]
sebastorama has joined #ruby
jackiechan0 has joined #ruby
jackiechan0 has quit [Client Quit]
LBRapid has quit [Read error: Connection reset by peer]
shruggar has joined #ruby
jackiechan0 has joined #ruby
blacktulip has joined #ruby
HashNuke has joined #ruby
<HashNuke> hey everyone.
<HashNuke> IS the Ruby documentation available is a queryable form? JSON API, etc I want to try creating an experimental interface for the docs.
vertroa has quit [Read error: Connection reset by peer]
<Hanmac> HashNuke you may want "ri" ?
<HashNuke> thanks. I'll check it out and see if it's parsable.
snearch has joined #ruby
LBRapid has joined #ruby
cyb3r3li0g has joined #ruby
jjxtsys has joined #ruby
ddv has joined #ruby
prometheus has joined #ruby
cyb3r3li0g has quit [Max SendQ exceeded]
jonathanwallace has joined #ruby
<iamjarvo> is there a downloadable copy of the bastards book of ruby
minijupe has joined #ruby
CannedCorn has joined #ruby
tayy has quit [Remote host closed the connection]
schaerli has joined #ruby
robacarp_ has joined #ruby
sbanwart has quit [Remote host closed the connection]
anax has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
macer1 has quit [Quit: No Ping reply in 180 seconds.]
macer1 has joined #ruby
geers has joined #ruby
shellox_ is now known as shellox
sbanwart has joined #ruby
cads has joined #ruby
european-guy has left #ruby [#ruby]
<Spechal> fowl, thanks anyways, I decided to use Rye and it is working perfectly so far
greyEAX has quit [Quit: Leaving]
lkba has quit [Quit: Bye]
lkba has joined #ruby
Doppp has joined #ruby
minijupe has quit [Quit: minijupe]
jeebster1 has joined #ruby
HashNuke has quit [Quit: HashNuke]
minijupe has joined #ruby
greyEAX has joined #ruby
jeebster has quit [Ping timeout: 245 seconds]
mengu has joined #ruby
Doppp has quit [Client Quit]
Doppp has joined #ruby
PigDude has left #ruby [#ruby]
jaystay has quit [Quit: jaystay]
zacstewart has quit [Ping timeout: 272 seconds]
jackbrownhf has joined #ruby
jackiechan0 has quit [Read error: No route to host]
zacstewart has joined #ruby
jackbrownhf is now known as jackiechan0
headius has joined #ruby
jackiechan0 has quit [Client Quit]
elliot98 has quit [Remote host closed the connection]
jackiechan0 has joined #ruby
IrishGringo has joined #ruby
adamkittelson has quit [Ping timeout: 240 seconds]
Doppp has quit [Quit: leaving]
d3c has joined #ruby
todd-salesloft has joined #ruby
todd-salesloft has left #ruby [#ruby]
elliot98 has joined #ruby
jaystay has joined #ruby
seivan has quit [Remote host closed the connection]
the-newsman has joined #ruby
<the-newsman> hello guys
Zolrath has joined #ruby
toddw has joined #ruby
<the-newsman> is there any good refernce for writing exploits in ruby ?
geers has quit [Ping timeout: 244 seconds]
brianpWins has joined #ruby
martman has joined #ruby
greyEAX has quit [Quit: Leaving]
ghanima has joined #ruby
greyEAX has joined #ruby
davidcelis has quit [Remote host closed the connection]
<martman> im trying to read in a file and change just a small portion of it, if i find something: https://gist.github.com/2713401
davidcelis has joined #ruby
<martman> what im trying to add is multiple lines, but all im seeing is the very last one
hynkle has quit [Quit: hynkle]
geers has joined #ruby
hynkle has joined #ruby
<martman> anyone mind taking a look
nfk has quit [Quit: yawn]
elliot98 has quit [Ping timeout: 272 seconds]
neil__ has joined #ruby
<martman> ?
elliot98 has joined #ruby
<davidcelis> ?
vipaca has joined #ruby
vipaca has quit [Changing host]
vipaca has joined #ruby
Guest81769 has joined #ruby
<martman> was trying to con someone into looking at this https://gist.github.com/2713401
nfk has joined #ruby
geers has quit [Ping timeout: 255 seconds]
<fowl> "line1"\
<fowl> "line2"
yxhuvud has quit [Ping timeout: 250 seconds]
nanderoo has quit [Quit: Leaving.]
tatsuya_o has joined #ruby
<martman> sweet, thanks
zeromodulus has joined #ruby
robotmay has quit [Remote host closed the connection]
LowValueTarget has quit [Quit: Linkinus - http://linkinus.com]
jackiechan0 has quit [Quit: Sto andando via]
jackiechan0 has joined #ruby
mdhopkins has joined #ruby
zommi_ has quit [Remote host closed the connection]
<Mon_Ouie> Or use heredocs
danielvdotcom has joined #ruby
<shellox> is there something like an except lib for tcp in ruby?
<shellox> i use socket to connect the irc server now
<shellox> and i have to use sleep, because I have to wait for the server
Eldariof59-ru has joined #ruby
<shellox> isn't there something better to do this?
heoa has left #ruby [#ruby]
looopy has joined #ruby
Eldariof-ru has quit [Ping timeout: 245 seconds]
greyEAX has quit [Remote host closed the connection]
elliot98 has quit [Remote host closed the connection]
jaystay has left #ruby [#ruby]
jaystay has joined #ruby
kylemcgill has quit [Remote host closed the connection]
greyEAX has joined #ruby
SirFunk has quit [Quit: ZNC - http://znc.in]
davidpk has quit [Quit: Computer has gone to sleep.]
SirFunk has joined #ruby
IPGlider has quit []
dhaskew has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
schaerli has quit [Read error: Connection reset by peer]
schaerli has joined #ruby
king535 is now known as king313
sh1ps has joined #ruby
sh1ps has left #ruby [#ruby]
luckyruby has joined #ruby
<ThatDudeGuy_> shellox: sorry, i'm not familiar with except lib. are you looking for a way to respond to socket events through a callback-ey mechanism?
emmanuel__ has joined #ruby
pawdro has quit [Remote host closed the connection]
zeromodulus has quit [Remote host closed the connection]
Eldariof59-ru has quit []
noganex has quit [Ping timeout: 272 seconds]
Watcher7 has joined #ruby
gp5st has joined #ruby
vipaca has quit [Quit: Leaving...]
aruntomar has quit [Quit: Leaving]
geers has joined #ruby
Squarepy has quit [Quit: Leaving]
noganex has joined #ruby
<gp5st> hello. I have a gem that just errors when i try to install it (ERROR: While executing gem ... (NoMethodError) undefined method `call' for nil:NilClass). where can i look for what's wrong? the gem in question is knife-windows
krz has joined #ruby
<carloslopes> gp5st: paste all error stack in pastebin or something similar, it's better to check what's happening
<gp5st> actually, i think the problem is em-winrm
<gp5st> carloslopes: that's the problem, i don't have a stack. what i pasted is all i see
RegEchse has joined #ruby
shellox has quit [Quit: Computer has gone to sleep.]
looopy has quit [Remote host closed the connection]
looopy has joined #ruby
geers has quit [Ping timeout: 244 seconds]
<martman> when your iterating over something like IO.readlines('/etc/network/interfaces').map do |line|
<martman> is there anyway way to skip the next 3 lines?
<martman> like check for a conidtion and if its true skip next 3 lines
Vainoharhainen has joined #ruby
<carloslopes> gp5st: hmmm it's weird.. :/
bgupta has quit [Remote host closed the connection]
<fowl> martman, 10.times.map { |x| next if x > 5; x }
<gp5st> carloslopes: yeah:( so i'm digging through the dependencies, and it seems winrm is the dependency that's causing it?
Jackneill has quit [Read error: Connection reset by peer]
cbuxton1 has quit [Quit: Leaving.]
looopy has quit [Remote host closed the connection]
macer1 has quit [Read error: Operation timed out]
mdw has joined #ruby
fr0gprince_mac has joined #ruby
schaerli has quit [Remote host closed the connection]
macer1 has joined #ruby
mucker has quit [Quit: leaving]
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Kyle__ is now known as Kyle_changing
<gp5st> so yeah, i installed all the dependencies for winrm and it gives me the undef method call for nil when i try to install it
the-newsman_ has joined #ruby
Kyle_changing has left #ruby [#ruby]
the-newsman has quit [Read error: Connection reset by peer]
the-newsman_ is now known as the-newsman
robotmay has joined #ruby
<gp5st> does gem keen a detailed error log somewhere?
jmeeuwen has quit [Ping timeout: 272 seconds]
elliot98 has joined #ruby
<gp5st> or like, what would i do to install a gem by hand?
kylemcgill has joined #ruby
jackiechan0 has quit [Ping timeout: 248 seconds]
macer1 has quit [Ping timeout: 240 seconds]
<jlogsdon> gp5st: gem install gemname. gems do not keep detailed logs by default, there would have to be support in the gem for it
<jlogsdon> manual install is not recommended
jackiechan0 has joined #ruby
Telg has quit [Ping timeout: 272 seconds]
<gp5st> jlogsdon: i'd guess it wouldn't be, but all i'm getting is ERROR: While executing gem ... (NoMethodError) undefined method `call' for nil:NilClass
<gp5st> as the error
<jlogsdon> is there a stack trace with the failure?
albemuth has quit [Quit: Leaving...]
albemuth has joined #ruby
<carloslopes> gp5st: i'm surprised that there are no error stack.. only this message :/
<gp5st> jlogsdon: no, that's all i see:(
<gp5st> ditto
the-newsman has left #ruby [#ruby]
ephemerian has joined #ruby
<gp5st> it's ruby 1.9.2 and gem 1.3.7 all from the debian repos
<jlogsdon> does the gem support 1.9.2? i dont see any requirements :|
<gp5st> my guess is that i'm missing a system library prequ
<gp5st> it says greater than 1.9.1
<jlogsdon> ok
ringotwo_ has joined #ruby
<jlogsdon> nah, you'd get an error before that if it was a system library
<jlogsdon> it seems like gem might be expecting a proc (or the gem instelf, not ruby gems) somewhere
adamkittelson has joined #ruby
<jlogsdon> do gem install winrm --backtrace
<jlogsdon> that will give you a full error stack
<gp5st> % sudo gem install winrm --backtrace
<gp5st> ERROR: While executing gem ... (NoMethodError)
<gp5st> undefined method `call' for nil:NilClass
ymasory has quit [Ping timeout: 272 seconds]
<jlogsdon> that's it?
<jlogsdon> wow
<jlogsdon> oh there we go :)
<gp5st> sorry, forgot which bugger it was in for a second
<gp5st> buffer*
gosshedd has quit [Ping timeout: 244 seconds]
dnyy has joined #ruby
TorpedoSkyline has joined #ruby
snearch has quit [Quit: Verlassend]
<jlogsdon> oh ho ho
ringotwo has quit [Ping timeout: 244 seconds]
<jlogsdon> gp5st: are you using bundler to install? OR specifying a version?
<gp5st> no and no
sebastorama has quit [Quit: Computer has gone to sleep.]
<jlogsdon> super strange
ringotwo_ has quit [Ping timeout: 245 seconds]
<gp5st> sudo gem install winrm
<gp5st> is the command i'm using
<jlogsdon> basically, the issue is that rubygems is getting an invalid version matcher (~>, >=, etc...)
<gp5st> should i spec a version
<jlogsdon> each one has an associated proc
<jlogsdon> and it's failing at that
<jlogsdon> so somewhere a version is being specified wrong
<martman> im in a IO.readlines block where the output of my first line in the block is being written out. i do not want this for the first line, only the others
<jlogsdon> let me see if it fails for me
<gp5st> is the gemspec file
<martman> is there anyway to "mark" this
<jlogsdon> the gemspc looks fine
<jlogsdon> and it installed fine for me D:
<gp5st> :(
<jlogsdon> I also use rbenv and instead of ruby from apt or wahtever
<gp5st> this is my local machine, so i can't just blow away the vm:-/
h4mz1d has quit [Ping timeout: 245 seconds]
<jlogsdon> what gem version?
<jlogsdon> gem --version
<jlogsdon> rubygems*
jeebster1 has left #ruby [#ruby]
<gp5st> 1.3.7
<jlogsdon> ahhhhhhhhhhh
<jlogsdon> no wonder
<jlogsdon> do gem update --system
<gp5st> ?
<jlogsdon> 1.8.x is the latest
<jlogsdon> 1.3.7 is hella old
<gp5st> The Debian-supported way to update rubygems is through apt-get, using Debian official repositories.
<gp5st> If you really know what you are doing, you can still update rubygems by setting the REALLY_GEM_UPDATE_SYSTEM environment variable, but please remember that this is completely unsupported by Debian.
<gp5st> :: bangs head on desk ::
jmeeuwen has joined #ruby
<jlogsdon> okay
<gp5st> i'll take the unsupported route
<jlogsdon> fuck that
<gp5st> lol
<jlogsdon> package managers generally blow for ruby versions
<gp5st> yeah, i used to use rvm all the time
<jlogsdon> (oh you want to use actually working versions? loooool)
<jlogsdon> rvm works, i guess. but i hate how it hijacks your shell commands (cd)
<gp5st> but figured i'd try to package since it has 1.9.2 in it now
<jlogsdon> rbenv is much cleaner
<jlogsdon> anyway if you use either one you should be fine
<jlogsdon> the issue is almost definitely your rubygems version
<gp5st> ok, 1.8.24
nfluxx has quit [Read error: Connection reset by peer]
<gp5st> well, it got further
nfluxx has joined #ruby
<jlogsdon> thats a good sign
<gp5st> thank you so very much
<jlogsdon> no problemo. good luck~
ymasory has joined #ruby
d3c has quit [Read error: Connection reset by peer]
shruggar has left #ruby [#ruby]
geers has joined #ruby
Telg has joined #ruby
keanehsia has joined #ruby
keanehsiao has quit [Ping timeout: 244 seconds]
<gp5st> yeah, that was it
<gp5st> thank you
fbernier has quit [Ping timeout: 272 seconds]
afallows has quit [Ping timeout: 244 seconds]
mstratman has quit [Quit: mstratman]
zeromodulus has joined #ruby
workmad3 has quit [Quit: leaving]
asteros has joined #ruby
jcromartie has quit [Quit: jcromartie]
mikepack has quit [Read error: Connection reset by peer]
digitalcakestudi has quit [Ping timeout: 240 seconds]
BrokenCog has quit [Quit: leaving]
mikepack has joined #ruby
BHSPitMonkey has joined #ruby
asteros has left #ruby [#ruby]
geekbri has quit [Remote host closed the connection]
minijupe has quit [Quit: minijupe]
vitor-br has quit [Ping timeout: 272 seconds]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
jaystay has quit [Quit: jaystay]
vertroa has joined #ruby
BrokenCog has joined #ruby
CannedCorn has quit [Quit: Computer has gone to sleep.]
jrist is now known as jrist-afk
Telg has quit [Ping timeout: 272 seconds]
stewart_ has joined #ruby
h4mz1d has joined #ruby
showy has quit [Read error: Operation timed out]
dustybrains has quit [Quit: leaving]
sepp2k1 has joined #ruby
indian has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
carloslopes has quit [Quit: Leaving]
Spechal has quit [Quit: Leaving]
sepp2k has quit [Ping timeout: 272 seconds]
malkomalko has joined #ruby
geers_ has joined #ruby
jaystay has joined #ruby
zacstewart has quit [Ping timeout: 252 seconds]
LBRapid has quit [Quit: Farewell...]
zacstewart has joined #ruby
geers has quit [Ping timeout: 250 seconds]
geers_ is now known as geers
Icehawk78 has joined #ruby
<Icehawk78> Is this the right place to ask questions regarding the usage of the SQLite3 gem?
macmartine has quit [Quit: macmartine]
dekroning has joined #ruby
mneorr has joined #ruby
cmarques has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
danielvdotcom has quit [Quit: danielvdotcom]
gp5st has quit [Ping timeout: 272 seconds]
iamjarvo has quit [Quit: Leaving.]
Telg has joined #ruby
v0n has quit [Quit: Quitte]
jaystay has quit [Quit: jaystay]
amalvagomes has quit [Quit: amalvagomes]
tommyvyo has joined #ruby
tommyvyo has quit [Client Quit]
ConstantineXVI has joined #ruby
b1rkh0ff has quit [Read error: Operation timed out]
mrwalker has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
IrishGringo has quit [Ping timeout: 244 seconds]
hynkle has quit [Quit: hynkle]
b1rkh0ff has joined #ruby
neil__ has quit [Remote host closed the connection]
stephenjudkins has quit [Quit: stephenjudkins]
<Tasser> Icehawk78, context?
<Icehawk78> Tasser: I'm trying to figure out whether or not I can create an in statement (ie "select * from table where id in(x, y, z)") without looping over the array of values I want to pass in.
alek_b has joined #ruby
<Icehawk78> I've tried what seemed obvious to me (db.query('select * from table where id in ?', array_variable) and db.query('select * from table where id in (?)', array_variable)
cyb3r3li0g has joined #ruby
<Icehawk78> Neither of which worked. And the first few web searches I've done have been fairly fruitless.
schaerli has joined #ruby
<Tasser> Icehawk78, I suggest a library like sequel
<Tasser> it's a bit more ruby
oliwer has quit [Quit: Coyote finally caught me]
<Icehawk78> Oh, huh. Did not know that existed. I'll look into that, thanks.
<Veejay> Does Ruby have something to the effect of group_and_inject? i.e. combining the grouping and processing of the grouped values?
alek_b_ has quit [Ping timeout: 244 seconds]
<Icehawk78> Veejay: Grouping how?
cbuxton has joined #ruby
jayrulez has joined #ruby
<Veejay> Icehawk78: Say you have an array of objects, group_by would group those objects in buckets depending on a grouping block
<Veejay> Now a common pattern that's emerged in my code is grouping and then reducing/injecting each bucket
<Veejay> So I was wondering if there's something baked in Ruby that would facilitate that kind of processing for me
azm has quit [Ping timeout: 244 seconds]
<Tasser> Icehawk78, there are also more sophisticated libraries like activerecord and datamapper
<Veejay> If there isn't I'll code one
<Tasser> Veejay, #group_by {}.each {|by, group| }
<Icehawk78> Tasser: Yeah, I'm familiar with those, but for what I'm working with, that's more overhead than I really need. I've just got a simple 2-3 table sqlite db for data persistence.
zeromodulus has quit [Remote host closed the connection]
<Tasser> ThatDudeGuy_, sequel probably :-)
<Icehawk78> So the sequel gem looks like it should work. Thanks!
<Veejay> Tasser: Yeah that's the pattern I'm already using, I don't know what I was looking for really, it's simple enough
<Veejay> Thanks a lot man
<Tasser> Veejay, sometimes people just need to be hit with a bat ;-)
jrbing has quit [Quit: jrbing]
berserkr has quit [Quit: Leaving.]
tsou has joined #ruby
etehtsea has quit []
ubercore has quit [Ping timeout: 245 seconds]
axl_ has quit [Read error: Connection reset by peer]
Guest81769 has quit [Ping timeout: 244 seconds]
axl_ has joined #ruby
ryanf has joined #ruby
brasten has quit [Quit: brasten]
Gavilan has joined #ruby
wvms has joined #ruby
TandemAdam has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
brasten has joined #ruby
wangr has quit [Remote host closed the connection]
nlc has joined #ruby
ackz has joined #ruby
wmoxam has quit [Quit: leaving]
Dreamer3 has quit [Quit: Leaving...]
greyEAX has quit [Quit: Leaving]
keithcelt has quit [Remote host closed the connection]
greyEAX has joined #ruby
keithcelt has joined #ruby
ddv has quit [Quit: *poof*]
robbyoconnor has joined #ruby
xaq has quit [Remote host closed the connection]
indian has joined #ruby
Ontolog has joined #ruby
headius has quit [Quit: headius]
ackz has quit [Quit: Leaving...]
SQLStud has joined #ruby
BeLucid has quit [Read error: Connection reset by peer]
kuranai|off is now known as kuranai
vitor-br has joined #ruby
robbyoconnor has quit [Ping timeout: 272 seconds]
dankest has joined #ruby
stephenjudkins has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
banjara1 has joined #ruby
bbttxu has quit [Quit: bbttxu]
jimeh has quit [Ping timeout: 265 seconds]
cbuxton has quit [Ping timeout: 240 seconds]
malkomalko has quit [Remote host closed the connection]
amalvagomes has joined #ruby
dangerousdave has quit [Quit: Leaving...]
h4mz1d has quit [Ping timeout: 255 seconds]
cbuxton has joined #ruby
chson has quit [Remote host closed the connection]
yoklov has joined #ruby
mneorr has quit [Remote host closed the connection]
ymasory has quit [Quit: Ex-Chat]
kirun has quit [Quit: Client exiting]
Norrin__ has joined #ruby
delinquentme has joined #ruby
<delinquentme> so I've just noticed an interesting happening which I'm kind of curious about...
compara20 has quit [Read error: Connection reset by peer]
<delinquentme> I've got a string in a method which I pass to another method for processing ...
BeLucid has joined #ruby
<delinquentme> after the called method is finished .. I print out the string once again .. and the string is modified
geers has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
banister_ has joined #ruby
virunga has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
Norrin_ has quit [Ping timeout: 272 seconds]
bglusman has quit [Remote host closed the connection]
asobrasil has left #ruby [#ruby]
berserkr has joined #ruby
bglusman has joined #ruby
bglusman has quit [Read error: Connection reset by peer]
sparrovv has quit [Ping timeout: 245 seconds]
looopy has joined #ruby
kpshek has quit []
kuranai is now known as kuranai|off
<delinquentme> example: https://gist.github.com/2714505
<delinquentme> that qualifies as weird to me
<delinquentme> anyone else?
blacktulip has quit [Remote host closed the connection]
jayrulez has quit [Ping timeout: 252 seconds]
cs[tc] has quit [Ping timeout: 250 seconds]
cs[tc] has joined #ruby
ph^ has quit [Remote host closed the connection]
dekroning has quit [Ping timeout: 244 seconds]
davidcelis has quit [Ping timeout: 260 seconds]
ph^ has joined #ruby
dv310p3r has quit [Ping timeout: 272 seconds]
mengu has quit [Read error: Connection reset by peer]
davidcelis has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
ph^ has quit [Ping timeout: 245 seconds]
showy has joined #ruby
eph3meral has joined #ruby
Ontolog has quit [Remote host closed the connection]
sparrovv has joined #ruby
tvw has quit [Read error: Connection reset by peer]
martman has quit [Ping timeout: 245 seconds]
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
<Mon_Ouie> It's not weird, Ruby doesn't copy object you pass as an argument
<Mon_Ouie> So if you mutate it, it affects the initial object since it's the same one
<Mon_Ouie> Usually, you should just avoid mutating arguments
<delinquentme> but what about the namespace?
Vainoharhainen has quit [Quit: Leaving...]
h4mz1d has joined #ruby
<delinquentme> once its inside the bar method its modifying a completely different namespace no?
<Mon_Ouie> What does it have to do with namespace?
<delinquentme> variable name?
<Mon_Ouie> It's the same object, regardless
<delinquentme> hmm
banister_ has quit [Read error: Connection reset by peer]
<Mon_Ouie> if you p s.object_id in both method, you can see they're the same
davidpk has joined #ruby
iamjarvo has joined #ruby
<delinquentme> yeah i just did :D
<delinquentme> HMMMMMM
<delinquentme> Mon_Ouie, is there some bigger knowledge that I should be seeing here?
<Mon_Ouie> I'm not sure
<delinquentme> other than "strings are mutable in ruby" and passed variables aren't copies ... they're the same objects with different names
<Mon_Ouie> You should know a.gsub!(…, …) and a += 3 are completely different, though
<delinquentme> lol
<delinquentme> ok check
<Mon_Ouie> Since the latter will change the variable
<Mon_Ouie> As opposed to the object
banisterfiend has joined #ruby
<delinquentme> wait += 3
<delinquentme> ok no I thought that was a silly joke ... I see where im using gsub!()
<delinquentme> but where does this +=3 stuff come in?
philcrissman has quit [Remote host closed the connection]
minijupe has joined #ruby
<Mon_Ouie> def bar(s); s << "foo"; end
<Mon_Ouie> def bar(s); s += "foo"; end
PaciFisT has quit [Read error: Connection reset by peer]
<Mon_Ouie> Use those two methods instead of your bar, and see the difference
jjxtsys has quit [Ping timeout: 272 seconds]
jjxtsys has joined #ruby
jayrulez has joined #ruby
fragrant has joined #ruby
cs[tc] has quit [Ping timeout: 244 seconds]
<fragrant> Is recursion function available in ruby?
cs[tc] has joined #ruby
<delinquentme> fragrant, you can make it recurse?
jchauncey has quit [Quit: jchauncey]
<sepp2k1> fragrant: You can write recursive methods in ruby.
<UNIXgod> fragrant: you can call a function inside a funcion
<delinquentme> def recurse(r); recurse(s); end
<sepp2k1> delinquentme: No such method or variable: s
<UNIXgod> fragrant: you can create forkbombs also =)
fragrant has left #ruby [#ruby]
<delinquentme> sepp2k1, haha yeah you need to give it input
<sepp2k1> Hm?
marcus has joined #ruby
<marcus> hello people
<UNIXgod> oops ^^ meant for @fragrant
marcus has quit [Client Quit]
MasterIdler_ has joined #ruby
* UNIXgod #ruby-lang is a ghost_town
MasterIdler_ has quit [Client Quit]
carloshpf has joined #ruby
b1rkh0ff has quit [Read error: Operation timed out]
mvangala has joined #ruby
v0n has joined #ruby
MasterIdler has quit [Ping timeout: 265 seconds]
ConstantineXVI has quit [Remote host closed the connection]
fr0gprince_mac has quit [Quit: Leaving...]
tomzx has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
sparrovv has quit [Ping timeout: 265 seconds]
Squarepy has quit [Quit: Leaving]
rasbonics has quit [Quit: rasbonics]
fr0gprince_mac has joined #ruby
fr0gprince_mac has quit [Client Quit]
iamjarvo has quit [Quit: Leaving.]
nari has joined #ruby
iamjarvo has joined #ruby
<Mon_Ouie> UNIXgod: The reason autocompletion didn't work is, fragrant left :p
dhaskew has quit [Read error: Connection reset by peer]
cbuxton has quit [Ping timeout: 245 seconds]
dhaskew has joined #ruby
C0deMaver1ck has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 240 seconds]
panpainter has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
mikepack has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
rushed has quit [Quit: rushed]
greyEAX has quit [Remote host closed the connection]
mdw has quit [Remote host closed the connection]
jjxtsys has quit [Remote host closed the connection]
perryh_away is now known as perryh
king313 has quit [Quit: .]
minijupe has quit [Quit: minijupe]
brasten has quit [Quit: brasten]
greyEAX has joined #ruby
piotr_ has quit [Ping timeout: 272 seconds]
mdw has joined #ruby
skogis has quit [Read error: Operation timed out]
fukushima has joined #ruby
jgarvey has quit [Quit: Leaving]
Ontolog has joined #ruby
fukushim_ has quit [Ping timeout: 256 seconds]
jayrulez has quit [Ping timeout: 265 seconds]
peterhil` has quit [Ping timeout: 252 seconds]
uris has quit [Quit: leaving]
kevinbond has joined #ruby
schaerli has quit [Remote host closed the connection]
looopy has quit [Remote host closed the connection]
jimeh has joined #ruby
MissionCritical has quit [Ping timeout: 256 seconds]
greyEAX has quit [Remote host closed the connection]
SQLStud has quit [Quit: Leaving]
looopy has joined #ruby
sonkei has quit [Quit: WeeChat 0.3.7]
Plas has joined #ruby
baroquebobcat has quit [Ping timeout: 244 seconds]
<Plas> What's the best book on Ruby for someone who's never programmed?
<jlogsdon> Metaprogramming Ruby. ready? Go!
<jlogsdon> j/k.
sonkei has joined #ruby
axl_ has quit [Ping timeout: 244 seconds]
greyEAX has joined #ruby
<UNIXgod> Mon_Ouie: I figured so. I have become to dependant on \t
peterhil` has joined #ruby
banjara1 has quit [Quit: Leaving.]
stkowski has quit [Quit: stkowski]
<Plas> jlogsdon - Are any of the Pragmatic books good for non-programmers?
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
BHSPitMonkey has quit [Quit: Leaving.]
mengu has quit [Read error: Connection reset by peer]
<UNIXgod> Plas: I would hit up the web for that. Ruby is a great second language. Metaprogramming Ruby is a good book on ruby for programmers.
zeromodulus has joined #ruby
<UNIXgod> Plas: also note that pragprog books are out of date sooner than later. In some cases after they hit the printers.
dioms has quit []
mnaser has quit [Read error: Operation timed out]
TheFuzzball has quit [Quit: Leaving...]
Travis-42 has joined #ruby
<Plas> UNIXgod - So you think it would be better to learn another language before getting into Ruby? (Like Python, for instance.)
<Travis-42> Does Ruby's BigDecimal count the negative sign as one of the digits for a specified precision?
keithcelt has quit [Remote host closed the connection]
banseljaj is now known as imami|afk
mnaser has joined #ruby
petercs has quit [Ping timeout: 244 seconds]
<UNIXgod> Plas: maybe. Python was geared to be the new "basic" in the 90's. Search "how to think like a computer scientist" for a decent tutorial.
<UNIXgod> Plas: or this one for ruby may be good: http://ruby.learncodethehardway.org/book/
virunga has quit [Read error: Connection reset by peer]
<UNIXgod> Plas: it's the concepts that matter most ~ not the syntax
minijupe has joined #ruby
robotmay has quit [Remote host closed the connection]
* UNIXgod should write a tutorial entitled: A Paradigm a day (●̮̮̃_•̃)
MissionCritical has joined #ruby
mdw has quit [Remote host closed the connection]
* UNIXgod ☺
mrsolo has quit [Quit: Leaving]
mnaser has quit [Ping timeout: 272 seconds]
albemuth has quit [Quit: Computer has gone to sleep.]
digitalcakestudi has joined #ruby
<Plas> Okay cool, thanks UNIXgod.
<UNIXgod> Plas: np
QKO_ has joined #ruby
<heph> is it possible to get an object reference without using ObjectSpace._id2ref(o.object_id)?
QKO has quit [Ping timeout: 272 seconds]
<heph> it feels like there must be a better way than that
cads has quit [Ping timeout: 255 seconds]
codezombie has joined #ruby
looopy has quit [Remote host closed the connection]
nari has quit [Ping timeout: 244 seconds]
btully has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
oooPaul has quit [Quit: Ciao for now!]
albemuth has joined #ruby
<btully> anyone know why I keep seeing this when i try to run 'gem': /Users/btully/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:154:in `parse': (<unknown>): couldn't parse YAML at line 1 column 7 (Psych::SyntaxError)
<btully> i've tried 3 different version of ruby via rvm and all have the same issue :(
sohocoke has joined #ruby
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
macmartine has joined #ruby
nari has joined #ruby
<Tasser> btully, probably sample line?
<btully> sample line?
mikepack has joined #ruby
iocor has joined #ruby
<btully> i didn't realize ruby was so bogus
yeggeps has joined #ruby