apeiros changed the topic of #ruby to: Ruby 1.9.3-p374: http://ruby-lang.org (ruby-2.0.0-rc1) || Paste >3 lines of text on http://gist.github.com
nat2610 has quit [Quit: Leaving.]
<workmad3> waxjar: what you need to do is call .join if you need the other thread to have finished before you proceed
Goles has joined #ruby
nari has quit [Ping timeout: 264 seconds]
<workmad3> waxjar: as that's what .join does... threadB.join will cause the current thread to wait until threadB finishes
<waxjar> i see
baroquebobcat has quit [Ping timeout: 256 seconds]
jaequery has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
nat2610 has joined #ruby
<breakingthings> So uh… I'm trying to build an IRC bot with rspec, and I am struggling with how I should set up my tests for my irc connection class
lushious has quit [Remote host closed the connection]
<breakingthings> Specifically, IRC#connect, which calls TCPSocket#new; I'm not sure how I might properly stub/mock the TCPSocket...
lushious has joined #ruby
<breakingthings> (IRC#connect being my class)
mergoth has quit [Ping timeout: 264 seconds]
<workmad3> Spooner_: he could also do t.join in his each block at the end
havenn has joined #ruby
<Spooner_> workmad3, That would be potentially slower, since each thread would have to finish BEFORE another was started.
DatumDrop has quit [Ping timeout: 240 seconds]
<workmad3> Spooner_: not in that code
banisterfiend has quit [Ping timeout: 276 seconds]
<Spooner_> No, but it makes sense to do it in any sort of network blocking code.
templaedhel has joined #ruby
etcetera has joined #ruby
<workmad3> Spooner_: well, doing a ips.each(&:join) means that all the threads have to finish before anything else proceeds
<Spooner_> workmad3, But if you join immediately after starting a thread, you might as well not bother with threads.
baroquebobcat has joined #ruby
<workmad3> Spooner_: I'm not suggesting joining immediately after starting a thread
enebo has quit [Quit: enebo]
templaedhe has joined #ruby
<workmad3> Spooner_: I'm suggesting joining a specific thread immediately before reading its result
<Spooner_> Oh sorry, yes, the block at the end. Yes, that would be perfectly fine too.
<workmad3> :)
emptyflask has quit [Remote host closed the connection]
<breakingthings> Can anyone help me out with that rspec issue?
<Quadlex> I can try
banisterfiend has joined #ruby
<Quadlex> No promises
zph has quit [Quit: Computer has gone to sleep.]
mmitchell has quit [Remote host closed the connection]
<breakingthings> Quadlex: I'm working on an IRC connection class, and am speccing out the #connect method, and was trying to figure out how I might be able to stub/mock out the TCPSocket#new call
sjk has left #ruby [#ruby]
templaedhel has quit [Ping timeout: 252 seconds]
<nate_h> ok, so i've got the join working now
<nate_h> but now its giving me a variable error
jonahR has joined #ruby
<breakingthings> TCP should receive 2 arguments, one being a server address and the other being a number, but how can I mock that out if I can't give it a server address?
reset has joined #ruby
<nate_h> i thought i'd be able to access the variable "output"
<Quadlex> breakingthings: You could use dependancy injection to create the socket
jonathanwallace has joined #ruby
<Quadlex> And then inject a double
zph has joined #ruby
juarlex has quit [Remote host closed the connection]
<breakingthings> That is foreign magic to me.
<Quadlex> Or provide a method to return the socket
<nate_h> oh, nevermind, i guess I have to define it first
<Quadlex> Are you familiar with Rspec mocks?
fyolnish has quit [Remote host closed the connection]
<nate_h> so that its declared outside that scope so it can be used
workmad3 has quit [Ping timeout: 252 seconds]
<breakingthings> A bit, but I don't know what "dependency injection" really means.
<Quadlex> The idea is that you supply a class with the objects it needs when ou instantiate it
fyolnish has joined #ruby
<Quadlex> It decouples implementation
soulcake has quit [Quit: ZNC - http://znc.in]
<Quadlex> And allows you to easily test AND to extend from other code
<Quadlex> So, in Ruby, we have Duck typing
fyolnish has quit [Remote host closed the connection]
<Quadlex> If you call #dothething
kiyoura has joined #ruby
<Quadlex> Any object implementing #dothething is suitable
<breakingthings> Okay, I'm still a little shaky but I think I kind of get what you're saying, but how does that work in here?
<Quadlex> So if you have an object that responds to that method and supply it as part of your call to YourClass.new
itsdavem has joined #ruby
<Quadlex> You can replace it with any other object that responds
soulcake has joined #ruby
<Quadlex> If you injected a TCPSocket you could instead make a double of it and then inject the double
<breakingthings> but how does that solve the problem of the nonexistant server string?
<Quadlex> Other options include stubbing or mocking out any call to TCPSocket
<Quadlex> In your tests? Just pass in a dummy string
<breakingthings> and just assert that TCPSocket.should_receive(:new).with(kind_of(String), kind_of(Numeric))?
<Quadlex> yup
hck89 has quit [Ping timeout: 255 seconds]
<breakingthings> hm, alright.
<Quadlex> You're not testing TCPSocket after all
jtgiri_ has quit [Read error: Connection reset by peer]
<Quadlex> IF you're trying to ensure that a connectable string was being passed it would be a different story
zph has quit [Quit: Computer has gone to sleep.]
jtgiri_ has joined #ruby
<breakingthings> yeah. I get it.
<breakingthings> I think I was trying to overthink what I should pass #connect
<breakingthings> oh, another question
<Quadlex> God, that's my biggest problem
<breakingthings> should I use should_receive(:new), or stub(:new)?
<Quadlex> "LETS OVER DESIGN THINGS! ENGINEERING, FUCK YEAH!"
<breakingthings> and differences thereof?
templaedhe has quit [Quit: Leaving...]
<Quadlex> I *belive* that stub doesn't set an expectation
dekroning has joined #ruby
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
elico has quit [Ping timeout: 255 seconds]
<Gate> breakingthings: should_receive is a test, stub isn't. Use should receieve if it is part of your test that the message gets sent, stub if you just need it to not do anything but what you want
<Gate> no, stub does not create an expectation
<Quadlex> Whoo! I was right!
ryanh has joined #ruby
<breakingthings> expectation == assertion, yeah?
* Quadlex does the "could have RTFM, didn't, right anyway" dance
<breakingthings> If so, alright, thanks
<Gate> basically
sbear has joined #ruby
<breakingthings> Cool, thanks Quadlex & Gate.
dekroning has quit [Ping timeout: 248 seconds]
epylinkn has joined #ruby
epylinkn has left #ruby [#ruby]
TomyLobo has quit [Quit: Standby mode...]
elico has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Guest14483 has quit [Quit: Leaving]
NihilistDandy has joined #ruby
andrewhl has joined #ruby
iamjarvo has joined #ruby
bradhe has joined #ruby
brianpWins has quit [Quit: brianpWins]
Proshot has quit [Quit: Leaving]
d2dchat has joined #ruby
ffranz has quit [Quit: Leaving]
rizzy has quit [Quit: Leaving]
moos3 has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
MattRB has joined #ruby
cgcardona has joined #ruby
maletor has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
nkts has quit [Read error: Connection reset by peer]
nkts has joined #ruby
joshman_ has quit [Ping timeout: 255 seconds]
<colonolGron> is there a difference between TCPSocket.new and Socket.tcp
<colonolGron> in the underlying architecture
earthquake has joined #ruby
<Quadlex> NP, breakingthings
bradhe has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
aytch has joined #ruby
Goopyo has quit [Ping timeout: 248 seconds]
dougireton has quit [Quit: Leaving.]
bradhe has quit [Ping timeout: 240 seconds]
rboyd has quit [Read error: Operation timed out]
jlast has joined #ruby
cableray has quit [Ping timeout: 252 seconds]
dekroning has joined #ruby
jlast has quit [Read error: Connection reset by peer]
jlast_ has joined #ruby
rookfood has joined #ruby
bradhe has joined #ruby
xyzodiac has joined #ruby
anti_ has joined #ruby
cableray has joined #ruby
templaedhel has joined #ruby
earthquake has quit [Quit: earthquake]
arya has joined #ruby
bradhe has quit [Remote host closed the connection]
dekroning has quit [Ping timeout: 252 seconds]
mikepack has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 248 seconds]
shorts has joined #ruby
tomzx_mac has joined #ruby
asym has quit [Ping timeout: 245 seconds]
chussenot has quit [Quit: chussenot]
BOTNET-1 has joined #ruby
BOTNET-2 has joined #ruby
BOTNET-0 has joined #ruby
BOTNET-3 has joined #ruby
Spooner_ has quit [Remote host closed the connection]
BOTNET-5 has joined #ruby
BOTNET-7 has joined #ruby
BOTNET-4 has joined #ruby
ericx has joined #ruby
piotr_ has quit [Ping timeout: 240 seconds]
BOTNET-8 has joined #ruby
BOTNET-6 has joined #ruby
BOTNET-10 has joined #ruby
BOTNET-9 has joined #ruby
BOTNET-11 has joined #ruby
BOTNET-13 has joined #ruby
BOTNET-12 has joined #ruby
BOTNET-15 has joined #ruby
BOTNET-14 has joined #ruby
BOTNET-16 has joined #ruby
BOTNET-17 has joined #ruby
BOTNET-18 has joined #ruby
<breakingthings> oh gob the botnets
BOTNET-19 has joined #ruby
BOTNET-20 has joined #ruby
BOTNET-21 has joined #ruby
<breakingthings> somebody ehlp
BOTNET-23 has joined #ruby
BOTNET-24 has joined #ruby
BOTNET-22 has joined #ruby
jonathanwallace1 has joined #ruby
BOTNET-25 has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
BOTNET-27 has joined #ruby
BOTNET-26 has joined #ruby
BOTNET-28 has joined #ruby
BOTNET-4 has quit [Read error: Connection reset by peer]
BOTNET-15 has quit [Read error: Connection reset by peer]
BOTNET-2 has quit [Read error: Connection reset by peer]
BOTNET-17 has quit [Read error: Connection reset by peer]
BOTNET-1 has quit [Read error: Connection reset by peer]
BOTNET-20 has quit [Read error: Connection reset by peer]
BOTNET-3 has quit [Read error: Connection reset by peer]
BOTNET-7 has quit [Read error: Connection reset by peer]
BOTNET-14 has quit [Read error: Connection reset by peer]
BOTNET-18 has quit [Read error: Connection reset by peer]
BOTNET-6 has quit [Read error: Connection reset by peer]
BOTNET-11 has quit [Read error: Connection reset by peer]
BOTNET-19 has quit [Read error: Connection reset by peer]
BOTNET-10 has quit [Read error: Connection reset by peer]
BOTNET-0 has quit [Read error: Connection reset by peer]
BOTNET-16 has quit [Read error: Connection reset by peer]
BOTNET-22 has quit [Read error: Connection reset by peer]
BOTNET-27 has quit [Read error: Connection reset by peer]
BOTNET-23 has quit [Read error: Connection reset by peer]
BOTNET-5 has quit [Read error: Connection reset by peer]
BOTNET-13 has quit [Read error: Connection reset by peer]
BOTNET-26 has quit [Read error: Connection reset by peer]
BOTNET-24 has quit [Read error: Connection reset by peer]
BOTNET-8 has quit [Read error: Connection reset by peer]
BOTNET-9 has quit [Read error: Connection reset by peer]
BOTNET-25 has quit [Read error: Connection reset by peer]
BOTNET-21 has quit [Read error: Connection reset by peer]
BOTNET-28 has quit [Read error: Connection reset by peer]
BOTNET-12 has quit [Read error: Connection reset by peer]
<ericx> LOL
<ericx> wtf
<atno> haha, cool shit
<breakingthings> watevenjusthappen.jpeg
etcetera has quit []
<ericx> :)
<atno> just some asshole playing
<ericx> It was me
<breakingthings> inb4 b& ericx
<atno> ericx: say that again ?
<ericx> ?
<ericx> It was me
<ericx> I did it
<ericx> Good
<banisterfiend> damn
<ericx> LOL
aedornm has joined #ruby
<ericx> H4xs
joeycarmello has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Quit: baroquebobcat]
<banisterfiend> hehe
joeycarmello has joined #ruby
<atno> and a kick
<Gate> -_^ am I missing something since I have join/parts ignored?
adeponte has quit [Remote host closed the connection]
notabotnet0 has joined #ruby
notabotnet1 has joined #ruby
notabotnet2 has joined #ruby
notabotnet3 has joined #ruby
notabotnet4 has joined #ruby
notabotnet5 has joined #ruby
notabotnet6 has joined #ruby
notabotnet8 has joined #ruby
notabotnet7 has joined #ruby
aaronmacy has quit [Quit: Leaving.]
notabotnet9 has joined #ruby
Swarley_ has joined #ruby
notabotnet10 has joined #ruby
notabotnet11 has joined #ruby
notabotnet12 has joined #ruby
notabotnet13 has joined #ruby
notabotnet14 has joined #ruby
notabotnet15 has joined #ruby
Swarley_ is now known as swarles
notabotnet16 has joined #ruby
notabotnet17 has joined #ruby
notabotnet18 has joined #ruby
notabotnet19 has joined #ruby
notabotnet20 has joined #ruby
notabotnet21 has joined #ruby
notabotnet22 has joined #ruby
notabotnet23 has joined #ruby
notabotnet24 has joined #ruby
notabotnet25 has joined #ruby
notabotnet26 has joined #ruby
notabotnet27 has joined #ruby
notabotnet28 has joined #ruby
notabotnet29 has joined #ruby
Takehiro has joined #ruby
<swarles> Well then.
zph has joined #ruby
<anti_> woah
<anti_> whats going on
DatumDrop has joined #ruby
<swarles> That was an enjoyable botnet
eric has joined #ruby
<eric> do NOT MESS WITH ME
<eric> ASSHOLE
<swarles> on a better note, i finally found a good ruby language spec http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf
<swarles> eric, ?..
eric is now known as Guest28532
woolite64 has quit [Quit: Leaving]
<Guest28532> dip
<Guest28532> shit
notabotnet2 has quit [Remote host closed the connection]
notabotnet12 has quit [Remote host closed the connection]
notabotnet3 has quit [Remote host closed the connection]
notabotnet27 has quit [Remote host closed the connection]
notabotnet1 has quit [Remote host closed the connection]
notabotnet28 has quit [Remote host closed the connection]
notabotnet5 has quit [Remote host closed the connection]
notabotnet14 has quit [Remote host closed the connection]
notabotnet6 has quit [Remote host closed the connection]
notabotnet15 has quit [Remote host closed the connection]
notabotnet9 has quit [Remote host closed the connection]
notabotnet0 has quit [Remote host closed the connection]
notabotnet22 has quit [Remote host closed the connection]
notabotnet25 has quit [Remote host closed the connection]
notabotnet19 has quit [Remote host closed the connection]
notabotnet26 has quit [Remote host closed the connection]
notabotnet13 has quit [Remote host closed the connection]
notabotnet18 has quit [Remote host closed the connection]
notabotnet29 has quit [Read error: Connection reset by peer]
notabotnet8 has quit [Read error: Connection reset by peer]
notabotnet16 has quit [Read error: Connection reset by peer]
notabotnet11 has quit [Remote host closed the connection]
notabotnet24 has quit [Remote host closed the connection]
notabotnet7 has quit [Read error: Connection reset by peer]
notabotnet20 has quit [Remote host closed the connection]
notabotnet4 has quit [Remote host closed the connection]
notabotnet21 has quit [Remote host closed the connection]
notabotnet17 has quit [Remote host closed the connection]
notabotnet10 has quit [Read error: Connection reset by peer]
notabotnet23 has quit [Read error: Connection reset by peer]
<anti_> wow im just here to code some ruby and this happens?
<breakingthings> lolwut.
<anti_> does this happen everyday
<breakingthings> no.
<swarles> anti_, no
<atno> nope
<swarles> this is a malicious attack on the network
<banisterfiend> 2 times a month maybe
<breakingthings> I wouldn't really call it an attack
<breakingthings> malicious maybe
<atno> stupid, plain stupid
<atno> achieving nothing but a kickban
Monie has quit [Ping timeout: 264 seconds]
<breakingthings> server throttles his connections after a certain point anyway
<swarles> well, to be fair, it isn't a botnet
Targen has joined #ruby
<swarles> Since it's all one IP..
<breakingthings> once he hits 30 connections it terminates
sailias has joined #ruby
<breakingthings> :d
Jamone has joined #ruby
<anti_> notabotnet
earthquake has joined #ruby
<anti_> hmm
<swarles> fail whale
<anti_> they don't get terminated
<anti_> the connections don't
<anti_> it just blocks all the incoming ones
DatumDrop has quit [Ping timeout: 245 seconds]
thams has quit [Read error: Connection reset by peer]
<atno> server rules,
Takehiro has quit [Ping timeout: 264 seconds]
thams has joined #ruby
ukd1 has joined #ruby
<atno> just to cheer up a bit http://i.imgur.com/ouFrZnQ.jpg
moos3 has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
<Guest28532> LOL U may have a problem on #brows
malav has joined #ruby
mengu has quit [Quit: Leaving]
<malav> quick question: what is :string == "string" ? true or false?
<malav> :abc == "abc"
tcstar has quit [Remote host closed the connection]
xAndy is now known as xandy
brianpWins has joined #ruby
kenneth has quit [Quit: kenneth]
<malav> It gives me false now. Was it true before?
kenneth has joined #ruby
xandy is now known as xAndy
ph^ has quit [Remote host closed the connection]
yshh has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
<nate_h> is there some clever way to rounding a variable to 0 or 1, I just want anything thats greater then 1 to become 1, and 0 to remain 0
<nate_h> besides an if statement
itsdavem has quit [Remote host closed the connection]
<nate_h> kind of like an AND operation
<banisterfiend> nate_h: !!obj.to_i
<banisterfiend> oops
gyre007 has joined #ruby
<banisterfiend> forget that
<banisterfiend> wrong way round :)
<swarles> You know, it makes me a bit confused to know that &&= is a binary operator
<swarles> Because.. &&= seems like a very limited case use..
anti_ has left #ruby ["Leaving"]
<nate_h> guess bitwise AND isn't what I want
malav has left #ruby [#ruby]
<banisterfiend> nate_h: !obj.zero?
jjbohn has joined #ruby
<banisterfiend> but that only deals with natural numbers
jimeh has quit [Quit: Computer has gone to sleep.]
dekroning has joined #ruby
<swarles> >> 341 ^ 1
<eval-in> swarles: Output: "" (http://eval.in/7484)
<swarles> >> puts341 ^ 1
<eval-in> swarles: Output: "/tmp/execpad-eadadff9719f/source-eadadff9719f:1:in `<main>': undefined local variable or method `puts341' for main:Object (NameError)\n" (http://eval.in/7485)
<swarles> >> puts 341 ^ 1
<eval-in> swarles: Output: "340\n" (http://eval.in/7486)
MehLaptop has joined #ruby
dekroning has quit [Read error: Operation timed out]
<nate_h> hmm i dunno
<swarles> oh wait
hybris has left #ruby [#ruby]
daniel_- has quit [Quit: WeeChat 0.3.9.2]
<Guest28532> dip?
<Guest28532> did i get unbnned?
<swarles> i & 1
cableray has quit [Quit: cableray]
<Guest28532> i guess so
<swarles> >> puts [ 24, 0, -13, 0.35 ].map {|x| x & 1 }
<eval-in> swarles: Output: "/tmp/execpad-5efa9d242a07/source-5efa9d242a07:1:in `block in <main>': undefined method `&' for 0.35:Float (NoMethodError)\n\tfrom /tmp/execpad-5efa9d242a07/source-5efa9d242a07:1:in `map'\n\tfrom /tmp/execpad-5efa9d242a07/source-5efa9d242a07:1:in `<main>'\n" (http://eval.in/7487)
fyolnish has joined #ruby
<swarles> >> puts [ 24, 0, -13 ].map {|x| x & 1 }
<eval-in> swarles: Output: "0\n0\n1\n" (http://eval.in/7488)
<swarles> o-o
slainer68 has quit [Remote host closed the connection]
<swarles> whoops
mneorr has joined #ruby
* swarles forgot how binary works for a moment
<swarles> >> 1.methods - Object.new.methods
<eval-in> swarles: Output: "" (http://eval.in/7489)
aaronmacy has joined #ruby
<swarles> >> puts 1.methods - Object.new.methods
<eval-in> swarles: Output: "-@\n+\n-\n*\n/\ndiv\n%\nmodulo\ndivmod\nfdiv\n**\nabs\nmagnitude\n>\n>=\n<\n<=\n~\n&\n|\n^\n[]\n<<\n>>\nto_f\nsize\nzero?\nodd?\neven?\nsucc\ninteger?\nupto\ndownto\ntimes\nnext\npred\nchr\nord\nto_i\nto_int\nfloor\nceil\ntruncate\nround\ngcd\nlc ..." (http://eval.in/7490)
ilyam has quit [Quit: ilyam]
<swarles> [0, [i, 1].min].max
<swarles> \o/
NihilistDandy has quit [Quit: Textual IRC Client: www.textualapp.com]
ephemerian has quit [Quit: Leaving.]
cantonic has joined #ruby
zeade has quit [Quit: Leaving.]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
rboyd has joined #ruby
<tylersmith> pryrc
<nate_h> swarles, haha good one.
frogstarr78 has quit [Remote host closed the connection]
<swarles> mine doesn't work though :[
<swarles> [0, [i.floor, 1].min].max
<swarles> that might work
<swarles> >> 1.floor
<eval-in> swarles: Output: "" (http://eval.in/7491)
<swarles> k
<nate_h> swarles, it worked for me?
<swarles> oh, okay
<nate_h> where i is an integer
<swarles> well it might not work for 0.3
<swarles> well yes that would work
<nate_h> ya, you'd have to round first
LennyLinux has quit [Remote host closed the connection]
<swarles> \o/ glad to help
Spillrag has joined #ruby
jjbohn has quit [Quit: Leaving...]
Spillrag has quit [Client Quit]
Greicher has joined #ruby
rwilcox has quit []
emmanuelux has quit [Remote host closed the connection]
ebobby has quit [Ping timeout: 276 seconds]
<Greicher> hello, speak spañish?
berserkr has quit [Quit: Leaving.]
tealmage has joined #ruby
zyrex has joined #ruby
zyrex has left #ruby [#ruby]
Spillrag has joined #ruby
rboyd has quit [Quit: rboyd]
<swarles> Greicher, algunos de nosotros hablamos espanol.
<swarles> Yo hablo un poco, pero esto canal es mas o menos ingles.
caleb_io has joined #ruby
<nate_h> i wonder if anyone has ever built an irc addon that automatically translates both directions
<swarles> Esto canal habla*
<nate_h> you see it in your native language, and reply and they see it in theirs.
<Greicher> casi todos los canales que e vicitado hablan ingles
<swarles> Si, aveces tu puedes descubrir un canal que habla espanol o portuges.
MehLaptop has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
<Greicher> si, buscare algún canal en el que hablen español :D
alvaro_o has quit [Quit: Ex-Chat]
<swarles> Perdon me para mi espanol, yo solo estudio espanol para cinco anos y ahora soy estudiando francais et latin.
aaronmacy has quit [Quit: Leaving.]
<breakingthings> Hey, I'm noticing that Cinch wraps it's TCPSocket in Net::BufferedIO#new
alvaro_o has joined #ruby
<swarles> Really? I've never really looked into the source
<swarles> I probably should some time
<breakingthings> I also see that BufferedIO is deprecated; as such, is there a new equivalent or is it no longer beneficial
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
tommyvyo_ is now known as tommyvyo
<swarles> Uhm, i actually am not sure about that
frogstarr78 has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
<breakingthings> I'm a little fuzzy on what bufferedIO does as it is.
<breakingthings> :d
<swarles> BufferedIO always seems odd to me
<swarles> I've seen it implemented and still have little knowledge on it
mneorr has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
griffindy has quit [Quit: Computer has gone to sleep.]
xAndy is now known as xandy
cakehero has quit [Quit: Leaving...]
reppard has joined #ruby
* breakingthings shrugs
<breakingthings> Guess I'll look into it more tomorrow.
cableray has joined #ruby
Spillrag has quit [Ping timeout: 246 seconds]
baroquebobcat has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
itsdavem has joined #ruby
xandy is now known as xAndy
Greicher has left #ruby [#ruby]
zph has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby
jtgiri_ has quit [Quit: jtgiri_]
banisterfiend is now known as banister`sleep
dekroning has joined #ruby
cableray has quit [Client Quit]
huttan has joined #ruby
caleb_io has quit [Quit: caleb_io]
zyrex has joined #ruby
slainer68 has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
dekroning has quit [Ping timeout: 276 seconds]
aaronmacy has joined #ruby
zyrex has quit [Client Quit]
ericx has quit [Quit: Leaving]
Guest28532 has quit [Quit: Leaving]
zyrex has joined #ruby
joeycarmello has quit [Remote host closed the connection]
Myconix has joined #ruby
zph has joined #ruby
ebobby has joined #ruby
ttt has joined #ruby
havenn has joined #ruby
colonolGron has quit [Quit: Lost terminal]
reppard has quit [Quit: leaving]
Spillrag has joined #ruby
DatumDrop has joined #ruby
jlast_ has quit [Remote host closed the connection]
Takehiro has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
god has joined #ruby
slainer68 has quit [Ping timeout: 256 seconds]
yacks has joined #ruby
god is now known as Guest41967
xyzodiac has joined #ruby
pcarrier has quit [Remote host closed the connection]
ilyam has joined #ruby
pcarrier has joined #ruby
ttt has quit [Read error: Connection reset by peer]
DatumDrop has quit [Ping timeout: 245 seconds]
phinfonet has quit [Quit: Linkinus - http://linkinus.com]
ebobby has quit [Ping timeout: 264 seconds]
Takehiro has quit [Ping timeout: 256 seconds]
eka has quit [Quit: Computer has gone to sleep.]
gabrielengel has joined #ruby
apok has quit [Quit: apok]
ttt has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
mrrhead has quit [Ping timeout: 252 seconds]
gabrielengel has quit [Remote host closed the connection]
dareign8 has joined #ruby
dareign85 has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
ukd1 has quit [Ping timeout: 252 seconds]
dareign85 has joined #ruby
swarles has quit [Ping timeout: 264 seconds]
joeycarmello has joined #ruby
tjbiddle has quit [Read error: Operation timed out]
jjbohn has joined #ruby
dareign8 has quit [Ping timeout: 248 seconds]
griffindy has joined #ruby
dareign85 has quit [Read error: Connection reset by peer]
dekroning has joined #ruby
dareign85 has joined #ruby
cableray has joined #ruby
sn0wb1rd has quit [Quit: I will be right back]
griffindy has quit [Read error: Connection timed out]
aedornm has quit [Remote host closed the connection]
pu22l3r has quit [Remote host closed the connection]
dekroning has quit [Ping timeout: 252 seconds]
pu22l3r has joined #ruby
cevarief has joined #ruby
ph^ has joined #ruby
itsdavem has quit [Remote host closed the connection]
chrismhough has quit [Quit: chrismhough]
hackerdude has joined #ruby
rakl has quit [Quit: sleeping]
beaky has joined #ruby
<beaky> hello
<beaky> how do i do unit testing in ruby?
jjbohn has quit [Quit: Leaving...]
Playground has joined #ruby
<havenn> beaky: MiniTest is a good option, included with Ruby: https://github.com/seattlerb/minitest
ph^ has quit [Ping timeout: 276 seconds]
<beaky> ah thanks
earthquake has quit [Quit: earthquake]
* beaky does the TDD dance
MehLaptop has joined #ruby
jlast has joined #ruby
angusiguess has quit [Ping timeout: 252 seconds]
mmitchell has joined #ruby
icole has quit [Remote host closed the connection]
ebobby has joined #ruby
bricker is now known as bricker`work
mmitchell has quit [Remote host closed the connection]
<breakingthings> Speaking of TDD
* breakingthings breaks things
nari has joined #ruby
<breakingthings> I am looking for some assistance regarding how I should structure a part of my IRC bot that will handle opening a thread to respond to PING
<breakingthings> Such that I can sufficiently, like, test it… if it should be tested at all?
ebobby has quit [Client Quit]
itsdavem has joined #ruby
tealmage has quit [Remote host closed the connection]
itsdavem has quit [Remote host closed the connection]
pyx has quit [Quit: WeeChat 0.4.0]
etcetera has joined #ruby
emocakes has quit [Quit: emocakes]
itsdavem has joined #ruby
apok has joined #ruby
jbw has quit [Ping timeout: 248 seconds]
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
sailias has quit [Quit: Leaving.]
pu22l3r_ has joined #ruby
havenn has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
MissionCritical has quit [Ping timeout: 245 seconds]
v0n has quit [Ping timeout: 244 seconds]
niklasb has quit [Ping timeout: 244 seconds]
dekroning has joined #ruby
aaronmacy has quit [Quit: Leaving.]
havenn has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 240 seconds]
etcetera has quit []
etcetera has joined #ruby
|Monie| has joined #ruby
itsdavem has quit [Remote host closed the connection]
v0n has joined #ruby
itsdavem has joined #ruby
itsdavem has quit [Remote host closed the connection]
dekroning has quit [Ping timeout: 245 seconds]
havenn has quit [Ping timeout: 264 seconds]
alvaro_o has quit [Quit: Ex-Chat]
pcboy_ has quit [Ping timeout: 248 seconds]
Jamone has quit [Ping timeout: 256 seconds]
itsdavem has joined #ruby
epylinkn has joined #ruby
pcboy_ has joined #ruby
adkron_ has joined #ruby
adkron has joined #ruby
jjbohn has joined #ruby
BombAw has joined #ruby
squidBits has quit [Quit: whoops]
bigmac has joined #ruby
pskosinski has quit [Quit: Learn Life's Little Lessons]
jbw has joined #ruby
BombStrike has quit [Read error: Connection reset by peer]
BombAw is now known as BombStrike
BombStrike has quit [Changing host]
BombStrike has joined #ruby
Playground is now known as lolcathost
|Monie| has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
angusiguess has joined #ruby
caleb_io has joined #ruby
freeayu has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
huoxito has quit [Ping timeout: 244 seconds]
davidokner has joined #ruby
<davidokner> Does installing Ruby with Brew work well for mac?
DatumDrop has joined #ruby
slainer68 has quit [Ping timeout: 264 seconds]
havenn has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
c0rn has quit [Ping timeout: 255 seconds]
etcetera has quit []
aaronmacy has joined #ruby
epylinkn has quit [Quit: Leaving.]
tommyvyo_ has joined #ruby
etcetera has joined #ruby
mockra has joined #ruby
DatumDrop has quit [Ping timeout: 240 seconds]
etcetera has quit [Client Quit]
AlSquirikou has joined #ruby
AlSquirrel has quit [Read error: Connection reset by peer]
sleetdrop has joined #ruby
fryguy has quit [Read error: No route to host]
t0rc has quit [Quit: WeeChat 0.4.0]
io_syl has quit [Ping timeout: 244 seconds]
fryguy has joined #ruby
andrewhl has quit [Remote host closed the connection]
AlSquirikou has quit [Read error: Connection reset by peer]
bricker`away is now known as bricker
elico has quit [Remote host closed the connection]
huoxito has joined #ruby
AlSquirikou has joined #ruby
templaedhel has quit [Quit: Leaving...]
jaequery has joined #ruby
nat2610 has quit [Quit: Leaving.]
<breakingthings> Oh… My lord.
apok has quit [Quit: apok]
<breakingthings> I spent all this time trying to figure out how to mock a TCPSocket so I could properly test things
gyre007 has quit [Remote host closed the connection]
<breakingthings> And I just realized I can before(:all) { TCPServer.new } for those tests.
<breakingthings> and then just connect via TCPSocket.new "localhost"
dekroning has joined #ruby
noyb has joined #ruby
<davidokner> Map/collect seems like the same thing as .each .
d2dchat has quit [Remote host closed the connection]
jjbohn has quit [Quit: Leaving...]
templaedhel has joined #ruby
<havenn> Nice to see Ruby GTK+ 3 bindings thriving! http://ruby-gnome2.sourceforge.jp/?News_20130124_1
dekroning has quit [Ping timeout: 252 seconds]
andrewhl has joined #ruby
gyre007 has joined #ruby
jgrimes has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
gyre007 has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
jjbohn has joined #ruby
<heftig> havenn: i don't think those bindings have a future
dareign8 has joined #ruby
<havenn> heftig: Too hard to maintain?
<heftig> there's ruby-gir_ffi, which autogenerates binding using gobject-introspection
<heftig> based on those you then make overrides to work around shortcomings in the introspection data
<heftig> that's what python-gobject is doing
<havenn> heftig: ahhh
thams has quit [Read error: Connection reset by peer]
<havenn> heftig: cool!
thams has joined #ruby
jetblack has joined #ruby
frem has joined #ruby
Takehiro has joined #ruby
zyrex has quit [Quit: leaving]
dareign85 has quit [Ping timeout: 256 seconds]
jaygen has quit [Read error: Operation timed out]
jaygen has joined #ruby
Gooder has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
MissionCritical has joined #ruby
bricker_ has joined #ruby
zeade has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
dareign8 has quit []
frem has quit [Read error: No route to host]
bricker has quit [Ping timeout: 276 seconds]
frem has joined #ruby
caleb_io has quit [Quit: caleb_io]
jetblack has quit [Quit: Bye]
ilyam has quit [Quit: ilyam]
luckyruby has quit [Remote host closed the connection]
bricker has joined #ruby
bricker has quit [Client Quit]
bricker_ has quit [Ping timeout: 264 seconds]
cevarief2 has joined #ruby
araujo has quit [Quit: Leaving]
caleb_io has joined #ruby
maletor has joined #ruby
frem has quit [Quit: Farewell!]
cevarief has quit [Ping timeout: 244 seconds]
jaygen_ has joined #ruby
sorbo_ has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
frem has joined #ruby
jaygen has quit [Read error: Operation timed out]
phantasm66 has quit [Client Quit]
wmoxam has quit [Quit: leaving]
Quadlex is now known as AwayLex
sbear has quit [Read error: Connection reset by peer]
sbear has joined #ruby
Gooder has quit [Read error: Connection reset by peer]
Gooder has joined #ruby
adeponte has joined #ruby
dekroning has joined #ruby
v0n has quit [Ping timeout: 256 seconds]
terrorpup has quit [Ping timeout: 240 seconds]
cantonic has quit [Quit: cantonic]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
nanothief has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<raz> hmm, anyone have an idea why it doesn't let me override Thread#initialize? http://pastie.org/5852962
<raz> gives me "uninitialized thread" on Thread.new then
<raz> i know i'm probably not supposed to do that, i just wonder if there's an easy way to make it work (or if i'm just overlooking a basic mistake)
dekroning has quit [Ping timeout: 240 seconds]
anarchist has left #ruby ["Konversation terminated!"]
adeponte has quit [Remote host closed the connection]
templaedhel has quit [Quit: Leaving...]
crackfu has joined #ruby
adeponte has joined #ruby
nanothief has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
slainer68 has joined #ruby
jlast has quit [Remote host closed the connection]
cantonic has joined #ruby
reset has quit [Ping timeout: 244 seconds]
havenn has quit [Remote host closed the connection]
breakingthings has quit []
slainer68 has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
jjbohn has quit [Quit: Leaving...]
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
huoxito has quit [Quit: Leaving]
guns has joined #ruby
havenn has quit [Ping timeout: 248 seconds]
DrShoggoth has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
EPIK has quit [Ping timeout: 276 seconds]
chrisja has quit [Quit: Lost terminal]
pu22l3r has joined #ruby
wmoxam has joined #ruby
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
adkron_ has quit [Ping timeout: 276 seconds]
adkron has quit [Ping timeout: 276 seconds]
yacks has quit [Ping timeout: 256 seconds]
jonahR has quit [Quit: jonahR]
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
kenneth has quit [Quit: kenneth]
jaequery has joined #ruby
lusory has joined #ruby
xyzodiac has quit [Ping timeout: 252 seconds]
caleb_io has quit [Quit: caleb_io]
dekroning has joined #ruby
MehLaptop has quit [Remote host closed the connection]
dekroning has quit [Read error: Operation timed out]
sailias has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
jphpsf has quit [Quit: Leaving]
Spillrag has quit [Ping timeout: 276 seconds]
forced_request has quit [Remote host closed the connection]
sailias has quit [Client Quit]
templaedhel has joined #ruby
taoru has joined #ruby
dhruvasagar has joined #ruby
benlieb has joined #ruby
nat2610 has joined #ruby
nga4 has quit [Ping timeout: 256 seconds]
radic has quit [Ping timeout: 246 seconds]
Goles has joined #ruby
Goles has quit [Remote host closed the connection]
megha has quit [Ping timeout: 256 seconds]
n1x has quit [Ping timeout: 248 seconds]
yacks has joined #ruby
templaedhel has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
noyb has quit [Ping timeout: 256 seconds]
h4mz1d has joined #ruby
io_syl has joined #ruby
kenneth has joined #ruby
bricker`LA has joined #ruby
bricker`LA is now known as bricker
radic has joined #ruby
elico has joined #ruby
a_a_g has joined #ruby
sorbo_ has left #ruby [#ruby]
benlieb has quit [Quit: benlieb]
bean__ has joined #ruby
beaky has quit [Ping timeout: 276 seconds]
beaky has joined #ruby
Bosox20051 has quit [Remote host closed the connection]
n1x has joined #ruby
megha has joined #ruby
adeponte has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
adeponte has joined #ruby
JumpMast3r has joined #ruby
Rizzle has joined #ruby
ewag has quit [Ping timeout: 256 seconds]
mergoth has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
My_Hearing has joined #ruby
fuzai_ has left #ruby ["Leaving"]
adeponte has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Ping timeout: 248 seconds]
jtgiri_ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
cableray has quit [Ping timeout: 252 seconds]
cableray has joined #ruby
brianpWins has quit [Quit: brianpWins]
h4mz1d has quit [Ping timeout: 276 seconds]
m4n has joined #ruby
vinax has quit []
arya has joined #ruby
epylinkn has joined #ruby
cevarief2 has quit [Ping timeout: 252 seconds]
dmiller2 has quit [Read error: Operation timed out]
jlast has joined #ruby
hadees has quit [Quit: hadees]
adeponte has joined #ruby
macmartine has joined #ruby
hackerdude has quit [Remote host closed the connection]
wargasm has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
brianpWins has joined #ruby
a_a_g has quit [Quit: This computer has gone to sleep]
cevarief has joined #ruby
adkron has joined #ruby
adkron_ has joined #ruby
tomzx_mac has quit [Ping timeout: 255 seconds]
megha has quit [Quit: WeeChat 0.3.9.2]
caleb_io has joined #ruby
nga4 has joined #ruby
JohnBat26 has joined #ruby
n1x has quit [Ping timeout: 255 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
uris has quit [Quit: Leaving]
maletor has joined #ruby
maletor has quit [Max SendQ exceeded]
frem has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
adeponte has quit [Remote host closed the connection]
nat2610 has left #ruby [#ruby]
tms1 has joined #ruby
mergoth has quit [Ping timeout: 276 seconds]
<tms1> hi
<macmartine> tms1: sup
<tms1> need help in gem AXElements
Frykt has joined #ruby
Frykt has left #ruby [#ruby]
templaedhel has joined #ruby
<macmartine> sweet
<tms1> macmartine: can you help me in this ?
crackfu has quit [Ping timeout: 245 seconds]
<macmartine> not without knowing the problm
<tms1> macmartine: sure :)
ilyam has joined #ruby
<tms1> macmartine: I am using ax_elements in JVM using jruby. and getting this error LoadError: C extensions are disabled, can't load `/Users/test/.rvm/gems/ruby-1.9.3-p194/gems/accessibility_core-0.4.1/lib/accessibility/bridge/bridge.bundle'
ilyam has quit [Remote host closed the connection]
<macmartine> No idea, but maybe a more thorough question would get a response from others.
<tms1> macmartine: okay. thanks
<tms1> Is it possible to use ax_elements while using jruby ?
jean-louis has joined #ruby
yacks has quit [Ping timeout: 248 seconds]
templaedhel has quit [Ping timeout: 252 seconds]
noyb has joined #ruby
tylersmith has quit [Quit: tylersmith]
yacks has joined #ruby
ananthakumaran has joined #ruby
ChampS666 has quit [Ping timeout: 244 seconds]
beaky has quit [Ping timeout: 256 seconds]
drago757 has joined #ruby
mikepack has quit [Remote host closed the connection]
itsdavem has quit [Remote host closed the connection]
<shevy> heftig do you happen to use ruby-gnome ?
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has joined #ruby
adeponte has joined #ruby
epylinkn has left #ruby [#ruby]
<tms1> shevy: nop.
<shevy> tms1 hmm heftig, the guy here :D
<shevy> it seems as if the total amount of ruby-gnome users on #ruby is ... about zero
<tms1> shevy: I am extremely sry. I was completely into my jruby and ax_element problem :P
<shevy> yeah
<shevy> I would help you if I could and have jruby knowledge, but I hate java, so I cant use jruby
<tms1> shevy: :)
jinzhu has joined #ruby
<shevy> there is #jruby however, and the ... what was his name... the main jruby author is here too, I think
<tms1> thanks a lot
<shevy> I mean on #jruby and #ruby ... I forgot his name _again_! :(
etcetera has joined #ruby
TheMoonMaster has quit [Excess Flood]
maletor has quit [Quit: Computer has gone to sleep.]
TheMoonMaster has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
etcetera has quit [Client Quit]
hadees has joined #ruby
postmodern has quit [Quit: Leaving]
etcetera has joined #ruby
yacks has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Read error: Operation timed out]
arkiver has joined #ruby
joeycarmello has joined #ruby
zyrex has joined #ruby
dhruvasagar has joined #ruby
Schmidt has quit [Ping timeout: 272 seconds]
joeycarmello has quit [Ping timeout: 252 seconds]
MattRB has joined #ruby
chriskk has quit [Quit: chriskk]
caleb_io has quit [Quit: caleb_io]
zyrex has quit [Client Quit]
jean-louis has quit [Ping timeout: 276 seconds]
maletor has joined #ruby
yacks has joined #ruby
Gooder has quit [Read error: Connection reset by peer]
shorts has quit [Quit: shorts]
shorts has joined #ruby
thufir_ has joined #ruby
shorts has quit [Client Quit]
otters has quit [Ping timeout: 240 seconds]
emdub has quit [Ping timeout: 248 seconds]
emdub has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
jackyalcine has joined #ruby
browndawg has joined #ruby
otters has joined #ruby
a_a_g has joined #ruby
pen has quit [Remote host closed the connection]
ada2358 has quit [Ping timeout: 248 seconds]
ada2358 has joined #ruby
Takehiro has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
headius has joined #ruby
icole has joined #ruby
mockra has quit [Remote host closed the connection]
jenrzzz has joined #ruby
cableray has quit [Quit: cableray]
tagrudev has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
MattRB has joined #ruby
templaedhel has joined #ruby
Inoperable has quit [Ping timeout: 255 seconds]
zph has quit []
earthquake has joined #ruby
zph has joined #ruby
m3pow has joined #ruby
m3pow has quit [Client Quit]
Inoperable has joined #ruby
pen has joined #ruby
cableray has joined #ruby
zph has quit [Client Quit]
thufir_ has quit [Quit: Leaving.]
yugui_zzz is now known as yugui
m3pow has joined #ruby
templaedhel has quit [Ping timeout: 252 seconds]
tommyvyo has quit [Quit: http://thomasvendetta.com]
tommyvyo_ is now known as tommyvyo
Inoperable has quit [Quit: Subroutine enters sleep cycle]
ryanf has quit [Quit: leaving]
caleb_io has joined #ruby
angusiguess has quit [Ping timeout: 276 seconds]
jtgiri_ has quit [Quit: jtgiri_]
mergoth has joined #ruby
itsdavem_ has joined #ruby
slainer68 has joined #ruby
c0rn has joined #ruby
zommi has joined #ruby
itsdavem_ has quit [Remote host closed the connection]
pu22l3r has quit [Remote host closed the connection]
earthquake has quit [Quit: earthquake]
<tms1> headius: Need help in setting focus on windows in MAC. I am using AXElements but its not helping
megha has joined #ruby
Takehiro has joined #ruby
slainer68 has quit [Remote host closed the connection]
cableray has quit [Quit: cableray]
c0rn has quit [Ping timeout: 245 seconds]
whowantstolivefo has joined #ruby
thams has quit [Read error: Connection reset by peer]
thams has joined #ruby
mrdtt has joined #ruby
toekutr has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
AlSquirikou has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
Takehiro has quit [Ping timeout: 264 seconds]
Rizzle has quit [Read error: Operation timed out]
puppeh has joined #ruby
emergion has joined #ruby
puppeh has quit [Client Quit]
lolcathost is now known as ahokaomaeha
itsdavem has joined #ruby
m3pow has quit [Ping timeout: 252 seconds]
qubit has quit [Ping timeout: 248 seconds]
etcetera has quit []
mockra has joined #ruby
icole has quit [Remote host closed the connection]
itsdavem has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 244 seconds]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
caleb_io has quit [Quit: caleb_io]
headius has quit [Quit: headius]
arya has quit [Ping timeout: 248 seconds]
robustus has quit [Ping timeout: 255 seconds]
xpen has joined #ruby
maletor has joined #ruby
robustus has joined #ruby
maletor has quit [Max SendQ exceeded]
iamjarvo has quit [Quit: Leaving.]
krz has joined #ruby
m3pow has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
maletor has joined #ruby
maletor has quit [Max SendQ exceeded]
dyrot has quit [Remote host closed the connection]
maletor has joined #ruby
shock_one has joined #ruby
arya has joined #ruby
[Neurotic] has quit [Remote host closed the connection]
ryanf has joined #ruby
generalissimo has joined #ruby
ChampS666 has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
itsdavem has joined #ruby
dr_bob has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
gregorg_taf has quit [Client Quit]
lolmaus has joined #ruby
rakuN has joined #ruby
warb0 has quit [Ping timeout: 244 seconds]
arya_ has joined #ruby
charliesome has joined #ruby
freeayu__ has joined #ruby
chussenot has joined #ruby
noyb has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
pen has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
TomyLobo has joined #ruby
kiyoura has quit [Quit: Leaving]
freeayu has quit [Ping timeout: 255 seconds]
beliveyourdream has joined #ruby
nat2610 has joined #ruby
itsdavem has quit [Remote host closed the connection]
lepht_afk has quit [Ping timeout: 245 seconds]
danktamagachi has quit [Ping timeout: 252 seconds]
aganov has joined #ruby
araujo has joined #ruby
Elhu has joined #ruby
MorningLightMoun has left #ruby ["Leaving"]
itsdavem has joined #ruby
itsdavem has quit [Remote host closed the connection]
jduan1981 has joined #ruby
nat2610 has quit [Ping timeout: 248 seconds]
chussenot has quit [Quit: chussenot]
mercwithamouth has quit [Ping timeout: 252 seconds]
pen has joined #ruby
wallerdev has quit [Quit: wallerdev]
pyro111 has joined #ruby
clocKwize has joined #ruby
chridal has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Remote host closed the connection]
nga4 has quit []
bradhe has joined #ruby
alphadog has joined #ruby
alphadog has quit [Quit: alphadog]
itsdavem has joined #ruby
itsdavem has quit [Remote host closed the connection]
tPl0ch has joined #ruby
mahmoudimus has joined #ruby
KevinSjoberg has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
itsdavem has joined #ruby
drago757 has quit [Quit: drago757]
pen has quit [Remote host closed the connection]
Choobie has joined #ruby
pen has joined #ruby
emocakes has joined #ruby
ebobby has joined #ruby
slainer68 has joined #ruby
thufir_ has joined #ruby
pencilcheck has joined #ruby
Morkel has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Read error: Connection reset by peer]
pen has quit [Ping timeout: 240 seconds]
thufir_ has quit [Client Quit]
slainer68 has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
generalissimo has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
<ninegrid> tms1: not having used jruby myself, and just reading the error you've referenced... perhaps this will help: https://github.com/jruby/jruby/wiki/C-Extension-Alternatives
MissionCritical has quit [Ping timeout: 255 seconds]
mafolz has joined #ruby
filipe has joined #ruby
adeponte has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
DatumDrop has joined #ruby
xpen has quit [Ping timeout: 245 seconds]
shock_one has quit [Quit: Leaving]
shock_one has joined #ruby
Schmidt has joined #ruby
jduan1981 has quit [Quit: jduan1981]
shock_one has quit [Client Quit]
shock_one has joined #ruby
mockra has joined #ruby
DatumDrop has quit [Ping timeout: 264 seconds]
neurotech has joined #ruby
jean-louis has joined #ruby
mafolz has quit [Ping timeout: 244 seconds]
shock_one has quit [Client Quit]
shock_one has joined #ruby
piotr_ has joined #ruby
shock_one has quit [Client Quit]
shock_one has joined #ruby
shock_one_ has joined #ruby
Mission-Critical has joined #ruby
shock_one has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 252 seconds]
jonathanwallace2 has joined #ruby
jonathanwallace1 has quit [Ping timeout: 256 seconds]
shock_one_ has quit [Client Quit]
shock_one has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
ephemerian has joined #ruby
emergion has joined #ruby
Anderson has joined #ruby
visof has joined #ruby
icole has joined #ruby
TomyLobo has quit [Quit: Standby mode...]
Takehiro has joined #ruby
dyeske has quit [Remote host closed the connection]
shock_one has quit [Quit: Ex-Chat]
shock_one has joined #ruby
Mission-Critical is now known as MissionCritical
jgrevich has quit [Quit: jgrevich]
icole has quit [Ping timeout: 252 seconds]
noxoc has joined #ruby
arkiver has quit [Ping timeout: 255 seconds]
noxoc has quit [Read error: Connection reset by peer]
noxoc has joined #ruby
ionte_ has left #ruby [#ruby]
wudofyr_ has quit [Remote host closed the connection]
dekroning has joined #ruby
TheFuzzball has joined #ruby
wudofyr_ has joined #ruby
arya has joined #ruby
shock_one has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
guns has quit [Quit: guns]
tjbiddle has joined #ruby
arya_ has quit [Ping timeout: 255 seconds]
ryanf has quit [Quit: leaving]
MattRB has quit [Quit: This computer has gone to sleep]
DuoSRX has joined #ruby
lkba has joined #ruby
ebobby has quit [Quit: Lost terminal]
arya has quit [Ping timeout: 255 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
bluOxigen has joined #ruby
nomenkun has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
mars777 has joined #ruby
arya has joined #ruby
workmad3 has joined #ruby
blueOxigen has joined #ruby
noxoc has quit [Quit: noxoc]
main has joined #ruby
<mars777> In Rails, do you setup the Controller to find the database record and then in the model you run the query to find it and then display it in the view?
pyro111 has quit [Read error: Operation timed out]
bluOxigen has quit [Ping timeout: 252 seconds]
pnkbst` is now known as pnkbst
mars777 has left #ruby [#ruby]
pnkbst has quit [Changing host]
pnkbst has joined #ruby
mafolz has joined #ruby
blueOxigen has quit []
AwayLex is now known as Quadlex
apeiros_ has joined #ruby
dawkirst has joined #ruby
hoelzro|away is now known as hoelzro
wreckimnaked has joined #ruby
matthewrobbins has joined #ruby
brianpWins has quit [Quit: brianpWins]
osaut has joined #ruby
Elhu has joined #ruby
matthewrobbins has quit [Client Quit]
<tms1> ninegrid: ok. Thanks for the help
brianpWins has joined #ruby
brianpWins has quit [Client Quit]
ojongeri1s has joined #ruby
<ojongeri1s> yo, am wondering what ';' does in ruby? pointer to docs would be nice
pyro111 has joined #ruby
<apeiros_> ojongeri1s: in almost all places the same as a newline would do
timonv has joined #ruby
<apeiros_> which is why it's often used in irc to "shrink" code to a single line
<ojongeri1s> ah..
jimeh has joined #ruby
itsdavem has quit [Remote host closed the connection]
slainer68 has joined #ruby
<ojongeri1s> a colleague thought he was using perl, and did something like 'status == ('solved' || 'closed');'
chussenot has joined #ruby
<ojongeri1s> i did not work, but was wondering why it did not throw an error
<ojongeri1s> thanks apeiros_
sporkbomb has quit [Read error: Connection reset by peer]
sporkbomb has joined #ruby
<apeiros_> `status == ('solved' || 'closed')` is a verbose way to write `status == 'solved'`
DuoSRX has quit [Remote host closed the connection]
<apeiros_> since `('solved' || 'closed')` evaluates to `'solved'` anyway
<apeiros_> @ ojongeri1s
ExxKA has joined #ruby
girija has joined #ruby
<dawkirst> is https://github.com/archiloque/rest-client similar to Net::HTTP?
xpen has joined #ruby
bradhe has joined #ruby
<ojongeri1s> apeiros_: he was trying to test if status was containing either the string 'solved' or 'fixed'
slainer68 has quit [Ping timeout: 264 seconds]
<apeiros_> ojongeri1s: I understand. and I told you that it would indeed only test whether it was 'solved'
<apeiros_> I'm pretty sure that's the same in perl too
chussenot has quit [Quit: chussenot]
haxrbyte_ has quit [Remote host closed the connection]
dwu1 has quit [Quit: Leaving.]
qubit has joined #ruby
haxrbyte has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
pSingh has joined #ruby
nkts has quit []
<pSingh> Anyone down to make a Legend of Zelda trap album
blacktulip has joined #ruby
haxrbyte_ has joined #ruby
<pSingh> like this -> http://www.youtube.com/watch?v=ZyLFgnD00-s but OOT
clocKwize has quit [Quit: clocKwize]
<emocakes> all I heard was traps
<emocakes> i like traps
tjbiddle has quit [Quit: tjbiddle]
<pSingh> it would b dope af
haxrbyte has quit [Read error: Connection reset by peer]
<shock_one> apeiros_, status == 'solved' || status == 'closed'
<apeiros_> shock_one: you mean ojongeri1s
<apeiros_> I'm not the one who's confused about execution order ;-)
<shock_one> yes, sorry.
<ojongeri1s> haha
<apeiros_> np
mockra has joined #ruby
pSingh has quit []
noxoc has joined #ruby
zeade has quit [Quit: Leaving.]
mockra has quit [Ping timeout: 252 seconds]
bigmac has quit [Remote host closed the connection]
clocKwize has joined #ruby
<shock_one> TMTOWTDI https://gist.github.com/4633029
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
arkiver has joined #ruby
ahokaomaeha has joined #ruby
fyolnish has quit [Ping timeout: 252 seconds]
Takehiro has quit [Remote host closed the connection]
quest88 has joined #ruby
k610 has joined #ruby
__ru__ has joined #ruby
relixx has quit [Read error: Connection reset by peer]
wf2f has quit [Ping timeout: 276 seconds]
relixx has joined #ruby
rdark has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
DuoSRX has joined #ruby
Vainoharhainen has joined #ruby
louisror has joined #ruby
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
emergion has quit [Quit: Computer has gone to sleep.]
adambeynon has joined #ruby
Spillrag has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
tatsuya_o has joined #ruby
zigomir has joined #ruby
cdt has joined #ruby
eldariof has joined #ruby
pyro111 has quit [Ping timeout: 244 seconds]
razibog has joined #ruby
sanukcm has joined #ruby
pyro111 has joined #ruby
robotmay has joined #ruby
nat2610 has joined #ruby
cgcardona has quit [Quit: zzzzz]
sbear has quit [Ping timeout: 248 seconds]
quest88 has quit [Quit: quest88]
Xeago has joined #ruby
nat2610 has quit [Ping timeout: 255 seconds]
templaedhel has joined #ruby
blaxter has joined #ruby
shock_one has quit [Ping timeout: 252 seconds]
berserkr has joined #ruby
arya has quit [Ping timeout: 245 seconds]
mrdtt has quit [Quit: mrdtt]
<dawkirst> hi all, I'm trying to understand something fundamental about Ruby. I've called class method RestClient.post and returned it into a variable. How can I find out how I can interact wit that variable (what attributes and what methods does it have?)
billy_ran_away has quit [Ping timeout: 264 seconds]
<apeiros_> dawkirst: obj.class tells you its class
<apeiros_> .methods its methods
<apeiros_> .instance_variables its instance variables
<apeiros_> but from .class you should go to the docs and look that class up
Hanmac1 is now known as Hanmac
billy_ran_away has joined #ruby
<dawkirst> apeiros_, thanks. In this case the docs were written for someone with an intermediate understanding of the class already, so I had to go into the class files itself. Thanks for those methods though, they will help.
<wudofyr_> apieros: hm… didn't knew you were in #ruby too
<apeiros_> lol, wudofyr… you have that highlight for wudofry too?
<Hanmac> hm the doc of the post method should tell you what the method is doing
<Hanmac> and returning
<apeiros_> wudofyr_: have been for years ;-)
arya has joined #ruby
<dawkirst> Hanmac, thanks, I'll check it out.
<apeiros_> good point Hanmac
nari has quit [Ping timeout: 245 seconds]
<dawkirst> Hanmac, how do I access the documentation for that particular method though?
aaronmcadam has joined #ruby
<Hanmac> dawkirst hm you could test out "ri RestClient::post" in your console
<dawkirst> Hanmac, "Nothing known about RestClient"
williamcotton has quit [Ping timeout: 260 seconds]
<dawkirst> I've also searched ruby-doc.org, seems like the only documentation is on the GitHub page hosting the source
banseljaj has quit [Ping timeout: 272 seconds]
kenneth has quit [Ping timeout: 264 seconds]
malcolmva has quit [Ping timeout: 248 seconds]
alienvenom has quit [Ping timeout: 260 seconds]
nfk has joined #ruby
arya_ has joined #ruby
<dawkirst> Hanmac, apeiros_ so here's another fundamental question. If something like RestClient::post returns a string (I assume the API call just returns plain text), must I use string manipulation to get the values out of the response, or is there some fancy method in the object that will help me? (For example, I still don't really understand what :symbols are, but I keep on seeing them).
dqminh has joined #ruby
arya has quit [Ping timeout: 255 seconds]
chussenot has joined #ruby
<Xeago> symbols are like constants in most other languages
shock_one has joined #ruby
<tms1> dawkirst: May be this may help you http://rubydoc.info/gems/rest-client/1.6.7/frames
blaxter has quit [Ping timeout: 246 seconds]
<workmad3> Xeago: they're nothing like constants... closest they come is to enums
<workmad3> Xeago: although they're closer to symbols from smalltalk ;)
<dawkirst> tms1, thanks, that's the same documentation as on GH :)
templaedhel has quit [Quit: Leaving...]
<Xeago> workmad3: if they were closer to enums I would expect them to be enumerable
<Xeago> a symbol by itself is not
elaptics`away is now known as elaptics
<Xeago> an enum type should be
<dawkirst> Also, say there's an instance method :return!, how can I find out what that does?
<workmad3> Xeago: I didn't say they were enums... just the closest they come, IMO, is to them
<workmad3> Xeago: but they're nothing like constants either ;)
<Xeago> workmad3: I do agree that enums are nowadays more often used than constants (or defines for that matter)
<Xeago> constants tend to make stuff ugly :)
reinaldob has joined #ruby
<Hanmac> dawkirst "ri return!" and if that not helps try in irb ".method(:return!).source_location" (that may not work for compiled methods)
* Xeago YAY! passed with 89/100 for my crypto course!
philips_ has quit [Excess Flood]
malcolmva has joined #ruby
arturaz has joined #ruby
jackyalcine has quit [Quit: Quit]
<workmad3> Xeago: ah, you're referring to #define CONSTANT num from C :)
tjbiddle has joined #ruby
<Xeago> or static global final CAPSLOCK = new CapsLock();
<shock_one> Xeago, public static
<Xeago> depends on the language
<Xeago> that was not java :)
dhruvasagar has quit [Ping timeout: 245 seconds]
sleetdro_ has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
<dawkirst> Hanmac, thanks
dhruvasagar has joined #ruby
tvw has joined #ruby
alienvenom has joined #ruby
lkba has quit [Quit: Bye]
sleetdrop has quit [Ping timeout: 244 seconds]
tjbiddle has quit [Ping timeout: 252 seconds]
banister`sleep has quit [Ping timeout: 252 seconds]
<whowantstolivefo> hiya again
aaronmacy has quit [Quit: Leaving.]
<whowantstolivefo> pine,fm learn to program ask me "how many minutes in decade? " my this syntax is true ? >>>> puts ( 1 * 60 ) * ( 24 * 365 + 6) * 10 <<<<
<Hanmac> why + 6 ?
RagingDave has joined #ruby
<whowantstolivefo> 365 days 6 hours ?
visof has quit [Quit: leaving]
blaxter has joined #ruby
<whowantstolivefo> wrong i think
banister`sleep has joined #ruby
baphled has joined #ruby
<Hanmac> ah because of the leap ... (it may still be inaccurate), i think the best way would be to check the years direclty if they are leaping
clooth has joined #ruby
sbear has joined #ruby
<whowantstolivefo> hmm put 1 * 60 * 24 * 365 * 10 + 60 ? :)
mockra has joined #ruby
AlSquirrel has joined #ruby
<whowantstolivefo> food time, coming back asap
reinaldob has quit [Remote host closed the connection]
AlSquire has quit [Read error: Connection reset by peer]
banseljaj has joined #ruby
<My_Hearing> That last line is equivalent to (1 * 60 * 24 * 365 * 10) + 60
<My_Hearing> You'd want (1 * 60) * (24 * 365 * 10 + 60)
aaronmcadam has quit [Quit: aaronmcadam]
<Hanmac> i would do this: n.upto(n+10).map{|j| 60*24*(365 + Date.leap(j) ? 1 : 0)}.inject(:+)
mjolk has joined #ruby
mjolk is now known as Guest19548
sbear has quit [Ping timeout: 244 seconds]
Virunga has joined #ruby
mockra has quit [Ping timeout: 276 seconds]
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
marr has joined #ruby
timmow has joined #ruby
ph^ has joined #ruby
<shock_one> >> puts ((Date.new(2020,12,31) - Date.new(2010,1,1)) * 24)
<eval-in> shock_one: Output: "/tmp/execpad-c0f604cda9c9/source-c0f604cda9c9:1:in `<main>': uninitialized constant Date (NameError)\n" (http://eval.in/7492)
<shock_one> >> require 'date'; puts ((Date.new(2020,12,31) - Date.new(2010,1,1)) * 24)
<eval-in> shock_one: Output: "96408/1\n" (http://eval.in/7493)
aaronmcadam has joined #ruby
swex has joined #ruby
<shock_one> whowantstolivefo, I forgot to multiply by 60, by you got the idea.
philips_ has joined #ruby
jaequery has joined #ruby
a_a_g has quit [Quit: Leaving]
eykosioux has joined #ruby
poikon has joined #ruby
banister_ has joined #ruby
a_a_g has joined #ruby
whitedawg has joined #ruby
eykosioux has quit [Client Quit]
poikon has left #ruby [#ruby]
templaedhel has joined #ruby
marr has quit [Ping timeout: 252 seconds]
banister`sleep has quit [Ping timeout: 264 seconds]
whitedawg has quit [Client Quit]
baphled has quit [Ping timeout: 252 seconds]
EhyehAsherEhyeh has joined #ruby
whitedawg has joined #ruby
xpen has quit [Ping timeout: 264 seconds]
My_Hearing is now known as Mon_Ouie
sanukcm has quit [Quit: Leaving]
nixmaniack has joined #ruby
sleetdro_ has quit [Remote host closed the connection]
nomenkun has quit [Read error: Connection reset by peer]
nomenkun_ has joined #ruby
sleetdrop has joined #ruby
pavilionXP has joined #ruby
guy has joined #ruby
<guy> Hello
sleetdrop has quit [Remote host closed the connection]
rakuN has quit [Quit: Saliendo]
gyre007 has joined #ruby
cha1tanya has joined #ruby
banister_ has quit [Ping timeout: 245 seconds]
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
sleetdrop has joined #ruby
<guy> anyone from London looking for a ruby redmine contract? paying around GBP 400, interview today
templaedhel has quit [Ping timeout: 246 seconds]
<guy> I am not a recruiter, just helping out a good recruiter whom
banister`sleep has joined #ruby
<guy> who* seemingly is desperate to find someone asap
sleetdro_ has joined #ruby
chussenot has quit [Quit: chussenot]
melnik has joined #ruby
chussenot has joined #ruby
<shock_one> whowantstolivefo, even more cool in rails: 10.years / 60
<guy> That's 400/day, just in case...
banister_ has joined #ruby
aaronmcadam has quit [Quit: aaronmcadam]
sleetdrop has quit [Ping timeout: 264 seconds]
<shock_one> guy, Do you have any remote job offers?
<guy> I am not a recruiter ...
xpen has joined #ruby
HobGoblin has joined #ruby
HobGoblin is now known as Guest30912
sleetdro_ has quit [Ping timeout: 240 seconds]
Guest19548 is now known as mjolk
Guest30912 has quit [Changing host]
Guest30912 has joined #ruby
williamcotton has joined #ruby
nkts has joined #ruby
Dwarf has quit [Remote host closed the connection]
nixmaniack has quit [Ping timeout: 264 seconds]
<JonnieCache> guy: you could try #rubyonrails
UukGoblin has quit [Read error: Connection reset by peer]
banister`sleep has quit [Ping timeout: 276 seconds]
Guest30912 is now known as UukGoblin
robotmay has quit [Ping timeout: 264 seconds]
namxam has joined #ruby
robotmay has joined #ruby
cdt has quit [Quit: Ex-Chat]
nkts is now known as marius
nuba has quit [Read error: Operation timed out]
cdt has joined #ruby
udk has quit [Read error: Operation timed out]
edenc has quit [Read error: Operation timed out]
UdontKnow has joined #ruby
nuba has joined #ruby
edenc has joined #ruby
davidboy has quit [Ping timeout: 248 seconds]
aaronmcadam has joined #ruby
klip has quit [Ping timeout: 252 seconds]
pencilcheck has quit [Remote host closed the connection]
dqminh has quit [Remote host closed the connection]
ephemerian has quit [Ping timeout: 256 seconds]
dqminh has joined #ruby
klip has joined #ruby
seoaqua has joined #ruby
ephemerian has joined #ruby
Quadlex is now known as AwayLex
<whowantstolivefo> hiya , puts (1 * 60 ) * ( 24 * 365 * 10 + 60 ) it works well i think
dqminh has quit [Ping timeout: 244 seconds]
<whowantstolivefo> thank you shock_one Hanmac and Mon_Ouie for comments
<whowantstolivefo> i go keep working on learn to program
angusiguess has joined #ruby
<shock_one> whowantstolivefo, some year have more days, you know.
<shock_one> OMG why are you multiplying 1 by 60?
<Mon_Ouie> In a decade, there will always be exactly two leap years I think
sayan has quit [Read error: Connection reset by peer]
<Mon_Ouie> Anyway, the point of the exercice is just introducing basic math I think…
<Mon_Ouie> (well, basic math operators)
<shock_one> Mon_Ouie, (*0, *4 and *8) or (*4 and *8) if year%400!=0
<Mon_Ouie> Oh, right, it's not just every 4 years
foobar12 has joined #ruby
cha1tanya has quit [Quit: Leaving]
<Mon_Ouie> Still, not the point. It doesn't even specify a particular decade.
ephemerian has quit [Quit: Leaving.]
guy has left #ruby ["Leaving..."]
ephemerian has joined #ruby
<banister_> Mon_Ouie: hey
<Mon_Ouie> 'alut
<banister_> Mon_Ouie: do you pronounce QT as "cute" or as "cue-tee" ?
nixmaniack has joined #ruby
slainer68 has joined #ruby
<tobiasvl> banister_: you mean "cute" or "cutie", don't you? ;)
<banister_> officially it's "cute" but i'd feel like a dick saying that
<Mon_Ouie> "cue-tee" — but I assume QT is QuickTime, not the toolkit Qt which I pronounce "cute"
<banister_> Mon_Ouie: no i meant Qt
<banister_> the toolkit :)
EhyehAsherEhyeh has quit [Read error: Connection reset by peer]
foobar12 has quit [Client Quit]
<shock_one> How do you pronounce scheduler?
Takehiro has joined #ruby
BulleTime has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
jonahR has joined #ruby
slainer68 has quit [Ping timeout: 244 seconds]
<banister_> Mon_Ouie: wouldn't you feel embarrassed talking about "Qt" in public? "so, i made this 'cute' application...my mom says it's really nice"
DatumDrop has joined #ruby
<Mon_Ouie> Somehow I find talking about programming awkward no matter what you're saying
arya_ has quit [Ping timeout: 248 seconds]
biello has joined #ruby
<banister_> Mon_Ouie: esp in french since all the programmer terms are english, you'd be unable to get a fluid french sentence going as it would be too peppered by our ugly english words
renanoronfle has joined #ruby
eka has joined #ruby
DatumDrop has quit [Ping timeout: 245 seconds]
whitedawg has quit [Quit: Leaving.]
Asher has quit [Ping timeout: 276 seconds]
nixmaniack has quit [Quit: Ex-Chat]
bluenemo has joined #ruby
mockra has joined #ruby
arya has joined #ruby
<banister_> Mon_Ouie: ooh la-la comci vien le GITHUB et sois SUPERCLASS comma quel le DELEGATE PATTERN tuvois sa bien ITERATOR METHOD
reinaldob has joined #ruby
shock_one has quit [Ping timeout: 252 seconds]
reinaldob has quit [Remote host closed the connection]
pavilionXP has quit [Read error: Connection reset by peer]
<Mon_Ouie> The alternative solution is to use fancy words nobody ever heard before
Asher has joined #ruby
havenn has joined #ruby
jinzhu has quit [Ping timeout: 252 seconds]
<JonnieCache> its not different to la weekend
<JonnieCache> or le parking
blaxter has quit [Ping timeout: 246 seconds]
<JonnieCache> s/not/no
samphippen has joined #ruby
mockra has quit [Ping timeout: 276 seconds]
<jokke> hi, is there something like Integer.maxValue in ruby?
havenn has quit [Ping timeout: 255 seconds]
<arturaz> not really, overflowed ints convert to BigNum s
<arturaz> irb(main):001:0> 10.class
<arturaz> => Fixnum
<arturaz> => Bignum
<arturaz> irb(main):002:0> (10 ** 1000).class
nomenkun_ has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
<JonnieCache> theres this:
<JonnieCache> >> FIXNUM_MAX = (2**(0.size * 8 -2) -1)
<eval-in> JonnieCache: Output: "" (http://eval.in/7495)
<JonnieCache> >> (2**(0.size * 8 -2) -1)
<eval-in> JonnieCache: Output: "" (http://eval.in/7496)
<JonnieCache> ffs
<JonnieCache> >> puts (2**(0.size * 8 -2) -1)
<eval-in> JonnieCache: Output: "1073741823\n" (http://eval.in/7497)
<JonnieCache> but its a crappy hack
<jokke> hm
<JonnieCache> but really its meaningless because you cant ever overflow it
Targen has quit [Ping timeout: 276 seconds]
<jokke> well, i need some value that always
<jokke> ups
<jokke> that's always bigger than others
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<jokke> i'm using Array.max
<arturaz> >> puts Float::INFINITY
<eval-in> arturaz: Output: "Infinity\n" (http://eval.in/7498)
ChampS666 has quit [Ping timeout: 246 seconds]
<arturaz> >> puts 214821648712487215 < Float::INFINITY
<eval-in> arturaz: Output: "true\n" (http://eval.in/7499)
<jokke> infinity!
<jokke> of course
<JonnieCache> i dont understand, some value thats always bigger than a given value?
<jokke> JonnieCache: yes
<JonnieCache> def bigger(n); n+1; end
<jokke> no
<jokke> it has to be a constant
<jokke> i don't know n
<JonnieCache> oh
<Mon_Ouie> You can use a magic object with a <=> that always returns 1
<Xeago> >> puts Float::INFINITY > Float::INFINITY+1
<eval-in> Xeago: Output: "false\n" (http://eval.in/7504)
<workmad3> jokke: you want a constant that will always return 'true' in 'n < ThisThing' and 'false' in 'n > ThisThing'
renanoronfle has left #ruby ["Saindo"]
browndawg has left #ruby [#ruby]
xpen has quit [Remote host closed the connection]
<jokke> workmad3: well i use Array.max
<JonnieCache> Mon_Ouie's suggestion is best then i guess
<Mon_Ouie> class << (Bigger = Object.new); def <=>(o); 1; end; end # needs coercion to actually work with numbers
<Xeago> >> puts Float::INFINITY > (-1 * Float::INFINITY)**2
<eval-in> Xeago: Output: "false\n" (http://eval.in/7505)
<Mon_Ouie> But with numbers, infinity should do it
<arturaz> >> puts Float::INFINITY >= Float::INFINITY+1
<eval-in> arturaz: Output: "true\n" (http://eval.in/7506)
<jokke> arturaz: yes, i think that's the best way to go
ananthakumaran has quit [Quit: Leaving.]
F1skr has joined #ruby
blaxter has joined #ruby
<Xeago> what is the proper spelling of text-analyzation
<Xeago> text-analysis?
<JonnieCache> textual analysis
<Xeago> thanks JonnieCache!
itsdavem has joined #ruby
itsdavem has quit [Remote host closed the connection]
templaedhel has joined #ruby
<Xeago> my vim shows whitespace on the line I am editing as a period, how can I make it a different color period?
pcarrier has quit []
kevin_e has joined #ruby
browndawg has joined #ruby
browndawg has left #ruby [#ruby]
Choobie has quit [Ping timeout: 245 seconds]
carloslopes has joined #ruby
nat2610 has joined #ruby
<Xeago> what is the difficulty called when someone from another country and language works with local natives?
<Xeago> e.g. someone from the netherlands works in sweden
<Xeago> cultural and language difficulties?
templaedhel has quit [Ping timeout: 245 seconds]
_carloslopes has joined #ruby
carloslopes has quit [Read error: Connection reset by peer]
dawkirst has quit [Read error: Connection reset by peer]
nat2610 has quit [Ping timeout: 276 seconds]
<JonnieCache> that difficulty could be called a "language barrier"
<JonnieCache> "we had problems with the language barrier"
Virunga has quit [Remote host closed the connection]
<JonnieCache> but langugae/cultural differences is fine too
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
itsdavem has joined #ruby
browndawg has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
<Xeago> damnit, 1 jar of herring (1.3 EUR) is not enough for 6 crackers
jonahR has quit [Quit: jonahR]
user666 has joined #ruby
<user666> Good afternoon
<user666> I have a multidimentional array, and I wish to loop through it, but my current outcome is not what I expected it to do, could someone shed some light on what I could possibly be doing wrong and point me in the right direction?
<user666> Array is as follows: [["dabeshu", 1], ["Dwarf", 2]]
niklasb has joined #ruby
Asher has quit [Read error: No route to host]
<user666> And code:
<user666> row.each {|x, index| msg($output[2], index.to_s + '. ' + x[0].to_s + ' with ' + x[1].to_s + ' requests.') }
<jokke> how would i get the index of the member of an array that holds the hash that has the highest value in :age
<jokke> :)
* Xeago is flabbergasted by the ripoff jar of herring >.<
<Hanmac> user666 i think you want this: array.each_with_index {|(key,value),index| ... }
Nuck has quit [Ping timeout: 248 seconds]
<user666> Oh that works?
<user666> Let's see how it goes :)
renanoronfle has joined #ruby
Spillrag has quit [Ping timeout: 246 seconds]
itsdavem has quit [Remote host closed the connection]
Asher has joined #ruby
<Xeago> Hanmac: is the (key,value) necessary or can I omit the braces?
heftig has joined #ruby
binaryplease has joined #ruby
<Hanmac> Xeago try it without :P
tatsuya__ has joined #ruby
<Xeago> ah I figured
<Hanmac> jokke: data.each_with_index.max_by{|h,i|h[:age]}[1]
<banister_> Mon_Ouie: is it true there's proportionally more flemish who can speak french (and english) in belgium than french who speak flemish?
<Xeago> (,) is treated as a single variable, which gets assigned an array of 2 elements, but as (,) is actually 2 variables it takes the 2 elements
<banister_> Mon_Ouie: i heard that part of the hostility between french/flemish is due to french not making an effort to learn flemish, is this true?
wreckimnaked has quit [Ping timeout: 252 seconds]
rookfood has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Hanmac> Xeago: if you have only an normal each, it works allone: so [["dabeshu", 1], ["Dwarf", 2]].each {|k,v| ...} works the same as [["dabeshu", 1], ["Dwarf", 2]].each {|(k,v)| } .... you only need the () when you have more layers like, each_with_object().with_index.inject {|s,(((k,v),o),i) ... }
tatsuya_o has quit [Ping timeout: 276 seconds]
renanoronfle has quit [Quit: This computer has gone to sleep]
renanoronfle has joined #ruby
<user666> Thanks Hanmac that works :)
<Mon_Ouie> banister_: It definitely seems to be true
<Mon_Ouie> A few years ago, I heard a politician say something like "I'll say it in French so I'll only have to say it once…"
browndawg has left #ruby [#ruby]
dhruvasagar has quit [Ping timeout: 245 seconds]
arkiver has quit [Ping timeout: 264 seconds]
<banister_> Mon_Ouie: why do you think that is? just part of the general french arrogance/disinterest in any language aside from french?
seoaqua has quit [Quit: 离开]
larissa has joined #ruby
dhruvasagar has joined #ruby
samuel02 has joined #ruby
<Mon_Ouie> I heard about studies saying it's harder to hear other languages when your first language is French due to the small frequency range used in French
browndawg has joined #ruby
tealmage has joined #ruby
martinklepsch has joined #ruby
<banister_> Mon_Ouie: hehe, good excuse mate :D
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
<banister_> Mon_Ouie: though your english is exceptional, what's your spoken english like?
yshh has quit [Remote host closed the connection]
<Mon_Ouie> I'm not so sure, I very rarely speak English
nkr has joined #ruby
nkr has quit [Client Quit]
kayloos has joined #ruby
mengu has joined #ruby
renanoronfle has quit [Quit: Saindo]
itsdavem has joined #ruby
ananthakumaran has joined #ruby
nkr has joined #ruby
nkr has quit [Client Quit]
Kuifje has joined #ruby
koderde has joined #ruby
jinzhu has joined #ruby
hybris has joined #ruby
itsdavem has quit [Remote host closed the connection]
Virunga has joined #ruby
mockra has joined #ruby
tk_ has joined #ruby
nkr has joined #ruby
tatsuya__ has quit [Ping timeout: 248 seconds]
mockra has quit [Ping timeout: 264 seconds]
itsdavem_ has joined #ruby
terrorpup has joined #ruby
chussenot has quit [Quit: chussenot]
moos3 has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
tatsuya_o has joined #ruby
binaryplease has joined #ruby
pcarrier has joined #ruby
angusiguess has quit [Ping timeout: 276 seconds]
arya has quit [Ping timeout: 248 seconds]
NuckingFuts has joined #ruby
shock_one has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
NuckingFuts has quit [Changing host]
NuckingFuts has joined #ruby
NuckingFuts is now known as Nuck
BizarreCake has joined #ruby
tatsuya_o has quit [Ping timeout: 264 seconds]
arya has joined #ruby
rmartin has joined #ruby
ovatsug25 has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
polymar has joined #ruby
gyre007 has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
razibog1 has joined #ruby
razibog has quit [Quit: Leaving.]
tatsuya_o has joined #ruby
baphled has joined #ruby
razibog1 has quit [Client Quit]
razibog has joined #ruby
itsdavem_ has quit [Remote host closed the connection]
<banister_> Mon_Ouie: do u have a penchant for 'la gamine' ?
arya has joined #ruby
<JonnieCache> damn
<JonnieCache> the french have the best words
<JonnieCache> that is a *useful* word
Virunga has quit [Remote host closed the connection]
JumpMast3r has joined #ruby
chussenot has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
<Mon_Ouie> I don't know what you meant by that though
Chingy2055 has joined #ruby
melnik has quit [Quit: fault]
Chingy2055 has quit [Read error: Connection reset by peer]
davidboy has joined #ruby
baphled has quit [Ping timeout: 248 seconds]
xpen has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
banister_ has quit [Remote host closed the connection]
xpen has quit [Remote host closed the connection]
Chingy2055 has joined #ruby
xpen has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
taoru has quit [Remote host closed the connection]
BizarreCake has quit [Ping timeout: 276 seconds]
xpen_ has joined #ruby
Chingy2055 has joined #ruby
tealmage has quit [Remote host closed the connection]
Chingy2055 has quit [Max SendQ exceeded]
chussenot has quit [Quit: chussenot]
Chingy2055 has joined #ruby
chussenot has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
Chingy2055 has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
xpen has quit [Ping timeout: 264 seconds]
kpshek has joined #ruby
Chingy2055 has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
dustint has joined #ruby
banister`sleep has joined #ruby
itsdavem has joined #ruby
marr has joined #ruby
Chingy2055 has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
<banister`sleep> Mon_Ouie: est-ce-que tu aimes des gamines
Chingy2055 has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
pskosinski has joined #ruby
relixx has quit [Read error: Connection reset by peer]
user666 has quit [Quit: Leaving]
relixx has joined #ruby
bel3atar has quit [Ping timeout: 252 seconds]
aknagi has joined #ruby
Dwarf has joined #ruby
Chingy2055 has joined #ruby
itsdavem has quit [Ping timeout: 240 seconds]
Chingy2055 has quit [Max SendQ exceeded]
Chingy2055 has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
<aknagi> Hi guys. Is there a nice way to make triplets from an Array so [a,b,c,d,e,f] becomes [[a,b,c],[d,e,f]] ?
BizarreCake has joined #ruby
itsdavem has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<GeekOnCoffee> aknagi: yes
whitedawg has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
tommyvyo has quit [Client Quit]
bel3atar has joined #ruby
<apeiros_> aknagi: each_slice(3).to_a
tPl0ch_ has joined #ruby
baphled has joined #ruby
<aknagi> apeiros_: Thanks! :)
bananastalktome has joined #ruby
mark_locklear has joined #ruby
wreckimnaked has joined #ruby
tPl0ch has quit [Disconnected by services]
Chingy2055 has joined #ruby
tPl0ch_ is now known as tPl0ch
adkron_ has quit [Ping timeout: 245 seconds]
Chingy2055 has quit [Max SendQ exceeded]
adkron has quit [Ping timeout: 252 seconds]
Chingy2055 has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
xemu has joined #ruby
polymar has quit [Remote host closed the connection]
Chingy2055 has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
mockra has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
yshh has joined #ruby
havenn has joined #ruby
Chingy2055 has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
<nfk> is there really no way how to get abstract classes in ruby?
<nfk> or at least abstract methods
<nfk> i guess same thing
<nfk> been a long time since i did any real OOP
<hoelzro> nfk: def my_method raise 'this method is abstract!' end
<hoelzro> you could easily write a method generator for that, too
tms1 has left #ruby [#ruby]
<hoelzro> so you could do abstract_method :my_method instead
<nfk> hoelzro, the stuff on stack overflow was much closer to what i want but horribly bulky and ugly as sin
yacks has quit [Ping timeout: 252 seconds]
<hoelzro> nfk: well, what do you *want*?
cevarief2 has joined #ruby
angusiguess has joined #ruby
<nfk> what do you people do when you have multiple similar classes that need to have similar if not those same methods but at the same time time the parent class should not be instantiated as it would make no sense
<Mon_Ouie> You don't neeed them at all, you can just call the method and expect the object that is passed in to respond to that method
Chingy2055 has joined #ruby
<hoelzro> there's usually no need to define abstract methods in Ruby; you program assuming that you may call a certain set of methods on an object?
<Mon_Ouie> See duck typing
<hoelzro> s/[?]$//
kayloos has quit [Quit: kayloos]
<JonnieCache> hmmm
Chingy2055 has quit [Max SendQ exceeded]
baphled has quit [Ping timeout: 252 seconds]
<nfk> hoelzro, my memory is crap, i want ruby to yell at me if i forget to update a child class or something
Chingy2055 has joined #ruby
yshh has quit [Ping timeout: 245 seconds]
<hoelzro> well, I bet you could do it with meta magic
mockra has quit [Ping timeout: 255 seconds]
<nfk> i already have half a dozen of them and there's gonna be about as many more yet
havenn has quit [Ping timeout: 248 seconds]
<hoelzro> but it's probably "against the Ruby way"
<workmad3> nfk: why do you even need the parent class?
<apeiros_> nfk: enforcing inheritance is a smell
Chingy2055 has quit [Max SendQ exceeded]
<nfk> workmad3, because i want stuff to be DRY
<nfk> you know, the ruby way
<apeiros_> modules
<workmad3> ^^
<apeiros_> are the ruby way for shared behavior
<JonnieCache> im assigning a function to a variable but im having the classic problem that when i call that function from its variable, inside another function, it doesnt respect the reassigned variable. it keeps the value from when the second function was defined. i cant work out how to fix it
<apeiros_> JonnieCache: s/function/method/
cevarief has quit [Ping timeout: 256 seconds]
<JonnieCache> (i should admit that im having this problem in javascript but its no different to ruby)
<apeiros_> JonnieCache: also, how? Symbol? UnboundMethod? Method?
<hoelzro> JonnieCache: code, please?
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<workmad3> nfk: if you need a shared set of behaviour, put it in a module and mix it in, if you need an interface then use duck typing (and potentially write a test to verify the duck type interface exists on implementations)
<apeiros_> JonnieCache: um, yeeees, if you don't speak about ruby in what you say, you should *precede* it with that information…
huoxito has joined #ruby
huoxito has quit [Client Quit]
x0F_ is now known as x0F
Chingy2055 has joined #ruby
<nfk> workmad3, i'm afraid i'm not familiar with use of modules in ruby and as for duck typing, i can't even at the moment remember what it means
<hoelzro> JonnieCache: you probably want (function(){ return function() { ... }; })()
Chingy2055 has quit [Max SendQ exceeded]
<JonnieCache> sorry i should have written that first. my problem isnt language dependent though. you could have the same thing in any language with a similar pass-by-value-but-the-values-are-references language
<hoelzro> because JS scoping is a crock of crap
<nfk> oh, managed to find some docs
<workmad3> nfk: either of those is a purely technical aspect though, and shouldn't be shoe-horned into inheritance which should, IMO, be purely for a very strong semantic relationship, not for a simple behaviour sharing across disparate classes
<JonnieCache> hoelzro: yeah, ive tried various combinations of that stuff, i cant get the right one
Chingy2055 has joined #ruby
Takehiro has quit [Remote host closed the connection]
<nfk> workmad3, the thing is, those classes are very similar
otters has quit [Ping timeout: 255 seconds]
<nfk> models in rails
<workmad3> nfk: and?
puppeh has joined #ruby
Chingy2055 has quit [Max SendQ exceeded]
<workmad3> nfk: that doesn't change any part of what I just said
<JonnieCache> hoelzro: of course! the classic self executing function.
<workmad3> nfk: and DRY is about not repeating concepts, not about avoiding anything that even looks vaguely similar
RagingDave has quit [Quit: Ex-Chat]
Chingy2055 has joined #ruby
Rix has quit [Ping timeout: 260 seconds]
<hoelzro> I once saw someone do (function() ... end)() in Lua
<nfk> workmad3, i hate to have similar yet different code in many files
<hoelzro> poor guy.
Chingy2055 has quit [Max SendQ exceeded]
horofox has quit [Quit: horofox]
Jackneill has joined #ruby
puppeh has quit [Client Quit]
berserkr has quit [Read error: Connection reset by peer]
<nfk> and i want ruby to literally scream in anger if i forget to update some child class
<apeiros_> nfk: that's when you figure the pattern, locate the variable parts, and DRY it
<hoelzro> JonnieCache: I'm guessing you have something like https://gist.github.com/4634420
<hoelzro> ?
jaequery has joined #ruby
<workmad3> nfk: write tests then :P
Chingy2055 has joined #ruby
<nfk> workmad3, T_T
<workmad3> nfk: also 'forget to update some child class'? as in, you want ruby to just know that you were meant to change some behaviour and forgot?
Chingy2055 has quit [Max SendQ exceeded]
<JonnieCache> hoelzro: im not that much of a noob :)
elico has quit [Quit: elico]
<nfk> workmad3, also, wouldn't the tests need to know which classes to test for having the right stuff?
ner0x has joined #ruby
<JonnieCache> but its effectively the same bug in a more complex situation
<nfk> also i would need to keep the tests up to date
<hoelzro> I figured =)
<workmad3> nfk: yes, yes you would
<hoelzro> JonnieCache: I just updated my gist
<workmad3> nfk: it's called development :P
<hoelzro> with a second file
Chingy2055 has joined #ruby
jaequery has quit [Client Quit]
<hoelzro> god, I hate JS scoping rules.
<nfk> workmad3, as in if make an abstract some_method and forget to implement in one of the child classes, then ruby should not let that slide
<JonnieCache> thanks
Chingy2055 has quit [Max SendQ exceeded]
<workmad3> nfk: and it won't if you lean on duck typing
<nfk> yes, it would probably crash and burn when it got called but it might not happen for a while
<Mon_Ouie> Ruby is so dynamizc it will scream at you when you call the methods, not earlier
<workmad3> nfk: you'd get a NoMethod exception
<nfk> workmad3, only when called
ananthakumaran has quit [Read error: Connection reset by peer]
<nfk> what if it's not called for months?
ananthakumaran has joined #ruby
<workmad3> nfk: right... because at any time before it gets called, it could become valid
Chingy2055 has joined #ruby
<workmad3> nfk: and that's why you write tests
Jackneill has quit [Max SendQ exceeded]
<workmad3> nfk: and if you're using duck types, you write a shared behaviour test to ensure the interface is present
<nfk> workmad3, i'd still like for an optional and sane way to tell: this has to be defined when a child class is instantiated
<nfk> okay, google fu time
Rix has joined #ruby
<Mon_Ouie> When you create the subclass, the methods don't exist yet
<shevy> nfk hmm there is a hook I think
yacks has joined #ruby
<workmad3> nfk: what you don't do is write a superclass that you want to treat as abstract purely for the purposes of defining an interface, and put all the methods in there
<nfk> shevy, i guess, i saw some code but it was ugly as sin
<shevy> yeah
<shevy> :)
<nfk> workmad3, what i want is basically java inheritance model
<JonnieCache> AA
<workmad3> nfk: use java then
<nfk> yes, i know, it makes me feel sick and dirty, too
<nfk> workmad3, at this point? also JSP? i think i'll pass
dawkirst has joined #ruby
Chingy2055 has left #ruby [#ruby]
<workmad3> nfk: ruby is not the same as java, the object model is substantially different
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<nfk> i have been coding for almost a month, going with something different right now would require really compelling reasons
<workmad3> nfk: it works differently, and that means the idioms you work with need to change correspondingly
<workmad3> nfk: attempting to code java in ruby is a sure-fire way to cause yourself annoyance and pain :P
<nfk> workmad3, yes, but that doesn't stop me from wishing for some quick and easy sanity
<workmad3> nfk: there is plenty of sanity there... it's just a different sanity to what you're used to ;)
<workmad3> nfk: the only insanity is attempting to treat ruby as java
<nfk> workmad3, let's try the initial question differently, what's the ruby way for specifying interfaces? is it duck typing?
<workmad3> nfk: yes
<nfk> thanks
blaxter has quit [Quit: foo]
tk_ has quit [Quit: ばいばい]
<workmad3> nfk: or, more accurately, there isn't a strict, compiler validated way to formally declare an interface in ruby... instead you can treat any set of methods as an implicit interface and treat objects that implement that interface as a duck type for it
d2dchat has joined #ruby
tommyvyo has joined #ruby
terrorpup has quit [Remote host closed the connection]
nat2610 has joined #ruby
ffranz has joined #ruby
girija has left #ruby ["Ex-Chat"]
rippa has quit [Ping timeout: 240 seconds]
banister`sleep has quit [Remote host closed the connection]
ovatsug25 has quit [Remote host closed the connection]
ttt has quit [Read error: Connection reset by peer]
ttt has joined #ruby
nat2610 has quit [Ping timeout: 264 seconds]
Gue______ has joined #ruby
pen has joined #ruby
matchaw_ has quit [Remote host closed the connection]
Goles has joined #ruby
<JonnieCache> hoelzro: turns out i was actually doing all my l33t javascript functional programming entirely correctly
<hoelzro> well, that's good.
<JonnieCache> hoelzro: turns out all my problems were because i forgot that js doesnt implicitly return like ruby does
<JonnieCache> EPIC FAIL
<shevy> js must die
<nfk> JonnieCache, really? i thought it did have that
banister`sleep has joined #ruby
<JonnieCache> nope
<nfk> the good style is to use return though
<shevy> tiobe says javascript is better than ruby: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
<hoelzro> screw tiobe
<Xeago> nfk: coffeescript has automatic returns
slainer68 has joined #ruby
<nfk> Xeago, uhu
<JonnieCache> have you ever looked at how they work out tiobe
terrorpup has joined #ruby
jeffsmykil has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
<JonnieCache> its such a joke. i cant believe the industry lets them get away with it
<JonnieCache> they should be stopped
<nfk> JonnieCache, there you have it, you should have used coffeescript ;P
<Mon_Ouie> It ranks popularity, not quality
<JonnieCache> no it doesnt. it ranks google hits
<Mon_Ouie> (not that it's accurate)
<Mon_Ouie> My point is it doesn't say a language is better than another
<JonnieCache> nfk: believe me, id love to be using CS
<nfk> JonnieCache, if i have less google hits than wikipedia, does that make me more popular than wikipedia?
mrdtt has joined #ruby
<shevy> but more people use javascript than ruby :(
<JonnieCache> i bet theres more fortran in production than node
<JonnieCache> but less google hits
solitude88 has joined #ruby
matchaw_ has joined #ruby
geekbri has joined #ruby
Goles has quit [Read error: Connection reset by peer]
<Xeago> JonnieCache: at videofyme we're not allowed to use coffeescript, I just compile my coffeescript before checking in
Spooner_ has joined #ruby
krawchyk has joined #ruby
<Xeago> it atleast makes writing big chunks easier
ttt has quit [Remote host closed the connection]
<tlvb> just starting out with rack (and ruby in general) is my interpretation correct that you apply all the middleware as a chain on the form MW1.new(MW2.new(... ?
m8 has joined #ruby
ddd has quit [Ping timeout: 245 seconds]
earthquake has joined #ruby
<m8> Hi, it's a good idea to install gems in default path /var/lib/gems/1.8/gems? Or is better to install in a user path?
shock_one has quit [Read error: Connection reset by peer]
<Xeago> m8: depends on usage scenario, in general it is seen as a bad practice to write to system paths tho
<m8> good
<m8> i've to install redmine
breakingthings has joined #ruby
earthquake has quit [Client Quit]
earthquake has joined #ruby
whitedawg has quit [Quit: Leaving.]
ukd1 has joined #ruby
<m8> Xeago, thanks Xeago i'll use the --path parameter
<Mon_Ouie> That's as close as I could get :(
razibog1 has joined #ruby
Goles has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
d2dchat has quit [Remote host closed the connection]
invisime has joined #ruby
invisime has left #ruby [#ruby]
razibog has quit [Ping timeout: 276 seconds]
<banister`sleep> Mon_Ouie: cool
whitedawg has joined #ruby
shock_one has joined #ruby
<Mon_Ouie> Kind of, completely screws up in nested contexts though
jerius has joined #ruby
DaZ has quit [Ping timeout: 255 seconds]
shock_one has quit [Client Quit]
shock_one_ has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
didge has joined #ruby
<m8> Xeago, i've installed bundle in my local directory but if i run /home/user/gems/ruby1.8/bin/rake, search te lib in /var/ not in my directory
Goles has quit [Ping timeout: 245 seconds]
DatumDrop has joined #ruby
Goles has joined #ruby
Virunga has joined #ruby
whitedawg1 has joined #ruby
whitedawg has quit [Ping timeout: 255 seconds]
banister`sleep has quit [Remote host closed the connection]
Guest56687 has joined #ruby
catphish has joined #ruby
solidoodlesuppor has joined #ruby
yfeldblum has joined #ruby
<catphish> what is the difference between Foo::Bar and Foo.const_get(:Bar)
whitedawg1 has quit [Client Quit]
DatumDro_ has joined #ruby
DatumDrop has quit [Read error: Connection reset by peer]
<Mon_Ouie> They're equivalent (unless const_get was redefined of course)
Virunga has quit [Remote host closed the connection]
<catphish> i have a situation where they result in different results
<Mon_Ouie> Using const_get allows you to decide which constant to lookup at runtime though
DatumDro_ has quit [Read error: Connection reset by peer]
<catphish> specifically const_get appears to go up the chain when it needn't
banister`sleep has joined #ruby
<Mon_Ouie> Can we see the code?
<catphish> Foo.const_get(:Bar) is returning ::Bar instead of Foo::Bar
<catphish> hardcoding Foo::Bar in the same place works as expected
<catphish> Foo and Foo::Bar are classes ::Bar is a module
<Spooner_> catphish, That is because Foo::Bar isn't defined when you const_get.
m4n has quit [Ping timeout: 264 seconds]
pen has quit [Remote host closed the connection]
Virunga has joined #ruby
fbernier has left #ruby ["Leaving"]
iamjarvo has joined #ruby
ChampS666 has joined #ruby
neurotech has quit [Remote host closed the connection]
zigomir has quit [Quit: zigomir]
krz has quit [Quit: krz]
eldariof has quit [Ping timeout: 252 seconds]
huoxito has joined #ruby
mockra has joined #ruby
DatumDrop has joined #ruby
<catphish> Spooner_: you are correct, thank you
<catphish> Foo::Bar was auto-loading
<catphish> and const_get doesn't auto load classes
itsdavem has quit [Remote host closed the connection]
_carloslopes has quit [Remote host closed the connection]
yugui is now known as yugui_zzz
jgarvey has joined #ruby
solitude88 has quit [Quit: Linkinus - http://linkinus.com]
chridal has quit [Ping timeout: 264 seconds]
nomenkun has quit [Read error: Connection reset by peer]
mockra has quit [Ping timeout: 255 seconds]
nomenkun has joined #ruby
chridal has joined #ruby
<Spooner_> catphish, Someone had exactly the same issue yesterday. Autoload sucks :D
jtharris has joined #ruby
<apeiros_> +1
<banister`sleep> it really does
itsdavem has joined #ruby
<banister`sleep> there's some really weird edge case bugs related to them too, actual bugs (rther than weird behaviour)
fbernier has joined #ruby
<fbernier> Anybody have an idea of what's going on here?: https://gist.github.com/4634725
tomzx_mac has joined #ruby
tatsuya__ has joined #ruby
jlast has joined #ruby
sanukcm has joined #ruby
elux has joined #ruby
ewag has joined #ruby
tatsuya_o has quit [Ping timeout: 248 seconds]
<shevy> not me
<shevy> looks like some testing code
<matti> Anyone good with web development?
<matti> I need help with something :)
<nfk> i think the question was why it's having two different time zones
<Spooner_> matti, try #rubyonrails
<shevy> matti I AM THE GOD OF WEB DEVELOPMENT
<shevy> go ask your question you lowly peons!
<matti> shevy: Lies!
Takehiro has joined #ruby
<shevy> :(
<matti> shevy: I know you.
<shevy> matti but I am curious... can we give it a try? what is the question ...
<nfk> shevy, when are you killing all the flash infidels?
<matti> Spooner_: I am not going there, I need help not stand up comedy night ;]
<shevy> nfk nah, html5 is on its own way to do that I think
<Spooner_> matti, Fair enough :D
<nfk> shevy, in 10 years, my god
<shevy> hehe
<shevy> hey... 10 years ago I played java applet games! dragonquest or something...
<matti> shevy: I have no idea how to update DOM on the fly after receiving data via web socket.
Neomex has joined #ruby
<shevy> matti aha
<matti> shevy: I did the backend work, but I have no idea how to do front-end.
<shevy> web socks again!
<matti> shevy: My web development skills are dire, rather.
solidoodlesuppor has quit [Ping timeout: 252 seconds]
Neomex has quit [Client Quit]
<shevy> my general skills are dire. that's why I drag every problem down to my level, then I beat it down
lolmaus has quit []
<matti> shevy: OK.
<shevy> hehe
<shevy> matti I dont think I have conciously ever used web sockets before
solidoodlesuppor has joined #ruby
Goles has quit [Ping timeout: 240 seconds]
xpen has joined #ruby
chris___ has joined #ruby
<chris___> Is there anyone here who'd be interested in a Ruby job in Manchester?
gyre007 has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
Goles has joined #ruby
<shevy> is this ruby on rails
chridal has quit [Ping timeout: 248 seconds]
<chris___> shevy: yes
segv- has joined #ruby
atno has quit [Read error: Connection reset by peer]
atno has joined #ruby
gyre007 has quit [Remote host closed the connection]
sayan has quit [Read error: Connection reset by peer]
tomzx_mac has quit [Ping timeout: 255 seconds]
xpen_ has quit [Ping timeout: 264 seconds]
mmitchell has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
chridal has joined #ruby
itsdavem has quit [Remote host closed the connection]
jeffsmykil has quit [Quit: jeffsmykil]
razibog has joined #ruby
gyre007 has joined #ruby
dmiller2 has joined #ruby
v0n has joined #ruby
juarlex has joined #ruby
chris___ has quit [Ping timeout: 245 seconds]
chris___ has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
Gue______ has quit [Ping timeout: 245 seconds]
<chris___> My machine just crashed so I've missed any messages for me? Did anyone say anything?
<hoelzro> chris___: nope
pyreal has joined #ruby
razibog1 has quit [Ping timeout: 276 seconds]
pheonix has joined #ruby
llaskin has joined #ruby
llaskin has quit [Changing host]
llaskin has joined #ruby
<shevy> chris___ I was not saying anything as I use ruby mostly just for general purpose stuff, I do not know rails. most railsers tend to be on #ruby-onrails too btw
<chris___> shevy: yeah i've posted on there too.
dmiller2 is now known as dmiller
<shevy> hey guys... do you think that this would be useful syntax:
<shevy> rescue { require 'some_project' }
nkr has quit [Quit: Linkinus - http://linkinus.com]
<shevy> omg... I can define a method called rescue ...
<chris___> There is a dissapointing lack of applicants for the Ruby/Rails job we're advertisiing.
beiter has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
<llaskin> every time I call a method, I want to pass across an optional variable "case_number", is there a way to override some method somewhere to pass the optional case_number to every method call?
nomenkun has joined #ruby
sepp2k has joined #ruby
pskosinski has quit [Ping timeout: 255 seconds]
<llaskin> as the last variable in the call so method_name(x,y,z, case_number) or you could call it as method_name(x,y,z) without causing an issue
<shevy> Hanmac, this is the funniest thing: self.send :rescue
pheonix has left #ruby [#ruby]
<shevy> rescue_error.rb:12:in `send': undefined method `rescue' for main:Object (NoMethodError)
<tobiasvl> llaskin: def method_name(x, y, z, case_number = default_value)
<pyro111> create object that holds case_number
<shevy> but you can define that method, then call it
jeffreybaird has joined #ruby
<llaskin> yes but tobias, I know that, but I already have a bajillion methods created...and don't want to go about adding that to every method if I don't have to...
nyuszika7h has quit [Quit: Reconnecting]
templaedhel has joined #ruby
<shevy> llaskin well, if you did not define your method to have a default, then you must change the method definition
<llaskin> okie dokie
<shevy> you can use an object for "default_value" holding the data you want to make default, as pyro111 suggested
sambio has joined #ruby
nyuszika7h_ has joined #ruby
<llaskin> yes I understand, was hoping not to have to do that
<llaskin> was hoping there was some way to override it, but understand that there isn't
pskosinski has joined #ruby
<tobiasvl> not sure how that would work
<tobiasvl> so nope, sorry
carloslopes has joined #ruby
<pyro111> I thinked about object that takews optional params at .new, than all methods of that object can use it
bean__ has quit [Quit: Computer has gone to sleep.]
nyuszika7h_ is now known as nyuszika7h
<shevy> llaskin perhaps you could fetch all methods from a .rb file, then redefine them automagically
<shevy> and changing just the last parameter to each
<shevy> with alias_method perhaps, I dunno... I have never tried such an idea
arturaz has quit [Ping timeout: 244 seconds]
cevarief has joined #ruby
ukd1 has quit [Read error: Connection reset by peer]
<pyro111> I think with ruby 2 you can prepend instead of alias_method
_carloslopes has joined #ruby
<shevy> cool
templaedhel has quit [Ping timeout: 264 seconds]
carloslopes has quit [Read error: Connection reset by peer]
baphled has joined #ruby
Goles has quit [Read error: Connection reset by peer]
cevarief2 has quit [Ping timeout: 276 seconds]
<catphish> Spooner_: thanks, was puzzling me for ages!
daniel_- has joined #ruby
jrist-afk is now known as jrist
djdarkbeat has joined #ruby
jinzhu has quit [Ping timeout: 256 seconds]
<banister`sleep> llaskin: yea you can do that using method decorators
<banister`sleep> llaskin: if you can show me a couple of specs for a minimal test case i can probably code it up 4 u
banister`sleep is now known as banisterfiend
gregor3005 has joined #ruby
baphled has quit [Ping timeout: 256 seconds]
tatsuya__ has quit [Remote host closed the connection]
shock_one_ has quit [Read error: Connection reset by peer]
BulleTime has quit [Ping timeout: 252 seconds]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
iamjarvo1 has joined #ruby
Goles has joined #ruby
yfeldblum has quit [Quit: Leaving]
<gregor3005> hi, i bought the book "the rubyist" and tried some examples there. now i have problem with the first "require" usage, here is the code http://fpaste.org/vckJ/
generalissimo has joined #ruby
<gregor3005> load works, but require didn't find the file. when i use the static path it find it
<gregor3005> "ruby -e 'puts $:'" don't give me a dot at the laste line, maybe this can be the problem?
<gregor3005> i use this version: ruby-1.9.3.362-24.fc18.x86_64
clocKwize has quit [Quit: clocKwize]
philcrissman has joined #ruby
DuoSRX has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 252 seconds]
lusory has quit [Read error: Connection reset by peer]
jjbohn has joined #ruby
<pyro111> may be require_relative
stopbit has joined #ruby
<banisterfiend> chris___: i looked up some videos on manchester, bleak place.. :)
<JonnieCache> manchester is great these days
TIBS01 has quit []
<banisterfiend> looks like a really depressing place to live
Hanmac1 has joined #ruby
<JonnieCache> those videos were probably taken before the IRA bombed it to hell and they got a lovely new city centre courtesy of the insurance industry
<gregor3005> pyro111: thx require_relative works
<banisterfiend> JonnieCache: here: http://www.youtube.com/watch?v=QFWP62EoU4g
D4T has joined #ruby
a_a_g has quit [Quit: Leaving.]
huoxito has quit [Read error: Operation timed out]
<gregor3005> pyro111: you know a good ide with code completation? i tested eclipse but it didn't give me require_relative as an option
dannluciano has joined #ruby
clooth has quit [Quit: clooth]
Hanmac has quit [Ping timeout: 256 seconds]
Virunga has quit [Remote host closed the connection]
<JonnieCache> youre never gonna get full java-style completion with ruby
<JonnieCache> jetbrains is popular
<rmartin> try rubymine
<rmartin> it has a very good autocomplete feature
<JonnieCache> oh yeah rubymine is the one i was thinking of
<rmartin> yeah
<rmartin> Jetbrains Rubymine correcttt
pyro111 has quit [Quit: Leaving]
<wunz> < JonnieCache> youre never gonna get full java-style completion with ruby
<JonnieCache> id encourage you to just learn the api in your head though
<wunz> whys that?
yfeldblum has joined #ruby
<gregor3005> oh, rubymine is not for free :-(
<wunz> everything's free. just have to properly search for it if you really want it free
<Xeago> "Earlier investigation showed that the search queries were hammering down the database." I feel that the word hammering is inappropriate in a (scientific'ish) paper
<wunz> but for such a grea tool i would recommend to show some appreciation towards its dev
<Xeago> any suggestions
filipe has quit [Ping timeout: 244 seconds]
beiter_ has joined #ruby
<wunz> "causing a decrease in the database performance"
<banisterfiend> JonnieCache: you might find this pretty interesting http://lists.squeakfoundation.org/pipermail/squeak-dev/1998-October/017019.html
<banisterfiend> wunz: static analysis is much easier in java i guess
<banisterfiend> wunz: you can figure out what methods belong to which object, and always provide teh correct completions. With ruby which is really really dynamic, there'd probably be a subset of stuff you can't properly complete
aedornm has joined #ruby
nomenkun has quit [Remote host closed the connection]
havenn has joined #ruby
mockra has joined #ruby
_nitti has joined #ruby
beiter has quit [Ping timeout: 276 seconds]
beiter_ is now known as beiter
Hanmac1 is now known as Hanmac
larissa has quit [Quit: Leaving]
beilabs has quit [Ping timeout: 248 seconds]
<rmartin> indeed, banister
Liothen has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 252 seconds]
beliveyourdream has quit [Read error: Connection reset by peer]
<banisterfiend> Xeago: can't you write our thesis in dutch?
timmow has quit [Quit: has left the building]
<banisterfiend> your*
mockra has quit [Ping timeout: 264 seconds]
timmow has joined #ruby
chris___ has quit [Ping timeout: 245 seconds]
arya has quit [Ping timeout: 248 seconds]
SegFaultAX has quit [Ping timeout: 276 seconds]
jaimef has quit [Ping timeout: 255 seconds]
kanzure has quit [Ping timeout: 248 seconds]
kn330 has joined #ruby
failshell has joined #ruby
enebo has joined #ruby
sbear has joined #ruby
workmad3 has joined #ruby
SegFaultAX has joined #ruby
arusso has quit [Ping timeout: 245 seconds]
tatsuya__ has joined #ruby
undersc0re97 has joined #ruby
zigomir has joined #ruby
Goles_ has joined #ruby
arya has joined #ruby
jaimef has joined #ruby
tagrudev has quit [Remote host closed the connection]
arusso has joined #ruby
filipe has joined #ruby
mikecmpbll has joined #ruby
Goles has quit [Ping timeout: 244 seconds]
beilabs has joined #ruby
puppeh has joined #ruby
sailias has joined #ruby
kanzure has joined #ruby
__BigO__ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
andrewhl has joined #ruby
interactionjaxsn has joined #ruby
wallerdev has joined #ruby
LineByLine has joined #ruby
dqminh has joined #ruby
kpshek has quit []
nat2610 has joined #ruby
LineByLine has quit [Client Quit]
binaryplease has joined #ruby
beilabs has quit [Ping timeout: 245 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
LineByLine has joined #ruby
arya has joined #ruby
nateberkopec has joined #ruby
zph has joined #ruby
puppeh has quit [Quit: Leaving...]
dannluciano has quit [Quit: dannluciano]
nat2610 has quit [Ping timeout: 246 seconds]
chridal has quit [Quit: Lost terminal]
adeponte has joined #ruby
thams has quit [Quit: thams]
r0bby has joined #ruby
mark_locklear has quit [Remote host closed the connection]
<llaskin> banisterfiend, i'm coding you up a sample or two....
robbyoconnor has quit [Ping timeout: 252 seconds]
bean__ has joined #ruby
<banisterfiend> llaskin: i have a horrible feeling though that what your'e asking might not actually make sense, but i'd be happy if u proved me wrong :D
axl_ has joined #ruby
SCommette has joined #ruby
bluOxigen has joined #ruby
reinaldob has joined #ruby
Goles_ has quit [Quit: Out.]
sbear has quit [Ping timeout: 276 seconds]
<llaskin> banisterfiend: its nota bout making sense sometimes, but meeting management requests
<llaskin> i hope that gives some idea...
kpshek has joined #ruby
horofox has joined #ruby
arya has quit [Ping timeout: 248 seconds]
beilabs has joined #ruby
<banisterfiend> llaskin: as a quick fix can't you go: def real_verify_delete_dialog(pool_name)..;end
etcetera has joined #ruby
<banisterfiend> llaskin: def verify_delete_dialog; real_verify_delete_dialog(1.4); end
<banisterfiend> that way you dont have to change any of the call sites
<llaskin> yea but the current call doesn't pass the test_case_number into each assertion
<llaskin> i think I am going to have to do a major cut/paste of all the test_case_numbers into each thing
<banisterfiend> llaskin: btw i've never seen so many global variables in code before in my life :)
<banisterfiend> dat nasty
<llaskin> there are only 3 i think
<banisterfiend> in one method
<banisterfiend> yeah
<banisterfiend> ..
<llaskin> i can explain
<banisterfiend> no it's ok
zph has quit [Read error: Connection reset by peer]
<banisterfiend> llaskin: are oyu new to ruby?
BulleTime has joined #ruby
<llaskin> i've had this discussion(perhaps with you) before, and I think we both agreed that at least 2 of them make sense.
<llaskin> no
ukd1 has joined #ruby
<llaskin> though I still peg myself at a high-novice level...
joshman_ has joined #ruby
zph has joined #ruby
<workmad3> banisterfiend: why doesn't he just do 'def verify_delete_dialog(pool_name = 1.4)'? :P
dqminh has quit [Remote host closed the connection]
<llaskin> workmad3: the point is not to have 1.4 as the default
<workmad3> yeah, I know that ;)
<llaskin> I want to be able to call verify_delete_dialog at step 1.4, and 2.5, and so on and so forth
<llaskin> by default the test_case_number is actually "unknown"
<llaskin> or undefined
<workmad3> but I was wondering why banisterfiend was suggesting wrapping in a separate method for introducing what amounts to a default
<llaskin> (still haven't decided that....
Goles has joined #ruby
KevinSjoberg has quit [Quit: Textual IRC Client: www.textualapp.com]
<banisterfiend> workmad3: oversight :)
jtgiri_ has joined #ruby
Goles has quit [Max SendQ exceeded]
<workmad3> llaskin: but basically yes... you want to change a method in order to introduce a non-optional parameter, so you're going to need to go through and modify all the callers to have the correct parameter
<workmad3> llaskin: there isn't a way around tha
<workmad3> t
<llaskin> yea, so basically my life is really gonna suck:(
<llaskin> ok
<llaskin> cool
heidar has joined #ruby
Goles has joined #ruby
<banisterfiend> llaskin: unless the test case number is some kind of global
<workmad3> llaskin: you could introduce a temporary default for now, if all the current usage is for one test-case
<llaskin> banister no its not a global.
r0bby is now known as robbyoconnor
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
joofsh_ has quit [Remote host closed the connection]
<banisterfiend> llaskin: could you store the test case number on the object?
<banisterfiend> llaskin: then verify_dialog could just grab it as an instance variable
arya has joined #ruby
<llaskin> no, because the object runs through multiple test cases...
heidar has quit [Quit: leaving]
ChampS666 has quit [Ping timeout: 255 seconds]
<llaskin> while each method is going to run only 1 test case at a time, the object will run 100+ potentially
Goles has quit [Max SendQ exceeded]
havenn has joined #ruby
clooth has joined #ruby
<lectrick> I have a question: Say I have a class which I want to unit test. This class inherits from another class, which must be loaded. Is there any way to not have to load that other class, short of opening it and closing it right away myself? I want to reduce coupling.
D4T has quit [Ping timeout: 255 seconds]
<banisterfiend> llaskin: in the before blok for each test, couldn't you write a proxy object
<banisterfiend> i guess it might not help
jtgiri_ has quit [Client Quit]
<banisterfiend> but you could write a wrapper object which has the same method, but also an ivar slot for the test case number
Astralum has quit [Ping timeout: 256 seconds]
<banisterfiend> set that in your before block
uris has joined #ruby
<llaskin> also banisterfiend if you can think of a way to store the driver object so that multiple objects can access it easily without using a global, i'm always open(though it would definitely take some convincing) to how to do it: https://gist.github.com/4635547 I use $browser instead of driver used in the example provided because that way I don't have to pass it around between seperate classes and can't define new drivers each time(time consuming and confusing
D4T has joined #ruby
joofsh has joined #ruby
__ru__ has quit [Remote host closed the connection]
jrafanie has joined #ruby
angusiguess has quit [Ping timeout: 246 seconds]
yalue has joined #ruby
heidar has joined #ruby
Umren has joined #ruby
zastern has joined #ruby
ChampS666 has joined #ruby
<lectrick> aren't variables defined outside classes "global"?
<lectrick> in scope at least
<apeiros_> no
frem has joined #ruby
Goles has joined #ruby
<lectrick> oh, no, no they're not
<lectrick> ok now I have to ask- why not?
<apeiros_> because that's not how the language was designed
<apeiros_> constants are global (+namespaced)
<lectrick> is this something that has to do with lexical vs. semantic scope?
<apeiros_> local variables are always local
ewag has quit [Ping timeout: 264 seconds]
ckrailo has joined #ruby
Spooner_ has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
<banisterfiend> llaskin: im not familiar with that library, but maybe you could still inject the dependency but set its default to the global
freeayu__ has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
<lectrick> apeiros_: does "local" change only when "self" changes?
jtgiri_ has joined #ruby
alv-r- has joined #ruby
<banisterfiend> llaskin: it might make things easier later on if you do figure out a way to get rid of the global
adeponte has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
aganov has quit [Remote host closed the connection]
<banisterfiend> MyClass.new(driver=$global)
evanx has quit [Quit: evanx]
angusiguess has joined #ruby
jonathanwallace2 has quit [Ping timeout: 252 seconds]
<banisterfiend> lectrick: no
eneveu has joined #ruby
eneveu has left #ruby [#ruby]
ukd1 has quit [Quit: leaving]
<banisterfiend> lectrick: it changes when a new scope is created, a few things define a new scope, class definitions, method definitions, etc
<apeiros_> lectrick: no, local changes when something introduces a new lexical scope
<apeiros_> lectrick: e.g. `class X`, `module X`, `def foo`
arya has joined #ruby
<apeiros_> also every file defines a local scope (toplevel)
ddd has joined #ruby
etcetera has quit []
alex__c2022 has joined #ruby
<apeiros_> and one speciality of blocks & procs is, that they can close over that scope, and preserve local variables
krawchyk_ has joined #ruby
tPl0ch has quit [Quit: Verlassend]
<workmad3> banisterfiend: it's specifically the keywords 'class', 'module' and 'def' that create new scopes, afaik
<apeiros_> lectrick: instance variables are the things that are attached to a `self` (since they belong to an object and self represents that object)
mikepack has joined #ruby
<workmad3> banisterfiend: so you can create new classes with Class.new do; and the class definition is a closure, same with define_method and Module.new
beneggett has joined #ruby
<apeiros_> workmad3, banisterfiend - don't forget files. so many people are confused when they define local variables in files, require them and those variables are undefined…
<workmad3> apeiros_: good point :) I've never experienced that personally
huttan has quit [Quit: leaving]
stkowski has joined #ruby
<Hanmac> letrick info: an object that is set to a instance does not know that it goes attached to one (and it does not know to which object it does get attached to)
<Hanmac> workmad3 & apreiros_ do you guys think there should be a callback funktion for that?
huttan has joined #ruby
krawchyk has quit [Ping timeout: 240 seconds]
<workmad3> Hanmac: not particularly
mockra has joined #ruby
__BigO__ has quit [Remote host closed the connection]
<banisterfiend> i dont even know what "an object that is set to a instance does not know that it goes attached to one " means :)
<workmad3> banisterfiend: I think he means @ivar = Object.new
<banisterfiend> oh ok
<JonnieCache> javascript sucks. i just wrote a function that returns a function that returns a function
<workmad3> banisterfiend: and Object.new doesn't get informed that it's now stored in an ivar on self there :)
<banisterfiend> you can hook stuff like that in objc
<JonnieCache> several of those functions call themselves
<apeiros_> Hanmac: no, I think not that that's necessary. Gut-feel tells me that that'd promote rather bad practices.
<banisterfiend> ah
<JonnieCache> goddamm
reinaldob has quit [Remote host closed the connection]
<workmad3> apeiros_: that's what my gut says too :)
mahmoudimus has joined #ruby
io_syl has joined #ruby
<apeiros_> JonnieCache: o0
BulleTime has quit [Ping timeout: 252 seconds]
<workmad3> JonnieCache: stop writing shit javascript then :P
arya has quit [Ping timeout: 248 seconds]
__BigO__ has joined #ruby
BizarreCake has quit [Ping timeout: 276 seconds]
AlSquirrel has quit [Ping timeout: 264 seconds]
<lectrick> apeiros_: OK so then is there a way to have a scoped value that is available and easily changeable everywhere, other than (for example) defining attr_accessor's on Object or using other such singleton-like methods?
<apeiros_> JonnieCache: re your earlier "js changes this when calling functions" - you can use Function#apply and #call to set "this"
DatumDrop has quit [Remote host closed the connection]
phinfonet has joined #ruby
<JonnieCache> hmmm yeah i probably could
jgrevich has joined #ruby
drago757 has joined #ruby
<apeiros_> lectrick: global values should be stored in constants
<apeiros_> lectrick: global values are a smell, though
<JonnieCache> what i wrote isnt shit js though. its js best practice.
<apeiros_> lectrick: information is generally a pass-down thing
rdark has quit [Quit: leaving]
<lectrick> apeiros_: for example, if I could define classes as class SomeObject < some_dynamic_value, I could stub that out in tests and kill the coupling between SomeObject and whatever it "normally" inherits from, allowing me to unit test it in isolation
<workmad3> JonnieCache: also there's the _this = this trick to keep access to the context inside a closure
<apeiros_> JonnieCache: allow me to doubt that :-p
<apeiros_> workmad3: I usually use self
rdark has joined #ruby
mockra has quit [Ping timeout: 244 seconds]
<workmad3> apeiros_: I normally use => in coffeescript ;)
<JonnieCache> its because im doing currying while also needing to avoid scope pitfalls
<workmad3> apeiros_: which I know compiles down to _this = this :)
<apeiros_> CS… still should write a bit of code with that
<JonnieCache> but youre right i could probably do it better
sbear has joined #ruby
<lectrick> apeiros_: agreed on information pass-down except where it applies to coupling and trying to reduce it to get the extremely fast tests I have been heartily lusting for lately
chrismhough has joined #ruby
berserkr has joined #ruby
<apeiros_> lectrick: that's not needed for stubbing
AlSquire has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
<apeiros_> ruby is easily powerful enough to stub/mock/test-spy without changing inheritance
<lectrick> apeiros_: I don't like the idea of stubbing constants, that feels like a smell to me
cawaker has quit [Quit: Linkinus - http://linkinus.com]
<apeiros_> lectrick: o0
<apeiros_> you usually don't stub *variables*, you stub *objects*
<shevy> hey you can change constants in ruby any time!
<shevy> they are quite aptly named
<apeiros_> I don't think it's even proper terminology to say "stub a variable".
banisterfiend has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
<lectrick> no, you can't change class constants I don't think... let me try
namxam has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<workmad3> lectrick: sure you can
<apeiros_> yes you can
<apeiros_> just like that if you don't mind ruby complaining. const_remove + const_set if you mind.
asym has joined #ruby
namxam has joined #ruby
<lectrick> apeiros_: for example if I have to load an ActiveRecord model, when I load it, the first line is "class SomeModel < ActiveRecord::Base". So now I have to load aaallll of ActiveRecord, possibly some of Rails, ActiveSupport, and any and all other codependencies. I could do "module ActiveRecord; class Base; end; end;" in my test before I require the model file,
<lectrick> but that also seems ugly
krawchyk_ has quit [Remote host closed the connection]
<lectrick> apeiros_: what if you const_remove a class that other classes already inherited from?
niklasb has quit [Ping timeout: 252 seconds]
<lectrick> it just hangs around namelessly, never being garbage-collected? :)
krawchyk has joined #ruby
<workmad3> lectrick: it clears out the constant, but the class stays around as the superclass
<workmad3> lectrick: because it's still referenced :P
<lectrick> right
<Hanmac> lectrick same problem then for the instances
baphled has joined #ruby
bananastalktome has quit [Quit: bananastalktome]
<apeiros_> lectrick: that's the difference between *objects* and *variables*
<apeiros_> very important to understand that one
<apeiros_> anyway, changing inheritance isn't how you normally stub/mock/spy
RagingDave has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Targen has joined #ruby
<workmad3> ^^ +1
LineByLine has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<workmad3> you don't want to start messing around with your inheritance tree in your object-under-test
<workmad3> basic rule of 'don't mock/stub what you're testing'
<Hanmac> >> class A; end; a = A.new; Object.send(:remove_const,:A); class A;end; p a.is_a?(A), a.class == A, a.class.name == A.name
<eval-in> Hanmac: Output: "false\nfalse\ntrue\n" (http://eval.in/7521)
<lectrick> basically, what I want is a way to load a class which may depend on or inherit from other classes, without having it have to cascade-load those other dependencies, and without (ideally) having to open the depended-on classes myself (in order to define them- this is yet more coupling) or use const_remove and const_set (although... in the latter case... let me
<lectrick> consider)
cevarief has quit [Ping timeout: 276 seconds]
<workmad3> lectrick: those dependencies are part of the object you're testing
namxam has quit [Ping timeout: 276 seconds]
samphippen has joined #ruby
arya has joined #ruby
<lectrick> workmad3: that's fine, but if you have to load all the dependencies of a class in order to test the class, it is no longer a unit test, it is an integration test
<workmad3> lectrick: depends on the type of dependency
<workmad3> lectrick: when you inherit, you're not merely depending on something, you are declaring that you *are* that thing
DatumDrop has joined #ruby
<workmad3> lectrick: so it becomes part of the unit
<lectrick> hmmm
<apeiros_> lectrick: no
<apeiros_> if you have that view, *everything* is an integration test.
<apeiros_> because, d'uh, you test parts of ruby too
<lectrick> ok so where do you draw the line, then?
<workmad3> lectrick: if you want to avoid that, you need to break up your class into parts that need that inheritance and parts that don't, and split them into separate objects that collaborates
<workmad3> *collaborate
<lectrick> workmad3: such as modules
<workmad3> lectrick: modules, or smaller, plain ruby objects
plotplanexe has quit [Remote host closed the connection]
<lectrick> PORO, the unsung hero
angusiguess has quit [Ping timeout: 240 seconds]
dekroning has quit [Ping timeout: 255 seconds]
BizarreCake has joined #ruby
moshee has quit [Read error: Connection reset by peer]
<workmad3> lectrick: it's also why I treat is as a good idea to relegate inheritance to something other than the first thing to use to pull in behaviour :)
axl__ has joined #ruby
moshee has joined #ruby
beiter has quit [Quit: beiter]
filipe_ has joined #ruby
cawaker has joined #ruby
phinfonet has quit [Ping timeout: 264 seconds]
<lectrick> workmad3: i am thinking :) thanks.
<lectrick> So are complex inheritance hierarchies also kind of a smell?
axl_ has quit [Ping timeout: 248 seconds]
Xeago_ has joined #ruby
Xeago is now known as Guest62646
axl__ is now known as axl_
Guest62646 has quit [Killed (brooks.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
<lectrick> Or anything beyond a certain complexity
<workmad3> yes, I'd treat complex hierarchies as a smell
maletor has joined #ruby
<workmad3> I'd also treat a hierarchy where both parent and child are instantiated as a smell
Rizzle has joined #ruby
<lectrick> interesting
kpshek has quit []
<lectrick> i recently wrote a class like that :O
<apeiros_> I think deep hierarchies in ruby are rather rare
filipe has quit [Ping timeout: 245 seconds]
<lectrick> so instantianting both Hashes and HashesWithIndifferentAccess is smelly?
baphled has quit [Ping timeout: 256 seconds]
<lectrick> I guess I don't follow on that one
<lectrick> Or a currency class that inherits from Float?
_nitti_ has joined #ruby
<workmad3> lectrick: I find either of those as dubious targets for inheritance anyway
hoelzro is now known as hoelzro|away
hck89 has joined #ruby
<whitequark> lectrick: DO NOT EVER INHERIT CURRENCY FROM FLOAT.
<workmad3> lectrick: I'd personally approach both as separate classes that hold internally a hash or a number
<lectrick> whoa whoa it was only an idea off the top of my head whitequark , I've never actually written a currency class lol
<whitequark> lectrick: Floating point, for example, cannot precisely represent a lot of numbers, like 0.1
<martinklepsch> using MiniTest, is there a way to set some "global before" to clean the database etc?
<whitequark> and it does not behave in arithmetics like you think it behaves
noxoc has quit [Quit: noxoc]
<workmad3> whitequark: it behaves exactly as I think it behaves, unless it's a non-compliant implementation :P
<workmad3> whitequark: because I think it behaves how the IEEE spec says it behaves ;)
<lectrick> whitequark: i was trying to use it as an example, I was not interested in delving into http://www.atalasoft.com/cs/blogs/stevehawley/archive/2008/01/25/never-forget-floating-point-sucks.aspx
<apeiros_> lectrick: you should rephrase that as 'currencly class inheriting from bigdecimal'
beaky has joined #ruby
<lectrick> I would avoid floats in general anyway, I like ints
<whitequark> workmad3: note that I didn't say that to you ;)
<beaky> hello
<workmad3> whitequark: :)
<apeiros_> "Never forget floating point sucks" - that title suggests that the author doesn't know the topic he's writing about…
<lectrick> apeiros_: thank you! "currency class inheriting from BigDecimal"
<workmad3> lectrick: still, I wouldn't inherit a currency class from *any* number class
<apeiros_> did I really write "currencly"? wtflol
<lectrick> oh jeez i linked to an aspx page. that's a 50 DKP minus!!
stayarrr has joined #ruby
marius has quit [Ping timeout: 264 seconds]
<workmad3> lectrick: I'd write a currency class that held internally a value representing the currency amount, probably as an int of the smallest currency unit to consider
<whitequark> apeiros_: well, you gotta write a catchy headline
_nitti has quit [Ping timeout: 255 seconds]
<lectrick> floating point is a dirty hack. I read the IEEE spec... or tried to
<apeiros_> whitequark: yes, it's difficult to do that without looking like an idiot :)
<Hanmac> lectrick: (and workmad3 and apeiros_) i make an interesting list:
<Hanmac> >> p (Object.constants - [:Config]).select{|c| Object.const_get(c).is_a?(Class) && !Object.const_get(c).respond_to?(:new)}
<eval-in> Hanmac: Output: "[:NilClass, :TrueClass, :FalseClass, :Encoding, :Symbol, :Integer, :Fixnum, :Float, :Bignum, :MatchData, :Method, :UnboundMethod, :Binding, :RubyVM, :Rational, :Complex]\n" (http://eval.in/7522)
<apeiros_> whitequark: sadly newspapers prove that day after day
<lectrick> workmad3: In short, a value class, right?
<whitequark> lectrick: there's nothing hacky in floating point
AlSquire has quit [Ping timeout: 256 seconds]
<workmad3> lectrick: pretty much, yeah
<whitequark> lectrick: one just need to understand that it has fixed precision and implications of that
<lectrick> whitequark: seriously? have you read http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html ?
AlSquire has joined #ruby
<apeiros_> if you don't understand why Floats precision is limited, you'll fail using bigdecimal classes too
<whitequark> lectrick: yeah
<workmad3> floating points are a well engineered standard around the problem of representing a useful subset of the Real number system in finite amounts of space
<apeiros_> lectrick: try 1/3 with a bigdecimal class, lets see how precise it gets…
koderde has quit [Quit: Leaving]
<lectrick> whitequark: honestly, I made it through about 1/3 of it before I fell back on my primary design rule, "if it's too complex, it's ugly and there is probably a better way". For me that is ints. I am 99% certain that any algorithm that thinks it depends on floating point in order to work can be rewritten using ints
<gregor3005> is the latest rails exploit fixed?
cantonic has quit [Read error: Connection reset by peer]
cantonic_ has joined #ruby
<workmad3> they're also a pretty damn good application of error correcting codes
joeycarmello has joined #ruby
love_color_text has joined #ruby
<apeiros_> lectrick: with numbers, the following rule applies better: for any complex problem there's a simple solution which is wrong
<whitequark> lectrick: what workmad3 said about floats is true.
<whitequark> the format itself is trivial
AlSquirrel has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<workmad3> lectrick: I can prove you wrong with a pretty simple example
<apeiros_> gregor3005: #rubyonrails, and the lastest I'm aware of has been for a while
<whitequark> lectrick: the complexity mainly stems from the need have operations well-defined even in corner cases
<workmad3> lectrick: drawing a circle using a radius and a centre :P
AlSquire has quit [Read error: Connection reset by peer]
huoxito has joined #ruby
sbear has quit [Ping timeout: 245 seconds]
<whitequark> workmad3: btw, what's about floats and ECC? I've no idea
<gregor3005> apeiros_: thx
xpen has quit [Remote host closed the connection]
jmeeuwen has quit [Ping timeout: 240 seconds]
<lectrick> workmad3: you can represent all needed values as ints as long as they are all expanded out to the same precision, no?
<lectrick> workmad3: for the circle drawing problem
<whitequark> lectrick: one word: exponent
<lectrick> whitequark: yeah, I understand why the complexity is there. it's still ugly. even if it's a good application of ECC :)
tjbiddle has joined #ruby
<lectrick> whitequark: yes, the exponent of all the numbers used in question must be the same
<lectrick> am I wrong?
ChampS666 has quit [Ping timeout: 245 seconds]
MattRB has joined #ruby
<whitequark> lectrick: was referring to http://irclog.whitequark.org/ruby/2013-01-25#2804231;
<whitequark> lectrick: yes, it must be the same, and if that's unacceptable, you must use floats
interactionjaxsn has quit [Remote host closed the connection]
<whitequark> you can of course represent fractions with fixed-point numbers
<lectrick> whitequark: when is it unacceptable?
<whitequark> but you then need to know the position of the dot in advance
<whitequark> and often at compile time
tjbiddle has quit [Client Quit]
<lectrick> can you represent all real numbers as a fraction of two integers? jeez, math knowledge is so ephemeral in my head
<workmad3> lectrick: actually no you can't
<lectrick> workmad3: yeah I didn't think so
<workmad3> lectrick: but fixed-point numbers aren't real numbers, they're rationals
<whitequark> workmad3: so are floating-point ones
<workmad3> whitequark: true :)
<GeekOnCoffee> I'd think you could in general, they might just be really big integers
interactionjaxsn has joined #ruby
<workmad3> GeekOnCoffee: nope, the defining characteristic of the reals is that you can't ;)
<whitequark> GeekOnCoffee: you cannot precisely represent an irrational number with any finite amount of digits
<workmad3> GeekOnCoffee: sqrt(2), pi, e, etc
jtgiri_ has quit [Quit: jtgiri_]
<lectrick> GeekOnCoffee: yes, the implication is that the "integer space" for the purposes of this would be large
<whitequark> and if you can, it's rational by definition
templaedhel has joined #ruby
<GeekOnCoffee> got it… this is why I wasn't a CS major… damn math
<whitequark> lectrick: please, learn some math.
Na_Klar has joined #ruby
<workmad3> GeekOnCoffee: you can even prove (using cantor's diagonal slash) that you can't even count all the real numbers using integers
* apeiros_ had that in what US probably calls 'college'
<lectrick> whitequark: too late, i bombed out of engineering calculus at cornell. i hate memorizing integrals.
<apeiros_> that was long before university
bricker has quit [Ping timeout: 252 seconds]
<whitequark> not sure about college. it was in high school for me
* JonnieCache wishes he could play this game :(
mahmoudimus has joined #ruby
<apeiros_> never sure which is which
ChampS666 has joined #ruby
<workmad3> I can't remember when first did things like irrationals
<apeiros_> well, we learn this @ around age 14
<lectrick> I'm 40. High school was in the 80's for me. There has been a tremendous amount of alcohol consumed since then.
<lectrick> whitequark: ^
baphled has joined #ruby
<whitequark> lectrick: well, isn't this a reason to consume less alcohol?
MattRB has quit [Quit: This computer has gone to sleep]
* whitequark doesn't.
<lectrick> whitequark: lol. Alcohol makes the panties drop, thus, alcohol wins.
angusiguess has joined #ruby
philcrissman has quit [Remote host closed the connection]
aedornm has quit [Quit: Leaving]
<whitequark> I'm not even going to comment on the multitude of reasons that is very wrong
llaskin has left #ruby [#ruby]
osaut has quit [Quit: osaut]
AlSquirikou has joined #ruby
binaryplease has quit [Ping timeout: 245 seconds]
bricker has joined #ruby
Zolo has joined #ruby
<JonnieCache> innit
piotr_ has quit [Ping timeout: 252 seconds]
<lectrick> be right back to respond to that, helping a coworker
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
samphippen has quit [Quit: Computer has gone to sleep.]
peregrin_ has joined #ruby
AlSquirrel has quit [Ping timeout: 245 seconds]
swex_ has joined #ruby
AlSquirikou has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
<banisterfiend> i forget
<banisterfiend> is struct part of stdlib or core?
<apeiros_> stdlib
<apeiros_> gah
<apeiros_> *core*
<heftig> openstruct is stdlib
<apeiros_> banisterfiend: just do ruby -e 'Struct'
jean-louis has quit [Ping timeout: 252 seconds]
<banisterfiend> thx
<apeiros_> if it raises, it's stdlib, if not, it's core ;-)
<apeiros_> (make sure your RUBYOPT is clean)
<whitequark> is it a sensible distinction at all?..
<apeiros_> core/stdlib? yes
quest88 has joined #ruby
<apeiros_> I think "must require" vs. "doesn't need to be required" is sensible
<apeiros_> sadly, stdlib itself isn't well-defined
AlSquire has quit [Read error: Connection reset by peer]
swex has quit [Ping timeout: 245 seconds]
gyre007 has quit [Remote host closed the connection]
<lectrick> whitequark: OK so first of all, I was joking. Second of all, I not only have German ancestry (my parents drink beer with lunch and dinner), I was also in the USAF AND in a fraternity. I was very anti-drinking in high school but drinking has enabled some very good and interesting experiences for me (as well as any woman I am dating) so if you don't understand
<lectrick> that then frankly I feel sorry for you because you've missed out on some good times.
jmeeuwen has joined #ruby
<workmad3> hehe, defensive much? :P
thams has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
<lectrick> Now, back to math. I was joking about alcohol killing brain cells (mostly). The amount of time since I learned this stuff is probably a factor (25 years is a long time), so stop being a douche by making me feel bad about not remembering the math and just state the facts, sir.
* Hanmac dont drink alc or does smoke
jaequery has joined #ruby
<whitequark> sigh
<apeiros_> do I need popcorn?
<banisterfiend> Hanmac: Yeah, you're a really boring guy
<whitequark> oh right, #ruby.
<banisterfiend> jk :D
<yxhuvud> apeiros_: I need beer :(
<workmad3> lectrick: I wasn't trying to make you feel bad
<Xeago> I'd mind a beer
<lectrick> All I asked was whether all algorithms that think they depend on real numbers can be rewritten with (very big) ints. A tiny loss of precision is allowed I guess, at a likely massive boost in speed.
<Xeago> writing blog.xeago.nl/graduation/extended-abstract.html is awful
<workmad3> lectrick: and no, I don't think that's the case
dqminh has joined #ruby
<whitequark> lectrick: "very big" ... "massive boost". you're self-contradicting
<Hanmac> banistefriend why? because i have dreams or moments, where other need drugs for that? :D
<banisterfiend> Xeago: write it in dutch then pay translators to put it into english
<Xeago> banisterfiend: I write better in english
<Xeago> and faster
bluenemo has quit [Remote host closed the connection]
<Xeago> and most importantly, coherent
<workmad3> lectrick: if you move to very big ints, you're looking at *much* slower operations
<Xeago> lectrick: your statement is true for some subset of algorithms
<lectrick> workmad3: You weren't. whitequark told me to "learn some math" and then says "isn't that a reason to justify not drinking". Sorry, he pushed both my "I am not wrong for liking alcohol" and "I am not wrong for forgetting math" buttons in a very short span of time lol
<Xeago> rather large subset if you ask me
mockra has joined #ruby
<lectrick> workmad3: big ints are slower than floating point math? If that is the case, I am surprised.
<workmad3> lectrick: floating point is supported on chip
<beaky> does ruby have something like the python range/xrange function?
<workmad3> lectrick: big ints are implemented in software
<lectrick> ok forget BigInt, how about a double precision integer, like a 64 bit int?
<Hanmac> Xeago i like knoflook :P
<Xeago> workmad3: there are chips that implement big ints, normal software doesn't use it tho
templaedhel has quit [Quit: Leaving...]
<JonnieCache> lololololololololol
<workmad3> Xeago: :)
<Xeago> lectrick: I would hardly call int64 double precision
<JonnieCache> it really is 5 o clock on friday isnt it
<Xeago> Hanmac: knoflook makes you stink
<workmad3> and yeah, 'double precision' refers to doubles, as in double-precision floating point
<banisterfiend> beaky: in ruby Range is a built-in type: 1..20
<workmad3> you're thinking of long integers
<beaky> ah thanks
<Hanmac> ... translate.google is freaky .. i just open it and it knows that i want to translate form dutch into my language .. (without that i type something oO :D)
<beaky> wow it looks so much neater
<lectrick> :( argh. ok. longints. i'm sorry
<beaky> like haskell
<lectrick> workmad3: you're right re: double prec. my bad.
<apeiros_> lectrick: the moment you use 2 64bit ints for a rational, you have already at least doubled the number of instructions needed
bradhe has joined #ruby
dqminh has quit [Ping timeout: 252 seconds]
<beaky> what are some ruby pitfalls that newbies often fall into?
<lectrick> apeiros_: doesn't it depend on the rational?
<apeiros_> float most certainly is faster than that
<Hanmac> beaky: 0 is true
<lectrick> apeiros_: or does it simply have to do with the fact that floats are implemented in the cpu hardware?
phinfonet has joined #ruby
<Xeago> lectrick: mostly yes
danshultz has joined #ruby
<beaky> hah you probably saved me a wtf moment :D
<apeiros_> lectrick: no, you have to perform all instructions against both, denominator and numerator
<Xeago> lectrick: there are programs that calculate pi without floats
<workmad3> beaky: pitfall? they come in here, see us arguing about using floats over ints, etc. and get scared away :)
<beaky> heh
<lectrick> Xeago: yeah, that's what I was thinking
<apeiros_> lectrick: also adding two rationals means you need to normalize the denominator
alvaro_o has joined #ruby
<Xeago> lectrick: those are used on lowend chips to calculate tangents etc
binaryplease has joined #ruby
<apeiros_> so adding 2 rationals represented as 2 64bit ints each is most likely more expensive than a float addition
<lectrick> apeiros_: ok what if you represent the rational as simply an approximation using a 64 bit integer to a given precision?
<Xeago> where basically everything gets turned into an int with a lowbitcount decimal seperator counter
<lectrick> ("exponent", etc.)
<workmad3> lectrick: what? you mean like a float? :P
<apeiros_> lectrick: you're just reinventing float then
<apeiros_> and somehow we get back to: if you don't understand why/how float is limited…
danneu has joined #ruby
Proshot has joined #ruby
AlSquire has joined #ruby
<Hanmac> beaky: there is no i++ or i--
<lectrick> workmad3: apeiros_ Because floats end up having to be ultimately represented as N bits anyway. Got it.
<workmad3> lectrick: incidentally, the complexity in floats is almost entirely around making sure the approximation is understandable ;)
<banisterfiend> beaky: if/end does not define a new scope
bradhe has quit [Ping timeout: 244 seconds]
<workmad3> lectrick: a 32 bit float is simply 32 bits split up into mantissa, exponent and sign
haxrbyte has joined #ruby
cakehero has joined #ruby
<workmad3> lectrick: and then rules around how they get added, subtracted, multipled, etc
<beaky> ah
rakl has joined #ruby
adeponte has joined #ruby
<beaky> those don't seem too wtf coming from python
<workmad3> beaky: coming from python eh?
<lectrick> workmad3: Yeah I was just wondering if that "complexity" translated to "increased computation time" and was wondering if just sticking to an int representation would be computed quicker.
peregrin_ is now known as peregrine81
generalissimo has quit [Remote host closed the connection]
rakl has quit [Max SendQ exceeded]
<workmad3> beaky: then here's your wtf - lambdas are useful :)
fabionl has joined #ruby
AlSquirrel has joined #ruby
<banisterfiend> beaky: our lambdas let you change the value of a closed over variable
<beaky> lambdas are awesome
Zolo has quit [Remote host closed the connection]
AlSquire has quit [Read error: Connection reset by peer]
<whitequark> lectrick: modern CPUs can operate with floats very quickly
<whitequark> even better, most of them can do floating-point SIMD
<whitequark> whereas only few have integer SIMD ATM
Zolo has joined #ruby
<whitequark> and it's generally more restricted
<Hanmac> beaky: i have an german list there: wiki.ruby-portal.de/Pitfalls
<beaky> ah ice thanks
<beaky> nice*
<Xeago> if there is anyone too bored with the floaty talk: http://blog.dev/graduation/extended-abstract.html
<lectrick> whitequark: interesting. I did not know that. What about the vector portion of the chip? does that operate on ints or floats?
<Xeago> would be nice for sentence coherence check and other reading detection stuff
<whitequark> Xeago: >blog.dev
<Xeago> wops
<workmad3> hehe
interact_ has joined #ruby
wreckimnaked has quit [Ping timeout: 252 seconds]
<whitequark> lectrick: erm. if it has FP SIMD, then floats. If it has integer SIMD, then ints ;)
poikon has joined #ruby
<whitequark> SIMD is just a lot of ALUs cobbled together
ddd has quit [Read error: Connection reset by peer]
dmiller has quit [Ping timeout: 255 seconds]
<workmad3> single instruction, multiple data, isn't it?
binaryplease has quit [Read error: Connection reset by peer]
kenichi has joined #ruby
quest88 has quit [Quit: quest88]
<whitequark> workmad3: yup
<banisterfiend> yeah, usually operates on a 4 floats simultaneously
<banisterfiend> which isn't a coincidence, since it's designed for multimedia
<banisterfiend> and color values are RGBA
<apeiros_> man, how did that work with bundle and package?
binaryplease has joined #ruby
<apeiros_> `bundle package` on the dev machine and then `bundle --local` on the server?
a_a_g has joined #ruby
volte has joined #ruby
gyre007 has joined #ruby
<workmad3> apeiros_: bundle pack --all on the dev, iirc
<lectrick> ok, thanks for the tangent folks, didn't mean to flood #ruby with #math :)
Zolo has quit [Ping timeout: 245 seconds]
<workmad3> apeiros_: that way you'll get git and path gems included in the pack
<apeiros_> workmad3: just noticed
love_color_text has quit [Remote host closed the connection]
interactionjaxsn has quit [Ping timeout: 248 seconds]
volte_ has quit [Ping timeout: 245 seconds]
<apeiros_> ah f*ck
<apeiros_> must add a gem I only need on my "server" (really my private laptop without internet access and postgres instead of oracle…)
k610 has quit [Quit: Leaving]
rakl has joined #ruby
<workmad3> heh
<apeiros_> yeah, 5h of train driving
ddd has joined #ruby
<apeiros_> I need some entertainment. is it sad that coding does that for me? :)
<workmad3> you drive trains?
jtgiri_ has joined #ruby
<apeiros_> I'm swiss. of course I do.
<apeiros_> oh
<workmad3> I'd hope when you drive the trains you weren't distracted :P
<apeiros_> you mean… language fail
<JonnieCache> apeiros_: i would say that youre incredibly lucky that your choice of entertainment activity happens to be so lucrative
<apeiros_> 5h of train riding
<apeiros_> better?
<workmad3> I'd kinda worry if my train driver was just sat there coding instead of driving the trains ;)
<workmad3> apeiros_: yeah :D
<LiquidInsect> workmad3: afraid he might make a wrong turn?
<apeiros_> it's the same word in german :)
<apeiros_> LiquidInsect: don't laugh, that's actually possible
<workmad3> LiquidInsect: or not notice the signal and crash into another train
<LiquidInsect> Kind of jealous actually, I ride a train for an hour every day and there's not enough room to use a computer usually...
ExxKA has joined #ruby
<Xeago> LiquidInsect: 1.5-2hours, 1way. I tend to avoid traffic hours
sn0wb1rd has joined #ruby
<LiquidInsect> maybe if I used ruboto and tried to code on my tablet. Masochistic.
<whitequark> +1 on avoiding traffic hours
<workmad3> I've seen commuter trains in the UK
<workmad3> they're awful
<workmad3> I have to put up with a bus for 1h each way when I work in the office
<Xeago> LiquidInsect: even when stuffed, if I can get my laptop out before someone sits around me
<Xeago> I am fine
danneu has quit [Quit: WeeChat 0.3.8]
goraxe has joined #ruby
<LiquidInsect> BART, out in the bay area, is standing-room only even at 6:30 AM. I am actually tempted to start using ruboto now...
<workmad3> but I get on before the real crowds get on at both ends, so I've never had a problem getting a seat (generally upstairs, where they don't allow standing, and so I don't get as crowded)
bradhe has joined #ruby
Xeago has quit [Remote host closed the connection]
tjbiddle has joined #ruby
axl__ has joined #ruby
dr_bob has left #ruby [#ruby]
<whitequark> upstairs?
interactionjaxsn has joined #ruby
<workmad3> whitequark: yeah, all the buses out to my house are double-deckers
quest88 has joined #ruby
<whitequark> oh
dougireton has joined #ruby
<whitequark> what country is it?
<workmad3> UK
enebo has quit [Quit: enebo]
Spooner has joined #ruby
blaxter has joined #ruby
<workmad3> manchester, where we have a lot of decent bus routes :)
quest88 has quit [Remote host closed the connection]
AlSquirikou has joined #ruby
AlSquirrel has quit [Write error: Connection reset by peer]
angusiguess has quit [Ping timeout: 255 seconds]
axl_ has quit [Ping timeout: 276 seconds]
axl__ is now known as axl_
<shevy> .find vs. .select, .select is used more often or?
<whitequark> shevy: they have different semantics
<whitequark> or did you mean #select vs #detect?
Xorlogosh has joined #ruby
Zolo has joined #ruby
<whitequark> errrr, #find vs #detect.
interact_ has quit [Ping timeout: 252 seconds]
<beaky> what is the english meaning of japanese terms like heroku or nokogiri?
danneu has joined #ruby
<danneu> join lodestonesocial
adas has joined #ruby
danneu has left #ruby [#ruby]
Goles has quit [Remote host closed the connection]
zeade has joined #ruby
Goles has joined #ruby
<shevy> whitequark .find vs. .select, I found myself use .select a lot but barely ever .find
<LiquidInsect> according to google, nokogiri = saw
tylersmith has joined #ruby
<beaky> ah
<whitequark> shevy: these are simply different methods
<beaky> and i guess heroku is not really a term :(
bigkevmcd has quit [Read error: Connection reset by peer]
tjbiddle has quit [Quit: tjbiddle]
<LiquidInsect> yeah, it's a portmenteau, looks like
<LiquidInsect> portmanteau, that is
Takehiro has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
Goles has quit [Max SendQ exceeded]
<beaky> hehe
havenn has joined #ruby
axl_ has quit [Quit: axl_]
<alv-r-> can someone explain to me why if I use "II" on a multiline statement it works well, but if I use "or" instead it doesn't (returns nil)? if I use a single line for the operation, both work fine. (Example: http://pastebin.com/WphXE8sS )
colonolGron has joined #ruby
<alv-r-> (assuming one of the statements will be true :P)
clooth has quit [Quit: clooth]
peregrine81 has quit [Quit: Computer sleeping.]
<apeiros_> cya guys
apeiros_ has quit [Remote host closed the connection]
havenn has quit [Read error: No route to host]
hackerdude has joined #ruby
peregrine81 has joined #ruby
clooth has joined #ruby
bradhe has quit [Remote host closed the connection]
megha has quit [Ping timeout: 264 seconds]
filipe_ has quit [Read error: Connection reset by peer]
dekroning has joined #ruby
_carloslopes has quit [Remote host closed the connection]
bradhe has joined #ruby
catphish has quit [Quit: Leaving]
Goles has joined #ruby
tatsuya__ has quit [Remote host closed the connection]
breakingthings has quit []
<LiquidInsect> alv-r-: you have to remember that and/or and &&/|| are not the same thing
jonathanwallace2 has joined #ruby
Astralum has joined #ruby
joofsh has quit [Remote host closed the connection]
chrisbolton has joined #ruby
<LiquidInsect> alv-r-: this may explain better than I can in limited time: http://stackoverflow.com/questions/1426826/difference-between-and-and-in-ruby
Takehiro has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
nat2610 has joined #ruby
aaronmcadam has quit [Quit: aaronmcadam]
adas has quit [Quit: Page closed]
maletor has joined #ruby
<LiquidInsect> and/or are better used to chaining things you want to have happen instead of logic: Something.create(args) or raise "couldn't create Something!"
<chrisbolton> I'm trying to test whether a string has any alphanumeric characters. Is there an inherent Ruby method or should I jump straight to regex?
baphled has quit [Ping timeout: 256 seconds]
<LiquidInsect> I'd go for a regex for that, but I might be missing something in the String class. Don't see anything that stands out to do what you want
<chrisbolton> LiquidInsect: Same here.
phinfonet has quit [Read error: No route to host]
nwertman has joined #ruby
hackerdude has quit [Remote host closed the connection]
a_a_g1 has joined #ruby
havenn has joined #ruby
hackerdude has joined #ruby
<whitequark> chrisbolton: regex
thomsch has joined #ruby
<whitequark> it is the optimal solution for tasks like the one you have
<chrisbolton> Thanks. I'm running with Regex.
dougireton has quit [Remote host closed the connection]
<chrisbolton> Yeah after I asked the question I figured I've got a tool that's built to do exactly what I want might as well take the time and dink around with Rubular.
a_a_g has quit [Read error: Connection reset by peer]
a_a_g1 has quit [Client Quit]
c0rn has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
terrorpup has quit [Ping timeout: 252 seconds]
Vainoharhainen has quit [Quit: Leaving...]
<beaky> how similar is ruby to smalltakl?
<beaky> smalltalk*
<banisterfiend> beaky: message-passing OO model
<havenn> beaky: Smalltalk is Ruby's mother.
woolite64 has joined #ruby
bricker is now known as bricker`away
megha has joined #ruby
Xeago has joined #ruby
<lectrick> And Smalltalk's baby daddy is Perl, Lisp, and possibly other men. I mean languages.
<beaky> hah
<beaky> no C influence? :D
ngoldman has joined #ruby
undersc0re97 has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
<beaky> apart from 'puts' and 'gets' >.<
<havenn> beaky: I've heard folks say that Smalltalk finally became mainstream, we just call it Ruby. :P
<shevy> hehe
<beaky> ah
digifiv5e is now known as guyz
<beaky> smalltalk was much more than just the language; it was this graphical ecosystem of objects messaging each other.
<shevy> dunno, I feel that ruby is closest to perl
<shevy> beaky well that would be cool... we shall do that for the RubyOS
ExxKA has quit [Quit: Leaving]
carloslopes has joined #ruby
bradhe has quit [Remote host closed the connection]
cpruitt has joined #ruby
<Hanmac> beaky ruby is pythons evil twin sister :P
bradhe has joined #ruby
axl_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
cdt has quit [Quit: Ex-Chat]
zph has joined #ruby
D4T has quit [Quit: Textual IRC Client: www.textualapp.com]
mmitchell has quit [Remote host closed the connection]
undersc0re97 has joined #ruby
terrorpup has joined #ruby
clocKwize has joined #ruby
philcrissman has joined #ruby
jduan1981 has joined #ruby
kevin_e has quit [Quit: Lost terminal]
pskosinski has quit [Ping timeout: 264 seconds]
enebo has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
DatumDrop has quit [Remote host closed the connection]
bean__ has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
rdark has quit [Quit: leaving]
banisterfiend has joined #ruby
aaronmcadam has joined #ruby
Goles_ has joined #ruby
jblack has joined #ruby
Goles has quit [Ping timeout: 252 seconds]
albakry has joined #ruby
kpshek has joined #ruby
answer_42 has joined #ruby
DatumDrop has joined #ruby
hadees has quit [Quit: hadees]
pskosinski has joined #ruby
relixx has quit [Read error: Connection reset by peer]
clocKwize has quit [Quit: clocKwize]
relixx has joined #ruby
banisterfiend has quit [Ping timeout: 264 seconds]
<alv-r-> LiquidInsect: thanks, sorry for taking long to reply
nat2610 has quit [Quit: Leaving.]
peregrine81 has quit [Quit: Computer sleeping.]
nat2610 has joined #ruby
<alv-r-> but still, if "or" is more suited to chain things, it would be more suitable in my example, wouldn't it? still it doesn't work if I use it multiline
mercwithamouth has joined #ruby
peregrine81 has joined #ruby
aherron has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
bcuz has joined #ruby
tjbiddle has joined #ruby
<aherron> is there any reason that executing a rake task through the command line would create a file (sqlite3), but using Rake::Task[:name].execute would not?
ddd has quit [Quit: Leaving.]
Banistergalaxy has quit [Ping timeout: 264 seconds]
punkrawkR^Home has joined #ruby
chrismhough has quit [Quit: chrismhough]
namxam has joined #ruby
slainer68 has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
relixx_ has joined #ruby
browndawg has quit [Ping timeout: 244 seconds]
Takehiro has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
dougireton has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
razibog has quit [Ping timeout: 245 seconds]
Takehiro has joined #ruby
sepp2k has quit [Ping timeout: 248 seconds]
grzywacz has joined #ruby
cobragoat has joined #ruby
relixx has quit [Ping timeout: 245 seconds]
relixx_ is now known as relixx
dougireton has quit [Client Quit]
bradhe has quit [Remote host closed the connection]
blaxter has quit [Quit: KTHXBYE]
angusiguess has joined #ruby
banisterfiend has joined #ruby
bradhe has joined #ruby
dougireton has joined #ruby
bradhe has quit [Remote host closed the connection]
solitude88 has joined #ruby
Takehiro has quit [Ping timeout: 264 seconds]
Na_Klar has quit [Quit: ChatZilla 0.9.87 [Firefox 17.0.1/20121129164337]]
jrist is now known as jrist-afk
<Xeago> what is the proper casing of NOSQL? NoSQL? NoSql?
etcetera has joined #ruby
undersc0re97 has quit [Ping timeout: 252 seconds]
ChampS666 has quit [Ping timeout: 255 seconds]
undersc0re97 has joined #ruby
<Xeago> aherron: the working directory might be different
<Xeago> and not have write access
vlad_starkov has quit [Remote host closed the connection]
bcuz has quit [Quit: Page closed]
<havenn> Xeago: NoSQL
chrismhough has joined #ruby
<Xeago> havenn: reasoning?
dougireton has quit [Quit: Leaving.]
Xeago has quit [Remote host closed the connection]
shevy has quit [Read error: Operation timed out]
jimeh has quit [Quit: Computer has gone to sleep.]
<havenn> Like PostgreSQL. No is the word "no", so capitalized. SQL is an initialism so upcase.
terrorpup has quit [Ping timeout: 256 seconds]
dougireton has joined #ruby
Neomex has joined #ruby
<havenn> SQL (Structured Query Language) is an initialism. SeQueL is an abbreviation. Guess it depends how far back you want to look. >.>
Nisstyre has quit [Ping timeout: 255 seconds]
dougireton has quit [Client Quit]
<banisterfiend> havenn: what's the diff b/w initialism and acronym?
recycle has joined #ruby
<havenn> banisterfiend: oh, oops, i meant acronym
ChampS666 has joined #ruby
<workmad3> havenn: bah, SQL should be pronounced SQuirreL
vlad_starkov has joined #ruby
<workmad3> havenn: so you write squirrel code, and run it against your squirrel database :P
bcuz has joined #ruby
<havenn> banisterfiend: initialism is pronounced as letters and acronym is spoken (es-que-el versus sequel)
braoru has joined #ruby
<havenn> **ess-cue-el
<workmad3> havenn: yeah, I was going to ask you that... isn't an initialism an abbreviation
beiter has joined #ruby
<workmad3> havenn: and your second definition was an acronym, which is also an abbreviation :)
<havenn> workmad3: i haven't had my coffee, so i'm mostly speaking gibberish i'm afraid >.>
<workmad3> :D
* workmad3 got caught out recently by thinking acronyms shouldn't be pronouncable
recycle has quit [Remote host closed the connection]
heftig has quit [Ping timeout: 246 seconds]
jonathanwallace2 has quit [Ping timeout: 245 seconds]
dougireton has joined #ruby
heftig has joined #ruby
browndawg has joined #ruby
recycle has joined #ruby
nkr has joined #ruby
bricker`work is now known as bricker
hybris has quit [Quit: Leaving]
apok has joined #ruby
axl_ has quit [Quit: axl_]
<beaky> what is the ifference between ruby blocks and lambdas?
Appineer has joined #ruby
namxam has quit [Remote host closed the connection]
shevy has joined #ruby
<banisterfiend> beaky: blocks are a special-case, they're an especially light-weight lambda syntax when passing to a method
cobragoat has quit [Remote host closed the connection]
Nisstyre has joined #ruby
punkrawkR has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
terrorpup has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
Appineer has left #ruby [#ruby]
nat2610 has quit [Quit: Leaving.]
Xeago has joined #ruby
browndawg has quit [Ping timeout: 276 seconds]
nat2610 has joined #ruby
<Hanmac> beaky even ruby says that everything is an object, blocks itself are none, but can be encapsuled into one with proc or lamba
punkrawkR has joined #ruby
nat2610 has quit [Client Quit]
snearch has joined #ruby
punkrawkR^Home has quit [Ping timeout: 255 seconds]
kenneth has joined #ruby
louisror has quit [Ping timeout: 248 seconds]
punkrawkR^Home has joined #ruby
nga4 has joined #ruby
Takehiro has joined #ruby
main has quit [Ping timeout: 252 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
drago757 has quit [Quit: drago757]
axl_ has joined #ruby
<whitequark> Hanmac: not that it is particularly correct
punkrawkR has quit [Ping timeout: 252 seconds]
<whitequark> the fact that blocks aren't objects isn't any more true than the fact that while loops aren't objects
samphippen has joined #ruby
<whitequark> on the other hand, the fact that blocks aren't internally Procs in MRI is an implementation detail of MRI
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
dhruvasagar has joined #ruby
pu22l3r has joined #ruby
cnrk has joined #ruby
<Hanmac> whitequark when you do def f; yield 3;end f {|i| p i} the block is not an object, when you do def f(&block);block.call(3);end f {|i| p i} the block is turned into an object
bcuz has quit [Quit: Page closed]
BizarreCake has quit [Remote host closed the connection]
<whitequark> Hanmac: that is an implementation detail of MRI.
chussenot has quit [Ping timeout: 256 seconds]
pu22l3r has quit [Remote host closed the connection]
<whitequark> nothing in Ruby requires a block not to be an object, or allows you to observe the difference from inside Ruby
jonathanwallace2 has joined #ruby
mrsolo has joined #ruby
pu22l3r has joined #ruby
dougireton has quit [Quit: Leaving.]
<whitequark> in particular, my implementation does represent all blocks as objects.
d2dchat has joined #ruby
Neomex has quit [Quit: Neomex]
<jokke> hi guys, i'm desperate for help.. I have to write a cache simulator in ruby. Or i chose to write it in ruby. In four hour's it's gotta be ready. I wrote the program already, but it gives me wrong hit rates. My tutor had a look at it and said it would "look" right, but he doesn't really know ruby.
<jokke> Here's my code: http://paste.xinu.at/R3hub/
ChampS666 has quit [Ping timeout: 256 seconds]
Takehiro has quit [Ping timeout: 248 seconds]
elaptics is now known as elaptics`away
dougireton has joined #ruby
phinfonet has joined #ruby
griffindy has joined #ruby
<jokke> sorry, the comments are in german
atno has quit [Read error: Connection reset by peer]
cha1tanya has quit [Quit: Leaving]
atno has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
huoxito has quit [Read error: Connection reset by peer]
pu22l3r has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
Neomex has quit [Client Quit]
breakingthings has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<jokke> this is how the input files look like: http://paste.xinu.at/LI1Gr/
mityaz has joined #ruby
d2dchat has quit [Ping timeout: 245 seconds]
tenmilestereo has joined #ruby
binaryplease has joined #ruby
ChampS666 has joined #ruby
pcarrier has quit []
mengu has quit [Quit: Leaving]
<jokke> the first number determines if it's a data read (0), data write (1), or instruction fetch (2)
<jokke> and the second (hex) number is the address
mdw- has quit [Read error: Operation timed out]
<jokke> which consists out of a tag and an index
d2dchat has joined #ruby
<canton7> jokke, lines 21/22 look iffy
freakazoid0223 has joined #ruby
<canton7> easy to get precidence wrong there
<beaky> i've seen lots of ruby devs use sublime 2. how does it compare to vim for ruby?
<canton7> beaky, depends what you're into
<canton7> sublime text 2 also has a vim mode, which combines the best of both worlds... ish :P
<Xeago> canton7: I hated st2's vim mode
<Xeago> and went back to vim/tm
<beaky> yeah Vintage mode is quite different from vim :(
<tylersmith> i've never gotten vintage mode working
<canton7> Xeago, it does seem a bit buggy...
<beaky> it's not quite like emacs's viper
rezzack has joined #ruby
<beaky> e.g. no ex commands
<jokke> canton7: hmm.. maybe you're right
<tylersmith> which sucks because if it were good it'd make super awesome
AwayLex is now known as Quadlex
<canton7> jokke, bracket it up just in case
nkr has quit [Quit: Linkinus - http://linkinus.com]
drfreeze has quit [Ping timeout: 246 seconds]
<jokke> canton7: you mean parentheses?
<jokke> ()
<canton7> yep
<jokke> yes i did
jgrevich_ has joined #ruby
<canton7> any better?
fabionl has quit [Quit: fabionl]
<jokke> sec
<jokke> nope :/
axl_ has quit [Remote host closed the connection]
<jokke> i always get the same ratio
<jokke> well not always
axl_ has joined #ruby
<jokke> but no matter what i change the output doesn't
phinfonet has quit [Quit: Linkinus - http://linkinus.com]
d2dchat has quit [Ping timeout: 252 seconds]
drfreeze has joined #ruby
benlieb has joined #ruby
jgrevich has quit [Ping timeout: 276 seconds]
jgrevich_ is now known as jgrevich
<jokke> canton7: do you understand the task in general?
brianpWins has joined #ruby
<canton7> jokke, I learnt about those sorts of caches some years ago. I don't have the time now to remember, and work out what you're trying to do i'm afraid
<benlieb> I'm porting a rails app from 3.0 / 1.8.7 to 3.1 / 1.9.2. I haven't changed the rails version yet, just the ruby version. All my tests are passing except one, in which I get this error: OpenSSL::SSL::SSLError: SSL_connect, but the test passes under 1.8.7. Any suggestions on what might be happening?
<jokke> canton7: i understand
hadees has joined #ruby
biello has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
Morkel_ has joined #ruby
faisal_khan has joined #ruby
mmitchell has joined #ruby
<benlieb> The the error happens on this line: response = http.post(url.path, data)
<benlieb> Is there a difference between http.post in 1.8.7 and 1.9.2
heyitsdave has joined #ruby
Morkel has quit [Ping timeout: 240 seconds]
Morkel_ is now known as Morkel
nat2610 has joined #ruby
Goles has joined #ruby
ebobby has joined #ruby
dougireton has quit [Quit: Leaving.]
bricker_ has joined #ruby
motto has joined #ruby
benlieb_ has joined #ruby
sjkaliski has joined #ruby
jerius_ has joined #ruby
huttan_ has joined #ruby
relixx_ has joined #ruby
Morkel_ has joined #ruby
<whitequark> jokke: you're fairly unlikely to find much people, if any, with in-depth cache knowledge here
bricker`1way has joined #ruby
arietis has joined #ruby
nwertman has quit [Read error: Connection reset by peer]
hybris has joined #ruby
blacktul_ has joined #ruby
io_syl has quit [Ping timeout: 240 seconds]
Goles_ has quit [Ping timeout: 276 seconds]
alanp_ has joined #ruby
<RubyPanther> faisal_khan: don't PM people. No need to apologize because I put your IP on ignore and won't hear you.
djdarkbeat__ has joined #ruby
binaryplease has quit [Quit: WeeChat 0.4.0]
swex has joined #ruby
<lectrick> I need a job where they pay me to try crazy ruby shit all day
nomenkun has joined #ruby
volte_ has joined #ruby
krawchyk has quit [Remote host closed the connection]
<RubyPanther> lectrick: one word, "residuals"
dougireton has joined #ruby
graft__ has joined #ruby
sanukcm has quit [Quit: Leaving]
faisal_khan has left #ruby [#ruby]
ner0x has quit [Quit: Leaving]
ben225 has joined #ruby
jblack_ has joined #ruby
io_syl has joined #ruby
Banistergalaxy has quit [Ping timeout: 264 seconds]
TheFuzzb_ has joined #ruby
icole has joined #ruby
nwertman has joined #ruby
whowantstolivef1 has joined #ruby
nat2610 has quit [Ping timeout: 276 seconds]
swex has quit [Read error: Connection reset by peer]
banister_ has joined #ruby
<RubyPanther> benlieb: most of the times when you have an error talking about SSL when you did some http method it means your SSL lib didn't compile correctly, but actually you didn't include the full error so that was my one dart at the board :)
sjkaliski has quit [Quit: Linkinus - http://linkinus.com]
sjkaliski has joined #ruby
bricker`2way has joined #ruby
sjkaliski has quit [Client Quit]
zommi has left #ruby [#ruby]
chussenot has joined #ruby
Morkel has quit [*.net *.split]
bricker`away has quit [*.net *.split]
banisterfiend has quit [*.net *.split]
benlieb has quit [*.net *.split]
albakry has quit [*.net *.split]
relixx has quit [*.net *.split]
swex_ has quit [*.net *.split]
ChampS666 has quit [*.net *.split]
volte has quit [*.net *.split]
jblack has quit [*.net *.split]
djdarkbeat has quit [*.net *.split]
nateberkopec has quit [*.net *.split]
hck89 has quit [*.net *.split]
huttan has quit [*.net *.split]
beneggett has quit [*.net *.split]
v0n has quit [*.net *.split]
jerius has quit [*.net *.split]
m8 has quit [*.net *.split]
TheFuzzball has quit [*.net *.split]
blacktulip has quit [*.net *.split]
graft has quit [*.net *.split]
radic has quit [*.net *.split]
alanp has quit [*.net *.split]
bricker has quit [*.net *.split]
Morkel_ is now known as Morkel
jerius_ is now known as jerius
relixx_ is now known as relixx
benlieb_ is now known as benlieb
TheFuzzb_ is now known as TheFuzzball
djdarkbeat__ is now known as djdarkbeat
hck89 has joined #ruby
<RubyPanther> there is still a bit of coupling between http and https code, it can get painful. Like a small pebble in the shoe.
samphippen has joined #ruby
interactionjaxsn has joined #ruby
<jokke> whitequark: yeah.. :/
gyre007 has quit [Remote host closed the connection]
jaequery has quit [Quit: Computer has gone to sleep.]
jean-louis has joined #ruby
hck89 has quit [Read error: Connection reset by peer]
bricker`1way has quit [Ping timeout: 245 seconds]
bean__ has joined #ruby
<benlieb> RubyPanther: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B
gnarmis has joined #ruby
samphippen has quit [Client Quit]
<benlieb> RubyPanther: i don't know much about this, but is there a reason changing from 1.8.7 to 1.9.2 would affect this line of code?
m3pow has quit [Ping timeout: 240 seconds]
techlife has quit [Ping timeout: 272 seconds]
zph has quit [Quit: Computer has gone to sleep.]
cobragoat has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
radic has joined #ruby
albakry has joined #ruby
ChampS666 has joined #ruby
albakry has quit [Changing host]
albakry has joined #ruby
alexim has joined #ruby
Banistergalaxy has joined #ruby
jaequery has joined #ruby
graft__ has quit [Ping timeout: 256 seconds]
RagingDave has quit [Quit: Ex-Chat]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
<benlieb> RubyPanther: it's line 12 here throwing the error: https://gist.github.com/4637275
v0n has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
jean-louis has quit [Ping timeout: 264 seconds]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
nat2610 has joined #ruby
Coolhand|laptop has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
Myconix has quit [Quit: Rebooting]
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
osaut has joined #ruby
techlife has joined #ruby
techlife has quit [Max SendQ exceeded]
DatumDrop has quit [Remote host closed the connection]
wmoxam has joined #ruby
techlife has joined #ruby
Spillrag has joined #ruby
dougireton has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
faisal_khan has joined #ruby
kpshek has quit []
arturaz has joined #ruby
<benlieb> RubyPanther: in case you care, I had to add this in ruby 1.9.2: http.verify_mode = OpenSSL::SSL::VERIFY_NONE
thomsch_ has joined #ruby
nateberkopec has joined #ruby
alv-r- has quit [Quit: Konversation terminated!]
kpshek has joined #ruby
kpshek has quit [Client Quit]
kidoz has joined #ruby
faisal_khan has left #ruby [#ruby]
aaronmacy has joined #ruby
thomsch has quit [Ping timeout: 252 seconds]
kpshek has joined #ruby
zph has joined #ruby
timonv_ has joined #ruby
kpshek has quit [Client Quit]
relixx has quit [Quit: relixx]
timonv has quit [Read error: Connection reset by peer]
thomsch_ has quit [Ping timeout: 255 seconds]
m3pow has joined #ruby
jtharris has quit [Quit: WeeChat 0.3.9.2]
alexim has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
cableray has joined #ruby
braoru has quit [Ping timeout: 245 seconds]
carloslopes has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 264 seconds]
jaequery has quit [Quit: Computer has gone to sleep.]
<shevy> RubyPanther let's have sex
<shevy> benlieb you got openssl + ruby to work?
<shevy> I am still trying to find out how to enable a ruby irc bot with openssl enabled...
thomsch has joined #ruby
squidBits has joined #ruby
etcetera has quit []
nat2610 has quit [Quit: Leaving.]
iamjarvo1 has quit [Quit: Leaving.]
kpshek has joined #ruby
Goles has quit [Ping timeout: 252 seconds]
<libryder> how do you go from propositioning sex to openssl?
etcetera has joined #ruby
undersc0re97 has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
jrist-afk is now known as jrist
kirun has joined #ruby
Spillrag has quit [Ping timeout: 276 seconds]
Goles has joined #ruby
ben225 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<whitequark> libryder: I believe that went other way around
dougireton has joined #ruby
rupee has joined #ruby
Goles has quit [Max SendQ exceeded]
Zolo has quit [Remote host closed the connection]
<RubyPanther> shevy: is the bot in question open source?
Goles has joined #ruby
nimred has quit [Quit: leaving]
sailias has quit [Quit: Leaving.]
BulleTime has joined #ruby
jaequery has joined #ruby
DatumDrop has joined #ruby
<shevy> RubyPanther well it is actually only one .rb file so far ... I somehow broke my old bot, tried to make a new one, failed at that, lost fun, started again with a minimal bot-like code... here is the incomplete code so far http://pastie.org/5861396 - notice that at line 72, if @use_openssl, I commented out the openssl stuff... I never got it working yet :(
<shevy> libryder a mix of male programmer. male -> interested in sex, programmer -> interested in code. it's logical!
<RubyPanther> poor little bot
<shevy> I blame it all on ruby's awful documentation
failshell has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
<shevy> or rather
<shevy> the documentation of ruby code that is not often used
sambio has quit [Ping timeout: 276 seconds]
<shevy> documentation of array hash string etc... is ok
bradhe has joined #ruby
jaequery has quit [Client Quit]
undersc0re97 has joined #ruby
uris has quit [Ping timeout: 264 seconds]
robotmay has quit [Remote host closed the connection]
rovalent has joined #ruby
osaut has quit [Quit: osaut]
alanp_ is now known as alanp
dougireton has quit [Quit: Leaving.]
cnrk has quit [Ping timeout: 245 seconds]
kirun_ has joined #ruby
sepp2k1 has quit [Remote host closed the connection]
grzywacz has quit [Quit: :wq]
rovalent has quit [Quit: Linkinus - http://linkinus.com]
spider-mario has joined #ruby
sepp2k has joined #ruby
kirun has quit [Ping timeout: 264 seconds]
tommyvyo has joined #ruby
DatumDrop has quit [Remote host closed the connection]
lunchdump has joined #ruby
d2dchat has joined #ruby
louisror has joined #ruby
zigomir has quit [Quit: zigomir]
iamjarvo has joined #ruby
pcarrier has joined #ruby
ChampS666 has quit [Ping timeout: 252 seconds]
__class__ has quit [Read error: Connection reset by peer]
geekbri has quit [Remote host closed the connection]
replicant has joined #ruby
aaronmacy has quit [Quit: Leaving.]
aherron has quit [Quit: leaving]
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<RubyPanther> shevy: you have to change ports to use SSL, for freenode it is 7070 I think
tommyvyo[cloud]_ has quit []
Guest56687 is now known as DaZ
<RubyPanther> poor little bot, trying to stick its data in the wrong port
replicant has left #ruby ["WeeChat 0.4.0"]
icole has quit [Remote host closed the connection]
DatumDrop has joined #ruby
MattRB has joined #ruby
ChampS666 has joined #ruby
albakry has quit [Quit: Leaving]
<RubyPanther> http://freenode.net/irc_servers.shtml there are 3 SSL ports actually
* Hanmac is not making "wrong hole" jokes :P
plotter has joined #ruby
Beoran_ has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
gnarmis has quit [Remote host closed the connection]
bricker`away has joined #ruby
kidoz has quit [Remote host closed the connection]
Takehiro has joined #ruby
jaequery has joined #ruby
cearls has joined #ruby
Beoran__ has quit [Ping timeout: 255 seconds]
bricker`2way has quit [Ping timeout: 252 seconds]
plotter has quit [Remote host closed the connection]
jackyalcine has joined #ruby
bricker`away has quit [Ping timeout: 256 seconds]
mrdtt has quit [Quit: mrdtt]
bricker`away has joined #ruby
Takehiro has quit [Ping timeout: 244 seconds]
bradhe has quit [Remote host closed the connection]
jackyalcine has quit [Read error: Connection reset by peer]
jackyalcine has joined #ruby
kn330 has quit [Quit: Ex-Chat]
lunchdump is now known as lunchdump-away
saltcod has quit [Quit: saltcod]
Goles has quit [Quit: Computer has gone to sleep.]
carloslopes has joined #ruby
ManAmongHippos has joined #ruby
lunchdump-away has quit [Read error: Connection reset by peer]
colonolGron has quit [Ping timeout: 255 seconds]
beiter has quit [Quit: beiter]
AndChat| has joined #ruby
Dreamer3 has joined #ruby
geekbri has joined #ruby
dougireton has joined #ruby
maletor has joined #ruby
plotter has joined #ruby
yalue has quit [Read error: Connection reset by peer]
Banistergalaxy has quit [Ping timeout: 256 seconds]
beiter has joined #ruby
beaky has quit [Ping timeout: 245 seconds]
kirun__ has joined #ruby
whowantstolivef1 has quit [Quit: good night people! time to get bed]
icole has joined #ruby
sambio has joined #ruby
saltcod has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
colonolGron has joined #ruby
aaronmacy has joined #ruby
peregrine81 has joined #ruby
jtharris has joined #ruby
kirun__ has quit [Client Quit]
kirun_ has quit [Ping timeout: 252 seconds]
jtgiri_ has quit [Quit: jtgiri_]
beiter has quit [Client Quit]
tvw has quit [Remote host closed the connection]
Zolo has joined #ruby
Xeago has quit [Remote host closed the connection]
yacks has quit [Read error: Connection reset by peer]
beiter has joined #ruby
dougireton has quit [Ping timeout: 248 seconds]
etcetera has quit []
kpshek has quit []
Zolo has quit [Remote host closed the connection]
benlieb has joined #ruby
etcetera has joined #ruby
jaygen_ has quit [Read error: Operation timed out]
beaky has joined #ruby
angusiguess has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
sambio has quit []
br4ndon has joined #ruby
kpshek has joined #ruby
mikeg has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
aaronmacy has quit [Quit: Leaving.]
Agis__ has joined #ruby
dmiller has joined #ruby
<mikeg> is there no "rackdown" operation? I have an app started with "rackup". is the only way to stop it to kill it?
beiter has quit [Quit: beiter]
atno has quit [Ping timeout: 255 seconds]
asym_ has joined #ruby
samphippen has joined #ruby
pyx has joined #ruby
asym has quit [Ping timeout: 264 seconds]
ruzu has joined #ruby
AlSquirrel has joined #ruby
Dann1 has joined #ruby
<workmad3> mikeg: well... yeah
<Dann1> >> Dir['res/*.rb'].select { |rb| require_relative rb}
<eval-in> Dann1: Output: "" (http://eval.in/7527)
nat2610 has joined #ruby
rmartin has quit [Ping timeout: 264 seconds]
AlSquirikou has quit [Read error: Connection reset by peer]
<whitequark> >> p Dir['*']
<eval-in> whitequark: Output: "[\"input-21096bfaac32\", \"source-21096bfaac32\", \"output-21096bfaac32\"]\n" (http://eval.in/7528)
<whitequark> >> Dir['*'].each &File.method(:unlink)
<whitequark> >> p 1
<eval-in> whitequark: Output: "1\n" (http://eval.in/7529)
<shevy> RubyPanther aha interesting, will try that, thanks
answer_42 has quit [Ping timeout: 276 seconds]
ryanf has joined #ruby
<jokke> hi! i just realized, that when i do something like this: array = Array.new(10) and then array.fill Array.new(4) it fills the array with the same instance that comes out of Array.new(4)
<jokke> how can i fill it with unique instances?
MattRB has quit [Quit: This computer has gone to sleep]
<jokke> only with a loop?
<whitequark> jokke: array.fill { Array.new(4) }
RORgasm has quit [Remote host closed the connection]
<mikeg> ok. guess rackup was just to run it in the foreground. starting/stopping nginx is how you start/stop the app. makes perfect sense if you have no sense
<mikeg> </rant>
martinklepsch has quit [Ping timeout: 276 seconds]
zph has quit [Quit: Computer has gone to sleep.]
jaygen has joined #ruby
reset has joined #ruby
<RubyPanther> (or if you read the manual)
<ruzu> does the nginx process own appserver processes?
<whitequark> with passenger, yes
* whitequark uses thin+proxy_pass
<jokke> whitequark: thanks!
d2dchat has quit [Remote host closed the connection]
bricker_ is now known as bricker
axl_ has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
miskander has joined #ruby
DaltonUS has joined #ruby
<beaky> i love ruby
<Dann1> hey guys
<Dann1> if I have a method like
<shevy> beaky ARE YOU USING IT
<Dann1> def thing
<Dann1> stuff
vlad_starkov has quit [Remote host closed the connection]
<Dann1> end
<beaky> i am
gnarmis has joined #ruby
<shevy> Dann1 that is a good method
<beaky> for writing a simple web application
<shevy> you did well there
<Dann1> what is the easy way to make it on a one line
clooth has quit [Quit: clooth]
<whitequark> Dann1: ;
<Spooner> Dann1, def thing; stuff end
<Dann1> def thing; something; end?
<whitequark> but that is not good style
<shevy> you could also use this:
clooth has joined #ruby
<shevy> define_method(:thing) { stuff }
dr_neek has quit [Quit: dr_neek]
<shevy> but please don't do that
<shevy> every time someone uses define_method, someone else has to slay one kitten
dougireton has joined #ruby
<Dann1> Well
<Dann1> Uhm
* beaky slays a kitten
<shevy> :(
F1skr has quit [Quit: WeeChat 0.4.0]
<Dann1> I don't think I want to use Ruby anyomere then
bradhe has joined #ruby
<shevy> I use def foo; puts 'hi'; end sometimes <--- on one line
atmosx has joined #ruby
<shevy> lol
<shevy> why, you can just avoid define_method
<beaky> write elegant ruby
<shevy> unless you want to use META MAGIC ruby
miskander has left #ruby [#ruby]
<shevy> eval {eval {eval {eval {eval {self.send :define_method(eval("0/0")}}}}}
toekutr has joined #ruby
<Dann1> I do not want to be associated with a programming language that is agressive thorwards kittens
<shevy> lisp is nothing against that hah
<atmosx> hello
<Dann1> >> eval {eval {eval {eval {eval {self.send :define_method(eval("0/0")}}}}}
<eval-in> Dann1: Output: "/tmp/execpad-1f8d5da8e546/source-1f8d5da8e546:1: syntax error, unexpected '(', expecting '}'\n...eval {self.send :define_method(eval(\"0/0\")}}}}}\n... ^\n" (http://eval.in/7530)
<shevy> Dann1 yuo can use the peaceful part of ruby
<Mon_Ouie> There's nothing wrong with using semi-colons for very short methods
<banister_> Dann1: def thing() stuff end
<Dann1> eval {eval {eval {eval {eval {self.send :define_method(eval("0/0"))}}}}}
<shevy> hey atmosx anymore exams passed?
<atmosx> yeah
<banister_> (no semi-colons needed)
<atmosx> Human Moprhology
<Dann1> ..okay
<atmosx> thank God I knew some things about the ovary and menstrual circle
<shevy> hahaha
<atmosx> and Analytical Chemistry, I hate HNMR but I had only theory in my test… the graphs were all IR so I was a bit lucky
interactionjaxsn has quit [Remote host closed the connection]
clooth has quit [Ping timeout: 245 seconds]
<atmosx> now I have another 5 exams
miskander has joined #ruby
<atmosx> till february 15th to pass
chussenot has quit [Quit: chussenot]
havenn has quit [Remote host closed the connection]
<atmosx> shevy: how are you doing?
BulleTime has quit [Ping timeout: 252 seconds]
phinfonet has joined #ruby
mmitchell has quit [Remote host closed the connection]
BulleTime has joined #ruby
havenn has joined #ruby
<Dann1> >> Dir['*.rb'].select { |rb| require_relative rb}
<eval-in> Dann1: Output: "" (http://eval.in/7531)
<Dann1> >> File.create("d.rb")
<eval-in> Dann1: Output: "/tmp/execpad-9dc10518d550/source-9dc10518d550:1:in `<main>': undefined method `create' for File:Class (NoMethodError)\n" (http://eval.in/7532)
<Dann1> goddamn
interactionjaxsn has joined #ruby
kiwnix has joined #ruby
aknagi has quit [Remote host closed the connection]
snearch has quit [Quit: Verlassend]
Xorlogosh has quit [Remote host closed the connection]
<atmosx> I'd never do that. Looks so ugly to me eyes
<shevy> atmosx quite fine I think, a bit stressed. having to read lots of shit, actually I am considering shutting off IRC for a while, problem is ... would I come back when I do? hmmm
<ruzu> >> puts 'i love pie'
<eval-in> ruzu: Output: "i love pie\n" (http://eval.in/7533)
<atmosx> shevy: is IRC so distracting? :-)
<atmosx> I thought facebook was distracting at that level not IRC
<shevy> atmosx not really but it's still time spent, i.e. typing or reading
<atmosx> I see
<shevy> 90% of the time I idle anyway
swex has joined #ruby
<atmosx> hm
dougireton has quit [Ping timeout: 276 seconds]
<Dann1> Halp? http://eval.in/7534
poikon has quit [Remote host closed the connection]
<Dann1> Nevermind
<Dann1> Missing 'end'
poikon has joined #ruby
TomyLobo has joined #ruby
<Dann1> Mmmhm
<Dann1> What is the pretty way of doing an Object?
<Dann1> Like, table = Object.new
<Dann1> table.name = "table dude"
<Dann1> def table.break
<Dann1> puts "ouch"
<Dann1> end
JumpMast3r has quit [Quit: JumpMast3r]
jackyalcine has quit [Quit: Quit]
jackyalcine_ has joined #ruby
jackyalcine_ has quit [Changing host]
jackyalcine_ has joined #ruby
<atmosx> Dann1: yoy mean change the state of an object or add a method to it?
djdarkbeat has quit [Quit: djdarkbeat]
<Dann1> Yes
<atmosx> actually should be the state of the instance of an object
poikon has quit [Read error: Connection reset by peer]
poikon_ has joined #ruby
<shevy> Dann1 you can add methods to your objects all the time
<atmosx> First example yes. For the second I'd use modules
<atmosx> Never occured me to need to add a method to an existing build-in class but as shevy said it's pretty easy.
<shevy> Dann1 but if you want to use Object, it seems as if you want to use a prototypic inheritance model
<Dann1> I want to simplify this into an Object
<shevy> atmosx yeah I dont think people regularly need to extend things that way
<Dann1> Nothing too fidgety
<shevy> Dann1 you could try Struct or OpenStruct
nga4 has quit [Ping timeout: 240 seconds]
<shevy> x = Struct.new(:a,:b).new(1,2).values # => [1, 2]
<Dann1> sigh
<Dann1> Fine
dmiller has quit [Ping timeout: 276 seconds]
swex has quit [Remote host closed the connection]
<Dann1> Wait
<Dann1> No
mikeg has quit [Quit: Leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
<dominikh> breakingthings: https://github.com/cinchrb/cinch/commit/3ac1b836cdc23d2b6e1971def183e717b7e4d2dd this is why we use BufferedIO, and yeah it's deprecated and I guess we should get rid of it
<breakingthings> oh, hello mister cinch
<shevy> Dann1 always get a clear picture in your mind of what you want to do, eventually the ruby code you will need to achieve it comes into existances on its own
* Dann1 rushes into his mancave and takes a note
emocakes has quit [Quit: emocakes]
<breakingthings> dominikh: though I'm not sure I understand the why behind those changes…
<Dann1> Can I define to variables to the same value with d
chrisbolton has quit [Quit: chrisbolton]
<dominikh> breakingthings: to be honest: that commit is 2 years old, I didn't write it, I just checked at the time that it made sense. Right now I am as clueless as you why it's in there. All I know is that it handles read timeouts properly :P
<breakingthings> (Not that I uh, disagree, just that I don't understand because of lack of experience)
<Dann1> vr1 & vr2 = 'value'
<breakingthings> hmm
<breakingthings> alright
<dominikh> it did fix an issue with not detecting read timeouts
<dominikh> but yeah, 2 years old etc
<breakingthings> yeah
<havenn> a = b = 0
<breakingthings> thanks for letting me know though, that's pretty cool of you
<breakingthings> :)
<Dann1> Thanks havenn
<breakingthings> And, y'know, the usual thanks for being open source so I can learn by example
<dominikh> would've let you known earlier, but I didn't see the highlight till now
<breakingthings> Ah, that's alright, I didn't even know you frequented this channel
<dominikh> mostly passively :)
<dominikh> for reasons like this :P
<breakingthings> heh
<dominikh> and you're welcome
dougireton has joined #ruby
thone_ has joined #ruby
<Dann1> Mmm
ChampS666 has quit [Ping timeout: 252 seconds]
jaygen has quit [Remote host closed the connection]
<Dann1> Is there any sort of constructor for the object class?
freakazoid0223 has quit [Quit: Leaving]
<Dann1> Like the javascript constructor, maybe
__BigO__ has quit [Remote host closed the connection]
<dominikh> Object.new ?
<dominikh> what are you trying to do?
vlad_starkov has joined #ruby
geekbri has quit [Remote host closed the connection]
emocakes has joined #ruby
Agis__ has quit [Quit: Agis__]
horofox has quit [Quit: horofox]
puff has joined #ruby
thone has quit [Ping timeout: 264 seconds]
<puff> Hey there... I've been working on this little android app that has a web server part. I cobbled together something super-crude out of php and was just looking at rewriting it as a real webapp, for which I was considering getting bogged down in a PHP framework... when I suddenly realized, this is good opportunity to learn ruby!
<puff> (Since it's a fairly simple web app)
<Mon_Ouie> You can't just add attributes to aribtrary objects, you need accessors defined in their class
<dominikh> Dann1: you could use OpenStruct, but it'd be cleaner to have appropriate classes (even if they're just Structs [not OpenStructs])
<Mon_Ouie> Or that
<puff> Can somebody recommend a good tutorial that's up to date and has a little bit more than a toy example? basically something like walking through creating a full blog or forum app.
ChampS666 has joined #ruby
GlenK has joined #ruby
dougireton has quit [Quit: Leaving.]
Anderson has quit [Read error: Connection reset by peer]
<GlenK> so here's my errors: http://fpaste.org/rPOS/ And here's my code: http://fpaste.org/K7o5/
<GlenK> I suppose I'm passing functions wrong or something?
nomenkun has quit [Remote host closed the connection]
<GlenK> or am I mistaken that I'm even allowed to do something like that?
<atmosx> shit
<Mon_Ouie> You can't just pass functions (or really, methods) like that
arturaz has quit [Remote host closed the connection]
cearls has quit [Remote host closed the connection]
Anderson has joined #ruby
<Mon_Ouie> identity is interpreted as a call to the identity function with no arguments
Rym has quit [Quit: Rym]
icole has quit [Remote host closed the connection]
<Mon_Ouie> You can use lambda
bradhe has quit [Remote host closed the connection]
<Mon_Ouie> You can use lambda and the block syntax for higher order functions
bradhe has joined #ruby
nga4 has joined #ruby
nga4 has quit [Client Quit]
<GlenK> ok, I'll have to research that. thanks.
__BigO__ has joined #ruby
nga4 has joined #ruby
ManAmongHippos has quit [Quit: ManAmongHippos]
aquaranto has quit [Remote host closed the connection]
<Mon_Ouie> Any reason you're (I'm assuming) rewriting SICP examples in Ruby?
carloslopes has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 255 seconds]
<GlenK> Mon_Ouie: exercises. and since I'm doing it in scheme, I figure I might as well do it in ruby at the same time.
dougireton has joined #ruby
<GlenK> to practice
ner0x has joined #ruby
<Mon_Ouie> The thing is that you Scheme and Ruby are vastly different, transliterating code from one of them to the other is usually not a good idea
dougireton has quit [Client Quit]
louisror has quit [Ping timeout: 255 seconds]
poikon_ has quit [Remote host closed the connection]
kpshek has quit []
poikon has joined #ruby
mergoth has quit [Ping timeout: 245 seconds]
atmosx has quit [Quit: And so the story goes…]
ChampS666 has quit []
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<mikekelly> If I define a class that inherits from SimpleDelegator, self resolves to nil within the initializer.. is that normal ?
<Dann1> >> Dir[*]
<eval-in> Dann1: Output: "/tmp/execpad-08856aa8f86a/source-08856aa8f86a:1: syntax error, unexpected ']'\nDir[*]\n ^\n" (http://eval.in/7538)
poikon has quit [Ping timeout: 276 seconds]
<Mon_Ouie> It's not nil, self.class is Bar
<Mon_Ouie> It's just delegating most methods, inluding inspect, to nil
<Mon_Ouie> Because you didn't tell it what object to delegate methods to
tvw has joined #ruby
dmiller has joined #ruby
<mikekelly> so `self` is proxied too ?
dougireton has joined #ruby
Morkel has quit [Quit: Morkel]
<Mon_Ouie> No, self is not a method. inspect is proxied to nil, which is why puts self.inspect displays nil
djdarkbeat has joined #ruby
DaltonUS has quit [Quit: DaltonUS]
<mikekelly> oh, my brain is broken
<mikekelly> I should not code after beer
jaequery has quit [Quit: Computer has gone to sleep.]
<mikekelly> thank Mon_Ouie
<mikekelly> :)
<Mon_Ouie> np ;)
<mikekelly> wow.
<mikekelly> :)
generalissimo has joined #ruby
mmitchell has joined #ruby
chrismhough_ has joined #ruby
bradhe has quit [Remote host closed the connection]
blacktul_ has quit [Remote host closed the connection]
<Dann1> Fo
chrismhough_ has quit [Client Quit]
chrismhough has quit [Ping timeout: 255 seconds]
iamjarvo has quit [Quit: Leaving.]
chrismhough has joined #ruby
jtgiri_ has joined #ruby
<Dann1> Hey, how was eval-in put into #ruby?
banjara has joined #ruby
kpshek has joined #ruby
_nitti has joined #ruby
<Mon_Ouie> charliesome wrote it and put it in here
yfeldblum has quit [Ping timeout: 248 seconds]
AndChat| has quit [Ping timeout: 252 seconds]
dougireton1 has joined #ruby
heyitsdave has quit [Ping timeout: 244 seconds]
gregor3005 has left #ruby [#ruby]
dougireton has quit [Ping timeout: 255 seconds]
cakehero has joined #ruby
_nitti_ has quit [Ping timeout: 252 seconds]
w400z has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
dmiller has quit [Read error: Connection reset by peer]
dmiller has joined #ruby
preller has quit [Quit: leaving]
preller has joined #ruby
preller has quit [Changing host]
preller has joined #ruby
dr_neek has joined #ruby
segv- has quit [Quit: segv-]
atno has joined #ruby
jrafanie has quit [Quit: jrafanie]
havenn has quit [Remote host closed the connection]
Anderson has quit [Quit: Leaving]
Chryson has joined #ruby
angusiguess has quit [Ping timeout: 248 seconds]
arya has quit []
froy has quit [Quit: kablam!]
jjbohn is now known as jjbohn|afk
v0n has quit [Ping timeout: 248 seconds]
andrewhl has quit [Remote host closed the connection]
michaelmartinez has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
kiwnix has quit [Remote host closed the connection]
mrsolo has joined #ruby
miskander has quit [Quit: miskander]
kirun has joined #ruby
noxoc has joined #ruby
asobrasil has left #ruby [#ruby]
codezombie has joined #ruby
codezombie is now known as codezombie|away
noxoc has quit [Client Quit]
noxoc has joined #ruby
t4nkd has joined #ruby
codezombie|away is now known as codezombie
stopbit has quit [Quit: Leaving]
tenmilestereo has quit [Quit: Leaving]
stat1x has quit []
caleb_io has joined #ruby
danshultz has quit [Remote host closed the connection]
havenn has joined #ruby
yfeldblum has joined #ruby
mjolk has quit [Quit: leaving]
kirun_ has joined #ruby
jtgiri_ has quit [Read error: Connection reset by peer]
fabionl has joined #ruby
jtgiri_ has joined #ruby
kirun has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
ahokaomaeha has joined #ruby
breakingthings has quit []
hadees has quit [Quit: hadees]
jjbohn|afk is now known as jjbohn
joshman_ has quit [Ping timeout: 252 seconds]
jtharris has quit [Quit: WeeChat 0.3.9.2]
caleb_io has quit [Quit: caleb_io]
blueOxigen has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 256 seconds]
jjbohn has quit [Quit: Leaving...]
alanp has quit [Read error: Connection reset by peer]
RagingDave has joined #ruby
SCommette has quit [Quit: SCommette]
jimeh has joined #ruby
zph has joined #ruby
<ruzu> an irc bot listening to the chan that passes text to an api (or possibly manipulating the page).....presumably
peregrine81 has quit [Quit: Computer sleeping.]
zph has quit [Client Quit]
griffindy has quit [Quit: Computer has gone to sleep.]
stayarrr has quit [Quit: Linkinus - http://linkinus.com]
colonolGron has quit [Quit: Lost terminal]
alanp has joined #ruby
michaelmartinez has left #ruby [#ruby]
GlenK has quit [Quit: leaving]
tvw has quit [Remote host closed the connection]
gnarmis has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
icole has joined #ruby
peregrine81 has joined #ruby
elux has quit [Ping timeout: 264 seconds]
Iszak has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
philcrissman has quit [Remote host closed the connection]
locriani has joined #ruby
peregrine81 has quit [Client Quit]
zigomir_ has joined #ruby
zph has joined #ruby
zigomir_ has quit [Client Quit]
workmad3 has joined #ruby
Umren has quit [Ping timeout: 240 seconds]
gnarmis has joined #ruby
Takehiro has joined #ruby
enebo has quit [Quit: enebo]
Dann1 has quit [Quit: GODDAMNIT]
enebo has joined #ruby
enebo has quit [Client Quit]
dustint has quit [Quit: Leaving]
jgarvey has quit [Quit: Leaving]
zph has quit [Quit: Computer has gone to sleep.]
stkowski has quit [Quit: stkowski]
EPIK has joined #ruby
enebo has joined #ruby
<puff> Hm, I'm on ubuntu, my server is debian, should I install rails via apt or via gems?
<puff> Hm, looks like ubuntu's latest rails is 2.3, debian's latest rails is 1.8!
Takehiro has quit [Ping timeout: 248 seconds]
solidoodlesuppor has quit [Quit: ChatZilla 0.9.89 [Firefox 18.0.1/20130116073211]]
carloslopes has joined #ruby
<ruzu> never use package managers for rails imo
<puff> This tutorial looks like what I want, what do folks think of the quality/accuracy? http://www.roberthuberdeau.com/articles/4-How-to-create-a-blog-in-Ruby-on-Rails-3
<puff> ruzu: Yeah, well I guess I'll have to use gems, unless I want to develop with 1.8.
<puff> speaking of which, is rails 3 in the mainstream now or is it bleeding edge?
__BigO__ has quit [Remote host closed the connection]
<puff> (I have enough problems with my own bugs, I don't need to borrow other people's bugs).
workmad3 has quit [Ping timeout: 246 seconds]
<ruzu> a couple years in internet time is ancient :p
<puff> Hm, looks like I'll have to start by finding another tutorial about installnig rails.
<ruzu> "gem install rails" generally works :P
AlSquirikou has joined #ruby
AlSquirrel has quit [Read error: Connection reset by peer]
_nitti has quit [Remote host closed the connection]
<ruzu> although if you follow a tutorial from 2010 (presumably a 3.0 tutorial) it might be useful to use a Gemfile + bundler (ie bundle install & bundle exec) so that you can follow the tutorial without versioning hiccups
<puff> hm, looks like ubuntu's got ruby 1.9.3p0, debian's latest is 1.9.2... although installing it appaers to default to 1.8..
carloslopes has quit [Ping timeout: 256 seconds]
kenneth has quit [Ping timeout: 244 seconds]
<puff> Any major issues there?
mercwithamouth has quit [Ping timeout: 255 seconds]
cevarief has joined #ruby
<puff> That is, are there any major known "no no, you MUST run rails 3 on 1.9 etc" problems?
<puff> I vaguely recall rails 2.3 had some issue like that.
<ruzu> don't think so
kenneth has joined #ruby
danshultz has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
forced_request has joined #ruby
_nitti has joined #ruby
etcetera has quit []
zph has joined #ruby
ortuna has joined #ruby
mengu has joined #ruby
kpshek has quit []
pavilionXP has joined #ruby
jerius has quit [Read error: Operation timed out]
djdarkbeat has quit [Quit: djdarkbeat]
froy has joined #ruby
kirun_ has quit [Ping timeout: 276 seconds]
dougireton1 has left #ruby [#ruby]
etcetera has joined #ruby
<X-Jester> can anyone explain the purpose of gecode, and why it might be used by gems?
bradhe has joined #ruby
ortuna has left #ruby [#ruby]
angusiguess has joined #ruby
ortuna has joined #ruby
hadees has joined #ruby
noxoc has quit [Quit: noxoc]
danshultz has quit [Ping timeout: 276 seconds]
warb0 has joined #ruby
<greenarrow> Ìû
zph has quit [Quit: Computer has gone to sleep.]
samphippen has joined #ruby
yoshie902a has joined #ruby
h4mz1d has joined #ruby
<puff> Got an error installing rails via gem: https://gist.github.com/54d0e9ca083e4a74f854
<yoshie902a> Does anyone know of a gem that can clean HTML and replace all inline style with CSS?
bradhe has quit [Ping timeout: 256 seconds]
Targen has quit [Ping timeout: 245 seconds]
apok has quit [Quit: apok]
DaZ has quit [Read error: Operation timed out]
_nitti has quit [Remote host closed the connection]
frem has quit [Read error: Operation timed out]
<puff> yoshie902a: I have no knowledge of the ruby world but I doubt it exists.
<puff> yoshie902a: I wanted to code such a thing, many years ago :-0.
dougireton has joined #ruby
<ortuna> puff: you probably need the dev packages
Guest48531 has joined #ruby
<Guest48531> so rake is the maven for ruby, right?
<spider-mario> more like gradle, possibly
<ortuna> Maven has a lot of extra things that rake doesn't have.
<puff> ortuna: Yeah, found this stackoverflow about it: http://stackoverflow.com/questions/11481097/why-does-gem-install-rails-fail
spider-mario has quit [Remote host closed the connection]
bradhe has joined #ruby
<puff> ortuna: But the ubuntu 12.0.4 repos only have ruby1.9.1-dev. Does that mean I have to downgrade to ruby 1.9.1?
<puff> ... and ruby1.9.1-dev just failed to install. Dang.
<Spooner> puff use RVM/rbenv instead. Life is easier.
dr_neek has quit [Quit: dr_neek]
<ortuna> puff: I second Spooner, RVM/rbenv and that'll set you up
main has joined #ruby
Villadelfia_ is now known as Villadelfia
Takehiro has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
<puff> Yeah, I'm getting that feeling :-).
robotmay has joined #ruby
<puff> okay, which one, RVM or rbenv?
DatumDrop has quit [Remote host closed the connection]
<ortuna> puff: I prefer RVM, but I couldn't give you an argument against rbenv, haven't used it extensively
enebo has quit [Quit: enebo]
<Spooner> I use rbenv, after having mixed success with RVM.
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
<ortuna> Spooner: excellent, might give rbenv a try on a VM, compare the difficulty & benefits for myself
<Spooner> Oops, that was supposed to be @ puff.
Tarential has quit [Excess Flood]
Tarential has joined #ruby
h4mz1d has quit [Ping timeout: 256 seconds]
apok has joined #ruby
plotter has quit [Read error: Operation timed out]
BulleTime has quit [Ping timeout: 256 seconds]
jjbohn has joined #ruby
plotter has joined #ruby
zigomir has joined #ruby
Guest88595 has joined #ruby
axl_ has quit [Quit: axl_]
<puff> ortuna, Spooner, thanks.
h4mz1d has joined #ruby
slainer68 has joined #ruby
pcarrier has quit [Read error: Connection reset by peer]
sepp2k has quit [Read error: Connection reset by peer]
<Spooner> puff Ultimately, the do the same thing. If you try one and have problems, just try the other.
BulleTime has joined #ruby
sepp2k has joined #ruby
dr_neek has joined #ruby
jackyalcine_ has quit [Read error: Connection reset by peer]
jackyalcine_ has joined #ruby
zigomir_ has joined #ruby
Proshot has quit [Quit: Leaving]
dr_neek has quit [Quit: dr_neek]
t4nkd has quit [Quit: Leaving...]
zigomir has quit [Ping timeout: 276 seconds]
notVert has quit [Ping timeout: 252 seconds]
jhowarth__ is now known as jhowarth