apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
Giorgio has quit [Remote host closed the connection]
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
__Big0__ has quit [Remote host closed the connection]
__Big0__ has joined #ruby
Kuifje has quit [Ping timeout: 250 seconds]
danneu has quit [Ping timeout: 240 seconds]
Guest3957 has quit [Ping timeout: 245 seconds]
ad_r has quit [Ping timeout: 256 seconds]
adT has quit [Ping timeout: 245 seconds]
v0n has quit [Ping timeout: 255 seconds]
rezzack has quit [Quit: Leaving.]
predator217 has joined #ruby
anonymuse has quit [Quit: Linkinus - http://linkinus.com]
grayson has quit [Quit: Computer has gone to sleep.]
julian-delphiki has quit [Ping timeout: 255 seconds]
mikepack has quit [Remote host closed the connection]
digifiv5e has joined #ruby
locriani has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 255 seconds]
digifiv5e is now known as Guest7737
nari has quit [Ping timeout: 245 seconds]
julian-delphiki has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
joshman_ has quit [Ping timeout: 248 seconds]
rupee has quit [Quit: Leaving]
philcrissman has quit [Remote host closed the connection]
ffranz has quit [Quit: Leaving]
reppard has joined #ruby
hbpoison has joined #ruby
takeru has joined #ruby
newUser1234 has joined #ruby
rezzack has joined #ruby
hakunin_ has joined #ruby
takeru has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
markalanevans has quit [Ping timeout: 240 seconds]
hakunin has quit [Ping timeout: 245 seconds]
R_Macy has quit [Quit: Computer has gone to sleep.]
freeayu has joined #ruby
skattyadz has joined #ruby
__Big0__ has quit [Remote host closed the connection]
axhlf has quit [Remote host closed the connection]
tcstar has quit [Remote host closed the connection]
ohcibi_ has joined #ruby
felipe has quit [Ping timeout: 248 seconds]
jso has quit [Ping timeout: 248 seconds]
companion has quit [Ping timeout: 248 seconds]
kstephens has quit [Ping timeout: 248 seconds]
segv has quit [Ping timeout: 248 seconds]
dayepa has quit [Ping timeout: 248 seconds]
malte_ has quit [*.net *.split]
dmiller has quit [*.net *.split]
sk87 has quit [*.net *.split]
Jedi_SCT1 has quit [Ping timeout: 248 seconds]
axxT has quit [*.net *.split]
mattp_ has quit [*.net *.split]
veer has joined #ruby
bigoldrock has quit [*.net *.split]
Ng|Adonixx7148 has joined #ruby
Sigma00 has quit [*.net *.split]
dpn` has quit [*.net *.split]
yugui_zzz has quit [*.net *.split]
Rioji_ has joined #ruby
hogeo has joined #ruby
skattyadz_ has joined #ruby
wildcard1 has quit [*.net *.split]
xerxas has quit [*.net *.split]
trollissimo has joined #ruby
wildcard0 has joined #ruby
wudofyr has quit [*.net *.split]
thomas` has quit [*.net *.split]
ace939 has quit [*.net *.split]
davidboy has quit [*.net *.split]
rakm has quit [*.net *.split]
fuzai has quit [*.net *.split]
Adys has quit [*.net *.split]
hackeron has quit [*.net *.split]
otters has quit [*.net *.split]
pdtpatrick has quit [*.net *.split]
DrForr has quit [*.net *.split]
Gate has quit [*.net *.split]
Derander_ has quit [*.net *.split]
mkillebr1w has quit [*.net *.split]
evxd_ has quit [*.net *.split]
oz has quit [*.net *.split]
flagg0204 has quit [*.net *.split]
m_3 has quit [*.net *.split]
mfridh has quit [*.net *.split]
Muz has quit [*.net *.split]
tommylommykins has quit [*.net *.split]
jbpros has quit [*.net *.split]
ejnahc has quit [*.net *.split]
Guest70723 has quit [*.net *.split]
altivec has quit [*.net *.split]
haxrbyte_ has quit [Read error: Connection reset by peer]
heidar has quit [Read error: Connection reset by peer]
dyeske has quit [Read error: Connection reset by peer]
diegok has quit [*.net *.split]
trollissimo has quit [Ping timeout: 248 seconds]
earthquake has quit [Ping timeout: 248 seconds]
KillerFox has quit [Ping timeout: 248 seconds]
statarb3 has quit [Ping timeout: 276 seconds]
banisterfiend is now known as banister`sleep
robbyoconnor has quit [Ping timeout: 245 seconds]
Rioji has quit [Ping timeout: 248 seconds]
_veer has quit [Disconnected by services]
scrr has quit [Ping timeout: 248 seconds]
ohcibi has quit [Read error: Connection reset by peer]
scrr_ has joined #ruby
haxrbyte has joined #ruby
kstephens has joined #ruby
bricker is now known as bricker`away
woolite64_ has quit [Ping timeout: 248 seconds]
KillerFox has joined #ruby
duosrx has joined #ruby
duosrx has quit [Remote host closed the connection]
skattyadz has quit [Client Quit]
woolite64__ has joined #ruby
skattyadz_ is now known as skattyadz
Coolhand|laptop has joined #ruby
danneu has joined #ruby
companion has joined #ruby
Jedi_SCT1 has joined #ruby
skattyadz has quit [Client Quit]
jso has joined #ruby
segv has joined #ruby
dayepa has joined #ruby
dEPy has quit []
yshh has quit [Remote host closed the connection]
kpshek has joined #ruby
heidar has joined #ruby
enroxorz is now known as ArchBeOS
techlife has quit [Ping timeout: 264 seconds]
karupanerura has quit [Excess Flood]
tubbo has left #ruby [#ruby]
j^2 has quit [Ping timeout: 245 seconds]
freakazoid0223 has joined #ruby
karupanerura has joined #ruby
idkazuma has quit [Remote host closed the connection]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
ebobby has quit [Ping timeout: 260 seconds]
statarb3 has joined #ruby
techlife has joined #ruby
vierja has joined #ruby
dyeske has joined #ruby
sk87 has joined #ruby
malte_ has joined #ruby
mattp_ has joined #ruby
dmiller has joined #ruby
dpn` has joined #ruby
ace939 has joined #ruby
xerxas has joined #ruby
bigoldrock has joined #ruby
davidboy has joined #ruby
Derander_ has joined #ruby
rakm has joined #ruby
pdtpatrick has joined #ruby
otters has joined #ruby
yugui_zzz has joined #ruby
Sigma00 has joined #ruby
mkillebr1w has joined #ruby
DrForr has joined #ruby
oz has joined #ruby
Adys has joined #ruby
hackeron has joined #ruby
thomas` has joined #ruby
evxd_ has joined #ruby
m_3 has joined #ruby
Gate has joined #ruby
fuzai has joined #ruby
wudofyr has joined #ruby
flagg0204 has joined #ruby
diegok has joined #ruby
Guest70723 has joined #ruby
mfridh has joined #ruby
altivec has joined #ruby
tommylommykins has joined #ruby
ejnahc has joined #ruby
jbpros has joined #ruby
Muz has joined #ruby
erratic has joined #ruby
Amnesthesia has quit [Excess Flood]
R_Macy has joined #ruby
vierja has quit [Client Quit]
Amnesthesia has joined #ruby
d2dchat has quit [Remote host closed the connection]
Xeago has joined #ruby
kofno has joined #ruby
Astral_ has joined #ruby
rburton- has quit [Quit: Linkinus - http://linkinus.com]
<mercwithamouth> is it possible to return functions in ruby?
Coolhand|laptop has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 245 seconds]
wormwood has quit [Quit: WeeChat 0.4.0]
danneu1 has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
statarb3 has quit [Ping timeout: 260 seconds]
<MrZYX> mercwithamouth: you probably want to return a proc or lambda instead but you could in theory grab the method object of a function and return that
statarb3 has joined #ruby
mrsolo has quit [Quit: Leaving]
jpfuentes2 has quit [Ping timeout: 260 seconds]
connor_ has joined #ruby
<shevy> mercwithamouth try method(:name)
kofno has quit [Ping timeout: 272 seconds]
<connor_> Hi, any advanced suggestions for tracking a memory leak in Ruby?
baroquebobcat has quit [Quit: baroquebobcat]
<connor_> (I'm currently logging memory and not detecting any delta in my symbol count, no hanging references etc)
<mercwithamouth> shevy: hrmm no dice?
jpfuentes2 has joined #ruby
<mercwithamouth> MrZYX: actually a lamba is probably 100% what i want since that's what i'm doing in scala is called
<shevy> mercwithamouth you'll get a method object
<connor_> banister`sleep: Thanks, checking it out now
<shevy> x = Array.instance_method("pop") # => #<UnboundMethod: Array#pop>
<shevy> string = String.instance_method(:size) # => #<UnboundMethod: String#size>
<banister`sleep> connor_: you'll need to run a patched ruby while you identify the leak
<shevy> def foo;puts "hi";end; method_object = method(:foo); method_object.call # => "hi"
endzyme has joined #ruby
elaptics is now known as elaptics`away
stkowski has quit [Quit: stkowski]
<mercwithamouth> hmm what if i did def foo x = 22 end def blah return method(:foo) end that clearly doesn't work, but how would i go about writing that correctly?
lewix has joined #ruby
<banister`sleep> mercwithamouth: that does work
<connor_> banister`sleep: Ok, I'll dig in. Thanks for passing it along, will update.
etcetera has quit []
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
eka has quit [Quit: Computer has gone to sleep.]
<mercwithamouth> banister`sleep: ahh actually you're right =)
<mercwithamouth> oops...
rupee has joined #ruby
<shevy> mercwithamouth ewww you omit the () you evil person you :(
<MrZYX> I'm interested what could be a valid use case for that?
marr has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
<mercwithamouth> MrZYX: in scala it's more than reasonable when dealing with higher order functions....i just like to take new things that i'm learning and implement them in different languages.
ArchBeOS has left #ruby ["Leaving"]
Roa has quit [Ping timeout: 264 seconds]
otherj has quit []
k3rn3lito has quit [Ping timeout: 264 seconds]
pkrnj has joined #ruby
<MrZYX> still, so when would you do that? in ruby if I need my caller to say which method he should call at a later point I think I'd prefer to give him a symbol of the right name or something like that so he can call send
Spooner has quit [Remote host closed the connection]
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
k3rn3lito has joined #ruby
<mercwithamouth> more than likely
<mercwithamouth> hmm one sec
Targen has quit [Ping timeout: 245 seconds]
jsonperl has quit [Quit: Leaving.]
sailias has joined #ruby
nkr has quit [Quit: Linkinus - http://linkinus.com]
<mercwithamouth> MrZYX: ok a quick example
echobin15 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 264 seconds]
<shevy> what's this do
<MrZYX> if I translate this to ruby I get http://paste.mrzyx.de/show.php?id=1357
<Xeago> shevy: do you ever sleep?
yshh has joined #ruby
Targen has joined #ruby
<shevy> Xeago yeah but only when I am tired :(
<Xeago> timezone?
c0rn has quit [Quit: Computer has gone to sleep.]
<shevy> central europe, but I have to leave here in about 4 hours, so it's not worth to go to bed anymore
<mercwithamouth> http://cl.ly/image/1q340g38121e ok here ya go shevy
<mercwithamouth> you're simply using even to write an odd function as well.
<shevy> mercwithamouth this just returns true or false, or?
pdamer has joined #ruby
huoxito has joined #ruby
<mercwithamouth> shevy: yeah in that particular case it returns a boolean
<MrZYX> I see no method passing there at all, in ruby it would be http://paste.mrzyx.de/show.php?id=1357
<shevy> mercwithamouth what happens if you input this: odd("-24")
bonhoeffer has joined #ruby
samphippen has joined #ruby
<shevy> MrZYX well, you'd have to check for the input type too in ruby, given that scala seems to do it
<mercwithamouth> shevy: http://cl.ly/image/3J0L0r0R2I28
<MrZYX> yeah sure, but I don't think that's the point currently
Honeycomb has joined #ruby
c0rn has joined #ruby
<lsoa> I can define a private method using rb_define_private_method in C. But how do I make 'new' private?
<shevy> mercwithamouth seems to be almost identical to what you can do in ruby, via raise("error: type mismatch: \nfound : etc etc etc..") unless input.is_a? Fixnum, or something like that
Quebert has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<shevy> lsoa does new exist as such? isn't it some *alloc* name instead?
<MrZYX> shevy: mercwithamouth asked how to return a function in ruby, I got interested in a valid use case for that, he came up with that example, which uses no function passing at all :)
sailias has quit [Read error: Connection reset by peer]
<shevy> hehehe
sailias has joined #ruby
<shevy> yeah mercwithamouth
veer is now known as _veer
<shevy> you need something a little bit more complicated than that!
<mercwithamouth> shevy: you would have to do odd("24".toInt)
_veer has quit [Changing host]
_veer has joined #ruby
<MrZYX> mercwithamouth: don't want to offend you or anything, just really curious :)
nari has joined #ruby
icole has joined #ruby
<shevy> mercwithamouth yeah, very similar to ruby too, ruby uses .to_i though which is almost identical (or Integer("24") but that's not as elegant)
<mercwithamouth> MrZYX: same...to be honest this is the first time i've done it. i play with ruby...so i figure in order to learn two styles of coding at the same time once i learn one thing i MUST immediately duplicate it in the other language
rocket- has quit [Ping timeout: 252 seconds]
<shevy> well, you get one line saved with scala of course, as it is part of the method definition
NiteRain has quit [Ping timeout: 246 seconds]
moca has quit [Quit: Leaving]
<shevy> that : Int thing there
<lsoa> shevy: the point is that under ruby I can simply say private_class_method :new in the class definition right? How do I perform the same operation under C
<shevy> hmmm I am not sure how to simulate the same in ruby
julian-delphiki has quit [Quit: Computer has gone to sleep.]
<shevy> I can? I am not sure... let me try that
<lsoa> I don't bind a function to new, I bind one to initialize
<lsoa> and define an alloc function
<shevy> oh cool
<lsoa> but from what I've seen so far, you're not supposed to touch new
<shevy> class Foo; private_class_method :new; end # => Foo; Foo.new # NoMethodError: private method `new' called for Foo:Class
Virunga has quit [Remote host closed the connection]
<shevy> you can!
yshh_ has joined #ruby
<shevy> you can break all classes that way :)
<shevy> well, excluding class methods of course
<shevy> hmmmm
sailias has quit [Client Quit]
skattyadz has joined #ruby
<lsoa> problem is that the C api is not exactly well documented
<shevy> hahaha
<shevy> look lsoa:
reppard has quit [Ping timeout: 276 seconds]
<shevy> class Bar; private_class_method :new; def self.new; puts 'Hi there from Bar'; end;end; Bar.new# Hi there from Bar
yshh has quit [Ping timeout: 272 seconds]
<shevy> it's fake! :D
<mercwithamouth> MrZYX: ehh i have an example coming
pkrnj has quit [Quit: Computer has gone to sleep.]
<lewix> :self.new
icole has quit [Ping timeout: 252 seconds]
taoru has joined #ruby
taoru has quit [Remote host closed the connection]
<shevy> ewww
<shevy> :self works ???
<lsoa> 2.0.0-p0 :011 > SingletonLike.new
<lsoa> NoMethodError: private method `new' called for SingletonLike:Class
<lsoa> anyway
<lsoa> that'
<lsoa> that's not the point of the question :)
dougireton has quit [Quit: Leaving.]
<shevy> :D
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
locriani has joined #ruby
Mattix has joined #ruby
skattyadz has quit [Client Quit]
terrorpup has quit [Ping timeout: 245 seconds]
jrajav has joined #ruby
<shevy> hmm guys
<shevy> I have about 30 methods like this:
<shevy> def teal; TEAL; end
<shevy> def white; WHITE; end
<shevy> I can use define_method() instead?
<MrZYX> I'd probably do it
<shevy> array_with_all_names.each {|name| define_method(name.to_sym) { Object.const_get(name) } } # something like that perhaps?
<MrZYX> or even method missing if there's nothing else in the class
<shevy> hmmmmmm I am scared by method_missing
<shevy> I once delegated everything from one class to the other to the next one all with method_missing
<shevy> I no longer understood what I did ~3 years later :(
<MrZYX> yeah I'd really only do it if it' the only thing the class
<MrZYX> but that array/define_method solution sounds sane enough to me
etcetera has joined #ruby
axhlf has joined #ruby
jpfuentes2 has joined #ruby
dhruvasagar has joined #ruby
mikurubeam has joined #ruby
mockra has quit [Remote host closed the connection]
CodeGnome has joined #ruby
pkrnj has joined #ruby
pkrnj has quit [Client Quit]
ephemerian has quit [Quit: Leaving.]
<mercwithamouth> my lord...
io_syl has quit [Quit: Computer has gone to sleep.]
<mercwithamouth> MrZYX: ehh i had to result to an example of the book...i was hoping to use this as an opportunity to come up with my own http://cl.ly/image/3A141K1H1N0Z
<CodeGnome> What am I misunderstanding about Ruby's File#flock? f = File.open('foo', File::RDWR|File::CREAT, 0644); f.flock File::LOCK_EX; g = File.open('foo', File::RDWR|File::CREAT, 0644); g.flock File::LOCK_NB
<CodeGnome> # => Errno::EINVAL: Invalid argument - foo
<MrZYX> mercwithamouth: so you're passing functions in?
zeade has quit [Quit: Leaving.]
connor_ has quit [Remote host closed the connection]
pkrnj has joined #ruby
jbueza has quit [Quit: Leaving.]
Es0teric has quit [Quit: Computer has gone to sleep.]
horofox_ has quit [Quit: horofox_]
dallasm has joined #ruby
<mercwithamouth> MrZYX: yes... o_O; i'll be back. they're "learning" me in #scala
Honeycomb has quit [Quit: Leaving.]
elux has joined #ruby
Xeago has quit [Remote host closed the connection]
<MrZYX> mercwithamouth: I think I'd translate that into Ruby with a lambda: http://paste.mrzyx.de/show.php?id=1358 (again without type checking)
mikepack has quit [Remote host closed the connection]
zeta has quit []
samphippen has quit [Quit: Computer has gone to sleep.]
<mercwithamouth> MrZYX: yeah a lot of what i typed you could simply use a _ and pass in any type you want and have it inferenced...i'm not there yet =P
<banister`sleep> MrZYX: why wouldnt you use a block
nga4 has quit [Ping timeout: 245 seconds]
endzyme has quit [Remote host closed the connection]
<MrZYX> that works too sure, just translates the example better here I think
pdamer has quit [Quit: pdamer]
<mercwithamouth> they're scaring me now
<mercwithamouth> def on[A, B, C](f: (B, B) => C)(g: A => B): (A, A) => C = (a1, a2) => f(g(a1), g(a2))
<MrZYX> but it kinda brings me back to the original question: what would a good usecase be to return a method? :P
<mercwithamouth> case class Person(name: String, age: Int); val p1 = Person("Bob", 12); val p2 = Person("Bill", 13)
<mercwithamouth> on((_:Int) > (_:Int))((_:Person).age)(p1, p2)
<mercwithamouth> lol....
<mercwithamouth> dibblego...the local scala genius just did an example in under 15 sec
Lemtzas has quit [Quit: No Ping reply in 180 seconds.]
Lemtzas has joined #ruby
Ontolog has quit [Read error: Connection reset by peer]
<MrZYX> hm I guess you lost me on this one ;P
Ontolog has joined #ruby
connor_ has joined #ruby
pabloh has quit [Quit: Saliendo]
suyu has joined #ruby
slainer68 has quit [Remote host closed the connection]
suyu has left #ruby [#ruby]
Roa has quit [Ping timeout: 260 seconds]
k3rn3lito has quit [Ping timeout: 255 seconds]
Roa has joined #ruby
k3rn3lito has joined #ruby
justsee has quit [Quit: Leaving...]
Domon has joined #ruby
bricker`LA has joined #ruby
bigoldrock has quit [Ping timeout: 256 seconds]
Coolhand has quit [Read error: Connection reset by peer]
pkrnj has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has quit [Ping timeout: 256 seconds]
dmiller has quit [Ping timeout: 256 seconds]
fp- has joined #ruby
jpfuentes2 has joined #ruby
<fp-> hey guys… #regex seems to e dead… anyone available to help with a regex
<fp-> be*
<fp-> i don't think mine is very difficult, i just suck big time when it comes to regular expressions
pdamer has joined #ruby
Ontolog has quit [Remote host closed the connection]
Ontolog has joined #ruby
MehLaptop has joined #ruby
rakl has quit [Quit: sleeping]
echobinary has joined #ruby
echobin15 has quit [Read error: Connection reset by peer]
dsferreira__ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
alexim has quit [Quit: sleep]
myobie has joined #ruby
waxjar has quit [Ping timeout: 245 seconds]
dsferreira has quit [Ping timeout: 245 seconds]
d2dchat has joined #ruby
ilyam has quit [Quit: ilyam]
iamjarvo has joined #ruby
<sn0wb1rd> fp-: what are you looking for?
carlyle has joined #ruby
lkba has quit [Remote host closed the connection]
pac1 has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
waxjar has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
sn0wb1rd has quit [Quit: sn0wb1rd]
carlyle has quit [Ping timeout: 245 seconds]
waxjar has quit [Ping timeout: 245 seconds]
hiroyuki has joined #ruby
unsay has joined #ruby
vagmi has joined #ruby
vagmi has quit [Client Quit]
<connor_> Any recommendations for a gem like memprof for ruby 1.9.3?
waxjar has joined #ruby
sambao21 has joined #ruby
phinfonet has quit [Quit: Leaving.]
sambao21 has quit [Ping timeout: 245 seconds]
rezzack has quit [Quit: Leaving.]
sambao21 has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
kofno has joined #ruby
dpg has joined #ruby
a_a_g has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
sn0wb1rd has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
fp- has quit [Quit: fp-]
fp- has joined #ruby
krawchyk has joined #ruby
pskosinski has quit [Quit: Red Eclipse, game of racist admins/devs: http://pawelk.pl/racist-red-eclipse-quin-zeroknight-gingerbear/]
<fp-> can anyone help me with a regex for parsing email senders, which can be anything like "Full Name <email@address.com>" or "email@address.com" or "\"Full Name\" <email@address.com>"
havenwood has joined #ruby
<fp-> all i'm really needing is 2 parts: name (without quotes) and email
<fp-> Name can be nil
splud has quit [Quit: splud]
<fp-> I'm just catching incoming emails and need to split up that data
<fp-> this works well for splitting up Full Name <email@address.com> /([^<]+)\s<(.*)>/
aed has joined #ruby
<fp-> sn0wb1rd: thanks
freeayu has joined #ruby
sam113101 has joined #ruby
drale2k has quit [Quit: Leaving...]
krawchyk has quit [Remote host closed the connection]
drale2k has joined #ruby
Hanmac2 has joined #ruby
connor_ has quit [Remote host closed the connection]
etcetera has quit []
Hanmac1 has quit [Ping timeout: 240 seconds]
Bosma has left #ruby [#ruby]
axhlf has quit [Remote host closed the connection]
love_color_text has joined #ruby
markalanevans has joined #ruby
unsay has left #ruby [#ruby]
luckyruby has quit [Remote host closed the connection]
alvaro_o has quit [Quit: Ex-Chat]
`brendan has joined #ruby
bonhoeffer has joined #ruby
NiteRain has joined #ruby
terrorpup has joined #ruby
Mattix has quit [Quit: Leaving]
<fp-> anyone here?
pdamer has quit [Quit: pdamer]
<sam113101> yes
banjara has quit [Quit: Leaving.]
<fp-> ok then
<fp-> i guess this must be a challenge
joeycarmello has quit [Remote host closed the connection]
a_a_g has quit [Quit: Leaving.]
MrZYX is now known as MrZYX|off
daniel_- has quit [Ping timeout: 250 seconds]
<sam113101> life is challenging indeed
<sn0wb1rd> fp-: How does this work? /["a-zA-Z ].*<.*@.*\..*>/
rmelissari has quit [Read error: Connection reset by peer]
<fp-> i'll give it a go and let you know
jpfuentes2 has quit [Ping timeout: 255 seconds]
banjara has joined #ruby
banjara has quit [Client Quit]
<fp-> doesn't provide the two parts
rmelissari has joined #ruby
__Big0__ has joined #ruby
<fp-> was wanting two parts: name, email
<sn0wb1rd> Oh you need to split the data
<sn0wb1rd> I see
<fp-> and if no name is present, just the email
dsferreira__ has quit [Quit: This computer has gone to sleep]
<fp-> the email address parsing part doesn't even really need to very strict
<fp-> since i'm just catching emails as they are being delivered by an email server
<fp-> doesn't require validation… no user input
jpfuentes2 has joined #ruby
<sn0wb1rd> This should give you those two parts: /(["a-zA-Z ].*)\s*<(.*@.*\..*)>/
<sn0wb1rd> You can access them with $1 (name) and $1 (email)
<sn0wb1rd> But you should do a $1.strip to remove the extra space
<fp-> so should I also do a $1.delete('"')
<fp-> for emails like "Full Name" <full@name.com>
dsferreira_ has joined #ruby
__Big0__ has quit [Remote host closed the connection]
<fp-> that regex doesn't work for just emails without names
<fp-> i.e. user@domain.com
<fp-> that's my issue
<fp-> i have 3 types of emails coming in
dsferreira_ has quit [Client Quit]
<fp-> Full Name <user@domain.com>
<fp-> "Full Name" <user@domain.com>
<fp-> user@domain.com
<fp-> that's all I've seen so far
<fp-> maybe there's also Full Name<user@domain.com> or just <user@domain.com>
R_Macy has quit [Quit: Computer has gone to sleep.]
Ontolog_ has joined #ruby
sambao21 has quit [Quit: sambao21]
c0rn has quit [Ping timeout: 260 seconds]
jbueza has joined #ruby
<sn0wb1rd> checking out
sam113101 has quit []
rezzack has joined #ruby
Ontolog has quit [Ping timeout: 272 seconds]
pen has quit [Remote host closed the connection]
echobinary has quit [Read error: Connection reset by peer]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
echobinary has joined #ruby
<lsoa> Hanmac: any chance you're actually there? :)
verysoftoiletppr has quit []
Voodoofish430 has quit [Quit: Leaving.]
pdamer has joined #ruby
johnnygoodmancpa has joined #ruby
johnnygoodmancpa has left #ruby [#ruby]
forced_request has quit [Remote host closed the connection]
pdamer has quit [Client Quit]
<sn0wb1rd> fp-: email =~ /(["a-zA-Z ].*)<(.*@.*\..*)>/ || email =~ /()^<(.*@.*\..*)>/ seems to be working but there should be a simpler way to do it :)
__Big0__ has joined #ruby
cmdr-prmpt_ has joined #ruby
chendo_ has quit [Ping timeout: 264 seconds]
<fp-> yeah seems like there would be
<fp-> self.email_address = from.match(/\<(.*)\>/)[1] if from.include?('<')
<fp-> self.email_address = email_address.delete('<').delete('>')
<fp-> self.email_address = email_address.strip
<fp-> self.email_address = nil if email_address.blank?
<fp-> that's how i do it right now
<fp-> :/
chendo_ has joined #ruby
hasimo has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<aedornm> clunky
chrisramon_ has joined #ruby
Grieg has left #ruby [#ruby]
<fp-> yeah
ilyam has joined #ruby
<fp-> but works reliably
<aedornm> hmmm
<fp-> was trying to refactor it to a regex
<fp-> but i really suck at regex
ttt has joined #ruby
feedbackloop_ has joined #ruby
<fp-> was also using the Mail gem but it chokes on email addresses with accent characters
apok has quit [Quit: apok]
bigmac has joined #ruby
hashtree has quit []
rockymadden has joined #ruby
Micha____ has quit [Remote host closed the connection]
feedbackloop has quit [Ping timeout: 260 seconds]
jsonperl has joined #ruby
hasimo has joined #ruby
<aedornm> wow, valid emails are ridiculous
elux has quit [Quit: Leaving...]
pdamer has joined #ruby
<aedornm> !#$%&'*+-/=?^_`{}|~@domain.com is valid?
chipotle_ has joined #ruby
cmdr-prmpt_ has quit [Quit: Done-zo]
<aedornm> and you can have comments in the domain?
echobinary has quit [Remote host closed the connection]
vagmi has joined #ruby
yacks has joined #ruby
hasimo has quit [Remote host closed the connection]
<sn0wb1rd> Found this regex for mail: http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
<aedornm> /[+\.\w\-_]*@[\w\.]*/ will slice an email address from your string.
<fp-> that is ridiculous
<aedornm> In the most common format.
<aedornm> sn0wb1rd: rofl
vagmi has quit [Client Quit]
sambao21 has joined #ruby
carlyle has joined #ruby
<sn0wb1rd> yeah.. no idea how one wrote it.
<fp-> i'm not really needing to validate an email address since this isn't user input
reppard has joined #ruby
<fp-> i just need to get name and address from "Full Name <email@address.com>" or "email@address.com"
<fp-> those appear to be the two ways i'm receiving email
<aedornm> fp-: /[+\.\w\-_]*@[\w\.]*/ will get your email address. Then just delete what's left that shouldn't be a name.
Michae___ has joined #ruby
hasimo has joined #ruby
joeycarmello has joined #ruby
<fp-> one sec
jsonperl has left #ruby [#ruby]
pen has joined #ruby
<fp-> def from=(from)
<fp-> self.email_address = from.match(/[+\.\w\-_]*@[\w\.]*/).to_s
<fp-> self.full_name = from.gsub(email_address, '').strip
<fp-> end
<aedornm> well, no, you'll have things left over that way like <>
nonotza has quit [Quit: nonotza]
twoism has quit [Remote host closed the connection]
<fp-> ah yeah, i'm seeing that now
Michae___ has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 255 seconds]
pencilcheck has joined #ruby
freeayu has joined #ruby
Michae___ has joined #ruby
<fp-> maybe there is another way to approach this
<aedornm> self.email_address = from.slice!(/[+\.\w\-_]*@[\w\.]*/); self.full_name = from.delete('^[a-zA-Z ]').strip
<aedornm> But if you have names with accents and stuff... that would be ... hmm
<fp-> i'll try it
bradhe has quit [Remote host closed the connection]
pen has quit [Ping timeout: 245 seconds]
dankest has quit [Quit: Leaving...]
hashmal has joined #ruby
aleph-null has quit [Remote host closed the connection]
<fp-> pretty darn good so far
<fp-> even managed to strip out the quotes from the full name
mikepack has joined #ruby
tommyvyo has joined #ruby
reppard has quit [Ping timeout: 248 seconds]
<aedornm> It'll fail when you have character accents
<fp-> hrm
<fp-> so same issue with Mail
<fp-> what do you think I should do?
<fp-> maybe avoid regex and just use split?
freakazoid0223 has quit [Read error: Connection reset by peer]
<fp-> "Full Name <email@address.com>".split('<', 2).last.delete('>')
Lemtzas has quit [Quit: No Ping reply in 180 seconds.]
Lemtzas has joined #ruby
<fp-> self.full_name = "Full Name <email@address.com>'.split('<', 2).first.strip
sandGorgon has joined #ruby
fire has joined #ruby
chrisramon_ has quit [Quit: chrisramon_]
echobinary has joined #ruby
takano16 has joined #ruby
echobinary has quit [Client Quit]
<aedornm> Yeah, for the full name. I'd keep the email regex. Probably can do something better with the name, though. I'm being distracted by Wreck-it Ralph
dallasm has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
sambao21 has quit [Ping timeout: 260 seconds]
<fp-> parts = from.split('<', 2)
nga4 has joined #ruby
<fp-> self.email_address = parts.last.delete('>')
<fp-> self.full_name = parts.first.strip if from.include?('<')
<fp-> seems to pass all tests
Ontolog_ has quit [Read error: Connection reset by peer]
Ontolog has joined #ruby
__Big0___ has joined #ruby
myobie has quit [Quit: myobie]
verysoftoiletppr has joined #ruby
<aedornm> self.email_address = from.slice!(/[+\.\w\-_]*@[\w\.]*/); self.full_name = (from.split('<>')[0] || "").delete('"').strip
dorei has quit []
__Big0__ has quit [Ping timeout: 260 seconds]
<fp-> that's working great too
<fp-> self.email_address = from.slice!(/[+\.\w\-_]*@[\w\.]*/); self.full_name = from.delete('^[a-zA-Z ]').strip
<fp-> in that one, why would it fail with accents?
<fp-> just learning
bonhoeffer has quit [Quit: bonhoeffer]
<aedornm> because it's only excluding a-z A-Z and spaces.
defaultro has joined #ruby
<fp-> gotcha
<fp-> self.email_address = from.slice!(/[+\.\w\-_]*@[\w\.]*/); self.full_name = (from.split('<>')[0] || "").delete('"').strip
<fp-> that one is actually failing one test
<defaultro> hey folks, what could be the reason why I am getting this when I start it. http://pastie.org/6418072
<aedornm> which?
<fp-> str = '"Full Name" <user@domain.com>'
<aedornm> hmmm, it shouldn't...
<fp-> let me try again
<fp-> never mind, all me
<aedornm> ah okay
hasimo has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
Tarential has quit [Excess Flood]
Michae___ has quit [Remote host closed the connection]
Ontolog has joined #ruby
Tarential has joined #ruby
mockra has joined #ruby
Michae___ has joined #ruby
sn0wb1rd has quit [Quit: I will be right back]
Michae___ has quit [Read error: Connection reset by peer]
Michae___ has joined #ruby
jamesfung14 has quit [Ping timeout: 276 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
hbpoison has quit [Ping timeout: 245 seconds]
hbpoison has joined #ruby
R_Macy has joined #ruby
whitedawg has joined #ruby
reset has quit [Ping timeout: 264 seconds]
markalanevans has quit [Quit: markalanevans]
hbpoison has quit [Ping timeout: 245 seconds]
twoism has joined #ruby
chipotle_ has quit [Quit: cya]
bradhe has joined #ruby
adkron has joined #ruby
adkron_ has joined #ruby
noesis has quit [Read error: Connection reset by peer]
eAlchemi_ has joined #ruby
S2kx has joined #ruby
S2kx has quit [Remote host closed the connection]
h4mz1d has joined #ruby
bradhe has quit [Remote host closed the connection]
Michae___ has quit [Remote host closed the connection]
MehLaptop has quit [Remote host closed the connection]
twoism has quit [Remote host closed the connection]
rezzack has quit [Quit: Leaving.]
pencilcheck has quit [Read error: Connection reset by peer]
eAlchemist has quit [Ping timeout: 264 seconds]
twoism has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
philcrissman has joined #ruby
a_a_g has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
pen has joined #ruby
dayepa_ has quit [Read error: Connection reset by peer]
dayepa_ has joined #ruby
dmiller has joined #ruby
hasimo has joined #ruby
msherry has joined #ruby
nfk has quit [Quit: yawn]
takeru_ has joined #ruby
rupee has quit [Quit: Leaving]
pdamer has quit [Quit: pdamer]
mattp_ has quit [Read error: Operation timed out]
takeru_ has quit [Ping timeout: 260 seconds]
philcrissman has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
pen has quit [Remote host closed the connection]
juarlex has quit [Read error: Connection reset by peer]
juarlex has joined #ruby
__Big0___ has quit [Remote host closed the connection]
aleph-null has joined #ruby
hbpoison has joined #ruby
Ontolog has quit [Remote host closed the connection]
aleph-null has quit [Remote host closed the connection]
mattp_ has joined #ruby
terrorpup has quit [Ping timeout: 260 seconds]
terrorpup has joined #ruby
kofno has quit [Remote host closed the connection]
adkron_ has quit [Ping timeout: 255 seconds]
adkron has quit [Ping timeout: 255 seconds]
xbayrockx has joined #ruby
freakazoid0223 has joined #ruby
xbayrockx is now known as wf2f
programmerq has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby
msherry is now known as mahmoudimus
pkrnj has joined #ruby
greenarrow has quit [Ping timeout: 264 seconds]
greenarrow has joined #ruby
kofno has joined #ruby
jgrevich_ has joined #ruby
jekotia has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 245 seconds]
jgrevich has quit [Ping timeout: 260 seconds]
jgrevich_ is now known as jgrevich
mockra has quit [Remote host closed the connection]
pen has joined #ruby
<fp-> thanks for the help guys
fp- has quit [Quit: fp-]
joeycarmello has quit [Remote host closed the connection]
tomzx_mac has quit [Ping timeout: 264 seconds]
himsin has quit [Ping timeout: 255 seconds]
havenwood has quit [Remote host closed the connection]
dankest has joined #ruby
uris has quit [Quit: Leaving]
takano16_ has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
heliumsocket has joined #ruby
aedornm has quit [Quit: Leaving]
verysoftoiletppr has quit []
takano16 has quit [Ping timeout: 276 seconds]
dpg has quit [Quit: dpg]
drumond19 has quit [Remote host closed the connection]
hashmal has quit [Quit: Computer has gone to sleep.]
dankest has quit [Quit: Linkinus - http://linkinus.com]
nga4 has quit []
ritek has joined #ruby
vipjun has joined #ruby
philcrissman has joined #ruby
jurassic has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
halogenandtoast has left #ruby [#ruby]
rippa has joined #ruby
hemanth_ has quit [Quit: Leaving]
hemanth has joined #ruby
jurassic has quit [Quit: jurassic]
girija has joined #ruby
sam113101 has joined #ruby
RickFromTheSOC has joined #ruby
jurassic has joined #ruby
baroquebobcat has joined #ruby
<RickFromTheSOC> Please teach me Ruby in 30 seconds. Ready, go!
yacks has quit [Ping timeout: 276 seconds]
lukeholder has joined #ruby
<sam113101> I can't "gem install rails"
aed has quit [Quit: aed]
<sam113101> I wish I could
ananthakumaran has quit [Quit: Leaving.]
<sam113101> ;_;
zomgbie has joined #ruby
otherj has joined #ruby
bradhe has joined #ruby
Michae___ has joined #ruby
<RickFromTheSOC> sam113101, maybe the openssl part of the error is a hint?
<hemanth> sam113101, which OS?
<sam113101> ubuntu
<hemanth> gem version?
<sam113101> 2.0.2
<sam113101> I used rvm
<hemanth> 2.0.2 hmm it's the latest, must be fine.
<hemanth> rvm or something else, that must not matter here
<RickFromTheSOC> what version of Ruby do you have
<sam113101> they said I shouldn't download ruby directly from the repo, is that true?
Michae___ has quit [Ping timeout: 245 seconds]
ocnam has joined #ruby
<sam113101> 2.0.0p0
zeade has joined #ruby
<hemanth> sam113101, rvm reinstall 2.0.0 --autolibs=0
<RickFromTheSOC> similar problem noted here -> http://ubuntuforums.org/showthread.php?t=1494997
jdunck has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Ping timeout: 272 seconds]
brum has joined #ruby
<RickFromTheSOC> uninstall ruby, install zlib, install ruby
<sam113101> Unrecognized command line flag: '--autolibs=0' ( see: 'rvm usage' )
<pen> rbenv!!!
Takehiro has quit [Remote host closed the connection]
c0rn has joined #ruby
<pen> unless you need system wide
<hemanth> sudo aptitude install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev; # to fix zlib dep and get other deps sam113101
<hemanth> sam113101, do what RickFromTheSOC said
rafacv has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
lewix has quit [Remote host closed the connection]
connor__ has joined #ruby
kofno has quit [Remote host closed the connection]
statarb3 has quit [Ping timeout: 272 seconds]
brum has quit [Remote host closed the connection]
<sam113101> must I reinstall ruby after all those things are installed?
mercwithamouth has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
philcrissman has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<sam113101> how am I supposed to do that
ezkl has joined #ruby
sambio has quit []
jurassic has quit [Quit: jurassic]
<RickFromTheSOC> how did you get it installed before?
lewix has joined #ruby
feedbackloop_ has quit [Read error: Connection reset by peer]
<sam113101> ok, reinstalling fixed it
<sam113101> thanks guys
<sam113101> everything's working
bwulf has quit [Read error: Connection reset by peer]
<hemanth> enjoy
<sam113101> :)
rakl has joined #ruby
girija has quit [Ping timeout: 240 seconds]
mikepack has quit [Remote host closed the connection]
Myconix has joined #ruby
ananthakumaran has joined #ruby
felipe has joined #ruby
carlyle has quit [Remote host closed the connection]
lewix has quit [Remote host closed the connection]
QaDeS has joined #ruby
mahmoudimus has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
ryanf has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby
lewix has quit [Ping timeout: 245 seconds]
mockra has joined #ruby
fire has quit [Ping timeout: 276 seconds]
v0n has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
sambao21 has joined #ruby
sambao21 has quit [Client Quit]
<Hanmac> lsoa now i am back again
sambao21 has joined #ruby
RickFromTheSOC has quit [Quit: Leaving]
girija has joined #ruby
<otherj> if console returns [] for an instance var, and you want to conditionally check for it to contain something, is it best to use !@var.nil? @var.present? !@var.empty? i'm trying to conditionally check it and when it returns [] it's not hitting the else
mockra has quit [Ping timeout: 260 seconds]
fire has joined #ruby
sambao21 has quit [Client Quit]
fire has quit [Excess Flood]
otherj has quit []
rburton- has joined #ruby
lukeholder has quit [Quit: Computer has gone to sleep.]
cmyers has joined #ruby
<cmyers> Looking at the Memoizer gem, but I want to memoize (or not) per-instance, rather than per-class. e.g. I want to have some instances of the class use memoization, and others not. Anyone know of an existing gem that does this?
banjara has joined #ruby
gtuckerkellogg has joined #ruby
rgbdev has quit [Quit: rgbdev]
fire has joined #ruby
nachtwandler has joined #ruby
drale2k has quit [Quit: Leaving...]
jurassic has joined #ruby
fire has quit [Excess Flood]
echobinary has joined #ruby
browndawg has joined #ruby
yashshah has joined #ruby
rakl has quit [Ping timeout: 252 seconds]
drale2k has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
daemoen has quit [Ping timeout: 250 seconds]
newUser1234 has quit [Remote host closed the connection]
rakl has joined #ruby
WanderingGlitch has quit [Ping timeout: 260 seconds]
sambao21 has joined #ruby
a_a_g has quit [Quit: Leaving.]
yacks has joined #ruby
sambao21 has quit [Client Quit]
jdunck has joined #ruby
huoxito has quit [Quit: Leaving]
classix has quit [Ping timeout: 252 seconds]
rockymadden has quit []
carlyle has joined #ruby
classix has joined #ruby
takeru_ has joined #ruby
fire has joined #ruby
codecop has joined #ruby
tommyvyo has quit [Quit:]
takeru_ has quit [Ping timeout: 245 seconds]
whitedawg has quit [Quit: Leaving.]
Takehiro has joined #ruby
carlyle has quit [Ping timeout: 245 seconds]
banjara has left #ruby [#ruby]
newUser1234 has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
Takehiro_ has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 276 seconds]
bigmac has quit [Remote host closed the connection]
love_color_text has quit [Remote host closed the connection]
lsoa has quit [Read error: Operation timed out]
io_syl has joined #ruby
fire has quit [Ping timeout: 272 seconds]
love_color_text has joined #ruby
love_color_text has quit [Remote host closed the connection]
drale2k has quit [Quit: Leaving...]
drale2k has joined #ruby
voodoofish has quit [Read error: No route to host]
toekutr has joined #ruby
dmiller has quit [Ping timeout: 272 seconds]
aganov has joined #ruby
lsoa has joined #ruby
kofno has joined #ruby
danneu1 has quit [Quit: WeeChat 0.3.8]
iamjarvo has quit [Quit: Leaving.]
fire has joined #ruby
mootpointer has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
Mo0O has quit [Quit: WeeChat 0.4.0]
nsxt has quit [Quit: Leaving]
eAlchemi_ has quit [Remote host closed the connection]
trollissimo has quit [Remote host closed the connection]
eAlchemist has joined #ruby
Mo0O has joined #ruby
Rioji_ has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 272 seconds]
aedornm has joined #ruby
d2dchat has quit [Remote host closed the connection]
sepp2k has joined #ruby
jurassic has quit [Quit: jurassic]
voodoofish has joined #ruby
nachtwandler has quit [Remote host closed the connection]
sam113101 has quit [Quit: Page closed]
eAlchemist has quit [Ping timeout: 248 seconds]
jdunck has quit [Quit: Computer has gone to sleep.]
Honeycomb has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
nari has quit [Ping timeout: 245 seconds]
jpfuentes2 has joined #ruby
drale2k has quit [Quit: Leaving...]
drale2k has joined #ruby
apeiros_ has quit [Remote host closed the connection]
twoism has quit [Ping timeout: 276 seconds]
echobin81 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
aedornm has quit [Quit: Leaving]
pencilcheck has joined #ruby
Hanmac has quit [Quit: Leaving.]
Zespre has quit [Quit: leaving]
v0n has quit [Read error: Operation timed out]
baroquebobcat has quit [Quit: baroquebobcat]
dsferreira_ has joined #ruby
pen_ has joined #ruby
pen has quit [Ping timeout: 272 seconds]
aedornm has joined #ruby
Mo0O has quit [Quit: see you]
jurassic has joined #ruby
dsferreira_ has quit [Client Quit]
pencilcheck has quit [Ping timeout: 260 seconds]
nari has joined #ruby
pen has joined #ruby
Zespre has joined #ruby
andikr has joined #ruby
pen_ has quit [Ping timeout: 260 seconds]
Clownz has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
axxT has joined #ruby
Ng|Adonixx7148 has quit [Read error: Connection reset by peer]
hashmal has joined #ruby
<FuzaiDesktop> http://pastebin.com/rdQpFRF7 I'm using Regex with Ruby and i'm trying to extract everything between the 16 white spaces and next 3 white spaces "Toyko, Japan" in the example
<FuzaiDesktop> I tried /(\w+), (\w+) / but had no luck
mahmoudimus has quit [Quit: Computer has gone to sleep.]
tagrudev has joined #ruby
pythonista has joined #ruby
bradhe has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
<pythonista> within an 'each' block of a hash iterator-- how can i access the next k/v pair that's coming down the pipeline?
<pythonista> is this possible?
dcwu has joined #ruby
Elhu has joined #ruby
<aedornm> FuzaiDesktop: /\w+,\s\w+/ for that example
a_a_g has joined #ruby
<FuzaiDesktop> \s means white space right?
end_guy has quit [Remote host closed the connection]
<aedornm> yes
<FuzaiDesktop> so /(\w+,\s\w+)\s\s\s/ ?
<FuzaiDesktop> To put Tokyo, Japan into $1?
drale2k has quit [Quit: Leaving...]
love_color_text has joined #ruby
<aedornm> you don't need the extra 3 \s at the end
end_guy has joined #ruby
mafolz has joined #ruby
drale2k has joined #ruby
<FuzaiDesktop> ok
Morkel has joined #ruby
piotr_ has joined #ruby
<FuzaiDesktop> Thank you
Honeycomb has quit [Quit: Leaving.]
workmad3 has joined #ruby
bricker`1A has joined #ruby
chussenot has joined #ruby
Hanmac has joined #ruby
<aedornm> pythonista: You can't, but you can use #each_cons instead. hash.each_cons(2) {|x,y| ...} will pass first and next, but it won't pass the last element if you need to iterate over that separately.
bricker`LA has quit [Ping timeout: 255 seconds]
mercwithamouth has quit [Ping timeout: 276 seconds]
ocnam has quit [Quit: Quit: Textual IRC Client: http://www.textualapp.com/]
jdunck has joined #ruby
hogeo has quit [Remote host closed the connection]
<pythonista> excellent thanks aedornm
staafl has quit [Ping timeout: 276 seconds]
Takehiro has joined #ruby
braoru has joined #ruby
workmad3 has quit [Quit: leaving]
yashshah has quit [Read error: Connection reset by peer]
toekutr has quit [Remote host closed the connection]
atyz has joined #ruby
ilyam has quit [Quit: ilyam]
testingb0t has joined #ruby
zeade has quit [Quit: Leaving.]
hogeo has joined #ruby
postmodern has quit [Quit: Leaving]
Elhu has quit [Quit: Computer has gone to sleep.]
one` has joined #ruby
Morkel_ has joined #ruby
Morkel has quit [Ping timeout: 276 seconds]
Morkel_ is now known as Morkel
Honeycomb has joined #ruby
<Guest45517> hi all, i'm trying to install redmine 2.2.3 on windows server 2012 x64, with mysql. i have a lot of trouble, mainly with imagemagick and with mysql connector too. is there a "step guide" (i've tried to follow the wiki's one, without success) that can help me? i know that this is not mainly a ruby problem, but i think that the issue is related to the gem installation of the product...
chussenot has quit [Quit: chussenot]
Quebert has quit [Quit: Linkinus - http://linkinus.com]
drale2k has quit [Quit: Leaving...]
drale2k has joined #ruby
<lewix> where are ruby installation files located
<ezkl> lewix: What are your platform and install method?
c0rn has quit [Quit: Computer has gone to sleep.]
<Hanmac> lewix depends on OS, Architecture, package installed, source compiled, multiarch enabled
chussenot has joined #ruby
<lewix> mac os
<lewix> find and locate don't work
Myconix has quit [Quit: Server Error 482: The server has been shot by a 12-gauge, please contact an administrator]
<lewix> I installed rvm too
T_ has joined #ruby
<Hanmac> lewix ... did you ruby with rvm or do you have an extra ruby?
<Hanmac> lewix does "which ruby" works for you?
<Guest45517> have anyone info on how to have ruby up and running onto windows server? i need to install redmine but the guide of redmine have a general overview of the ruby, rubydevkit, rmagick gem, mysql gem, etc ..
<lewix> $ which ruby
<lewix> /Users/RIK/.rvm/rubies/ruby-1.9.3-p385/bin/ruby
<lewix> Hanmac: *
<ezkl> Guest45517: http://rubyinstaller.org/?
<Guest45517> thanks ezkl, my company ask me a step to step installation
timonv has quit [Remote host closed the connection]
<Guest45517> possibly with manually installation of ruby, devkit and gems
<Hanmac> lewix, i think you found your ruby
arietis has joined #ruby
<lewix> Hanmac: no comment
* lewix go take a glass of water
ferdev has quit [Quit: ferdev]
flagg0204 has quit [Read error: Operation timed out]
grn has joined #ruby
pen has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 245 seconds]
zigomir has joined #ruby
<lewix> Hanmac: thanks
<ezkl> Guest45517: The https://github.com/oneclick/rubyinstaller repository contains all of the installation and dependency minutiae
flagg0204 has joined #ruby
apeiros_ has joined #ruby
filipe_ has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<lewix> Hanmac: where's the standard library located
ohcibi_ is now known as ohcibi
echobin81 has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
<Hanmac> lewix maybe something like /usr/*
pepper_chico has quit [Quit: Computer has gone to sleep.]
nari has quit [Ping timeout: 245 seconds]
<lewix> Hanmac: I can't believe I can't find a simple ruby directory tree structure online
dhruvasagar has joined #ruby
<Hanmac> lewix there is no standard dir
mahmoudimus has joined #ruby
T_ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
fire has quit [Ping timeout: 260 seconds]
puppeh has joined #ruby
<Hanmac> lewix this are my install dirs https://gist.github.com/Hanmac/d4dc1622ffe571343816
baba has joined #ruby
icole has joined #ruby
baba has quit [Client Quit]
pen has joined #ruby
<apeiros_> lewix: check your $LOAD_PATH
<apeiros_> the stdlib is distributed in the paths listed there
dhruvasagar has quit [Remote host closed the connection]
<apeiros_> for me it's 9 dirs
<Hanmac> apeiros_ for sample my stdlib is slitted in two paths because of the --enable-multiarch flag
<apeiros_> ah, sorry, 8
marr has joined #ruby
<apeiros_> Hanmac: yeah, that's why I said "distributed". I don't think mine is with multiarch flag, and still I have arch specific paths in $LOAD_PATH
mulinux has joined #ruby
<lewix> Hanmac: any idea where i can get a clear explanation of the ruby install dir tree
<apeiros_> and every distro can make up their own decisions too… (I'm looking at you, apt!)
<lewix> apeiros_: thanks
<apeiros_> lewix: ruby -e 'p *$:'
<Hanmac> i have 8 dirs too, but my one are a little bit mixed :P
<apeiros_> I have 3 times vendor, 3 times site, 2 times plain ruby
<lewix> apeiros_: same
<apeiros_> I think stdlib is in the 2 non-vendor non-site
r0bby has joined #ruby
<apeiros_> vendor is for the distros to use I think, for libs they want to ship with ruby
<apeiros_> site is where old school setup.rb installs end up
<apeiros_> not sure anymore, thogh. it's all gems now anyway
drale2k has quit [Quit: Leaving...]
<lewix> apeiros_: site is for third party
dsferreira has joined #ruby
drale2k has joined #ruby
* Hanmac has 3 vendor, 3 site, 2 default ruby too ... but my pathes are "rearranged"
mahmoudimus has quit [Quit: Computer has gone to sleep.]
nari has joined #ruby
takeru has joined #ruby
<lewix> I'm looking for rubylibdir
<lewix> apeiros_: what's store in $:
robbyoconnor has quit [Ping timeout: 245 seconds]
apod has joined #ruby
<Hanmac> >> RbConfig::CONFIG["rubylibdir"]
<eval-in> Hanmac => "/execpad/interpreters/ruby-2.0.0-p0/lib/ruby/2.0.0" (http://eval.in/12150)
razibog has joined #ruby
alup_ has quit [Read error: Connection reset by peer]
puppeh has quit [Read error: Connection reset by peer]
alup_ has joined #ruby
puppeh has joined #ruby
<apeiros_> lewix: $: == $LOAD_PATH
bradhe has joined #ruby
<lewix> Hanmac: oh i was using Config::Config in irb
<lewix> apeiros_: thanks
horofox has joined #ruby
chussenot has quit [Quit: chussenot]
<Hanmac> >> $:.map {|s|RbConfig::CONFIG.key(s)}
carraroj has joined #ruby
<eval-in> Hanmac => ["sitelibdir", "sitearchdir", "sitedir", "vendorlibdir", "vendorarchdir", "vendordir", "rubylibdir", "rubyarchdir"] (http://eval.in/12151)
takeru has quit [Ping timeout: 276 seconds]
<lewix> they have to organize the installations files better if you ask me
daniel_hinojosa has quit [Quit: Leaving.]
wallclockbuilder has joined #ruby
Criztian has joined #ruby
sayan has joined #ruby
ephemerian has joined #ruby
sandGorgon has quit [Ping timeout: 272 seconds]
xbob has joined #ruby
aedornm has quit [Quit: Leaving]
ferdev has joined #ruby
pen has quit [Remote host closed the connection]
swex_ has quit [Remote host closed the connection]
pythonista has quit [Quit: Page closed]
timonv has joined #ruby
<Hanmac> _andre i make this for you: http://bugs.ruby-lang.org/issues/8050
swex has joined #ruby
axhlf has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
cantonic_ has joined #ruby
ryanf has quit [Quit: leaving]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
maxmanders has joined #ruby
cantonic has quit [Ping timeout: 260 seconds]
cantonic_ is now known as cantonic
dhruvasagar has joined #ruby
Takehiro has quit [Remote host closed the connection]
Es0teric has joined #ruby
hbpoison has quit [Ping timeout: 245 seconds]
horofox has quit [Quit: horofox]
drale2k has quit [Quit: Leaving...]
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
drale2k has joined #ruby
hbpoison has joined #ruby
zomgbie has quit [Ping timeout: 256 seconds]
braoru has quit [Remote host closed the connection]
mikurubeam has joined #ruby
timonv has quit [Remote host closed the connection]
adambeynon has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
Elhu has joined #ruby
braoru has joined #ruby
pkircher has joined #ruby
keyvan has joined #ruby
Axsuul has quit [Ping timeout: 240 seconds]
jimeh has joined #ruby
love_color_text has quit [Ping timeout: 245 seconds]
hoelzro|away is now known as hoelzro
mpfundstein has joined #ruby
<hemanth> Hanmac, http://blog.rubygems.org/2013/03/06/2.0.2-released.html Got a mention for bug fix :)
eka has joined #ruby
<Hanmac> nice
francisfish has joined #ruby
wreckimnaked has joined #ruby
chussenot has joined #ruby
oposomme has joined #ruby
<hemanth> Hanmac, what's new? Was reading about authentic happiness :D
bradhe has joined #ruby
dbck has joined #ruby
statarb3 has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
axhlf has quit [Remote host closed the connection]
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
one` has quit [Ping timeout: 260 seconds]
dbck has left #ruby [#ruby]
eldariof has joined #ruby
cocomo has joined #ruby
cocomo has left #ruby [#ruby]
<Hanmac> hemanth yesterday i was pissed because they miss to make a struct stat -> VALUE method in the C-API public
one has joined #ruby
<hemanth> Hanmac, yikes!
lemonsparrow has quit [Ping timeout: 245 seconds]
<Hanmac> there is a static VALUE stat_new(struct stat *st) method ... but its not visible form the outside :/
noesis has joined #ruby
<hemanth> hmm....
drale2k has quit [Quit: Leaving...]
drale2k has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
dcwu has quit [Quit: Leaving.]
rakl has quit [Quit: sleeping]
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
dsferreira has quit [Quit: This computer has gone to sleep]
becom33 has left #ruby [#ruby]
becom33 has joined #ruby
buscon has joined #ruby
nari has quit [Ping timeout: 276 seconds]
<becom33> https://gist.github.com/anonymous/8750a92097bce4f1da0e in this script when I do "ruby test.rb speak --file demo" it returns the error test.rb speak requires at least 1 argument: "test.rb speak <What to speak>". what I want to get is the file I have mentioned is not there
enthrops has joined #ruby
soc42 has joined #ruby
Vainoharhainen has joined #ruby
beiter has joined #ruby
lkba has joined #ruby
staafl has joined #ruby
timonv has joined #ruby
ananthakumaran1 has joined #ruby
daniel_- has joined #ruby
ananthakumaran2 has joined #ruby
enthrops has left #ruby [#ruby]
backjlack has joined #ruby
love_color_text has joined #ruby
MrZYX|off is now known as MrZYX
gtuckerkellogg has quit [Ping timeout: 255 seconds]
slainer68 has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
ananthakumaran1 has quit [Ping timeout: 245 seconds]
clooth has joined #ruby
staafl_alt has joined #ruby
keyvan has quit [Ping timeout: 260 seconds]
enthrops has joined #ruby
enthrops has left #ruby [#ruby]
enthrops has joined #ruby
enthrops has quit [Client Quit]
dahood has joined #ruby
Honeycomb has quit [Quit: Leaving.]
dahood has left #ruby [#ruby]
himsin has joined #ruby
staafl has quit [Ping timeout: 256 seconds]
blaxter has joined #ruby
bricker`1A is now known as bricker`LA
newUser1234 has quit [Remote host closed the connection]
newUser1234 has joined #ruby
samphippen has joined #ruby
drale2k has quit [Quit: Leaving...]
drale2k has joined #ruby
Beoran__ has joined #ruby
duosrx has joined #ruby
mark9 has joined #ruby
Beoran_ has quit [Ping timeout: 250 seconds]
swoosh has joined #ruby
mikurubeam has quit [Quit: +1 (Yes.) -1 (No.) i (WTF?). j (So...). k (... quaternions too?).]
newUser1234 has quit [Ping timeout: 272 seconds]
Tn6o has joined #ruby
bradhe has joined #ruby
clooth has quit [Ping timeout: 245 seconds]
ozgura has quit [Remote host closed the connection]
a_a_g has quit [Quit: Leaving.]
elaptics`away is now known as elaptics
axhlf has joined #ruby
<epta> How can I find a key, which value satisfy some predicate?
<epta> In hash obviously
<hoelzro> epta: use Hash#select
clocKwize has joined #ruby
<hoelzro> are you using the hash for its semantics as wel?
<hoelzro> *well
<hoelzro> or are you just using it to maintain a collection of associative data?
mikurubeam has joined #ruby
<Hanmac> Hash has thanks to Enumerable also an #find method
<hoelzro> ah, good call
vlad_starkov has joined #ruby
<epta> > {"a" => {:f => 2}, "b" => {:f => 3}}.select{|k,v| v[:f] == 2}.keys.first
charliesome has joined #ruby
clooth has joined #ruby
<Hanmac> >> {"a" => {:f => 2}, "b" => {:f => 3}}.find{|k,v| v[:f] == 2}.first
<eval-in> Hanmac => "a" (http://eval.in/12155)
connor__ has quit [Remote host closed the connection]
<epta> >> {"a" => {:f => 2}, "b" => {:f => 3}}.find{|k,v| v[:f] == 2}.first
<eval-in> epta => "a" (http://eval.in/12156)
<epta> Hanmac: yep, got the same :)
<epta> Thnaks
axhlf has quit [Read error: Connection reset by peer]
connor_ has joined #ruby
axhlf has joined #ruby
connor_ has quit [Read error: Connection reset by peer]
noodl has joined #ruby
<noodl> hi. i'm sure there was an alternative to rvm/rbenv that simply set some env vars in the shell. called something like chrb or cdrb, did i dream that? can't find it anywhere :(
<hoelzro> chruby
<hoelzro> noodl: ^^
<noodl> ah! ty ty ty
<noodl> got it. ace :)
samphippen has quit [Quit: Computer has gone to sleep.]
joshman_ has joined #ruby
backjlack has quit [Remote host closed the connection]
Al_ has joined #ruby
<regedarek> How will be the easiest way to compare slugs before and after update friendlyID ?? save slugs to text file?
mulinux has quit [Quit: mulinux]
bradhe has quit [Ping timeout: 250 seconds]
<Hanmac> regedarek ... is that a rails question?
<regedarek> i guess more ruby because i just want to compare two columns
<hoelzro> when I compare slugs, I usually use a ruler
at_ has joined #ruby
<hoelzro> and compare length, then width
backjlack has joined #ruby
<hoelzro> then weight, and finally racing speed.
<Hanmac> shoundt you also compare the type, so an "Housed" and a "nude" slug?
echobin97 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
khismetix has joined #ruby
<hoelzro> well, of course
<hoelzro> I thought that was implied!
<regedarek> what it is ruler?
staafl_alt has quit [Ping timeout: 276 seconds]
<at_> Hi, I'm using data.unpack('v*')[0] to get the integer value of certain hex data. The problem is when data is just a byte (that obviously I get nil)
Tn6o has quit [Quit: Lost terminal]
<at_> any way to add get the integer data (little endian) of any set of hex bytes?
AndChat| has joined #ruby
`gregorg` has quit [Changing host]
`gregorg` has joined #ruby
`gregorg` is now known as gregorg
atmosx has joined #ruby
noxoc has joined #ruby
<Hanmac> >> "abc".each_byte.to_a
<eval-in> Hanmac => [97, 98, 99] (http://eval.in/12157)
<hemanth> Hanmac++
<at_> Hanmac: umm Hanmac I'm not sure If that's what I want
khismetix has quit [Quit: Computer has gone to sleep.]
Guest__ has joined #ruby
<at_> data could be for instance '\x00\xAA\x10\x01'
Banistergalaxy has quit [Ping timeout: 276 seconds]
rdark has joined #ruby
Guest__ has left #ruby [#ruby]
lkba has quit [Ping timeout: 245 seconds]
<apeiros_> .bytes.to_a
<apeiros_> less work in ruby2, compatible with 1.9
<at_> then I would need to get the decimal value of \x01\x10\xAA\x00 (little endian)
<apeiros_> at_: unpack
ozgura has joined #ruby
<at_> apeiros_: hi yes. if I do data.unpack('v*')[0] works fine
<at_> but data could be just one byte and in that case you can not use v*
<apeiros_> at_: I told you the answer yesterday already…
<apeiros_> 22:03 apeiros_: v needs 2 bytes
<apeiros_> 22:03 apeiros_: if you want to unpack 1 byte, use the proper template string. e.g. "C"
<at_> apeiros_: sorry I didn't read that
<at_> apeiros_: so I have to previosuly check the number of bytes right ?
<apeiros_> yes
<Hanmac> at_ there is a diff between: '\x00\xAA\x10\x01' and "\x00\xAA\x10\x01"
<at_> to choose the correct template
<at_> Hanmac:, apeiros_ thank you so much
<Hanmac> >> "\x00\xAA\x10\x01".each_byte.to_a, "\x00\xAA\x10\x01".unpack("C*")
<eval-in> Hanmac => /tmp/execpad-54e6d4433e59/source-54e6d4433e59:2: syntax error, unexpected '\n', expecting :: or '[' or '.' (http://eval.in/12158)
<Hanmac> >> ["\x00\xAA\x10\x01".each_byte.to_a, "\x00\xAA\x10\x01".unpack("C*")]
<eval-in> Hanmac => [[0, 170, 16, 1], [0, 170, 16, 1]] (http://eval.in/12159)
timmow has joined #ruby
timmow has quit [Read error: Connection reset by peer]
timmow has joined #ruby
sttau has joined #ruby
takeru has joined #ruby
anderse has joined #ruby
anderse has quit [Client Quit]
icole has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 248 seconds]
rippa has quit [Ping timeout: 240 seconds]
takeru has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby
sepp2k has quit [Remote host closed the connection]
jgrevich has quit [Remote host closed the connection]
bradhe has joined #ruby
sepp2k has joined #ruby
connor_ has joined #ruby
statarb3 has quit [Ping timeout: 272 seconds]
nari has joined #ruby
skattyadz has joined #ruby
hemanth_ has joined #ruby
peterhellberg has joined #ruby
khismetix has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<fuzai> https://github.com/eventmachine/evma_httpserver#readme how would I adapt that to reply with an http: 301 response? Is it possible with this library or should I just write my own socket handler?
atyz has quit [Quit: Leaving...]
aaronmcadam has joined #ruby
peterhellberg has quit [Remote host closed the connection]
samphippen has joined #ruby
mark9 has quit [Quit: ÿþG]
soc42 has quit [Remote host closed the connection]
mark9 has joined #ruby
noxoc has quit [Quit: noxoc]
joshman_ has quit [Quit: Computer has gone to sleep.]
noxoc has joined #ruby
connor_ has quit [Ping timeout: 245 seconds]
mark9 has quit [Client Quit]
Eldariof-ru has joined #ruby
ezkl has quit [Quit: Textual IRC Client: www.textualapp.com]
lewix has quit [Remote host closed the connection]
Al_ has quit [Quit: Al_]
slainer6_ has joined #ruby
eldariof has quit [Ping timeout: 276 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
Clownz has quit [Ping timeout: 245 seconds]
clocKwize has quit [Quit: clocKwize]
love_color_text has quit [Read error: Connection reset by peer]
mark9 has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
mark9 has quit [Client Quit]
Al_ has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
mark9 has joined #ruby
atyz has joined #ruby
sttau has quit [Remote host closed the connection]
mark9 has quit [Client Quit]
chendo_ has quit [Ping timeout: 276 seconds]
chendo_ has joined #ruby
Clownz has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
_Extreme has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
one has quit [Ping timeout: 276 seconds]
drale2k has quit [Quit: Leaving...]
Skylab has joined #ruby
mark9 has joined #ruby
Xeago has joined #ruby
<mark9> ÿþ/
lewix_ has joined #ruby
chipotle_ has joined #ruby
Spooner_ has joined #ruby
jprovazn has joined #ruby
mark9 has quit [Client Quit]
AndChat| has quit [Ping timeout: 256 seconds]
mark9 has joined #ruby
lewix has quit [Ping timeout: 260 seconds]
Banistergalaxy has joined #ruby
takano16_ has quit [Remote host closed the connection]
BizarreCake has joined #ruby
lkba has joined #ruby
echobinary has joined #ruby
echobin97 has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
lewix_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
Al_ has quit [Quit: Al_]
banjara1 has joined #ruby
bradhe has joined #ruby
mark9 has quit [Quit: irssi]
mark9 has joined #ruby
VinceThePrince has joined #ruby
mark9 has quit [Client Quit]
hogeo has quit [Remote host closed the connection]
JMcAfreak has quit [Remote host closed the connection]
banjara1 has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
a_a_g has joined #ruby
zomgbie has joined #ruby
soulcake has quit [Quit: ZNC - http://znc.in]
JMcAfreak has joined #ruby
BizarreCake has quit [Remote host closed the connection]
soulcake has joined #ruby
tomzx_mac has joined #ruby
Michae___ has joined #ruby
gyre008 has joined #ruby
skattyadz_ has joined #ruby
fermion has joined #ruby
skattyadz has quit [Ping timeout: 276 seconds]
skattyadz_ is now known as skattyadz
Virunga has joined #ruby
wreckimnaked has quit [Ping timeout: 240 seconds]
<aep> hm. lib/sass/util.rb:633:in `force_encoding': unknown encoding name - BINARY (ArgumentError)
<Hanmac> aep ... hm that should not happen ... try to change it to "Binary" maybe this works
samphippen has quit [Quit: Computer has gone to sleep.]
<aep> i'm pretty sure i screwed up compiling ruby
<aep> i dont understand how those encodings are supposed to appear in ruby
love_color_text has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
samphippen has joined #ruby
<Hanmac> aep .. so you have an general encoding question or why its looks broken in sass?
<Hanmac> aep how did you install ruby? with rvm?
Eldariof93-ru has joined #ruby
skattyadz has quit [Quit: skattyadz]
<aep> no, i compiled it manually inside a different platform that doesn't do chroot compiling, so i had to rewrite the makefiles :/
skattyadz has joined #ruby
<aep> i think i'm missing stuff from enc/, but i can't figure out how its supposed to be glued into the main executable. i.e. what calls this stuff
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<aep> there is Init_encdb, but its called from nowhere
Eldariof-ru has quit [Ping timeout: 255 seconds]
connor_ has joined #ruby
icole has joined #ruby
<Hanmac> ... aep just compile the ruby currect and nothing will harm
<Hanmac> or use a launchpad repository
lahwran has quit [Quit: ZNC - http://znc.sourceforge.net]
<aep> there are more platforms in this universe than ubuntu, but yeah, i get the hint
Alecs has quit [Read error: Connection reset by peer]
<Hanmac> otherwise its like "hi, i removed the motor, and now the car does not start, but i dont know why"
Domon has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
n25 has joined #ruby
VinceThePrince has quit [Remote host closed the connection]
n25 has left #ruby [#ruby]
connor_ has quit [Ping timeout: 260 seconds]
icole has quit [Ping timeout: 248 seconds]
yashshah has joined #ruby
Kichael has quit [Ping timeout: 260 seconds]
banister`sleep has quit [Remote host closed the connection]
tvw has joined #ruby
clooth has quit [Ping timeout: 240 seconds]
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
<aep> Hanmac: well, what is your prefered method of porting to an os not supported by automake?
emocakes has joined #ruby
utf1000 has quit [Ping timeout: 276 seconds]
araujo has quit [Remote host closed the connection]
Skylab has quit [Quit: Skylab]
<Hanmac> you mean an OS that was invented before the Wheel or was it before the Fire was taken from the Gods?
[eDu] has joined #ruby
Clownz has quit [Ping timeout: 276 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
Al_ has joined #ruby
lahwran has joined #ruby
araujo has joined #ruby
Eldariof28-ru has joined #ruby
banjara has quit [Quit: Leaving.]
Eldariof93-ru has quit [Read error: Operation timed out]
banister`sleep has joined #ruby
yacks has quit [Ping timeout: 272 seconds]
<hoelzro> tagrudev: you could probably use /\b...\b/
<hoelzro> "St Awesome".gsub(/\bS\b/, 'No')
<hoelzro> >> "St Awesome".gsub(/\bS\b/, 'No')
<eval-in> hoelzro => "St Awesome" (http://eval.in/12221)
<hoelzro> >> "St Awesome".gsub(/\bSt\b/, 'No')
<eval-in> hoelzro => "No Awesome" (http://eval.in/12222)
<tagrudev> hoelzro, ty
clooth has joined #ruby
Adys has quit [Read error: Connection reset by peer]
bonhoeffer has quit [Quit: bonhoeffer]
bradhe has joined #ruby
Adys has joined #ruby
utf1000 has joined #ruby
bonhoeffer has joined #ruby
kofno has joined #ruby
bonhoeffer has quit [Client Quit]
smt has joined #ruby
gommo has joined #ruby
luckyruby has joined #ruby
lkba has quit [Remote host closed the connection]
mark9 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
zomgbie has quit [Ping timeout: 256 seconds]
locriani has quit [Ping timeout: 272 seconds]
Virunga has quit [Remote host closed the connection]
nkr has joined #ruby
clooth has quit [Ping timeout: 276 seconds]
echobin13 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
r0bby has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Ping timeout: 260 seconds]
tcurdt has joined #ruby
orien has joined #ruby
tcurdt has quit [Client Quit]
lewix has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 250 seconds]
clooth has joined #ruby
BizarreCake has joined #ruby
chussenot has quit [Quit: chussenot]
phretor has joined #ruby
zomgbie has joined #ruby
phretor has quit [Remote host closed the connection]
testingb0t1 has joined #ruby
testingb0t has quit [Ping timeout: 240 seconds]
skattyadz_ has joined #ruby
devdazed has quit [Ping timeout: 245 seconds]
eldariof has joined #ruby
Takehiro has joined #ruby
skattyadz_ has quit [Client Quit]
skattyadz has quit [Ping timeout: 255 seconds]
a_a_g1 has joined #ruby
devdazed has joined #ruby
Eldariof28-ru has quit [Ping timeout: 248 seconds]
mysterty has joined #ruby
zomgbie has quit [Ping timeout: 248 seconds]
yacks has joined #ruby
<mysterty> Hello, i'm installing gitlab on my fresh installed server, and i have an error : " An error occurred while installing mysql2 (0.3.11), and Bundler cannot continue.
<mysterty> Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling. "
<mysterty> but I have already mysql installed
<mysterty> and i don't know about a "mysql 2"
a_a_g has quit [Ping timeout: 240 seconds]
<mysterty> what is it exactly ?
hybris has joined #ruby
Blaze_Boy has joined #ruby
smt has quit [Ping timeout: 276 seconds]
<mysterty> (i don't know ruby, i'm php dev)
<JonnieCache> the 2 refers to the new version of the mysql adaptor
<whitequark> mysterty: sudo apt-get install libmysqlclient-dev && bundle
<JonnieCache> its not referring to a new version of mysql itself
<tobiasvl> mysterty: php?! you have my condolences
AzizLight has joined #ruby
<AzizLight> Hi everybody
<AzizLight> is it possible to convert a Hash into an object in ruby?
<AzizLight> without monkey patching that is
<wobblini> AzizLight: a hash is an object
<mysterty> whitequark, JonnieCache, so, it's just a kind of "plugin" for ruby to communicate with mysql ?
<JonnieCache> exactly
<JonnieCache> its a Gem, which is how ruby packages code
<mysterty> tobiasvl, yes, i know, i'm strongly thinking about switching to ruby or python or java :p
<JonnieCache> mysql2 is a LOT better than the original mysql gem
<AzizLight> wobblini: everything is an object in ruby, I know that. What I want is to access the Hash keys with the dot notation not the hash[:key] notation
<mysterty> JonnieCache, thx !
orien has quit [Quit: Computer has gone to sleep.]
<wobblini> AzizLight: have a look at OpenStruct (require 'ostruct') -- that might help. you can initialize an ostruct with a hash and then the ostruct has those methods with those values.
<tobiasvl> AzizLight: look at method_missing
dawkirst has quit [Quit: Leaving]
<tobiasvl> or maybe ostruct is a better idea
yshh_ has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
<wobblini> AzizLight: OpenStruct won't work with all hash keys, though (for example, not numbers)
atno has quit [Quit: Leaving]
Bira has joined #ruby
<wobblini> AzizLight: it basically wants symbols or strings, or anything with a to_sym method
Xeago_ has joined #ruby
Xeago has quit [Killed (calvino.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
<wobblini> AzizLight: then again, you probably aren't expecting to create a method called 123 anyway.
apeiros_ has quit []
<mysterty> I have this error : http://pastebin.com/CCY5yb18 , but i don't understand what to do :s
binaryplease has joined #ruby
atno has joined #ruby
<atmosx> mysterty: is this freebsd?
<mysterty> atmosx, ubuntu 12.04
<AzizLight> wobblini: thanks a lot
<atmosx> you need to install some libraries, don't know you call them in ruby
blaxter has quit [Ping timeout: 246 seconds]
skattyadz has joined #ruby
<mysterty> how i could know what libraries are missing ?
<atmosx> it's a library or path issue. if it's ubuntu probably it's a library issue
apeiros_ has joined #ruby
<atmosx> Google it, I have no idea. These are mysql related libs
<atmosx> do you mysql installed?
<mysterty> yes, i have mysql installed
<atmosx> sudo apt-get install libmysqlclient-dev libmysqlclient16
<atmosx> or maybe libmysqlclient18
<atmosx> depends on the installed version
mootpointer has joined #ruby
kristofers has joined #ruby
bradhe has joined #ruby
kofno has quit [Remote host closed the connection]
<mysterty> atmosx, i'm looking
kofno has joined #ruby
carloslopes has joined #ruby
Mon_Ouie has joined #ruby
<Hanmac> yeah ... nobu +1 one of my tickets
<mysterty> atmosx, yes, it's18
<becom33> how can write a one like if else
<becom33> line *
<mysterty> atmosx, it works now, thx :)
<atmosx> np :-)
adkron has joined #ruby
adkron_ has joined #ruby
AzizLight has quit [Remote host closed the connection]
aaronmcadam has quit [Quit: Linkinus - http://linkinus.com]
kpshek has quit []
<whitequark> becom33: foo ? true : false
<Hanmac> atmosx: apt-get install libmysqlclient-dev should resolv to the currect lib version
Virunga has joined #ruby
<atmosx> Hanmac: I don't really care :-P I don't use ubuntu
sailias has joined #ruby
<atmosx> Hanmac: but it should
<becom33> whitequark, if 1==1 ? puts "its true " : calling_demo_method(false) gives me syntax error, unexpected ':', expecting keyword_end
otherj has joined #ruby
<Hanmac> becom33 its because of the puts ... you need puts()
<becom33> Hanmac, oh let me try that
emocakes has quit [Quit: emocakes]
Bira has quit [Ping timeout: 250 seconds]
charliesome has quit [Ping timeout: 240 seconds]
enroxorz has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
mikurubeam has quit [Ping timeout: 250 seconds]
<Hanmac> mysterty: there is also an ruby-mysql package on 12.10 ... it does include both gem versions for 1.8 and 1.9
<becom33> Hanmac, 1==1 ? puts("its true) " : calling_demo_method(false) doesnt work either
malte_ has quit [Quit: malte_]
<becom33> shit
<becom33> wai
<becom33> wait
philcrissman has joined #ruby
hemanth has joined #ruby
dorei has joined #ruby
<becom33> Hanmac, works perfectly thanks bro
johnnygoodmancpa has joined #ruby
atno has quit [Quit: Leaving]
forced_request has joined #ruby
io_syl has quit [Ping timeout: 260 seconds]
atno has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
adkron_ has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
Bira has joined #ruby
wreckimnaked has joined #ruby
banister`sleep has quit [Remote host closed the connection]
enroxorz is now known as Hank-Hill
adkron has quit [Ping timeout: 276 seconds]
io_syl has joined #ruby
jurassic has quit [Quit: jurassic]
sailias has quit [Quit: Leaving.]
johnnygoodmancpa has left #ruby [#ruby]
NiteRain has quit [Ping timeout: 246 seconds]
chussenot has joined #ruby
binaryplease has quit [Ping timeout: 255 seconds]
ffranz has joined #ruby
sambao21 has joined #ruby
Faris has joined #ruby
eldariof has quit []
oposomme is now known as oposomme|away
<Faris> what is "www.modruby.net" ?
hemanth_ has quit [Read error: Connection reset by peer]
_hemanth has joined #ruby
_hemanth has quit [Read error: Connection reset by peer]
<fuzai> http://ruby-doc.org/stdlib-1.9.2/libdoc/resolv/rdoc/Resolv.html <- how do I make getaddress to not halt my program if it fails?
<tobiasvl> Faris: evidently nothing to do with ruby the programminbg language
echobin13 has quit [Read error: Connection reset by peer]
<Spooner_> fuzai, Put it in a begin/rescue/end?
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
echobinary has joined #ruby
<fuzai> looking into it now thank you
<Faris> tobiasvl, is japanese a requirement for ruby programming ?
<Spooner_> Of course not! Ha!
<fuzai> yep
<fuzai> get google translate handy :)
<fuzai> "こんにちはルビー"を置く
[eDu] has quit [Quit: [eDu]]
terrorpup has quit [Ping timeout: 260 seconds]
mootpointer has quit [Quit: Computer has gone to sleep.]
heliumsocket has joined #ruby
mark_locklear has joined #ruby
<slainer6_> みなさんこんにちは!
hemanth has quit [Read error: Connection reset by peer]
<tobiasvl> Faris: no, not at all
hemanth has joined #ruby
<Hanmac> there are different level of ruby understanding: "i understand my code, i understand others code, i understand Hanmacs code" :P
<fuzai> こんにちはどのようにあなたは私はほとんど常に、Googleがオープン翻訳したので一日一回についてチャットで私を訪問し、東京から友人を持って、です!
<slainer6_> Faris: はい、あなたは日本語を話す必要があります!
hasimo has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
robustus has quit [Ping timeout: 248 seconds]
wobblini has quit [Ping timeout: 255 seconds]
<fuzai> すべての言語を話す!
binaryplease has joined #ruby
predator217 has quit [Quit: Lost terminal]
predator117 has joined #ruby
nfk has joined #ruby
<lsoa> Hanmac: good morning
robustus has joined #ruby
atmosx has quit [Quit: And so the story goes…]
<fuzai> おはようみんな!
casheew has quit [Read error: Connection reset by peer]
<Hanmac> lsoa depends on the local time ... its now 14:12 for me
casheew has joined #ruby
mootpointer has joined #ruby
<lsoa> Hanmac: so I just found out about ffi... have you used it? Any issues I should be aware of?
yacks has quit [Ping timeout: 260 seconds]
bonhoeffer has joined #ruby
<lsoa> local time is the only time :D
v0n has joined #ruby
<lsoa> I don't believe in timezones, this is liberal propaganda.
banister`sleep has joined #ruby
<Hanmac> lsoa i have seen it, but because the libs i bind are in C++, FFI does not work for me ... and i want to take control over when an object is destroyed or GC'd
slainer68 has joined #ruby
cmarques has joined #ruby
<whitequark> lsoa: but what if you have several local times
<lsoa> whitequark: blame obama.
<whitequark> lsoa: but what if it's russia
<whitequark> oh well
mootpointer has quit [Client Quit]
eliasp has quit [Ping timeout: 256 seconds]
daniel_- has quit [Ping timeout: 276 seconds]
<lsoa> Hanmac: I see. I'll give it a try since my lib is in C
bradhe has joined #ruby
<Hanmac> i also have an bind of a C-lib, but because to keep the result more rubyish i have an C++ binding between it
bonhoeffer has quit [Ping timeout: 245 seconds]
slainer6_ has quit [Ping timeout: 272 seconds]
anonymuse has joined #ruby
io_syl has quit [Ping timeout: 272 seconds]
m8 has joined #ruby
zomgbie has joined #ruby
<dorei> Hanmac: why not a ruby wrapper around the C-bind that will make the results more rubyish?
girija has quit [Ping timeout: 276 seconds]
<Hanmac> dorei: others use swig and then they need several ruby scripts because the result is shitty ... my bindings are beautyful ... inside and out
heliumsocket has quit [Quit: heliumsocket]
imami|afk is now known as banseljaj
<Hanmac> "its 12 o' Clock and everything is okay" "And what if is not everything okay?" "Then look for another street"
Morkel has quit [Quit: Morkel]
fire has joined #ruby
yacks has joined #ruby
moos3 has joined #ruby
<banister`sleep> Hanmac: did u know about this? https://gist.github.com/c8ad3aa95155fcff16c5
<hemanth> banister`sleep, meow! Did you see vectorshevels around?
khismetix has quit [Quit: Computer has gone to sleep.]
<banister`sleep> hemanth: no, i dont even know who he is
yashshah has quit [Read error: Connection reset by peer]
swex_ has joined #ruby
yashshah has joined #ruby
<hemanth> banister`sleep, lol ok!
<banister`sleep> Hanmac: im on ruby 2.0
chussenot has quit [Quit: chussenot]
<Hanmac> hm i am on 2.1.0 ... maybe it was fixed
swex has quit [Ping timeout: 276 seconds]
krawchyk has joined #ruby
<Hanmac> https://twitter.com/thezdi/status/309771882612281344 "The first thing I did was break into the sandbox, the next thing I did was break out"
zomgbie has quit [Ping timeout: 255 seconds]
mysterty has quit [Quit: Allez, salut les toons !]
zomgbie has joined #ruby
<hemanth> :D
<banister`sleep> Hanmac: ruby 2.1.0 ???
hemanth has quit [Read error: Connection reset by peer]
geekbri has joined #ruby
Faris has quit [Ping timeout: 245 seconds]
<Hanmac> banister i using trunk/daily/nighty/git-repo
connor_ has joined #ruby
c6der has joined #ruby
hemanth has joined #ruby
lsoa has quit [Quit: Lost terminal]
chussenot has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
bradhe has quit [Ping timeout: 256 seconds]
binaryplease has joined #ruby
<hemanth> mkmf vs inline(:C)
<hemanth> inline is supposed to bad, right?
<banister`sleep> nothing bad about it
mikecmpbll has joined #ruby
samphippen has joined #ruby
<hemanth> needs a gem install inline?
* Hanmac still prefers C++ code
pskosinski has joined #ruby
connor_ has quit [Ping timeout: 260 seconds]
<whitequark> Hanmac: it doesn't make sense
newUser1234 has joined #ruby
<hemanth> Hanmac where in specific?
<whitequark> there isn't a matter of preference or not. C has a well-defined ABI on any platform, and everything knows to interface with it. C++, on the other hand... mostly does. And nothing can interface with it due to sheer complexity of the beast.
<Hanmac> hemanth & whitequark: for my bindings, because my binded libs are C++ too
daniel_- has joined #ruby
seitensei has joined #ruby
a_a_g has joined #ruby
banseljaj is now known as imami|afk
<hemanth> hmm
skattyadz has quit [Quit: skattyadz]
v0n has quit [Ping timeout: 260 seconds]
a_a_g1 has quit [Ping timeout: 240 seconds]
pac1 has quit [Ping timeout: 260 seconds]
_maes_ has joined #ruby
h8R has joined #ruby
iamjarvo has quit [Quit: Leaving.]
<banister`sleep> Hanmac: ah ok
feedbackloop has joined #ruby
codecop has quit [Quit: Išeinu]
eldariof has joined #ruby
wmoxam has joined #ruby
Drager has quit [Ping timeout: 248 seconds]
eldariof has left #ruby [#ruby]
puppeh has quit [Remote host closed the connection]
solidoodlesuppor has joined #ruby
<apeiros_> Off-topic: does anybody have good resources about spam with regards to your own company? i.e. what do you do to not be considered spam, how to stop spoofers (e.g. via SPF) etc.? (cross posting in #rubyonrails)
elux has joined #ruby
<hemanth> Invalid gemspec in [/Library/Ruby/Gems/1.8/specifications/ZenTest-4.9.0.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
<hemanth> anyone facing that?
Hank-Hill is now known as ArchBeOS
yfeldblum has quit [Ping timeout: 248 seconds]
skattyadz has joined #ruby
<banister`sleep> how is this possible? ::ActionController::Metal.instance_method(:send_action).source_location #=> nil
johnnygoodmancpa has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<apeiros_> banister`sleep: eval?
<Hanmac> ... nil for source_location meint meistens das die methode in C++ compliert is ...
<Hanmac> ... ups wrong language
hemanth has joined #ruby
<whitequark> not sure if c++ or german
<banister`sleep> apeiros_: i dont think anything except C methods can have a nil source_location
Drager has joined #ruby
sie has joined #ruby
mengu has joined #ruby
<johnnygoodmancpa> "nothing for source_location means mostly that the method in C++ compilers is…."
bradhe has joined #ruby
<johnnygoodmancpa> my german is bad, but that's the google translation, done by a human :)
sie has left #ruby ["WeeChat 0.3.9.2"]
<banister`sleep> Hanmac: lol hahaha
<banister`sleep> Hanmac: you exploded german all over my screen
<banister`sleep> wipe it up pls
zomgbie has quit [Quit: Lost terminal]
<banister`sleep> bbs
banister`sleep has quit [Remote host closed the connection]
binaryplease has quit [Quit: WeeChat 0.4.0]
echobinary has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
echobinary has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
ananthakumaran2 has quit [Quit: Leaving.]
dustint has joined #ruby
Astral__ has joined #ruby
axhlf has quit [Ping timeout: 240 seconds]
invisime has joined #ruby
buscon has quit [Quit: Leaving]
axhlf has joined #ruby
Coolhand has joined #ruby
Astral_ has quit [Ping timeout: 256 seconds]
c6der has quit [Ping timeout: 272 seconds]
alx- has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
axhlf has quit [Ping timeout: 260 seconds]
BizarreCake has quit [Ping timeout: 260 seconds]
ozgura has joined #ruby
zomgbie has joined #ruby
axhlf has joined #ruby
PragCypher has joined #ruby
puppeh has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
ffranz has quit [Quit: Leaving]
BizarreCake has joined #ruby
ffranz has joined #ruby
sailias has joined #ruby
johnnygoodmancpa has left #ruby [#ruby]
adkron has joined #ruby
adkron_ has joined #ruby
bradhe has quit [Ping timeout: 250 seconds]
takeru has joined #ruby
pdamer has joined #ruby
zomgbie has quit [Quit: leaving]
zomgbie has joined #ruby
hasimo has joined #ruby
sk87 has left #ruby [#ruby]
jerius has joined #ruby
daniel_- has quit [Ping timeout: 245 seconds]
axhlf has quit [Ping timeout: 245 seconds]
c6der has joined #ruby
Mattix has joined #ruby
sailias has quit [Ping timeout: 272 seconds]
khismetix has joined #ruby
chussenot has quit [Quit: chussenot]
takeru has quit [Ping timeout: 260 seconds]
yashshah has quit [Read error: Connection reset by peer]
LBRapid has quit [Quit: ZNC - http://znc.sourceforge.net]
khismetix has quit [Client Quit]
Drager has quit [Changing host]
Drager has joined #ruby
<hemanth> I'm getting an extra nil
LBRapid has joined #ruby
hasimo has quit [Ping timeout: 248 seconds]
<maxmanders> When would I choose to use string.scan(/regex/).flatten versus string.match(/regex/).catpures - I believe they both return an array of matched groups?
asobrasil has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
Illusioneer has joined #ruby
<apeiros_> .match always only gives you the first match
<apeiros_> also .flatten'ing a scan result seems like a bad idea to me
gaahrdner has joined #ruby
<apeiros_> at least I see no use-case where that's more useful than retain the array of arrays
DrCode has quit [Ping timeout: 276 seconds]
tk__ has joined #ruby
banister`sleep has joined #ruby
<maxmanders> Okay - well let me ask a different question - given a string and a regex containing many match groups; what's the best way to return those match groups as an array
breakingthings has joined #ruby
<apeiros_> define 'best'.
<apeiros_> scan will do that
otherj has quit []
noop has quit [Remote host closed the connection]
<maxmanders> A contrived non practical example: "2013-03-08".<something>(/(\d{4})\-(\d{2})\-(d{2})/)… and by best - I mean idiomatic to Ruby
axhlf has joined #ruby
<apeiros_> you don't have multiple matches there
<maxmanders> i.e. I realise for this example, regex wouldn't be the way to go… but just as something concrete
sailias has joined #ruby
mark9 has left #ruby [#ruby]
a_a_g has quit [Quit: Leaving.]
<apeiros_> if you expect only a single match (which can have multiple captures, that's unrelated)
<maxmanders> One matching group for (\d{4}); one for (\d{2}) and one for (\d{2}) - three
<apeiros_> then you use String#match
<maxmanders> Apologies - wrong word… I meant capture group rather than match.
<apeiros_> str.match(regex).captures is the same as str.scan(regex).first
shock_one has joined #ruby
<apeiros_> well, almost, the former can explode if you don't have a match (since you'd call nil.captures)
adkron has quit [Ping timeout: 245 seconds]
adkron_ has quit [Ping timeout: 245 seconds]
seitensei has quit [Quit: Leaving...]
<maxmanders> Okay, so String#match will return an object that I can use #captures[N] on to return the Nth capture?
khismetix has joined #ruby
<apeiros_> maxmanders: ri MatchData
a_a_g has joined #ruby
<maxmanders> apeiros_: thanks - I should rtfm ;-)
Es0teric has joined #ruby
<shock_one> What is the most elegant way to make Dir.chdir execute the attached block in current directory, if the argument directory doesn't exist?
Drager has quit [Ping timeout: 260 seconds]
Es0teric has quit [Client Quit]
connor_ has joined #ruby
ffranz has quit [Quit: Leaving]
sleetdrop has joined #ruby
dallasm has joined #ruby
<Spooner_> Make the block into a method (or lambda) and if File.directory? bleh; Dir.chdir(bleh) { meth }; else; meth; end
aganov has quit [Remote host closed the connection]
tagrudev has quit [Quit: Me = Awesome]
<Spooner_> shock_one: Or maybe: target_dir = File.directory?(bleh) ? bleh : "."
<apeiros_> Dir.chdir(File.directory?(path) ? path : '.') { … }
noxoc has quit [Quit: noxoc]
yfeldblum has joined #ruby
aed has joined #ruby
connor_ has quit [Ping timeout: 260 seconds]
fire has quit [Quit: WeeChat 0.4.0]
DrCode has joined #ruby
<shock_one> That's what I thought. More direct question — how to remove code duplication in this file? https://github.com/rails/rails/blob/master/install.rb
ffranz has joined #ruby
Drager has joined #ruby
xeronic has joined #ruby
gommo has quit [Remote host closed the connection]
freeayu has quit [Remote host closed the connection]
mockra has joined #ruby
<apeiros_> shock_one: backspace ;-p
haxrbyte has joined #ruby
khismetix has quit [Ping timeout: 252 seconds]
heliumsocket has joined #ruby
chussenot has joined #ruby
<apeiros_> I find `gem build rails.gemspec` etc. problematic
Michae___ has quit [Remote host closed the connection]
<apeiros_> the gem executable isn't necessary named `gem`
bradhe has joined #ruby
<apeiros_> c.f. jgem, gem18, gem19, gem1.9 etc.
philcrissman has quit [Remote host closed the connection]
<apeiros_> also, no need to shell out for rm. File.unlink/File.delete works fine.
caveat- has joined #ruby
<apeiros_> shock_one: example for a better, less brittle gem build: Gem::GemRunner.new.run ['build', Dir.glob('*.gemspec').first]
<shock_one> I always suspected that dhh is a lousy programmer.
<apeiros_> I refrain from commenting that :D
<apeiros_> also no check on whether installing actually worked… %-(
arturaz has quit [Remote host closed the connection]
heliumsocket has quit [Ping timeout: 276 seconds]
<apeiros_> but why'd you use install.rb and not install via rubygems anyway?
v0n has joined #ruby
<xeronic> hello, i want to write a program that shows images on the screen (not in a form). Can anyone give me a direction on where to start?
<banister`sleep> shock_one: 'does git blame' say that he wrote that code?
<Spooner_> xeronic, Do you want a game or a GUI app?
<shock_one> I just have nothing better to do than reading rails code.
<xeronic> Spooner_: a GUI app
hemanth has quit [Read error: Connection reset by peer]
Progster_x has joined #ruby
c6der has quit [Ping timeout: 276 seconds]
haxrbyte_ has joined #ruby
hemanth has joined #ruby
<shock_one> banister`sleep, Didn't know about this thing. It's pretty cool.
<banister`sleep> shock_one: noob
<xeronic> And I want just the image to show, not the form.
<banister`sleep> :P
Progster_x_t has joined #ruby
Progster has quit [Ping timeout: 276 seconds]
Progster_x_t is now known as Progster
<Spooner_> Though those are not a good list. green_shoes gem is better than shoes and FXRuby is long dead (and broken).
jtharris has joined #ruby
xbob has quit [Quit: Leaving]
huoxito has joined #ruby
etank has quit [Ping timeout: 276 seconds]
engel has quit [Read error: Connection reset by peer]
hemanth has quit [Client Quit]
ArchBeOS is now known as Paul-Atreides
haxrbyte has quit [Ping timeout: 260 seconds]
etank has joined #ruby
iamjarvo has joined #ruby
frem has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Progster_x has quit [Ping timeout: 276 seconds]
casheew has joined #ruby
atyz has quit [Quit: Leaving...]
sambao21 has quit [Quit: Quitter]
caveat- has quit [Ping timeout: 255 seconds]
<xeronic> Spooner_: Thanks! You dont happen to know which is "the best" framework? Shoes is the most popular but I dont think it is active anymore. You know if any is capable of showing images/text on the screen, maybe on a transparent form?
yshh has joined #ruby
<Spooner_> green_shoes, as I said, is the up-to-date version of shoes (and is a gem).
sambao21 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
generalissimo has joined #ruby
<Spooner_> Doubt any of them can have transparent windows. All should allow forms though.
<shock_one> xeronic, can you use a different language? Because ruby isn't the most suitable for GUI apps.
<Spooner_> I played with wxruby recently and it seemed OK.
NiteRain has joined #ruby
lolmaus has joined #ruby
nateberkopec has joined #ruby
<Spooner_> shock_one, There is nothing wrong with Ruby as a GUI application. It is just that not many people are keen to keep GUI bindings up to date, it seems!
<wmoxam> xeronic: gosu ?
<wmoxam> xeronic: http://www.libgosu.org/
DaltonUS has joined #ruby
DaltonUS has quit [Client Quit]
c6der has joined #ruby
Takehiro has quit [Remote host closed the connection]
casheew has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
jprovazn has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 272 seconds]
enebo has joined #ruby
krawchyk_ has joined #ruby
Goles has joined #ruby
_nitti has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
[eDu] has joined #ruby
echobinary has joined #ruby
banister`sleep has quit [Remote host closed the connection]
Paul-Atreides is now known as ArchBeOS
<epta> execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
<xeronic> Thanks for all tips, I think I'll check out green_shoes
<epta> What am I doing wrong?
krawchyk has quit [Ping timeout: 276 seconds]
Takehiro has joined #ruby
mmitchell has joined #ruby
Takehiro has quit [Remote host closed the connection]
arietis has joined #ruby
<MrZYX> epta: did you read that link?
JMcAfreak has quit [Remote host closed the connection]
mmitchell has quit [Read error: Connection reset by peer]
a_a_g has quit [Quit: Leaving.]
stopbit has joined #ruby
JMcAfreak has joined #ruby
JMcAfreak has quit [Remote host closed the connection]
mmitchell has joined #ruby
<epta> MrZYX: should I install another gem? One of these?
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
JMcAfreak has joined #ruby
<epta> Or what it wants that I'll do
<MrZYX> epta: iirc only half of the ones listed are gems
<epta> Ok, I'll better install execjs's ebuild with all depends
dallasm has quit [Remote host closed the connection]
F1skr has joined #ruby
puppeh has quit [Remote host closed the connection]
S1kx has quit [Quit: Leaving]
statarb3 has quit [Ping timeout: 264 seconds]
girija has joined #ruby
__Big0__ has joined #ruby
yalue has joined #ruby
Criztian has quit [Remote host closed the connection]
zomgbie has quit [Ping timeout: 260 seconds]
clooth has quit [Quit: clooth]
CreativeEmbassy has joined #ruby
carlyle has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Mathieu has quit [Ping timeout: 260 seconds]
casheew has joined #ruby
clooth has joined #ruby
c6der has quit [Ping timeout: 245 seconds]
casheew has quit [Read error: Connection reset by peer]
failshell has joined #ruby
axl_ has joined #ruby
angle has joined #ruby
Grieg has left #ruby [#ruby]
D4T has joined #ruby
girija has quit [Ping timeout: 248 seconds]
casheew has joined #ruby
chrishough has joined #ruby
jlast has joined #ruby
newUser1234 has quit [Remote host closed the connection]
philcrissman has joined #ruby
newUser1234 has joined #ruby
<pskosinski> gem install rest-client, then I want to require 'rest_client', error, no such file…
<pskosinski> what the…
clooth has quit [Quit: clooth]
tjbiddle has joined #ruby
chrishough has quit [Client Quit]
<pskosinski> I tried require 'rest-client' too
<pskosinski> Long time ago I was installing it on desktop using gem and it's still working. Now I wanted to install on different machine, not working
atmosx has joined #ruby
<MrZYX> looks like require 'restclient' could work https://github.com/rest-client/rest-client/blob/master/lib/restclient.rb
casheew has quit [Read error: Connection reset by peer]
preyalone has joined #ruby
<pskosinski> Doesn't work either :(
adkron has joined #ruby
<preyalone> Anyone use contracts.ruby? I'm trying to write contracts for my class initializers, but I'm getting errors.
jbueza has quit [Quit: Leaving.]
tjbiddle_ has joined #ruby
casheew has joined #ruby
Morkel has joined #ruby
punkrawkR has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
newUser1234 has quit [Ping timeout: 252 seconds]
hemanth has joined #ruby
c6der has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Criztian has joined #ruby
tcstar has joined #ruby
bradhe has joined #ruby
tjbiddle has quit [Ping timeout: 264 seconds]
tjbiddle_ is now known as tjbiddle
banister`sleep has joined #ruby
sduckett has joined #ruby
wallclockbuilder has quit [Read error: Connection reset by peer]
wallclockbuilder has joined #ruby
baroquebobcat has joined #ruby
piotr_ has quit [Remote host closed the connection]
casheew has joined #ruby
D4T has quit [Ping timeout: 272 seconds]
swoosh has left #ruby ["Textual IRC Client: www.textualapp.com"]
hemanth has quit [Read error: Connection reset by peer]
carlyle has quit [Remote host closed the connection]
hemanth has joined #ruby
casheew has quit [Read error: Connection reset by peer]
ttt has quit [Remote host closed the connection]
razibog has quit [Read error: Operation timed out]
connor_ has joined #ruby
D4T has joined #ruby
failshell has quit []
__Big0__ has quit [Remote host closed the connection]
failshell has joined #ruby
julian-delphiki has joined #ruby
casheew has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
pitombera has joined #ruby
casheew has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
himsin has quit [Remote host closed the connection]
__Big0__ has joined #ruby
braoru has quit [Quit: Leaving]
mercwithamouth has joined #ruby
connor_ has quit [Ping timeout: 260 seconds]
yorickpeterse has joined #ruby
<yorickpeterse> Hanmac2: ping
carlyle has joined #ruby
jgarvey has joined #ruby
cr3 has joined #ruby
<cr3> how can I create an accessor for a @@class_variable?
casheew has joined #ruby
<hoelzro> cr3: def var @@class_variable end
newUser1234 has joined #ruby
<apeiros_> cr3: but the fact that you don't know that tells me that you probably should not be using @@cvars in the first place
<cr3> hoelzro: ok, I thought I might be able to use attr_accessor but I could define a method
<apeiros_> their ruleset of visibility is not quite intuitive
gaahrdner has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
gaahrdner has joined #ruby
pitombera has quit [Ping timeout: 276 seconds]
evenix has joined #ruby
_jc has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
casheew has joined #ruby
hasimo has joined #ruby
beiter_ has joined #ruby
beiter has quit [Ping timeout: 255 seconds]
beiter_ is now known as beiter
stoic_squirrel has joined #ruby
stoic_squirrel has left #ruby [#ruby]
Faris has joined #ruby
pitombera has joined #ruby
<apeiros_> fuck, I hate imagemagick
<whitequark> apeiros_: what for
geggam_wk has joined #ruby
<banister`sleep> apeiros_: what are u using it for
<apeiros_> right now? for erroring out in a way which completely blocks the ruby process
pitombera has quit [Changing host]
pitombera has joined #ruby
<apeiros_> banister`sleep: indirectly via paperclip
tjbiddle_ has joined #ruby
__Big0__ has quit [Remote host closed the connection]
<banister`sleep> i shoudl really get around to polishing my image manip lib and releasing it
<apeiros_> I'm -->| |<-- this close to just throw it out and see how I can get a replacement like imagescience working
<banister`sleep> apeiros_: what kind of image manip stuff are u doing?
<apeiros_> banister`sleep: nothing much, mostly resizing
<apeiros_> oh, though, that graphing lib might use it for more
<apeiros_> gruff
fsperling has joined #ruby
__Big0__ has joined #ruby
sleetdrop has quit [Remote host closed the connection]
IrishGringo has joined #ruby
sleetdrop has joined #ruby
tjbiddle__ has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
tjbiddle__ is now known as tjbiddle
daniel_- has joined #ruby
casheew has quit [Read error: Connection reset by peer]
angle has quit [Quit: Leaving]
casheew has joined #ruby
<fsperling> Hi, any recommendation what to use to control a rackup app via init.d services?
banister`sleep is now known as banisterfiend
<fsperling> or how to create an init.d script for a rackup app?
angle has joined #ruby
tjbiddle_ has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
casheew has quit [Read error: Connection reset by peer]
chussenot has quit [Quit: chussenot]
beiter has quit [Ping timeout: 264 seconds]
hemanth has quit [Read error: Connection reset by peer]
Criztian has quit [Remote host closed the connection]
hemanth has joined #ruby
willob has joined #ruby
rgbdev has joined #ruby
casheew has joined #ruby
kpshek has joined #ruby
casheew has quit [Read error: Connection reset by peer]
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
chussenot has joined #ruby
beiter has joined #ruby
devdazed has quit [Quit: Bye]
jonahR has joined #ruby
apeiros_ has quit [Remote host closed the connection]
mirkgeo has joined #ruby
<mirkgeo> Hello
Takehiro has quit [Ping timeout: 260 seconds]
shevy2 has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
casheew has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
j^2 has joined #ruby
R_Macy has quit [Quit: Computer has gone to sleep.]
<mirkgeo> When I do rvm install ruby 1.9.3 I get this: st.c:520:35: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
echobinary has joined #ruby
<hoelzro> mirkgeo: what OS are you on?
<mirkgeo> hoelzro: mac
<hoelzro> do you have an env flags set that would affect the compiler's warnings/errors?
<atmosx> once you go mac, you never go back!
fumbe has quit [Ping timeout: 272 seconds]
krawchyk_ has quit [Read error: Connection reset by peer]
<mirkgeo> hoelzro: how do you mean?
casheew has quit [Read error: Connection reset by peer]
alex__c2022 has joined #ruby
<hoelzro> mirkgeo: I mean do you have CFLAGS or anything like that set
<hoelzro> atmosx: not true!
d2dchat has joined #ruby
krawchyk has joined #ruby
flakrat has quit [Ping timeout: 245 seconds]
<mirkgeo> hoelzro: how do I see that?
<hoelzro> mirkgeo: env
shevy has quit [Ping timeout: 240 seconds]
flakrat has joined #ruby
flakrat has joined #ruby
flakrat has quit [Changing host]
clooth has joined #ruby
<mirkgeo> hoelzro: cannot see anything there about cflags
<hoelzro> interesting
Mattix has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
casheew has joined #ruby
skum has joined #ruby
<mirkgeo> hoelzro: so? :)
<hoelzro> I don't really have any other ideas
skum has quit [Remote host closed the connection]
<hoelzro> if I were sitting at your machine, I'd probably be able to help
skum has joined #ruby
c6der has quit [Remote host closed the connection]
<mirkgeo> Ah, ok, damn.
mockra has quit [Remote host closed the connection]
<mirkgeo> atmosx: maybe you have an idea? :D
philcrissman has quit [Remote host closed the connection]
zigomir has quit [Quit: zigomir]
<atmosx> nope, everything workds here
<atmosx> works fine
ilyam has joined #ruby
<hoelzro> mirkgeo: what compiler are you using?
<mirkgeo> hoelzro: it looks like the log says CC=clang
idkazuma has joined #ruby
<hoelzro> mirkgeo: what's the patch level of ruby?
<hoelzro> ruby-1.9.3-p?
<mirkgeo> 392 I think it choose
sleetdro_ has joined #ruby
oposomme has joined #ruby
lewix has quit [Read error: Connection reset by peer]
oposomme has quit [Read error: Connection reset by peer]
oposomme has joined #ruby
akashj87 has joined #ruby
bradhe has joined #ruby
* hoelzro tries
Vainoharhainen has quit [Ping timeout: 260 seconds]
skumt has joined #ruby
skumt has quit [Read error: Connection reset by peer]
lewix has joined #ruby
guillaum has joined #ruby
spider-mario has joined #ruby
dhruvasagar has joined #ruby
casheew has quit [Read error: Connection reset by peer]
lewix has quit [Client Quit]
mockra has joined #ruby
danneu has joined #ruby
lewix has joined #ruby
casheew has joined #ruby
jellosea_ has quit [Quit: jellosea_]
sleetdrop has quit [Ping timeout: 272 seconds]
<hoelzro> mirkgeo: have you tried building it by hand?
fumbe has joined #ruby
oposomme|away has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
<mirkgeo> hoelzro: no, just rvm install ruby 1.9.3
<hoelzro> try building it by hand, see if that changes things
skum has quit [Ping timeout: 255 seconds]
<mirkgeo> hoelzro: did it work for you with clang?
atmosx has quit [Quit: And so the story goes…]
<hoelzro> well, it worked =)
<mirkgeo> https://github.com/sstephenson/ruby-build/issues/297 maybe this issue is related?
sleetdro_ has quit []
<hoelzro> I honestly have no idea which compiler my machine is using at any given time
oposomme has quit [Ping timeout: 264 seconds]
bricker`1A has joined #ruby
<hoelzro> that issue seems related
Whoop has quit [Ping timeout: 252 seconds]
sleetdrop has joined #ruby
<mirkgeo> hoelzro: if you see the log then? there mine says CC=clang
<hoelzro> try building it with gcc, maybr?
<hoelzro> *maybe
hbpoison has quit [Ping timeout: 256 seconds]
baroquebobcat has joined #ruby
takeru has joined #ruby
<mirkgeo> yeah
<mirkgeo> How do I change that?
<mirkgeo> Since I maybe want clang to be default after this, so xcode doesn't start to throw errors :D
casheew has quit [Read error: Connection reset by peer]
jpcamara has joined #ruby
casheew has joined #ruby
<hoelzro> export CC=gcc
_andre has left #ruby [#ruby]
bricker`LA has quit [Ping timeout: 248 seconds]
Whoop has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
Zolo has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
hemanth has joined #ruby
<mirkgeo> hoelzro: and that is just temporary then?
casheew has quit [Read error: Connection reset by peer]
<hoelzro> yes
<hoelzro> export affects the current shell
filipe_ has quit [Remote host closed the connection]
jurassic has joined #ruby
<hoelzro> and any child processes started by it
takeru has quit [Ping timeout: 245 seconds]
hadees has joined #ruby
xbob has joined #ruby
Blaze_Boy has quit [Ping timeout: 264 seconds]
daniel_- has quit [Ping timeout: 260 seconds]
jurassic has quit [Client Quit]
casheew has joined #ruby
IrishGringo has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]]
<mirkgeo> hoelzro: it worked.. but I was shown this: Ruby 'ruby-1.9.3-p392' was built using clang - but it's not (fully) supported, expect errors.
mikurubeam has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
Blaze_Boy has joined #ruby
eAlchemist has joined #ruby
casheew has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 256 seconds]
Vainoharhainen has joined #ruby
bluOxigen has joined #ruby
casheew has joined #ruby
zmike has joined #ruby
__Big0__ has quit [Remote host closed the connection]
rockymadden has joined #ruby
lewix_ has joined #ruby
__Big0__ has joined #ruby
<mirkgeo> hoelzro: do you use homebrew?
drale2k has joined #ruby
casheew has quit [Read error: Connection reset by peer]
devdazed has joined #ruby
philcrissman has joined #ruby
woolite64__ is now known as woolite64
k3rn3lito has quit [Ping timeout: 256 seconds]
k3rn3lito has joined #ruby
hbpoison has joined #ruby
spanner is now known as klaus-hergesheim
pkircher_ has joined #ruby
noesis has quit [Ping timeout: 276 seconds]
pkircher has quit [Ping timeout: 252 seconds]
connor_ has joined #ruby
pkircher_ is now known as pkircher
lewix has quit [Ping timeout: 256 seconds]
Blaze_Boy has quit [Ping timeout: 276 seconds]
adkron_ has joined #ruby
adkron__ has joined #ruby
casheew has joined #ruby
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle has joined #ruby
ejnahc has quit [Remote host closed the connection]
connor_ has quit [Ping timeout: 256 seconds]
ejnahc has joined #ruby
carloslopes has quit [Remote host closed the connection]
chrishough has joined #ruby
mafolz has quit [Ping timeout: 264 seconds]
D4T has quit [Quit: Textual IRC Client: www.textualapp.com]
jonahR has quit [Quit: jonahR]
Drager has quit [Changing host]
Drager has joined #ruby
angle has quit [Quit: Leaving]
<julian-delphiki> using clang is fine
__Big0__ has quit [Remote host closed the connection]
drale2k has quit [Quit: Leaving...]
Blaze_Boy has joined #ruby
zomgbie has joined #ruby
adkron__ has quit [Ping timeout: 272 seconds]
yorickpeterse has left #ruby ["Who cares about these quit messages?"]
adkron_ has quit [Ping timeout: 276 seconds]
__Big0__ has joined #ruby
drumsrgr8forn8 has joined #ruby
drumsrgr8forn8 has left #ruby [#ruby]
drumsrgr8forn8 has joined #ruby
fsperling has quit [Quit: Verlassend]
_andre has joined #ruby
<_andre> hello
<_andre> in ruby1.9+ i can do something like f = File.new('some_directory'); d = Dir.new(f)
<_andre> is there a way to do this in 1.8?
Vainoharhainen has quit [Ping timeout: 256 seconds]
<_andre> what i want to do is iterate over a directory's entries, but i have a File object
<_andre> for the directory
<Guest45517> hi all, where can i find some resources about building a ruby environment for beginners? windows and linux :)
<drumsrgr8forn8> Hey Guest, best beginner resource PERIOD I can think of is Well Grounded Rubyist by David A Black
hemanth has quit [Read error: Connection reset by peer]
forrest has joined #ruby
hemanth has joined #ruby
Vainoharhainen has joined #ruby
<Guest45517> oh, very thanks drumsrgr8forn8 :)
ace939 is now known as aces1up
idkazuma has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
klaus-hergesheim is now known as leeder-krenon
Hanmac2 is now known as Hanmac
<mirkgeo> julian-delphiki: not for me
jtharris has quit [Quit: WeeChat 0.4.0]
<mirkgeo> julian-delphiki: gcc worked though
idkazuma has joined #ruby
_nitti has joined #ruby
Xeago has joined #ruby
lkba has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
malkomal_ has joined #ruby
fuzai has quit [Quit: fuzai]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
_bart has joined #ruby
Morkel has quit [Quit: Morkel]
casheew has quit [Read error: Connection reset by peer]
malkomal_ has quit [Client Quit]
bradhe has joined #ruby
malkomalko has joined #ruby
blaxter has joined #ruby
Davey has joined #ruby
alvaro_o has joined #ruby
Guest7737 is now known as guyz
tylersmith has quit [Quit: tylersmith]
tomzx_mac has quit [Ping timeout: 248 seconds]
guyz has quit [Changing host]
guyz has joined #ruby
Voodoofish430 has joined #ruby
casheew has joined #ruby
jbueza has joined #ruby
hasimo has quit [Remote host closed the connection]
rippa has joined #ruby
malkomalko has quit [Remote host closed the connection]
echobinary has quit [Read error: Connection reset by peer]
jtharris has joined #ruby
ozgura has quit [Remote host closed the connection]
echobinary has joined #ruby
malkomalko has joined #ruby
rakl has joined #ruby
tommyvyo has quit [Quit:]
jurassic has joined #ruby
<Spooner_> _andre, Dir.glob('path') {|filename| }
zmike has quit [Quit: Выходжу]
chrishunt has quit [Quit: ZzZzZz...]
mpfundstein has quit [Remote host closed the connection]
chrishunt has joined #ruby
<Spooner_> If you have a File object, then you can use File#path instead of 'path'
artm has joined #ruby
Goles has quit [Ping timeout: 260 seconds]
artm has quit [Client Quit]
<solidoodlesuppor> Can someone suggest a decent, up to date IRC bot library?
<solidoodlesuppor> Most of the ones I am finding haven't been updated recently
<solidoodlesuppor> Cinch looks abandoned
<dominikh> solidoodlesuppor: I beg to differ.
<Spooner_> It was last released a month ago.
<Spooner_> Which says it is far from abandoned.
<MrZYX> also it's still awesome
<whitequark> solidoodlesuppor: +1 on cinch
<dominikh> also you just highlighted its developer :)
<solidoodlesuppor> http://cinchrb.org/ is down
<whitequark> dominikh: hehe
<dominikh> yes, because I can't afford having it up
<whitequark> dominikh: wait, what's wrong with it?
atyz has joined #ruby
<solidoodlesuppor> http://rubydoc.info/gems/cinch/Cinch this isn't very helpful either
<dominikh> whitequark: it needs more RAM than I have money for right now ;)
bricker`1A has quit [Ping timeout: 245 seconds]
<whitequark> dominikh: how much?
<Spooner_> dominikh, Why not host it on Github?
hoelzro is now known as hoelzro|away
<whitequark> I have spare ram on wq.org
maxmanders has joined #ruby
shadowshell has joined #ruby
sepp2k1 has joined #ruby
<dominikh> whitequark: not much per se, it's just a lightweight padrino app. but my server's swapping as is :)
<whitequark> dominikh: how about I give you a shell account?
Ontolog has joined #ruby
<dominikh> whitequark: ah, darn. DNS might be a problem
<whitequark> can you CNAME it?
<solidoodlesuppor> dominkh: Do you have an example for generating daily logs?
carloslopes has joined #ruby
<whitequark> dominikh: also I have my own DNS master/slave :)
<dominikh> whitequark: thing is, I might have stuff that relies on cinchrb.org pointing to my current server
bricker`LA has joined #ruby
<whitequark> (own master, linode's slave)
<whitequark> I see
<dominikh> whitequark: it's appreciated though :) I'll figre something out
<whitequark> 'k
<solidoodlesuppor> dominikh: Cause' I see there is a logging class.
<dominikh> solidoodlesuppor: a logging interface, yeah. there are a couple loggers implemented you can look at. none do log rotation, but that should be doable
atyz has quit [Client Quit]
Ontolog_ has joined #ruby
<whitequark> dominikh: ssh dominikh@fehu.whitequark.org, btw.
sepp2k has quit [Ping timeout: 272 seconds]
<dominikh> whitequark: stole my pubkey from github? :)
<whitequark> dominikh: exactly
apeiros_ has joined #ruby
<dominikh> hehe
<solidoodlesuppor> dominikh: Where can I find?
sn0wb1rd has joined #ruby
hadees has quit [Quit: hadees]
bradhe_ has joined #ruby
<dominikh> solidoodlesuppor: https://github.com/cinchrb/cinch/blob/master/lib/cinch/logger.rb documents the interface, https://github.com/cinchrb/cinch/tree/master/lib/cinch/logger contains the loggers that ship with Cinch
hemanth has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
bradhe has quit [Read error: Connection reset by peer]
hiroyuki_ has joined #ruby
casheew has joined #ruby
bradhe_ has quit [Read error: Connection reset by peer]
<shevy2> Guest45517 on linux it should be very easy
bradhe has joined #ruby
Ontolog has quit [Ping timeout: 272 seconds]
hemanth has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<dominikh> whitequark: I'll get back to you about the hosting thing :)
shevy2 is now known as shevy
banisterfiend has joined #ruby
nazty has joined #ruby
gyre008_ has joined #ruby
apeiros_ has quit [Ping timeout: 264 seconds]
joeycarmello has joined #ruby
hiroyuki has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 272 seconds]
jellosea_ has joined #ruby
carloslopes has quit [Ping timeout: 260 seconds]
gyre008 has quit [Ping timeout: 255 seconds]
lewix_ has quit [Remote host closed the connection]
Goles has joined #ruby
maletor has joined #ruby
wreckimnaked has quit [Ping timeout: 248 seconds]
nachtwandler has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
<solidoodlesuppor> dominikh: Dumb question, are logs kept by default? If so where do they live?
<shevy> question - can we use unbind to steal a method from one class, and then lateron bind it to another class again? (unbind will give us an object of class UnboundMethod)
<shevy> so far it seems as if UnboundMethod can only work on the same class again? hmm
jurassic has quit [Quit: jurassic]
<dominikh> solidoodlesuppor: Cinch is less of a full blown framework than it is a library. so no, it doesn't keep any logs. it only prints logs to stdout, and that includes a lot of debugging output as well
atyz has joined #ruby
jonathanwallace has joined #ruby
<solidoodlesuppor> dominikh: But it would be easy to just send that a local file right? I really don't want to play around with Autumn just to read last nights IRC complaints ;)
<breakingthings> solidoodlesuppor: cinch supports plugins, someone's probably written a logger already.
<breakingthings> might want to search around.
<dominikh> solidoodlesuppor: yeah. when you initialize a logger, you give it an IO object. can be stdout, can be a File object
sambao21 has quit [Quit: Computer has gone to sleep.]
<dominikh> solidoodlesuppor: you could very well use the Zcbot logger, which just logs irc in/out messages (named after Zcbot, because pisg supports that format)
mercwithamouth has joined #ruby
idkazuma has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
[eDu] has quit [Quit: [eDu]]
jonahR has joined #ruby
ArchBeOS has quit [Remote host closed the connection]
jellosea_ has quit [Quit: jellosea_]
testingb0t1 has quit [Quit: Leaving.]
Quebert has joined #ruby
<dominikh> solidoodlesuppor: so something like f = File.open("foo.log"); bot.loggers << Cinch::Logger::ZcbotLogger.new(f); (and don't forget to require "cinch/logger/zcbot_logger")
slainer68 has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
spider-mario has quit [Read error: Connection reset by peer]
blaxter has quit [Quit: foo]
<solidoodlesuppor> Now, I'm about to showcase my ruby ignorance here. Wouldn't require cinch already cover that?
<dominikh> solidoodlesuppor: nope. cinch itself doesn't require that logger because most people won't use it
daniel_- has joined #ruby
<dominikh> solidoodlesuppor: requiring cinch just requires cinch.rb, which in turn requires a bunch of stuff itself. that logger isn't one of them
Catbuntu has joined #ruby
jjbohn has joined #ruby
bigoldrock has joined #ruby
jgrevich has joined #ruby
<Catbuntu> Hi
yashshah has joined #ruby
akashj87 has quit [Ping timeout: 245 seconds]
cantonic has quit [Quit: cantonic]
ocnam has joined #ruby
<shevy> Hey Dogbuntu
<Catbuntu> haha
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
mahmoudimus has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
slainer68 has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Quit: tjbiddle]
plantseeker has quit [Quit: Nettalk6 - www.ntalk.de]
browndawg has quit [Ping timeout: 245 seconds]
<shevy> whatcha coding lately?
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<breakingthings> apt-meow
<breakingthings> apt-meow catnip
chendo_ has quit [Ping timeout: 255 seconds]
<shevy> lol
<shevy> apt uses perl ...
gaahrdner has quit [Ping timeout: 272 seconds]
bradhe has quit [Remote host closed the connection]
carloslopes has joined #ruby
twoism has joined #ruby
chendo_ has joined #ruby
<whitequark> perl is awesome
<whitequark> compared to python in system software these days
cilquirm has joined #ruby
moos3 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
_jc has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> ruby is awesome
<cilquirm> hi, if i define a class a couple module namespaces deep, how can i reference a sibling class without having to type in the full namespace?
Stilo has joined #ruby
pitombera has quit [Ping timeout: 255 seconds]
<shevy> dont know what is a sibling class, but you can use include to snatch a namespace
beiter has quit [Quit: beiter]
<cilquirm> i.e. if i have module M module N class C end end end
<shevy> module Foo; class Bar; end; end; include Foo; bar = Bar.new, vs. bar = Foo::Bar.new
<cilquirm> and a sibling class module M module N class D end end end
<shevy> ok they are all part of the same module
<cilquirm> it seems obtuse to include a module namespace inside a class declared in the module namespace
<shevy> what do you want to do now?
<dominikh> going to sleep now, good luck solidoodlesuppor
<shevy> I don't yet see what you do
<shevy> dominikh it's 18.45 !!!!!
<shevy> well 18:45
<cilquirm> every time i refer to class D in class C, i have to do M::N::D -- i can't just say D
enroxorz is now known as enroxorz-work
<banisterfiend> cilquirm: if it seems complicated for you, then dont do it
<dominikh> shevy: and I've been up for roughly 20 hours :)
yashshah has quit [Read error: Connection reset by peer]
<cilquirm> banisterfiend: not sure what you're saying. i'm not saying 'complicated' at all
<banisterfiend> cilquirm: im not actually sure what you're saying either, if you posted a gist it might be helpful
hemanth has quit [Read error: Connection reset by peer]
<shevy> cilquirm no that is not right that you can't just say D
<shevy> cilquirm but it is in a namespace, you must tell ruby what you mean
<cilquirm> it seems obtuse to have to say module M module N class C include M::N end end end
hemanth has joined #ruby
Ontolog_ has quit [Remote host closed the connection]
moos3 has joined #ruby
Ontolog has joined #ruby
<shevy> cilquirm ok, how else do you want to tell the ruby parser what you mean then? do you suggest that ruby automagically knows where everything is without you having to namespace it?
splud has joined #ruby
eAlchemist has quit [Remote host closed the connection]
<solidoodlesuppor> dominikh: Trying to get that block from above to work
<shevy> D = M::N::D
<shevy> d = D.new
<shevy> here is another way
<solidoodlesuppor> Not much luck but still trying
eAlchemist has joined #ruby
jurassic has joined #ruby
jurassic has quit [Client Quit]
<shevy> one of the biggest reason for namespacing is that you can use the same constant names, in different namespaces
<dominikh> solidoodlesuppor: in case of doubt you can always pop into #cinch. some helpful folks there. I'm really going to sleep now though
chrishough has quit [Quit: chrishough]
connor__ has joined #ruby
chrishough has joined #ruby
<shevy> you could even use "already existing names", like: module Test; class Class; end; end; Test::Class.new # => #<Test::Class:0xb69f3510>
connor__ has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
tcstar has quit [Read error: Connection reset by peer]
<MrZYX> cilquirm: http://paste.mrzyx.de/show.php?id=1360 prints hi for me...
rkj has joined #ruby
yashshah has joined #ruby
<Hanmac> you can also use class Xyz < function; end
alexim has joined #ruby
hbpoison has joined #ruby
carlyle has quit [Remote host closed the connection]
mikepack has joined #ruby
<becom33> can I do puts "somthing if 'a'=='a' and 'b' =='b'
<becom33> ?
fermion has quit [Quit: Textual IRC Client: www.textualapp.com]
<MrZYX> becom33: run irb and find out ;)
jgrevich has quit [Ping timeout: 276 seconds]
<becom33> >> puts "somthing if 'a'=='a' and 'b' =='b'
<eval-in> becom33 => /tmp/execpad-ea159c9a4998/source-ea159c9a4998:2: unterminated string meets end of file
<eval-in> /tmp/execpad-ea159c9a4998/source-ea159c9a4998:2: syntax error, unexpected end-of-input, expecting keyword_end (http://eval.in/12248)
jerius_ has joined #ruby
rkj_ has joined #ruby
<becom33> hmm
jgrevich has joined #ruby
pitombera has joined #ruby
pitombera has quit [Changing host]
pitombera has joined #ruby
jeffreybaird has joined #ruby
etcetera has joined #ruby
<MrZYX> >> puts "something" if 'a' == 'a' && 'b' == 'b'
<eval-in> MrZYX => something
<eval-in> nil (http://eval.in/12250)
<becom33> >> puts "somthing" if 'a'=='a' and 'b' =='b'
<eval-in> becom33 => somthing
<eval-in> nil (http://eval.in/12251)
<becom33> I guess can
etcetera has quit [Max SendQ exceeded]
timmow has quit [Remote host closed the connection]
tylersmith has joined #ruby
rkj__ has joined #ruby
<shevy> becom33 yeah, if you remember to properly quote your strings you can ;)
jjbohn is now known as jjbohn|afk
rgbdev has quit [Quit: rgbdev]
hbpoison has quit [Ping timeout: 252 seconds]
jerius has quit [Ping timeout: 255 seconds]
jerius_ is now known as jerius
rkj has quit [Ping timeout: 264 seconds]
akhet has quit [Remote host closed the connection]
ozgura has joined #ruby
<becom33> shevy, yea my ba
Vainoharhainen has quit [Quit: Leaving...]
<becom33> bad
tommyvyo has joined #ruby
a_a_g has joined #ruby
<shevy> becom33 you still spending time with this metasploit thing? or you moved to other projects
<becom33> I know I can't do this coz I tried it didnt work I was thinking how can I do this
rkj_ has quit [Ping timeout: 264 seconds]
<becom33> shevy, moved but that one still working when I get free time :D
tk__ has quit [Quit: ばいばい]
jurassic has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<becom33> puts "error"; exit() if (error_variable_is_true) and (another_error_variable_is_true)
maxmanders has quit [Quit: Computer has gone to sleep.]
hemanth has joined #ruby
Xeago has quit [Remote host closed the connection]
<shevy> hmm
<shevy> you could also use raise instead
ferdev has quit [Quit: ferdev]
<MrZYX> the if also affects only the last statement
<MrZYX> the puts would always be executed
<shevy> raise 'becom33 to earth, becom33 to earth, we encountered a fatal exit!' if error_variable and another_error_variable
<shevy> oops... a fatal error
<becom33> lol
UnbertKant has joined #ruby
<UnbertKant> Hey there!
<shevy> becom33 also, no need to use exit(), you could just use exit
<becom33> MrZYX, I want both to execute only if those variables are true
<shevy> and you dont need to put the variables in ()
<shevy> your code could translate to:
<becom33> ok
<shevy> exit if true and true
<UnbertKant> I want to write a simple script and I wonder why a method can't access the variable that I defined directly in the script. Is that even possible?
sleetdrop has quit [Remote host closed the connection]
<whitequark> UnbertKant: >> a = 1; def b; a; end; b
<shevy> UnbertKant depends on the variable and how you defined it
<whitequark> for example
<UnbertKant> (I don't have any classes in the script just some methods at the top, then some variables, then some calls to the methods which want to read the variables but can't )
<shevy> UnbertKant if you would show the part of your code that confuses you, it would help us!
<shevy> but whitequark showed one example
<MrZYX> UnbertKant: you need to define the variable in the global space before using it in the method definition
<UnbertKant> It's basically like this:
<UnbertKant> def bla
<UnbertKant> puts a
<UnbertKant> a = "something"
<UnbertKant> bla
<UnbertKant> end
FenrirReturns has joined #ruby
<shevy> eh
<shevy> a inside the method is different from a outside
<becom33> UnbertKant,
heftig has quit [Quit: Quitting]
<becom33> u can
nachtwandler has quit [Remote host closed the connection]
<becom33> def bla inp
<becom33> puts inp
<becom33> end
<becom33> bla("somthing")
<shevy> UnbertKant change "a" to "@a" and try again
rkj has joined #ruby
<becom33> ^ or can do that
tealmage has joined #ruby
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<UnbertKant> I can't pass it as a parameter, since that method is called by other methods which are called by other methods etc.
<UnbertKant> I'll try @, thanks.
mikurubeam has joined #ruby
<shevy> UnbertKant yeah that makes sense, though you could often use a default value then
rkj__ has quit [Ping timeout: 245 seconds]
cilquirm has quit [Quit: cilquirm]
<UnbertKant> But what's the reason why ruby doesn't look in the outer scope if the variable isn't defined in the method?
<shevy> like becom33's example, you could do this:
<shevy> def bla(input = @a)
hemanth has quit [Read error: Connection reset by peer]
<shevy> puts input
<shevy> end
<shevy> bla()
breakingthings has quit []
<shevy> oops, ignore the wrong indent :D
gitesh has joined #ruby
Neomex has joined #ruby
hemanth has joined #ruby
gitesh has quit [Client Quit]
hasimo has joined #ruby
akhet has joined #ruby
Neomex has quit [Client Quit]
<shevy> UnbertKant good question
<shevy> UnbertKant it might be that such variables would permanently leak around in a huge project or huge environment
Mon_Ouie has quit [Ping timeout: 252 seconds]
apod has quit []
<shevy> UnbertKant imagine if you require another project which has 10000000000 of these variables already defined
Liquid-- has joined #ruby
<shevy> all your methods would be tainted if they would look at these, at least in the "main namespace"
adkron has quit [Ping timeout: 255 seconds]
<shevy> (and if they use local variable names)
evenix has quit [Read error: Connection reset by peer]
tvw has quit []
evenix has joined #ruby
lolmaus has quit []
jeffreybaird has left #ruby [#ruby]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mritr_ has joined #ruby
drumsrgr8forn8 has quit [Ping timeout: 245 seconds]
jean-louis has joined #ruby
hasimo has quit [Ping timeout: 272 seconds]
Xeago has joined #ruby
bricker`LA has quit [Ping timeout: 255 seconds]
drumsrgr8forn8 has joined #ruby
elaptics is now known as elaptics`away
rkj has quit [Ping timeout: 245 seconds]
<shevy> test
<Hanmac> failed :P
shuky has joined #ruby
walbert has left #ruby [#ruby]
walbert has joined #ruby
takeru has joined #ruby
huoxito has quit [Quit: Leaving]
whitedawg has joined #ruby
sheenobu has joined #ruby
atmosx has joined #ruby
<sheenobu> I just need some json Rational help. JSON.parse(JSON.dump({ :x => Rational(4,1) })) fails on 1.9.3p363 and rails 3.2.12
<aedorn> Hmmm... I see much Chakra Linux in my future as Gentoo is failing me. =(
Liquid-- has quit [Quit: Computer has gone to sleep.]
<sheenobu> do I need to monkey-patch Rational to get to_json to work or just upgrade my JSON libs?
yashshah_ has joined #ruby
tjbiddle has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
takeru has quit [Ping timeout: 248 seconds]
<shevy> Hanmac sometimes I am disconnected from IRC and dont know when
<shevy> aedorn yay! deservedly so for you using python! \o/
hbpoison has joined #ruby
<UnbertKant> Hm... now the variable gets found, but its content is nil... but I'm sure it isnt? def bla; puts @a; end; a= "a"; puts a; bla first puts "a" and than crashes because @a is nil
<shevy> UnbertKant you dont use @a
<shevy> @a is not like a
<shevy> you assign to a:
<shevy> a = "a"
<aedorn> I only used it once!
preyalone has quit [Quit: Page closed]
<shevy> not to @a
chrisja has joined #ruby
<shevy> UnbertKant a and @a are two different things, remember, you must try to think how the ruby parser "sees" your code
<UnbertKant> So I have to use @ everywhere when it should be a variable that is the same in and outside of methods?
shuky_ has joined #ruby
<shevy> UnbertKant as I explained to you before, you can not use local variables leaking into methods
nari has quit [Ping timeout: 272 seconds]
<shevy> now you first need to accept that fact
<UnbertKant> Okay, so I don't understand how the parser sees the code. I thought usind @ in a method means "look for that variable outside of the method"
<shevy> before you did so, we cant continue
shuky has quit [Remote host closed the connection]
<shevy> your brain must first accept that you can not use local variable names from the outside
_nitti has quit [Remote host closed the connection]
* shevy waits patiently.
shuky_ is now known as shuky
<UnbertKant> I'll read up on @ first, brb.
shuky has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
<shevy> hehehe
<shevy> UnbertKant @ is an instance variable, you can use that in your class, and in methods too
shuky has joined #ruby
<shevy> h = Hello.new; p h.instance_variables
<banisterfiend> lols http://i.imgur.com/Fs3WM54.jpg
<shevy> UnbertKant you can use instance variables almost like local variables too. you can even remove them
<shevy> UnbertKant, like remove_instance_variable(:@foo)
johnnygoodmancpa has joined #ruby
jdunck has joined #ruby
Mattix has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
duosrx has quit [Remote host closed the connection]
hemanth has joined #ruby
bradhe has joined #ruby
johnnygoodmancpa has left #ruby [#ruby]
jpfuentes2 has quit [Ping timeout: 256 seconds]
hbpoison has quit [Ping timeout: 255 seconds]
adkron has joined #ruby
alx- has quit [Quit: alx-]
havenwood has joined #ruby
krawchyk_ has joined #ruby
<UnbertKant> Okay. So when I don't have a class, do I still add an initialize method to the script, where I set the @variables or does initialize only work for classes?
lewis has joined #ruby
nik_-_ has joined #ruby
krawchyk_ has quit [Remote host closed the connection]
<UnbertKant> Wait, that shouldn't be necessary, since the assignment code gets run in the script? (Unlike if it were a class, where it wouldn't be executed?)
<MrZYX> write "puts self.class" into a file test.rb and run it with ruby test.rb ;)
heftig has joined #ruby
krawchyk has quit [Ping timeout: 245 seconds]
carlyle has joined #ruby
adkron_ has joined #ruby
jurassic has quit [Quit: jurassic]
<UnbertKant> So in this case it's possible to write code into a class, but outside of a method and it gets executed. But normally if I write a class I can't just write the code anywhere, it has to go into initialize to be executed?
<MrZYX> you could write it anywhere too
<MrZYX> it would be executed when the file is loaded
cmarques has quit [Ping timeout: 245 seconds]
<MrZYX> if you write it into initialize it gets executed if #new is called on that class
<MrZYX> everytime
nga4 has joined #ruby
<UnbertKant> But the example on Stack overflow didn't work but I have the same code except that it's not in a class (well, in the Object class?) and my code works. Why? http://stackoverflow.com/questions/826734/when-do-ruby-instance-variables-get-set
<MrZYX> because you're inside the main object already
<MrZYX> try puts self.inspect
clooth has quit [Quit: clooth]
<MrZYX> everything in ruby is a object, even the toplevel context
QaDeS has quit [Quit: Ex-Chat]
<UnbertKant> Why is the code in the stack overflow example valid, if the code that sets the variable isn't actually executed?
Zolo has quit [Remote host closed the connection]
echobinary has quit [Quit: -a-]
echobinary has joined #ruby
sheenobu has quit [Quit: sheenobu]
`p has joined #ruby
slopjong has joined #ruby
cmarques has joined #ruby
<MrZYX> the code in the question or..?
ferdev has joined #ruby
skattyadz has quit [Quit: skattyadz]
sheenobu has joined #ruby
<sheenobu> nothing? eh -_-
Elhu has joined #ruby
<slopjong> when using a form input field with the name contact_form[custom_field_values][3], how do I access the value of it? I've tried params[:contact_form][:custom_field_values][3] but this seems wrong
Elhu has quit [Client Quit]
mrsolo has joined #ruby
carloslopes has quit [Remote host closed the connection]
<MrZYX> so the one in the question
<MrZYX> as said it gets executed as the file is parsed
<MrZYX> >> class Foo; puts "hi"; end
<eval-in> MrZYX => hi
<eval-in> nil (http://eval.in/12253)
<solidoodlesuppor> Can't get that logger to work for the life of me
<solidoodlesuppor> Spoke to folks in his chat room that also had no idea how to make a logger
<whitequark> solidoodlesuppor: logger?
ilyam has quit [Quit: ilyam]
<solidoodlesuppor> I'm trying to make my Cinch bot log
<whitequark> solidoodlesuppor: ah. check out http://irclog.whitequark.org/
<whitequark> I did exactly that
hybris has quit [Quit: Leaving]
<solidoodlesuppor> How did you do it?
csexton has joined #ruby
<whitequark> solidoodlesuppor: there's link to sources on that page
<whitequark> it's like 200 LOC, go read it
carloslopes has joined #ruby
<solidoodlesuppor> OK that looks busy. I agree when you said "OH god why"
sambao21 has joined #ruby
browndawg has left #ruby [#ruby]
<sheenobu> oooo
zykes- has quit [Quit: Lost terminal]
<sheenobu> json/add/rational isn't auto required in my environment
zomgbie has quit [Ping timeout: 272 seconds]
<whitequark> solidoodlesuppor: where's that?
<whitequark> ohhh right
<whitequark> we've discussed that with dominikh
<whitequark> the c.plugins.plugins nesting in particular
<whitequark> the consensus is that it's crap, but every single alternative also is
skattyadz has joined #ruby
<solidoodlesuppor> This is a bot all on its own?
<solidoodlesuppor> Or am I missing a IRCLogger file somewhere?
motto has joined #ruby
<solidoodlesuppor> I mean, all I want to do is dump everything in my console onto a text file.
wyhaines has joined #ruby
ninp0 has quit [Ping timeout: 264 seconds]
failshell has quit [Remote host closed the connection]
jurassic has joined #ruby
<whitequark> solidoodlesuppor: ./bot.rb >foo 2>&1
m8 has quit [Ping timeout: 248 seconds]
tommyvyo has quit [Quit:]
atmosx has quit [Quit: And so the story goes…]
<solidoodlesuppor> ??
alx- has joined #ruby
hadees has joined #ruby
_nitti has joined #ruby
becom33 has quit [Ping timeout: 252 seconds]
_nitti_ has joined #ruby
<solidoodlesuppor> Oh. Well that would be one way to do it.
tommyvyo has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
dougireton has joined #ruby
hemanth has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
Davey has quit [Quit: Computer has gone to sleep.]
milktrader has joined #ruby
shuky__ has joined #ruby
bricker`away is now known as bricker
shuky__ has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 255 seconds]
Rioji has joined #ruby
carloslopes has quit [Remote host closed the connection]
stkowski has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
duosrx has joined #ruby
<solidoodlesuppor> whitequark: You think it would be easy for me to adapt your logger to my far simpler bot?
m8 has joined #ruby
alexim has quit [Ping timeout: 272 seconds]
chrisja has quit [Quit: leaving]
<whitequark> solidoodlesuppor: why not
thone_ has joined #ruby
motto has quit [Ping timeout: 255 seconds]
ilyam has joined #ruby
BizarreCake has quit [Ping timeout: 276 seconds]
_nitti_ has quit [Ping timeout: 260 seconds]
oposomme has joined #ruby
alexim has joined #ruby
jrajav has joined #ruby
thone has quit [Ping timeout: 252 seconds]
R_Macy has joined #ruby
Al_ has quit [Quit: Al_]
jjbohn|afk is now known as jjbohn
zeade has joined #ruby
nilobject has joined #ruby
ninp0 has joined #ruby
guillaum has quit [Ping timeout: 248 seconds]
becom33 has joined #ruby
becom33 has joined #ruby
becom33 has quit [Changing host]
whitedawg has quit [Quit: Leaving.]
Gadgetoid has quit [Read error: Operation timed out]
senayar has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
squidBits has joined #ruby
codecop has joined #ruby
cilquirm has joined #ruby
oposomme has quit [Ping timeout: 264 seconds]
jonahR has quit [Quit: jonahR]
<solidoodlesuppor> whitequark: Can you take a quick look at this? I think I'm doing the plugin call wrong. https://gist.github.com/solidoodle/5119000
Gadgetoid has joined #ruby
duosrx has quit [Remote host closed the connection]
banjara has joined #ruby
etcetera has joined #ruby
yashshah- has joined #ruby
Bira has quit [Quit: Leaving]
<UnbertKant> How do I split a string only on the first match of a regex?
Drager has quit [Read error: Connection reset by peer]
etcetera has quit [Client Quit]
<solidoodlesuppor> undefined method plugins?
<UnbertKant> For example "Truth = 1+1 = 2" should turn into ["Truth","1+1 = 2"]
<shevy> UnbertKant give example input, and desired output, of your string.
<solidoodlesuppor> what up with that? That's almost verbatim what you are doing
yashshah_ has quit [Read error: Connection reset by peer]
zomgbie has joined #ruby
<shevy> hmm
imami|afk is now known as banseljaj
hadees has quit [Quit: hadees]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<UnbertKant> never mind
etcetera has joined #ruby
Zolo has joined #ruby
chesterjd has joined #ruby
<heftig> UnbertKant: split(/\s*=\s*/, 2)
gaahrdner has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
<chesterjd> Hi everyone. When I define a class, I can write code inside the class, alongside methods and things. Is the inside of a class declaration like a method that gets called when the class is defined?
<MrZYX> no it gets executed as the class is parsed
<whitequark> chesterjd: it's just code which gets executed
<whitequark> MrZYX: it isn't
<shevy> oh cool
<whitequark> the code is first parsed in its entirety, then checked for errors, and only then executed
<shevy> UnbertKant "Truth = 1+1 = 2".split(/=/,2) # => ["Truth ", " 1+1 = 2"]
<solidoodlesuppor> whitequark: It's like it doesn't stand the plugin command.
<chesterjd> whitequark: i can have local variables in there can't it? so it forms a scope doesn't it?
<whitequark> chesterjd: it does
hemanth has quit [Read error: Connection reset by peer]
<whitequark> it's not a method scope, but they do have similarities
hemanth has joined #ruby
<chesterjd> whitequark: ok thanks
<solidoodlesuppor> yay got it orking
zomgbie has quit [Ping timeout: 272 seconds]
uris has joined #ruby
apok has joined #ruby
miskander has joined #ruby
queequeg1 has quit [Ping timeout: 276 seconds]
slainer68 has joined #ruby
dougireton has quit [Quit: Leaving.]
hbpoison has joined #ruby
jjbohn is now known as jjbohn|afk
jjbohn|afk is now known as jjbohn
chussenot has quit [Quit: chussenot]
<slopjong> can somebody tell me how to access the values of the form as described here: http://pastie.org/pastes/6423639/text
rakl has quit [Quit: gone]
dougireton has joined #ruby
<slopjong> is params[:contact_form][:custom_field_values][1] correct?
<slopjong> in a redmine plugin this seems not work
Zolo has quit [Remote host closed the connection]
rakl has joined #ruby
Skylab has joined #ruby
Davey has joined #ruby
queequeg1 has joined #ruby
rakl has left #ruby [#ruby]
l3ck has joined #ruby
Es0teric has joined #ruby
tealmage has quit [Remote host closed the connection]
ebobby has joined #ruby
Honeycomb has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
sam113101 has joined #ruby
pandawarrior has joined #ruby
axl_ has quit [Ping timeout: 260 seconds]
enroxorz-work has quit [Quit: Leaving]
Honeycomb has quit [Client Quit]
baroquebobcat has quit [Ping timeout: 240 seconds]
wormwood has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
Goles has quit [Ping timeout: 240 seconds]
<wormwood> Greetings all, is there anything in ruby that acts like a File without have a "physical" file attached to it?
whowantstolivef1 has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
<wormwood> perhaps an in-memory solution?
<aedorn> StringIO
<solidoodlesuppor> https://gist.github.com/solidoodle/5119228 anyone have any idea why this might not work?
senayar has quit [Ping timeout: 276 seconds]
walbert has left #ruby [#ruby]
jjbohn is now known as jjbohn|afk
<havenwood> wormwood: Depends on what you're doing. StringIO, TempFile, etc. What are you using it for?
gyre008_ has quit [Remote host closed the connection]
stkowski has quit [Ping timeout: 260 seconds]
breakingthings has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
rockymadden has quit []
_nitti has joined #ruby
<wormwood> havenwood: an example would be passing javascript code to jslint like system("jslint -stdin #{@code}")
yfeldblum has quit [Ping timeout: 272 seconds]
yashshah- has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
l3ck has quit [Quit: Bye!]
yashshah- has joined #ruby
zomgbie has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<havenwood> wormwood: Where does the file-esque object come in to play?
hemanth has joined #ruby
icole has joined #ruby
Xeago has quit [Remote host closed the connection]
<wormwood> havenwood: because of how the shell handles strings, it would be better suited to run the check from an actual file
hadees has joined #ruby
geekbri has quit [Remote host closed the connection]
Konfusius has joined #ruby
<wormwood> havenwood: so I just was looking for a way to make things go faster on that end, but there probably isn't a short to writing file, reading file, and deleteing it
<wormwood> short cut*
ryanf has joined #ruby
io_syl has joined #ruby
<havenwood> wormwood: Ahh. Maybe a TempFile is the way to go?: http://www.ruby-doc.org/stdlib-2.0/libdoc/tempfile/rdoc/Tempfile.html
skattyadz has quit [Quit: skattyadz]
<wormwood> havenwood: thanks, looking through that now
ocnam has quit [Quit: Quit: Textual IRC Client: http://www.textualapp.com/]
<havenwood> wormwood: E.g.: jslint = Tempfile.new('jslint'); jslint.path; #=> "/var/folders/kf/tzh7hqx11tx82y8fltt5_jqh0000gn/T/jslint20130308-5036-1nor0e5"
slainer68 has quit [Remote host closed the connection]
zomgbie has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
cantonic has joined #ruby
yashshah- has quit [Read error: Connection reset by peer]
pitombera has quit []
yashshah__ has joined #ruby
ckrailo has joined #ruby
T_ has joined #ruby
carloslopes has joined #ruby
skattyadz has joined #ruby
jacky has quit [Excess Flood]
echobin4 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
tvw has joined #ruby
Spin1987 has joined #ruby
<Spin1987> hello
dougireton has quit [Quit: Leaving.]
<Spin1987> cann someone help
<Spin1987> :)
<Spin1987> musik = ["Bob­ Dylan­ - Knock­in On Heave­ns Door.­mp3", "Emel­i Sande­ - Read all aboau­t it.mp­3", "Alic­ia Keys - Doent­ Mean Anyth­ing.mp3"] want to sort
<Spin1987> i need to sort that by second name
etcetera has quit []
xardas has joined #ruby
<reactormonk> Spin1987, you know that will be a PITA to parse?
jgrevich has quit [Ping timeout: 256 seconds]
<Spin1987> PITA ?
jamesfung14 has joined #ruby
<Spin1987> in scala it is so simple
motto has joined #ruby
<Spin1987> but how i can do it in ruby ;)
<dorei> how you do it in scala?
jgrevich has joined #ruby
<reactormonk> Spin1987, seems to have a sitload of random - and " " in there
<Spin1987> yeah simple split by - then split by "" than sort by second array
<aedorn> musik.sort_by {|x| x.split(" ")[1]}
jpcamara has quit [Quit: jpcamara]
stkowski has quit [Ping timeout: 256 seconds]
<MrZYX> hmm sort does take a single argument block?
ocnam has joined #ruby
m8 has quit [Read error: Operation timed out]
<reactormonk> MrZYX, think it's two
sambao21 has joined #ruby
adkron__ has joined #ruby
<MrZYX> yeah
<MrZYX> there's sort_by!
Zolo has joined #ruby
<MrZYX> and sort_by from Enumerable
maxmanders has joined #ruby
_jc has joined #ruby
<MrZYX> musik.sort_by {|x| x.split("-").first.strip.split(" ").last }
carloslopes has quit [Remote host closed the connection]
<Spin1987> thnx
jacky has joined #ruby
Stilo has joined #ruby
T_ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
axxT has quit [Ping timeout: 252 seconds]
nicoulaj has joined #ruby
UnbertKant has quit [Remote host closed the connection]
flakrat has quit [Quit: Leaving]
stkowski has joined #ruby
_nitti has quit [Remote host closed the connection]
_nitti has joined #ruby
nilobject has quit [Quit: nilobject]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
c0rn has joined #ruby
sw99 has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
aedorn has quit [Quit: Leaving]
<sw99> What does "set" really do? "set :show_exceptions, true" What does this mean?
c0rn has quit [Client Quit]
<sw99> why not just :show_exceptions = true ?
cantonic has quit [Quit: cantonic]
<banisterfiend> sw99: because that doesnt make sense
hemanth has joined #ruby
sepp2k1 has quit [Remote host closed the connection]
takeru has joined #ruby
rdark has quit [Quit: leaving]
<sw99> Then what's set? It's not in the index of my "Programming Ruby 1.9" book
<Spin1987> MrZYX: thy for your help really :)
c0rn has joined #ruby
tjbiddle_ has joined #ruby
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
<banisterfiend> sw99: you haven't even said what gem you're talking about
<sw99> banisterfiend: ah ok, so it's part of a gem
<sw99> yeah, must be sinatra
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
chesterjd has quit [Quit: Page closed]
Mattix has quit [Ping timeout: 256 seconds]
FuzaiDesktop has quit [Remote host closed the connection]
takeru has quit [Ping timeout: 272 seconds]
nkr has quit [Quit: Linkinus - http://linkinus.com]
lewis has quit [Ping timeout: 245 seconds]
Spin1987 has quit [Quit: Leaving.]
IonGyth has joined #ruby
<cool> I am trying to parse html with nokogiri using .css('tr td font') but it fetches everything which is not what I want. anyway I could get just the name, grand total or other individual data present on the page? http://jsfiddle.net/gAcjy/embedded/result/
<banisterfiend> cool: cool nickname
_nitti has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
BlankVerse has joined #ruby
<cool> banisterfiend: thanks
rezzack has joined #ruby
CreativeEmbassy has joined #ruby
danneu has quit [Read error: Connection reset by peer]
BlankVerse has left #ruby [#ruby]
cantonic has joined #ruby
Progster has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
_nitti has joined #ruby
charlesstrahan has joined #ruby
Progster has joined #ruby
alexim has quit [Remote host closed the connection]
danneu has joined #ruby
<charlesstrahan> howdy
jamesfung14 has quit [Ping timeout: 245 seconds]
sw99 has quit [Ping timeout: 240 seconds]
wallclockbuilder has joined #ruby
<mercwithamouth> can someone tell me why this isn't being picked up? https://gist.github.com/anonymous/bb8ad54d52a92f8f98cf
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<mercwithamouth> what am i doing backwards/not at all? =P first time actually using modules with ruby
<mercwithamouth> or creating rather
devdazed has quit [Ping timeout: 248 seconds]
jjbohn|afk is now known as jjbohn
<MrZYX> hm, but Feed::FeedFetcher is defined in that pry session?
alexim has joined #ruby
Choobie has quit [Read error: Connection reset by peer]
yashshah__ has quit [Ping timeout: 248 seconds]
himsin has joined #ruby
devdazed has joined #ruby
hbpoison has joined #ruby
dougireton has joined #ruby
<mercwithamouth> MrZYX: hrmm maybe not =)
Mon_Ouie has quit [Ping timeout: 248 seconds]
<MrZYX> you need to make sure that the module is defined before it's included
<MrZYX> so require the second file at the top of the first one
<mercwithamouth> hmm one sec
Mattix has joined #ruby
<mercwithamouth> MrZYX: ack you're right =)
stayarrr has joined #ruby
<mercwithamouth> MrZYX: dur! thanks....different error but now i'm where i need to be =P
<shevy> in hell!!!
codecop has quit [Ping timeout: 250 seconds]
<shevy> just kidding, just kidding ...
<mercwithamouth> lol
<MrZYX> that's what they always say...
carloslopes has joined #ruby
* mercwithamouth disappears after remembering i promised a legitimate example of passing in and returning a function
<shevy> you'll know you will be there when you solve one problem and three new ones suddenly pop up
<shevy> in hell you will never finish any code :(
<mercwithamouth> shevy: lol...'new' errors are good to me.
<mercwithamouth> that means you're at least in the ballpark
<mercwithamouth> by "you're" i mean "me" o_O
<shevy> I dunno
<shevy> I dont like errors
<shevy> I want all things simple, beautiful, without bugs and errors
gommo has joined #ruby
<MrZYX> then just wrap your entire code into begin rescue end :P
<mercwithamouth> =P well of course...but 'progress'
<mercwithamouth> i'm more so a dog that chases his tail opposed to completion... i have 40 incomplete projects right here..it's sad
<mercwithamouth> this one i'll finish though
etcetera has joined #ruby
<mercwithamouth> this one has more 'purpose' than the other toys
himsin has quit [Ping timeout: 272 seconds]
testingb0t has joined #ruby
wallclockbuilder has quit [Read error: Connection reset by peer]
hbpoison has quit [Ping timeout: 260 seconds]
wallclockbuilder has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
rocket has joined #ruby
Faris has quit [Remote host closed the connection]
hadees has joined #ruby
yalue has quit [Quit: Leaving]
tealmage has joined #ruby
Quebert has quit [Ping timeout: 248 seconds]
ebobby has quit [Ping timeout: 245 seconds]
ocnam has quit [Quit: Quit: Textual IRC Client: http://www.textualapp.com/]
jurassic has quit [Quit: jurassic]
julian-delphiki has quit [Quit: Computer has gone to sleep.]
gyre007 has joined #ruby
etcetera has quit [Ping timeout: 276 seconds]
yashshah__ has joined #ruby
carloslopes has quit [Remote host closed the connection]
codecop has joined #ruby
ebobby has joined #ruby
tealmage has quit [Ping timeout: 248 seconds]
wallclockbuilder has quit [Remote host closed the connection]
swex_ has quit [Read error: Connection reset by peer]
swex has joined #ruby
dougireton has quit [Remote host closed the connection]
apeiros_ has joined #ruby
etcetera has joined #ruby
whowantstolivef1 has quit [Ping timeout: 272 seconds]
<shevy> MrZYX yeah but begin/rescue is another layer, I'd rather love to have code that (can?) never breaks :(
<shevy> mercwithamouth see the good thing that way, you'll never be bored, you always can extend your projects
Nisstyre has quit [Quit: Leaving]
<MrZYX> shevy: echo "#!/usr/bin/ruby\nbegin\nrequire ARGV[1]\nrescue;end\n" > /usr/local/bin/ruby or something like that :P
<Hanmac> shevy yeah, like the shampoo spot ... lightning, blackout, the code still runs :D
dougireton has joined #ruby
<Hanmac> MrZYX the shebang is wrong ... use env
<MrZYX> or alias ruby="ruby $@ 2> /dev/null"
`p has quit [Remote host closed the connection]
<MrZYX> hm that wouldn't go recursive Hanmac?
<MrZYX> given /usr/local/bin is in the $PATH
<Hanmac> this is the good shebang "!/usr/bin/env ruby"
<shevy> shampoo spot??? what are you watching Hanmac ... :P
Corax has joined #ruby
<Hanmac> shevy it was advertisnig
postmodern has joined #ruby
<Hanmac> shevy google "DreiwetterTaft" :P
Mattix has quit [Quit: Leaving]
becom33 has quit [Quit: Leaving]
philcrissman has quit [Remote host closed the connection]
<mercwithamouth> shevy: yeah very true. actually it has worked out in my favor. after getting annoyed i printed out all of my ideas and circled/crossed out things that made sense and things that should be trashed. that gave me an ultimate 'cool' project and i can copy a lot of code over from others
`p has joined #ruby
a_a_g has quit [Quit: Leaving.]
kirun has joined #ruby
cilquirm has quit [Quit: cilquirm]
yacks has quit [Quit: Leaving]
_andre has quit [Quit: leaving]
sambao21 has quit [Quit: Computer has gone to sleep.]
echobin4 has quit [Read error: Connection reset by peer]
<mercwithamouth> ahh while there's a few knowledgeable few people here. does anyone here use rspec 2? i've tried testing on different occasions but i've never gotten a hang of it
echobinary has joined #ruby
<havenwood> mercwithamouth: Lots of people use RSpec. Personally I like Minitest::Spec.
julian-delphiki has joined #ruby
julian-delphiki has quit [Max SendQ exceeded]
<havenwood> mercwithamouth: Bacon looks really nice though.
julian-delphiki has joined #ruby
<mercwithamouth> ahh i'm open to minitest. i was going to ask how would one go about testing basica authentication code https://gist.github.com/anonymous/5119820
ebobby has quit [Ping timeout: 276 seconds]
<mercwithamouth> i'm pretty sure it's a few simple lines but i've yet to see a clear example.
<mercwithamouth> rspec or minitest
testingb0t has quit [Quit: Leaving.]
lewis has joined #ruby
lewis has joined #ruby
lewis has quit [Changing host]
nga4 has quit [Remote host closed the connection]
ngoldman has joined #ruby
yfeldblum has joined #ruby
Caelum has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
ngoldman has left #ruby [#ruby]
hemanth has joined #ruby
S1kx has joined #ruby
<mercwithamouth> funny in minitest i found what i wanted right away. switching
<Caelum> Hi folks, this is my first ruby program, could someone kindly suggest some things I could do better: https://gist.github.com/rkitover/5119889
<Hanmac> Caelum look for File#open and the block form
hadees has quit [Quit: hadees]
<MrZYX> also IO#lines
<onewheelskyward> Caelum you seem to have written a function as a class. Have a whack at breaking that apart into components.
<MrZYX> all_restaurants = all_restaurants.uniq should be all_restaurants.uniq!
wgosling has joined #ruby
<MrZYX> "if ! menus[i][r] then" should be "unless menus[i][r]"
<lectrick> Is it even possible to design an ImmutableHash class?
<Hanmac> lectrick what should it do?
tcstar has joined #ruby
<lectrick> Hanmac: Some kind of autodup if it's assigned to a new variable, I guess :O
thecodethinker has joined #ruby
<thecodethinker> Is ruby + rails good for game development? with something like webgl?
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
<shevy> thecodethinker why do you mention rails + webgl ???
<lectrick> lol
<julian-delphiki> thats a #rubyonrails question
<lectrick> thecodethinker: it's good, if you like ruby. and/or rails I guess
<shevy> thecodethinker there are a few libraries you could try, gosu and gamebox with ruby for instance. but be aware, designing a game is not easy, it takes a lot of work
QaDeS has joined #ruby
<thecodethinker> idk im new to ruby :'(
<lectrick> first priority: do you like the language? second priority: can the language do the job?
<shevy> thecodethinker I'd recommend you to just stick around using ruby for a while, without diving into anything too specific
<lectrick> thecodethinker: http://tryruby.org/
<thecodethinker> I want to start making webgl games. I have worked with OpenGL both core and ES with C++.
<thecodethinker> lectrick: I am doing that right now
<thecodethinker> :D
<shevy> ok when you go the C++ route
<shevy> then Hanmac here is your man
<lectrick> well that's a start
<thecodethinker> But I don't want to use JS for webgl because I hate JS -_-
<shevy> I hate JS too
<breakingthings> You kinda… need to though
<breakingthings> Rails doesn't make you not use javascript.
<shevy> that makes me only hate it more
<thecodethinker> I was looking around and found some WebGL games made with ruby
<shevy> Let's talk about Javascript -> http://www.youtube.com/watch?v=kXEgk1Hdze0
<julian-delphiki> I love that talk
<breakingthings> Backend might be ruby, but unless I'm not aware of something, you still have to be using JS to actually utilize webgl
wgosling has left #ruby ["Konversation terminated!"]
<breakingthings> javascript is the only coding language for front-end
<shevy> yeah, it's great. I'd wish there would be more talks like that... range 3-8 minutes at maximum
<shevy> javascript is the monopoly mafia
dsferreira has joined #ruby
<thecodethinker> well I could do a little JS but I don't want to do all of the logic in js -_-
<shevy> until dart will kill it (omg ...)
<breakingthings> shevy: "lightning talk"
<breakingthings> google 'em
<shevy> breakingthings hmm
* Hanmac never used webgl before
sn0wb1rd has quit [Quit: sn0wb1rd]
<breakingthings> thecodethinker: all of the webgl interfacing would have to be through js, I think.
<Hanmac> but i can recomend Ogre3d :P
<shevy> breakingthings I am too scared to find crappy talks :(
<breakingthings> if you have serverside communicating code it can be ruby
<breakingthings> shevy: why would you be scared to find crappy talks
<breakingthings> that's what the X button at the top of all your windows is for anyway
Catbuntu has quit [Quit: Leaving]
<thecodethinker> hmm... thats upsetting
<breakingthings> JS ain't all bad buddy
<thecodethinker> >.>
<shevy> hmmmmmmm
<breakingthings> not like you're working with the DOM, so y'know
<shevy> a = b = c # NameError: undefined local variable or method `c'
<breakingthings> you just have to deal with JS's weirdness as a language.
<shevy> a = a = a # => nil
<thecodethinker> CoffeScript :D
<julian-delphiki> >> a = a = a
<eval-in> julian-delphiki => nil (http://eval.in/12256)
<julian-delphiki> >> a = a = a; p a
<eval-in> julian-delphiki => nil
<eval-in> nil (http://eval.in/12257)
<julian-delphiki> interesting
<breakingthings> >> a = b = a
<shevy> breakingthings I am scared because I live only once! no time for crappy talks!!!
<eval-in> breakingthings => nil (http://eval.in/12258)
<julian-delphiki> i remember that from the talk
<breakingthings> deal w/ it ^
<breakingthings> shevy: so… what you're saying is...
<thecodethinker> it's a few years old but...
<breakingthings> yo… lo.
gothicsouth has quit [Quit: leaving]
* thecodethinker facepalms
<shevy> wow
<shevy> a = ABC = a # => nil
<shevy> ruby cheats!
* thecodethinker slaps breakingthings
sn0wb1rd has joined #ruby
horofox has joined #ruby
<breakingthings> thecodethinker: all be here all… next hour.
<shevy> what's with you two, are you married or what :P
shadowshell has quit [Remote host closed the connection]
<breakingthings> shevy shhh don't spoil the surprise
<breakingthings> whoopps that wuz supst 2 b a pm
<shevy> ok
R_Macy has quit [Quit: Computer has gone to sleep.]
<shevy> why does this work?
<breakingthings> no but really anyway
<shevy> the a = a stuff
<breakingthings> dunno you should find out
<shevy> !
<breakingthings> thecodethinker: ruby can't do -any- clientside logic, tho.
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<shevy> nil = nil # SyntaxError: compile error # (irb):10: Can't assign to nil
<thecodethinker> breakingthings: hm... I guess i'll have to... MAKE A JS REPLACEMENT :DD
<breakingthings> You could use uh, CoffeeScript, that Ruby std lib in JS thing…
hadees has joined #ruby
<breakingthings> thecodethinker enjoy the next 20 years of your life getting browser vendors to adopt it
<thecodethinker> breakingthings: I was looking at that
<thecodethinker> breakingthings: shh... i'll hack it into their code
<breakingthings> >>a = a+a
<eval-in> breakingthings => /tmp/execpad-3cce3816332c/source-3cce3816332c:2:in `<main>': undefined method `+' for nil:NilClass (NoMethodError) (http://eval.in/12259)
<breakingthings> welp that checks out
<breakingthings> >>a
<eval-in> breakingthings => /tmp/execpad-814c576876d3/source-814c576876d3:2:in `<main>': undefined local variable or method `a' for main:Object (NameError) (http://eval.in/12260)
sambao21 has joined #ruby
<thecodethinker> So ruby is just for serverside stuff then?
<breakingthings> thecodethinker: everything is for serverside stuff
freakazoid0223 has quit [Read error: Connection reset by peer]
<breakingthings> javascript is the -only- exception
pkircher has quit [Read error: Operation timed out]
<breakingthings> it is the -only- way to perform in-browser, clientside logic.
<shevy> thecodethinker I wanna knock you out man
<shevy> use ruby for everything!
<breakingthings> brb using ruby to fly rawkets for nasa
<breakingthings> no, I don't mean coding
<shevy> you could!
<breakingthings> I mean like, printing out ruby and using it as a steering wheel.
<thecodethinker> shevy: :'( don't hate. I'm new to internetz developmentz stuff.. I've been all C languages for all my programmer life
<breakingthings> thecodethinker: there's going to be a LOT to learn for you to get into web development, rails is not really going to make that any easier.
<breakingthings> probably harder.
<shevy> thecodethinker ok so you use C, we can use ruby inline to also use ruby with C directly
jensnorr has joined #ruby
<whitequark> thecodethinker: don't listen shevy too much
<thecodethinker> whitequark: I am starting to get that -_-
<havenwood> shevy: Ruby is for telephony, 3d, robots, whatever - but like all languages other than JS, it doesn't run in a web browser.
<whitequark> thecodethinker: he's pretty harmful but not really sane
<shevy> thecodethinker don't listen to whitequark, he is fat
<whitequark> er, harmless
Roa has quit [Read error: Operation timed out]
<thecodethinker> shevy: what
<thecodethinker> shevy: is wrong
<breakingthings> >To package your binaries into a gem, use hoe's INLINE
<shevy> hahaha :D
<thecodethinker> shevy: with being
<thecodethinker> shevy: FAAAT!!!
<breakingthings> Don't use hoes inline, man
<shevy> lol
k3rn3lito has quit [Ping timeout: 260 seconds]
djwonk has joined #ruby
<shevy> no seriously
<thecodethinker> (sigh) to coffescript -_- wish me luck
drumsrgr8forn8 has quit [Ping timeout: 240 seconds]
<shevy> thecodethinker look at that example on that page
<shevy> builder.c "
<shevy> long factorial(int max) {
<shevy> ^^^ there! C code in ruby
rupee has joined #ruby
<shevy> hmm FFI is perhaps even cooler than that
<thecodethinker> shevy: but I need to be able to make games. It's what I do. If I have some serverside stuff I'll probably use ruby. perl is .... odd and node.js is... js
<whitequark> -_- shevy, it uses ffi
<shevy> ah?
<shevy> man, that's cheating
<swarley> I think I'm going to be waiting for a while for this to finish
<swarley> anagram([3,5,5,6,5,2,2,5],"ybpsylyrcytyrglhlymtyprpsyyssysty")
<shevy> die, rubyinline, DIE
<swarley> Since, my algorithm is terrible at best
<whitequark> thecodethinker: if you want to make something real, stick to c++ or .net
generalissimo has quit [Remote host closed the connection]
<whitequark> thecodethinker: though .net has questionable portability
<whitequark> thecodethinker: if we're talking about games, that is
<swarley> unity offers some portability for game developing
<thecodethinker> whitequark: I have a feeling webgl is going to be something big.
<thecodethinker> swarley: (sigh) unity
<whitequark> thecodethinker: meh
emocakes has joined #ruby
<swarley> Never said it was a joy to work with
verysoftoiletppr has joined #ruby
<thecodethinker> whitequark: I have a feeling.... so I want to be familiar with it...
<whitequark> thecodethinker: don't forget IE only offers DX
<mirkgeo> How do I see what external dependencies gems have?
<swarley> A single gem?
hemanth has quit [Read error: Connection reset by peer]
<whitequark> and GL always sucked on Darwin and its derivatives
<thecodethinker> whitequark: pffft. if they use IE they don't deserve to play my games
<swarley> you look at its Gemfile
<shevy> mirkgeo I think every .gemspec must list the dependencies
<thecodethinker> my crappy games -_-
<mirkgeo> All gems in the Gemfile
hemanth has joined #ruby
<swarley> probably the bundler gem has some interface for it
rippa has quit [Read error: Connection reset by peer]
<Caelum> MrZYX: how's this: https://gist.github.com/rkitover/5120071
spinagon has joined #ruby
tealmage has joined #ruby
<MrZYX> I think you meant nil with 'nil', right?
<MrZYX> so you can just write return if @restaurants.empty?
<mirkgeo> shevy: aha, how do I find that?
milktrader has left #ruby [#ruby]
freeayu has joined #ruby
<swarley> https://gist.github.com/swarley/5120082 open to suggestions
jean-louis has quit [Remote host closed the connection]
<MrZYX> Caelum: also you can save the parenthesis on the left hand side on line 13
<MrZYX> and the last line in a method is implicitly returned, so need for it in ll 15, 59, 75
<MrZYX> for the return keyword that is
hbpoison has joined #ruby
k3rn3lito has joined #ruby
<MrZYX> print anything, "\n", is the same as puts anything
Roa has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
etcetera has quit []
_nitti has quit [Ping timeout: 250 seconds]
<MrZYX> you can write ll 28-30 with menus[menu_item] ||= {}
<Caelum> I was wondering what would be a nicer way to do that
<MrZYX> there's open as kernel method, so need to prepend File.
verysoftoiletppr has quit [Ping timeout: 250 seconds]
<shevy> mirkgeo hmm not sure... perhaps there is a way from within Gem
djwonk has quit []
tjbiddle_ has joined #ruby
tjbiddle_ has quit [Client Quit]
<shevy> mirkgeo there probably is one. Gem somehow parses .gemspec files
mengu has quit [Quit: Konversation terminated!]
kpshek has quit []
<MrZYX> Caelum: also I think I prefer open(foo) do |file| file.lines.each do |line|... so the file automatically closes
pac1 has joined #ruby
<pac1> ng
icole has quit [Remote host closed the connection]
jean-louis has joined #ruby
<Caelum> MrZYX: thank you very much!
FenrirReturns has quit [Ping timeout: 250 seconds]
tcstar has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
grzywacz has joined #ruby
charlesstrahan has quit [Quit: leaving]
tjbiddle has quit [Ping timeout: 264 seconds]
<MrZYX> alright the return 'nil' stills feels odd to me, I'd prefer a plain return if ...
Xeago has quit [Remote host closed the connection]
<MrZYX> also rubyiests prefer "#{restaurant}, #{meal_price}" over what you have in line 15
mulinux has joined #ruby
<jensnorr> Any tips on writing a script in ruby that just waits for signals and not exit immediatly? Would prefer to not use a loop with sleep 1 in it
dougireton has quit [Quit: Leaving.]
<tylersmith> jensnorr: perhaps you want to look into EventMachine
Corax has quit [Ping timeout: 255 seconds]
<jensnorr> Yes, I was thinking about that. Just curious if there was something obvious in stdlib I was missing
hbpoison has quit [Ping timeout: 255 seconds]
bigkevmcd has quit [Remote host closed the connection]
<havenwood> jensnorr: There is Kernel#select: http://ruby-doc.org/core-2.0/Kernel.html#method-i-select
axhlf has quit [Remote host closed the connection]
<havenwood> jensnorr: Might want to look at nio4r gem for ideas. https://github.com/tarcieri/nio4r
_nitti has joined #ruby
<jensnorr> havenwood: Thanks
sailias has quit [Ping timeout: 272 seconds]
tjbiddle has joined #ruby
<MrZYX> Caelum: you want to find the cheapest one, right?
grzywacz has quit [Quit: :wq]
jjbohn is now known as jjbohn|afk
jjbohn|afk is now known as jjbohn
terrific has joined #ruby
mockra has quit [Remote host closed the connection]
v0n has quit [Read error: Operation timed out]
dougireton has joined #ruby
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Caelum> MrZYX: yup
kpshek has joined #ruby
dougireton has quit [Client Quit]
kofno has quit [Remote host closed the connection]
drumsrgr8forn8 has joined #ruby
reppard has joined #ruby
dougireton has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
geggam_wk has quit [Remote host closed the connection]
hemanth has joined #ruby
rgbdev has joined #ruby
<Caelum> MrZYX: and the #{foo} interpolation automatically does the .to_s, nice
echobin6 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
<MrZYX> yep
wmoxam has quit [Quit: leaving]
<MrZYX> that's why nobody uses + in Ruby ;)
<breakingthings> one of many little moments of joy I had coming to ruby.
<robert_> oh great; I need to parse HL7 messages suddenly. And the gem either doesn't work or the messages inside the package don't work.
<breakingthings> "Holy @#$%, I don't have to append strings ever again! HA HA! TIME FOR RUBY!"
R_Macy has joined #ruby
jeffreybaird has joined #ruby
pdamer has quit [Quit: pdamer]
neku has joined #ruby
<icy`> ^
sheenobu has quit [Quit: sheenobu]
Elhu has joined #ruby
cmarques has quit [Ping timeout: 248 seconds]
kpshek has quit []
gyre007 has quit [Ping timeout: 260 seconds]
<icy`> I still use + sometimes
<robert_> so do I.
<icy`> array.reduce(:+) ;P
<robert_> :p
stayarrr has quit [Quit: Leaving...]
<MrZYX> I'm sorry
<MrZYX> I should've said String#+
hemanth has quit [Read error: Connection reset by peer]
_jc has quit [Quit: Textual IRC Client: www.textualapp.com]
<MrZYX> Caelum: do you happen to have some sample data & calls?
miskander has quit [Quit: miskander]
hemanth has joined #ruby
tommyvyo has quit [Quit:]
drumsrgr8forn8 has quit [Ping timeout: 240 seconds]
onlinenickid has joined #ruby
cmyers has left #ruby [#ruby]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
akhet has quit [Ping timeout: 260 seconds]
ebobby has joined #ruby
mark_locklear has quit [Ping timeout: 260 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
Stilo has joined #ruby
<MrZYX> thanks
etcetera has joined #ruby
drumsrgr8forn8 has joined #ruby
Neomex has joined #ruby
mritr_ has quit [Ping timeout: 240 seconds]
gaahrdner has quit [Remote host closed the connection]
Neomex has quit [Client Quit]
markalanevans has joined #ruby
<markalanevans> If i create a module, and i include it in a class
pkrnj has joined #ruby
dougireton has quit [Quit: Leaving.]
<markalanevans> how do i from within the class reference the methods in the module.
<markalanevans> For exampe:
<markalanevans> If i have that, and then in another class i do : include Genius
<markalanevans> How from methods inside the Class do i refer to the methods that are included in my module.
banseljaj is now known as imami|afk
etcetera has quit []
miskander has joined #ruby
Illusioneer has quit [Ping timeout: 272 seconds]
miskander has quit [Client Quit]
Xeago has joined #ruby
<markalanevans> hmm. must be friday?
timonv has joined #ruby
icole has joined #ruby
tommyvyo has joined #ruby
etcetera has joined #ruby
<apeiros_> markalanevans: you just call them
<markalanevans> i don't need to refer to this?
<markalanevans> or sefl
<markalanevans> self
<apeiros_> self is implicit
tcstar has joined #ruby
<MrZYX> Caelum: okay here's what I would end up with by refactoring your first program http://paste.mrzyx.de/show.php?id=1361, maybe it can give you some take aways :)
emmanuelux has joined #ruby
k3rn3lito has quit [Ping timeout: 276 seconds]
RickFromTheSOC has joined #ruby
Roa has quit [Ping timeout: 276 seconds]
etcetera has quit [Client Quit]
<icy`> include Genius::ClassMethods
<icy`> then item_shipping_price(...)
<apeiros_> icy`: read the full thing
carloslopes has joined #ruby
<apeiros_> he does NOT need to include Genius::ClassMethods
<icy`> ah right
<apeiros_> a) because that'd be wrong (extend, not include) and b) because Genius already does that
carloslopes has quit [Remote host closed the connection]
__Big0__ has quit [Remote host closed the connection]
carloslopes has joined #ruby
ddd has quit [Ping timeout: 245 seconds]
verysoft_ has joined #ruby
<markalanevans> So Perhaps i'm a tad confused. I'm just learning Sinatra. And in my main sinatra file
<markalanevans> class App < Sinatra::Base
<markalanevans> i do include Genius
hadees has quit [Quit: hadees]
<apeiros_> class Foo; include Genius; def self.foo; some_method_from_genius_class_methods; end; def bar; some_method_from_genius_instance_methods; end; end
alx- has quit [Quit: alx-]
<markalanevans> Then in the get '/' section i try to use method_from_my_module
<markalanevans> But i'm getting undefined issues.
<apeiros_> from which module. you have two…
<markalanevans> apeiros_: your refering to my paste?
<apeiros_> also I'm not sure in what context sinatra runs the block passed to `get`
<markalanevans> In this case the one in ClassMethods
<apeiros_> markalanevans: yes
<apeiros_> markalanevans: I *assume* that the block passed to get is instance_eval'ed
<apeiros_> then you'd have to use self.class.method_name in that block
<markalanevans> ok.
<markalanevans> let me try that
philcrissman has joined #ruby
<apeiros_> but you're probably not supposed to use the class methods there anyway
lewis is now known as lewix
<apeiros_> but I haven't played with sinatra
ddd has joined #ruby
<onewheelskyward> Sinatra is quite fun.
<markalanevans> Woot.
<markalanevans> apeiros_: thats worked.
<markalanevans> So apeiros_ why is that again
<apeiros_> markalanevans: consider the `get` stuff to be instance methods then
<markalanevans> you said i "assume" that the block paassed to get is instance_evaled
<apeiros_> because the methods in ClassMethods become class methods (hence the name)
<apeiros_> why I assume? because I don't know. and you can't tell just from the method signature.
<markalanevans> apeiros_: so if i wanted to just use the method without the .class they should be in the instanec module?
<markalanevans> *instance
Davey has joined #ruby
<apeiros_> yes
<apeiros_> the methods in ClassMethods can be used in the class body
Neomex has joined #ruby
carloslopes has quit [Ping timeout: 256 seconds]
<apeiros_> useful to define methods like sinatra's "get" method
<markalanevans> Ok. I'm going to test that. So if your assumption is correct, i could just use the method name without self as well?
<apeiros_> or ruby's "attr_accessor"
<Caelum> MrZYX: what is inject(&:+), is that kind of like how you do a reduce in haskell?
love_color_text has quit [Remote host closed the connection]
<apeiros_> markalanevans: any method which you can call with self, you can call without. only exceptions: keywords and methods ending with '='
<MrZYX> Caelum: don't know haskell but it's the compensation for the lack of a sum function
katherinem13 has quit [Ping timeout: 250 seconds]
<apeiros_> (self.class e.g., because class is a keyword)
<apeiros_> MrZYX, Caelum: inject(:+) - faster than inject(&:+)
<markalanevans> apeiros_: when defining a class is it clear to use self. just for clarity?
<apeiros_> markalanevans: *defining* a method is different from calling
<markalanevans> * ment calling
hemanth has quit [Read error: Connection reset by peer]
reppard has quit [Ping timeout: 245 seconds]
<apeiros_> `def self.foo` defines a class method. `def foo` defines an instance method
<MrZYX> apeiros_: thanks
hemanth has joined #ruby
russfrank has quit [Ping timeout: 256 seconds]
<apeiros_> markalanevans: I never use self for method calls. I find that redundant, even annoying.
jtperreault has quit [Ping timeout: 245 seconds]
<markalanevans> ok.
<lewix> Caelum: reduce and inject are interchangeable
<markalanevans> Just trying to learn the best pracitces etc.
icy` has quit [Ping timeout: 260 seconds]
_nitti_ has joined #ruby
woolite64 has quit [Quit: Leaving]
<apeiros_> markalanevans: sure. asking is a good method for that ;-)
akhet has joined #ruby
<markalanevans> Cool. Thanks apeiros_
<apeiros_> also a good method: paste (reproducable!) code and ask for help refactoring
jjbohn has quit [Quit: Leaving...]
<lewix> apeiros_: it's pretty
_nitti has quit [Ping timeout: 248 seconds]
mockra has joined #ruby
<markalanevans> ok
_nitti__ has joined #ruby
Neomex has quit [Quit: Neomex]
cr3 has quit [Quit: leaving]
mfletcher has joined #ruby
<shevy> markalanevans a good practice is to try to achieve what you really need, in as few characters as required
wyhaines_ has joined #ruby
senayar has joined #ruby
<markalanevans> shevy: gotcha. Will keep that in mind
wyhaines has quit [Read error: No route to host]
s__dana_ has joined #ruby
<shevy> Caelum you can either do something like array.map {|x| x.chomp } or this here array.map(&:chomp)
mfletcher has quit []
verysoft_ has quit []
_nitti_ has quit [Ping timeout: 248 seconds]
<shevy> anyone of you guys using __END__ a lot?
nga4 has joined #ruby
verysoftoiletppr has joined #ruby
<apeiros_> during development? all the time
<shevy> cool
<apeiros_> production to actually read data? rarely ever
<shevy> what kind of data do you happen to store after __END__ ?
<Caelum> shevy: I see, thank you
<apeiros_> old code I'm rewriting or refactoring
<shevy> well, right now I am thinking of storing some configuration-like values in a .rb file
<apeiros_> i.e., I abuse it as comment :)
<shevy> hehe
evenix has quit [Remote host closed the connection]
<Caelum> MrZYX: thank you very much for all your help, I've learned a great deal about ruby. Still need to read a book, but now I won't be lost when I need to read some code
katherinem13 has joined #ruby
s__dana has quit [Ping timeout: 272 seconds]
s__dana_ is now known as s__dana
<MrZYX> you're welcome :)
alex__c2022 has quit [Quit: alex__c2022]
tjbiddle_ has joined #ruby
_nitti has joined #ruby
jerius has quit []
ashabhasa has joined #ruby
russfrank has joined #ruby
ashabhasa has quit [Client Quit]
tjbiddle has quit [Ping timeout: 260 seconds]
tjbiddle_ is now known as tjbiddle
_nitti_ has joined #ruby
senayar has quit [Remote host closed the connection]
_nitti__ has quit [Ping timeout: 245 seconds]
Rioji has quit [Remote host closed the connection]
Politoed has joined #ruby
yashshah__ has quit [Read error: Connection reset by peer]
yashshah__ has joined #ruby
<lewix> Caelum: what material you used to learn
Zolo has quit [Remote host closed the connection]
mulinux has quit [Quit: mulinux]
jtharris has quit [Quit: WeeChat 0.4.0]
tommyvyo has quit [Quit:]
Zolo has joined #ruby
<Caelum> lewix: for this thing? just some quick google searches
_nitti has quit [Ping timeout: 240 seconds]
mirkgeo has quit [Ping timeout: 245 seconds]
codecop has quit [Ping timeout: 264 seconds]
hbpoison has joined #ruby
chico_chicote has joined #ruby
_nitti has joined #ruby
gommo has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving.]
bonhoeffer has joined #ruby
forrest has quit [Quit: Leaving]
nicoulaj has quit [Remote host closed the connection]
s__dana_ has joined #ruby
jasonthesensei has joined #ruby
<jasonthesensei> hi everyone Im new to ruby ran into problem i have rubygems instlled but when i'm in irb and i require 'rubygems' the response is false ny ide how to fix this
verysoftoiletppr has quit [Read error: Connection reset by peer]
Davey has quit [Quit: Computer has gone to sleep.]
_nitti_ has quit [Ping timeout: 264 seconds]
<shevy> jasonthesensei, what ruby version
s__dana has quit [Ping timeout: 250 seconds]
s__dana_ is now known as s__dana
hbpoison has quit [Ping timeout: 248 seconds]
<shevy> since 1.9 and higher, rubygems should be integrated so you no longer have to require it
<jasonthesensei> 1.9.3p0
<shevy> and a return value of false here often indicates that it was already required
<Hanmac> jasonthesensei ... false means that rubygems is allready required
<jasonthesensei> thnks a lot
<shevy> example:
<shevy> require 'mathn' # => true
adkron_ has quit [Ping timeout: 256 seconds]
<shevy> require 'mathn' # => false
Liquid-- has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<jasonthesensei> yeah i had done require 'money' # => true
hemanth has joined #ruby
adkron has quit [Ping timeout: 276 seconds]
<apeiros_> with ruby 1.9, rubygems is by default always loaded
<Caelum> what's the difference between array.all do |i| and array.all? do |i| do you use all? when you want to return a boolean?
<jasonthesensei> Thank you so i just require my gem in irb
<apeiros_> a failing require will raise LoadError
lewix has quit [Ping timeout: 272 seconds]
<shevy> Caelum where do you have this example
adkron has joined #ruby
adkron_ has joined #ruby
<apeiros_> Caelum: array.all does not exist
<shevy> Caelum "all" is another method than "all?" do you know that? unless you would alias one to the other
<apeiros_> Caelum: are you looking at rails maybe? i.e. ActiveRecord::Base::all ?
yfeldblum has quit [Ping timeout: 272 seconds]
verysoftoiletppr has joined #ruby
<Caelum> apeiros_: I see, thank you
jeffreybaird has quit [Quit: jeffreybaird]
thecodethinker has quit [Quit: Lost terminal]
elux has quit [Quit: Leaving...]
RickFromTheSOC has left #ruby ["Leaving"]
<Caelum> apeiros_: the method? methods are a bit confusing if you're not used to them
<apeiros_> Caelum: with `all?`, the ? is just part of the method name
drumsrgr1 has joined #ruby
<apeiros_> and yes, they usually return true/false
<apeiros_> Caelum: why should they be confusing? it's just a name. same with methods ending with !
invisime has quit [Quit: Leaving.]
emmanuelux has quit [Ping timeout: 260 seconds]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
<Caelum> apeiros_: now that you explain that it makes more sense, but without knowing that it looks like syntax
<apeiros_> ok
Davey has joined #ruby
alanp_ has joined #ruby
<apeiros_> I can imagine that it is confusing without knowing that it's just part of the name
drumsrgr8forn8 has quit [Ping timeout: 240 seconds]
breakingthings has quit []
echobin6 has quit [Read error: Connection reset by peer]
philcrissman has quit [Remote host closed the connection]
echobinary has joined #ruby
R_Macy has quit [Quit: Computer has gone to sleep.]
Liquid-- has quit [Quit: Computer has gone to sleep.]
Zolo has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
jbueza has quit [Quit: Leaving.]
Zolo has joined #ruby
carlyle has quit [Remote host closed the connection]
R_Macy has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
xeronic has quit []
alanp has quit [Ping timeout: 276 seconds]
hemanth has joined #ruby
drumsrgr1 has quit [Ping timeout: 240 seconds]
DaltonUS has joined #ruby
motto has quit [Quit: Sto andando via]
kofno has joined #ruby
the_jeebster has joined #ruby
<the_jeebster> I'm curious to know…do any of you guys code in an outdoor environment?
solidoodlesuppor has quit [Remote host closed the connection]
<Hanmac> the outdoor is a fake :P
<the_jeebster> :(
<the_jeebster> all I'm saying is give me a laptop, screen-protector, and headphones and I can be just as productive. I feel better with natural stimulation anyways
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
kirun has quit [Quit: Client exiting]
<the_jeebster> just wondering if anyone felt the same in mostly "reclusive" industry
d2dchat has quit [Remote host closed the connection]
<the_jeebster> bloom filters on the beach doesn't sound too shabby
enebo has quit [Quit: enebo]
timonv has quit [Remote host closed the connection]
pkrnj has joined #ruby
DaltonUS has quit [Quit: DaltonUS]
etcetera has joined #ruby
verysoftoiletppr has quit [Read error: Connection reset by peer]
Skylab has quit [Quit: Skylab]
hashmal has quit [Quit: Computer has gone to sleep.]
backjlack has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 260 seconds]
etcetera has quit [Client Quit]
hashmal has joined #ruby
<terrific> Homeless folks code outdoors
backjlack has joined #ruby
ToTo has joined #ruby
choclo has left #ruby [#ruby]
dustint has quit [Ping timeout: 276 seconds]
bonhoeffer has quit [Quit: bonhoeffer]
<onewheelskyward> true
emmanuelux has joined #ruby
verysoftoiletppr has joined #ruby
hasimo has joined #ruby
<the_jeebster> terrific: lmao. I don't think too many homeless are preoccupied with programming
<the_jeebster> or even have laptops for that matter
<the_jeebster> or are mentally stable
julian-delphiki has quit [Quit: Computer has gone to sleep.]
pskosinski has quit [Ping timeout: 272 seconds]
adkron__ has quit [Ping timeout: 255 seconds]
hemanth has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #ruby
hemanth has joined #ruby
newUser1234 has quit [Ping timeout: 248 seconds]
tjbiddle_ has joined #ruby
hiroyuki_ has quit [Read error: Connection reset by peer]
<onewheelskyward> You'd be surprised here in Portland, or.
stopbit has quit [Quit: Leaving]
aed has quit []
Criztian has joined #ruby
chrisnicola has joined #ruby
chrisnicola_ has joined #ruby
chrisnicola_ has quit [Client Quit]
love_color_text has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
freakazoid0223 has joined #ruby
tjbiddle has quit [Ping timeout: 260 seconds]
tjbiddle_ is now known as tjbiddle
maxmanders has quit [Quit: Computer has gone to sleep.]
mmitchell has quit [Ping timeout: 250 seconds]
tjbiddle_ has joined #ruby
enebo has joined #ruby
baroquebobcat has joined #ruby
nfk has quit [Quit: yawn]
tjbiddle has quit [Ping timeout: 260 seconds]
tjbiddle_ is now known as tjbiddle
wgosling has joined #ruby
ffranz has quit [Quit: Leaving]
vlad_starkov has joined #ruby
adkron_ has quit [Ping timeout: 248 seconds]
adkron has quit [Ping timeout: 248 seconds]
tish has joined #ruby
anonymuse has quit [Quit: Leaving...]
markalanevans has quit [Read error: Operation timed out]
chrishough has quit [Ping timeout: 276 seconds]
Zolo has quit [Remote host closed the connection]
MIG777 has joined #ruby
verysoftoiletppr has quit [Read error: Connection reset by peer]
MIG777 has left #ruby [#ruby]
hasimo has quit [Remote host closed the connection]
<wgosling> By default, CGI.escape will replace ' ' with '+'. Is there a way I can make it use '%20'?
vlad_starkov has quit [Ping timeout: 264 seconds]
tjbiddle_ has joined #ruby
<apeiros_> wgosling: URI.encode
hasimo has joined #ruby
yfeldblum has joined #ruby
jean-louis has quit [Ping timeout: 276 seconds]
malkomalko has quit [Ping timeout: 245 seconds]
willob has quit [Quit: Leaving.]
DarkAceZ has joined #ruby
tjbiddle_ has quit [Remote host closed the connection]
mercwith1mouth has joined #ruby
tjbiddle has quit [Ping timeout: 248 seconds]
verysoftoiletppr has joined #ruby
drumsrgr1 has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
danneu has quit [Ping timeout: 240 seconds]
hemanth has joined #ruby
adkron has joined #ruby
adkron_ has joined #ruby
jgarvey has quit [Quit: Leaving]
Criztian has quit [Remote host closed the connection]
hbpoison has joined #ruby
tommyvyo has joined #ruby
<Caelum> the_jeebster: until we have laptops with eink displays, a laptop is going to suck in sunlight
<the_jeebster> Caelum: this is true, glare is the biggest drawback right now
<the_jeebster> there are special lenses for that case though
_nitti has quit [Remote host closed the connection]
hasimo_ has joined #ruby
horofox has quit [Quit: horofox]
aedornm has joined #ruby
<wgosling> apeiros: CGI.escape is getting called via a library, so I can't change CGI.escape -> URI.encode
verysoftoiletppr has quit []
<apeiros_> no luck then
<apeiros_> what's your issue with + instead of %20?
<Caelum> you can always temporarily replace it :D
<apeiros_> (and btw. - yes of course you could, this is ruby after all…)
hemanth has quit [Read error: Connection reset by peer]
hasimo has quit [Ping timeout: 245 seconds]
bluOxigen has quit [Ping timeout: 240 seconds]
<otters> wgosling: sure you can
<apeiros_> as simple as `def CGI.escape(str); URI.encode(str); end`
<wgosling> apeiros_: The server interprets +'s in a query as a literal + and not as a space.
hemanth has joined #ruby
<apeiros_> wgosling: broken server then
<apeiros_> worthy of a bug report
DaltonUS has joined #ruby
DaltonUS has quit [Client Quit]
<wgosling> apeiros_: It is very, very, very, very broken.
<otters> or you could replace '+' with '%20'
wgosling has left #ruby ["Konversation terminated!"]
charliesome has joined #ruby
himsin has joined #ruby
wgosling has joined #ruby
wgosling has left #ruby ["Konversation terminated!"]
apeiros_ has quit [Remote host closed the connection]
emergion has joined #ruby