apeiros_ changed the topic of #ruby-lang to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
iamcalledrob has quit [Ping timeout: 260 seconds]
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby-lang
sk_0 has quit [Quit: leaving]
AKASkip has quit [Ping timeout: 260 seconds]
gnfz has quit [Quit: Leaving]
sandbags has quit [Remote host closed the connection]
stamina has joined #ruby-lang
wallerdev has joined #ruby-lang
sandbags has joined #ruby-lang
ddv has quit [Ping timeout: 245 seconds]
ddv has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
sandbags has quit [Ping timeout: 252 seconds]
Averna has joined #ruby-lang
enebo has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
lolmaus has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
stamina has quit [Ping timeout: 272 seconds]
enebo has quit [Quit: enebo]
yubrew has joined #ruby-lang
yubrew has quit [Ping timeout: 252 seconds]
tectonic has quit []
Jam_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nathanstitt has joined #ruby-lang
dm78 has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
weems|mac has joined #ruby-lang
lolmaus has joined #ruby-lang
aemeredith has joined #ruby-lang
vintik has quit [Remote host closed the connection]
iamcalledrob has joined #ruby-lang
iamcalledrob has quit [Ping timeout: 272 seconds]
breezy_ has quit [Remote host closed the connection]
vintik has joined #ruby-lang
simoz1111115 has joined #ruby-lang
tplpnm has joined #ruby-lang
Miphix has joined #ruby-lang
stardiviner has joined #ruby-lang
weems|mac has quit [Quit: weems|mac]
brianpWins has joined #ruby-lang
cored has quit [Ping timeout: 272 seconds]
stardiviner has quit [Ping timeout: 248 seconds]
yubrew has joined #ruby-lang
sarkyniin has quit [Quit: Quitte]
yubrew has quit [Ping timeout: 255 seconds]
stardiviner has joined #ruby-lang
vintik has quit [Remote host closed the connection]
breezy_ has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
aemeredith has quit [Remote host closed the connection]
aemeredith has joined #ruby-lang
aemeredith has quit [Ping timeout: 252 seconds]
iamcalledrob has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
vintik has joined #ruby-lang
iamcalledrob has quit [Ping timeout: 264 seconds]
mistym has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby-lang
mistym has joined #ruby-lang
tplpnm has quit []
wallerdev has joined #ruby-lang
miqui_ has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
vintik has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 260 seconds]
Lewix has joined #ruby-lang
aemeredith has joined #ruby-lang
stardiviner has quit [Ping timeout: 264 seconds]
yubrew has joined #ruby-lang
charliesome has joined #ruby-lang
aemeredith has quit [Read error: Connection reset by peer]
gix- has quit [Ping timeout: 272 seconds]
dm78 has joined #ruby-lang
aemeredi_ has joined #ruby-lang
yubrew has quit [Ping timeout: 248 seconds]
gix has joined #ruby-lang
breezy_ has quit [Remote host closed the connection]
matled has quit [Remote host closed the connection]
breezy_ has joined #ruby-lang
Atttwww has joined #ruby-lang
aemeredi_ has quit [Ping timeout: 264 seconds]
breezy_ has quit [Ping timeout: 272 seconds]
red_menace has quit [Quit: peer reset by connection]
ta_ has joined #ruby-lang
ta has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 264 seconds]
mistym_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
mistym has quit [Ping timeout: 255 seconds]
thomasxie has joined #ruby-lang
breezy_ has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
hinbody has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
iamcalledrob has joined #ruby-lang
pr0ton_ has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
tectonic has joined #ruby-lang
iamcalledrob has quit [Ping timeout: 248 seconds]
thomasxie has quit [Remote host closed the connection]
MikaAK has joined #ruby-lang
arup_r has joined #ruby-lang
yubrew has joined #ruby-lang
diegoviola has joined #ruby-lang
aemeredith has joined #ruby-lang
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aemeredith has quit [Read error: Connection reset by peer]
aemeredi_ has joined #ruby-lang
stardiviner has joined #ruby-lang
yubrew has quit [Ping timeout: 260 seconds]
aero224 has joined #ruby-lang
shinnya has quit [Ping timeout: 255 seconds]
iamcalledrob has joined #ruby-lang
aemeredi_ has quit [Ping timeout: 240 seconds]
dm78 has joined #ruby-lang
mistym has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
<arup_r> What is the difference between Enumerator and Enumerable ?
dm78 has quit [Remote host closed the connection]
aemeredith has joined #ruby-lang
<wmoxam> arup_r: Enumerables can be Enumerated
<wmoxam> ie: an array is an Enumerable
weems|mac has joined #ruby-lang
<arup_r> wmoxam: that actually made me confused... -(
<wmoxam> [1, 2, 3] # Enumerable
<wmoxam> [1, 2, 3].each # Enumerator
<wmoxam> the Enumerator is the class used to Enumerate the Enumerable
<wmoxam> clear? ;)
MikaAK has quit [Ping timeout: 264 seconds]
<arup_r> No... your last line is more confusing for me :-) I don't understand why we need the Enumerator class although, while we have Enumerable ... :-)
oste has left #ruby-lang [#ruby-lang]
<wmoxam> arup_r: when a class is Enumerable, it means that it defines an interface that allows it to act as such
<wmoxam> arup_r: ie: for your class to be Enumerable it needs to define a method called 'each'
breezy_ has quit [Remote host closed the connection]
<wmoxam> arup_r: and Enumerable will define some extra methods such as all?, any? etc
Cakey has quit [Ping timeout: 240 seconds]
<wmoxam> arup_r: Enumerators are classes that can iterate over Enumerables
Lewix has joined #ruby-lang
Cakey has joined #ruby-lang
aemeredith has quit [Remote host closed the connection]
vintik has joined #ruby-lang
aemeredith has joined #ruby-lang
<wmoxam> arup_r: you should read (if you haven't already): http://www.ruby-doc.org/core-2.1.2/Enumerator.html
<arup_r> before iterating, it have to convert the enumerable to enumerator..
<arup_r> I read it.. most methods I used to like.. with_object..next but I have some definition problems...
breezy_ has joined #ruby-lang
<arup_r> As you said, Enumerable class must need to implement #each first.. It means, to iterate, all enumerable objects, first must need to convert them to Enumerator object.
araujo has quit [Quit: Leaving]
aemeredith has quit [Ping timeout: 240 seconds]
<godd2> arup_r how comfortable are you with the difference between a module and a class?
breezy_ has quit [Remote host closed the connection]
<arup_r> ahh.. Only thing, I know I can instantiate the class, but not the module..
breezy_ has joined #ruby-lang
<arup_r> godd2: Is there any more difference? Would you tell me ?
<godd2> that's the biggest difference yes
havenwood has joined #ruby-lang
<godd2> Enumerable is a module, and Enumerator is a class
<godd2> so that should tell you a lot out the the box. Enumerable is a set of behaviors and functionality you'd want to add to a class. The Enumerator class is something you get objects from itself.
<arup_r> I will be online after 30 mins.. I have many more questions on this.. Thanks to you godd2 and wmoxam
ta has joined #ruby-lang
ta_ has quit [Read error: Connection reset by peer]
earthquake has joined #ruby-lang
yubrew has joined #ruby-lang
arup_r has quit [Ping timeout: 260 seconds]
yubrew has quit [Ping timeout: 248 seconds]
pr0ton_ has quit [Quit: pr0ton_]
aemeredith has joined #ruby-lang
aemeredith has quit [Read error: Connection reset by peer]
aemeredith has joined #ruby-lang
shevy has left #ruby-lang ["I'll be back ... maybe"]
shevy has joined #ruby-lang
aemeredith has quit [Ping timeout: 240 seconds]
touzin has joined #ruby-lang
Cakey has quit [Ping timeout: 255 seconds]
aemeredith has joined #ruby-lang
saarinen has joined #ruby-lang
Mon_Ouie has quit [Quit: WeeChat 0.4.3]
theharshest has quit [Quit: This computer has gone to sleep]
aemeredith has quit [Ping timeout: 255 seconds]
robbyoconnor has quit [Max SendQ exceeded]
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby-lang
theharshest has joined #ruby-lang
touzin has quit [Ping timeout: 240 seconds]
CaptainJet has quit []
shevy has left #ruby-lang ["I'll be back ... maybe"]
stardiviner has quit [Ping timeout: 255 seconds]
mehlah has quit [Quit: Leaving...]
djbkd_ has joined #ruby-lang
crankharder has quit [Ping timeout: 240 seconds]
weems|mac has quit [Quit: weems|mac]
yubrew has joined #ruby-lang
simoz1111115 has quit [Ping timeout: 272 seconds]
dm78 has joined #ruby-lang
yubrew has quit [Ping timeout: 264 seconds]
dm78 has quit [Ping timeout: 264 seconds]
saarinen has quit [Quit: saarinen]
snsei has quit [Remote host closed the connection]
ta has quit [Read error: Connection reset by peer]
ta_ has joined #ruby-lang
dm78 has joined #ruby-lang
bender_unit has joined #ruby-lang
aemeredith has joined #ruby-lang
aemeredi_ has joined #ruby-lang
aemeredith has quit [Read error: Connection reset by peer]
hinbody has joined #ruby-lang
arup_r has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
relix has joined #ruby-lang
aemeredi_ has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 260 seconds]
<arup_r> Does Enumerable module creates first Enumerator object, before invoking any Enumerable methods like all? , any? etc ?
<drbrain> arup_r: no
<drbrain> it just calls #each
[spoiler] has joined #ruby-lang
heftig has quit [Quit: Quitting]
<arup_r> Enumerable is a module, without creating object, how would it call those methods like all? , an?
theharshest has quit [Quit: This computer has gone to sleep]
<arup_r> * any?
<drbrain> it is part of the ancestors list so it is part of your object
<drbrain> they live on your object
<arup_r> goes above my head..
<arup_r> :(
<drbrain> like object_id lives on your object via Kernel
newv has joined #ruby-lang
<newv> hello
schaerli has quit [Ping timeout: 272 seconds]
<newv> anyone here
kyb3r_ has joined #ruby-lang
<drbrain> arup_r
iamcalledrob has quit [Quit: Computer has gone to sleep.]
<arup_r> drbrain: Yes I am here
<drbrain> include makes the module's methods part of your object
yubrew has joined #ruby-lang
<pipework> drbrain: Doesn't extend do that? include for the instance_methods of the class of the object?
<drbrain> (learning a new keyboard)
havenwood has quit [Remote host closed the connection]
iamcalledrob has joined #ruby-lang
<pipework> Whatcha clackin' on?
havenwood has joined #ruby-lang
<arup_r> Enumerator is like a regular class like Array, Hash right ? Which includes Enumerable module..
<drbrain> pipework: I left out the class part on purpose
<pipework> oh1
apeiros has quit [Remote host closed the connection]
<drbrain> l
<drbrain> pipework: http://atreus.technomancy.us
apeiros has joined #ruby-lang
<drbrain> arup_r: yep
<drbrain> newv: hi
<arup_r> drbrain: Why Enumerator again implements #each_with_object, while Enumerable already has it ?
<drbrain> how do you meab
<newv> can anyone help me with an error
<drbrain> mean?
<newv> dumb question but i am lost
yubrew has quit [Ping timeout: 248 seconds]
<arup_r> newv: give a Gist link
iamcalledrob has quit [Ping timeout: 252 seconds]
<drbrain> oh, I see, hrm
havenwood has quit [Ping timeout: 264 seconds]
Guest63955 has quit [Ping timeout: 248 seconds]
apeiros has quit [Ping timeout: 264 seconds]
breezy_ has quit [Remote host closed the connection]
<drbrain> it seems to be an optimization
<drbrain> ap
<drbrain> arup_r: ↑
newv has quit [Ping timeout: 246 seconds]
breezy_ has joined #ruby-lang
rahul_j has joined #ruby-lang
<arup_r> Array, Range, Hash all using Enumerable#each_with_object.. How Enumerator is special, which makes it possible to give them their own #each_with_object ?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
<pipework> arup_r: I think an important question is 'what does it do differently'.
<drbrain> Enumerator is a class so it can have different behavior that overrides Enumerable
<pipework> So you might answer 'why' more easily.
breezy_ has quit [Ping timeout: 272 seconds]
snsei has joined #ruby-lang
symm- has joined #ruby-lang
<arup_r> pipework: Yes,, but really don't know what does it do differently, that caused to implement a separate method for them ?
breezy_ has joined #ruby-lang
<pipework> arup_r: Have you read the source code to it?
<drbrain> my reading says it is an optimization
<arup_r> I am blind in C :-)
<pipework> drbrain is the most literate guy here, iirc.
<drbrain> unless there's a lurker
<arup_r> Could you please give a piece of Ruby code which is equivalent to C, to understand "what does it do differently" ...
<pipework> arup_r: From what señor brain said, it just looks like an optimization. I'd probably not spend too much time thinking about it and fretting. Is there any reason it's so important to you right now?
<drbrain> there isn't equivalent ruby code since the optimization has to do with how arguments are passed
<pipework> Curiosity is an acceptable answer.
<drbrain> … passed on the C side
<drbrain> this keyboard is great!
<godd2> mechanical?
diegoviola has quit [Quit: WeeChat 0.4.3]
<pipework> drbrain: What's the biggest improvement? I'm sure you were typing on something comparable to the blues before.
<drbrain> cherry MX blue with black for the modifiers
<drbrain> the layout is awesome
<pipework> Seems to have keys at varying heights, or is that me not seeing things correctly?
<pipework> drbrain: This you right miaow? http://i.imgur.com/gpcvPUT.jpg
<godd2> ah nice. I have one with browns. great for my typing speed
<drbrain> it only has 40 keys so there isn't extra stuff unbalancing it on my lap
<drbrain> yep, the rows are arched in the shape of your fingertips
<drbrain> this makes it a little difficult to reach the low-row pinky keys at first, but I'll get used to it
<drbrain> I also built it from a kit
<pipework> drbrain: you're an emactopod, aren't you?
<drbrain> no, vim
<drbrain> and dvorak
ta_ has quit [Read error: Connection reset by peer]
<drbrain> typing plain English is starting to reinforce where the keys are, typing the punctuation that requires a layer-switch will take a while to get used to
ta has joined #ruby-lang
<godd2> I tried to get into dvorak but I had to keep switching back for starcraft
<drbrain> haha
<godd2> 10fastfingers.com will give you 1-minute typing tests for simple words and keep track of your progress over time
djbkd_ has quit [Remote host closed the connection]
ta_ has joined #ruby-lang
ta has quit [Read error: Connection reset by peer]
<arup_r> "Hello, world!".to_enum(:scan).each(/\w+/).to_a is this code same as "Hello, world!".scan(/\w+/) ?
snsei has quit [Remote host closed the connection]
snsei has joined #ruby-lang
iamcalledrob has joined #ruby-lang
ta has joined #ruby-lang
<godd2> try passing the regex as a second argument to the to_enum
<arup_r> Question is not proper .. leave it.. I need to think on it.
<godd2> >> "Hello, world!".to_enum(:scan, /\w+/).to_a
<eval-in_> godd2 => ["Hello", "world"] (https://eval.in/169959)
ta_ has quit [Read error: Connection reset by peer]
<drbrain> godd2: 60 vs. 80 wpm, 58/14 vs. 84/8 correct/incorrect
havenwood has joined #ruby-lang
<drbrain> I could do better on my laptop keyboard if I weren't learning this new one, I think
<godd2> yea it took me a little to get used to my keyboard. its just a normal full mechanical keyboard though, not one of your fancy ones
snsei has quit [Ping timeout: 264 seconds]
Lewix has quit [Ping timeout: 260 seconds]
<drbrain> I have a model-M style Das Keyboard but I really don't like the arrow keys and numpad
iamcalledrob has quit [Ping timeout: 264 seconds]
<drbrain> and I didn't want to buy a $300 mini keyboard I couldn't touch before buying, as I couldn't find a store with a return policy
arBmind has joined #ruby-lang
<drbrain> ok, bed time, later!
havenwood has quit [Ping timeout: 264 seconds]
_ht has joined #ruby-lang
apeiros has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
yfeldblum has joined #ruby-lang
ta_ has joined #ruby-lang
djbkd has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
ta has quit [Read error: Connection reset by peer]
ddv has quit [Changing host]
ddv has joined #ruby-lang
arup_r_ has joined #ruby-lang
arup_r__ has joined #ruby-lang
snsei has joined #ruby-lang
yfeldblum has quit [Ping timeout: 248 seconds]
ta has joined #ruby-lang
ta_ has quit [Read error: Connection reset by peer]
dm78 has quit [Remote host closed the connection]
arup_r has quit [Ping timeout: 252 seconds]
arup_r_ has quit [Ping timeout: 264 seconds]
earthquake has quit [Quit: earthquake]
snsei has quit [Remote host closed the connection]
snsei has joined #ruby-lang
snsei has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby-lang
mistym has quit [Quit: Leaving...]
yubrew has quit [Ping timeout: 260 seconds]
stardiviner has joined #ruby-lang
mykoweb has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
mykoweb has joined #ruby-lang
mistym has joined #ruby-lang
Lumio has joined #ruby-lang
breezy_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
mistym has quit [Ping timeout: 255 seconds]
rahul_j has joined #ruby-lang
aero224 has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 264 seconds]
Lumio has quit [Quit: Lumio]
kwd has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 0.4.3]
arBmind has quit [Quit: Leaving.]
rahul_j has quit [Ping timeout: 260 seconds]
Cakey has joined #ruby-lang
rahul_j has joined #ruby-lang
<arup_r__> What is the standard Ruby style guide to follow out there ?
<maloik> I don't think there is a standard but this one is most likely the most well known: https://github.com/styleguide/ruby
gjaldon has joined #ruby-lang
aero224 has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
dangerousdave has joined #ruby-lang
tbuehlmann has joined #ruby-lang
gjaldon has quit [Client Quit]
twright has quit [Ping timeout: 264 seconds]
<wasamasa> plus the one it adapts from
<wasamasa> which contains a lot more explanations for the style choices :P
<maloik> don't think I've read through that already
<maloik> might have to do that
arBmind has joined #ruby-lang
<arup_r__> wasamasa: what is that?
tectonic has quit []
breezy_ has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
iamcalledrob has joined #ruby-lang
<arup_r__> ok
iconpin has joined #ruby-lang
solars has joined #ruby-lang
aero224 has quit [Remote host closed the connection]
Cakey has quit [Ping timeout: 248 seconds]
Lumio has joined #ruby-lang
iconpin has quit [Client Quit]
iamcalledrob has quit [Ping timeout: 252 seconds]
AKASkip has joined #ruby-lang
tectonic has joined #ruby-lang
vintik has quit [Remote host closed the connection]
rahul_j_ has joined #ruby-lang
rahul_j has quit [Ping timeout: 240 seconds]
rahul_j_ is now known as rahul_j
aero224 has joined #ruby-lang
tectonic has quit []
aero224 has quit [Remote host closed the connection]
gjaldon has joined #ruby-lang
yubrew has joined #ruby-lang
michd is now known as MichD
twright has joined #ruby-lang
gjaldon has quit []
yubrew has quit [Ping timeout: 252 seconds]
ironhide_604 has joined #ruby-lang
<unsymbol> greets
arup_r__ has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
twright has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby-lang
aero224 has joined #ruby-lang
mikecmpbll has joined #ruby-lang
frankjpinto has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
rahul_j has quit [Quit: rahul_j]
kek has joined #ruby-lang
bglassmaker has joined #ruby-lang
Averna has quit [Quit: Leaving.]
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rahul_j has joined #ruby-lang
godd2 has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
vintik has joined #ruby-lang
Lewix has quit [Ping timeout: 264 seconds]
vintik has quit [Remote host closed the connection]
vintik has joined #ruby-lang
iamcalledrob has joined #ruby-lang
vintik has quit [Ping timeout: 255 seconds]
rahul_j has quit [Ping timeout: 264 seconds]
breezy_ has quit [Remote host closed the connection]
rahul_j has joined #ruby-lang
bender_unit has joined #ruby-lang
<yorickpeterse> morning
iamcalledrob has quit [Ping timeout: 255 seconds]
arup_r has joined #ruby-lang
arup_r_ has joined #ruby-lang
<arup_r_> Hi
joonty has quit [Ping timeout: 272 seconds]
rahul_j has quit [Ping timeout: 240 seconds]
stardiviner has quit [Ping timeout: 248 seconds]
<frankjpinto> night for me but helloo
arup_r has quit [Ping timeout: 264 seconds]
arup_r_ has quit [Client Quit]
touzin has joined #ruby-lang
yubrew has joined #ruby-lang
arup_r has joined #ruby-lang
rahul_j has joined #ruby-lang
skade has joined #ruby-lang
aemeredith has joined #ruby-lang
yubrew has quit [Ping timeout: 248 seconds]
<frankjpinto> nice, guess that would mean i'm leaving
joonty has joined #ruby-lang
stardiviner has joined #ruby-lang
bender_unit has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
twright has joined #ruby-lang
yfeldblum has joined #ruby-lang
twright has quit [Ping timeout: 264 seconds]
arBmind has quit [Quit: Leaving.]
yfeldblum has quit [Ping timeout: 255 seconds]
touzin has quit [Ping timeout: 240 seconds]
kek_ has joined #ruby-lang
kek has quit [Ping timeout: 260 seconds]
vintik has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
aemeredith has quit [Remote host closed the connection]
aemeredith has joined #ruby-lang
matp has quit [Quit: ZZZzzz…]
aemeredith has quit [Ping timeout: 252 seconds]
arBmind has joined #ruby-lang
vintik has quit [Remote host closed the connection]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
marr has joined #ruby-lang
francisfish has joined #ruby-lang
AKASkip has quit [Remote host closed the connection]
snoopybbt has joined #ruby-lang
scmx has joined #ruby-lang
dangerou_ has joined #ruby-lang
dangerousdave has quit [Ping timeout: 248 seconds]
ta_ has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
iamcalledrob has joined #ruby-lang
ta has quit [Ping timeout: 272 seconds]
ta has joined #ruby-lang
Atttwww has quit [Ping timeout: 272 seconds]
vedis has joined #ruby-lang
ta_ has quit [Ping timeout: 240 seconds]
vedis has quit [Client Quit]
vedis has joined #ruby-lang
vedis has left #ruby-lang [#ruby-lang]
arBmind has joined #ruby-lang
yubrew has joined #ruby-lang
iamcalledrob has quit [Ping timeout: 272 seconds]
schaerli has joined #ruby-lang
<arup_r> What are the disadvantages of ruby's dynamic (duck) typed system?
yubrew has quit [Ping timeout: 260 seconds]
Squarepy has joined #ruby-lang
<whitequark> you can never be sure that a particular piece of code works as intended or will break due to an arbitrarily distant change.
<ddfreyne> No compile-time guaratnees!
aemeredith has joined #ruby-lang
<arup_r> whitequark: any example in this ?
arBmind has quit [Quit: Leaving.]
<arup_r> may be a Gist ...
lolmaus has quit [Ping timeout: 255 seconds]
railzForDaiz has joined #ruby-lang
AKASkip has joined #ruby-lang
<whitequark> arup_r: well, ruby doesn't allow you to request *any* guarantees about a given value
lolmaus has joined #ruby-lang
<whitequark> so you can't say "this API needs a number"
gpg_ has joined #ruby-lang
<gpg_> hi all
<frankjpinto> hi!
<gpg_> frankjpinto: could u explain in plain english what this code does:
<gpg_> def venue_product_count object.respond_to?(:venue_product_count) ? object.venue_product_count : 0 end
<gpg_> what does the ? operator means
<gpg_> and also " : 0 "
<frankjpinto> not an operator, part of the method name
<gpg_> ok kool
stamina has joined #ruby-lang
<frankjpinto> respond_to? is the method name
aemeredith has quit [Ping timeout: 264 seconds]
<gpg_> thans helpful
<DefV> well
<gpg_> no the second ?
<DefV> that's the ternary operator
<frankjpinto> gpg_ thats the ternary operator you're looking at
<DefV> boolean_operation ? execute_if_true : execute_if_false
<DefV> same as
<DefV> if boolean_operation then execute_if_true else execute_if_false
<frankjpinto> gpg_ bascically: if object has method venue_product_count then return its value else return 0
<gpg_> ok kool thnaaks
yfeldblum has joined #ruby-lang
mnngfltg has joined #ruby-lang
mnngfltg has quit [Client Quit]
mnngfltg has joined #ruby-lang
twright has joined #ruby-lang
ironhide_604 has quit [Ping timeout: 264 seconds]
arBmind has joined #ruby-lang
yfeldblum has quit [Ping timeout: 248 seconds]
kek_ has quit [Remote host closed the connection]
kek has joined #ruby-lang
touzin has joined #ruby-lang
railzForDaiz has quit [Ping timeout: 248 seconds]
scmx has quit [Ping timeout: 264 seconds]
twright has quit [Ping timeout: 264 seconds]
touzin has quit [Ping timeout: 240 seconds]
sandbags has joined #ruby-lang
touzin has joined #ruby-lang
ecnalyr has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
aemeredith has joined #ruby-lang
touzin has quit [Ping timeout: 240 seconds]
ecnalyr has quit [Ping timeout: 264 seconds]
<arup_r> No more disadvantages... I was looking for an example, which can elaborate this things.. although
touzin has joined #ruby-lang
havenwood has joined #ruby-lang
mehlah has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
rahul_j has quit [Ping timeout: 272 seconds]
rahul_j_ has joined #ruby-lang
sandbags has quit [Ping timeout: 264 seconds]
nofxx has quit [Ping timeout: 260 seconds]
yalue has quit [Read error: Connection reset by peer]
stardiviner has quit [Ping timeout: 260 seconds]
Miphix has quit [Quit: Leaving]
yubrew has joined #ruby-lang
iamcalledrob has joined #ruby-lang
ironhide_604 has joined #ruby-lang
joonty has quit [Ping timeout: 255 seconds]
<wasamasa> well, it allows you to skip stuff like generics
<wasamasa> as long as something looks like it has the necessary methods, it can be used in a particular way
touzin has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 255 seconds]
Lewix has joined #ruby-lang
iamcalledrob has quit [Ping timeout: 264 seconds]
<wasamasa> which makes metaprogramming theoretically a lot less bothersome
<wasamasa> or just interactive testing
rahul_j_ has quit [Quit: rahul_j_]
Lewix has quit [Ping timeout: 264 seconds]
ecnalyr has joined #ruby-lang
havenwood has joined #ruby-lang
Lumio has quit [Quit: Lumio]
yfeldblum has joined #ruby-lang
stardiviner has joined #ruby-lang
joonty has joined #ruby-lang
symm- has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby-lang
dernise has joined #ruby-lang
arup_r has quit [Remote host closed the connection]
touzin has joined #ruby-lang
scmx has joined #ruby-lang
mehlah_ has joined #ruby-lang
mehlah has quit [Read error: Connection reset by peer]
twright has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
Lewix has quit [Remote host closed the connection]
scmx has quit [Ping timeout: 255 seconds]
twright has quit [Ping timeout: 264 seconds]
arup_r has joined #ruby-lang
<arup_r> wasamasa: okay
rahul_j has joined #ruby-lang
<arup_r> I got disconnected, so couldn't see any of your messages.. :(
touzin has quit [Ping timeout: 260 seconds]
<wasamasa> you missed out on nothing
arup_r has quit []
arup_r has joined #ruby-lang
lolmaus has quit [Read error: Connection reset by peer]
kiwnix has joined #ruby-lang
AKASkip has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
AKASkip has joined #ruby-lang
yubrew has joined #ruby-lang
AKASkip has quit [Remote host closed the connection]
schlubbi has joined #ruby-lang
yubrew has quit [Ping timeout: 252 seconds]
frankjpinto has quit [Ping timeout: 264 seconds]
AKASkip has joined #ruby-lang
dorei has joined #ruby-lang
yfeldblum has joined #ruby-lang
iamcalledrob has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 264 seconds]
iamcalledrob has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
Miphix has joined #ruby-lang
ldnunes has joined #ruby-lang
mehlah_ has quit [Quit: Leaving...]
Lumio has joined #ruby-lang
cored has joined #ruby-lang
dernise has quit [Quit: This computer has gone to sleep]
Jam_ has joined #ruby-lang
momomomomo has joined #ruby-lang
pabloh has joined #ruby-lang
mconnolly has joined #ruby-lang
aemeredith has quit []
sarkyniin has joined #ruby-lang
yubrew has joined #ruby-lang
mehlah has joined #ruby-lang
<arup_r> When should I think OpenStruct to use or the Struct ?
Jam_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Squarepy has quit [Ping timeout: 272 seconds]
<arup_r> Why am I getting 31964252037939931209 == 31964252037939933000.0 # => true
<apeiros> because floats
<arup_r> leave the latter it is a mistake
<apeiros> precision is limited
Missphoenix has joined #ruby-lang
<apeiros> >> "%f" % 31964252037939931209.to_f
<eval-in_> apeiros => "31964252037939933184.000000" (https://eval.in/170038)
<apeiros> "%f" % 31964252037939933000.0
<apeiros> >> "%f" % 31964252037939933000.0
<eval-in_> apeiros => "31964252037939933184.000000" (https://eval.in/170039)
yubrew has quit [Ping timeout: 264 seconds]
<apeiros> if you want to go full monkey, read up on IEEE 754 floats
matp has joined #ruby-lang
felipe has quit [Ping timeout: 252 seconds]
<arup_r> No I don't want to go full monkey :-)
Miphix has quit [Ping timeout: 252 seconds]
<arup_r> floating point is irritating
harshp_ has quit [Read error: Connection reset by peer]
harshp_ has joined #ruby-lang
_whitelogger_ has joined #ruby-lang
justinweiss_ has joined #ruby-lang
dacamp_ has joined #ruby-lang
znz_jp has quit [Ping timeout: 252 seconds]
joelmheim_ has joined #ruby-lang
nomadicoder has joined #ruby-lang
adambeynon has joined #ruby-lang
zzak__ has joined #ruby-lang
maloik_ has joined #ruby-lang
Abuh has joined #ruby-lang
jlpeters has joined #ruby-lang
pipework has quit [Ping timeout: 245 seconds]
kylo has quit [Ping timeout: 245 seconds]
shennyg_ has quit [Ping timeout: 245 seconds]
llakey has quit [Ping timeout: 245 seconds]
yugui_zzz has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
snoopybbt has quit [Ping timeout: 245 seconds]
go|dfish has quit [Ping timeout: 245 seconds]
joast has quit [Ping timeout: 245 seconds]
gregf_ has quit [Ping timeout: 245 seconds]
thang has quit [Ping timeout: 245 seconds]
Abuh_ has quit [Ping timeout: 245 seconds]
maloik has quit [Ping timeout: 245 seconds]
dacamp has quit [Ping timeout: 245 seconds]
pipecloud is now known as pipework
shennyg__ has quit [Changing host]
shennyg__ has joined #ruby-lang
ramblinpeck has quit [Changing host]
ramblinpeck has joined #ruby-lang
vlad_sta- has joined #ruby-lang
justinweiss_ has quit [Changing host]
justinweiss_ has joined #ruby-lang
joelmheim_ has quit [Changing host]
joelmheim_ has joined #ruby-lang
nomadicoder has quit [Changing host]
nomadicoder has joined #ruby-lang
adambeynon has quit [Changing host]
adambeynon has joined #ruby-lang
zzak__ has quit [Changing host]
zzak__ has joined #ruby-lang
jlpeters has quit [Changing host]
jlpeters has joined #ruby-lang
llakey has joined #ruby-lang
yfeldblum has quit [Ping timeout: 272 seconds]
K3dare has joined #ruby-lang
canton7 has joined #ruby-lang
seanhagen has joined #ruby-lang
ToaNii has joined #ruby-lang
go|dfish has joined #ruby-lang
snoopybbt has joined #ruby-lang
nisstyre has joined #ruby-lang
yugui_zzz has joined #ruby-lang
kylo has joined #ruby-lang
znz_jp has joined #ruby-lang
jgpawletko has joined #ruby-lang
ggherdov has joined #ruby-lang
bin7me has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeffs has joined #ruby-lang
scmx has joined #ruby-lang
syedasad has joined #ruby-lang
cnivolle has joined #ruby-lang
knu has quit [Ping timeout: 260 seconds]
<yorickpeterse> Nothing wrong with floating points
twright has joined #ruby-lang
<yorickpeterse> except that one time little Billy used it for financing
<yorickpeterse> then wondered how the company lost a few thousand bucks over a year time
<apeiros> nothing wrong with floats indeed.
<apeiros> lots wrong with ignorant programmers :-/
<yorickpeterse> wots a rational
<dorei> ignorant programmers are cheaper though :p
<yorickpeterse> Surely 100.0/3 always returns the same amount of decimals
snsei has joined #ruby-lang
<yorickpeterse> dorei: pretty such losing customers is not worth one extra ignorant programmer
<yorickpeterse> Didn't Magic the gathering online exchange also use floats for storing bitcoin amounts?
mconnolly has quit [Quit: mconnolly]
mconnolly has joined #ruby-lang
twright has quit [Ping timeout: 240 seconds]
mconnolly has quit [Client Quit]
mconnolly has joined #ruby-lang
<yorickpeterse> (mtgox)
<epitron> i think dorei was being ironical
DivineEntity has quit [Quit: leaving]
twright has joined #ruby-lang
<yorickpeterse> no way
mconnolly has quit [Client Quit]
mconnolly has joined #ruby-lang
AllMyCircuits has joined #ruby-lang
twright has quit [Ping timeout: 240 seconds]
weems|mac has joined #ruby-lang
Calculon has joined #ruby-lang
shinnya has joined #ruby-lang
snoopybbt has quit [Ping timeout: 245 seconds]
iamcalledrob has joined #ruby-lang
cnivolle has left #ruby-lang [#ruby-lang]
AllMyCircuits has quit [Quit: Leaving]
yubrew has joined #ruby-lang
charliesome has joined #ruby-lang
scmx has quit [Ping timeout: 272 seconds]
malconis has joined #ruby-lang
<arup_r> When should I think OpenStruct to use or the Struct ?
syedasad has quit []
<epitron> Struct is when you know what fields you want
<epitron> OpenStruct is when you don't
mconnolly has quit [Quit: mconnolly]
mconnolly has joined #ruby-lang
arup_r has quit [Remote host closed the connection]
AllMyCircuits has joined #ruby-lang
joast has joined #ruby-lang
yubrew has quit [Ping timeout: 264 seconds]
miqui has joined #ruby-lang
Calculon has quit [Quit: Leaving]
AllMyCircuits has quit [Client Quit]
AllMyCircuits has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
arup_r has joined #ruby-lang
<arup_r> epitron: okay
<epitron> arup_r: also, OpenStruct can be initialized with a hash
<epitron> Struct fields have to be passed in order as arguments to "new"
alexju has joined #ruby-lang
<arup_r> ok
yfeldblum has joined #ruby-lang
[spoiler] has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby-lang
iamcalledrob has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Ping timeout: 240 seconds]
yfeldblu_ has quit [Ping timeout: 252 seconds]
AncientAmateur has joined #ruby-lang
Ptm has joined #ruby-lang
Ptm is now known as Guest62059
workmad3 has joined #ruby-lang
<Guest62059> if I may ask a somewhat noobish question: what is the proper name for a .rb file? I figure it isn't "module" because a module is a construct defined with the module keyword.
bin7me has quit [Quit: Leaving]
chouhoulis has joined #ruby-lang
<wnd> is there something wrong with "a file"?
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
<Guest62059> well, no
<Guest62059> but I'm having trouble getting info on how the heck .new can be invoked on an .rb file
<Guest62059> I figured Google will start giving the answers I need once I get the proper name for '.rb file'
<Guest62059> if there is one.
<apeiros> you can't invoke .new on a file
twright has joined #ruby-lang
<wnd> I'm not sure if I'm following, but I'd say you invoke #new on a class
<wnd> sorry, ::new
<apeiros> you can `require "file"` which will read and execute the code in a file
<apeiros> and if that code defines a class, you can invoke .new on that class.
<Guest62059> hm, all that I get, so I suppose this code I'm dissecting is decidedly weird
<Guest62059> funny thing is it runs
elia has joined #ruby-lang
<Guest62059> I'm learning Ruby in the process of dissecting an automatic assessment system
andrewhl has joined #ruby-lang
<Guest62059> the weird example is written thus: daemon.rb has "require 'marker.rb'". marker.rb defines no classes; it's the main entry point with a #! line and all. Just a few lines lower in daemon.rb I read this:
<Guest62059> marker = Marker.new
<maloik_> you're probably better off putting the code in a gist
<maloik_> perhaps with some comments in the code for your questions
<Guest62059> can't do that, it's not my code and it's proprietary :/
nathanstitt has joined #ruby-lang
<apeiros> Guest62059: a) marker.rb has further requires which define Marker, b) you're looking at the wrong marker.rb file
<Guest62059> the thing that really confuses me is that there is no class Marker in the entire source
<apeiros> usually a project will have a "lib" dir. grep that dir for "class Marker"
<Guest62059> that's exactly what I did
twright has quit [Ping timeout: 264 seconds]
<apeiros> then it might come from a dependency
<Guest62059> no results whatsoever
tbuehlmann has quit [Quit: Leaving]
<apeiros> alternatively it might be dynamically defined
<apeiros> >> Object.const_set("Marker", Class.new); Marker.new
<eval-in_> apeiros => #<Marker:0x41c9642c> (https://eval.in/170073)
<apeiros> Guest62059: if you have it open in a pry/irb, try:
<apeiros> Marker.instance_method(Marker.instance_methods(false).first).source_location
<apeiros> gtg
<Guest62059> ok I'll try that. Thanks guys
dacamp_ is now known as dacamp
weems|mac has quit [Quit: weems|mac]
weems|mac has joined #ruby-lang
yubrew has joined #ruby-lang
yubrew has quit [Ping timeout: 264 seconds]
theharshest has joined #ruby-lang
arup_r has quit []
thang_ is now known as thang
AllMyCircuits has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby-lang
theharshest has quit [Quit: This computer has gone to sleep]
yubrew has joined #ruby-lang
dernise has joined #ruby-lang
scmx has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
Miphix has joined #ruby-lang
Missphoenix has quit [Ping timeout: 240 seconds]
Squarepy has joined #ruby-lang
banister has joined #ruby-lang
rahul_j has joined #ruby-lang
yfeldblum has joined #ruby-lang
jsullivandigs has joined #ruby-lang
fjfish has joined #ruby-lang
francisfish has quit [Ping timeout: 264 seconds]
jaimef has quit [Excess Flood]
jaimef has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
twright has joined #ruby-lang
twright has quit [Read error: Connection reset by peer]
sharpmachine has joined #ruby-lang
twright has joined #ruby-lang
Senjai has left #ruby-lang ["WeeChat 0.3.7"]
touzin has joined #ruby-lang
DivineEntity has joined #ruby-lang
znz_jp has quit [Quit: kill -QUIT $$]
stardiviner has quit [Ping timeout: 272 seconds]
thmzlt has joined #ruby-lang
znz_jp has joined #ruby-lang
AllMyCircuits has joined #ruby-lang
banister has joined #ruby-lang
kwd has quit [Quit: Sleeping now. ZZZzzz…]
rahul_j has quit [Quit: rahul_j]
kwd has joined #ruby-lang
kwd has quit [Client Quit]
banister has quit [Client Quit]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
snsei has quit [Remote host closed the connection]
snsei has joined #ruby-lang
AKASkip has quit [Ping timeout: 255 seconds]
enebo has joined #ruby-lang
bender_unit has joined #ruby-lang
apeiros has quit [Ping timeout: 248 seconds]
solars has quit [Ping timeout: 272 seconds]
snsei has quit [Ping timeout: 272 seconds]
touzin has quit [Ping timeout: 248 seconds]
rahul_j has joined #ruby-lang
mistym has joined #ruby-lang
hanu_ has joined #ruby-lang
knu has joined #ruby-lang
hgl has joined #ruby-lang
bantic has joined #ruby-lang
Atttwww has joined #ruby-lang
lolmaus has joined #ruby-lang
rippa has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
CaptainJet has joined #ruby-lang
hanu_ has quit [Remote host closed the connection]
<whitequark> ljarvis: ping
hgl has quit [Quit: Computer has gone to sleep.]
banister has joined #ruby-lang
arup_r has joined #ruby-lang
theharshest has joined #ruby-lang
mykoweb has joined #ruby-lang
apeiros has joined #ruby-lang
<whitequark> how do I save the state of a Mechanize object?
weems|mac has quit [Quit: weems|mac]
kek has quit [Remote host closed the connection]
touzin has joined #ruby-lang
kek has joined #ruby-lang
<yorickpeterse> whitequark: Marshal.dump(lol)
<whitequark> yorickpeterse: it has a mutex inside
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby-lang
dm78 has joined #ruby-lang
yalue has joined #ruby-lang
|jemc| has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
<yorickpeterse> meh
kek has quit [Ping timeout: 272 seconds]
symm- has joined #ruby-lang
mconnolly has quit [Ping timeout: 255 seconds]
havenn has joined #ruby-lang
godd2 has joined #ruby-lang
felipe has joined #ruby-lang
mconnolly has joined #ruby-lang
weems|mac has joined #ruby-lang
symm- has quit [Ping timeout: 264 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scmx has quit [Ping timeout: 264 seconds]
Lumio has quit [Quit: Lumio]
frankjpinto has joined #ruby-lang
mconnolly has quit [Ping timeout: 255 seconds]
symm- has joined #ruby-lang
Guest62059 has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
frankjpinto_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
mconnolly has joined #ruby-lang
frankjpinto has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby-lang
workmad3 has joined #ruby-lang
yfeldblum has quit [Ping timeout: 255 seconds]
ironhide_604 has quit [Ping timeout: 252 seconds]
funnel has quit [Remote host closed the connection]
weems|mac has quit [Quit: weems|mac]
weems|mac has joined #ruby-lang
havenn is now known as havenwood
<arup_r> In the doco https://www.relishapp.com/rspec/rspec-mocks/v/3-0/docs/working-with-legacy-code/message-chains they said "For example, if you write allow(foo).to receive_message_chain(:bar, :baz => 37) in a spec and then the implementation calls foo.baz.bar, the stub will not work."
<arup_r> why it wouldn't work ?
skade has joined #ruby-lang
frankjpinto__ has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
MikaAK1 has joined #ruby-lang
mistym has quit [Remote host closed the connection]
frankjpinto_ has quit [Ping timeout: 264 seconds]
havenn has joined #ruby-lang
<workmad3> arup_r: because you chained the call 'foo.bar.baz' not 'foo.baz.bar'
MikaAK1 has quit [Quit: node-irc says goodbye]
MikaAK2 has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
snoopybbt has joined #ruby-lang
<arup_r> OOppss So silly question I asked.. I was seeing actually something different and reading this, which made me confused.. Sorry for asking this silly question.
RobertBirnie has joined #ruby-lang
<workmad3> arup_r: it's ok... it's not a particularly clear example :)
<workmad3> arup_r: took me 3 reads to spot that they changed the order ;)
<arup_r> workmad3: Thanks for supporting me .. ;)
havenwood has quit [Quit: Leaving...]
andrewhl has quit [Quit: andrewhl]
scmx has joined #ruby-lang
RobertBi_ has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 272 seconds]
MikaAK has joined #ruby-lang
MikaAK has quit [Client Quit]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tbuehlmann has joined #ruby-lang
snoopybbt has quit [Ping timeout: 245 seconds]
skade has quit [Read error: Connection reset by peer]
dernise has quit [Read error: Connection reset by peer]
skade_ has joined #ruby-lang
mistym has joined #ruby-lang
RobertBi_ has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 264 seconds]
andrewhl has joined #ruby-lang
RobertBirnie has joined #ruby-lang
relix has joined #ruby-lang
yfeldblum has joined #ruby-lang
wallerdev has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 264 seconds]
wallerdev has quit [Client Quit]
pabloh has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby-lang
rahul_j has joined #ruby-lang
scampbell has joined #ruby-lang
schlubbi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AncientAmateur has joined #ruby-lang
scmx has quit [Ping timeout: 260 seconds]
dangerousdave has joined #ruby-lang
Squarepy has quit [Quit: Leaving]
dangerou_ has quit [Ping timeout: 264 seconds]
AncientAmateur has quit [Ping timeout: 272 seconds]
schaerli has joined #ruby-lang
jhass|off is now known as jhass
jaimef has quit [Excess Flood]
Lumio has joined #ruby-lang
jaimef has joined #ruby-lang
AllMyCircuits has quit [Ping timeout: 260 seconds]
saarinen has joined #ruby-lang
saarinen has quit [Client Quit]
bantic has quit [Quit: bantic]
saarinen has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
mnngfltg has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby-lang
AncientAmateur has joined #ruby-lang
iamcalledrob has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
iamcalledrob has quit [Client Quit]
akshay_kumar has joined #ruby-lang
frankjpinto__ has quit [Ping timeout: 264 seconds]
dsferreira has joined #ruby-lang
banister has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
x0f has quit [Ping timeout: 260 seconds]
banister_ has joined #ruby-lang
knu has quit [Ping timeout: 260 seconds]
solars has joined #ruby-lang
banister has quit [Ping timeout: 264 seconds]
karamazov has joined #ruby-lang
x0f has joined #ruby-lang
pablo_ has joined #ruby-lang
<pablo_> hello
<pablo_> can anyone tell me if (x = true if y.nil?) is equivalent to (x = y.nil?)
<workmad3> pablo_: yes
<pablo_> thanks :)
<Mon_Ouie> Not entirely since the first one results in x being nil rather than false when y is not nil
__butch__ has joined #ruby-lang
<workmad3> ah yeah... probably equivalent enough though :)
<apeiros> pablo_: no. with the former, x will retain the original value if y is not nil. (or be nil if it had no previous value)
<apeiros> >> y = "notnil"; x = true; x = true if y.nil?; x
<eval-in_> apeiros => true (https://eval.in/170152)
<apeiros> >> y = "notnil"; x = true; x = y.nil?; x
<eval-in_> apeiros => false (https://eval.in/170153)
nofxx has joined #ruby-lang
<arup_r> Can someone give me simple code examples implemented using Fiber as a gist ?
<pablo_> apeiros: I guess if I always want x to be boolean (i.e. not nil) and it's not set already then (x = y.nil?) is better
<apeiros> yes, definitively
workmad3 has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby-lang
<pablo_> thanks
vintik has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
solars has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby-lang
gpg_ has quit [Ping timeout: 246 seconds]
AKASkip has joined #ruby-lang
mykoweb has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
vintik has quit [Quit: Leaving...]
banister_ has quit [Ping timeout: 260 seconds]
miqui has quit [Read error: Connection reset by peer]
mykoweb has joined #ruby-lang
andrewhl has quit [Quit: andrewhl]
rahul_j has quit [Quit: rahul_j]
mykoweb has quit [Remote host closed the connection]
miqui has joined #ruby-lang
frankjpinto__ has joined #ruby-lang
rahul_j has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
shinnya has joined #ruby-lang
Atttwww has quit [Ping timeout: 272 seconds]
<arup_r> Guys some example code on Fiber please.. I am learning it.. some code examples will help me....
Mon_Ouie has quit [Ping timeout: 255 seconds]
superfreenodeman has joined #ruby-lang
<arup_r> I know except those.. for more practices... It is very tough concept..
andrewhl has joined #ruby-lang
<yorickpeterse> well just asking for any type of example isn't going to help much. Experimenting with fibers yourself is most likely going to help a lot more.
yfeldblu_ has joined #ruby-lang
yfeldblu_ has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby-lang
pixelhandler has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
<epitron> arup_r: python's generators are basically the same thing, but easier to understand
rahul_j has quit [Quit: rahul_j]
<epitron> you could read up on how those work, then use that as a foundation for learning Fiber
<arup_r> I never read Python
MichD is now known as michd
Mon_Ouie has joined #ruby-lang
<epitron> actually, sorry.. python generators are more like enumerables
<epitron> err, Enumerators
<epitron> actually, they're like a combination of the two :)
<epitron> they're pretty sweet, imo
solars has joined #ruby-lang
postmodern has joined #ruby-lang
stamina has quit [Ping timeout: 255 seconds]
yfeldblu_ has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
<arup_r> This Fiber is giving me too much pains... I am some one who started programming at the age of 22.. Now I am 24.. It is too late.. :(
<dorei> arup_r: it could have been worse, u could have started programming with cobol or java :p
<arup_r> I am not telling Ruby is bad.... It is awesome.. I am talking about my inefficiency and weak understanding about programming
<dangerousdave> any idea about this error is please? https://gist.github.com/deathwishdave/d651d16903b0b631f5fd
rahul_j has joined #ruby-lang
mistym_ has joined #ruby-lang
knu has joined #ruby-lang
ecnalyr has quit [Ping timeout: 264 seconds]
rahul_j has quit [Ping timeout: 264 seconds]
mistym has quit [Ping timeout: 252 seconds]
mistym has joined #ruby-lang
Lumio has quit [Quit: ...]
mistym__ has joined #ruby-lang
mistym_ has quit [Ping timeout: 255 seconds]
<yorickpeterse> arup_r: if you're starting out there's no need to learn about fibers
<yorickpeterse> arup_r: they're not that useful anyway
<yorickpeterse> arup_r: learn regular Ruby first, then worry about fibers, threads, etc
miqui has quit [Remote host closed the connection]
mistym has quit [Ping timeout: 272 seconds]
<arup_r> I read regular Ruby and code too.. But wanted to move to something new like this.. So.. Trying to understand.. As many as example I would be able to see, will be helpful for me to understands this concept.
tbuehlmann has quit [Remote host closed the connection]
DEac-_ has quit [Read error: No route to host]
dwknoxy has joined #ruby-lang
DEac- has joined #ruby-lang
pablo_ has quit [Ping timeout: 246 seconds]
miqui has joined #ruby-lang
charliesome has joined #ruby-lang
wallerdev_ has joined #ruby-lang
ericwood has quit [Quit: Changing server]
wallerdev has quit [Ping timeout: 260 seconds]
wallerdev_ is now known as wallerdev
lolmaus_ has joined #ruby-lang
ericwood has joined #ruby-lang
<godd2> arup_r you'd benefit more from going through all the Array isntance methods and working on memorizing them with flash cards then you would learning about Fibers
lolmaus has quit [Ping timeout: 255 seconds]
<arup_r> why monkey patching is considered as bad practices to core Ruby class... But I saw Rails did that in lot of places.
<arup_r> godd2: **with flash cards** means ?
banister has joined #ruby-lang
MikaAK2 has quit [Ping timeout: 252 seconds]
wallerdev_ has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
<godd2> I just mean quiz yourself what each method does
matled has joined #ruby-lang
sheperson has joined #ruby-lang
wallerdev has quit [Ping timeout: 272 seconds]
wallerdev_ is now known as wallerdev
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
bantic has joined #ruby-lang
djbkd has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
wallerdev has quit [Client Quit]
havenn has quit []
AncientAmateur has quit [Remote host closed the connection]
touzin has quit [Ping timeout: 240 seconds]
mistym__ has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
cmoneylulz has joined #ruby-lang
railzForDaiz has joined #ruby-lang
schlubbi has joined #ruby-lang
sepp2k has joined #ruby-lang
ruby-lang694 has joined #ruby-lang
knu has quit [Ping timeout: 260 seconds]
<arup_r> what is the problem there ?
railzForDaiz has quit [Remote host closed the connection]
sheperson has quit [Ping timeout: 248 seconds]
wallerdev has joined #ruby-lang
sheperson has joined #ruby-lang
AncientAmateur has joined #ruby-lang
sheperson has quit [Client Quit]
akshay_kumar has quit [Quit: Leaving]
djbkd has joined #ruby-lang
brianpWins has joined #ruby-lang
heftig has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
mistym has joined #ruby-lang
dangerousdave has joined #ruby-lang
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
Jeticus has joined #ruby-lang
elia has joined #ruby-lang
CaptainJet has quit [Ping timeout: 264 seconds]
Xney2 is now known as Xney
BucOder has joined #ruby-lang
cmoneylulz has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
_ht has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
BucOder has quit [Quit: Computer has gone to sleep.]
Neurexin has joined #ruby-lang
<ruby-lang694> Can someone take a look at this method I wrote? No errors, just might need help with "ruby style". Not sure. http://pastie.org/private/svsdqjlxv6emmpe428gma#
<Mon_Ouie> It looks to me like you want to use Enumerable#all?
<Mon_Ouie> No need to construct the complete array of booleans, as soon as you find one element for which the condition is false you know the result is false.
<ruby-lang694> Mon_Ouie: Ah! Very true I knew I was doing something really stupid. Thanks
bantic has quit [Ping timeout: 240 seconds]
<apeiros> he doesn't really use booleans either
wallerdev has quit [Quit: wallerdev]
<ruby-lang694> apeiros: Yeah... I know lol. I just kept looking at that method and thinking I was doing something silly but I couldn't see it. I'm glad you guys were able to look at it.
BucOder has joined #ruby-lang
bantic has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
<arup_r> Can anyone help me to understand - http://www.ruby-doc.org/core-2.1.0/Array.html#method-i-bsearch How this method work ? What is meant by find-minimum mode and find-any mode ?
<arup_r> I never understood this method
schaerli has joined #ruby-lang
cored has quit [Ping timeout: 248 seconds]
mistym has quit [Remote host closed the connection]
heftig has quit [Ping timeout: 248 seconds]
<epitron> Google binary search
<epitron> it lets you find things in sorted arrays quickly
<arup_r> Yes. I read it.. But what those 2 modes ?
DivineEntity has quit [Quit: leaving]
touzin has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
<Mon_Ouie> The mode is picked based on whether your block returns true/false or an integer
<epitron> integer appears to work like the <=> operator
<epitron> it's documented very strangely
<epitron> i think find min means it looking for the smallest element that satisfies the block
<Mon_Ouie> Right, and find-any looks for the point where the block returns zero
<arup_r> I know basic binary search... Ruby API one I never got.. I also don't know what is the use case of these 2 modes ?
<epitron> while find any is looking for the closest match, so it needs to know if each comparison is greater than or less than
<epitron> Mon_Ouie: it probably supports nearest as well
<epitron> if element is not in there
<epitron> that's a good reason to use binary search instead of a hash
<epitron> or set
wallerdev has joined #ruby-lang
AncientAmateur has joined #ruby-lang
<Mon_Ouie> Hm? It shows that it return nil in the example when no element in the array sets the block to zero
mistym has joined #ruby-lang
nofxx_ has joined #ruby-lang
<epitron> you can't do find nearest?
<Mon_Ouie> " If i is equal to j (i.e., there is no element that satisfies the block), this method returns nil."
aero224_ has joined #ruby-lang
<epitron> oh, i guess that's what find min is for
skade_ has quit [Quit: Computer has gone to sleep.]
<epitron> not sure why you'd want to use the other mode
arup_r has quit [Quit: Leaving.]
<epitron> maybe it's more memory efficient than a hash
theharshest has quit [Quit: This computer has gone to sleep]
Asher has quit [Quit: Leaving.]
fjfish has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 272 seconds]
aero224 has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby-lang
kiwnix has quit [Remote host closed the connection]
araujo has joined #ruby-lang
araujo has quit [Changing host]
araujo has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
scampbell has quit [Remote host closed the connection]
Johz has joined #ruby-lang
touzin has quit [Ping timeout: 256 seconds]
__butch__ has quit [Quit: Leaving.]
ldnunes has quit [Remote host closed the connection]
aero224 has joined #ruby-lang
miqui has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
mconnolly has quit [Quit: mconnolly]
ldnunes has joined #ruby-lang
djbkd has joined #ruby-lang
aero224_ has quit [Ping timeout: 255 seconds]
skade has joined #ruby-lang
yfeldblum has joined #ruby-lang
vedis has joined #ruby-lang
vedis has left #ruby-lang [#ruby-lang]
justinweiss_ has quit [Quit: Connection closed for inactivity]
thmzlt_ has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
dsferreira has quit [Quit: This computer has gone to sleep]
ur5us has joined #ruby-lang
thmzlt has quit [Ping timeout: 248 seconds]
theharshest has joined #ruby-lang
dm78 has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
schlubbi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby-lang694 has quit [Ping timeout: 246 seconds]
thmzlt_ is now known as thmzlt
BucOder has quit [Quit: Computer has gone to sleep.]
duper has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thmzlt_ has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
thmzlt has quit [Ping timeout: 245 seconds]
andrewhl has quit [Quit: andrewhl]
Neurexin has left #ruby-lang [#ruby-lang]
Johz has quit [Quit: Leaving]
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby-lang
alexju has quit [Remote host closed the connection]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
momomomomo has quit [Quit: momomomomo]
djbkd has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
frankjpinto__ has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby-lang
arBmind1 has joined #ruby-lang
djbkd has joined #ruby-lang
arBmind has quit [Ping timeout: 240 seconds]
<zenspider_> minitest version 5.4.0 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2014/07/minitest-version-5-4-0-has-been-released.html
duderonomy has quit [Ping timeout: 272 seconds]
bin7me has joined #ruby-lang
ratmav has joined #ruby-lang
frankjpinto__ has joined #ruby-lang
superfreenodeman has quit [Remote host closed the connection]
jbardin has joined #ruby-lang
<jbardin> hey all, long time no see
frankjpinto__ has quit [Ping timeout: 240 seconds]
mechcozmo has joined #ruby-lang
<mechcozmo> Hello, I'm having trouble with Zlib. Upon inflation, I get the error "incorrect header check (Zlib::DataError)
jeffs has quit [Ping timeout: 255 seconds]
aero224 has quit [Remote host closed the connection]
<mechcozmo> This is Ruby 1.9.3
cmoneylulz has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
mechcozmo has quit [Read error: Connection reset by peer]
ratmav has quit [Quit: Leaving]
stardiviner has joined #ruby-lang
mechcozm1 has joined #ruby-lang
mechcozm1 has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 240 seconds]
weems|mac has quit [Quit: weems|mac]
AncientAmateur has quit [Remote host closed the connection]
dik_dak has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby-lang
jhass is now known as jhass|off
<jbardin> looks like your not feeding the zlib methods with the correct / full data stream
heftig has joined #ruby-lang
stardiviner has quit [Ping timeout: 240 seconds]
AncientAmateur has joined #ruby-lang
frankjpinto has joined #ruby-lang
solars has quit [Ping timeout: 252 seconds]
cmoneylulz has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dm78 has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
stardiviner has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
yubrew has quit []
shinnya has quit [Ping timeout: 255 seconds]
mistym has quit [Remote host closed the connection]
dm78 has joined #ruby-lang
mistym has joined #ruby-lang
shinnya has joined #ruby-lang
pabs_ is now known as pabs
andrewhl has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
frankjpinto has quit [Ping timeout: 240 seconds]
AncientAmateur has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblu_ has quit [Remote host closed the connection]
frankjpinto has joined #ruby-lang
mehlah has joined #ruby-lang
AKASkip has quit [Ping timeout: 255 seconds]
jeffs has joined #ruby-lang
<drbrain> or maybe using inflate on a g
<drbrain> gzip file
lolmaus has joined #ruby-lang
lolmaus_ has quit [Ping timeout: 240 seconds]
bantic has quit [Quit: bantic]
dangerousdave has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby-lang
Atttwww has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
bin7me has quit [Quit: Leaving]
brianpWins has quit [Quit: brianpWins]
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
enebo has quit [Quit: enebo]
yeltzooo4 is now known as yeltzooo
simoz1111115 has joined #ruby-lang
simoz1111116 has joined #ruby-lang
havenwood has quit []
simoz1111115 has quit [Ping timeout: 245 seconds]
Miphix has quit [Quit: Leaving]
woollyams has joined #ruby-lang
|jemc| has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: ciao.]
jeffs has quit [Ping timeout: 255 seconds]
dik_dak has quit [Quit: Leaving]
weems|mac has joined #ruby-lang
surrounder has quit [Ping timeout: 272 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
snoopybbt has joined #ruby-lang
knu has joined #ruby-lang
chouhoulis has quit [Ping timeout: 248 seconds]
sepp2k has quit [Read error: Connection reset by peer]
lolmaus has quit [Ping timeout: 240 seconds]
weems|mac has quit [Quit: weems|mac]
AndrewDryga has joined #ruby-lang
<AndrewDryga> Hi guys
<AndrewDryga> Can someone help me? Im trying to fix compass bug that is blocking my work
|jemc| has joined #ruby-lang
<AndrewDryga> And i'm not ruby programmer, but i've found solution, just need someone who know how to overload methods :D
mykoweb has joined #ruby-lang
dik_dak has joined #ruby-lang
surrounder has joined #ruby-lang