fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
ngoldman has quit [Remote host closed the connection]
lggr has joined #ruby
samuel02 has quit [Remote host closed the connection]
Jork1 has quit [Quit: Jork1]
kirun has quit [Quit: Client exiting]
bluenemo has joined #ruby
bluenemo has quit [Read error: Connection reset by peer]
<richardjortega> anyone use saucelabs?
<richardjortega> trying to figure out how to return html source from selenium-webdriver
sneakyness_wk has quit [Quit: run!]
chrishunt has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 256 seconds]
havenn has joined #ruby
stephenjudkins has joined #ruby
headius has quit [Quit: headius]
graft has quit [Ping timeout: 255 seconds]
lggr has joined #ruby
havenn has quit [Ping timeout: 260 seconds]
roadt has joined #ruby
VegetableSpoon has joined #ruby
diegoviola has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 248 seconds]
richardjortega has quit [Quit: richardjortega]
foysavas has joined #ruby
richardjortega has joined #ruby
foysavas has quit [Client Quit]
lggr has joined #ruby
elevenarms has quit [Remote host closed the connection]
Takehiro has joined #ruby
headius has joined #ruby
JonnieCache has quit [Ping timeout: 244 seconds]
`brendan has joined #ruby
Takehiro has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 264 seconds]
slainer68 has joined #ruby
ilyam has quit [Quit: ilyam]
lggr has joined #ruby
roychri has quit [Ping timeout: 255 seconds]
hgf has joined #ruby
CaptainJet has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9]
SJr has quit [Excess Flood]
SJr has joined #ruby
daslicious has quit [Quit: daslicious]
daslicious_ is now known as daslicious
lggr has quit [Ping timeout: 240 seconds]
hsbt is now known as hsbt_away
mahmoudimus has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
yoklov has joined #ruby
otters has joined #ruby
sent-hil has joined #ruby
Nisstyre-laptop has joined #ruby
rabidpraxis has joined #ruby
wargasm1 has quit [Read error: Connection reset by peer]
ozette has quit [Ping timeout: 246 seconds]
wargasm has joined #ruby
Trioke has quit [Ping timeout: 255 seconds]
parzorep has quit [Quit: parzorep]
blazes816 has quit [Quit: blazes816]
lggr has quit [Ping timeout: 240 seconds]
rabidpraxis has quit [Ping timeout: 244 seconds]
Araxia has quit [Quit: Araxia]
wpaulson has joined #ruby
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-rc2)]
lggr has joined #ruby
Eplemosen has quit [Quit: NOPE]
fumduq has quit [Quit: Linkinus - http://linkinus.com]
hgf has quit [Quit: hgf]
lggr has quit [Ping timeout: 240 seconds]
glyytchy has quit [Quit: Leaving...]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
stephh has quit [Ping timeout: 260 seconds]
bricker has quit [Ping timeout: 248 seconds]
sent-hil has quit [Remote host closed the connection]
lggr has joined #ruby
parzorep has joined #ruby
notVert has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
sarmiena_ has quit [Quit: sarmiena_]
lggr has quit [Ping timeout: 240 seconds]
dpk has quit [Quit: Asleep at the keyboard.]
reuf has joined #ruby
ledao has quit [Quit: Leaving.]
lggr has joined #ruby
ledao has joined #ruby
rburton- has joined #ruby
stephh has joined #ruby
iamjarvo has joined #ruby
ilyam has joined #ruby
piotr__ has quit [Ping timeout: 256 seconds]
Banistertab has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
steakknife has quit [Quit: Leaving.]
iamjarvo has quit [Ping timeout: 245 seconds]
Banistertab has quit [Read error: Connection reset by peer]
headius has quit [Quit: headius]
chrishunt has joined #ruby
brianpWins has quit [Quit: brianpWins]
bradleyprice has quit [Remote host closed the connection]
hsbt_away is now known as hsbt
lggr has joined #ruby
chrishunt has quit [Ping timeout: 240 seconds]
boodle has joined #ruby
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
lggr has quit [Ping timeout: 256 seconds]
voodoofish430 has quit [Quit: Leaving.]
davidcelis has joined #ruby
boodle has quit [Client Quit]
ryanf has joined #ruby
jimeh2 has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
yalue has quit [Remote host closed the connection]
awarner has joined #ruby
mxweas has quit [Quit: Leaving...]
wargasm has quit [Ping timeout: 246 seconds]
F1skr has joined #ruby
davidcelis has quit [Ping timeout: 256 seconds]
F1skr has quit [Client Quit]
tpe11etier has joined #ruby
davidcelis has joined #ruby
davidcelis has joined #ruby
davidcelis has quit [Changing host]
lggr has quit [Ping timeout: 246 seconds]
awarner has quit [Remote host closed the connection]
F1skr has joined #ruby
F1skr has quit [Client Quit]
davidcelis has quit [Ping timeout: 255 seconds]
JetAway has joined #ruby
lggr has joined #ruby
CaptainJet has quit [Disconnected by services]
JetAway is now known as CaptainJet
g-ram has joined #ruby
davidcelis has joined #ruby
notVert has quit [Remote host closed the connection]
classix has quit [Read error: Connection reset by peer]
icole has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
hgf has joined #ruby
crazymykl has joined #ruby
davidcelis has quit [Ping timeout: 240 seconds]
icole has joined #ruby
vitor-br has joined #ruby
lggr has joined #ruby
davidcelis has joined #ruby
classix has joined #ruby
nwertman has quit [Quit: nwertman]
lggr has quit [Ping timeout: 240 seconds]
davidcelis has quit [Ping timeout: 264 seconds]
rakunHo has joined #ruby
lggr has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
irleif has quit [Quit: Computer has gone to sleep.]
mahmoudimus has joined #ruby
thinkclay has joined #ruby
apok has quit [Ping timeout: 256 seconds]
ilyam has quit [Quit: ilyam]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
ohsiris has quit [Quit: Lost terminal]
lggr has quit [Ping timeout: 246 seconds]
doug has left #ruby [#ruby]
diegoviola has joined #ruby
bradleyprice has joined #ruby
irleif has joined #ruby
pipopopo has quit [Ping timeout: 255 seconds]
Ruler_Of_Heaven_ has joined #ruby
lggr has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
wisconsin has joined #ruby
gmci has quit [Ping timeout: 256 seconds]
hunglin has joined #ruby
havenn has joined #ruby
mahmoudimus has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
hunglin has left #ruby [#ruby]
cakehero has quit [Quit: Computer has gone to sleep.]
gmci has joined #ruby
cakehero has joined #ruby
hsbt has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ruby
cakehero has quit [Ping timeout: 255 seconds]
robertotauille has joined #ruby
slainer68 has quit [Remote host closed the connection]
cakehero has joined #ruby
gmci has quit [Ping timeout: 240 seconds]
<wisconsin> hi, how do i have gem install use rake to build extensions?
quest88_ has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
gmci has joined #ruby
CaptainJet has quit []
robertotauille has quit [Ping timeout: 246 seconds]
nwertman has joined #ruby
duracrisis has joined #ruby
duracrisis has quit [Changing host]
duracrisis has joined #ruby
wargasm has joined #ruby
radic has joined #ruby
nwertman has quit [Client Quit]
lggr has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
radic_ has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 248 seconds]
jgwong has quit [Ping timeout: 245 seconds]
kenneth has quit [Quit: kenneth]
tchebb has quit [Quit: Leaving.]
rubious has joined #ruby
lggr has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
diegoviola has quit [Ping timeout: 264 seconds]
cakehero has quit [Quit: Leaving...]
axl_ has quit [Ping timeout: 240 seconds]
tchebb has joined #ruby
`brendan has quit [Ping timeout: 246 seconds]
TomJ has quit [Quit: TomJ]
sarmiena_ has joined #ruby
SJr has quit [Excess Flood]
lggr has quit [Ping timeout: 246 seconds]
savage- has quit [Remote host closed the connection]
SJr has joined #ruby
diegoviola has joined #ruby
aam_ has joined #ruby
VegetableSpoon has quit [Remote host closed the connection]
<reactormonk> wisconsin: shouldn't need to
lggr has joined #ruby
DebianUT has quit [Ping timeout: 256 seconds]
gmci has quit [Ping timeout: 264 seconds]
<wisconsin> reactormonk: i need to build either a c extension or a java extension
<reactormonk> wisconsin: gem install doesn't work?
<wisconsin> gem install ignores the Rakefile
vaino has joined #ruby
aam_ has quit [Quit: Leaving]
<reactormonk> yes, it does
<wisconsin> extconf.rb works for a c extension
<reactormonk> is your extension in a gem?
<vaino> any datamapper fanboy here? I want to filter like this ":name.length less then 5"
<wisconsin> how do i build a java extension?
<wisconsin> reactormonk: the gem will contain source for both a c extension and a java extension
<reactormonk> wisconsin: ah, you want to build a gem?
<wisconsin> i'd like gem install to build the appropriate extension
moshee has quit [Ping timeout: 246 seconds]
<reactormonk> as in create
moshee has joined #ruby
<wisconsin> yes, i'm making a gem, and i'd like gem install to build the extension
<reactormonk> go check the docs... I'm sure it's mentioned somwhere
<wisconsin> i've read 100 docs
<reactormonk> the wrong ones then :>
davidcelis has joined #ruby
<wisconsin> rubygems is a disaster
<reactormonk> it works
<wisconsin> no, it really doesn't
<davidcelis> works for me
lggr has quit [Ping timeout: 246 seconds]
<wisconsin> davidcelis: how do you have gem install build a java extension?
<reactormonk> apparently you didn't read enough
<davidcelis> wtf
<davidcelis> a java extension
<davidcelis> what the fuck are you installing
<wisconsin> davidcelis: simple question, no?
<davidcelis> torquebox?
<wisconsin> davidcelis: you've never heard of jruby?
<davidcelis> of course i've heard of jruby
<davidcelis> i avoid it because i have weird fucking issues with it
<bperry> why is it the ruby community's task to ensure something not even support ed by them is supporte din rubygems
<bperry> jruby is just the ruby language implementation onto java
<bperry> it is the people who maintain jruby's job to make a rubygems work for you
<bperry> so I would go complain to the correct people at least
<wisconsin> bperry: how about just a little foresight, that extconf.rb does not fit all needs?
<bperry> why should we care?
<bperry> it is java
lggr has joined #ruby
<wisconsin> so rubygems is for c ruby only?
<bperry> ruby is written in C and ruby
<bperry> ironruby maintains their own gem stuffs
<wisconsin> rubygems is a packaging tool. why would it be tied to the implementation langauge of *one* implementation of ruby?
rubious has quit [Quit: Leaving...]
<bperry> because we go by matz' ruby
<bperry> rubinius could easily make their own
<wisconsin> lol
<vaino> names.all(:name.count.lt => 2)
<vaino> like this
<vaino> any idea?
<wisconsin> it's official then. rubygems sucks.
gmci has joined #ruby
<bperry> cool don't use it
<bperry> go write a better alternative
<bperry> or replacement
<bperry> and I hope everyone starts using it
<bperry> because I am not a fan of rubygems either
wwalker has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 246 seconds]
jgwong has joined #ruby
thinkclay has quit [Quit: Leaving.]
lggr has joined #ruby
swarley has quit [Ping timeout: 245 seconds]
ilyam has joined #ruby
JonnieCache has joined #ruby
iamjarvo has joined #ruby
ilyam has quit [Client Quit]
lggr has quit [Ping timeout: 245 seconds]
wpaulson has joined #ruby
cantonic has quit [Quit: cantonic]
JonnieCache has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
chriskk has joined #ruby
axl_ has joined #ruby
BMF has joined #ruby
gmci has quit [Ping timeout: 240 seconds]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
lggr has quit [Ping timeout: 256 seconds]
baroquebobcat has joined #ruby
gmci has joined #ruby
richardjortega has left #ruby [#ruby]
iamjarvo has quit [Ping timeout: 245 seconds]
tpe11etier has quit [Quit: tpe11etier]
lggr has joined #ruby
sunaku has joined #ruby
baroquebobcat has quit [Client Quit]
havenn has quit [Remote host closed the connection]
gmci has quit [Ping timeout: 248 seconds]
iamjarvo has joined #ruby
jgwong has quit [Ping timeout: 244 seconds]
hadees has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
jgwong has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
gmci has joined #ruby
sunaku has quit [Quit: WeeChat 0.3.9]
Nisstyre-laptop has joined #ruby
lggr has joined #ruby
hadees has quit [Ping timeout: 244 seconds]
Nisstyre-laptop has quit [Remote host closed the connection]
hgf has quit [Quit: hgf]
rubious has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
charliesome has joined #ruby
gmci has quit [Ping timeout: 260 seconds]
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
gmci has joined #ruby
chendo_ has quit [Quit: Leaving...]
mercwithamouth has quit [Ping timeout: 246 seconds]
<Paradox> does any one know of a way to generate rspec tests for each method in a file?
<Paradox> they dont have to be populated
lggr has quit [Ping timeout: 245 seconds]
<Paradox> just trying to find a way to eliminate the redundancy of writing a thousand "describe foo"
jaredrhine has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
Pochacco has joined #ruby
reuf has quit [Quit: Leaving]
<Spaceghostc2c> Paradox: Tests are meant to be written. :(
<Paradox> Spaceghostc2c, i mean just a way to stub it out
<Paradox> so i can write the tests more efficiently
<Paradox> say i have file1.rb that has a bunch of defs
<Paradox> ie def herp
<Paradox> def derp
<Paradox> def lerp
<Paradox> ideally i could run something that does describe "#herp" do…
<Paradox> but leaves the actual test body blank
<Paradox> sort of how rails generate makes empty models/controllers/tests/views
skaczor has quit [Read error: Operation timed out]
havenn has joined #ruby
DarthGandalf has quit [Ping timeout: 245 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 248 seconds]
DarthGandalf has joined #ruby
rubious has quit [Quit: Leaving...]
pskosinski has quit [Remote host closed the connection]
lggr has joined #ruby
kyb3r_ has joined #ruby
stephh has quit [Quit: Lost terminal]
havenn has quit [Ping timeout: 245 seconds]
kyb3r has quit [Ping timeout: 240 seconds]
ayawaska has quit [Ping timeout: 244 seconds]
lggr has quit [Ping timeout: 246 seconds]
irleif has joined #ruby
khakimov has joined #ruby
brianpWins has joined #ruby
lggr has joined #ruby
AlbireoX has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
Nisstyre-laptop has joined #ruby
kyb3r_ has quit []
brianpWins has quit [Quit: brianpWins]
lggr has quit [Ping timeout: 260 seconds]
ayawaska has joined #ruby
lggr has joined #ruby
gmci has quit [Ping timeout: 244 seconds]
gmci has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
BMF has quit [Remote host closed the connection]
lggr has joined #ruby
elico has joined #ruby
josefig has joined #ruby
havenn has joined #ruby
<josefig> I'm getting this error http://paste2.org/p/2305993 how can I solve it, because I was trying to use a gem named vagrant
nari has joined #ruby
wedtm is now known as wedtm|away
havenn has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 264 seconds]
<crazymykl> josefig: your ruby is linked against a bad/missing openssl
lggr has joined #ruby
<josefig> crazymykl, how can I solve this issue ?
bluOxigen has joined #ruby
karstenrage is now known as karstensrage
<crazymykl> josefig: tell rvm where to look for openssl when you first compile ruby
<josefig> ok, lemme check.
<crazymykl> https://rvm.io/packages/openssl/ <-- should help
ngoldman has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
cantonic has joined #ruby
Zaeyx has joined #ruby
<Zaeyx> So what are some of the main applications for Ruby?
lggr has joined #ruby
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
<bperry> Zaeyx: web applications seem to be predominant
<Paradox> Zaeyx, shell scripting, web apps, testing
<Paradox> markup languages
alek_b_ is now known as alek_b
<bnagy> Zaeyx: it's a general purpose language, you can do more or less anything with it
SirFunk has quit [Ping timeout: 246 seconds]
<bnagy> apart from writing drivers, I guess
lggr has quit [Ping timeout: 246 seconds]
c0rn has quit [Ping timeout: 272 seconds]
Kovensky has quit [Read error: Operation timed out]
jgwong has quit [Ping timeout: 246 seconds]
jgwong has joined #ruby
keltor has quit [Ping timeout: 256 seconds]
Gate has quit [Ping timeout: 272 seconds]
Gate has joined #ruby
Gate has quit [Changing host]
Gate has joined #ruby
ryanlecompte has joined #ruby
c0rn has joined #ruby
pradeepto has quit [Ping timeout: 246 seconds]
quest88_ is now known as quest88
keltor has joined #ruby
keltor is now known as Guest24198
SirFunk has joined #ruby
pradeepto has joined #ruby
lggr has joined #ruby
jakk has quit [Read error: Operation timed out]
ananthakumaran has joined #ruby
jakk has joined #ruby
Kovensky has joined #ruby
LouisGB has quit [Ping timeout: 260 seconds]
ayawaska has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 252 seconds]
daniel_hinojosa has quit [Quit: Leaving.]
lggr has joined #ruby
kenneth has joined #ruby
fir_ed has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has quit [Remote host closed the connection]
kjellski has joined #ruby
Nisstyre-laptop has joined #ruby
diverdude has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 246 seconds]
AlbireoX has quit [Remote host closed the connection]
uris has quit [Quit: Lost terminal]
hakunin has quit [Remote host closed the connection]
lggr has joined #ruby
answer_42 has joined #ruby
duracrisis has quit [Ping timeout: 246 seconds]
elico has quit [Quit: elico]
rippa has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
dario12 has joined #ruby
darule has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
havenn has joined #ruby
T_shang has joined #ruby
T_shang has quit [Max SendQ exceeded]
wargasm has quit [Ping timeout: 240 seconds]
LouisGB has joined #ruby
T_shang has joined #ruby
T_shang has left #ruby [#ruby]
dario12 has quit [Quit: Leaving]
xbayrockx has quit []
havenn has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 244 seconds]
quest88_ has joined #ruby
quest88 has quit [Read error: Connection reset by peer]
quest88_ is now known as quest88
lggr has joined #ruby
Hanmac has joined #ruby
kenneth has quit [Quit: kswizz.com]
SirG has quit [Quit: Leaving]
quest88 has quit [Client Quit]
josefig has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 246 seconds]
sarmiena_ has quit [Quit: sarmiena_]
codefyre has joined #ruby
lggr has joined #ruby
wisconsin has quit [Remote host closed the connection]
ledao has quit [Quit: Leaving.]
yoklov has quit [Quit: bye!]
lggr has quit [Ping timeout: 256 seconds]
GoHuyGo has joined #ruby
moshee has quit [Ping timeout: 246 seconds]
futilegames has joined #ruby
lggr has joined #ruby
ledao has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
futilegames has quit [Read error: Connection reset by peer]
futilegames has joined #ruby
JonnieCache has joined #ruby
FlowState has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
FlowState has quit [Quit: Ex-Chat]
rakunHo has quit [Remote host closed the connection]
JonnieCache has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 246 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
ryanf has quit [Quit: leaving]
Pochacco has quit [Quit: Pochacco]
elico has joined #ruby
lggr has joined #ruby
Solnse has joined #ruby
vitor-br has quit [Ping timeout: 246 seconds]
<Solnse> I'm trying to understand the difference between .each and .map. I think that .map is basically a destructive version of .each, applying the code block to the receiver, and .each just gives me a copy of the array?
LouisGB has quit [Ping timeout: 248 seconds]
<Solnse> is that wrong?
<heftig> yes
<Hanmac> Solnse .each only interate the block and return an unchanged orginal, map returns changed copy, and map! changes the orginal
<heftig> .map uses the return value of the block to construct a new array
lggr has quit [Ping timeout: 240 seconds]
<Solnse> why would I ever use .each then for a code block if it's only going to return the original anyway?
<heftig> .map! substitutes the original elements with the return values
rubious has joined #ruby
<heftig> Solnse: because it doesn't bother with constructing a new array
<heftig> saves time and memory, since the return value of the block is ignored
<Solnse> but why would a block do anything then?
<Hanmac> Solnse like [1,2,3].each {|i| puts i}
<heftig> Solnse: it can have side effects, see above
<Solnse> I see... so you use it to call another method on the elements.
<codefyre> .each is like a for each loop
<roadt> Solnse, for me, yes and no, i think the difference is that map collects the result from map. which each is not.
hakunin has joined #ruby
lggr has joined #ruby
gokul has joined #ruby
<Solnse> ok, so .each is for using those elements for some other purpose... and .map is more for accessing those elements directly.
<Solnse> I guess that means there is no .each! method
<Hanmac> like [1,2,3,4].map(&:to_s) turns returns an new array where all numbers are converted to strings
<Solnse> but map! and collect! will alter the original array
<roadt> Solnse, map is to map the element to another element, you specify the mapping logic.
<roadt> Solnse, map connect two array.
<roadt> Solnse, .each is all about the array itself.
<Solnse> I see.
<Hanmac> "roadt: Solnse, map connect two array." i think this is wrong ... ?¿
spaceships has quit [Ping timeout: 256 seconds]
<Solnse> ok. that's a little more clear. thank you.
<Hanmac> do you mean zip?
<Solnse> i think he meant connects the original array to a new copy of the array which is the result of the code block.
* roadt do mean that.
<roadt> Hanmac, sorry for poor english though.
<Solnse> I am right thinking that?
<Solnse> and I can see how .each would save on resources then, not actually creating a resulting copy.
<roadt> Solnse, yes. .each just returns the original object. .map return another array which you are mapped.
<Solnse> ok, thank you both.
havenn has joined #ruby
<Hanmac> there is also something like this ... [1,2,3].zip(["a","b","c"]) #=> [[1,"a"],[2,"b"],[3,"c"]]
freeayu has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
<Solnse> oh that's very cool
<Solnse> for example blending an array of first names with an array of last names.
<Solnse> and the name makes sense... like a zipper
nari has quit [Ping timeout: 244 seconds]
<roadt> really.
und3f has joined #ruby
<Hanmac> you could also "multiply" arrays: [1,2,3].product(["a","b","c"]) #=> [[1, "a"], [1, "b"], [1, "c"], [2, "a"], [2, "b"], [2, "c"], [3, "a"], [3, "b"], [3, "c"]]
lggr has joined #ruby
<Solnse> don't try to make my mind mush more than it already is :)
<Solnse> but I get that one too, cool.
samphippen has joined #ruby
<Solnse> so the result would be a hash then?
havenn has quit [Ping timeout: 246 seconds]
<Hanmac> hm no its an 2-dimenional Array (or an Array of Arrays)
<Solnse> with pairs isntead of actually concatenating the objects?
<Hanmac> you could read about all the cool funtions in http://www.ruby-doc.org/core-1.9.3/Enumerable.html
<Solnse> yeah, I'm muddling through the docs now.
GoHuyGo has quit [Quit: Leaving]
jenrzzz has joined #ruby
k_89 has joined #ruby
<roadt> good luck.
<roadt> btw, is it possible to call Object.inspect to Array instance?
bradleyprice has quit [Remote host closed the connection]
ryanlecompte has quit [Remote host closed the connection]
<Hanmac> why not? [1,2,3,4].inspect
<Hanmac> or do you want an different inspect?
ddd has quit [Quit: Leaving.]
<roadt> Hanmac, yeah, i do
<roadt> Hanmac, like binary instance id representation..
<roadt> Hanmac, that one Object.inspect show.
<roadt> is it possible?
<Hanmac> inspect only links to to_s so you need an diffent to_s
<Hanmac> Object.instance_method(:to_s).bind([1,2,3]).call #> "#<Array:0x0000000181f708>"
lggr has quit [Ping timeout: 260 seconds]
<roadt> so... use reflection..
Takehiro has joined #ruby
<roadt> hrm. wonder if any better way.
Takehiro has quit [Read error: Connection reset by peer]
<roadt> though i think this one is good enough.
lggr has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
Nisstyre-laptop has quit [Read error: Connection reset by peer]
Pochacco has joined #ruby
<roadt> Hanmac, thanks for help.
jenrzzz has quit [Ping timeout: 240 seconds]
zodiak has quit [Ping timeout: 246 seconds]
<Hanmac> roadt you can do this:
<Hanmac> o=[1,2,3]; o.singleton_class.send(:define_method,:to_s){Object.instance_method(:to_s).bind(self).call};o.to_s#=> "#<Array:0x0000000180f4e8>"
<Hanmac> or like this: o=[1,2,3];def o.to_s; Object.instance_method(:to_s).bind(self).call;end;o.to_s #=> "#<Array:0x000000017797b8>"
blazes816 has joined #ruby
<roadt> Hanmac, ah.. tks
<roadt> Hanmac, i think i got the point.
lggr has quit [Ping timeout: 256 seconds]
Zaeyx has quit [Ping timeout: 240 seconds]
<roadt> s/got/get/
lggr has joined #ruby
<roadt> what words, sorry for that.
<roadt> array seems make to_s call inspect. weird reversion.
<Hanmac> yeah sorry i was wrong
justinmcp has joined #ruby
dakine has quit [Remote host closed the connection]
<roadt> Hanmac, no, you are not. i check the code. that do in Kernel object.
<roadt> Hanmac, inspect calls to_s.
<Hanmac> "Ruby: where classes are Objects too" :P
havenn has joined #ruby
<roadt> Hanmac, xD
yshh has quit [Remote host closed the connection]
<Hanmac> its true :P [1,2,3] is an Instance of Array, Array is an Instance of Class, and Class is an Instance of Class too
samphippen has quit [Quit: Computer has gone to sleep.]
<Hanmac> Class is an child of Module, Module is an child of Object, Object is an instance of Class
lggr has quit [Ping timeout: 260 seconds]
bambanx has joined #ruby
<Hanmac> http://www.ruby-doc.org/core-1.9.3/Class.html << there you can see this freaking connection
jenrzzz has joined #ruby
lggr has joined #ruby
yshh has joined #ruby
havenn has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
bambanx has quit [Quit: Saliendo]
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
dangerousdave has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
awestroke has joined #ruby
<roadt> Hanmac, any attribute/property of object to denote the parent/child?
lggr has joined #ruby
sarmiena_ has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
samphippen has joined #ruby
<Hanmac> object.class & klass.superclass & klass.ancestors & object.singleton_class
<Hanmac> klass.included_modules
alta has quit [Ping timeout: 264 seconds]
<roadt> that's cool..
<roadt> beginning my travel..
charlies_ has joined #ruby
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
<roadt> done. XD
futilegames has quit [Quit: futilegames]
charliesome has quit [Disconnected by services]
charlies_ is now known as charliesome
alta has joined #ruby
<Hanmac> roadt i found the easier way you wanted:
<Hanmac> o=[1,2,3];o.define_singleton_method(:inspect,Object.instance_method(:to_s));o #=> #<Array:0x0000000151d118>
arturaz_ has joined #ruby
<roadt> hmm, better.
lggr has quit [Ping timeout: 255 seconds]
<aces1up> what would happen if multiple threads used the same hash simultaneously but did not access the same key at the same time, would that be thread lock issue? or do thread locks only happen when you use mutex?
<Hanmac> roadt when you use .bind like i show above the orginal object is not changed
lggr has joined #ruby
<roadt> but the latter is changed
<roadt> for that object. then it's tricky.
<roadt> that .send stuff
arturaz_ has quit [Ping timeout: 240 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
<Hanmac> no i mean this:
<Hanmac> o= [1,2,3]
<Hanmac> o.to_s #=> [1,2,3] # still the normal to_s
<Hanmac> Object.instance_method(:to_s).bind(o).call #=> "#<Array:0x0000000150a2c0>" the to_s from Object
mengu has joined #ruby
<roadt> hmm. i should try that.
Takehiro has joined #ruby
justinmcp has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 245 seconds]
havenn has joined #ruby
justinmcp has joined #ruby
cakehero has joined #ruby
lggr has joined #ruby
<roadt> then bind is only way to explicit change the receiver if do not count the instance_eval (exec) stuff, treat them as implicit way.
Guest10374 has joined #ruby
<Guest10374> ciao
arturaz_ has joined #ruby
Guest10374 has left #ruby [#ruby]
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
Zaeyx has joined #ruby
stnly has quit [Quit: leaving]
Sargun has quit [Ping timeout: 260 seconds]
Sargun has joined #ruby
<Zaeyx> Any great resources out there for a young programmer new to Ruby who is working on website scrapers?
havenn has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 260 seconds]
stephenjudkins has joined #ruby
stephenjudkins has quit [Client Quit]
codefyre has quit [Quit: Leaving]
lggr has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
prtksxna has joined #ruby
timonv has joined #ruby
freeayu has quit [Ping timeout: 256 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
Zai_ has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
hakunin has quit [Ping timeout: 260 seconds]
und3f has quit [Ping timeout: 246 seconds]
freeayu has joined #ruby
lggr has joined #ruby
jamjam has joined #ruby
<A124> Zaeyx: I don't know about any larger guide, but I can give you hand. Also it's a rather specific thing. Can you go more into detail?
<Zaeyx> We'll I have one specific issue if you help me with that
<Zaeyx> Using mechanize I've figured out filling out forms and returning their result
Iszak has joined #ruby
<Zaeyx> But
lggr has quit [Ping timeout: 248 seconds]
<Zaeyx> When I use mechanize to perform an operation like this
<Zaeyx> R = page_form.submit.parse.path('//table/td/tr/a').text
<Zaeyx> Puts R
<Zaeyx> I get everything back at once
skogis has joined #ruby
<Zaeyx> I'd love to understand how to get each field back one at a time
workmad3 has quit [Ping timeout: 246 seconds]
<A124> Use r not ARE. And.. r.each { |w| puts w}
lggr has joined #ruby
<A124> *R
<Zaeyx> Sure yeah I just hit uppercase cause I'm on a tablet right now :p
<Zaeyx> When I use r.each I still get a whole page returned
bluOxigen has joined #ruby
<Zaeyx> Aka all the <a> from form.submit
<Zaeyx> Is that wrong? I could check my code for poor workmanship
<Zaeyx> I really have been on ruby for about two days :p
darule has joined #ruby
darule has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
lggr has quit [Ping timeout: 260 seconds]
und3f has joined #ruby
roadt has quit [Ping timeout: 264 seconds]
lggr has joined #ruby
samphippen has joined #ruby
justinmcp has quit [Ping timeout: 255 seconds]
justinmcp has joined #ruby
codefyre has joined #ruby
snuglepuss has joined #ruby
fantazo has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
ryanf has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
und3f has quit [Quit: Leaving.]
timonv has quit [Remote host closed the connection]
lggr has joined #ruby
tntc has quit [Remote host closed the connection]
Ch4rAss has joined #ruby
Ch4rAss has left #ruby [#ruby]
colinbm has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
Zenger has joined #ruby
Takehiro_ has joined #ruby
<A124> Zaeyx: Paste the code. pastie
Takehiro has quit [Read error: Connection reset by peer]
JonnieCache has joined #ruby
<Zenger> Hi guys, I tried to make a ruby project (newbie here), installed all the gems, ruby, rails etc. and when I try rails s throws an error : "/usr/local/share/gems/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `require': cannot load such file -- mysql2/mysql2 (LoadError)"
lordnaz has joined #ruby
<Zenger> any way to fix that ? google gives nothing I can use and note I'm on a 64 bit OS
<A124> Zenger: Do you have installed myslw?
<A124> *q
<Zenger> A124: only mysql2 , gem contents mysql2 lead to this path /usr/local/share/gems/gems/mysql2-0.3.11/
<shevy> that is an odd path
<Zenger> should I install mysql as well as mysql2 :| ?
<shevy> does either of them work at all so far? ;)
<Zenger> I tried irb
<Zenger> in irb I type
<shevy> that path is really odd
lggr has quit [Ping timeout: 260 seconds]
<shevy> it would imply that you installed rubygems on your own
<Zenger> require 'rubygems' -> throws False, require 'mysql2' true
<Zenger> nope just play, yum install gem
<shevy> also you did not say which ruby version you are on. "ruby -v" or in irb, RUBY_VERSION
<shevy> ok. so yum uses that crazy path
<Zenger> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
<shevy> good. require 'rubygems' would fail in that case because it is auto-required since 1.9.x
<shevy> only in 1.8.x you had to require it on your own before
<Zenger> Rails 3.2.8 gem 1.8.24
<Zenger> hm okay
<shevy> oh I failed to install rails myself because of bundler
<Zenger> when I created the project
<Zenger> rails s started throwing errors about random gems
<shevy> there is one problem - /usr/local/share/gems is a very non standard path
<Zenger> like jquery,coffe,sass instaled thoes and now this
<shevy> output the content of "gem env" to pastie.org or somewhere else please
roadt has joined #ruby
<shevy> this is my current gem env for example: http://pastie.org/4921131
lggr has joined #ruby
<Zenger> shevy: http://fpaste.org/zNYg/
budha has joined #ruby
JonnieCache has quit [Ping timeout: 244 seconds]
sepp2k has joined #ruby
Virunga has joined #ruby
<shevy> very odd path but as long as "gem list" shows the gems installed, you should be fine
<shevy> you could try to install a tiny gem... "gem install wirble", then start irb, then do require 'wirble' then do 5+5 and press enter. the output should be in colours
Takehiro_ has quit [Remote host closed the connection]
<shevy> and "gem list" should list it
<shevy> then try to get one mysql to work :P
jgrevich has quit [Quit: jgrevich]
<Zenger> that's odd, gem list shows both mysql and wirble, I open IRB type in require 'wirble' => True, but 5+5 does nothing :)
lggr has quit [Ping timeout: 255 seconds]
<Zenger> I mean no colors
<shevy> hmm
<shevy> strange
<shevy> I have white text normally, but the evaled text is in teal
<Zenger> could it be from the X ?
<Zenger> one moment gonna attempt this without the KDE open
lggr has joined #ruby
<Zenger> I tried without the X , still no colors
<Zenger> plain ls does colors nicely, I mean separates binaries from folders thru colors
<shevy> this is how my irb looks with wirble http://oi49.tinypic.com/16k4zo4.jpg
<shevy> anyway, it was just a test, if require 'wirble' works then it is found and loaded
ejnahc has quit [Quit: leaving]
<shevy> you can try to find out where wirble was installed to
<shevy> find / -name wirble-0.1.3.gem
<shevy> would be one way
mercwithamouth has joined #ruby
<shevy> or you just go to the directory in question
<shevy> cd /usr/local/share/gems/gems/
ejnahc has joined #ruby
hiroshige has joined #ruby
<shevy> the wirble gem should be there.. or in the cache/ directory, one level below
Hanmac has quit [Remote host closed the connection]
<shevy> you can unpack a gem via "gem unpack" ... "gem unpack mysq*.gem" if the mysql gem is there
<shevy> then cd into it and run rake or ./configure or ruby extconf.rb or something like that :)
<Zenger> shevy: http://i.imgur.com/v00ZE.png mine
<shevy> hmmmmmmmm
<shevy> strange
<shevy> I have to say though, I always compile everything from source. so I dont use dpkg, yum or anything like that
Iszak has quit [Quit: Computer has gone to sleep.]
<shevy> perhaps there is a yum-user here
<shevy> wake up guys!
ejnahc has quit [Client Quit]
ejnahc has joined #ruby
<Zaeyx> Debian represent!
<Zenger> you know, I just had the same ideea because , running sudo rails throws "command not found" while rails on plain user shows help
<Zenger> I'm not a debian user anymore for 2 reasons, I can't use debian properly and I hate the sloppy ubuntu.
lggr has quit [Ping timeout: 246 seconds]
robustus has joined #ruby
Hanmac has joined #ruby
daniel_- has joined #ruby
<Zenger> find wirble => /usr/local/share/gems/cache/wirble-0.1.3.gem
<Zenger> gem unpack mysql2, then rake throws error cannot load such file -- rake/extensiontask
snuglepuss has quit [Remote host closed the connection]
lggr has joined #ruby
<Zenger> no ./configure or extconfig in there so I assume rake was the correct command
lordnaz has quit [Ping timeout: 246 seconds]
<Zenger> OH YEAH :D
<Zenger> my bad, I noticed a ext folder when I unpacked the gem, then I went to ext and saw the extconfig, did ruby extconfig.rb, make , make install , now rails s is not throwing error about the mysql
timonv has joined #ruby
<Zenger> but extjs :D
<Zenger> execjs*
<Zenger> usr/local/share/gems/gems/execjs-1.4.0/lib/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)
<codefyre> Zenger: add 'gem execjs' to you Gemfile and run bundle install
ejnahc has quit [Remote host closed the connection]
ejnahc has joined #ruby
timonv has quit [Remote host closed the connection]
<Zenger> codefyre: added , when doing bundle install it lists execjs, but the error persists
<codefyre> hmm , also add gem 'therubyracer', sudo bundle install
<codefyre> rubyracer is the v8 javascript engine
lggr has quit [Ping timeout: 260 seconds]
<Zenger> That did it
<Zenger> it downloaded the libv8 and therubyracer, now the server is on :)
<Zenger> thank you guys
<codefyre> :-)
<Zenger> gonna go study, thanks
<Zenger> bye
Zenger has quit [Quit: =]]
lggr has joined #ruby
Beoran_ has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 256 seconds]
Iszak has joined #ruby
alta has quit [Ping timeout: 246 seconds]
vectorshelve has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
mercwithamouth has joined #ruby
lggr has joined #ruby
alta has joined #ruby
<vectorshelve> any reference on how to do markup on README.md files in github
lordnaz has joined #ruby
ananthakumaran1 has joined #ruby
<ryanf> vectorshelve: google "github-flavored markdown"
lggr has quit [Ping timeout: 245 seconds]
<vectorshelve> ryanf: thanks
ryanf has quit [Quit: leaving]
hiroshige has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
Pochacco has quit [Quit: Pochacco]
mercwithamouth has quit [Ping timeout: 248 seconds]
niklasb has joined #ruby
jenrzzz has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
rubious has quit [Ping timeout: 264 seconds]
Solnse has quit [Ping timeout: 245 seconds]
parzorep has quit [Quit: parzorep]
morozovm has joined #ruby
mercwithamouth has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
moshee has quit [Ping timeout: 244 seconds]
yshh has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
lggr has joined #ruby
diegoviola has quit [Ping timeout: 252 seconds]
frogprince_mac has joined #ruby
Hanmac has quit [Ping timeout: 244 seconds]
arietis has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 260 seconds]
Iszak has quit [Read error: Connection reset by peer]
lggr has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
daniel_- has quit [Ping timeout: 245 seconds]
ltsstar has joined #ruby
samphippen has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
lggr has quit [Ping timeout: 260 seconds]
senny has joined #ruby
freeayu has quit [Ping timeout: 246 seconds]
jimeh2 has joined #ruby
lggr has joined #ruby
thunderstrike has joined #ruby
rakunHo has joined #ruby
rakunHo has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
naz has joined #ruby
lggr has joined #ruby
colinbm has quit [Quit: colinbm]
naz has quit [Client Quit]
Banistertab has joined #ruby
eldariof has joined #ruby
freeayu has joined #ruby
Zaeyx has quit [Quit: Bye]
Zaeyx has joined #ruby
jessta has joined #ruby
jessta has left #ruby [#ruby]
lggr has quit [Ping timeout: 264 seconds]
drowningchild has joined #ruby
slainer68 has joined #ruby
uris has joined #ruby
lggr has joined #ruby
sgupta has joined #ruby
daniel_- has joined #ruby
sgupta has quit [Read error: Connection reset by peer]
ozette has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
ananthakumaran1 has quit [Ping timeout: 260 seconds]
<nyuszika7h> nat/redhat/? :O
vlad_starkov has joined #ruby
prtksxna has quit [Read error: Connection reset by peer]
prtksxna_ has joined #ruby
Jork1 has joined #ruby
knirhs has quit [Ping timeout: 264 seconds]
ananthakumaran has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has joined #ruby
lggr has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
knirhs has joined #ruby
jcoglan has joined #ruby
ZubKonst_ has joined #ruby
Virunga has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
F1skr has joined #ruby
Shrink has quit [Ping timeout: 256 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<jcoglan> wondering if any of you could shed some light on an issue I've been having with TCPServer
<jcoglan> been struggling with this for days
ZubKonst has quit [Ping timeout: 252 seconds]
sgupta has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
Zai_ has quit [Quit: Zai_]
knirhs has quit [Read error: Connection reset by peer]
prtksxna_ has quit [Read error: Connection reset by peer]
prtksxna has joined #ruby
F1skr has quit [Client Quit]
lggr has joined #ruby
monkegjinni has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
vectorshelve has quit [Quit: Page closed]
ananthakumaran has joined #ruby
sgupta has quit [Ping timeout: 244 seconds]
icole has quit [Remote host closed the connection]
arturaz_ has quit [Ping timeout: 252 seconds]
prtksxna has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Ping timeout: 246 seconds]
timonv has joined #ruby
knirhs has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
Shrink has quit [Read error: Connection reset by peer]
quazimodo has joined #ruby
lggr has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
r1ddl3r has quit [Quit: Leaving.]
ananthakumaran has quit [Ping timeout: 240 seconds]
pskosinski has joined #ruby
zigomir has joined #ruby
Takehiro has joined #ruby
Hanmac has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
Virunga has joined #ruby
Eplemosen has joined #ruby
oposomme has joined #ruby
Zaeyx has quit [Quit: Bye]
fir_ed has joined #ruby
lggr has joined #ruby
Iszak has quit [Ping timeout: 256 seconds]
Banistertab has quit [Remote host closed the connection]
knirhs has quit [Read error: Connection reset by peer]
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has joined #ruby
Iszak has left #ruby [#ruby]
knirhs has joined #ruby
k_89 has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
LouisGB has joined #ruby
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has joined #ruby
knirhs has quit [Read error: Connection reset by peer]
ozette has quit [Quit: Leaving]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
Iszak has left #ruby [#ruby]
lggr has quit [Ping timeout: 264 seconds]
sgupta has joined #ruby
JonnieCache has joined #ruby
sashman has joined #ruby
F1skr has joined #ruby
lggr has joined #ruby
hoelzro|away is now known as hoelzro
prtksxna has joined #ruby
oposomme is now known as oposomme|away
<sashman> hey folks
<sashman> ok i figured something out i just have one formating question: How can i pass the content in a variable in this ' ' <- pls help
Shrink has quit [Read error: Connection reset by peer]
hoelzro is now known as hoelzro|away
<sashman> i have a variable for example ok: a = params(:b) .. and i want the output of 'a' to place in here -> ' ' how can i accomplish this
Banistertab has joined #ruby
sgupta has quit [Ping timeout: 260 seconds]
<Vinz_> ' ' + a
Morkel has joined #ruby
<Vinz_> Or use double quotation marks "#{a}"
swistak35 has quit [Ping timeout: 264 seconds]
swistak35 has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9]
F1skr has joined #ruby
icole has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
gokul has quit [Quit: Leaving]
F1skr has quit [Client Quit]
g-ram has quit [Quit: Computer has gone to sleep.]
<sashman> omfg thank you
Banistertab has quit [Ping timeout: 240 seconds]
sarmiena_ has quit [Quit: sarmiena_]
JonnieCache has quit [Ping timeout: 260 seconds]
F1skr has joined #ruby
<Vinz_> ;)
g-ram has joined #ruby
schronicles47 has quit [Ping timeout: 246 seconds]
Banistertab has joined #ruby
Banistertab has quit [Client Quit]
daniel_- has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
Banistertab has joined #ruby
oposomme|away has quit [Quit: Leaving...]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
icole has quit [Ping timeout: 244 seconds]
senny has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
g-ram has quit [Quit: Computer has gone to sleep.]
Playb3yond has joined #ruby
oposomme has joined #ruby
lggr has joined #ruby
jimeh2 has quit [Ping timeout: 248 seconds]
Hien_ has quit [Ping timeout: 260 seconds]
TomJ has quit [Quit: TomJ]
bier has quit [Remote host closed the connection]
bier has joined #ruby
emergion has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
oposomme is now known as oposomme|away
roadt has quit [Ping timeout: 246 seconds]
<CodeVision> is it in some way possible to break out of a loop from inside a method called inside that loop?
Shrink has quit [Read error: Connection reset by peer]
alanp has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
senny has joined #ruby
oposomme|away is now known as oposomme
lggr has joined #ruby
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Mon_Ouie> Not using "break". You can use exceptions (raise StopIteration in particular) and throw, though in many cases I'd suggest simply not exiting from the method
<Mon_Ouie> Just have the method return a value that tells you you need to leave the loop
<CodeVision> ok, thanks :)
roadt has joined #ruby
ledao has quit [Read error: Connection timed out]
ledao has joined #ruby
Shrink has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
oposomme is now known as oposomme|away
vlad_starkov has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 260 seconds]
Russell^^ has joined #ruby
vlad_starkov has joined #ruby
prtksxna_ has joined #ruby
prtksxna has quit [Read error: Connection reset by peer]
lggr has joined #ruby
Shrink has quit [Read error: Connection reset by peer]
notVert has joined #ruby
Shrink has joined #ruby
Xeago has joined #ruby
Guedes0 has joined #ruby
oposomme|away has quit [Quit: Leaving...]
Shrink has quit [Write error: Broken pipe]
Shrink has joined #ruby
atmosx has joined #ruby
codefyre has quit [Quit: Leaving]
lggr has quit [Ping timeout: 240 seconds]
jimeh2 has joined #ruby
lggr has joined #ruby
Guedes has quit [Disconnected by services]
Guedes0 is now known as Guedes
ionte_ has quit [Read error: Operation timed out]
Guedes has quit [Changing host]
Guedes has joined #ruby
Shrink has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
Morkel has quit [Quit: Morkel]
ledao1 has joined #ruby
ledao has quit [Ping timeout: 260 seconds]
atmosx has quit [Quit: WeeChat 0.3.8]
`brendan has joined #ruby
baphled has joined #ruby
drowningchild has quit [Quit: Leaving]
lggr has quit [Ping timeout: 248 seconds]
kirun has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
oposomme has joined #ruby
lggr has joined #ruby
ionte has joined #ruby
vlad_starkov has joined #ruby
oposomme is now known as oposomme|away
ledao1 has quit [Ping timeout: 246 seconds]
Jork1 has quit [Quit: Jork1]
ananthakumaran has joined #ruby
kiyoura has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
ledao has joined #ruby
Hien has joined #ruby
daniel_- has joined #ruby
whackatre has joined #ruby
Shrink has quit [Read error: Connection reset by peer]
codefyre has joined #ruby
Shrink has joined #ruby
prtksxna_ has quit [Remote host closed the connection]
dpk has joined #ruby
lggr has joined #ruby
oposomme|away has quit [Quit: Leaving...]
elico has quit [Ping timeout: 260 seconds]
Shrink has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
elico has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
saschagehlich has joined #ruby
lggr has joined #ruby
awestroke has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
Jork1 has joined #ruby
Jork1 has quit [Client Quit]
lggr has quit [Ping timeout: 246 seconds]
hashpuppy_ has joined #ruby
<hashpuppy_> which style is preferred: http://pastie.org/private/lygq3cmsylmcvkwuncg9w
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has joined #ruby
Iszak has left #ruby [#ruby]
_bart has joined #ruby
lggr has joined #ruby
bluenemo has joined #ruby
Shrink has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
Playb3yond has quit [Quit: Colloquy for iPhone]
Hanmac has quit [Ping timeout: 246 seconds]
uris has quit [Quit: Lost terminal]
<Mon_Ouie> I think I'd go with data = collection[(page - 1) * limit, limit] || []
<Mon_Ouie> And I'd only keep the "|| []" if I really needed data to be an array
F1skr has quit [Quit: WeeChat 0.3.9]
lggr has quit [Ping timeout: 260 seconds]
knirhs has joined #ruby
<_bart> hi
kjellski has quit [Quit: This computer has gone to sleep]
<_bart> how do I check a string for matches of an array of regexp's
<hashpuppy_> Mon_Ouie: thanks
lggr has joined #ruby
daniel_- has quit [Ping timeout: 245 seconds]
Shrink has quit [Ping timeout: 255 seconds]
iamjarvo has joined #ruby
sgupta has joined #ruby
thunderstrike has quit [Ping timeout: 246 seconds]
Hanmac has joined #ruby
hashpuppy_ has left #ruby [#ruby]
<kiyoura> _bart, you cant loop through the array and match each index against the string?
xscc has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
frogprince_mac has quit [Read error: Connection reset by peer]
<Hanmac> kiyoura what about each_with_index ?
frogprince_mac has joined #ruby
knirhs has quit [Ping timeout: 240 seconds]
<kiyoura> Hanmac, i didnt mean indx in a literal sense. I meant it's trivial to just iterate the array and check each regexp
codefyre has quit [Ping timeout: 246 seconds]
vaino has quit [Quit: Page closed]
Jork1 has joined #ruby
<zykes-> anyone got a smart way how I can parse somehing like http://pastebin.com/ZGs8NYU3 < this ?
<Hanmac> i didnt get _bart's orginal message so i dont know the problem
codefyre has joined #ruby
<_bart> original message: how do I check a string for matches of an array of regexp's
lggr has joined #ruby
<zykes-> into a Hash
sgupta has quit [Read error: Connection reset by peer]
<_bart> I was thinking more about .reduce and .grep
knirhs has joined #ruby
<Mon_Ouie> zykes-: scan /(.)=(\d+)/ — though this doesn't handle malformed input and may be too naive depending on how complex that "language" actually is
xscc has quit [Ping timeout: 246 seconds]
<Hanmac> _bart do you only want to know if it matchs or do you want an match result?
<Mon_Ouie> regexps.flat_map { |r| string.scan(r) } gives you all matches (as strings, you can change them to be MatchData relatively easily)
<_bart> DATE.reduce(0) { |sum, r| sum + dates.grep(r).length }.should == dates.length
<_bart> ah flat_map is cool, didn't know about that one
hadees has joined #ruby
<Hanmac> regexarray.any?(&string.method(:=~))
<_bart> but already got it using reduce
<_bart> heh
<Hanmac> i like inject more than reduce ...
Takehiro has joined #ruby
<zykes-> Mon_Ouie: is there a way to easily produce a hash of it ?
<Mon_Ouie> zykes-: Yes, Hash.[]
<Mon_Ouie> Hash[ [[1, 2], [3, 4]] ] #=> {1 => 2, 3 => 4}
lggr has quit [Ping timeout: 248 seconds]
Shrink has joined #ruby
Asher has quit [Read error: No route to host]
gani has joined #ruby
lggr has joined #ruby
awestroke has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
gry has quit [Quit: ZNC - http://znc.in]
vitor-br has joined #ruby
knirhs has quit [Ping timeout: 246 seconds]
parzorep has joined #ruby
Shrink has quit [Ping timeout: 244 seconds]
<zykes-> Mon_Ouie: got an example of code?
<Mon_Ouie> Isn't that what my previous line is?
elico has quit [Quit: elico]
Neomex has joined #ruby
<zykes-> Mon_Ouie: nvm, I had my regex wrong!
lggr has quit [Ping timeout: 255 seconds]
vectorshelve has joined #ruby
Neomex has quit [Client Quit]
Neomex has joined #ruby
Shrink has joined #ruby
ddd has joined #ruby
lggr has joined #ruby
<zykes-> Mon_Ouie: what about a a=1,b=2 then ?=
Asher has joined #ruby
IPGlider has joined #ruby
gani has quit [Quit: leaving..]
Shrink has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
no_worries has joined #ruby
knirhs has joined #ruby
Hanmac has joined #ruby
greenarrow has joined #ruby
greenarrow has quit [Client Quit]
LLama has joined #ruby
LLama has quit [Client Quit]
greenarrow has joined #ruby
Shrink has quit [Ping timeout: 255 seconds]
daniel_- has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
Virunga has quit [Remote host closed the connection]
Banistertab has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
Banistertab has joined #ruby
oposomme has joined #ruby
steakknife has joined #ruby
Iszak has joined #ruby
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has left #ruby [#ruby]
daniel_- has quit [Ping timeout: 246 seconds]
no_worries has quit [Remote host closed the connection]
bluenemo_ has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
undersc0re97 has quit [Read error: Operation timed out]
Xeago has quit [Remote host closed the connection]
r1ddl3r has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Asher has quit [Quit: Leaving.]
saschagehlich_ has joined #ruby
sbinetd has joined #ruby
ananthakumaran has quit [Ping timeout: 256 seconds]
saschagehlich has quit [Read error: Operation timed out]
saschagehlich_ is now known as saschagehlich
rabidpraxis has joined #ruby
mucker has joined #ruby
elico has joined #ruby
ananthakumaran has joined #ruby
bluenemo has quit [Remote host closed the connection]
lggr has joined #ruby
Asher has joined #ruby
JonnieCache has joined #ruby
r1ddl3r has quit [Ping timeout: 245 seconds]
sbinetd has left #ruby [#ruby]
no_worries has joined #ruby
no_worries has quit [Remote host closed the connection]
frogprince_mac has quit [Quit: Leaving...]
Xeago has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
oposomme is now known as oposomme|away
LouisGB has quit [Ping timeout: 240 seconds]
undersc0re97 has joined #ruby
frogprince_mac has joined #ruby
lggr has joined #ruby
freeayu has quit [Remote host closed the connection]
rbuck has joined #ruby
hgf has joined #ruby
irleif has joined #ruby
<rbuck> hi, would someone happen to know how to change the []= and [] methods of hash using this sort of syntax at runtime? instance.class.send(:define_method, "[]=" …
sgupta has joined #ruby
hgf has quit [Client Quit]
<Mon_Ouie> zykes-: Maybe you can just go with splitting twice? (Once on ",", then on "=")?
knirhs has quit [Ping timeout: 240 seconds]
oposomme|away has quit [Quit: Leaving...]
codefyre has quit [Quit: Leaving]
vectorshelve has quit [Quit: Page closed]
lggr has quit [Ping timeout: 260 seconds]
knirhs has joined #ruby
vectorshelve has joined #ruby
lggr has joined #ruby
sakh has joined #ruby
nwertman has joined #ruby
sgupta has quit [Ping timeout: 246 seconds]
hgf has joined #ruby
Neomex has quit [Quit: Neomex]
BMF has joined #ruby
Tombar has joined #ruby
ledao has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
Tombar_ has joined #ruby
ledao has joined #ruby
notVert has quit [Read error: Connection reset by peer]
nwertman has quit [Quit: nwertman]
Tombar has quit [Ping timeout: 264 seconds]
BMF has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
IPGlider has quit []
slainer68 has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
cburyta has quit [Remote host closed the connection]
sepp2k has quit [Remote host closed the connection]
ledao has quit [Quit: Leaving.]
cburyta has joined #ruby
cburyta has quit [Remote host closed the connection]
Virunga has joined #ruby
lggr has joined #ruby
conor_ireland has joined #ruby
maddog_ has quit [Ping timeout: 252 seconds]
nwertman has joined #ruby
<Virunga> Hi, i installed a gem named vagrant and when i start it from the command line i get an error raise_if_conflicts: Unable to activate virtualbox-0.9.2, because ffi-1.1.5-x86-mingw32 conflicts with ffi <~> 1.0.9. Could you help me to resolve this conflict, please?
maddog_ has joined #ruby
BrianJ has joined #ruby
JonnieCache has quit [Ping timeout: 264 seconds]
Jellyg00se has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
<Spaceghostc2c> Virunga: Windows, hm. Painful.
lggr has joined #ruby
<Virunga> Spaceghostc2c: yes, Windows. :)
Takehiro has quit [Remote host closed the connection]
sgupta has joined #ruby
Tombar_ has quit [Remote host closed the connection]
LouisGB has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
knirhs has quit [Read error: Connection reset by peer]
brotspinne has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
<brotspinne> hello. I have a question about to_s + to_str vs. to_a + to_ary with a rails class. in the rails safebuffer class, to_s returns self and to_str returns a real string. in the ruby array class this is reversed. to_a returns a real array (even with a subclass) and to_ary returns self. code: http://pastie.org/4922274 so my question is now which one is acting wrong? because I think this is inconsistent
sgupta has quit [Ping timeout: 240 seconds]
frogprince_mac has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
mengu has quit [Quit: Konversation terminated!]
<Spaceghostc2c> Ugh, cross-posters
<brotspinne> I'm sorry :o
MikeyV27 has quit [Read error: Connection reset by peer]
MikeyV27 has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
nwertman has quit [Quit: nwertman]
chrishunt has joined #ruby
<shevy> LET'S BURN HIM DOWN!!!
<brotspinne> n0oOo
<shevy> rbuck not sure that is easily possible, can't you define a method that does that, then call it?
lggr has quit [Ping timeout: 246 seconds]
irleif has joined #ruby
r1ddl3r has joined #ruby
abstrusenick has joined #ruby
lggr has joined #ruby
havenn has joined #ruby
X-Jester_ has quit [Ping timeout: 246 seconds]
abstrusenick has quit [Client Quit]
X-Jester has joined #ruby
abstrusenick has joined #ruby
<rbuck> shevy: i can do it by simply redeclaring those methods off the Hash class, but that would expose the overrides globally; i really want to change the definition of hash on an instance by instance basis
<_bart> do I need "# encoding: UTF-8" at the top of every file of my gem, or just the main .rb file that includes all the other files.
<Spaceghostc2c> Just the ones containing utf-8 characters.
<rbuck> shevy: right now i am trying out something like this, which does not quite work: http://pastie.org/4922355
<Mon_Ouie> You need it in every file where you want the encoding of string and regexp literals to be set to UTF-8
abstrusenick has quit [Client Quit]
br4ndon has joined #ruby
ABK has joined #ruby
Zai_ has joined #ruby
<_bart> that means every single file :/
<_bart> weird that it's not default
<otters> probably creates some overhead
timonv has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
<brotspinne> _bart: the thing is that unicode characters in code are rare but sometimes you have them in regex for example
ABK has quit [Read error: Connection reset by peer]
<Mon_Ouie> I think even UTF-8 strings have a flag that says if the nth character (or code point, really) is just the nth byte, so it shouldn't be that big
ABK has joined #ruby
vjt has quit [Ping timeout: 272 seconds]
Hanmac has quit [Ping timeout: 255 seconds]
<_bart> I'd rather be certain that everything gets properly interpreted as UTF-8 than have some less overhead.
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
lggr has joined #ruby
lkba has joined #ruby
ABK has joined #ruby
<vectorshelve> Hi all...
<brotspinne> hi
<vectorshelve> I am looking for an Ruby API for dictionary...
<vectorshelve> for writing a gem
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
g-ram has joined #ruby
codefyre has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 256 seconds]
Nisstyre-laptop has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
lggr has joined #ruby
reuf has joined #ruby
r1ddl3r has quit [Ping timeout: 246 seconds]
cakehero has joined #ruby
ABK has quit [Read error: Connection reset by peer]
elico has quit [Read error: Connection reset by peer]
elico has joined #ruby
elico has quit [Read error: Connection reset by peer]
elico has joined #ruby
vectorshelve has quit [Quit: Page closed]
nwertman has joined #ruby
workmad3 has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
g-ram has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
lggr has joined #ruby
icole has joined #ruby
irleif has joined #ruby
oldB has joined #ruby
Shrink has quit [Read error: Connection reset by peer]
Tom2 has quit [Ping timeout: 245 seconds]
<shevy> 3 seconds questions..
lggr has quit [Ping timeout: 264 seconds]
r1ddl3r has joined #ruby
quest88 has joined #ruby
icole has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
<_bart> what's the difference between .scan and .match?
seme has joined #ruby
ABK has joined #ruby
<seme> hi guys... can anyone explain to me why doing raw_instances[x].content.to_s.strip would not strip the whitespace away from the end of the string?
<seme> I know I must be missing something here but I'm not sure what
steakknife has left #ruby [#ruby]
<shevy> _bart I think what it returns
cburyta has joined #ruby
<codefyre> _bart: scan return all the matches , match return the first one
<shevy> "abc def".scan /.+/ # => ["abc def"]
<shevy> "abc def".match /.+/ # => #<MatchData "abc def">
awestroke has quit [Remote host closed the connection]
emmanuelux has joined #ruby
<havenn> _bart: #scan returns all matches, #match returns first as a MatchData: http://www.ruby-doc.org/core-1.9.2/MatchData.html
hakunin has joined #ruby
<shevy> so it seems the first returns an Array, the second a MatchData object
<shevy> seme what is the context
cakehero has quit [Quit: Computer has gone to sleep.]
<shevy> seme see: " abc ".strip # => "abc"
<shevy> so .strip definitely works
<havenn> seme: can you post what you're trying to strip for us?
ABK has quit [Read error: Connection reset by peer]
<seme> shevy: well I queried an html page using nokogiri and then I wanted to store the content of one of the elements in a variable... so i did the following instance = raw_instances[x].content.to_s.strip
ABK has joined #ruby
<seme> is it doing something like stripping the data but then returning the original data?
<seme> would something like strip! work
cburyta has quit [Ping timeout: 260 seconds]
<havenn> seme: Maybe, we'd have to see the code. Try #strip! and if it doesn't work paste a gist for us of the Nokogiri > strip.
<shevy> with .strip! you would not need to do x = y.something
<shevy> you could do y.something!
lggr has quit [Ping timeout: 244 seconds]
<prox|a> stripper.strip!
<seme> ok cool thanks.. let me try that
<_bart> why does .match also return inactive regexp groups (?:*****)
ABK has quit [Read error: Connection reset by peer]
saschagehlich_ has joined #ruby
ABK has joined #ruby
<shevy> inactive?
<shevy> dunno
<shevy> I usually use .scan
<shevy> or .grep
lggr has joined #ruby
frogprince_mac has joined #ruby
seme_ has joined #ruby
saschagehlich has quit [Ping timeout: 240 seconds]
saschagehlich_ is now known as saschagehlich
ABK has quit [Read error: Connection reset by peer]
RudyValencia has quit [Quit: My IRC client doesn't advertise in /quit messages.]
ABK has joined #ruby
dakine has joined #ruby
wallerdev has joined #ruby
jgrevich has joined #ruby
ABK has quit [Read error: Connection reset by peer]
<_bart> shevy: http://rubular.com/r/jNEm0SXV2O .match returns /user/bart but I want just 'bart'
seme has quit [Ping timeout: 240 seconds]
<_bart> shevy: also I want the first result only, so that's why .match was my first choice
morozovm has left #ruby [#ruby]
<codefyre> _bart: a = "http://youtube.com/user/bart/".match(/[?\/](?:user|username|author|uploader)[\/=](\w+)/)
<codefyre> a[1]
<shevy> god I hate regexes
<_bart> usually calling .to_s on a would just give me bart
<_bart> and the match data object would have all sorts of details
<shevy> why do you call .to_s
iamjarvo has quit [Ping timeout: 245 seconds]
<_bart> because I want the resulting string
CodeFriar has joined #ruby
<shevy> and you don't get it by using [] ?
lggr has quit [Ping timeout: 240 seconds]
nightfalcon has joined #ruby
<_bart> shevy: ^ made this
<shevy> hmm why do you use .scan there now rather than .match
<shevy> you confuse me a lot _bart :)
lggr has joined #ruby
<shevy> is your URL string always that simple?
CodeFriar has quit [Client Quit]
<_bart> shevy: it can be complicated.
<shevy> hmm how complicated
<_bart> but well, I just want the first match, in the form of a string
<_bart> so the method I just sent you is the way to go I think
<shevy> "http://youtube.com/user/bart/".split('/')[-1] # => "bart"
<_bart> no that wouldn't work, this is a tiny part of a scraper.
vjt has joined #ruby
brotspinne has quit [Quit: brotspinne]
<_bart> so a lot of regexpes
sent-hil has joined #ruby
nateberkopec has joined #ruby
elico has quit [Quit: elico]
lggr has quit [Ping timeout: 255 seconds]
chussenot has joined #ruby
g-ram has joined #ruby
ABK has joined #ruby
cakehero has joined #ruby
lggr has joined #ruby
timonv has joined #ruby
ShiintoRyuu has joined #ruby
ABK has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 256 seconds]
roadt has quit [Ping timeout: 252 seconds]
davidcelis has quit [Quit: K-Lined.]
lggr has quit [Ping timeout: 246 seconds]
krion has joined #ruby
<krion> hi guys
lggr has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
iamjarvo has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
cantonic_ has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
<_bart> hi krion
kirun_ has joined #ruby
kirun has quit [Ping timeout: 265 seconds]
<krion> i'm new to ruby world :)
<havenn> krion: 'Happy Saturday!' if Time.now.saturday?
fantazo has joined #ruby
cantonic has quit [Ping timeout: 256 seconds]
cantonic_ is now known as cantonic
lggr has joined #ruby
ABK has joined #ruby
<krion> following the tuto on tryruby.org but there is some error on it, and the embededed interpreter is not that good
whackatre has quit [Quit: Cya.]
<krion> here is the typo, imho
whackatre has joined #ruby
whackatre has quit [Changing host]
whackatre has joined #ruby
<krion> ratings[rate] += 1 works in the embedded interpreter but not with irb
<krion> so i suppose irb is right and the site is wrong ;)
jgrevich_ has joined #ruby
<krion> hum weird...
<krion> i make it work one time, clear the hash, retry, and now it doesn't work
ltsstar has quit [Quit: ltsstar]
chussenot_ has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
jgrevich has quit [Ping timeout: 256 seconds]
jgrevich_ is now known as jgrevich
<Igneous> can someone explain to me why I need to do 'return(not arr.empty?)', whereas I can get away with 'return ! arr.empty?'. I thought the only thing that differed between not and ! was precedence. Is ! pre-ceeding the execution or return or something?
bigkevmcd has joined #ruby
icole has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
chussenot_ is now known as chussenot
ABK has quit [Ping timeout: 245 seconds]
Tom2 has joined #ruby
F1skr has joined #ruby
lggr has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
<havenn> krion: For various reasons, TryRuby.org is not at all a full Ruby REPL, like Pry or IRB. TryRuby is really meant for following the lesson.
icole has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
tekacs has quit [Quit: Disappearing... *poof*]
lggr has quit [Ping timeout: 240 seconds]
chrishunt has quit [Ping timeout: 244 seconds]
tekacs has joined #ruby
zodiak has joined #ruby
<krion> even with irb there is things i don't understand..
lggr has joined #ruby
<krion> incrementing works sometimes, other time not
havenn has quit [Remote host closed the connection]
vitor-br has quit [Remote host closed the connection]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
noyb has joined #ruby
irleif has joined #ruby
<Igneous> krion: glancing at that.. ratings looks like it's a hash.. whereas you're manipulating it like it's an array. Try ratings[:rate]
<Igneous> nevermind, I'm being an idiot today
lggr has quit [Ping timeout: 240 seconds]
fram has joined #ruby
BMF has joined #ruby
lggr has joined #ruby
g-ram has quit [Quit: Computer has gone to sleep.]
shevy has quit [Ping timeout: 246 seconds]
oldB has quit [Quit: oldB]
TomJ has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
r1ddl3r has quit [Ping timeout: 246 seconds]
timonv has quit [Remote host closed the connection]
awestroke has joined #ruby
rbuck has quit [Quit: Leaving.]
r1ddl3r has joined #ruby
g-ram has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
seme_ has quit [Quit: Changing server]
jrizzo has joined #ruby
jrizzo is now known as seme
<_bart> krion: what is the value of 'rate'
<_bart> krion: it's not a symbol or an integer index so I guess it's nil
<Igneous> krion: I think it's because your ratings hash is totally empty. += is trying to add 1 to nil (because both the value and key are previously undefined)
<_bart> oh wait
<_bart> this is from the ruby course right?
mucker has quit [Quit: leaving]
Takehiro has quit [Remote host closed the connection]
Jay_Levitt has joined #ruby
<_bart> =+1 is just setting the value
<_bart> like Igneous said, it's trying to add to nil in the first line
Jay_Levitt has quit [Client Quit]
shevy has joined #ruby
Jay_Levitt has joined #ruby
Jay_Levitt has quit [Client Quit]
JonnieCache has joined #ruby
<_bart> so book.values and ratings don't work together well the first time, the second time you set initial values, and that's why it's working the third time
<_bart> so it's normal behaviour
chussenot has quit [Quit: chussenot]
rabidpraxis has joined #ruby
senny has quit [Remote host closed the connection]
khakimov has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
<Igneous> so, test to see if the values are defined the first time around that loop, if they aren't, just assign them with = instead of doing an AND assignment.. and you should be fine
davidcelis has joined #ruby
mengu has joined #ruby
lggr has joined #ruby
bigkevmcd has quit [Remote host closed the connection]
<seme> hrm.. still having issues with this stripping thing... I pasted the code here... can someone take a look and point me in the right direction, http://pastebin.com/KmuhFq2d
g-ram has quit [Quit: Computer has gone to sleep.]
geekyogi has joined #ruby
havenn has joined #ruby
JonnieCache has quit [Read error: Operation timed out]
timonv has joined #ruby
lushious has quit [Remote host closed the connection]
incagneato has joined #ruby
lushious has joined #ruby
timonv has quit [Remote host closed the connection]
heftig has quit [Quit: leaving]
lggr has quit [Ping timeout: 248 seconds]
incagneato has quit [Client Quit]
mag00 has joined #ruby
fram has quit [Remote host closed the connection]
lggr has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
cburyta has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
kirun_ has quit [Ping timeout: 246 seconds]
<seme> I mean this is odd... look at this.. if I print i I get "blah " as the output if I print i.strip I get "blah " as the output
<seme> i being my variable holding the string "blah "
<seme> man I must either be crazy or really tired
<codefyre> i.strip return the stripped version, it doesn't modify 'i'
<codefyre> maybe you want i.strip!
<seme> right but if I'm doing puts i.strip it should print the stripped version right
zigomir has quit [Remote host closed the connection]
<seme> I tried that too and it is the same
<seme> actually if I print j.strip! it prints nil
khakimov has quit [Quit: Computer has gone to sleep.]
Nisstyre-laptop has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
AlbireoX has joined #ruby
Nisstyre-laptop has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
Nisstyre-laptop has quit [Read error: Connection reset by peer]
<canton7> yeah, strip! modifies j in place, and returns nil
<canton7> strip doesn't modify j, but returns the stripped version of j
Nisstyre-laptop has joined #ruby
lggr has joined #ruby
icole has joined #ruby
heftig has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.9]
answer_42 has joined #ruby
khakimov has joined #ruby
Pochacco has joined #ruby
Jork1 has quit [Quit: Jork1]
Tearan has joined #ruby
iamjarvo has quit [Ping timeout: 246 seconds]
AlbireoX has quit [Remote host closed the connection]
noyb has quit [Ping timeout: 240 seconds]
AlbireoX has joined #ruby
icole has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
mahmoudimus has joined #ruby
kirun_ has joined #ruby
Zai_ has quit [Quit: Zai_]
lggr has quit [Ping timeout: 255 seconds]
AlbireoX has quit [Ping timeout: 244 seconds]
sent-hil has quit [Remote host closed the connection]
bapa has joined #ruby
mbr has joined #ruby
codefyre has quit [Quit: Leaving]
lggr has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
Tearan has joined #ruby
Takehiro has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
mbr has left #ruby [#ruby]
Xeago has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
chrishunt has joined #ruby
havenn has joined #ruby
gmurphey has joined #ruby
goraxe has quit [Ping timeout: 248 seconds]
factum has joined #ruby
rubious has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
senny has joined #ruby
Takehiro has joined #ruby
c0rn_ has joined #ruby
<krion> hum...
g-ram has joined #ruby
<krion> _bart: Igneous i suppose i was misunderstanding the course
<krion> the course say
<_bart> yeah
<krion> do ratings = Hash.new(0)
<krion> then it return {}
<krion> so i was assuming
havenn has quit [Ping timeout: 240 seconds]
<krion> ratings = Hash.new(0) == ratings = {}
<krion> but looks like i was wrong on that
<krion> yeah, i was wrong
<_bart> yes, it sets an initial value
bapa has quit [Read error: Connection reset by peer]
<krion> i tought they was demonstrating a different way of initialize an "empty" hash
lggr has quit [Ping timeout: 252 seconds]
jbw has quit [Ping timeout: 246 seconds]
bapa has joined #ruby
RJ3000_ has quit [Ping timeout: 256 seconds]
arturaz has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
swarley has joined #ruby
<reuf> ok guys, give me some advice on what business to pursue - whats it out there that constitutes untapped market opportunity
bapa has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Russell^^ has quit [Quit: Russell^^]
chrishunt has quit [Quit: WeeChat 0.3.8]
Tearan has quit [Quit: Sleepy Badger....]
Guedes has quit [Ping timeout: 255 seconds]
saschagehlich has quit [Quit: saschagehlich]
daniel_hinojosa has joined #ruby
emmanuelux has quit [Ping timeout: 246 seconds]
cakehero has joined #ruby
saschagehlich has joined #ruby
lggr has joined #ruby
monkegjinni has quit [Ping timeout: 245 seconds]
Takehiro has quit [Remote host closed the connection]
<_bart> how do I get the longest string from an array of strings?
zigomir has joined #ruby
rburton- has joined #ruby
<_bart> ah .max{|a, b| a.length <=> b.length}
<mag00> @bart, check out the spaceship operator
<krion> hum, that's weird you cannot do simplier no ?
<_bart> .max_by(&:length)
<krion> (new, but i tought sometingh like array.to_s.length.max would work (but it doesn't)
<seme> is it possible that there is a non visible character in that location that strip is detecting but I can't see?
<mag00> array.max works for integers, might be applicable to strings, not sure.
<krion> mag00: it doesn't
<mag00> anyone have experience with prime factorization?
lggr has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
workmad3 has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
lggr has joined #ruby
<reactormonk> mag00: #math
answer_42 has quit [Quit: WeeChat 0.3.9]
answer_42 has joined #ruby
havenn has joined #ruby
<Mon_Ouie> require 'prime'
<Mon_Ouie> (e.g. Prime.prime_division(n))
emmanuelux has joined #ruby
Zaeyx has joined #ruby
bluenemo_ has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
rburton- has quit [Read error: Connection reset by peer]
rburton- has joined #ruby
Tom2 has quit [Ping timeout: 244 seconds]
c0rn_ has quit []
lggr has quit [Ping timeout: 264 seconds]
<mag00> Mon_Ouie: yeah, thanks bud. I'm trying to do it without to try and master loops and trial division
<mag00> i do love the prime_division
<mag00> n.prime_division.map { |base,exp| [base]*exp }.flatten is basically the solution i'm trying to arrive at
bapa has joined #ruby
<mag00> just "manually"
<mag00> my current work gets me to 2,4,1 with an input of 8
<mag00> can't figure it out
<mag00> should be 2,2,2
ph^ has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
<mag00> can we paste code in here?
havenn has joined #ruby
chrishunt has joined #ruby
lggr has joined #ruby
chrishunt has quit [Client Quit]
icole has joined #ruby
<havenn> Sweet, the Phusion guys already made a Ruby extension for SHA-3: https://github.com/phusion/digest-sha3-ruby
<havenn> Now to implement a slow-as-hell pure Ruby one without any C extensions. >.>
sspiff has joined #ruby
geekyogi has quit [Quit: Leaving.]
<Mon_Ouie> mag00: Use pastie.org (or similar) for longer paste
icole has quit [Ping timeout: 240 seconds]
<havenn> mag00: I strongly recommend (no ads, doesn't show a picture of a cat like pastebin.com when it gets traffic >.>): gist.github.com
<Mon_Ouie> Well, apparently you're trying to divide the number you have by numbers that aren't primes
lggr has quit [Ping timeout: 245 seconds]
<Virunga> During the installation of a gem can i imposing to not install a dependency?
reuf has quit [Ping timeout: 240 seconds]
BrianJ has quit [Quit: Computer has gone to sleep.]
<Virunga> I hope the question is wrote correctly :P
<reactormonk> havenn: read http://www.links.org/?p=1283 on that
rburton- has quit [Ping timeout: 276 seconds]
<havenn> reactormonk: Or from the Keccak guys themselves!: http://keccak.noekeon.org/
willb has quit [Ping timeout: 244 seconds]
iamjarvo has joined #ruby
<havenn> reactormonk: if ya want slow, bcrypt ftw!
<Virunga> When i install the veewee gem it installs the ffi-1.1.5 gem which cause a conflicts, how can i avoid it?
<havenn> reactormonk: Keccak is slower than Skein or Blake, which I think were the other top contenders out of the best 5.
starship has quit [Killed (moorcock.freenode.net (Nickname regained by services))]
Guest59749 has joined #ruby
lggr has joined #ruby
Tom2 has joined #ruby
seme has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
vitoravelino`afk is now known as vitoravelino
lggr has quit [Ping timeout: 256 seconds]
havenn has quit [Remote host closed the connection]
joofsh has joined #ruby
reset has joined #ruby
jbw has joined #ruby
willb has joined #ruby
lggr has joined #ruby
fantazo has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 244 seconds]
timonv has quit [Remote host closed the connection]
sashman has quit [Ping timeout: 276 seconds]
no_worries has joined #ruby
Araxia has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
BMF has quit [Remote host closed the connection]
RJ3000_ has joined #ruby
<zykes-> how can I do something like Pythons if "x" in dict: ?
havenn has joined #ruby
<zykes-> or if "x" not in dict:
irleif has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
bapa has quit [Ping timeout: 260 seconds]
awarner has joined #ruby
<shevy> can you explain what this does
<blazes816> zykes-: dict.keys.include? "x"
<shevy> dict is a collection / array ?
Markvilla has joined #ruby
<shevy> or is it a hash
<blazes816> shevy: it's a hash
<shevy> ok
<shevy> :)
<blazes816> x is a key
<shevy> yeah
<blazes816> I missed the 'not': !dict.keys.include? "x"
no_worries has quit [Remote host closed the connection]
<shevy> hash.has_key? "name_of_key_here"
<shevy> would also work
RJ3000_ has quit [Ping timeout: 246 seconds]
<shevy> yeah
<shevy> or unless hash.has_key? "x"
<mag00> ok guys. been banging my head against the wall on this seemingly simple problem for 2.5 days. what the HECK am i missing?
<shevy> blazes816, do you think zykes- will use ruby in the future?
<blazes816> i have no idea
havenn has quit [Ping timeout: 244 seconds]
<workmad3> mag00: you're finding all the factors
<workmad3> mag00: but not all factors are prime
<mag00> yessir
<shevy> mag00 always try to simplify your code
<mag00> basically, i can't turn 4 (in this example) into 2, 2
jrist-afk has quit [Ping timeout: 268 seconds]
<mag00> shevy: thanks. i do love me some simple code
daniel_- has joined #ruby
daniel_- has quit [Client Quit]
lggr has quit [Ping timeout: 255 seconds]
<mag00> shevy: i've tried to make it simpler, can prob try again
<mag00> shevy: just not seeing it
<workmad3> mag00: ok, so it looks like you need to do a small bit of recursion
<workmad3> mag00: so for each item in the factorisation in your array, you need to see if it's a prime or not, and if it isn't then you need to repeat the process on *that* number
timonv has joined #ruby
<shevy> mag00 yeah your method looks not easy to simplify right now
<workmad3> mag00: and repeat until all the numbers are prime
<mag00> workmad3: should i open up a new each operation on the array you think?
<mag00> shevy: yeah, it's prob the sqrt action. it's a brow-raiser.
jgwong has quit [Ping timeout: 264 seconds]
lggr has joined #ruby
frogprince has quit [Ping timeout: 256 seconds]
jgwong has joined #ruby
<shevy> mag00
<shevy> are these prime numbers?
<shevy> [1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50]
<matti> LOL
<matti> shevy: Check
<shevy> yes?
<shevy> I dont know
<shevy> ruby is smarter than me haha
<heftig> those are natural numbers except the primes
<shevy> aaaah
<shevy> lol
<shevy> mag00, try this: http://pastie.org/4923798
workmad3 has quit [Ping timeout: 256 seconds]
<shevy> oh man
<shevy> even that is wrong...
<shevy> but you get the idea yeah?
<shevy> somehow my brain is in lala land already
<mag00> shevy: thanks haha
<heftig> that code is whack
irleif has joined #ruby
<mag00> shevy: regex is going to make my head burst and i'm trying not to use the prime library
<shevy> probably the slowest way to find primes too
<shevy> yeah
lagzilla has joined #ruby
<heftig> please check if 1408210948109248210947 is a prime
<shevy> hahaha
RJ3000_ has joined #ruby
<mag00> shevy: i don't understand regex yet. n00b action
<shevy> regex is not so difficult
<shevy> regex always is put inside //
<shevy> ok?
<shevy> that is the first thing you need to know
<shevy> the second thing is that, inside //
<mag00> shevy: i believe it. just looks like codekill
<shevy> you can use special characters
<shevy> \d for numbers
<shevy> . for any character
<shevy> yeah
<lagzilla> Sorry if this is a silly question but can I make a string greater then another string like S > P
<shevy> it looks ugly and I hate regexes but they are too useful to ignore mag00
<shevy> mag00 so keep that on your todo list in the next weeks :P
<shevy> a string greater?
<mag00> agreed. absolutely. shevy.
lggr has quit [Ping timeout: 244 seconds]
<shevy> "abc" > "ab" # => true
<shevy> that is a great string here man
<shevy> "the greatest" > "great" # => true
<mag00> check this: require 'prime' \n 256.prime_division.map { |base, exp| [base]*exp }.flatten shevy
nightfalcon has quit [Quit: Lost terminal]
<shevy> oh
<shevy> that is since 1.9.x right?
<shevy> I am on 1.8.x again right now for testing :\
Solnse has joined #ruby
<mag00> 1.9.2 i think
<mag00> i think require 'mathn' might work
Takehiro has joined #ruby
rabidpraxis has joined #ruby
lggr has joined #ruby
<shevy> cool
<shevy> indeed
<shevy> dont think I had to require mathn before haha
<shevy> I keep on saying, I use only 25% of what ruby offers :P
eikko has joined #ruby
<mag00> yeah it's nuts i feel the same
<mag00> perhaps more like 6%
<mag00> for me
chrishunt has joined #ruby
<lagzilla> cool thank you :)
factum has left #ruby [#ruby]
tbrock has joined #ruby
<tbrock> hey guys when using spawn if you have arguments that start with "--" to make "--arg" how do you specify them correctly?
lggr has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
xkx_ has joined #ruby
havenn has joined #ruby
Takehiro has quit [Remote host closed the connection]
huismon has joined #ruby
matled- has joined #ruby
ltsstar has joined #ruby
<tbrock> anyone?
epitron__ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
JonnieCache has joined #ruby
rmc3_ has joined #ruby
bnagy_ has joined #ruby
fred_ has joined #ruby
Jb___ has joined #ruby
Boohbah_ has joined #ruby
mksm has joined #ruby
fred_ is now known as Guest44051
rubious has quit [Quit: Leaving...]
elspeth_ has joined #ruby
mksm is now known as Guest58426
hardcore_ has joined #ruby
awarner has quit [Remote host closed the connection]
lggr has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
igneous1 has joined #ruby
Viper has joined #ruby
iosctr_ has joined #ruby
Whooop has joined #ruby
JoeTheGuest_ has joined #ruby
Viper is now known as Guest29403
joschi- has joined #ruby
sarmiena_ has joined #ruby
chrishunt has quit [Quit: WeeChat 0.3.8]
ShiintoRyuu has quit [*.net *.split]
KillerFox has quit [*.net *.split]
neersighted has quit [*.net *.split]
mattp_ has quit [*.net *.split]
Igneous has quit [*.net *.split]
xkx has quit [*.net *.split]
hardcore has quit [*.net *.split]
Guest52560 has quit [*.net *.split]
epitron has quit [*.net *.split]
bnagy has quit [*.net *.split]
markss has quit [*.net *.split]
matled has quit [*.net *.split]
Veejay has quit [*.net *.split]
felipe has quit [*.net *.split]
jim_cooley has quit [*.net *.split]
jeekl has quit [*.net *.split]
Whoop has quit [*.net *.split]
joschi has quit [*.net *.split]
fred has quit [*.net *.split]
JoeTheGuest has quit [*.net *.split]
elspeth has quit [*.net *.split]
rmc3 has quit [*.net *.split]
Boohbah has quit [*.net *.split]
Jb_ has quit [*.net *.split]
nate_h has quit [*.net *.split]
joelio has quit [*.net *.split]
iosctr has quit [*.net *.split]
vjt has quit [*.net *.split]
hoelzro|away has quit [*.net *.split]
tomaw has quit [*.net *.split]
ElderFain has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
rotor has quit [*.net *.split]
ixx has quit [*.net *.split]
maxmanders has quit [*.net *.split]
Drakevr has quit [*.net *.split]
Derander has quit [*.net *.split]
yellow5 has quit [*.net *.split]
zaiste has quit [*.net *.split]
Araxia has quit [*.net *.split]
lushious has quit [*.net *.split]
lkba has quit [*.net *.split]
preller has quit [*.net *.split]
WanderingGlitch has quit [*.net *.split]
zeromodulus has quit [*.net *.split]
dv_ has quit [*.net *.split]
hackeron has quit [*.net *.split]
dekz has quit [*.net *.split]
issyl0 has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
whowantstolivefo has quit [*.net *.split]
Companion has quit [*.net *.split]
TheNumb has quit [*.net *.split]
Guest96590 has quit [*.net *.split]
madhatter has quit [*.net *.split]
etank has quit [*.net *.split]
matled- is now known as matled
iosctr_ is now known as iosctr
vjt has joined #ruby
hoelzro|away has joined #ruby
tomaw has joined #ruby
cjk101010 has joined #ruby
ElderFain has joined #ruby
rotor has joined #ruby
yellow5 has joined #ruby
Derander has joined #ruby
zaiste has joined #ruby
gianlucadv has joined #ruby
maxmanders has joined #ruby
Drakevr has joined #ruby
ixx has joined #ruby
joelio_ has joined #ruby
Araxia has joined #ruby
lkba has joined #ruby
hackeron has joined #ruby
WanderingGlitch has joined #ruby
preller has joined #ruby
dekz has joined #ruby
dv_ has joined #ruby
lushious has joined #ruby
issyl0 has joined #ruby
zeromodulus has joined #ruby
Companion has joined #ruby
whowantstolivefo has joined #ruby
TheNumb has joined #ruby
etank has joined #ruby
madhatter has joined #ruby
Guest96590 has joined #ruby
eikko has quit [Read error: No buffer space available]
kitofr has quit [Read error: Connection reset by peer]
ltsstar has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
eikko has joined #ruby
ltsstar has joined #ruby
epitron__ is now known as epitron
daniel_- has joined #ruby
Banistertab has quit [Ping timeout: 257 seconds]
JonnieCache has quit [Read error: Operation timed out]
mattp_ has joined #ruby
kitofr has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
jgwong has quit [Ping timeout: 255 seconds]
Nisstyre-laptop has quit [Remote host closed the connection]
vjt has quit [*.net *.split]
tomaw has quit [*.net *.split]
hoelzro|away has quit [*.net *.split]
ElderFain has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
rotor has quit [*.net *.split]
ixx has quit [*.net *.split]
maxmanders has quit [*.net *.split]
yellow5 has quit [*.net *.split]
Drakevr has quit [*.net *.split]
Derander has quit [*.net *.split]
zaiste has quit [*.net *.split]
vjt has joined #ruby
tomaw has joined #ruby
cjk101010 has joined #ruby
ElderFain has joined #ruby
rotor has joined #ruby
gianlucadv has joined #ruby
Drakevr has joined #ruby
ixx has joined #ruby
hoelzro|away has joined #ruby
Derander has joined #ruby
maxmanders has joined #ruby
yellow5 has joined #ruby
zaiste has joined #ruby
jgwong has joined #ruby
mag00 has quit [Quit: Page closed]
reset has quit [Quit: Leaving...]
jeekl has joined #ruby
lggr has joined #ruby
zeromodulus has quit [Ping timeout: 252 seconds]
Veejay has joined #ruby
Nisstyre-laptop has joined #ruby
jim_cooley has joined #ruby
<aef> there is a core library named Etc which is butt ugly. i need to access the usernames of the members of a specific group in my linux system. is there a library with a prettier interface than Etc around which can handle this for me?
swarley has quit [Ping timeout: 240 seconds]
Tombar has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
timonv has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
chriskk has quit [Quit: chriskk]
<Solnse> I'm trying to create a rock paper scissors tournament for homework, I've created this method that will accept the hash: http://pastebin.com/D1VWK6t7 but I'm confused how I pass the hash to it and create the next round... Am I going in a wrong direction?
kirun_ has quit [Ping timeout: 246 seconds]
diverdude has joined #ruby
lggr has joined #ruby
MissionCritical has joined #ruby
zeromodulus has joined #ruby
tbrock has quit [Quit: Leaving]
Takehiro has joined #ruby
stephenjudkins has joined #ruby
cakehero has quit [Quit: Leaving...]
glyytchy has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
daniel_- has quit [Ping timeout: 245 seconds]
rippa has quit [Ping timeout: 260 seconds]
havenn has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
Takehiro has quit [Ping timeout: 260 seconds]
cakehero has joined #ruby
lggr has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
seme has joined #ruby
Guedes has joined #ruby
seme is now known as Guest29080
lggr has quit [Ping timeout: 245 seconds]
Whooop is now known as Whoop
Whoop has quit [Changing host]
Whoop has joined #ruby
incogneato has joined #ruby
lggr has joined #ruby
<incogneato> got any noobs in here?
conor_ireland has quit [Quit: conor_ireland]
<incogneato> i'm a noob
<incogneato> figured i would share this: http://ofps.oreilly.com/titles/9780596518387/index.html
ilyam has joined #ruby
<incogneato> it's straight up man-tastic. read it
drowningchild has joined #ruby
drowningchild has quit [Changing host]
drowningchild has joined #ruby
sent-hil has joined #ruby
drowningchild has quit [Client Quit]
drowningchild has joined #ruby
drowningchild has quit [Changing host]
drowningchild has joined #ruby
sagax has joined #ruby
joeycarmello has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
tomku has quit [Quit: WeeChat 0.3.7]
timonv has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
frameworks has joined #ruby
dpk has quit []
robustus has quit [Quit: ZNC - http://znc.in]
dpk has joined #ruby
lggr has joined #ruby
cakehero has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
Virunga has quit [Remote host closed the connection]
conor_ireland has joined #ruby
saschagehlich has joined #ruby
bradyl0ve has joined #ruby
eldariof has quit []
lggr has quit [Ping timeout: 245 seconds]
icole has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
GHOSTnew has joined #ruby
<GHOSTnew> hi
glyytchy has quit [Quit: Leaving...]
lggr has joined #ruby
Banistergalaxy has joined #ruby
icole has quit [Ping timeout: 245 seconds]
Experium has joined #ruby
<Experium> Could someone explain to me what this algorithm is doing its hard to grasp the meaning and reasons for doing all these tasks -> http://pastebin.com/S89Z5rPk
vlad_starkov has quit [Remote host closed the connection]
havenn has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
irleif has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
chussenot has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.9]
<iamjarvo> can someone talk this code through with me http://pastie.org/private/lj2nuivit357gm29nbu8a i dont understand why when the first fork happens it jumps to the second loop
irleif has joined #ruby
<burgestrand> iamjarvo: the parent forks three children, and then continues down
<burgestrand> try that
chussenot has quit [Ping timeout: 244 seconds]
lggr has quit [Ping timeout: 255 seconds]
<iamjarvo> burgestrand: trying hold on
ryanf has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
bigmcq77 has joined #ruby
frogprince has joined #ruby
vlad_starkov has joined #ruby
lggr has joined #ruby
ilyam has quit [Quit: ilyam]
sarmiena_ has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
felipe has joined #ruby
g-ram has quit [Ping timeout: 260 seconds]
c0rn_ has joined #ruby
Takehiro has joined #ruby
Markvilla has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
g-ram has joined #ruby
RudyValencia has joined #ruby
pskosinski has quit [Ping timeout: 260 seconds]
<iamjarvo> burgestrand: i sort of get it sort of don't. think i need to look up into forking some more
_md has joined #ruby
lggr has joined #ruby
Takehiro has quit [Ping timeout: 260 seconds]
saschagehlich has quit [Quit: saschagehlich]
irleif has quit [Quit: Computer has gone to sleep.]
Virunga has joined #ruby
saschagehlich has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
noyb has joined #ruby
g-ram has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
binw has joined #ruby
werdnativ has joined #ruby
lggr has joined #ruby
kyb3r has joined #ruby
Araxia has quit [Quit: Araxia]
havenn has quit [Remote host closed the connection]
werdnativ has quit [Quit: werdnativ]
lggr has quit [Ping timeout: 246 seconds]
cyong has joined #ruby
eikko has quit [Read error: Connection reset by peer]
lggr has joined #ruby
cyong has quit [Client Quit]
cyong has joined #ruby
Guest29080 has quit [Ping timeout: 240 seconds]
colinbm has joined #ruby
cyong has quit [Client Quit]
c0rn_ has quit []
vlad_starkov has quit [Remote host closed the connection]
gogiel has quit [Ping timeout: 246 seconds]
cyong has joined #ruby
incogneato has quit [Quit: Page closed]
thisirs has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
_md has quit [Quit: Leaving...]
kyb3r has quit []
colinbm has quit [Quit: colinbm]
Jork1 has joined #ruby
lggr has joined #ruby
eikko has joined #ruby
awarner has joined #ruby
headius has joined #ruby
thone has joined #ruby
BSaboia has joined #ruby
Dawne has joined #ruby
thone_ has quit [Ping timeout: 240 seconds]
Virunga has quit [Remote host closed the connection]
grizlo42 has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
brianpWins has joined #ruby
dangerousdave has quit [Quit: Leaving...]
eikko has quit [Read error: Connection reset by peer]
rabidpraxis has quit [Remote host closed the connection]
alanp has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 255 seconds]
bradyl0ve has quit [Quit: Leaving...]
GHOSTnew has quit [Ping timeout: 256 seconds]
slainer68 has joined #ruby
cyong has quit [Quit: Leaving.]
lggr has joined #ruby
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
eikko has joined #ruby
nimred has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 240 seconds]
eikko has quit [Read error: Connection reset by peer]
A124 has quit [Quit: Leaving.]
awestroke has quit [Remote host closed the connection]
lggr has joined #ruby
Takehiro has joined #ruby
Dawne has quit [Quit: Leaving.]
JonnieCache has joined #ruby
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
cakehero has joined #ruby
Takehiro has quit [Ping timeout: 260 seconds]
fixl has joined #ruby
timonv has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
Xeago_ has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
fridim_ has joined #ruby
igneous1 has quit [Quit: WeeChat 0.3.8]
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
eikko has joined #ruby
lggr has joined #ruby
jrajav has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
sarmiena_ has quit [Quit: sarmiena_]
timonv has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
JonnieCache has quit [Ping timeout: 255 seconds]
<_bart> I know I can do /z[^x]+xb/ to select this: zaaaaaaxb, but what I only want the regexp to 'stop' at 'xb' and not just 'x', doing [^xb] would be EITHER x or b, but how to do an exact ^ match?
samphippen has joined #ruby
notVert has joined #ruby
<waxjar> /z[^x]$/ ?
<waxjar> * /z[^x]+$/
rubious has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Solnse has quit [Ping timeout: 246 seconds]
Coolhand has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 244 seconds]
icole has joined #ruby
lggr has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
nimred has quit [Ping timeout: 260 seconds]
sarmiena_ has joined #ruby
noyb has quit [Ping timeout: 260 seconds]
nimred has joined #ruby
eikko has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<_bart> waxjar: no I'm looking for [^'xb'] if you know what I mean, I want the 'xb' to be treated as a whole and not single characters
Z0idberg has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
havenn has joined #ruby
nilg has joined #ruby
skogis has quit [Ping timeout: 256 seconds]
eikko has joined #ruby
lggr has joined #ruby
jenrzzz has joined #ruby
<waxjar> i don't get it. do you have an example of what kind of string you're trying to match?
<canton7> _bart, search for negative lookahead/lookbehind in the ruby regex page
<canton7> unfortunately that doesn't cover your exact case...
<blazes816> _bart: ^(xb)
<blazes816> or ^(?:xb) for a non-cap group
frogprince_mac has quit [Quit: Leaving...]
senny has quit [Remote host closed the connection]
<_bart> ah soooo easy
<_bart> blazes816, thanks
<blazes816> (im_treated_as_one_token) vs. [im_a_list_of_individual_tokens]
<blazes816> np
havenn has quit [Ping timeout: 260 seconds]
<canton7> hrm, /a^(b)c/ =~ adc => nil, while /a[^b]c/ =~ adc => 1
<canton7> sorry, 0
daniel_- has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
zeromodulus has quit [Ping timeout: 260 seconds]
cakehero has joined #ruby
Zai_ has joined #ruby
vlad_starkov has joined #ruby
<_bart> I can't get it to work, http://rubular.com/r/Pl1DEuHaDV this should match the '10'
<_bart> because the regexp should be in words, start with something>*something that's not <next*<next NUMBER
<canton7> like I say, blazes816 is incorrect
lggr has joined #ruby
<blazes816> you're right, 'adc' =~ /a[^(b)]c/
<canton7> again, try expanding that to [^(bc)] and it's the same as [^bc]
<blazes816> correct. he wants [^(bc)], not [^bc]
<canton7> ..which isn't easily possible afaik. there's negative lookahead/lookbehinds, if the thing not to be matched is on either end of the pattern
<canton7> I don't know of a way to have a "not" group in the middle of an expression
Pochacco has quit [Read error: Connection reset by peer]
<canton7> hrm, seems negative lookahead can do thsi?
Pochacco has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
<blazes816> positive lookahead
<_bart> I can use a dot operator, but I've been told to not use that
sarmiena_ has quit [Quit: sarmiena_]
<_bart> but that's bad I've been told
Iszak has quit [Quit: Computer has gone to sleep.]
erichmenge has joined #ruby
brianpWins has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
<blazes816> _bart: nothing wrong with it
lggr has joined #ruby
<_bart> blazes816: I've been told it is a performance killer
rubious has quit [Quit: Leaving...]
luckyruby has joined #ruby
<waxjar> use (\d{2}) instead of ([0-9][0-9]) would be a bit nicer
<waxjar> regexpes aren't too quick anyway
<blazes816> _bart: that's ridiculous. regexes are already slow as balls. as long as you keep your backtracking in check you'll be good
bier has quit [Ping timeout: 246 seconds]
mikepack has quit [Remote host closed the connection]
<_bart> blazes816: also .+ is greedy, so it skips the first <next and will only stop at the last <next
<_bart> which is wrong indeed
<blazes816> .+? is non-greedy
<waxjar> are you trying to match html _bart?
<_bart> yes, this is an exceptional case, normally I'd use a parser, I know I know
<waxjar> ah ok, i was gonna say
<_bart> thanks, with +? it's working.
ledao has joined #ruby
BSaboia has quit [Quit: Fui embora]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
awarner has quit [Remote host closed the connection]
Iszak has joined #ruby
khakimov has joined #ruby
mahmoudimus has joined #ruby
bier has joined #ruby
Takehiro has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
headius has quit [Quit: headius]
Takehiro has quit [Ping timeout: 260 seconds]
Zai_ has quit [Quit: Zai_]
rTypo has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
idlecool has joined #ruby
<idlecool> hi folks, i have a issue with timezones in my ruby on rails aap
<idlecool> app*
lggr has quit [Ping timeout: 255 seconds]
<idlecool> when i do Time.zone_offset('IST')
<idlecool> it returns null on a different machine while in my local machine it returns 19800
<idlecool> which is just right
Iszak has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<idlecool> am i missing any gems on the other machine?
jenrzzz has joined #ruby
cakehero has quit [Read error: Operation timed out]
dotemacs_ has joined #ruby
lggr has joined #ruby
dotemacs_ is now known as dotemacs
frameworks has quit [Ping timeout: 245 seconds]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cakehero has joined #ruby
headius has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
postmodern has joined #ruby
deadghost has quit [Ping timeout: 245 seconds]
baphled has quit [Ping timeout: 256 seconds]
lkba has joined #ruby
lggr has joined #ruby
budha has quit []
<frogstarr78> is there a way to get a remote servers MAC address in ruby?
bluOxigen has quit [Ping timeout: 246 seconds]
Suchorski has joined #ruby
joeycarmello has quit [Remote host closed the connection]
Suchorski has left #ruby [#ruby]
deadghost has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
jgwong has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
dpk has quit [Ping timeout: 252 seconds]
samflores has joined #ruby
jonathanwallace has joined #ruby
r1ddl3r has quit [Quit: Leaving.]
Experium has quit [Quit: Leaving]
niklasb has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 244 seconds]
samflores has quit [Quit: Linkinus - http://linkinus.com]
Jork1 has quit [Quit: Jork1]
SuperrMann has joined #ruby