apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
jrhe has quit [Quit: jrhe]
einarj has quit [Ping timeout: 272 seconds]
bradhe has quit [Ping timeout: 272 seconds]
<csffsc> so the goal here is once I find the sums that made the cutoff, I then return the integer pairs
<csffsc> so should I be creating a hash?
<csffsc> instead of a new array?
nari has quit [Ping timeout: 248 seconds]
raphaelivan has quit [Quit: Leaving.]
ce_afk is now known as cescalante
kil0byte has quit [Ping timeout: 240 seconds]
alexju has joined #ruby
<apeiros> in that case, select/keep_if without mapping
x1337807x has joined #ruby
<havenwood> apeiros: meh, benchmarks not impressive - slight variations between select, select!, and keep_if
<apeiros> mentarbation then :)
<havenwood> :)
<apeiros> grah
<apeiros> what's the default mark function in ruby? (C)
<csffsc> by removing the map, I'm unable to get the sum of those internal arrays ?
kofno has joined #ruby
<apeiros> csffsc: well, which one do you want now - the sum or the pairs?
DonRichie has quit [Read error: Operation timed out]
DonRichie has joined #ruby
<csffsc> both.
<csffsc> I am trying to do the following: given a random array of integers from 2-11
raul782 has quit [Remote host closed the connection]
benwoody has joined #ruby
<csffsc> find the highest number <= 21
benwoody has quit [Client Quit]
<csffsc> then secondarily, if there are two 21's, or two 20's
<csffsc> the one that matches with the least values wins
<csffsc> ... I'm trying to produce an algorithm that finds the best hand in blackjack given an array of cards
pirelenito has quit [Ping timeout: 272 seconds]
<csffsc> I've been working on 2-11, neglecting the ace problem, as well as the j/q/k for now
<havenwood> >> Hash[[7, 7, 7, 10, 11].combination(2).map { |x, y| [[x, y], x + y] }.keep_if { |_, sum| sum < 22 }]
<eval-in> havenwood => {[7, 7]=>14, [7, 10]=>17, [7, 11]=>18, [10, 11]=>21} (https://eval.in/55882)
jb41 has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
<csffsc> thats a big improvement, however when I change to combination(3)
<csffsc> the results => {[7, 7]=>14, [7, 10]=>17}
<csffsc> when it should be {[7,7,7]=>21}
Giorgio has quit [Ping timeout: 248 seconds]
pwh has joined #ruby
<csffsc> I think instead of x + y
<csffsc> it needs to be a sum(:+) ?
<csffsc> or inject(:+) was it?
<havenwood> >> Hash[[7, 7, 7, 10, 11].combination(3).map { |cards| [[cards], cards.inject(:+)] }.keep_if { |_, sum| sum < 22 }].sort_by { |_, v| v }
<eval-in> havenwood => [[[[7, 7, 7]], 21]] (https://eval.in/55883)
cescalante is now known as ce_afk
<havenwood> err, well i did an extra array in there
<havenwood> for no reason
maz-dev has joined #ruby
<havenwood> but ^ yeah, inject
<csffsc> was that due to the [[cards] part?
<havenwood> yup, no the []'s around cards i just forgot to remove
astrobunny has quit [Ping timeout: 248 seconds]
forced_request has quit [Remote host closed the connection]
bradhe has joined #ruby
<csffsc> I think it's somthing else
<csffsc> Hash[[7, 7, 7, 10, 11].combination(3).map { |cards| [cards, cards.inject(:+)] }.keep_if { |_, sum| sum < 22 }].sort_by { |_, v| v }
<csffsc> >> Hash[[7, 7, 7, 10, 11].combination(3).map { |cards| [cards, cards.inject(:+)] }.keep_if { |_, sum| sum < 22 }].sort_by { |_, v| v }
<eval-in> csffsc => [[[7, 7, 7], 21]] (https://eval.in/55884)
alexju has quit [Ping timeout: 240 seconds]
roolebo has quit [Ping timeout: 272 seconds]
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
alexju has joined #ruby
<havenwood> here, last one and i gotta go grab a beer and bit to eat!:
<havenwood> >> Hash[[7, 7, 7, 5, 8, 10, 11].combination(3).map { |cards| [cards.inject(:+), cards] }.keep_if { |sum, _| sum < 22 }.sort.reverse]
<eval-in> havenwood => {21=>[7, 7, 7], 20=>[7, 5, 8], 19=>[7, 7, 5]} (https://eval.in/55885)
Fezzler has quit [Quit: Leaving]
<csffsc> thanks.. its amazing you are able to write this stuff out to fast
<apeiros> ok, so default mark function is rb_gc_mark it seems.
<apeiros> now, can this be done shorter? `ID2SYM(rb_intern("foo"))`
astrobunny has joined #ruby
saarinen has joined #ruby
alexju_ has joined #ruby
alexju has quit [Ping timeout: 248 seconds]
havenwood has quit [Remote host closed the connection]
<apeiros> I guess I could define my own macro, e.g. CSTR2SYM
<apeiros> anyway, time to sleep. gn8
whowantstolivefo has quit [Ping timeout: 240 seconds]
saarinen has quit [Ping timeout: 265 seconds]
orien has quit [Quit: Computer has gone to sleep.]
Xaitec has joined #ruby
lukec has quit [Quit: lukec]
orien has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
flailed81 has joined #ruby
amacgregor has joined #ruby
amacgregor_ has joined #ruby
aspires has joined #ruby
amacgregor__ has quit [Ping timeout: 256 seconds]
<Rylee> Does Ruby have decorators like Python?
dayepa has quit [Quit: dayepa]
amacgregor has quit [Ping timeout: 256 seconds]
Xaitec has quit [Remote host closed the connection]
Mars` has joined #ruby
kcin has quit [Quit: Bye]
<|jemc|> Rylee: not really in the same way
SteveBenner09 has joined #ruby
SteveBenner09 has quit [Remote host closed the connection]
<|jemc|> you can use other patterns to accomplish the same kinds of things, though
SteveBenner09 has joined #ruby
idiocrash has joined #ruby
bradhe has quit [Remote host closed the connection]
<|jemc|> also, changes in 2.1 have made a python-like decorator pattern possible
vlad_starkov has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
<|jemc|> but 2.1 hasn't been officially released yet, and it may be a while before the decorator pattern catches on, if it does at all
bradhe has joined #ruby
ShellFu is now known as ShellFu_brb
sailias has joined #ruby
<Rylee> really now?
sailias has quit [Read error: Connection reset by peer]
<|jemc|> really to which part?
<Rylee> what does the 2.1 decorator pattern look like?
|PiP| has joined #ruby
Mars` has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Ping timeout: 248 seconds]
deens has joined #ruby
<|jemc|> so, method defs in 2.1 return a symbol
bradhe has quit [Ping timeout: 248 seconds]
<|jemc|> [1] pry(main)> def foo; end
<|jemc|> => :foo
rgbdev has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
<|jemc|> which means that a method can take that symbol as an argument by prepending the method name before 'def'
diegoviola has quit [Ping timeout: 272 seconds]
<|jemc|> [2] pry(main)> def bar(arg); method(arg); end
<|jemc|> => :bar
<|jemc|> [3] pry(main)> bar def foo; end
<|jemc|> => #<Method: Object#foo>
<|jemc|> so, the bar method can then access the foo method object
amacgregor_ has quit [Read error: Connection reset by peer]
<|jemc|> and redefine it with a new version that decorates the old one in some way
codeFiend has quit [Quit: codeFiend]
amacgregor_ has joined #ruby
amacgregor_ has quit [Read error: Connection reset by peer]
<|jemc|> I made a simple gem called threadlock that wraps methods in a reentrant lock (Monitor)
mercwithamouth has joined #ruby
amacgregor_ has joined #ruby
<Rylee> hmm, okay
<Rylee> thanks |jemc|
Heero has joined #ruby
<|jemc|> the fact that it can take a symbol or series of symbols as input means you can still use it in older versions of ruby
<Rylee> i'll look into this more
<|jemc|> threadlock :foo
<|jemc|> with an already defined foo
<|jemc|> but in 2.1, you can do that or you can do threadlock def foo; end
kobain has joined #ruby
<|jemc|> have fun though
havenwood has joined #ruby
<|jemc|> it's an interesting pattern, but not widely used (yet)
ShellFu_brb is now known as ShellFu
deens has quit [Remote host closed the connection]
destructure has quit [Ping timeout: 240 seconds]
destructure has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
diegoviola has joined #ruby
m8 has quit [Quit: Sto andando via]
Evixion has joined #ruby
drumsrgr8forn8 has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
drumsrgr8forn8 has quit [Remote host closed the connection]
aspires has joined #ruby
deens has joined #ruby
bradhe has joined #ruby
|jemc| has quit [Quit: WeeChat 0.4.1]
eka has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
drumsrgr8forn8 has joined #ruby
astrobunny has quit [Ping timeout: 248 seconds]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
mrsolo_ has quit [Quit: This computer has gone to sleep]
deens has quit [Remote host closed the connection]
nisstyre has joined #ruby
astrobunny has joined #ruby
bradhe has quit [Remote host closed the connection]
deens_ has joined #ruby
bradhe has joined #ruby
|jemc| has joined #ruby
fuhgeddaboudit has quit [Remote host closed the connection]
sam113101_afk is now known as sam113101
dhruvasagar has joined #ruby
mary5030 has joined #ruby
SteveBenner09 has quit [Remote host closed the connection]
SteveBenner09 has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
threesome has quit [Ping timeout: 272 seconds]
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Aryasam_ has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
Aryasam_ has quit [Read error: Connection reset by peer]
SteveBen_ has joined #ruby
SteveBenner09 has quit [Ping timeout: 245 seconds]
Aryasam has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
havenwood has quit [Remote host closed the connection]
aspires has quit [Quit: sudo making a sandwich]
rgbdev has quit [Quit: rgbdev]
Aryasam has quit [Ping timeout: 256 seconds]
Jetchisel has joined #ruby
Aryasam has joined #ruby
Giorgio has joined #ruby
aspires has joined #ruby
SteveBen_ has quit [Ping timeout: 248 seconds]
Seventoes has quit [Ping timeout: 248 seconds]
Seventoes has joined #ruby
Aryasam has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 272 seconds]
SteveBenner09 has joined #ruby
nari has joined #ruby
osvico has joined #ruby
ChronocityLC has joined #ruby
gverri has joined #ruby
havenwood has joined #ruby
blandflakes has quit [Remote host closed the connection]
aspires has quit [Quit: sudo making a sandwich]
senaxfz has quit [Quit: gotta go.]
SteveBenner09 has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 245 seconds]
Heero has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
Faris_ has quit [Quit: Lost terminal]
deens_ has quit [Remote host closed the connection]
deens has joined #ruby
astrobunny has quit [Ping timeout: 248 seconds]
justsee has joined #ruby
aspires has quit [Client Quit]
zzz_taion809 is now known as taion809
aspires has joined #ruby
deens has quit [Remote host closed the connection]
Imaginativeone has joined #ruby
astrobunny has joined #ruby
<Imaginativeone> how do I update from ruby 1.8.7 to 1.9.3 on a macbook? (Darwin)
<csffsc> probably easiest to start using rvm
aspires has quit [Client Quit]
<havenwood> Imaginativeone: rvm, chruby and ruby-install, or update to Mavericks for 2.0.0-p247
drumsrgr8forn8 has quit [Remote host closed the connection]
alexju_ has quit [Remote host closed the connection]
<Imaginativeone> lol
<havenwood> Imaginativeone: Might as well go to latest stable 2.0.0-p274 while you're updating.
<Imaginativeone> I have no idea what you just wrote
alexju has joined #ruby
Lewix has joined #ruby
<Imaginativeone> trying to work with Sencha
<Imaginativeone> which requires 1.9.3
<Imaginativeone> having trouble installing dvm as well
<csffsc> read rvm.io, you'll quickly run into problems keeping all of your gems in a global directory
<havenwood> Imaginativeone: Then install and manage 1.9.3 with RVM. Or install 1.9.3 with ruby-install and manage it with chruby.
<csffsc> and if you need different versions of ruby..
radic has joined #ruby
<havenwood> Imaginativeone: brew install ruby-install chruby; ruby-install ruby 1.9.3; and set your conf files if you wanna go the chruby route
<Imaginativeone> sorry havenwood
<Imaginativeone> what is "brew"?
<csffsc> open up a terminal
<csffsc> and type brew
<Imaginativeone> open
<csffsc> what happens..
<havenwood> Imaginativeone: RVM is ~20,000 lines of shell and chruby is ~90 lines of shell. So obviously RVM does more, but chruby is easy and simple.
<havenwood> Imaginativeone: http://brew.sh/
<Imaginativeone> got a cursor
<havenwood> Imaginativeone: try `brew` like csffsc suggests
<Imaginativeone> ~ Imaginativeone$
alexju has quit [Ping timeout: 272 seconds]
<Imaginativeone> command not found
<havenwood> Imaginativeone: Then you don't have Homebrew installed. That would be a good place to start. :)
<csffsc> type ruby -v
<Imaginativeone> done
radic_ has quit [Ping timeout: 248 seconds]
<csffsc> you probably have the default ruby package from osx..
justsee has quit [Ping timeout: 256 seconds]
<Imaginativeone> yes
<Imaginativeone> 1.8.7
_dma has joined #ruby
<havenwood> Imaginativeone: Do you have latest XCode installed?
<Imaginativeone> ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
aspires has joined #ruby
<Imaginativeone> yes
<Imaginativeone> xcode
<csffsc> if you goto a terminal
<csffsc> and paste this
<csffsc> \curl -L https://get.rvm.io | bash -s stable --ruby
<csffsc> you will get the latest copy of rvm, and it will install the latest copy of ruby with it
<havenwood> csffsc: he wants 1.9 though
robert_ has quit [Read error: Connection reset by peer]
<havenwood> csffsc: stable should be 2.0
<havenwood> oh, is that rvm stable?
<csffsc> \curl -L https://get.rvm.io | bash -s stable --1.9.3
<csffsc> ?
<havenwood> nvm
drumsrgr8forn8 has joined #ruby
<Imaginativeone> something happened
<Imaginativeone> but still at 1.8.7
<csffsc> okay
<csffsc> type rvm list
bradhe has joined #ruby
amacgregor_ has quit [Ping timeout: 256 seconds]
<Imaginativeone> rvm: command not found
mary5030 has quit [Remote host closed the connection]
Stygia has quit [Quit: Leaving]
robert_ has joined #ruby
mary5030 has joined #ruby
|PiP| has quit [Ping timeout: 265 seconds]
aspires has quit [Quit: sudo making a sandwich]
sam113101 is now known as sam113101_afk
segv has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
aspires has joined #ruby
bradhe has joined #ruby
orien has quit [Quit: Computer has gone to sleep.]
mary5030 has quit [Ping timeout: 272 seconds]
T__T has quit [Remote host closed the connection]
zz_tsykoduk is now known as tsykoduk
mrsolo_ has joined #ruby
Mars` has joined #ruby
wallerdev has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
astrobunny has joined #ruby
sepp2k1 has quit [Quit: Leaving.]
IcyDragon has quit [Quit: Space~~~]
eka has quit [Quit: Computer has gone to sleep.]
sam113101_afk is now known as sam113101
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tsykoduk is now known as zz_tsykoduk
zz_tsykoduk is now known as tsykoduk
tsykoduk is now known as zz_tsykoduk
Heero has joined #ruby
Heero has joined #ruby
Heero has quit [Changing host]
<csffsc> havenwood: just noticed there is a bug inside the collection I believe
mrsolo_ has quit [Quit: This computer has gone to sleep]
<csffsc> hand = [7,7,7,8,8,5]
<csffsc> def define_cards(hand, cards)
<csffsc> Hash[hand.combination(cards).map { |cards| [cards.inject(:+), cards] }.keep_if { |sum, _| sum < 22 }.sort.reverse]
<csffsc> end
<csffsc> puts define_cards(hand, 3)
<csffsc> and that resolves to {21=>[7, 7, 7], 20=>[7, 8, 5], 19=>[7, 7, 5]}
<csffsc> when, 21 should equal, 7, 7, 7 and 8, 8, 5
<csffsc> it's isolated to '.keep_if { |sum, _| sum < 22 }.sort.reverse'
alexju has joined #ruby
Mars` has quit [Remote host closed the connection]
zz_tsykoduk is now known as tsykoduk
<csffsc> okay.. the bug is that upon using an integer - it can't be used again
<havenwood> csffsc: oops, yeah that is my mistake - you can't have the key be the sum, or the last combo will overwrite the others
mobileblue has quit [Ping timeout: 248 seconds]
<havenwood> >> Hash[hand.combination(cards).map { |cards| [cards, cards.inject(:+)] }.keep_if { |_, sum| sum < 22 }.sort_by { |_, v| v }.reverse]
<eval-in> havenwood => undefined local variable or method `hand' for main:Object (NameError) ... (https://eval.in/55902)
roflpox has joined #ruby
<havenwood> csffsc: well, i don't wanna paste spam, but that ^
<havenwood> brb
mobileblue has joined #ruby
Heero` has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
alexju has quit [Remote host closed the connection]
mrsolo_ has joined #ruby
<roflpox> this recursion problem is killing me
alexju has joined #ruby
tndrbt has joined #ruby
<csffsc> havenwood: thanks, much better! what exactly is the point of the underbar _ inside the |k v| statements?
fschuindt has joined #ruby
<havenwood> csffsc: a convention if you're not going to use a variable to name it _
<havenwood> csffsc: then linters etc don't complain you've defined a var that isn't used
<havenwood> csffsc: also improves readability for those familiar with the convention
<csffsc> havenwood: ah.. linters?
Heero has quit [Ping timeout: 265 seconds]
<havenwood> csffsc: well, if you run ruby with -w it will complain, or linters, which are code analysis tools
<havenwood> like flay, flog, ruby-lint
roflpox has quit [Quit: Leaving]
Jetchisel has joined #ruby
s3itz has joined #ruby
hogeo has joined #ruby
<volty> Tractatus By Cardinal Of Cards
<volty> .......
alexju has quit [Ping timeout: 245 seconds]
<havenwood> csffsc: The -w flag from manpage: Enables verbose mode without printing version message at the beginning. It sets the $VERBOSE variable to true.
aspires has quit [Quit: sudo making a sandwich]
alexju has joined #ruby
<csffsc> ok cool
felixjet__ has joined #ruby
aspires has joined #ruby
x1337807x has joined #ruby
nfk has quit [Ping timeout: 272 seconds]
<havenwood> csffsc: mostly just to signal to code readers that you don't mean to use it
<havenwood> so they don't go searching for where you do
felixjet_ has quit [Ping timeout: 248 seconds]
ZhBPi has joined #ruby
<volty> if the receiver has the right slot
bradhe has quit [Remote host closed the connection]
Mars` has joined #ruby
bradhe has joined #ruby
<volty> if not he will have to come to consult with experts
<volty> that will tell him that it is a 'convention'
<csffsc> first time I've seen that, but it's good to know about
alexju_ has joined #ruby
<volty> would be much better to have the possibility to just drop a parametere
<volty> and I hope they will do it (one day)
alexju has quit [Read error: Connection reset by peer]
<volty> did you make a gem out of all this mapping and summing of cards?
mrsolo_ has quit [Quit: This computer has gone to sleep]
bradhe has quit [Ping timeout: 272 seconds]
alexju has joined #ruby
alexju_ has quit [Read error: Connection reset by peer]
<csffsc> me?
<csffsc> .. stupid question, dont know who else is wasting their time on this
<csffsc> I'm still working on it :p
<volty> all of you, both of you :)
<volty> or maybe it was just a teaching session
aspires has quit [Quit: sudo making a sandwich]
<csffsc> I have two 'issues' to solve prior to this being finished
<csffsc> A) combing thru the final hash, and removing the 'keys' with the highest value
<csffsc> B) accounting for Jack Queen King Ace
aspires has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradhe has joined #ruby
<csffsc> J Q K are all worth 10, and don't have a pecking order, but if only a queen is used, then a queen has to be returned, not a 10
<volty> what is your goal? learn ruby?
<havenwood> csffsc: You should check out my deck-of-cards gem. :P https://github.com/havenwood/deck-of-cards#readme
<csffsc> yeah I'm learning ruby
nonamehero has quit [Ping timeout: 240 seconds]
<csffsc> I put too much work into rails/sinatra stuff and realized I was too hindered by not understanding ruby syntax
x1337807x has joined #ruby
<havenwood> csffsc: for sure, awesome to become fluent!!
tndrbt has quit [Quit: Leaving]
<csffsc> havenwood: looking at your gem, it's more of a deck shuffling &/or compare card value between players
<csffsc> unless I"m missing where you account for the ace
<havenwood> csffsc: indeed, but you could grab the deck creation and comparison code
<csffsc> from what I've read most people consider ace to be 11, until you get a bust.. then you drop down to a 1
aapzak has quit [Ping timeout: 256 seconds]
<csffsc> however if there are two+ aces
<csffsc> then it gets weird
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
<havenwood> %w[Hearts Spades Diamonds Clubs].product([*2..10, 'Jack', 'Queen', 'King', 'Ace'])
hogeo has quit [Remote host closed the connection]
<havenwood> csffsc: though do you care about suit, you don't right?
<csffsc> at the point, no
tsykoduk is now known as zz_tsykoduk
aapzak has joined #ruby
<csffsc> also blackjack is generally played with 5 or 6 shuffled decks?
<csffsc> so there are more than 4 cards per type in play
<csffsc> not that your code couldnt be easily adapted to thta
alexju has quit [Read error: Connection reset by peer]
<havenwood> csffsc: yeah, the gem itself isn't useful, meant to just be example not used
nari has quit [Ping timeout: 256 seconds]
nonamehero has joined #ruby
<havenwood> csffsc: yeah, not much useable now that i look at it - just made me think of it
deens has joined #ruby
<csffsc> havenwood: yeah I'm not sure how giving royalty values not equal to their facevalue would help..
<havenwood> csffsc: yeah, interesting question of how to elegantly handle the ace
<csffsc> havenwood: I was thinking of creating an array that keeps track of royalty that's added to the hand
<csffsc> since all that matters with royality is 'a' card in play was returned
<havenwood> csffsc: should make a simulation and try genetic algorithm
<csffsc> I found a few discussions on stack for that
<havenwood> nice
<csffsc> I'm sure a casino has those people on file somewhere.. haha
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
deens has quit [Ping timeout: 240 seconds]
alexju has joined #ruby
Monie has joined #ruby
mrsolo_ has joined #ruby
yacks has joined #ruby
deepender has joined #ruby
beilabs has quit [Ping timeout: 272 seconds]
Es0teric has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
cloaked1 has joined #ruby
astrobunny has quit [Ping timeout: 248 seconds]
Hganavak has joined #ruby
<cloaked1> anyone ever used ruby's socket's ioctl for grabbing the BSSID for a wifi network? It seems to differ from getting the ESSID.
Jetchisel has joined #ruby
julweber has joined #ruby
astrobunny has joined #ruby
ssvo has joined #ruby
sam113101 is now known as sam113101_afk
beilabs has joined #ruby
orien has joined #ruby
nisstyre has quit [Quit: Leaving]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
fschuindt has quit [Quit: Computer has gone to sleep.]
deens has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
bradhe has quit [Ping timeout: 245 seconds]
<volty> sorry havenwood but I find that way of assigning values to cards too much 'manual'
frustrum has joined #ruby
<havenwood> volty: automagical cards ftw?
sambao21 has quit [Quit: Computer has gone to sleep.]
<volty> i would go with an array since the values vary from game to game
<havenwood> volty: yeah, a more flexible value system makes sense
<havenwood> i forget texas hold'em ain't the only game in town
nari has joined #ruby
<volty> a good exercise developing a good modular design -- even for experts in programming , relaxing too
aspires has joined #ruby
<volty> (i'm about cards)
<havenwood> volty: yeah, go and chess are fun - cards too
<volty> (specifically)
hogeo has joined #ruby
<havenwood> volty: could do some neat stuff with bridge methinks
bradhe has joined #ruby
<havenwood> MODEL ALL THE THINGS \o/
flailed81 has quit [Quit: flailed81]
<havenwood> volty: true, cards make you pick a level of abstraction, how complex you're going to contemplate
<volty> yap, do not waste your talent on becoming express expert on mappings :)
ace_striker has joined #ruby
<volty> yes, and developing a good model, that can serve as a base for all the possible games ...
<havenwood> things get so complex though
gverri has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> nicer to just have only what you need sometimes
dhruvasagar has joined #ruby
cloaked1 has quit [Ping timeout: 250 seconds]
<havenwood> complect not lest ye be complected
<volty> Cards (modular - more types of them), Pile, Table (what's on table, Hands (what is in hands)
<havenwood> mm, yeah - if you focused on the basics a modular system should be designable, easily complected though, abstractions compound
<volty> my approach is // simple object, just the class full of arrays and only after going ahead with methods
<havenwood> volty: good excersise!
<havenwood> volty: simple data structures ftw
<volty> go just a bit from top, and then a bit from bottom
<volty> meet halfway
beilabs has quit [Ping timeout: 265 seconds]
<volty> gn
volty has quit [Quit: Konversation terminated!]
<havenwood> g'night and g'weekend
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
T__T has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
shevy has quit [Read error: Operation timed out]
Mars` has quit [Ping timeout: 248 seconds]
bradhe has quit [Remote host closed the connection]
Soda has quit [Remote host closed the connection]
bradhe has joined #ruby
sdouglas has joined #ruby
saarinen has joined #ruby
ssvo has quit [Ping timeout: 248 seconds]
astrobunny has quit [Ping timeout: 248 seconds]
ewnd9 has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
beilabs has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
csffsc_ has joined #ruby
csffsc has quit [Ping timeout: 245 seconds]
saarinen has quit [Ping timeout: 272 seconds]
Lewix has quit [Remote host closed the connection]
astrobunny has joined #ruby
Lewix has joined #ruby
<csffsc_> I currently have a non-traditional hash.. formatted like such
<csffsc_> {"2"=>{[8, 8]=>16, [7, 8]=>15, [7, 7]=>14, [8, 5]=>13, [7, 5]=>12}, "3"=>{[8, 8, 5]=>21, [7, 7, 7]=>21, [7, 8, 5]=>20, [7, 7, 5]=>19}}
<epochwolf> okay
n_blownapart has joined #ruby
<csffsc_> keys["2" and "3"] are important
n_blownapart is now known as crucify_me
<csffsc_> beyond that I need the 'sub-keys' for the maximum value of each
<csffsc_> or just the sub-keys w/ the maximum (which is also pre-sorted to be the first) value
<epochwolf> uh...
<csffsc_> ..
shevy has joined #ruby
<csffsc_> so I would be looking for [8,8]=>16 for key "2", and [8,8,5]=>21 for key "3"
Lewix has quit [Ping timeout: 248 seconds]
<csffsc_> the hash is generated in this predictable format
<epochwolf> csffsc_: I don't really know how to do taht without looping through all values manually. Perhaps I'm too tired.
maz-dev has quit [Ping timeout: 240 seconds]
<csffsc_> I've been playing around in irb for a bit
amacgregor has joined #ruby
<csffsc_> I can flatten it and then look for specific values/keys if know what it is
<csffsc_> but I really just want the 'max' or 'first' for each
dhruvasagar has joined #ruby
zengfb has joined #ruby
BombStrike has quit [Ping timeout: 264 seconds]
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
aspires has joined #ruby
aspires has quit [Client Quit]
sam113101_afk is now known as sam113101
mengu has quit [Ping timeout: 256 seconds]
zengfb has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
kofno has quit [Ping timeout: 265 seconds]
orionstein_away is now known as orionstein
nari has quit [Ping timeout: 248 seconds]
<havenwood> >> Hash[{"2"=>{[8, 8]=>16, [7, 8]=>15, [7, 7]=>14, [8, 5]=>13, [7, 5]=>12}, "3"=>{[8, 8, 5]=>21, [7, 7, 7]=>21, [7, 8, 5]=>20, [7, 7, 5]=>19}}.map { |k, v| [k, v.max] }]
<eval-in> havenwood => {"2"=>[[8, 8], 16], "3"=>[[8, 8, 5], 21]} (https://eval.in/55912)
dhruvasagar has quit [Ping timeout: 240 seconds]
nism-pi has joined #ruby
<havenwood> could massage it a bit more for integer keys and hash values
<_dma> nice one
Mars` has joined #ruby
alexju has quit [Read error: Connection reset by peer]
astrobunny has quit [Ping timeout: 240 seconds]
alexju has joined #ruby
boxmein has joined #ruby
bradhe has joined #ruby
natevick has joined #ruby
crucify_me has quit [Remote host closed the connection]
Aryasam has joined #ruby
orionstein is now known as orionstein_away
<havenwood> >> >> Hash[{"2"=>{[8, 8]=>16, [7, 8]=>15, [7, 7]=>14, [8, 5]=>13, [7, 5]=>12}, "3"=>{[8, 8, 5]=>21, [7, 7, 7]=>21, [7, 8, 5]=>20, [7, 7, 5]=>19}}.map { |k, v| [k, v.max] }].map_pair { |k, v| [k.to_i, Hash[*v]] }
<eval-in> havenwood => /tmp/execpad-c0ffbb1b923b/source-c0ffbb1b923b:2: syntax error, unexpected >> ... (https://eval.in/55915)
<havenwood> >> Hash[{"2"=>{[8, 8]=>16, [7, 8]=>15, [7, 7]=>14, [8, 5]=>13, [7, 5]=>12}, "3"=>{[8, 8, 5]=>21, [7, 7, 7]=>21, [7, 8, 5]=>20, [7, 7, 5]=>19}}.map { |k, v| [k, v.max] }].map_pair { |k, v| [k.to_i, Hash[*v]] }
<eval-in> havenwood => undefined method `map_pair' for {"2"=>[[8, 8], 16], "3"=>[[8, 8, 5], 21]}:Hash (NoMethodError) ... (https://eval.in/55916)
<havenwood> oh dear
natevick has quit [Client Quit]
drumsrgr8forn8 has quit [Remote host closed the connection]
astrobunny has joined #ruby
maz-dev has joined #ruby
<havenwood> >> require 'hashy'; Hash[{"2"=>{[8, 8]=>16, [7, 8]=>15, [7, 7]=>14, [8, 5]=>13, [7, 5]=>12}, "3"=>{[8, 8, 5]=>21, [7, 7, 7]=>21, [7, 8, 5]=>20, [7, 7, 5]=>19}}.map { |k, v| [k, v.max] }].map_pair { |k, v| [k.to_i, Hash[*v]] }
<eval-in> havenwood => (https://eval.in/55917)
<havenwood> csffsc_: ^ that actually works
<csffsc_> ohh not hashy
<havenwood> csffsc_: hashy is just a tad of syntactic sugar, not hashie just poorly named
<csffsc_> ah so it adds ruby 2.0 features.. hmm ok
<csffsc_> could just switch over from 1.93 to 2.0
<havenwood> csffsc_: substitute: class Hash; def map_pair &block; Hash[map &block] end end
<csffsc_> nvm its getting late, its 2.1.0
<havenwood> csffsc_: yeah, 2.1, but not actually in it right now, just proposed
<havenwood> csffsc_: easy enough to work around it
<havenwood> csffsc_: just a convenience
<havenwood> csffsc_: that one line (well 5 lines) does the trick or you can just do it inline and not have the sugar
<havenwood> csffsc_: anyways, g'night!
<csffsc_> so, what would the output of the new hash, using hashy look lke?
<havenwood> => {2=>{[8, 8]=>16}, 3=>{[8, 8, 5]=>21}}
<csffsc_> works for me
<csffsc_> havenwood: thx for all of the help
<havenwood> csffsc_: np
<havenwood> csffsc_: this is the entire code from hashy btw: https://github.com/havenwood/hashy/blob/master/lib/hashy.rb
<csffsc_> havenwood: I'll be on tomorrow.. I'll be sure to let you know when it's a gem
<havenwood> csffsc_: cool, sounds good!
<csffsc_> oh wow, could just add that inline to mine
<havenwood> gemify ALL THE THINGS \o/
<havenwood> csffsc_: yeah, just need the first of the three methods too
Aryasam has quit [Ping timeout: 272 seconds]
Aryasam_ has joined #ruby
Aryasam has joined #ruby
Aryasam_ has quit [Read error: Connection reset by peer]
drumsrgr8forn8 has joined #ruby
boxmein has quit [Ping timeout: 272 seconds]
orien has quit [Quit: Computer has gone to sleep.]
sam113101 is now known as sam113101_afk
Mars` has quit [Remote host closed the connection]
Aryasam has quit [Ping timeout: 248 seconds]
Mars` has joined #ruby
Aryasam has joined #ruby
Aryasam has quit [Client Quit]
Aryasam has joined #ruby
dhruvasagar has joined #ruby
sam113101_afk is now known as sam113101
Mars` has quit [Ping timeout: 272 seconds]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
Aryasam has quit [Ping timeout: 265 seconds]
frustrum has quit [Quit: WeeChat 0.4.1]
frustrum has joined #ruby
_dma has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 240 seconds]
cads has joined #ruby
decoponio has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 245 seconds]
agent_white has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
kazuuu has quit [Remote host closed the connection]
maz-dev has quit [Ping timeout: 240 seconds]
kazuuu has joined #ruby
Heero` has quit [Read error: Connection reset by peer]
alx- has quit [Quit: Leaving...]
Heero` has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
kazuuu has quit [Ping timeout: 272 seconds]
deepender has quit [Quit: Leaving]
Senjai`home has quit [Ping timeout: 248 seconds]
<csffsc_> havenwood: the combination system still has bugs :(
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
Emmanuel_Chanel has joined #ruby
<bricker`LA> Why would FileUtils.mkdir_p be throwing an error "File Exists"? I can't recreate the behavior with mkdir -p
Bry8Star{T2 has joined #ruby
bradhe has joined #ruby
havenwood has quit [Remote host closed the connection]
frustrum has quit [Ping timeout: 272 seconds]
intuxicated has quit [Read error: Connection reset by peer]
mrsolo_ has quit [Quit: This computer has gone to sleep]
rickmasta has quit [Quit: Leaving...]
Aryasam has joined #ruby
mrsolo_ has joined #ruby
kreeves has quit [Ping timeout: 256 seconds]
agent_white has quit [Read error: Connection reset by peer]
csffsc_ has quit [Read error: Connection reset by peer]
csffsc has joined #ruby
bradhe has quit [Remote host closed the connection]
agent_white has joined #ruby
kobain has quit []
banisterfiend has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
rickmasta has joined #ruby
deeveeusjuan has joined #ruby
csffsc has quit [Ping timeout: 256 seconds]
zarubin has joined #ruby
deeveeusjuan has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 248 seconds]
Aryasam has quit [Ping timeout: 248 seconds]
csffsc has joined #ruby
dhruvasagar has quit [Read error: Operation timed out]
havenwood has joined #ruby
amacgregor_ has joined #ruby
deens has quit [Remote host closed the connection]
mrsolo_ has quit [Quit: This computer has gone to sleep]
amacgregor has quit [Ping timeout: 256 seconds]
drumsrgr8forn8 has quit [Remote host closed the connection]
ace_striker has quit [Ping timeout: 250 seconds]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
Mars` has joined #ruby
frustrum has joined #ruby
frustrum has quit [Client Quit]
frustrum has joined #ruby
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
orien has joined #ruby
agent_white has joined #ruby
zz_tsykoduk is now known as tsykoduk
kazuuu has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
sdouglas has quit [Quit: sdouglas]
amacgregor_ has quit [Ping timeout: 248 seconds]
dangerousdave has joined #ruby
orien has quit [Quit: Computer has gone to sleep.]
simoz has joined #ruby
Sarkanyolo has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
tsykoduk is now known as zz_tsykoduk
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has quit [Ping timeout: 245 seconds]
aspires has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
agent_white has joined #ruby
Sarkanyolo has quit [Quit: Leaving]
postmodern has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
postmodern has joined #ruby
Sarkanyolo has joined #ruby
Giorgio has quit [Read error: Operation timed out]
Sarkanyolo has quit [Client Quit]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
<Mon_Ouie> bricker`LA: Maybe a part of the path you entered is a regular file, as opposed to a directory?
<Mon_Ouie> touch foo; mkdir -p foo/bar
Sarkanyolo has joined #ruby
Sarkanyolo has quit [Client Quit]
Sarkanyolo has joined #ruby
Sarkanyolo has quit [Client Quit]
Sarkanyolo has joined #ruby
mrsolo_ has joined #ruby
Sarkanyolo has quit [Client Quit]
WillAmes has quit [Remote host closed the connection]
WillAmes has joined #ruby
Sarkanyolo has joined #ruby
Sarkanyolo has quit [Client Quit]
Sarkanyolo has joined #ruby
zarubin has quit [Ping timeout: 265 seconds]
bradhe has joined #ruby
dash_ has joined #ruby
pleal has joined #ruby
jhaals has joined #ruby
mary5030 has joined #ruby
mrsolo_ has quit [Quit: This computer has gone to sleep]
bradhe has quit [Ping timeout: 272 seconds]
tomzx_mac has quit [Ping timeout: 240 seconds]
pleal has quit [Ping timeout: 245 seconds]
flops has joined #ruby
Lewix has joined #ruby
Davey has joined #ruby
gen0cide_ has quit [Ping timeout: 248 seconds]
cephalopod has joined #ruby
mrsolo_ has joined #ruby
rahulkmr has joined #ruby
gen0cide_ has joined #ruby
Astralum has joined #ruby
mary5030 has quit [Remote host closed the connection]
T__T has quit [Remote host closed the connection]
mary5030 has joined #ruby
stayarrr has joined #ruby
simoz has quit [Ping timeout: 240 seconds]
SilverKey has quit [Quit: Sleep now]
mary5030 has quit [Ping timeout: 272 seconds]
sayan has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
havenwood has quit [Remote host closed the connection]
drumsrgr8forn8 has joined #ruby
mrsolo_ has quit [Quit: Leaving]
mrsolo_ has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sarkanyolo has quit [Quit: Leaving]
drumsrgr8forn8 has quit [Ping timeout: 248 seconds]
lxsameer has joined #ruby
<lxsameer> hi, with autoload deprecation what solution do we have?
kazuuu has quit [Remote host closed the connection]
kazuuu has joined #ruby
kazuuu has quit [Ping timeout: 272 seconds]
intuxicated has joined #ruby
mrsolo_ has quit [Quit: This computer has gone to sleep]
sevenseacat has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
Mars` has joined #ruby
SilverKey has joined #ruby
zigomir has joined #ruby
michael_mbp is now known as zz_michael_mbp
Mars` has quit [Ping timeout: 245 seconds]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
cephalopod has quit [Ping timeout: 272 seconds]
lsmola has joined #ruby
julweber has quit [Remote host closed the connection]
julweber has joined #ruby
athst has joined #ruby
user258467 has joined #ruby
julweber has quit [Ping timeout: 272 seconds]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
Macaveli has joined #ruby
bradhe has joined #ruby
tobyo has quit [Ping timeout: 272 seconds]
agustinvinao has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 272 seconds]
roolebo has joined #ruby
obs has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
beilabs has quit [Ping timeout: 272 seconds]
jalcine is now known as jalcine_
user258467 is now known as user258467|away
Mars` has joined #ruby
postmodern has quit [Quit: Leaving]
Guest is now known as maZtah
maZtah is now known as Guest
Guest is now known as maZtah
justsee has joined #ruby
user258467|away has quit [Quit: Leaving...]
Macaveli has quit [Quit: Computer has gone to sleep.]
julweber has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
gmas has quit [Ping timeout: 272 seconds]
beilabs has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
julweber has quit [Ping timeout: 272 seconds]
agent_white has joined #ruby
patjoh has joined #ruby
amacgregor has joined #ruby
Macaveli has joined #ruby
wildroman has joined #ruby
Boohbah has quit [Ping timeout: 240 seconds]
Macaveli has quit [Remote host closed the connection]
monkegjinni has joined #ruby
rippa has joined #ruby
Davey has joined #ruby
ShellFu has quit [Read error: Connection reset by peer]
Boohbah has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mars` has quit [Ping timeout: 265 seconds]
Macaveli has joined #ruby
Macaveli has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 272 seconds]
agent_white has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
agent_white has joined #ruby
apeiros has joined #ruby
colonolGron has joined #ruby
gja has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Xiti has quit [Read error: Connection reset by peer]
crus` has joined #ruby
user258467 has joined #ruby
<xybre> What is this string syntax all about? `"#$!"` is it doing some type of interpolation?
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
heftig has quit [Read error: Connection reset by peer]
<Mon_Ouie> Yes, it's a shortcut for #{$!}
heftig has joined #ruby
<Mon_Ouie> You can also interpolate instance and class variables with that syntax: #@foo or #@@foo
kraljev2 has joined #ruby
kraljev2 has quit [Client Quit]
kraljev2 has joined #ruby
Mars` has joined #ruby
crus has quit [Ping timeout: 260 seconds]
jrhe has joined #ruby
Bry8Star{T2 has joined #ruby
<xybre> Wow, man, I had no idea. I've never seen that syntax used before today.
Sp4rKy has quit [Ping timeout: 272 seconds]
Xiti has joined #ruby
<kraljev2> Hello guys, I've got an error
<kraljev2> ArgumentError: wrong number of arguments (1 for 0)
<kraljev2> /home/rok/.gem/ruby/2.0.0/gems/rubko-0.1/lib/rubko/base.rb:37:in `initialize'
<kraljev2> /home/rok/.gem/ruby/2.0.0/gems/rubko-0.1/lib/rubko/base.rb:37:in `new'
<kraljev2> it just tells me where the function call is
<kraljev2> but I want to know there the function definition is
mr`spock has joined #ruby
zarubin has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
<kraljev2> Where is the function initialize that accepts no parameters?
<Mon_Ouie> Line 37 according to the backtrace you just gave
<kraljev2> no, there is only the call
<Mon_Ouie> Can we see the code then?
<kraljev2> Kernel.const_get(camelize [*[*name].reverse, what]).
<kraljev2> new(self).tap { |x| x.init(*args) }
<kraljev2> first line is 36, second 37
<Mon_Ouie> Alternatively you don't get a line in the backtrace if the method was defined in C
mr`spock has quit [Quit: Leaving]
<xybre> kraljev2: p object.method(:method_i_want_to_find) will tell you what object its defined on.
<kraljev2> Amm, but that doesn't do inheritance
<kraljev2> I have already tried it, but I get null
<Mon_Ouie> What do you mean, "doesn't do inheritance"?
<xybre> "doesn't do inheritance"??
<kraljev2> if initialize is defined in parent class
<kraljev2> .method is going to return null
<Mon_Ouie> No it isn't
claymore has joined #ruby
<xybre> Yes it does. What it might not do is C functions or something conjured up from the unholy depths of metaprogramming.
<kraljev2> or am I wroing?
boxmein has joined #ruby
<xybre> Try using pry?
jrhe has quit [Quit: jrhe]
<Mon_Ouie> >> Class.new(Object).new.method(:initialize)
<eval-in> Mon_Ouie => #<Method: #<Class:0x40ba1298>(BasicObject)#initialize> (https://eval.in/55920)
user258467 has quit [Quit: Leaving...]
<Mon_Ouie> Oh, actually there's a simpler example
<Mon_Ouie> >> Object.new.method(:initialize)
<eval-in> Mon_Ouie => #<Method: Object(BasicObject)#initialize> (https://eval.in/55921)
<xybre> kraljev2: http://pryrepl.org/
<xybre> It has tools to help find where methods were defined. It can at least tell you if its a C function. If you have pry-doc installed it can even show you info about them too.
bradhe has joined #ruby
<kraljev2> cool, i'll take a look, thanks
jrhe has joined #ruby
Mars` has quit [Remote host closed the connection]
akemrir has joined #ruby
Mars` has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
devoldmx27 has quit [Remote host closed the connection]
Mars` has quit [Ping timeout: 272 seconds]
bradhe has joined #ruby
elaptics is now known as elaptics`away
ericmathison has quit [Ping timeout: 265 seconds]
kraljev2 has quit [Ping timeout: 272 seconds]
adambeynon has joined #ruby
s3itz has quit [Quit: Textual IRC Client: www.textualapp.com]
vlad_starkov has joined #ruby
b00stfr3ak has quit [Quit: Leaving]
jrhe has quit [Quit: jrhe]
bradhe has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
bradhe has joined #ruby
csffsc has quit [Remote host closed the connection]
csffsc has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
ChronocityLC has quit [Ping timeout: 272 seconds]
agent_white has joined #ruby
osvico has quit [Ping timeout: 272 seconds]
bradhe has quit [Ping timeout: 256 seconds]
csffsc has quit [Ping timeout: 248 seconds]
gja has quit [Quit: This computer has gone to sleep]
Zolo has joined #ruby
relix has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.2]
workmad3 has joined #ruby
zyrex has joined #ruby
carraroj has joined #ruby
alexju has quit [Remote host closed the connection]
obs has quit [Remote host closed the connection]
threesome has joined #ruby
alexju has joined #ruby
monkegji_ has joined #ruby
jrhe has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
monkegjinni has quit [Ping timeout: 248 seconds]
dangerousdave has joined #ruby
alexju has quit [Ping timeout: 248 seconds]
astrobunny has quit [Ping timeout: 240 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
monkegjinni has joined #ruby
astrobunny has joined #ruby
zyrex has quit [Quit: Leaving]
funburn has joined #ruby
monkegji_ has quit [Ping timeout: 272 seconds]
io_syl has quit []
orien has joined #ruby
funburn has quit [Quit: funburn]
monkegji_ has joined #ruby
astrobunny has quit [Ping timeout: 245 seconds]
carraroj has quit [Ping timeout: 272 seconds]
orien has quit [Client Quit]
monkegjinni has quit [Ping timeout: 272 seconds]
carraroj has joined #ruby
sevenseacat has quit [Quit: Leaving.]
bradhe has joined #ruby
astrobunny has joined #ruby
vlad_starkov has joined #ruby
boxmein has quit [Ping timeout: 272 seconds]
carraroj has quit [Ping timeout: 272 seconds]
bradhe has quit [Ping timeout: 272 seconds]
orien has joined #ruby
zerun0_ has quit [Ping timeout: 272 seconds]
Xeago has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
jalcine_ is now known as jalcine
agent_white has joined #ruby
BombStrike has joined #ruby
mklappstuhl has joined #ruby
pedda has joined #ruby
zarubin has quit [Ping timeout: 256 seconds]
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Zirconicus has joined #ruby
orien has quit []
sniffingcats has joined #ruby
orien has joined #ruby
visof has joined #ruby
Zirconicus has quit []
xk_id has quit [Quit:
i_s has joined #ruby
vlad_starkov has joined #ruby
flops has quit [Quit: leaving]
csffsc has joined #ruby
jrhe has quit [Ping timeout: 256 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
soheil has joined #ruby
nism-pi has quit [Ping timeout: 248 seconds]
orien has quit [Quit: Computer has gone to sleep.]
flops has joined #ruby
boxmein has joined #ruby
visof has quit [Ping timeout: 245 seconds]
csffsc has quit [Ping timeout: 248 seconds]
i_s has quit [Ping timeout: 265 seconds]
relix has joined #ruby
monkegji_ has quit [Remote host closed the connection]
|jemc| has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
banisterfiend has joined #ruby
spider-mario has joined #ruby
mengu has joined #ruby
soheil has quit [Ping timeout: 245 seconds]
lkba has quit [Ping timeout: 240 seconds]
monkegjinni has quit [Ping timeout: 248 seconds]
jb41 has joined #ruby
visof has joined #ruby
Hganavak has quit [Read error: Connection reset by peer]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jrhe has joined #ruby
xk_id has joined #ruby
kil0byte has joined #ruby
Guest____ has joined #ruby
Guest____ is now known as Alc
flower-p1t has joined #ruby
flower-p1t has quit [Client Quit]
tjad has joined #ruby
flower-p1t has joined #ruby
flower-p1t has quit [Client Quit]
rjhunter has joined #ruby
flower-p1t has joined #ruby
flower-p1t has quit [Client Quit]
flower-p1t has joined #ruby
pushpak has joined #ruby
nari has joined #ruby
krz has joined #ruby
orionstein_away is now known as orionstein
flower-p1t has quit [Client Quit]
n0b0dy has joined #ruby
kirun has joined #ruby
flower-pot has joined #ruby
<Imaginativeone> how do I upgrade from Ruby 1.8.7 to 1.9.3?
funburn has joined #ruby
<flops> Imaginativeone: on your system or in your software?
<Imaginativeone> The former
<Imaginativeone> Macbook
<flops> rvm use 1.9.3
bradhe has joined #ruby
<apeiros> use rvm, rbenv or any other ruby version managers
julweber has joined #ruby
<apeiros> +of the
<Imaginativeone> I have tried RVM…keeps failing on my system
<flops> Imaginativeone: why?
<Imaginativeone> not sure
<apeiros> #rvm is rather helpful. though you'll have to provide a better description than "keeps failing"
<Imaginativeone> many thanks!!
<Imaginativeone> I'll check out the channel
<apeiros> well, flops here seems to want to help… maybe you give him a chance? :)
<Imaginativeone> that is cool too
ismlages has joined #ruby
<Imaginativeone> I forget, how do I install rvm?
agent_white has quit [Read error: Connection reset by peer]
<Imaginativeone> \curl -L https://get.rvm.io | bash -s stable --1.9.3
zarul has quit [Remote host closed the connection]
<Imaginativeone> that didn't work, do you need the error msg?
<flops> apeiros: :D
Mon_Ouie has quit [Ping timeout: 272 seconds]
<tonni> Hi, how (if possible) can I push to multiple arrays - someting like: a = b = []; a, b << [1, 2]
<apeiros> Imaginativeone: unless you expect people to read your mind or hack into your computer…
flower-pot has quit [Quit: leaving]
<flops> Imaginativeone: what's the error?
<Imaginativeone> ah
<apeiros> tonni: there's no syntax for that.
roolebo has quit [Ping timeout: 272 seconds]
<Imaginativeone> flops: no error
<apeiros> tonni: arys.each do |ary| ary << value end
<Imaginativeone> it just processes for 18 seconds
<Imaginativeone> then stopped
mercwithamouth has joined #ruby
<Imaginativeone> giving me a list of command options
<apeiros> Imaginativeone: show. the. whole. prompt.
<apeiros> paste it to a paste service like gist.github.com
flower-pot has joined #ruby
<Imaginativeone> cool
Astralum has quit [Ping timeout: 264 seconds]
<apeiros> anything else is just riddling and pointing in the dark.
flower-pot has quit [Client Quit]
zz_michael_mbp is now known as michael_mbp
flower-pot has joined #ruby
<tonni> apeiros: ok, thx
orionstein is now known as orionstein_away
bradhe has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
<Xeago> > [] + [1,2,3]
<Xeago> >> [] + [1,2,3]
<eval-in> Xeago => [1, 2, 3] (https://eval.in/55937)
<Xeago> >> a=[]; a+= [1,2,3]
<eval-in> Xeago => [1, 2, 3] (https://eval.in/55938)
<Xeago> that seems to work just fine tonni, apeiros
aryaching has joined #ruby
flower-pot has quit [Quit: leaving]
flower-pot has joined #ruby
Imaginativeone has quit [Read error: Connection reset by peer]
<apeiros> Xeago: as I understood it, he was talking about multiple receivers
nerium has joined #ruby
<Xeago> aah
n0b0dy has left #ruby [#ruby]
lkba has joined #ruby
<nerium> I'm having problem navigating in irb/console
<nerium> For example, for I write `` and move one step back, on tick (`) disappears
<nerium> Why is that?
<Xeago> nerium: probably your shell sends escape codes that aren't what readline thinks they represent
Mon_Ouie has joined #ruby
<Xeago> /s/shell/terminal emulator/
akemrir has joined #ruby
<nerium> Xeago: Okay, any idea how to solve it?
<nerium> I'm running OS X 10.8
Soda has joined #ruby
<flops> nerium: Or your keyboard layout waits for the next input to connect it with the `, ó
<nerium> The problem is the same in iTerm and Terminal
<nerium> flops: It's the same for everyting
<nerium> I can't navigate at all anymore
* apeiros wonders whether he should make fun of how long it seems to take to copy & paste from Terminal.app…
<Xeago> can you navigate on your shell?
ehaliewicz has quit [Ping timeout: 272 seconds]
<nerium> Xeago: What do you mean?
<Xeago> if you open a new window in your terminal emulator, can you move around on that prompt?
<nerium> Yes
<Xeago> what shell do you use?
<nerium> But everything is acting strange if I browse the history
jb41 has left #ruby [#ruby]
<nerium> The problem is the same in both zsh and bash
jb41 has joined #ruby
<Xeago> in zsh: what character/escape sequences do you get when pressing the arrow keys
<Xeago> (press ^V then the key you want to test)
<nerium> ^[[C => right
<nerium> ^[[D => left
monkegjinni has quit [Remote host closed the connection]
<nerium> I also have some problems with up and down arrows
<nerium> I've to press the up/down arrow twice before I can see any history
<Xeago> could you finish the list with up and down arrow (with ^V)?
monkegjinni has joined #ruby
<nerium> ^[ => up
julweber has quit [Remote host closed the connection]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
<nerium> ^[[B => down
<Xeago> just ^[ ?
<Xeago> as a single character?
<nerium> It's a bit random
julweber has joined #ruby
user258467 has joined #ruby
<nerium> I tried it again and got
<nerium> ^[[A
MrZYX|off is now known as MrZYX
<Xeago> it should be ^[[A
<Xeago> where ^[ is a single character
<Xeago> down should be ^[[B
Soda has quit [Ping timeout: 245 seconds]
<nerium> The second time I got ^[[A
<Xeago> could you try opening a new shell without configurations?
<Xeago> zsh -f for example
<Xeago> then open irb, it might not be in your path
<nerium> Xeago: Same problem
<Xeago> you using system rubies?
<Xeago> and if so, which :3
<nerium> No, 2.0.0
<Xeago> oh no, mavericks has 2 rubis, ML doesn't yet
<nerium> I can try the default one
<Xeago> when using zsh -f did you navigate to the custom ruby?
roolebo has joined #ruby
wildroman has quit [Remote host closed the connection]
sniffingcats has quit [Quit: Til rivido Idisti!]
<nerium> Xeago: No, 2.0 was already the default one
wildroman has joined #ruby
<Xeago> wait, what?
<nerium> Xeago: I just tried 1.8.7, it's the same thing
monkegjinni has quit [Ping timeout: 256 seconds]
carraroj has joined #ruby
<Xeago> (you must have exported your path which is a horrible thing to do)
julweber has quit [Ping timeout: 256 seconds]
<Xeago> what keyboard scheme and language input are you in?
<nerium> Xeago: The only thing that was loaded in -f was rvm, otherwise the console was plain
<Xeago> this is getting in the zone of desperation
<Xeago> nerium: don't load rvm >.<
<Xeago> the point of zsh -f is to have nothing loaded
io_syl has joined #ruby
<nerium> I did, it was there by default
<Xeago> that is wrong, horrible wrong
<Xeago> stupid rvm
vlad_sta_ has joined #ruby
<Xeago> :\
<Xeago> apeiros: where does rvm isntall for system wide installs?
vlad_starkov has quit [Ping timeout: 240 seconds]
<apeiros> no idea. I never do system wide rvm
Tuxist has joined #ruby
<nerium> Xeago: Everyting works on my server, so it must be something locally
<nerium> And it looks like it might be rvm's fault
wildroman has quit [Ping timeout: 272 seconds]
<Xeago> figure out why rvm is loaded in bare shells
Jetchisel has joined #ruby
<Xeago> maybe implode it and switch to something less invasive..
maz-dev has joined #ruby
Anderson has left #ruby ["Leaving"]
<Xeago> apeiros: my assumption is, he figured out what he did wrong by learning how to paste
<apeiros> Xeago: probably. and he never figured out how to do the right thing and tell the channel that he solved it.
<apeiros> I should get less upset about such stuff.
vlad_sta_ has quit [Remote host closed the connection]
<nerium> Xeago: I unloaded rvm, but the problem remains
<Xeago> I have no idea what that means
flower-pot has quit [Quit: leaving]
<Xeago> I know of implode, and that is about it
flower-pot has joined #ruby
<nerium> Xeago: It's the same as -f
lurch_ has joined #ruby
<Xeago> what keyboard scheme and language input are you in?
<nerium> Dvorak, Swe
<nerium> Sorry, I'm currently in Qwerty
<Xeago> could you switch to englishINT
<nerium> Sure
lurch_ has quit [Client Quit]
maz-dev has quit [Ping timeout: 272 seconds]
monkegjinni has joined #ruby
krz has quit [Ping timeout: 240 seconds]
funburn has quit [Quit: funburn]
flower-pot has quit [Client Quit]
arietis has joined #ruby
<nerium> Xeago: Same thing
flower-pot has joined #ruby
flower-pot has quit [Client Quit]
<Xeago> visit an apple store I'd guess?
<Xeago> or call their support line
<Xeago> I am out of clues :'(
wildroman has joined #ruby
flower-pot has joined #ruby
<nerium> I don't think they can answer questions like this, but thanks anyway :)
BizarreCake has joined #ruby
<Xeago> well, I've gotten new hardware for such problems once :3
Soda has joined #ruby
flower-pot has quit [Client Quit]
flower-pot has joined #ruby
timonv has joined #ruby
funburn has joined #ruby
funburn has quit [Client Quit]
Alc has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
astrobunny has quit [Ping timeout: 245 seconds]
io_syl has quit []
nfk has joined #ruby
flower-pot has quit [Client Quit]
flower-pot has joined #ruby
sepp2k has joined #ruby
flower-pot has quit [Client Quit]
astrobunny has joined #ruby
vlad_starkov has joined #ruby
braincrash has joined #ruby
patjoh has quit [Quit: Computer has gone to sleep.]
mklappstuhl has quit [Remote host closed the connection]
stayarrr has quit [Quit: Leaving...]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
coderhs has joined #ruby
flower-pot has joined #ruby
krz has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
korisnik has joined #ruby
svector has joined #ruby
VTLob has joined #ruby
sniffingcats has joined #ruby
svector has quit [Max SendQ exceeded]
Soda has quit [Remote host closed the connection]
svector has joined #ruby
bradhe has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
zigomir has quit [Quit: zigomir]
dhamidi has joined #ruby
svector has quit [Max SendQ exceeded]
roolebo has quit [Ping timeout: 272 seconds]
svector has joined #ruby
astrobunny has joined #ruby
svector has quit [Max SendQ exceeded]
pleal has joined #ruby
svector has joined #ruby
flops_ has joined #ruby
SHyx0rmZ has joined #ruby
orien has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
user258467 has quit [Quit: Leaving...]
mklappstuhl has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
nouitfvf has joined #ruby
flops has quit [Ping timeout: 245 seconds]
apeiros has quit [Remote host closed the connection]
kraljev2 has joined #ruby
pleal has quit [Ping timeout: 272 seconds]
kazuuu has joined #ruby
g0bl1n has joined #ruby
<shevy> long live ruby!
swordsmanz has joined #ruby
aryaching_ has joined #ruby
Mitchellvanw has joined #ruby
user258467 has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.2]
mklappstuhl has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 256 seconds]
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
maroloccio has quit [Read error: Connection reset by peer]
sergicles has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
Imaginativeone has joined #ruby
<Imaginativeone> sorry for the long delay
visof has quit [Ping timeout: 245 seconds]
<Imaginativeone> beachball
rubyracer has joined #ruby
rubyracer has quit [Client Quit]
maroloccio has joined #ruby
mengu has quit [Ping timeout: 256 seconds]
<Imaginativeone> attempt to install rvm: https://gist.github.com/Imaginativeone/7068531
<Imaginativeone> can you glean any insights?
kraljev2 has quit [Read error: Connection reset by peer]
kraljev2 has joined #ruby
user258467 has quit [Quit: Leaving...]
Sp4rKy_ has joined #ruby
claymore has quit [Ping timeout: 248 seconds]
flower-pot has quit [Quit: leaving]
flower-pot has joined #ruby
niklasb has joined #ruby
claymore has joined #ruby
MrZYX is now known as MrZYX|off
lurch_ has joined #ruby
zarubin has joined #ruby
<Imaginativeone> how do I upgrade from Ruby 1.8.7 to 1.9.3?
astrobunny has quit [Ping timeout: 256 seconds]
<kraljev2> Ubuntu has 1.9.3 in the repos
jrhe has quit [Quit: jrhe]
<Imaginativeone> sorry…on a Macbook?
roolebo has joined #ruby
<Imaginativeone> OS X 10.8.5
RubyRonin has joined #ruby
<RubyRonin> good morning
dzhulk has joined #ruby
Mattias has quit [Ping timeout: 272 seconds]
<kraljev2> rvm install 1.9.3
Tuxist has quit [Read error: Connection reset by peer]
Tuxist has joined #ruby
Sp4rKy_ is now known as Sp4rKy
Sp4rKy has quit [Changing host]
Sp4rKy has joined #ruby
<RubyRonin> how do I resolve this problem
astrobunny has joined #ruby
<RubyRonin> when the time is 8, the program will return evening
<RubyRonin> def greeting
<RubyRonin> username = "Sir"
<RubyRonin> t = Time.now
<RubyRonin> t = t.hour
niklasb has quit [Ping timeout: 272 seconds]
<RubyRonin> if t < 8
<RubyRonin> @greeting = "Good Morning " + username
<RubyRonin> elsif t > 8 && t < 17
<RubyRonin> @greeting = "Good Afternoon " + username
<RubyRonin> else
<RubyRonin> @greeting = "Good Evening " + username
<RubyRonin> end
<RubyRonin> puts @greeting
<RubyRonin> end
<RubyRonin> and I only want it to return good evening after 17
<RubyRonin> nevermind i added elsif t = 8 or t > 8 && t < 17
<Mon_Ouie> That won't work
<Mon_Ouie> t = 8 *sets* t to 8, it doesn't compare it to 8
<RubyRonin> good point
<RubyRonin> elsif t >= 8 && t < 17
<RubyRonin> ?
<Mon_Ouie> Yup
<RubyRonin> thanks mon_ouie
flower-pot has quit [Quit: leaving]
<Mon_Ouie> (Saying "Good morning" at midnight might be a bit weird btw :p)
mixel has joined #ruby
MrZYX|off is now known as MrZYX
flower-pot has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
jrhe has joined #ruby
kofno has joined #ruby
flower-pot has quit [Client Quit]
jhaals has joined #ruby
Spleeze has quit [Ping timeout: 240 seconds]
flower-pot has joined #ruby
flower-pot has quit [Client Quit]
<RubyRonin> lol
alexju has joined #ruby
lurch_ has quit [Quit: lurch_]
<Xeago> also RubyRonin your logic has several fallacies to it
<Xeago> if the hour is 8, it will say good evening
<RubyRonin> xeago please ellaborate
<Xeago> >> 8 < 8
<eval-in> Xeago => false (https://eval.in/55941)
mercwithamouth has quit [Ping timeout: 245 seconds]
<Xeago> >> 8 > 8 && 8 < 17
<eval-in> Xeago => false (https://eval.in/55942)
kraljev2 has quit [Ping timeout: 245 seconds]
postmodern has joined #ruby
orien has quit [Quit: Computer has gone to sleep.]
<RubyRonin> I'm confused, I thought >= resolved that issue
<Xeago> ah, didn't see that
Guest32345 has joined #ruby
<Xeago> you might as well omit the
<Xeago> check for >= 8
<Xeago> as it is already checked to not be < 8
t_p has joined #ruby
<Imaginativeone> how do I install the command-line tools for xcode?
<Xeago> Imaginativeone: in preferences of xcode some tab allows you to do so
<Xeago> otherwise there is also a download provided by apple
<Imaginativeone> thanks!
patjoh has joined #ruby
timonv has quit [Remote host closed the connection]
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has quit [Ping timeout: 248 seconds]
sayan has quit [Quit: Leaving]
timonv has joined #ruby
<Xeago> that would do the same
<Xeago> I don't like the end+username tho, but it works :3
bradhe has joined #ruby
Al_ has joined #ruby
<RubyRonin> thanks xeago!
orien has joined #ruby
arietis has joined #ruby
svector has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
Al_ has quit [Client Quit]
ewnd9 has quit [Ping timeout: 248 seconds]
timonv has quit [Ping timeout: 240 seconds]
justsee has joined #ruby
stayarrr has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
AlSquire has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
kazuuu has quit [Remote host closed the connection]
svector has quit [Max SendQ exceeded]
kazuuu has joined #ruby
svector has joined #ruby
dzhulk has quit [Quit: Leaving.]
svector has quit [Max SendQ exceeded]
nerium has quit [Quit: nerium]
svector has joined #ruby
Al_ has joined #ruby
kazuuu has quit [Ping timeout: 240 seconds]
colonolGron has quit [Ping timeout: 240 seconds]
Al_ has quit [Client Quit]
CorpusCallosum has quit [Quit: Leaving]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
jrhe has quit [Quit: jrhe]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
pencilcheck has joined #ruby
Valicek1 has quit [Quit: Valicek1]
danshultz has quit [Ping timeout: 245 seconds]
pencilcheck has quit [Remote host closed the connection]
pen has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 245 seconds]
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
Al_ has joined #ruby
justsee has quit [Ping timeout: 272 seconds]
Al_ has quit [Client Quit]
orien has quit [Quit: Computer has gone to sleep.]
mengu has quit [Ping timeout: 256 seconds]
chobbit has joined #ruby
v9r has quit [Quit: leaving]
<chobbit> I need some help with regex. I want to gsub %arg-[any number here]%
<chobbit> I have the [any number here] part figured out, but I can't figure out how to add the strings to the sides
newbiehacker has joined #ruby
csffsc has joined #ruby
<MrZYX> >> "%arg-[24]%bar".gsub(/%arg-\[\d+\]%/, 'foo')
<eval-in> MrZYX => "foobar" (https://eval.in/55943)
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
<chobbit> thank you
<MrZYX> also please do not crosspost without at least noting
flower-pot has joined #ruby
<chobbit> Okay.
wallerdev has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
csffsc has quit [Ping timeout: 248 seconds]
dzhulk has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
mengu has quit [Remote host closed the connection]
lurch_ has joined #ruby
lurch_ has quit [Client Quit]
lyanchih has joined #ruby
stayarrr has quit [Ping timeout: 272 seconds]
Lewix has quit [Ping timeout: 272 seconds]
mklappstuhl has joined #ruby
visof has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
lucazi has joined #ruby
visof has quit [Remote host closed the connection]
ewnd9 has joined #ruby
orien has joined #ruby
qinix has joined #ruby
nateberkopec has joined #ruby
srji has joined #ruby
Zolo has quit [Remote host closed the connection]
patjoh has quit [Quit: Computer has gone to sleep.]
Zolo has joined #ruby
Zolo has quit [Read error: No route to host]
boxmein has quit [Ping timeout: 272 seconds]
Zolo has joined #ruby
flayer has quit []
justsee has quit [Ping timeout: 240 seconds]
dzhulk has quit [Quit: Leaving.]
alx- has joined #ruby
Giorgio has joined #ruby
bradhe has joined #ruby
Mitchellvanw has quit [Quit: Dozing off...]
kreeves has joined #ruby
wallerdev has quit [Quit: wallerdev]
Al_ has joined #ruby
kaspergrubbe has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 265 seconds]
julweber has joined #ruby
lyanchih has quit [Quit: lyanchih]
kraljev2 has joined #ruby
julweber has quit [Remote host closed the connection]
julweber has joined #ruby
<kraljev2> can someone plz help me
<kraljev2> why is super not working
<MrZYX> try to create a minimal example demonstrating your issue
lessless has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
zigomir has joined #ruby
<kraljev2> only "FC init gets displayed"
<kraljev2> why could be that?
<MrZYX> because of the exception maybe? ;)
<kraljev2> the exception is on super on line 13
<kraljev2> that if files.rb:5 in practice
sunnymolini1 has joined #ruby
<kraljev2> I have been trying to make this work for 5 hours now
julweber has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
<kraljev2> it should call initialize(*) of parent class anyways
<kraljev2> how can i force ArgumentError to display function location too
<kraljev2> not just function call location
<kraljev2> I want to know which function doesn't accept argument, not just where it was called from
dv__ has joined #ruby
<kraljev2> why is twice the same line in the stack trace?
<MrZYX> well, your example isn't something I can just run to reproduce
timonv has joined #ruby
osvico has joined #ruby
dv_ has quit [Ping timeout: 240 seconds]
<MrZYX> if I recreate without the parent class for Asset, it works
ChronocityLC has joined #ruby
<kraljev2> ok, but as you see ArgumentError
<kraljev2> only tells me where the call is
<kraljev2> how to know which function was ment to got called
<MrZYX> well, it's probably Rubko::Controller#initialize in this case
<kraljev2> imposible, because parent is Rubko::Asset
<kraljev2> 'Asset init' didn't get displayed
<kraljev2> So, no way to get the calee?
<kraljev2> I'd like to know a line where that function resides
flower-pot has quit [Quit: leaving]
<MrZYX> maybe try pry-rescue
<MrZYX> together with pry-stack_explorer
<kraljev2> how can i run application inside pry
<MrZYX> do it the other way around, run pry inside applications: require 'pry'; binding.pry
<MrZYX> and for pry-rescue check their readme
flower-pot has joined #ruby
colonolGron has joined #ruby
<kraljev2> ok, thank you
<kraljev2> I hope this gets resolved
<Mon_Ouie> Running the exact code you gave and FilesController.new(1), it *does* display 'Asset init'
<wildroman> Q: Why does the Ruby base32 encoding library only works on strings, not on integers?
<MrZYX> yup, closet thing I could get to that error: http://paste.mrzyx.de/p7da76b0f/
<wildroman> Is there any inherent reason in the encoding procedure I don't see?
alexju_ has joined #ruby
<Mon_Ouie> >> 345.to_s(32)
<eval-in> Mon_Ouie => "ap" (https://eval.in/55946)
colonolGron has quit [Ping timeout: 272 seconds]
<Mon_Ouie> Oh, except the characters might not match the map you're expecting
svector has quit [Ping timeout: 256 seconds]
<wildroman> Mon_Ouie: why so?
alexju has quit [Ping timeout: 272 seconds]
<Mon_Ouie> Depends if you use a = 0 or a = 10
danshultz has joined #ruby
relix has joined #ruby
<wildroman> Hmm... I was expecting it to just encode 5 bits at a time of whatever binary value I throw at it
alexju_ has quit [Remote host closed the connection]
<wildroman> so as long as I stay with ints I know what binary values are out there, once I go to chars I guess you are right. So now I am even more perplexed as to why Base32::encode does not accept binaries.
alexju has joined #ruby
lessless has joined #ruby
<Mon_Ouie> I don't know what you mean by "binaries"
danshultz has quit [Ping timeout: 256 seconds]
Zolo has quit [Remote host closed the connection]
<wildroman> "binary integer"
<wildroman> 0b01011
<wildroman> for example
Zolo has joined #ruby
<Mon_Ouie> Don't confuse an integer with one of its representation
athst has quit [Quit: athst]
<Mon_Ouie> 0b01011 or 9 (if I can count :p) are the same thing
<kraljev2> No, no success
<kraljev2> neither pry-stack-explorer doesn't show the functions
<Mon_Ouie> 11* (of course I can't)
<kraljev2> Why cant the f*** exception show where the function is, please?
<kraljev2> even php does that.
patjoh has joined #ruby
<Mon_Ouie> kraljev2: You're yet to show a code that allows to reproduce your error
<kraljev2> i cannot, unless I upload 50KB code somewhere
<kraljev2> apparently it is not simply reproducible
alexju has quit [Ping timeout: 272 seconds]
<kraljev2> ArgumentError should show the function on call trace
<Mon_Ouie> It does
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
<kraljev2> only the function call
<kraljev2> not the location of the function called
<wildroman> Mon_Ouie: so assuming I have 0b01011 (which I assume you meant to say is not the same as 9), how do I got about base32 encoding it (efficiently, without encoding "0b01011")
<Mon_Ouie> wildroman: I meant to say "It is *exactly* the same thing as 11"
<kraljev2> >> def a; end; a(10)
<eval-in> kraljev2 => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/55947)
Zolo has quit [Ping timeout: 245 seconds]
<wildroman> Mon_Ouie: so why not confuse them? I have a 1 in the database which I want to encode into base32, encoding "1" is not a correct solution. Stuck.
<Mon_Ouie> You can get the least significant digit of a number N in base M with N % M, the rest is M / N, repeat until you get to 0
mayorga has joined #ruby
_dma has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
lsmola has quit [Ping timeout: 256 seconds]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
roolebo has quit [Ping timeout: 265 seconds]
orien has quit [Quit: Computer has gone to sleep.]
Al_ has quit [Quit: Al_]
jbpros has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
T__T has joined #ruby
frustrum has quit [Ping timeout: 240 seconds]
Guest32345 has quit [Remote host closed the connection]
patjoh has quit [Quit: Computer has gone to sleep.]
ravster has joined #ruby
vlad_starkov has joined #ruby
kraljev2 has left #ruby [#ruby]
sunnymolini1 has quit [Quit: Leaving]
sunnymolini has joined #ruby
astrobunny has quit [Ping timeout: 245 seconds]
kraljev2 has joined #ruby
<kraljev2> This is weird, here: https://eval.in/55959
<kraljev2> ruby actially reports function location
alx- has quit [Ping timeout: 248 seconds]
SilverKey has quit [Quit: Sleep now]
<kraljev2> file.rb:5:in `a': wrong number of arguments (1 for 0) (ArgumentError)
<kraljev2> but in my case, it doesn't: https://gist.github.com/strelec/7069790
samsonasu has joined #ruby
<kraljev2> ArgumentError: wrong number of arguments (1 for 0)
Giorgio has quit [Read error: Operation timed out]
SilverKey has joined #ruby
jrhe has joined #ruby
Anderson has joined #ruby
bradhe has joined #ruby
astrobunny has joined #ruby
rahulkmr has quit [Ping timeout: 248 seconds]
Spami has joined #ruby
<MrZYX> what is line 5 in your real file?
qinix has quit [Ping timeout: 248 seconds]
mklappstuhl has joined #ruby
<kraljev2> line 5 is just in test
tkuchiki_ has quit [Remote host closed the connection]
<kraljev2> in my case, no function location line gets displayed
bradhe has quit [Ping timeout: 272 seconds]
tkuchiki has joined #ruby
Xaitec has joined #ruby
Xaitec has quit [Read error: Connection reset by peer]
<MrZYX> "line 5 is just in test" <- ???
sayan has joined #ruby
<kraljev2> here, you can see what line 5 is
flops_ has quit [Read error: Operation timed out]
<kraljev2> function definition
<MrZYX> no
<MrZYX> in your real file
<kraljev2> it is super call
<MrZYX> /home/rok/web/Tarok/controllers/files.rb:5
<MrZYX> which of the two? the same as in the gist?
<kraljev2> def initialize(*)
<kraljev2> p 'FC init'
<kraljev2> super
<kraljev2> end
<kraljev2> same as line 13 in gist
<MrZYX> well, then Rubko::Asset#initialize doesn't have the same definition as in your gist
spider-mario has quit [Remote host closed the connection]
<kraljev2> it does
stef_204 has joined #ruby
<kraljev2> and that's what's been puzzling me for the past 6 hours
<MrZYX> it's calling Rubko::Asset#initialize that's throwing the ArgumentError at you
<kraljev2> class Rubko::Asset < Rubko::Controller
<kraljev2> def initialize(*)
<kraljev2> p 'Asset init'
kreeves has quit [Ping timeout: 240 seconds]
<kraljev2> super
<kraljev2> end
<kraljev2> here it is
<kraljev2> That's the reason I'd like a function location
tkuchiki has quit [Ping timeout: 240 seconds]
rdg has joined #ruby
Mitchellvanw has joined #ruby
<kraljev2> can i get at least self.class.superclass definiton file:line
drumsrgr8forn8 has joined #ruby
dhamidi has quit [Read error: Operation timed out]
Trynemjoel has quit [Max SendQ exceeded]
lessless has quit [Ping timeout: 240 seconds]
Trynemjoel has joined #ruby
qinix has joined #ruby
<kraljev2> self.class.superclass.method(:initialize)
<kraljev2> returns
<kraljev2> self.class.superclass
<kraljev2> sorry
<kraljev2> #<Method: Class#initialize>
<kraljev2> so it has to be the wrong file
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
_dma has quit [Remote host closed the connection]
<MrZYX> self.class.superclass.instance_method(:initialize).source_location
csffsc has joined #ruby
<kraljev2> nil
<MrZYX> hm, works for my minimal example.
aspiers has joined #ruby
<kraljev2> without source_location
<kraljev2> i get
<kraljev2> #<UnboundMethod: Rubko::Asset(BasicObject)#initialize>
rahulkmr has joined #ruby
<MrZYX> I've the feeling it's not overriding, so it's really BasicObject#initialize, which has no source_location
<MrZYX> therefore you get nil
<MrZYX> and the ArgumentError
sniffingcats has quit [Read error: Operation timed out]
kofno has quit [Ping timeout: 240 seconds]
dhamidi has joined #ruby
<kraljev2> Oh, now I got it
<kraljev2> Rubko::Asset didn't get loaded
<kraljev2> only Rubko::Asset::fileStream did
<kraljev2> leaving Rubko::Asset an empty class
tomzx_mac has joined #ruby
jbpros has quit [Quit: jbpros]
rdg has quit [Quit: ttfn]
greenrose1 has joined #ruby
<kraljev2> thanks!
jbpros has joined #ruby
greenrose has quit [Ping timeout: 252 seconds]
myth17 has joined #ruby
myth17 has joined #ruby
myth17 has quit [Changing host]
kofno has joined #ruby
myth17 has quit [Remote host closed the connection]
csffsc has quit [Remote host closed the connection]
csffsc has joined #ruby
patjoh has joined #ruby
lxsameer has quit [Quit: Leaving]
mrsolo_ has joined #ruby
lessless has joined #ruby
qinix2 has joined #ruby
csffsc has quit [Ping timeout: 240 seconds]
csffsc has joined #ruby
drumsrgr8forn8 has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
jb41 has quit [Ping timeout: 260 seconds]
qinix has quit [Ping timeout: 248 seconds]
mrsolo_ has quit [Client Quit]
qinix2 has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby
qinix has joined #ruby
dzhulk has joined #ruby
nilved has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
varfoo has joined #ruby
lyanchih has joined #ruby
vlad_starkov has joined #ruby
jonathanwallace has joined #ruby
kazuuu has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Vivekananda has joined #ruby
<csffsc> Does anyone know of a strong resource (explanation) of enumorators, apart from the ruby api docs?
mailo has joined #ruby
mailo has quit [Remote host closed the connection]
polaco_zZz is now known as polaco
eka has joined #ruby
<wildroman> Mon_Ouie: thanks for the help, got the issue solved.
T__T has quit [Remote host closed the connection]
Mattias has joined #ruby
<shevy> csffsc it's best to ask here on IRC, we are the best knowledge base out there!
<shevy> >> [1,2,3,6].none? { |e| [4,5].include?(e) }
<eval-in> shevy => true (https://eval.in/55960)
<shevy> Enumerator is actually a little bit complex
Mattias has quit [Client Quit]
<csffsc> okay, I was working on here yesterday on a problem, thought I got it figured out but upon adding new digits to the input, it broke :(
<shevy> [[1,2],[3,4]].flat_map {|i| i } # => [1, 2, 3, 4]
Deele has joined #ruby
<shevy> [1,3,5,7,9,22].inject(0) {|sum, element| sum+element} # => 47
<csffsc> the enumorators I need to optmise are inside the generate method
Mattias has joined #ruby
<shevy> def generate(hand, cards)
<csffsc> shevy: actually the commenting in this is far better https://gist.github.com/anonymous/c810ab9c47506d12231c
<shevy> right now I am still trying to understand what your code tries ;)
astrobunny has quit [Ping timeout: 272 seconds]
jbpros has quit [Quit: jbpros]
<shevy> hmm csffsc
<shevy> the code is not easy to understand for me
<csffsc> sure, what It's doing is, taking a list of numbers [7, 7, 7, 10 , 11] and from that set trying to find the optimal combination of cards for blackjack
<shevy> Hash[hand.combination(groupsize).map { |cards| [cards, cards.inject(:+)] }.keep_if { |_, sum| sum < 22 }.sort_by { |_, v| v }.reverse]
<shevy> end
<csffsc> yeah, it's a bit... all in one
<shevy> ok, so sample input is something like an array: [7, 7, 7, 10, 11]
<shevy> now I need to lookup how blackjack is played... time for some googling ... :P
mrsolo_ has joined #ruby
<csffsc> so, if you see the hand = ARGV command
<csffsc> you can comment that out, and then uncomment the line below it
<csffsc> makes it a bit faster to work with
greenrose1 is now known as greenrose
claymore has quit [Ping timeout: 240 seconds]
korisnik has quit [Ping timeout: 272 seconds]
astrobunny has joined #ruby
<csffsc> shevy: I have the orginal problem that I'm working thru, if you'd like to see that as well
Mattias has quit [Ping timeout: 272 seconds]
nouitfvf has quit []
Mattias has joined #ruby
wallerdev has quit [Quit: wallerdev]
tobyo has joined #ruby
skaflem has joined #ruby
coderhs has quit [Ping timeout: 272 seconds]
nisstyre has joined #ruby
mixel has quit [Quit: mixel]
qinix has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
srji has quit [Quit: leaving]
bradhe has joined #ruby
wesside has quit [Quit: I think I heard an ice cream truck..]
dzhulk has quit [Quit: Leaving.]
mary5030 has joined #ruby
kazuuu has quit [Remote host closed the connection]
kazuuu has joined #ruby
boxmein_ has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
boxmein_ is now known as boxmein
mary5030 has quit [Remote host closed the connection]
patjoh has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has quit [Ping timeout: 272 seconds]
io_syl has joined #ruby
io_syl has quit [Client Quit]
leonidlm has joined #ruby
Vivekananda has quit [Read error: Connection reset by peer]
kazuuu has quit [Ping timeout: 265 seconds]
zarubin has quit [Ping timeout: 272 seconds]
astrobunny has quit [Ping timeout: 245 seconds]
jbpros has joined #ruby
lyanchih has quit [Quit: lyanchih]
sniffingcats has joined #ruby
coderhs has joined #ruby
RubyRonin has quit [Quit: ChatZilla 0.9.90.1 [Firefox 18.0.2/20130201065344]]
lyanchih has joined #ruby
<canton7> btw, #sort_by{ |_,v| v }.reverse == #sort_by{ |_, v| -v } iirc
T__T has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.1]
astrobunny has joined #ruby
wallerdev has joined #ruby
skaflem has quit [Quit: Leaving]
roolebo has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
astrobun_ has joined #ruby
saarinen has joined #ruby
roolebo has quit [Ping timeout: 248 seconds]
havenwood has joined #ruby
astrobunny has quit [Ping timeout: 248 seconds]
lucazi has quit [Quit: Textual IRC Client: www.textualapp.com]
<csffsc> canton7: thanks
<csffsc> canton7: ... hindsight is 20/20 huh
<csffsc> canton7: do you see anything else that is out of order with that line?
<canton7> without grocking the entire backlog, no
<canton7> and my sort_by comment is just a trick. slightly more efficient, but possibly at the cost of some clarity
saarinen has quit [Ping timeout: 272 seconds]
<csffsc> yeah - it's -v is eaiser to miss
carraroj has quit [Ping timeout: 272 seconds]
<csffsc> the problem I am having is, this generate function computes the various combinations of an input list ex [7,7,7,8,8,5]
<csffsc> however if I append two or three numbers to the add of that list
<csffsc> all of the combinations change, instead of just gaining new combinations
<csffsc> it's as though, the integers are used for one combination, and then cannot be repeated in future combinations
<csffsc> which is something that I need to have happen
v1n has joined #ruby
<canton7> I'm afraid I'm not understanding you. Do you have an example?
jbpros has quit [Quit: jbpros]
<csffsc> sure
kofno has quit [Ping timeout: 256 seconds]
kazuuu has joined #ruby
mary5030 has joined #ruby
<csffsc> this is the output for the set [7,7,7,8,8,5]
<csffsc> this is the output for the set [7,7,7,8,8,5,10,3,3]
ravster has quit [Quit: Leaving.]
nism-pi has joined #ruby
<csffsc> what I am doing is trying to find combinations of integers that add up to 21
<csffsc> and failing that then 20
wallerdev has quit [Quit: wallerdev]
<canton7> cool....
<csffsc> and once that is found, I then am trying to return the combination with the least amount of integers
coderhs has quit [Ping timeout: 248 seconds]
<canton7> righto
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
<csffsc> .. the pretext is those numbers are cards.. and given a set of cards - find the optimial blackjack hand
<canton7> and what's the problem?
T__T has quit [Remote host closed the connection]
<csffsc> in the second link, I appended 10, 3 , 3 to the orginal list of numbers
<canton7> yup
<csffsc> and all of the sudden the solution (7,7,7) = 21 disappears
dangerousdave has joined #ruby
<csffsc> as well as 8,8,5 = 21
dangerousdave has quit [Client Quit]
mixel has joined #ruby
<canton7> they're there? at the end of that first line?
<csffsc> oh my.. okay, I just ate my foot
<canton7> well, somewhere in the middle of it
<csffsc> this is what happens when I start debuging at 2am
<canton7> :P
<canton7> ctrl-f is your friend, sometimes ;)
<csffsc> the secondary function that is designed to pull out the maximum key/value sums isn't working as expected
<canton7> (or grep, etc)
<csffsc> but all of the cards are being generated
<canton7> aha, is that what the second bit of output is?
<csffsc> yes - the goal is for the program to return the 'best hand' defined as the cards being <= 21, with the group size being <= 2
burlyscudd has joined #ruby
burlyscudd has quit [Changing host]
burlyscudd has joined #ruby
<csffsc> and that second list of numbers was my attempt at consolidating that large hash to the maximum solutions for each group
<canton7> <= 2? are you sure? closest to 2 maybe...
<csffsc> but I went awray somewhere
<csffsc> so, the list is soposed to allow for Aces
<csffsc> which, have two values, 11 or 1
<csffsc> for now I'm leaving that logic out
<csffsc> but an Ace + 10 would equal 21
<canton7> but the <= 2 constraint means that your combinations of 3 cards will never be chosen
sambao21 has joined #ruby
korisnik has joined #ruby
<canton7> but anyway
<canton7> let's see the code?
drumsrgr8forn8 has joined #ruby
<csffsc> oh sure
<csffsc> the reduce function is what is generating that second line
<csffsc> I realize it's not very elegant, or object oriented.. I'm kind of learning that bit as I go
samsonasu has quit [Quit: samsonasu]
danshultz has joined #ruby
amacgregor has quit [Read error: Connection reset by peer]
<csffsc> canton7: thanks for the interest in this problem..
|PiP| has joined #ruby
<|PiP|> anyone know of a ruby gem that includes a bunch of commonly used regular expressions?
danshultz has quit [Remote host closed the connection]
<csffsc> |PiP|: I dont, but I would start here: http://rubygems.org/search?utf8=✓&query=regex
wallerdev has joined #ruby
danshultz has joined #ruby
devoldmx has joined #ruby
drumsrgr8forn8 has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
<shevy> guys
<shevy> do you know if I can use prawn to modify a .pdf file that is on my hdd?
<shevy> specifically...
<shevy> I would like to set a keyword
<shevy> "biochemistry"
vlad_starkov has joined #ruby
<csffsc> shevy: have you looked at prawn's pdf manual? http://prawn.majesticseacreature.com/manual.pdf
<shevy> cool
<shevy> I did not even know they had one
<shevy> thanks csffsc
deens has joined #ruby
<csffsc> shevy: np
danshultz has quit [Ping timeout: 245 seconds]
alx- has joined #ruby
<canton7> csffsc, and what exactly is wrong with the second bit of output?
forcefsck has joined #ruby
<canton7> ah, I see, in your second gist
<csffsc> yup
T__T has joined #ruby
ehaliewicz has joined #ruby
<csffsc> (I'm a bit confused dealing with this hash), so I'm not saying that the reduce function is even the correct way to go
<csffsc> it's just the generate function, developed a hash thats a bit odd
<canton7> csffsc, I'm not massively sure that v.max on line 24 does what you expect
<canton7> since v is a hash at that point
<canton7> and #max is defined on Enumerable iirc, not Hash - so v is probably converted to an aray before #max is used
jhn has joined #ruby
<csffsc> hm
timonv has joined #ruby
Faris has joined #ruby
<csffsc> by the way, the 'hashy' gem, is adding functionality that will be available to ruby 2.1.0
<csffsc> right now "map_pair", is part of that hashy gem, and not part of Ruby's syntax
havenwood has quit [Remote host closed the connection]
<csffsc> I'd prefer to find a better way of representing the data inside the Generate perhaps
<csffsc> At this point, I'm getting better with enums, however I'm doing too much guessing and checking
orionstein_away is now known as orionstein
ravster has joined #ruby
rahulkmr1 has joined #ruby
<csffsc> the hash combinations, can be taken apart by grabbing the key (which is equal to amount of cards summed in sub-key)
<csffsc> for example
Kabaka has quit [Remote host closed the connection]
<csffsc> combinations["2"] = {"2"=>{[8, 8]=>16, [7, 8]=>15, [7, 7]=>14, [8, 5]=>13, [7, 5]=>12}}
Es0teric has joined #ruby
|jemc| has joined #ruby
clocKwize has quit [Ping timeout: 248 seconds]
<csffsc> so I have a key of 2, with a value which is a new hash. Keys = Card + Card, Values = Sum
rotor has quit [Ping timeout: 248 seconds]
Imaginativeone has quit [Quit: Imaginativeone]
rahulkmr has quit [Ping timeout: 272 seconds]
roolebo has joined #ruby
choobie has joined #ruby
burlyscudd has quit [Quit: Leaving.]
choobie has left #ruby [#ruby]
Wasp has quit [Remote host closed the connection]
|PiP| has quit [Ping timeout: 248 seconds]
rotor has joined #ruby
burlyscudd has joined #ruby
bradhe has joined #ruby
v0n has quit [Ping timeout: 245 seconds]
kazuuu has quit [Remote host closed the connection]
boxmein has quit [Read error: Connection reset by peer]
boxmein has joined #ruby
boxmein has quit [Max SendQ exceeded]
<csffsc> canton7: did I lose you?
clocKwize has joined #ruby
boxmein has joined #ruby
<canton7> sorry, IRC is normally minimsed unless I get pinged
<canton7> *minimised
<csffsc> canton7: no problem.. I have the same issue (unless someone hits my name)
bradhe has quit [Ping timeout: 248 seconds]
<canton7> yeah, I know what your data structure looks like - I had a peek. And that's what I'm saying: you're calling #max ona hash of e.g. {[8, 8]=>16, [7, 8]=>15, [7, 7]=>14, [8, 5]=>13, [7, 5]=>12}, and I'm pretty sure it won't do what you're expecting it to
<csffsc> Orginally the 'key' was the sum
<canton7> try calling #max_by{ |k,v| v } maybe
<canton7> make it clear that you want the element with the maximum key
<canton7> sorry, value
forcefsck has quit [Quit: Ex-Chat]
<csffsc> however the enum wasn't generating the combinations properly, and someone suggested the current route
<csffsc> which then created the proper cards, but a wonky hash format
<canton7> ...which is all fine, but even with the hash the other way around, you'd still be calling #max on a hash, and it still wouldn't do what you expect
<canton7> am I making sense here?
<csffsc> { |k, v| [k, v.max] }]. => { |k, v| v }]. ?
<canton7> no
<csffsc> left part is replaced by the right part
<csffsc> oh
<canton7> v is a hash
<canton7> you're calling #max on a hash
orionstein is now known as orionstein_away
<canton7> it isn't doing what you expect
<canton7> savvy?
lyanchih has quit [Quit: lyanchih]
<csffsc> okay
<canton7> >> {[1, 2] => 3, [4, 5] => 1}.max
<eval-in> canton7 => [[4, 5], 1] (https://eval.in/56032)
<canton7> >> {[1, 2] => 3, [4, 5] => 1}.max_by{ |k,v| v }
<eval-in> canton7 => [[1, 2], 3] (https://eval.in/56033)
workmad3 has quit [Ping timeout: 248 seconds]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beilabs has quit [Ping timeout: 240 seconds]
maroloccio has joined #ruby
Flashmasterson has joined #ruby
Kabaka has joined #ruby
<Flashmasterson> whenever i close iTerm 2, it disappears from my bottom bar - how do i prevent this?
saarinen has joined #ruby
krz has quit [Quit: krz]
kaspergrubbe has quit [Remote host closed the connection]
krz has joined #ruby
kaspergrubbe has joined #ruby
osvico has quit [Ping timeout: 265 seconds]
<canton7> csffsc, tbh I'd break it up a bit. make that chained mess several lines
<canton7> Flashmasterson, mac? can't you right-click and pin to dock, or so?
Guest35176 has joined #ruby
<csffsc> canton7: i'm looking thru my code and experimenting with it..
ChronocityLC has quit [Ping timeout: 272 seconds]
nism-pi has quit [Ping timeout: 272 seconds]
timonv has quit [Remote host closed the connection]
w3pm has joined #ruby
<csffsc> the thing is the top level hash is created & sorted by pairs, triples, quadruples, etc.. then inside each hash (pairs) for ex, the |k v| are sorted from largest value to smallest
claymore has joined #ruby
timonv has joined #ruby
<csffsc> which, based on the generate function, is something that can be relied upon
<Flashmasterson> canton7: yeah 10.8, i pin it as you said, but when i close it it disappears. then i have to pin it again
<canton7> Flashmasterson, fair enough. I'm not a mac user I'm afraid
<csffsc> canton7: for example, this would be how the data for one of the subhashes would be reliably displayed: https://gist.github.com/anonymous/c79377216ad845cc26a6
<canton7> csffsc, I suspect it's picking the element with the highest value somewhere in it
<canton7> so in your case, the first element has 11 in it, hence it gets chosen
<canton7> but you'll have to see the docs for Enumerable#max
varfoo has quit [Quit: WeeChat 0.4.0]
t_p has quit [Quit: Computer has gone to sleep.]
nism-pi has joined #ruby
saarinen has quit [Ping timeout: 245 seconds]
<csffsc> max: Returns the object in enum with the maximum value. The first form assumes all objects implement Comparable; the second uses the block to return a <=> b.
patjoh has joined #ruby
osvico has joined #ruby
ChronocityLC has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
pwh has quit []
nism-pi has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
beilabs has joined #ruby
deens has quit [Remote host closed the connection]
<canton7> csffsc, so, see how an array of [2, 3] compares to the int 1, for example
kofno has joined #ruby
<csffsc> canton7: yeah I noticed the discrepancy from your first example (not saying that the form is correct), however in this case the hash can be relied upon to be sorted from highest value to lowest value
<csffsc> and the key are two numbers that when summed are equal to the key
<csffsc> so for this, [2, 3] => 5
<canton7> csffsc, I'm wondering if you're completely missing the point I'm making. Is your problem still that reduce() is picking the wrong set of numbers?
<csffsc> yes
<csffsc> I might be
<csffsc> :/
nari has quit [Ping timeout: 248 seconds]
<canton7> I'm telling you exactly why it's failing
<csffsc> we are talking about line 24
<csffsc> changing
<csffsc> Hash[rhash.map { |k, v| [k, v] }].map_pair { |k, v| [k.to_i, Hash[*v]] }
<csffsc> to
<csffsc> or not
<canton7> line 24 is currently Hash[rhash.map { |k, v| [k, v.max] }].map_pair { |k, v| [k.to_i, Hash[*v]] }
<canton7> see that [k, v.max]?
kofno has quit [Quit: leaving]
<canton7> the v.max is your problem
<canton7> I explained why
<canton7> did you understand that?
<csffsc> yes
<csffsc> so isntead of [k, v.max]
<csffsc> you are suggesting, [k, v]
<canton7> no
<canton7> I didn't once say that
<csffsc> I don't understand, I saw: try calling #max_by{ |k,v| v } maybe
<canton7> instead of #max, yes
<krz> whats a good way to convert a string: "[1,2,3]" to an array?
<krz> i can use split. but what bout the []
nism-pi has joined #ruby
<canton7> regex? :)
workmad3 has joined #ruby
<canton7> csffsc, so Hash[rhash.map { |k, v| [k, v.max_by{ |k2, v2| v2 } ] }].map_pair { |k, v| [k.to_i, Hash[*v]] }
<canton7> which is starting to look horrible
<csffsc> It's really confusing I agree
<canton7> it might be nicer to have an array of hashes, e.g. [{:score => 5, :numbers => [2, 3]}, {...}]
<csffsc> definitely.
kaspergrubbe has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
polaco is now known as polaco_zZz
<csffsc> canton7: thanks, I'm looking thru the changes but this is better, clearly
volty has joined #ruby
roolebo has quit [Ping timeout: 240 seconds]
polaco_zZz is now known as polaco
jonathanwallace has quit [Ping timeout: 240 seconds]
Skylab has joined #ruby
Ox6abe has joined #ruby
leonidlm has quit [Ping timeout: 240 seconds]
newbiehacker has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
sindork has quit [Remote host closed the connection]
Skylab has quit [Client Quit]
sindork has joined #ruby
ce_afk is now known as cescalante
pwh has joined #ruby
newbiehacker has joined #ruby
randomnick_ has joined #ruby
jonathanwallace has joined #ruby
likemike has quit [Ping timeout: 246 seconds]
mrsolo_ has quit [Quit: This computer has gone to sleep]
likemike has joined #ruby
claymore has quit [Quit: Leaving]
ghargoil has joined #ruby
danshultz has joined #ruby
workmad3 has joined #ruby
claymore has joined #ruby
astrobun_ has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
samfisher has joined #ruby
Senjai_ has joined #ruby
carraroj has joined #ruby
<samfisher> hi, can ruby be used to develop Android tablet apps?
<samfisher> i wonder if could make some frugal POS app as my first app ever
danshultz has quit [Ping timeout: 240 seconds]
<MrZYX> there are some projects that allow you that, most popular ruboto
cescalante is now known as ce_afk
nism-pi has quit [Read error: No route to host]
<samfisher> MrZYX: cool, thanks! i'm starting to learn ruby now..
<samfisher> :)
kraljev2 has quit [Quit: kraljev2]
nism-pi has joined #ruby
<MrZYX> be aware that it requires an additional runtime on the device
coderhs has joined #ruby
Nolic has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
csffsc has quit [Remote host closed the connection]
amacgregor has joined #ruby
csffsc has joined #ruby
astrobunny has joined #ruby
bradhe has joined #ruby
zarubin has joined #ruby
csffsc_ has joined #ruby
<csffsc_> samfisher: using ruby for iOS development isn't ideal, although if you want to.. look at rubymotion
csffsc has quit [Ping timeout: 272 seconds]
<csffsc_> .
bradhe has quit [Ping timeout: 248 seconds]
<Flashmasterson> is String#upcase an old command? Macintosh:rubysamplecode toreystriffolino$ ri String#upcase
<Flashmasterson> Nothing known about String#upcase
jalcine is now known as jalcine_
monkegjinni has quit [Read error: Connection reset by peer]
ZenGuy311 has quit [Excess Flood]
<Flashmasterson> black's book says i should get str.upcase => new_str
havenwood has joined #ruby
<MrZYX> make sure you have local docs available
monkegjinni has joined #ruby
ZenGuy311 has joined #ruby
<MrZYX> (the command works on my machine, one ruby 2.0)
Guest35176 has quit [Read error: Connection reset by peer]
<csffsc_> (it's not free) but Kapeli's Dash documentation has been invaluable
dzhulk has joined #ruby
<csffsc_> however just leaving http://ruby-doc.org/core-1.9.3/ in a window would be enough as well
<MrZYX> or http://rubydoc.info/stdlib/core/frames if you prefer the yard format (like me)
tomzx_mac has quit [Read error: Connection reset by peer]
<Flashmasterson> MrZYX: i really appreciate it but i don't know what yard format is - i'm only on section 1.4.3 in black's book
bradhe has joined #ruby
monkegjinni has quit [Read error: No route to host]
<Flashmasterson> MrZYX: and i don't know how to make use of the links you posted
<MrZYX> did you try?
tomzx_mac has joined #ruby
monkegjinni has joined #ruby
pirelenito has joined #ruby
<Flashmasterson> MrZYX: yeah i'm not sure where to look
<Flashmasterson> or what to expect
<MrZYX> Try finding the String class
wallerdev has quit [Quit: wallerdev]
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
<Flashmasterson> MrZYX: so here i think ? http://ruby-doc.org/core-1.9.3/Kernel.html#method-i-String
<MrZYX> That's a method called String
<MrZYX> you want the method upcase on the the class String
wallerdev has joined #ruby
<Flashmasterson> hmm
korisnik has quit [Ping timeout: 272 seconds]
<MrZYX> You see at the top of the index csffsc_ posted, where it says "Classes" on the left and "Methods" at the right?
zigomir has quit [Quit: zigomir]
mrsolo_ has joined #ruby
<Flashmasterson> looking...
jrhe has quit [Quit: jrhe]
<csffsc_> Flashmasterson: Do you use google chrome?
<Flashmasterson> no firefox but i will if you think i should
<csffsc_> if so, there is an extension that searches the ruby documentation, called RubyDoc Search
<csffsc_> firefox likely has a version of it as well
<MrZYX> csffsc_: lets not overwhelm him with tools for now ;)
<Flashmasterson> MrZYX: yeah, man this is a lot, i just play bass
<csffsc_> MrZYX: automation automation automation
<havenwood> i prefer just using Pry, or google if it comes to it :P
wildroman has quit [Ping timeout: 245 seconds]
<MrZYX> he obviously has yet to grasp some of the core concepts, I'd say lets postpone workflow optimization to a later stage ;)
bradhe has quit [Remote host closed the connection]
<MrZYX> since it's highly subjective anyway
bradhe has joined #ruby
<Flashmasterson> MrZYX: thanks
<havenwood> csffsc_: figure out your sorting?
danshultz has joined #ruby
<csffsc_> havenwood: it was partially related to working at 2am.. :)
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
<MrZYX> Flashmasterson: so did you make out the String class on that index?
<havenwood> csffsc_: yeah, fresh eyes make all the difference
<csffsc_> havenwood: the generator function was fine, it was the reducing functino that was causing problems
<Flashmasterson> MrZYX: yeah i got that far
<csffsc_> I fixed that though
<Flashmasterson> MrZYX: then method upcase...
<csffsc_> working on adding support for royalty & aces now
danshultz has quit [Remote host closed the connection]
<MrZYX> Flashmasterson: yup, you have an overview on the left labled "Methods"
danshultz has joined #ruby
<MrZYX> yup ;)
<Flashmasterson> ok sweet but i still don't know why i get "Nothing known about String#upcase" when i enter "$ ri String#upcase"
<Flashmasterson> without quotes
bradhe has quit [Ping timeout: 240 seconds]
<Flashmasterson> black says i should get something different, but he's using 1.9.1 - a version i'm told is very unstable
<MrZYX> because your ruby installation does not have local docs
Xeago_ has joined #ruby
<MrZYX> how you can obtain them is highly dependent on how you installed ruby, so there's no general answer to fix that issue
<Flashmasterson> :(
<MrZYX> also I recommend you to use ruby 2.0.0, there's little sense in learning an outdated version and the differences between 1.9 and 2.0 aren't big anyway
<Flashmasterson> i agree but i just paid for that book
<csffsc_> Flashmasterson: which version was the book for?
<Flashmasterson> "Covers 1.9.1"
Volsus has joined #ruby
<MrZYX> as said the differences aren't that big, I wouldn't expect you hit any while learning the basics
<csffsc_> agreed
<MrZYX> yet if you do, it's better to hit them now than to have relearn later
nism-pi has quit [Remote host closed the connection]
Trudko has joined #ruby
Tamae has quit [Ping timeout: 272 seconds]
danshultz has quit [Ping timeout: 265 seconds]
jrhe has joined #ruby
T__T has quit [Remote host closed the connection]
<Trudko> guys I have object with three attributes points_one, points_two, points_three and I would like to define method which returns how many of the are not null. What is best way how to implement this?
<Flashmasterson> MrZYX: right, i've already hit a few like require "loadee"
athst_ has joined #ruby
<Flashmasterson> MrZYX: which is apparently now require './loadee'
<Mon_Ouie> Trudko: I'd just use Array#count
kazuuu has joined #ruby
<Flashmasterson> MrZYX: the relearning ideas you mentioned really bothers me. i'll call manning publishing tomorrow and try to get a free update or something
<MrZYX> Flashmasterson: nope, now it's require_relative 'loadee' in simple projects and manually setting up the load path in larger ones
workmad3 has quit [Ping timeout: 272 seconds]
Kabaka has quit [Ping timeout: 240 seconds]
kaspergrubbe has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
<Trudko> Mon_Ouie: how would you use it ?
<Flashmasterson> MrZYX: jesus christ technology moves fast
Davey has joined #ruby
<MrZYX> require './loaddee' still works, it's just bad practice
<Mon_Ouie> [points_one, points_two, points_three].count { |x| x }
sparq_ has joined #ruby
sparq_ has quit [Read error: Connection reset by peer]
larissa has joined #ruby
<MrZYX> Flashmasterson: and that's the case since Ruby 1.9.2 (iirc that's the one which removed the current directory from the load path)
Kabaka has joined #ruby
<Mon_Ouie> Not to mention current directory vs. directory that contains your files
<Mon_Ouie> When using ., you have to cd in your project directory to be able to run it
athst_ has quit [Quit: athst_]
<banisterfiend> Mon_Ouie you want an 'id' function
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<Mon_Ouie> I imagined calling it "self"
rahulkmr has joined #ruby
<Mon_Ouie> So I could do .count(&:self)
<Flashmasterson> ok so what is an ri command that will work
kaspergrubbe has quit [Ping timeout: 256 seconds]
newbiehacker has quit [Ping timeout: 256 seconds]
deens has joined #ruby
<Trudko> Mon_Ouie: ou ofc thank you!
amacgregor has quit [Read error: Connection reset by peer]
<MrZYX> Flashmasterson: I can only reiterate it again: You need to have local docs for ri to work, how you can obtain them depends on the way you got ruby installed
rahulkmr1 has quit [Ping timeout: 256 seconds]
<Flashmasterson> MrZYX: ok, i installed ruby through rvm
<MrZYX> have a look at http://rvm.io/rubies/docs
ioNull has quit [Quit: Textual IRC Client: www.textualapp.com]
fuhgeddaboudit has joined #ruby
<Flashmasterson> thanks a lot
deens has quit [Ping timeout: 245 seconds]
T__T has joined #ruby
endash has joined #ruby
roolebo has joined #ruby
bocaneri is now known as Sauvin
jibi has joined #ruby
astrobunny has quit [Ping timeout: 248 seconds]
mklappstuhl has quit [Remote host closed the connection]
Vivekananda has joined #ruby
_5kg has joined #ruby
noop has joined #ruby
vipjun has joined #ruby
Jun_ has joined #ruby
vipjun has quit [Remote host closed the connection]
Jun_ has quit [Remote host closed the connection]
vipjun has joined #ruby
flops has joined #ruby
Tamae has joined #ruby
astrobunny has joined #ruby
Xeago_ has quit [Remote host closed the connection]
sniffingcats has quit [Quit: Til rivido Idisti!]
<Flashmasterson> MrZYX: ok i went through the process of that page and i still get the same result for $ ri String#upcase
Jun_ has joined #ruby
<MrZYX> did you make sure to have activated your ruby with rvm use before running either command?
Jun_ has quit [Remote host closed the connection]
bricker`away has quit [Ping timeout: 272 seconds]
<Flashmasterson> MrZYX: i'm not sure, i know rvm works and is active
<Flashmasterson> MrZYX: keep in mind that i'm very new to this language
<MrZYX> well, I can say is that it worked for me back when I used rvm
<banisterfiend> Mon_Ouie maybe if tap also worked without a block
renderful has quit [Remote host closed the connection]
vipjun has quit [Quit: Leaving]
vipjun has joined #ruby
samsonasu has joined #ruby
jibi has quit [Quit: .]
jonathanwallace has quit [Ping timeout: 248 seconds]
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
atmosx has joined #ruby
<Flashmasterson> MrZYX: shoot. black mentions that it's not a big deal to learn right now, but i'd still like to take something useful away from it - will it be a big deal down the line?
frustrum has joined #ruby
vipjun has quit [Client Quit]
vipjun has joined #ruby
bricker`away has joined #ruby
Hobogrammer has quit [Ping timeout: 245 seconds]
jibi has joined #ruby
Zolo has joined #ruby
<MrZYX> I'd call it a personal workflow thing, the way you prefer to consume documentation. Some prefer ri, some pry(-doc), some the local rdoc documentation, some ruby-doc.org, some rubydoc.info and I'm sure there are more methods I'm not aware of
<MrZYX> and of course all combinations are valid too
<ghargoil> Hi all, I'm a noob at Ruby, and I think I' missing something really obvious
<ghargoil> but I've declared a module Xyz in the file xyz.rb
<ghargoil> and I want to load it from abc.rb ?
<ghargoil> and require "xyz" doesnt seem to work
<Flashmasterson> MrZYX: alright thanks for the answer
<MrZYX> ghargoil: make sure your loadpath contains the directory which holds xyz.rb or if that's too much trouble in your learning process right now, have a look at require_relative
<ghargoil> ahh
<ghargoil> lemme try that
decoponio has quit [Quit: Leaving...]
dhamidi has quit [Ping timeout: 272 seconds]
bradhe has joined #ruby
<ghargoil> woohooo!! thanks MrZYX
<MrZYX> just keep in mind that setting up the right $LOAD_PATH for your project is considered the "proper" way
<ghargoil> hrmm, how do I do that?
<MrZYX> $LOAD_PATH is simply an array of paths you can modify
<ghargoil> would I do something like
dzhulk has quit [Quit: Leaving.]
<ghargoil> $LOAD_PATH << './' ?
<MrZYX> yeah or .unshift to prepend something. Just don't use '.' since that's a source of trouble
<MrZYX> use an absolute path
Hobogrammer has joined #ruby
ewnd9 has quit [Read error: Operation timed out]
renderful has joined #ruby
noop has quit [Ping timeout: 256 seconds]
jibi has quit [Read error: Operation timed out]
timonv has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
<havenwood> if it is Ruby 2.0+ only, you can: $LOAD_PATH << __dir__
Steve009 has joined #ruby
x1337807x has joined #ruby
jibi has joined #ruby
amacgregor has joined #ruby
<havenwood> for same result as more verbose: $LOAD_PATH << File.dirname(File.realpath(__FILE__))
<Flashmasterson> who has the 'ruport' gem?
<MrZYX> you can find that out by going to http://rubygems.org/ and searching for it
<chobbit> Is there a way I can add a def to a Hash so I can call it like this_is_a_hash[dynamic_command_name]()
<havenwood> chobbit: never trailing parens in Ruby! (well, almost never)
<MrZYX> chobbit: not exactly like that, what would be the use? Storing methods in a hash?
<chobbit> MrZYX: I want to do a dynamic command system for an IRC bot
<havenwood> chobbit: overriding Hash's targeting brackets #[] method wouldn't be advised
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<havenwood> but you *can*
<chobbit> So I can add like test_command = Command.new("test", do stuff here using |m|)
<Flashmasterson> MrZYX: well i tried installing it but got this message
<Flashmasterson> MrZYX: v
<Flashmasterson> MrZYX: RROR: Could not find a valid gem 'ruport' (>= 0), here is why:
<Flashmasterson> Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)
micho has joined #ruby
<havenwood> Flashmasterson: OS X?
<Flashmasterson> havenwood: 10.8
<chobbit> So, how should I do it?
<MrZYX> chobbit: class Command; def initialize(name, &handler); @handler = handler; CentralCommandStore.register self; end; end; ... @handler.call message
<MrZYX> I guess I'd end up with something like that
<havenwood> Flashmasterson: Make sure you have latest RubyGems: gem update --system
<havenwood> Flashmasterson: And if you still have the problem, follow these instructions: https://github.com/raggi/openssl-osx-ca#readme
<MrZYX> chobbit: I also can recommend cinch if you don't want to recreate the basic infrastructure
<chobbit> I'm using cinch
<micho> hello, how to get message, that the hangout is finished, from this link: https://plus.google.com/hangouts/_/b738551d1f03ae95c048829a6131a28c983e6622 ? When I download it normally with openurl, i get all code from site, but this part is loading some time after (I thnik so). How can I get it?
<chobbit> That's why I said |m|, the message object
<chobbit> micho: yes, when you use openurl you will get the page's source code, there is no other way to display it in normal ruby
<MrZYX> well, then just use proper plugin classes, like https://github.com/cinchrb/cinch-last_seen/blob/master/lib/cinch/plugins/last_seen.rb for example
dzhulk has joined #ruby
<micho> chobbit: so, for what libraries should I look for to get that info I need?
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<chobbit> I don't know.
<Flashmasterson> havenwood: ok. i just updated gems last night. is all of that really required to get the 'ruport' gem?
jhaals has joined #ruby
<havenwood> micho: Grab the page with HTTPClient or Mechanize or whatever, then parse the HTML with Nokogiri and check if the "party is over" using xpath: //*[@id=":sk.yb"]/div[3]/div[1]/div/div[2]
mayorga has quit [Read error: Connection reset by peer]
jhaals has quit [Client Quit]
<MrZYX> micho: maybe mechanize can do what you want, as last resort you can drive a real browser with something like capybara
x1337807x has joined #ruby
<havenwood> micho: You can look at the page in a browser like Chrome, and copy the xpath of the node you're looking for.
<micho> thanks guys, I'll check it out
<chobbit> So I just do that, MrZYX ?
newbiehacker has joined #ruby
<chobbit> Is there anything I need to do in Bot.rb to register the plugin, MrZYX ?
<micho> havenwood: it would take a lot of time, wouldn't it?
<havenwood> micho: maybe to get used to mechanize and nokogiri, but once you're familiar a quick task
<MrZYX> chobbit: yup, have a look at the plugins readme
<havenwood> micho: worth learning HTTPClient/Mechanize/Nokogiri, powerful tools
<micho> havenwood: I am not asking about dev time, I need automatized script to check if given hangout is over or not
colonolGron has joined #ruby
<micho> so it'll need to run in real time
fgh has quit [Quit: Leaving]
<havenwood> micho: Oh, yeah, most of the time is just the roundtrip of the request over HTTP. Parsing is milliseconds.
<micho> havenwood: thanks, I'll check it out :)
renderful has quit [Remote host closed the connection]
<havenwood> micho: if you spam them with requests you'll get banned likely, be careful to throttle!
jonathanwallace has joined #ruby
<Xeago> havenwood: curl
tabolario has joined #ruby
<havenwood> Xeago: sure, Patron is a nice wrapper :)
sajinmp has joined #ruby
<Xeago> never heard of
<Xeago> lemme see
carraroj has quit [Quit: Konversation terminated!]
x1337807x has quit [Ping timeout: 248 seconds]
<sajinmp> hello
<sajinmp> i have a doubt. can you clear it please
<Xeago> Cleared!
<MrZYX> you're welcome
<Xeago> Please state the actual issue at hand, sajinmp.
<havenwood> Xeago: Best spreadsheet list of HTTP clients ever (Nahi, the author of HTTPClient created it): https://spreadsheets0.google.com/pub?hl=en&hl=en&key=0AiZsKd8d4hSJdHFFbjR5aWNjWjlzWlhiNGxQejdBWWc&output=html
<sajinmp> in arrays, array.slice(1,2) and array.slice(1,-1) give different values. why?
<havenwood> Xeago: Super useful reference, for me at least! Hard to remember what they can all do and not do.
IceDragon has joined #ruby
<havenwood> sajinmp: same values if you have a three element array
<sajinmp> in arrays, array.slice(1,2) and array.slice(1,-1) give different values. why? * when the array has only 3 elements
<havenwood> sajinmp: oh, gotcha
<chobbit> MrZYX: So I'm trying to create a s/bla/blad/ plugin, but I'm not good with regex... :|
<Mon_Ouie> Because slice(1, -1) means a slice of length -1
<sajinmp> nope. when i give array.slice(1,2) i get the right value but when i give array.slice(1,-1) it returns nil
rahulkmr1 has joined #ruby
<sajinmp> oh ok. so the second parameter is actually length and not the index.
<sajinmp> Thank you
<Mon_Ouie> 1..-1 ≠ 1, -1
jalcine_ is now known as jalcine
Faris has quit [Ping timeout: 240 seconds]
<havenwood> sajinmp: slice(start, length)
<sajinmp> Thankyou @Mon_Ouie, havenwood
<Xeago> havenwood: pity, doesn't cover client certificate authentication
<Xeago> other than that, great reference - thanks!
timonv has quit [Remote host closed the connection]
rahulkmr has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
R3dy has quit [Quit: Lost terminal]
timonv has joined #ruby
gyre007 has joined #ruby
Banistergalaxy has joined #ruby
Steve009 has quit [Quit: Steve009]
gyre007 has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 248 seconds]
Skylab has joined #ruby
newbiehacker has quit [Ping timeout: 248 seconds]
verazabeida has joined #ruby
danshultz has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
bluenemo has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 272 seconds]
krz has quit [Quit: krz]
allsystemsarego has quit [Quit: Leaving]
krz has joined #ruby
swordsmanz has quit [Read error: Operation timed out]
krz has quit [Client Quit]
danshultz has quit [Ping timeout: 272 seconds]
BizarreCake has quit [Ping timeout: 245 seconds]
renderful has joined #ruby
astrobunny has joined #ruby
bradhe has joined #ruby
kaspergrubbe has joined #ruby
workmad3 has joined #ruby
ghargoil has quit [Remote host closed the connection]
rahulkmr1 has quit [Ping timeout: 240 seconds]
workmad3 has quit [Client Quit]
workmad3 has joined #ruby
vlad_starkov has joined #ruby
ehc has joined #ruby
timonv has joined #ruby
samsonasu has quit [Quit: samsonasu]
ChronocityLC has quit [Ping timeout: 240 seconds]
<Flashmasterson> havenwood: is it a problem that i have macports or fink installed?
bigmac has joined #ruby
bigmac is now known as i8igmac
osvico has quit [Ping timeout: 248 seconds]
<havenwood> Flashmasterson: Either is a fine alternative as a package manager. But not the path of least resistance as everything will presume brew.
jalcine is now known as jalcine_
<havenwood> Flashmasterson: If you install `brew` and `brew doctor` i think it'll whine about MacPorts, ymmv
<Flashmasterson> havenwood: ymmv?
<MrZYX> he's on RVM. Flashmasterson check the rvm rubygems
<MrZYX> command
<havenwood> Flashmasterson: your mileage may vary
newbiehacker has joined #ruby
<i8igmac> ruby script.rb abc"123" ------> abc123
<havenwood> Does RVM work with Fink or MacPorts? I think it might?
<havenwood> rvm requirements
<i8igmac> how can i use quotes with my ARGV
<Flashmasterson> ok. i'm just waiting for brew install openssl-osx-ca to finish
Valicek1 has joined #ruby
<havenwood> Flashmasterson: I'd suggest just going with `brew`. (Unless you're in the vast minority of people who actually use OS X as a multi-user system.)
jalcine_ is now known as jalcine
<havenwood> MrZYX: Good point, there is an RVM-specific solution to this too i think i saw just the other day.
<havenwood> rvm pkg install somthing?
<Flashmasterson> ok i'm not sure im in that minority
<Flashmasterson> i just want to go the healthiest route
rippa has joined #ruby
<Flashmasterson> i'm very new
<workmad3> Flashmasterson: rvm osx-ssl-certs update all
Ahti333 has joined #ruby
<havenwood> workmad3: that was it! :)
<workmad3> (which seems to work better with rvm installed rubies than the openssl-osx-ca package does, going by previous help I've given)
Seus has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<havenwood> Flashmasterson: Double check you've got the bases covered with?: rvm requirements
<workmad3> havenwood: it's even there in the menu on the rvm site :) http://rvm.io/support/fixing-broken-ssl-certificates
<havenwood> workmad3: aye, i just don't use RVM so i'm hazy!
<workmad3> havenwood: link is under 'Help & Support' and titled 'fixing broken SSL certificates'
<havenwood> workmad3: chruby and ruby-install ftw! \o/
<workmad3> me neither :) but yeah, that one seems to be needed more often nowadays
<workmad3> yeah, chruby, ruby-install and homebrew with openssl-osx-ca :)
<havenwood> workmad3: ditto ;)
<workmad3> (I think also homebrew installed openssl, and ruby-install uses that version)
sajinmp has quit [Quit: Leaving]
<workmad3> havenwood: :) also zsh (with oh-my-zsh) and vim (with vimified)
<Flashmasterson> havenwood: i got this when i ran 'rvm requirements' https://gist.github.com/anonymous/7074091
<workmad3> havenwood: and iterm2 rather than terminal.app ;)
<havenwood> workmad3: mm, i ditched oh-my-zsh after getting annoyed with its poor quality
<havenwood> workmad3: but stole my prompt from it
<havenwood> workmad3: <3 zsh
rippa has quit [Ping timeout: 248 seconds]
<havenwood> workmad3: ahh, well there we part - i'm with Terminal.app
<workmad3> havenwood: do you use tmux then?
alx- has quit [Quit: Leaving...]
<havenwood> workmad3: nope, poked around with it but basically use key commands for window positions and tabs
<workmad3> havenwood: the main reason I use iterm2 is because I then get sane keyboard shortcuts for changing windows and panels :)
<Flashmasterson> havenwood: as opposed to iTerm 2?
<havenwood> workmad3: would like to use it more for terminal sharing, but have no interest in splitting my console screen - prefer to just have multiples of em
xk_id has quit [Quit:
theRoUS has joined #ruby
rahulkmr has joined #ruby
<workmad3> havenwood: yeah, I've only just started playing with a split screen rather than just tabs
rahulkmr has quit [Max SendQ exceeded]
<havenwood> workmad3: is use a combo of built-in Terminal.app keys and Spectacles i think it is called for windows poitioning and resizing by key command
<havenwood> i use for all my windows, not just Terminal
<workmad3> havenwood: and would have switched back if there hadn't been a cmd-shift-return shortcut to make the current panel full
rahulkmr has joined #ruby
<havenwood> option-cmd arrow key for me puts a window to that half the screen
<havenwood> ctrl-cmd for top left or top right and shift-ctrl-cmd arrow for bottom left or right
<havenwood> long as i have a key command you know to move windows i'm happy
<havenwood> i know**
<workmad3> yeah, that's pretty much it for me too
<havenwood> I like the Mavericks Terminal.app well enough. I'll check out iTerm3 or whatever but just haven't found that compelling feature yet.
<Flashmasterson> havenwood: is the 'unable to convert' message very bad? https://gist.github.com/anonymous/7074148
timonv has quit [Remote host closed the connection]
<workmad3> Flashmasterson: nope
<workmad3> Flashmasterson: it's from ri, the gem installed fine just some warnings generating docs
timonv has joined #ruby
<havenwood> Flashmasterson: You can skip ri doc installation altogether, many devs do.
<workmad3> Flashmasterson: a lot of people just turn off ri and rdoc generation in their .gemrc :)
<havenwood> Flashmasterson: Add this line to ~/.gemrc: gem: --no-rdoc
sdouglas has joined #ruby
<havenwood> Flashmasterson: if you wish to join the ranks of the ri-less
<workmad3> havenwood: --no-rdoc --no-ri
<havenwood> workmad3: modern RubyGems no need for --no-rdoc
<Flashmasterson> havenwood: ok and how does that benefit me as a very new learner?
<workmad3> havenwood: ah, it takes both from just one? :)
<havenwood> Flashmasterson: Your gems install faster and you don't have ri documentation installed.
<havenwood> workmad3: I think just doesn't generate rdoc anymore by default.
eka has joined #ruby
<havenwood> Many have asked for ri off by default too.
<workmad3> Flashmasterson: chances are any docs you look at, you'll do online
<havenwood> That Issue ticket is crazy long if I recall.
kaspergrubbe has quit [Remote host closed the connection]
NinjaPenguin has quit [Ping timeout: 272 seconds]
<dobry-den> i've never looked up local ri documentation
<workmad3> Flashmasterson: if you really need them locally, you can generate on-demand and launch a gem documentation server at that point
kaspergrubbe has joined #ruby
<dobry-den> maybe if i knew i was going off grid for a while
<Flashmasterson> workmad3: ok and that command is what?
<workmad3> Flashmasterson: err... one that I google on every single one of the maybe 2 times I've used it?
timonv has quit [Ping timeout: 240 seconds]
<workmad3> Flashmasterson: it's also probably in the gem help :)
T__T has quit [Remote host closed the connection]
<Flashmasterson> ok… black doesn't say to do that in his book so i'll hold off for now
Lewix has joined #ruby
<havenwood> Flashmasterson: `gem help server` or `yard help server` or whatev
<havenwood> rdoc and yard are the big two for that type of documentation
atmosx has quit [Quit: Lost in trance]
Xeago has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
scottstamp has joined #ruby
Xeago has joined #ruby
samsonasu has joined #ruby
jrhe has quit [Quit: jrhe]
<Flashmasterson> havenwood: ok i'll try to keep it in mind
<havenwood> Flashmasterson: Or don't. :P Most anything else is more important and Google sure works well! :)
renderful has quit [Remote host closed the connection]
<havenwood> i almost never use yard or rdoc
justsee has joined #ruby
<workmad3> documentation? isn't that just another term for 'source code'? :)
<Morrolan> Only when the devs are silly enough not to document their code. ;)
coderhs has quit [Ping timeout: 272 seconds]
renderful has joined #ruby
renderfu_ has joined #ruby
<Flashmasterson> havenwood: cool thanks
TorpedoSkyline_ is now known as TorpedoSkyline
burlyscudd has quit [Ping timeout: 248 seconds]
TorpedoSkyline has quit [Changing host]
TorpedoSkyline has joined #ruby
zz_tsykoduk is now known as tsykoduk
renderful has quit [Remote host closed the connection]
Imaginativeone has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
fgo has joined #ruby
ravster has left #ruby [#ruby]
robustus has joined #ruby
dorei has joined #ruby
rahulkmr has quit [Ping timeout: 272 seconds]
<Flashmasterson> what are some key things involved in creating a web app that contains audio files - for uploading and downloading. a website like soundcloud for example
<Flashmasterson> ?
<csffsc_> carrierwave is one
<csffsc_> allows you to upload stuff to amazon s3
<workmad3> Flashmasterson: storage space
<csffsc_> and retrieve
jibi has quit [Remote host closed the connection]
<workmad3> Flashmasterson: with soundcloud, there's also a certain amount of analysis, I believe, in order to generate the visualisations
alx- has joined #ruby
jonathanwallace has joined #ruby
s3itz has joined #ruby
<Flashmasterson> workmad3: ahh you mean how the tracks display a hz range?
<Flashmasterson> for your mention of visualizations
zarul has joined #ruby
<workmad3> Flashmasterson: yeah
<shevy> havenwood how do you document your projects?
zarul has quit [Changing host]
zarul has joined #ruby
Hanmac1 has joined #ruby
<Hanmac1> shevy you still there?
<Flashmasterson> workmad3: cool, and that is something i can find in black's book or is that a ror discussion?
Hanmac1 is now known as Hanmac
<havenwood> shevy: I honestly think it best to let code and tests speak for themselves. Sometimes I document, depends if my project or i'm in Rome.
<shevy> Hanmac1 kinda... trying to get an USB printer to work... on linux ... :\ :/ :ß
<workmad3> Flashmasterson: I'm not sure what 'blacks' book is
<shevy> Hanmac hehe
<csffsc_> Hanmac: yeah i saw that on HN yesterday
<shevy> havenwood that reminds me of Hanmac :D
<Flashmasterson> workmad3: my bad, the well-grounded rubyist
<workmad3> Flashmasterson: and it's not something that will be a general discussion point... you'd be trawling through and connecting the dots between several fairly separate areas :)
<workmad3> Flashmasterson: ah, TWGR... no, I kinda doubt that will cover the finer points of either audio analysis or sensible ways to handle large HTTP uploads :)
niklasb has joined #ruby
bobsapto has joined #ruby
jibi has joined #ruby
<workmad3> Flashmasterson: not to mention that you're likely looking at javascript and HTML5 canvas elements to handle the visualisation itself
<havenwood> Hanmac: wow, that's better than my name as a Captain (last name is Skipper, so Captain Skipper or aye aye Skipper Skipper).. sheesh
sniffingcats has joined #ruby
<havenwood> Hanmac: Hope his middle name is T.
bobsapto has left #ruby [#ruby]
yacks has quit [Quit: Leaving]
<Hanmac> yeah that would be 20% more awesome
xk_id has joined #ruby
<Flashmasterson> workmad3: ok point taken. then is going through twgr with a fine toothed comb for that purpose a slight waste of time? i want to learn the language, but developing this website idea is the point of everything i'm doing
<Hanmac> havenwood: but i prefer picard over Kirk ... but Janeway has more "balls" than all other captains combined
newbiehacker has quit [Ping timeout: 240 seconds]
<samfisher> can I use ruby to parse a website and collect some data I need?
habstinat has quit [Quit: WeeChat 0.3.8]
pirelenito has quit [Ping timeout: 272 seconds]
<samfisher> correction, can I "uncomplicately" use ruby for that
<havenwood> samfisher: Mechanize is a nice gem for that purpose.
jonathanwallace has quit [Ping timeout: 248 seconds]
kaspergrubbe has joined #ruby
<havenwood> Hanmac: I'd like to serve under Picard. Indeed Janeway is no pushover.
ehc has quit [Quit: ehc]
* havenwood goes back to rapping Ode to Spot.
<samfisher> havenwood: thank you
<Hanmac> i mean the other captains are only trying to avoid or fight the arch-enemy ... janeway is the only one "crazy" enough to "Hunt" Borg oO ;D
Soda has joined #ruby
coderhs has joined #ruby
yacks has joined #ruby
Imaginativeone has quit [Quit: Imaginativeone]
MrV has joined #ruby
fgo has quit [Remote host closed the connection]
gyre007 has joined #ruby
Steve009 has joined #ruby
havenwood has quit [Remote host closed the connection]
fgo has joined #ruby
jb41 has joined #ruby
newbiehacker has joined #ruby
ehc has joined #ruby
fgo has quit [Remote host closed the connection]
Giorgio has joined #ruby
<Freeaqingme> Just discovered that the Resolve::DNS class doesn't support mdns (yet). How can I have Ruby resolve hostnames through Avahi?
krz has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
MrV has quit [Quit: MrV]
<Flashmasterson> is 'obj' still a valid command in 2.0?
<Hanmac> Flashmasterson: you mean in a function call? you need to show more of what you want
devoldmx3 has joined #ruby
<Flashmasterson> ok i want obj = Object.new
<MrZYX> sure, that's still valid in ruby 2
<AntelopeSalad> i'm trying to share variables across rake tasks, when i do $foo = [] inside of task #1 and try to read $foo in task #2 it says $foo is nil , what's going on?
<Flashmasterson> MrZYX: hmm ok but i get command not found when i enter it into ruby
astrobunny has quit [Ping timeout: 240 seconds]
<MrZYX> command not found?
<Hanmac> Flashmasterson: then you are not in ruby, you are still in your bash
<MrZYX> what are you entering exactly, where exactly?
<Morrolan> Are you sure you are entering it into irb / pry, and not bash/zsh/some other shell? :P
bklane has joined #ruby
<Morrolan> Yea, you're not in any Ruby REPL.
<Morrolan> You're entering this command into your operating system's terminal emulator, at the moment. ;)
devoldmx has quit [Ping timeout: 265 seconds]
<Flashmasterson> i'm not sure what that is, i'm just going through 'the well-grounded rubyist' step by step
<shevy> hehe
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
wookiehangover has quit [Ping timeout: 265 seconds]
<Flashmasterson> Hanmac: nice
ZadYree has quit [Ping timeout: 265 seconds]
wookiehangover has joined #ruby
<Morrolan> Flashmasterson: It'll probably tell you to type 'irb' into the terminal, first, to open an interactive Ruby session.
Davey has joined #ruby
Imaginativeone has joined #ruby
nomenkun has joined #ruby
Zolo has quit [Remote host closed the connection]
jb41 has quit [Quit: leaving]
Zolo has joined #ruby
Trudko_ has joined #ruby
spike|spiegel has quit [Quit: WeeChat 0.4.2]
<Flashmasterson> Morrolan: hmm but black doesn't say to go into irb. it looks like this when i do https://gist.github.com/Flashmasterson/7074835
stkowski has joined #ruby
ZadYree has joined #ruby
astrobunny has joined #ruby
<Flashmasterson> maybe he means create that as a text file?
<Morrolan> Well, now this is fine. You created a new object (of class Object), and assigned it to the variable 'obj'.
<Morrolan> Eh, if it's a beginner's guide, then he probably wants you to use irb. Irb is an interactive Ruby interpreter, which allows you to play around / test things interactively.
<Morrolan> But sure, you can also enter the code in a text file, and execute it.
sdouglas has quit [Quit: sdouglas]
patjoh has quit [Quit: Computer has gone to sleep.]
Vivekananda has quit [Read error: Connection reset by peer]
Trudko has quit [Ping timeout: 272 seconds]
Trudko_ is now known as Trudko
theRoUS has quit [Ping timeout: 272 seconds]
<Flashmasterson> Morrolan: *huff* i wish he would have specified.
endash_ has joined #ruby
Zolo has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
<workmad3> Flashmasterson: sorry, was distracted with some accountancy stuff, and now being dragged away by my wife :)
<Flashmasterson> workmad3: life
Volsus has quit [Ping timeout: 265 seconds]
Volsus has joined #ruby
<Flashmasterson> Morrolan: ok i created it as a text file but with the "new" extention. no dice for what black lists as what the result should be
kazuuu has quit [Remote host closed the connection]
<Morrolan> Ruby won't care about the file extension. Now you can execute the script through the terminal by typing 'ruby script_name.extension'. However, since your script doesn't do anything besides creating a new object, you won't see any output.
vlad_starkov has quit [Remote host closed the connection]
kazuuu has joined #ruby
<Morrolan> I can't suggest anything, since I have no clue what this book will tell you to do for the next step, but using irb is probably the way to go.
Banistergalaxy has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
dash_ has quit [Quit: dash_]
<Flashmasterson> Morrolan: shoot
jonathanwallace has quit [Ping timeout: 272 seconds]
ehaliewicz has quit [Ping timeout: 272 seconds]
<Flashmasterson> well he's saying the object should talk to itself. assuming i've used this code https://gist.github.com/Flashmasterson/7074972
julweber has joined #ruby
<Flashmasterson> and after i enter (somewhere) obj.talk
krz has quit [Quit: krz]
devoldmx3 has quit [Ping timeout: 248 seconds]
bigmac_ has joined #ruby
kazuuu has quit [Ping timeout: 248 seconds]
devoldmx has quit [Ping timeout: 245 seconds]
<workmad3> >> obj = Object.new; def obj.talk; puts "hello there!"; end; obj.talk
<eval-in> workmad3 => hello there! ... (https://eval.in/56041)
devoldmx has joined #ruby
<Flashmasterson> workmad3: -bash: !": event not found
i8igmac has quit [Ping timeout: 272 seconds]
devoldmx3 has joined #ruby
lukec has joined #ruby
bigmac_ is now known as i8igmac
devoldmx has quit [Ping timeout: 240 seconds]
sjk has joined #ruby
<Flashmasterson> i'm also unclear about the definition of an argument
chobbit has quit [Quit: WeeChat 0.4.0]
claymore has quit [Quit: Leaving]
tspike has joined #ruby
danshultz has joined #ruby
s3itz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lsoa has joined #ruby
funburn has joined #ruby
astrobunny has quit [Ping timeout: 256 seconds]
thesheff17 has quit [Ping timeout: 245 seconds]
danshultz has quit [Ping timeout: 240 seconds]
nomenkun has quit [Remote host closed the connection]
korisnik has joined #ruby
bradhe has quit [Remote host closed the connection]
sdouglas has joined #ruby
astrobunny has joined #ruby
bradhe has joined #ruby
agent_white has joined #ruby
nomenkun has joined #ruby
mercwithamouth has joined #ruby
shevy has quit [Remote host closed the connection]
adambeynon has joined #ruby
sdouglas has quit [Ping timeout: 245 seconds]
Faris has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
spike|spiegel has joined #ruby
Tuxist has quit [Read error: Connection reset by peer]
astrobunny has quit [Ping timeout: 240 seconds]
korisnik has quit [Remote host closed the connection]
verazabeida has quit [Remote host closed the connection]
kiri has quit [Ping timeout: 272 seconds]
verazabeida has joined #ruby
tsykoduk is now known as zz_tsykoduk
kiri has joined #ruby
flops has quit [Quit: leaving]
flower-pot has quit [Quit: leaving]
Imaginativeone has quit [Quit: Imaginativeone]
samfisher has quit [Quit: exit error code 434]
pwh has quit []
kaspergrubbe has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
a1ph4g33k has joined #ruby
astrobunny has joined #ruby
verazabeida has quit [Ping timeout: 240 seconds]
samsonasu has quit [Quit: samsonasu]
zz_tsykoduk is now known as tsykoduk
danshultz has joined #ruby
mrsolo_ has quit [Quit: This computer has gone to sleep]
Valicek1 has quit [Quit: Valicek1]
kaspergrubbe has quit [Ping timeout: 245 seconds]
verazabeida has joined #ruby
funburn has quit [Quit: funburn]
ssvo has joined #ruby
blackmesa has joined #ruby
as-cii has joined #ruby
as-cii has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 272 seconds]
as-cii has joined #ruby
michael_mbp is now known as zz_michael_mbp
antulik-afk has quit [Quit: ZNC - https://PanicBNC.net]
ShapeShifter499 has quit [Quit: Something has gone terribly wrong!... Bnc/Znc services restarting in 4...3...2...1...]
thesheff17 has joined #ruby
<a1ph4g33k> Anybody in Portland for CascadiaRuby ?
marcdel has joined #ruby
vlad_starkov has joined #ruby
<a1ph4g33k> ( or planning to be ? )
marcdel_ has joined #ruby
marcdel_ has quit [Max SendQ exceeded]
mary5030 has quit [Remote host closed the connection]
marcdel_ has joined #ruby
mary5030 has joined #ruby
marcdel has quit [Ping timeout: 240 seconds]
Imaginativeone has joined #ruby
sergicles has quit [Quit: sergicles]
spike|spiegel has quit [Quit: WeeChat 0.4.2]
DropsOfSerenity has joined #ruby
polaco is now known as polaco_zZz
mary5030 has quit [Ping timeout: 240 seconds]
DropsOfSerenity has quit [Client Quit]
DropsOfSerenity has joined #ruby
sniffingcats has quit [Quit: Til rivido Idisti!]
volty_ has joined #ruby
volty has quit [Ping timeout: 256 seconds]
csffsc_ has quit [Remote host closed the connection]
csffsc has joined #ruby
alexju has joined #ruby
jonathanwallace has joined #ruby
aryaching_ has quit [Ping timeout: 248 seconds]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
pranny has joined #ruby
korisnik has joined #ruby
ericmathison has joined #ruby
sorbo_ has joined #ruby
DropsOfSerenity has quit [Quit: Textual IRC Client: www.textualapp.com]
tspike has quit [Ping timeout: 248 seconds]
csffsc has quit [Ping timeout: 272 seconds]
vipjun has quit [Ping timeout: 272 seconds]
atmosx has joined #ruby
DropsOfSerenity has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<Imaginativeone> brew solves a LOT of problems on the mac!!
DropsOfSerenity has quit [Client Quit]
as-cii has quit [Remote host closed the connection]
DropsOfSerenity has joined #ruby
bradhe has joined #ruby
jonathanwallace has quit [Ping timeout: 265 seconds]
orien has joined #ruby
devoldmx has joined #ruby
astrobunny has quit [Ping timeout: 240 seconds]
DropsOfSerenity has quit [Client Quit]
nomenkun has quit [Remote host closed the connection]
ericmathison has quit [Ping timeout: 272 seconds]
|PiP| has joined #ruby
|PiP| has quit [Read error: Connection reset by peer]
DropsOfSerenity has joined #ruby
aspires has joined #ruby
volty_ has left #ruby ["Konversation terminated!"]
volty has joined #ruby
volty has left #ruby [#ruby]
justsee has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 248 seconds]
aspiers has quit [Ping timeout: 260 seconds]
dzhulk has quit [Quit: Leaving.]
DropsOfSerenity has quit [Client Quit]
aspiers has joined #ruby
Evixion has quit []
relix has quit [Read error: Connection reset by peer]
relix has joined #ruby
MrZYX is now known as MrZYX|off
astrobunny has joined #ruby
Flashmasterson has quit [Quit: Leaving.]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
Flashmasterson has joined #ruby
marcdel_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
steffes has joined #ruby
DropsOfSerenity has joined #ruby
orien has quit [Quit: Computer has gone to sleep.]
bklane has quit [Remote host closed the connection]
bklane has joined #ruby
ehaliewicz has joined #ruby
ShellFu has joined #ruby
colonolGron has quit [Quit: Lost terminal]
danshultz has quit [Remote host closed the connection]
mayorga has joined #ruby
bklane has quit [Ping timeout: 248 seconds]
jalcine is now known as jalcine_
bklane has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
<ShellFu> Considering the following: >h1 = { 'name' => 'foo', attributes => { 'bar' => 'value', 'boo' => null, 'foobar' => {'baz' => 'value} }< and >h2 = { 'foobar' => {'baz' => 'value} }<.
steffes has left #ruby [#ruby]
<ShellFu> now what I want to do is remove from h1 everything in h2
<ShellFu> not sure how to compare when the hash is nested and possibly deeper than above.
jrhe has joined #ruby
julweber has quit [Remote host closed the connection]
<Flashmasterson> i'm still not sure why this command isn't working, keep in mind that i'm completely new to programming obj = Object.new
julweber has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
Monie has joined #ruby
<Freeaqingme> I'm trying some examples from this page, but whatever gem I install, I get 'cannot load such file -- net/dns/mdns-resolv'. Does anybody know how to make it actually work?
julweber has quit [Ping timeout: 248 seconds]
ner0x has joined #ruby
T__T has joined #ruby
mixel has quit [Quit: mixel]
ShellFu has quit [Quit: Leaving]
mixel has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
Deele has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
jrhe has quit [Quit: jrhe]
<atmosx> Freeaqingme: how do you install gems?
<atmosx> what ruby env do you use?
<Freeaqingme> I'm installing them through 'gem install <name>
<Freeaqingme> I think it's still a plain Ubuntu 12.04 setup
<Freeaqingme> rvm is not installed
<Freeaqingme> @ atmosx
ericmathison has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
s3itz has joined #ruby
jrhe has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
astrobunny has joined #ruby
<Imaginativeone> installing brew REALLY helped me with rvm
kaspergrubbe has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
<atmosx> Imaginativeone: brew works on mac, he is on Ubuntu
<atmosx> Freeaqingme: okay, I'd say install rvm and work on it.
<Imaginativeone> oops
<Imaginativeone> sorry about that
korisnik has quit [Remote host closed the connection]
<Freeaqingme> atmosx, trying now
<Freeaqingme> sucks though ;)
<atmosx> Freeaqingme: you're require lots of 'sudo s' if you don't.
sdouglas has joined #ruby
<atmosx> Freeaqingme: takes some time yes
pleal has joined #ruby
<Freeaqingme> not just the fact that it takes time, but I'll have to puppetize it and roll it out on all our servers if this is the only way
<atmosx> Freeaqingme: I see. In that case, can you run your ruby script as root?
<atmosx> ubuntu has 1.9 right?
csffsc has joined #ruby
<Freeaqingme> yup
pleal has quit [Remote host closed the connection]
<csffsc> hi peoples
<atmosx> Freeaqingme: then stop installing rvm and use the root acount without sudo
<atmosx> and everything will work out of the box for all your servers
Trynemjoel has joined #ruby
pleal has joined #ruby
ssvo has quit [Ping timeout: 245 seconds]
<Flashmasterson> i'm still not sure why this command isn't working, keep in mind that i'm completely new to programming       obj = Object.new
bionoid has joined #ruby
<Freeaqingme> atmosx, except it doesn't, but I should be able to debug this... I've got ruby1.9.1 installed, yet ruby -v shows 1.9.3
<Freeaqingme> that'd suggest things are a tad wrong there ;)
verazabeida has quit [Remote host closed the connection]
<csffsc> are you using a package manager, rvm or something like that?
verazabeida has joined #ruby
funburn has joined #ruby
<csffsc> you can have multiple versions of ruby installed
alexju has quit [Read error: Connection reset by peer]
<Flashmasterson> csffsc: i think i'm just using ruby
alexju has joined #ruby
<Freeaqingme> oh, this is an ubuntu joke. The version of the package ruby1.9.1 is 1.9.3
<atmosx> Flashmasterson: what does 'which ruby' say?
<Flashmasterson> atmosx: /Users/toreystriffolino/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
<atmosx> run 'sudo gem list' do you see your list of gems as you should?
<atmosx> Flashmasterson: then, it's RVM ruby
pleal has quit [Ping timeout: 240 seconds]
<atmosx> Flashmasterson: you're not running system-wide ruby anymore
knigitz has quit []
<Flashmasterson> ok how do i do that
shevy has joined #ruby
<Flashmasterson> atmosx: system wide i mean, if that's how that 'obj' command is going to work
<Flashmasterson> atmosx: i'm just trying to go step-by-step with the well-grounded rubyist
verazabeida has quit [Read error: No route to host]
<atmosx> Flashmasterson: no wait, now we're talking just about getting your library together (same path as ruby).
DropsOfSerenity has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Imaginativeone has quit [Read error: Operation timed out]
verazabeida has joined #ruby
<atmosx> Flashmasterson: again, if you are going to use ruby in more than 5 server and you can run the program you're going to run as root, I suggest you dump rvm.
volty has joined #ruby
<atmosx> Flashmasterson: if not, you need to install rvm on all your servers, which is a safe bet but I have no idea how you can do that automatically.
DropsOfSerenity has joined #ruby
<Flashmasterson> atmosx: well shit
orionstein_away is now known as orionstein
<atmosx> Flashmasterson: exactly
<Flashmasterson> atmosx: are you familiar with that book?
justsee has quit [Ping timeout: 245 seconds]
<atmosx> I've heard about it, never read it.
<atmosx> switch to root
<atmosx> sudo su -
<atmosx> install the gems you need
<atmosx> and run them, see what happens
<atmosx> you should get everything working out of the box
justsee has joined #ruby
s3itz has quit [Read error: Connection reset by peer]
<Flashmasterson> damn. i don't want to, because black doesn't say so.
Xaitec has joined #ruby
s3itz has joined #ruby
<Flashmasterson> trying to play it safe with instructions
<atmosx> I see.
<atmosx> well it's all about setting up paths correctly actually
<atmosx> and gems tend to mix up things on linux
Xaitec has quit [Remote host closed the connection]
<atmosx> it's maintainers fault actually, not ruby's
tsykoduk is now known as zz_tsykoduk
<atmosx> have to go to bed
<atmosx> cya later
atmosx has quit [Quit: Lost in trance]
bradhe has joined #ruby
pwh has joined #ruby
kazuuu has joined #ruby
DanKnox_away is now known as DanKnox
devoldmx has quit [Ping timeout: 272 seconds]
marcdel has joined #ruby
wallerdev has quit [Quit: wallerdev]
bradhe has quit [Ping timeout: 272 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
Xeago has quit [Remote host closed the connection]
Volsus has quit [Quit: Leaving]
theoretick has joined #ruby
nfk has quit [Quit: yawn]
korisnik has joined #ruby
korisnik has quit [Client Quit]
mojjoujo has joined #ruby
nilved has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
inorganicorc has joined #ruby
ssvo has joined #ruby
kaspergrubbe has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
jibi has quit [Quit: .]
Flashmasterson has quit [Quit: Leaving.]
mercwithamouth has quit [Ping timeout: 265 seconds]
inorganicorc has left #ruby ["Leaving"]
mklappstuhl has joined #ruby
kaspergrubbe has quit [Read error: Operation timed out]
failshell has joined #ruby
mary5030 has joined #ruby
failshell has quit [Remote host closed the connection]
nateberkopec has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
gmas has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
ewnd9 has joined #ruby
Mitchellvanw has quit [Quit: Quiting like a baws]
sepp2k has quit [Ping timeout: 272 seconds]
astrobunny has quit [Ping timeout: 240 seconds]
pleal has joined #ruby
kirun has quit [Quit: Client exiting]
mixel has quit [Quit: mixel]
g0bl1n_ has joined #ruby
ewnd9 has quit [Ping timeout: 272 seconds]
ce_afk is now known as cescalante
_dma has joined #ruby
bwarkee has joined #ruby
orionstein is now known as orionstein_away
roolebo has quit [Ping timeout: 248 seconds]
Trudko has quit [Read error: Connection reset by peer]
nilved has quit [Read error: Connection reset by peer]
xk_id has quit [Quit:
beilabs has quit [Ping timeout: 248 seconds]
astrobunny has joined #ruby
roolebo has joined #ruby
Ahti333_ has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
randomnick_ has quit [Quit: Leaving]
beilabs has joined #ruby
devoldmx has joined #ruby
sepp2k has joined #ruby
nilved has joined #ruby
boxmein has left #ruby ["[00:12.05] <\m> An into-solid turner"]
Ahti333 has quit [Ping timeout: 248 seconds]
Ahti333_ is now known as Ahti333
roolebo has quit [Ping timeout: 245 seconds]
Flashmasterson has joined #ruby
mixel has joined #ruby
bwarkee has left #ruby ["Textual IRC Client: www.textualapp.com"]
marcdel has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
mrsolo_ has joined #ruby
cescalante is now known as ce_afk
mercwithamouth has joined #ruby
endash_ has quit [Ping timeout: 248 seconds]
astrobunny has quit [Ping timeout: 240 seconds]
Flashmasterson has quit [Quit: Leaving.]
orien has joined #ruby
kitak has joined #ruby
kazuuu has quit [Remote host closed the connection]
kazuuu has joined #ruby
ehc has quit [Quit: ehc]
sergicles has joined #ruby
astrobunny has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
petey_ has joined #ruby
kazuuu has quit [Ping timeout: 265 seconds]
bionoid has quit [Remote host closed the connection]
petey_ has quit [Remote host closed the connection]
bionoid has joined #ruby
petey_ has joined #ruby
bradhe has joined #ruby
jonathanwallace has joined #ruby
mrsolo_ has quit [Quit: This computer has gone to sleep]
predator117 has joined #ruby
bionoid has quit [Ping timeout: 245 seconds]
sergicles has quit [Quit: sergicles]
petey_ has quit [Ping timeout: 245 seconds]
sergicles has joined #ruby
erinb has joined #ruby
predator217 has quit [Ping timeout: 272 seconds]
Ox6abe has quit [Remote host closed the connection]
Ox6abe has joined #ruby
Zesty has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mrsolo has joined #ruby
Ox6abe_ has joined #ruby
Ox6abe has quit [Ping timeout: 240 seconds]
csffsc_ has joined #ruby
Zesty has quit [Client Quit]
Ahti333 has quit [Quit: Computer has gone to sleep.]
justsee has quit [Ping timeout: 256 seconds]
tjad has quit [Read error: Operation timed out]
Steve009 has quit [Quit: Steve009]
csffsc has quit [Ping timeout: 265 seconds]
lsoa has quit [Ping timeout: 245 seconds]
lukec has quit [Quit: lukec]
kil0byte_ has joined #ruby
kil0byte has quit [Ping timeout: 245 seconds]
coderhs has quit [Ping timeout: 272 seconds]
devoldmx has quit [Ping timeout: 272 seconds]
devoldmx has joined #ruby
mayorga has quit [Read error: Connection reset by peer]
zarubin has quit [Ping timeout: 272 seconds]
Skylab has quit [Quit: Skylab]
jrhe has quit [Quit: jrhe]
ericmathison has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
VTLob has quit [Quit: VTLob]
g0bl1n_ has quit [Quit: Ex-Chat]
threesome has quit [Ping timeout: 256 seconds]
Heero` has quit [Ping timeout: 240 seconds]
hogeo has quit [Remote host closed the connection]