apeiros changed the topic of #ruby to: Ruby 2.1.1; 2.0.0-p451; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<f0ster> I cannot figure out what pattern/structure to create this with, https://gist.github.com/f0ster/96a7091a76af06665cdf . basically, I just want to have somethign that's liek a static class which has data stored in, i take in an object, based on the object, i look something up in the static hash and return a value
x1337807x has quit [Client Quit]
nisstyre has joined #ruby
<f0ster> I don't want to have to instantiate an object of this class ju;st to use it, hence the self. But there isnt anyway to have "static" member variables on an uninstantiated class as far as I know
marr has quit [Ping timeout: 240 seconds]
kaspergrubbe has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 240 seconds]
<bilbo_swaggins> class vars?
kevind has quit [Quit: kevind]
bilbo_swaggins has quit [Quit: Leaving]
<f0ster> bilbo_swaggins: ah right, that is what i am doing now
<f0ster> not workgin for some reason
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<f0ster> "unitialized class var"
beneggett has joined #ruby
karmatr0n has quit [Remote host closed the connection]
eynj has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Client Quit]
matcouto has joined #ruby
<f0ster> i need like a singleton class that checks to see if an instance has been instantiated yet when someoen tries to access it
<horrorvacui> What about lazy initialization?
momomomomo has quit [Quit: momomomomo]
nisstyre has quit [Client Quit]
<f0ster> thats kind of what i mean but doing it manually, what are you thinking horrorvacui ?
x1337807x has joined #ruby
momomomomo has joined #ruby
b00stfr3ak has quit [Ping timeout: 240 seconds]
momomomomo has quit [Client Quit]
<f0ster> like.. @@property ||= self.new kind of thing
<f0ster> ?
jorts has quit [Read error: Operation timed out]
<f0ster> since i am using class vars
wallerdev has joined #ruby
mercwithamouth has joined #ruby
<f0ster> i could also create a new of my class, but i dont really want the need to do that, since all the methods on it are class methods
<horrorvacui> yeah but I still don't see what is wrong with how you are doing it
saarinen has quit [Quit: saarinen]
Wigflip has joined #ruby
<f0ster> well if i just call MyClass.method, when m ethod tried to acccess @@var it just fails, even though @@var is hardcoded in the class def
<f0ster> because MyClass has never been instnatiated
Wigflip has quit [Client Quit]
beneggett has quit [Client Quit]
<f0ster> i coudl not use a class, and module, since i am doing only class methods, e.g. def self.method... but then how do I store the hardcoded string ?
havenwood has joined #ruby
mary5030 has quit [Remote host closed the connection]
juanmnl has quit [Quit: My dingdong has gone to sleep. ZZZzzz…]
user___ has joined #ruby
greggroth has quit [Ping timeout: 240 seconds]
tylersmith has quit [Remote host closed the connection]
snath has joined #ruby
codabrink has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<user___> Whats causing this error? https://dpaste.de/uCiW
<havenwood> user___: do you have sqlite installed?
newUser1234 has quit [Remote host closed the connection]
brunops has quit [Quit: leaving]
jerius has quit [Quit: Computer has gone to sleep.]
<horrorvacui> user___: what OS are you running?
<user___> horrorvacui: yeah sqlite3 is installed, ubuntu
pel_daniel has left #ruby [#ruby]
RowdyChild|Away is now known as RowdyChildren
<user___> 'Could not find gem "sqlite3 (>= 0) ruby" in the gems available on this machine'
<horrorvacui> user___: are you sure you installed libsqlite3-dev though?
<havenwood> user___: sudo apt-get install sqlite3 libsqlite3-dev -y
Martxel has joined #ruby
<user___> ah apparently ihadn't installed that package, ythanks
user___ has quit [Remote host closed the connection]
djbender has quit [Quit: djbender]
brain_shim has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 240 seconds]
brain_shim has joined #ruby
pigzzcanfly has joined #ruby
kitak has quit [Remote host closed the connection]
dayepa has joined #ruby
vim_shim_ has joined #ruby
kitak has joined #ruby
freezey has quit [Remote host closed the connection]
Martxel has quit [Ping timeout: 240 seconds]
evenix has joined #ruby
evenix has quit [Remote host closed the connection]
asteros_ has joined #ruby
f0ster has quit [Ping timeout: 240 seconds]
evenix has joined #ruby
asteros has quit [Ping timeout: 240 seconds]
asteros_ is now known as asteros
pigzzcanfly has quit [Ping timeout: 240 seconds]
evenix has quit [Read error: Connection reset by peer]
CaptainJet has quit [Ping timeout: 240 seconds]
locriani has joined #ruby
lolmaus has quit [Ping timeout: 252 seconds]
evenix has joined #ruby
beneggett has joined #ruby
Speed has quit [Read error: Connection reset by peer]
Speed has joined #ruby
Speed has quit [Client Quit]
blackmesa has quit [Quit: WeeChat 0.4.3]
jamto11 has joined #ruby
BP-out has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
SCommette has quit [Quit: SCommette]
locriani has quit [Ping timeout: 265 seconds]
tkuchiki has quit [Ping timeout: 255 seconds]
oo_ has joined #ruby
<BP-out> hey all. I have a Message class and a PrivateMessage subclass. Can I check for a variable or attribute in the Message initialize method and determine there if it should be a regular Message or PrivateMessage? Or is there a better place to do the check
<BP-out> Also I'm sort of certain this would be a good place to use a factory method
<nahkunt> is Learn Ruby The Hard Way a bad book?
<nahkunt> my friend told me it's bad, and i've only just started on it... seems alright to me so far
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
papercode has quit [Quit: WeeChat 0.4.4-dev]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
oo_ has quit [Remote host closed the connection]
testcore has quit [Quit: [BX] 2014: year of the BitchX]
Es0teric has quit [Quit: Computer has gone to sleep.]
<wallerdev> nahkunt: do you have experience with programming
<horrorvacui> nahkunt: Its okay but I've read better. However, I'd defer to someone else as to whats best because I've pieced my learning from so many books and websites I can't really remember which is which.
<wallerdev> BP-out: i think you're using inheritance wrong, if you want specific behavior for privatemessage you should put it in the privatemessage class
<horrorvacui> nahkunt: My favorite was Well Grounded Rubyist
chichou has joined #ruby
<wallerdev> _why's poignant guide
<nahkunt> no why's poignant guide is too silly for me
<nahkunt> i'm a very distractible person
<nahkunt> i need no nonsense
<nahkunt> even though it's a funny book
<wallerdev> haha yeahi tried to read it awhile back, but couldnt make it through haha
<wallerdev> i read pickaxe in like 2008 or something and it was a good read, not sure whats out now though
<horrorvacui> its short and sweet lazy :P
fabrice31 has joined #ruby
<BP-out> wallerdev: it has specific behavior, but it seems like it makes sense to inherit from Message parent classs
newUser1234 has joined #ruby
<wallerdev> you should override the method thats different in the child class
<BP-out> okay, I see
<horrorvacui> Pickaxe book is good but if you are just beginning ruby I'd get something else first.
cescalante is now known as ce_afk
<BP-out> I'll refactor this a bit
JordanJ2 has left #ruby ["Leaving"]
x77686d has quit [Quit: x77686d]
<horrorvacui> nahkunt: I liked Bastard's book but every time I've suggested it someone yells at me for recommending an incomplete book.
amclain has joined #ruby
<horrorvacui> I like that it uses projects to teach ruby. Something I feel is missing in a lot of the other books.
mehlah has quit [Ping timeout: 268 seconds]
sethen has joined #ruby
<crome> does it have talking foxes?
chipotle has quit [Quit: cya]
<horrorvacui> no
<crome> boring
<horrorvacui> ikr
randomnick_ has quit [Quit: Leaving]
<horrorvacui> They said why's was not for them though :(
<wallerdev> tryruby.org has talking foxes
fabrice31 has quit [Ping timeout: 240 seconds]
<horrorvacui> I totally forgot that it had them too.
freezey has joined #ruby
davy_ has quit [Remote host closed the connection]
<nahkunt> horrorvacui: well i haven't really programmed before but i've used linux for 8 years so i do know bash and sed and things. so i don't like to read a whole chapter explaining how to open cmd.exe
<nahkunt> horrorvacui: think pickaxe sounds good or still maybe too hard for me?
<horrorvacui> nahkunt: just do what I do. Give them all a try. I just don't like one books chapter on say classes for example, I look at another books description.
<horrorvacui> If thats not an issue money wise.
Es0teric has joined #ruby
<nahkunt> it is, yes. but i spose i have some swedish friends who could help me out with that
<horrorvacui> nahkunt: I think pickaxe will be fine because its like the ruby bible and you'll want it later anyhow.
<nahkunt> ok
nateberkopec has quit [Read error: No route to host]
<horrorvacui> Just make sure you get the latest one.
<horrorvacui> I've got the one from 2008 unfortunately but I'm pretty sure there is a new one for ruby > 2.0
bricker`LA has joined #ruby
jzig has quit [Remote host closed the connection]
jzig has joined #ruby
r_rios has joined #ruby
evenix has quit [Remote host closed the connection]
freezey has quit [Ping timeout: 240 seconds]
toastynerd has quit [Remote host closed the connection]
<nahkunt> the well grounded rubyist is for 1.9... should i be looking for >2.0 books?
<havenwood> nahkunt: there is a new beta release of Well Grounded though, seems to be coming along well
kitak_ has joined #ruby
lolmaus has joined #ruby
<nahkunt> havenwood: will it be a problem to use the 1.9 version for now?
<nahkunt> i'm on ruby 2.1.1p76
jzig has quit [Ping timeout: 265 seconds]
<havenwood> nahkunt: nope, but you'll quickly run into little things that wont work - for the most part it is all fine though
toastynerd has joined #ruby
<havenwood> nahkunt: but it looks like they have most of the early chapters done in the beta, you might just want to get the new edition
fgo has joined #ruby
<havenwood> nahkunt: http://www.manning.com/black3/
doodlehaus has quit []
<nahkunt> too expensive
sambao21 has quit [Quit: Computer has gone to sleep.]
dorei has quit []
locriani has joined #ruby
shadoi1 is now known as shadoi
davy_ has joined #ruby
shinobi_one has quit [Quit: shinobi_one]
meatherly has joined #ruby
jeregrine has quit [Quit: Connection closed for inactivity]
juanmnl has joined #ruby
jamto11 has quit [Remote host closed the connection]
horofox_ has joined #ruby
showaz has joined #ruby
Deele has quit [Ping timeout: 240 seconds]
pwh has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pwh_ has joined #ruby
zz_jrhorn424 is now known as jrhorn424
dik_dak has quit [Quit: Leaving]
sambao21 has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
taf2 has joined #ruby
evenix has joined #ruby
afex has quit [Ping timeout: 240 seconds]
pwh has quit [Ping timeout: 240 seconds]
okdas has quit [Ping timeout: 240 seconds]
r_rios has quit [Quit: No Ping reply in 180 seconds.]
Celm has quit [Remote host closed the connection]
dx7 has joined #ruby
jameswlane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dx7 has quit [Remote host closed the connection]
dx7 has joined #ruby
r_rios has joined #ruby
michael_lee has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simono has joined #ruby
Hobogrammer_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
okdas has joined #ruby
greggroth has joined #ruby
dayepa has quit [Ping timeout: 240 seconds]
horofox__ has joined #ruby
aspires has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
benzrf is now known as benzrf|offline
djbender has joined #ruby
arubin has joined #ruby
centrx has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
toastynerd has quit [Remote host closed the connection]
jeregrine has joined #ruby
horofox_ has quit [Ping timeout: 240 seconds]
pigzzcanfly has joined #ruby
Solnse has joined #ruby
tkuchiki has joined #ruby
locriani has quit [Ping timeout: 240 seconds]
dayepa has joined #ruby
andy__ has quit [Remote host closed the connection]
SCommette has joined #ruby
Royalb15 has quit [Quit: Leaving]
jzig has joined #ruby
pigzzcanfly has quit [Ping timeout: 255 seconds]
endash_ has joined #ruby
supermarin_ has quit [Quit: Computer has gone to sleep.]
RowdyChildren is now known as RowdyChild|Away
newUser1234 has quit [Remote host closed the connection]
trhodes_ has quit [Quit: ZNC - http://znc.in]
oo_ has joined #ruby
supermarin_ has joined #ruby
<nahkunt> why do so many people have a hatred of ruby? i try to ask people what they suggest to learn ruby and most of the time i get told not to learn it
francisfish has joined #ruby
yfeldblum has joined #ruby
zorak has joined #ruby
greggroth has quit [Ping timeout: 268 seconds]
SidWu_ has joined #ruby
SidWu_ has quit [Max SendQ exceeded]
<arubin> nahkunt: Are you asking in #python?
benzrf|offline is now known as benzrf
<benzrf> via my brother:
<nahkunt> arubin: haha
<benzrf> 'im in a band called 1023MB. we havent got a gig yet.'
horofox__ has quit [Quit: horofox__]
<arubin> benzrf: heh
unstable has joined #ruby
<benzrf> nahkunt: it's because ruby and python fill the same niche
jameswlane has joined #ruby
jameswlane has quit [Max SendQ exceeded]
<zorak> im trying to run some scrips, but im getting this error
<zorak> irb -r factorial1.rb -r fibonacci1.rb
<zorak> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require':LoadError: cannot load such file -- factorial1.rb
<zorak> irb(main):001:0>
<zorak> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require':LoadError: cannot load such file -- fibonacci1.rb
evenix has quit [Remote host closed the connection]
<benzrf> if you learn one then you will probably have no need for the other
<benzrf> [unless youre like me and prefer one and switch to it]
supermarin_ has quit [Ping timeout: 255 seconds]
jameswlane has joined #ruby
jameswlane has quit [Max SendQ exceeded]
charliesome has joined #ruby
jameswlane has joined #ruby
dayepa has quit [Quit: dayepa]
francisfish has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
yfeldblum has quit [Ping timeout: 268 seconds]
charliesome has quit [Read error: Connection reset by peer]
larissa has quit [Quit: Leaving]
<horrorvacui> nahkunt: Who told you to stay away from ruby?
charliesome has joined #ruby
ce_afk is now known as cescalante
nari has joined #ruby
s2013 has joined #ruby
<benzrf> yo charliesome u should try quick
<benzrf> :-D
jameswlane has quit [Ping timeout: 240 seconds]
r_rios has quit [Ping timeout: 268 seconds]
horrorvacui has quit [Remote host closed the connection]
<zorak> solved adding ./ to the script name
<zorak> irb -r ./factorial1.rb -r ./fibonacci1.rb
snath has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
godd2 has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
evenix has joined #ruby
charliesome has joined #ruby
jameswlane has joined #ruby
CyborgCygnus has joined #ruby
paradisaeidae has joined #ruby
tvw has quit [Ping timeout: 255 seconds]
jameswlane has quit [Max SendQ exceeded]
twiceaday has quit [Ping timeout: 245 seconds]
twiceaday has joined #ruby
maximski has joined #ruby
jameswlane has joined #ruby
locriani has joined #ruby
<godd2> afternoon, all
<wallerdev> evening
jameswlane has quit [Client Quit]
<bawNg> morning
s2013 has quit [Remote host closed the connection]
jason__ has joined #ruby
Royalb15 has joined #ruby
jameswlane has joined #ruby
newUser1234 has joined #ruby
jameswlane has quit [Max SendQ exceeded]
SCommette has quit [Quit: SCommette]
cescalante is now known as ce_afk
x77686d has joined #ruby
hfp has quit [Remote host closed the connection]
trhodes_ has joined #ruby
benzrf is now known as benzrf|offline
timonv has joined #ruby
subbyyy_ has quit [Ping timeout: 240 seconds]
JacobHayes has joined #ruby
<BP-out> why does var = "\d
<BP-out> er
<BP-out> why does var = "\d" in pry return "d" ?
Hanmac1 has joined #ruby
JBreit has joined #ruby
<wallerdev> because its not a valid escape character?
<BP-out> but then "\\d" returns "\\d"
<BP-out> is this just a pry thing?
<BP-out> because repl.it shows "\\d" as returning "\d"
<wallerdev> \\ will be \ when outputted
<BP-out> oh
<BP-out> i see
<wallerdev> so "\\d" will output as \d
<BP-out> it escapes once output through like puts
havenwood has quit []
<BP-out> right, ok
<BP-out> thank you
<wallerdev> if you print it
rafaelmagu has joined #ruby
Hanmac has quit [Ping timeout: 255 seconds]
<wallerdev> "\d" is an unrecognized escape sequence so it just assumes you meant "d"
reset has quit [Quit: Leaving...]
_maes_ has joined #ruby
greggroth has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
supermarin_ has joined #ruby
ignoch has quit [Remote host closed the connection]
kennym has quit [Quit: Leaving.]
nari has quit [Ping timeout: 255 seconds]
pwh_ has quit [Ping timeout: 240 seconds]
hfp has joined #ruby
chipotle has joined #ruby
paradisaeidae has quit [Remote host closed the connection]
jameswlane has joined #ruby
asteros has quit [Quit: asteros]
jameswlane has quit [Max SendQ exceeded]
krz has joined #ruby
JBreit has left #ruby ["Leaving"]
jameswlane has joined #ruby
wallerdev has quit [Quit: wallerdev]
jameswlane has quit [Max SendQ exceeded]
supermarin_ has quit [Ping timeout: 240 seconds]
jameswlane has joined #ruby
jameswlane has quit [Max SendQ exceeded]
paradisaeidae has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
pwh has joined #ruby
jameswlane has joined #ruby
meatherly has quit [Remote host closed the connection]
jameswlane has quit [Max SendQ exceeded]
momomomomo has joined #ruby
jameswlane has joined #ruby
meatherly has joined #ruby
rezzack has quit [Ping timeout: 268 seconds]
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jameswlane has quit [Max SendQ exceeded]
dkpi has quit [Ping timeout: 255 seconds]
kennym has joined #ruby
narcan has joined #ruby
george2 has joined #ruby
s2013 has joined #ruby
meatherly has quit [Ping timeout: 252 seconds]
justin_pdx has joined #ruby
justin_pdx has quit [Client Quit]
justin_pdx has joined #ruby
sensen has joined #ruby
Celm has joined #ruby
<zorak> whats the name of this "||="??
snkcld has joined #ruby
<snkcld> how can i get this to work?
<snkcld> puts “#{my_name}” if my_name = “joe"
<BP-out> conditional assignment, zorak
<zorak> BP-out: thanks!
<BP-out> as in, "assign this variable on the condition specified"
<BP-out> np
juanmnl has quit [Quit: My dingdong has gone to sleep. ZZZzzz…]
<BP-out> snkcld: change the = to a double ==
<BP-out> single = is assignment, == is comparison
glide has joined #ruby
<glide> I have a simple question about accessing arrays. Can someone help me?
<BP-out> also the quotes after the puts are redudant, since my_name is a string anyways
<BP-out> go ahead, glide
<snkcld> BP-out: but i want to assign on the right
<snkcld> im not comparing it
juanmnl has joined #ruby
<snkcld> my_name doesnt exist at that point ;P
pigzzcanfly has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<BP-out> but an "if" statement requires a condition
<BP-out> what are you trying to do, anyways snkcld
sski has joined #ruby
<glide> Thanks, BP-out. array = [:peanut, :butter, :and, :jelly], array=[5,0] returns nil; but array=[4,0] returns []; why?
<snkcld> puts "order #{order_id} already exists" if order = Order.where(order_number: params[:order_number])
<snkcld> sorry, that should be:
<snkcld> #{order.id}
<centrx> Order.exists?
circuit has joined #ruby
<BP-out> you don't need the order =
<BP-out> simply ... if Order.where(conditions)
sensen has quit [Ping timeout: 255 seconds]
<BP-out> since that returns a truthy value
<BP-out> assuming the order is found
Celm has quit [Ping timeout: 265 seconds]
chipotle_ has joined #ruby
chipotle has quit [Ping timeout: 252 seconds]
alekst has quit [Quit: Computer has gone to sleep.]
circuit has quit [Client Quit]
<snkcld> puts "order #{order.id} already exists" if Order.where(order_number: params[:order_number])
habanany has joined #ruby
<BP-out> correct
<snkcld> but 'order' does not exist at this point
pigzzcanfly has quit [Ping timeout: 252 seconds]
circuit has joined #ruby
<BP-out> why not something like puts "order #{params[:order_number]} already exists" if Order.where(..)
sensen has joined #ruby
<BP-out> unless you want to show the existing ID
<BP-out> in which case you can do order = Order.where(...) and on a new line puts "order #{order.id} already exists" if order
<BP-out> so, it kinda has to be 2 lines
<snkcld> yea... lemme provide a better example ;P
<BP-out> sure
lushious has quit [Remote host closed the connection]
<snkcld> puts "You already have an order in place, with id: #{order.id}" if order = Order.where(name: params[:name], state: "active")
danshultz has joined #ruby
asteros has joined #ruby
asteros has quit [Client Quit]
<BP-out> yeah, so you will have to break it into 2 lines
<BP-out> order = Order.where(...)
<BP-out> puts "you already have that order" if order
<snkcld> ;(
<BP-out> which is pretty standard in rails controllers, which i assume is what this is for?
<snkcld> eh, its sinatra
<snkcld> but regardless
gancl has joined #ruby
gancl has quit [Remote host closed the connection]
<BP-out> oh
<BP-out> well is there a reason you /need/ it to be a one liner?
ner0x has joined #ruby
<snkcld> no... ;(
<snkcld> just easier to read the code
<snkcld> because i have a few lines taht are like, error 40x "message" if ...
gancl has joined #ruby
Valesk has quit [Quit: Textual IRC Client: www.textualapp.com]
benzrf|offline is now known as benzrf
<benzrf> coffeescript is a language
<benzrf> so why not coffee
<benzrf> :-{
<glide> Hey guys, I had a question but I figured it out.
<glide> Any pointers on learning Ruby from scratch as a first language?
yfeldblum has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
cj3kim_ has joined #ruby
<snkcld> i learned ruby by making a gem
<benzrf> glide: dont
Hobogrammer has quit [Ping timeout: 268 seconds]
<benzrf> glide: start w/ python
nari has joined #ruby
* arubin eyes benzrf suspiciously.
<benzrf> having used both i prefer ruby, BUT i do think python is better for a beginner
radic has quit [Ping timeout: 255 seconds]
<benzrf> ruby has much more in the way of wacky idiosyncrasies and an extra paradigm v. python
<benzrf> and the syntax is very more complicated
<glide> benzrf: I chose Ruby because it seems to be an in-demand language. Is the ease of learning of Python worth starting with it instead?
<ericwood> they're both great
<ericwood> I learned on python
<ericwood> but ruby gels better with my brain
fabrice31 has joined #ruby
radic has joined #ruby
volk_ has joined #ruby
<ericwood> in my mind they're even in terms of learnability for beginners
<glide> Speaking of idiosyncrasies, I came here to ask the a question about arrays that does involve something odd (array = [:peanut, :butter, :and, :jelly], array[5,0] returns nil; but array[4,0] returns [])
BP-out has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
justin_pdx has quit [Quit: justin_pdx]
volk_ has quit [Client Quit]
<glide> snkcld: I'm still at the point where I don't fully know what a gem is!
<snkcld> lol
IceDragon has quit [Quit: Space~~~]
<glide> ericwood: Why did you choose to start with Python instead?
<ericwood> >> (1..10).to_a[5..0]
<eval-in> ericwood => [] (https://eval.in/131053)
<ericwood> >.<
<ericwood> glide: I was in middle school, my dad recommended it after doing some research
<ericwood> it was before ruby really caught on and became popular
<benzrf> ericwood: ruby is not significantly more in-demand than python \
<benzrf> * glide
cj3kim_ has quit [Remote host closed the connection]
<benzrf> and u can always hop over afterward
<ericwood> I never said anything about demand
<ericwood> I think demand is a shitty reason to learn your first language
<benzrf> ericwood: hence '* glidw'
<benzrf> *glide
<ericwood> oh haha
<benzrf> ericwood++
<ericwood> :P
<ericwood> I actually really like the idea of JS as a first language, quickly followed by another language
andy__ has joined #ruby
<ericwood> instant feedback, ubiquitous, tons of great APIs for making neat stuff immediately
<ericwood> but I like it as an entry point as far as teaching goes
<arubin> glide: "Additionally, an empty array is returned when the starting index for an element range is at the end of the array. Returns nil if the index (or starting index) are out of range."
<glide> Of course I'm trying to understand underlying principles so that I can learn more, but I thought Ruby was popular, has a big community, and I can learn to make something sooner.
<ericwood> Ruby is a great language
fabrice31 has quit [Ping timeout: 255 seconds]
<ericwood> I love it!
<glide> JS = javascript?
<arubin> I am not sure how "at the end of the array" is not "out of range".
<ericwood> yes
greggroth has quit [Ping timeout: 240 seconds]
<glide> arubin: Yeah I just figured that out. It's wierd!
<arubin> The documentation even shows an example of this: http://www.ruby-doc.org/core-2.1.1/Array.html#method-i-5B-5D
<arubin> Perhaps Ruby arrays are really lisp cons!
thomasxie has joined #ruby
<glide> Thank you, arubin. I'm still learning how to use the documentation efficiently and effectively
thomasxie has quit [Read error: Connection reset by peer]
thomasxie has joined #ruby
<glide> ericwood: What is a good starting point to learn JS?
<soahccc> The problem with ruby is that once you get to it you don't want to use the other crap anymore :)
<arubin> soahccc: I agree.
cj3kim_ has joined #ruby
<benzrf> soahccc: that can be said of any lang
<benzrf> besides the ones that it cant
andy__ has quit [Ping timeout: 255 seconds]
<benzrf> glide: just sstart with python
<soahccc> yeah but with ruby it's something different… it's not only the language itself but all the things around it
<benzrf> trust me, ive been programming for 10 years
<benzrf> :-D
<glide> Like what, soahcc? (Forgive me, I'm a newb)
<arubin> benzrf: That's it?
<benzrf> arubin: =[
<arubin> =P
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
<soahccc> And everytime I use a different language I miss all the tiny bits. It's like when I have to use windows again for some reason
<glide> benzrf: What about both at once? :)) What resources do you recommend?
volk_ has joined #ruby
<arubin> soahccc: heh
maximski has quit []
<arubin> glide: I disagree with benzrf, but I do not care to argue about it.
<glide> arubin: Of course. I'm just happy to hear different perspectives :)
<soahccc> glide: I was referring to the gems. you can make such good DSLs with ruby which integrate so seamlessly… and the community is also pretty good
<benzrf> glide: the way i see it python is just simpler and more no-frills than ruby
<benzrf> which is good when you're starting out
jrhorn424 is now known as zz_jrhorn424
<glide> benzrf: How long would it take to learn to make an interesting web app or something fun?
<glide> soahcc: I see. Cool.
snath has joined #ruby
<benzrf> glide: learn to program
<benzrf> then learn to use that knowledge to make a web app
<benzrf> arubin: try quick :-3
cj3kim_ has quit [Remote host closed the connection]
<arubin> Quick?
<arubin> Oh, your project.
* arubin starts the new slow programming movement.
luriv has quit [Ping timeout: 268 seconds]
<benzrf> d:
albedoa has joined #ruby
DEA7TH has joined #ruby
jonmorehouse has quit [Ping timeout: 255 seconds]
DEA7TH has quit [Client Quit]
hamakn has joined #ruby
pigzzcanfly has joined #ruby
pigzzcan_ has joined #ruby
pigzzcanfly has quit [Read error: Connection reset by peer]
brucelee_ has joined #ruby
agrinb_ has joined #ruby
agrinb__ has quit [Read error: Connection reset by peer]
<benzrf> i will sleep at this point in time
<benzrf> lest my brain fall out due to exhaustion
<glide> benzrf: Sleep well!
CyborgCygnus has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
glide has quit [Quit: Leaving]
jzig has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
jzig has joined #ruby
danshultz has joined #ruby
teenwolf has joined #ruby
kukyakya has joined #ruby
luriv has joined #ruby
hooper has joined #ruby
userx has quit [Ping timeout: 240 seconds]
pfg has joined #ruby
supermarin_ has joined #ruby
<brucelee_> does gem not install dependancies?
<centrx> It should
<brucelee_> from bundlers site, it seems bundler install dependencies
volk__ has joined #ruby
<brucelee_> but if gem does it, why would bundler be needeD?
s2013 has quit [Ping timeout: 268 seconds]
sethen has quit [Ping timeout: 240 seconds]
hemanth has joined #ruby
sski has quit [Ping timeout: 255 seconds]
krz has quit [Ping timeout: 255 seconds]
Akuma has quit [Ping timeout: 255 seconds]
hemanth has quit [Max SendQ exceeded]
sski has joined #ruby
volk_ has quit [Ping timeout: 255 seconds]
volk__ is now known as volk_
hemanth has joined #ruby
newUser1234 has quit [Remote host closed the connection]
krz has joined #ruby
Akuma has joined #ruby
danshultz has quit [Ping timeout: 255 seconds]
<arubin> brucelee_: The purpose of Bundler is to manage the dependencies of a project.
<arubin> brucelee_: For example, you might have two different Rails projects, each of which requires a different version of some gem.
supermarin_ has quit [Ping timeout: 255 seconds]
ner0x has quit [Quit: Leaving]
s2013 has joined #ruby
<brucelee_> arubin: ohh ok
<brucelee_> arubin: thats more clear
<brucelee_> arubin: thanks
<arubin> Have you read the front page of the Bundler site?
<arubin> It is quite nice.
agrinb_ has quit [Remote host closed the connection]
<brucelee_> arubin: yeah i read it
<arubin> Okay.
toastynerd has joined #ruby
jamto11 has joined #ruby
greggroth has joined #ruby
Shidash1 has quit [Ping timeout: 252 seconds]
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mway has quit [Quit: mway]
GodPuppet has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
gancl has quit [Ping timeout: 255 seconds]
hooper has quit [Ping timeout: 240 seconds]
braincra- has quit [Quit: bye bye]
s2013 has quit [Ping timeout: 255 seconds]
s2013_ has joined #ruby
RowdyChild|Away is now known as RowdyChildren
pigzzcan_ has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
pigzzcanfly has joined #ruby
braincrash has joined #ruby
<ozzloy> http://ruby.railstutorial.org/chapters/a-demo-app#sec-demo_users_resource what's the difference here between bundle exec rake db:migrate and just a plain rake db:migrate?
<ozzloy> why get bundler involved?
<arubin> ozzloy: It will make sure that the gem versions used are the ones in your gemfile.
<arubin> And not the ones that are installed on your system.
<ozzloy> arubin, thanks!
browndawg has joined #ruby
zorak has quit [Ping timeout: 240 seconds]
glide has joined #ruby
mary5030 has joined #ruby
agrinb has joined #ruby
brunops has joined #ruby
mway has joined #ruby
davy_ has quit [Remote host closed the connection]
brunops has quit [Client Quit]
rafaelmagu has quit [Quit: Textual IRC Client: www.textualapp.com]
pu22l3r_ has joined #ruby
diegoviola has joined #ruby
bluOxigen has joined #ruby
dr0ff has joined #ruby
x1337807x has joined #ruby
s2013_ has quit [Ping timeout: 240 seconds]
greggroth has quit [Ping timeout: 240 seconds]
gancl has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
francisfish has joined #ruby
jonmorehouse has joined #ruby
yfeldblum has quit [Remote host closed the connection]
francisfish has quit [Ping timeout: 255 seconds]
freezey has joined #ruby
yfeldblum has joined #ruby
jonmorehouse has quit [Ping timeout: 268 seconds]
thesheff17 has joined #ruby
yfeldblu_ has joined #ruby
Hobogrammer has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 268 seconds]
hemanth has quit [Quit: This computer has gone to sleep]
RowdyChildren is now known as RowdyChild|Away
RowdyChild|Away is now known as RowdyChildren
timonv has joined #ruby
Celm has joined #ruby
greggroth has joined #ruby
freezey has quit [Remote host closed the connection]
arubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby
teenwolf has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 268 seconds]
hakunin has joined #ruby
ukd1 has quit [Quit: Leaving...]
albedoa has quit [Quit: Textual IRC Client: www.textualapp.com]
Deele has joined #ruby
arietis has joined #ruby
bahar has quit [Ping timeout: 255 seconds]
agrinb has quit [Remote host closed the connection]
bahar has joined #ruby
reset has joined #ruby
funktor has joined #ruby
greggroth has quit [Ping timeout: 240 seconds]
<glide> quit
glide has quit [Quit: Leaving]
locriani has quit [Quit: Leaving...]
mikepack has joined #ruby
sambao21 has joined #ruby
supermarin_ has joined #ruby
axeman- has joined #ruby
freakazoid0223 has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
supermarin_ has quit [Ping timeout: 240 seconds]
hamakn has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
jarray52 has joined #ruby
robustus has joined #ruby
oo_ has quit [Remote host closed the connection]
nanoyak has joined #ruby
robbyoconnor has joined #ruby
fijimunkii has joined #ruby
agrinb_ has joined #ruby
robustus|Off has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby
alvaro_o_ has quit [Quit: Ex-Chat]
aspiers has quit [Ping timeout: 255 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
monkegjinni has joined #ruby
nanoyak has quit [Ping timeout: 252 seconds]
x77686d has quit [Quit: x77686d]
nanoyak has joined #ruby
juanmnl has quit [Quit: Bye Bye!]
bahar has quit [Ping timeout: 268 seconds]
Cache_Money has joined #ruby
sepp2k has quit [Quit: Leaving.]
fijimunkii has quit [Ping timeout: 252 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
djbender has quit [Quit: djbender]
yohanobs_ has joined #ruby
axeman- has quit [Read error: Operation timed out]
kennym has quit [Quit: Leaving.]
s3ri0us has quit [Ping timeout: 240 seconds]
pu22l3r has joined #ruby
s3ri0us has joined #ruby
agrinb_ has quit [Remote host closed the connection]
pu22l3r__ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Celm has quit [Remote host closed the connection]
fabrice31 has joined #ruby
yfeldblum has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pu22l3r_ has quit [Ping timeout: 240 seconds]
monkegjinni has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
Liru has joined #ruby
thesheff17 has quit [Ping timeout: 240 seconds]
pu22l3r has quit [Ping timeout: 240 seconds]
bahar has joined #ruby
s2013 has joined #ruby
sqwirl has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 240 seconds]
monkegjinni has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
hamakn has joined #ruby
toastynerd has joined #ruby
sent-hil has quit [Quit: Connection closed for inactivity]
mway has quit [Quit: mway]
toastynerd has quit [Ping timeout: 240 seconds]
spacemud has quit [Ping timeout: 255 seconds]
axeman- has joined #ruby
nisstyre has joined #ruby
gabrielCmendes has quit [Ping timeout: 251 seconds]
thomasxie has quit [Read error: Connection reset by peer]
thomasxie has joined #ruby
vpretzel_ has joined #ruby
thesheff17 has joined #ruby
thomasxie has quit [Read error: Connection reset by peer]
thomasxie has joined #ruby
vpretzel has quit [Ping timeout: 240 seconds]
abdulsattar has joined #ruby
oo_ has joined #ruby
s2013 has quit [Ping timeout: 240 seconds]
papercode has joined #ruby
Elico has quit [Ping timeout: 240 seconds]
GodPuppet has quit [Remote host closed the connection]
ericwood has quit [Quit: leaving]
oo_ has quit [Ping timeout: 268 seconds]
yacks has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
funktor has quit [Remote host closed the connection]
ericwood has joined #ruby
funktor has joined #ruby
charliesome has joined #ruby
axeman- has quit [Read error: Operation timed out]
funktor has quit [Ping timeout: 240 seconds]
paradisaeidae has quit [Ping timeout: 240 seconds]
spacemud has joined #ruby
invinceable has joined #ruby
beneggett has joined #ruby
alexju has joined #ruby
chipotle_ has quit [Quit: cya]
Solnse has quit [Quit: Leaving.]
tectonic has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
jason__ has quit [Remote host closed the connection]
CaptainJet has joined #ruby
jason_ has joined #ruby
havenwood has joined #ruby
thesheff17 has quit [Ping timeout: 255 seconds]
chipotle has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
tylersmith has quit [Remote host closed the connection]
sqwirl has joined #ruby
oo_ has joined #ruby
tylersmith has joined #ruby
Jon30 has quit [Ping timeout: 240 seconds]
jason_ has quit [Ping timeout: 255 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
chris_thomson has quit [Quit: Zzz...]
gancl has quit [Remote host closed the connection]
ktosiek has quit [Ping timeout: 240 seconds]
paradisaeidae has joined #ruby
reset has joined #ruby
obbo has joined #ruby
supermarin_ has joined #ruby
x1337807x has joined #ruby
tylersmith has quit [Ping timeout: 252 seconds]
Jonah11_ has joined #ruby
pfg has joined #ruby
<Jonah11_> assuming `def square(x) x*x; end` is already defined, is there a more compact way to write `[1,2,3].map{|x| square(x)}`?
echevemaster has quit [Quit: Leaving]
beneggett has quit [Remote host closed the connection]
axeman- has joined #ruby
jonmorehouse has joined #ruby
Jeticus has joined #ruby
<godd2> >>[1,2,3].map{|x|x*x}
<eval-in> godd2 => [1, 4, 9] (https://eval.in/131101)
<godd2> I mean, if you're playing code golf
browndawg has quit [Ping timeout: 240 seconds]
benzrf|offline has quit [Read error: Operation timed out]
supermarin_ has quit [Ping timeout: 240 seconds]
<obbo> is there an easy way to detect if an image is an animated gif using RMagick?
<Jonah11_> godd2, sorry, i didn't mean that. i was thinking more along the lines of a shortcut similar to [1,2,3].reduce(:+) -- the thing is if yoiu pass in a proc iw will be called upon each elm in map, rather than doing proc.call(elm)
thesheff17 has joined #ruby
browndawg has joined #ruby
jamto11 has joined #ruby
<godd2> Jonah11_: what's your goal? fewer characters? fewer method calls? faster code?
mansi has joined #ruby
CaptainJet has quit [Ping timeout: 252 seconds]
RowdyChildren is now known as RowdyChild|Away
<Jonah11_> godd2, clearer, more concise code.
abdulsattar has quit [Ping timeout: 255 seconds]
<Jonah11_> godd2, basically, same reasons you'd write `arr.each(&:foo)` instead of `arr.each{|x| x.foo}`
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> Jonah11_: well, you could do `class Fixnum; def squared; self ** 2 end end` and then `[1, 2, 3].map &:squared`, but yeah
<godd2> oh so I should be doing threads.each(&:join) ?
evenix has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
<Jonah11_> havenwood, sure, but without the monkey patching :)
<godd2> but yea havenwood's approach works well since you're wanting to send the symbol of a method name on each element.
<havenwood> Jonah11_: refinements
<havenwood> Jonah11_: :P
evenix has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
<havenwood> Jonah11_: but yeah, no syntactic sugar like that
jamto11 has quit [Ping timeout: 268 seconds]
<Jonah11_> havenwood, ok, didnt think so, but wanted to make sure
<Jonah11_> ty
mrnugget has joined #ruby
yohanobs_ has quit [Ping timeout: 240 seconds]
pauld has joined #ruby
<godd2> obbo: do you mean as opposed to being an unaninmated gif?
<godd2> that is, that the file you're looking at has at least two unique frames?
<obbo> godd2: yeah, i have a folder of mixed image formats, some gifs aren't animated. trying to find the animated ones
evenix has quit [Ping timeout: 240 seconds]
<obbo> godd2: is there a method or technique for just getting a count of frames?
evenix has joined #ruby
bahar has quit [Ping timeout: 240 seconds]
Cache_Money has quit [Quit: Cache_Money]
timonv has joined #ruby
<godd2> I'm on Windows so I can't test this for you, but I would try to make a new ImageList passing a gif and checking its #length
zigomir has joined #ruby
bahar has joined #ruby
reset has quit [Ping timeout: 240 seconds]
oso96_2000 is now known as oso|away
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<godd2> of course, be sure that your test file is known to have multiple frames.
TigerWolf has quit [Remote host closed the connection]
TigerWolf has joined #ruby
thesheff17 has quit [Ping timeout: 240 seconds]
Celm has joined #ruby
<havenwood> frames = `identify -format %n example.gif`.to_i
freerobby has joined #ruby
Celm has quit [Ping timeout: 240 seconds]
agrinb_ has joined #ruby
<obbo> havenwood: there's no rmagick equivalent for doing that? it works that way but just wondering
francisfish has joined #ruby
freerobby has quit [Ping timeout: 268 seconds]
<godd2> obbo: just so you know, you'd be running this command line tool which is installed with imagemagick: http://www.imagemagick.org/script/identify.php
timonv has quit [Remote host closed the connection]
hooper has joined #ruby
volk_ has quit [Ping timeout: 240 seconds]
njection has joined #ruby
jeregrine has quit [Quit: Connection closed for inactivity]
<godd2> It seems that the equivalent for identify is Image#inspect
JasmeetQA has joined #ruby
<godd2> As for getting the number of frames in a gif, perhaps scene will help? http://studio.imagemagick.org/RMagick/doc/image2.html#inspect
agrinb_ has quit [Ping timeout: 240 seconds]
<godd2> If not, then It would appear you have to do it haven's way
<havenwood> obbo: Magick::Image.read('example.gif').size
Morkel has joined #ruby
sensen has quit [Ping timeout: 240 seconds]
njection_ has quit [Ping timeout: 268 seconds]
freerobby has joined #ruby
zigomir_ has joined #ruby
francisfish has quit [Ping timeout: 268 seconds]
<obbo> havenwood: ah thanks, that's it
zigomir has quit [Ping timeout: 240 seconds]
<godd2> Just don't forget that you may get a "false positive" from gifs which have multiple frames which are the same image.
hermanmunster has quit [Remote host closed the connection]
sigurding has joined #ruby
luriv has quit [Ping timeout: 240 seconds]
hermanmunster has joined #ruby
amclain has quit [Read error: Connection reset by peer]
freerobby has quit [Ping timeout: 255 seconds]
amclain has joined #ruby
kukyakya has quit [Remote host closed the connection]
circuit has quit [Quit: Lost terminal]
taf2 has quit [Quit: taf2]
jack_rabbit has joined #ruby
nahkunt has quit [Ping timeout: 245 seconds]
obbo has quit [Quit: Page closed]
quatron has joined #ruby
davedev24 has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
hermanmunster has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
hermanmunster has joined #ruby
godd2 has quit [Quit: Page closed]
davedev2_ has joined #ruby
quatron has left #ruby [#ruby]
Elhu has joined #ruby
decoponio has joined #ruby
charliesome has joined #ruby
tagrudev has joined #ruby
chipotle has quit [Quit: cya]
invinceable has quit [Ping timeout: 240 seconds]
mr_snowf1ake has quit [Ping timeout: 255 seconds]
markisonfire has joined #ruby
carraroj has joined #ruby
alexju has quit [Ping timeout: 240 seconds]
sensen has joined #ruby
Jonah11_ has quit [Quit: Leaving]
bricker`LA has quit [Quit: leaving]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
heftig has quit [Quit: Quitting]
pigzzcanfly has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
jprovazn has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apeiros has quit [Ping timeout: 240 seconds]
coder_neo has joined #ruby
supermarin_ has joined #ruby
hackeron has joined #ruby
s3ri0us has quit [Ping timeout: 240 seconds]
axeman- has quit [Ping timeout: 240 seconds]
sigurding has quit [Quit: sigurding]
spacemud has quit [Ping timeout: 240 seconds]
alexju has joined #ruby
gregf_ has quit [Ping timeout: 264 seconds]
hackeron_ has quit [Ping timeout: 264 seconds]
ktosiek has joined #ruby
mengu has joined #ruby
gregf_ has joined #ruby
supermarin_ has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
mansi has joined #ruby
tkuchiki_ has joined #ruby
fabrice31 has joined #ruby
monkegjinni has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
<mozzarella> do you know of great ruby forum apps?
browndawg has quit [Ping timeout: 240 seconds]
<mozzarella> I want to launch a forum and I don't want it to be in php
<mozzarella> and discourse is kind of too monolithic for me…
mansi has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 240 seconds]
bahar has quit [Ping timeout: 252 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
michaeldeol has joined #ruby
bahar has joined #ruby
axeman- has joined #ruby
reset has joined #ruby
bal has joined #ruby
sski has quit [Remote host closed the connection]
jzig has quit [Remote host closed the connection]
sski has joined #ruby
jzig has joined #ruby
aganov has joined #ruby
jarray52 has left #ruby [#ruby]
brucelee_ has quit [Ping timeout: 240 seconds]
spacemud has joined #ruby
Elhu has joined #ruby
jason__ has joined #ruby
sski has quit [Ping timeout: 255 seconds]
jzig has quit [Ping timeout: 265 seconds]
dweeb_ has joined #ruby
mrnugget has quit [Quit: mrnugget]
browndawg has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
wookiehangover has quit [Ping timeout: 245 seconds]
centrx has joined #ruby
centrx has quit [Client Quit]
Elhu has quit [Ping timeout: 240 seconds]
chrisseaton has joined #ruby
papercode has quit [Quit: WeeChat 0.4.3]
klaut has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
havenwood has quit []
julian-delphiki has joined #ruby
tkuchiki has joined #ruby
jason__ has quit [Ping timeout: 264 seconds]
gnephiak has joined #ruby
Elhu has joined #ruby
nanoyak has quit [Ping timeout: 240 seconds]
donnoc has joined #ruby
robbyoconnor has joined #ruby
anarang has joined #ruby
bean__ has quit [Ping timeout: 252 seconds]
dweeb_ has quit [Quit: Computer has gone to sleep.]
AlexRussia has quit [Read error: Operation timed out]
yfeldblum has joined #ruby
pwh has quit []
yfeldblum has quit [Remote host closed the connection]
freerobby has joined #ruby
axeman- has quit [Ping timeout: 255 seconds]
luriv has joined #ruby
Macaveli has joined #ruby
dx7 has quit [Remote host closed the connection]
dx7 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stnly_ has quit [Ping timeout: 240 seconds]
hermanmunster has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
hermanmunster has joined #ruby
mary5030 has joined #ruby
RaptorJesus has quit [Remote host closed the connection]
dweeb_ has joined #ruby
dx7 has quit [Ping timeout: 240 seconds]
dagobah has joined #ruby
RaptorJesus has joined #ruby
nfk has joined #ruby
RaptorJesus has quit [Remote host closed the connection]
bahar has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
dumdedum has joined #ruby
bahar has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
justinas has joined #ruby
RaptorJesus has joined #ruby
hermanmunster has quit [Ping timeout: 268 seconds]
<justinas> hi guys, how to make a static method in ruby?
end_guy has quit [Ping timeout: 265 seconds]
phansch has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
momomomomo has quit [Quit: momomomomo]
coderhs has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby
<dr0ff> def self.method_name
sski has joined #ruby
end_guy has joined #ruby
x1337807x has joined #ruby
LetErikTry has quit [Read error: Connection reset by peer]
Es0teric has quit [Quit: Computer has gone to sleep.]
<justinas> thank you very much
justinas has left #ruby [#ruby]
ktosiek has quit [Ping timeout: 240 seconds]
sigurding has joined #ruby
apeiros has joined #ruby
axeman- has joined #ruby
sski has quit [Ping timeout: 240 seconds]
tobago has joined #ruby
timonv has joined #ruby
mikepack has quit [Remote host closed the connection]
centrx has joined #ruby
dweeb_ has quit [Quit: Computer has gone to sleep.]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Xeago has joined #ruby
reset has quit [Ping timeout: 240 seconds]
chrisseaton has quit [Ping timeout: 268 seconds]
reset has joined #ruby
himsin has joined #ruby
pigzzcanfly has joined #ruby
nomenkun has joined #ruby
supermarin_ has joined #ruby
eynj has quit [Quit: Leaving.]
mikepack has joined #ruby
bahar has quit [Ping timeout: 268 seconds]
zigomir_ has quit [Ping timeout: 240 seconds]
reset has quit [Ping timeout: 240 seconds]
abdulsattar has joined #ruby
bahar has joined #ruby
jamto11 has joined #ruby
supermarin_ has quit [Ping timeout: 255 seconds]
mansi has joined #ruby
mikepack has quit [Ping timeout: 252 seconds]
batman has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
evenix has quit [Read error: Connection reset by peer]
bauruine has quit [Ping timeout: 240 seconds]
Dwarf has quit [Read error: Connection reset by peer]
SevereOverfl0w has quit [Ping timeout: 246 seconds]
rcs has quit [Ping timeout: 240 seconds]
batman has joined #ruby
Dwarf has joined #ruby
oso|away has quit [Ping timeout: 240 seconds]
Shidash has joined #ruby
donnoc has quit [Quit: WeeChat 0.4.3]
jamto11 has quit [Ping timeout: 240 seconds]
GreatSUN has joined #ruby
agjacome has joined #ruby
evenix has joined #ruby
donnoc has joined #ruby
jaimef has quit [Ping timeout: 255 seconds]
rurban has quit [Ping timeout: 240 seconds]
hoelzro has quit [Ping timeout: 246 seconds]
fabrice31 has joined #ruby
NovapaX has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
batman___ has joined #ruby
vim_shim_ has quit [Ping timeout: 255 seconds]
oso|away has joined #ruby
oso|away is now known as oso96_2000
chipotle has joined #ruby
hoelzro has joined #ruby
viscera has joined #ruby
bauruine has joined #ruby
SevereOverfl0w has joined #ruby
ayaz has joined #ruby
ayaz has quit [Max SendQ exceeded]
cj3kim has joined #ruby
bmn has quit [Ping timeout: 240 seconds]
batman has quit [Ping timeout: 255 seconds]
chipotle has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
evenix has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
evenix has joined #ruby
cschneid has quit [Ping timeout: 246 seconds]
monkegjinni has quit [Remote host closed the connection]
defuncprocess has quit [Ping timeout: 240 seconds]
rcs has joined #ruby
Celm has joined #ruby
<mozzarella> you know what's great?
<mozzarella> ruby
Shidash has quit [Ping timeout: 240 seconds]
bmn has joined #ruby
jaimef has joined #ruby
Bumptious has quit [Remote host closed the connection]
ayaz has joined #ruby
Bumptious has joined #ruby
marienz has quit [Read error: Operation timed out]
Celm has quit [Ping timeout: 265 seconds]
cschneid has joined #ruby
rurban has joined #ruby
zigomir has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
thomasxie has quit [Quit: Leaving.]
andikr has joined #ruby
_Andres has joined #ruby
dweeb_ has joined #ruby
yfeldblu_ has joined #ruby
matcouto has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vim_shim_ has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Remote host closed the connection]
francisfish has joined #ruby
skammer has joined #ruby
amclain has quit [Quit: Leaving]
supermarin_ has joined #ruby
mrnugget has joined #ruby
defuncprocess has joined #ruby
dfranciosi has quit [Remote host closed the connection]
jefflyne has quit [Ping timeout: 264 seconds]
dfranciosi has joined #ruby
yacks has quit [Ping timeout: 255 seconds]
bkzl has joined #ruby
agjacome has quit [Quit: leaving]
xardas has joined #ruby
agjacome has joined #ruby
<mozzarella> WHY was rake missing?
supermarin_ has quit [Ping timeout: 240 seconds]
<mozzarella> I thought it came installed with ruby 2.1
jefflyne has joined #ruby
freerobby has joined #ruby
tectonic has quit []
qba73 has joined #ruby
timonv has quit [Remote host closed the connection]
<dr0ff> missing where?
<donnoc> I think that was i joke
<donnoc> a joke*
noop has joined #ruby
luriv has quit [Ping timeout: 240 seconds]
hamed_r has joined #ruby
paradisaeidae has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 240 seconds]
Hanmac has joined #ruby
defuncprocess has quit [Quit: Leaving]
francisfish has quit [Remote host closed the connection]
bricker`LA has joined #ruby
Hanmac1 has quit [Ping timeout: 255 seconds]
shredding has joined #ruby
cj3kim has quit [Remote host closed the connection]
greenarrow has joined #ruby
SolarSailor has joined #ruby
luriv has joined #ruby
donnoc has quit [Ping timeout: 240 seconds]
relix has joined #ruby
jack_rabbit has quit [Quit: SIGSEGV (core dumped)]
coder_neo has quit [Quit: Leaving]
jack_rabbit has joined #ruby
evenix has quit [Remote host closed the connection]
mary5030 has joined #ruby
<xardas> hello, when injecting dependencies into a class where is then the object instatiation happening? i guess this is application specific?
dweeb_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest4157 has quit [Remote host closed the connection]
rm_ has joined #ruby
jack_rabbit_ has joined #ruby
<mozzarella> dr0ff: I have to gem install it manually
<mozzarella> I had*
mary5030 has quit [Ping timeout: 240 seconds]
pigzzcanfly has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 268 seconds]
Elhu has joined #ruby
fabrice31 has quit [Remote host closed the connection]
rm_ has quit [Ping timeout: 240 seconds]
nvrch has joined #ruby
ikaros has joined #ruby
reset has joined #ruby
dr0ff has left #ruby [#ruby]
rdark has joined #ruby
rylev has joined #ruby
pfg has joined #ruby
obs has joined #ruby
sk87 has joined #ruby
ndrei has joined #ruby
DouweM has quit [Ping timeout: 246 seconds]
pfg has quit [Client Quit]
klaas has joined #ruby
heftig has joined #ruby
reset has quit [Ping timeout: 268 seconds]
timonv has joined #ruby
klaut has quit [Remote host closed the connection]
klaas_ has quit [Ping timeout: 252 seconds]
polysics has joined #ruby
donnoc has joined #ruby
mansi has joined #ruby
luckyruby has joined #ruby
Biohazard has quit [Quit: tropicraft.net]
poikon has joined #ruby
Xeago has joined #ruby
skammer is now known as skammer|afk
skammer|afk is now known as skammer
cj3kim has joined #ruby
ktosiek has joined #ruby
coder_neo has joined #ruby
Biohazard has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
xardas has quit [Ping timeout: 240 seconds]
JacobHayes has quit [Remote host closed the connection]
roolo has joined #ruby
xardas has joined #ruby
aspiers has joined #ruby
kung has joined #ruby
olivier_bK has joined #ruby
Celm has joined #ruby
Biohazard has quit [Ping timeout: 264 seconds]
fabrice31 has joined #ruby
<olivier_bK> hy
markisonfire has quit [Quit: markisonfire]
chinkung has quit [Ping timeout: 240 seconds]
donnoc has quit [Ping timeout: 240 seconds]
Celm has quit [Ping timeout: 240 seconds]
donnoc has joined #ruby
mehlah has joined #ruby
ghr has joined #ruby
ktosiek has quit [Ping timeout: 255 seconds]
hamed_r has quit [Quit: Ex-Chat]
ktosiek has joined #ruby
axeman_ has joined #ruby
axeman- has quit [Ping timeout: 255 seconds]
Jeticus has quit []
ktosiek has quit [Ping timeout: 240 seconds]
supermarin_ has joined #ruby
okdas has quit [Ping timeout: 240 seconds]
marr123 has joined #ruby
marr123 has quit [Client Quit]
freerobby has joined #ruby
Stalkr_ has joined #ruby
ktosiek has joined #ruby
Stalkr_ has quit [Changing host]
Stalkr_ has joined #ruby
supermarin_ has quit [Ping timeout: 255 seconds]
elaptics`away is now known as elaptics
gnephiak has quit [Quit: Konversation terminated!]
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
einarj has joined #ruby
mikecmpbll has joined #ruby
nahkunt has joined #ruby
freerobby1 has quit [Read error: Operation timed out]
timonv has quit [Remote host closed the connection]
znub has joined #ruby
AlSquire has joined #ruby
ktosiek has quit [Ping timeout: 240 seconds]
kenndel_ has joined #ruby
<znub> hi, ruby newbie here, I would like to know if there's a better way to do : hash[:foo] = get_foo if get_foo where get_foo method obviously returns (or not) the value for :foo key in the hash.
bluOxigen has quit [Ping timeout: 240 seconds]
greenarrow has quit [Quit: 500]
kenndel has quit [Ping timeout: 255 seconds]
greenarrow has joined #ruby
marr has joined #ruby
linuxer1 has joined #ruby
<linuxer1> I need to convert a string that actually has a binary value to a Fixnum...problem is to_i drops the leading zeros and jacks the binary all up. How can I get a string to a fix num without losing the leading zeros? My string is "0110111"
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has quit [Excess Flood]
riotjones has joined #ruby
Kryptonical has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
donnoc has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby
klaut has joined #ruby
codenapper has joined #ruby
chrisseaton has joined #ruby
rahult has joined #ruby
ndrei has quit [Quit: Lost terminal]
ndrei has joined #ruby
reset has joined #ruby
timonv has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
yacks has joined #ruby
yfeldblum has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
viscera has quit [Ping timeout: 240 seconds]
reset has quit [Ping timeout: 255 seconds]
jamto11 has joined #ruby
mansi has joined #ruby
diverdude has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
<diverdude> hello, i am trying to do sudo gem install rmagick -v '2.13.2' but i get the following error: http://paste.ubuntu.com/7197827/ what is going wrong?
chrisseaton has quit []
francisfish has joined #ruby
tacos1de has quit [Ping timeout: 265 seconds]
andrewlio has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
chrisseaton has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
axeman__ has joined #ruby
tacos1de has joined #ruby
JacobHayes has joined #ruby
nari has quit [Ping timeout: 264 seconds]
CyborgCygnus has joined #ruby
axeman_ has quit [Ping timeout: 240 seconds]
<Hanmac> diverdude: apt-get install libmagickcore-dev
maasha has joined #ruby
Celm has joined #ruby
<maasha> møjn
AndChat- has joined #ruby
polysics has left #ruby [#ruby]
Loaft has joined #ruby
kaspergrubbe has joined #ruby
Celm has quit [Ping timeout: 265 seconds]
sqwirl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
luriv has quit [Ping timeout: 240 seconds]
alexju has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 268 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
browndawg has quit [Quit: Leaving.]
ndrei has quit [Ping timeout: 255 seconds]
skammer is now known as skammer|afk
workmad3 has joined #ruby
Xeago has quit [Remote host closed the connection]
Zai00 has joined #ruby
JacobHayes has quit [Remote host closed the connection]
Xeago has joined #ruby
skammer|afk is now known as skammer
maasha has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
skammer is now known as skammer|afk
workmad3 has quit [Ping timeout: 240 seconds]
jack_rabbit_ has quit [Quit: Leaving]
<luckyruby> is there a ruby method that does https://gist.github.com/luckyruby/9951244?
wookiehangover has joined #ruby
workmad3 has joined #ruby
francisfish has quit [Remote host closed the connection]
cj3kim has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
nahkunt has quit [Changing host]
nahkunt has joined #ruby
<canton7> luckyruby, nothing built-in. something like hash.map{ |k,v| [k, v.first] }.to_h also does the trick
chrisseaton has quit []
<luckyruby> canton7: is that an improvement over what I have?
kaspergr_ has joined #ruby
<canton7> if you define these: https://gist.github.com/havenwood/4964517, you can do hash.map_values(&:first)
wookiehangover has quit [Ping timeout: 240 seconds]
<canton7> it doesn't mutate the hash, which might be important :P
charliesome has joined #ruby
pfg has joined #ruby
<luckyruby> good point
chrisseaton has joined #ruby
kaspergrubbe has quit [Ping timeout: 255 seconds]
freerobby has quit [Ping timeout: 240 seconds]
Stalkr_ has quit [Quit: Leaving...]
gaussblurinc has joined #ruby
donnoc has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
maasha has joined #ruby
wookiehangover has joined #ruby
kaspergr_ has quit [Ping timeout: 240 seconds]
repinski has joined #ruby
<repinski> is ruby mostly used for web development? is it used for systems administration or application development?
lolmaus has quit [Ping timeout: 240 seconds]
lolmaus_ has joined #ruby
<ghr> repinski lots of use in systems admin. Check out Chef and Puppet
luriv has joined #ruby
JohnBat26 has joined #ruby
<repinski> ghr: thanks
donnoc has quit [Ping timeout: 240 seconds]
wookiehangover has quit [Ping timeout: 240 seconds]
<ghr> no problem
workmad3 has quit [Ping timeout: 252 seconds]
<Hanmac> repinski: i also use it for GUI applications and also for 3D rendering
dkpi has joined #ruby
<repinski> Hanmac: that is pretty darn interesting
popl has joined #ruby
ndrei has joined #ruby
hermanmunster has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
workmad3 has joined #ruby
kaspergrubbe has joined #ruby
jonmorehouse has quit [Ping timeout: 240 seconds]
skammer|afk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
francisfish has joined #ruby
repinski has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Yayo has joined #ruby
jollyy has joined #ruby
wookiehangover has joined #ruby
Loaft has quit [Ping timeout: 255 seconds]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
mengu has quit [Remote host closed the connection]
amundj_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amundj has joined #ruby
JacobHayes has joined #ruby
wookiehangover has quit [Ping timeout: 240 seconds]
papasierra has joined #ruby
<papasierra> hi, i have a very simple question, i'm trying to use ruby to turn a hash into a formatted string, like so https://gist.github.com/paulsschwarz/ca34280e8ce904ae1233
chichou has joined #ruby
reset has joined #ruby
<canton7> your desired input format is slightly off - should be { .... } not [ ... ]
ktosiek has joined #ruby
<canton7> >> {'foo' => 'bar', 'baz' => 'bee'}.map{ |k,v| "'#{k}' => '#{v}'" }.join(", ")
<eval-in> canton7 => "'foo' => 'bar', 'baz' => 'bee'" (https://eval.in/131162)
yfeldblum has joined #ruby
<papasierra> canton7: sure, i wasn't sure of the exact ruby syntax for a hash. but cool. also, i have ruby installed locally, what's the REPL command?
<canton7> irb
<canton7> (or install pry, and use that)
<papasierra> ah yeah! right, you suggestion looks good. i'm going to try now. is pry also a repl?
<canton7> yup, one on steroids
kennym has joined #ruby
<papasierra> nice, well ty v much. ruby is beginning to make a lot more sense to me that it was a few months ago
francisfish has quit [Remote host closed the connection]
wookiehangover has joined #ruby
reset has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
<canton7> :)
yfeldblum has quit [Ping timeout: 265 seconds]
maximski has joined #ruby
pauld has quit [Remote host closed the connection]
wookiehangover has quit [Ping timeout: 252 seconds]
mansi has quit [Ping timeout: 240 seconds]
francisfish has joined #ruby
hamakn has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
hamakn has joined #ruby
kennym has quit [Quit: Leaving.]
ktosiek has quit [Ping timeout: 255 seconds]
oo_ has joined #ruby
wookiehangover has joined #ruby
ktosiek has joined #ruby
Speed has joined #ruby
<papasierra> canton7: sorry, as much as your answer was accurate, my question way not! here's what i'm really trying to do https://gist.github.com/paulsschwarz/ca34280e8ce904ae1233
DaniG2k has joined #ruby
<canton7> I'm afraid I don't know what chef does
Celm has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<canton7> or rather, how it does it
<papasierra> oh, as in that's some dsl?
<canton7> but this sounds like a chef question. Maybe a backslash on the end of each line?
<canton7> (except the last)
hamakn has quit [Ping timeout: 240 seconds]
<papasierra> from inside chef's cookbook :php_options => params[:php_options] || {},
<papasierra> so it's looking for a hash
<olivier_bK> how to compare two date ? i try to now if this date is grater 2013-12-31 than 2014-04-02
<canton7> papasierra, some brackets would also do it: php_options(\n'php_....' => 'on',\n....\n)
<papasierra> canton7: trying that now...
<papasierra> it looks to me like it's not some dsl, but more some ruby syntax sugar where you don't have to specify {} to declare a hash
Celm has quit [Ping timeout: 265 seconds]
<papasierra> hmm... syntax error, unexpected tASSOC, expecting ')'
<canton7> asptie?
<canton7> *pastie
St_Marx has quit [Ping timeout: 245 seconds]
<canton7> might need some more backslashes :P
yfeldblum has joined #ruby
<papasierra> oh, it needs the \n? ok, sorry the whole idea was simply to split this over multiple lines to make it more human readable.
<canton7> by \n I meant a newline
<papasierra> i have about 20 hash entries (php_options) and the horizontal scroll is nasty. so i just wanted to have one hash entry per line
armstrjare has quit [Quit: Textual IRC Client: www.textualapp.com]
<papasierra> sure, as per my pastie?
<canton7> and OK, my guess about how chef worked was incorrect
<canton7> you're best looking for chef-specific answers
wookiehangover has quit [Ping timeout: 240 seconds]
<papasierra> right. i have a guess...
jonmorehouse has joined #ruby
<papasierra> canton7: http://pastie.org/8990904
yfeldblum has quit [Ping timeout: 265 seconds]
carraroj has quit [Ping timeout: 240 seconds]
<papasierra> yup, time to ask in #chef, or to look into the guts and work out how it's formatting this stuff
<canton7> wrong sort of brackets
<papasierra> well, chef is doing an .each, so that sounds like [] to me, no?
<canton7> you can .each a hash
<papasierra> ah, so {}?
<canton7> >> {'foo' => 'bar'}.each{ |k,v| puts "Key = #{k}, Value = #{v}" }
<eval-in> canton7 => Key = foo, Value = bar ... (https://eval.in/131163)
Elhu has quit [Quit: Computer has gone to sleep.]
JacobHayes has quit [Remote host closed the connection]
<papasierra> right of course. it seems to be the whole newline thing it doesn't like
St_Marx has joined #ruby
JacobHayes has joined #ruby
supermarin_ has joined #ruby
jonmorehouse has quit [Ping timeout: 240 seconds]
fannye has joined #ruby
rahult is now known as rahult_
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mengu has joined #ruby
freerobby has joined #ruby
viscera has joined #ruby
ktosiek has quit [Ping timeout: 255 seconds]
Elhu has joined #ruby
geoffw8_ has joined #ruby
supermarin_ has quit [Ping timeout: 255 seconds]
himsin has quit [Quit: himsin]
mercwithamouth has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
rahult_ is now known as rahult
skammer has joined #ruby
skammer has quit [Max SendQ exceeded]
mrnugget has quit [Quit: mrnugget]
skammer has joined #ruby
mehlah has quit [Quit: Leaving...]
JacobHayes has quit [Remote host closed the connection]
<papasierra> canton7: final solution: http://pastie.org/private/wcknmeldlyrw5jcfcgikq
<apeiros> papasierra: though shall not put a space between method name and argument-parens! (line 2
<apeiros> )
<papasierra> OR use an implicit hash, which means i can drop the ({ ... }), but i have to have the first item on the first line
<papasierra> apeiros: just noticed that, ty :)
<apeiros> papasierra: keep the (), drop the {}, then you can keep the items on the subsequent lines
dyoko has joined #ruby
Soda has joined #ruby
browndawg has joined #ruby
<papasierra> apeiros: ty. final final solution http://pastie.org/private/q8l9jlxjwnsfomj9ejgog
mrnugget has joined #ruby
coder_neo has quit [Ping timeout: 255 seconds]
mostlybadfly has joined #ruby
<jlebrech> i want to gsub something out of a string but just at the beginning ie images/http-google.com.png I wanna remove 'images/' from the start but not from anywhere else in the string.
luriv has quit [Remote host closed the connection]
roolo has quit [Quit: Leaving...]
<jlebrech> regex maybe
<zaargy> regex yes
kobain has quit []
kith_ has joined #ruby
<zaargy> "images/http-google.com.png".gsub(/^images\//, "")
setient has quit [Write error: Broken pipe]
Drakevr has quit [Read error: Operation timed out]
chridal_ has quit [Write error: Broken pipe]
bw_ has quit [Read error: Operation timed out]
Blue_Ice has quit [Read error: Operation timed out]
setient has joined #ruby
bkzl has quit [Quit: Lingo - http://www.lingoirc.com]
Drakevr has joined #ruby
<jlebrech> thanks \Aimages\/ :)
chridal has joined #ruby
Blue_Ice has joined #ruby
<jlebrech> sorry you just told me
<jlebrech> :)
kith has quit [Read error: Operation timed out]
Bish has quit [Read error: Operation timed out]
Bish has joined #ruby
bw_ has joined #ruby
<apeiros> zaargy: sub instead of gsub if you know it'll only be once
Kneferilis has quit [Ping timeout: 252 seconds]
guardian has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
banister has quit [Ping timeout: 255 seconds]
guardian has joined #ruby
reset has joined #ruby
carraroj has joined #ruby
gabrielCmendes has joined #ruby
znub has quit [Ping timeout: 245 seconds]
shredding has quit [Quit: shredding]
rdark has quit [Quit: leaving]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
DouweM has joined #ruby
postmodern has quit [Quit: Leaving]
reset has quit [Ping timeout: 240 seconds]
jamto11 has joined #ruby
mansi has joined #ruby
chipotle has joined #ruby
sk87 has joined #ruby
roolo has joined #ruby
nvrch has quit [Quit: nvrch]
dawkirst has quit [Read error: Connection reset by peer]
jamto11 has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
NovapaX has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
NovapaX has joined #ruby
jaywastaken has quit [Quit: This computer has gone to sleep]
sk87 has quit [Client Quit]
mehlah has joined #ruby
AndChat- has quit [Ping timeout: 252 seconds]
banister has joined #ruby
sensen has quit [Quit: leaving]
banister has quit [Client Quit]
DaniG2k has quit [Quit: leaving]
pontiki has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
Mon_Ouie has joined #ruby
sigurding has quit [Quit: sigurding]
parduse has quit []
catphish has joined #ruby
xardas has quit [Ping timeout: 240 seconds]
<catphish> is there a way in ruby to monitor 10,000 IO sockets for data in a threadsafe manner?
<catphish> spawning a thread for each seems like madness, select can't support enough sockets, and poll() doesn't work in a threaded environment
NovapaX has quit [Ping timeout: 268 seconds]
andikr has quit [Remote host closed the connection]
xardas has joined #ruby
parduse has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
davy_ has joined #ruby
<popl> catphish: What are you trying to accomplish?
NovapaX has joined #ruby
pontiki has joined #ruby
<catphish> i have a ruby server that listens on a very large number of tcp sockets
nfk has quit [Quit: yawn]
<catphish> i want to accept connections on any of them
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<catphish> and talk to the connected clients
luckyruby has quit [Remote host closed the connection]
<popl> catphish: use processes, not threads: http://godrb.com/
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki> hi
<catphish> i think that's genuine insanity, but thanks
<apeiros> catphish: threads + select on smaller numbers?
<catphish> apeiros: that makes a lot of sense :)
ndrei has quit [Ping timeout: 268 seconds]
<catphish> i'll break it down into selects of 1,000 sockets and put each in a thread
<apeiros> catphish: maybe use a library which supports notification (push instead of poll)
<popl> why is it insane?
<catphish> the other option is to use poll and put *everything* in the poll (clients and listeners)
yfeldblum has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
poikon has quit [Ping timeout: 240 seconds]
<catphish> popl: running tens of thousands of pre-forked processes just seems unmanageable
<popl> you asked for a way to do it in a threadsafe manner.
mercwithamouth has quit [Ping timeout: 240 seconds]
<popl> That's what the framework is for.
fgo has quit [Remote host closed the connection]
<catphish> forking isn't "threadsafe"
<catphish> lol
<apeiros> it kinda is :)
<catphish> lol
<apeiros> being in separate processes and all…
davy_ has quit [Ping timeout: 240 seconds]
<popl> yes
eka has joined #ruby
charliesome has joined #ruby
<apeiros> but probably comes with its own set of problems for your scenario
<catphish> apeiros: thanks anyway, i'll try getting everything into a poll() as that seems the most efficinent, failing that i'll use threaded selects
<catphish> my app is a tcp proxy that listens on a wide range of ports, so everything is io driven and may be able to work in a single thread
<apeiros> catphish: alternatively: no threads, select iteratively on small arrays without blocking
<workmad3> catphish: have you considered using something like EventMachine?
<catphish> that's a tad cpu hungry i fear
monkegjinni has joined #ruby
<popl> I try to avoid threads when I can.
<catphish> workmad3: not yet, i guess that uses one huge poll()
mikepack has joined #ruby
hermanmunster has quit [Remote host closed the connection]
<catphish> popl: that's the safest approach if you don't understand them well, but sadly they're often very useful
ndrei has joined #ruby
sandstrom has joined #ruby
sandstrom has joined #ruby
<popl> ah
<catphish> particularly as a way to handle multiple network clients
hermanmunster has joined #ruby
<sandstrom> What is this syntax `0x25` in Ruby? It returns the 37 fixnum
<catphish> hex
<sandstrom> Ah!
<maasha> bleh :o( something is not right in my fork pool. When I hit it with lots of real data the parent process is busy, the workers are mostly idle, and it blows memory: https://gist.github.com/maasha/9d0b7e88ca6cf200cfed
<sandstrom> catphish: thanks
sigurding has joined #ruby
<catphish> sandstrom: also be aware of octal eg: 020
<maasha> and it is slow.
<catphish> 020 != 20 :)
<sandstrom> catphish: thanks!
<catphish> i assume you knoe what hex it
<catphish> *is
<catphish> *know
Kneferilis has joined #ruby
<pontiki> treachery of fingers
<catphish> indeed
<jmaister> >> 020
<eval-in> jmaister => 16 (https://eval.in/131196)
supermarin_ has joined #ruby
<catphish> >> 0x20
<eval-in> catphish => 32 (https://eval.in/131199)
<jmaister> I just realised eval-in is pronounced everlyn
hermanmu_ has joined #ruby
<pontiki> >> 0xdeadbeef
<eval-in> pontiki => 3735928559 (https://eval.in/131200)
hermanmunster has quit [Remote host closed the connection]
<jmaister> eval-in: Hi babe
mikepack has quit [Ping timeout: 268 seconds]
freerobby has joined #ruby
poikon has joined #ruby
<pontiki> come now, that's not how you speak to her
<pontiki> >> "Hello, dear"
<eval-in> pontiki => "Hello, dear" (https://eval.in/131205)
<jmaister> >> make me a sandwich
<eval-in> jmaister => undefined local variable or method `sandwich' for main:Object (NameError) ... (https://eval.in/131206)
<jmaister> Well, that's a new excuse
relix has joined #ruby
nvrch has joined #ruby
<apeiros> jmaister: try that in bash
Lewix has joined #ruby
supermarin_ has quit [Ping timeout: 255 seconds]
<jmaister> make: *** No rule to make target `me'. Stop.
<jmaister> but that's zsh though
<popl> make isn't a shell command
nuck has quit [Ping timeout: 240 seconds]
freerobby has quit [Ping timeout: 240 seconds]
<popl> so it shouldn't matter :)
<catphish> apeiros: now i'm confused, i just ran it with no threads using select on 10,000 listeners and it didn't break
osxorgate has joined #ruby
<catphish> isn't that supposed to explode in a spectacularly fiery mess?
gaussblurinc has quit [Quit: Leaving.]
<apeiros> nice. so you don't need to break it down it seems.
<jmaister> :(
<workmad3> catphish: what happens when you throw realistic levels of data at the sockets?
<jmaister> It's so dissappointing when something you expect to explode fails to do so
<apeiros> well, it depends on your OS' select
<apeiros> I was a bit surprised when you said 10k wouldn't work with select, but took it at face value
<popl> jmaister: That's the best defense against a troll.
poikon_ has joined #ruby
kitak_ has quit [Remote host closed the connection]
<pontiki> "Where was the Earth-shattering ka-boom?"
<catphish> workmad3: nmap localhost -p10000-19999 - no issues
<popl> pontiki: in her pants
<popl> HEYO
<catphish> all 10,000 get accepted
<workmad3> popl: I find the best defense against a troll is to push them off the bridge... but I'm somewhat old-skool
<workmad3> catphish: right... but what about when data is flowing in?
<pontiki> how can you push them off a bridge when they live under it?
<apeiros> aahahaha: "poll and select are basically the same speed-wise: slow."
<catphish> i don't know, i'm not putting the data streams into the select
<workmad3> catphish: as it's not really about whether they're accepted, it's about if you can get data through your system fast enough ;)
<catphish> each actual client stream gts a thread
<workmad3> catphish: are you using jruby or rubinius? or will you have the GIL to contend with?
poikon has quit [Ping timeout: 240 seconds]
<catphish> i'm using MRI 2.1.1
<apeiros> catphish: from a quick google, I'd say a libev wrapper would perform best
ndrei has quit [Ping timeout: 240 seconds]
shaileshg has joined #ruby
chipotle has quit [Quit: cya]
<catphish> it's working great, i just don't understand why
<workmad3> catphish: so that's a 'yes' on the GIL front... which is why you should be checking if that setup can perform at the expected data load rates (as only one thread will be active at a time)
nuck has joined #ruby
<catphish> sure, well the main thread is normally just waiting on select()
njection_ has joined #ruby
<catphish> which helps
<workmad3> catphish: 1 thread waiting amongst 10,000 doesn't seem like much help personally ;(
<workmad3> ;)
greenarrow has quit [Quit: 500]
Elhu has quit [Quit: Computer has gone to sleep.]
<catphish> there aren't 10,000 threads, one thread to listen on 10,000 ports, then one thread for each client, almost all will be waiting for data with select()
njection has quit [Ping timeout: 268 seconds]
<catphish> but that's not to say load testing isn't in order
<catphish> more interested in making it works first
aagdbl has joined #ruby
<catphish> and it does appear to
<catphish> thanks all, thats a few things for me to try now :)
dEPy has joined #ruby
danshultz has joined #ruby
ndrei has joined #ruby
workmad3 is now known as wm3|lunch
CyborgCygnus has quit [Remote host closed the connection]
atmosx has quit [Ping timeout: 265 seconds]
francisfish has quit [Remote host closed the connection]
<osxorgate> my osx comes with ruby 2.0, i try to run a particular gem but it fails, apparently because it was designed for 1.9 . Is there a way for me to run this gem using 1.9 instead of 2.0 ?
<pontiki> huh. which gem, osxorgate ?
francisfish has joined #ruby
<osxorgate> pontiki: this guy https://github.com/dingbat/clockout , my actual goal is to extract hours worked from a git repo
<pontiki> you *could* install a 1.9.3 using a ruby version manager
<osxorgate> for tax purposes
browndawg has left #ruby [#ruby]
fbernier has joined #ruby
<Hanmac> osxorgate: it says it does support 2.0 ... why does it fail for you, or what specially does happen?
compleatang has quit [Remote host closed the connection]
tryggvib has left #ruby [#ruby]
<osxorgate> yup it does say that, but many repos (not all) give an error like this : https://gist.github.com/xorgate/0c551adb660adffe10eb
fgo has joined #ruby
repinski has joined #ruby
tulak has joined #ruby
abdulsattar has quit [Ping timeout: 240 seconds]
<Hanmac> looks more like a bug in grit for me ...
kaspergr_ has joined #ruby
Elhu has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
<Hanmac> or a problem that grit might not compatible with your git version
_Andres has joined #ruby
jollyy_ has joined #ruby
repinski has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Ping timeout: 240 seconds]
<tulak> Hello, I am having two arrays of objects of class MyObject, and I am trying to do the substraction a = [obj1, obj2]; b = [obj2, obj3]; a - b => [obj1, obj2] but it does not substract array b from a. The class MyObject implements method <=> for comparing, and even a[1] == b[0] is true. What else should I implement to get this working ?
jollyy has quit [Ping timeout: 240 seconds]
reset has joined #ruby
francisfish has quit [Remote host closed the connection]
jollyy has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
jollyy__ has joined #ruby
greenarrow has joined #ruby
<osxorgate> Hanmac: maybe i can use RVM ? (i am 100% ruby noob)
oo_ has quit [Remote host closed the connection]
<Hanmac> osxorgate: i am not 100% sure if that would solv your problem
dfranciosi has quit [Remote host closed the connection]
atmosx has joined #ruby
dfranciosi has joined #ruby
Xeago has joined #ruby
hemanth has joined #ruby
<Hanmac> tulak: did you include the Comparable module? if yes, try to add the methods #hash and #eql?
hemanth has quit [Max SendQ exceeded]
rylev has quit [Remote host closed the connection]
oo_ has joined #ruby
jollyy_ has quit [Ping timeout: 268 seconds]
hemanth has joined #ruby
hemanth has quit [Max SendQ exceeded]
hemanth has joined #ruby
reset has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
jollyy has quit [Ping timeout: 268 seconds]
jollyy__ is now known as jollyy
kitak has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
kitak has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
compleatang has joined #ruby
<gr33n7007h> Can anyone help me why this is not scanning => http://sprunge.us/fFIP
oo_ has quit [Remote host closed the connection]
phutchins has joined #ruby
<canton7> gr33n7007h, you're not re-joining your threads?
<Mon_Ouie> Yes, you're creating threads but they don't have the time to finish before the end of your program
ndrei has quit [Read error: No route to host]
mikecmpbll has quit [Quit: ciao.]
<gr33n7007h> how would i join them and where should i put it?
ndrei has joined #ruby
<canton7> threads.each(&:join) (i.e. call 'thread.join' for each 'thread')
mansi has quit [Ping timeout: 240 seconds]
<Mon_Ouie> Once they're all created you need to wait for them to finish. e.g. threads.each(&:join)
Xiti` has joined #ruby
<canton7> and you probably want it at the end of the port_scan method
<gr33n7007h> one sec
JarJarBi1ks has joined #ruby
<tulak> Hanmac: thanks, I've implemented that two methods and it works now
jollyy has quit [Quit: jollyy]
jkamenik has joined #ruby
<tulak> Hanmac: thing is, I couldn't find anything about this 2 methods in documentation
<gr33n7007h> like this => http://sprunge.us/EIQY
shredding has joined #ruby
<canton7> try it ;)
simono has joined #ruby
<gr33n7007h> ok one sec
helpa has quit [Remote host closed the connection]
lfox has quit [Ping timeout: 265 seconds]
dmarr has quit [Ping timeout: 265 seconds]
Aeia has quit [Remote host closed the connection]
awkisopen has quit [Ping timeout: 265 seconds]
Kruppe has quit [Max SendQ exceeded]
Xiti has quit [Read error: Connection reset by peer]
lfox has joined #ruby
JarJarBinks has quit [Ping timeout: 265 seconds]
awkisopen has joined #ruby
geoffw8_ has quit [Ping timeout: 265 seconds]
artgoeshere has quit [Ping timeout: 265 seconds]
zenojis has quit [Read error: Connection reset by peer]
dmarr has joined #ruby
awkisopen has quit [Excess Flood]
awkisopen has joined #ruby
kenndel_ has quit [Read error: Connection reset by peer]
bjeanes has quit [Ping timeout: 265 seconds]
Kruppe has joined #ruby
kenndel_ has joined #ruby
awkisopen has quit [Changing host]
awkisopen has joined #ruby
shaman42 has quit [Ping timeout: 265 seconds]
Aeia has joined #ruby
shaman42 has joined #ruby
geoffw8_ has joined #ruby
helpa has joined #ruby
bjeanes has joined #ruby
artgoeshere has joined #ruby
zenojis has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<gr33n7007h> This is the out put => http://sprunge.us/WihZ I had to ctrl+c because it was hanging :) I think it's nearly there
canton7-mac has joined #ruby
<gr33n7007h> This is the out put => http://sprunge.us/WihZ I had to ctrl+c because it was hanging :) I think it's nearly there
Celm has joined #ruby
<canton7-mac> yup, looks like it was still running
<canton7-mac> and you've hit the problem of multiple threads all writing to stdout at once ;)
<gr33n7007h> hmm...
Xeago__ has joined #ruby
marcux has quit [Quit: leaving]
<gr33n7007h> is there a way to delay it slightly?
<canton7-mac> what do you mean?
<gr33n7007h> like setting a timeout or something?
<canton7-mac> on the socket open?
<gr33n7007h> yeah
marcux has joined #ruby
<canton7-mac> you can use the Timeout class, although it's a little bit of a bodge
davy_ has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Xeago has quit [Ping timeout: 246 seconds]
<gr33n7007h> What would you say set a timeout of a second maybe?
<canton7-mac> shrug, mebbe
Celm has quit [Ping timeout: 265 seconds]
<canton7-mac> portscans do take a while :P
<gr33n7007h> well, yeah true :)
rvraghav93 has joined #ruby
mark_locklear has joined #ruby
<gr33n7007h> lemme redo it
yfeldblum has joined #ruby
dfranciosi has quit [Remote host closed the connection]
jonno11 has joined #ruby
dfranciosi has joined #ruby
davy_ has quit [Ping timeout: 268 seconds]
rylev has joined #ruby
lolmaus has joined #ruby
lolmaus_ has quit [Ping timeout: 240 seconds]
<shredding> hey all
yfeldblum has quit [Ping timeout: 265 seconds]
<shredding> I use highline in a capistrano project. both have a ask() func
kith_ is now known as kith
<shredding> Even if i do HighLine::ask('Your choice: ') i get the error:
<gr33n7007h> hey canton7-mac does this look right => http://sprunge.us/PbjI
<shredding> .rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.1.0/lib/capistrano/dsl/env.rb:30:in `ask': wrong number of arguments (1 for 2) (ArgumentError)
<shredding> How can i force the usage of the highline method?
<shredding> I thought the namespace would be sufficient.
r_rios has joined #ruby
<canton7-mac> gr33n7007h, surely you want to say 'port closed' if a timeout occurs?
himsin has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gr33n7007h> of course
<gr33n7007h> one sec
Beoran has joined #ruby
himsin has quit [Client Quit]
supermarin_ has joined #ruby
roolo has quit [Quit: Leaving...]
popl has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
momomomomo has joined #ruby
<gr33n7007h> canton7-mac, bloody hell that was fast new code => http://sprunge.us/NhNF
freerobby has joined #ruby
<canton7-mac> works?
<canton7-mac> bear in mind that 0.3 seconds isn't very long
<gr33n7007h> canton7, awesome it works well fast
<shredding> My problem: $terminal.ask
<shredding> solves it.
<gr33n7007h> what about 0.7
Beoran_ has quit [Ping timeout: 265 seconds]
<canton7-mac> I'd leave a few seconds at least
<canton7-mac> sometimes it does take a while to get a connection
<gr33n7007h> ok one sec lemme try 3 secs
habanany has quit [Ping timeout: 240 seconds]
sk87 has joined #ruby
supermarin_ has quit [Ping timeout: 255 seconds]
freerobby has quit [Ping timeout: 240 seconds]
spicerack has joined #ruby
papasierra has quit [Ping timeout: 240 seconds]
rylev has quit [Remote host closed the connection]
<gr33n7007h> It seems to be working but sometimes it says port 443 is closed when using 3 second timeout when port 443 is open
<canton7-mac> maybe it takes longer than 3 secs? maybe there's a firewall blocking your spamming?
<gr33n7007h> should I try a higher timeout?
<canton7-mac> dunno
<canton7-mac> I'd just use nmap :P
deryl has joined #ruby
<gr33n7007h> well true, but really i'm just trying to understand threads :)
<canton7-mac> which is fair enough
dblessing has joined #ruby
spicerack has quit [Client Quit]
vpretzel_ is now known as vpretzel
<gr33n7007h> So close yet so far away
atno has quit [Quit: Leaving]
Xeago__ has quit [Remote host closed the connection]
axisys has quit [Quit: leaving]
<gr33n7007h> canton7-mac, Thanks for your help buddy :)
<canton7-mac> :)
axisys has joined #ruby
Guest25829 has joined #ruby
chrisseaton has quit [Ping timeout: 240 seconds]
wald0 has joined #ruby
axisys has quit [Client Quit]
<gr33n7007h> you too Mon_Ouie :)
francisfish has joined #ruby
geoffw8_ has quit [Quit: Connection closed for inactivity]
axisys has joined #ruby
axisys has quit [Changing host]
axisys has joined #ruby
gaussblurinc has joined #ruby
SolarSailor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thesheff17 has joined #ruby
Xeago has joined #ruby
fgo has joined #ruby
<gr33n7007h> Just a quick question do threads automatically join in a pry/irb session?
<r_rios> Is there any (official, preferably) documentation on creating virtual attributes in Rails 4?
taf2 has joined #ruby
<apeiros> gr33n7007h: no
<apeiros> r_rios: #rubyonrails is probably more competent on that
<r_rios> Oops
<r_rios> Sorry
<canton7-mac> gr33n7007h, no. although, in your case, the process stopped executing before the threads completed, which killed the threads. that won't be the case in irb
<gr33n7007h> apeiros, canton7-mac got ya! cheers
mary5030 has joined #ruby
kpshek has joined #ruby
rvraghav93 has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
mr_snowf1ake has joined #ruby
viscera has quit [Ping timeout: 240 seconds]
kennym has joined #ruby
mary5030 has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
tkuchiki_ has joined #ruby
mary5030 has joined #ruby
mansi has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
flowerpot has joined #ruby
JacobHayes has joined #ruby
nisstyre has quit [Ping timeout: 268 seconds]
mansi has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 240 seconds]
pu22l3r__ has quit [Remote host closed the connection]
pu22l3r has joined #ruby
DEA7TH has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
tkuchiki_ has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
<DEA7TH> What do people typically use Ruby for, outside of Ruby on Rails?
flowerpot has quit [Ping timeout: 255 seconds]
fgo has quit [Remote host closed the connection]
browndawg has joined #ruby
danshultz has joined #ruby
nouitfvf_ has joined #ruby
davedev2_ has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
andrewlio has quit [Quit: Leaving.]
<olivier_bK> DEA7TH, i use ruby for creat some task like send mail , backup mysql , connect to irc ..
<olivier_bK> DEA7TH, i use ruby also for create an ide
pu22l3r has quit [Ping timeout: 240 seconds]
lolmaus has quit [Quit: No Ping reply in 180 seconds.]
nouitfvf has quit [Ping timeout: 240 seconds]
reset has joined #ruby
abdulsattar has joined #ruby
xcv has quit [Remote host closed the connection]
<olivier_bK> and if i have a time in few month i would want to creat a game with gosu
tjr9898 has joined #ruby
<canton7> general sysadmin stuff, general glue, sinatra websites/webservices, we use a unit testing framework for C written in it
<tobiasvl> DEA7TH: I use ruby for anything
jlast has joined #ruby
<DEA7TH> I mean, Python is common in numeric/scientific applications, and I heard networking
<canton7> and if I need to knock something up quickly, I'll use ruby
mary5030_ has joined #ruby
tvw has quit [Read error: Connection reset by peer]
<DEA7TH> C++ for systems programming and high-performance and scientific stuff
<tobiasvl> I mostly use ruby as a Perl replacement (I'm a sysadmin)
tvw has joined #ruby
<DEA7TH> PHP for web development (unfortunately)
<DEA7TH> and so on
<shevy> tobiasvl \o/
<shevy> I do everything in ruby right now
<tobiasvl> but also for web stuff (although not rails, I've used sinatra for example)
lolmaus has joined #ruby
<DEA7TH> of course everything can be done in everything, even websites in C++, but some languages have typical usages
<shevy> DEA7TH yes, all usages are covered with ruby here, not sure what else to tell you :)
<DEA7TH> and I observe that this channel has twice the amount of visitors as #RubyOnRails
<shevy> #RubyOnRails is restricted
<shevy> you must register to join
RaptorJesus has quit [Ping timeout: 240 seconds]
<tobiasvl> DEA7TH: ruby is a multi-purpose scripting language. I use it to write scripts. :)
alaibe has joined #ruby
hamakn has joined #ruby
St_Marx has quit [Ping timeout: 245 seconds]
niharvey|brb is now known as niharvey
mary5030 has quit [Ping timeout: 255 seconds]
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marcux has quit [Quit: marcux]
<DEA7TH> canton7: general blue?
<DEA7TH> oops misread
<DEA7TH> a nvm
marcux has joined #ruby
crystal77 has joined #ruby
marcux has quit [Client Quit]
francisfish has quit [Remote host closed the connection]
<shevy> DEA7TH I would assume you would get just about the same answer on #python and #perl
jonno11 has joined #ruby
jollyy has joined #ruby
newUser1234 has joined #ruby
clamstar has joined #ruby
<DEA7TH> I know every language can be used for everything, but some *tend* to be used for specific things - I'm not commenting on whether they are good at those things
reset has quit [Ping timeout: 255 seconds]
meatherly has joined #ruby
<DEA7TH> although most of the time they should be decent
<tobiasvl> DEA7TH: and ruby tends to be used with rails. there's no denying that. what are you actually wondering about?
Morkel_ has joined #ruby
Morkel has quit [Ping timeout: 240 seconds]
Morkel_ is now known as Morkel
<elisarver> DEA7TH: I use ruby to build test automation using selenium and cucumber
<DEA7TH> tobiasvl: my question was about other usages of Ruby, if there are some not mentioned already
<elisarver> DEA7TH: we also use it to process xml from one system's format to another, filling in the missing information via atom queries
<shevy> DEA7TH languages that are catered towards a specific usage domain are often having a very bad design
<elisarver> DEA7TH: and of course there's puppet
<shevy> DEA7TH like php
francisfish has joined #ruby
<elisarver> DEA7TH: and vagrant
jonmorehouse has joined #ruby
<DEA7TH> but I suppose there are no specific fields for Ruby? except for web dev, I mean
<shevy> DEA7TH rails didn't exist when I started with ruby, ruby is really for most everything a better variant of perl in my opinion
<shevy> why you keep on writing "web dev" :P
<DEA7TH> shevy: because obviously Ruby is famous for Rails - even if it didn't start that way, right now Rails is a big subset of Ruby's usages
<shevy> aha
<shevy> well I use ruby since 10 years without rails still
flowerpot has joined #ruby
phutchins has quit [Ping timeout: 240 seconds]
yalue has joined #ruby
<shevy> the specific field is - general purpose. Everything. Glue.
<shevy> specific field of php is: too awful to use aside from web
<elisarver> I've never used rails beside trying to learn it years ago. I should give it a go now that I more deeply understand the underlying language
<shevy> obviously where scripting languages would fail is competing for speed against C-like languages
toretore has joined #ruby
<DEA7TH> I wouldn't use PHP even for web ^^
JacobHayes has quit [Remote host closed the connection]
<shevy> (or if they have an awful design, like php, then they fail in itself)
<shevy> TIOBE says php is better than ruby!
osxorgate has quit [Remote host closed the connection]
<shevy> ruby dropped 6 ranks in one year!!!
<DEA7TH> actually popularity is a useful property
jonmorehouse has quit [Ping timeout: 240 seconds]
<shevy> I estimate ruby lost 20% devs in a year according to TIOBE
<gr33n7007h> canton7-mac, Is there away to get the output sane?
banister has joined #ruby
codabrink has joined #ruby
banister has quit [Max SendQ exceeded]
<chichou> It's really hard to find ruby dev :)
<shevy> possibly
SolarSailor has joined #ruby
<DEA7TH> why would people move away from Ruby
<shevy> old folks often know perl, python is larger than ruby, php is used a lot for web-related stuff
<DEA7TH> growth of BigData -> less interpreted languages?
<shevy> DEA7TH I would not know but that is what TIOBE says!
Guest25829 has quit [Remote host closed the connection]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
spyderman4g63 has joined #ruby
<shevy> DEA7TH nah, you will rarely see clusters use just one language, they tend to use multiple languages at the same time
Bumptious has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 0.4.3]
<DEA7TH> growth of VB.NET according to TIOBE? it could be that it's just growth of developers then
spyderman4g63 has quit [Client Quit]
Bumptious has joined #ruby
banister has joined #ruby
<chichou> DEA7TH: they don't move away from, just that less people learn ruby than learn php
<DEA7TH> perhaps development used to be done by a more selective part of the population
chrisseaton has joined #ruby
banister has quit [Max SendQ exceeded]
<canton7-mac> gr33n7007h, either use some locks, or get all threads to post their messages back to a single thread (could be the main thread), which prints them
<DEA7TH> oh well, at least Scala has a bright future :)
banister has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
banister has quit [Max SendQ exceeded]
cj3kim has quit [Ping timeout: 255 seconds]
nari has joined #ruby
<elisarver> DEA7TH: except grumbling that jdk 8 will kill it with incompatiblities :(
banister has joined #ruby
Celm has joined #ruby
banister has quit [Max SendQ exceeded]
<gr33n7007h> canton7-mac, I'll lookup locks on ruby website thanks
<chichou> Go is #36, behind COBOL on TIOBE :D
rvraghav93 has joined #ruby
carraroj has quit [Ping timeout: 268 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<elisarver> and I disregard TIOBE, since it's mainly a measure of people trying to get *help* in a language (based on searches of forum community size, number of (potentially stupid) topics posted, etc.)
banister has joined #ruby
<DEA7TH> yeah TIOBE is weird for some things
tkuchiki has joined #ruby
momomomomo has quit [Remote host closed the connection]
<DEA7TH> and VB is like #7? it's not even maintained for more than a decade now
<shevy> hehe
<shevy> but there are still people making money with it!
St_Marx has joined #ruby
simono has quit [Ping timeout: 268 seconds]
linuxthefish has joined #ruby
<linuxthefish> why ruby broken? :(
flowerpot has quit [Quit: leaving]
carraroj has joined #ruby
<linuxthefish> /usr/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require': no such file to load -- json (LoadError)
<chichou> 1.8 ?
cpruitt has joined #ruby
viscera has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
<shevy> linuxthefish works fine here
<shevy> >> require 'json'
AlexRussia has joined #ruby
dyoko1 has joined #ruby
davy_ has joined #ruby
<eval-in> shevy => (https://eval.in/131257)
kennym has quit [Quit: Leaving.]
CreativeEmbassy has joined #ruby
dyoko has quit [Quit: Leaving.]
Celm has quit [Ping timeout: 265 seconds]
tvw has quit []
momomomomo has joined #ruby
<shevy> that bot is weird
<linuxthefish> shevy :S
<linuxthefish> >> require 'json'
<eval-in> linuxthefish => (https://eval.in/131259)
mary5030_ has quit [Remote host closed the connection]
<linuxthefish> -bash: require: command not found
<shevy> tried to do gem install json ?
<shevy> uhm
<shevy> bash does not know the require command
<shevy> use ruby
<gr33n7007h> is a lock a mutex?
mary5030 has joined #ruby
yfeldblum has joined #ruby
<canton7-mac> it can e
<canton7-mac> *e
<canton7-mac> *be
chris_thomson has joined #ruby
<canton7-mac> typing fail
<shevy> hehe
<linuxthefish> mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
<linuxthefish> :/
<linuxthefish> tried that before
Xiti` has quit [Quit: Leaving]
freerobby has joined #ruby
freerobby has quit [Client Quit]
<chichou> maybe your ruby installation is broken
Xiti has joined #ruby
<linuxthefish> it's blank CentOS so i think bug :S
<shevy> huh
andrewlio has joined #ruby
xIzIv has joined #ruby
<shevy> mkmf is part of default ruby
<linuxthefish> i tried on another server and that just install old version and won't compile
monkegjinni has quit [Remote host closed the connection]
<shevy> so thank your distribution for being so awesome ;P
davy_ has quit [Ping timeout: 268 seconds]
dyoko1 has quit [Ping timeout: 268 seconds]
sigurding has quit [Quit: sigurding]
<linuxthefish> i've installed rubygem-mkrf-0.2.3-5.el6.noarch and still no :S
andrewlio has quit [Client Quit]
<linuxthefish> and it won't compile from source
RowdyChild|Away is now known as RowdyChildren
<linuxthefish> well it compiles fine but ruby -v dosn't do anything :/
snath has quit [Ping timeout: 240 seconds]
banister is now known as banisterfiend
simono has joined #ruby
viscera has quit [Quit: viscera]
CorySimmons has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
monkegjinni has joined #ruby
<linuxthefish> yey fix :D
pwh has joined #ruby
deg- has joined #ruby
<shevy> you got some broken system there man
mary5030_ has joined #ruby
alexju has joined #ruby
sailias has joined #ruby
<linuxthefish> nah it's fine now it was put in /usr/local/bin/ruby -_-
Seldan has quit [Quit: leaving]
<linuxthefish> hidden
mary5030 has quit [Ping timeout: 252 seconds]
maximski has quit []
alexju has quit [Remote host closed the connection]
<linuxthefish> is there gem command to install most common ones?
<linuxthefish> now :/
<linuxthefish> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- zlib (LoadError)
<tobiasvl> gem install zlib
axeman__ has quit [Remote host closed the connection]
chris_thomson has quit [Quit: Zzz...]
<linuxthefish> lol
<linuxthefish> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- zlib (LoadError)
<linuxthefish> wait i fix
lenoxe has joined #ruby
<lenoxe> hello all
dyoko has joined #ruby
<lenoxe> ./join #ruby-lang
andikr has joined #ruby
deryl has quit [Ping timeout: 240 seconds]
sk87 has joined #ruby
jamto11 has joined #ruby
<shevy> lol
<lenoxe> sorry
<lenoxe> morning
<shevy> linuxthefish zlib bindings are in ruby source tarball in ext/zlib directory
<lenoxe> i need coffee
<linuxthefish> yeah i've done that shevy :(
<shevy> linuxthefish your distribution did not provide you with that, which is typical
<linuxthefish> "/usr/bin/ld: cannot find -lzdll" in the make file error log though
ce_afk is now known as cescalante
<shevy> what is zdll
<shevy> sounds like windows
paulfm has joined #ruby
pontiki has quit [Ping timeout: 240 seconds]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phantummm has joined #ruby
TheDick has joined #ruby
cescalante is now known as ce_afk
jaywastaken has joined #ruby
kukyakya has joined #ruby
JacobHayes has joined #ruby
jaywastaken has quit [Client Quit]
rylev has joined #ruby
RowdyChildren is now known as RowdyChild|Away
<linuxthefish> shevy what OS do you use? :(
jaywastaken has joined #ruby
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
linuxthefish has quit [Remote host closed the connection]
Xeago has joined #ruby
linuxthefish has joined #ruby
<shevy> linuxthefish linux, originally slackware but about 98% is self compiled
<j416> is !! as a boolean caster considered good or bad practice?
<linuxthefish> o
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
linuxthefish has quit [Changing host]
linuxthefish has joined #ruby
nisstyre has joined #ruby
<toretore> j416: depends
<shevy> j416 I only use !
monkegjinni has quit [Remote host closed the connection]
<canton7-mac> I haven't seen a good argument for that since pre-stdbool C :P
<shevy> >> x = true; x = !x; x
<eval-in> shevy => false (https://eval.in/131271)
<canton7-mac> >> !!"hello"
<eval-in> canton7-mac => /tmp/execpad-8dc5a507cbaf/source-8dc5a507cbaf:2: warning: string literal in condition ... (https://eval.in/131272)
rylev has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
danshultz has quit [Remote host closed the connection]
<canton7-mac> >>s = "hello"; !!s
<eval-in> canton7-mac => true (https://eval.in/131273)
AlexRussia has joined #ruby
<DEA7TH> what's the difference between this channel and #ruby-lang?
<toretore> ruby-lang is better
danshultz has joined #ruby
cj3kim has joined #ruby
<canton7-mac> j416, so yeah, if you can show me a use-case for !! in ruby, I bet I can show you a better alternative ;)
<j416> use case being e.g. when defining an ? method (say, def valid?) and whatever checks things in it returns nil or not nil
danshultz has quit [Remote host closed the connection]
atno has joined #ruby
<toretore> j416: personally, i use !! on ? methods
danshultz has joined #ruby
<toretore> i expect one to return true or false
rurban has quit [Ping timeout: 240 seconds]
<canton7-mac> if it's a ? method which returns a bool, why use !! at all?
<j416> canton7-mac: inside it.
<toretore> yes, in
<canton7-mac> ah, makes more sense
<banisterfiend> canton7-mac you're against !! ? y?
hemanth has quit [Remote host closed the connection]
<toretore> connection.open? #=> <#Connection::Channel 0x54e54e43w>
IceDragon has joined #ruby
<toretore> connection.open? #=> true
<shevy> box.open? #=> "Yes."
chrisseaton has quit []
<j416> shevy: lol
<canton7-mac> say with that connection.open? inside the definition of open? you might have '!!@connection'. why not have '!@connection.nil?' or '@connection != nil' ?
<toretore> cat.dead? #=> both
<shevy> lol toretore
<j416> this is a real use-case
mary5030_ has quit [Remote host closed the connection]
<j416> def exists?(something_id)
<j416> !!@db.exec(<<-SQL, [something_id]) { true }
<j416> SELECT 1 FROM something WHERE something_id = $1::int
<j416> SQL
<j416> end
<toretore> eyy
<j416> blergh, indentation failed, but you see.
<canton7-mac> j416, so you're expecting that to return nl, or something else?
<canton7-mac> *nil
<shevy> man
<shevy> today is typing fail day
<canton7-mac> :P
mary5030 has joined #ruby
<j416> canton7-mac: it's a ? method, so expected to return true or false, nothing else
chrisseaton has joined #ruby
<shevy> I want to return either nl or tre
<shevy> or perhaps flse
<canton7-mac> j416, sorry, mistype. you're expecting @db.exec to return somethign that is either nil, or some object?
sambao21 has joined #ruby
<j416> canton7-mac: @db.exec returns true or nil
chichou has quit [Remote host closed the connection]
<j416> sorry
<shevy> hmm
<toretore> j416: your use of !! is fine
kevind has joined #ruby
<toretore> i do it like that too, and i am perfect
<canton7-mac> j416, ouch :P yeah, it is fine. personally I'd check using .nil? or == nil
<shevy> j416 you don't like !! ?
wm3|lunch has quit [Ping timeout: 240 seconds]
<maasha> !!!!
<canton7-mac> in languages where lots of things are falsy, !! makes more sense - it will turn an emptystring, emptyarray, emptyhash, 0, 0.0, etc, into false. in ruby that isn't the case
<toretore> the reason people sometimes don't like !! is because of people not understanding what it does and just slapping it on expressions everywhere
vasilakisFiL has joined #ruby
<canton7-mac> the only things it'll turn into false are false and nil. the false is pointless, and the nil you might as well just check yourself
<j416> canton7-mac: but it'd be != nil
freezey has joined #ruby
<j416> shevy: I don't dislike it, I think it looks rather elegant
<canton7-mac> j416, and !....nil?, yes
<vasilakisFiL> hey do you have any better alternative for this boilcode? Imagine that I had 1000 such values.... https://gist.github.com/vasilakisfil/35077a16c1f7a68c8249 (the json comes frome an external API that's the reason of CamelCase)
<j416> shevy: just wondering if it's generally seen as good or bad practice
Soda has quit [Read error: Connection reset by peer]
duggiefresh has joined #ruby
<shevy> ok so we use !! in ruby to get back either true or false in a reliable way?
<toretore> vasilakisFiL: why are you putting them in instance variables?
<canton7-mac> in pre-stdbool C it's really important. it'll turn a value that's >1 into one that's == 1, and a bool value that's >1 is full of potential subtle bugs
<j416> shevy: that's .. how I use it
mary5030 has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
<linuxthefish> Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
<toretore> vasilakisFiL: gist the whole file plz
<linuxthefish> i've installed openssl, how to rebuild?
<canton7-mac> but in ruby the only thing that there's any point in using it on is nil, and imo just checking for nil is cleaner and more obvious :P
descala has quit [Ping timeout: 264 seconds]
<j416> vasilakisFiL: you could just store the hash as-is, or you could if you want loop through the keys you need and assign using meta
<toretore> linuxthefish: how did you install it?
freezey_ has joined #ruby
<linuxthefish> compiled from source :D
<linuxthefish> i tried recompile but no :/
<toretore> then re-compile
<toretore> oh
JacobHayes has quit [Remote host closed the connection]
aagdbl has quit [Quit: This computer has gone to sleep]
<j416> canton7-mac: !@db.exec(<<-SQL, [something_id]) { true }.nil?
<linuxthefish> how do i remove old?
<j416> canton7-mac: do you think that is better?
<toretore> i don't know if there's a make uninstall, but try
rm_ has joined #ruby
chrisseaton has quit []
<toretore> linuxthefish: also, you should consider using something like rbenv, it's much cleaner
<canton7-mac> j416, personally, yeah, but it's up to you
<linuxthefish> i can't, not allowed :(
<toretore> why not?
<j416> canton7-mac: thanks.
freerobby has joined #ruby
<j416> canton7-mac: to me, !! is more readable. perhaps because I've gotten used to it.
<vasilakisFiL> toretore this is an initialization of an ActiveRecord model without database.. https://gist.github.com/vasilakisfil/35077a16c1f7a68c8249
<j416> thanks for all the input! :)
monkegjinni has joined #ruby
<toretore> linuxthefish: you're allowed to install ruby globally, but not install it in your ~?
freezey has quit [Ping timeout: 268 seconds]
hemanth has joined #ruby
kennym has joined #ruby
chrisseaton has joined #ruby
<toretore> vasilakisFiL: look up which method is used to get an attribute
crystal77 has joined #ruby
<toretore> instead of just calling a method
<toretore> like []
<toretore> then override that to look it up in the json
<linuxthefish> rm -rf /usr/bin/ruby /usr/lib/ruby /usr/local/bin/ruby /usr/local/lib/ruby
<linuxthefish> this deletes?
phantummm has quit [Quit: phantummm]
agarie has joined #ruby
elioat has joined #ruby
Vovko has joined #ruby
<toretore> vasilakisFiL: use ActiveModel::AttributeMethods
<toretore> i can't link to it because of some js bs
<toretore> but it lets you define an `attributes` method
freerobby has quit [Ping timeout: 240 seconds]
rylev has joined #ruby
mary5030 has joined #ruby
<vasilakisFiL> aha ok thanks !
mary5030 has quit [Remote host closed the connection]
linuxthefish has quit [Remote host closed the connection]
jarray52 has joined #ruby
linuxthefish has joined #ruby
mary5030 has joined #ruby
thesheff17 has quit [Remote host closed the connection]
reset has joined #ruby
JohnBat26 has quit [Read error: Operation timed out]
dx7 has joined #ruby
jonmorehouse has joined #ruby
andikr has quit [Remote host closed the connection]
roolo has joined #ruby
randomnick_ has joined #ruby
sandstrom has quit [Remote host closed the connection]
afreidah1 has joined #ruby
dx7 has quit [Remote host closed the connection]
brain_shim has quit [Remote host closed the connection]
vim_shim_ has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
nooteh has joined #ruby
rylev has quit [Ping timeout: 268 seconds]
dx7 has joined #ruby
garndt has joined #ruby
ndrei has quit [Ping timeout: 268 seconds]
LiohAu has joined #ruby
CorySimmons has quit [Quit: Bye!]
banisterfiend has quit [Read error: Connection reset by peer]
<nooteh> hi there, I'd like to ask if one of you has some experience with http://ruboto.org. I'm thinking of using it for one app
banister has joined #ruby
banister has quit [Max SendQ exceeded]
phantummm has joined #ruby
ffranz has joined #ruby
<shevy> linuxthefish there may be some more "binaries" in /usr/bin like irb ri rdoc
marr has quit [Ping timeout: 240 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<shevy> linuxthefish if you compile from source with the --prefix=/usr then it should not matter, as already existing files will be "overwritten" when you do make install
Mon_Ouie has quit [Ping timeout: 240 seconds]
jonmorehouse has quit [Ping timeout: 240 seconds]
reset has quit [Ping timeout: 240 seconds]
<linuxthefish> i'm trying with some rvm thing
monkegjinni has quit [Remote host closed the connection]
<linuxthefish> hopefully...
banister has joined #ruby
chipotle has joined #ruby
<toretore> linuxthefish: not rvm
<toretore> use rbenv or that other thing
<toretore> chruby
chichou has joined #ruby
<shevy> ack
xardas has quit [Remote host closed the connection]
dx7_ has joined #ruby
<shevy> come on man, use the source: wget ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.bz2
rvraghav93 has quit [Read error: Operation timed out]
elisarve1 has joined #ruby
pu22l3r has joined #ruby
Solnse has joined #ruby
elisarver has quit [Read error: Connection reset by peer]
Solnse has quit [Remote host closed the connection]
Solnse has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
dx7 has quit [Ping timeout: 268 seconds]
linuxthefish has quit [Remote host closed the connection]
banister has quit [Ping timeout: 240 seconds]
linuxthefish has joined #ruby
linuxthefish has quit [Changing host]
linuxthefish has joined #ruby
elisarve1 has quit [Ping timeout: 255 seconds]
<linuxthefish> yey, compile from source worked for one server :D
phutchins has joined #ruby
browndawg has left #ruby [#ruby]
chipotle has quit [Quit: cya]
chipotle has joined #ruby
chipotle has quit [Max SendQ exceeded]
jeregrine has joined #ruby
chipotle has joined #ruby
pu22l3r has quit [Ping timeout: 240 seconds]
chipotle has quit [Max SendQ exceeded]
<shevy> really?
stevenliang has joined #ruby
<shevy> what does ruby -v say there
oo_ has joined #ruby
<stevenliang> hi, everyone. have you installed rubydns?
phantummm has quit [Quit: phantummm]
angusigu1ss has joined #ruby
Celm has joined #ruby
<stevenliang> on centos 6
rails426 has joined #ruby
shaileshg has quit [Quit: Connection closed for inactivity]
<stevenliang> from rubydns installation doc, it need to rum "gem", "bundle", and etc.
robbyoconnor has quit [Read error: Operation timed out]
<stevenliang> my question is how to prepare ruby env for rubydns? thank you.
benzrf has joined #ruby
<benzrf> hows it goin ruby people
snath has joined #ruby
<benzrf> im thinkin of finally picking up rails426
<benzrf> *rails
linuxthefish has quit [Remote host closed the connection]
<benzrf> ¬_¬
banister has joined #ruby
davy_ has joined #ruby
<benzrf> i finally read up on what REST is exactly and it sounds like a pretty good set of guidelines
Celm has quit [Ping timeout: 265 seconds]
<shevy> what is REST benzrf
<benzrf> so i think i get how rails could use MVC to accomplish that
<DouweM> benzrf: nice
<benzrf> shevy: it is a set of rules and ideas about how to design APIs
<benzrf> and other kinds of interfaces i guess??
<rails426> benzrf you picking me up?
nateberkopec has joined #ruby
<benzrf> rails426: of course i am
<shevy> lol
angusigu1ss has quit [Ping timeout: 268 seconds]
<shevy> rails426 he often mis-tab-completes on IRC
<benzrf> >tfw tab compleatang
<shevy> I am trying to have him fall into stupid work-nicks
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dik_dak has joined #ruby
ndrst has joined #ruby
<shevy> but he is much more creative than I am
yfeldblum has joined #ruby
elioat has quit [Ping timeout: 268 seconds]
zachallett has joined #ruby
<benzrf> shevy: can u into REST
maasha has quit [Quit: Page closed]
francisfish has quit [Remote host closed the connection]
<benzrf> anyway now that i understand how to design things in a RESTful manner i get why MVC is a good approach for that o=
* benzrf has turned into a buzzword spout
<benzrf> :(
claymore has joined #ruby
rvraghav93 has joined #ruby
<benzrf> any day now im gonna start using a macbook and spending all my time in starbucks
<benzrf> noooooo
davy_ has quit [Ping timeout: 268 seconds]
mansi has joined #ruby
monkegjinni has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
francisfish has joined #ruby
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblum has quit [Ping timeout: 265 seconds]
xcv has joined #ruby
Kricir has joined #ruby
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
AlexRussia has joined #ruby
poikon has joined #ruby
mengu has quit [Remote host closed the connection]
ffranz has quit [Quit: Leaving]
freerobby has joined #ruby
<DouweM> benzrf: :D
tagrudev has quit [Remote host closed the connection]
<benzrf> whut is happen
aganov has quit [Remote host closed the connection]
thesheff17_ has joined #ruby
<benzrf> im too hipster to be this mainstream hipster
<benzrf> =[
thesheff17_ has quit [Read error: Connection reset by peer]
thesheff17 has joined #ruby
<benzrf> DouweM: try quick god daddit
<benzrf> it will like
<benzrf> EXPLODE UR MindfulMonk
<benzrf> *mind
<DouweM> nah I've got shit to do and I don't feel like spending hours to fail to install fuse :P
<benzrf> ur loss dude
<benzrf> [so much loss omg]
<DouweM> I know
soulkey has joined #ruby
thesheff17 has left #ruby [#ruby]
<soulkey> Hi I wondered if someone with experience with Omniauth could help out or point me in the right direction for a channel. Lets say I've gone to a URL auth/developer?foo=bar can i get the callback to include foo in params on return?
ffranz has joined #ruby
poikon_ has quit [Ping timeout: 268 seconds]
<DouweM> benzrf: screencast of mindblowing stuff you've added? :P
<benzrf> um
<benzrf> -.-
<benzrf> hold on o-o
stevenliang has quit [Quit: Leaving]
freerobby has quit [Ping timeout: 240 seconds]
<benzrf> DouweM: basically just now u can use a regular command instead of putting in code
<benzrf> >.<
<benzrf> DouweM: remind me what ive showed u so farn
<benzrf> *far
<DouweM> ah yeah you mentioned
<DouweM> noice
<benzrf> hold on i will do a thing
<DouweM> just that you can add/edit files with a couple ofm ethods that'll be loaded into the repl automatically
<benzrf> kk
<benzrf> 1 sec
<benzrf> o=
Nukepuppy has joined #ruby
<DouweM> =o
<Nukepuppy> anyone have a good suggestion on porting all my gem versions to another desktop? can i just make a Gemfile for all my gems and versions?
sigurding has joined #ruby
simoz111 has joined #ruby
descala has joined #ruby
Lewix has quit [Remote host closed the connection]
rayners has joined #ruby
elisarver has joined #ruby
<benzrf> DouweM: made a short recording of its use
<benzrf> let me upload it, 1 sec
willb1 has quit [Ping timeout: 240 seconds]
<benzrf> ah man it's in the middle of outputting
<benzrf> -.-
enebo has joined #ruby
<DouweM> hehe
danshultz has quit [Remote host closed the connection]
thesheff17_ has joined #ruby
danshultz has joined #ruby
ruby-newbie has joined #ruby
<ruby-newbie> hello
lenoxe has quit [Ping timeout: 245 seconds]
Aquilo has quit [Ping timeout: 240 seconds]
<ruby-newbie> Time#to_i returns seconds from 1970-01-01 00:00:00-00 right?
browndawg has joined #ruby
<Jamo> I think so
SolarSailor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zachallett has quit [Remote host closed the connection]
willb1 has joined #ruby
<Jamo> Iv been using (Time.now.to_f*1000).to_i to get it in milliseconds, and then its same as Javas timeInMillis()
ruby-newbie has quit [Client Quit]
zachallett has joined #ruby
kith has quit [Ping timeout: 240 seconds]
danshultz has quit [Ping timeout: 240 seconds]
<benzrf> oh fuck whats wrong with the output o-o
<benzrf> god dammit
oo_ has quit [Remote host closed the connection]
<benzrf> gluh
danshultz has joined #ruby
Solnse has quit [Remote host closed the connection]
<benzrf> D:
sigurding has quit [Ping timeout: 268 seconds]
ixti has quit [Ping timeout: 268 seconds]
spyderman4g63 has joined #ruby
sigurding has joined #ruby
greggroth has joined #ruby
<sigurding> sorry, back again. anyone has an idea suggestion?
thesheff17_ has quit [Quit: Leaving]
maroloccio has quit [Quit: WeeChat 0.4.3]
monkegjinni has quit [Remote host closed the connection]
<benzrf> sigurding: for what again?
<DouweM> benzrf: how about uploading a working vid
jottr has joined #ruby
Solnse has joined #ruby
<sigurding> benzrf: for my previous question. I just repeat it: is there any option to build a pluggable (extendable) Optionsparser. Based on the include via require, I want to output all options
rayners has quit [Remote host closed the connection]
freezey_ has quit [Remote host closed the connection]
jonmorehouse has joined #ruby
<benzrf> there we go
<benzrf> sigurding: why not us an existing framework like slop or thor
andy__ has joined #ruby
parduse has quit []
spyderman4g63 has quit [Remote host closed the connection]
jerius has joined #ruby
<soahccc> sigurding: what's wrong with the stdlib optparse? Not sure what you mean with pluggable
spyderman4g63 has joined #ruby
bal has quit [Quit: bal]
rylev has joined #ruby
<sigurding> soahccc: the problem I have is: I have standard set of optparses
<sigurding> but I want to be able to require mylib.rb, and therein define additional optparser, which should be automatically wired into the standard set
<benzrf> aw wait wtf
parduse has joined #ruby
<benzrf> it froze near the end >:o
<benzrf> DouweM: would u like just the typescript/timings without a fancy website to host e
<benzrf> m
jonmorehouse has quit [Ping timeout: 240 seconds]
pontiki has joined #ruby
chipotle has joined #ruby
<DouweM> yeah it froze, but even what I've seen is pretty fucking awesome
atno has quit [Remote host closed the connection]
<DouweM> yeah sure, gimme the script
<soahccc> sigurding: well you can extend it if you initiate the optparse in a singleton and parse it after all plugins are loaded/registered
<benzrf> :-)
<benzrf> 1 sec
ndrei has joined #ruby
<sigurding> soahccc: the next thing I am struggeling with is, that I need some params to be required
Soda has joined #ruby
<soahccc> sigurding: if you define an option twice it overrides the old one though
<sigurding> which seems to the next pretty difficult task
bilbo_swaggins has joined #ruby
<benzrf> DouweM: let me just add them to my repo
nooteh has quit [Quit: Leaving.]
<benzrf> then u can just dl em from github
<benzrf> :u
spyderma_ has joined #ruby
<soahccc> sigurding: optparse supports required options
reset has joined #ruby
lmickh has joined #ruby
spyderma_ has quit [Remote host closed the connection]
ixti has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
TheDick has quit [Quit: TheDick]
<soahccc> sigurding: well not really required options but that the option requires a value but it's not hard to check
<sigurding> soahccc: hm
spyderma_ has joined #ruby
spyderma_ has quit [Remote host closed the connection]
spyderman4g63 has quit [Ping timeout: 240 seconds]
rylev has quit [Ping timeout: 240 seconds]
<sigurding> soahccc: I found myself having some trouble with it today
spyderman4g63 has joined #ruby
<benzrf> DouweM: kk it's up
<soahccc> sigurding: after parse! your ARGV still includes non option arguments if you want to use these
JacobHayes has joined #ruby
rayners has joined #ruby
<benzrf> DouweM: fun fact i discovered the other day btw
horrorvacui has joined #ruby
<benzrf> DouweM: if you pipe scriptreplay into netcat you can serve scripts over netcat connections
<benzrf> =D
newUser1234 has quit [Remote host closed the connection]
<benzrf> DouweM: just have the other person 'nc -l 9001', then 'scriptreplay whatever -ttiming | nc their_ip 9001'
Beoran has left #ruby ["Leaving"]
dumdedum has quit [Quit: foo]
<benzrf> \o/
DrShoggoth has joined #ruby
<sigurding> soahccc: what do you think of highline?
arietis has quit [Quit: Computer has gone to sleep.]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
tulak has quit [Quit: Leaving.]
reset has quit [Ping timeout: 240 seconds]
<DouweM> benzrf: ha, cool
dumdedum has joined #ruby
chuk_ has joined #ruby
zz_jrhorn424 is now known as jrhorn424
WillAmes has quit [Read error: Operation timed out]
<DouweM> benzrf: cool demo man. I have no idea when this would be useful, but it's a cool PoC
fijimunkii has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
Akuma has quit [Read error: Operation timed out]
St_Marx has joined #ruby
jorts has joined #ruby
<DouweM> benzrf: but I hate you for using tabs for indentation
<benzrf> =p
<benzrf> DouweM: i was thinking use it as a dev env for working on normal ruby projects
taf2 has quit [Quit: taf2]
Akuma has joined #ruby
fabrice31 has quit [Remote host closed the connection]
greggroth has quit [Read error: Connection reset by peer]
arubincloud has joined #ruby
<benzrf> DouweM: whenever youre doing codes, you boot up quick and require your existing project
tulak has joined #ruby
greggroth has joined #ruby
<benzrf> DouweM: you write some more code in a live env
<benzrf> then when its working right you copy the code back to your static project dir
<benzrf> ima add dmtcp integration also so that you can freeze and thaw sessions if you need to pause work
<DouweM> yeah, that could be useful
sk87 has joined #ruby
<benzrf> :-)
<benzrf> ive heard rumors that emacs already has something like this
<benzrf> ignore them
<DouweM> now figure out a way to automate the "copy back into static project" step :P
<benzrf> it's probably horribly buggy and in alpha or something
<DouweM> hehe
* benzrf coughs
<DouweM> :)
<benzrf> DouweM: i can probs do that
<benzrf> do 'quick export <other dir>' and it sticks your code files into 'class ::Foo' wrappers, then copies them to <other dir>
<benzrf> or something along those lines
kitak has quit [Remote host closed the connection]
kith has joined #ruby
tulak has quit [Client Quit]
kitak has joined #ruby
<DouweM> I can't really envision a perfect way of automatic exporting .you probably want those new methods etc in a logical place in your current class file
andikr has joined #ruby
<benzrf> yeah
<shevy> <benzrf> EXPLODE UR MindfulMonk
<shevy> lol
<benzrf> it already depends on ruby_parser to validate that you arent trying to smuggle non-method-def code into a class tho
toastynerd has joined #ruby
mrbrdo has joined #ruby
<mrbrdo> gotta hate rounding errors :) https://gist.github.com/mrbrdo/9956281
<benzrf> so maybe i can have it scan ur project dir for equivalent classdefs
<benzrf> and insert in
<DouweM> benzrf: ah!
* benzrf shrugs
banister_ has joined #ruby
nooteh has joined #ruby
ValicekB has quit []
<DouweM> benzrf: yeah you could, although there'll always be the manual "move to right place in classdef" step
<benzrf> maybe have it glom onto certain comment formats
<DouweM> ew
baniste__ has joined #ruby
<benzrf> >.>
kitak has quit [Remote host closed the connection]
<benzrf> leave a comment like '# @quick' and it puts new method defs above it
karmatr0n has joined #ruby
<DouweM> meh, the methods will probably be at different places in the file
<benzrf> hmm
kitak has joined #ruby
<kith> guys is there a faster snmp lib than that: http://rubygems.org/gems/snmp/
<kith> in particular the snmpwalk
<DouweM> you can just add 'm in at the start, end or whatever, and the dev can manually move them
phantummm has joined #ruby
newUser1234 has joined #ruby
jonno11 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
evenix has joined #ruby
jonno11 has quit [Max SendQ exceeded]
<benzrf> how about when you do export, it sticks files in your clipboard one by one, then it opens the correct file for you to paste em in
<benzrf> in your $EDITOR
xIzIv has left #ruby ["WeeChat 0.4.3"]
<DouweM> omg
tkuchiki has joined #ruby
<DouweM> that would be pretty much perfect
<benzrf> :D
banister has quit [Ping timeout: 240 seconds]
dx7_ has quit [Remote host closed the connection]
geggam has joined #ruby
dx7 has joined #ruby
<benzrf> mrbrdo: just use Rationals
<benzrf> :D
arietis has joined #ruby
mikepack has joined #ruby
<mrbrdo> grr :)
frem_ has joined #ruby
banister_ has quit [Ping timeout: 268 seconds]
abdulsattar has quit [Ping timeout: 255 seconds]
robbyoconnor has joined #ruby
<benzrf> >> (Rational(22, 10)..(Rational(35, 10)).step(Rational(2, 10)) { |i| puts i }
<eval-in> benzrf => /tmp/execpad-f129f2f837a9/source-f129f2f837a9:3: syntax error, unexpected keyword_rescue, expecting ')' ... (https://eval.in/131322)
<benzrf> wat
<benzrf> oh oops
<benzrf> >> (Rational(22, 10)..Rational(35, 10)).step(Rational(2, 10)) { |i| puts i }
<eval-in> benzrf => 11/5 ... (https://eval.in/131323)
<kith> why is an snmp lib with C extentions so much faster than a pure ruby one?
<benzrf> kith: because c is faster than ruby?
karmatr0n has quit [Remote host closed the connection]
<kith> its just a few strings...
<bilbo_swaggins> benzrf are you talking about Quick again?
<benzrf> bilbo_swaggins: :3
<arubincloud> >> require 'bigdecimal'; (BigDecimal.new("2.2")..BigDecimal("3.5")).step(BigDecimal.new("0.2")).each {|n| puts n}
<eval-in> arubincloud => (https://eval.in/131324)
<benzrf> bilbo_swaggins: hows it goin learning about REST
toastynerd has quit [Remote host closed the connection]
<arubincloud> Bah.
<bilbo_swaggins> The first PDF was more of a powerpoint overview and inscrutable, because it never really defined certain important things
<bilbo_swaggins> but I have Fielding's original dissertation as well
<bilbo_swaggins> I'll read that
<benzrf> bilbo_swaggins: it is p simple really
<benzrf> bilbo_swaggins: the basic idea is:
crystal77 has quit [Quit: Computer has gone to sleep.]
<benzrf> 1. your api is composed of RESOURCES
<bilbo_swaggins> it seems like it, but there was a lot of obfuscatory language
<DouweM> arubincloud: why bah?
<benzrf> each resource is at some uri
dx7 has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
<kith> i mean it seems to be worse with snmp stuff... i dont get why
<benzrf> a resource is usually either a thing or a collection of things
<benzrf> [this is REST as applied to HTTP btw]
<bilbo_swaggins> and you pass state back and forth
ValicekB has joined #ruby
<arubincloud> DouweM: Because the bot's output was not helpful in that case.
wm3|lunch has joined #ruby
<bilbo_swaggins> rather than maintaining it at any one location
<benzrf> that's a requirement to be considered RESTful
<benzrf> well not precisely
<DouweM> arubincloud: ah
<benzrf> there is no /session state/ on the server
<bilbo_swaggins> the doc never defined "resource"
<bilbo_swaggins> ah yes
<benzrf> but it's fine for resources to have state
<bilbo_swaggins> yes
<bilbo_swaggins> I realized that had to be true for a multi-user game
noop has quit [Ping timeout: 268 seconds]
<benzrf> 2. you interact with all resources using a set of universal predefined verbs
<benzrf> bilbo_swaggins: a game could be a resource :u
<benzrf> in the case of REST over HTTP, those verbs are the http verbs
<bilbo_swaggins> I'm not going to send clients secret info though
<benzrf> usually GET, POST, PUT, and DELETE
AlexRussia has quit [Read error: Connection reset by peer]
<bilbo_swaggins> it's a game for programmers, they'll hack and cheat :P
<bilbo_swaggins> so some info can't be shared
sambao21 has quit [Quit: Computer has gone to sleep.]
<benzrf> so keep it on the server
michaeldeol has joined #ruby
wm3|lunch is now known as workmad3
Es0teric has joined #ruby
<benzrf> but a /session with an application/ should not have state on the server
<benzrf> if you have a resource on the server that can be modified and updated, that's fine
<benzrf> don't keep an interaction session on the server though
<bilbo_swaggins> right
<bilbo_swaggins> makes sense
<DouweM> benzrf: PATCH ftw
<bilbo_swaggins> is there something like ActiveRecord that automatically maps class structure to URIs?
<benzrf> DouweM: fu patch is fail
AlexRussia has joined #ruby
<benzrf> bilbo_swaggins: i think that's what rails does actually
<benzrf> bilbo_swaggins: i just read about this stuff yesterday and today ;p
<DouweM> benzrf: PATCH and PUT have different semantics, via HTTP
<benzrf> w/e dude
<DouweM> hahaha
<benzrf> bilbo_swaggins: a resource can be represented in different formats
<benzrf> so return xml or html or something based on what the client asks forced_request
<benzrf> *for
<benzrf> the point is for each uri to be a resource, not a document
<benzrf> a resource is more abstractj
<benzrf> it represents some kind of thing you can deal with
r0bby has joined #ruby
<bilbo_swaggins> stop hitting tab
<bilbo_swaggins> :P
<benzrf> which may have multiple representations
<benzrf> :P
<benzrf> finally there's HATEOAS
<bilbo_swaggins> that's where the definitions eluded me
karmatr0n has joined #ruby
<bilbo_swaggins> what do you mean "multiple representations"
<benzrf> well
<benzrf> if you have some object on your server
robbyoconnor has quit [Ping timeout: 240 seconds]
<bilbo_swaggins> I understand a resource is basically an object of any kind
<benzrf> or row in a db
baniste__ has quit [Ping timeout: 268 seconds]
<bilbo_swaggins> okay
<benzrf> a representation is some kind of way of representing the abstract resource
yfeldblum has quit [Ping timeout: 265 seconds]
<benzrf> such as, as json or xml
<bilbo_swaggins> oh
<bilbo_swaggins> jeeze
<benzrf> or even html
<bilbo_swaggins> that's simple
<benzrf> yeah ;P
crystal77 has joined #ruby
<benzrf> HATEOAS is the idea that an api should behave like a state machine
<benzrf> ish
<bilbo_swaggins> I think for this project I may be better off with Sinatra and ActiveRecord than full on Rails
arietis has quit [Quit: Computer has gone to sleep.]
<bilbo_swaggins> interesting
<bilbo_swaggins> I'll wiki that
tjr9898 has quit [Remote host closed the connection]
<benzrf> bilbo_swaggins: it's p simple actually
mrnugget has quit [Quit: mrnugget]
<benzrf> bilbo_swaggins: basically each response should contain links to other resources labelled with their relationship
AlexRussia has quit [Remote host closed the connection]
<benzrf> bilbo_swaggins: i.e. actions that modify the current state
freerobby has joined #ruby
rhys has joined #ruby
<bilbo_swaggins> oh
<benzrf> bilbo_swaggins: so if you GET a resource representing a match in your game
<bilbo_swaggins> weird
<bilbo_swaggins> I never realized the web was a state machine
<benzrf> the representation should somehow indicate the URIs for related resources
banister has joined #ruby
<benzrf> and how they are related
AlexRussia has joined #ruby
<bilbo_swaggins> so the client agent can decide based on the labels
<benzrf> right
<benzrf> like how you do when browsing the web
<bilbo_swaggins> so it's really as simple as <a href=URL>label</a>
<benzrf> more or lessless
<benzrf> *less
<benzrf> it depends on your representation :-)
<bilbo_swaggins> You gonna support git integration for managing revisions of your smalltalk-VM-ish Ruby project checkpointy things? (do you have names for these concepts yet?)
<benzrf> bilbo_swaggins: maybe?
<benzrf> quick has kinda turned into more of a live dev env than a true smalltalky thing
<benzrf> :I
<bilbo_swaggins> I've never used smalltalk proper
<benzrf> ruby isnt really equipped or suited for that
<bilbo_swaggins> but I like the idea
<bilbo_swaggins> well the idea of live editing code and then *saving that revision* when it works is neat
<benzrf> download pharo
<benzrf> :-D
NovapaX has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bilbo_swaggins> don't want to learn ANOTHER language right now :P
<abstractj> benzrf I would like to be a document, please
<benzrf> {links: [{rel: 'bets', href: 'http://ur_website.com/matches/34/bets'}, {rel: 'self', href: 'http://ur_website.com/matches/34'}]}
<abstractj> :)
<benzrf> abstractj: :P
<benzrf> bilbo_swaggins: dw smalltalk is pretty similar to ruby
<benzrf> or vice versa actually
<benzrf> the actual usage is p different
<benzrf> but there are few new concepts
rails426 has quit []
spyderman4g63 has quit [Remote host closed the connection]
<benzrf> it's mostly syntactic
freerobby has quit [Ping timeout: 240 seconds]
shredding has quit [Quit: shredding]
<bilbo_swaggins> I'm sure if you were able to implement git integration you'd have a popular project
<benzrf> [and in how you structure things]
<benzrf> bilbo_swaggins: probably :P
<benzrf> that can come later >.>
spyderman4g63 has joined #ruby
<bilbo_swaggins> oh of course
<bilbo_swaggins> but now it's starting to click for me what you're really trying to do
AlexRussia has quit [Read error: Connection reset by peer]
<benzrf> =D
<benzrf> well no
<benzrf> i'm not trying to make smalltalk in ruby
<bilbo_swaggins> enlighten me
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benzrf> smalltalk is already a thing
<benzrf> im being much more conservative than that
<benzrf> im just making a live-coding environment that happens to be a bit closer to full-on smalltalk than most
AlexRussia has joined #ruby
pzula has joined #ruby
jxf has joined #ruby
<bilbo_swaggins> so why do you need FS integration?
zchrykng-work has joined #ruby
greggroth has quit [Read error: Connection reset by peer]
phantummm has quit [Quit: phantummm]
<benzrf> >that happens to be a bit closer to full-on smalltalk than most
pzula has quit [Client Quit]
<bilbo_swaggins> that's pretty vague, man
greggroth has joined #ruby
<benzrf> kk
<kith> hmmm is there a snmp lib that has C modules and supports snmpwalk? :D
rippa has joined #ruby
AlexRussia has quit [Client Quit]
<kith> only found this: https://github.com/mixtli/net-snmp but that doesnt do snmpwalk
<bilbo_swaggins> we can take this out of channel
<benzrf> more like an all-encompassing environment than an editor snap-in basically i guess
Celm has joined #ruby
<bilbo_swaggins> or I'll just observe it as it develops
<bilbo_swaggins> you seem to be here regularly
<benzrf> still intended to be more of something for working on standard ruby projects in a more useful environment
<benzrf> than a whole new way of doing things
diverdude has quit [Ping timeout: 245 seconds]
nooteh has quit [Quit: Leaving.]
nolic has joined #ruby
<benzrf> i.e. it's intended to be for work on things that end up as gems or whatever
JasmeetQA has quit [Read error: Connection reset by peer]
<benzrf> not fully image-based
spyderman4g63 has quit [Ping timeout: 240 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<bilbo_swaggins> I guess I could use git on top of it myself
ndrei has quit [Ping timeout: 268 seconds]
<benzrf> perhaps
<bilbo_swaggins> and it would still have things going for it
<benzrf> feel free to fork it :P
<benzrf> there's not a whole ton of code in there atm
sk87 has joined #ruby
freezey has joined #ruby
nooteh has joined #ruby
spyderman4g63 has joined #ruby
<benzrf> sloccount says:
<benzrf> Total Physical Source Lines of Code (SLOC) = 435
<bilbo_swaggins> well I've got my own projects for now
Emmanuel_Chanel has joined #ruby
<benzrf> it also says:
<benzrf> Total Estimated Cost to Develop = $ 11,273
<benzrf> im getting stiffed ;-;
<bilbo_swaggins> how'd you estimate that
<benzrf> ran sloccount
greggroth has quit [Ping timeout: 240 seconds]
<benzrf> lol
jzig has joined #ruby
michaeldeol has joined #ruby
r0bby has quit [Ping timeout: 240 seconds]
jerius has quit [Quit: Computer has gone to sleep.]
tylersmith has joined #ruby
ndrei has joined #ruby
jerius has joined #ruby
relix_ has joined #ruby
simoz111 has quit [Ping timeout: 240 seconds]
CreativeEmbassy has quit [Quit: FO SHO]
zachallett has quit [Remote host closed the connection]
enebo has quit [Read error: Connection reset by peer]
relix has quit [Ping timeout: 268 seconds]
<benzrf> bbiab
benzrf has quit [Quit: leaving]
spyderma_ has joined #ruby
apeiros has quit [Remote host closed the connection]
newUser1234 has quit [Remote host closed the connection]
sski has joined #ruby
apeiros has joined #ruby
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
hermanmu_ has quit [Remote host closed the connection]
Squarepy has joined #ruby
platzhirsch has joined #ruby
doodlehaus has joined #ruby
* platzhirsch roars
<platzhirsch> What's up people of the sun
hermanmunster has joined #ruby
mrmargolis has joined #ruby
linuxer1 has quit [Quit: linuxer1]
jrhorn424 is now known as zz_jrhorn424
spyderman4g63 has quit [Ping timeout: 268 seconds]
dstynchula has joined #ruby
larissa has joined #ruby
banister has quit [Read error: Connection reset by peer]
ebwise has joined #ruby
banister has joined #ruby
davy_ has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
poikon_ has joined #ruby
ce_afk is now known as cescalante
bilbo_swaggins has quit [Quit: Leaving]
poikon has quit [Ping timeout: 240 seconds]
JBreit has joined #ruby
<shevy> we are busy writing ruby code
sambao21 has joined #ruby
chipotle has quit [Quit: cya]
newUser1234 has joined #ruby
<platzhirsch> good, let me join you
arubincloud has quit []
abdulsattar has joined #ruby
rylev has joined #ruby
tylersmith has quit [Remote host closed the connection]
toastynerd has joined #ruby
tylersmith has joined #ruby
JBreit has left #ruby [#ruby]
gaussblurinc has quit [Quit: Leaving.]
dagobah has quit [Quit: Leaving...]
alexju has joined #ruby
reset has joined #ruby
anarang has quit [Quit: Leaving]
sambao21 has quit [Quit: Computer has gone to sleep.]
zachallett has joined #ruby
jollyy has quit [Quit: jollyy]
<DouweM> ssh you're distracting me
larissa has quit [Quit: Leaving]
newUser1234 has quit [Remote host closed the connection]
<shevy> yeah
rylev has quit [Ping timeout: 268 seconds]
<shevy> go away platzhirsch
tylersmith has quit [Ping timeout: 252 seconds]
<shevy> are you finally in london?
<platzhirsch> NO!
<platzhirsch> oh
<platzhirsch> no
<platzhirsch> I was last week though for three days
arietis has joined #ruby
<shevy> and what did they say
s2013 has joined #ruby
<shevy> "your english is not british enough"
<platzhirsch> They said greetings Platzhirsch, let's develop rad code in two days
<shevy> ewww
sambao21 has joined #ruby
<shevy> better than "down with your pants!"
<platzhirsch> I came, I saw, I developed rad code
mr_red has quit [Ping timeout: 264 seconds]
<shevy> hehe
<shevy> that's a nice quote actually
<shevy> if caesar would have been a programmer ...
<platzhirsch> Most likely I will burn down my apartment in April to make my move to London
tjr9898 has joined #ruby
<shevy> cool
<DouweM> sounds like a great plan
<shevy> platzhirsch in the ghetto
<DouweM> lol
<platzhirsch> and then pay 15 EUR for a burger in a restaurant
<shevy> wtf
<shevy> you are kidding
reset has quit [Ping timeout: 240 seconds]
<platzhirsch> or 150 EUR for a monthly underground ticket
aspires has joined #ruby
<platzhirsch> respectively, "who I learned to ride a bike again"
<shevy> that's quite a lot but not thaaaaat much
<platzhirsch> how
heftig has quit [Quit: Quitting]
<shevy> that's 1800 euro a year
<shevy> in vienna it is ... about 400 euro a year
<platzhirsch> yeah, about the same
<shevy> but london is 4x as huge so it should be 4x as costly!!!
spyderma_ has quit [Ping timeout: 255 seconds]
<DouweM> whoa, 150/month is crazy
karmatr0n has quit []
jollyy has joined #ruby
thumpba has quit [Read error: Connection reset by peer]
<platzhirsch> I don't mind, I wawnted to became a Platzhirsch on a Bike anyway
<benzrf> mmm pizza
<platzhirsch> become
<DouweM> I like bikes
<benzrf> w/ chicken & hot sauce & bleu cheese
<benzrf> :-D
qba73 has quit []
<platzhirsch> I think these Dutch bicycles are pretty hipster stuff
thumpba has joined #ruby
<DouweM> how so
phutchin1 has joined #ruby
<DouweM> The thing is that Dutch people don't care about their bikes, so we're all riding around on pieces of crap
<DouweM> yeah because that's the prototypical Dutch male
<platzhirsch> looks, that's pretty much me
phutchins has quit [Ping timeout: 240 seconds]
<DouweM> But bikes like that are common for sure
<platzhirsch> Except that my beard, if I would start growing one, would look more like the one of a 15 yo
<DouweM> My bike has had this loud CLICK on every turn of the pedals for like 4 months but I'm not quite bothered enough to get a new one
jottr has quit [Ping timeout: 240 seconds]
duggiefresh has quit [Remote host closed the connection]
<DouweM> hehe
enebo has joined #ruby
bitglue has joined #ruby
enebo has joined #ruby
<workmad3> DouweM: you could always, I dunno, make sure your gears aren't loose or that one of the teeth isn't breaking or something... or just oil your chain!
einarj has quit [Remote host closed the connection]
<DouweM> yeah I went to the bike repair shop and they said is was beyond repair, they were surprised it was still working at all, and that I should get a new one
<DouweM> That was 3 months ago
duggiefr_ has joined #ruby
<platzhirsch> DouweM: and you should buy a new one in their shop of course
<DouweM> of course
kauto has joined #ruby
<bitglue> Given some identifier in some method somewhere, how can I go about finding where that identifier is assigned, and what it is? For example, 'backend' at https://github.com/serverspec/serverspec/blob/2d97f9d519208388454c23be82e29496c98e9c4a/lib/serverspec/type/command.rb#L7 . It doesn't appear to be a method, or assigned anywhere at all in that codebase, from what I can find.
timonv has quit [Remote host closed the connection]
RowdyChild|Away is now known as RowdyChildren
<DouweM> but seriously, getting a crappy new bike is usually cheaper than getting a good new one. and getting a good new one is stupid, because nice bikes are stolen in a week
<DouweM> eh
dumdedum has quit [Quit: foo]
<DouweM> I didn't mean to say "getting a good new one", meant "repairing your current one"
<DouweM> so yeah
spyderman4g63 has joined #ruby
jollyy has quit [Quit: jollyy]
arietis has quit [Quit: Computer has gone to sleep.]
<benzrf> vjbhyrdhjguy
<benzrf> ftgvhjkdtcf hbn\
<DouweM> are you possessed by an evil spirit?
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kauto has quit [Read error: Connection reset by peer]
jollyy has joined #ruby
afreidah1 has quit [Ping timeout: 268 seconds]
cescalante is now known as ce_afk
davy_ has quit [Remote host closed the connection]
<workmad3> DouweM: or a kitty walked over the keyboard
<workmad3> DouweM: which is an evil spirit, but probably not a possession :)
<DouweM> hehe
<benzrf> DouweM: no
NightGriffin has joined #ruby
<benzrf> DouweM: the guy sitting next to me antagonized me
<benzrf> so i retaliated
jollyy has quit [Client Quit]
<benzrf> then he mashed my kbd :[
<platzhirsch> anyone worked with highline to create a CLI?
<benzrf> platzhirsch: ive just used Thor so far
ignoch has joined #ruby
<benzrf> & only the basics
dEPy has quit [Quit: Lingo - http://www.lingoirc.com]
jollyy has joined #ruby
nooteh has quit [Quit: Leaving.]
<platzhirsch> maybe that one is better
JacobHayes has quit [Remote host closed the connection]
s2013_ has joined #ruby
<benzrf> theyre different is what they are
<benzrf> platzhirsch: thor is for subcommand and option parsing stuff
<benzrf> i believe bundler uses it
<benzrf> afaict highline is for interactive interfaces
<platzhirsch> ah ok, no I meant really a CLI
<mikecmpbll> rails uses thor too: http://rubygems.org/gems/railties
_1_chopi4453 has joined #ruby
<_1_chopi4453> ola
klaut has quit [Remote host closed the connection]
<mikecmpbll> alo
Senjai has quit [Quit: WeeChat 0.3.7]
andrewlio has joined #ruby
<_1_chopi4453> k tal
<DouweM> platzhirsch: I've heard good things about highline
s2013 has quit [Ping timeout: 240 seconds]
x1337807x has joined #ruby
<_1_chopi4453> espain
Senjai`work has joined #ruby
skammer has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<platzhirsch> DouweM: Highline is a cool DSL, but I can't get menu choices like I 3 2 working where I is the menu choice and 3 and 2 are parsed as arguments
x1337807x has quit [Max SendQ exceeded]
railzForDaiz has joined #ruby
Senjai`work has quit [Changing host]
Senjai`work has joined #ruby
Senjai`work is now known as Senjai
x1337807x has joined #ruby
papercode has joined #ruby
browndawg has left #ruby [#ruby]
x1337807x has quit [Max SendQ exceeded]
toastynerd has quit [Remote host closed the connection]
sigurding has quit [Ping timeout: 252 seconds]
RowdyChildren is now known as RowdyChild|Away
<platzhirsch> ah there is an example to build shells
vasilakisFiL has quit [Read error: Connection reset by peer]
afreidah1 has joined #ruby
<platzhirsch> maybe that's it
yfeldblum has joined #ruby
jollyy has quit [Quit: jollyy]
sigurding has joined #ruby
f0ster has joined #ruby
<shevy> DouweM hah my bike had that as well, damn crap bikes... cheap and crappy
mark_locklear has quit [Ping timeout: 240 seconds]
MatthewsFace has joined #ruby
phansch has quit [Quit: WeeChat 0.4.2]
<shevy> this whole crap minimalism for mass production is so annoying
_1_chopi4453 has quit [Remote host closed the connection]
tylersmith has joined #ruby
<DouweM> Dutch bikes aren't crap because of mass production, they're crap because they're just tools to us, and shiny tools get stolen
<benzrf> highline more like LOWline o snapcase
<benzrf> *snap
ndrei has quit [Ping timeout: 252 seconds]
<DouweM> I'm starting a petition to stop benzrfs abuse of the tab key
GaryOak_ has joined #ruby
Stalkr_ has joined #ruby
<shevy> no!
<shevy> I will counter this proposal
francisfish has quit [Remote host closed the connection]
<shevy> it provides so much entertainment on #ruby
rainmanjam has joined #ruby
<shevy> <benzrf> EXPLODE UR MindfulMonk
<workmad3> DouweM: ItSANgo__ wormwood benzrf fudanchii ignoch hermanmunster dik_dak ignoch willb1 evenix wormwood (it would be funny if he did it with every work... and sorry for the highlights everyone)
<benzrf> kek
Lewix has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.3]
<DouweM> hehe
bitglue has left #ruby [#ruby]
jobewan has joined #ruby
Xeago has quit [Remote host closed the connection]
<DouweM> shevy: yeah that one was great
jprovazn has quit [Quit: Odcházím]
<shevy> workmad3 lol
<shevy> workmad3 but it's not as funny when it is pre-planned :(
yfeldblum has quit [Ping timeout: 265 seconds]
<shevy> wow
x1337807x has joined #ruby
<shevy> we even have hermanmunster here...
<shevy> 50% are like never writing anything
Solnse has quit [Remote host closed the connection]
<DouweM> I don't recognize any of those names
<GaryOak_> just fbi bots listening in
mr_red has joined #ruby
canton7-mac has quit [Quit: Leaving]
<shevy> I think there are only a total of like 3 dozen people talking here on #ruby
dyoko1 has joined #ruby
dyoko has quit [Quit: Leaving.]
<horrorvacui> I'm confused, I don't understand whats happening.
<shevy> horrorvacui go have a beer
railzForDaiz has left #ruby [#ruby]
freerobby has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
<DouweM> shevy: 3 dozen regulars, and the occasional newbie
<shevy> yeah
<horrorvacui> I can't drink I've severe GERDs
<shevy> NERDs?
<horrorvacui> Alcohol is like gasoline on the fire.
<shevy> yeah
keen__ has joined #ruby
<horrorvacui> Actually it is...
<GaryOak_> hahaha
RowdyChild|Away is now known as RowdyChildren
<DouweM> that doesn't sound fun horrorvacui :/
mikecmpbll has quit [Read error: Operation timed out]
CreativeEmbassy has joined #ruby
keen_ has quit [Ping timeout: 240 seconds]
djbender has joined #ruby
<horrorvacui> It's not to bad, I get to eat healthy because there is no other option.
jlebrech has quit [Quit: Konversation terminated!]
greggroth has joined #ruby
kaspergrubbe has joined #ruby
apeiros has joined #ruby
<f0ster> are there any performance differences with looking up a var from ENV vs an value on a instantiated class
<sigurding> is it possible to add list of parser.on() (Optionparser) to an existing list?
taf2 has joined #ruby
rakm has joined #ruby
<shevy> f0ster I think ENV is pretty much as fast as a normal hash, perhaps just a wee bit slower
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
<shevy> I hate optionparser so much
<f0ster> shevy: figured.. not 100% sure what ENV is doing
<horrorvacui> f0ster did you see my response on your gist from earlier?
<f0ster> would ENV stuff be in RAM or on the HEAP
freerobby has quit [Ping timeout: 268 seconds]
<f0ster> horrorvacui: no actually, i was just coming up with a solution still
<f0ster> now that the day is anew here at work
<shevy> f0ster it should have all environment variables, usually in bash those who have defined via $ (or access via $ in bash); and it has some extra methods, like ENV.to_hash
toastynerd has joined #ruby
pzula has joined #ruby
<shevy> *have been defined
<f0ster> horrorvacui: my coworker said i should just put the hash values in yaml from an initializer, then fetch them everytime from a helper module function
<horrorvacui> f0ster: you had a typo in the variable that is why class variables weren't working.
<f0ster> horrorvacui: lol oh really
kaspergr_ has quit [Ping timeout: 240 seconds]
kaspergr_ has joined #ruby
<shevy> f0ster I guess yaml files might be slightly better, some environments have different ENV, like if you try to use ENV in a ruby .cgi script for instance
sigurding has quit [Quit: sigurding]
<shevy> and ENV can be tainted too
arietis has joined #ruby
<shevy> In the past, I used to write ruby classes like so:
<shevy> class Foo
<shevy> HOME_DIR = ENV['MY_VIDEO_STUFF']
bilbo_swaggins has joined #ruby
<f0ster> shevy: right but he was saying yaml -> initializer -> env -> helper
<shevy> INFO_FILE = HOME_DIR+'/videos.info'
<shevy> end
IceDragon has quit [Ping timeout: 240 seconds]
<shevy> and that was bad because some environments might not have that set
coderhs has joined #ruby
coderhs has quit [Remote host closed the connection]
francisfish has joined #ruby
<shevy> I dont know what is an "initializer", sounds terribly fancy. he just means to load the dataset or? what env and helper is I have no idea
kauto has joined #ruby
<shevy> why does he not say what he means!
jollyy has joined #ruby
<shevy> f0ster I hate your coworker already
jerius has joined #ruby
<shevy> fire him
<f0ster> no no, so he has these hash definitions in a yaml file
<kauto> Anyone familiar with mechanize?
<workmad3> shevy: an 'initializer' is most likely a rails initializer... which is just a file in config/initializers
<f0ster> on an intializer he loads them to the env, then the helper method just fetches the hash values form teh ENV
<shevy> ohhhhh... railsers. ok
<f0ster> yeah rails, my bad
<shevy> they use strange names
spicerack has joined #ruby
<shevy> factory girl and factory mom
jollyy has quit [Read error: Connection reset by peer]
<f0ster> lol
IceDragon has joined #ruby
<shevy> kauto I used to use it like 5 years ago
<shevy> I could even click on stuff
<kauto> Well, that is pretty amazing
<horrorvacui> lol
jollyy has joined #ruby
<shevy> then mechanize changed, either it got away from hpricot ... I think it moved to nokogiri. nokogiri did not work for me back then, since then I lost all interest in it, I get frustrated too easily
kaspergr_ has quit [Ping timeout: 240 seconds]
<kauto> Yeah it moved to nokogiri I believe
kaspergrubbe has quit [Ping timeout: 268 seconds]
<kauto> I'm just having trouble getting this field to not be hidden so I can scrape it
pwh has quit []
Hobogrammer has joined #ruby
jerius_ has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
greenarrow has quit [Quit: 500]
RowdyChildren is now known as RowdyChild|Away
duggiefr_ has quit []
nomenkun has quit [Remote host closed the connection]
duggiefresh has joined #ruby
timonv has joined #ruby
saarinen has joined #ruby
mikepack has quit [Remote host closed the connection]
nomenkun has joined #ruby
jonmorehouse has joined #ruby
Es0teric has joined #ruby
zigomir has quit [Remote host closed the connection]
spyderman4g63 has quit [Ping timeout: 252 seconds]
jerius has quit [Ping timeout: 268 seconds]
yohanobs_ has joined #ruby
jollyy has quit [Quit: jollyy]
jollyy has joined #ruby
soulkey has quit [Ping timeout: 255 seconds]
dtcrshr has joined #ruby
soulkey has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
nfk has joined #ruby
elaptics is now known as elaptics`away
nvrch has quit [Quit: nvrch]
<f0ster> thanks again horrorvacui, i was disappointed i couldnt use my approach
<f0ster> glad to know it was just a dumb typo
jonmorehouse has quit [Ping timeout: 255 seconds]
<platzhirsch> How do I access the hash values/set values inside the Hash class itself (monkey patching)
<horrorvacui> yeah well it took me actually trying your gist before I found the typo, its one of those you can overlook a 100 times.
f0ster is now known as dude
dude is now known as f0ster`
<workmad3> platzhirsch: self[key] or self[key] = value
postdata has quit []
ghr has quit [Ping timeout: 240 seconds]
<platzhirsch> right, thanks man
<f0ster`> horrorvacui: yeah i still didnt even see it at first glance, just replaced my refs to my class var
<workmad3> platzhirsch: you could also use fetch
Elhu has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has joined #ruby
<workmad3> platzhirsch: and update
Kricir has quit [Ping timeout: 240 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
greggroth has quit [Ping timeout: 240 seconds]
xcv_ has joined #ruby
wald0 has quit [Ping timeout: 240 seconds]
Bumptious has quit [Remote host closed the connection]
kenndel_ has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
catphish has left #ruby ["Leaving"]
kenndel_ has joined #ruby
ktosiek has joined #ruby
xcv has quit [Ping timeout: 255 seconds]
Xeago has joined #ruby
xcv_ has quit [Read error: Connection reset by peer]
xcv has joined #ruby
jollyy has quit [Quit: jollyy]
chuk_ has quit [Quit: Leaving]
jollyy has joined #ruby
xcv_ has joined #ruby
x1337807x has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
zachallett has quit [Remote host closed the connection]
ce_afk is now known as cescalante
bklane has joined #ruby
jollyy has quit [Read error: Connection reset by peer]
bklane has quit [Remote host closed the connection]
mikemar10 has joined #ruby
mikemar10 has quit [Max SendQ exceeded]
xcv__ has joined #ruby
jollyy has joined #ruby
crystal77 has joined #ruby
bilbo_swaggins has quit [Quit: Leaving]
thesheff17_ has joined #ruby
bluenemo has quit [Remote host closed the connection]
fabrice31 has joined #ruby
afreidah1 has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
Guest77325 has joined #ruby
<Guest77325> http://www.marketglory.com/strategygame/galahad1st for online gamers, if you didn't already, use this link to register on MerketGlory: a free2play financial strategy game where virtual currency can be converted into real money. It starts out slow but in time you can turn a good profit that is if you have the necessary patience to grow a little bit every day :P
Guest77325 has left #ruby [#ruby]
zachallett has joined #ruby
xcv has quit [Ping timeout: 255 seconds]
AndChat| has joined #ruby
zachallett has quit [Read error: Connection reset by peer]
rylev has joined #ruby
LiohAu has quit [Quit: LiohAu]
thesheff17_ has quit [Client Quit]
zachallett has joined #ruby
lkba has quit [Read error: Connection reset by peer]
AndChat- has joined #ruby
wald0 has joined #ruby
xcv_ has quit [Ping timeout: 255 seconds]
<benzrf> >tfw ads
aspires_ has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
einarj has joined #ruby
mark_locklear has joined #ruby
<horrorvacui> Somone make a ruby controlled robotic lawnmower
sambao21 has quit [Quit: Computer has gone to sleep.]
reset has joined #ruby
fabrice31 has quit [Ping timeout: 268 seconds]
AndChat| has quit [Ping timeout: 240 seconds]
mansi_ has joined #ruby
rylev has quit [Ping timeout: 252 seconds]
aspires_ has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
phantummm has joined #ruby
benzrf is now known as benzrf|offline
aspires has quit [Ping timeout: 240 seconds]
jollyy has quit [Quit: jollyy]
aspires has joined #ruby
jollyy has joined #ruby
Shidash has joined #ruby
kauto has quit [Quit: Leaving]
pzula has quit [Quit: Lost terminal]
mansi has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
jollyy_ has joined #ruby
mattmcclure has joined #ruby
mikepack has quit [Remote host closed the connection]
alaibe has quit [Ping timeout: 240 seconds]
saarinen has quit [Quit: saarinen]
reset has quit [Ping timeout: 252 seconds]
mansi_ has quit [Read error: Connection reset by peer]
Jetchisel has joined #ruby
<shevy> a lawnmoaner?
simono has quit [Read error: Connection reset by peer]
mansi has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
kpshek has quit []
Solnse has joined #ruby
jobewan has quit [Ping timeout: 240 seconds]
jollyy has quit [Ping timeout: 268 seconds]
jollyy_ is now known as jollyy
saarinen has joined #ruby
papercode has quit [Ping timeout: 240 seconds]
dumdedum has joined #ruby
sputnik1_ has joined #ruby
kaspergrubbe has joined #ruby
Guedes has joined #ruby
subbyyy_ has joined #ruby
geggam has quit [Remote host closed the connection]
nahkunt has quit [Ping timeout: 240 seconds]
poikon_ has quit []
geggam has joined #ruby
xcv__ has quit [Remote host closed the connection]
SCommette has joined #ruby
mikecmpbll has joined #ruby
tvw has joined #ruby
hemanth has quit [Quit: This computer has gone to sleep]
Speed has quit [Read error: Connection reset by peer]
Vitor has joined #ruby
obs has quit [Quit: Konversation terminated!]
Jake232 has joined #ruby
fijimunkii has quit [Read error: Connection reset by peer]
obs has joined #ruby
fijimunkii has joined #ruby
Speed has joined #ruby
Zai00 has quit [Quit: Zai00]
ghr has joined #ruby
timonv has quit [Remote host closed the connection]
GreatSUN has quit [Ping timeout: 245 seconds]
aspires_ has joined #ruby
nisstyre has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
olivier_bK has quit [Ping timeout: 240 seconds]
njection has joined #ruby
saarinen has quit [Quit: saarinen]
aspires has quit [Ping timeout: 240 seconds]
jerius_ has quit [Quit: Computer has gone to sleep.]
ghr has quit [Ping timeout: 240 seconds]
Jake232 has quit [Quit: Textual IRC Client: www.textualapp.com]
Lewix has quit [Remote host closed the connection]
saarinen has joined #ruby
njection_ has quit [Ping timeout: 252 seconds]
Guedes has left #ruby ["Saindo"]
ebwise has quit [Ping timeout: 252 seconds]
nooteh has joined #ruby
francisfish has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
<benzrf> >lawnmoaner
yfeldblum has joined #ruby
mikepack has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
<benzrf> ping-pong:
<benzrf> *ping
s2013_ is now known as s2013
benzrf is now known as benzrf|offline
x1337807x has quit [Quit: Textual IRC Client: www.textualapp.com]
jhass|off is now known as jhass
pu22l3r_ has quit [Ping timeout: 240 seconds]
x1337807x has joined #ruby
havenwood has joined #ruby
mikepack has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
yfeldblum has quit [Ping timeout: 265 seconds]
freerobby has joined #ruby
pu22l3r has joined #ruby
railzForDaiz has joined #ruby
ikaros has quit [Quit: Ex-Chat]
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
AlSquire has joined #ruby
jollyy has quit [Quit: jollyy]
kenndel_ is now known as kenndel
fannye has quit [Read error: Connection reset by peer]
noop has joined #ruby
jollyy has joined #ruby
freerobby1 has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
kpshek has joined #ruby
maletor has joined #ruby
flowerpot has joined #ruby
jonmorehouse has joined #ruby
chipotle has joined #ruby
havenwood has quit []
bricker has joined #ruby
unstable has left #ruby [#ruby]
sailias has quit [Quit: Leaving.]
iswop has joined #ruby
x77686d has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CreativeEmbassy has quit [Quit: FO SHO]
sailias has joined #ruby
SHyx0rmZ has joined #ruby
mehlah has quit [Quit: Leaving...]
jonmorehouse has quit [Ping timeout: 255 seconds]
papercode has joined #ruby
jobewan has joined #ruby
Naoe-Kanno has joined #ruby
Naoe_Kanno has joined #ruby
SHyx0rmZ has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
einarj has quit [Remote host closed the connection]
mark_locklear has quit [Quit: Leaving]
chrisseaton has quit []
Naoe-Kanno has quit [Ping timeout: 240 seconds]
illumination has joined #ruby
michaeldeol has joined #ruby
benzrf is now known as benzrf|offline
Kricir has quit [Remote host closed the connection]
osvico has quit [Read error: Connection reset by peer]
tjr9898_ has joined #ruby
nanoyak has joined #ruby
papercode has quit [Quit: WeeChat 0.4.4-dev]
simono has joined #ruby
osvico has joined #ruby
jollyy has quit [Quit: jollyy]
bryanculver has joined #ruby
mark_locklear has joined #ruby
jollyy has joined #ruby
bricker_ has joined #ruby
tjr9898__ has joined #ruby
tjr9898__ has quit [Remote host closed the connection]
<shevy> pong
tjr9898__ has joined #ruby
jollyy has quit [Read error: Connection reset by peer]
tjr989___ has joined #ruby
jollyy has joined #ruby
jottr has joined #ruby
obs has quit [Quit: Konversation terminated!]
tjr9898 has quit [Ping timeout: 240 seconds]
tjr989___ has quit [Remote host closed the connection]
jollyy has quit [Client Quit]
tjr9898__ has quit [Read error: Connection reset by peer]
bricker has quit [Ping timeout: 240 seconds]
tjr9898 has joined #ruby
kbarry has joined #ruby
<kbarry> I'm struggling with a ruby question
tjr9898_ has quit [Ping timeout: 240 seconds]
altamic has joined #ruby
papercode has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
afreidah1 has joined #ruby
rezzack has joined #ruby
bricker_ has quit [Ping timeout: 240 seconds]
<canton7> no-one's going to answer a statement like that ;) they might, however, answer a question
CreativeEmbassy has joined #ruby
fijimunkii has quit [Read error: Connection reset by peer]
echevemaster has joined #ruby
zchrykng-work_ has joined #ruby
kpshek has quit []
Bumptious has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
Bumptious has quit [Remote host closed the connection]
showaz has quit [Quit: Textual IRC Client: www.textualapp.com]
rylev has joined #ruby
monkegjinni has joined #ruby
Bumptious has joined #ruby
yxhuvud has quit [Remote host closed the connection]
NightGriffin has quit [Read error: Connection reset by peer]
afreidah1 has quit [Ping timeout: 240 seconds]
<shevy> kbarry hehehe
<shevy> wow
robbyoconnor has quit [Read error: Connection reset by peer]
<shevy> iswop is abot
<shevy> *bot
robbyoconnor has joined #ruby
yxhuvud has joined #ruby
monkegji_ has joined #ruby
rylev has quit [Read error: No route to host]
zchrykng-work has quit [Ping timeout: 240 seconds]
atno has joined #ruby
rylev has joined #ruby
arietis has joined #ruby
fijimunkii has joined #ruby
monkegjinni has quit [Read error: Operation timed out]
crystal77 has joined #ruby
yfeldblum has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
Bumptious has quit [Ping timeout: 255 seconds]
jprovazn has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
tjr9898 has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
rylev has quit [Ping timeout: 240 seconds]
<mary5030> when one conditionally creates a ruby object how do we make sure to conditionally destroy it?
<benzrf> mary5030: hmm?
<mary5030> ex: find or create when destroying want to conditionally destroy
nooteh has quit [Quit: Leaving.]
<benzrf> i dont understand
<mary5030> not ruby sorry active record
<jhass> mary5030: provide some example code of your problem
dumdedum has quit [Quit: foo]
markisonfire has joined #ruby
<shevy> mary5030 just keep track that you created it
neolithic has joined #ruby
<jhass> there should be a better solution
<jhass> this is most likely a design issue
<jhass> or at least a code structure one
<mary5030> by keeping track you mean assign it to a veriable?
<workmad3> mary5030: just check that you found an object before trying to call .destroy on it
crystal77 has quit [Quit: Computer has gone to sleep.]
ovrflw0x has joined #ruby
pigzzcanfly has joined #ruby
<shevy> mary5030, yeah that would be a simple way. if you could do so without having to use a variable, that would be even better
<ovrflw0x> why is "gem install rails" taking so long to download?
<ovrflw0x> is it a large file?
carraroj has joined #ruby
<shevy> ovrflw0x probably a lot of docu
atno has quit [Ping timeout: 240 seconds]
<workmad3> ovrflw0x: lots of dependencies
<jhass> mary5030: if you want a definite answer show your actual code
adlerdias has joined #ruby
<ovrflw0x> can anyone tell me approximate size of rails? 100MB?
<mary5030> for ex: remove_public_ip_block = public_block.destroy i only want to destroy the once that were created
atno has joined #ruby
sk87 has joined #ruby
<mary5030> ones*
<workmad3> ovrflw0x: the rails gem itself is pretty tiny... it's just an umbrella gem for the rest of the gems in the framework
<shevy> rails 4.0.2 gem is 1548800
crystal77 has joined #ruby
Elhu has joined #ruby
jobewan has quit [Quit: Leaving]
jobewan has joined #ruby
<shevy> so 1.5 MB
<neolithic> hi all, for any chef users, would you happen to know if its possible to use Ohai data in knife.rb? Im looking to call platform_family? but cant find any references to proper syntax, so dont know if I can just call it directly or if I have to get it from node['platform_family'].
roolo has quit [Quit: Leaving...]
<ovrflw0x> shevy: how about "rails +dependecies" what's the size then?
<shevy> dunno
<shevy> I am not using rails, the guys on #rubyonrails are
<jhass> mary5030: it still makes no sense to me, show your whole method
<workmad3> ah, the rails gem also has all the guides in it
<shevy> it has a lot of dependencies
<jhass> mary5030: in a gist
<mary5030> thanks i will in afew?
<workmad3> ovrflw0x: http://rubygems.org/gems/rails <-- follow the dependencies in that, add it up
<shevy> ovrflw0x I'd say it has about 40 MB
sk87 has quit [Client Quit]
arietis has quit [Quit: Computer has gone to sleep.]
dblessing has quit [Ping timeout: 255 seconds]
<shevy> there is a download for rails on windows btw
<shevy> standalone
<shevy> railsinstaller-2.2.2.exe
<shevy> 62 MB
<shevy> also includes ruby.exe :P
monkegji_ has quit [Remote host closed the connection]
Shidash has quit [Ping timeout: 240 seconds]
<benzrf> >2014
mengu has joined #ruby
<benzrf> >using windows
<benzrf> >not using unix
adlerdias has quit [Ping timeout: 240 seconds]
<benzrf> >not using FLOSS
<workmad3> ovrflw0x: most of the time when a gem install takes a while, it's nothing to do with size, it's because a request to rubygems for resolving some dependencies is being a bit slow
<workmad3> ovrflw0x: you could ctrl-c the install and redo it with a -V param turn on verbose mode
Xeago_ has joined #ruby
atno has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
geggam has quit [Ping timeout: 240 seconds]
atno has joined #ruby
<ovrflw0x> shevy should I stop "gem install rails" command and download rails-installer.exe?
greggroth has joined #ruby
<workmad3> ovrflw0x: are you using windows?
<ovrflw0x> yes
<shevy> oh
<shevy> you are on windows
<shevy> you have my comforts man
<workmad3> ovrflw0x: I'd probably suggest using rails-installer then, yes
<shevy> I'd use the .exe
<shevy> and I'd try to abandon windows one day ;P
<workmad3> shevy: 'one day' == 'tomorrow', right? :D
<shevy> nah
<ovrflw0x> shevy: what OS are you using OSX?
<shevy> he is using ruby so that makes windows not as annoying
<workmad3> shevy: ah, saturday then :)
<shevy> ovrflw0x linux
<ovrflw0x> which distro?
<shevy> ovrflw0x slackware but it does not matter, I compile from source
andikr has quit [Read error: Connection reset by peer]
* workmad3 should start responding OS/2 when asked what OS he is using
<shevy> on this machine only glibc and the default linux kernel are from slackware (ok, and qt ...)
<mrbrdo> btw verbose mode is lower-case v not upper-case
dyoko1 has quit [Quit: Leaving.]
<mrbrdo> oops nevermind, I thought this was another channel :D
<shevy> workmad3 what OS are you using?
<workmad3> shevy: BeOS
<shevy> lol
<shevy> a lie!
<ovrflw0x> should I download from here? http://railsinstaller.org/en
<shevy> ovrflw0x yeah
<workmad3> shevy: you're right... I wish I used BeOS... I'm really stuck on GNU/Hurd
<shevy> hey
Xeago has quit [Ping timeout: 240 seconds]
<shevy> I tried haiku OS a few years ago
<shevy> it was not so bad
tvw has quit [Read error: Connection reset by peer]
<shevy> it feels as if it got outpaced by linux though :(
Vitor has quit [Remote host closed the connection]
<shevy> I tried it only through qemu though
<shevy> it probably would have crashed on a real install hahahaha
spyderman4g63 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ovrflw0x> I want this ruby version > 2.0 and rails version > 4.0
<shevy> you are on windows
<shevy> be lucky that anyone is using it ;)
<shevy> Packages included are:
<workmad3> shevy: be nice to the poor windows user... most of them don't know any better ;)
<shevy> Ruby 1.9.3
<shevy> Rails 3.2
crystal77 has quit [Quit: Computer has gone to sleep.]
Soda has quit [Remote host closed the connection]
arietis has joined #ruby
<benzrf> ovrflw0x: the solution is use an operating system that is not an abomination upon the face of computing
<shevy> ovrflw0x on that site it seems there are no other options available, sorry.
<benzrf> i suggest mint
<benzrf> or ubuntu
freezey has joined #ruby
<shevy> no please don't use ubuntu
nooteh has joined #ruby
<ovrflw0x> benzrf: how about OSX?
<benzrf> u bun tu?
<benzrf> ovrflw0x: sure
<shevy> mint is better
<benzrf> its nonfree though =[
<platzhirsch> Deal closed, moving to London, starting as an Android developer. Oh yeah
<benzrf> platzhirsch: sweet
<workmad3> shevy: there's nothing wrong with ubuntu... it's only unity that's an atrocity
<shevy> no surprise given that mint ranks number 1 on http://distrowatch.org/
<benzrf> im sorry to hear that youll have to work with java
brain_shim has joined #ruby
<shevy> ubuntu was bad before unity
<shevy> with unity it killed itself
james_d_h has joined #ruby
<ovrflw0x> k bye
<ovrflw0x> bb again on linux
ovrflw0x has left #ruby [#ruby]
<shevy> lol
olivier_bK has joined #ruby
pu22l3r has quit [Ping timeout: 240 seconds]
carraroj has quit [Quit: Konversation terminated!]
<shevy> that was one funny guy though
tcstar has quit [Read error: Connection reset by peer]
kobain has joined #ruby
<shevy> we forgot to ask him why he wants to learn ruby
afreidah1 has joined #ruby
linuxer1 has joined #ruby
tjr9898 has joined #ruby
dyoko has joined #ruby
crystal77 has joined #ruby
alaibe has joined #ruby
keeguon has joined #ruby
wjlafrance has joined #ruby
adlerdias has joined #ruby
kirun has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<alaibe> exit
alaibe has quit [Client Quit]
ArchBeOS has joined #ruby
teddyp1cker has joined #ruby
<ArchBeOS> are there any inherit setbacks or flaws from using require_relative?
<Sou|cutter> it's 1.9+
jobewan has quit [Quit: Leaving]
jobewan has joined #ruby
<Sou|cutter> not that most people care about 1.8 anymore
robbyoconnor has quit [Quit: Konversation terminated!]
<benzrf> if youre relying on 1.8 then u suck
<ArchBeOS> so require_relative is ok to use for an app buing built with 2.x MRI?
<jhass> ArchBeOS: it can be a smell, if you do it in a gem, you're doing it wrong
<ballPointPenguin> fwiw Ubuntu 14.04 Gnome (not unity) on MacBook retina is best linux + retina experience I've had yet
freerobby has joined #ruby
<jhass> ArchBeOS: and it still might be better to just append $LOAD_PATH instead
carraroj has joined #ruby
geggam has joined #ruby
<ArchBeOS> jhass: damn, i should use LOAD_PATH
<ArchBeOS> thanks
<shevy> ArchBeOS it's longer to write
userx has joined #ruby
<shevy> ArchBeOS require itself works perfectly fine when someone has a gem-like structure in a project too
<ArchBeOS> shevy: ok. i need to re-think how im bringing in my ruby files and I think LOAD_PATH might be the right way for me to do this
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> just layout a gem-like structure and let gem or setup.rb install into SITE_DIR, then LOAD_PATH should have it
reset has joined #ruby
zorak has joined #ruby
jottr_ has joined #ruby
<shevy> in my main directory where I keep my ruby stuff, let's call it x
elisarver has left #ruby [#ruby]
<shevy> I have it setup like this, for project called "foobar", I'd put into x/foobar/lib/foobar/ <-- and here I usually put foobar.rb which loads the other files below that hierarchy
afex has joined #ruby
<kbarry> I want to use ".match" but get the second result
<kbarry> I "thought" that might be done with
Celm has quit [Remote host closed the connection]
<kbarry> variable.match(/regex/)[1]
<ArchBeOS> thanks shevy
freerobby has quit [Ping timeout: 240 seconds]
Celm has joined #ruby
<shevy> for non-gem projects I cheat
<shevy> I simply symlink that main dir into ruby site dir x/
bricker has joined #ruby
<shevy> then I can do like: require 'x/tools/purge_directories.rb'
jackneill has joined #ruby
<shevy> kbarry how does your regex and your string look?
jackneill has quit [Changing host]
jackneill has joined #ruby
jerius has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
<shevy> >> 'abc def'.match(/(.+) (.+)/)[2]
<eval-in> shevy => "def" (https://eval.in/131393)
<shevy> works just fine
<shevy> let's make a poll:
<kbarry> shevy: node['hostname'].match(/\d\d/)[0].to_i
<shevy> - Who heres loves Regular Expressions?
<shevy> *here
<kbarry> node['hostname'] = "nm01server01"
<shevy> kbarry and what is that
* mr_snowf1ake does to some degree
Elhu has quit [Quit: Computer has gone to sleep.]
<kbarry> i expect that to return 1
<mr_snowf1ake> ruby does a really elegant job with regex imo
<kbarry> (Which it does)
<shevy> kbarry but you are not using a match group, are you?
<kbarry> no
<IceDragon> /\d{2}/ # << same as \d\d
* IceDragon walks off again
<kbarry> for some reason i was under the impression that .match returned an array of all matches
michaeldeol has joined #ruby
<IceDragon> use scan kbarry
kpshek has joined #ruby
<shevy> >> /(.)(.)(.)/.match("abc")[2]
<eval-in> shevy => "b" (https://eval.in/131394)
<shevy> kbarry you will have to use () for matchgroups, or you just use .scan()
pu22l3r has joined #ruby
Bumptious has joined #ruby
RowdyChild|Away is now known as RowdyChildren
<kbarry> .scan ... looking that up,
enebo has quit [Quit: enebo]
<Hanmac> shevy you dont need match
<Hanmac> >> 'abc def'[/(.+) (.+)/,2]
<eval-in> Hanmac => "def" (https://eval.in/131395)
<shevy> kbarry when did you start with ruby btw?
Elhu has joined #ruby
<kbarry> ohh, i only get to use it a bit every week,
<kbarry> started about a month ago
<kbarry> (using it in chef)
Elhu has quit [Client Quit]
<shevy> Hanmac I think you have to tell this those who ask the question :D
<shevy> cool
<shevy> one month only
jonmorehouse has joined #ruby
<IceDragon> Hanmac: can I haz pancakes, also do you want an invite to keybase? https://keybase.io/
rubensten has joined #ruby
sepp2k has quit [Read error: Operation timed out]
fijimunkii has quit [Read error: Connection reset by peer]
fijimunkii has joined #ruby
<rubensten> What would be a good book to start learning Ruby for an older person with no programming experience at all. I know HTML and CSS, but don't know any programming languages at all. My goal is to learn Ruby and then move to rails...
kpshek has quit []
centrx has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubensten has quit [Quit: leaving]
<shevy> rubensten the pickaxe
heftig has joined #ruby
<benzrf> IceDragon: >written in javascript
<benzrf> im sorry why
jottr_ has quit [Ping timeout: 240 seconds]
okdas has joined #ruby
<shevy> rubensten I guess the current link is http://pragprog.com/book/ruby4/programming-ruby-1-9-2-0
<kbarry> shevy: [2014-04-03T11:41:23-07:00] ERROR: undefined method `to_i' for #<MatchData "01">
<shevy> I got the old pickaxe in 2006 or something like that, it was ok
<shevy> I knew php before though
<centrx> PHP...?
<benzrf> ruisantos: i would start with python myself
<kbarry> host_num = node['hostname'].match(/\d\d/,5).to_i
<shevy> yeah centrx
<benzrf> centrx: :I
<benzrf> inb4 php quote
<shevy> do you have some trigger or what
<shevy> you always wake up when PHP is mentioned
sepp2k has joined #ruby
<centrx> PHP is...
<benzrf> centrx sez:
<kbarry> if my match is "01" how do I make it an interget (trim leading zero?)
andrewlio has quit [Quit: Leaving.]
<IceDragon> benzrf: still better than writen in php :x
tcstar has joined #ruby
<shevy> >> "01".to_i
<eval-in> shevy => 1 (https://eval.in/131396)
<shevy> ^^^ kbarry
Elhu has joined #ruby
<IceDragon> kbarry: try to_i on it
<kbarry> host_num = node['hostname'].match(/\d\d/,5).to_i
<kbarry> [2014-04-03T11:41:23-07:00] ERROR: undefined method `to_i' for #<MatchData "01">
deadlock has joined #ruby
<shevy> kbarry you said your match is "01"
<shevy> but that is a string
fabrice31 has joined #ruby
<shevy> so I would assume you do not have a string
<shevy> otherwise it would work :)
<kbarry> hmmm......
<kbarry> great.
<kbarry> how might i display the data "type?
<shevy> when you have long, complicated queries, just break them up into smaller chunks and continue to work with these
danman_ has joined #ruby
<shevy> via p
<shevy> p node['hostname'].match(/\d\d/,5).class
<kbarry> p?
<shevy> for instance
<kbarry> alright
<kbarry> standby
<shevy> yeah Kernel#p
<kbarry> what is p
<kbarry> show for puts?
<kbarry> short/?
<shevy> or you wont need .class actually
<shevy> kbarry, look there once: http://apidock.com/ruby/Kernel/p
<shevy> it shows you example output too
<shevy> dunno why p is used as name
<shevy> pp foo is "pretty print"
<shevy> pp is lovely
<shevy> only drawback is that you have to do: require 'pp'
saarinen has quit [Quit: saarinen]
keeguon has quit [Quit: keeguon]
rurban_ has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
dkamioka has joined #ruby
alexherbo2 has joined #ruby
<kbarry> class is MatchData
carraroj has quit [Quit: Konversation terminated!]
<shevy> yeah
zigomir has joined #ruby
<shevy> now you know why to_i fails, you expected a string object but you have another object there
compleatang has quit [Remote host closed the connection]
<shevy> >> "nm01server01".match(/\d\d/,5)
<eval-in> shevy => #<MatchData "01"> (https://eval.in/131398)
<shevy> if you use [0] you will have a string
<kbarry> yup, gonna needa do .to_s.to_i
<shevy> host_num = node['hostname'].match(/\d\d/,5)[0].to_i
<kbarry> ohh
<kbarry> alright
<shevy> indeed
<shevy> to_s also works
<shevy> there is more than one way to do it!
<kbarry> Thanks for the help.
<kbarry> I learned several things about ruby today from this.
<kbarry> especially the p
soulcake has quit [Ping timeout: 240 seconds]
<kbarry> and how to look up and use ruby class info.
<shevy> \o/
<shevy> quite impressive for one month
<shevy> you must have been using another language before
<kbarry> Meh, i'm l33t
carraroj has joined #ruby
<kbarry> ;:)
sdegutis has joined #ruby
dblessing has joined #ruby
<sdegutis> Is there a way to jump the user into an ssh session?
<sdegutis> I'm using Fog btw, which I think uses net/ssh.
pfg has joined #ruby
Lewix has joined #ruby
francisfish has joined #ruby
Musashi1 has joined #ruby
Lewix has quit [Remote host closed the connection]
arianit has joined #ruby
carraroj has quit [Client Quit]
soulcake has joined #ruby
kpshek has joined #ruby
jlast has quit [Remote host closed the connection]
rylev has joined #ruby
kennym has quit [Quit: Leaving.]
dyoko has quit [Quit: Leaving.]
carraroj has joined #ruby
spicerack has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
Lewix has joined #ruby
dkamioka_ has joined #ruby
Lewix has quit [Remote host closed the connection]
dkamioka has quit [Ping timeout: 252 seconds]
rylev has quit [Read error: Operation timed out]
jlast has joined #ruby
kaspergr_ has joined #ruby
benzrf is now known as benzrf|offline
carraroj has quit [Client Quit]
<sdegutis> Ah found out I can just do system("ssh ...") and it works fine.
<sdegutis> Thanks all.
sdegutis has left #ruby [#ruby]
Musashi1 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
agjacome has quit [Remote host closed the connection]
agarie has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 240 seconds]
michael_lee has quit [Remote host closed the connection]
Kricir has joined #ruby
jerius has joined #ruby
toastynerd has quit [Remote host closed the connection]
Unfriendly has joined #ruby
batman___ has quit [Ping timeout: 240 seconds]
<shevy> :)
<shevy> ruby is so advanced that people can help themselves
gerep has joined #ruby
saarinen has joined #ruby
<gerep> Hi all. My boos told me to find a good ruby 2 best practice book, any sugestion?
<gerep> *suggestion
mercwithamouth has joined #ruby
<s2013> practical object oriented ruby
enebo has joined #ruby
kukyakya has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
<gerep> s2013: thanks a lot :)
CreativeEmbassy has quit [Quit: FO SHO]
<Unfriendly> hi
Jetchisel has quit [Ping timeout: 260 seconds]
danman_ has quit [Quit: danman_]
dkamioka_ has quit [Remote host closed the connection]
carraroj has joined #ruby
<s2013> np
mr_snowf1ake has quit [Quit: Leaving]
cpruitt has quit [Quit: cpruitt]
ghr has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
carraroj has quit [Client Quit]
obs has joined #ruby
dkamioka has joined #ruby
CaptainJet has joined #ruby
jprovazn has quit [Quit: Odcházím]
kaspergrubbe has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Quit: WeeChat 0.4.3]
chrisseaton has joined #ruby
rippa has joined #ruby
kennym has joined #ruby
subbyyy_ has quit [Ping timeout: 255 seconds]
Zai00 has joined #ruby
Zai00 has left #ruby [#ruby]
Mon_Ouie has joined #ruby
papasierra has joined #ruby
carraroj has joined #ruby
Zai00 has joined #ruby
kaspergr_ has quit [Ping timeout: 240 seconds]
mrmargolis has quit []
Zai00 has quit [Remote host closed the connection]
mrmargolis has joined #ruby
<platzhirsch> Any idea what 0.3%, vesting over three years as part of company EMI scheme means?
sqwirl has joined #ruby
CreativeEmbassy has joined #ruby
codabrink has left #ruby ["Textual IRC Client: www.textualapp.com"]
<papasierra> from these strings "foo/bar/baz" and "x/y", how do i obtain "foo/bar" and "x", respectively? i.e. discard the last part of the path?
davy_ has joined #ruby
rippa has quit [Ping timeout: 252 seconds]
<shevy> platzhirsch I dont even nkow what EMI means
subbyyy_ has joined #ruby
<platzhirsch> me neither
<shevy> hehehe
Unfriendly has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Like it? Visit #hydrairc on EFNet]
<platzhirsch> It means I will be involved when the company makes debts
<shevy> papasierra several ways. simplest one is by .split('/') -ing
<horrorvacui> papasierra: one direct way is to split the strings on "/" and reassemble. also you can use regex to match depending.
<neolithic> Is rbconfig available in all ruby versions (ie 1.8.5+)?
freerobby has joined #ruby
xcv has joined #ruby
decoponio has quit [Quit: Leaving...]
etqqkoiflwhb has joined #ruby
<shevy> neolithic yeah I think so
mansi has quit [Remote host closed the connection]
<horrorvacui> Didn't it go through a rename somewhere in the past though? Like didn't the module use to be called Config?
<s2013> platzhirsch, yeah meaning in 3 years youll get .3%
<s2013> but until then it will be counted on a monthly basis
<s2013> so lets say you leave after year and half youll get .15%
<platzhirsch> s2013: ah okay
<platzhirsch> and now, from what?
freerobby has quit [Ping timeout: 268 seconds]
<platzhirsch> .3% of ...
mansi has joined #ruby
<s2013> of the company
<s2013> is it for a job?
diegoviola has joined #ruby
<platzhirsch> yes
<s2013> 3 years vesting si a bit too much but whatever
<s2013> yeah then you get .3% equity in the company
<platzhirsch> shares
freezey has quit [Remote host closed the connection]
<platzhirsch> Isn't it like, I have to buy the shares?
<s2013> no
<s2013> you cant buy shares
<s2013> its not public company
<s2013> you just get shares
<s2013> is it a startup?
<platzhirsch> so after 3 years I own 0.3% of the company
<platzhirsch> yes
<s2013> yeah
boombadaroomba has joined #ruby
<platzhirsch> and this becomes interesting when the company does IPO?
<s2013> similarly how early employees of fb/google etc made rich
<s2013> yup
<platzhirsch> and if they never go IPO?
<shevy> hmm
<s2013> chances are eventually if the company still survives youll have lot less than .3%
<s2013> because of dilution. if they never have an ipo then if they get bought out
<shevy> platzhirsch, you seem to dive in head first ;)
<s2013> there has to be soem exit strategy
etqqkoiflwhb has quit [Ping timeout: 252 seconds]
<platzhirsch> ah ok, if they are bought then I also get a share
<s2013> yes
<s2013> so if they get bought out for $100m. you get $300K assuming you still retain .3%
<platzhirsch> ok, so I have to make sure that my work leads to that point
<s2013> is it some fancy social media startup that makes no revenue?
<platzhirsch> mixlr.com
sski has quit [Remote host closed the connection]
<platzhirsch> they make revenue, have a paid plan
zigomir_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
<s2013> are they profitable?
sambao21 has quit [Quit: Computer has gone to sleep.]
<platzhirsch> No clue at the moment
<platzhirsch> They will, after I start
<s2013> heh cool
etqqkoiflwhb has joined #ruby
<shevy> lol
<s2013> how many employees
<platzhirsch> 8-ish
<shevy> platzhirsch deserves his nick
<s2013> hmm .3% isnt that bad then. whats the salary offer and where are they located
<platzhirsch> is it bad if I tell that in the channel?
<shevy> perhaps
<horrorvacui> I'd not mention it
pwh has joined #ruby
<shevy> could be competition here!
testcore has joined #ruby
<horrorvacui> Keep it between you and s2013
dkamioka has quit [Remote host closed the connection]
<horrorvacui> Just incase :P
<shevy> including the hot kisses
<s2013> yeah just msg me then
<s2013> ok
<papasierra> horrorvacui: if i split('/') and then reassemble, i'll need to reassemble the first n-1 elements.
<horrorvacui> papasierra: yeah thats exactly why we need to know what you intend
sambao21 has joined #ruby
<papasierra> horrorvacui: yes, 'x/y/z' becomes 'x/y' (drop the last /element
zigomir has quit [Ping timeout: 240 seconds]
adeponte is now known as cyphactor
cyphactor is now known as adeponte
altamic has quit [Quit: altamic]
adeponte is now known as cyphactor
<shevy> papasierra yes that is simple [0..-2]
<horrorvacui> papasierra: well is that element variable in size? Does the element you want removed always stay 1 char?
klaut has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
Martxel has joined #ruby
<papasierra> horrorvacui: that's irrelevant. once i "split" it's just an array, doesn't matter how many chars. it's variable in size, but must always drop the *last* element. so 'a/bbb/cccccc/d' becomes 'a/bbb/cccccc'
eka has joined #ruby
<papasierra> shevy: i'm reading up on that now
eka has quit [Client Quit]
<papasierra> shevy: so [0..-1] right?
<horrorvacui> papasierra: Well you mentioned n - 1 so I thought you were saying that splitting has a O(n) or something
dkamioka has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
Nogbit has joined #ruby
<shevy> papasierra did you read what I wrote
<shevy> because if you would have done, I wonder how you came to -1
<shevy> anyway, look
<shevy> >> 'x/y/z'.split('/')[0..-2]
<eval-in> shevy => ["x", "y"] (https://eval.in/131403)
<shevy> >> 'x/y/z'.split('/')[0..-2].join('/')
<eval-in> shevy => "x/y" (https://eval.in/131404)
<papasierra> sorry
<papasierra> yes, i went off and read about it, then made a typo when i repeated back to you what i thought were my new learnings.
<shevy> the [] method is fairly consistent across different ruby classes
<shevy> you can use it on class String and class Array
jollyy has joined #ruby
<shevy> and you can use it in your custom class via: def self.[](i)
<banister> shevy there are men here who want to do you harm - i am the only thing between you and incredible suffering
<shevy> papasierra ok, makes sense with that explanation :)
<papasierra> ok i'll practice that just now (the self.[](i) thing). firstly i'll try your solution in the repl to make sure i understand it. thanks
noop has quit [Ping timeout: 240 seconds]
cherry_lin has quit [Ping timeout: 240 seconds]
<papasierra> shevy: right, so 'x/y/z'.split('/')[0..-2].join('/') works just right. so [0..-2] means "from the 0th, to the (length-2)th", have i got it?
jottr_ has joined #ruby
nari has quit [Ping timeout: 240 seconds]
<papasierra> [0..-1] would just do the entire array.
rvraghav93 has quit [Read error: Connection reset by peer]
Jinkins has joined #ruby
<papasierra> and [0..0] makes no sense. i imagine that's an array containing only the 0th element
robbyoconnor has joined #ruby
<shevy> papasierra yeah
timonv has quit [Remote host closed the connection]
jackneill has quit [Remote host closed the connection]
<shevy> it's easiest to work on a string to understand that
<papasierra> great! ty v much
<shevy> >> "foobar"[0..-1]
<eval-in> shevy => "foobar" (https://eval.in/131405)
<shevy> >> "foobar"[0..-2]
<eval-in> shevy => "fooba" (https://eval.in/131406)
<shevy> >> "foobar"[0..0]
<eval-in> shevy => "f" (https://eval.in/131407)
<shevy> hehe
<shevy> odd
<shevy> >> "foobar"[0..1]
<eval-in> shevy => "fo" (https://eval.in/131408)
flowerpot has quit [Quit: leaving]
<shevy> oh cool
<shevy> >> "foobar"[0,1]
<eval-in> shevy => "f" (https://eval.in/131409)
<papasierra> right, that's cool
<shevy> I think that might be different in ruby 1.8.x
<neolithic> If i use "%USERPROFILE%\.chef" as a path on WIndows do I have to run this through File.expand_path or will things that take a path figure it out?
<shevy> can someone test the above in ruby 1.8.x?
ephemerian has joined #ruby
cherry_lin has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
rvraghav93 has joined #ruby
wuest has quit [Quit: :q]
Solnse has quit [Quit: Leaving.]
wuest has joined #ruby
m8 has joined #ruby
olivier_bK has quit [Ping timeout: 246 seconds]
mikepack has quit [Ping timeout: 255 seconds]
linuxer1_ has joined #ruby
GaryOak_ has quit [Remote host closed the connection]
DEA7TH has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
tobago has quit [Remote host closed the connection]
alvaro_o_ has joined #ruby
pikitgb_i has joined #ruby
linuxer1 has quit [Ping timeout: 240 seconds]
kennym has quit [Quit: Leaving.]
rylev has joined #ruby
sambao21 has joined #ruby
linuxer1 has joined #ruby
supermarin_ has joined #ruby
kennym has joined #ruby
kennym has quit [Changing host]
kennym has joined #ruby
Squarepy has quit [Quit: Leaving]
linuxer1_ has quit [Ping timeout: 255 seconds]
<kbarry> shevy: about groups
pigzzcanfly has quit [Remote host closed the connection]
<kbarry> I need to parse the name a different way
<kbarry> i need the non numbers between 2 pair of numbers
<kbarry> ie nm01servername04
<kbarry> i need "servername
zigomir_ has quit [Quit: Leaving]
jlast has quit [Remote host closed the connection]
eka has joined #ruby
<kbarry> i know i might do something like \d{2}\w*\d{2}
phutchin1 has quit [Ping timeout: 240 seconds]
armstrjare has joined #ruby
armstrjare has quit [Max SendQ exceeded]
rylev has quit [Ping timeout: 240 seconds]
dfranciosi has quit [Remote host closed the connection]
<kbarry> i don't evne know what its called, only that if can be done
<kbarry> where I can essentially so soemthing like
dfranciosi has joined #ruby
pikitgb_i has left #ruby [#ruby]
<kbarry> (\d{2})(\w*)(\d{2})
Elhu has joined #ruby
<BraddBitt> \d\d(\w+)\d\d
<BraddBitt> and your matching name will be the first group
<BraddBitt> assuming a name never has a number in it
<kbarry> Ohhhh, nice
<kbarry> nope
<kbarry> :)
<BraddBitt> yeah that should work
<BraddBitt> you can test on rubular
<kbarry> whats the difference between \w and\D
teddyp1cker has quit [Remote host closed the connection]
<BraddBitt> \d is digit
<BraddBitt> \D is any non-digit
<kbarry> ok
<kbarry> in this case, its the same
<BraddBitt> \w is any word
<kbarry> OHHHHH
monkegjinni has joined #ruby
_justin has joined #ruby
<BraddBitt> actually \w will capture numbers iirc
<BraddBitt> \d\d(\D+)\d\d
claymore has quit [Ping timeout: 240 seconds]
<BraddBitt> that would be better
<mary5030> ju
<kbarry> ok
<BraddBitt> /\d\d(\D+)\d\d/.match(string)[1]
<BraddBitt> will extract the name
monkegjinni has quit [Remote host closed the connection]
<Mon_Ouie> You can use ri Regexp to see what those character classes mean exactly
Hobogrammer has quit [Ping timeout: 252 seconds]
<Mon_Ouie> For instance, /\w/ - A word character ([a-zA-Z0-9_])
<kbarry> .match(string)[1] or [0]
<kbarry> and literally put "string"
Kricir has quit [Remote host closed the connection]
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
<BraddBitt> isn't [0] the entire match result, disregarding groupings?
Elhu has quit [Ping timeout: 240 seconds]
<Mon_Ouie> Yes it is
<BraddBitt> god some fucking bot on #freenode is spam querying me
<BraddBitt> i think itc
ascarter has joined #ruby
<kbarry> is this a good case or scan?
<Mon_Ouie> Also you can use string[regexp, capture_group_id]
zachallett has quit [Remote host closed the connection]
<kbarry> a good case for scan?
<Mon_Ouie> Do you want to iterate over all matches of the regular expression?
epichero has joined #ruby
<kbarry> there will be only one
<Mon_Ouie> Then no
pwh has quit []
claymore has joined #ruby
platzhirsch has left #ruby [#ruby]
mrmargolis has quit []
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
mrmargolis has joined #ruby
<mary5030> shevy: can some check and guid me how i can conditionally destroy this active record object? it is created in line 4 and trying to remove in line 34
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mrmargolis has quit [Client Quit]
<mary5030> i mean whoever that is welling to help guid me on this :)
mrmargolis has joined #ruby
epichero has left #ruby [#ruby]
chrisseaton has quit []
greggroth has quit [Ping timeout: 240 seconds]
davy_ has quit [Remote host closed the connection]
<shevy> hmm
<shevy> I open pastebin.com
<mozzarella> guys
<mozzarella> can you do
<shevy> and audio is played
toastynerd has joined #ruby
<shevy> can you use another pastie mary5030?
<mozzarella> require 'something/{one,two}'
<mary5030> sorry?
<shevy> pastie.org or http://gist.github.com/ are better alternatives
<shevy> mary5030 I clicked on your link and there is ad
<mary5030> okay :)
<shevy> flash ad
<BraddBitt> yeah pastebin blows now with that ad at the top
<BraddBitt> not afaik mozzarella
afreidah1 has quit [Ping timeout: 240 seconds]
davy_ has joined #ruby
<mary5030> that would be now line 6 and 37
afreidah1 has joined #ruby
Slavox is now known as Slavox|AFK
<shevy> this code is all fairly domain specific
toastynerd has quit [Read error: Connection reset by peer]
<mary5030> i understand
<shevy> your code does not seem to make a lot of sense to me
toastynerd has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
<shevy> you use a rescue => e
<shevy> but where is begin?
<shevy> and what is the specific error you try to capture
<shevy> another problem:
<shevy> remove_gateway_ip = gateway_ip.hard_deallocate!
michaeldeol has joined #ruby
<shevy> this is very atypical ruby code
<jhass> shevy: you don't need a begin if you start at the method
greggroth has joined #ruby
cj3kim has joined #ruby
<shevy> ack
<mary5030> i was calling destroy on the object that was conditionally created in line 7
<shevy> what demon came up with that?
<shevy> jhass are you using that yourself?
rvraghav93 has quit [Read error: Connection reset by peer]
_justin has quit [Quit: _justin]
<jhass> mary5030: do you really need to create it? can't you build it and save when you know that you want to keep it?
<jhass> shevy: implicit begin with def? yes
<jhass> but my methods are way shorter
<shevy> ewwwww
heftig has quit [Quit: Quitting]
<mary5030> shevy: i confirmed in this case i didn't need a begin
Hobogrammer has joined #ruby
<shevy> yeah
heftig has joined #ruby
<shevy> this is too awful for me sorry
<shevy> jhass will have to help you with such code
<mary5030> def foo
<mary5030> ...
<mary5030> rescue => e
freezey has joined #ruby
<mary5030> ...
<jhass> mary5030: so does any of the SimpleConfig stuff load objects you created there from the database?
<mary5030> end
nanoyak has quit [Quit: Computer has gone to sleep.]
<jhass> shevy: well, I don't indent it like that :P
<shevy> but I really find it ugly!
nanoyak has joined #ruby
<shevy> it reminds me of ruby's perl origins
<jhass> shevy: most things in ruby do for a newcomer
nari has joined #ruby
<jhass> it's actually one of the things I love about ruby
locriani has joined #ruby
Kricir has joined #ruby
<shevy> if ($@->isa('MyException::File')) {
<jhass> since all that try { } catch stuff in the java I've to write really annoys me
<jhass> mary5030: will you answer my questions?
<shevy> if ($err->isa('MyException')) { die $err; }
<shevy> ok, perl is definitely worse
robert_ has quit [Read error: Connection reset by peer]
<mary5030> jhass: so in line 6 and 37 i realized i couldn't just call destroy because it was made conditionally
yaymukund has joined #ruby
<jhass> mary5030: I got that
<jhass> I'm asking if you really need to persist it to the database at that point
<mary5030> yes it does
<yaymukund> is it best practice to exclude the extension when requiring a file?
<mary5030> load the object from the database vs?
<jhass> mary5030: can you explain why?
<yaymukund> or is that hotly debated
angusigu1ss has joined #ruby
<horrorvacui> yaymukund: exclude
dgarstang has joined #ruby
<dgarstang> wasn't there a with_index thingy or iterating over an array in an erb?
jamto11 has quit []
<yaymukund> horrorvacui: hmm okay. thanks.
<jhass> mary5030: foo = Foo.new; begin; do_stuff_that_my_fail; foo.save; rescue DoStuffError => e; end
agarie has joined #ruby
tomato has joined #ruby
joast has quit [Ping timeout: 246 seconds]
weems has joined #ruby
jerius has joined #ruby
<shevy> yaymukund I always include it, unless it is a project/gem
wallerdev has joined #ruby
Hobogrammer is now known as Hobogrammer
alexju has quit [Read error: Connection reset by peer]
soulcake has quit [Ping timeout: 240 seconds]
<shevy> yaymukund that way when I look at my code, I instantly know what it refers to
alexju has joined #ruby
benzrf|offline is now known as benzrf
freerobby has joined #ruby
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
selina345 has joined #ruby
<mary5030> jhass: i was basically trying to not roll back the part that comes after rescue
<yaymukund> shevy: cool, that makes sense too.
<mary5030> jhass: and shevy thank you guys anyways I think i wasn't able to explain myself well
<jhass> mary5030: I do understand that. I'm saying that you should try to have no reason to rollback because you only should persist when you know it won't fail
<mary5030> and that is a small part of my code from two different class that i combined in one gist
<shevy> dgarstang there is with_index somewhere
<shevy> I forgot where haha ... Enumerable? Enumerator?
sambao21 has quit [Quit: Computer has gone to sleep.]
neolithic has left #ruby [#ruby]
doodleha_ has joined #ruby
<shevy> dgarstang it should not matter whether it is erb or not btw, as long as you use ruby code, it will work, in or outside of erb
paulfm has quit []
<shevy> of course an added difficult is that erb code is almost as ugly as embedded php
<mozzarella> HELP
<shevy> RESCUE
<crome> retry
<mary5030> you mean shouldnt have to use transaction
<mary5030> ?
<shevy> mozzarella require is very simple
<mozzarella> is test::unit dead?
<shevy> don't think it is dead yet
<shevy> people like minitest
<mozzarella> should I use minitest or test::unit?
<mozzarella> I'm new at testing
<shevy> I asked the same
<shevy> 6 people here said minitest
<shevy> one guy said something else
<mozzarella> OK
<shevy> that was like 2 or 3 weeks ago
tomato has quit [Quit: Leaving]
<crome> in the end it doesnt really matter
<shevy> I think jhass said minitest
<mozzarella> I guess I'll use minitest
<shevy> or perhaps he was the odd one, I forgot :P
arubincloud has joined #ruby
freerobby has quit [Ping timeout: 255 seconds]
chichou has quit [Remote host closed the connection]
<mozzarella> also
Solnse has joined #ruby
soulcake has joined #ruby
<crome> a test framework is just like anything else, you can write a crap and mostly useless test coverage with any of them ;>
<jhass> mary5030: you can get a long way without hitting the database in AR. The other possibility is to extend the transaction to all points that do call the database and should be reverted upon failure. Right now you seem to be half way between
<mozzarella> I am under the impression that my ruby installation didn't come with everything… like, I had to install rake manually
<mozzarella> isn't rake supposed to come with ruby?
<shevy> not quite
<crome> mozzarella: nope
<shevy> it was like outside ruby for years
doodlehaus has quit [Ping timeout: 255 seconds]
<shevy> then its author died
mark_locklear has quit [Ping timeout: 240 seconds]
<jhass> shevy: I'm the odd one who likes rspec 3
<mozzarella> yeah poor jim
<shevy> but I assume it will become part of ruby eventually
<shevy> jhass oh yeah
<shevy> mozzarella ok so mostly minitest, and one for rspec 3
Chronocity has joined #ruby
fabrice31 has joined #ruby
<shevy> and zero for anything else haha
<mozzarella> I created a test file… not sure which one of minitest/unit, autorun, etc., to include
Celm has quit [Remote host closed the connection]
<mozzarella> when I use /unit it says to use autorun instead, lol
<mozzarella> and autorun seems to mess with my rakefile
Celm has joined #ruby
gerep is now known as gerep-away
<mozzarella> I'm receving spam from users in this channel
<mozzarella> when I say something (  ;____;)
osvico has quit [Ping timeout: 240 seconds]
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
<shevy> yeah
<shevy> two bots are here
<shevy> apeiros likes them
x1337807x has joined #ruby
<shevy> I think they abuse the channel as they use query + notification information they recieve from the channel for non-user related "interaction"
<shevy> iswop is one
zachallett has joined #ruby
brain_shim has quit [Read error: No route to host]
fabrice31 has quit [Ping timeout: 240 seconds]
mansi_ has joined #ruby
<mozzarella> Warning: you should require 'minitest/autorun' instead.
yaymukund has left #ruby [#ruby]
<mozzarella> Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
soheil has joined #ruby
sambao21 has joined #ruby
<soheil> what gem do you use for active record read/write db separation?
crystal77 has quit [Quit: Computer has gone to sleep.]
chrisseaton has joined #ruby
freezey has quit [Remote host closed the connection]
CreativeEmbassy has quit [Quit: FO SHO]
jollyy has quit [Quit: jollyy]
mansi has quit [Ping timeout: 240 seconds]
samfisher has joined #ruby
JohnBat26 has quit [Ping timeout: 240 seconds]
CreativeEmbassy has joined #ruby
crystal77 has joined #ruby
<samfisher> how can I check a string to be 11 chars starting with 00?
<benzrf> samfisher:
<samfisher> and loop until user inputs that correctly?
cj3kim has quit [Remote host closed the connection]
<benzrf> >> 'thisisstr11' =~ '.{9}11'
<eval-in> benzrf => type mismatch: String given (TypeError) ... (https://eval.in/131419)
<benzrf> oops
<benzrf> >> 'thisisstr11' =~ /\A.{9}11\Z/
<eval-in> benzrf => 0 (https://eval.in/131420)
pwh has joined #ruby
<benzrf> >> 'thisisst11' =~ /\A.{9}11\Z/
<eval-in> benzrf => nil (https://eval.in/131421)
freakazoid0223 has left #ruby ["Ex-Chat"]
<benzrf> >> 'thisisstr10' =~ /\A.{9}11\Z/
<eval-in> benzrf => nil (https://eval.in/131422)
<benzrf> wait
<benzrf> derp
pu22l3r has quit [Remote host closed the connection]
<benzrf> >> '00thisisstr' =~ /\A00.{9}\Z/
<eval-in> benzrf => 0 (https://eval.in/131423)
<soheil> '00'.size == 11
<benzrf> regexes
pu22l3r has joined #ruby
zachallett has quit [Remote host closed the connection]
sputnik1_ is now known as sputnik13net
showaz has joined #ruby
jollyy has joined #ruby
<mozzarella> guys
jerius has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<mozzarella> how do I create a rake task that runs all of my tests?
smoores has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
<shevy> dunno
<shevy> I never had to use rake
<soheil> what gem do you use for active record read/write db separation?
<mozzarella> soheil: define separation
smoores has left #ruby ["Leaving"]
<mozzarella> fuck that iswop guy
<mozzarella> seriously
<soheil> slave/master
Vovko has quit [Remote host closed the connection]
angusigu1ss has quit [Ping timeout: 252 seconds]
dideler|work has quit [Ping timeout: 255 seconds]
<mozzarella> soheil: what do you want to do?
dideler|work has joined #ruby
<horrorvacui> mozzarella: what are you testing with rspec or what?
blackavr has joined #ruby
<mozzarella> horrorvacui: no, minitest
<noob101> I love ruby.
<soheil> balance load on our db servers
claymore has joined #ruby
<soheil> send reads to slaves and writes to master
pu22l3r has quit [Remote host closed the connection]
keeguon has joined #ruby
zz_jrhorn424 is now known as jrhorn424
testcore has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
testcore has joined #ruby
pu22l3r has joined #ruby
smoores has joined #ruby
jollyy has quit [Quit: jollyy]
nooteh has quit [Quit: Leaving.]
marr has joined #ruby
<soheil> mozzarella: any ideas?
selina345 has left #ruby [#ruby]
Kryptonical has joined #ruby
<samfisher> can I easily integrate Ruby on serverside apps? Something easy, PHP-like?
<horrorvacui> mozzarella: look up rake TestTask
brain_shim has joined #ruby
cj3kim has joined #ruby
zommi has joined #ruby
smoores has left #ruby ["Leaving"]
<mozzarella> samfisher: yes
<samfisher> mozzarella: pls show me
<mozzarella> soheil: wait a minute
mengu has quit [Remote host closed the connection]
<soheil> _Andres: hey
<horrorvacui> mozzarella: here is a good link for an example http://crashruby.com/2013/05/10/running-a-minitest-suite/
<mozzarella> samfisher: well, say you're using sinatra, all you have to do is run the app and make sure you're using the production environment
<_Andres> soheil: Hello
nilsove has quit [Read error: Operation timed out]
nilsove has joined #ruby
Jeticus has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
<horrorvacui> mozzarella: Half way down the page is what I used last time I did any rake
<mozzarella> soheil: you can have multiple connections, do you know how?
zigomir has joined #ruby
<soheil> mozzarella: shards.yml?
<mozzarella> I think the port you're using to connect to the database indicates if it's read-only or not
<shevy> noob101 hah I remember you
Vovko has joined #ruby
<shevy> noob101 you wrote many times before that now is the time that you will learn ruby
<shevy> since a few years now right ;)
<noob101> shevy who? me? I started ruby some months ago lol!
<noob101> However I know more now which was great.
CaptainJet has quit [Ping timeout: 240 seconds]
<noob101> I also remember you cause you helped me! :)
xcv has quit [Remote host closed the connection]
<soheil> mozzarella: is that right?
SCommette has quit [Quit: SCommette]
xcv has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CaptainJet has joined #ruby
claymore has quit [Ping timeout: 255 seconds]
adlerdias has quit [Quit: Leaving]
<mozzarella> soheil: this will depend on how you setup your stuff I guess
<mozzarella> are you using ruby on rails?
<soheil> yes
carraroj has quit [Quit: Konversation terminated!]
Hanmac1 has joined #ruby
claymore has joined #ruby
CaptainJet has quit [Client Quit]
<mozzarella> or only activerecord standalone?
<soheil> mozzarella: ror
<mozzarella> well I suggest you ask in #rubyonrails
shabgard has joined #ruby
shabgard has joined #ruby
jkamenik has quit [Quit: Leaving.]
ktosiek has quit [Ping timeout: 240 seconds]
Jeticus has quit [Ping timeout: 252 seconds]
Nukepuppy has quit [Ping timeout: 252 seconds]
popl has quit [Ping timeout: 240 seconds]
samfisher has quit [Quit: exit error code 434]
dgaffney has joined #ruby
xcv_ has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
Jon30 has joined #ruby
wuest has quit [Quit: :q]
andrewlio has joined #ruby
wuest has joined #ruby
ascarter has joined #ruby
rylev has joined #ruby
ascarter has quit [Max SendQ exceeded]
Morkel has quit [Quit: Morkel]
xcv has quit [Read error: Connection reset by peer]
jollyy has joined #ruby
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
nooteh has joined #ruby
Nogbit has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
cescalante is now known as ce_afk
brain_shim has quit [Remote host closed the connection]
ascarter has joined #ruby
james_d_h has quit [Quit: Lost terminal]
freerobby has joined #ruby
CaptainJet has joined #ruby
wjlafrance has quit [Quit: This computer has gone to sleep]
r_rios has quit [Ping timeout: 240 seconds]
nooteh has quit [Client Quit]
shredding has joined #ruby
rylev has quit [Ping timeout: 255 seconds]
cj3kim has quit [Remote host closed the connection]
wjlafrance has joined #ruby
cj3kim has joined #ruby
zigomir has quit [Remote host closed the connection]
jollyy has quit [Quit: jollyy]
monkegjinni has joined #ruby
monkegjinni has quit [Remote host closed the connection]
arianit has quit [Ping timeout: 240 seconds]
zigomir has joined #ruby
arianit has joined #ruby
arianit has joined #ruby
arianit has quit [Changing host]
zigomir has quit [Read error: Connection reset by peer]
jamto11 has joined #ruby
zigomir has joined #ruby
cj3kim has quit [Remote host closed the connection]
Speed has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
davy__ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
soheil has quit []
mrbrdo has quit [Quit: mrbrdo]
larsam has quit [Ping timeout: 264 seconds]
<mozzarella> horrorvacui: thank you, I went with the last one
SCommette has joined #ruby
pwh has quit []
kevind has quit [Quit: kevind]
danshultz has quit [Remote host closed the connection]
evenix_ has joined #ruby
bilbo_swaggins has joined #ruby
freezey has joined #ruby
danshultz has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davy_ has quit [Ping timeout: 255 seconds]
ixti has quit [Read error: No route to host]
glide has joined #ruby
Vovko has quit []
<glide> Hey guys, Can anyone help me with a Ruby Koan?
<bilbo_swaggins> which
keeguon has quit [Quit: keeguon]
<glide> about_triangle_project_2 on the online version.
evenix has quit [Ping timeout: 240 seconds]
francisfish has quit [Remote host closed the connection]
evenix_ has quit [Ping timeout: 255 seconds]
danshultz has quit [Ping timeout: 240 seconds]
nisstyre has joined #ruby
shredding has quit [Quit: shredding]
chrisseaton has quit []
arianit has quit [Quit: Leaving]
<jhass> do not crosspost
<jhass> or at least tell that you do
agarie has quit [Quit: Leaving...]
<bilbo_swaggins> ooooh busted
wjlafrance has quit [Quit: This computer has gone to sleep]
kirun has quit [Quit: Client exiting]
bilbo_swaggins has quit [Quit: Leaving]
kpshek has quit []
duggiefresh has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
JacobHayes has joined #ruby
Squarepy has joined #ruby
<railzForDaiz> can someone tell me why this wold not work
<railzForDaiz> test_text = 'RubyMonk Is Pretty Brilliant'
<railzForDaiz> nash = test_text.match(/ ./)
<railzForDaiz> nash.to_s
<railzForDaiz> number = test_text.index('nash')
<railzForDaiz> number.to_i
<railzForDaiz> freedom = test_text.match(/ ./, number)
<railzForDaiz> puts "#{freedom}"
deadlock has quit [Read error: Connection reset by peer]
tjr9898 has quit []
<railzForDaiz> test_text = 'RubyMonk Is Pretty Brilliant'
<railzForDaiz> nash = test_text.match(/ ./)
mikepack has joined #ruby
<railzForDaiz> nash.to_s
<railzForDaiz> number = test_text.index('nash')
<railzForDaiz> number.to_i
<crome> how about no
<railzForDaiz> freedom = test_text.match(/ ./, number)
<railzForDaiz> puts "#{freedom}"
ikawnoclast has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
<zchrykng-work_> pastebin much?
zchrykng-work_ is now known as zchrykng-work
<jhass> railzForDaiz: /topic
<railzForDaiz> sorry
nolic has quit [Quit: Lost terminal]
<toretore> to_s and to_i do not mutate
<railzForDaiz> what yo mean ?
<railzForDaiz> mutate
<railzForDaiz> I'm new
<jhass> also what's your expected and what's your actual result
<toretore> change
phansch has joined #ruby
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
<jhass> >> s = '123'; s.to_i; [s, s.class, s.to_i.class]
<eval-in> jhass => ["123", String, Fixnum] (https://eval.in/131430)
doodlehaus has joined #ruby
kitak has quit [Remote host closed the connection]
<railzForDaiz> 'RubyMonk Is Pretty Brilliant'.match(/ ./, 9)
Hanmac has joined #ruby
kitak has joined #ruby
<toretore> first, explain wth you're trying to do there
<toretore> >> 'RubyMonk Is Pretty Brilliant'.match(/ ./, 9)
<eval-in> toretore => #<MatchData " P"> (https://eval.in/131431)
<railzForDaiz> instead of putting 9 in manually
supermarin__ has joined #ruby
kpshek has joined #ruby
<toretore> >> 'RubyMonk Is Pretty Brilliant'.index('nash')
<eval-in> toretore => nil (https://eval.in/131432)
<toretore> someone kill that spamming dickbag
davy__ has quit [Remote host closed the connection]
<jhass> toretore: have fun getting explained by #freenode that spam is your problem
<toretore> eh. surely the operators of a channel can choose to ban a spammer
CreativeEmbassy has quit [Quit: FO SHO]
Hanmac1 has quit [Ping timeout: 240 seconds]
<jhass> this one won't
<centrx> I think there is only one active op in this channel, and he says he can't ban in channel for spam sent by private message
<toretore> but who is making that decision?
supermarin__ has quit [Client Quit]
<toretore> apeiros: ^?
doodleha_ has quit [Ping timeout: 252 seconds]
supermarin_ has quit [Ping timeout: 240 seconds]
zommi has quit [Remote host closed the connection]
<centrx> toretore, Yes
sailias has quit [Quit: Leaving.]
supermarin__ has joined #ruby
yubrew has quit [Remote host closed the connection]
<toretore> no, i mean i thought apeiros could chime in himself if he wanted to
cj3kim has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
<centrx> toretore, It might be something fflush told him, but fflush is never here now
<toretore> if he's not making the final decision
<toretore> ok
<toretore> so it's out of his hands, and the guy whose hands it's in isn't here
<jhass> I think it's his own decision
Azure has quit [Quit: My MBP went to sleep.]
obs has quit [Quit: Konversation terminated!]
Shidash has joined #ruby
claymore has quit [Quit: Leaving]
hermanmunster has quit [Ping timeout: 240 seconds]
supermarin__ has quit [Ping timeout: 255 seconds]
cj3kim has quit [Remote host closed the connection]
timonv has joined #ruby
dgaffney has quit []
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pigzzcanfly has joined #ruby
einarj has joined #ruby
dewolfe has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
centrx has quit [Quit: All this computer hacking is making me thirsty]
sterlingcalder has joined #ruby
wjlafrance has joined #ruby
<apeiros> toretore: what?
centrx has joined #ruby
<dewolfe> Hey guys can anyone tell me how to patch 1.9.3 against CVE-2014-2525 with rvm?
linuxer1_ has joined #ruby
sterlingcalder has quit [Client Quit]
<jhass> just update your libyaml
WillAmes has joined #ruby
cj3kim has joined #ruby
feniix has joined #ruby
chrisseaton has joined #ruby
<feniix> hello I am trying to use RSpec::Puppet::Coverage and I keep gettin this error coverage_spec.rb:1:in `block in <top (required)>': uninitialized constant RSpec::Puppet::Coverage (NameError)
aspires_ has quit []
monkegjinni has joined #ruby
<feniix> i'd appreciate some pointer on how to look at that
evenix has joined #ruby
cj3kim has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 268 seconds]
linuxer1 has quit [Ping timeout: 255 seconds]
linuxer1_ is now known as linuxer1
joast has joined #ruby
<toretore> apeiros: we were just talking about the spammers, but my questions have been answered
wjlafrance has quit [Client Quit]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
monkegji_ has joined #ruby
postmodern has joined #ruby
afreidah1 has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
aspires has joined #ruby
monkegjinni has quit [Ping timeout: 240 seconds]
Kricir has quit [Remote host closed the connection]
joast has quit [Ping timeout: 240 seconds]
chipotle has quit [Quit: cya]
unstable has joined #ruby
zachallett has joined #ruby
kennym has quit [Quit: Leaving.]
phantummm has quit [Quit: phantummm]
davy_ has joined #ruby
phantummm has joined #ruby
phantummm has quit [Client Quit]
DrShoggoth has quit [Quit: Leaving]
matcouto has joined #ruby
supermarin__ has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
Joel has joined #ruby
<Joel> array of files, any of the files might be a glob, how can I check the files exist?
DarthGandalf has quit [Ping timeout: 240 seconds]
bricker has quit [Quit: leaving]
xcv_ has quit [Remote host closed the connection]
charliesome has joined #ruby
<iitywimwybmab> Joel: files.all? {|f| File.exist?(f) } .... http://www.ruby-doc.org/core-2.1.1/File.html#method-c-exist-3F
SCommette has quit [Quit: SCommette]
gigetoo has quit [Remote host closed the connection]
xcv has joined #ruby
<Joel> file doesn't work on globs, you have to use File.glob
kennym has joined #ruby
Azure has joined #ruby
<Joel> and I have no idea how to do a double block
<Joel> since File.glob returns an array
mengu has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
<shevy> can you convert it all into an array before using .all? ?
chuk has joined #ruby
<Joel> sorry, File.exists doesn't work on a pattern.
mengu has quit [Changing host]
mengu has joined #ruby
jxf has quit [Read error: Operation timed out]
gigetoo has joined #ruby
<centrx> Very strange
Cheets-X has quit [Ping timeout: 240 seconds]
mrmargolis has quit [Remote host closed the connection]
doodleha_ has joined #ruby
<Joel> so not really sure what to do
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
supermarin___ has joined #ruby
<Joel> is there a channel op around?
<Joel> two spammers in the channel
SCommette has joined #ruby
mengu has quit [Ping timeout: 240 seconds]
terrellt has quit [Ping timeout: 265 seconds]
zachallett has quit [Remote host closed the connection]
DarthGandalf has joined #ruby
rylev has joined #ruby
shabgard has quit [Quit: Aji maji la taraji]
linojon has quit [Quit: linojon]
freerobby has quit [Quit: Leaving.]
nari has quit [Ping timeout: 268 seconds]
<apeiros> Joel: ary.flat_map { |glob| Dir.glob(glob) }.any? …
phantummm has joined #ruby
mjs2600 has joined #ruby
doodlehaus has quit [Ping timeout: 255 seconds]
<Joel> apeiros, wow, will try, thanks.
supermarin__ has quit [Ping timeout: 255 seconds]
<apeiros> I doubt it'll help… but well…
iswop was kicked from #ruby by apeiros [iswop]
iswop has joined #ruby
<shevy> \o/
illumination was kicked from #ruby by apeiros [illumination]
illumination has joined #ruby
<shevy> wow
doodleha_ has quit [Ping timeout: 268 seconds]
<iitywimwybmab> Joel: files.all? {|f| Dir[f].present? }
<centrx> They're unstoppable!
<shevy> centrx lol
illumination was kicked from #ruby by apeiros [illumination]
iswop was kicked from #ruby by apeiros [iswop]
<shevy> centrx they were written in php
<centrx> Like the most vile demons
<iitywimwybmab> Joel: although you may not have a #present? method... basically if the array is not empty, they're there
Azure has quit [Quit: Blue Sky Fish]
meatherly has quit []
papasierra has quit [Remote host closed the connection]
<iitywimwybmab> >> Dir["*"]
<eval-in> iitywimwybmab => ["input-fc29a2198e6e", "source-fc29a2198e6e", "output-fc29a2198e6e"] (https://eval.in/131443)
yubrew has joined #ruby
robert_ has quit [Read error: Connection reset by peer]
ixti has joined #ruby
railzForDaiz has left #ruby [#ruby]
rylev has quit [Ping timeout: 252 seconds]
saarinen has quit [Quit: saarinen]
meatherly has joined #ruby
phantummm has quit [Quit: phantummm]
saarinen has joined #ruby
phantummm has joined #ruby
dkpi has quit [Read error: Connection reset by peer]
Speed has joined #ruby
michaeldeol has joined #ruby
klaut has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
djbender has quit [Quit: djbender]
robert_ has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
chichou has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
rahult has joined #ruby
Celm has quit []
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enebo has quit [Quit: enebo]
cj3kim has joined #ruby
chipotle has joined #ruby
phantummm has quit [Ping timeout: 252 seconds]
Speed has quit [Ping timeout: 240 seconds]
Celm has joined #ruby
teddyp1cker has quit [Ping timeout: 240 seconds]
SCommette has quit [Quit: SCommette]
GaryOak__ has joined #ruby
einarj has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
f0ster` is now known as f0ster
f0ster has quit [Changing host]
f0ster has joined #ruby
kennym has quit [Quit: Leaving.]
dstynchula has quit []
riotjones has quit [Ping timeout: 255 seconds]
lolmaus has quit [Ping timeout: 252 seconds]
riotjones has joined #ruby
dr0ff has joined #ruby
geggam has quit [Remote host closed the connection]
phansch has quit [Quit: WeeChat 0.4.2]
mary5030 has joined #ruby
jrhorn424 is now known as zz_jrhorn424
mercwithamouth has joined #ruby
mary5030 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
jobewan has quit [Quit: Leaving]
Kricir has joined #ruby
Xeago has joined #ruby
chipotle has quit [Quit: cya]
abdulsattar has quit [Ping timeout: 252 seconds]
mary5030 has joined #ruby
bilbo_swaggins has joined #ruby
zigomir has quit [Remote host closed the connection]
bilbo_swaggins has quit [Client Quit]
<Joel> so, trying to stick with the spirit of the code I'm trying to fix, this is what I have: if missing_file = files.detect { |f| Dir.glob(f) { |fg| !File.exists?(fg) }}
zigomir has joined #ruby
george2 has quit [Remote host closed the connection]
<Joel> The only issue in this case is if a file doesn't exist that's in files it doesn't return nil
kpshek has quit []
feniix has quit [Quit: leaving]
dblessing has quit [Quit: dblessing]
garndt has quit [Quit: Connection closed for inactivity]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Joel> I think detect is the issue in this case
george2 has joined #ruby
<jhass> hm, Dir.glob(f).any? {|fg| File.exists?(fg) } I think
<dr0ff> it return false
siwica has joined #ruby
fabrice31 has quit [Ping timeout: 268 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 240 seconds]
<jhass> er, !File.exists?(fg) still
<Joel> The trick is getting back what file, if any, is missing.
linuxer1 has quit [Quit: linuxer1]
hermanmunster has joined #ruby
<dr0ff> File.exists?(fg) || nil
rahult has joined #ruby
cj3kim has quit [Remote host closed the connection]
<jhass> files contains glob patterns?
freezey has quit [Ping timeout: 255 seconds]
<Joel> yes
<jhass> do you need to optimize for first match?
zigomir has quit [Ping timeout: 255 seconds]
<Joel> nope
<jhass> files.map {|pattern| Dir.glob(pattern }.flatten.find {|f| !File.exists?(f) }
bronson has joined #ruby
<Joel> I don't think that spits back a non match file?
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Speed has joined #ruby
Martxel has quit [Ping timeout: 240 seconds]
<jhass> actually glob shouldn't even return anything if the file doesn't exists
taf2 has quit [Quit: taf2]
<jhass> so files.find {|pattern| Dir.glob(pattern).empty? }
SCommette has joined #ruby
s2013 has quit [Ping timeout: 240 seconds]
mjs2600 has quit [Remote host closed the connection]
olivier_bK has joined #ruby
<Joel> jhass, hot
<Joel> jhass, want to make out?
Kricir has quit [Remote host closed the connection]
matcouto has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspires has quit []
mansi_ has quit [Remote host closed the connection]
supermarin___ has quit [Read error: Connection reset by peer]
supermarin___ has joined #ruby
mansi has joined #ruby
<iitywimwybmab> jhass: Dir.glob(x) vs Dir[x] ... why one over the other?
<jhass> style
<jhass> I don't care too much about this one
Jinkins has quit [Quit: This computer has gone to sleep]
mjs2600 has joined #ruby
mercwithamouth has joined #ruby
<iitywimwybmab> I suppose I'd care if you said "performance"
chipotle has joined #ruby
rayners has quit [Ping timeout: 268 seconds]
wallerdev has quit [Quit: wallerdev]
ctp has joined #ruby
<jhass> ah, apparently Dir[pattern] calls Dir.glob(pattern, 0)
mansi has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
havenwood has joined #ruby
horofox_ has joined #ruby
aspires has quit [Client Quit]
twiceaday has quit [Ping timeout: 252 seconds]
twiceaday has joined #ruby
Martxel has joined #ruby
pwh has joined #ruby
siwica has quit [Ping timeout: 240 seconds]
horofox_ has quit [Client Quit]
brunops has joined #ruby
ascarter has joined #ruby
monkegji_ has quit [Remote host closed the connection]
ascarter has quit [Max SendQ exceeded]
rm_ has quit [Disconnected by services]
Jon30 has quit [Remote host closed the connection]
bryanculver has quit [Quit: Connection closed for inactivity]
Jon30 has joined #ruby
ascarter has joined #ruby
siwica has joined #ruby
rm__ has joined #ruby
tjr9898 has joined #ruby
aspires has joined #ruby
RealMarc is now known as Marc
joast has joined #ruby
Marc is now known as Guest746
m8 has quit [Quit: Sto andando via]
olivier_bK has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
jhass is now known as jhass|off
bricker has joined #ruby
mary5030_ has joined #ruby
osvico has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Ping timeout: 268 seconds]
thrillagorilla has quit [Remote host closed the connection]
ndrei has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
Chronocity has quit [Ping timeout: 268 seconds]
zachallett has joined #ruby
andrewlio has quit [Quit: Leaving.]
kennym has joined #ruby
dkamioka has quit [Remote host closed the connection]
sailias has joined #ruby
olivier_bK has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
horofox_ has joined #ruby
nisstyre has quit [Quit: bai]
shinobi_one has joined #ruby
siwica has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
tjr9898 has quit [Remote host closed the connection]
boombadaroomba has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
RaptorJesus has joined #ruby
apeiros has joined #ruby
mjs2600 has quit [Remote host closed the connection]
bricker_ has joined #ruby
bricker has quit [Ping timeout: 255 seconds]
siwica has joined #ruby
glide has quit [Quit: Leaving]
chipotle has joined #ruby
jorts has quit [Quit: jorts]
yubrew has joined #ruby
aspires has quit []
mercwithamouth has joined #ruby
pedrocr has left #ruby [#ruby]
supermarin___ has quit [Quit: Computer has gone to sleep.]
andy__ has quit [Remote host closed the connection]
eka has quit [Ping timeout: 268 seconds]
rylev has joined #ruby
ctp_ has joined #ruby
siwica has quit [Ping timeout: 240 seconds]
ctp has quit [Read error: Connection reset by peer]
jorts has joined #ruby
arubincloud has quit []
Jonah11_ has joined #ruby
RowdyChildren is now known as RowdyChild|Away
yubrew has quit [Ping timeout: 268 seconds]
joast has quit [Quit: Leaving.]
<Jonah11_> say you building an array to track numbers you have already seen. when you encounter a new number, you will use the array solely to search and check if the new number is already there. is an array, hash, or some other structure fastest for this in ruby?
rylev has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
horofox_ has quit [Quit: horofox_]
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ce_afk is now known as cescalante
Vovko has joined #ruby
Vovko has quit [Remote host closed the connection]
<shinobi_one> Jonah11_: hashes are fizast
chrisseaton has quit []
<shinobi_one> Jonah11_: how many numbers are you dealing with?
chipotle has quit [Quit: cya]
ffranz has quit [Quit: Leaving]
<Jonah11_> shinobi_one, thousands, maybe 10k, not that many... if i use a hash, would i just be putting in keys with nil values, since i only care about key existence?
doodlehaus has joined #ruby
chipotle has joined #ruby
larissa has joined #ruby
pskosinski has joined #ruby
charliesome has joined #ruby
GaryOak__ has quit [Remote host closed the connection]
pigzzcanfly has quit [Remote host closed the connection]
supermarin___ has joined #ruby
supermarin___ has quit [Remote host closed the connection]
<kbarry> i got the following.
supermarin___ has joined #ruby
doodlehaus has quit [Ping timeout: 240 seconds]
mary5030_ has quit [Remote host closed the connection]
eka has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
bricker_ is now known as bricker
yfeldblum has joined #ruby
AndChat- has quit [Ping timeout: 240 seconds]
fijimunkii has quit [Ping timeout: 240 seconds]
ctp_ has quit [Ping timeout: 240 seconds]
wald0 has quit [Quit: Lost terminal]
dtcrshr has quit [Quit: Saindo]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mehlah has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
sski has joined #ruby
<BraddBitt> can I create a Logger object that writes to both STDOUT as well as a specific log file?
Hanmac has quit [Ping timeout: 252 seconds]
nateberkopec has quit [Quit: Leaving...]
yfeldblum has quit [Ping timeout: 255 seconds]
predator117 has quit [Ping timeout: 268 seconds]
<lupine> sure
<lupine> or you could use tee
St_Marx has quit [Quit: Ex-Chat]
<BraddBitt> how would i do it with ruby's native Logger class?
predator117 has joined #ruby
shinobi_one has quit [Quit: shinobi_one]
<lupine> i'd tell it to log to stdout then call my-program | tee logfile. otherwise, just build an IOArray class that duplicates writes to multiple fds, and create the logger around that, I guess
Hanmac has joined #ruby
zz_jrhorn424 is now known as jrhorn424
<lupine> you probably just need to intercept #write, I don't know offhand
mjs2600 has joined #ruby
nateberkopec has joined #ruby
St_Marx has joined #ruby
timonv has joined #ruby
shinobi_one has joined #ruby
rainmanjam has quit [Remote host closed the connection]
xcv_ has joined #ruby
Hobogrammer has quit [Quit: WeeChat 0.4.3]
joast has joined #ruby
Geniack has quit [Disconnected by services]
Geniack_ has joined #ruby
ctp has joined #ruby
xcv_ has quit [Remote host closed the connection]
pu22l3r has joined #ruby
timonv has quit [Ping timeout: 268 seconds]
xcv_ has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
chipotle_ has joined #ruby
xcv has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 240 seconds]
xcv has joined #ruby
chipotle has quit [Ping timeout: 240 seconds]
<LiquidInsect> BraddBitt: so... this is an ugly hack I did, and works with Rails.logger and not the native one, but a similar pattern might do what you want... https://github.com/babney/log_raider/blob/master/lib/log_raider.rb
xcv has quit [Remote host closed the connection]
xcv_ has quit [Read error: Connection reset by peer]
<LiquidInsect> this was intended to log errors to Rails.logger and also send them to NewRelic... like I said, similar pattern
xcv has joined #ruby
<BraddBitt> awesome, looks good
<BraddBitt> also is it particularly bad to have a global logger object?
xcv_ has joined #ruby
rylev has joined #ruby
JacobHayes has quit [Remote host closed the connection]
habanany has joined #ruby
<BraddBitt> like in my kick off initialization method create @@logger = Logger.new
pu22l3r has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
cj3kim has joined #ruby
terrellt has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.3]
ctp_ has joined #ruby
<dgarstang> If I'm trying to use chef search with chef zero, is there a way I can 'fool' the recipe into thinking chef search returns data?
Guedes0 has joined #ruby
Bumptious has quit [Remote host closed the connection]
Guedes0 has left #ruby [#ruby]
xcv has quit [Ping timeout: 240 seconds]
Guedes has joined #ruby
Guedes has left #ruby [#ruby]
_Andres has quit [Read error: Connection reset by peer]
ctp has quit [Ping timeout: 240 seconds]
spicerack has joined #ruby
jgoss has joined #ruby
jxf has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
ndrei has quit [Quit: Lost terminal]
centrx has quit [Quit: All this computer hacking is making me thirsty]
mjs2600 has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
fflush has joined #ruby
dstynchula has joined #ruby
<dgarstang> If I'm trying to use chef search with chef zero, is there a way I can 'fool' the recipe into thinking chef search returns data?
nanoyak has joined #ruby
<dgarstang> or, put another way, how do I use chef search with solo and vagrant?
ctp_ has quit [Ping timeout: 245 seconds]
aspires has joined #ruby
terrellt_ has joined #ruby
bricker has quit [Quit: leaving]
ndrei has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
terrellt_ has quit [Client Quit]
pwh has quit []
maletor has quit [Quit: Computer has gone to sleep.]
sqwirl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lkba has joined #ruby
ctp has joined #ruby
yubrew has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
Naoe_Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
maletor has joined #ruby
mjs2600 has joined #ruby
joelbrewer has joined #ruby