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
iamjarvo has quit [Ping timeout: 265 seconds]
mercwithamouth has joined #ruby
ssvo has quit [Ping timeout: 272 seconds]
<Alth> hey! Im trying to learn Ruby
ssvo_ has quit [Ping timeout: 265 seconds]
<Alth> How do you double the value of a number?
<glaksmono> anyone had experience with couchrest_model gem?
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
siwica has quit [Ping timeout: 245 seconds]
ffranz has quit [Quit: Leaving]
mikeg has quit [Ping timeout: 240 seconds]
siwica has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
Mars` has quit [Read error: Connection reset by peer]
DonRichie has quit [Read error: Operation timed out]
Mars` has joined #ruby
DonRichie has joined #ruby
Davey has joined #ruby
burlyscudd has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
fixl has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
Mars` has joined #ruby
Fire-Dragon-DoL has quit [Ping timeout: 248 seconds]
fourqqq has left #ruby [#ruby]
|PiP| has quit [Ping timeout: 240 seconds]
<havenwood> Alth: times it by 2: n * 2
kaspergr_ has quit [Remote host closed the connection]
Travis-42 has joined #ruby
burlyscudd has quit [Ping timeout: 265 seconds]
lfox has joined #ruby
kaspergrubbe has joined #ruby
shanlar has quit [Quit: Be back later]
<havenwood> Alth: (like you would in a calculator)
theRoUS has quit [Read error: Operation timed out]
jmkeyes has left #ruby [#ruby]
kaspergrubbe has quit [Ping timeout: 248 seconds]
aspires has joined #ruby
<Travis-42> I have a hash of multiple hashes with x,y keys and want to find the first 3 with the lowest y values (and if the y values match, by lowest x value)
<Travis-42> I've been trying to figure it out with min_by and sort_by, but am getting stuck. Any thoughts?
Fire-Dragon-DoL has joined #ruby
b1nd_ has joined #ruby
alx- has joined #ruby
stkowski has quit [Quit: stkowski]
Mars` has quit [Remote host closed the connection]
endash has quit [Quit: endash]
Mars` has joined #ruby
blischalk has joined #ruby
shanlar has joined #ruby
sdouglas has quit [Quit: sdouglas]
obs has quit [Quit: ChatZilla 0.9.87 [Iceape 2.7.12/20130119095535]]
Mars` has quit [Ping timeout: 248 seconds]
blackmesa has quit [Quit: WeeChat 0.4.1]
renderful has quit [Remote host closed the connection]
weeems has joined #ruby
siwica has quit [Ping timeout: 245 seconds]
weems has quit [Read error: Connection reset by peer]
asym has joined #ruby
monomyth has quit [Ping timeout: 248 seconds]
asteros has quit [Quit: asteros]
monomyth has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
barratt has quit [Quit: Leaving...]
<Travis-42> Ah never mind: sort { |hash| [hash[y], hash[x]] } .first(3)
asteros has joined #ruby
rgbdev has joined #ruby
Orez has joined #ruby
renderful has joined #ruby
<Orez> >>1
<eval-in> Orez => 1 (https://eval.in/55544)
<Orez> trying to replicate this for my bot... sorry
asteros has quit [Client Quit]
<Orez> >>puts 1
<eval-in> Orez => 1 ... (https://eval.in/55546)
<Orez> aha.
alx- has quit [Quit: Linkinus - http://linkinus.com]
lfox has quit [Quit: ZZZzzz…]
alx- has joined #ruby
asteros has joined #ruby
relix has joined #ruby
twoism has quit [Ping timeout: 272 seconds]
relix has quit [Client Quit]
kaspergrubbe has joined #ruby
julweber_ has joined #ruby
pragmatism has quit [Quit: Peace]
beilabs has quit [Ping timeout: 256 seconds]
beilabs has joined #ruby
julweber_ has quit [Remote host closed the connection]
julweber_ has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
julweber has quit [Ping timeout: 272 seconds]
brianpWins has joined #ruby
ephemerian has left #ruby [#ruby]
asteros has quit [Quit: asteros]
popl has quit [Read error: Operation timed out]
asteros has joined #ruby
orien has quit [Quit: Computer has gone to sleep.]
Mars` has joined #ruby
julweber_ has quit [Ping timeout: 240 seconds]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
duggiefresh has joined #ruby
leynos has quit [Quit: Off to dreams of Laserdiscs and Neo-Geos]
kaspergrubbe has quit [Ping timeout: 272 seconds]
aryaching_ has joined #ruby
asteros has quit [Quit: asteros]
Flashmasterson has joined #ruby
Gooder has joined #ruby
benlieb has joined #ruby
<Flashmasterson> i'm trying to request information through irb by entering 'irb —simple-prompt' but i get this error: yntaxError: (irb):6: syntax error, unexpected unary-, expecting keyword_do or '{' or '('
<Flashmasterson> irb --simple-prompt --rrbconfig
<Flashmasterson> ^
<Flashmasterson> from /Users/toreystriffolino/.rvm/rubies/ruby-2.0.0-p247/bin/irb:16:in `<main>'
<Flashmasterson> sorry, by entering *irb —simple-prompt rrbconfig'
musty has joined #ruby
rgbdev has quit [Quit: rgbdev]
aryaching has quit [Ping timeout: 240 seconds]
<Flashmasterson> that's while i'm in irb though
xk_id has quit [Quit:
Mars` has quit [Remote host closed the connection]
duggiefresh has quit [Ping timeout: 272 seconds]
sdouglas has joined #ruby
Mars` has joined #ruby
drumsrgr8forn8 has quit [Remote host closed the connection]
Orez has left #ruby [#ruby]
drumsrgr8forn8 has joined #ruby
beilabs has quit [Ping timeout: 265 seconds]
b00stfr3ak has quit [Ping timeout: 272 seconds]
musty_ has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
Voodoofish430 has quit [Quit: Leaving.]
zzz_taion809 is now known as taion809
drumsrgr8forn8 has quit [Ping timeout: 240 seconds]
mfridh has quit [Read error: Connection reset by peer]
musty has quit [Read error: Connection reset by peer]
felixjet_ has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
musty_ is now known as musty
xxpor has joined #ruby
sepp2k1 has quit [Quit: Leaving.]
jrhe has quit [Quit: jrhe]
burlyscudd has joined #ruby
felixjet has quit [Ping timeout: 248 seconds]
kazuuu has quit [Remote host closed the connection]
kazuuu has joined #ruby
theRoUS has joined #ruby
yano has quit [Ping timeout: 624 seconds]
whunt has quit [Quit: Computer has gone to sleep.]
heidi has quit [Quit: Leaving.]
jrhe has joined #ruby
burlyscudd has quit [Ping timeout: 248 seconds]
beilabs has joined #ruby
musty_ has joined #ruby
kazuuu has quit [Ping timeout: 265 seconds]
julweber has joined #ruby
musty has quit [Read error: Connection reset by peer]
Guest__ has joined #ruby
soheil_ has quit [Remote host closed the connection]
<Flashmasterson> 'the well-grounded rubyist' is showing me the names and functions of some ruby files, but i can't see where it explains how to open them
<Flashmasterson> in the ruby directory
musty_ has quit [Ping timeout: 248 seconds]
soheil has joined #ruby
jkline has joined #ruby
Soda has quit [Read error: Connection reset by peer]
soheil has quit [Remote host closed the connection]
jrhe has quit [Quit: jrhe]
axsuul has joined #ruby
sdouglas has quit [Quit: sdouglas]
tharindu has joined #ruby
guns has joined #ruby
randomnick_ has quit [Remote host closed the connection]
jkline has quit [Client Quit]
jalcine_ is now known as jalcine
mva3212 has joined #ruby
julweber has quit [Ping timeout: 248 seconds]
Guest__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Travis-42 has left #ruby [#ruby]
jalcine is now known as jalcine_
preller has quit [Ping timeout: 240 seconds]
finnomenon has quit [Ping timeout: 248 seconds]
jonahR has joined #ruby
finnomenon has joined #ruby
preller has joined #ruby
<havenwood> Flashmasterson: it is two dashes: irb --simple-prompt
<havenwood> Flashmasterson: Usually you open a Ruby file with a text editor, is that what you mean?
<Flashmasterson> havenwood: ah, it showed as a single line on here (before 'simple'), and i guess that's what i mean - i'm very new to this
DrShoggoth has quit [Ping timeout: 260 seconds]
T__T has quit [Remote host closed the connection]
amacgregor_ has joined #ruby
<Flashmasterson> havenwood: so i'm unsure about how to get cgi.rb for example, to open it's innards and let me study it's coding
T__T has joined #ruby
amacgregor has quit [Ping timeout: 265 seconds]
pwh has quit []
dhruvasagar has quit [Read error: Operation timed out]
mrsolo has quit [Quit: This computer has gone to sleep]
pwu has joined #ruby
duggiefresh has joined #ruby
DanBoy has joined #ruby
fuhgeddaboudit has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<Flashmasterson> havenwood: without the use of Finder or anything but my terminal/text editor
<Flashmasterson> *or text editor
T__T has quit [Remote host closed the connection]
preller has quit [Ping timeout: 240 seconds]
devoldmx3 has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
<DanBoy> you get iterm2 yet Flashmasterson
hamakn has joined #ruby
<Flashmasterson> DanBoy: shit, no - is it free? i just have the first one
<DanBoy> ya its free
<Flashmasterson> sick
<Flashmasterson> searching now
<Flashmasterson> 1.2.2 of twgr. doin' it right
<DanBoy> try using it in full screen and swipe between desktops to get to it
<DanBoy> much faster
<it_tard> if i want to evaluate some expression and increment a variable that would carry over to the next time it's called (a lambda?) then how do i do that
<heftig> no need for closures; you could store state in an object
<Flashmasterson> DanBoy: man since mountain lion made that hard to do, i used to just be able to swing my four fingers left or right to get that - how is it done now?
<DanBoy> just three finger swipe
<DanBoy> im on lion though but im sure it hasn't changed
bradhe has quit [Remote host closed the connection]
pwu has quit [Quit: Leaving]
kaspergrubbe has joined #ruby
<DanBoy> i keep sublime and the terminal in full screen and swipe back and forth
bradhe has joined #ruby
<DanBoy> and one screen for the book if your using an ebook
<DanBoy> three fingers upward should show you all your desktops
<it_tard> heftig, but how do i pass it to the block?
<DanBoy> and three fingers left/right swaps
mercwithamouth has joined #ruby
<it_tard> 30.times {if arr[p rand 5] counter=counter+1} #counter is left untouched
<it_tard> wait
<it_tard> worse, irb itself is derping at the code
<Flashmasterson> yeaah that's the one i want DanBoy how is it named in your system preferences? i
<Flashmasterson> 'll try to find it
<it_tard> oops, where did that p come from
<DanBoy> you mean in the applications list?
<DanBoy> or the swipe config
<DanBoy> i don't think i had to change anything there
<DanBoy> i keep it like this
aspires has joined #ruby
cathyquack has joined #ruby
renderful has quit [Remote host closed the connection]
<DanBoy> main desktop -> book -> sublime -> terminal
<it_tard> i can't believe i have forgotten how to do control logic in ruby again
radic_ has joined #ruby
radic has quit [Disconnected by services]
<DanBoy> and of course spotify :D at the end is optional
<cathyquack> hi
<DanBoy> yo
mercwithamouth has quit [Read error: Operation timed out]
<Flashmasterson> DanBoy: haha yeah. nah i mean how is it named in system preferences/track pad/gestures or whatever yours is called
<cathyquack> is this an appropriate channel for rails talk?
preller has joined #ruby
<DanBoy> i don't know but you shouldn't have to change anything there
<DanBoy> three swipes upward will show you your desktops and you can add them
<Flashmasterson> fuckin' mountain lion...
<it_tard> cathyquack, no
<DanBoy> should be a plus button to the right
bradhe has quit [Ping timeout: 272 seconds]
<cathyquack> ok. thanks.
<Flashmasterson> oh oh
<it_tard> cathyquack, have you tried #RubyOnRails ?
<DanBoy> you need to be registered for that chan
<cathyquack> i was just looking for the right channel. thanks
mmitchell has joined #ruby
<Flashmasterson> DanBoy: the only thing i see with a plus button, is on the bottom left and in the wondow that the F4 button brings - with the widgets
Vivekananda_ has quit [Quit: Leaving]
b1nd_ has quit [Quit: Leaving]
<DanBoy> you need to hover up near the top right
<DanBoy> after three swipes upward
<DanBoy> by default you should see like 4 desktops
heidi has joined #ruby
b1nd_ has joined #ruby
<DanBoy> thats what it should look like
cathyquack has left #ruby [#ruby]
<DanBoy> if you hover your mouse in the upper right you'll see a plus button
guns has quit [Quit: guns]
<DanBoy> if you install iterm2 and set it full screen it'll use its own desktop anyway though you shouldn't need to create one
<Flashmasterson> DanBoy: hahhaha wow. what a trip
<DanBoy> same with sublime
Jdubs_ has joined #ruby
burlyscudd has joined #ruby
reppard has joined #ruby
mmitchell has quit [Ping timeout: 265 seconds]
<Flashmasterson> DanBoy: so you suggest assigning each of those things you listed to a different desktop, then switch between using the three-fingers-up method?
<DanBoy> yes highly
Mars` has joined #ruby
<DanBoy> i mean swipe right or left with 3 fingers
<DanBoy> three up just shows you them
reppard has quit [Client Quit]
drumsrgr8forn8 has joined #ruby
<DanBoy> and lets you drag apps to other desktops
<DanBoy> your using an ebook right?
Jdubs has quit [Ping timeout: 248 seconds]
<Flashmasterson> no ebook, paper on my desk
<Flashmasterson> so sublime text2 > iterm2 > adium > itunes
<DanBoy> oh ok
Cheos has quit [Quit: Leaving...]
<DanBoy> mine is like this
burlyscudd has quit [Ping timeout: 248 seconds]
nessib has quit [Quit: quit]
<DanBoy> google chrome/adium/mail -> ebook -> sublime -> iterm2 -> spotify
<DanBoy> just give sublime and iterm full screen though
<Flashmasterson> cool and we can choose different wallpaper for each.
<Flashmasterson> ooh
Mars` has quit [Ping timeout: 272 seconds]
theRoUS has quit [Ping timeout: 245 seconds]
drumsrgr8forn8 has quit [Ping timeout: 272 seconds]
<Flashmasterson> alright i got it
<Flashmasterson> so ruby question:
aep has quit [Ping timeout: 248 seconds]
<Flashmasterson> i want to check out the Ruby code of cgi.rb but don't see instructions on how to bring it up through the terminal, just finder… which i can't find using; ironically
<it_tard> i think i might be high
<DanBoy> how long is the file
<it_tard> if i wasn't so tired, i'd check if i'm doing it correctly
aep has joined #ruby
Mars` has joined #ruby
danshultz has joined #ruby
<Flashmasterson> DanBoy: me?
<DanBoy> type "pwd" for me
<DanBoy> ya
<DanBoy> without the quotes
<DanBoy> and show me
<Flashmasterson> it said: /users/toreystriffolino/desktop/rubystuf/rubysamplecode"
kaspergrubbe has quit [Read error: Connection reset by peer]
<Flashmasterson> sorry * /rubystuff
kaspergrubbe has joined #ruby
ewnd9 has joined #ruby
<DanBoy> on your mac to copy and paste easily just highlight your text and hit command -> C and command -V to paste
lusory has joined #ruby
<DanBoy> ok so now type
<Flashmasterson> yeah i did that but adium said the irc couldn't read it
<Flashmasterson> or it "received a message it did not understand"
<DanBoy> ok so you can't find this file right
tharindu has quit [Quit: Leaving...]
<Flashmasterson> right
<DanBoy> try this
<Flashmasterson> but i have ruby.2.0.0.
threesome has quit [Ping timeout: 248 seconds]
<DanBoy> ls -al | grep -i cgi.rb
<DanBoy> you should make a Projects directory to work in
soheil has joined #ruby
<DanBoy> not on the desktop
jonathanwallace has joined #ruby
<Flashmasterson> i have that but it's in a folder in the desktop, that should be ok right?
<DanBoy> it'll work
benlieb has quit [Quit: benlieb]
<DanBoy> for now i guess
kaspergrubbe has quit [Remote host closed the connection]
<Flashmasterson> ok i got this Macintosh:rubysamplecode toreystriffolino$ ls -al | grep -i cgi.rb
<Flashmasterson> -rw-r--r-- 1 toreystriffolino staff 0 Oct 18 21:59 cgi.rb
<DanBoy> there you
<DanBoy> its in that directory
<DanBoy> you wanna see whats in it?
<Flashmasterson> yeah
<DanBoy> cat cgi.rb
benlieb has joined #ruby
<Flashmasterson> 'cat' stands for categorize ?
<DanBoy> or load it up in sublime if you have that yet
<DanBoy> i dunno is been like 14 years i forgot what it stands for :P
<Flashmasterson> ah. ok i tried loading cgi.rb and it just pulled up a black file
<DanBoy> do you have sublime?
<Flashmasterson> yeah sublime text 2
soheil has quit [Ping timeout: 240 seconds]
<DanBoy> i would load it up in sublime verses the terminal
<Flashmasterson> because it's easier to read?
tjad has joined #ruby
danshultz has quit [Remote host closed the connection]
<DanBoy> ya
danshultz has joined #ruby
<Flashmasterson> ok i tried doing that but cgi.rb is just a blank file
<Flashmasterson> when it loads into sublime
<DanBoy> you should make a directory to work out of for the remainder of the book
<DanBoy> ok run
<DanBoy> cat cgi.rb | wc -l
<Flashmasterson> the number 0 appeared
<DanBoy> its blank then
<DanBoy> or empty
<Flashmasterson> hmm
<Flashmasterson> i'm confused
tjad has quit [Ping timeout: 240 seconds]
<Flashmasterson> it says "tools to facilitate CGI programming"
<DanBoy> whered you get that file
jackjackdrpr has quit [Quit: Leaving.]
<Flashmasterson> apparently i created it
danshultz has quit [Ping timeout: 245 seconds]
<Flashmasterson> but black says it comes with ruby when we install it
<Flashmasterson> the standard library subdirectory
<Flashmasterson> for Ruby
aspires has quit [Quit: sudo making a sandwich]
<DanBoy> type
<DanBoy> which ruby
mercwithamouth has joined #ruby
<DanBoy> dude you just got an empty file there
<Flashmasterson> 2.0.0.
<Flashmasterson> i know that's why i'm confused
Mars` has quit [Remote host closed the connection]
<DanBoy> well you gotta put some code in it
<Flashmasterson> so this is what he says about it:
Mars` has joined #ruby
Shidash1 has joined #ruby
petey_ has joined #ruby
Shidash has quit [Read error: Connection reset by peer]
<DanBoy> when you say 'black' you mean the author right
<Flashmasterson> yeah
<DanBoy> ok
kcin has joined #ruby
aspires has joined #ruby
maycon has quit [Ping timeout: 272 seconds]
<Flashmasterson> Section 1.2.1 The Ruby standard library subdirectory.In rubylibdir, you'll find program files written in Ruby. These files provide standard library facilities, which you can require from your own programs if you need the functionality they provide
<Flashmasterson> Here's a sampling of the files you'll find in this directory:
<Flashmasterson> and the first one he lists is cgi.rb
<Flashmasterson> it's function being "Tools to facilitate CGI programming"
it_tard has quit [Quit: yawn]
petey_ has quit [Remote host closed the connection]
<DanBoy> ya im guessing hes telling you about some libraries
heidi has quit [Quit: Leaving.]
<DanBoy> if you wanted to do cgi coding you could "require" them
petey_ has joined #ruby
lfox has joined #ruby
<Flashmasterson> well i just wanna see the Ruby code for any of the files he lists as samples of that directory
havenwood has quit [Remote host closed the connection]
<Flashmasterson> to study and compare with the little that i already know
Mars` has quit [Ping timeout: 272 seconds]
<DanBoy> type
benlieb has quit [Quit: benlieb]
<DanBoy> ls -al | grep -i rubylibdir
<DanBoy> did you download the source code for the book somewhere
shanlar- has joined #ruby
heidi has joined #ruby
heidi has quit [Client Quit]
shanlar has quit [Ping timeout: 248 seconds]
tjad has joined #ruby
ravster has quit [Quit: Leaving.]
<Flashmasterson> well he assumes that i have ruby downloaded already
<Flashmasterson> and i got this btw "Macintosh:rubysamplecode toreystriffolino$ ls -al | grep -i rubylibdir
<Flashmasterson> Macintosh:rubysamplecode toreystriffolino$ "
<Flashmasterson> just back to the command prompt
petey_ has quit [Ping timeout: 256 seconds]
<DanBoy> ok that dir isn't there then
<DanBoy> don't get hung up on this
<DanBoy> you have ruby installed system wide
<DanBoy> you didn't use rvm right?
<Flashmasterson> over a month ago
<Flashmasterson> i'm pretty sure i have it installed and current
beilabs has quit [Ping timeout: 240 seconds]
johnnyfuchs has quit [Quit: Leaving.]
<Flashmasterson> but wait, that's disconcerting if i don't have the Ruby standard library subdirectory installed
<Flashmasterson> right? i don't know
<DanBoy> you have it
<DanBoy> do you remember using rvm to install ruby?
<Flashmasterson> i do
<Flashmasterson> that happened for sure
<DanBoy> or are you using what came with the mac
<DanBoy> ok
mrsolo has joined #ruby
<DanBoy> then show me
<DanBoy> type
<DanBoy> which ruby
<Flashmasterson> Macintosh:rubysamplecode toreystriffolino$ which ruby
<Flashmasterson> /Users/toreystriffolino/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
<DanBoy> ok
patricklamoreux has quit [Ping timeout: 268 seconds]
popl has joined #ruby
popl has joined #ruby
<DanBoy> alright
<DanBoy> looks like you want to view some of the standard lib
tharindu has joined #ruby
<DanBoy> then
<Flashmasterson> i do
<DanBoy> i guess you want this
<DanBoy> ~/.rvm/src/ruby-1.9.3-p448/lib$
<DanBoy> replace the ruby version with yours
<DanBoy> and the ~ means your home directory
<DanBoy> you can look at them all to your hearts content
<Flashmasterson> -bash: /Users/toreystriffolino/.rvm/src/ruby-2.0.0-p448/lib$: No such file or directory
thesheff17 has quit [Remote host closed the connection]
<DanBoy> type
axl_ has joined #ruby
<DanBoy> cd /Users/toreystriffolino/.rvm/src/ruby-2.0.0-p448/lib
<Flashmasterson> ah with quotes before and after?
<DanBoy> no quotes
thesheff17 has joined #ruby
<Flashmasterson> ok same response
<DanBoy> honestly you wanna get there in sublime
<Flashmasterson> i'll try that too but why?
<Flashmasterson> or you said why
<Flashmasterson> nvm'
<DanBoy> because when you want to look at the files sublime
<DanBoy> will make them look a lot better
<Flashmasterson> with the coloration and everything
<Flashmasterson> got it
<DanBoy> ya
<DanBoy> just get to ~/.rvm in sublime and look around
<Flashmasterson> ok i searched for it in there to open and nothing came up
<Flashmasterson> ok
osvico has joined #ruby
ChronocityLC has joined #ruby
renderful has joined #ruby
<Flashmasterson> i just got UPGRADING.rdoc - that ok?
<DanBoy> from the menu in sublime goto 'open'
<DanBoy> and try and open .rvm
<DanBoy> that directory
Mars` has joined #ruby
<DanBoy> and see whats in it
<Flashmasterson> just two pdf's of hartl's ror
rjhunter has joined #ruby
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
<DanBoy> you got the wrong dir then
<DanBoy> /Users/toreystriffolino/.rvm
brennanMKE has joined #ruby
<DanBoy> is what you want to open and look around
brennanMKE has quit [Read error: Connection reset by peer]
brennanM_ has joined #ruby
<Flashmasterson> ok now i just have a few 'development.log'
brennanM_ has quit [Remote host closed the connection]
<DanBoy> type this for me then lol
<DanBoy> cd ~/.rvm ; ls
lfox has quit [Quit: ZZZzzz…]
<Flashmasterson> LICENCEVERSIONconfigexampleshelplibpatchesscriptstmp
<Flashmasterson> READMEarchivescontribgemshookslogpatchsetsshareuser
<Flashmasterson> RELEASEbinenvironmentsgemsetsinstalled.atmanrubiessrcwrappers
devoldmx3 has quit [Ping timeout: 248 seconds]
<DanBoy> there
<DanBoy> see you have it
<DanBoy> your not opening it right in sublime
<Flashmasterson> but i copied and pasted exactly what ou types
<Flashmasterson> *you typed
Mars` has quit [Ping timeout: 272 seconds]
eka has quit [Quit: Computer has gone to sleep.]
<Flashmasterson> and the .rvm in that /'Users/toreystriffolino/.rvm' doesn't appear there when i look for it manually through the Finder
maycon has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<DanBoy> thats becuase its a hidden file
<Flashmasterson> ah
<DanBoy> you need to change it to view hidden files
<DanBoy> my bad
<DanBoy> anything with a . in front of it is hidden
<Flashmasterson> ahh
<Flashmasterson> ok good to know, where do i change that
<DanBoy> Finders preferences im guessing
<DanBoy> lemme look
<DanBoy> honestly i've never had to do that in finder, i'm always in a terminal
<Flashmasterson> i'd like for that to be my case too but it's giving me trouble
Deele has quit [Ping timeout: 260 seconds]
jonathanwallace has quit [Quit: WeeChat 0.4.1]
aspires has quit [Quit: sudo making a sandwich]
bradhe has joined #ruby
burlyscudd has joined #ruby
<DanBoy> do that
<DanBoy> in sublime
<DanBoy> forget finder
rickmasta has quit [Quit: Leaving...]
nism-pi has quit [Read error: Operation timed out]
nism-pi1 has joined #ruby
<Flashmasterson> hahahah ok
<Flashmasterson> thanks
<b1nd_> sublime is really popular with ruby devs hey?
Rick has joined #ruby
<Flashmasterson> sweet this will be cool
jbpros has joined #ruby
Rick is now known as Guest46629
<DanBoy> i do but you might start a war here ;P
burlyscudd has quit [Ping timeout: 240 seconds]
<DanBoy> ok so in sublime goto open then to /Users/YOU/ and press command->shift->. you should see .rvm
devoldmx has joined #ruby
jbpros has quit [Client Quit]
bradhe_ has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
idoru has joined #ruby
nmabry has joined #ruby
b00stfr3ak has joined #ruby
sevenseacat has joined #ruby
<DanBoy> still alive
soheil has joined #ruby
tharindu has quit [Quit: Leaving...]
johnnyfuchs has joined #ruby
astrobunny has quit [Ping timeout: 248 seconds]
<Flashmasterson> shit yeah
<Flashmasterson> sorry, a friend just got here
<DanBoy> rollin up
<Flashmasterson> yeah that worked. the command combo in the link
deens has joined #ruby
<Flashmasterson> very helpful
<Flashmasterson> shit cmd period
<Flashmasterson> hahaha
<Flashmasterson> *shift
<Flashmasterson> thanks a lot for your help
<Flashmasterson> gotta split
Flashmasterson has quit [Quit: Leaving.]
mercwithamouth has quit [Ping timeout: 248 seconds]
nism-pi1 is now known as nism-pi
mrsolo has quit [Quit: This computer has gone to sleep]
astrobunny has joined #ruby
Guest46629 has quit [Quit: Leaving...]
tharindu has joined #ruby
bradhe_ has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 272 seconds]
bradhe has joined #ruby
danshultz has joined #ruby
|PiP| has joined #ruby
mercwithamouth has joined #ruby
johnnyfuchs has quit [Quit: Leaving.]
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
Lewix has quit [Read error: Connection reset by peer]
pwh has joined #ruby
Lewix has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
astrobunny has joined #ruby
danshultz has quit [Ping timeout: 272 seconds]
bobdobbs has joined #ruby
orionstein_away is now known as orionstein
astrobunny has quit [Read error: Connection reset by peer]
astrobun_ has joined #ruby
MrSamuel has joined #ruby
<MrSamuel> Hi
<MrSamuel> I'm encountering a weird bug with methods names
<MrSamuel> method names with underscores would be treated the same by the parser as method names without underscores right?
<DanBoy> ya
<MrSamuel> what about with the new named parameters syntax
<MrSamuel> foo_bar baz:10
<MrSamuel> vs foo_bar(baz: 10)
<MrSamuel> vs foobar(baz: 10)
<DanBoy> this something in 2.0?
<MrSamuel> I'm not really sure
<MrSamuel> I'm using a metaclass and define_method
<MrSamuel> but getting weird behaviour
<MrSamuel> methods with underscores aren't working
<MrSamuel> maybe I am royally fucking something up
<MrSamuel> it works fine with brackets
<MrSamuel> but breaks without
<DanBoy> baz: 10 is just a hash argument right
<MrSamuel> yep
<MrSamuel> i.e.
<MrSamuel> This works: `compile source_files: ['foo.cpp'], object_file: 'foo.o'`
<MrSamuel> This fails `compile_cpp source_files: ['foo.cpp'], object_file: 'foo.o'`
<MrSamuel> its defined exactly the same way
<MrSamuel> in the meta class
<MrSamuel> i.e. if I change it to
<MrSamuel> `compile_cpp(source_files: ['foo.cpp'], object_file: 'foo.o')`
<MrSamuel> then it works too
axl_ has quit [Quit: axl_]
<DanBoy> i dunno dude
<DanBoy> thats weird
<MrSamuel> If I make an isolated test case
<MrSamuel> it works too
<MrSamuel> man
<MrSamuel> I'm doing something weird somewhere
tharindu has quit [Quit: Leaving...]
mixel has quit [Quit: mixel]
<MrSamuel> ah
<MrSamuel> found it
alx- has quit [Read error: Connection reset by peer]
<DanBoy> what was it
<MrSamuel> there was a variable in a higher scope
<MrSamuel> instead of using the method defined by instance_eval
<MrSamuel> it was trying to do something weird with the variable
<MrSamuel> when I used the brackets
<MrSamuel> it HAD to invoke the method
<MrSamuel> therefore it did the correct lookup
<DanBoy> ah
<MrSamuel> i.e.
<MrSamuel> compile_cpp = SomeObject.new
<MrSamuel> was one level up the lexical scope
<MrSamuel> I'm surprised to see that
<MrSamuel> I have a method which use instance_eval and provides those methods
<MrSamuel> still, that is pretty odd
nmabry has quit [Quit: nmabry]
<MrSamuel> fixed the bug by putting all the init code in a setup method in my test script, and it returns the finished object
<MrSamuel> then I use that for instance eval
<MrSamuel> but the script lexical scope is kept mostly free of crap
mmitchell has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
<MrSamuel> thanks
<MrSamuel> bye :D
MrSamuel has quit [Quit: MrSamuel]
maz-dev has quit [Ping timeout: 256 seconds]
mmitchell has joined #ruby
<bobdobbs> hey guys. I'm a non-ruby person. I'm wondering if I can somehow use guard-reload for a wordpress project.
<bobdobbs> Could that be possible?
NinjaPenguin_ has joined #ruby
NinjaPenguin has quit [Ping timeout: 245 seconds]
guyz has quit [Ping timeout: 260 seconds]
idiocrash has joined #ruby
|PiP| has quit [Ping timeout: 265 seconds]
Banistergalaxy has joined #ruby
x1337807x has joined #ruby
kreeves has quit [Ping timeout: 248 seconds]
idiocrash has quit [Remote host closed the connection]
astrobun_ has quit [Ping timeout: 248 seconds]
polaco is now known as polaco_zZz
digifiv5e has joined #ruby
nism-pi has quit [Ping timeout: 240 seconds]
digifiv5e is now known as Guest54029
banisterfiend has quit [Quit: Computer has gone to sleep.]
Monie has joined #ruby
astrobunny has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
mmitchell has joined #ruby
tharindu has joined #ruby
soheil has quit [Ping timeout: 240 seconds]
kcin has quit [Ping timeout: 240 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
nism-pi has joined #ruby
sayan has joined #ruby
burlyscudd has quit [Ping timeout: 272 seconds]
orionstein is now known as orionstein_away
Davey has joined #ruby
kazuuu has joined #ruby
Guest54029 has quit [Ping timeout: 256 seconds]
astrobunny has quit [Ping timeout: 240 seconds]
rickyrickyrice has joined #ruby
yano has joined #ruby
drumsrgr8forn8 has joined #ruby
sayan has quit [Ping timeout: 248 seconds]
mrsolo has joined #ruby
rickyrickyrice has quit [Client Quit]
orien has joined #ruby
digifiv5e_ has joined #ruby
kcin has joined #ruby
astrobunny has joined #ruby
Monie has quit [Quit: Textual IRC Client: www.textualapp.com]
Monie has joined #ruby
mmitchell has quit [Ping timeout: 272 seconds]
devoldmx3 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
mmitchell has joined #ruby
duggiefresh has quit [Remote host closed the connection]
mmitchel_ has joined #ruby
mmitchell has quit [Ping timeout: 272 seconds]
pwh has quit []
sayan has joined #ruby
orien has quit []
end_guy has joined #ruby
deens has quit [Remote host closed the connection]
pwh has joined #ruby
mklappstuhl has joined #ruby
aspires has joined #ruby
<robert_> so I'm going to be working with large lists of data. of like, 6,000+ items in a hash and repetitively looking to see if a specific value is in the list, in the hopes that it is unique.. would it be a good idea to use Ruby to do this?
<robert_> or should I use another language?
alexju has joined #ruby
<havenwood> robert_: Ruby is plenty capable in that regard, use away.
<robert_> okay. so what about generating an entry that would be unique in said list?
<robert_> it's going back into a database
<robert_> and has anybody here used gearman-ruby?
kazuuu has quit [Remote host closed the connection]
kazuuu has joined #ruby
sevenseacat has left #ruby [#ruby]
jbpros has joined #ruby
maz-dev has joined #ruby
heidi has joined #ruby
dhruvasagar has joined #ruby
kazuuu has quit [Ping timeout: 272 seconds]
aspires has quit [Quit: sudo making a sandwich]
asteros has joined #ruby
<havenwood> robert_: I've never heard of gearman. It handles workers/jobs? The usually tools I'd think of in that arena are sidekiq or resque. I've heard good things about beanstalkd too.
maz-dev has quit [Ping timeout: 248 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
mklappstuhl has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
roflpox has quit [Quit: Leaving]
ssmithstone has joined #ruby
soheil has joined #ruby
lsoa has joined #ruby
sayan has quit [Ping timeout: 248 seconds]
burlyscudd has joined #ruby
nism-pi has quit [Ping timeout: 248 seconds]
jbpros has quit [Quit: jbpros]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
NinjaPenguin has joined #ruby
kracekumar has joined #ruby
NinjaPenguin_ has quit [Ping timeout: 272 seconds]
burlyscudd has quit [Ping timeout: 248 seconds]
rjhunter has quit [Remote host closed the connection]
soheil has quit [Ping timeout: 272 seconds]
<robert_> havenwood: yeah.
<robert_> hm
<robert_> well I'm aiming for a non-ruby technology so I can implement things that would be better suited in other languages
<robert_> but it all needs to play well together.
dhruvasagar has joined #ruby
<robert_> yeah I'm also aiming for a more or less strongly-namespace'd solution
orien has joined #ruby
ryanRT has joined #ruby
yfeldblum has quit [Read error: Operation timed out]
asteros has quit [Quit: asteros]
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
asteros has joined #ruby
hello_world has joined #ruby
jayne has quit [Read error: Connection reset by peer]
uxp has quit [Read error: Connection reset by peer]
sparq_ has joined #ruby
hamakn has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
jayne has joined #ruby
mmitchel_ has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Operation timed out]
tickner has quit [Remote host closed the connection]
nonamehero has quit [Ping timeout: 240 seconds]
sparq_ has quit [Remote host closed the connection]
alexju_ has joined #ruby
nonamehero has joined #ruby
tomzx_mac has quit [Read error: Operation timed out]
stayarrr has joined #ruby
uxp has joined #ruby
alexju has quit [Ping timeout: 272 seconds]
simoz has joined #ruby
OdNairy has joined #ruby
AxonetBE has joined #ruby
asteros has quit [Quit: asteros]
amacgregor has joined #ruby
orien has quit [Quit: Computer has gone to sleep.]
amacgregor_ has quit [Read error: Operation timed out]
pwh has quit []
DonRichie has quit [Ping timeout: 256 seconds]
kracekumar has quit [Quit: Computer has gone to sleep.]
pwh has joined #ruby
bricker`LA has quit [Ping timeout: 272 seconds]
asteros has joined #ruby
DonRichie has joined #ruby
Liothen has joined #ruby
hello_world has quit [Ping timeout: 250 seconds]
robert_ has quit [Read error: Connection reset by peer]
tharindu has quit [Quit: Leaving...]
ozzloy has quit [Remote host closed the connection]
sevenseacat has joined #ruby
DonRichie has quit [Ping timeout: 248 seconds]
DonRichie has joined #ruby
robert_ has joined #ruby
ChronocityLC has quit [Ping timeout: 272 seconds]
osvico has quit [Ping timeout: 248 seconds]
r0bby_ has joined #ruby
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
hamakn has joined #ruby
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
jonahR has quit [Quit: jonahR]
pirelenito has joined #ruby
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
i8igmac has quit [Quit: Leaving]
simoz has quit [Ping timeout: 272 seconds]
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
bradhe has joined #ruby
AxonetBE has quit [Quit: AxonetBE]
burlyscudd has joined #ruby
dash_ has joined #ruby
ssmithstone has quit [Ping timeout: 240 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
WillAmes has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
WillAmes has joined #ruby
burlyscudd has quit [Ping timeout: 265 seconds]
tharindu has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
s2013_ has joined #ruby
<s2013_> if i wanted to save a list of keywords and how many times they appeared, what would be the best way? hash?
bradhe has quit [Remote host closed the connection]
<sevenseacat> hash would make sense.
bradhe has joined #ruby
thesheff17 has quit [Ping timeout: 265 seconds]
habanany has joined #ruby
alexju_ has quit [Remote host closed the connection]
alexju has joined #ruby
julweber has joined #ruby
thesheff17 has joined #ruby
habanany has quit [Client Quit]
bradhe has quit [Ping timeout: 272 seconds]
<s2013_> thing is i need to store it in a database. and then change it later
<s2013_> so do i store the hash as text?
io_syl has quit []
alexju has quit [Ping timeout: 272 seconds]
habanany has joined #ruby
<popl> you mean serialize it?
<s2013_> yeah
<havenwood> s2013_: Marshall, YAML, JSON, MsgPack, but yeah, serialize
<s2013_> but the field type would be text right?
<s2013_> i guess what im really confused about is what if there are 100s of keywords. is that saved in one hash?
<popl> #to_yaml
<jrobeson> you could use the postgres hstore type also
<jrobeson> if you're using postgres that is..
<s2013_> yeah pg. ok ill look at hstore
xk_id has joined #ruby
sevenseacat has quit [Remote host closed the connection]
<s2013_> k im going to switch over to the rails channel cause i have some more rails specific question
xk_id has quit [Client Quit]
sayan has joined #ruby
burlyscudd has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
soheil has joined #ruby
habanany has quit [Quit: Bye]
burlyscudd has quit [Ping timeout: 245 seconds]
Davey has quit [Remote host closed the connection]
amritanshu_RnD has joined #ruby
thesheff17 has quit [Ping timeout: 248 seconds]
zeade has quit [Quit: Leaving.]
carraroj has joined #ruby
k0rupted has quit [Quit: Byyye]
soheil has quit [Ping timeout: 272 seconds]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pwh has quit []
b1nd_ has quit [Disconnected by services]
b1nd_ has joined #ruby
ssvo has joined #ruby
noopq has joined #ruby
b1nd_ has quit [Disconnected by services]
b1nd_ has joined #ruby
b1nd_ has quit [Disconnected by services]
b1nd_ has joined #ruby
Jdubs_ has quit [Remote host closed the connection]
ssvo has quit [Ping timeout: 240 seconds]
b1nd_ has quit [Disconnected by services]
Jdubs has joined #ruby
b1nd_ has joined #ruby
kracekumar has quit [Quit: Computer has gone to sleep.]
ewnd9 has quit [Remote host closed the connection]
Davey has joined #ruby
Jdubs_ has joined #ruby
gmas has quit [Ping timeout: 240 seconds]
Jdubs_ has quit [Remote host closed the connection]
Jdubs has quit [Ping timeout: 248 seconds]
b1nd_ has quit [Disconnected by services]
k0rupted has joined #ruby
dzhulk has joined #ruby
Asher has quit [Quit: Leaving.]
bean has quit [Read error: Connection reset by peer]
bean has joined #ruby
mary5030 has quit [Remote host closed the connection]
bradhe has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
k0rupted has left #ruby [#ruby]
ewnd9 has joined #ruby
rippa has joined #ruby
brianpWins has quit [Quit: brianpWins]
monkegjinni has joined #ruby
lxsameer has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mj12albert has quit [Quit: Textual IRC Client: www.textualapp.com]
mj12albert has joined #ruby
mj12albert has quit [Max SendQ exceeded]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
asteros has quit [Quit: asteros]
ssvo has joined #ruby
wallerdev has quit [Quit: wallerdev]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
Boohbah has joined #ruby
tharindu has quit [Ping timeout: 248 seconds]
skaflem has joined #ruby
samuel02 has joined #ruby
justsee has joined #ruby
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
decoponio has joined #ruby
pirelenito has quit [Ping timeout: 256 seconds]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
burlyscudd has joined #ruby
Macaveli has joined #ruby
kracekumar has joined #ruby
tonni has quit [Ping timeout: 264 seconds]
sbos99 has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 248 seconds]
kracekumar has quit [Client Quit]
soheil has joined #ruby
fuhgeddaboudit has joined #ruby
dangerousdave has joined #ruby
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
burlyscudd has quit [Ping timeout: 272 seconds]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
soheil has quit [Ping timeout: 272 seconds]
<lxsameer> what's the replacement of autoload ? is there any way to use something like that threads safe?
tabolario has joined #ruby
xk_id has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
asteros has joined #ruby
dangerousdave has quit [Quit: Leaving...]
hakunin_ has joined #ruby
hakunin has quit [Ping timeout: 272 seconds]
ssmithstone has joined #ruby
Macaveli has joined #ruby
samuel02 has quit [Remote host closed the connection]
dangerousdave has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
spider-mario has joined #ruby
dangerousdave has quit [Client Quit]
theKayhan has joined #ruby
BizarreCake has joined #ruby
Asher has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
kracekumar has quit [Quit: Computer has gone to sleep.]
zigomir has joined #ruby
ayaz has joined #ruby
ericmathison has quit [Ping timeout: 248 seconds]
rahulkmr has joined #ruby
newbiehacker has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
havenwood has quit [Remote host closed the connection]
adambeynon has joined #ruby
theKayhan has quit [Remote host closed the connection]
bradhe has joined #ruby
theKayhan has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
krz has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
tharindu has joined #ruby
AndChat| has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lembacon has joined #ruby
CorpusCallosum has joined #ruby
lembacon has quit [Client Quit]
b00stfr3ak has quit [Quit: Leaving]
s2013_ has quit [Quit: Leaving]
cucumbrman has quit [Remote host closed the connection]
noopq has quit [Ping timeout: 248 seconds]
tharindu has quit [Ping timeout: 256 seconds]
cucumbrman has joined #ruby
chobbit is now known as chobbit[back]
chobbit[back] is now known as chobbit
CorpusCallosum has quit [Quit: Leaving]
lsmola has joined #ruby
[_aeris_] is now known as _aeris_
jibi has joined #ruby
rahulkmr has quit [Read error: No route to host]
<freakcult> hi
<freakcult> exit
<freakcult> exit
freakcult has quit [Quit: leaving]
Macaveli has joined #ruby
rahulkmr has joined #ruby
freakcult has joined #ruby
<freakcult> hi
<freakcult> I am an idiot
AndChat| has quit [Ping timeout: 240 seconds]
<freakcult> i can't find "using" keyword in the docs
<freakcult> can u help?
burlyscudd has joined #ruby
freakcult has quit [Client Quit]
justsee has quit [Ping timeout: 272 seconds]
biz has joined #ruby
biz has quit [Client Quit]
BizarreCake has quit [Remote host closed the connection]
BizarreCake has joined #ruby
user258467 has joined #ruby
burlyscudd has quit [Ping timeout: 248 seconds]
elaptics`away is now known as elaptics
krz has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
noop has joined #ruby
<chobbit> Ruby is so cool *_* One line if statements :D
diegoviola has joined #ruby
<chobbit> Wait, cool is seriously someone's nick?
<popl> lots of languages have something like that.
<jrobeson> perhaps chobbit means the statement modifiers
ssvo has quit [Ping timeout: 240 seconds]
<chobbit> also, unless :D i dont think most languages have that
<chobbit> i would have to do if !boolean but i can just do unless boolean :D
<popl> perl's got a lot of them
<chobbit> does it? have to check that out after ruby
<jrobeson> chobbit, a lot of the ideas in ruby did come from perl
<workmad3> ruby - the offspring of perl and smalltalk
<chobbit> so it should be semi-easy if ruby is labeled "easy" for me?
beilabs has joined #ruby
Alth has quit [Ping timeout: 272 seconds]
Alth has joined #ruby
<apeiros> chobbit: I'd not be surprised if somebody had 'ruby' as his nick…
<apeiros> (or her)
railsbros_dirk has joined #ruby
Mars` has joined #ruby
krz has joined #ruby
amacgregor_ has joined #ruby
svector has joined #ruby
amacgregor__ has joined #ruby
amacgregor has quit [Ping timeout: 240 seconds]
kcin has quit [Ping timeout: 245 seconds]
<chobbit> apeiros: only ruby guy and Ruby Panther
<chobbit> (no pings for them!)
amacgregor_ has quit [Ping timeout: 265 seconds]
claymore has joined #ruby
AxonetBE has joined #ruby
bradhe has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
<RubyPanther> chobbit: fail
svector has quit [Ping timeout: 248 seconds]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
<chobbit> RubyPanther: shame on you
lsmola has quit [Ping timeout: 256 seconds]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
AxonetBE has quit [Client Quit]
<jrobeson> what is that??
Jetchisel has joined #ruby
ehaliewicz has quit [Ping timeout: 272 seconds]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
<RubyPanther> That's RubyPanther copying a scene from a Madonna video
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
bradhe has quit [Ping timeout: 272 seconds]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
maycon_ has joined #ruby
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
<RubyPanther> Human Nature meets duck typing
kracekumar has joined #ruby
krz has quit [Read error: Connection reset by peer]
kracekumar has quit [Max SendQ exceeded]
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
kracekumar has joined #ruby
Mitchellvanw has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
Mitchellvanw has quit [Client Quit]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
maycon has quit [Ping timeout: 272 seconds]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
kracekumar has joined #ruby
kracekumar has quit [Max SendQ exceeded]
Mars` has quit [Ping timeout: 240 seconds]
railsbros_dirk has quit [Quit: railsbros_dirk]
kcin has joined #ruby
<popl> apeiros: thanks
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
Anderson has quit [Quit: Leaving]
<apeiros> popl: yw :)
<apeiros> I wish there was a nice way to ban for N minutes
<chobbit> Like a bot? You guys need a bot. Coded in ruby. Yeah... That's what you need.
<popl> irssi has a /knockout but I'm not sure what it does
<popl> s/what/how/
siwica has joined #ruby
michael_mbp is now known as zz_michael_mbp
<chobbit> Whoa. Is that weechat making those messages when someone uses s/// or is it something that freenode does
<apeiros> I wanted to revive butler for years now :-/
<apeiros> maybe I should just write a cinch based one
<workmad3> #rubyonrails has helpa, which is ruby
<apeiros> then again, I have like 50 projects which are more important to me
krz has joined #ruby
theKayhan has quit [Ping timeout: 248 seconds]
burlyscudd has joined #ruby
OdNairy has joined #ruby
<chobbit> CodeAcademy >> Ruby 1/7 | The Refactor Factory
SHyx0rmZ has joined #ruby
burlyscudd has quit [Ping timeout: 248 seconds]
rezzack has quit [Ping timeout: 240 seconds]
maz-dev has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
edgar_ has joined #ruby
BizarreCake has quit [Remote host closed the connection]
BizarreCake has joined #ruby
<edgar_> Hi everyone, i have a question about ruby on rails
<edgar_> if anyone can help me with it
<apeiros> edgar_: #rubyonrails is a channel dedicated to rails questions
asteros has quit [Quit: asteros]
<edgar_> what is this channel dedicated to?
<apeiros> ruby
<edgar_> ok thank you
<apeiros> rubyonrails is one of many frameworks written in ruby
edgar_ has left #ruby [#ruby]
m8 has joined #ruby
Xaitec has joined #ruby
Xaitec has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 248 seconds]
thesheff17 has joined #ruby
timonv has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
orionstein_away is now known as orionstein
tonni has joined #ruby
VTLob has joined #ruby
sevenseacat has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
lkba has joined #ruby
gja has quit [Client Quit]
Xeago has joined #ruby
dhamidi has joined #ruby
aryaching_ has quit [Ping timeout: 272 seconds]
T__T has joined #ruby
beilabs has joined #ruby
user258467 has quit [Quit: Leaving...]
Guest24381 has joined #ruby
sayan has quit [Ping timeout: 248 seconds]
<apeiros> I wish I was more fluent in C. I feel like a snail :(
justsee has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
krz has quit [Quit: krz]
lkba has quit [Ping timeout: 265 seconds]
xk_id has quit [Quit:
orionstein is now known as orionstein_away
nfk has joined #ruby
sayan has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
zerun0 has quit [Read error: Operation timed out]
Soda has joined #ruby
nfk has quit [Remote host closed the connection]
dzhulk1 has joined #ruby
nfk has joined #ruby
dzhulk has quit [Ping timeout: 272 seconds]
boxmein has joined #ruby
beilabs has quit [Ping timeout: 265 seconds]
spider-mario has quit [Read error: Connection reset by peer]
Mars` has joined #ruby
indigo has quit [Quit: Leaving]
lurch_ has joined #ruby
zerun0 has joined #ruby
T__T has quit [Remote host closed the connection]
lurch_ has quit [Client Quit]
jrhe has joined #ruby
elaptics is now known as elaptics`away
Mars` has quit [Ping timeout: 240 seconds]
lurch_ has joined #ruby
lurch_ has quit [Client Quit]
noop has quit [Ping timeout: 272 seconds]
kirun has joined #ruby
beilabs has joined #ruby
mengu has joined #ruby
burlyscudd has joined #ruby
sepp2k has joined #ruby
gstamp has quit [Ping timeout: 256 seconds]
burlyscudd has quit [Ping timeout: 245 seconds]
gstamp has joined #ruby
_if has joined #ruby
segv has quit [Quit: ZNC - http://znc.in]
<shevy> hehe
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
s3itz has joined #ruby
timonv has quit [Remote host closed the connection]
_if has quit [Remote host closed the connection]
timonv has joined #ruby
Bry8Star{T2 has joined #ruby
canton7 has quit [Remote host closed the connection]
canton7 has joined #ruby
Kneferilis has quit [Ping timeout: 245 seconds]
Tamae has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
Xaitec has joined #ruby
Xaitec has quit [Remote host closed the connection]
nism-pi has joined #ruby
deepender has joined #ruby
<deepender> hey
<deepender> anyone can guide me a good article on common conciseness in ruby
weeems is now known as weems
weems has quit [Changing host]
weems has joined #ruby
Macaveli has joined #ruby
boxmein is now known as [boxmein]
rahulkmr has quit [Read error: Operation timed out]
diegoviola has quit [Ping timeout: 272 seconds]
carraroj has quit [Ping timeout: 256 seconds]
bradhe has joined #ruby
stayarrr has quit [Quit: Leaving...]
bradhe has quit [Ping timeout: 240 seconds]
Xeago_ has joined #ruby
hugohagogo has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
krz has joined #ruby
OdNairy has quit [Ping timeout: 272 seconds]
OdNairy has joined #ruby
orien has joined #ruby
orien has quit [Client Quit]
justsee has joined #ruby
<shevy> deepender sounds like an extremely specialized query
<shevy> it is more a philosophy to achieve as much as possible with as few as doable characters used
siwica has quit [Ping timeout: 245 seconds]
spider-mario has joined #ruby
burlyscudd has joined #ruby
timonv has joined #ruby
Lewix has quit [Remote host closed the connection]
zigomir has quit [Quit: zigomir]
Tuxist has joined #ruby
Lewix has joined #ruby
mojjjo has joined #ruby
burlyscudd has quit [Ping timeout: 265 seconds]
lkba has joined #ruby
linduxed has quit [Ping timeout: 245 seconds]
<shevy> some people reuse common idioms, like ... hash.each_pair {|key, value| ... would often be written as hash.each_pair {|k,v| ... instead
<shevy> some_potential_array.flatten.map vs. some_potential_array.flat_map
<shevy> hmm
monkegjinni has quit [Remote host closed the connection]
Lewix has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
linduxed has joined #ruby
dhamidi has quit [Ping timeout: 248 seconds]
yacks has quit [Ping timeout: 245 seconds]
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby
shaunbaker has joined #ruby
monkegjinni has quit [Read error: No route to host]
mixel has joined #ruby
yacks has joined #ruby
maroloccio has joined #ruby
lazarus_ has joined #ruby
kofno has quit [Ping timeout: 272 seconds]
eka has joined #ruby
<lazarus_> After years developing in Java, I switched to ruby 5 months ago and here's the outcome: http://actibities-uniongr.rhcloud.com/pages/view-demo a.k.a. ruby rules!
shaunbaker has quit [Remote host closed the connection]
coderhs has joined #ruby
patjoh has joined #ruby
OdNairy has quit [Ping timeout: 245 seconds]
maycon_ has quit [Ping timeout: 272 seconds]
threesome has joined #ruby
Anderson has joined #ruby
<shevy> lazarus_ huh, aren't you the guy from greece?
<lazarus_> shevy yes
<shevy> have you not been using ruby for much longer :P
vlad_starkov has quit [Remote host closed the connection]
<shevy> like twelve years or something :D
<lazarus_> shevy nope, 5 months ago I met it :)
<lazarus_> shevy quite excited though!
<lazarus_> shevy great language
<shevy> I dont even remember what I was doing 5 months after starting with ruby
<shevy> I know that the first IRC bot took me less than 3 weeks, with help from others
Beoran__ has joined #ruby
fntzr has joined #ruby
<lazarus_> shevy Not sure I undestand you, IRC bot? new to IRC too :D
<shevy> yeah
<shevy> I am used to IRC for about 20 years, almost, back then on windows with mIRC
<shevy> people used to write quite a bit in mIRC scripts
<lazarus_> shevy This is the second time I use IRC
<shevy> lazarus_ do you write commandline ruby scripts as well?
hugohagogo has quit [Ping timeout: 240 seconds]
user258467 has joined #ruby
Beoran_ has quit [Ping timeout: 260 seconds]
OdNairy has joined #ruby
<lazarus_> shevy I didn't have the chance, I started with Rails so I haven't to written any script so far
mengu has quit [Remote host closed the connection]
<shevy> aha!
DanKnox is now known as DanKnox_away
AlSquire has joined #ruby
mengu has joined #ruby
DanKnox_away is now known as DanKnox
mengu has quit [Read error: Connection reset by peer]
justsee has quit [Ping timeout: 245 seconds]
svector has joined #ruby
DanKnox is now known as DanKnox_away
mengu has joined #ruby
aryaching has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
danshultz has joined #ruby
bradhe has joined #ruby
kofno has joined #ruby
<lazarus_> shevy do you write ruby scripts? which web framework do you use?
lucazi has joined #ruby
nari has joined #ruby
<shevy> lazarus_ I started with ruby on commandline when rails was not written yet
<shevy> ruby has replaced all my needs for shell scripts, so every task that can be automated I will try to let ruby solve it
<shevy> right now I dig through http://www.biostars.org/ to gather useful tidbits for bioinformatics (and turn these into ruby scripts)
<lazarus_> shevy ok
<shevy> lazarus_, as for web frameworks, good old crappy cgi :D
<lazarus_> shevy :D
<shevy> but I will eventually learn rails, I decided this a few weeks ago
bradhe has quit [Ping timeout: 256 seconds]
jibi has quit [Ping timeout: 272 seconds]
chobbit has quit [Quit: WeeChat 0.4.0]
orien has joined #ruby
habanany has joined #ruby
axsuul has quit [Ping timeout: 265 seconds]
OdNairy has quit [Ping timeout: 240 seconds]
Clooth has joined #ruby
habanany has quit [Client Quit]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
<shevy> ok
<shevy> I did not see this yet, or perhaps it was in another format
<shevy> that page does not seem familiar to me right now
aryaching_ has joined #ruby
Giorgio has joined #ruby
OdNairy has joined #ruby
fixl has quit [Ping timeout: 256 seconds]
aryaching has quit [Ping timeout: 245 seconds]
danshultz has quit [Ping timeout: 272 seconds]
Soda has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
lazarus_ has quit [Quit: Page closed]
hugohagogo has joined #ruby
relix has joined #ruby
weems has quit [Read error: Connection reset by peer]
einarj has joined #ruby
OdNairy has quit [Ping timeout: 256 seconds]
mengu has quit [Ping timeout: 272 seconds]
fntzr has quit [Quit: Leaving]
Deele has joined #ruby
einarj has quit [Remote host closed the connection]
OdNairy has joined #ruby
weems has joined #ruby
krz has quit [Ping timeout: 272 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Giorgio has quit [Ping timeout: 272 seconds]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
jibi has joined #ruby
ce_afk is now known as cescalante
albedoa has joined #ruby
timonv has quit [Read error: Operation timed out]
OdNairy has quit [Ping timeout: 248 seconds]
nfk has quit [Remote host closed the connection]
timonv has joined #ruby
nfk has joined #ruby
lurch_ has joined #ruby
OdNairy has joined #ruby
lsmola has joined #ruby
sniffingcats has joined #ruby
tjad has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
krz has joined #ruby
Clooth has quit [Quit: Leaving...]
lxsameer has quit [Quit: Leaving]
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby
gsvolt has quit [Ping timeout: 240 seconds]
mattias_ has quit [Read error: Operation timed out]
shtirlic_ has quit [Ping timeout: 240 seconds]
orionstein_away has quit [Ping timeout: 248 seconds]
thedonvaughn has quit [Ping timeout: 246 seconds]
mumblerit has quit [Ping timeout: 264 seconds]
ShinySides has quit [Ping timeout: 252 seconds]
DanKnox_away has quit [Ping timeout: 268 seconds]
dbRenaud has quit [Ping timeout: 245 seconds]
paul_k has quit [Ping timeout: 248 seconds]
yonahw has quit [Ping timeout: 248 seconds]
machuga has quit [Ping timeout: 248 seconds]
jalcine_ has quit [Ping timeout: 240 seconds]
r0bby_ has quit [Ping timeout: 245 seconds]
the_mentat has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 272 seconds]
onewheelskyward has quit [Ping timeout: 252 seconds]
pushpak has joined #ruby
Guest87897 has quit [Ping timeout: 268 seconds]
r0bby_ has joined #ruby
krz has quit [Read error: Connection reset by peer]
eli has quit [Ping timeout: 248 seconds]
dzhulk has joined #ruby
krz has joined #ruby
ewnd9 has quit [Ping timeout: 245 seconds]
nateberkopec has joined #ruby
dzhulk1 has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
crus has quit [Ping timeout: 240 seconds]
crus has joined #ruby
sayan has quit [Ping timeout: 265 seconds]
forced_request has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
carraroj has joined #ruby
mrsolo_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
thedonvaughn has joined #ruby
OdNairy has quit [Ping timeout: 245 seconds]
mrsolo_ has quit [Client Quit]
VTLob has quit [Quit: VTLob]
alx- has joined #ruby
Naoe-Kanno has joined #ruby
zigomir has joined #ruby
yano has quit [Ping timeout: 615 seconds]
<shevy> hmmm
<shevy> class Object is the only class that has no superclass?
<sevenseacat> Object has a superclass (in ruby 1.9+ i believe anyway)
albedoa has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SHyx0rmZ has quit [Ping timeout: 248 seconds]
astrobunny has quit [Ping timeout: 256 seconds]
bradhe has joined #ruby
<shevy> damn
krz has quit [Ping timeout: 272 seconds]
cescalante is now known as ce_afk
<shevy> you are right, I tested on 1.8.7 when I did
jibi has quit [Ping timeout: 240 seconds]
<sevenseacat> :)
osvico has joined #ruby
ChronocityLC has joined #ruby
<sevenseacat> Object extends from BasicObject
[boxmein] is now known as boxmein
julweber has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 256 seconds]
julweber has joined #ruby
astrobunny has joined #ruby
orien has quit [Quit: Computer has gone to sleep.]
mikehodgson has quit []
OdNairy has joined #ruby
julweber has quit [Ping timeout: 272 seconds]
aomdoa has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
SHyx0rmZ has joined #ruby
schaerli has joined #ruby
Naoe-Kanno has quit [Ping timeout: 240 seconds]
ewnd9 has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
danshultz has joined #ruby
aomdoa has quit [Quit: Leaving]
<andrewvos> ~.
dzhulk has quit [Ping timeout: 240 seconds]
dzhulk1 has joined #ruby
VTLob has joined #ruby
timonv has quit [Ping timeout: 248 seconds]
<apeiros> <pedantic> s/extends/inherits from/
asym has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel_ has joined #ruby
<sevenseacat> ah yes, extend has a much different meaning in ruby
astrobunny has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 272 seconds]
elaptics`away is now known as elaptics
danshultz has quit [Ping timeout: 272 seconds]
kracekumar__ has joined #ruby
kracekumar__ has quit [Max SendQ exceeded]
<andrewvos> hah turns out I was connected
stkowski has joined #ruby
burlyscudd has joined #ruby
Xeago_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yxhuvud has quit [Remote host closed the connection]
mary5030 has joined #ruby
onewheelskyward has joined #ruby
zz_dbRenaud has joined #ruby
DanKnox_away has joined #ruby
paul_k has joined #ruby
orionstein_away has joined #ruby
mumblerit has joined #ruby
mumblerit is now known as Guest79191
orionstein_away is now known as orionstein
DanKnox_away is now known as DanKnox
zz_dbRenaud is now known as dbRenaud
thesheff17 has quit [Ping timeout: 272 seconds]
ShinySides has joined #ruby
drumsrgr8forn8 has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
jbpros has joined #ruby
machuga has joined #ruby
drumsrgr8forn8 has joined #ruby
mattias_ has joined #ruby
burlyscudd has quit [Ping timeout: 256 seconds]
the_mentat has joined #ruby
<shevy> hmm
<shevy> what would you guys rather use
<shevy> i.delete('_') if i.include? '_'
<shevy> versus
<shevy> i.delete('_')
<shevy> i.e. without checking via include?
deepender has quit [Ping timeout: 240 seconds]
jglauche has quit [Remote host closed the connection]
einarj has joined #ruby
jalcine has joined #ruby
jglauche has joined #ruby
<Xeago> shevy: the latter, honestly neither
<Xeago> what are you trying to do?
Xeago_ has quit [Ping timeout: 272 seconds]
<shevy> Xeago I sanitize a string
<shevy> in this example the string may not have '_' characters
<Xeago> to sanatize, strip everything except allowed characters
<Xeago> don't do negatives like you are doing now
<Xeago> it will stab your back some day
lucazi has quit [Quit: Textual IRC Client: www.textualapp.com]
threesome has quit [Ping timeout: 248 seconds]
<Xeago> so not matching a-zA-Z0-9 for example
Emmanuel_Chanel_ is now known as Emmanuel_Chanel
timonv has joined #ruby
<Xeago> instead of specifying a finite list of characters not allowed
dzhulk1 has quit [Ping timeout: 248 seconds]
<sevenseacat> +1 to whitelisting not blacklisting
Davey has quit [Quit: Computer has gone to sleep.]
mobileblue has quit [Read error: Connection reset by peer]
<weeb1e> I decided to use foreman for starting/stopping two applications which make up a part of one of my services, and the one thing it should actually do (making sure there are never any zombie processes), it fails to accomplish a large percentage of the time
dzhulk has joined #ruby
einarj has quit [Ping timeout: 248 seconds]
<weeb1e> When one of the two applications quit, it says "sending SIGTERM to all processes" and then exits, but more than half of the time it leaves unicorn running along with its workers, so I have to keep finding its PID and manually killing it before I can start foreman again else unicorn fails to bind to the port which kills my other process
yxhuvud has joined #ruby
<weeb1e> Anyone know if foreman can be fixed easily, or should I just roll my own solution, which I am not feeling I should have done from the start :/
zz_michael_mbp is now known as michael_mbp
AndChat| has joined #ruby
mary5030 has quit [Remote host closed the connection]
io_syl has joined #ruby
hugohagogo has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
mojjjo has quit [Ping timeout: 256 seconds]
monkegjinni has joined #ruby
hugohagogo has joined #ruby
Clooth has joined #ruby
Banistergalaxy has quit [Ping timeout: 256 seconds]
stayarrr has joined #ruby
timonv has quit [Remote host closed the connection]
banghouse has quit [Read error: Connection reset by peer]
timonv has joined #ruby
jbpros has quit [Quit: jbpros]
<shevy> Xeago would you use .include? or would you omit it in the example above?
mary5030 has quit [Ping timeout: 265 seconds]
monkegjinni has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
udon has joined #ruby
timonv has quit [Ping timeout: 256 seconds]
Banistergalaxy has joined #ruby
AndChat- has joined #ruby
dhamidi has joined #ruby
schaerli has quit [Remote host closed the connection]
drumsrgr8forn8 has quit [Remote host closed the connection]
schaerli has joined #ruby
AndChat| has quit [Ping timeout: 272 seconds]
drumsrgr8forn8 has joined #ruby
drumsrgr8forn8 has quit [Read error: Connection reset by peer]
drumsrgr8forn8 has joined #ruby
<apeiros> shevy: include? just adds unecessary overhead
<shevy> ok
<apeiros> both include? and delete have to iterate the whole string in the case of nothing being present
Banistergalaxy has quit [Ping timeout: 272 seconds]
einarj has joined #ruby
hugohagogo has quit [Ping timeout: 272 seconds]
hugohagogo has joined #ruby
jbpros has joined #ruby
schaerli has quit [Ping timeout: 272 seconds]
xlogic has joined #ruby
bradhe has joined #ruby
OdNairy has quit [Ping timeout: 272 seconds]
einarj has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 272 seconds]
astrobunny has quit [Ping timeout: 272 seconds]
OdNairy has joined #ruby
IceDragon has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
samfisher has joined #ruby
krz has joined #ruby
<samfisher> hi guys... there's this e-shop and I need to grab the products as pictures http://www.dsdamatshop.com/c/1/tum-urunler/?specs=103
<samfisher> any idea how to start this project?
<krz> i have the following string "foo bar [first_name] baz lorem [last_name] ipsum [first_name]". whats an efficient way to count how many times [first_name] and [last_name] are in the string?
jnoob22_ has quit [Ping timeout: 252 seconds]
astrobunny has joined #ruby
<krz> i can split(' ') then each
<apeiros> use scan and a counting hash
<krz> is there something better?
<sevenseacat> ive used the split/count method before
Banistergalaxy has joined #ruby
<apeiros> counts = Hash.new 0; str.scan(/\[(?:first_name|last_name)\]/).each do |occurrence| counts[occurrence] += 1 end
<apeiros> err
<apeiros> drop the each
<apeiros> just: counts = Hash.new 0; str.scan(/\[(?:first_name|last_name)\]/) do |occurrence| counts[occurrence] += 1 end
hugohagogo has quit [Ping timeout: 240 seconds]
deepender has joined #ruby
relix has joined #ruby
kh019267 has joined #ruby
AndChat- has quit [Ping timeout: 272 seconds]
ce_afk is now known as cescalante
<apeiros> weee, primitive incarnation of my EPT C parser is viable
<Xeago> what is ept?
<kh019267> I'm trying to convert unix time into the day, month, year, etc using the following 2 lines: event_time = event["clock"].to_i(16) AND event_time = Time.at(event_time).strftime("%m/%d/%Y %H:%M:%S"). Doing this, the Month, Day and Year are way off. I'm getting something like this "02/07/4625" for today. Thoughts?
Soda has joined #ruby
<apeiros> Xeago: my attempt to obsolete CSV: https://github.com/apeiros/ept
tomzx_mac has joined #ruby
<apeiros> kh019267: code seems correct. are you sure event is in epoch seconds and not e.g. milliseconds?
<krz> apeiros: you sure aobut that: https://gist.github.com/7056732
<krz> counts returns {}
<apeiros> krz: of course, you changed specs
<apeiros> don't say first_name/last_name when it's really screen_name
<krz> whops
<apeiros> d'uh
<krz> wait
<krz> typo
<apeiros> or say data between [] is dynamic
tkuchiki_ has joined #ruby
S0da has joined #ruby
ssmithstone has quit [Ping timeout: 256 seconds]
<kh019267> apeiros: yeah, the following works correctly but only get UTC time so would like to use the Time class: DateTime.strptime(event_time, '%s').to_datetime.strftime("%m/%d/%Y %H:%M:%S")
tkuchiki has quit [Read error: Connection reset by peer]
<apeiros> then you can replace the (?: … ) expression with \w* or \w+ (or whatever quantifier pleases you)
<krz> apeiros: thanks
pwh has joined #ruby
<apeiros> yw
hugohagogo has joined #ruby
<udon> #openhatch
rahulkmr has joined #ruby
nateberkopec has joined #ruby
AndChat| has joined #ruby
havenwood has joined #ruby
Soda has quit [Ping timeout: 272 seconds]
drumsrgr8forn8 has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 240 seconds]
coderhs has quit [Quit: Leaving]
cescalante is now known as ce_afk
Clooth has quit [Quit: Leaving...]
thesheff17 has joined #ruby
<kh019267> aperios…looks like the conversion from the string to integer"(event_time = event["clock"].to_i(16)" is the issue. DateTime works because it accepts a string
zarubin has joined #ruby
siwica has joined #ruby
<kh019267> Thoughts on a better way to convert that
boxmein has quit [Ping timeout: 245 seconds]
<apeiros> kh019267: got a sample value of event["clock"]? along with a sample datetime?
carraroj has quit [Ping timeout: 272 seconds]
alx- has quit [Quit: Leaving...]
<apeiros> kh019267: also - use tab completion for nicks. avoids misspellings like aperios
<kh019267> This is an example event time: 1382120466 which is a string but when doing to_i(16), I'm getting 83786597478
vlad_starkov has joined #ruby
<apeiros> um, why on earth do you use to_i(16)?
<apeiros> 16 is the base, this is not a hex…
ravster has joined #ruby
<kh019267> apeiros - sorry for the misspelling and thanks for the tip
jbpros has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
JJMalina has joined #ruby
AndChat| has quit [Ping timeout: 240 seconds]
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
burlyscudd has joined #ruby
mayorga has joined #ruby
<kh019267> apeiros - that was the issue. I forgot why that was added a while ago, but obviously that was incorrect.
<kh019267> apeiros - Thanks!
sambao21 has joined #ruby
nateberkopec has quit [Ping timeout: 248 seconds]
lukec has joined #ruby
burlyscudd has quit [Ping timeout: 240 seconds]
Squarepy has joined #ruby
Banistergalaxy has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
kreeves has joined #ruby
Flashmasterson has joined #ruby
pushpak has quit [Quit: Linkinus - http://linkinus.com]
Banistergalaxy has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
s3itz has quit [Quit: Textual IRC Client: www.textualapp.com]
siwica has quit [Ping timeout: 272 seconds]
s0ber has quit [Remote host closed the connection]
s0ber has joined #ruby
samfisher has left #ruby [#ruby]
astrobunny has joined #ruby
carraroj has joined #ruby
ce_afk is now known as cescalante
rahulkmr has quit [Ping timeout: 240 seconds]
s0ber has quit [Remote host closed the connection]
s0ber has joined #ruby
osvico has quit [Ping timeout: 248 seconds]
ChronocityLC has quit [Ping timeout: 272 seconds]
astrobunny has quit [Ping timeout: 245 seconds]
<apeiros> cya guys
apeiros has quit [Remote host closed the connection]
<havenwood> ciao
daxroc1 has quit [Quit: Leaving.]
user258467 has quit [Quit: Leaving...]
jhaals has joined #ruby
maletor has joined #ruby
astrobunny has joined #ruby
zengfb has joined #ruby
jhaals has quit [Client Quit]
jhaals has joined #ruby
jhaals has quit [Client Quit]
sevenseacat has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Ping timeout: 248 seconds]
DrCode has joined #ruby
kofno has joined #ruby
banisterfiend has joined #ruby
zarubin has quit [Ping timeout: 272 seconds]
polaco_zZz is now known as polaco
ShellFu is now known as ShellFu_afk
pirelenito has joined #ruby
zigomir has quit [Quit: zigomir]
pushpak has joined #ruby
netQT_ has joined #ruby
JJMalina has quit [Ping timeout: 272 seconds]
bradhe has joined #ruby
sniffingcats has quit [Quit: Til rivido Idisti!]
kofno has quit [Ping timeout: 248 seconds]
xlogic has quit [Remote host closed the connection]
fuhgeddaboudit has joined #ruby
<shevy> anyone knows if it is possible to compile a completely static ruby binary?
pen has joined #ruby
<shevy> mine has refers to things like libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 or /lib64/ld-linux-x86-64.so.2
stkowski has quit [Quit: stkowski]
<shevy> *references
<pen> hey
<pen> <<-'CODE'
swordsmanz has quit [Read error: Connection reset by peer]
<pen> what does this mean?
jetblack has joined #ruby
zengfb has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
swordsmanz has joined #ruby
schaerli has joined #ruby
mrsolo_ has joined #ruby
zengfb has joined #ruby
julian-delphiki has joined #ruby
<havenwood> pen: here docs
bradhe has quit [Ping timeout: 240 seconds]
<zengfb> \quit
<pen> havenwood: ?
<zengfb> first time use erc
<shevy> pen you can put a bunch of stuff after the <<-
<shevy> without the need to escape etc...
<havenwood> pen: the `<<-identifier` denotes the beginning of a String (just `<<identifier` works too but you can't indent, it must start the line
<shevy> it is basically "typing as is"
Flashmasterson has quit [Quit: Leaving.]
nateberkopec has joined #ruby
<pen> havenwood: yea, but why can he use it like a variable? if you read the code
whowantstolivefo has joined #ruby
stayarrr has quit [Quit: Leaving...]
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
bean has quit [Ping timeout: 248 seconds]
<shevy> it's a string, isn't it?
<shevy> and he passes that string into tp.binding.eval
<havenwood> pen: you can pass a method a String, in this case a String is being passed as the arg to #eval.
<shevy> seems nothing magic
<havenwood> aye
bean has joined #ruby
<shevy> wow
<shevy> that code is insanity:
<shevy> __pan_h[__pan_a[1]] = eval("#{__pan_a[1]}") if __pan_lv.include?(__pan_a[1])
<pen> yea, it's so weird
amritanshu_RnD has quit [Remote host closed the connection]
<havenwood> Ruby, you'll shoot you're eye out!
<pen> I thought you need to enclose at least with ending identifier first and enclose that in the method call
<pen> but you don't
Macaveli has joined #ruby
<pen> and you can do that after the declaration of the previous variable ...
<shevy> well
<shevy> there are bad examples on the www
<shevy> please don't follow this guy pen :P
<pen> how does that work...
<pen> shevy: lol
carraroj has quit [Ping timeout: 240 seconds]
<pen> shevy: is there any recommended rubyist to follow?
julian-delphiki has quit [Ping timeout: 272 seconds]
einarj has joined #ruby
Tuxist has quit [Remote host closed the connection]
<havenwood> pen: follow havenwood, of course!? :P
<shevy> pen I think most of the larger gem projects
<pen> havenwood: lol, are you on github? :P give me a project so I can learn
m_3 has quit [Remote host closed the connection]
Gnubie has joined #ruby
<shevy> yeah havenwood reveal the secret now!
<havenwood> pen: Check out trending on Githubs. Yeah, sure here's mine, lol: https://github.com/havenwood
Gnubie is now known as Guest18778
Guest18778 is now known as Gnubie_
<pen> cool
<havenwood> pen: follow jstorimer, drbrain, postmodern, tarcieri, tenderlove, apeiros, etc
jrhe has quit [Quit: jrhe]
Xeago has quit [Remote host closed the connection]
<shevy> damn
<shevy> havenwood, how many projects do you have?
<havenwood> i.. dunno. been a busy two years :P
einarj has quit [Ping timeout: 272 seconds]
<pen> havenwood: thanks
wallerdev has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pen> shevy: I will follow you as well :)
<pen> shevy: if you could kindly put up a project :)
svector has quit [Ping timeout: 248 seconds]
<shevy> pen I am too lazy to use github but since some months I try to use rubygems.org https://rubygems.org/profiles/shevy
<pen> that's cool
jrhe has joined #ruby
Flashmasterson has joined #ruby
udon has quit [Ping timeout: 245 seconds]
Macaveli has quit [Quit: Computer has gone to sleep.]
Spami has joined #ruby
ssmithstone has joined #ruby
user258467 has joined #ruby
mengu has joined #ruby
udon has joined #ruby
osvico has joined #ruby
ChronocityLC has joined #ruby
<shevy> pen if you stick to ruby for a longer while, start making gems as soon as possible
julian-delphiki has joined #ruby
<pen> shevy: but I don't know what to do
swordsmanz has quit [Quit: swordsmanz]
<pen> shevy: so I am reading other's gem to get some inspirations
wallerdev has quit [Quit: wallerdev]
volty has joined #ruby
zarubin has joined #ruby
<havenwood> pen: I use bundler and `bundle gem gem_name_here` to create a gem. You can create gems you don't push to RubyGems too (pushing em out to the world is a choice).
<shevy> pen what helped me decide on what to do was to start a todo file
<shevy> things that I want to do
<shevy> and from this, things create kind of itself
ssmithstone has quit [Ping timeout: 256 seconds]
<pen> shevy: k, I will try that
bean has quit [Ping timeout: 240 seconds]
amacgregor__ has quit [Quit: Leaving]
astrobun_ has joined #ruby
amacgregor has joined #ruby
burlyscudd has joined #ruby
bean has joined #ruby
julian-delphiki has quit [Ping timeout: 256 seconds]
Guest__ has joined #ruby
Guest__ is now known as Alc
Alc is now known as Alleh
S0da has quit [Read error: Connection reset by peer]
drumsrgr8forn8 has joined #ruby
Evixion has joined #ruby
m_3 has joined #ruby
drumsrgr8forn8 has quit [Read error: Connection reset by peer]
|PiP| has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
drumsrgr8forn8 has joined #ruby
Guest79191 is now known as mumblerit
boxmein has joined #ruby
burlyscudd has quit [Ping timeout: 265 seconds]
endash has joined #ruby
pirelenito has quit [Quit: pirelenito]
ewnd9 has quit [Ping timeout: 245 seconds]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
nateberkopec has quit [Quit: Leaving...]
jibi has joined #ruby
<havenwood> pen: a few more you might wanna follow: banister, rkh, nahi, and of course matz
Emmanuel_Chanel has joined #ruby
<pen> havenwood: I thought matz is working in C?
wesside has joined #ruby
<havenwood> mruby
mercwithamouth has quit [Ping timeout: 272 seconds]
<havenwood> but yeah, his commits are mostly in C
<havenwood> pen: know what mruby is?
<pen> havenwood: kinda
habanany has joined #ruby
schaerli has quit [Remote host closed the connection]
<pen> havenwood: I learn mruby from http://mobiruby.org
wesside has quit [Client Quit]
<pen> learned
<havenwood> Lightweight Ruby that can run on toasters, yeah iPhones, in your bios, embedded in other langs, etc.
drumsrgr8forn8 has quit [Remote host closed the connection]
Macaveli has joined #ruby
<havenwood> Ruby for toasters. There that sums it up. :P
astrobun_ has quit [Ping timeout: 240 seconds]
<pen> haha
mayorga has quit [Ping timeout: 265 seconds]
<pen> I actually posted an issue on mruby to ask for arduino support, thought that would be cool
<havenwood> pen: moar rubyists: robgleeson, igrigorik, jimweirick
wesside has joined #ruby
<havenwood> jimweirich**
<pen> havenwood: cool, those are the authors of some famous gems :O
Emmanuel_Chanel has quit [Ping timeout: 272 seconds]
kh019267 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has joined #ruby
<shevy> he is like a detective
<shevy> I am slowly but surely getting scared
kh019267 has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
<pen> shevy: yea, I wonder when could I even get a gem pushed out, all those famous people and gems man :S
astrobunny has joined #ruby
ewnd9 has joined #ruby
<pen> havenwood: you follow them all as well?
<havenwood> pen: i basically read you my following list
<pen> havenwood: hehe
<havenwood> and then a few more i realized i wasn't following
mojjjo has joined #ruby
zerun0 has quit [Ping timeout: 272 seconds]
AlSquire has joined #ruby
mercwithamouth has joined #ruby
indigo has joined #ruby
zerun0 has joined #ruby
|jemc| has joined #ruby
<krz> i got the following string. str="aaa [first_name] bar [first_name] [last_name]". each character in the string is counted as 1.[first_name] is equivalent to 15. and [last_name] to 10. whats the best way to parse through this?
ewnd9 has quit [Remote host closed the connection]
<pen> krz: regular expression?
ewnd9 has joined #ruby
<krz> basically with the given string. it needs to return: 50
habanany has quit [Quit: Bye]
<krz> there are 10 characters, including spaces
<krz> 2 [first_name] = 15. 2*15=30
<krz> 10+30+10=50
<krz> i can determine how many [first_name] and [last_name] there are in a string
vlad_starkov has joined #ruby
<krz> apeiros helped me with that already
T__T has joined #ruby
<havenwood> krz: show us what you have so far
<krz> let me try something out with reject. then ill show you what i have and see if it can be written better
Clooth has joined #ruby
zarubin has quit [Ping timeout: 248 seconds]
stayarrr has joined #ruby
wallerdev has joined #ruby
vlad_starkov has quit [Ping timeout: 272 seconds]
<havenwood> krz: i don't get your math? >.> what does this mean?: 2 [first_name] = 15
<havenwood> why would that be 15? :O
jrhe has quit [Quit: jrhe]
<havenwood> str.scan(/\[(\w+)\]/).flatten.map(&:size).inject(:+) #=> 29
<havenwood> not 50
netQT_ has quit [Remote host closed the connection]
<Flashmasterson> i'm trying to open 'loaddemo.rb' in sublime but it can't find it, even though i have 2.0.0 with it's gems installed
mixel has quit [Quit: mixel]
bradhe has joined #ruby
einarj has joined #ruby
<shevy> and where from does this file loaddemo.rb come?
<havenwood> Flashmasterson: Sublime is likely using a different Ruby than you intend.
<Flashmasterson> shevy: 'the well-grounded rubyist' doesn't say, so i'm just searching .rvm and all it's contents
<Flashmasterson> havenwood: hmm.. so how do i make it default to 2.0.0?
theKayhan has joined #ruby
|PiP| has quit [Ping timeout: 240 seconds]
alx- has joined #ruby
orionstein is now known as orionstein_away
mengu__ has joined #ruby
T__T has quit [Remote host closed the connection]
yano has joined #ruby
<havenwood> Flashmasterson: I don't use Sublime, but if i recall you can set the Ruby in your env var preferences, or here it suggests editing a file: https://coderwall.com/p/4-hzwq
mengu has quit [Ping timeout: 272 seconds]
<havenwood> Flashmasterson: Basically you point Sublime to RVM Ruby instead of system Ruby.
danshultz has joined #ruby
<havenwood> ~/.rvm/bin/rvm-auto-ruby
bradhe has quit [Ping timeout: 265 seconds]
<havenwood> ^ is what to point it at
<|jemc|> you can create your own "build system" and dump it in the user packages folder to change how it runs your file
ioNull has quit [Ping timeout: 265 seconds]
<Flashmasterson> havenwood: thanks - having trouble finding env var preferences, keeping in mind that you don't use sublime 2
<|jemc|> although, the default ruby build system should work for you if typing `which ruby` at a shell prompt returns your desired ruby
<havenwood> Flashmasterson: Listed to |jemc| not me, i don't even use Sublime.
<havenwood> Listen**
<|jemc|> what do you get when you type `which ruby` at a shell prompt?
theKayhan_ has joined #ruby
taion809 is now known as zzz_taion809
drumsrgr8forn8 has joined #ruby
<|jemc|> (keeping in mind that I use sublime text, but not rvm =P)
boxmein has quit [Ping timeout: 272 seconds]
<havenwood> i use TM2 and chruby, so not even a single hit! :P
ioNull has joined #ruby
<|jemc|> heheh
<havenwood> i've only poked around with ST2, but i like the whole-file-overview thingy, kinda neat
<havenwood> or is it ST3 now?
monkegjinni has quit [Remote host closed the connection]
<|jemc|> 3 is technically beta, but everyone I know is using it
<shevy> |jemc|, I get /System/Executables/ruby
monkegjinni has joined #ruby
<Flashmasterson> havenwood: shoot
T__T has joined #ruby
<krz> havenwood: gimme a sec
theKayhan has quit [Ping timeout: 272 seconds]
<|jemc|> shevy: whup? are you having the same issue, or are you trying to say that's what Flashmasterson should see?
<pen> VIM all the way
<Flashmasterson> ok so still wondering how i can find and open loaddemo.rb. it's not appearing as an option even when i un-hide hidden files
<shevy> |jemc| sorry, I misread earlier
theKayhan_ has quit [Remote host closed the connection]
<shevy> Flashmasterson where is the file!
einarj has quit [Remote host closed the connection]
<shevy> find waldo
<|jemc|> pen: I recently converted a vim friend of mine to sublime text when I should him the 'Vintage' package, which provides a good chunk of the vim keys for ST
nouitfvf has joined #ruby
<|jemc|> he says what converted him is how much easier it is to write extensions for ST
<pen> |jemc|: but vintage can only do so much, also the response time is very slow in vintage mode
<pen> |jemc|: ST?
Dreamer3 has quit [Quit: Leaving...]
<|jemc|> understandable; hey, go with what you love
<|jemc|> sublime text
<krz> havenwood, pen or someone tell me how to write this better: https://gist.github.com/7056732
coderhs has joined #ruby
<krz> i works at the moment. returns 50 as the length
<Flashmasterson> shevy: don
<Flashmasterson> shevy: i don
<pen> |jemc|: yea, that's possibly a good point, because I am struggling to learn vimscript to write an extension for vim
<Flashmasterson> t know ! haha
pwh has quit []
monkegjinni has quit [Ping timeout: 248 seconds]
<shevy> lol
<shevy> but Flashmasterson
<|jemc|> pen: sublime text extensions are basic python, although much of the functionality can be changed with json files
lurch_ has quit [Quit: lurch_]
banisterfiend has quit [Quit: Computer has gone to sleep.]
<shevy> you need the file apparently for a tutorial
<Flashmasterson> shevy: i'm using the well-grounded rubyist to learn everything but neglects to mention the specific folder for this file
<Flashmasterson> shevy: i do
<shevy> well, how are you supposed to find out where that .rb file is then?
gja has joined #ruby
gja has quit [Remote host closed the connection]
<pen> |jemc|: how about ruby? is it possible to write in ruby?
<Flashmasterson> shevy: hell if i know, he just mentions the ruby standard library
banisterfiend has joined #ruby
<|jemc|> pen: you'd need to write some kind of compatibility layer- I don't know if one already exists
monkegjinni has joined #ruby
<havenwood> Flashmasterson: what file are you looking for? use `mdfind -name` or `locate`?
<|jemc|> pen: but ST runs on python internally, so that's why python extensions are natural for it
Xeago has joined #ruby
<krz> havenwood: ideas?
zengfb has quit [Ping timeout: 272 seconds]
<havenwood> krz: okay, so you want to add 15 for each first and 10 for each last plus 1 for each remaining character in the string?
<shevy> Flashmasterson I don't think the ruby standard library has that file
<|jemc|> pen: I've been working on a couple extensions and I'm struggling to remember not to write ruby in my python code - I haven't really had to use python since my ruby 'baptism'
<Flashmasterson> [jemc] ok thanks
<krz> havenwood: yeap, +1 also or spaces
<krz> just to be clear
ssmithstone has joined #ruby
<krz> havenwood: i updated the gist with comments
<pen> |jemc|: yea, that happens to me sometimes when I'm doing python projects
dv__ has joined #ruby
<pen> krz: I added comments to your gist
<krz> havenwood: currently looks like php. im sure i can write this better in ruby
<|jemc|> pen: I also have to remember to stay away from meta magic - python doesn't take as kindly to it as ruby
<Flashmasterson> |jemc|: ok i got this sage: mdfind [-live] [-count] [-onlyin directory] [-name fileName | -s smartFolderName | query]
dv_ has quit [Ping timeout: 245 seconds]
<Flashmasterson> list the files matching the query
<Flashmasterson> -live Query should stay active
<Flashmasterson> query can be an expression or a sequence of words
<Flashmasterson> -count Query only reports matching items count
<Flashmasterson> -onlyin <dir> Search only within given directory
lsmola has quit [Ping timeout: 272 seconds]
<Flashmasterson> -name <name> Search on file name only
<Flashmasterson> -s <name> Show contents of smart folder <name>
<Flashmasterson> -0 Use NUL (``\0'') as a path separator, for use with xargs -0.
<Flashmasterson> example: mdfind image
<Flashmasterson> example: mdfind -onlyin ~ image
<Flashmasterson> example: mdfind -name stdlib.h
<Flashmasterson> example: mdfind "kMDItemAuthor == '*MyFavoriteAuthor*'"
<Flashmasterson> example: mdfind -live MyFavoriteAuthor
<pen> |jemc|: python is clearly designed with a different mindset and applications
<|jemc|> pen: yup
<pen> |jemc|: I don't do meta magic that often, why would you?
<|jemc|> pen: depends on your threshold for what you consider 'magic'
<krz> pen: yea thats a good suggestion
<pen> |jemc|: I mean meta programming could potentially make the code harder to read
<pen> krz: :)
Spami has quit [Quit: This computer has gone to sleep]
<|jemc|> pen: I generally assume an intelligent maintainer and try to make the code easiest to maintain rather than easiest to read, because the two don't always coincide
<havenwood> krz: maybe start with just a simple procedural style and go from there: https://gist.github.com/havenwood/7058293
<pen> |jemc|: just don't abuse it
nouitfvf has quit []
drumsrgr8forn8 has quit [Remote host closed the connection]
<pen> |jemc|: I have seen some really dark meta magic ruby projects and they are not pretty :P
<krz> i was gonna suggest: https://gist.github.com/7058329 but yours looks better havenwood
rahulkmr has joined #ruby
<|jemc|> pen: it's certainly true that you can take it too far
ewnd9 has quit [Remote host closed the connection]
<|jemc|> pen: and depending on what you're doing, you can make your tracebacks an unhelpful mess - so that's something to avoid
ewnd9 has joined #ruby
<pen> |jemc|: but ironically that's the reason why I love ruby over python so much
beilabs has quit [Ping timeout: 272 seconds]
<pen> one of the reasons
<krz> havenwood: although your solution, only returns 45
<krz> should be 50
<|jemc|> pen: yeah, I'd prefer to have the freedom of flexibility even if that flexibility gives me the opportunity to hang myself
<krz> ok i switched last and first
<krz> returns 50 now
<pen> |jemc|: even rspec can't help you there if you abuse that too much, since there aren't many debugging or testing that are directly addressing meta programming
<havenwood> krz: oh, i transposed, yeah
<pen> |jemc|: yup lol
burlyscudd has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.0]
zigomir has joined #ruby
x1337807x has joined #ruby
<krz> havenwood: not so good with my regex. is there a difference with this /\[(first_name|last_name)\]/ and last * 10 + first * 15 + remaining
<krz> whops
<krz> tmux!!
burlyscudd has quit [Ping timeout: 245 seconds]
<krz> ill just gist. havenwood any difference between the two: https://gist.github.com/7056732
ehc has joined #ruby
pirelenito has joined #ruby
T__T has quit [Remote host closed the connection]
flops has joined #ruby
<flops> Hi
poseid has joined #ruby
ssmithstone has quit [Ping timeout: 265 seconds]
beilabs has joined #ruby
<Mon_Ouie> krz: In the first case the group (i.e. either first_name|last_named) will be captured, and you can read what its value was later
<Mon_Ouie> Sorry, that's in the latter case
ssmithstone has joined #ruby
<flops> I got a problem with ruby and command line arguments: When I pass some argument to my script "./script argument" it doesn't wait for user input when I call gets.chomp().
<poseid> i was just trying to compile ruby from source, but I get stuck with "./configure" already… where can I learn more on that task?
<flops> When I do not pass an argument it wais
<flops> poseid: what is ./configure telling you? You are probably missing some required dependencies?
<Mon_Ouie> >> "foo" =~ /(.+)/; $1
<eval-in> Mon_Ouie => "foo" (https://eval.in/55797)
<Mon_Ouie> >> "foo" =~ /(?:.+)/; $1
<eval-in> Mon_Ouie => nil (https://eval.in/55798)
sayan has joined #ruby
<krz> i see
<poseid> I am on a mac and got other projects configured, but ruby tells me: -bash: ./configure: No such file or directory
<flops> then there probably isnt't a configure script
<flops> try 'ls | grep configure'
<flops> poseid: ^
<flops> if that doesn't give some output you are in the wrong folder or there is no configure script
<poseid> there is only: configure.in
<poseid> I cloned the repo from ruby/ruby at github
frustrum has quit [Ping timeout: 248 seconds]
danshultz has quit [Remote host closed the connection]
digifiv5e_ has quit [Ping timeout: 272 seconds]
<flops> poseid: run autoconf
danshultz has joined #ruby
<flops> It's in the readme on github.com/ruby/ruby
<poseid> oh, ok
<poseid> just see there is also a Makefile.in
Xeago_ has joined #ruby
<poseid> so, indeed… missed that
<poseid> thanks
<flops> yep, run autoconf
<flops> good luck
yourmysin has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 252 seconds]
<flops> How's it possible that ruby doesn't ask for input when my script is called with arguments?
<Mon_Ouie> Because gets is short for ARGF.gets
<flops> and i have to use $stdin.gets?
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Mon_Ouie> When you have no arguments, ARGF.gets just reads from stdin. When you have an argument, it treats it as a filename to read from
deens has joined #ruby
<Mon_Ouie> So, yes, $stdin.gets
<flops> Ok, I'll try that
<flops> thanks you very much
danshultz has quit [Ping timeout: 240 seconds]
<flops> Mon_Ouie: It's working, thanks again
Xeago_ has quit [Ping timeout: 256 seconds]
pwh has joined #ruby
pwh has quit [Client Quit]
IcyDragon has joined #ruby
<Flashmasterson> i'm no sure i understand the concept of argument
<Flashmasterson> *not
|jemc| has quit [Quit: WeeChat 0.4.1]
<Flashmasterson> it's similar to parameter?
Drakula2k has joined #ruby
<flops> Flashmasterson: We're talking about command line arguments
adam- has joined #ruby
jb41 has joined #ruby
kcin has quit [Ping timeout: 245 seconds]
polaco is now known as polaco_zZz
<flops> When I have the script 'my_script.rb' and call it with 'ruby my_script.rb argument1'
gmas has joined #ruby
jrhe has joined #ruby
IceDragon has quit [Ping timeout: 272 seconds]
nouitfvf has joined #ruby
<flops> Flashmasterson: so I then can access that argument with ARGV[0]
krz has quit [Quit: krz]
dhamidi has quit [Remote host closed the connection]
digifiv5e has joined #ruby
<poseid> flops: looks good, cool :)
<flops> nice
digifiv5e is now known as Guest66606
<Flashmasterson> ARGV(0) ?
|jemc| has joined #ruby
ravster has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
udon has quit [Ping timeout: 248 seconds]
<Mon_Ouie> No, ARGV[0]. ARGV is an array that contains the arguments that are passed to the program from the command line.
<havenwood> Flashmasterson: no, ARGV[0], it's an Array and you're asking for the first value in the Array
<havenwood> Flashmasterson: aka, ARGV.first
dawkirst has joined #ruby
dawkirst has quit [Read error: Operation timed out]
T__T has joined #ruby
dawkirst has joined #ruby
<havenwood> Flashmasterson: ARGV[0] == ARGV.[](0) == ARGV.first
<Flashmasterson> havenwood: ok it's too much right now but thanks
<Flashmasterson> i'll come back to it once i get past section 1.3.5
jrhe has quit [Ping timeout: 240 seconds]
dhamidi has joined #ruby
<Flashmasterson> "Turning on your computer"
<havenwood> Flashmasterson: #[] is a method, the argument going inside [here] instead of .[](here) is sugar - yeah might wanna just ignore for now
monkegjinni has quit [Remote host closed the connection]
<havenwood> suffice it to say, if you use the targeting brackets on an array like `array[this_index]` it returns the corresponding value
<havenwood> 0 being the first
<havenwood> -1 being the last
monkegjinni has joined #ruby
burlyscudd has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
<havenwood> so ARGV[0] is same as ARGV.first and ARGV[-1] is the same as ARGV.last
<havenwood> >> ARGV.class
<eval-in> havenwood => Array (https://eval.in/55799)
<Flashmasterson> that sounds simple but we haven't covered array yet, i dont want to get ahead of myself too much
<havenwood> aha, will make much more sense when you learn Array! ;)
kraljev2 has joined #ruby
beilabs has quit [Ping timeout: 240 seconds]
<kraljev2> Hey, guys, I'm making a gem
<kraljev2> however this line
<kraljev2> Dir["plugins/**/#{path}.rb"]
<kraljev2> seaches relative to inclusion script
<kraljev2> how can i get so /plugins/ would represent /lib/plugins/ ?
<havenwood> kraljev2: Dir["/lib/plugins/..."]
monkegjinni has quit [Read error: No route to host]
frustrum has joined #ruby
bradhe has joined #ruby
<kraljev2> doesn't leading slash represent the filesystem root?
<havenwood> yup
burlyscudd has quit [Ping timeout: 245 seconds]
<havenwood> oh, you want relative but up a branch?
<havenwood> i don't get it.
<havenwood> ahh
<kraljev2> /home/rok/.gem/ruby/2.0.0/gems/mygem-1.6.0/lib/plugins
<kraljev2> this lib
sayan has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
<kraljev2> Then I'll use simply
<kraljev2> File.dirname(__FILE__)
carraroj has joined #ruby
<havenwood> will be nice when 2.0 is presumed universal and we can use __dir__ instead of File.realpath(File.dirname(__FILE__))
<havenwood> or has that already happened?
* havenwood presumes wildly.
pwh has joined #ruby
<kraljev2> I guess
<havenwood> so establish what __dir__ is then ../ to where you wanna be i guess
bradhe has quit [Ping timeout: 272 seconds]
<havenwood> but prolly not actually __dir__ so 1.9 works :P
<kraljev2> Oh, I don't care about 1.9
<havenwood> then __dir__ away!
<kraljev2> :D
t_p has quit [Quit: Computer has gone to sleep.]
T__T has quit [Remote host closed the connection]
<Flashmasterson> i'm trying to require a file and get 'command not found'. entering it as this require "loadee" without the extension, as this study book is telling me to do
<havenwood> Just added Rubinius 2.1.0 to ruby-install if anyone wants to test that it works on a machine other than mine? :O (ruby-install rubinius)
<havenwood> brew install ruby-install --HEAD
nemish has joined #ruby
skaflem has quit [Quit: Leaving]
<havenwood> Flashmasterson: If 'loadee' is in the load path, that will indeed work
<havenwood> Flashmasterson: Double check the Ruby version you're on? (`RUBY_VERSION` from irb or `ruby -v` from command line.)
<havenwood> Rubinius 2.1.1***
<havenwood> rather
beilabs has joined #ruby
<havenwood> 2.1.0 is old news :P
<Flashmasterson> ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin10.8.0]
T_T has joined #ruby
<havenwood> Flashmasterson: and `gem install loadee`?
<havenwood> there is no loadee gem
<Flashmasterson> apparently
<nemish> if there is anyone with rbenv experience around https://github.com/sstephenson/rbenv/issues/467
T_T has quit [Remote host closed the connection]
jetblack has quit [Quit: leaving]
<havenwood> so if this is a file, you'll need to use `require_relative` or `require './loadee'` or something that actually points to that file
kcin has joined #ruby
<havenwood> Flashmasterson: so first find the file
T__T has joined #ruby
<havenwood> nemish: Not me, but no #rbenv channel so this would be place to ask.
<Flashmasterson> havenwood: the book hasn't mentioned that yet but i'll do it now
<havenwood> nemish: My advice would be if `rehash` doesn't solve it switch to chruby!? :P
<Flashmasterson> havenwood: i know where the file is and my current directory is it, but it won't pop up
<havenwood> Flashmasterson: require './loadee'
korisnik has joined #ruby
<Flashmasterson> command not found
<havenwood> Flashmasterson: Or when you're not in irb/Pry: require_relative 'loadee'
korisnik_ has joined #ruby
korisnik_ has quit [Client Quit]
<havenwood> Flashmasterson: are you in irb?
poseid_ has joined #ruby
udon has joined #ruby
<Flashmasterson> i am now
volty has quit [Quit: Konversation terminated!]
poseid has quit [Ping timeout: 240 seconds]
poseid_ is now known as poseid
bradhe has joined #ruby
<havenwood> did you go into irb from the directory where loadee.rb is found?
T__T has quit [Ping timeout: 272 seconds]
mengu__ has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<Flashmasterson> yes i think so
poseid has quit [Client Quit]
<havenwood> Flashmasterson: you can specify a directory to add to irb load path when you start irb: irb -I /path/i/want
<havenwood> Flashmasterson: so the dir you're in would be: irb -I .
<havenwood> Flashmasterson: but that should presumably work without explicitly doing it, i dunno what you've got going on
Es0teric has joined #ruby
blandflakes has joined #ruby
<Flashmasterson> uhg
b00stfr3ak has joined #ruby
<havenwood> Flashmasterson: For starters, switch from irb to Pry. Will work the same but better. :P http://pryrepl.org/
<kke> ruby code analyzers complain about = in conditional, it's quite common to do something like if dude = User.find(..) or something similiar, would you say it's a bad practice?
<havenwood> Flashmasterson: gem install pry; pry
<havenwood> kke: == is comparison
<havenwood> kke: Ruby interpreter can guess you must mean == though you wrote =
krnflake has quit [Ping timeout: 264 seconds]
<havenwood> kke: but don't do that, use equals (==) or threequals (===)
<Flashmasterson> havenwood: ok first: how do i switch back to ruby from irb
<havenwood> Flashmasterson: exit
<havenwood> Flashmasterson: assuming you mean switch back to the command line
<havenwood> Flashmasterson: switch back to ruby from irb makes no sense :P
<havenwood> irb is a ruby repl
krnflake has joined #ruby
<havenwood> Pry is a better ruby repl
<Flashmasterson> ok exit worked
<Flashmasterson> gem install pry; pry did nothing so far
mengu has quit [Ping timeout: 241 seconds]
<havenwood> Flashmasterson: gem -v
<havenwood> Flashmasterson: You installed Ruby recently with RVM?
<havenwood> Flashmasterson: Gotta get gem installs working, that is essential.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
einarj has joined #ruby
<kke> heftig: yes but it's common to do something like if user = User.find(params[:id]) do_something_with_user else raise "hey no user" end
<havenwood> Flashmasterson: Just to be sure run?: rvm get stable && gem update --system
<kke> otherwise you would have to do user = User.find(params[:id]) if user.nil? ....
<kke> which i don't see done very much
<Flashmasterson> havenwood: ok nevermind i just had to be patient: Successfully installed pry-0.9.12.2
<Flashmasterson> Parsing documentation for pry-0.9.12.2
<Flashmasterson> 1 gem installed
<Flashmasterson> Installing ri documentation for pry-0.9.12.2
<Flashmasterson> [1] pry(main)>
<Flashmasterson> havenwood: i wish i could know if ruby is actually working or just waiting for me to Ctrl+C it's ass
<kraljev2> Why is my gem folder not in $LOAD_PATH?
<havenwood> kke: that isn't sane, never use the assignment operator in place of comparison operator
kazuuu has joined #ruby
<havenwood> kke: two equal signs: ==
user258467 has quit [Quit: Leaving...]
Valicek1 has joined #ruby
atno has quit [Read error: Operation timed out]
relix has joined #ruby
coderhs has quit [Quit: Leaving]
<havenwood> kraljev2: you have GEM_HOME and GEM_PATH env vars correctly set?
<Flashmasterson> ok why am i in pry and what does it do
<havenwood> kraljev2: build Ruby yourself?
<havenwood> Flashmasterson: it is your new irb
Alleh has quit [Quit: Textual IRC Client: www.textualapp.com]
ssvo has joined #ruby
<kke> havenwood: still it's a common practice
<havenwood> kke: That is horrifying.
<Flashmasterson> 'require "loadee" ' still does nothing
<havenwood> kke: in Rails? or rather Rails devs do that?
einarj has quit [Ping timeout: 272 seconds]
idiocrash has joined #ruby
AFKGeek has joined #ruby
<havenwood> Flashmasterson: require './loadee'
einarj has joined #ruby
<havenwood> Flashmasterson: the './' is important if you mean a local file (Ruby 1.9+)
AFKGeek has quit [Client Quit]
<havenwood> Flashmasterson: you on an old, real old version of the book?
<Flashmasterson> havenwood: hahah i guess man, it's just 1.9.1
<havenwood> 1.9.2+ is modern Ruby
<Flashmasterson> havenwood: that still did nothing, in pry
<havenwood> 1.9.1- should be avoided at all costs
<Flashmasterson> havenwood: well this, people ket recommending this book to me and it's been really good so far
<Flashmasterson> *well shit
<Flashmasterson> *kept. goddamnit
Monie has joined #ruby
<havenwood> Flashmasterson: do you have the first edition or something?
<havenwood> Flashmasterson: http://www.manning.com/black3/
<havenwood> looks like Second Edition is out in beta, in print this Spring
atno has joined #ruby
<Flashmasterson> ...
drumsrgr8forn8 has joined #ruby
Zolo has joined #ruby
<Flashmasterson> and by the time i get 1/4 of the way through that one another one will come out
<havenwood> if its only on second edition, maybe not!
<havenwood> in another couple years, so just don't read too slow!
endash has quit [Quit: endash]
kraljev2 has quit [Ping timeout: 248 seconds]
<havenwood> kke: is what is meant?: if (user = User.find(params[:id]))? maybe i'm just not getting what you're saying?
mary5030 has quit [Remote host closed the connection]
<havenwood> kke: or user is already set and you're checking for equality?
xk_id has joined #ruby
mary5030 has joined #ruby
<Flashmasterson> havenwood: alright well how much of this 1.9.1 book is going to screw me over?
Xeago has quit [Remote host closed the connection]
<havenwood> err, if it was 1.9.2 i'd say you'd be fine
<Flashmasterson> wow
<havenwood> i dunno 1.9.1, there are for sure going to be some odd differences
drumsrgr8forn8 has quit [Ping timeout: 248 seconds]
<havenwood> 1.9.1 was not a stable release
<Flashmasterson> christ
<havenwood> 1.9.2 is first stable of 1.9 branch
<Flashmasterson> so i just wasted my money on this thing
carraroj has quit [Quit: Konversation terminated!]
<havenwood> for sure it'd be better to get the one in beta, sorry!!
<havenwood> not only 1.9.2/1.9.3 differences from 1.9.1 but also 2.0 (and maybe 2.1) stuff
<havenwood> not too hard to track 1.9-2.0 changes or 2.0-2.1
<havenwood> 1.8 to 1.9 is horrid, pretend 1.8 doesn't exist
<havenwood> end of life
<Flashmasterson> damnit, ok
<Flashmasterson> btw the load command isn't working
<Flashmasterson> in pry or ruby
TheMoonMaster has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 265 seconds]
Astralum has joined #ruby
kraljev2 has joined #ruby
<havenwood> Flashmasterson: works on my machine ;P
F1skr has joined #ruby
ehc has quit [Quit: ehc]
<havenwood> Flashmasterson: seems you have something wrong with load path
<havenwood> Flashmasterson: did you update RVM and check you have latest RubyGems?
threesome has joined #ruby
<havenwood> Flashmasterson: you may wanna update RVM and reinstall Ruby because it should work from a clean install
<Flashmasterson> christ… i have 2.0.0. on all of that
<havenwood> #rvm is very helpful if you follow their process for reporting issues, but i dunno what you've got setup wrong that require and load aren't getting the load path
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mobileblue has joined #ruby
<kke> havenwood: x = "foo" sets x to "foo" and returns "foo", so user = User.find(user_id) sets user to nil and returns nil, so the expression evaluates as false.
<Flashmasterson> i'll check it out. but before i do, is there a short answer to that "how do i reinstall rvm, rubies, gems?" because i know they're all going to refer me to google and it will take all day to figure it out
<kke> same as raise "User not found" unless user = User.find(user_id)
monkegjinni has joined #ruby
carraroj has joined #ruby
<Flashmasterson> but i also acknowledge that installing and reinstalling is a something i need to know well because updates happen so frequently
<kke> havenwood: in case user is not found of course. if user is found it returns an user which isn't falsey.
<havenwood> kke: Ahh, the distinction is in the parens.
<havenwood> >> if user = nil; puts 'yup' end
<eval-in> havenwood => /tmp/execpad-42833a6ac864/source-42833a6ac864:2: warning: found = in conditional, should be == ... (https://eval.in/55801)
<havenwood> >> if (user == nil); puts 'yup' end
<eval-in> havenwood => undefined local variable or method `user' for main:Object (NameError) ... (https://eval.in/55802)
michael_mbp is now known as zz_michael_mbp
monkegjinni has quit [Read error: No route to host]
ssvo has quit [Ping timeout: 248 seconds]
<kke> >> if user = "user"; puts "hello, #{user}" end
<eval-in> kke => /tmp/execpad-d744a72f2cc0/source-d744a72f2cc0:2: warning: found = in conditional, should be == ... (https://eval.in/55803)
<havenwood> ah, gotcha - i'm slow on the uptake, sry - so trying to avoid checking User.find(user_id) before you move on like andand
Astral_ has joined #ruby
<kke> havenwood: yeah, avoiding the extra line basically. user = User.find(user_id) if user.nil? puts "hey no user" else do_stuff_with(user).
polaco_zZz is now known as polaco
<Flashmasterson> havenwood: i'll check out #rvm again. but before i do, is there a short answer to "how do i reinstall rvm, rubies, gems?"  because i know they're all going to refer me to google and it will take all day to figure it out
<kke> i mostly use x.eql?(y) in conditionals instead of == anyway so to my eye it looks clear as sky
T__T has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
<havenwood> Flashmasterson: to update RubyGems `gem update --system`, to update rvm `rvm get head`, to reinstall ruby `rvm reinstall ruby` (guessing on that last one, i don't use rvm)
T__T has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 248 seconds]
<Flashmasterson> havenwood: thanks a lot for not referring me to google. much appreciated
burlyscudd has joined #ruby
spider-mario has quit [Remote host closed the connection]
<havenwood> kke: have you looked at the andand gem?: https://github.com/raganwald/andand#readme
<havenwood> kke: does Rails have something like andand built in? I know there's #try.. maybe try #rubyonrails?
einarj has quit [Remote host closed the connection]
<havenwood> Flashmasterson: np
einarj has joined #ruby
<kraljev2> Why is ruby's sort not stable?
deens has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
burlyscudd has quit [Ping timeout: 245 seconds]
einarj has quit [Ping timeout: 272 seconds]
<havenwood> kraljev2: stable?
<kraljev2> yep, stable sort :)
<kraljev2> this is a property of a sorting algorithm
<Mon_Ouie> havenwood: A stable sort means that, if you have two equal items in an array, a and b, and a is before b in the initial array, a will be before b in the sorted array
<nemish> anyone know what might be reason for undef loc var or method
<nemish> code => "event['newfield'] = event['message'] * 1000" }
<havenwood> Mon_Ouie: aha
nouitfvf has quit []
Xeago has joined #ruby
<Mon_Ouie> I don't know *why* the implementation used by Ruby isn't stable (it's just an in-place quicksort I think), but I know sort_by is/used to be stable
<Mon_Ouie> So that can be used as a workaround if it still works
einarj has joined #ruby
kraljev2 has quit [Ping timeout: 248 seconds]
<Mon_Ouie> He just got disconnected (ping timeout)
Guest24381 has quit [Remote host closed the connection]
burlyscudd has joined #ruby
<havenwood> TL;DR: stable sort is slower and won't ever replace sort, if implemented stable_sort would prolly be accepted, in the meanwhile can `i = 0; ary.sort_by{ |x| [x, i += 1] }`.
burlyscudd has quit [Client Quit]
mrsolo_ has quit [Quit: This computer has gone to sleep]
astrobunny has quit [Ping timeout: 272 seconds]
osvico has quit [Ping timeout: 265 seconds]
ChronocityLC has quit [Ping timeout: 272 seconds]
zachrab has joined #ruby
zachrab has quit [Remote host closed the connection]
dz has joined #ruby
bradhe has quit [Remote host closed the connection]
dz is now known as Guest76485
bradhe has joined #ruby
Guest76485 is now known as nilved
astrobunny has joined #ruby
<havenwood> class Array; def stable_sort; i = 0; sort_by { |x| [x, i += 1] } end end
asteros has joined #ruby
<havenwood> and yup, a ton slower
csffsc has joined #ruby
bradhe_ has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
ewnd9 has quit [Ping timeout: 245 seconds]
CorpusCallosum has joined #ruby
<csffsc> Hey everyone.. I'm currently trying to test an array of integers to see if the sum equals a specific number, I currently have it working in a true/false capacity - can anyone help me with returning the numbers?
T__T has joined #ruby
einarj has quit [Remote host closed the connection]
<Flashmasterson> i updated ruby, rvm, and gems but still cannot get require './loadee' to work
nari has quit [Ping timeout: 245 seconds]
schnux has joined #ruby
<Flashmasterson> loadee being the file name
einarj has joined #ruby
<csffsc> I believe I'm working with a sum np problem
<havenwood> benchmarks of sort versus naive stable sort: https://gist.github.com/havenwood/7059881
tabolario has joined #ruby
<havenwood> csffsc: you can just check uniq perms, right?
<havenwood> csffsc: if they're always pairs: any? { |k, v| k + v == sum }
einarj has quit [Ping timeout: 248 seconds]
T__T has quit [Remote host closed the connection]
<csffsc> havenwood: so the subtext, is I"m designing a program to find the best blackjack hand, out of an array of integers
pleal has joined #ruby
<havenwood> csffsc: if speed is important and you're only comparing uniqs, you can use an algorithm like this one: https://github.com/LtCmdDudefellah/unique_permutation/blob/master/lib/unique_permutation.rb
<csffsc> so the best is 21, out of two pairs, and then descending.. sum total is first, followed by # of cards
Mars` has joined #ruby
<havenwood> Flashmasterson: #rvm have any suggestions regarding what is wrong with your $LOAD_PATH?
asteros has quit [Quit: asteros]
<havenwood> csffsc: oh, sorry just read the first line you posted - you want to return the value not true or false
<havenwood> map to the value*
astrobunny has quit [Read error: Operation timed out]
nfk has quit [Quit: yawn]
agustinvinao has joined #ruby
<havenwood> csffsc: array.permutation(perms).select { |black, jack| black + jack == sum }
<havenwood> i dunno the proper term for the first and second card in blackjack?
<csffsc> hmm, let me look
<csffsc> I'm not sure on terminology.. 10+11 =21, however that beats, 10+9+2 (also 21)
malcolmva has quit [Ping timeout: 272 seconds]
<csffsc> so I was thinking of a loop, first looking for maximum sum, then looking for lowest card count
<csffsc> when each loop ends, returning its value (sum, array of integers)
<agustinvinao> Hi, how can I fire a task after deploy:setup in Capistrano v3? (i got Don't know how to build task 'deploy:setup' when I try it)
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
astrobunny has joined #ruby
<schnux> guys,has anybody a hint for me, installing rails on a fresh centos6.4, aborting with error: activesupport requires ruby >= 1.9.3 ? don't want RVM or install from source - like to stay with yum.
zerun0 has quit [Ping timeout: 272 seconds]
zerun0_ has joined #ruby
endash has joined #ruby
<csffsc> havenwood* so I think your code, is currently setup for only testing two cards?
vlad_starkov has quit [Read error: Connection reset by peer]
<csffsc> *havenwood* two cards?
<csffsc> .. I dont know how to call out your name, sorry.
<havenwood> csffsc: yup, do it the way you had if it may be more cards (just don't call it pair)
<havenwood> csffsc: change `pair` to `cards` and no longer confusing ;)
endash_ has joined #ruby
pleal has quit [Remote host closed the connection]
<csffsc> okay ;p
pleal has joined #ruby
<havenwood> csffsc: i just start typing irc name and hit <tab> for magic
<csffsc> havenwood: ok
<havenwood> autocompletion ftw
<csffsc> I get autocompletion too, however I"m not seeing your name being formatted
<deepender> any ruby expert here?
<flops> deepender: just ask your question
<deepender> sorry , yes
<havenwood> schnux: CentOS is too slow on adopting packages to use anything even remotely new. Fedora latest ships with Ruby 2.0.0. You can get 1.9.3 in RedHad community package thingy. No 2.0 available.
<havenwood> schnux: Best bet is to build it yourself. Or use ruby-install, ruby-build or rvm to do it for you.
<deepender> I have a class in ruby which contain two method one is self and other is instance.
<havenwood> schnux: Or switch OSes. :P
Macaveli has quit [Quit: Computer has gone to sleep.]
<havenwood> deepender: So a class instance method and a class method (self).
<deepender> Now I want to call this methods from other class , if suppose self method is last and other is render.
Squarepy has quit [Quit: Leaving]
<deepender> I wanted to know what is best possible concise code possible
<nemish> can someone help with this
<nemish> event['newfield'] =* (event['message'] * 1000)
pleal has quit [Ping timeout: 240 seconds]
<deepender> I thought something like this
<deepender> class.last.render
Mars` has quit [Remote host closed the connection]
<deepender> but render has argument
s0ber has quit [Read error: Connection reset by peer]
<nemish> if message is 4.321 i end up with 4.321 repeated 1,000 times rather than multiplied
s0ber has joined #ruby
Mars` has joined #ruby
<havenwood> nemish: what is?: event['message'].class?
<flops> deepender: if render is an instance method, on which instance shall it operate in your case?
<havenwood> nemish: **: event['message'].class
<deepender> which I get from class.method output
<flops> or does last actually return the last instanciated object?
<deepender> Yes
<deepender> it does
<nemish> havenwood: event is the json coming in... message is a field in the json... newfield is the new created field with result
<havenwood> nemish: `"4.321"` or `4.321`?
<deepender> but that is also the argument of render method
<nemish> problem is result is doing a repetition of message rather than actually multiplying
<havenwood> nemish: I'm trying to point out to you that you've got a String not a Float.
<flops> deepender: So the 'naive' approach would be Class.last.render(Class.last) ?
<schnux> havenwood: thx, tried to avoid rvm. since rails worked in centos 6.3 , but I'll give rvm a try.
<deepender> the code is calling render but that doesn't work tried
<deepender> the one u mentioned
blandflakes has quit [Read error: Connection reset by peer]
<havenwood> schnux: I'd recommend ruby-install + chruby, but rvm is a popular option.
<flops> How do you call it normally, deepender ?
<havenwood> nemish: event['message'].to_f * 1000
<deepender> it works but
<havenwood> schnux: chruby is ~90 LOC and rvm is about 20,000 LOC to give you an idea
<deepender> i need more concise
<deepender> flops:
<_aeris_> havenwood > rbenv is great
<deepender> any way of more concise code
<havenwood> _aeris_: I prefer chruby to rbenv. :)
Mars` has quit [Ping timeout: 248 seconds]
<_aeris_> rmv is too much intrusive on the system
endash has quit [Quit: endash]
endash_ is now known as endash
<deepender> I was using the same approach
<deepender> flops
<deepender> or
lukec has quit [Quit: lukec]
<deepender> creating an object can be other
roflpox has joined #ruby
<nemish> havenwood: oh wow... didn't even think of that... how would i get result to be integer? event['newfield'].to_i ?
<havenwood> nemish: you'd lose the digits after the decimal that way, but yup
<havenwood> nemish: to_f for float
BizarreCake has quit [Ping timeout: 248 seconds]
<roflpox> could anyone here help me with a slight problem in regexp
<nemish> havenwood: yeah understood
<deepender> Conciseness is the requirement here
<havenwood> roflpox: show the code?
<roflpox> ok.. hold on!
blandflakes has joined #ruby
<nemish> havenwood: to_i not working
<flops> does your code look like this? deepender ?
<nemish> havenwood: event['newfield'].to_i =* (event['message'].to_f * 1000)
<havenwood> nemish: event['newfield'].class
<nemish> havenwood: undefined method `class=' for nil:NilClass
<havenwood> nemish: what version of Ruby are you on?
<deepender> see comment
<deepender> flops
<havenwood> >> nil.to_i
<eval-in> havenwood => 0 (https://eval.in/55829)
roflpox has quit [Client Quit]
<nemish> jruby 1.7.4
roflpox has joined #ruby
<nemish> havenwood: event['newfield'] = (event['message'].to_f * 1000)
kofno has joined #ruby
<nemish> i send message 4.321
<nemish> newfield retuls 4321.0
<nemish> i just want 4321
<flops> deepender: why don't you def render; render(last); end directly in your class?
<nemish> so how do i convert newfield to int
<roflpox> ...why can't i type
<havenwood> nemish: event['newfield'] =* (event['message'].to_f * 1000).to_i
<nemish> sweet but i think its going to complain about to_i again ... 1 sec
<deepender> No things are more complicated here
<deepender> flops
<deepender> can't do that
danshultz has joined #ruby
<roflpox> roflpox : /([cars]{4})/i.match("scream cars for four scar creams")
<deepender> render take different argument other than last
<havenwood> nemish: it should not complain, if it does tell it to hush and that #to_i is available
g0th has quit [Quit: Lost terminal]
<havenwood> nemish: You are the master and Ruby is the machine, don't let it boss you around like that.
<nemish> havenwood: lol it worked... when i had .to_i on newfield is when it complained... at the end seems fine :)
<nemish> thanks :)
<havenwood> nemish: np
<roflpox> I can't get it to match both cars and scar
<flops> deepender: I don't understand it then, you should just stick to the working method.
randomnick_ has joined #ruby
<flops> roflpox: Nice, doing the edx course?
<roflpox> trying to!
<roflpox> some of these homeworks are tough for me
Vivekananda_ has joined #ruby
<flops> And you are stuck with the regex at the moment?
<roflpox> yea, I can't figure out how to get multiple matches with the regex
<flops> Well I solved it differently - check split() on String
<nemish> havenwood: ha :)... any good tutorials on jruby/ruby? I'd like to learn more
<deepender> okey thanks flops for your time
<flops> deepender: good luck solving it
<deepender> I will update gist if i found anything
<roflpox> ok, so flops , just look else where then? no regex at all? Just string stuff?
<flops> awesome
<roflpox> oohh
<flops> roflpox: I used both, regex and split()
<roflpox> I think I know what you are saying now!
Clooth has quit [Quit: Leaving...]
cucumbrman has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<flops> roflpox: Sorry for misguiding you, I actually didn't use regex for that task, only a Hash with an Array and split()
<roflpox> flops: ok, i was experimenting with split+regex, couldn't make it work :), let me try that
wzbyte has joined #ruby
deens has joined #ruby
<roflpox> flops: I'm also trying to get the tournament thing for the RPS, and the attr_history thing as well
udon has quit [Read error: Operation timed out]
<roflpox> flops: i feel a bit bad I have not been able to solve them
<flops> Where are you stuck?
x1337807x has joined #ruby
x1337807x has quit [Client Quit]
udon has joined #ruby
<roflpox> i'm not sure how to make the rock paper scissors one recursive
stayarrr has quit [Quit: Leaving...]
x1337807x has joined #ruby
danshultz has quit [Remote host closed the connection]
<flops> roflpox: your winner(player1, player2) is working?
danshultz has joined #ruby
<roflpox> yea
adambeynon has joined #ruby
deens has quit [Ping timeout: 248 seconds]
<havenwood> nemish: tryruby.org is a good quick run-through of the very basics - i'd also recommend Ruby Koans, maybe RubyMonk, Ruby Rogues, RubyTapas, Ruby5, check out https://www.ruby-lang.org/en/documentation/ for some others
vlad_starkov has joined #ruby
<havenwood> nemish: great talks aplenty on confreaks
newbiehacker has quit [Ping timeout: 272 seconds]
<havenwood> nemish: And use Pry instead of irb: http://pryrepl.org/
<deepender> Hey floks
korisnik has quit [Remote host closed the connection]
mojjjo has quit [Remote host closed the connection]
Drakula2k has quit []
<deepender> can u tell what is write way to decide
dhamidi has quit [Ping timeout: 272 seconds]
<deepender> which method to make a class method
<deepender> and which to make instance
<deepender> I feel a little confused in it especially when dealing with rails
udon has quit [Ping timeout: 272 seconds]
<flops> roflpox: ok, so my base case is tournament[0][0] not being an Array
carraroj has quit [Quit: Konversation terminated!]
T__T has joined #ruby
jhaals has joined #ruby
<flops> roflpox: maybe you can elaborate upon that yourself a bit because I don't want to give you the complete solution for obvious reasons
udon has joined #ruby
danshultz has quit [Ping timeout: 256 seconds]
Flashmasterson has quit [Quit: Leaving.]
<roflpox> flops: ok, let me just run with that hint for a while
<deepender> hey flops back
<flops> hey
<deepender> can u tell what is the right way to decide which method to make an self and which to make an instance , I feel little confused with it especially in dealing with rails
shtirlic has quit [Read error: Connection reset by peer]
<deepender> where scalability come
deens has joined #ruby
deens has quit [Remote host closed the connection]
<deepender> Is there any hard fast rule I can use , flops?
jhaals has quit [Client Quit]
deens has joined #ruby
<flops> deepender: No idea, your question's are very unspecific
<flops> questions*
ehc has joined #ruby
burlyscudd has joined #ruby
<deepender> okey , I rephrase it How to decide whether to make a class method a self method or an instance method while writing a software?
shtirlic has joined #ruby
<deepender> when you are in doubt whether this class method will be used somewhere else
<flops> deepender: This depends on the method itself: If it should operate on single instances you make a instance method else you make a class/static method.
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
<deepender> okey
<deepender> thanks
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deens has quit [Ping timeout: 272 seconds]
<roflpox> flops: before I start doing any of these problems again though.. i gotta see whats going on with this regexp
<flops> robolar...
<roflpox> flops: if i make s = "s s s s s s" and i do /(s)/.match(s)
T__T has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 272 seconds]
ehc has quit [Ping timeout: 265 seconds]
cescalante is now known as ce_afk
<flops> roflpox: http://rubular.com/
<roflpox> flops: why don't i get a match of $1-$6 things
<roflpox> flops: it works on rubular :)
<flops> hm, ok
<flops> let me test it
Bry8Star{T2 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
DanKnox is now known as DanKnox_away
Anderson has left #ruby ["Leaving"]
bricker`LA has joined #ruby
nism-pi has quit [Ping timeout: 245 seconds]
<flops> roflpox: what are you trying to achieve?
<roflpox> i want a MatchData object to return with all the matches in variables $1-$6
<roflpox> flops: i see i can use scan on strings or i can use find_all on arrays, so i know there is an easier way to do it
<roflpox> flops: I just want to regexp to work the way I think it does (or at least it seems to on rubular)
<shevy> hmmm guys, off-topic but... perhaps someone can tell me
<shevy> in bash, if I have a file like "foo.sh", when I type "./foo.sh" it tries to excute that file. but how does it know what to do with it?
robustus has quit [Ping timeout: 264 seconds]
<roflpox> y
Monie has quit [Quit: Textual IRC Client: www.textualapp.com]
<flops> roflpox: "s s s s s".scan(/(s)/) I think this is what you want?
decoponio has quit [Quit: Leaving...]
<shevy> havenwood lol when I scrolled up, I read you typing "Ruby Koreans" rather than Ruby Koans ...
Mars` has joined #ruby
Guest__ has joined #ruby
<roflpox> flops: well similar... for instance say you had a string with a phone number in it
robustus has joined #ruby
nism-pi has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<roflpox> flops: you could something like /\((\d{3})\)\s+(\d{3})-(\d{4})/ against that string
iamjarvo has joined #ruby
<roflpox> and it would capture each part of the phone number in three variables that can be accessed...
<havenwood> shevy: hehe
_aeris_ has left #ruby ["@++"]
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<flops> roflpox: /\((\d{3})\)\s+(\d{3})-(\d{4})/.match("(123) 123-1234").to_a I don't see the problem?
mengu has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
T__T has joined #ruby
Lewix has joined #ruby
<roflpox> flops : ok.. gotcha.....
<roflpox> flops: i'm not sure what i was trying to do
<flops> ok
einarj has joined #ruby
<roflpox> flops: but when i try that exact thing, I can't get it to work on the other strings
<flops> roflpox: so basically I just had luck choosing the right string?
<flops> :D
relix has joined #ruby
<roflpox> flops : well no, its structured differently
<roflpox> flops: like do /(s)/.match("s s s s s").to_a
tonni has quit [Remote host closed the connection]
<roflpox> flops: there is no array of 's's
DanKnox_away is now known as DanKnox
<Mon_Ouie> Because it's only the first match. Then you want scan, as suggested before.
iamjarvo has quit [Ping timeout: 248 seconds]
<roflpox> ok so match is only for 1 instance then
<roflpox> ...
Mitchellvanw has joined #ruby
Flashmasterson has joined #ruby
Flashmasterson has quit [Client Quit]
<roflpox> thanks for the help!
DanKnox is now known as DanKnox_away
bradhe_ has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 272 seconds]
shtirlic has quit [Quit: ZNC - http://znc.in]
bradhe has joined #ruby
jb41_ has joined #ruby
schnux has quit [Quit: Verlassend]
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
hugohagogo has quit [Remote host closed the connection]
jb41 has quit [Ping timeout: 260 seconds]
roflpox has quit [Quit: Leaving]
ShellFu_afk is now known as ShellFu
kraljev2 has joined #ruby
havenwood has quit [Remote host closed the connection]
<ShellFu> hey all. In the following pastebin >http://pastebin.com/C7uLu1zE< im attempting a recursive method that is currently always returning >{}< or an empty hash. Im sure its with line >#15<, but im having difficulty understanding exactly why this isnt working
iamjarvo has joined #ruby
sniffingcats has joined #ruby
<ShellFu> It should return a hash with my results, and I see all resulting hashes, but its not returning the proper final hash. Only thing I can think of is the assignment on line >#15<
colonolGron has joined #ruby
DanKnox_away is now known as DanKnox
robert_ has quit [Ping timeout: 256 seconds]
Mars` has quit [Remote host closed the connection]
<ShellFu> So it should be loading the given yaml from find. It should then look at the hash and see if key >:child_hash< exists and is not empty. Then if not empty should find resulting >:child_hash< merge the two and rinse and repeat until >:child_hash< nil or ''
Mars` has joined #ruby
<Mon_Ouie> Can you give an example of input file?
<ShellFu> certainly
end_guy has quit [Ping timeout: 240 seconds]
kraljev2 has left #ruby [#ruby]
ericmathison has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
Monie has joined #ruby
<ShellFu> So in that example assume the YAML you're looking at is default.yaml, and key >:child_hash< is file >default1.yaml<
rickmasta has joined #ruby
<ShellFu> I see those hashes returned correctly from find when I add >p result< inbetween lines >#16 and #17<
ce_afk is now known as cescalante
Mars` has quit [Ping timeout: 272 seconds]
stayarrr has joined #ruby
<Mon_Ouie> Oh, it's just because of the keys you're using
<Mon_Ouie> When you load a hash from YAML the keys are strings, not symbols
<ShellFu> yeah I converted in the example so folks wouldnt say #1 use symbols for keys not strings :)
bradhe has quit [Remote host closed the connection]
iamjarvo has quit [Remote host closed the connection]
bradhe has joined #ruby
roflpox has joined #ruby
<Mon_Ouie> And also, you are never adding in the data of result into the hash
iamjarvo has joined #ruby
<ShellFu> That would certainly explain the empty hash :|
<ShellFu> I thought the merge takes care of that. I guess I am mistaken
pwh has quit []
<Mon_Ouie> You merge final_hash and child, but never do you merge result
<ShellFu> ah
<ShellFu> I think I got ya. Trying this out
Mars` has joined #ruby
udon has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 248 seconds]
marcdel has joined #ruby
jb41_ is now known as jb41
bocaneri has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
<ShellFu> got it. Thanks for the extra set of eyes :)
rahulkmr has quit [Read error: Connection reset by peer]
benwoody has joined #ruby
bocaneri has quit [Quit: Leaving]
rahulkmr has joined #ruby
Mars` has quit [Remote host closed the connection]
bocaneri has joined #ruby
Mars` has joined #ruby
nism-pi has quit [Ping timeout: 248 seconds]
Eaven has joined #ruby
Xaitec has joined #ruby
dzhulk has quit [Quit: Leaving.]
dangerousdave has joined #ruby
Eaven has quit [Remote host closed the connection]
lsmola has joined #ruby
polaco is now known as polaco_zZz
jmeeuwen_ has joined #ruby
Mars` has quit [Ping timeout: 272 seconds]
burlyscudd has joined #ruby
Stygia has joined #ruby
jmeeuwen has quit [Ping timeout: 252 seconds]
aef has quit [Remote host closed the connection]
jmeeuwen_ is now known as jmeeuwen
kloeri has joined #ruby
dash_ has quit [Quit: dash_]
deepender has quit [Ping timeout: 245 seconds]
danshultz has joined #ruby
csffsc has quit [Remote host closed the connection]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
csffsc has joined #ruby
csffsc_ has joined #ruby
polaco_zZz is now known as polaco
DanKnox is now known as DanKnox_away
burlyscudd has quit [Ping timeout: 256 seconds]
dv__ is now known as dv_
csffsc_ has quit [Remote host closed the connection]
danshultz has quit [Ping timeout: 272 seconds]
DanKnox_away is now known as DanKnox
tehrubies has joined #ruby
Mars` has joined #ruby
csffsc has quit [Ping timeout: 265 seconds]
tehrubies has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benwoody has quit [Quit: benwoody]
ssmithstone has quit [Quit: leaving]
relix has joined #ruby
flops_ has joined #ruby
x1337807x has joined #ruby
polaco is now known as polaco_zZz
orien has joined #ruby
sambao21 has joined #ruby
zengfb has joined #ruby
bradhe has joined #ruby
<shevy> let's all code faster
Astral_ has quit [Ping timeout: 272 seconds]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
burlyscudd has joined #ruby
burlyscudd has quit [Changing host]
burlyscudd has joined #ruby
flops_ has quit [Quit: leaving]
sniffingcats has quit [Quit: Til rivido Idisti!]
DanKnox is now known as DanKnox_away
burlyscudd has quit [Client Quit]
Xaitec has quit [Remote host closed the connection]
kh019267 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alx- has quit [Quit: Leaving...]
polaco_zZz is now known as polaco
alx- has joined #ruby
Alth has quit [Ping timeout: 248 seconds]
kh019267 has joined #ruby
<Mon_Ouie> let's slow down the universe instead, that should be easier
flops_ has joined #ruby
flops_ has quit [Client Quit]
flops_ has joined #ruby
aryaching_ has quit [Ping timeout: 272 seconds]
cescalante is now known as ce_afk
ce_afk is now known as cescalante
bradhe has quit [Remote host closed the connection]
Seventoes has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
Mitchellvanw has quit [Quit: Dozing off...]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
polaco is now known as polaco_zZz
astrobunny has quit [Ping timeout: 240 seconds]
rahulkmr1 has joined #ruby
colonolGron has quit [Quit: Lost terminal]
zengfb has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 248 seconds]
s0ber_ has joined #ruby
rahulkmr has quit [Ping timeout: 272 seconds]
dash_ has joined #ruby
Seventoes has joined #ruby
x1337807x has joined #ruby
s0ber has quit [Read error: Connection reset by peer]
s0ber_ is now known as s0ber
marcdel has joined #ruby
astrobunny has joined #ruby
raphaelivan has joined #ruby
kazuuu has quit [Remote host closed the connection]
gsvolt has joined #ruby
kazuuu has joined #ruby
maroloccio has joined #ruby
orien has quit []
T__T has quit [Remote host closed the connection]
orien has joined #ruby
gverri_ has joined #ruby
roflpox has quit [Quit: Leaving]
F1skr has quit [Ping timeout: 248 seconds]
flops_ has quit [Quit: leaving]
samuel02 has joined #ruby
flops_ has joined #ruby
kazuuu has quit [Ping timeout: 272 seconds]
xk_id has quit [Quit:
zenon003 has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
astrobunny has quit [Ping timeout: 272 seconds]
orien has quit [Quit: Computer has gone to sleep.]
dash_ has quit [Quit: dash_]
slash_nick has quit [Read error: Operation timed out]
utkarsh has quit [Quit: No Ping reply in 180 seconds.]
slash_nick has joined #ruby
utkarsh has joined #ruby
TorpedoSkyline has quit [Ping timeout: 272 seconds]
flops_ has quit [Quit: leaving]
TorpedoSkyline has joined #ruby
astrobunny has joined #ruby
orien has joined #ruby
zenon003 has quit [Remote host closed the connection]
zenon003 has joined #ruby
volty has joined #ruby
flops_ has joined #ruby
tonni has joined #ruby
zenon003 has quit [Remote host closed the connection]
zenon003 has joined #ruby
havenwood has joined #ruby
kirun has quit [Quit: Client exiting]
zenon003 has quit [Remote host closed the connection]
zenon003 has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
nisstyre has quit [Quit: Leaving]
zz_michael_mbp is now known as michael_mbp
pwh has joined #ruby
flops_ has quit [Quit: leaving]
flops_ has joined #ruby
zenon003 has quit [Remote host closed the connection]
zenon003 has joined #ruby
Giorgio has joined #ruby
mayorga has joined #ruby
michael_mbp is now known as zz_michael_mbp
w3pm has quit [Ping timeout: 265 seconds]
TorpedoSkyline has quit [Ping timeout: 248 seconds]
snearch has joined #ruby
astrobunny has joined #ruby
zenon003 has quit [Remote host closed the connection]
zenon003 has joined #ruby
flops_ has quit [Client Quit]
kh019267 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
flops_ has joined #ruby
Guest__ has quit [Quit: Textual IRC Client: www.textualapp.com]
idiocrash has quit [Remote host closed the connection]
zenon003 has quit [Remote host closed the connection]
zenon003 has joined #ruby
soheil has joined #ruby
TorpedoSkyline_ has joined #ruby
pwh has quit [Ping timeout: 272 seconds]
snearch has quit [Read error: Connection reset by peer]
flops has quit [Quit: Page closed]
bradhe has joined #ruby
zigomir has quit [Quit: zigomir]
dzhulk has joined #ruby
frustrum has quit [Ping timeout: 272 seconds]
soheil has quit [Ping timeout: 240 seconds]
kyle___ has quit [Quit: 6 month new-release reboot.]
orien has quit [Quit: Computer has gone to sleep.]
Evixion has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 248 seconds]
zenon003 has quit [Remote host closed the connection]
zenon003 has joined #ruby
jrhe has joined #ruby
flops_ has quit [Quit: leaving]
zenon003 has quit [Remote host closed the connection]
flops has joined #ruby
zenon003 has joined #ruby
Evixion has joined #ruby
zenon003 has quit [Client Quit]
flops has quit [Client Quit]
pwh has joined #ruby
nateberkopec has joined #ruby
flops has joined #ruby
nateberkopec has quit [Client Quit]
Zolo has quit [Remote host closed the connection]
raul782 has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
Zolo has joined #ruby
pwh has quit [Client Quit]
mercwithamouth has joined #ruby
flops has quit [Client Quit]
mrsolo_ has joined #ruby
flops has joined #ruby
flops has quit [Client Quit]
Zolo has quit [Ping timeout: 272 seconds]
markus_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jrobeson has quit [Read error: Connection reset by peer]
orionstein_away is now known as orionstein
robert_ has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
einarj has joined #ruby
markus_ has quit [Client Quit]
jrobeson has joined #ruby
ehaliewicz has joined #ruby
rahulkmr1 has quit [Ping timeout: 256 seconds]
slevin__ has joined #ruby
lsmola has quit [Ping timeout: 265 seconds]
flops has joined #ruby
aryaching has joined #ruby
Tamal has joined #ruby
dangerousdave has quit [Quit: Leaving...]
slevin__ has quit [Client Quit]
lukec has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Client Quit]
dangerousdave has joined #ruby
devoldmx3 has quit [Quit: Shutting down]
devoldmx has joined #ruby
orionstein is now known as orionstein_away
relix has joined #ruby
xk_id has joined #ruby
Anderson has joined #ruby
salt_ has joined #ruby
dayepa has quit [Read error: Connection reset by peer]
dayepa has joined #ruby
<salt_> so this obviously doesn't work
fixl has joined #ruby
<salt_> can someone lead me to how i would pass an array of arguments for a three parameter method
stayarrr has quit [Quit: Leaving...]
<salt_> oh shit, i messed up
flops has quit [Quit: leaving]
<salt_> corrected now
claymore has quit [Quit: Leaving]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mrsolo_ has quit [Read error: Operation timed out]
Tamal has quit [Quit: Textual IRC Client: www.textualapp.com]
devoldmx3 has joined #ruby
einarj has quit [Remote host closed the connection]
devoldmx3 has quit [Read error: Connection reset by peer]
devoldmx27 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
|jemc| has quit [Ping timeout: 240 seconds]
roolebo has joined #ruby
mrsolo_ has joined #ruby
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<havenwood> salt_: first issue i see is that you don't have a valid array of arrays (the syntactic sugar to create an array is `[]` not `()`).
<salt_> ok yeah, i was all messed up
<salt_> but that is the largest issue
<salt_> so Date.new takes 3 arguments, but not an array
<salt_> so how can i generate an array of dates?
<salt_> most currently, i think i have it down to that one issue
<havenwood> >> [[2013, 10, 19], [2013, 10, 12], [2013, 10, 5]].map { |date| Date.new *date }
<eval-in> havenwood => wrong number of arguments (3 for 0) (ArgumentError) ... (https://eval.in/55868)
<havenwood> >> require 'date'; [[2013, 10, 19], [2013, 10, 12], [2013, 10, 5]].map { |date| Date.new *date }
<eval-in> havenwood => [#<Date: 2013-10-19 ((2456585j,0s,0n),+0s,2299161j)>, #<Date: 2013-10-12 ((2456578j,0s,0n),+0s,2299161j)>, #<Date: 2013-10-05 ((2456571j,0s,0n),+0s,2299161j)>] (https://eval.in/55869)
<havenwood> salt_: require 'date'
<salt_> ahhh i see
<havenwood> salt_: and a splat (*) turns an Array into a list of args
aspires has joined #ruby
<salt_> ok, so i need to use map
<Rylee> >> p *["hi", "hello", "yes"]
<eval-in> Rylee => "hi" ... (https://eval.in/55870)
<Rylee> cool.
<havenwood> salt_: if you want to map an Array like that to corresponding Dates, yup, map
<salt_> havenwood: thanks man! appreciate it!
<havenwood> salt_: np
bradhe has joined #ruby
jibi has quit [Quit: .]
cescalante is now known as ce_afk
sepp2k1 has joined #ruby
kofno has quit [Ping timeout: 248 seconds]
sepp2k has quit [Ping timeout: 256 seconds]
<salt_> undefined method `*' for Mon, 01 Jan -4712:Date
<salt_> arghhh
bradhe has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
monkegjinni has joined #ruby
<salt_> ok its me somehow
yacks has quit [Ping timeout: 272 seconds]
<salt_> copy and paste works perfectly
<salt_> its the space after new
Mars` has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 240 seconds]
Mars` has joined #ruby
dangerousdave has quit [Ping timeout: 272 seconds]
ssvo has joined #ruby
Alex- has joined #ruby
alx- has quit [Read error: Connection reset by peer]
orien has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
samuel02 has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mars` has quit [Ping timeout: 248 seconds]
astrobunny has joined #ruby
Xeago has quit [Remote host closed the connection]
maz-dev has quit [Remote host closed the connection]
Faris_ has joined #ruby
aryaching has quit [Ping timeout: 272 seconds]
csffsc has joined #ruby
<csffsc> I have a question regarding permutations - http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-permutation
<csffsc> for the example a = [1,2,3] ; a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
<csffsc> what if I only wanted [1,2] returned and not it's inverse [2,1]
<workmad3> >> [1,2,3].combination(2).to_a
<eval-in> workmad3 => [[1, 2], [1, 3], [2, 3]] (https://eval.in/55878)
salt_ has left #ruby [#ruby]
<csffsc> ah ha.. thank you
Alex- has quit [Read error: Connection reset by peer]
alx- has joined #ruby
orien has quit [Quit: Computer has gone to sleep.]
zz_michael_mbp is now known as michael_mbp
patjoh has quit [Quit: Computer has gone to sleep.]
slash_nick has quit [Changing host]
slash_nick has joined #ruby
lsoa has quit [Ping timeout: 245 seconds]
randomnick_ has quit [Quit: Leaving]
<shevy> volty, hah I found the cycling_prompt again
<shevy> but your code scares me :O
<volty> nothing to be scared off :)
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
alx- has quit [Read error: Connection reset by peer]
<shevy> damn... somehow characters got lost
alx- has joined #ruby
<shevy> what is this char: 
orien has joined #ruby
<shevy> I cant see it :(
<havenwood> shevy: see the blink i linked? :P https://gist.github.com/havenwood/834fdfa407be192835f8
<shevy> print("" * len)
wallerdev has quit [Quit: wallerdev]
<shevy> havenwood yeah but it's just blinking non stop
<volty> the elements of an enumerator get printed in one thread while another thread waits for a keypress
<havenwood> shevy: mm, it should go to stop blinking mode with "\b\b"?
<volty> shevy: i told you alread: delete that character and substitute it with \b
Mars` has joined #ruby
<havenwood> shevy: maybe i didn't look closely enough at what you were doing!
<shevy> havenwood the blinking version I have here is based from your code http://pastie.org/pastes/8415343/text
<shevy> nono, I already use your earlier code, I just need to understand how to let a single key event interrupt it
gverri_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> I think I need a beer first anyway
<havenwood> shevy: ahh, i'll take a stab at it
|jemc| has joined #ruby
<havenwood> shevy: mmm, beer - not for another 30min for me, local pub not open yet ;P
scottstamp has quit [Quit: Au revoir!]
<shevy> do people go there, drink beer AND code? :D
<volty> you have to check for a keypress if you want to interrupt blinking
senaxfz has joined #ruby
<shevy> volty yeah.. but... I would like to check for a keypress, but also use this for when a user types in more than just one keypress
<shevy> like the blinking should stop when at least one key was pressed
ehc has joined #ruby
<shevy> after that point, it should behave like $stdin.gets.chomp
<shevy> I dont think I tried that before
<shevy> ok first things first...
<havenwood> shevy: okay, so this is blinking on and off: https://gist.github.com/havenwood/834fdfa407be192835f8
<shevy> how do I check for a single key pressed, in ruby again? I know I wrote this down somewhere...
AlSquire has quit [Quit: This computer has gone to sleep]
<volty> exactly what it does, i have another version that continues to 'animate' the prompt until return is pressed
dzhulk has quit [Quit: Leaving.]
snearch has joined #ruby
Mars` has quit [Remote host closed the connection]
ismlages has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
<havenwood> shevy: require 'io/console'; char = STDIN.getch
Mars` has joined #ruby
predator217 has joined #ruby
Fezzler has joined #ruby
maZtah is now known as Guest
<shevy> ah
alexju has joined #ruby
vlad_starkov has joined #ruby
mayorga has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 272 seconds]
aspires has quit [Quit: sudo making a sandwich]
Lewix has joined #ruby
Mars` has quit [Ping timeout: 272 seconds]
ssvo has quit [Ping timeout: 272 seconds]
amacgregor_ has joined #ruby
nari has joined #ruby
aspires has joined #ruby
amacgregor__ has joined #ruby
Jetchisel has joined #ruby
snearch has quit [Quit: Verlassend]
amacgregor has quit [Ping timeout: 256 seconds]
MetaCosm has quit [Ping timeout: 245 seconds]
VTLob has quit [Quit: VTLob]
sam113101 is now known as sam113101_afk
Lewix has quit [Ping timeout: 272 seconds]
Seventoes has quit [Ping timeout: 240 seconds]
amacgregor_ has quit [Ping timeout: 240 seconds]
maz-dev has joined #ruby
vlad_starkov has quit [Ping timeout: 265 seconds]
MetaCosm has joined #ruby
ehc has quit [Quit: ehc]
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
<havenwood> shevy: hrm, how bout this? kinda hacky, but i don't think i'm thinking clearly
codeFiend has quit [Quit: codeFiend]
<csffsc> .. I've been trying to wrap my head around working enumorators for a while, so I'm just going to ask
orien has quit [Quit: Computer has gone to sleep.]
<csffsc> I have a random array of integers that I need to find the sum of in pairs of X
kil0byte has joined #ruby
<csffsc> so far I've gotten to array.combination(x)
<csffsc> which yields [[array1],[arrayX]]
Seventoes has joined #ruby
codeFiend has joined #ruby
<csffsc> how do I go about getting the sum of each arrayX ?
apeiros has joined #ruby
<havenwood> csffsc: array.each_slice(x) or you actually want combos?
<csffsc> I do want those combinations
<havenwood> >> [[5],[4]].flatten.inject(:+)
<eval-in> havenwood => 9 (https://eval.in/55879)
endash has quit [Quit: endash]
<havenwood> csffsc: ^ like that, or what is array1 arrayX?
<csffsc> [7, 7, 7, 10, 11].combination(2).flat_map.to_a
<csffsc> [[7, 7], [7, 7], [7, 10], [7, 11], [7, 7], [7, 10], [7, 11], [7, 10], [7, 11], [10, 11]]
<havenwood> kk, following
<csffsc> now I want to find the sums of each internal array.. and then elinate the ones that are underneeth a specific value
<havenwood> >> [7, 7, 7, 10, 11].combination(2).flat_map { |x, y| x + y }.keep_if { |sum| sum < 18 }
<eval-in> havenwood => [14, 14, 17, 14, 17, 17] (https://eval.in/55880)
maz-dev has quit [Ping timeout: 272 seconds]
<apeiros> >> [7, 7, 7, 10, 11].combination(2).map { |x, y| x + y }.keep_if { |sum| sum < 18 }
<eval-in> apeiros => [14, 14, 17, 14, 17, 17] (https://eval.in/55881)
<apeiros> no need for flat_map there
<havenwood> apeiros: good point
<apeiros> curious, why keep_if and not select?
justsee has quit [Ping timeout: 256 seconds]
<csffsc> fantastic - now what if I said, I needed to keep track of the values that got me to the sum?
<csffsc> (the sums that made the cutoff)
<havenwood> apeiros: a more concise method in C implementation, and i thought better here to return an empty array with no match than nil
Soda has joined #ruby
<volty> may I object without being accused of trolling ? :)
<apeiros> havenwood: hu?
kazuuu has joined #ruby
<havenwood> apeiros: well, i guess i was thinking #select! versus #keep_if
T__T has joined #ruby
<apeiros> havenwood: how's keep_if more concise than select in C? and select doesn't return nil…
einarj has joined #ruby
<apeiros> ah, keep_if is in-place, didn't know
bradhe has joined #ruby
<volty> one of the principal purposes of high languages is that of freeing us about the machine implementation
<havenwood> apeiros: select! vs keep_if for nil behavior, not select for in place yeah
orien has joined #ruby
<volty> so, from that point o view, 'consise method in C implementation'...
<havenwood> mutate rather than duplicate
<apeiros> duplicate might be faster
<csffsc> .. so I'm not the most experienced programmer, so its probable that this could be solved more efficently
<apeiros> less work and since it's only a sizeof(VALUE) amount of bytes per element, the required space shouldn't matter either
<volty> ah, this is too low level for me, going back to my highlands of coding ...;0
<apeiros> anyway, it shouldn't matter which way
aspires has quit [Quit: sudo making a sandwich]
alexju has quit [Read error: Connection reset by peer]
<apeiros> I was just curious, and the above was mentarbation :)
<havenwood> apeiros: for small arrays i think select is faster but as they grow keep_if?
<csffsc> so the initial array wont be more than 5-8 characters
<apeiros> havenwood: I doubt so. the larger the array, the more memory copying of the whole rest of the array
Vivekananda_ has quit [Ping timeout: 240 seconds]
<csffsc> however the combination(value) will change
<csffsc> from 2 to array.count
<apeiros> with duplicate, there's less to move
<apeiros> (or copy)
<havenwood> apeiros: benching shows select wins until in thousands then keep_if
<apeiros> surprising
fuhgeddaboudit has joined #ruby