apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p362: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
delinquentme has quit [Quit: Leaving]
_nitti has quit [Remote host closed the connection]
_nitti has joined #ruby
jds has joined #ruby
slainer68 has joined #ruby
adeponte has joined #ruby
jds has quit [Ping timeout: 252 seconds]
butblack has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
alex20032 has quit [Ping timeout: 245 seconds]
Pip has quit [Ping timeout: 265 seconds]
RagingDave has joined #ruby
<ruzu> send()
viuo has quit [Ping timeout: 255 seconds]
Virunga_ has joined #ruby
MattRb has joined #ruby
crackfu has joined #ruby
sepp2k has quit [Remote host closed the connection]
Virunga has quit [Ping timeout: 260 seconds]
crackfu has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
MattRb has quit [Ping timeout: 272 seconds]
MattRb has joined #ruby
viuo has joined #ruby
matchaw_ has joined #ruby
|Monie| has joined #ruby
jsaak has quit [Remote host closed the connection]
|Monie| has quit [Client Quit]
jaygen has quit [Read error: Operation timed out]
kenichi_ has quit [Quit: leaving]
jaygen has joined #ruby
pskosinski has quit [Quit: Learn Life's Little Lessons]
Jamone has quit [Ping timeout: 255 seconds]
IcyDragon has quit [Ping timeout: 272 seconds]
butblack has quit [Quit: butblack]
butblack has joined #ruby
rellin has quit [Ping timeout: 246 seconds]
quest88 has quit [Quit: quest88]
Russell^^ has quit [Quit: Russell^^]
jeffreybaird has quit [Quit: jeffreybaird]
h4mz1d has quit [Ping timeout: 252 seconds]
griffindy has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby
Gues_____ has joined #ruby
atno has quit [Quit: Leaving...]
atno has joined #ruby
BoomCow has joined #ruby
mockra has quit [Remote host closed the connection]
<Gues_____> hello, has anyone used the carrierwave gem before?
jimeh has quit [Quit: Computer has gone to sleep.]
butblack has quit [Quit: butblack]
yfeldblum has quit [Ping timeout: 272 seconds]
aedorn has quit [Quit: Leaving]
rvmeier has joined #ruby
lolcathost has quit [Ping timeout: 246 seconds]
benlieb has joined #ruby
_huoxito has quit [Ping timeout: 272 seconds]
huoxito has quit [Ping timeout: 272 seconds]
lolcathost has joined #ruby
lolcathost has quit [Client Quit]
jimeh has joined #ruby
joofsh has quit [Remote host closed the connection]
piotr_ has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
alex20032 has joined #ruby
sailias has quit [Quit: Leaving.]
<alex20032> Well, i just just saw that twitter dont use ruby anymore, since like 2 year....
lolcathost has joined #ruby
adeponte has quit [Remote host closed the connection]
<Norrin> So they switched to what?
wroathe has quit [Ping timeout: 240 seconds]
<alex20032> scala
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
taoru has joined #ruby
miskander has quit [Quit: miskander]
adeponte has joined #ruby
MattRb has quit [Quit: MattRb]
alex20032 has quit [Ping timeout: 245 seconds]
pcarrier has quit []
gyre008_ has joined #ruby
breakingthings has joined #ruby
<breakingthings> any curses-familiar folks around?
gyre008 has quit [Ping timeout: 260 seconds]
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
cheese1756 has quit [Ping timeout: 245 seconds]
wendallsan has joined #ruby
jduan1981 has quit [Remote host closed the connection]
jduan1981 has joined #ruby
mockra has joined #ruby
cheese1756 has joined #ruby
yshh has joined #ruby
horofox has joined #ruby
huoxito has joined #ruby
_huoxito has joined #ruby
Zolrath has quit []
AndIrc_3 is now known as r3nrutx
alex20032 has joined #ruby
<alex20032> Well, again, i lost connection
serhart has joined #ruby
<alex20032> So, from what i read, twitter dont use ruby anymore except for the interface of their site
<alex20032> Now everything is in scala
<alex20032> Because of speed purpose
daniel_- has quit [Ping timeout: 276 seconds]
<alex20032> But from what i read, they alway liked ruby, and if there was no speed problem, they would have surely continued using it
RagingDave has quit [Quit: Ex-Chat]
<clooth> and then it was.
Gues_____ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
_nitti has joined #ruby
gyre008_ has quit [Remote host closed the connection]
<alex20032> Well, currently, there is 4 language i want to experiement to do a website with... Scala, Ruby, Haskell and PHP
<alex20032> the first 3 have web framework
<alex20032> well, php dont need any framework
andrewhl has joined #ruby
jslowe has quit [Ping timeout: 264 seconds]
_nitti has quit [Ping timeout: 260 seconds]
<ruzu> twitter has needs that 99% of web companies will never encounter
<alex20032> So you mean that 99% of people should use ruby, while 1% of site, like twitter, facebook, google... use something faster
emmanuelux has quit [Remote host closed the connection]
alanjf has joined #ruby
<emocakes> lol
<emocakes> same with linked in
<emocakes> they moved their api to node.js
<emocakes> using the right tool for the job
pskosinski has joined #ruby
<emocakes> alex20032, there is no silver bullet language
<alanjf> Hello. I'm attempting to build 1.9.3-p362 from source. When I get to running 'make', it exits with "make: *** [doc/capi/.timestamp] Error 1"
<emocakes> except from C
<alanjf> Google hasn't been any help, so any help would be appreciated here.
<alanjf> I'm building under Linux, i686
<alex20032> linked in????
<alex20032> what is that?
cheese1756 has quit [Changing host]
cheese1756 has joined #ruby
<emocakes> linkedin
<alanjf> what the hell is linkedin
<emocakes> lol
<alanjf> oh
<pdtpatrick> alanjf: https://rvm.io/
<alanjf> Anyone have any idea why make is failing?
* alanjf follows link
gabrielrotbart has quit [Remote host closed the connection]
Guest53544 has quit [Quit: Leaving]
sailias has joined #ruby
statarb3 has quit [Ping timeout: 272 seconds]
jesse has quit [Excess Flood]
jesse has joined #ruby
butblack has joined #ruby
<alanjf> pdtpatrick: thanks, but the url that they are using with curl bombs with 'error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed', looks like they have a forged cert?
* alanjf sees if he can find the curl equiv of wget's --no-check
Guedes has quit [Quit: Saindo]
<pdtpatrick> alan u can use wget or curl
jsaak has joined #ruby
<alanjf> Hmm, it's not the 'curl -L https://get.rvm.io' part that's doing that it seems
himsin has joined #ruby
MattRb has joined #ruby
<alanjf> ok ran it through wget and it downloaded rvm-installer, I assume I just run that?
jrajav has joined #ruby
<alanjf> I'm actually not sure what `bash -s stable --ruby` is actually doing there
Alenah has joined #ruby
<ruzu> the curl part is pulling a bash script down and the second portion is piping that script into bash to be interpreted
Alenah has quit [Excess Flood]
<alanjf> Ok, it's running ./rvm-installer that gives 'error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed'
<alanjf> ruzu: yeah I see now. Just never seen --ruby passed to bash but should have paid more attention to what came before it :p
<alanjf> Ok, looks like running rvm-installer just wants to download https://github.com/wayneeseguin/rvm/tarball/master via curl. I'll just do that part by hand
<alanjf> and 'master' is actually a tar.gz file without an file extensions
ale`` has joined #ruby
ale` has quit [Read error: Connection reset by peer]
<pdtpatrick> what's the benefit of doing it by hand?
joast has quit [Quit: Leaving.]
horofox has quit [Quit: horofox]
nomenkun has quit [Remote host closed the connection]
karupanerura has quit [Excess Flood]
<alanjf> pdtpatrick: Well I'm not sure what to do exactly since the `bash -s stable --ruby` part fails complaining about bad SSL certs
_huoxito has quit [Quit: Leaving]
karupanerura has joined #ruby
huoxito has quit [Quit: Leaving]
mahmoudimus has joined #ruby
wendallsan has quit [Remote host closed the connection]
<alanjf> I downloaded 'https://github.com/wayneeseguin/rvm/tarball/master' and decompressed/extracted it but I don't see a script called 'stable', so I'm not sure how to invoke what `bash -s stable --ruby` otherwise would?
fyolnish has joined #ruby
huoxito has joined #ruby
average_drifter has joined #ruby
<average_drifter> hey
TheFuzzball has quit [Read error: Connection reset by peer]
yshh_ has joined #ruby
TheFuzzball has joined #ruby
yshh has quit [Read error: Connection reset by peer]
joast has joined #ruby
TheFuzzball has quit [Client Quit]
kiyoura has quit [Ping timeout: 246 seconds]
jgrevich has joined #ruby
<shevy> alanjf why dont you download the zip file
jjbohn has joined #ruby
seejohnrun has joined #ruby
<shevy> this URL is a .tar.gz btw
seejohnrun has left #ruby [#ruby]
megha is now known as gia
_nitti has joined #ruby
main has joined #ruby
<shevy> did you try "./install"?
<alanjf> shevy: yes, I did downloaded it and extracted it, as I said already, and yes there is a install script and I tried passing '--ruby' to it but it would not take it.
anomaly has joined #ruby
MattRb has quit [Quit: MattRb]
tommyvyo has quit [Quit: Computer has gone to sleep.]
<shevy> and "./install" alone wont work for you? it installed to /usr/local/rvm/ for me
<alanjf> According to https://rvm.io/rvm/install, the original line is 'curl -L https://get.rvm.io | bash -s stable --ruby', but what is 'stable --ruby' being run against exactly?
jrajav has quit [Quit: I tend to be neutral about apples]
<alanjf> shevy: yes, it did install to /usr/local/rvm/, make ruby's make still fails
<shevy> "make: *** [doc/capi/.timestamp] Error 1"
<shevy> that make error is not very specific
<shevy> does it not state another error before that?
Umren|2 has joined #ruby
Hanmac1 has joined #ruby
gabrielrotbart has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
whitedawg has joined #ruby
whitedawg has quit [Client Quit]
whowantstolivef1 has quit [Ping timeout: 272 seconds]
wroathe has joined #ruby
Umren has quit [Ping timeout: 265 seconds]
tommyvyo has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
h4mz1d has joined #ruby
johnmilton has quit [Ping timeout: 244 seconds]
joofsh has joined #ruby
pskosinski has quit [Quit: Learn Life's Little Lessons]
lolcathost has quit [Read error: Connection reset by peer]
lolcathost has joined #ruby
pskosinski has joined #ruby
MattRb has joined #ruby
marienz has quit [Read error: Operation timed out]
Spooner has quit [Quit: Leaving]
marienz has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
whitedawg has joined #ruby
jaygen has quit [Remote host closed the connection]
anomaly has left #ruby ["Leaving"]
jduan1981 has quit [Ping timeout: 272 seconds]
fjfish has joined #ruby
adeponte has quit [Remote host closed the connection]
Alenah has joined #ruby
Alenah has quit [Excess Flood]
nathancahill has joined #ruby
francisfish has quit [Ping timeout: 265 seconds]
fir_ed has quit [Ping timeout: 272 seconds]
skcin7 has joined #ruby
kiyoura has joined #ruby
fir_ed has joined #ruby
h4mz1d has quit [Ping timeout: 276 seconds]
BoomCow has quit [Quit: This computer has gone to sleep]
<alanjf> shevy: back; here is what I get when I try `make` again: http://paste.debian.net/hidden/c03bd7e1/
alex20032 has left #ruby [#ruby]
_nitti has quit [Remote host closed the connection]
<nathancahill> hey, i'm learning ruby and inheriting some code to maintain
<nathancahill> should classes be defined within modules?
<nathancahill> all examples i've seen so far define the class outside of a module, then include 'module'
jbw has quit [Ping timeout: 276 seconds]
<shevy> alanjf seems something went wrong with the rdoc generation
ner0x has quit [Quit: Leaving]
<shevy> alanjf I never had that error when I compiled ruby
<shevy> perhaps its a RVM problem, but other people can install RVM fine, so I am not sure
<shevy> nathancahill include what module?
jaygen has joined #ruby
macmartine has joined #ruby
bigmac has quit [Quit: Leaving]
<nathancahill> my own modules
alvaro_o_ has joined #ruby
alvaro_o__ has quit [Read error: Operation timed out]
<nathancahill> is 1 or 2 better?
<nathancahill> or are they completely different?
<shevy> nathancahill aha
<shevy> they are not completely equivalent in their respective functionality
<shevy> in the first example, your class is namespaced in a module
rellin has joined #ruby
<shevy> MyModule::MyClass.new
<shevy> this is how you would call an instance
fir_ed has quit [Ping timeout: 246 seconds]
<shevy> in the second example, you do not use any surrounding namespace at all
<shevy> you merely define a module, and then have your class include that module
<nathancahill> ohh. that makes sense
<shevy> the main reason namespace is used is so that multiple classes of the same name, can reside in different namespaces
<shevy> if you would have: class Foo; end
oscardelben has joined #ruby
<shevy> and then you require another file, which also has class Foo; end, then a problem might exist, you see?
<nathancahill> yes, thanks, that makes sense now
<nathancahill> so can i define module level constants?
<nathancahill> that i could access from module classes?
<shevy> you can define constants in a module, then include that module into your class
<shevy> hmm not sure module have classes
MattRb has quit [Quit: MattRb]
<shevy> module Foo;end; Foo.class # => Module
<shevy> class Bar;end; Bar.class # => Class
<nathancahill> oh, modules just manage the namespace?
<nathancahill> classes don't pertain to modules?
<shevy> in some way... they are a bit like a crippled class
<shevy> you can actually use classes as namespace too
<shevy> class Foo; class Bar # Foo::New.new
DrCode has quit [Remote host closed the connection]
<shevy> oops
himsin has quit [Ping timeout: 272 seconds]
<shevy> oh yeah
<shevy> was confused for a moment
<shevy> class Foo; class Bar; end; end # Foo::Bar.new # => #<Foo::Bar:0xb6b45684>
<shevy> but most people will use a surrounding module
<nathancahill> ok, cool
<shevy> the simpler things are, the better really :)
mahmoudimus has quit [Quit: Computer has gone to sleep.]
MattRb has joined #ruby
DrCode has joined #ruby
<r3nrut> check out 'ruby for rails' by david black
<r3nrut> i think it's chapter 6 or 7 that explains all this in depth.
yale has quit [Ping timeout: 272 seconds]
Bosma has joined #ruby
<nathancahill> awesome, thanks
nomenkun has joined #ruby
shevy has quit [Read error: Operation timed out]
<r3nrut> chapter 5 & 6 :)
karasawa has joined #ruby
jbw has joined #ruby
<r3nrut> this is also a useful thread on the differences.... http://www.ruby-forum.com/topic/131715#587721
_nitti has joined #ruby
nomenkun has quit [Ping timeout: 246 seconds]
jjbohn has quit [Quit: Leaving...]
dantesun has quit [Quit: Leaving]
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
Virunga_ has quit [Remote host closed the connection]
MattRb has quit [Quit: MattRb]
love_color_text has joined #ruby
wroathe has quit [Ping timeout: 252 seconds]
love_color_text has quit [Remote host closed the connection]
kayloos has quit [Ping timeout: 255 seconds]
Zolrath has joined #ruby
nathancahill has quit [Quit: nathancahill]
Tomasso has quit [Read error: Connection reset by peer]
pskosinski has quit [Quit: Learn Life's Little Lessons]
kayloos has joined #ruby
Fezzler has joined #ruby
jjbohn has joined #ruby
shevy has joined #ruby
_nitti has quit [Remote host closed the connection]
emocakes has quit [Quit: emocakes]
_nitti has joined #ruby
butblack has quit [Quit: butblack]
drago757 has joined #ruby
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
lolcathost has joined #ruby
ttt has joined #ruby
_nitti has quit [Ping timeout: 240 seconds]
_nitti has joined #ruby
beilabs has joined #ruby
butblack has joined #ruby
Virunga has joined #ruby
fyolnish has quit [Read error: Connection reset by peer]
fyolnish has joined #ruby
fyolnish has quit [Read error: Connection reset by peer]
fyolnish has joined #ruby
yacks has quit [Ping timeout: 255 seconds]
baroquebobcat has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
renanoronfle has joined #ruby
subbyyy has quit [Ping timeout: 252 seconds]
crackfu has joined #ruby
BoomCow has joined #ruby
jjbohn has quit [Quit: Leaving...]
nathancahill has joined #ruby
butblack has quit [Quit: butblack]
jjbohn has joined #ruby
dnyy has joined #ruby
postmodern has joined #ruby
pencilcheck has quit [Remote host closed the connection]
rvmeier has quit [Quit: Leaving]
oscardelben has quit [Quit: oscardelben]
jjbohn has quit [Client Quit]
_hemanth_ has quit [Read error: Connection reset by peer]
jjbohn has joined #ruby
karasawa has quit [Ping timeout: 276 seconds]
butblack has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
whitedawg has quit [Quit: Leaving.]
whitedawg has joined #ruby
kayloos has quit [Ping timeout: 272 seconds]
adeponte has joined #ruby
Virunga has quit [Remote host closed the connection]
medik has quit [Quit: medik]
dankest has joined #ruby
sailias has quit [Quit: Leaving.]
joofsh has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
ben_ has joined #ruby
ben_ has left #ruby [#ruby]
hemanth_ has joined #ruby
milesforrest has joined #ruby
DrCode has joined #ruby
pen has joined #ruby
jduan1981 has joined #ruby
shevy has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
nathancahill has quit [Read error: Connection reset by peer]
nathancahill has joined #ruby
<reactormonk> Kovensky, even saying this has a bread already has a bread
nathancahill has quit [Read error: Connection reset by peer]
<reactormonk> s/bread/beard/
nathancahill has joined #ruby
karasawa has joined #ruby
yshh_ has quit [Ping timeout: 272 seconds]
yonahw has joined #ruby
CodeVision has quit [Ping timeout: 255 seconds]
oscardelben has joined #ruby
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
_nitti has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
stevechiagozie has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
MattRb has joined #ruby
karupanerura has quit [Excess Flood]
generalissimo has quit [Remote host closed the connection]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
lolcathost has joined #ruby
karasawa has quit [Ping timeout: 264 seconds]
yshh has joined #ruby
jjbohn is now known as jjbohn|afk
karupanerura has joined #ruby
crackfu_ has joined #ruby
jeffreybaird has joined #ruby
crackfu has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 272 seconds]
stopbit has quit [Quit: Leaving]
crackfu_ has quit [Remote host closed the connection]
crackfu has joined #ruby
nathancahill_ has joined #ruby
nathancahill has quit [Ping timeout: 276 seconds]
nathancahill_ is now known as nathancahill
jjbohn|afk has quit [Quit: Leaving...]
crackfu has quit [Ping timeout: 260 seconds]
pen has quit [Remote host closed the connection]
oscardelben has quit [Quit: oscardelben]
mneorr has joined #ruby
artifex has joined #ruby
Fezzler has quit [Quit: Leaving]
jgrevich has quit [Quit: jgrevich]
<r3nrut> Looking for some online reading material for more advances tips and techniques with Ruby. Any suggestions? Things like syntax shortcuts, one liner conditional statements and whatnot. Trying to put together a training guide for co-workers.
yshh has quit [Remote host closed the connection]
sayan has joined #ruby
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
maletor has joined #ruby
<reactormonk> r3nrut, do oneliners only if you go functional
<aytch> training people to use shortcuts - at least in my experience - is a bad idea
<aytch> I'm an amateur coder, but a long-time sysadmin
jekotia has quit [Read error: Connection reset by peer]
larissa has quit [Quit: Leaving]
Takehiro has joined #ruby
<reactormonk> aytch, could you got a little more specific?
<RubyPanther> I agree, most shortcuts are debt and will be paid with interest.
<aytch> Training someone to use a shortcut can give them an edge in doing things better, but if they haven't reached that shortcut through their own understanding, they are likely to make mistakes that they don't understand
breakingthings has quit []
benlieb has quit [Quit: benlieb]
<aytch> because they don't understand *why* the shortcut works, they can't think through the steps behind it
<aytch> and I'm totally in agreement with RubyPanther
yshh has joined #ruby
chimkan has joined #ruby
clooth has quit [Quit: clooth]
r0bby_ has joined #ruby
clooth has joined #ruby
<aytch> reactormonk: I would think a good way to teach this way of thinking/shortcuts would be to take a piece of code you've refactored, and present on that.
lolcathost has joined #ruby
<aytch> You can guide them through your changes, and your thinking behind those changes
MattRb has quit [Quit: MattRb]
<aytch> That gives context into the insight behind shortcuts
chimkan has quit [Remote host closed the connection]
chimkan_ has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
<RubyPanther> Ruby is mostly not good for one-liners unless you're already comfortable choosing it. For that most people should use Perl or bash, probably. I kept using Perl for sysadmin stuff until I forgot eventually forgot it from lack of use.
h4mz1d has joined #ruby
clooth has quit [Quit: clooth]
a_a_g has joined #ruby
zehrizzatti has joined #ruby
yacks has joined #ruby
_nitti has joined #ruby
_nitti has quit [Ping timeout: 260 seconds]
generalissimo has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
jjbohn has joined #ruby
mockra has quit [Remote host closed the connection]
<Norrin> I'm trying to understand line 48 of this file: https://github.com/vangberg/isaac/blob/master/lib/isaac/bot.rb
<Norrin> what does *channel specify there?
pavilionXP has joined #ruby
quest88 has joined #ruby
<Norrin> what type of object would that method be expecting?
MattRb has joined #ruby
<Norrin> and what does the * mean in that context
jds has joined #ruby
jjbohn has quit [Ping timeout: 272 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<Norrin> thanks
<Norrin> never would have guessed that. i'm thinking it s a pointer or some ish
<Norrin> that does lead me to another question. objects are passed in function calls? no need for pointers?
<Norrin> seems obvious objects are passed in function calls. so when are pointers used in ruby?
<dominikh> there are no pointers in ruby.
<Norrin> ah
<Norrin> good to know
otters has quit [Ping timeout: 264 seconds]
<Norrin> that's not a reference of operator?
<Norrin> address* of
<dominikh> no, it is not.
<Norrin> :-) what is it?
<dominikh> you should work through a basic ruby tour or a book, those are pretty basic features of the language :)
<dominikh> in this case, it's related to blocks
<Norrin> ok. i'll find a block chapter.
<dominikh> (fwiw, isaac isn't the best source for good ruby)
<Norrin> i've done a lot of intro ruby stuff actually
<dominikh> and what & does here is take a proc/lambda and treat it as a block
<Norrin> it's all too basic though
<Norrin> they always trying to turn it into some game
<Norrin> all the cutesy ruby intro the main site has linked
<dominikh> I'd probably just read the Pickaxe (aka Programming Ruby). learning ruby has been progressively dumbed down over the years; the book just describes the language features (and doesn't use a game for doing so)
kiyoura has quit [Quit: Leaving]
cha1tanya has joined #ruby
cha1tanya has joined #ruby
<X-Jester> welp
<X-Jester> if you can dodge a wrench, you can dodge a ball
<X-Jester> AMIRITE?
<Norrin> isaac happens to be the only intro level project i have a need for ruby in
<Norrin> the lacking docs force me to read it
<dominikh> doesn't mean it's well written ;) but yeah
yacks has quit [Ping timeout: 260 seconds]
mockra has joined #ruby
stonevil has quit [Quit: stonevil]
CamonZ has joined #ruby
cheez0r has quit [Read error: Operation timed out]
cheez0r has joined #ruby
<dominikh> bedtime for me. good luck with ruby
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<Norrin> dominikh, good night
a_a_g has quit [Quit: Leaving.]
ejnahc has quit [Remote host closed the connection]
ejnahc has joined #ruby
dankest is now known as dankest|away
dankest|away has quit [Quit: Leaving...]
jjbohn has joined #ruby
dankest has joined #ruby
drago757 has quit [Quit: drago757]
jjbohn has quit [Ping timeout: 245 seconds]
landho has quit [Remote host closed the connection]
CodeVision has joined #ruby
Takehiro_ has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<Norrin> can anyone tell me why line 89 has *handler instead of handler? https://github.com/vangberg/isaac/blob/master/lib/isaac/bot.rb
zv470 has quit [Ping timeout: 260 seconds]
zv470 has joined #ruby
aldodelgado has joined #ruby
DrCode has quit [Remote host closed the connection]
milesforrest has left #ruby [#ruby]
toekutr has quit [Remote host closed the connection]
DrCode has joined #ruby
<zehrizzatti> Norrin: it's getting 2 values from the array
jonahR has quit [Quit: jonahR]
<zehrizzatti> a, b = *[1, 2] --> a = 1, b = 2
<zehrizzatti> something like that :p
lolcathost has quit [Ping timeout: 260 seconds]
<Norrin> so * and & are basically just toggles?
<Norrin> changes an array to elements and elements to an array?
<Norrin> and changes a proc to a block and a block to a proc?
<zehrizzatti> * has to do with arrays, and & with blocks/procs
<Norrin> never seen a toggle operator before in a programming language
BoomCow has quit [Quit: Leaving]
<Norrin> its purpose seems to alternate
<zehrizzatti> what's the & example?
<zehrizzatti> u refer to
dankest is now known as dankest|away
dankest|away has quit [Quit: Leaving...]
<Norrin> lines 23 and 104
skcin7 has quit []
<Norrin> near as i can tell, line 23 turns a block to a proc, but line 104 uses the same operator to turn a proc into a block
dwu1 has joined #ruby
<Norrin> "toggle operator"
<zehrizzatti> both are & for blocks/procs
<zehrizzatti> yep
<Norrin> wow
<zehrizzatti> it's complicated :D
<Norrin> anyone else find this amazing? an operator whose purpose changes....
<zehrizzatti> the thing is, in L23, it is a bit different because it is in a method definition
a_a_g has joined #ruby
<zehrizzatti> so that says u want to capture the passed in block as an argument, named "block"
<Norrin> if it was that simple, there'd be no & though?
<Norrin> the & seems to mean, change the class from block to proc
<zehrizzatti> in L104 your saying, "send this message, :define_method with arguments :isaac... and that callable block"
<Norrin> if block was a class. i don't see it in ruby doc
<zehrizzatti> the block is an instance of Proc
<zehrizzatti> which is the callable I meant
<Norrin> zehrizzatti, what does 103 do?
<zehrizzatti> Norrin: dude, sure u need to understand that?
<zehrizzatti> lol
<Norrin> actually i'm having a problem that might be related to it
<Norrin> #{channel} isn't resolving from on join methods, if you know what i mean
<zehrizzatti> hang on, let me check what that project is about.
aldodelgado has quit [Quit: aldodelgado]
<Norrin> correction, #{channel} doesn't resolve from the the bot::join method
<Norrin> but it does resolve from dsl defined on join methods,
s7ry93r has quit [Quit: s7ry93r]
rakl has quit [Read error: Connection reset by peer]
rakm has quit [Read error: Connection reset by peer]
clooth has joined #ruby
serhart has quit [Quit: Leaving.]
<zehrizzatti> well, basically, L103 gets u a reference to the class of the object and L104 will define a function on the fly that will handle some action for u, during runtime
jjbohn has joined #ruby
browndawg has joined #ruby
<Norrin> adds self to class? and then self by itself. and then end
shevy2 has joined #ruby
<Norrin> end with no do
<Norrin> << is append?
lolcathost has joined #ruby
tagrudev has joined #ruby
<zehrizzatti> no, it's a contrived syntax to return that "self", the reference to that class it needs
shevy has joined #ruby
Takehiro has joined #ruby
Takehiro_ has quit [Read error: Connection reset by peer]
<zehrizzatti> Norrin: what problem do you have?
rakm has joined #ruby
rakl has joined #ruby
<Norrin> i'll paste it to a pastebin
<zehrizzatti> sure
jjbohn has quit [Ping timeout: 264 seconds]
xpen has joined #ruby
<Norrin> zehrizzatti, http://pastie.org/5636356
shevy2 has quit [Client Quit]
<Norrin> #{channel} doesn't resolve for kick
<Norrin> but all the other vars such as #{nick}, #{user} etc resolve fine in the on :join method
pen has joined #ruby
<Norrin> my current link of thinking is it has to do with def join in isaac using a channel.each block
<Norrin> whereas the other defs do the resolution outside of a sub block
lolcathost has quit [Ping timeout: 260 seconds]
moshee has quit [Ping timeout: 272 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<Norrin> s/link/line
robbyoconnor has joined #ruby
dnyy has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 240 seconds]
elsifaka has joined #ruby
<zehrizzatti> hang on
pavilionXP has quit [Read error: Connection reset by peer]
r0bby_ has quit [Ping timeout: 252 seconds]
<Norrin> k
<Norrin> i think i just notice channel doesn't get set
<Norrin> on kick messages
gabrielrotbart has quit [Remote host closed the connection]
<Norrin> line 253
apeiros_ has quit [Remote host closed the connection]
<Norrin> due to line 270
timonv has joined #ruby
<zehrizzatti> Norrin: I was gonna tell u to turn verbose on
<zehrizzatti> L150
a_a_g has quit [Quit: Leaving.]
<zehrizzatti> It will show the full input, from which the kick is processed
generalissimo has quit [Remote host closed the connection]
<Norrin> i have it on. the message i get from that kick method is:
<Norrin> << :username!~ident@host KICK #channel username :Your behavior is not conducive to the desired environment.
<Norrin> not from the kick method, but from the kick occuring
<Norrin> looks like the gem has to be edited. i can get clone it. but need to know how to change the require line to use the local gem instead of the ruby gem one
adeponte has quit [Remote host closed the connection]
h4mz1d has joined #ruby
xpen has quit [Read error: Connection timed out]
xpen has joined #ruby
quest88 has quit [Quit: quest88]
r3nrut has quit [Ping timeout: 248 seconds]
ale``` has joined #ruby
ale`` has quit [Read error: Connection reset by peer]
gia has quit [Ping timeout: 248 seconds]
lkba has joined #ruby
pen has quit [Remote host closed the connection]
<zehrizzatti> Norrin: change L270
<zehrizzatti> add KICK to the list, and u are golden
<Norrin> ok. how do i require a local module instead of the stuff that ruby gems has installed?
<Norrin> ran gem uninstall isaac & it's not removing it.
<Norrin> zehrizzatti ^
<zehrizzatti> Norrin: just redefine that method for now
<zehrizzatti> pastie
<Norrin> yeah, i can't stop the script from using the ruby gem though
<Norrin> i guess i can edit the ruby gem directly
clocKwize has joined #ruby
timonv has quit [Remote host closed the connection]
JeanMertz has joined #ruby
<zehrizzatti> That will do the trick for now
<Norrin> finally worked!
hemanth_ has quit [Read error: Connection reset by peer]
<zehrizzatti> require 'isaac' on top as usual, which will use the gem, and rewrite that method...
<zehrizzatti> submit a pull request after :D
<Norrin> lol
gia has joined #ruby
artifex has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
mikekelly has quit [Ping timeout: 265 seconds]
<clocKwize> Morning
hemanth_ has joined #ruby
lolcathost has joined #ruby
artifex has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
mikekelly has joined #ruby
artifex has quit [Client Quit]
<Norrin> morning
robustus has joined #ruby
<zehrizzatti> Norrin: ok now?
adeponte has joined #ruby
<Norrin> yup. the rejoin works
<Norrin> took hours
<zehrizzatti> :)
<zehrizzatti> changed inside the gem or ?
<Norrin> changed inside the gem
kayloos has joined #ruby
<Norrin> looks like someone might have tried to do a similar fix in a pull request already: https://github.com/vangberg/isaac/pull/16
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
flingbob has joined #ruby
mafolz has joined #ruby
flingbob has quit [Client Quit]
tonini has joined #ruby
zommi has joined #ruby
jjbohn has joined #ruby
MattRb has quit [Quit: MattRb]
bigkevmcd has joined #ruby
dankest has joined #ruby
jjbohn has quit [Ping timeout: 248 seconds]
Hanmac has joined #ruby
Morkel has joined #ruby
kayloos has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby
zehrizzatti has quit [Quit: Linkinus - http://linkinus.com]
setient has joined #ruby
Mon_Ouie has joined #ruby
Vert has joined #ruby
pen has joined #ruby
charliesome_ has joined #ruby
charliesome_ is now known as charliesome
cha1tanya has quit [Quit: Leaving]
mockra has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 240 seconds]
aganov has joined #ruby
[Neurotic] has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
dankest has quit [Quit: Leaving...]
workmad3 has joined #ruby
jds has quit [Remote host closed the connection]
jaygen has quit [Remote host closed the connection]
elsifaka has quit [Read error: No route to host]
elsifaka has joined #ruby
havenn has joined #ruby
gia has quit [Quit: WeeChat 0.3.9.2]
adeponte has quit [Remote host closed the connection]
karasawa has joined #ruby
bguery has left #ruby ["Leaving"]
megha has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
dr_bob has joined #ruby
piotr_ has joined #ruby
jds has joined #ruby
megha has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
mneorr has joined #ruby
emergion has joined #ruby
timonv has quit [Ping timeout: 260 seconds]
<Norrin> anyone know what topics of 'programming ruby' i would read to understand line 103 of this file? https://github.com/vangberg/isaac/blob/master/lib/isaac/bot.rb
mneorr has quit [Ping timeout: 255 seconds]
zigomir has joined #ruby
<canton7> Norrin, no idea. Something like this might help though: http://yehudakatz.com/2009/11/15/metaprogramming-in-ruby-its-all-about-the-self/
<Hanmac> Norrin the line is similar to mc = self.singleton_class >> http://www.ruby-doc.org/core-1.9.3/Object.html#method-i-singleton_class
browndawg has quit [Quit: Leaving.]
Alenah has joined #ruby
Alenah has quit [Excess Flood]
filipe has joined #ruby
Xeago has joined #ruby
whitedawg has quit [Quit: Leaving.]
pencilcheck has joined #ruby
pen has quit [Read error: Connection reset by peer]
<Norrin> Hanmac, so what does class << self do?
a_a_g has joined #ruby
<Norrin> and everything else on that line..
pencilcheck has quit [Read error: Connection reset by peer]
gfhgfhdty has joined #ruby
pen has joined #ruby
<Hanmac> it opens the singleton class of self, than it picks the self in this new context (the singlerton class) and returns it ... it is similar to use the result of singleton_class
<Hanmac> its because singleton_class is a "new" function and was not defined in 1.8.7
beiter has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
<Norrin> ok, i guess i get it. creates a class, inherented from self or something
<Norrin> and returns self.
<Norrin> i couldn't tell a block was being started there at first. Now i'm bring to understand line 104
<Norrin> don't understand where vars :define_method and :__isaac_event_handler are coming from -- where they're declared & defined/initiated
dhruvasagar has quit [Ping timeout: 256 seconds]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
dhruvasagar has joined #ruby
pen has quit [Remote host closed the connection]
<Hanmac> it is for so you can define object-bounded methods ... imo define_singleton_method is the better method than define_method on singletonclass
pen has joined #ruby
TheFuzzball has joined #ruby
<Hanmac> but imo the code could be better ... the invoke method can be done with fewer lines and better looking
TheFuzzball has quit [Max SendQ exceeded]
gnul0ver has joined #ruby
TheFuzzball has joined #ruby
jprovazn has joined #ruby
beilabs has quit [Ping timeout: 255 seconds]
TheFuzzball has quit [Max SendQ exceeded]
Spami has quit [Quit: This computer has gone to sleep]
wreckimnaked has joined #ruby
mneorr has joined #ruby
TheFuzzball has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
pen has quit [Read error: Connection reset by peer]
schaerli has joined #ruby
<Norrin> i found the send method on object.
main has quit [Ping timeout: 265 seconds]
pen has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
<Hanmac> Norrin: send is when you want to call an method based on a string, or in like in this case when you want to call an method that is protected or private
<Norrin> i can't find this :define_method though
dhruvasagar has joined #ruby
<Norrin> or :__isaac_event_handler
<Norrin> its private and that's why its not in the docs?
wreckimnaked has quit [Read error: Operation timed out]
koshii has joined #ruby
<Hanmac> the isaac is the name of the defined method (but as far as i can see the method is not needed :/ i mean its called from the same function so defining an method is unnessary )
Jasko has quit [Ping timeout: 265 seconds]
cirwin has quit [Quit: Leaving.]
apeiros_ has joined #ruby
browndawg has joined #ruby
jduan1981 has quit [Quit: jduan1981]
pavilionXP has joined #ruby
jjbohn has joined #ruby
apeiros_ has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 240 seconds]
megha has joined #ruby
vlad_starkov has joined #ruby
apeiros_ has joined #ruby
zmo_ has joined #ruby
dhruvasagar has joined #ruby
nemesit has joined #ruby
jjbohn has quit [Ping timeout: 260 seconds]
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
jimeh has joined #ruby
elico has joined #ruby
rakl has quit [Quit: sleeping]
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
henn1nk has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
karupanerura has quit [Excess Flood]
yacks has joined #ruby
huoxito has quit [Ping timeout: 272 seconds]
headius has quit [Quit: headius]
grzywacz has joined #ruby
megha has quit [Ping timeout: 276 seconds]
karupanerura has joined #ruby
arturaz has joined #ruby
arturaz has quit [Remote host closed the connection]
arturaz has joined #ruby
gnul0ver has left #ruby ["Leaving"]
havenn has quit [Ping timeout: 260 seconds]
rellin has quit [Ping timeout: 252 seconds]
RagingDave has joined #ruby
Elhu has joined #ruby
jds has quit [Remote host closed the connection]
wreckimnaked has joined #ruby
mneorr has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
mneorr has joined #ruby
vlad_starkov has joined #ruby
haxrbyte has joined #ruby
mpfundstein has joined #ruby
clocKwize has quit [Quit: clocKwize]
blacktulip has joined #ruby
haxrbyte_ has joined #ruby
clocKwize has joined #ruby
pen has quit [Read error: Connection reset by peer]
mockra has joined #ruby
pen has joined #ruby
banisterfiend has joined #ruby
rakl has joined #ruby
withnale has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
havenn has joined #ruby
hoelzro|away is now known as hoelzro
TheFuzzball has quit [Read error: Connection reset by peer]
emergion has joined #ruby
mockra has quit [Ping timeout: 255 seconds]
x82_nicole has joined #ruby
elico has quit [Ping timeout: 240 seconds]
elico has joined #ruby
TheFuzzball has joined #ruby
karupanerura has quit [Excess Flood]
TheFuzzball has quit [Max SendQ exceeded]
karupanerura has joined #ruby
pencilcheck has joined #ruby
yshh has quit [Read error: Connection reset by peer]
Takehiro has quit [Remote host closed the connection]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
elaptics`away is now known as elaptics
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
pen has quit [Ping timeout: 248 seconds]
TheFuzzball has joined #ruby
xpen has quit [Ping timeout: 260 seconds]
wreckimnaked has quit [Read error: Operation timed out]
yshh has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
DrCode has quit [Ping timeout: 276 seconds]
elico has quit [Ping timeout: 255 seconds]
DrCode has joined #ruby
clocKwize has quit [Quit: clocKwize]
elico has joined #ruby
wreckimnaked has joined #ruby
dwu1 has quit [Quit: Leaving.]
chussenot has joined #ruby
main has joined #ruby
schaerli has quit [Remote host closed the connection]
gfhgfhdty has quit []
slainer68 has joined #ruby
elico has quit [Ping timeout: 240 seconds]
tjbiddle has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
elico has joined #ruby
Spami has joined #ruby
main has quit [Max SendQ exceeded]
rdark has joined #ruby
main has joined #ruby
clocKwize has joined #ruby
<nathancahill> hey, is there a way to have a class constant that can be retrieved without an instance of the class?
ephemerian has joined #ruby
fir_ed has joined #ruby
<apeiros_> nathancahill: errr… that's like the standard
<Muz> class Your; MUM = "loldongs"; end; Your::MUM
Takehiro has joined #ruby
<apeiros_> class Foo; Bar = 'x'; end; Foo::Bar # => 'x'
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
jonathandade has joined #ruby
Vainoharhainen has joined #ruby
<Hanmac> i tihnk he wants:
<Hanmac> >> module ClassConstants; Bar = "x"; end; include ClassConstants;p Bar
<eval-in> Hanmac: Output: "\"x\"\n" (http://eval.in/6078)
timonv has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<nathancahill> ah. thanks Muz and apeiros_
timonv has quit [Remote host closed the connection]
nyuszika7h has joined #ruby
<nathancahill> i had a mistake in my spec
TheFuzzball has quit [Ping timeout: 276 seconds]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
ABK has quit [Ping timeout: 255 seconds]
jjbohn has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
timonv has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
dhruvasagar has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
jjbohn has quit [Ping timeout: 245 seconds]
TheFuzzball has joined #ruby
banisterfiend has quit [Remote host closed the connection]
TheFuzzball has quit [Max SendQ exceeded]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
TheFuzzball has joined #ruby
pcarrier has joined #ruby
timmow has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
jhchabran has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 256 seconds]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
pencilcheck has quit [Remote host closed the connection]
schaerli has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
Takehiro has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
jhchabran has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
slainer68 has quit [Remote host closed the connection]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
slainer68 has joined #ruby
havenn has joined #ruby
vlad_starkov has joined #ruby
cha1tanya has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
TheFuzzball has joined #ruby
redpants has joined #ruby
<redpants> Hi all
<redpants> Do you know a way to do an euclidian division in Ruby ?
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
JohnBat26 has joined #ruby
<redpants> To have 'a operator b' gives an object c from which I can get the quotient and the modulo ?
<Hanmac> redpants: a.divmod(b)
<Hanmac> >> p 7.divmod(3)
<eval-in> Hanmac: Output: "[2, 1]\n" (http://eval.in/6079)
<matti> Bot is back!
<redpants> Hanmac: thanks ! It was what I was looking for
yshh_ has joined #ruby
yshh has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
Virunga has joined #ruby
_46bit has quit [Quit: Leaving.]
_46bit has joined #ruby
workmad3 has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
jds__ has joined #ruby
<apeiros_> Hanmac: futurama?
gyre007 has joined #ruby
nomenkun has joined #ruby
<apeiros_> they misspelled 'murica
<Hanmac> no, its gravity falls, look at the value of the dollar bill
pen has joined #ruby
whitedawg has joined #ruby
<apeiros_> seen that ;-)
<apeiros_> I wonder who trembley is, though
emocakes has joined #ruby
<workmad3> heh - 'This note is not legal tender for all debpts, public and private'
<Hanmac> quote from the show: "Its worthless. - No its less than worthless" :D
jds__ has quit [Ping timeout: 265 seconds]
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
RagingDave has joined #ruby
zigomir has quit [Quit: zigomir]
cha1tanya has quit [Ping timeout: 252 seconds]
nomenkun has quit [Ping timeout: 260 seconds]
emergion has joined #ruby
zigomir has joined #ruby
<banisterfiend> workmad3: what is typically meant by a web 'resource' ?
megha has joined #ruby
<workmad3> banisterfiend: any extra context?
koshii has quit [Read error: Connection reset by peer]
<banisterfiend> workmad3: i'm not a web developer, but in terms of general web development, and the relationshpi between resources and urls
yshh_ has quit [Remote host closed the connection]
<banisterfiend> workmad3: this is for electronic health records
<workmad3> banisterfiend: it could be just something on the web, it could be referring to a specific type of thing (e.g. learning resources), it could also be referring to resources in the REST sense, which is basically 'a thing that has a URL and responds to the HTTP interface'
<banisterfiend> they appear to use the word 'resource' in a kind of specific way that assumes you know what it means, i assume it's the general parlance for web development
<banisterfiend> workmad3: can u give more info on the REST definition?
<Hanmac> if source is the energy from starwars so is resource the reverse of it? :D
samuel02 has joined #ruby
<workmad3> Hanmac: that's the force
<workmad3> Hanmac: not the source
renanoronfle has quit [Remote host closed the connection]
<workmad3> banisterfiend: it's not a massively formal term, which is also part of the 'fun' :)
<workmad3> banisterfiend: it's basically just a slightly jargonated term for 'a thing with a URL' in web terms :)
<banisterfiend> workmad3: is there a difference between say a url link to an html page on some static site, and the REST idea of 'resource' ?
<banisterfiend> like does blah.com/mystupidpage.html qualify as a resource?
lkba has quit [Ping timeout: 246 seconds]
<Hanmac> i may be to long under linux so i associate "source" = "force" :D
<workmad3> banisterfiend: pretty much
schaerli has quit [Remote host closed the connection]
<banisterfiend> workmad3: really? i swore it was more sophisticated than just grandmas_web_page.html
RagingDave has quit [Read error: Connection reset by peer]
<emocakes> banisterfiend i get a 404 for that page
RagingDave has joined #ruby
<workmad3> banisterfiend: well, blah.com/mystupidpage.html will respond to a GET resource to retrieve it, it returns a hypermedia representation that can contain links to other resources...
<emocakes> you might want to check your host
<banisterfiend> workmad3: wait...i thoguht mystupidpage.html WAS the resource now you're saying it responds to a GET resource?
<workmad3> sorry, GET request
<banisterfiend> ah
<banisterfiend> thanks
<workmad3> monday morning typo :)
<banisterfiend> workmad3: what do u mean by hypermedia reprsentation?
<workmad3> banisterfiend: html == hyper-text markup language
<banisterfiend> workmad3: can you give an example of other resources aside from a static html page?
<workmad3> banisterfiend: which is a form of hypermedia (which again is basically a jargonated phrase for 'it contains links to other things')
<workmad3> banisterfiend: a URL for a resource that responds to a POST request to create a new comment on something
<workmad3> banisterfiend: a resource's URL that takes a DELETE request to remove it
<banisterfiend> workmad3: so is a 'web service' a resource?
hotovson has joined #ruby
<workmad3> banisterfiend: if it obeys HTTP semantics, then it's probably a collection of resources
<lupine> "/" in the web service may, if you're really lucky, return a resource that describes all the other resources
<lupine> some sort of meta-resource
<banisterfiend> workmad3: thanks, can u give an example of a sophisticated resource?
<workmad3> banisterfiend: if it's something like a typical SOAP endpoint, which is using HTTP purely as a transport medium for a thinly disguised RPC endpoint... then I'd be dubious :)
<lupine> but it almost never does
horofox has joined #ruby
<workmad3> banisterfiend: I believe the github HTTP API is pretty good
<banisterfiend> workmad3: so, SOAP stuff are not resources?
shevy has quit [Remote host closed the connection]
<lupine> not in the REST sense, no
<workmad3> ^^
<banisterfiend> lupine: why is that?
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
<workmad3> however, if you're talking to most web developers and just refer to things that have URLs as resources, you probably won't get called an idiot (unless you happen to meet a particularly militant REST-ite and you're talking about a SOAP url :) )
esdf has quit [Ping timeout: 255 seconds]
LouisGB has joined #ruby
<banisterfiend> workmad3: so, since SOAP stuff does have a URL, and likely does respond to GET/POST etc (it needs to just to get stuff over HTTP) what about it makes it not a resource?
RagingDave has quit [Read error: Connection reset by peer]
<workmad3> banisterfiend: the main reason is that a REST resource should have a uniform interface and respond with standard semantics... SOAP is all about providing different interfaces to various objects through an endpoint
<banisterfiend> ah
whitedawg has quit [Ping timeout: 255 seconds]
<workmad3> so it's not so much about what it is (a url) but how it's used (in the SOAP case, non-web-like)
TheFuzzball has quit [Ping timeout: 276 seconds]
<lupine> well, resources in REST are fairly abstract, so you could in theory make a case that the SOAP web service contains REST resources
<banisterfiend> workmad3: so, what are standard semantics?
esdf has joined #ruby
<lupine> but there'd be no way to acess them in a restful manner
cha1tanya has joined #ruby
hamed_r has joined #ruby
<lupine> so the discussion would become nit-picking semantics only, which is boring ^^
<workmad3> banisterfiend: REST with HTTP, it's basically that it uses the HTTP verbs correctly
<banisterfiend> workmad3: thanks
<workmad3> banisterfiend: so GET, PUT and DELETE are all idempotent, GET causes no server-side changes that the client is responsible for, POST is allowed to be non-idempotent
<workmad3> and roughly speaking, GET is for retrieving a resource representation, PUT is for replacing a representation, DELETE is for removing it, and POST is for creating sub-resources
havenn has quit [Ping timeout: 264 seconds]
<workmad3> and each resource representation should ideally provide hypermedia so that the resources put together create an application protocol that a client can just walk through, rather than having to encode the protocol in the client
<workmad3> basically, REST resources are all about being able to create APIs that are browsable in a similar way to webpages
beiter_ has joined #ruby
TheFuzzball has joined #ruby
<workmad3> each representation tells you what is valid to do next
<banisterfiend> workmad3: so is REST generally considered the right way to do it and SOAP the wrong way to do it? or are tehre still good arguments for using SOAP ?
beiter has quit [Ping timeout: 272 seconds]
beiter_ is now known as beiter
woolite64 has quit [Ping timeout: 260 seconds]
nemesit has quit [Read error: Operation timed out]
<workmad3> banisterfiend: some REST people argue that REST is the way to go... and it does have advantages in that it works well with standard web tech (proxies, load balancing, caches, etc.)
<workmad3> banisterfiend: but personally, I'm a bit more pragmatic and think that if you have something that you're really struggling to force into a REST style... then it's probably not a REST API and you should consider other approaches
<workmad3> banisterfiend: but that doesn't mean I like SOAP... :)
horofox has quit [Quit: horofox]
<workmad3> banisterfiend: I would say that my first instinct with a web service would be to consider REST though... simply because then you have a web service that feels 'webby'
fyolnish has quit [Ping timeout: 276 seconds]
viuo_ has joined #ruby
<banisterfiend> workmad3: cool, thanks for answering some Qs :)) It's not actually for me, but for a relative who's involved in the EHR biz (but as a doctor) and wants to understand the arguments a bit better
<workmad3> banisterfiend: so, is this because you're starting a new career as a web developer? :) or are you just having to work with some :)
<banisterfiend> no, just helping a relative
<workmad3> yeah, I typed and hit return on that just as you said that... :(
alexspeller has joined #ruby
<banisterfiend> EHR (electronic health record) workgroups involve doctors, and the doctors sometimes have a hard time keeping up with the tech side of things
withnale has joined #ruby
<workmad3> yeah, makes sense
viuo has quit [Ping timeout: 265 seconds]
cantonic has joined #ruby
Spami has quit [Ping timeout: 265 seconds]
tk_ has joined #ruby
<workmad3> if it's something big and enterprising, chances are they're going to be using something like the WS-* stack
<workmad3> which is SOAP and pain
<banisterfiend> workmad3: actually it's REST i think
<banisterfiend> let me show u the link
<workmad3> *enterprisey
whitedawg has joined #ruby
<workmad3> sure :)
chrismcgh is now known as chrismcg
chrismcg has quit [Changing host]
chrismcg has joined #ruby
<banisterfiend> workmad3: does it look like the guy who wrote that knows what he's talking about?
* Hanmac likes xml more than json ...
<banisterfiend> workmad3: the main problem with the EHR process it seems, is no one knows whether anyone really knows what they're talking about
<banisterfiend> workmad3: there's also some links up the side bar which may be useful, esp the REST(HTTP) one
<banisterfiend> workmad3: but after a quick skim, does it look coherent? or just babble designed to con govts out of large amounts of money?
<emocakes> Hanmac, too many <> </>
<emocakes> its like ERB
<emocakes> ugly
<emocakes> :\
amaya_the has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
dr_bob has quit [Read error: Connection reset by peer]
<Spami> hello, when I'm running my "rake db:setup" i have the following error: "invalid encoding name: ut8" and no idea how to fix it
kevinfagan has joined #ruby
<workmad3> banisterfiend: looking at the REST bit, I'd say it's coming across as RESTful rather than REST... which is basically that it's using HTTP semantics somewhat, but it's not going the full hog for HATEOAS
<Hanmac> imo xml can be better structured than json ...
ryanf has joined #ruby
<banisterfiend> workmad3: cool, so that's a bad thing?
<workmad3> banisterfiend: the most worrying bit I just read though is that he's pushing security out of the protocol
<workmad3> banisterfiend: it's a thing :)
<Hanmac> Spami the encoding is maybe named "utf8" so yours is a typo
<Spami> Hanmac yes but where would I fix it ?
TheFuzzball has quit [Ping timeout: 248 seconds]
<workmad3> banisterfiend: it's a somewhat easier API to set up initially, but tends to end up with a large number of API endpoints that need maintenance and can cause issues in the future if any of them need to change or be removed
<workmad3> banisterfiend: and that's mostly down to the requirement for the mechanics of the API that then need to be encoded in the client
<Hanmac> Spami i dont know in wich file it is ... do an "grep ut8 * -R"
mikecmpbll has joined #ruby
beiter has quit [Quit: beiter]
TheFuzzball has joined #ruby
<banisterfiend> workmad3: thanks :)
<workmad3> banisterfiend: it seems mostly that the guy (or team) doing this has at least some experience with REST and standard web services, but I doubt they give the API much thought, just a formulaic approach
<banisterfiend> interesting
wallerdev has quit [Quit: wallerdev]
<Spami> yep thanks Hanmac
kaen has quit [Ping timeout: 260 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
ryanf has quit [Read error: Operation timed out]
havenn has joined #ruby
hamed_r has quit [Remote host closed the connection]
<workmad3> banisterfiend: of course, that assessment is predicated on the idea that I know what I'm talking about :D
Monie has joined #ruby
<Hanmac> amaya_the i saw you ping me (request CTCP TIME from Hanmac) as information my current project is to add unit/test cases for my tmx-parser , currently there are 68 asserts
<banisterfiend> workmad3: easier for me to assume you do :)
<workmad3> heh
<amaya_the> Hanmac : Wow ,I just want know the time of your country.
<amaya_the> *to
staafl has joined #ruby
s1n4 has joined #ruby
jacktrick has joined #ruby
fermion has joined #ruby
cha1tanya has quit [Ping timeout: 272 seconds]
grzywacz has quit [Quit: :wq]
havenn has quit [Ping timeout: 265 seconds]
<amaya_the> Hanmac : Do you have a blog ?
timmow has quit [Read error: Connection reset by peer]
<banisterfiend> amaya_the: this is Hanmac http://i.minus.com/iKG3MuoXbH9WO.gifHATEOAS
gregoryigelmund has joined #ruby
timmow has joined #ruby
nomenkun has joined #ruby
<Hanmac> amaya i not a blog person ... i am more a repositoy person
zv470 has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
postmodern has quit [Quit: Leaving]
lolcathost has joined #ruby
<amaya_the> well .
karasawa has quit [Ping timeout: 255 seconds]
_46bit has left #ruby [#ruby]
nomenkun has quit [Ping timeout: 272 seconds]
pen has quit [Remote host closed the connection]
cha1tanya_ has joined #ruby
vaks2 has joined #ruby
amaya_the has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
berserkr has joined #ruby
browndawg has quit [Quit: Leaving.]
timmow has quit [Quit: has left the building]
timmow has joined #ruby
carloslopes has joined #ruby
kpshek has joined #ruby
zigomir has quit [Quit: zigomir]
subbyyy has joined #ruby
allsystemsarego has joined #ruby
kpshek has quit [Ping timeout: 248 seconds]
cdt has joined #ruby
banisterfiend has quit [Remote host closed the connection]
ererer has joined #ruby
<ererer> how would with rspec if a method defines an instance variable?
<csmrfx> yes
Targen has quit [Ping timeout: 255 seconds]
horofox has joined #ruby
drago757 has joined #ruby
wermel has joined #ruby
nemesit has joined #ruby
alexspeller has quit [Remote host closed the connection]
banisterfiend has joined #ruby
whitedawg1 has joined #ruby
jjbohn has joined #ruby
whitedawg has quit [Ping timeout: 248 seconds]
wreckimnaked has quit [Quit: WeeChat 0.3.9]
_46bit has joined #ruby
alexspeller has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
horofox has quit [Quit: horofox]
jjbohn has quit [Ping timeout: 248 seconds]
fyolnish has joined #ruby
amaya_the has joined #ruby
tvw has joined #ruby
fyolnish has quit [Ping timeout: 240 seconds]
perun has quit [Disconnected by services]
Mon_Ouie has quit [Ping timeout: 272 seconds]
perun_ has joined #ruby
statarb3 has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
fyolnish has joined #ruby
schaerli has joined #ruby
mengu has joined #ruby
lolcathost has quit [Ping timeout: 255 seconds]
chussenot has quit [Quit: chussenot]
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
banisterfiend has quit [Remote host closed the connection]
brendan- has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
ttt has quit [Remote host closed the connection]
eka has joined #ruby
himsin has joined #ruby
nomenkun has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
clocKwize has quit [Quit: clocKwize]
pavilionXP has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
fir_ed has quit [Ping timeout: 255 seconds]
buscon has joined #ruby
TheEmpty_ has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 248 seconds]
butblack has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
Guedes0 is now known as Guedes
Guedes has quit [Changing host]
Guedes has joined #ruby
subbyyy has joined #ruby
nathancahill_ has joined #ruby
schaerli has quit [Remote host closed the connection]
nathancahill has quit [Ping timeout: 260 seconds]
nathancahill_ is now known as nathancahill
huoxito has joined #ruby
butblack has quit [Ping timeout: 272 seconds]
chussenot has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
AlbireoX has quit [Remote host closed the connection]
AlbireoX has joined #ruby
whitedawg has joined #ruby
thone has quit [Ping timeout: 264 seconds]
drago757 has quit [Quit: drago757]
vlad_starkov has joined #ruby
nga4 has quit [Ping timeout: 240 seconds]
clocKwize has joined #ruby
hamed_r has joined #ruby
subbyyy has quit [Ping timeout: 272 seconds]
bluOxigen has quit [Ping timeout: 246 seconds]
whitedawg1 has quit [Ping timeout: 265 seconds]
thone has joined #ruby
pen has joined #ruby
fir_ed has joined #ruby
AlbireoX has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
thone has quit [Ping timeout: 265 seconds]
yale has joined #ruby
staafl has quit [Quit: Leaving]
eka has quit [Quit: Computer has gone to sleep.]
sayan has quit [Ping timeout: 252 seconds]
arietis has joined #ruby
lolcathost has joined #ruby
zigomir has joined #ruby
buscon has quit [Read error: Connection timed out]
tPl0ch has joined #ruby
vlad_starkov has joined #ruby
DrCode has quit [Ping timeout: 276 seconds]
buscon has joined #ruby
gregoryigelmund has quit [Quit: Leaving...]
francisfish has joined #ruby
Jasko has joined #ruby
fjfish has quit [Ping timeout: 252 seconds]
rakl has quit [Quit: sleeping]
Kudos_ has joined #ruby
Dreamer3 has quit [Ping timeout: 264 seconds]
diegok has quit [Ping timeout: 260 seconds]
Kudos has quit [Ping timeout: 260 seconds]
Kudos_ is now known as kudos
kudos has quit [Changing host]
kudos has joined #ruby
jjbohn has joined #ruby
vlad_sta_ has joined #ruby
DrCode has joined #ruby
ryanjh has quit [Quit: Computer has gone to sleep.]
chussenot has quit [Quit: chussenot]
vlad_starkov has quit [Ping timeout: 260 seconds]
horofox_ has joined #ruby
thone has joined #ruby
Dreamer3 has joined #ruby
diegok has joined #ruby
Takehiro has joined #ruby
xemu has joined #ruby
jjbohn has quit [Ping timeout: 260 seconds]
chrismcg is now known as zz_chrismcg
Alenah has joined #ruby
Alenah has quit [Excess Flood]
thone has quit [Ping timeout: 260 seconds]
digiwth has quit [Ping timeout: 276 seconds]
c3vin has quit [Ping timeout: 240 seconds]
pavilionXP has joined #ruby
Jasko has quit [Ping timeout: 255 seconds]
sayan has joined #ruby
butblack_ has joined #ruby
butblack_ has quit [Client Quit]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
yale has quit [Ping timeout: 260 seconds]
megha has quit [Quit: WeeChat 0.3.9.2]
malkomalko has joined #ruby
grzywacz has joined #ruby
pen has quit [Remote host closed the connection]
pen has joined #ruby
geekbri has joined #ruby
jacktrick has quit [Quit: Leaving]
daniel_- has joined #ruby
chussenot has joined #ruby
ryannielson has joined #ruby
ryannielson has quit [Remote host closed the connection]
ryannielson has joined #ruby
Vert has quit [Remote host closed the connection]
megha has joined #ruby
skaczor has joined #ruby
nathancahill_ has joined #ruby
lateau has joined #ruby
nathancahill has quit [Ping timeout: 276 seconds]
nathancahill_ is now known as nathancahill
adkron has joined #ruby
pavilionXP has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
pavilionXP has joined #ruby
c3vin has joined #ruby
berserkr has quit [Ping timeout: 272 seconds]
thone has joined #ruby
benlieb has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
taoru has quit [Remote host closed the connection]
haxrbyte has joined #ruby
Jasko has joined #ruby
browndawg has joined #ruby
regedarek has quit [Read error: Connection reset by peer]
atno has quit [Read error: Connection reset by peer]
atno has joined #ruby
thone_ has joined #ruby
miskander has joined #ruby
ffranz has joined #ruby
thone has quit [Ping timeout: 248 seconds]
buscon has quit [Read error: Connection timed out]
buscon has joined #ruby
ttt has joined #ruby
mark_locklear has joined #ruby
vlad_sta_ has quit [Read error: Connection reset by peer]
ttt has quit [Ping timeout: 276 seconds]
huoxito has quit [Ping timeout: 272 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
s1n4 has quit [Quit: peace out]
x0F_ is now known as x0F
amaya_the has joined #ruby
cha1tanya_ has quit [Quit: Leaving]
chrisja has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
mailo_ has joined #ruby
krawchyk has joined #ruby
Uranio has joined #ruby
berserkr has joined #ruby
flip_digits has joined #ruby
banisterfiend has quit [Ping timeout: 255 seconds]
banister_ has joined #ruby
karasawa has joined #ruby
jonathanwallace1 has joined #ruby
nwertman_ has joined #ruby
jonathanwallace has quit [Ping timeout: 255 seconds]
wreckimnaked has joined #ruby
tommyvyo has joined #ruby
nwertman has quit [Ping timeout: 260 seconds]
lateau has quit [Ping timeout: 272 seconds]
elsifaka has quit [Quit: Veloma e!]
Vert has joined #ruby
ner0x has joined #ruby
vaks2 has quit []
griffindy has joined #ruby
timmow has quit [Quit: has left the building]
timmow has joined #ruby
timmow has quit [Client Quit]
nomenkun has joined #ruby
timmow has joined #ruby
clocKwize has quit [Quit: clocKwize]
mikecmpbll has joined #ruby
adkron has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
malkomalko has quit [Remote host closed the connection]
moos3 has joined #ruby
clocKwize has joined #ruby
_main_ has joined #ruby
ererer has quit [Ping timeout: 245 seconds]
kalusn has joined #ruby
Choclo has joined #ruby
Jackneill has joined #ruby
Takehiro has quit [Remote host closed the connection]
kalusn has left #ruby [#ruby]
pen has quit [Read error: Connection reset by peer]
__main__ has quit [Ping timeout: 252 seconds]
horofox_ has quit [Read error: Connection reset by peer]
pen has joined #ruby
_main_ is now known as __main__
horofox_ has joined #ruby
karasawa has quit [Remote host closed the connection]
Gue______ has joined #ruby
kayloos has joined #ruby
Gue______ is now known as Guest123
joofsh has joined #ruby
a_a_g has quit [Quit: Leaving.]
kayloos has quit [Client Quit]
kayloos has joined #ruby
jonahR has joined #ruby
mercwithamouth has joined #ruby
lkba has joined #ruby
<mensvaga> I have a method that takes in an Array as an argument.
dawkirst_ is now known as dawkirst
<mensvaga> I know that somebody can extend an array object such that it still indexes things with [index]
<mensvaga> In stead of raising an argument error if somebody sends in something that isn't an Array
<mensvaga> how do I check to see if something implements the functionality of an Array?
jrist-afk is now known as jrist
<mensvaga> Instead of "exit if this thing isn't an array", "exit if this thing doesn't do what an array can do"
_nitti has joined #ruby
<apeiros_> just use it
<apeiros_> if it doesn't work properly, it'll raise on its own
banister_ has quit [Remote host closed the connection]
tPl0ch has quit [Quit: Verlassend]
<mensvaga> I'd prefer to. Some people have a hard on for raising argument errors if the type isn't exact though.
jerius has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
lkba has quit [Ping timeout: 272 seconds]
<Hanmac> just use each or one of the Enumerable methods
jonathanwallace1 has quit [Ping timeout: 276 seconds]
atno has quit [Ping timeout: 246 seconds]
<mensvaga> Heh. Kinda "ping" it? :()
<mensvaga> whoops
<mensvaga> :)
<mensvaga> typing with a wrist wrap is hard.
tommyvyo has joined #ruby
horofox_ has quit [Quit: horofox_]
banisterfiend has joined #ruby
pkrnj has joined #ruby
philips_ has quit [Excess Flood]
krawchyk_ has joined #ruby
krawchyk_ has quit [Remote host closed the connection]
sailias has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
krawchyk has quit [Ping timeout: 240 seconds]
chussenot has joined #ruby
miskander has quit [Quit: miskander]
polymar has joined #ruby
_nitti has quit [Remote host closed the connection]
hamed_r has quit [Quit: Leaving]
ekristen has joined #ruby
<ekristen> no matter what when I try and run my app I get "Could not find rake-0.8.7 in any of the sources" by bundler
philips_ has joined #ruby
jtharris has joined #ruby
segv- has joined #ruby
asteve has joined #ruby
alex__c2022 has joined #ruby
danieldocki has joined #ruby
miskander has joined #ruby
Rym has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
<JonnieCache> mensvaga: you can call arg.respond_to? :method
<JonnieCache> mensvaga: hanmac is correct though when he says that the convention is just to let it fail on its own
<JonnieCache> just as long as you dont check arg.is_a? Class
<JonnieCache> because then you may as well be using java
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
asteve has quit [Changing host]
asteve has joined #ruby
ryannielson has quit [Quit: ryannielson]
ortuna has joined #ruby
sambio has joined #ruby
eka has joined #ruby
Vert has quit [Read error: Connection reset by peer]
redpants has quit [Quit: redpants]
rondale_sc has joined #ruby
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
ortuna has quit [Client Quit]
mikeycgto has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
zz_chrismcg is now known as chrismcg
madwilliamflint has joined #ruby
breakingthings has joined #ruby
zehrizzatti has joined #ruby
Takehiro has joined #ruby
lkba has joined #ruby
Takehiro has quit [Remote host closed the connection]
<Hanmac> the ruby way would be some kind of arg.is_like_a? Class :D
pen has quit [Remote host closed the connection]
v0n has joined #ruby
dsabanin has joined #ruby
dsabanin has quit [Client Quit]
dsabanin has joined #ruby
mikeycgto has quit [Quit: Leaving]
vlad_starkov has joined #ruby
asobrasil has joined #ruby
<ekristen> can anyone help me -- bundler 1.1.3 keeps on telling me that it can't find any rake version I put in my gem spec file
<Hanmac> ekristen: ask in #bundler they might be more helpfull there
<ekristen> thanks
* lupine runs ruby -rprofile on a veeeeery slow operation, watches it grind
<lupine> whoopsadaisy ^^
miskander has quit [Quit: miskander]
mjolk has joined #ruby
RagingDave has joined #ruby
stopbit has joined #ruby
jeffreybaird has joined #ruby
megha has quit [Quit: WeeChat 0.3.9.2]
<apeiros_> lupine: use ruby-prof
miskander has joined #ruby
arturaz has quit [Ping timeout: 252 seconds]
Steppen has joined #ruby
Nisstyre-laptop has joined #ruby
noric has joined #ruby
benlieb has quit [Quit: benlieb]
dmerrick has joined #ruby
Nisstyre-laptop has quit [Client Quit]
megha has joined #ruby
<noric> My Foo objects are saved to a database. Foo objects may have any set of attributes. The attributes are serialized using Marshal and saved alongside the owning Foo. The exception is when a Foo "A" contains a reference to another Foo "B" in an attribute. In this case, Foo "B" returns its database id as the result of Marshal.dump. Marshal.load will retrieve a Foo from the database using the database id in the serialized string.
karasawa has joined #ruby
<noric> 1. How can Foo "A" know that it is dependent on Foo "B", when the Marshal.dump/load process is hidden? My current idea is to search the serialized string for Foo database ids
<noric> 2. Is there a better way to serialize Foo attributes and deal with references to other Foos (and possibly circular dependencies)?
<noric> Thanks
<noric> TL;DR: anyone have experience or know of a library to parse the strings output by Marshal.dump?
<noric> (Marshal.load is a bad joke :)
pencilcheck has joined #ruby
philcrissman has joined #ruby
jjbohn has joined #ruby
blaxter has joined #ruby
sailias has quit [Quit: Leaving.]
<csmrfx> what
<csmrfx> whats wrong with Marshal.load?
DrCode has quit [Remote host closed the connection]
<csmrfx> You Are Doing It Wrong
sailias has joined #ruby
<Hanmac> noric marshal output can not be "parsed" in what you tihnk ... (okay it maybe can, but marshal is not designed for that)
<noric> right, so how would you guys do it?
<Xeago> what is the reason for such storage?
Nisstyre-laptop has joined #ruby
<noric> My graph of objects needs persistence. That's the only requirement
nathancahill has quit [Quit: nathancahill]
<Xeago> is it really a graph?
<csmrfx> or is it just containers?
<Hanmac> information: if you have A that has inside a B, and that has inside again A, marshal can handle that, but this is not designed for databases
<noric> It's a directed graph.
DaZ has quit [Ping timeout: 264 seconds]
thisirs has joined #ruby
pen_ has joined #ruby
DrCode has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<noric> The Foo objects in my graph can't be saved as serialized data. They need to be queried, etc.
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<noric> Foo's attribute table may be serialized
<csmrfx> Well, how about using a solution that is meant for that
ananthakumaran has joined #ruby
<noric> sounds good :) what do you have in mind?
<JonnieCache> you just want a database and an orm ultimately
benlieb has joined #ruby
<csmrfx> Use a graph database?
fatleaf has joined #ruby
<Hanmac> a=[];a << a; p Marshal.load(Marshal.dump(a))
<Hanmac> >> a=[];a << a; p Marshal.load(Marshal.dump(a))
<eval-in> Hanmac: Output: "[[...]]\n" (http://eval.in/6103)
<csmrfx> (or, have a server with live queryable graph)
fatleaf has left #ruby [#ruby]
<noric> a graph database is a great idea
Rym has quit [Quit: Rym]
<csmrfx> Yes, great idea
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
Vert has joined #ruby
eldariof has joined #ruby
<csmrfx> may not be that easy in practice, noric
<JonnieCache> my advice: dont try and be clever, just use postgresql :)
r3nrutx has quit [Ping timeout: 240 seconds]
<JonnieCache> store your graph as boring old relations/associations
<JonnieCache> it may be boring but thats because it works well
<noric> My current solution uses sql, similar to what JonnieCache suggests
pencilcheck has quit [Ping timeout: 248 seconds]
<JonnieCache> what wrong with your current solution thats causing you to look elsewhere?
<noric> I need non-blocking loads, so I have a system which offloads the Load to a thread pool
<noric> Good Q:
subbyyy has joined #ruby
<workmad3> JonnieCache: I'd disagree personally... storing a graph in a relational db doesn't work particularly well once
<JonnieCache> workmad3: depends on the shape of the graph i guess
<workmad3> *once you start wanting to do graph operations
<Xeago> workmad3: the other option is to precompute graph operations
<workmad3> unless you're happy with deserialising the entire graph into memory the moment you want to do anything with it
<JonnieCache> yeah thats very true. but if you just need to persist objects that happen to look like a graph its fine
<noric> If the app wants to load Foo 37, will determine that Foo depends on objects 17, 23, and 8, and load them all in parallel
<noric> I don't have an issue with circular dependencies or loading the entire graph at once
<noric> my problem is I'm not sure how to determine which Foo's a parent Foo depends on
<noric> e.g.:
<Xeago> what is the problem if you can save and load the entirety (or nothing)?
<noric> Foo bar, bar.x = 5, bar.y = ["attribute"], bar.z = [another_Foo]
<csmrfx> yeah, why not just have a live graph going
meeko has joined #ruby
<noric> when I call Marshal.dump bar.z - each attribute is serialized separately - the array will be Marshal.dump, and then Marshal.dump another_Foo
browndawg has quit [Quit: Leaving.]
Banistergalaxy has quit [Ping timeout: 248 seconds]
iNerd has joined #ruby
DatumDrop has joined #ruby
browndawg has joined #ruby
<noric> another_Foo doesn't return a serialized string of its entire self, instead it returns its database primary key.
<iNerd> Hello!
<noric> So Foo overrides Marshal._dump/_load to retrieve Foos from the database
havenn has joined #ruby
<workmad3> JonnieCache: well, a general graph in a relational db isn't difficult to store - table nodes, table edges
<noric> This is my simple, poor man's way of using Marshal.dump/load to handle attributes on Foos
reinaldob has joined #ruby
<workmad3> JonnieCache: but it's a PITA to do anything more than the most trivial graph operations on
Steppen has quit [Quit: Leaving]
<Hanmac> hm per default, bar.z is marshal dumped and loaded too4
<Xeago> noric: the uglyness is coming from mixing two persistences: marshals and db
<noric> Xeago: right
nwertman_ has quit [Ping timeout: 255 seconds]
* apeiros_ wonders how much sqlite's VM approach would yield itself to add graph-specific functions
<noric> So, if I have
<Xeago> never knew it was written as ugliness
zehrizzatti has quit [Quit: Leaving...]
__main__ has quit [Read error: Connection reset by peer]
carloslopes has quit [Remote host closed the connection]
DaZ has joined #ruby
Banistergalaxy has joined #ruby
<noric> bar.one_attribute = [1,2,3,complex_serializable_object]
<apeiros_> (sqlite's query engine is a VM, and you can send it raw instructions)
<noric> bar.two_attribute = [foo2,foo3]
<noric> I need a simple way to serialize attributes which may or may not contain Foo references
karasawa has quit [Ping timeout: 248 seconds]
<noric> Overriding Marshal._dump/_load to return Foo database ids works pretty well, actually
__main__ has joined #ruby
NimeshNeema has quit []
<noric> However here's the rub: my loads are done in parallel, so if object 37 depends on 100 other objects (likely), they will be loaded in parallel
<noric> Object 37 needs to ask the question, "Are my dependencies done loading yet?"
<noric> How the heck does Object 37 know its dependencies, when they are buried in serialized attributes? <--- that's the question I came here to ask
Coolhand has quit [Remote host closed the connection]
jjbohn is now known as jjbohn|afk
<noric> E.g.: bar.nested_attribute = [[[[another_Foo]]]] # how does bar know it depends on another_Foo ?
<csmrfx> hm, a queue?
serhart has joined #ruby
<csmrfx> async queue
<workmad3> noric: sounds like you'd want to deserialise your Foos into proxy objects
meeko has quit [Client Quit]
<noric> workmad3: currently my proxy objects are [database_id], what would you add?
<workmad3> noric: so that the proxy can determine if the Foo has loaded or not, and proxy directly to the Foo if it has
<lupine> apeiros_, indeed, I always forget about that ^^ - thanks
<csmrfx> to me it actually sounds like you'd like to find compleltely different approach
<JonnieCache> workmad3: for some reason i thought that was all noric wanted to do. on closer reading it appears he actually needs a proper graph db
phantasm66 has joined #ruby
<noric> workmad3: oh I misunderstood, got it now
* lupine waits for results
mockra has joined #ruby
<workmad3> JonnieCache: it would probably be easier for him :)
<noric> I'm not sure I need the flexibility the graph db provides. I don't need any graph operations aside from the "load all your dependencies"
<lupine> also, Marshal is evil
<noric> Can you guys recommend a ruby library with graph db adapters? I'm using Sequel and don't think it has that
<Xeago> noric: is there a problem with updating all objects that refer a if a changes?
<noric> oh ya?
<csmrfx> Marshal is just serialization
<lupine> not compatible between ruby versions, that kind of thing
<csmrfx> and its just fine
<noric> Xeago: the objects don't know who they refer to. They receive attribute values bindly - these values may contain many nested objects that eventually point to another Foo
<Xeago> noric: elasticsearch has a dynamic scheme that allows for child objects to be dynamically found
tk_ has quit [Quit: ばいばい]
tempspace has left #ruby [#ruby]
* lupine now avoids marshal wherever he can
Hanmac has quit [Ping timeout: 245 seconds]
pwelch has joined #ruby
<lupine> (which is almost everywhere)
<csmrfx> like, as if people would be using it for anything
<Xeago> using es' _uid you can find a nested object reference in any part of the object in es
<csmrfx> I wish they were.
horofox_ has joined #ruby
<lupine> pstore uses it under the hood. that stang
<lupine> you can tell pstore to output to yaml instead, though
<noric> workmad3: The proxy object could work. If object 37 depends via attribute on 10, 10 can be wired in with a proxy object until it is loaded (or perhaps the proxy always sits inbetween). The problem is, object 37 doesn't need a Future 10 - I can't tell 37's clients that its' ready until it is fully loaded.
<apeiros_> lupine: you should avoid yaml then too!
<apeiros_> not compatible between different versions either…
<noric> workmad3: I am not sure that 37 can ever know that 10 is fully loaded using the proxy system.
<JonnieCache> fuck me. this table has one column: "name". its a string column, and its the primary key
<csmrfx> IME people throw database in once they have more than 20 things to store
<apeiros_> (syck vs. psych had some nice issues)
<JonnieCache> christ
<csmrfx> it is preposterous
TerabyteST has joined #ruby
<workmad3> noric: if the loading is async, I'd probably be tempted to implement the proxies as a form of Future or Promise btw... so they're basically a stand-in for the Foo (which will load in the background). When you attempt to access the Foo, execution in that thread will block until loading has finished
<lupine> I'm certain yaml is compatible between ruby versions
<noric> Xeago: re: elasticserach, I need to keep it on the local machine, it's a high performance simulation
<apeiros_> lupine: you're mistaken
<Xeago>
jgarvey has joined #ruby
<lupine> apeiros_, do you have an example? I suspect we're talking about different things here
<lupine> what sort of yaml document do you envision failing?
<apeiros_> lupine: as I said, the change of 1.8's syck to 1.9's psych introduced a couple of incompatibilities.
<noric> workmad3: I have a single high-performance thread, simulation master loop which must be absolutely non-blocking. That's why an object cannot be made available to the main thread until it is fully loaded.
<csmrfx> yaml isnt that robyst
<workmad3> noric: if you absolutely need to know stuff is loaded then simply have a load step that loads (and links) everything, run your simulation (updating the graph in-memory) and then serialise it out again
<noric> That all sounds good, but I am left with my original question
<apeiros_> which specifically - don't remember, it's been over a year since we moved our project
jekotia has joined #ruby
<lupine> nasty. that does sound like a good reason to avoid yaml
<noric> If Foo has an attribute hash: 1) attributes which contain no nested Foos are serialized with Marshal.dump; 2) if an attribute contains a nested Foo, it will be serialized by returning its database id; 3) On load, how does the top-level Foo know which nested Foos to wait for?
<lupine> (we typically use json for most stuff these days, but yaml is still around in places)
<noric> The real problem here is, if using Marshal.load/dump to serialize attributes, and these attributes may contain nested Foos, how does a top-level object know which Foos it is "waiting" for, because the top-level object must be fully loaded before it can proceed.
atadesk has joined #ruby
<workmad3> noric: if pre-loading all the data is fine, split the load into two steps - load all your nodes from your store, then for each loaded node walk it's attribute tree and replace everything that's a proxy for a Foo with the loaded Foo
<csmrfx> noric: Marshal is meant for serializing objects.
<csmrfx> noric: Marshaling is not a persistence solution.
bwlang has joined #ruby
luckyruby has joined #ruby
dsabanin has quit [Quit: Leaving...]
TerabyteST has quit [Ping timeout: 248 seconds]
<workmad3> noric: and then you don't proceed until the link step is complete (at which point your graph is present and correct in-memory)
<noric> workmad3: So, guaranteeing that all persisted nodes are in memory is definitely a solution
statarb3 has quit [Quit: Leaving]
<noric> workmad3: but, in my weird problem domain, only <10% of the in-memory graph needs to be persisted, and only <10% of the persisted nodes must be loaded for the current simulation phase
<noric> so I could load all the nodes but 90%+ would be unused. Maybe that's ok in 2013
<JonnieCache> depends on how big the nodes are
<lupine> you could build an index on save
<JonnieCache> and how profitable the process youre doing is :)
<workmad3> that's another option
<noric> lupine: how! this is the most sensible approach imo
mengu_ has joined #ruby
<noric> Yeah this project is "non-profit" :D
<csmrfx> imo that points to: just use the database
<workmad3> noric: when you save your graph, simply record (probably in another table, or a separate file) the node IDs that will need to be reloaded next to a simulation ID or some other key
<noric> So, I get that Marshal isn't a persistence solution. But it's a terribly convenient way to serialize an attribute table
<lupine> it's fast, too, I'll give it that
<noric> workmad3: but how does Foo bar; bar.nested_attribute = [Foo baz] know it depends on baz?
<csmrfx> definately convinient for serializing objects
<workmad3> noric: you'd code it
bean has joined #ruby
tonini has quit [Remote host closed the connection]
<lupine> this isn't an easy solution to write ^^
<workmad3> noric: you're really at the point where you should be writing your own serialisation mechanism IMO
<noric> workmad3: Ok, if I'm another programmer using my simulation library, I am going to do
<workmad3> noric: one that understands your serialisation requirements
browndawg1 has joined #ruby
<Xeago> I don't understand the requirements the system needs
<noric> bar = Foo.new; bar.some_attribute = type_which_simulation_library_doesnt_know_about_and_contains_nested_Foo
<workmad3> (or rather, one that encodes your serialisation requirements)
browndawg1 has left #ruby [#ruby]
chrismcg is now known as zz_chrismcg
AndIrc_ has joined #ruby
<csmrfx> I think I dont know enough, but it smells like a simple problem being made into a mighty one
<workmad3> ^^
pavilionXP has quit [Ping timeout: 264 seconds]
<noric> The actual requirement is that, Foo must be able to contain other Foos in attribute table, allowing for circular dependencies. When loading a Foo, you must know when it is fully loaded.
clocKwize has quit [Quit: clocKwize]
AndIrc_ has quit [Read error: Connection reset by peer]
<csmrfx> Can you have each node hold index on their dependencies?
<csmrfx> Can you have inheritance handle dependencies?
AndIrc_ has joined #ruby
<lupine> this is just an identity map
<noric> Apologies if I am repeating myself, but each node is blind to the value of its attributes - they are merely assigned, and may contain nested Foo references
<Xeago> csmrfx: I don't see why it shouldn't be possible
includex has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
mengu has quit [Ping timeout: 255 seconds]
<workmad3> lupine: it sounds about right, yes
<Xeago> noric: upon assigning, save the dependency with it automatically
<Xeago> or detaisl about the dependency
<lupine> I say "just", I've implemented an identity map before, and they can be proper arses
<noric> lupine: I do have an identity map. Per workmad3's suggestion, I could load all the objects ahead of time and then deserialization wouldn't have to load a Foo, it'd just reference it
browndawg has quit [Ping timeout: 256 seconds]
<lupine> noric, all you need to do is lazily load objects into the identity map if they're requested and not there
Coolhand has joined #ruby
<lupine> "all" ^^
Rym has joined #ruby
<workmad3> lupine: ah, but remember the load isn't allowed to block!!!
<noric> Xeago: I can hook into the assignment, but I'd have to tear apart the attribute value, which could be complex and deeply nested
<lupine> that's ok, he can do it in a background thread
amaya_the has quit [Ping timeout: 276 seconds]
<lupine> yes, doing it this way is going to be a hatchet job on your code
<workmad3> lupine: the simulation isn't allowed to wait while the background job loads it either
<csmrfx> How big is this data? 200MB? 2GB? 200GB?
<lupine> that's what you get when you use something not fit for purpose
<workmad3> lupine: hence my solution - load the entire thing :)
<lupine> workmad3, it can defer calculation of that part of the simulation
megha has quit [Quit: WeeChat 0.3.9.2]
karasawa has joined #ruby
<lupine> now that I'd love to see ^^
browndawg has joined #ruby
<noric> csmrfx: embarassed to say it's probably a fairly small dataset. < 500MB
<lupine> then stick it all into memory
<noric> nod
<noric> Alright, I will do that
<lupine> my last simulation project was ~200GB, so I didn't have that option
<csmrfx> I think you'd do best to have a server that has it all in memory ready for requests
samuel02 has quit [Remote host closed the connection]
<noric> stick it into memory and expect the deserializations to succeed
<lupine> (it was 2008)
<apeiros_> lupine: what? you have less than 200GB RAM?
<lupine> I did back then
<workmad3> heh
<lupine> these days, I have access to 768GB RAM machines
<apeiros_> tsss
<apeiros_> oh, nice
<Xeago> lupine: wat
<lupine> they are rather
Antiarc has joined #ruby
<Xeago> can I get a breakdown?
<noric> Keeping the dataset in memory doesn't actually solve the problem of allowing a top-level Foo to know its dependencies on nested Foos
jonathanwallace1 has joined #ruby
<apeiros_> Xeago: permission granted
sanukcm has joined #ruby
amaya_the has joined #ruby
<workmad3> noric: you don't need to know them then though
<workmad3> noric: because it's all in-memory
<Xeago> apeiros_: thanks! Give me the breakdown, DAMNIT!!!11
<noric> but, it does obviate the problem by allowing deserializations to trivially succeed because all the Foos are in an identity map
<lupine> noric, it makes resolving the dependency when it comes up super-fast
<noric> ^
<noric> :D
<noric> thanks a lot
<apeiros_> well, 768GB RAM isn't that expensive anymore… probably ~2000$
<lupine> I have no idea what it costs
<Xeago> lupine: does it matter what it costs?
<csmrfx> "disk" isn't that slow either
<lupine> no, I'm not paying :p
<apeiros_> csmrfx: compared to RAM, yes, yes it is :D
<lupine> I think the machines have more physical ram, it's just arranged in a clever way to be resilient against DIMM failure
<noric> next time I'll try to mention my small dataset size upfront, save some time
<workmad3> I had a machine for a project with 72gb of RAM and 16 cores to basically serve a dataset :)
berserkr has quit [Quit: Leaving.]
<noric> thanks for the discussion though
havenn has quit [Remote host closed the connection]
sanukcm has quit [Client Quit]
havenn has joined #ruby
<lupine> (these are nominally VM hosts, and NUMA to boot)
danieldocki has quit [Quit: Leaving...]
<csmrfx> noric: jruby + graph4j could be used, but many a times I've heard problems with graph databases for apps
<csmrfx> YMMV
<workmad3> I'd probably go with neo4j as I've had the most exposure to it
slissner has joined #ruby
zommi has quit [Quit: Leaving.]
whitedawg has quit [Quit: Leaving.]
<workmad3> similar though... it's meant as an embedded DB ideally, so jruby + neo4j
buscon has quit [Read error: No route to host]
<csmrfx> its been a few years since I was in a project with graphy probs...
F1skr has joined #ruby
<noric> thanks for the neo4j reference, I will check that out if this approach fails
buscon has joined #ruby
gyre007 has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
jonathanwallace1 has quit [Quit: WeeChat 0.3.9.2]
whitedawg has joined #ruby
jonathanwallace has joined #ruby
havenn has quit [Ping timeout: 260 seconds]
karasawa has quit [Ping timeout: 264 seconds]
<csmrfx> ...yep, it was neo4j not graph4j!
JeanMertz has quit [Ping timeout: 248 seconds]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
quest88 has joined #ruby
carloslopes has joined #ruby
nateberkopec has joined #ruby
moos3 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
moos3 has joined #ruby
subbyyy has quit [Ping timeout: 255 seconds]
danieldocki has joined #ruby
gyre007 has joined #ruby
rismoney has joined #ruby
_nitti has joined #ruby
friskd has quit [Quit: friskd]
serhart has quit [Quit: Leaving.]
UukGoblin has quit [Read error: Connection reset by peer]
pavilionXP has joined #ruby
includex has quit [Quit: Leaving...]
dsabanin has joined #ruby
tvw has quit [Remote host closed the connection]
danieldocki has quit [Client Quit]
danieldocki has joined #ruby
tvw has joined #ruby
_nitti_ has joined #ruby
fyolnish has quit [Remote host closed the connection]
joshman_ has joined #ruby
jjbohn|afk is now known as jjbohn
gyre007 has quit [Ping timeout: 248 seconds]
carloslopes has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mneorr has quit [Ping timeout: 256 seconds]
danieldocki has quit [Client Quit]
danieldocki has joined #ruby
danieldocki has quit [Client Quit]
danieldocki has joined #ruby
_nitti has quit [Ping timeout: 256 seconds]
danieldocki has quit [Client Quit]
swex has joined #ruby
x82_nicole has joined #ruby
zastern has joined #ruby
danieldocki has joined #ruby
swex_ has quit [Ping timeout: 272 seconds]
megha has joined #ruby
includex has joined #ruby
serhart has joined #ruby
pskosinski has joined #ruby
thatguycraig has joined #ruby
thatguycraig has quit [Max SendQ exceeded]
thatguycraig has joined #ruby
atadesk has quit [Quit: Leaving.]
jonahR_ has joined #ruby
yogendrarampuria has joined #ruby
yogendrarampuria has quit [Max SendQ exceeded]
crankycoder is now known as vng
carlyle has joined #ruby
johnmilton has joined #ruby
yogendrarampuria has joined #ruby
yogendrarampuria has quit [Max SendQ exceeded]
whitedawg has quit [Quit: Leaving.]
fermion has quit [Quit: Computer has gone to sleep.]
_nitti_ is now known as _nitti
hfatih has joined #ruby
kpshek has joined #ruby
kayloos has quit [Quit: kayloos]
nga4 has joined #ruby
fermion has joined #ruby
jonahR has quit [Ping timeout: 276 seconds]
jonahR_ is now known as jonahR
nga4 has quit [Remote host closed the connection]
nga4 has joined #ruby
Spami has quit [Ping timeout: 240 seconds]
adamjleonard has joined #ruby
gyre007 has joined #ruby
yogendra has joined #ruby
Banistergalaxy has quit [Ping timeout: 248 seconds]
generalissimo has joined #ruby
quest88 has quit [Quit: quest88]
yanto has joined #ruby
havenn has joined #ruby
yfeldblum has quit [Quit: Leaving]
chussenot has quit [Quit: chussenot]
luckyruby has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 255 seconds]
Banistergalaxy has joined #ruby
yanto has left #ruby [#ruby]
ryannielson has joined #ruby
whitedawg has joined #ruby
beiter has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
jmorton has joined #ruby
hfatih has quit [Quit: Leaving]
yogendra has quit [Quit: Leaving.]
csigi has joined #ruby
rellin has joined #ruby
polymar has quit [Remote host closed the connection]
<csigi> hi everybody
havenn has quit [Ping timeout: 248 seconds]
<hoelzro> hello
Uranio has quit [Quit: WeeChat 0.3.8]
<csigi> i am learning ruby
buscon has quit [Quit: Leaving]
main has quit [Ping timeout: 248 seconds]
<csigi> this is the first time I use irc
Naeblis has joined #ruby
blazes816 has joined #ruby
chussenot has joined #ruby
<breakingthings> leave while you still can
<workmad3> IRC RUINS LIVES!!!!!
<csigi> @@
<csigi> why? i dont understand
<csigi> the book said that irc is very good for learning new things in ruby
<JMcAfreak> really, guys? Must you do this to every new guy?
Choclo has quit [Ping timeout: 252 seconds]
<JMcAfreak> csigi: IRC is fine.
Spami has quit [Ping timeout: 276 seconds]
* workmad3 hides
zehrizzatti has joined #ruby
* JMcAfreak finds workmad3
* workmad3 runs away
<apeiros_> JMcAfreak: why, yes, it's a fair warning
jonathanwallace has quit [Ping timeout: 276 seconds]
Takehiro has joined #ruby
Choclo has joined #ruby
<workmad3> csigi: IRC is fine, apart from spoilsports like JMcAfreak, who ruins all our fun :(
<JMcAfreak> apeiros_: be that as it may, it's still ... um... OK, fine. SOME parts of irc will ruin lives, but here?
<JMcAfreak> workmad3: hey, I proved your point, then
<JMcAfreak> workmad3: it certainly does ruin lives
<workmad3> my life is ruined!!1!!!111!!
friskd has joined #ruby
<JonnieCache> what is going on here
<workmad3> JonnieCache: nothing... move along
<apeiros_> random madness
<JonnieCache> ive stumbled into some sort of commotion
<workmad3> nothing to see here...
* JMcAfreak nonchalantly sweeps everything under the rug
wreckimnaked has quit [Quit: WeeChat 0.3.9]
<apeiros_> JonnieCache: beware, it's contagious, so run! before your life is ruined too!
<workmad3> csigi: rewinding... hi, welcome to IRC
brunoro has joined #ruby
<workmad3> csigi: home of mad people and programmers (these are not mutually exclusive)
<csigi> nice to meet you ^.^
brendan_wrk has quit [Remote host closed the connection]
<csigi> i like it anyway
<JMcAfreak> brb
JMcAfreak has left #ruby ["They're coming to take me away, ha-haa!"]
JMcAfreak has joined #ruby
<JonnieCache> irc already ruined my life a long time ago
<JMcAfreak> dang it, irc client. THIS is the part that ruins lives. Trying to figure out why the heck my topic is appearing in white text on a white background in a place where I can't fix it.
brunoro has quit [Client Quit]
<JonnieCache> and i love it
maletor has joined #ruby
<JonnieCache> irc made me the man i am today
<workmad3> csigi: there you have, a damning testimony as to why IRC is bad
<JMcAfreak> JonnieCache: but you're in a burning ring of fire
<workmad3> csigi: it'll make you like JonnieCache....
yfeldblum has joined #ruby
darkcypher_bit has joined #ruby
<workmad3> bleh, it'll also destroy your typing accuracy somehow... or maybe that's just a side-effect of this being the first Monday of 2013?
<JMcAfreak> I think I like this place more than #xkcd sometimes.
<csigi> =))
<JMcAfreak> workmad3: I think that's the monday thing.
brendan_ has joined #ruby
<csigi> here is funny
<JonnieCache> is there an xkcd channel?
<JMcAfreak> JonnieCache: on irc.foonetic.net
<csigi> get me out of the heavy progrogramming books
browndawg has quit [Ping timeout: 248 seconds]
Takehiro has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
stevechiagozie has joined #ruby
Takehiro has joined #ruby
<csigi> i dont understand why twitter drop ruby
maletor has quit [Client Quit]
<apeiros_> because it was no longer the right tool
<csigi> T.T
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
jprovazn has quit [Quit: Leaving]
TerabyteST has joined #ruby
Mon_Ouie has joined #ruby
<csigi> so what is the right tool now?
<JMcAfreak> I really hope the answer isn't PHP
<workmad3> scala and java
<workmad3> for the heavy-duty background queuing they needed
* JMcAfreak lets out a sigh of relief
aganov has quit [Remote host closed the connection]
pwelch has quit [Quit: pwelch]
<csigi> I wonder what kind of apps does Ruby suit for
xclite has joined #ruby
<JMcAfreak> a lot of backend stuff - I know that
<csigi> it's very sad if it can only build some small things
<workmad3> csigi: don't take twitter's example to heart
<apeiros_> csigi: twitter was huge while still on ruby
<JMcAfreak> csigi: oh, you can actually build some really big things
<workmad3> csigi: twitter is a very extreme edge-case
<apeiros_> and never forget, it was ruby which allowed them to grow that huge
<JMcAfreak> the servers where I work have a lot of their servercode written in ruby
<griffindy> github is still running on rails isn't it?
<JMcAfreak> more specifically jruby
<JonnieCache> lots of twitter is still in ruby
<workmad3> griffindy: yup
<JMcAfreak> on rails
<JonnieCache> they just do the heavy lifting in scala
average_drifter has quit [Read error: Connection reset by peer]
<csigi> good news then
kevinfagan has quit [Read error: Connection reset by peer]
<jblack> I'm using it on a crapload of backend stuff that would otherwise be a real pain to provide.
<workmad3> JonnieCache: not that much now... I think they may actually only have the web front-end left
<JonnieCache> thats what i was referring to
<JMcAfreak> workmad3: that's a shame
<workmad3> JonnieCache: they've been gradually replacing ruby backend with scala for quite a while now
<apeiros_> scala - a swiss invention :)
<breakingthings> Don't they have a java server for the front-end now
<jblack> It makes my clients happy when i say "sure. I can make a web service for that over the weekend. It'll be ready monday"
Engin has joined #ruby
<JonnieCache> good on them. scala is much more suited to running something massive like that
<workmad3> breakingthings: certainly for some of it... not sure if it's all java/scala now
<workmad3> breakingthings: but it could be :)
<JonnieCache> ruby is for fast innovation, not big iron
<csmrfx> they probably have a http-server for the front-end
a_a_g has joined #ruby
<csmrfx> C or C++
<breakingthings> workmad3 sure, though it might be a sign that it's incoming.
hoelzro is now known as hoelzro|away
<JMcAfreak> csmrfx: C or C++ would be sexy
<breakingthings> The reason they switched originally was performance reasons back when 1.8.7 was the hot version
<csmrfx> Yes, AKA Apache or Nginx
<JonnieCache> soundcloud is also a large rails project
<jblack> Sinatra & JSON, and there's the info/data that the respective web teams need.
<breakingthings> Things have gotten better since then.
<JonnieCache> althoguh i imagine its just the frontend by now as welll
<Engin> This is a honest question: Why do people chose Ruby ? I've deployed Redmine. I was quite impressed with the small code base to provide all the features but the perforamnce was HORRIBLE.
<JMcAfreak> JonnieCache: however, rails isn't limited to just Ruby
<csmrfx> Your front-end should *always* come from a stupid web server... your middleware is another matter
<JMcAfreak> Engin: redmine is just kind of horrible in general
<workmad3> csmrfx: possibly... although it's more plausible to connect directly to java app servers than ruby ones (java app servers can do similar sorts of optimisations to apache or nginx through java.nio fun)
wroathe has joined #ruby
<csmrfx> no
<Engin> JMcAfreak: in my study, I figured the architecture is flawed -- the Apache module actually.
<csmrfx> imagine twitter serving their dumb cached content from a java server!
<csmrfx> not gonna happen
<JMcAfreak> That could be it
<csmrfx> JMO
<Engin> JMcAfreak: it was freaking compile the whole thing again and again when executing it... so if you do not specifically configure the apache module to pre-fork processes and keep them idle.. you can easily wait up to 1.5 minutes for the page to show up.
timonv has joined #ruby
<jblack> Hmmm. I'm sure they're using some internal version of s3 and/or cloudfront with twitter.
<JMcAfreak> csmrfx: with Java 1.8, that could actually be feasible, if I understood my friend correctly
carloslopes has joined #ruby
<csmrfx> Ah well, perhaps. But does it cache?
<JMcAfreak> Engin: Wow, that's fun
<JMcAfreak> csmrfx: it optimizes for the code that's hit most often
<breakingthings> Is there a benchmark for the different implementations of ruby somewhere?
<workmad3> csmrfx: jetty is capable of trunking a static file buffer to the network interface, similar to apache or nginx
<Engin> JMcAfreak: what is the proper way of hosting a Ruby web application ?
RagingDave has quit [Quit: Ex-Chat]
cha1tanya has quit [Quit: Leaving]
<JMcAfreak> Engin: that depends on what you need it for
havenn has joined #ruby
<csmrfx> workmad3: my point was more or less about global-scale servitude
magistr has joined #ruby
<csmrfx> imagine twitter using jetty for the firehose
<csmrfx> 8F
<JMcAfreak> Engin: Apache could do well when configured correctly.
<Engin> JMcAfreak: were aware of what I've just told you ?
<workmad3> csmrfx: yeah, I imagine they've actually got something like haproxy in front of it all
<Engin> you seem not surprised
<workmad3> csmrfx: but I don't know... and I was pointing out that it's not inconceivable, rather than saying I think they are doing it ;)
<csmrfx> Engin: simple caching web server in front of reverse proxied middleware
<JMcAfreak> ^
Hanmac has joined #ruby
<csmrfx> workmad3: defo inconceivable!!
<Engin> csmrfx: imho, that's band aiding a wrong design
<workmad3> csmrfx: oh, and yeah, varnish or something for caches
<JMcAfreak> I don't really do server stuff that often
<JMcAfreak> workmad3: yes.
<Engin> caching is obviously always the way to go for improving performance... but this is plain wrong to compile whole thing every time
<csmrfx> Engin: you mean, you have more than 50k concurrent connections?
<JMcAfreak> Engin: oh, I know
<Engin> I'm telling you it was taking 1.5 minutes for the first page to show up when apache module killed idle processing and forking them again
<csmrfx> Engin: what are you talking about, lost me there?
<workmad3> Engin: what apache module were you using?
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> stupid hotspot ... for some unknown reason i cant connect to them with laptop .... but i can with handy oO
<Engin> a bleeding edge passenger build
<csmrfx> You mean, your apache conf was incorrect and now you tell everyone Apache sucks?
<workmad3> Engin: sounds like you had a screwed up config then
<Engin> csmrfx: I'm talking about that I've deployed redmine... and the perforamcne was beyond words horrible
JeanMertz has joined #ruby
<Engin> workmad3: I talked to many people back then and they told me that's the normal behvaiour
<workmad3> Engin: 'back then' being what?
<csmrfx> It's not like your solution is going to automagically use telepathic confing to make everything supermega
<Engin> workmad3: by defualt, it kills idle processes, and does not fork new ones... so when you request a page/service it forks a new one and compiles the whole thing that needs to be executed (1.5 minutes)
Xeago has quit [Remote host closed the connection]
<Engin> so, I spefically cofngiured passenger to change its default behevaiour, so that it won't kill idle proceses, and keep something like 5 processes idle all the time
<JMcAfreak> better than leaking threads all over the place... my coworker came back one day to see some 13,000 threads in the pool.
<JMcAfreak> that was a fun one to fix.
<Engin> so that, now, when I start apache, it takes like 100% CPU for a minute or two and compiles everything... and requets are handled properlu.
Naeblis has left #ruby ["Leaving"]
<Engin> workmad3: it should be 1 year ago.
<workmad3> Engin: right, that's because the default passenger config is meant for sites that are used fairly constantly
megha has quit [Quit: WeeChat 0.3.9.2]
<Engin> workmad3: so you are saying, the first request will take long time but the processes won't be idle.
<workmad3> Engin: a 1.5 min boot time sounds like you've also got a pretty low-powered server
<Engin> idled*
<Engin> workmad3: yeah, it is a low powered server running redmine.
carlyle has quit [Remote host closed the connection]
<workmad3> Engin: so what you're saying is that on a crap machine, you're getting crap performance...
browndawg has joined #ruby
<csmrfx> 90 seconds is peanuts
<Engin> workmad3: please, talk with your logic.
JeanMertz has quit [Client Quit]
Rym has quit [Quit: Rym]
tvw has quit [Remote host closed the connection]
<csmrfx> Well. If confing apache aint your deal, perhaps the usual mongrel/thin/nginx
<csmrfx> Usually nothing works right out the box
nwertman has joined #ruby
jjbohn has quit [Quit: Linkinus - http://linkinus.com]
<workmad3> actual deployments need to be tuned for specific requirements
<Engin> [power went down] if it was 10 times faster and it took 9 seconds... it is still not acceptable.
<csmrfx> ?
<workmad3> if you have a site that's going to be accessed infrequently, you're going to need to alter the config away from a default that expects constant traffic
<JMcAfreak> 9 seconds is not acceptable?
<JMcAfreak> wow
<workmad3> Engin: you expect app servers to start instantly?
darkcypher_bit has left #ruby [#ruby]
<Engin> no, I expect it to run persistently.
<Engin> like a Java app
<workmad3> Engin: it does... if you configure it correctly
<breakingthings> Engin passenger has a configurable amount of time before it kills.
<Engin> yeah, why isn't it configured like that by default ?
<csmrfx> So you'd have something to work on
_46bit has quit [Quit: Leaving.]
_nitti has quit [Remote host closed the connection]
F1skr has quit [Quit: WeeChat 0.3.9.2]
<workmad3> Engin: I can't remember the exact reason... I think it's to avoid too much resource usage in shared-
<workmad3> application environments
alex__c2022_ has joined #ruby
<workmad3> Engin: but in essence, any default is going to be wrong in many contexts
<workmad3> Engin: so it's not surprising that you'll need to tweak it
<Engin> in java and php defaults work just fine
<Engin> don't you agree ?
<workmad3> Engin: nope
<workmad3> Engin: java and PHP defaults are as shit for most production settings as ruby ones
woolite64 has joined #ruby
<Engin> I disagree.
<breakingthings> PHP's default memory limit is tiny as shit.
<workmad3> Engin: there's an entire industry around tuning the JVM for production
<Engin> Anyway, so, my perception of how apache passenger worked is still accurate.
<breakingthings> Can't upload a 100x100 jpg and process it on that.
<breakingthings> :d
<csmrfx> if your solution depend on your middleware being blazing fast, you are probably doing it wrong
alex__c2022 has quit [Ping timeout: 272 seconds]
alex__c2022_ is now known as alex__c2022
<Engin> I'm just asking for the rationale for what seems to me very illogical (killing a process that already is running a compiled app -- only to compile it again with next request)
huoxito has joined #ruby
<JMcAfreak> breakingthings: PHP just sucks in general
jonathanwallace has joined #ruby
<breakingthings> JMcAfreak well duh but that was just an example of a default that doesn't work for everything
<breakingthings> since Engin seems content with running everything without any configuration whatsoever
<Engin> furthermore, I think it can introduce hard to hunt bugs, as respawning that proces and recompiling it can hide and or introduce bugs -- an environment must be persistently good or bad if you ask me but that's another topic.
<Engin> PHP sucks big time, that is true.
<JMcAfreak> Engin: :)
<csmrfx> PHP is great for shared hosting meant for normal people
dmerrick has quit [Ping timeout: 260 seconds]
maus has joined #ruby
<JonnieCache> all the "normal people" is the reason php sucks so badly
<csmrfx> (for historical reasons)
<Engin> breakingthings: I do not understand why it is designed the way it is, I'm sure there's a rationale for doing that... but I wouldn't imagine it'd be justified in todays technology :)
<JMcAfreak> JonnieCache: amen to that
<JonnieCache> it gives bad programmers a very easy gun to shoot themselves with
<workmad3> Engin: I think it's mostly to do with behaving like a good apache module tbh
sayan has quit [Read error: Connection reset by peer]
<JonnieCache> it almost has "foot here" written on the barrell
<breakingthings> Engin probably because nothing is configured by default for efficient production use.
<csmrfx> (I mean PHP support is widely available for cheap, the language isn't my fave)
<sonne> if i want to include some non-generated doc in a gem i'm packaging (such as configuration examples), what would be the best way?
<breakingthings> In production you can just ramp the timeout.
<sonne> just g.files += Dir.glob('examples/*') ?
* breakingthings shrugs
<workmad3> breakingthings: or turn it off... or configure a minimal number of processes to keep alive...
<breakingthings> right.
<breakingthings> whatever suits your use.
dnyy has joined #ruby
AimHigh has joined #ruby
jlast has joined #ruby
<workmad3> Engin: if you want something that's more java-esque... consider using unicorn, thin, mongrel, rainbows...
<workmad3> Engin: all of those are separate app servers rather than apache modules
<workmad3> (oh, or puma)
<apeiros_> 90s for a redmine startup sounds unlikely…
<apeiros_> (me skipped parts of the backlog, though)
<Engin> apeiros_: it was a netbook
AimHigh has left #ruby [#ruby]
<csmrfx> mehh
<apeiros_> Engin: 5-10y old?
<JMcAfreak> Aha
<csmrfx> pearls, swine, the works
<Engin> apeiros_: nah, quite recent.
philcrissman has quit [Remote host closed the connection]
<apeiros_> CPU?
thisirs has quit [Remote host closed the connection]
<apeiros_> RAM?
jonathanwallace has quit [Ping timeout: 248 seconds]
<Engin> apeiros_: i chose it because I wanted something space efficient in the office with power backup.
<jblack> Engin: Locking down resources that aren't being used for considerable length of time gets in the way of other things that need resources.
<Engin> apeiros_: I can't really remember... to be honest, it is a shitload of processing power for any web app
<Engin> jblack: OS manages that, not thhe app itself.
<apeiros_> Engin: then I'm back at "90s for redmine sounds unlikely"
<jblack> that's expecially important on systems with underpowered hardware.
<Engin> if the memory is not used it's going to be paged by the OS
DatumDrop has quit [Remote host closed the connection]
<apeiros_> redmine started in <10s for me 4y back, and that was a slower ruby and not top-end hardware
<Engin> and when next page fault occurs, it's going to be loaded back in to physiccal memory
Jamone has joined #ruby
<jblack> Engin: That's your use case, buddy. =) Many servers don't use swap at all in order to keep latency out of the mix.
<Engin> I just stated a fact :)
<csmrfx> or swap is in ram
<csmrfx> or what have you
* apeiros_ off, back in ~40
apeiros_ has quit []
<csmrfx> its always an iterative process to make a web app fast
F1skr has joined #ruby
<csmrfx> you need to massage it
<Engin> hehehe
<csmrfx> I'm out too
<csmrfx> l8rs
<Engin> that's a nice quote, it'll print it and put it on my wall
<jblack> engin: If you're pretty comfortable with the belief your app server isn't leaking memory, or file handles, or sockets, and you want to set things up to run non-stop, you _can_. =)
nemesit has quit [Quit: Leaving...]
<workmad3> Engin: what you stated is only a fact if you haven't tuned your OS memory swap for your server
<csmrfx> applies only to webapps with multiple concurrent users... (meaning optimize it *once* you have popularity)
<Engin> jblack: I have servers running for 230 days :)
<JMcAfreak> jblack: 13000 threads. on my coworker's project. One heck of a leak.
<JMcAfreak> (overnight)
clooth has quit [Read error: Connection reset by peer]
timonv has quit [Ping timeout: 255 seconds]
otters has joined #ruby
skryking has joined #ruby
skryking has left #ruby [#ruby]
<Engin> and it failed because a hard drive in the back end failed :)
<jblack> engin: You really shouldn't say that in public.
Monie has quit [Ping timeout: 255 seconds]
<JonnieCache> whys that
<workmad3> Engin: you had to take your server down because of a drive failure?
<workmad3> Engin: sucky :P
clooth has joined #ruby
<JMcAfreak> ouch
<Engin> nah, the company did, with the kind of vps I purchased
<jblack> Because he just said to every script kiddie in the channel that his servers are potentially vulnerable to any 0-day within the last 9 months.
megha has joined #ruby
<Engin> virtualization technology now supports redundent drive backends but the one I purchased did not support them I think
F1skr has quit [Client Quit]
<Engin> uptime can be predicted with other stuff -- your argument is invalid :)
<JMcAfreak> wait... how is jblack's argument invalid here? Not seeing the link
philips_ has quit [Excess Flood]
awarner has joined #ruby
<jblack> It was more of an off topic observation. I wish I hadn't even mentioned it.
Morkel has quit [Quit: Morkel]
<JMcAfreak> jblack: let's hope you didn't catch the attention of the people who would want that kind of info.
<JMcAfreak> :|
<Engin> ctrl+f for uptime
<jblack> Ok Engin. I give up.
<Engin> \o/
dankest has joined #ruby
zmo_ has quit [Quit: Leaving]
filipe has quit [Remote host closed the connection]
<jblack> I had a pesky problem with sinatra last night. Is this an appropriate place to discuss it?
harushimo has joined #ruby
mpfundstein has quit [Ping timeout: 240 seconds]
<JonnieCache> wtf. just because hes had it up for 230 days doesnt mean it hasnt been patched
<harushimo> to get a random number, the method you would use is rand right?
<JonnieCache> unless ive massively misunderstood something here
<jblack> jonniecache: The kernel. =)
<Engin> JonnieCache: something can be patched somethigs can't.
<Engin> jblack: you can rmmod patch modprove, if it is a module
<JonnieCache> cant you hotpatch the kernel these days?
zastern has quit [Read error: Connection reset by peer]
zastern has joined #ruby
<Engin> well... that requires major kernel reacrhitecting I suppose
<Engin> but there are ways to direct connections
<Engin> you know... you can suspend an instance, resume it on another physical machine
<Engin> and resume all connection (including tcp)
<Engin> utulizing ARP
<jblack> I'm not quite sure how that ties into ruby?
zastern_ has joined #ruby
<havenn> jblack: Sure, here or in #sinatra
<Engin> he asked about if it is possible to hotpatch a kernel
SCommette has joined #ruby
<Engin> 1) it is possible if the kernel is geared towards it -- designed that way 2) if you can transfer all user space app state and networking stack state to another machine
<Engin> interesting concepts actually
j0sh\a has joined #ruby
<JonnieCache> much better to just have a load balancer and redundant app servers
<Engin> theoritcally you also would be able to suspend the system patch and resume it before anyone can notice it
<Engin> JonnieCache: definetely.
<JonnieCache> so you can just take stuff down
<Engin> yeah, I completely agree
<Engin> your app must be stateless in the heart so you can do all sort of stuff
<JonnieCache> because its going to go down eventually anyway
<j0sh\a> hi guys - how can I used bundle exec rails console production in terms of a ruby script? I need to pull some info from irb sessions ...
<Engin> yup
<havenn> harushimo: Yeah, rand is psuedorandom, works well.
<JonnieCache> j0sh\a: you can require your script from inside irb
<Engin> that's why I think ideal web application design involves 1) stateless services 2) smart thin clients
zastern has quit [Ping timeout: 248 seconds]
<JonnieCache> just like how you would require a file normally
<harushimo> havenn: thanks, I'm rewriting a program from python to ruby
<jblack> Great. so, I've gotten into a little bit of a mess with one the middleare apps I'm developing. I let the routing get a little out of hand. It's no longer just simple get this and post that. a bit of crud of support functions have builtup around them, and I'm having trouble with returning errors to the user.
<harushimo> thank you
digitalsanctum has joined #ruby
browndawg has quit [Quit: Leaving.]
<jblack> I'll have something like get '/add/search/:state/:phrase'.. .and that'll call a function called add_search, which in turn calls something else....
sayan has joined #ruby
Astralum has quit [Ping timeout: 272 seconds]
dyrot has joined #ruby
<jblack> before long, I'm 2-3 levels down the stack when I catch an error. I'd like to do an erb :sometemplate and tell sinatra I'm all done with this request, and not return up through the stack
megha has quit [Quit: WeeChat 0.3.9.2]
<JonnieCache> you could just use exception handling
tjbiddle has joined #ruby
<JonnieCache> but that will make your app even more of a mess
megha has joined #ruby
dr_neek has joined #ruby
tjbiddle has quit [Remote host closed the connection]
<jblack> Yeah, I started there. a crapload of exception handlers in the get handlers. felt repetitive and wrong.
philcrissman has joined #ruby
<JonnieCache> more to the point youre basically covering your app in GOTO statements
ossareh has joined #ruby
tjbiddle has joined #ruby
daslicious_ has joined #ruby
<JonnieCache> which is a bad choice as a solution to overcomplex code
pkrnj has quit [Ping timeout: 255 seconds]
a_a_g has quit [Read error: Connection reset by peer]
atadesk has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
<jblack> hmmm. My goal is to reduce redundancy by calling out for common code.
<JonnieCache> i know you can call halt(500) anywhere in a sinatra app and it stops the control flow
<JonnieCache> but i dont know where you end up then
kayloos has joined #ruby
a_a_g has joined #ruby
<jblack> Let me try that.
_nitti has joined #ruby
<JonnieCache> sinatra also has helpers like not_found maybe you could see how theyre implemented
emocakes has quit [Quit: emocakes]
<jblack> Oh.
philips_ has joined #ruby
adeponte has joined #ruby
<jblack> I wonder if helpers can handle exceptions. The backend is pretty clean and does a good job of throwing well named exceptions.
trumpeter2003 has joined #ruby
<jblack> I took the time to make sure -that- was right. Just got into trouble in that glue laywer.
<jblack> layer
<JonnieCache> i suppose the stateless nature of http makes the GOTO-like aspect of exception handlers less awful
s7ry93r has joined #ruby
<JonnieCache> because you dont have to clean up anything, it doesnt matter where you came from
<jblack> I'm not too adverse to goto on the way to an exit.
<jblack> Right. I just want to display a template and "die"
_nitti has quit [Remote host closed the connection]
<JonnieCache> yeh exactly. in a web app youre always on the way to an exit and you always leave empty handed
_nitti has joined #ruby
iNerd is now known as Moofy
benlieb has quit [Quit: benlieb]
<JonnieCache> well halt sounds like what you want http://www.sinatrarb.com/intro#Halting
<jblack> That's -exactly- it!
Guest123 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<jblack> I can build a quick little error in the glue layer, and halt. That'll simplify the code immensely. thank you Johnnie!
csigi has quit [Ping timeout: 245 seconds]
pkrnj has joined #ruby
F1skr has joined #ruby
megha has quit [Quit: WeeChat 0.3.9.2]
jankly has quit [Ping timeout: 260 seconds]
beneggett has joined #ruby
invisime has joined #ruby
<JonnieCache> np
atadesk has quit [Quit: Leaving.]
csigi has joined #ruby
maletor has joined #ruby
dankest has quit [Quit: Leaving...]
carlyle has joined #ruby
DatumDrop has joined #ruby
maus has quit [Remote host closed the connection]
whitedawg has quit [Quit: Leaving.]
Steppen has joined #ruby
asteve has quit [Quit: Computer has gone to sleep.]
a_a_g has quit [Read error: Connection reset by peer]
itnomad has quit [Quit: Leaving]
a_a_g has joined #ruby
philcrissman has quit [Remote host closed the connection]
<harushimo> to convert a user input, I can just do this input = int(gets.chomp) because the input is a number
zehrizzatti has quit [Ping timeout: 276 seconds]
<harushimo> how do I convert a string to integer in ruby?
vlad_starkov has joined #ruby
<JonnieCache> >> "123".to_i
mmitchell has joined #ruby
<eval-in> JonnieCache: Output: "" (http://eval.in/6104)
<JonnieCache> booo
<JonnieCache> well that works despite what the bot says
<Hanmac> Integer(str) or str.to_i
<JMcAfreak> I just realized something. Torquebox.
mosez has quit [Ping timeout: 255 seconds]
<Hanmac> >> p Integer("0x33"), "0x33".to_i
<eval-in> Hanmac: Output: "51\n0\n" (http://eval.in/6105)
sn0wb1rd has joined #ruby
onibox has joined #ruby
browndawg has joined #ruby
mosez has joined #ruby
flagg0204 has joined #ruby
browndawg has quit [Client Quit]
philcrissman has joined #ruby
ryanf has joined #ruby
ryanf has quit [Client Quit]
carlyle has quit [Remote host closed the connection]
hotovson has quit [Remote host closed the connection]
dsabanin has quit [Quit: Leaving...]
apeiros_ has joined #ruby
wallerdev has joined #ruby
<csigi> can anyone tell me why I should use Ruby but not Python ?
dsabanin has joined #ruby
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
schaerli has joined #ruby
<apeiros_> because the language is nicer
jonathanwallace has joined #ruby
<breakingthings> csigi what are you going to be using it for
<breakingthings> what is your programming experience like
c0rn has joined #ruby
zeade has joined #ruby
jonathanwallace has quit [Client Quit]
jonathanwallace has joined #ruby
<JonnieCache> csigi: its mostly a philosophical choice
rakl has joined #ruby
DatumDrop has quit [Read error: Connection reset by peer]
DatumDrop has joined #ruby
mahmoudimus has joined #ruby
<JonnieCache> fuck
<JonnieCache> FUCK YOU GOOGLE! with your link rewriting
mneorr has joined #ruby
<JonnieCache> but yeah watch that video he explains it better than i can
AlSquirrel is now known as AlSquire
includex has quit [Quit: Leaving...]
madhadron has joined #ruby
ddd has quit [Ping timeout: 245 seconds]
mockra has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
a_a_g has quit [Read error: Connection reset by peer]
wroathe has quit [Ping timeout: 276 seconds]
a_a_g has joined #ruby
<apeiros_> and, was it resolved why Engin's redmine takes 90s to boot?
kpshek has quit []
<JMcAfreak> I have no idea
<JMcAfreak> apeiros_: but what do you think of torquebox? Could that help him out a bit?
<JonnieCache> it really could be any reason
<apeiros_> I have no experience with it
<JMcAfreak> (As you can see, I was away long enough that I have no idea what's going on anymore)
megha has joined #ruby
<JonnieCache> faulty hdd, ram
<yfeldblum> apeiros_, what version of ruby?
gyre007 has quit [Remote host closed the connection]
samuel02 has joined #ruby
mneorr has quit [Ping timeout: 240 seconds]
<apeiros_> yfeldblum: no idea. I just remembered that there's actually a log, skimming it now :)
mailo_ has quit [Quit: Linkinus - http://linkinus.com]
<yfeldblum> apeiros_, `ruby -v`
<apeiros_> yfeldblum: I think you misunderstand
<apeiros_> yfeldblum: *I* don't have a problem, Engin does
<yfeldblum> apeiros_, ah gotcha
<apeiros_> discussion from ~45min ago
<apeiros_> had to leave
miskander has quit [Quit: miskander]
* JMcAfreak sniggers
macmartine has joined #ruby
<apeiros_> uh, WhereIsMySpoon - is it possible that your log service does live-updates even when not activated?
<apeiros_> s/WhereIsMySpoon/whitequark/
dsabanin has quit [Quit: Leaving...]
<yfeldblum> apeiros_, anyway it could be the require performance regression in older patch releases of 1.9.2
mneorr has joined #ruby
<apeiros_> yfeldblum: improbable
blaxter has quit [Quit: foo]
<ekristen> are Resque.enqueue_in and Resque.enqueue_at apart of resque, resque-delayed or resque-scheduler, anyone know?
carloslopes has quit [Remote host closed the connection]
Elhu has quit [Ping timeout: 252 seconds]
madhadron has left #ruby [#ruby]
dr_bob has left #ruby [#ruby]
<apeiros_> ekristen: Resque.method(:enqueue_in).source_location
<apeiros_> or `$ Resque.enqueue_in` in pry
<yfeldblum> apeiros_, why is that?
Elhu has joined #ruby
<apeiros_> yfeldblum: because 90s is so many magnitudes too slow
<apeiros_> and I've had rails apps starting in affected rubies
brianpWins has quit [Quit: brianpWins]
<yfeldblum> apeiros_, it seems to me to be O(n^2)
<JonnieCache> redmine doesnt have that many files though
<JonnieCache> even my absolutely enormous spree project doesnt take 90s
miskander has joined #ruby
<JonnieCache> and my computers arent that fast
mengu_ has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
<ekristen> apeiros_: thanks
<apeiros_> I wonder how fast startup time on my NAS will be, that's some underpowered hardware…
<yfeldblum> JonnieCache, which version of ruby?
<JonnieCache> well obv 193 now
<apeiros_> yfeldblum: while it is O(n^2), the overall effect of it wasn't that big
<JonnieCache> but i dont remember it ever being that slow even in 192 days
<yfeldblum> apeiros_, it was huge
<apeiros_> yfeldblum: not 90s huge
<apeiros_> not factor 10 huge for an average rails app (and that's conservative)
d2dchat has joined #ruby
tenmilestereo has joined #ruby
karasawa has joined #ruby
ekristen has left #ruby [#ruby]
jrajav has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
haxrbyte has joined #ruby
jrajav has quit [Client Quit]
arturaz has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
nathancahill has joined #ruby
icole has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
mneorr has quit [Ping timeout: 260 seconds]
Spami has quit [Quit: This computer has gone to sleep]
mneorr has joined #ruby
[1]c3vin has joined #ruby
huoxito has quit [Quit: Leaving]
friskd has quit [Read error: Operation timed out]
a_a_g has quit [Read error: Connection reset by peer]
hadees has joined #ruby
a_a_g has joined #ruby
friskd has joined #ruby
c3vin has quit [Ping timeout: 240 seconds]
[1]c3vin is now known as c3vin
Vainoharhainen has quit [Quit: Leaving...]
deadlytoah has joined #ruby
Axsuul has joined #ruby
pasv has quit [Ping timeout: 276 seconds]
marr has joined #ruby
itnomad has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
io_syl has joined #ruby
cdt has quit [Quit: Ex-Chat]
Goles has joined #ruby
kaen has joined #ruby
ChampS666 has joined #ruby
csigi has quit [Ping timeout: 260 seconds]
thone_ has quit [Ping timeout: 276 seconds]
slainer68 has quit [Remote host closed the connection]
megha has quit [Quit: WeeChat 0.3.9.2]
miskander_ has joined #ruby
thone has joined #ruby
schaerli has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
gyre007 has joined #ruby
rdark has quit [Quit: leaving]
jlast has joined #ruby
_nitti has quit [Remote host closed the connection]
TerabyteST has quit [Quit: terabytest]
alex20032 has joined #ruby
<alex20032> What do you people think about GO programming language?
jonathanwallace has quit [Ping timeout: 276 seconds]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
miskander has quit [Ping timeout: 255 seconds]
miskander_ is now known as miskander
szck has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
mrsolo has joined #ruby
dsabanin has joined #ruby
zigomir has quit [Quit: zigomir]
jtharris has quit [Quit: WeeChat 0.3.9.2]
breakingthings has quit []
slissner is now known as speakingcode
jlast has quit [Ping timeout: 276 seconds]
rakl has quit [Quit: sleeping]
asteve has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
rakl has joined #ruby
carlyle has joined #ruby
alex20032 has left #ruby [#ruby]
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
codebrah has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
<codebrah> yo
luckyruby has joined #ruby
TerabyteST has joined #ruby
DatumDrop has quit [Remote host closed the connection]
brianpWins has joined #ruby
havenn has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
aedorn has joined #ruby
havenn has quit [Read error: Operation timed out]
Mon_Ouie has quit [Ping timeout: 248 seconds]
wroathe has joined #ruby
szck has quit [Quit: Leaving.]
havenn has joined #ruby
codebrah has quit [Ping timeout: 245 seconds]
Mon_Ouie has joined #ruby
mockra has joined #ruby
jlast has joined #ruby
zastern has joined #ruby
mneorr has quit [Ping timeout: 265 seconds]
kpshek has joined #ruby
zastern_ has quit [Ping timeout: 255 seconds]
miskander has quit [Quit: miskander]
a_a_g has quit [Read error: Connection reset by peer]
koshii has joined #ruby
a_a_g has joined #ruby
dsabanin has quit [Quit: Leaving...]
haxrbyte has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
nicoulaj has joined #ruby
cantonic_ has joined #ruby
stevechiagozie has joined #ruby
chrxn has joined #ruby
shevy2 has joined #ruby
karl_____ has joined #ruby
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
toekutr has joined #ruby
<karl_____> i have a file with lines starting with an IP address, followed by a space. What is the best way to return the IP address (ie, from starting of line to first space)?
workmad3 has quit [Ping timeout: 255 seconds]
F1skr has quit [Ping timeout: 260 seconds]
<karl_____> i was thinking of using a substring, delimit based on whitespace, and return [0]
<karl_____> but not sure how to do that
S1kx has quit [Quit: Leaving]
schaerli has joined #ruby
LouisGB has quit [Ping timeout: 256 seconds]
koshii has quit [Ping timeout: 252 seconds]
_nitti has joined #ruby
<aedorn> line.split(' ')[0] . line.slice(/.*?(?<=\s)/) . etc
miskander has joined #ruby
<reactormonk> karl_____, ^
alexspeller has quit [Remote host closed the connection]
dsabanin has joined #ruby
mneorr_ has joined #ruby
headius has joined #ruby
beneggett has joined #ruby
<aedorn> mmm should have been line.slice(/.*?(?=\s)/) .. oops. oh well
jtharris has joined #ruby
<havenn> karl_____: File.open('filename.txt', &:readline).split.first
chriskk has joined #ruby
bluenemo has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 240 seconds]
<Hanmac> havenn readlines also exist as class method on File so File.readlines(path)
voodoofish430 has joined #ruby
mafolz has quit [Quit: mafolz]
<havenn> Hanmac1: Wouldn't that read all the lines, not just the first?
timmow has quit [Ping timeout: 252 seconds]
<Hanmac> i thought he needs more lines than the first one
<havenn> Hanmac1: Ohhhh, I just re-read his question. Gotcha, yeah it isn't just first line he cares about...
kenneth has joined #ruby
<havenn> Hanmac1: Yeah, you are right - I just read the question wrong. >.>
<kenneth> naming things really is the hardest thing about programming
mneorr has quit [Ping timeout: 276 seconds]
browndawg has joined #ruby
<kenneth> i'm working on (yet another) mongo orm-like library that's a little different from your typical orm
<kenneth> need to find a name for it
emocakes has joined #ruby
<kenneth> all the descriptive ones are already used (mongomodel/ mongomapper, etc.)
szck has joined #ruby
<kenneth> y'all have any ideas how to go about this? :p
jjbohn has joined #ruby
<aedorn> kenneth: cheat and use http://wordoid.com/
jrist is now known as jrist-afk
megha has joined #ruby
<Hanmac> >> p rand(32).times.map{("a".."z").to_a.sample}.join
<eval-in> Hanmac: Output: "\"xbmsoqrpguuws\"\n" (http://eval.in/6107)
nicoulaj has quit [Quit: nicoulaj]
Krin has joined #ruby
Krin has left #ruby [#ruby]
luckyruby has quit [Remote host closed the connection]
<kenneth> diamongo
<kenneth> how's that sound?
<aedorn> diabolical
Krin has joined #ruby
Neomex has joined #ruby
<kenneth> mongols :p
h4mz1d has joined #ruby
DatumDrop has joined #ruby
<kenneth> can i call it mongols? or is that not PC enough
carloslopes has joined #ruby
<Hanmac> mongorm?
Dann1 has joined #ruby
<aedorn> PC went out the window when someone wrote God
<kenneth> Hanmac: taken
nicoulaj has joined #ruby
<Dann1> Guys
<Dann1> I need halp
danieldocki has quit [Quit: Leaving...]
<kenneth> omg
<kenneth> i'm calling it Kongo
<kenneth> :)
<kenneth> THIS IS HAPPENING
<Dann1> What have I missed
adamjleonard has quit [Quit: Linkinus - http://linkinus.com]
sepp2k has quit [Remote host closed the connection]
Krin has left #ruby [#ruby]
<Hanmac> kenneth how about Rongo? :P
<karl_____> thanks all for your help
<kenneth> gonna go with kongo
<kenneth> follows the naming my gems after myself thing
toekutr has quit [Remote host closed the connection]
<kenneth> (kenji is my web framework :P - my name is kenneth)
<Dann1> Why is everyone shooting ongo nmes
<kenneth> Dann1: There are only two hard things in Computer Science: cache invalidation and naming things.
alex__c2022 has joined #ruby
<Dann1> Well
jtharris has quit [Ping timeout: 276 seconds]
<Dann1> You're talking to a guy who named his dog 'homi'
<kenneth> (quote from Phil Karlton) - i'm wrestling with the latter
<Dann1> So I guess you're right
<kenneth> i
<kenneth> i'm also tempted to call it kengo
<kenneth> i did do kenji… :p so
karl_____ is now known as karl___
<Dann1> Roll the dice then ;D
fred909 has joined #ruby
niklasb has joined #ruby
karasawa has quit [Ping timeout: 255 seconds]
<Dann1> I still need some help here: http://eval.in/6106 @ line 21
hashpuppy has joined #ruby
<kenneth> Dann1: i looked at it and it seems fine…
berserkr has joined #ruby
<Dann1> I noticed that too :P
<hashpuppy> module Admin; class ReservationsController < ApplicationController; will always extend the Admin::ApplicationController, right?
<Dann1> But it won't budge
<kenneth> hashpuppy: yes
<hashpuppy> thanks. something weird is going on with rails, then.
<kenneth> hashpuppy: though you can hard code it if it makes you feel better (::Admin::ApplicationController)
yaymukund has joined #ruby
rezzack has joined #ruby
<yaymukund> I'd like to bundle a default config.yml file with my gem. Where should it live? lib/default_config.yml?
<hashpuppy> that actually made a difference
<Dann1> In a nice shack near the beach
<hashpuppy> not sure what's going on. thanks for the help, kenneth. i'll look into this some more
onibox has quit [Quit: leaving]
_nitti has joined #ruby
<Hanmac> " will always extend" is not so the right word for that
<hashpuppy> ?
<kenneth> Hanmac: will always inherit from would be more correct
nwertman has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
nwertman has joined #ruby
<Hanmac> yeah
<hashpuppy> thanks
sayan has quit [Ping timeout: 248 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
supergiantrobot has joined #ruby
f0ster has joined #ruby
snearch has joined #ruby
LouisGB has joined #ruby
deadlytoah has quit [Ping timeout: 248 seconds]
<kenneth> hey question for y'all: is there a way to list submodules for a module?
<mensvaga> I'm using XML simple to write multiple XML entries to a file.
DatumDrop has quit [Ping timeout: 248 seconds]
<mensvaga> When I read from the file, I get an error message about trying to add things to the root document or something.
<mensvaga> Is there some flag I can pass to xml simple that I'm missing? I'm reading the docs right now and I can't seem to find it.
arturaz has quit [Ping timeout: 252 seconds]
snearch has quit [Client Quit]
snearch has joined #ruby
ananthakumaran has joined #ruby
asteve has quit [Changing host]
asteve has joined #ruby
<Hanmac> nokigiri is more cool for xml parsing & generating
<Hanmac> i mean nokogiri
jtharris has joined #ruby
karasawa has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
toekutr has joined #ruby
Jackneill has quit [Quit: Leaving]
pcarrier has quit [Ping timeout: 265 seconds]
mpfundstein has joined #ruby
a_a_g has joined #ruby
h4mz1d has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
trumpeter2003 has quit [Read error: Connection reset by peer]
trumpeter2003 has joined #ruby
_nitti has quit [Remote host closed the connection]
mneorr_ has quit [Remote host closed the connection]
beneggett has joined #ruby
Guest25886 has joined #ruby
snearch has quit [Quit: Verlassend]
trumpeter2003 has quit [Read error: Connection reset by peer]
<ericwood> nokogiri is the bestest for all things
megha has quit [Quit: WeeChat 0.3.9.2]
Jasko has quit [Ping timeout: 272 seconds]
trumpeter2003 has joined #ruby
<Dann1> The process can't go on after 'bot = Cich::Bot.new do'
LouisGB has quit [Ping timeout: 240 seconds]
<Dann1> I can't see what's with it
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
jjbohn has quit [Quit: Leaving...]
jjbohn has joined #ruby
Playground has joined #ruby
lolcathost has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
arturaz has joined #ruby
snearch has joined #ruby
chussenot has quit [Read error: No route to host]
<kenneth> ugh, so if i do @something in a method defined self.whatever, it's a class ivar, which i can access in instances using @@something rigth?
chussenot has joined #ruby
snearch has quit [Client Quit]
chrisja has quit [Quit: leaving]
snearch has joined #ruby
sayan has joined #ruby
MattRb has joined #ruby
gyre007 has quit [Remote host closed the connection]
Neomex has quit [Quit: Neomex]
carloslopes has quit [Remote host closed the connection]
snearch has quit [Client Quit]
<Norrin> kenneth: Can access it using @something from within the class
Neomex has joined #ruby
Neomex has quit [Client Quit]
snearch has joined #ruby
reinaldob has quit [Remote host closed the connection]
megha has joined #ruby
ryanjh has joined #ruby
gyre007 has joined #ruby
breakingthings has joined #ruby
grzywacz has quit [Ping timeout: 272 seconds]
ananthakumaran has quit [Quit: Leaving.]
<kenneth> Norrin: wait, how do you mean
<kenneth> Norrin: if it's a class ivar, wouldn't i need @@something from instance methods?
<Norrin> Don't think so.
aapzak has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
ddd has joined #ruby
<Norrin> @something is an instance car
<Norrin> Var
Jedi_SCT1 has joined #ruby
<Norrin> Not a class var
carloslopes has joined #ruby
koshii has joined #ruby
gyre007 has quit [Ping timeout: 260 seconds]
<Norrin> To make a class var use @@something
mmokrysz has joined #ruby
mmokrysz is now known as _46bit
CaptainKnots has quit [Read error: Connection reset by peer]
browndawg has quit [Quit: Leaving.]
DatumDrop has joined #ruby
<kenneth> Norrin: okay, but if you're using it from a class method (def self.whatever) wouldn't you call it @somethin within that method?
Guest25886 has quit [Quit: Guest25886]
baroquebobcat has quit [Quit: baroquebobcat]
_46bit has left #ruby [#ruby]
chussenot has quit [Quit: chussenot]
sepp2k has joined #ruby
ebouchut has joined #ruby
fermion has quit [Quit: P]
aapzak has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
<Norrin> kenneth: No. No reason it's name would change.
a_a_g has joined #ruby
pmros has joined #ruby
hashpuppy has left #ruby [#ruby]
<pmros> ruby 2.0rc1
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
alex__c2022_ has joined #ruby
chussenot has joined #ruby
trumpeter2003 has quit [Read error: Connection reset by peer]
<pmros> it seems ruby 2.0 won't precompile to bytecode
<pmros> what a pity!
<pmros> what do you think about?
koshii has quit [Ping timeout: 256 seconds]
trumpeter2003 has joined #ruby
ebobby has joined #ruby
thatRD has quit [Quit: thatRD]
alex__c2022 has quit [Ping timeout: 248 seconds]
Choclo has quit [Ping timeout: 248 seconds]
alex__c2022_ is now known as alex__c2022
willob has joined #ruby
dankest has joined #ruby
DatumDrop has quit [Ping timeout: 246 seconds]
nathancahill has quit [Read error: Connection reset by peer]
nathancahill has joined #ruby
Neomex has joined #ruby
Pip has joined #ruby
megha has quit [Quit: WeeChat 0.3.9.2]
swingha has joined #ruby
dmiller has joined #ruby
Jedi_SCT1 has quit [Quit: See ya]
snearch has quit [Quit: Verlassend]
_nitti has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
Jedi_SCT1 has joined #ruby
friskd has quit [Quit: friskd]
a_a_g has quit [Read error: Connection reset by peer]
sayan has quit [Read error: Connection reset by peer]
friskd has joined #ruby
hydrozen has joined #ruby
a_a_g has joined #ruby
friskd has quit [Read error: Connection reset by peer]
friskd has joined #ruby
ryanh_ has joined #ruby
MattRb has quit [Quit: MattRb]
rezzack has quit [Quit: Leaving.]
wermel has quit [Remote host closed the connection]
ryanjh has quit [Ping timeout: 248 seconds]
<pmros> so quiet...
arturaz has quit [Remote host closed the connection]
rezzack has joined #ruby
luckyruby has joined #ruby
Choclo has joined #ruby
a_a_g has quit [Quit: Leaving.]
mavenastic has joined #ruby
jlast has quit [Ping timeout: 255 seconds]
<speakingcode> how does one describe a parameter with rdoc
mavenastic has left #ruby [#ruby]
<speakingcode> is # @param [Type] description appropriate?
MattRb has joined #ruby
<Mon_Ouie> That's YARD's syntax
<Pip> What is the difference between '\n' and '\\n'?
<speakingcode> o. i totally just guessed it based on javadoc,, what is the rdoc syntax?
<Mon_Ouie> RDoc doesn't have a dedicated syntax for parameter, just type it out
<speakingcode> oh ok
trumpeter2003 has quit [Read error: Connection reset by peer]
<Mon_Ouie> Pip: The second one has an uneeded backslash. They both represent the same string.
trumpeter2003 has joined #ruby
<speakingcode> thanks Mon_Ouie
<Pip> Mon_Ouie, which is the Enter ?
<Pip> newline character?
<Mon_Ouie> The line feed character
<Mon_Ouie> (newline is an acceptable name, too)
rezzack has quit [Quit: Leaving.]
<Mon_Ouie> And actually it's neither. It's a backslash followed by "n"
<Mon_Ouie> '\n'.length == 2
<Mon_Ouie> However, "\n" is the newline character
<Pip> :O
<Pip> I didn't know that
baphled has joined #ruby
MattRb has quit [Client Quit]
jlast has joined #ruby
BSaboia has joined #ruby
<Pip> What is $/ ?
nemesit has joined #ruby
<Mon_Ouie> The default line separator for methods like gets. Usually they read up to "\n" but if you set $/ to something else, they will read up to that
<Mon_Ouie> (I’ve never seen someone actually change it, though)
<Pip> Gotcha
postmodern has joined #ruby
chussenot has quit [Quit: chussenot]
Neomex has quit [Quit: Neomex]
_nitti has quit [Remote host closed the connection]
_alejandro has joined #ruby
alexspeller has joined #ruby
jrist-afk is now known as jrist
MattRb has joined #ruby
Elhu has joined #ruby
DatumDrop has joined #ruby
platzhirsch has joined #ruby
albakry has joined #ruby
<platzhirsch> What is the Ruby way of iterating an array and only doing a modification if condition c does not apply?
nicoulaj has quit [Remote host closed the connection]
<banisterfiend> platzhirsch: array.each { |v| v.haxor! if c? }
_nitti has joined #ruby
pmros has quit [Read error: Connection reset by peer]
<platzhirsch> banisterfiend: thanks
nemesit has quit [Quit: Leaving...]
<platzhirsch> I need to undergo Ruby bootcamp, I think I have forgotten 2/3 of the Ruby syntax and Ruby-idiomatic way of writing code
dangerousdave has joined #ruby
<Kovensky> heh
karl___ has quit [Quit: Page closed]
<Kovensky> I still haven't entirely gotten the hang of ruby-idiomatic code
<Kovensky> most of my ruby still reads like perl
<banisterfiend> platzhirsch: how come? stuck in rails?
<platzhirsch> banisterfiend: no, didn't take time yet to use Ruby besides my machine learning class in last summer term, I need to do a real project
zehrizzatti has joined #ruby
yalue has joined #ruby
mpfundstein has quit [Ping timeout: 255 seconds]
<banisterfiend> platzhirsch: what's your primary language?
<platzhirsch> banisterfiend: Java, also some Python lately
carloslopes has quit [Remote host closed the connection]
itchyouch has joined #ruby
<banisterfiend> platzhirsch: so, you seem set. Why bother with ruby? :P
<platzhirsch> banisterfiend: I've fallen in love with the syntax and want to learn another language in depth
danieldocki has joined #ruby
nicoulaj has joined #ruby
<JohnTeddy> How can I convert a "string" into a variable string?
ryanh_ has quit [Read error: Connection reset by peer]
<banisterfiend> JohnTeddy: what kind of variable
<banisterfiend> platzhirsch: you prefer the syntax to python?
kpshek has quit [Ping timeout: 276 seconds]
DatumDrop has quit [Ping timeout: 260 seconds]
<j0sh\a> hi guys, if I bundle exec rails c production; I get to irb and can input a command to interact with my app and pull some info. How can I do this with a ruby script?
<platzhirsch> banisterfiend: yes
nyuszika7h has quit [Remote host closed the connection]
<Norrin> I need a project too.
<Norrin> Making Mac GUI apps costs money though.
lesnik_ has joined #ruby
<Norrin> in ruby.
mrsolo has quit [Quit: This computer has gone to sleep]
<Hanmac> Norrin you are wrong
<Norrin> Shoes looks immature.
hybris has joined #ruby
<breakingthings> Norrin macruby is free innit
nyuszika7h has joined #ruby
<JohnTeddy> banisterfiend: Well a variable already exists, a, b, c. I want the user to input (with gets.chomp) a, b or c.
<Norrin> Don't think so.
Choclo has quit [Ping timeout: 240 seconds]
<JohnTeddy> ThougH I don't want "a", "b" or "c", I want a, b, or c
<breakingthings> Norrin pretty sho it is
<breakingthings> RubyMotion is what costs money.
mrsolo has joined #ruby
<breakingthings> Which is iOS.
<Hanmac> Norrin with wxRuby or rwx i can do native apps in windows, in linux and in MacOSX
<Norrin> Ok. Will look it up
<Norrin> Thought I heard both costs
kpshek has joined #ruby
_nitti has quit [Remote host closed the connection]
karasawa has quit [Ping timeout: 276 seconds]
itchyouch_ has joined #ruby
<j0sh\a> any ideas? it's just a one line while in irb..
ryanjh has joined #ruby
<breakingthings> Didn't know about wxRuby.
ebouchut has quit [Quit: This computer has gone to sleep]
<Gate> j0sh\a: usually you do a rake task
TheFuzzball has quit [Quit: Computer has gone to sleep.]
<j0sh\a> Gate, its going to be for a nagios script check_bla.rb
<Gate> j0sh\a: that is not the only option, but its the most common
<Norrin> Google:"rwx ruby" isn't returning anything
<Gate> j0sh\a: ah, so you want to write a ruby script, OK :)
main has joined #ruby
<j0sh\a> I need to pull the data, using the same as the irb one liner, and take received output into an if statement
Takehiro has quit [Remote host closed the connection]
<j0sh\a> ja :D
<Gate> j0sh\a: basically, you are going to have to require the right libraries, i think require "bundle/setup"
<j0sh\a> but I have no idea how! :)
itchyouch has quit [Ping timeout: 276 seconds]
itchyouch_ is now known as itchyouch
_nitti has joined #ruby
elaptics is now known as elaptics`away
<breakingthings> Norrin "wxRuby".
<Hanmac> j0sh\a with "c" production do you mean a C-Extension?
<Norrin> I found that
<Norrin> He said rex too
<j0sh\a> Hanmac, no just console
<Norrin> Rex
<Gate> Hanmac: I think he means ./bin/rails c (as in console)
<Norrin> rwx
<j0sh\a> ye, sorry
<breakingthings> wxRuby seems to be more or less dead, though.
<Gate> j0sh\a: I believe that you can require 'config/environment' and it will set up the rails environment for you
<Norrin> "Hanmac: Norrin with wxRuby or rwx i can do native apps in windows, in linux and in MacOSX "
<Hanmac> wxRuby will be wevite someday ... but rwx is more active and more cool
<Hanmac> revite
<Norrin> What is rwx? Cant find it, hanmac
<j0sh\a> thx Gate
<Hanmac> they says that 2013 will be the year of wxRuby : http://rubyforge.org/pipermail/wxruby-development/2013-January/thread.html .... this morons :P
<Norrin> Found it on your github
trumpeter2003 has quit [Read error: Connection reset by peer]
<Norrin> Lol. Just now
trumpeter2003 has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
lesnik_ has quit [Quit: Lost terminal]
<platzhirsch> Any idea how I can effectively use collect on an array to alter its elements and push after very element another one into it? https://gist.github.com/30ff014eb63696f56f79
<Norrin> Offended by "morons". Guess it was supposed to be funny or something though.
Xeago has joined #ruby
<JohnTeddy> How can I make that program less ugly?
<albakry> Hello, what is the best reference book to learn ruby for newbie programmer
<albakry> Thanks in advance :)
rburton- has joined #ruby
dougireton has joined #ruby
ryanf has joined #ruby
<yaymukund> JohnTeddy: for starters, how about keeping the piles in a hash so you can do something like: piles[pile_destination] << piles[pile_source].pop
itchyouch_ has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
<yaymukund> but this looks like homework, so that's as far as I'll go :p
<Xeago> apeiros_: time for sc2?
Choclo has joined #ruby
<Hanmac> Norrin after i show them that i alone can program faster and better than they using an code generator, they still want to use swig ... after i show tham that my code is so much better .... thats why i call them morrons :P
<JohnTeddy> yaymukund: It runs and works fine, so if it was home work I would be done. I'm actually asking a more vague/general question about good ways to write the program.
<mensvaga> what's the syntax for specifying an attr_accessor when that variable has an @ before it?
<mensvaga> attr_accessor :@something
<mensvaga> doesn't seem to work
itchyouch_ has quit [Client Quit]
<Norrin> Hanmac: Gotcha.
aapzak has quit [Remote host closed the connection]
<Hanmac> mesvaga do it without @, the @ is added automaticly
<mensvaga> ok
<mensvaga> thanks
dmiller has joined #ruby
dougireton has quit [Read error: Connection reset by peer]
<mensvaga> does using .send bypass method_missing ?
itchyouch has quit [Ping timeout: 255 seconds]
schaerli has quit [Remote host closed the connection]
timonv has joined #ruby
<mensvaga> actually, scratch that.
<Hanmac> no, method_missing will be used
<swarley> It has to use method missing
<mensvaga> I have attr_accessor :@something and I'm getting:
<mensvaga> nil is not a symbol
<mensvaga> for that line.
<mensvaga> shit
karasawa has joined #ruby
<swarley> you can just us attr_accessor :something
<mensvaga> forget about the @
<mensvaga> I got rid of that.
DatumDrop has joined #ruby
<swarley> Then what is the line now
ukd1 has joined #ruby
<mensvaga> attr_accessor :something
<swarley> k
georgeisb has joined #ruby
<mensvaga> I'll try initializing the variable first or something.
<swarley> And you're getting a TypeError?
<swarley> You shouldn't have to
<swarley> instance variables are nil by default
codezombie has joined #ruby
yacks has quit [Ping timeout: 240 seconds]
<mensvaga> I'm digging into debugging it now. something else funky is going on.
[Neurotic] has joined #ruby
ukd1 has quit [Client Quit]
<JohnTeddy> If I have 7 numbers in an array, what is a good way to pick the highest number?
<havenn> JohnTeddy: Array#max
<JohnTeddy> thanks
ryannielson has left #ruby [#ruby]
<breakingthings> check them API docs, bruv.
hukl has joined #ruby
<breakingthings> real talk.
<havenn> JohnTeddy: P.S., #max is on Enumerable: http://ruby-doc.org/core-2.0/Enumerable.html
rezzack has joined #ruby
<Norrin> Looks like someone hacked the wxRuby site or something. http://wxruby.rubyforge.org/wiki/wiki.pl?WxRuby_Tutorial
TheFuzzball has joined #ruby
<Hanmac> yeah wxRuby is more than six feet under :P
platzhirsch has quit [Ping timeout: 272 seconds]
supergiantrobot has quit [Quit: supergiantrobot]
<yaymukund> I'm working on a gem that does system level stuff. I'd like it to ship with some default .yml config files. Where would I store those files so that my script can read it and override values if necessary?
karasawa has quit [Ping timeout: 256 seconds]
<yaymukund> ("Where would I store those files" meaning "where does it belong in the structure of a gem?")
Takehiro has joined #ruby
trumpeter2003 has quit [Ping timeout: 240 seconds]
gyre007 has joined #ruby
karasawa has joined #ruby
bigmac has joined #ruby
drago757 has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 256 seconds]
mvangala has quit [Read error: Connection reset by peer]
cdt has joined #ruby
nemesit has joined #ruby
Goles_ has joined #ruby
mvangala has joined #ruby
Steppen has quit [Quit: Leaving]
yalue has quit [Quit: Leaving]
<canton7> yaymukund, I don't like the idea of modifying files in your gempath
<canton7> if you're going to do that, put those files in ~/ or something
_46bit has joined #ruby
reset has joined #ruby
eldariof has quit []
<yaymukund> canton7: I'm not being clear, sorry. I'd like to read config-default.yml for default values (this file should never be modified) and then override the default values iwth ~/.config.yml
<canton7> ah, yeah sensible
<yaymukund> my question is where should that config-default.yml file live?
<yaymukund> or does it not matter
Goles has quit [Ping timeout: 252 seconds]
<canton7> don't know that there's a convention there
<canton7> config/ ?
<canton7> etc/ ?
karasawa has quit [Ping timeout: 240 seconds]
<yaymukund> it seems weird to have yml files in the gempath
<bigmac> has any one automated a webpage compiled from a directory or list of movies ?
<yaymukund> I like etc/, I'll go with that
<yaymukund> canton7: ty
MMOURA has joined #ruby
graft has quit [Ping timeout: 276 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
mrsolo has joined #ruby
albakry has quit [Quit: Leaving]
Goles_ has quit [Client Quit]
* MMOURA New Network joined /server 87.202.109.65
MMOURA has quit [Killed (idoru (Spam is off topic on freenode.))]
serhart has quit [Quit: Leaving.]
graft has joined #ruby
_46bit has left #ruby [#ruby]
graft has quit [Changing host]
graft has joined #ruby
RagingDave has joined #ruby
Takehiro has quit [Ping timeout: 265 seconds]
xAndy is now known as xandy
<bigmac> any one every try to download a trailer from www,imdb,com
<bigmac> i have been searching threw traffic and i beileve i found the swf file but im not sure how to play it...
<bigmac> im trying to automate this with ruby
xandy is now known as xAndy
aldodelgado has joined #ruby
pu22l3r has joined #ruby
invisime has left #ruby [#ruby]
volte has quit [Read error: Connection reset by peer]
zehrizzatti has quit [Quit: Linkinus - http://linkinus.com]
volte has joined #ruby
timonv has quit [Remote host closed the connection]
hydrozen has quit [Quit: Computer has gone to sleep.]
georgeisb has left #ruby [#ruby]
hotovson_ has joined #ruby
gyre007 has quit [Ping timeout: 260 seconds]
mikekelly has quit [Ping timeout: 265 seconds]
aldodelgado has left #ruby [#ruby]
Elhu has quit [Quit: Computer has gone to sleep.]
mikekelly has joined #ruby
BadLarry has quit [Quit: quitting]
subbyyy has joined #ruby
llaskin has joined #ruby
yakko has joined #ruby
platzhirsch has joined #ruby
himsin has left #ruby ["Leaving"]
<llaskin> anyone have experience running 1.9.3 on windows?
BadLarry has joined #ruby
alex__c2022_ has joined #ruby
hydrozen has joined #ruby
<havenn> bigmac: So you are successfully downloading the swf and you want to play it locally or serve it up on a webpage?
<ezra> llaskin: yep, what's up
<llaskin> ezra, i've successfully managed to install ruby-debug-ide by following some steps I found on StackOverflow
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
_46bit has joined #ruby
alex__c2022 has quit [Ping timeout: 248 seconds]
alex__c2022_ is now known as alex__c2022
aapzak has joined #ruby
<llaskin> however, I'm getting errors in is_binary_data? and also this: https://gist.github.com/4478661
<bigmac> havenn: i would like to play locally on a webpage
mpfundstein has joined #ruby
<llaskin> however, I'm getting errors in is_binary_data? and also this: https://gist.github.com/4478661
<llaskin> woops sorry for dupe
apeiros_ has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 245 seconds]
<bigmac> ia.media-imdb.com/images/M/Example.swf
<llaskin> the output of p site_name doesn't seem to be a string to me...seems to output what I would get when I run string.inspect.....
<bigmac> i found this threw a tcp dump it fails to play threw vlc
subbyyy has quit [Ping timeout: 276 seconds]
<bigmac> i think i would need the java script to play it?
emmanuelux has joined #ruby
workmad3 has joined #ruby
hoelzro|away is now known as hoelzro
hoelzro is now known as hoelzro|away
dr_neek has quit [Quit: dr_neek]
<llaskin> i'm also seeing these "Exception in DebugThread loop: undefined method `is_binary_data?' for "[[\"Automation Test Same Shard01-07-2013--11-59-40 Site\"]]":String
slainer68 has joined #ruby
<ezra> llaskin: looks like is_binary_data? isn't just deprecated, it's gone
<ezra> llaskin: nothing to do w/ rdebug
<llaskin> ezra: I don't ever call is_binary_data in any of my code
<ezra> llaskin: the other output does look like a string, it just looks like someone is overloading to_s or returning something unexpected
<ezra> llaskin: brb
ebouchut has joined #ruby
Elhu has joined #ruby
rburton- has quit [Quit: Leaving...]
dankest has quit [Quit: Leaving...]
<ezra> llaskin: what versions of ruby-debug and linecache do you have?
timonv has joined #ruby
<llaskin> linecache 0.5.13, ruby-debug-ide19 0.4.12
karasawa has joined #ruby
mahmoudimus has quit [Read error: Connection reset by peer]
szck has quit [Quit: Leaving.]
<llaskin> ezra, btw, as a note I am using Netbeans 6.9.1 for a coding IDE, in case that matters.....
ebouchut has quit [Ping timeout: 276 seconds]
beilabs has joined #ruby
miskander has quit [Quit: miskander]
atmosx has joined #ruby
mneorr has quit [Remote host closed the connection]
<llaskin> and ezra, with 1.8.7, which this code works under, I get linecache 0.46 and ruby-debug-ide 0.4.16
swingha has quit [Quit: leaving]
<ezra> i've got the same versions as you
Takehiro has joined #ruby
<ezra> rgrep'ing the ide19 gem does have a call to is_binary_data in the xml printer
<ezra> what does your backtrace say
<llaskin> all I see is: Exception in DebugThread loop: undefined method `is_binary_data?' for "#<SitesOverviewPage:0x4531e30>":String
atmosx has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
pu22l3r has quit [Ping timeout: 276 seconds]
grieve has joined #ruby
serhart has joined #ruby
miskander has joined #ruby
<ezra> yeah, i dunno. you could try monkey patching that xml printer to see if that's where it's happening
<llaskin> sure
<llaskin> can you tell me where/how?
hackerdude has joined #ruby
mark_locklear has quit [Remote host closed the connection]
<llaskin> (seeing as I have no idea how to do that....)
<llaskin> but what woudl be causing a string to output like a wierd inspect array
horofox_ has quit [Read error: Connection reset by peer]
<ezra> probably unrelated, maybe someone is overriding to_s?
atmosx has joined #ruby
horofox_ has joined #ruby
<ezra> you can open the String class and add is_binary_data?, then just check the caller() stack to see where it's coming from
asteve has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<ezra> that's what i'd start with
ukd1 has joined #ruby
<llaskin> i definitely never overrode to_s
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Takehiro has quit [Ping timeout: 246 seconds]
<atmosx> hello
_46bit has left #ruby [#ruby]
<ezra> well, approach them as separate problems for now just to avoid conflating things
alex__c2022 has quit [Remote host closed the connection]
asteve has joined #ruby
karasawa has quit [Ping timeout: 252 seconds]
alex__c2022 has joined #ruby
<ezra> might be related, but until you get the is_binary_data? call tracked down, i wouldnt worry about it
gabrielrotbart has joined #ruby
geekbri has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<ezra> do you understand what i was saying about checking the caller in an overridden String#is_binary_data?
Guedes0 has joined #ruby
<llaskin> no
aedorn has quit [Quit: Leaving]
<llaskin> i mean, lets pretend I need to know down to which file to edit on my machine
<llaskin> given that I have the typical "C:\Ruby193\blah install
IceDragon has joined #ruby
piotr__ has joined #ruby
<ezra> add class String\n def is_binary_data?\n puts caller() # or log it\n end \n end
horofox__ has joined #ruby
<llaskin> where do I add that?
<ezra> just add it in the top of the src file that you're debugging for now
piotr_ has quit [Ping timeout: 260 seconds]
<ezra> just temporary to track down where the call is coming from
<ezra> it'll give you a call stack
Loaft has joined #ruby
<llaskin> ok
<llaskin> running now
gabrielrotbart has quit [Remote host closed the connection]
huoxito has joined #ruby
Choclo has quit [Ping timeout: 246 seconds]
jmeeuwen has quit [Ping timeout: 255 seconds]
nwertman has quit [Quit: leaving]
<atmosx> I'd kill for corn flakes now
<atmosx> jeez
horofox_ has quit [Ping timeout: 255 seconds]
<IceDragon> atmosx thats illegal >:
itchyouch has joined #ruby
itchyouch has quit [Client Quit]
gansbrest has joined #ruby
miskander has quit [Quit: miskander]
maletor has joined #ruby
<llaskin> ok so the thread problem happens when I click over to the variables tab in Netbeans(though all of a sudden the variables tab that wasn't working, is working....wtf)....I am using netbeans 6.9.1 which is technically deprecated(but is the last version of netbeans that supported ruby dev). Here's a gist of what happens: https://gist.github.com/4478880
horofox__ has quit [Quit: horofox__]
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
<gansbrest> hi. what's the opposite to "string" =~ /regex/ . I need to use that when there is no match.
<platzhirsch> I have an array full of command strings, but commands.each{|c| exec(c) } only executes the first, is that right or am I missing something?
kpshek has quit []
ebobby has quit [Ping timeout: 240 seconds]
<ezra> llaskin: yeah, it's in the xml printer
<atmosx> IceDragon: yeah, I guess depends on the location. If I were Pablo Escobar's son, I'd probably kill 3 guards if they didn't get me a cup of cornflakes.
mengu_ has quit [Quit: Konversation terminated!]
<IceDragon> ;x
<atmosx> IceDragon: :-P
nyuszika7h has quit [Remote host closed the connection]
<ezra> llaskin: you can see if there's a newer ide19 gem, or you can edit yours and figure out what the replacement for is_binary_data? is and use that
<IceDragon> murder.he.wrote
beiter has quit [Quit: beiter]
ukd1 has quit [Quit: leaving]
reset has quit [Quit: Leaving...]
<llaskin> ezra AFAIK thats the latest ide19 gem
nyuszika7h has joined #ruby
medik has joined #ruby
dankest has joined #ruby
<ezra> llaskin: i dont use that gem, so i don't know. i'd see what the replacement for is_binary_data? is and override the xml printer method that's calling it
<ezra> llaskin: so now you have a line number: C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide19-0.4.12/lib/ruby-debug/xml_printer.rb:124:in `print_variable'
thatguycraig has quit [Quit: Leaving.]
c3vin has quit [Ping timeout: 240 seconds]
Vainoharhainen has joined #ruby
Hanmac_ has joined #ruby
connor_ has joined #ruby
reset has joined #ruby
gurps has quit [Quit: bye]
<llaskin> ezra ithink i got it...
gurps has joined #ruby
gurps has quit [Remote host closed the connection]
jmeeuwen has joined #ruby
Morkel has joined #ruby
<llaskin> hrmmmm was I supposed to add the code inside the module or above the module def in xml_printer.rb?
<ezra> what code?
clooth has quit [Ping timeout: 252 seconds]
<atmosx> llaskin: don't do that. There are a mirriad ways to edit/open a class in your programs. Don't edit a gem sitting on your GEM_HOME
nwertman has joined #ruby
miskander has joined #ruby
gabrielrotbart has joined #ruby
<llaskin> the code noted in the accepted comment on the 2nd link I posted
xemu has joined #ruby
<ezra> llaskin: you can override the module definition in your source, not the gem directly
rburton- has joined #ruby
sailias has quit [Quit: Leaving.]
<llaskin> so do I have to put the String class at the top of every script I have?
kpshek has joined #ruby
atno has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
<ezra> no just once in an early eval. it seems like there's a newer gem somewhere though
<ezra> i'm just skimming these threads, but it sounds like there's a beta
gurps has joined #ruby
<atmosx> llaskin: is it possible that your programming experience is kinda flawed for what you're trying to accomplish? :-P
rburton- has quit [Client Quit]
clooth has joined #ruby
<llaskin> atmosx: yes, but I'm just trying to make something that worked in 1.8.7 work in 1.9.3
<ezra> atmosx: nothing like a busted ass debugger to halt his programming experience though :)
<atmosx> llaskin: You can edit the class in a file located in ~/project/lib/myedits.rb and then load via "require_related 'lib/myedits.rb'" the file in all your .rb files, so you don't have to manually add the class on every file.
<atmosx> llaskin: oh I see.
<atmosx> ezra: what's the busted ass debugger?
<llaskin> if I load it at the "top level" of my code(IE, i have one script that sort of controls all other scripts) will that be enough?
platzhirsch has quit [Read error: Connection reset by peer]
gabrielrotbart has quit [Remote host closed the connection]
<ezra> ruby-debug w/ 1.9.3, specifically the -ide19 gem in his case
<ezra> llaskin: yes
rondale_sc has quit [Quit: rondale_sc]
nga4 has quit [Ping timeout: 255 seconds]
andrewhl has quit [Remote host closed the connection]
<llaskin> testing now
<ezra> llaskin: what atmosx is saying is that it's good practice to put that override outside of your main code; otherwise you'll have some orphaned code once the gem is fixed, and some poor maintainer(you?) will be trying to figure out wtf it's there for
<llaskin> aaah good point
<llaskin> still getting stack trace when switching to the watches tab
<ezra> did you replace that caller() definition w/ whatever was on SO
ner0x has quit [Quit: Leaving]
<ezra> otherwise, the last loaded definition wins
<llaskin> ahahah hahah i'm a moron
<llaskin> lemme rerun
<speakingcode> would anyone be able to tell me how to do a query in active record equivalent to "SELECT value FROM table WHERE value::int in (99,393,2,13)
karasawa has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<speakingcode> i.e. get result set of all the items matched in a collection
nomenkun has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 240 seconds]
nateberkopec has quit [Quit: Leaving...]
nwertman has quit [Read error: Connection reset by peer]
Hanmac_ has quit [Ping timeout: 245 seconds]
karasawa has quit [Ping timeout: 252 seconds]
nwertman has joined #ruby
<shevy2> speakingcode I could not because I dont know activerecord :(
LouisGB has joined #ruby
<speakingcode> its okay i found it
ryanjh has quit [Quit: Computer has gone to sleep.]
<Gate> speakingcode: where(["value::int in (?)", id_array])
alex__c2022 has quit [Quit: alex__c2022]
<workmad3> speakingcode: where(:"value::int" => id_array) may also work
cdt has quit [Ping timeout: 248 seconds]
tenmilestereo has quit [Quit: Leaving]
<speakingcode> ty
ebobby has joined #ruby
kaen has quit [Ping timeout: 264 seconds]
dankest has quit [Quit: Leaving...]
jlast has quit [Remote host closed the connection]
alexspeller has quit [Quit: Leaving...]
jgarvey has quit [Quit: Leaving]
yaymukund has quit [Ping timeout: 264 seconds]
yaymukund has joined #ruby
serhart has quit [Quit: Leaving.]
tommyvyo has joined #ruby
_nitti has quit [Remote host closed the connection]
sailias has joined #ruby
<atmosx> speakingcode: try #rubyonrails
dsabanin has quit [Quit: Leaving...]
<atmosx> they for sure will know how to work out activerecord
<workmad3> atmosx: I'm in there too ;) the only reason I said 'maybe' was because I wasn't sure about the value::int attribute name in that style of query
jlast has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
ebobby has quit [Ping timeout: 260 seconds]
<atmosx> :-) okay
<atmosx> I'm not btw :-P
abrausch has joined #ruby
ossareh has quit [Ping timeout: 260 seconds]
yaymukund has quit [Ping timeout: 246 seconds]
rondale_sc has joined #ruby
dangerousdave has quit [Quit: Leaving...]
grzywacz has quit [Ping timeout: 246 seconds]
rondale_sc has quit [Client Quit]
mengu has joined #ruby
yaymukund has joined #ruby
_nitti has joined #ruby
mneorr has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
dr_neek has joined #ruby
slash_nick has joined #ruby
_nitti_ has joined #ruby
flip_digits has quit [Ping timeout: 252 seconds]
carlyle has quit [Remote host closed the connection]
c3vin has joined #ruby
TerabyteST has quit [Quit: terabytest]
theRoUS has quit [Ping timeout: 246 seconds]
Goles has joined #ruby
sepp2k1 has quit [Remote host closed the connection]
dougireton has joined #ruby
karasawa has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
tommyvyo has quit [Quit: http://thomasvendetta.com]
jds__ has joined #ruby
Goles_ has joined #ruby
jonathanwallace has quit [Ping timeout: 276 seconds]
ossareh has joined #ruby
Takehiro has joined #ruby
_nitti has quit [Ping timeout: 276 seconds]
Goles_ has quit [Client Quit]
gabrielrotbart has joined #ruby
Goles has quit [Read error: Operation timed out]
philcrissman has quit [Remote host closed the connection]
workmad3 has quit [Read error: Operation timed out]
alexspeller has joined #ruby
F1skr has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
snearch has joined #ruby
Takehiro has quit [Ping timeout: 255 seconds]
karasawa has quit [Ping timeout: 248 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
Xeago has quit [Remote host closed the connection]
dougireton has quit [Ping timeout: 240 seconds]
_nitti_ has quit [Remote host closed the connection]
_nitti has joined #ruby
Xeago has joined #ruby
pkrnj has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
wroathe has quit [Ping timeout: 240 seconds]
aeontech has joined #ruby
_alejandro has quit [Remote host closed the connection]
_nitti has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 255 seconds]
kpshek has quit []
F1skr has quit [Quit: WeeChat 0.3.9.2]
joshman_ has quit [Ping timeout: 264 seconds]
dsabanin has joined #ruby
dsabanin has quit [Client Quit]
_nitti has joined #ruby
berserkr has quit [Quit: Leaving.]
squidBits has joined #ruby
DatumDrop has quit [Remote host closed the connection]
aloshkarev has joined #ruby
aloshkarev has left #ruby [#ruby]
_nitti has quit [Remote host closed the connection]
breakingthings has quit []
Morkel has quit [Quit: Morkel]
<Pip> Keep talking
matchaw___ has joined #ruby
<slash_nick> I like the way you talk
<emocakes> you have a very soothing voice
aeontech has quit [Ping timeout: 245 seconds]
alanp has quit [Read error: Connection reset by peer]
nathancahill has quit [Quit: nathancahill]
matchaw_ has quit [Ping timeout: 255 seconds]
awarner has quit [Read error: No route to host]
awarner has joined #ruby
awarner has quit [Read error: No route to host]
abrausch has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
awarner has joined #ruby
miskander has quit [Quit: miskander]
jtharris has quit [Quit: WeeChat 0.3.9.2]
awarner has quit [Read error: No route to host]
blacktulip has quit [Remote host closed the connection]
alanp has joined #ruby
awarner has joined #ruby
yaymukund has quit [Ping timeout: 252 seconds]
mpfundstein has quit [Ping timeout: 260 seconds]
icco has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
awarner_ has joined #ruby
allsystemsarego has quit [Quit: Leaving]
_46bit has joined #ruby
aloshkarev has joined #ruby
gyre007 has joined #ruby
Jamone is now known as Monie
jjbohn has quit [Quit: Leaving...]
cdt has joined #ruby
cdt has quit [Remote host closed the connection]
kevinykchan has joined #ruby
awarner has quit [Ping timeout: 260 seconds]
samuel02 has quit [Remote host closed the connection]
ossareh has quit [Ping timeout: 252 seconds]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
beneggett has joined #ruby
dmiller has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
hydrozen has quit [Quit: Computer has gone to sleep.]
<speakingcode> can i access an objects field as a hash or something?
Dann1 has quit [Quit: Dann1]
<speakingcode> for instancei n javascript i could say var myObject = { name: "speakingcode", job: "programmer"} then var fieldtoget="name" then i could say myObject[fieldtoget]
asteve has quit [Ping timeout: 255 seconds]
malkomalko has joined #ruby
<alexspeller> speakingcode: kind of, try:
tommyvyo has quit [Quit: http://thomasvendetta.com]
<grieve> speakingcode: you could always do myObject[fieldtoget.to_sym]
<alexspeller> object = new Object
karasawa has joined #ruby
<alexspeller> method_name = "foobar"
<alexspeller> object.send(foobar)
Elhu has quit [Quit: Computer has gone to sleep.]
ngoldman has joined #ruby
<alexspeller> grieve: that won't work for all (most?) objects
ChampS666 has quit [Ping timeout: 276 seconds]
<alexspeller> It will only work on hashes
<grieve> he gave us a hash?
<grieve> oh hang on… he said in javascript :D nevermidn!
<slash_nick> #select{|k,_| something_something_something}
chussenot has joined #ruby
<slash_nick> wonder if that would work
* slash_nick shuts up
dr_neek has quit [Quit: dr_neek]
bean has quit [Quit: Computer has gone to sleep.]
joshman_ has joined #ruby
tchebb has quit [Ping timeout: 272 seconds]
elico has quit [Read error: Connection reset by peer]
grieve has quit []
<alexspeller> >> t = Time.now; method = "hour"; p t.send(method)
<eval-in> alexspeller: Output: "0\n" (http://eval.in/6111)
elico has joined #ruby
karasawa has quit [Ping timeout: 255 seconds]
malkomalko has quit [Remote host closed the connection]
<alexspeller> (but be careful where you get the input from and that someone e.g. in a web form can't send arbitrary methods)
willob has quit [Quit: Leaving.]
baphled has quit [Ping timeout: 255 seconds]
orangeblock has joined #ruby
davidcelis has quit [Quit: K-Lined.]
davidcel- is now known as davidcelis
davidcelis has quit [Changing host]
davidcelis has joined #ruby
woolite6444 has joined #ruby
serhart has joined #ruby
jlast has quit [Remote host closed the connection]
gabrielrotbart has quit [Remote host closed the connection]
nomenkun has joined #ruby
gyre007 has quit [Remote host closed the connection]
orangeblock has left #ruby [#ruby]
libryder has joined #ruby
slash_nick has quit [Quit: leaving]
<libryder> if i have an attr_accessor, can i set it inside the class calling it by method or do i need to set it using its instance variable?
stopbit has quit [Quit: Leaving]
reset has joined #ruby
DatumDrop has joined #ruby
nomenkun has quit [Read error: Operation timed out]
nicoulaj has quit [Remote host closed the connection]
woolite64 has quit [Ping timeout: 260 seconds]
hotovson_ has quit [Remote host closed the connection]
flip_digits has joined #ruby
aedorn has joined #ruby
ebobby has joined #ruby
JustinAiken has joined #ruby
<JustinAiken> Is this an improper use of attr_accessor? https://gist.github.com/67fce7816247b7928170
<libryder> var = 1 needs to become self.var = 1
<libryder> otherwise you are creating a temporary variable
<libryder> if i understand correctly
mjolk has quit [Quit: Leaving]
nignaztic has joined #ruby
nazty has quit [Read error: No route to host]
<JohnTeddy> How can I convert 10 to a string without using to_s?
generalissimo has quit [Remote host closed the connection]
<alexspeller> JohnTeddy: er, why?
<aedorn> "#{10}"
kayloos has quit [Quit: kayloos]
jerius has quit [Read error: Operation timed out]
<JohnTeddy> alexspeller: That is using to_s
<JohnTeddy> That is linked to to_s
<aedorn> not like you're avoiding to_s
<Sou|cutter> why can't you use to_s ? Something is seriously awry
<libryder> lol
<JohnTeddy> It's just a game to see if it's possible
<alexspeller> oh right
<alexspeller> >> numbers = {1 => "1", 2 => "2", 3 => "3", 10=>"10"}; p numbers[10].inspect
<eval-in> alexspeller: Output: "\"\\\"10\\\"\"\n" (http://eval.in/6112)
<alexspeller> :-P
s7ry93r has quit [Ping timeout: 260 seconds]
gabrielrotbart has joined #ruby
subbyyy has joined #ruby
chussenot has quit [Quit: chussenot]
bwlang has left #ruby [#ruby]
reset has quit [Quit: Leaving...]
<alexspeller> (obviously you will need more numbers in your hash for real world usage ;)
ebobby has quit [Ping timeout: 255 seconds]
jrist is now known as jrist-afk
DatumDrop has quit [Ping timeout: 255 seconds]
libryder has left #ruby [#ruby]
RagingDave has quit [Quit: Ex-Chat]
mneorr has quit [Ping timeout: 248 seconds]
wroathe has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
chussenot has joined #ruby
subbyyy has quit [Ping timeout: 265 seconds]
hell_razer has joined #ruby
awarner_ has quit [Remote host closed the connection]
snearch has quit [Quit: Verlassend]
<hell_razer> hello, i nothing know about ruby, i am trying to understand how to pass some sting params to some ruby script - https://github.com/jordansissel/fpm/blob/master/lib/fpm/command.rb#L115 - its looks like "list" but how to separate list items
baroquebobcat has joined #ruby
Kuifje has quit [Ping timeout: 260 seconds]
jonathandade has quit [Quit: jonathandade]
<alexspeller> hard to tell from that, have you tried commas, spaces, or commas and spaces?
<alexspeller> e.g.
jonathandade has joined #ruby
<alexspeller> foocommand --directories foo bar baz
<alexspeller> foocommand --directories foo,bar,baz
<alexspeller> foocommand --directories foo, bar, baz
<alexspeller> maybe one of those will work?
<hell_razer> alexspeller, yes tried, all these fails
aloshkarev has quit [Quit: aloshkarev]
pcarrier has joined #ruby
<alexspeller> foocommand --directories foo --directories bar --directories baz
jonathandade has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
ryanf has quit [Ping timeout: 264 seconds]
kiyoura has joined #ruby
nemesit has quit [Quit: Leaving...]
AndIrc_ has quit [Read error: Connection reset by peer]
rovalent has joined #ruby