apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
jalcine has joined #ruby
DonVitoCorleone has joined #ruby
Guest66980 has joined #ruby
<Guest66980> Can i stop and start a daemon from a script like Daemon.stop or start
<Guest66980> ?
<Guest66980> please help
bradhe has quit [Remote host closed the connection]
<Guest66980> anyone?
jacktrick has joined #ruby
jalcine has quit [Excess Flood]
Davey has quit [Quit: Computer has gone to sleep.]
VegetableSpoon has quit [Quit: Leaving]
huoxito has quit [Quit: Leaving]
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jibi has quit [Quit: .]
Vivekananda has quit [Quit: Ex-Chat]
huoxito has joined #ruby
Ortuna has quit [Quit: IRC Leave]
wogan has quit [Quit: http://wogan.me]
Vivekananda has joined #ruby
justsee has joined #ruby
Mattix has quit [Quit: Leaving]
Mattix has joined #ruby
Vivekananda has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
<_helloworld_> I can't figure out why this will not read a CSV file.. http://pastebin.com/0wNmqy2u
Vivekananda has joined #ruby
<kriptik> @Guest66980 `whatever shell command that will return output`
<kriptik> `insert your shell command here `
<zendeavor> shelling out is almost universally wrong
<kriptik> @yfeldblum thnx, i don't use rails, sinatra is my the max for me, i even hate padrino
iliketurtles has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
<kriptik> @zendeavor care to explian why?
dachi has joined #ruby
<yfeldblum> kriptik, sinatra likely has layouts too
<zendeavor> he's also not looking to capture output
JimmyNeutron has joined #ruby
<popl> _helloworld_: what output do you expect? what output are you seeing?
adeponte has joined #ruby
<yfeldblum> _helloworld_, you should close the files you open
<kriptik> @kriptik, sinatra do have layouts
<_helloworld_> /Users/shaun/Ruby/event_manager/lib/event_manager.rb:4: syntax error, unexpected ':', expecting $end
<_helloworld_> contents = CSV.open "event_attendees.csv", headers: true
<_helloworld_> Is not closing it causing the issue?
jalcine has joined #ruby
<popl> yfeldblum: I'm not sure that's relevant to his problem.
<_helloworld_> I'm trying to output the "names" from the csv file
<popl> no, the error message clearly states you have a syntax error
<popl> :)
<yfeldblum> _helloworld_, that's not the issue you're seeing, but you should do it anyway
ehc has joined #ruby
<yfeldblum> _helloworld_, are you using ruby-1.8 or ruby-1.9?
<_helloworld_> 2.0
iliketurtles has quit [Client Quit]
<popl> maybe you want CSV#read
<_helloworld_> I think that syntax may be for 1.8...
<_helloworld_> popl: i'm about to give that a try now
<yfeldblum> _helloworld_, `ruby -v` confirms that?
lxsameer has quit [Quit: Leaving]
<dachi> hi all. can anyone explain please. puts 'yes' = '' if some; this throws an error, but some = '' unless some; this goes fine.
<_helloworld_> yfeldblum: yes, it does.
<yfeldblum> _helloworld_, that syntax is 1.9+ only
<yfeldblum> dachi, you can only assign to things that can be assigned to; string literals cannot be assigned to
<_helloworld_> yfeldblum: weird. It should work then
<dachi> okay thanks
dachi has quit [Client Quit]
<Guest66980> Daemons.daemonize
<Guest66980> makes my script a daemon
<Guest66980> how do i stop the daemon?
<popl> Guest66980: You haven't shown anybody any code. We don't know.
<popl> Guest66980: Maybe read the documentation for Daemons.
<popl> There are probably example implementations.
<Guest66980> sorry
emergion has joined #ruby
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
<tjbiddle> popl: Damnit popl, literally had that on my clipboard, ha
ehaliewicz has joined #ruby
cj3kim has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
dachi has joined #ruby
bradsmith has joined #ruby
<dachi> i'm sorry, i could not understand. puts 'hi' if not hi << error... hi = '' if not hi << success. why?
bradhe has joined #ruby
hamakn has quit [Ping timeout: 248 seconds]
emergion has quit [Ping timeout: 260 seconds]
bradhe has quit [Remote host closed the connection]
Lewix has joined #ruby
ziyadb__ is now known as ziyadb
<dachi> puts 'yes' unless some_var; this shows error, but some_var = '' unless some_var; this works fine .. help me understand this please
ziyadb has quit [Changing host]
ziyadb has joined #ruby
ziyadb has joined #ruby
<popl> What's the error say?
<dachi> NameError: undefined local variable or method `hi' for main:Object
obs has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 264 seconds]
bradsmith has quit [Ping timeout: 245 seconds]
<popl> dachi: think about that for a moment.
jacktrick has quit [Quit: Leaving]
marr has quit [Ping timeout: 240 seconds]
<popl> dachi: is some_var the actual identifier name you use in your code?
druonysus has joined #ruby
druonysus has joined #ruby
<dachi> popl: no
<dachi> but why assignment works then..
Lewix has quit [Ping timeout: 248 seconds]
Guest66980 has quit [Ping timeout: 276 seconds]
<popl> Without seeing your code I can only assume you are trying to check the variable without defining it first.
<popl> That's why you might get a NameError.
<dachi> i'm just playing in console. no code.
<popl> did you define hi beforehand?
smathieu has joined #ruby
<dachi> no.. let's pick another name say first_one, and second_one
Beoran_ has quit [Read error: Connection reset by peer]
Beoran__ has joined #ruby
<dachi> puts 'yes' unless first_one << error
<dachi> second_one = '' unless second_one << success
<popl> did you define first_one before that statement?
<dachi> i don't understand why one of them works and another does not
<dachi> no.
<popl> ok
<popl> you didn't define it and you're trying to check it
<dachi> yes
<popl> it's pretty straightforward :)
<dachi> i know i have to use defined? but i just wonder why this does not work
<dachi> and assignment works.
xcv has quit [Ping timeout: 264 seconds]
hamakn has joined #ruby
zachrab_ has joined #ruby
smathieu has quit [Ping timeout: 245 seconds]
Gnubie is now known as Guest34676
moos3 has joined #ruby
<dachi> ok i'll leave, tnx. i still don't understand am i dumb,, i'll ask my friend when he'll be available
dachi has quit [Quit: Page closed]
<r0bglees0n> dachi: the reason the first one works is complicated, but anytime ruby sees a local variable assignment, it assigns the variable 'nil' (before any code starts to run)
iliketurtles has joined #ruby
ehaliewicz has quit [Ping timeout: 245 seconds]
<r0bglees0n> oh well nevermin
iliketurtles has quit [Max SendQ exceeded]
miclorb has quit [Quit: miclorb]
iliketurtles has joined #ruby
lethjakm1 has joined #ruby
bradhe has joined #ruby
iliketurtles has quit [Client Quit]
davehimself has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sailias has quit [Ping timeout: 260 seconds]
asteve has joined #ruby
nathancahill has joined #ruby
<kriptik> perl 6 or ruby 2?? :)
<kriptik> perl6 vs ruby2.... GO! :D
atno has joined #ruby
Binauralman has quit [Ping timeout: 245 seconds]
brennanM_ has quit [Read error: Connection reset by peer]
wesside has quit [Quit: I think I heard an ice cream truck..]
<rickruby> if I'm going through the michael hartl tutorial for the first time, should I go through rails v3.2 or v4.0 ?
<pontiki> 4.0
atno has quit [Remote host closed the connection]
<rickruby> thanks
tkuchiki has joined #ruby
Kricir has quit [Remote host closed the connection]
wesside has joined #ruby
atno has joined #ruby
atno has quit [Remote host closed the connection]
<pontiki> rickruby: also, when you have rails questions the official irc channel is #rubyonrails :)
<rickruby> i'm lurking in there too :)
ehaliewicz has joined #ruby
JimmyNeutron has quit [Ping timeout: 256 seconds]
Davey has joined #ruby
mary5030 has joined #ruby
rodacato has joined #ruby
ravster has joined #ruby
Senjai has joined #ruby
Senjai has joined #ruby
BRMatt has quit [Ping timeout: 240 seconds]
fmcgeough has quit [Quit: fmcgeough]
Megtastique has joined #ruby
Xuerian has quit [Remote host closed the connection]
Xuerian has joined #ruby
atno has joined #ruby
sevenseacat has joined #ruby
BadQuanta has quit [Ping timeout: 240 seconds]
atno has quit [Remote host closed the connection]
<pontiki> :)
ehaliewicz has quit [Ping timeout: 264 seconds]
lemonsparrow has quit [Quit: Page closed]
Nisstyre has quit [Quit: Leaving]
machuga|away is now known as machuga
lebek has joined #ruby
pygospa has quit [Quit: leaving]
ehc has quit [Quit: ehc]
io_syl has joined #ruby
bradsmith has joined #ruby
<bnagy> popl: it was a legit question ( the assignment thing )
nari has joined #ruby
<popl> bnagy: Yes, I realized that afterwards. I thought he was asking something different.
<bnagy> :)
gstamp has quit [Read error: Connection reset by peer]
<popl> He wasn't very clear
<popl> .
kizzx2 has joined #ruby
<bnagy> puts returns nil
<bnagy> :/
aedornm has quit [Remote host closed the connection]
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SpinningWheels has joined #ruby
<popl> bnagy: you don't like that?
<Eiam> what wrong with that?
bradsmith has quit [Ping timeout: 256 seconds]
<bnagy> I don't have an opinion, just saying, that's why his assignment problem was confusing him
atno has joined #ruby
iliketurtles has joined #ruby
<bnagy> although if I did have an opinion, I'd lean towards it returning a value, but then it's a slippery slope to checking error codes for every damn thing
gstamp has joined #ruby
St_Marx has quit [Remote host closed the connection]
IceDragon has quit [Quit: Space~~~]
smathieu has joined #ruby
St_Marx has joined #ruby
ehc has joined #ruby
tommyvyo has joined #ruby
<popl> indeedy
freerobby has joined #ruby
amacgregor has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
ravster has quit [Quit: Leaving.]
amacgregor_ has joined #ruby
amacgregor__ has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
twer has joined #ruby
Domon has joined #ruby
amacgregor has quit [Ping timeout: 245 seconds]
Domon has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
lemonsparrow has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
gildo has joined #ruby
druonysus has quit [Ping timeout: 256 seconds]
gyre007 has quit [Remote host closed the connection]
bradhe has joined #ruby
atno has quit [Remote host closed the connection]
xcv has joined #ruby
jarray52 has joined #ruby
nfk has quit [Quit: yawn]
atno has joined #ruby
pygospa has joined #ruby
rodacato has quit [Remote host closed the connection]
pygospa has quit [Client Quit]
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
ciopte7 has joined #ruby
sailias has joined #ruby
Spooner has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
xcv_ has joined #ruby
xcv has quit [Read error: Connection reset by peer]
iliketurtles has quit [Ping timeout: 264 seconds]
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
xcv_ has quit [Remote host closed the connection]
druonysus has joined #ruby
Domon has joined #ruby
xpirator has joined #ruby
jfelchner has joined #ruby
iliketurtles has joined #ruby
Kricir has quit [Remote host closed the connection]
rezzack has quit [Quit: Leaving.]
ssvo has joined #ruby
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
Fire-Dragon-DoL has joined #ruby
rodacato has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
davehimself has joined #ruby
freeayu has joined #ruby
robustus has joined #ruby
pr0ggie has joined #ruby
pr0ggie has quit [Max SendQ exceeded]
xcv has joined #ruby
Nisstyre-laptop is now known as Nisstyre
bradsmith has joined #ruby
cads has joined #ruby
osvico has quit [Ping timeout: 264 seconds]
_helloworld_ has quit [Remote host closed the connection]
joshsmith has quit [Quit: joshsmith]
bradsmith has quit [Remote host closed the connection]
tgunr has joined #ruby
bradsmith has joined #ruby
gildo has quit [Ping timeout: 264 seconds]
xcv has quit [Remote host closed the connection]
druonysus has quit [Quit: Konversation terminated!]
rodacato has quit [Remote host closed the connection]
druonysus has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
Megtastique has quit [Quit: Megtastique]
bradsmith has quit [Ping timeout: 248 seconds]
fgo has joined #ruby
BadQuanta has joined #ruby
kaspergrubbe has joined #ruby
SpinningWheels has quit [Quit: Leaving.]
mikepack has quit [Remote host closed the connection]
smoothbutta has quit [Ping timeout: 256 seconds]
Bosox20051 has quit [Ping timeout: 276 seconds]
lemonsparrow has quit [Quit: Page closed]
smoothbutta has joined #ruby
radic_ has joined #ruby
Bosox20051 has joined #ruby
Bosox20051 has joined #ruby
Bosox20051 has quit [Excess Flood]
Bosox20051 has joined #ruby
Bosox20051 has quit [Excess Flood]
sailias has quit [Read error: Connection reset by peer]
radic__ has quit [Ping timeout: 245 seconds]
druonysus has quit [Remote host closed the connection]
<Eiam> nil is a value =0
viszu has joined #ruby
n_blownapart has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fgo has quit [Remote host closed the connection]
druonysus has joined #ruby
twer has quit [Ping timeout: 264 seconds]
twer has joined #ruby
intuxicated has quit [Ping timeout: 256 seconds]
Bry8Star{T2 has quit [Remote host closed the connection]
threesome has joined #ruby
banisterfiend has quit [Remote host closed the connection]
Bry8Star{T2 has joined #ruby
ehc has quit [Quit: ehc]
nlv has joined #ruby
viszu has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
_helloworld_ has joined #ruby
chihhsin has joined #ruby
Kricir has joined #ruby
BadQuanta has quit [Ping timeout: 240 seconds]
Kricir has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 264 seconds]
Inside has joined #ruby
Inside has joined #ruby
tgunr has quit [Read error: No route to host]
tgunr has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
ryanf has joined #ruby
dhruvasagar has quit [Read error: Operation timed out]
locriani has joined #ruby
daniel_hinojosa has joined #ruby
wmoxam_ has joined #ruby
<dankest> Ruby, where everything is a class.
<sevenseacat> and everything is an object. even a class.
amacgregor has joined #ruby
krz has joined #ruby
mweshi has joined #ruby
dhruvasagar has joined #ruby
amacgregor_ has quit [Ping timeout: 245 seconds]
cj3kim has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
_helloworld_ has quit [Remote host closed the connection]
machuga is now known as machuga|away
wmoxam_ has quit [Ping timeout: 260 seconds]
mary5030 has quit [Remote host closed the connection]
<popl> your mom is an object
dhruvasagar has quit [Ping timeout: 264 seconds]
iliketurtles has quit [Quit: zzzzz…..]
hypomodern has joined #ruby
bradhe has joined #ruby
sayan has joined #ruby
hamakn_ has joined #ruby
sayan has quit [Read error: Connection reset by peer]
hamakn has quit [Read error: Connection reset by peer]
m104 has joined #ruby
justsee has quit [Ping timeout: 245 seconds]
hypomodern has quit [Client Quit]
JZTech101 has quit [Quit: Bye]
optimusprimem has quit [Excess Flood]
brennanMKE has joined #ruby
brennanMKE has quit [Remote host closed the connection]
bradsmith has joined #ruby
justsee has joined #ruby
Demo_of_doom_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
osvico has joined #ruby
davehimself has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradsmith has quit [Ping timeout: 260 seconds]
justsee has quit [Ping timeout: 256 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
tkuchiki has joined #ruby
rgbdev has joined #ruby
eldariof has joined #ruby
rgbdev has left #ruby [#ruby]
nathancahill has quit [Quit: nathancahill]
n_blownapart has quit [Remote host closed the connection]
|2yan has joined #ruby
n_blownapart has joined #ruby
slimmah has quit [Ping timeout: 276 seconds]
<ericwood> ouch, you walked right into that one
pzuraq has quit [Remote host closed the connection]
|2yan has quit [Ping timeout: 245 seconds]
spidergears_ has quit [Ping timeout: 245 seconds]
shosti has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
pen has quit [Read error: Connection reset by peer]
JimmyNeutron has joined #ruby
pen has joined #ruby
chinkung has quit [Quit: Bye!]
<bnagy> not sayin yo mama's a ho but ObjectSpace.all? {|o| o.ancestors.include? yo_mamma}
baroquebobcat has quit [Quit: baroquebobcat]
Nisstyre has quit [Quit: Leaving]
m104 has quit [Quit: brb]
freerobby has quit [Quit: Leaving.]
modroid has joined #ruby
chihhsin has quit [Quit: leaving]
zachrab_ has quit [Read error: Connection reset by peer]
n_blownapart is now known as crucify_me
chihhsin has joined #ruby
zachrab_ has joined #ruby
zachrab_ has quit [Remote host closed the connection]
<crucify_me> test
Fire-Dragon-DoL has quit [Quit: Leaving.]
zachrab_ has joined #ruby
zachrab_ has quit [Remote host closed the connection]
Es0teric has quit [Ping timeout: 240 seconds]
yosafbridge` has quit [Ping timeout: 241 seconds]
twer has quit [Ping timeout: 256 seconds]
miclorb has joined #ruby
<ericwood> didn't work
shosti` has joined #ruby
bradhe has quit [Remote host closed the connection]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
shosti has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
Es0teric has joined #ruby
baroquebobcat has joined #ruby
Kricir has joined #ruby
baroquebobcat has quit [Client Quit]
Kricir has quit [Read error: Operation timed out]
kaspergrubbe has joined #ruby
LaPetiteFromage has left #ruby [#ruby]
<ericwood> we all run on rails
Demo_of_doom___ has joined #ruby
justsee has quit [Ping timeout: 256 seconds]
maroloccio has quit [Ping timeout: 256 seconds]
kaspergrubbe has quit [Ping timeout: 276 seconds]
davehimself has joined #ruby
m104 has joined #ruby
m104 has quit [Max SendQ exceeded]
Dysruption has joined #ruby
freerobby has joined #ruby
m104 has joined #ruby
m104 has quit [Max SendQ exceeded]
bradhe has quit [Remote host closed the connection]
fgo has joined #ruby
Demo_of_doom___ has quit [Read error: Connection reset by peer]
Demo_of_doom_ has quit [Remote host closed the connection]
m104 has joined #ruby
m104 has quit [Max SendQ exceeded]
justsee has joined #ruby
druonysus has quit [Read error: Connection reset by peer]
druonysus has joined #ruby
Dysruption has quit [Client Quit]
bradsmith has joined #ruby
Dysruption has joined #ruby
Domon has quit [Remote host closed the connection]
crucify_me has quit [Remote host closed the connection]
m104 has joined #ruby
crashfocus has joined #ruby
yosafbridge has joined #ruby
freerobby has quit [Ping timeout: 256 seconds]
bradsmith has quit [Ping timeout: 276 seconds]
intuxicated has joined #ruby
huoxito has quit [Quit: Leaving]
Inside has quit [Ping timeout: 245 seconds]
<crashfocus> Hey, I'm working on a study-guide type thing for when school starts up. What I basically do is put a bunch of questions into defined functions (templates) set up as question1, question2, etc. Now, I can have the program just cycle through the same questions in the same order all the time. What I want to do, though, is make it so the program chooses a random question upon running, and chooses a random question (that hasn't been used already) after.
<crashfocus> How would I go about doing this?
kizzx2 has quit [Quit: Leaving.]
bradhe has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
anay has joined #ruby
andredieb has quit [Ping timeout: 264 seconds]
druonysus has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
thepumpkin has quit [Remote host closed the connection]
druonysus has joined #ruby
eldariof has quit [Ping timeout: 260 seconds]
macmartine has joined #ruby
andredieb has joined #ruby
andredieb has joined #ruby
<Dysruption> crashfocus: you could put the functions into an array and then randomly pick one then remove it
<crashfocus> How would I do this?
ananthakumaran has joined #ruby
<Dysruption> can you send me some code?
druonysus has quit [Ping timeout: 245 seconds]
<crashfocus> That's the problem, I don't have much -- I haven't written the actual program since I hit this obstacle
<Dysruption> that's fine
<Dysruption> just send me what you have
<crashfocus> puts "----------------------------------"
<crashfocus> puts "Study Helper v0.1 Alpha"
<crashfocus> puts "Copyright crashfocus, 2013"
<crashfocus> puts "----------------------------------"
<Dysruption> wait
<Dysruption> wait
<crashfocus> literally all I have so far
<Dysruption> lol
<Dysruption> ok
<crashfocus> the rest is written idea
<crashfocus> not coded
<Dysruption> i see
<Dysruption> why do you want to put the questions into functions?
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<popl> crashfocus: don't paste here. If you have >3 lines, use the pastebin URL in the topic.
<popl> Like it says in the topic. :P
ananthakumaran has quit [Client Quit]
<crashfocus> Sorry :(
jonahR has quit [Quit: jonahR]
<crashfocus> putting the questions into functions makes it so I can call them whenever needed
<crashfocus> >question1
<crashfocus> instead of
<crashfocus> ># =>insert shitton of code here
<Dysruption> crashfocus: do the functions ask for specific responses?
kizzx2 has joined #ruby
popl has left #ruby [#ruby]
<crashfocus> Yes -- say it's a multiple choice
<crashfocus> it puts out the question, then four options (a,b,c,d) and gets.chomp.downcase the input
rbento has joined #ruby
<crashfocus> and then an if statement to check for correct/incorrect input
<Dysruption> ah okay. one second
crucify_me has joined #ruby
<modroid> when i run 'ruby script.rb' it prints out profiler stats afterwards. what is causing this and how might is disable it?
<modroid> (ie % cumulative self self total)
apeiros has quit [Ping timeout: 276 seconds]
<matti> Hmm...
<matti> I would not expect rb_mutex_lock/unlock to cause SIGSEGV.
robscomputer has joined #ruby
timonv has joined #ruby
robscomputer has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
nitish has quit [Remote host closed the connection]
robscomputer has joined #ruby
vlad_starkov has joined #ruby
freerobby has joined #ruby
wesside has quit [Quit: Computer has gone to sleep.]
nathancahill has joined #ruby
zeade has quit [Quit: Leaving.]
v0n has quit [Ping timeout: 240 seconds]
subbyyy has quit [Ping timeout: 240 seconds]
<Dysruption> crashfocus:
vlad_starkov has quit [Ping timeout: 260 seconds]
<crashfocus> si señor?
<Dysruption> you could make a hash with question => answer, then just loop a function that puts the question and expects the answer
macmartine has quit [Quit: Computer has gone to sleep.]
wesside has joined #ruby
<crashfocus> It's 6 of 1, 1/2 dozen of the other
freerobby has quit [Ping timeout: 240 seconds]
<Dysruption> huh?
<crashfocus> it's either an if statement that checks the value in the hash, or an if statement that checks a variable in the function
<bnagy> put the Q/A pairs in an array, shuffle it, and then pop questions until bored or array empty
<Dysruption> same concept
<Dysruption> i think
<bnagy> except it works, unlike using a Hash
iliketurtles has joined #ruby
Andrevan has joined #ruby
<crashfocus> bnagy: I'm an intermediate ruby coder... how would I go about doing this?
miclorb has quit [Quit: miclorb]
<bnagy> what do you have so far?
<crashfocus> Really just the idea
<bnagy> then write some code and come back
<crashfocus> I have the program written out in pseudocode
<crashfocus> that's the thing, I don't know the code to write
<bnagy> learn
<crashfocus> that's why I came here
<crashfocus> Can't learn without a teacher.
<bnagy> sure you can
<bnagy> google ruby tutorial
<bnagy> I'm ( and probably most here ) happy to help, but I won't write things from scratch for you
daniel_hinojosa has quit [Quit: Leaving.]
<Dysruption> bnagy, hash wouldn't work because it lacks pop yes?
<bnagy> if you're 'intermediate' write the start of a solution and then tell us what it does and what the limitations are
nathancahill has quit [Quit: nathancahill]
<bnagy> Dysruption: yeah, so you'd get repeats
<Dysruption> ah okay. thank you
<crashfocus> bnagy. here's the basic concept:
axeman- has joined #ruby
<bnagy> also, can't random sample from a Hash
browndawg has joined #ruby
<Dysruption> bnagy: true…
gnuyoga has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
wesside has quit [Quit: Computer has gone to sleep.]
<crashfocus> bnagy: http://pastie.org/8207223
kernel_pan1c has joined #ruby
Domon has joined #ruby
tkuchiki has quit [Remote host closed the connection]
lethjakm1 has quit [Ping timeout: 240 seconds]
lethjakman has joined #ruby
fridim_ has quit [Ping timeout: 256 seconds]
<bnagy> crashfocus: ok. Let's start with this. Create an array [] of questions and answers. Don't worry about multiple choice for now ( that's going to make it ugly )
<bnagy> like [ ["what is the meaning of life", "42"], ["how many roads must a man walk down", "piss off, Dylan"] ]
<bnagy> then write a method called ask that asks a random question from the array and checks the answer
<bnagy> def ask question_array; # do stuff; end
<bnagy> then come back
Vivekananda has quit [Remote host closed the connection]
stuartrexking has quit [Quit: Leaving...]
stuartrexking has joined #ruby
tkuchiki has joined #ruby
tvw has joined #ruby
Vivekananda has joined #ruby
_seanc_ has quit [Quit: _seanc_]
<bnagy> nope. You need to make it ask ONE question at random, and then check the answer, like the functions you pasted before
<Dysruption> are you running this after you create it crashfocus?
<crashfocus> Dysruption: if this were a lower-level language where I couldn't anticipate most compiler errors, I would
<crashfocus> seeing that most of the errors are a result of a typo or a miss-called function, I've learned to anticipate them
<crashfocus> I'm also tired, my stimulants are wearing off
davehimself has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Davey has quit [Quit: Computer has gone to sleep.]
<bnagy> crashfocus: https://eval.in/40646
<bnagy> that is your code, breaking
<Dysruption> yeah… that's what I was getting at
limon7 has joined #ruby
locriani has quit [Remote host closed the connection]
r0bglees0n has quit [Ping timeout: 268 seconds]
bradsmith has joined #ruby
ntus1017 has joined #ruby
baroquebobcat has joined #ruby
<crashfocus> should be fixed
<crashfocus> my for statement is scary.
<bnagy> don't guess, use eval.in or something and check
<bnagy> or run it on your machine
bradsmith has quit [Ping timeout: 245 seconds]
<crashfocus> greeeat
<crashfocus> it runs without compiler errors
wargasm has joined #ruby
<crashfocus> but it doesn't output anything
<crashfocus> ....
<bnagy> hahaha no
atno has quit [Remote host closed the connection]
<crashfocus> ?
<bnagy> that code doesn't run
<bnagy> it's broken in like 5 places I can see
<crashfocus> I rewrote it
<crashfocus> again
<crashfocus> :3
<crashfocus> because I got like, 5 errors
<crashfocus> Now it doesn't error out!
<crashfocus> :D
<crashfocus> but I get no output whatsoever.
<crashfocus> :(
peterdec_ has joined #ruby
peterdecroos has quit [Read error: Connection reset by peer]
twer has joined #ruby
relix has joined #ruby
stuartrexking has quit [Quit: Leaving...]
mweshi has quit [Quit: mweshi]
bradhe has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
zeromodulus has quit [Remote host closed the connection]
bradhe has joined #ruby
apeiros has joined #ruby
Demo_of_doom has joined #ruby
<Dysruption> show
druonysus has joined #ruby
druonysus has joined #ruby
whowantstolivefo has quit [Quit: who wants to live forever ?]
tomzx_mac has quit [Ping timeout: 276 seconds]
codecop has joined #ruby
ttt_ has joined #ruby
chimkan has quit [Read error: Connection reset by peer]
<bnagy> wow.. I am amazed the parser accepts that
chimkan has joined #ruby
peterdec_ has quit [Remote host closed the connection]
<davidcelis> woah
<davidcelis> wtf
<bnagy> crashfocus: you can continue your debugging by actually invoking the method you have defined - add a line "ask_question" to the bottom of your script
<crashfocus> "Untitled.rb:6:in `ask_question': undefined local variable or method `questions' for main:Object (NameError)
<crashfocus> from Untitled.rb:20:in `<main>'"
<crashfocus> shit
<crashfocus> I hate errors like these - I clearly have questions defined as something
<bnagy> the array is not visible inside the method - the method has its own scope for local variables and questions hasn't been defined in it
<sevenseacat> thats awesome.
baroquebobcat has quit [Quit: baroquebobcat]
<bnagy> you either need to pass it in as a parameter to the method ( best ) or make it visible another way
<bnagy> sevenseacat: I have NFI what the parser thinks for x in questions | input; key | might be doing
<bnagy> and how that could ever not be a syntax error
<sevenseacat> its pretty special.
<crashfocus> like i said
<davidcelis> parse.y
<crashfocus> no compiler errors
<sevenseacat> im guessing it's treating the | as ors
freerobby has joined #ruby
<davidcelis> there's no compiler
<davidcelis> ruby doesn't "compile", it's an interpreted language
<crashfocus> no interpreter errors, then.
<davidcelis> sevenseacat: yep
<bnagy> sevenseacat: ahhh riight
<davidcelis> crashfocus: have you looked into ruby tutorials/guides
<crashfocus> I'm going to go to bed and revisit this when I'm not utterly exhausted
<crashfocus> and when I'm not laughing hysterically for no reason at all.
miclorb has joined #ruby
<crashfocus> ya'll have a good night now
<crashfocus> and thanks... I guess
<bnagy> night
BizarreCake has joined #ruby
crashfocus has left #ruby [#ruby]
<sevenseacat> weird guy.
<davidcelis> NO WAY THAT GUY WAS AN INTERMEDIATE RUBY PROGRAMMER.
nlv has quit [Remote host closed the connection]
<bnagy> ya think?
<davidcelis> [22:13:46] <crashfocus> bnagy: I'm an intermediate ruby coder... how would I go about doing this?
<davidcelis> ^no
<bnagy> 13:25 < crashfocus> Dysruption: if this were a lower-level language where I couldn't anticipate most compiler errors, I would
<bnagy> 13:25 < crashfocus> seeing that most of the errors are a result of a typo or a miss-called function, I've learned to anticipate them
<bnagy> I LOLed
love_color_text has joined #ruby
freerobby has quit [Ping timeout: 245 seconds]
arya_ has joined #ruby
<Dysruption> lol
<davidcelis> good times
Demo_of_doom has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
gz0 has quit [Ping timeout: 264 seconds]
<bnagy> I still don't know what it's parsing that statement as
<bnagy> like.. for x in .. aaand now I'll try to parse something as a collection...
aef has quit [Ping timeout: 264 seconds]
<bnagy> how does it then not come to an unexpected kEND ?
ahawkins has quit [Ping timeout: 276 seconds]
aef has joined #ruby
<ryanf> haha
<ryanf> ripper doesn't even parse it
<ryanf> this should be a test case for parsing libraries
fgo has quit [Remote host closed the connection]
druonysus has quit [Remote host closed the connection]
dagobah has joined #ruby
pygospa has joined #ruby
<justsee> wc
justsee has left #ruby [#ruby]
thomasle_ has joined #ruby
druonysus has joined #ruby
zachrab_ has joined #ruby
JimmyNeutron has quit [Quit: Leaving]
cj3kim has quit [Read error: Connection reset by peer]
noop has joined #ruby
cj3kim has joined #ruby
Dysruption has quit [Quit: Dysruption]
vince_prignano has joined #ruby
goleldar has quit [Quit: Leaving]
gnuyoga has quit [Quit: gnuyoga]
gnuyoga has joined #ruby
tommyvyo has quit [Quit:]
Cyrus has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
tommyvyo has joined #ruby
zoee has joined #ruby
pygospa has quit [Ping timeout: 256 seconds]
bigkevmcd has joined #ruby
crucify_me has quit [Remote host closed the connection]
ayaz has joined #ruby
airtonix_ has joined #ruby
bradsmith has joined #ruby
freerobby has joined #ruby
ejnahc has quit [Ping timeout: 264 seconds]
anderson has joined #ruby
airtonix has quit [Ping timeout: 248 seconds]
hanmac has joined #ruby
ejnahc has joined #ruby
rippa has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
zachrab_ has quit [Remote host closed the connection]
jbpros has joined #ruby
pygospa has joined #ruby
ciopte7 has quit [Quit: ciopte7]
bradsmith has quit [Ping timeout: 264 seconds]
freerobby has quit [Ping timeout: 276 seconds]
The-Mad-Pirate has quit []
axeman- has quit [Ping timeout: 256 seconds]
lnormous has joined #ruby
anderson has quit [Quit: Leaving]
axeman- has joined #ruby
saarinen has joined #ruby
saarinen has quit [Client Quit]
larissa has quit [Quit: Leaving]
saarinen has joined #ruby
m104 has quit [Quit: brb]
zeromodulus has joined #ruby
shosti` has quit [Ping timeout: 240 seconds]
goodgame has joined #ruby
apeiros has quit [Remote host closed the connection]
love_color_text has quit [Remote host closed the connection]
filipe has joined #ruby
ewnd9 has joined #ruby
io_syl has quit [Quit: io_syl]
cj3kim has quit [Remote host closed the connection]
doritostains has quit [Quit: Leaving...]
vlad_starkov has quit [Remote host closed the connection]
Matriks has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
threesome has quit [Ping timeout: 248 seconds]
miclorb has left #ruby [#ruby]
jbpros has quit [Quit: jbpros]
jbpros has joined #ruby
cj3kim has joined #ruby
Gooder has joined #ruby
pranny has joined #ruby
afd___ has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
dangerousdave has joined #ruby
afd__ has joined #ruby
jprovazn has joined #ruby
jbpros has quit [Quit: jbpros]
axeman- has quit [Ping timeout: 248 seconds]
emergion has joined #ruby
axeman- has joined #ruby
ahawkins has joined #ruby
macklin has joined #ruby
ahawkins_ has joined #ruby
ahawkins_ has quit [Client Quit]
ahawkins has quit [Remote host closed the connection]
shredding has joined #ruby
<shredding> Hello all.
ahawkins has joined #ruby
<shredding> Today is the day I start learning ruby.
<Quadlex> Hola
<Quadlex> shredding: Awesome! What motivates that?
freerobby has joined #ruby
<shredding> Quadlex: Fun!
<shredding> I have a new project and just realized that i haven't learned a new language this year.
atmosx has joined #ruby
<shredding> Would anyone mind given me a heads up to what's not in the docs?
<shredding> For example:
sayan has joined #ruby
apeiros has joined #ruby
<zendeavor> it's all technically in the docs, just maybe not how you expect to find it.
<Quadlex> Hmm.
<shredding> I'm coming from python. There is a transition between 2.7 and 3.x
<Quadlex> My top 3 Ruby Learning tips
<Quadlex> 1: Ruby != Rails
<shredding> How the version situation in ruby?
<Quadlex> 2: The Hash API
<sevenseacat> there was a bit of a switch between ruby 1.8 and 1.9. ruby 1.9 to ruby 2, not so much.
<shredding> Of course, I'm learning rails as well :)
<Quadlex> 3: Off By One Errors ;)
rbento has quit [Ping timeout: 240 seconds]
<Quadlex> Ah, interesting, I'm doing the other way, Ruby --> Python
Lewix has joined #ruby
macklin has left #ruby [#ruby]
<Quadlex> We're a big more keen on testing.
<shredding> Quadlex: I really love djangop.
<Quadlex> A LOT more keen.
agjacome has quit [Quit: leaving]
airtonix_ is now known as airtonix
<Quadlex> hanmac: Ooo, I've never seen that, ty!
<shredding> hanmac: That looks interesting.
<zendeavor> if you're just now learning python, skip 2.x unless you expect to get stuck in a corporate rut that requires 2.x for their software Quadlex
axeman- has quit [Ping timeout: 264 seconds]
<shredding> sevenseacat: So, let's say I want to write a gem for a large audience. Would i choose 1.8, 1.9 or 2.0?
lnormous has quit [Ping timeout: 260 seconds]
<zendeavor> 1.8 is EOL
wallerdev has quit [Quit: wallerdev]
axeman- has joined #ruby
<sevenseacat> 1.8 is very EOL
<sevenseacat> 2 has been out for a while now
<sevenseacat> but 1.9 is still the main audience
<Quadlex> zendeavor: Thanks! I'm all good though, work is pretty current
freerobby has quit [Ping timeout: 245 seconds]
<hanmac> shredding i would write it for 2.0 and then it may would work for 1.9 too if possible (there are some features in 2.* that are cool)
<shredding> zendeavor: That depends. E.g. if you're doing django, the 1.6 version coming in august is production ready in 3, but many importang django packages (e.g. haystack, debug) are in 2.x
ebanoid has joined #ruby
<zendeavor> shredding: not relevant to learning the *language*
<shredding> hanmac: , sevenseacat Ok.
dankest has quit [Quit: dankest]
thejoecarroll has quit [Read error: Operation timed out]
xavier23 has quit [Quit: xavier23]
clocKwize has joined #ruby
vaicine_ has quit [Read error: Operation timed out]
<zendeavor> also, <swear> monolithic frameworks.
todd_work has quit [Read error: Operation timed out]
Columcille has quit [Read error: Operation timed out]
<shredding> I'm really interesting in how unicode is handled in ruby. Starting with PHP, going over to Python 2.x, I was starting to think it has to be pain (which is not in p3)
krishna has quit [Read error: Operation timed out]
<shredding> Okay. Then I will fire up RubyMine and do some testing.
<shredding> Thank you all.
toddWork_ has joined #ruby
vaicine has joined #ruby
thejoecarroll has joined #ruby
Columcille has joined #ruby
<zendeavor> shredding: prevailing preference has been pry rather than a full-blown IDE
<hanmac> shredding: ruby1.8 didnt had encoding, 1.9 was better and 2.0 has UTF8 as default encoding
krishna has joined #ruby
<shredding> zendeavor: I've read that in the book, that I have. But i already have a PHPStorm and PyCharm licence, so I'm comfortable with the workflow.
<sevenseacat> i like monolithic frameworks, except when i dont. >_>
blaxter_ has joined #ruby
lethjakman has quit [Ping timeout: 245 seconds]
<shredding> sevenseacat: by monolithic frameworks, you mean sinatra or what is flask in python?
<zendeavor> django, rails
<sevenseacat> lol sinatra isnt monolithic
<sevenseacat> rails is monlithic
<shredding> sevenseacat: I didn't interpret the word "monolithic"
zeropx has quit [Quit: has left the room … Or did he?]
<shredding> like "batteries included"
jarray52 has left #ruby [#ruby]
<zendeavor> like "this is barely even the language you started with"
<sevenseacat> monolithic, all-encompassing, kitchen-sink, batteries included
<shredding> I'm not a big fan of these microframeworks either.
graydot has joined #ruby
<Quadlex> sevenseacat: Monolithic? It turns Monkeys into real programmers?
<apeiros> I'm a fan of mix-and match unix style tools
<apeiros> chain what you want
<zendeavor> shredding: well that's not a surprise, you're a bonafide IDE addict.
<apeiros> everything does *one* job, but does that job well.
<hanmac> shredding: in you compare ruby with php, than even the stdlib has "batteries included" … and excange batteries, and power station and other usefull stuff ;P
stoffus has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<zendeavor> you can't compare php to anything and end up at the conclusion that php is anything less than subpar.
<zendeavor> php vs forth
<shredding> hanmac: I usually don't compare anything in IRC Chats to PHP, as someone will quote "a fractal of bad design" within minutes.
<zendeavor> give me forth, please.
<apeiros> shredding: for good reason :)
<hanmac> but php IS bad desiged ;P
<zendeavor> that article is kinda bad though
<zendeavor> php-sadness is a much better collection of php WTF
zeromodulus has quit [Remote host closed the connection]
<zendeavor> complete with direct links and references to the code in question
<shredding> I tend to be very productive in PHP as there is no point in wasting time on ranting other languages.
<shredding> Whatever :)
kaspergrubbe has quit [Remote host closed the connection]
<zendeavor> sure, but productivity is a poor metric by which to value a language
clocKwize has quit [Quit: clocKwize]
<zendeavor> and that's php's fault entirely
kaspergrubbe has joined #ruby
axeman- has quit [Ping timeout: 256 seconds]
<zendeavor> a cheetah with stumps for paws could be productive in php; doesn't mean the result will be good, efficient, or even remotely correct
<sevenseacat> the fractal of bad design is a good article but 80% of it isnt applicable to day to day PHP use
axeman- has joined #ruby
<zendeavor> it's a rant, not an article; it shouldn't be cited in a discussion
<sevenseacat> a fair chunk of it bit me regularly when i was using php
<shredding> This P** Word can really start discussions :)
thomasle_ has quit [Ping timeout: 264 seconds]
justsee has joined #ruby
tkuchiki has joined #ruby
<shredding> class-level declarations would be a static method in Java?
<zendeavor> every question of that form will receive an answer like this, shredding: kinda.
anay has quit [Read error: Connection reset by peer]
anay has joined #ruby
<shredding> ok, that's sufficient atm
modroid has quit [Read error: Connection reset by peer]
<zendeavor> the point is there aren't necessarily direct analogues.
<shredding> Of course.
_honning_ has joined #ruby
jbpros has joined #ruby
decoponio has joined #ruby
St_Marx has quit [Remote host closed the connection]
maxmanders has joined #ruby
tonini has joined #ruby
bradhe has quit [Remote host closed the connection]
pkh has quit [Quit: Leaving]
gstamp has quit [Quit: Computer has gone to sleep.]
Coffers has joined #ruby
r0bglees0n has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
axeman- has quit [Read error: Connection reset by peer]
b00stfr3ak has joined #ruby
axeman- has joined #ruby
bradsmith has joined #ruby
tommyvyo has quit [Quit:]
freerobby has joined #ruby
kriptik has quit [Quit: leaving]
threesome has joined #ruby
cody_ has joined #ruby
xavier23 has joined #ruby
<cody_> hi
bradsmith has quit [Ping timeout: 245 seconds]
marr has joined #ruby
fgo has joined #ruby
<b00stfr3ak> hello
gnuyoga has quit [Quit: gnuyoga]
freerobby has quit [Ping timeout: 260 seconds]
b00stfr3ak has quit [Quit: Leaving]
_Andres has joined #ruby
Davey has joined #ruby
ltbarcly_ has joined #ruby
b0oh has joined #ruby
gnuyoga has joined #ruby
<ltbarcly_> in rake, if i use multitask instead of task, the output gets all corrupted as threads step on each other
<ltbarcly_> is there any way to synchronize the output to stdout?
ltbarcly_ is now known as ltbarcly
BadQuanta has joined #ruby
BadQuanta has quit [Read error: Connection reset by peer]
amacgregor has quit [Ping timeout: 245 seconds]
brandon_1 has quit [Ping timeout: 245 seconds]
axeman- has quit [Ping timeout: 256 seconds]
axeman- has joined #ruby
vince_prignano has quit [Remote host closed the connection]
<bnagy> $stdout.sync
Al_ has joined #ruby
ghr has joined #ruby
obs has joined #ruby
cads has quit [Ping timeout: 245 seconds]
<ltbarcly> bnagy: still corrupted with that set to true
<bnagy> I don't know what you mean by 'corrupted' but it's hard to see how buffering would be involved in that
<zendeavor> i'm assuming mixed streams
Domon has quit [Remote host closed the connection]
cody_ is now known as notJames
camilasan has joined #ruby
notJames is now known as notCody
<ltbarcly> right, it looks like the threads that rake spins up just output blindly without regard for other threads
fixl has joined #ruby
<ltbarcly> presumably I need to put a mutex around stdout
<bnagy> you can also $stdout.flush in every thread where you write
<bnagy> imho I think it's nicer to push writes to a Queue and use an outputter thread
<bnagy> but they can still be out of order
vlad_starkov has joined #ruby
vishal has joined #ruby
<bnagy> well.. in an order you might not expect
b00stfr3ak has joined #ruby
<ltbarcly> unfortunately I'm not writing
<ltbarcly> it's rake
<zendeavor> well, this is par for the course with mixed outputs pointing to the same target
tvw has quit []
<ltbarcly> rake should have each of it's threads hold a mutex around writing to std{err,out}
notCody is now known as ch_
<ltbarcly> buffering is irrelevant
<bnagy> no
troessner has joined #ruby
<bnagy> but anyway, in the middle of other stuff, someone else can explain :)
Xeago has joined #ruby
<ltbarcly> you can't explain why you shouldn't lock a shared resource that doesn't support concurrent use
<ltbarcly> also known as the entire reason mutex was invented
clocKwize has joined #ruby
<zendeavor> i don't know how rake handles it, but what you're doing is running several processes which write to the same file-descriptor whenver they please. the mixed output is par for the course in this situation.
<ltbarcly> par for the course?
<ltbarcly> it's not processes anyway
maddog_ has quit [Ping timeout: 264 seconds]
<zendeavor> procedures, routines
<ltbarcly> words!
vlad_starkov has quit [Ping timeout: 248 seconds]
<zendeavor> whatever word strikes your pedantic fancy
<ltbarcly> ahh, ruby programmers, process procedure routine, it's all the same, hahaha
<ltbarcly> dumbshits
ltbarcly has left #ruby ["Konversation terminated!"]
maddog_ has joined #ruby
<zendeavor> oooookay then.
jbpros has quit [Quit: jbpros]
tonini has quit [Remote host closed the connection]
djd has joined #ruby
tjbiddle has joined #ruby
Domon has joined #ruby
<Andrevan> haha
<Andrevan> rake doesn't lock stdout
jbpros has joined #ruby
ch_ has quit [Remote host closed the connection]
<Andrevan> why would it
niceguyjames has joined #ruby
<Andrevan> he left anyway
<bnagy> because it's a SHARED RESOURCE MAN
<bnagy> YOU JUST DON'T UNDERSTAND MUTEXES
<Andrevan> lol
browndawg has quit [Ping timeout: 260 seconds]
k610 has joined #ruby
blackmesa has joined #ruby
GeissT has joined #ruby
arturaz has joined #ruby
tjbiddle has quit [Client Quit]
<zendeavor> i don't know why he was focused on the pedantic disambiguation between processes, routines and procedures rather than the fact that his problem is a result of multiple "things" dumping output to the same target
<Andrevan> probably because he wanted rake to write his mutex for him
jprovazn has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
twer1 has joined #ruby
<bnagy> file descriptors don't support concurrent use, DUMBASS
goodgame has quit [Read error: Operation timed out]
<bnagy> rrr
<bnagy> anyway I really am in the middle of something else :(
<zendeavor> i should be too.
<zendeavor> /quit
<zendeavor> welp, maybe not.
browndawg has joined #ruby
twer has quit [Ping timeout: 245 seconds]
pygospa has quit [Quit: leaving]
jbpros has quit [Client Quit]
cschneid has quit [Ping timeout: 245 seconds]
emergion has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
tonini has joined #ruby
Astral_ has quit [Read error: Connection reset by peer]
Astral_ has joined #ruby
ch_ has joined #ruby
Nss has joined #ruby
ch_ has quit [Remote host closed the connection]
justsee has left #ruby [#ruby]
freerobby has quit [Ping timeout: 260 seconds]
anonymuse has joined #ruby
saarinen has quit [Quit: saarinen]
axeman- has quit [Ping timeout: 245 seconds]
axeman- has joined #ruby
twer1 has quit [Ping timeout: 245 seconds]
pedestrian has joined #ruby
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
tgunr has quit [Quit: Nity nite]
blaxter_ is now known as blaxter
Astral_ has quit [Read error: Connection reset by peer]
Senjai has quit [Quit: No Ping reply in 180 seconds.]
Senjai has joined #ruby
flou has joined #ruby
b00stfr3ak has quit [Ping timeout: 245 seconds]
Astral_ has joined #ruby
himsin has joined #ruby
goodgame has joined #ruby
stoffus has quit [Quit: Lost terminal]
axeman- has quit [Ping timeout: 276 seconds]
Astral_ has quit [Read error: Connection reset by peer]
twer1 has joined #ruby
axeman- has joined #ruby
Astral_ has joined #ruby
tatsuya_o has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
nomenkun has joined #ruby
anonymuse has quit [Remote host closed the connection]
fgo has joined #ruby
goodgame has quit [Ping timeout: 256 seconds]
chimkan has quit [Read error: Connection reset by peer]
codecop has quit [Ping timeout: 264 seconds]
chimkan has joined #ruby
noname001 has joined #ruby
spidergears_ has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
limon7 has quit [Quit: Konversation terminated!]
noname001 has quit [Excess Flood]
bradsmith has joined #ruby
mikecmpbll has joined #ruby
<shredding> I do not know the correct word, but how the convention to write inline docs in ruby?
<shredding> like "@param string foo" in java
<sevenseacat> rdoc?
spidergears_ has quit [Quit: Konversation terminated!]
<bnagy> depends which doc system
<sevenseacat> there's a lot of diff doc systems
<mikecmpbll> how can i dynamically add attr_accessors to a module?
<shredding> rdoc does not to do type hinting?
<shredding> Like, what's expected.
noname001 has joined #ruby
<sevenseacat> type hinting in a dynamically typed language?
noname001 has quit [Max SendQ exceeded]
<mikecmpbll> :D
<bnagy> mikecmpbll: attr_accessors are just a class thing, kinda
<sevenseacat> this isnt java
freerobby has joined #ruby
<bnagy> like.. technically, they're not, but just assume they are
<mikecmpbll> bnagy: seems to work if I have module Foo; class << self; attr_accessor :bar; end end
<bnagy> and you can use define_method to add new methods at runtime
<mikecmpbll> Foo.bar => nil
smathieu has joined #ruby
goodgame has joined #ruby
<bnagy> yeah. That's not really what it's for :)
<mikecmpbll> was hoping for something like def new_var(name); self.send(:attr_accessor, name); end
<bnagy> what you're really doing is adding methods to a singleton class
bradhe has quit [Ping timeout: 256 seconds]
hanmac has quit [Quit: Leaving.]
bradsmith has quit [Ping timeout: 240 seconds]
<mikecmpbll> ok, can I do that dynamically? :)
<shredding> sevenseacat: Well, type hinting in a documentation way.
<bnagy> yeah, you open the eigenclass or whatever and define_method
<shredding> Like"this should be a string, give it whatever you want, but we will call string methods on it within the function"
<mikecmpbll> so define the accessors separately? without using attr_accessor?
<mikecmpbll> i'll have a go.
<bnagy> yep
rdark has joined #ruby
<bnagy> all attr_accessor is is sugar for defining two methods
<bnagy> just def foo and def foo= new
<Xeago> and defines a concise point to be overridden for frameworks that hook into attributes
<bnagy> new is a poor choice of example name there :P
<mikecmpbll> yeah I know.
<mikecmpbll> hehh
mercwithamouth has joined #ruby
spidergears has joined #ruby
<bnagy> there's also module_function which you could look at
doritostains has joined #ruby
freerobby has quit [Ping timeout: 245 seconds]
shredding has quit [Quit: Page closed]
<bnagy> but I'd need to look at it myself to work out if that's a red herring
noname001 has joined #ruby
noname001 has quit [Max SendQ exceeded]
intuxicated_ has joined #ruby
<zendeavor> you lost 'im
<bnagy> *shrug*
<bnagy> right time to cook dinner
smathieu has quit [Ping timeout: 276 seconds]
codecop has joined #ruby
emergion has joined #ruby
k610 has quit [Read error: Connection reset by peer]
incomplete has joined #ruby
k610 has joined #ruby
noname001 has joined #ruby
noname001 has quit [Max SendQ exceeded]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
doritostains has quit [Client Quit]
intuxicated has quit [Ping timeout: 256 seconds]
LMolr has joined #ruby
intuxicated_ has quit [Ping timeout: 245 seconds]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
noname001 has joined #ruby
browndawg has quit [Quit: Leaving.]
incomplete has quit [Read error: Connection reset by peer]
zz_michael_mbp is now known as michael_mbp
incomplete has joined #ruby
ntus1017 has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
cumin has joined #ruby
ntus1017 has joined #ruby
cschneid has joined #ruby
hanmac has joined #ruby
djd has quit []
shaunbaker has joined #ruby
djd has joined #ruby
<joshu_> morning
shaunbak_ has joined #ruby
<joshu_> I need someone's help to implement the following logic as I'm not sure how to tackle it https://gist.github.com/anonymous/074e52afd3dc5403e0a4
incomplete has quit [Read error: Connection reset by peer]
noname001 has quit [Ping timeout: 245 seconds]
incomplete has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
arya_ has quit [Ping timeout: 264 seconds]
incomplete has quit [Client Quit]
shaunbaker has quit [Ping timeout: 248 seconds]
pygospa has joined #ruby
trepidaciousMBR has joined #ruby
stef_204 has joined #ruby
intuxicated_ has joined #ruby
Nss has quit [Quit: Sto andando via]
cumin has quit [Ping timeout: 276 seconds]
adambeynon has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
twer1 has quit [Ping timeout: 245 seconds]
twer1 has joined #ruby
krz has quit [Ping timeout: 256 seconds]
cumin has joined #ruby
atno has joined #ruby
browndawg has joined #ruby
fwchld has joined #ruby
<fwchld> hey guys
<joshu_> apeiros hey been awhile how are you?
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
lemonsparow has joined #ruby
St_Marx has joined #ruby
cumin has left #ruby [#ruby]
<apeiros> fine, fine. a bit muscle-ache from hiking
<apeiros> you?
<apeiros> @joshu_
cumin has joined #ruby
<joshu_> apeiros hehe I'm aching from computer :(
<joshu_> you still on holiday?
kung has joined #ruby
lemonsparow is now known as lemonsparrow
AndChat| has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
<fwchld> hey guys - not really a ruby question BUT is it possible to have a service running on a server that accepts connections, and then redirects that traffic to a local service on that server on another port. the reason i ask is that i have a program that runs a webservice from the desktop but doesnt allow connections from anything other than 127.0.0.1. I need to access that web service from another machine….
browndawg has quit [Quit: Leaving.]
freerobby has joined #ruby
Banistergalaxy has quit [Ping timeout: 264 seconds]
allsystemsarego has joined #ruby
brianherman has joined #ruby
swordsmanz_ has joined #ruby
<apeiros> joshu_: no, at work atm
brianherman has quit [Client Quit]
<apeiros> fwchld: that's called a reverse-proxy
<clocKwize> fwchld: if its a http server, you could reverse proxy it
<clocKwize> if its not, thats more tricky
sepp2k has joined #ruby
freerobby has quit [Ping timeout: 256 seconds]
<joshu_> apeiros when you have time can you please look at my gist. I don't know how to approach that logic.
<apeiros> joshu_: not really having time, sorry
sepp2k1 has quit [Read error: Connection reset by peer]
SirFunk has quit [Ping timeout: 240 seconds]
TomRone has quit [Ping timeout: 240 seconds]
jeffreylevesque_ has joined #ruby
Z3tta has quit [Ping timeout: 240 seconds]
jeffreylevesque has quit [Ping timeout: 240 seconds]
swordsmanz has quit [Ping timeout: 240 seconds]
swordsmanz_ is now known as swordsmanz
SirFunk has joined #ruby
<zendeavor> "how are you" was really secret code for "i know you can help me, please do it"
TomRone has joined #ruby
Z3tta has joined #ruby
<joshu_> apeiros I understand no worries.
St_Marx has quit [Ping timeout: 240 seconds]
<fwchld> apeiros , clockwize - its not a web service
<fwchld> err it is a webservice
<fwchld> not a web server
<clocKwize> so what kind of protocol does it use?
<fwchld> im not sure
<fwchld> brb
shaunbaker has joined #ruby
<Andrevan> fwchld: check out hipache
<Andrevan> but what you really want is redir: http://linux.die.net/man/1/redir
frem_ has quit [Read error: Operation timed out]
<Xeago> fwchld: there are several tools that can be used
<Xeago> on different layers in the network stack
<Xeago> one could use netcat, nc, ncat, socat, etc
Andrevan has quit []
<apeiros> webservice usually means SOAP, SOAP means HTTP/S
<Xeago> or HAProxy for more fine-tuned control
<fwchld> apeiros sorry - soa
<fwchld> soap
<clocKwize> fwchld: maybe something like this http://www.boutell.com/rinetd/
gildo has joined #ruby
sevenseacat has quit [Quit: Leaving.]
<Xeago> or nginx can be configured to have upstreams, which is basically a reverse proxy
swordsmanz has quit [Quit: ooh ponies kinkeyyy]
<fwchld> ok one sec lemme try those
<fwchld> brb
b0oh has left #ruby [#ruby]
Zai00 has joined #ruby
atmosx has joined #ruby
dachi has joined #ruby
<fwchld> clockwize rinetd doesnt work
<fwchld> the webservice just hangs
<fwchld> :/
Heskie has joined #ruby
himsin has quit [Quit: himsin]
<clocKwize> I've never used it but I see its been use successfully by a big company while migrating data centres
<dachi> Somebody please help me out to understand this in console. Take two undeclared variables test1 and test2. And start right as follows. Command 1: puts 'yes' unless test1 << this gives error. Command 2: test2 = '' unless test2 << this succeeds. Why there is error in first command, please.
<fwchld> hrrm
Evixion has quit [Read error: Connection reset by peer]
<fwchld> brb
Heskie has quit [Client Quit]
Heskie has joined #ruby
amacgregor has joined #ruby
Evixion has joined #ruby
sayan has joined #ruby
elaptics`away is now known as elaptics
krz has joined #ruby
himsin has joined #ruby
<cumin> i'm just gonna guess here - the unless evaluates test1 and since it is undeclared, you can't evaluate an undeclared variable?
noname001 has joined #ruby
<cumin> but in the second case, you begin by declaring test2
<Xeago> > a = 'evaluated' unless do_not_exist; a
Es0teric has joined #ruby
emergion has joined #ruby
<Xeago> darnit, wher eis the bot when you need it
mneorr_ has joined #ruby
<Xeago> "NameError: undefined local variable or method `do_not_exist'"
<dachi> is this true? so is it because one begins with declaration and another begins with puts?
Es0teric has quit [Client Quit]
<Xeago> dachi: that is output I just got out of my repl
<cumin> @dachi yeah - i can't evaluate abc if abc ain't declared or defined, in the second case you define test2 and then evaluate it, which is why it succeeds
chimkan has quit [Read error: Connection reset by peer]
<dachi> Xeago: cumin: alright I understand now, thanks a lot guys. God bless you
mneorr has quit [Ping timeout: 260 seconds]
<Xeago> thank cumin, he came up with the rationale :)
bradsmith has joined #ruby
<dachi> thanks cumin :)
<dachi> and thank you too
<cumin> no problem glad to help
<dachi> ok, i'll go now. have a great day you two
<dachi> bye!
dachi has quit [Quit: Page closed]
chimkan has joined #ruby
cumin has quit [Quit: leaving]
nari has quit [Ping timeout: 245 seconds]
saintcajetan has quit [Remote host closed the connection]
axeman- has quit [Ping timeout: 240 seconds]
jlebrech has joined #ruby
freerobby has joined #ruby
axeman- has joined #ruby
bradsmith has quit [Ping timeout: 264 seconds]
tonini has quit [Remote host closed the connection]
r0bglees0n has quit [Ping timeout: 240 seconds]
BRMatt has joined #ruby
ttt_ has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 245 seconds]
shredding has joined #ruby
Mattix has quit [Read error: Connection reset by peer]
<fwchld> aghh ok give up
Mattix has joined #ruby
<fwchld> thanks anyways guys
dawkirst has joined #ruby
<fwchld> whats the best soap/webservices client for ruby?
<Nilium> What does best mean for you?
<fwchld> easiest to implement
<fwchld> lol
<zendeavor> by what metric do you measure "easiest"
[narcan] has joined #ruby
<fwchld> really basic implementation
<zendeavor> s/easiest/basic/
<Nilium> Well, that might be more specific-ish for anyone who knows soap/webservices clients.
emergion has quit [Quit: Computer has gone to sleep.]
GeissT has quit [Ping timeout: 276 seconds]
<joshu_> any suggestions for how to implement the time event matching logic in my gist?
fgo has quit [Remote host closed the connection]
maroloccio has joined #ruby
qhartman has quit [Ping timeout: 264 seconds]
swordsmanz has joined #ruby
r4nd0m1 has joined #ruby
emergion has joined #ruby
emergion has quit [Client Quit]
Maoko has joined #ruby
adeponte has quit [Remote host closed the connection]
_honning_ has quit [Ping timeout: 248 seconds]
Heskie has quit []
qhartman has joined #ruby
adeponte has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anay has quit [Remote host closed the connection]
jlebrech has quit [Quit: Konversation terminated!]
<zendeavor> have you thought of any ideas in the meantime?
anay has joined #ruby
<zendeavor> you've had plenty of time to consider.
<Nilium> What do you mean by time event matching logic?
<zendeavor> parsing a datetime
<Nilium> DateTime.parse? O_o
anay has quit [Remote host closed the connection]
Elhu has joined #ruby
shaunbaker has quit [Remote host closed the connection]
<zendeavor> or otherwise triggering a scheduled event
anay has joined #ruby
graydot has quit [Quit: graydot]
lkba has joined #ruby
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
St_Marx has joined #ruby
<joshu_> zendeavor yes I have been thinking about using if or case statements, and I've used tried this https://gist.github.com/anonymous/fc5780b8f3ea9ea26f93
sepp2k1 has joined #ruby
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
sepp2k has quit [Ping timeout: 260 seconds]
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
<zendeavor> your code doesn't sufficiently demonstrate your goal
<zendeavor> you've never explained your intent
sepp2k has joined #ruby
spidergears has quit [Quit: Konversation terminated!]
spidergears has joined #ruby
vishal has quit [Remote host closed the connection]
[narcan] has joined #ruby
vishal has joined #ruby
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
henn has joined #ruby
sepp2k has quit [Client Quit]
sepp2k has joined #ruby
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
<zendeavor> you're just throwing pasta at the wall here
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
sepp2k1 has quit [Ping timeout: 248 seconds]
<joshu_> hmm my intent. So to simplify the rest of my app let's just say that when a "message" (let it be whatever you like as it's just a simplification) triggers my ruby script I need to check what the current time is and if the current time is within any of the ranges as shown in my gist one of three things is printed to the console, "open", "closed" "lunch"
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
<joshu_> "throwing pasta at the wall" I do that to check if it's al dente ;)
<zendeavor> i bite it. more accurate.
Mattix has quit [Quit: Leaving]
Fire-Dragon-DoL has joined #ruby
vishal has quit [Ping timeout: 256 seconds]
Fire-Dragon-DoL has quit [Max SendQ exceeded]
freerobby has joined #ruby
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
<zendeavor> joshu_: okay, i'm seeing a few keywords here. notable is "range." if i go look at docs related to datetimes in ruby, and i find there is some kind of Datetime.range or similar method i'm going to strangle you over the internet.
emergion has joined #ruby
<zendeavor> perhaps you could save me the headache.
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Client Quit]
Fire-Dragon-DoL has joined #ruby
tmi has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
<joshu_> "strangle you over the internet"?!!!
Speed has joined #ruby
henn has quit [Remote host closed the connection]
<joshu_> whoever is the admin here should most definitely ban you. WTF do you think you are. If you have personal issue go see a psychiatrist!
Maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
<zendeavor> have you considered .cover? .between? .include?
tmi has quit [Client Quit]
tmi has joined #ruby
nomenkun has quit [Read error: Operation timed out]
AlSquire has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
fgo has joined #ruby
sepp2k has joined #ruby
fgo has quit [Remote host closed the connection]
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
fgo has joined #ruby
graydot has joined #ruby
<joshu_> /msg chanserv access #ruby
twer1 has quit [Ping timeout: 260 seconds]
graydot has quit [Client Quit]
ntus1017 has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
fgo has quit [Remote host closed the connection]
<zendeavor> you forgot the list part
eka has joined #ruby
michael_mbp is now known as zz_michael_mbp
heftig has joined #ruby
<waxjar> oo, strangling over the internet.. kinky
adeponte has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
Domon has quit [Remote host closed the connection]
guns has joined #ruby
shaunbaker has joined #ruby
chinkung has joined #ruby
Domon has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
fwchld has quit [Ping timeout: 240 seconds]
ayaz has quit [Ping timeout: 245 seconds]
bradsmith has joined #ruby
himsin_ has joined #ruby
nomenkun has joined #ruby
kizzx2 has quit [Quit: Leaving.]
spidergears has quit [Remote host closed the connection]
axeman- has quit [Read error: Connection reset by peer]
tonini has joined #ruby
spidergears has joined #ruby
axeman- has joined #ruby
chihhsin_ has joined #ruby
rdark_ has joined #ruby
freerobby has joined #ruby
mstksg has joined #ruby
chihhsin_ has quit [Client Quit]
_honning_ has joined #ruby
kung has quit [Ping timeout: 240 seconds]
Tony has quit [Ping timeout: 240 seconds]
drago777 has quit [Ping timeout: 240 seconds]
S0da has quit [Ping timeout: 240 seconds]
Y_Ichiro has quit [Quit: No Ping reply in 180 seconds.]
rdark has quit [Ping timeout: 240 seconds]
matchaw_ has quit [Ping timeout: 240 seconds]
himsin has quit [Ping timeout: 240 seconds]
Y_Ichiro has joined #ruby
himsin_ is now known as himsin
jefflyne has quit [Ping timeout: 240 seconds]
nari has joined #ruby
S0da has joined #ruby
chihhsin has quit [Ping timeout: 240 seconds]
Y_Ichiro has joined #ruby
Y_Ichiro has quit [Changing host]
jefflyne has joined #ruby
Tony has joined #ruby
drago777 has joined #ruby
<mstksg> anyone here use haml? what's the best way to iterate over, say, all blog posts, and add headings for each month and year?
matchaw has joined #ruby
bradsmith has quit [Ping timeout: 267 seconds]
<mstksg> do i have to end up iterating over years and months?
chihhsin has joined #ruby
<mstksg> or is there no way to just throw those headings in when the month changes
emergion has quit [Quit: Computer has gone to sleep.]
hanmac has quit [Quit: Leaving.]
Astral__ has joined #ruby
twer1 has joined #ruby
zz_michael_mbp is now known as michael_mbp
heftig has quit [Quit: Quitting]
freerobby has quit [Ping timeout: 264 seconds]
<Nilium> mstksg: Though I'm not sure about haml, what do you mean by iterating over years and months?
<Nilium> Basically, what's the input and output you're looking for?
<Nilium> Well, less input you're looking for and input you have, but you get the idea.
<mstksg> Nilium: well, I have a list of entries I want to list on an Archive page, but i want them grouped by month
Astral_ has quit [Ping timeout: 276 seconds]
<mstksg> as in, separated by <h2>'s
<Nilium> entries.group_by(&:month).do_what_you_will_with_the_grouped_entries ← Like that?
<mstksg> or well, it might make sense for the different months to all be in their own separate <ul />'s as well
mercwithamouth has quit [Ping timeout: 276 seconds]
<mstksg> Nilium: oh that makes a lot of sense
<mstksg> betre than my previous idea of iterating over all months and skipping ones that are empty haha
<mstksg> thanks
<Nilium> >> [{month: 1}, {month: 6}, {month: 6}].group_by { |i| i[:month] }
<eval-in> Nilium => {1=>[{:month=>1}], 6=>[{:month=>6}, {:month=>6}]} (https://eval.in/40679)
vlad_starkov has quit [Remote host closed the connection]
<Nilium> Granted you might want to have both month and year be the grouping.
<Nilium> And then sort your keys as needed, if needed.
<mstksg> thanks :)
<Nilium> Enumerable#group_by → that thing everyone goes, "holy crap, that exists?" in some form or another upon learning of it
<mstksg> i feel a little silly cause i use group_by a lot in other cases ... maybe just a brain fart. i somehow seem to approach problems differently whem writing templates/views.
<Nilium> It happens.
<mstksg> well, thanks :)
monkegjinni has joined #ruby
kaspergrubbe has joined #ruby
Shirakawasuna has quit [Quit: Leaving]
emergion has joined #ruby
machuga|away is now known as machuga
kirun has joined #ruby
sevenseacat has joined #ruby
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
shaunbaker has quit [Remote host closed the connection]
shaunbaker has joined #ruby
Domon has quit [Remote host closed the connection]
shaunbak_ has joined #ruby
hanmac has joined #ruby
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
LMolr has quit [Read error: Operation timed out]
robbyoconnor has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
r0bby_ has quit [Read error: No route to host]
atmosx has quit [Quit: And so the story goes…]
intuxicated_ has quit [Ping timeout: 276 seconds]
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
_honning_ has quit [Ping timeout: 245 seconds]
arya_ has joined #ruby
freerobby has joined #ruby
<apeiros> |>> 12:14 zendeavor: … i'm going to strangle you over the internet.
<apeiros> zendeavor: this is unacceptable. please stay civil. thank you.
camilasan has quit [Remote host closed the connection]
fgo has joined #ruby
sepp2k has quit [Quit: Leaving.]
camilasan has joined #ruby
sepp2k has joined #ruby
freerobby has quit [Ping timeout: 248 seconds]
<dagobah> Why is Ruby doing this strangeness..? https://eval.in/private/8ed6a26239e17c
realDAB has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
intuxicated_ has joined #ruby
ebanoid has quit [Quit: brbomgwtfbbq]
TheRealPygo is now known as pygospa
atmosx has joined #ruby
heftig has joined #ruby
anay has quit [Remote host closed the connection]
xpirator has quit [Quit: Leaving...]
<canton7> dagobah, because you're using a for loop, instead of using .each
<canton7> (the for loop mutates the loop variable (x) between iterations
<canton7> ..which is why it isn't recommended
Lewix has quit [Remote host closed the connection]
ebanoid has joined #ruby
cj3kim has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<dagobah> canton7: Why does it mutate the variable? That seems undesirable in all cases :(
<canton7> dagobah, it is. there's no reason to use for...in
twer1 has quit [Read error: Connection reset by peer]
<hanmac> dagobah: just dont use for
kernel_pan1c has quit []
<dagobah> Fair enough.
qubit has quit [Remote host closed the connection]
<flou> is there a use case where one would actually want the variable to mutate ?
axeman- has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
<Mon_Ouie> for behaves like it does because none of the syntactic loops or conditionals create new scope for variables
<dagobah> In the JS style.
<hanmac> infomation point, in current ruby block variables can shadow other variables (they do not automaticly overwrite the older ones)
ndrei has joined #ruby
<dagobah> What does that mean practically hanmac?
ldnunes has joined #ruby
sevenseacat has quit [Quit: Leaving.]
<Mon_Ouie> 20>> x = 10. proc { |x| x = 13 }.call; puts x
<eval-in> Mon_Ouie => private method `proc' called for 10:Fixnum (NoMethodError) ... (https://eval.in/40694)
stoffus has joined #ruby
<Mon_Ouie> 20>> x = 10; proc { |x| x = 13 }.call; puts x
<eval-in> Mon_Ouie => 10 ... (https://eval.in/40696)
<Mon_Ouie> 18>> x = 10; proc { |x| x = 13 }.call; puts x
<eval-in> Mon_Ouie => /tmp/execpad-6d206133e4dd/source-6d206133e4dd:2: warning: multiple values for a block parameter (0 for 1) ... (https://eval.in/40697)
<flughafen> xpath question, I am trying to select a specific link with a specific text, but this ends up empty...? $x("//td[@class=\"first-column \"][@a=\"admin\"]")
<Mon_Ouie> 18>> x = 10; Proc.new { |x| x = 13 }.call; puts x
<eval-in> Mon_Ouie => /tmp/execpad-35ff7ffb7488/source-35ff7ffb7488:2: warning: multiple values for a block parameter (0 for 1) ... (https://eval.in/40698)
jonkri has joined #ruby
thepumpkin has joined #ruby
platzhirsch has joined #ruby
<platzhirsch> What's the idiomatic way for initializing a variable either one way or the other based on an input variable? if input == :this elsif input == :that ?
<platzhirsch> with case, or with assignment statements that are finished by an if clause?
clocKwize has quit [Quit: clocKwize]
osvico has quit [Ping timeout: 245 seconds]
<canton7> if there are two options, ternary operator, otherwise case for me
ndrei has quit [Ping timeout: 248 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
kaspergrubbe has quit [Ping timeout: 264 seconds]
mercwithamouth has joined #ruby
<hanmac> you could also store procs inside an hash with :this and :that as key values ;P
bradsmith has joined #ruby
jprovazn has joined #ruby
guns has quit [Quit: guns]
<canton7> sounds like the pythonic workaround to lack of case statements to me :)
<shredding> I have some problems with require.
<shredding> What should be the correct path?
clocKwize has joined #ruby
<shredding> I tried ./exceptions an exceptions as well.
pranny has quit [Quit: Leaving.]
<canton7> shredding, require_relative
<shredding> canton7: thx
<waxjar> or run ruby with an appropriate -I flag
voltagex has left #ruby ["WeeChat 0.4.2-dev"]
Spooner has joined #ruby
huydx has joined #ruby
bradsmith has quit [Ping timeout: 264 seconds]
LaPetiteFromage has joined #ruby
anay has joined #ruby
[narcan] has joined #ruby
MrZYX|off is now known as MrZYX
freerobby has joined #ruby
LMolr has joined #ruby
<shredding> If i have a class in a module, it's not auto-imported when i add the module? How would I access the class from the imported module (e.g. my exceptions)
zeel has joined #ruby
<shredding> Despite these flaws, I'm already a hell of productive in ruby :)
<Nilium> What do you mean auto-imported when you add a module?
alda has joined #ruby
ndrei has joined #ruby
<alda> hi, I have question about regular expressions, should I escape special characters like <>& in expressions like /[<>&]/ ?
<heftig> shredding: ruby code loading is file-based, like C, not like Python
<shredding> ok, i see that the module encapsulates the classes
bauerbob has joined #ruby
<wuest> shredding: if you include MyMod (which defines MyModClass within its definition) then MyModClass will be defined in the namespace in which you included MyMod.
freerobby has quit [Ping timeout: 276 seconds]
<canton7> alda, you need to escape chars which are special to regex - so []/.+?*() etc
ahawkins has quit [Quit: leaving]
<shredding> wuest: Namespace is just the name of the module?
ahawkins has joined #ruby
colonolGron has joined #ruby
browndawg has joined #ruby
browndawg has quit [Client Quit]
huydx has quit [Ping timeout: 245 seconds]
<wuest> Thanks heftig; gonna keep that post handy myself :)
Inside has joined #ruby
<wuest> Much clearer than my pre-7-am-coffee explanation
<alda> canton7: yeah, I think it is clear for me now, thank you
tkuchiki has quit [Ping timeout: 245 seconds]
tkuchiki_ has joined #ruby
<shredding> heftig: Thanks, so basically I was write, but wrong syntax (tried Exceptions.MyCustomException instead of ::)
LaPetiteFromage has quit [Quit: LaPetiteFromage]
Elhu has joined #ruby
Elhu has quit [Client Quit]
lebek has joined #ruby
cj3kim has joined #ruby
habanany has joined #ruby
kaspergrubbe has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<heftig> >> self::class
<eval-in> heftig => Object (https://eval.in/40704)
<heftig> eww syntax. I get why it's needed, but, yuck.
monkegjinni has joined #ruby
shredding has quit [Quit: shredding]
<apeiros> >> self.class
<eval-in> apeiros => Object (https://eval.in/40705)
blackmesa has joined #ruby
<apeiros> :: for method invocations is being deprecated, don't use it
Elhu has joined #ruby
anay has quit [Remote host closed the connection]
alda has quit [Quit: Page closed]
* realDAB can't wait to see :: for method invocations disappear
<heftig> apeiros: so I can't use Foo::Bar(blah) anymore?
monkegjinni has quit [Ping timeout: 264 seconds]
jprovazn has quit [Remote host closed the connection]
habanany has quit [Quit: habanany]
cj3kim has quit [Ping timeout: 264 seconds]
ArchBeOS has joined #ruby
<apeiros> heftig: correct
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jprovazn has joined #ruby
<apeiros> realDAB: same. I understand the appeal of Foo::Bar(*args), but it's not necessary and causes issues for newbies. also Foo::Bar() is the only case where it looks somewhat nice IMO :)
Matriks has quit [Remote host closed the connection]
adeponte has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
subbyyy has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
LMolr has quit [Ping timeout: 264 seconds]
Elhu has quit [Ping timeout: 240 seconds]
kaspergrubbe has quit [Remote host closed the connection]
fridim_ has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
kaspergrubbe has joined #ruby
axeman- has joined #ruby
hamakn_ has quit [Remote host closed the connection]
freerobby has joined #ruby
hamakn has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
gnuyoga has quit [Quit: gnuyoga]
sumark has quit [Remote host closed the connection]
fridim_ has quit [Ping timeout: 264 seconds]
pedestrian has quit [Quit: pedestrian]
sumark has joined #ruby
ArchBeOS has quit [Read error: Connection reset by peer]
enroxorz has joined #ruby
enroxorz is now known as ArchBeOS
hamakn has quit [Ping timeout: 245 seconds]
Rubas has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
adeponte has quit [Ping timeout: 256 seconds]
<Rubas> Hello guys, how do I install a gem?
freerobby has quit [Ping timeout: 256 seconds]
<Rubas> !gem
axeman- has joined #ruby
pranny has joined #ruby
pranny has quit [Remote host closed the connection]
<flughafen> i have an xpath question....
<apeiros> Rubas: `gem install gemname`
breakingthings has joined #ruby
<apeiros> depending on how you installed ruby, you might need `sudo gem …`
<flughafen> within(:xpath, "//#{arg2}[@id=\"#{arg3}\" or @class=\"#{arg3}\"]/a[text()=\"#{arg1}\"]") ... this fails in ruby/capybara, but passes in the chrome console
g3orge has joined #ruby
<Rubas> apeiros: I am root, but if i say gem install "gemname" - will it auto download from git and so on?
<Rubas> like apt-get ?
_whitelogger has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Catie has joined #ruby
jinie has joined #ruby
derf- has joined #ruby
himsin has quit [Quit: himsin]
anonymuse has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
himsin has joined #ruby
himsin has quit [Client Quit]
huydx has joined #ruby
phite has joined #ruby
phite has joined #ruby
thepumpkin has quit [Remote host closed the connection]
jkamenik has joined #ruby
jkamenik has left #ruby [#ruby]
wmoxam has joined #ruby
fermion has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
jerius has joined #ruby
pipework has quit [Remote host closed the connection]
haxrbyte has joined #ruby
wesside has joined #ruby
miluz has joined #ruby
miluz has quit [Client Quit]
bradsmith has joined #ruby
realDAB has quit [Quit: realDAB]
rshetty has joined #ruby
haxrbyte_ has joined #ruby
shredding has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
bradsmith has quit [Ping timeout: 264 seconds]
devoldmx3 has joined #ruby
nezumi has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
goodgame has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
huydx has quit [Quit: Leaving...]
Astral_ has quit [Ping timeout: 248 seconds]
lebek has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
tkuchiki_ has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 240 seconds]
shaunbak_ has quit [Remote host closed the connection]
ewnd9_ has quit [Remote host closed the connection]
jaynewstrom has quit [Remote host closed the connection]
jaynewstrom has joined #ruby
ewnd9 has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has quit [Quit: Textual IRC Client: www.textualapp.com]
Megtastique has joined #ruby
axeman- has quit [Ping timeout: 245 seconds]
yalue has joined #ruby
mark_locklear has joined #ruby
Megtastique has quit [Client Quit]
subbyyy has quit [Ping timeout: 276 seconds]
axeman- has joined #ruby
anay has joined #ruby
kpshek has joined #ruby
realDAB has joined #ruby
tomzx_mac has joined #ruby
davehimself has joined #ruby
realDAB has quit [Client Quit]
tomzx_mac_ has joined #ruby
xcv has joined #ruby
shaunbaker has joined #ruby
atmosx has quit [Ping timeout: 260 seconds]
RubNoob has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
wudofyr has quit [Remote host closed the connection]
chxane has quit [Remote host closed the connection]
wudofyr has joined #ruby
devoldmx3 has quit [Ping timeout: 248 seconds]
jp- has joined #ruby
rshetty has quit [Quit: Sleeping]
tomzx_mac has quit [Ping timeout: 248 seconds]
Dwarf_ has joined #ruby
g3orge has quit [Quit: leaving]
michael_mbp is now known as zz_michael_mbp
noname001 has quit [Read error: Operation timed out]
mneorr_ has quit [Remote host closed the connection]
mneorr has joined #ruby
ehc has joined #ruby
devoldmx has joined #ruby
cody-- has joined #ruby
shredding has quit [Ping timeout: 256 seconds]
Megtastique has joined #ruby
asobrasil has joined #ruby
<platzhirsch> How do I access an instance variable through a dynamic string? I tried "@record#{i}".constantize and send(@record#{i}) but that does not seem to work
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby
dagobah_ has joined #ruby
<platzhirsch> oh, there is instance_variable_get, nvm
Maoko has joined #ruby
mneorr has quit [Ping timeout: 240 seconds]
<Maoko> Guys, would you please suggest me how to refactor multiple "or" in ruby cases?
dagobah has quit [Read error: Connection reset by peer]
noname001 has joined #ruby
tbrock_ has joined #ruby
noop has quit [Ping timeout: 248 seconds]
<hanmac> Maoko you can try || but showing us samplecode would be better
sebastianb has quit [Ping timeout: 246 seconds]
_honning_ has joined #ruby
shredding has joined #ruby
sebastianb has joined #ruby
<Maoko> hanmac, https://gist.github.com/maokomioko/4dc2b3cf9ddb09a38c61 that's it. I already have 3 || but if there will be more of them, what should I do?
<canton7> in general, put more on a new line
tbrock_ has quit [Client Quit]
<canton7> here, `if ['received', 'in_process', 'overdue'].include?(@quote.state)`
<Maoko> canton7, that's it. thank you!
sambao21 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
freerobby has joined #ruby
platzhirsch has left #ruby [#ruby]
shaunbak_ has joined #ruby
realDAB has joined #ruby
codecop has quit [Remote host closed the connection]
kpshek has quit []
<apeiros> %w ftw
ewnd9 has quit [Ping timeout: 264 seconds]
<apeiros> if %w[received in_process overdue].include?(@quote.state)
shaunbaker has quit [Ping timeout: 245 seconds]
dweeb has joined #ruby
pentameter has joined #ruby
freerobby has quit [Ping timeout: 264 seconds]
realDAB has quit [Client Quit]
zz_michael_mbp is now known as michael_mbp
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
devoldmx3 has joined #ruby
bradsmith has joined #ruby
thepumpkin has joined #ruby
<clocKwize> apeiros: noooo
realDAB has joined #ruby
<clocKwize> if @quote.started?
<apeiros> agreed
<clocKwize> don't leak your domain logic
mneorr has joined #ruby
<apeiros> Maoko: ^
ehc has quit [Quit: ehc]
<clocKwize> otherwise when you add another state, you'll be running around your whole code base updating stuff
<clocKwize> and it won't be tested :)
<Maoko> apeiros, hmmm..
fredjean has quit [Quit: Computer has gone to sleep.]
rippa has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
v0n has joined #ruby
Vivekananda has quit [Ping timeout: 260 seconds]
bradsmith has quit [Ping timeout: 245 seconds]
relix has joined #ruby
oktapodi has joined #ruby
chimkan has quit [Ping timeout: 245 seconds]
chimkan_ has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
realDAB has quit [Quit: realDAB]
lebek has joined #ruby
dhruvasagar has joined #ruby
baordog has joined #ruby
ewnd9 has joined #ruby
ewnd9 has quit [Remote host closed the connection]
ewnd9 has joined #ruby
cj3kim has joined #ruby
ewnd9 has quit [Remote host closed the connection]
jprovazn has quit [Remote host closed the connection]
ewnd9 has joined #ruby
Astralum has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
anay has quit [Remote host closed the connection]
jprovazn has joined #ruby
axeman- has quit [Read error: Operation timed out]
ghr has joined #ruby
pipework has joined #ruby
axeman- has joined #ruby
tmi has quit [Quit: tmi]
freeayu has quit [Read error: Connection timed out]
freeayu has joined #ruby
Tony has quit [Quit: Leaving]
akells` has joined #ruby
zachrab_ has joined #ruby
tomzx_mac_ has quit [Ping timeout: 245 seconds]
r0bglees0n has joined #ruby
gz0 has joined #ruby
tabolario has joined #ruby
orionstein_away is now known as orionstein
anay has joined #ruby
clocKwize has quit [Quit: clocKwize]
shaunbak_ has quit [Ping timeout: 245 seconds]
clocKwize has joined #ruby
kirun_ has joined #ruby
geekbri has joined #ruby
Kricir has joined #ruby
shaunbak_ has joined #ruby
pskosinski has joined #ruby
kirun has quit [Ping timeout: 248 seconds]
ffranz has joined #ruby
Megtastique has quit [Quit: Megtastique]
theRoUS has joined #ruby
theRoUS has joined #ruby
zoee has quit [Quit: zoee]
akells` has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
senayar has joined #ruby
dhruvasagar has joined #ruby
trepidaciousMBR_ has joined #ruby
akells` has joined #ruby
jlast has joined #ruby
NeoPixel has joined #ruby
freerobby has joined #ruby
colonolGron has quit [Quit: Lost terminal]
cody-- has quit [Quit: Computer has gone to sleep.]
trepidaciousMBR has quit [Ping timeout: 264 seconds]
trepidaciousMBR_ is now known as trepidaciousMBR
Kricir has quit [Remote host closed the connection]
cody-- has joined #ruby
<NeoPixel> Hey is anyone using Windows 8? Could someone please send me a copy of their CHKDSK.EXE file in Windows\System32\ ? I would be eternally greatful ;)
cody-- has quit [Client Quit]
<_br_> ??!!
<_br_> NeoPixel: Doesn't windows 8 have a repair mode?
tk_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<Speed> hanmac: hey I have a question for you
blackmesa has quit [Remote host closed the connection]
<Speed> I remember we were talking about ruby bindings in C before
JZTech101 has joined #ruby
<Speed> how do you solve object "relations"?
<Speed> let's say:
ananthakumaran has quit [Quit: Leaving.]
<Speed> I have a Sprite class that has a Tone object as a member variable
niceguyjames has joined #ruby
<Speed> (in C++)
intuxicated_ has quit [Quit: Leaving]
<Speed> so in Ruby I'd want both of those wrapped
<Speed> so I could do sprite.tone.r
gz0 has quit [Ping timeout: 256 seconds]
<Speed> or simply replace it, sprite.tone = new_tone
<Speed> the problem I see is that if you do something like
Sammael has joined #ruby
<Speed> t = sprite.tone; sprite.delete
<Speed> then t points to an invalid space...
BillCriswell has joined #ruby
<Mon_Ouie> Ruby has a GC, use it to call your destruction methods
<Speed> Mon_Ouie: I know, that was an example
<Rubas> Hello
andredieb has quit [Quit: Coyote finally caught me]
<Mon_Ouie> You can force the child object to keep a reference to its owner so it won't get GC'd early
<Speed> it's the same thing if you assign Tone to t, then sprite gets out of scope and destroyed
gz0 has joined #ruby
<Mon_Ouie> (Using instance variables; if the name of an instance variable doesn't start with @, it won't even be visible in Ruby)
NealJ has joined #ruby
cj3kim has joined #ruby
<Speed> hmm
<hanmac> Speed: in this chase i use an copy … the problem is that sprite.tone.r = 4 does not work anymore
<Speed> Mon_Ouie: but I'd preferably want it to work independently I think..
sambao21 has joined #ruby
<Speed> hanmac: so using shared_ptr's probably is the only solution...
cj3kim has quit [Read error: Connection reset by peer]
<Speed> when creating the Sprite object, I'd set the instance variable @tone to be a Tone object, that wraps the shared_ptr
rodacato has joined #ruby
_seanc_ has joined #ruby
Megtastique has joined #ruby
<Speed> shared_ptr's give some overhead though...
smathieu has joined #ruby
<Speed> so I hoped you'd have a nicer solution
andredieb has joined #ruby
ismaelrb has joined #ruby
RORgasm has quit [Remote host closed the connection]
RORgasm has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
_helloworld_ has joined #ruby
_helloworld_ has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
smathieu has quit [Ping timeout: 264 seconds]
asteve has joined #ruby
rickruby has quit [Remote host closed the connection]
Megtastique has quit [Quit: Megtastique]
<shredding> This ruby thing is really fun.
joast has quit [Quit: Leaving.]
<shredding> I just have to get used to all the syntactical sugar.
m104 has joined #ruby
shredding has quit [Quit: shredding]
blackmesa has joined #ruby
Megtastique has joined #ruby
arturaz has quit [Ping timeout: 264 seconds]
NealJ has quit [Quit: :c]
sambao21 has joined #ruby
niceguyjames has joined #ruby
hanmac has quit [Quit: Leaving.]
bradsmith has joined #ruby
gz0 has quit [Ping timeout: 245 seconds]
mklappstuhl has joined #ruby
habanany has joined #ruby
ismaelrb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
io_syl has joined #ruby
Megtastique has quit [Ping timeout: 245 seconds]
shredding has joined #ruby
gz0 has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
hanmac has joined #ruby
mansi has joined #ruby
Alina-malina has joined #ruby
realDAB has joined #ruby
akells` has quit [Remote host closed the connection]
<shredding> Once instanciated with @, instance variables are not required to be prefix with @?
<realDAB> shredding: yes they are
<realDAB> shredding: an instance variable is always @var
<apeiros> if you have an accessor, you can use that to access the ivar
<apeiros> but that goes through a method call
pen has quit [Remote host closed the connection]
<shredding> Interesting, I thought i found out by mistake, but I try again.
<apeiros> >> class X; attr_reader :y; def initialize; @y = 1; end; def foo; y + 1; end; end; X.new.foo
<eval-in> apeiros => 2 (https://eval.in/40717)
Megtastique has joined #ruby
<apeiros> that "y + 1" is "self.y() + 1"
tatsuya__ has joined #ruby
<apeiros> and y() is `def y; return @y; end` (`attr_reader :y` defines that method)
<realDAB> apeiros: aka self.y().+(1) :-)
<shredding> I hope you do not mean me as I do not understand whats happening.
<apeiros> realDAB: ERRNO::EUGLYSYNTAX!
<apeiros> ;-)
<apeiros> shredding: I did mean you
pen has joined #ruby
interactionjaxsn has joined #ruby
<realDAB> apeiros: yeah, i'm much happier with the syntactic sugar :-)
<shredding> I think i understand that.
xcv has quit [Remote host closed the connection]
<apeiros> shredding: well, and if not, just ask ;-)
jlebrech has joined #ruby
<hanmac> but y += 1 does not change the instance variable, you need self.y += 1
tatsuya_o has quit [Ping timeout: 276 seconds]
<shredding> So, when I have attr_accessor, i can omit the @, because ruby will then call the y method for me, that is hidden behind the accesor.
blip99 has joined #ruby
<shredding> That's why my code worked.
<apeiros> s/hidden behind/was defined by/
<shredding> yeah
gesh has quit [Read error: Connection reset by peer]
<hanmac> Speed: in my bindings i never use shared_ptr … (for the spirit.tone problem) but it might be an good idea to try it …
<apeiros> attr_reader :y really just defines a method for you. you could write the method `attr_reader` in pure ruby if you wanted
<shredding> But is it good or bad practise to omit the @?
ismaelrb has joined #ruby
gesh has joined #ruby
<realDAB> shredding: if you've got an accessor, in my view it's best to use the accessor and not the raw instance variable
<apeiros> shredding: class Module; def attr_reader(*names); names.each do |name| class_eval("def #{name}; return @#{name}; end") end; end; end
<realDAB> shredding: for one thing, some day you might write a hand-made, more complex accessor
<realDAB> shredding: def y; do_some_error_checking_or_whatever; return @y; end
<apeiros> shredding: I'm of the opposite opinion than realDAB, I strictly prefer @ivars
<Speed> hanmac: yeah, I'm writing a quick test case right now
<shredding> Okay, interesting.
<Speed> hanmac: hoped there's any other way though.. using shared_ptr's adds complexity
<realDAB> apeiros: pistols at dawn :-)
<apeiros> a) performance, b) clarity in code (yes, I access internal state), c) when you refactor, a global substitution in a file is trivial - and your class shouldn't spread more than a file
<apeiros> realDAB: I prefer using my pet zerglings and hydras - sc2 duel? :D
<shredding> The attr_* methods are getting mixed in by default, because every class inherits from what?
<apeiros> shredding: attr_* is defined on Module
<apeiros> and Class inherits from Module
<realDAB> shredding: they're instance methods of Module, and Class is a subclass of Module
<apeiros> and your classes are instances of Class
devoldmx3 has quit [Ping timeout: 276 seconds]
<realDAB> yeah, what apeiros said :-)
<shredding> Okay. Cool.
lapidary has joined #ruby
<hanmac> Speed, i only think that it might be problematic when the Sprite object dies and kills the Tone object too, what would happen with the ruby object of the tone one … (most of my bindings are not safe enough, i need to rewrite it for that fact)
rodacato has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
<shredding> And instances itself are classes that inherit from object?
<apeiros> instances are Objects
<shredding> Okay.
<apeiros> the only Objects which are Classes are instances of the class Class
<hanmac> but most instances can have singleton classes ;P
<apeiros> confusing at first, but once it sticks, it makes a lot of things rather easy.
<Speed> hanmac: that's exactly why I'd use a shared_ptr
<apeiros> shredding: the root of ruby is somewhat circular. don't get thrown off by it. they cheat.
<apeiros> i.e., Class.is_a?(Object), Object.is_a?(Class)
<hanmac> Speed, you may use this in your C++ class itself right? but i may cant use this for my bindings because i do not write the C++ class itself
<shredding> Okay, i have an idea.
<hanmac> >> Object.new.singleton_class.is_a?(Class)
<eval-in> Hanmac => true (https://eval.in/40721)
<apeiros> also Class < Module, but Module.is_a?(Class)
<apeiros> hanmac: you can have that easier even - Object.singleton_class.is_a?(Class) # (no .new)
cj3kim has joined #ruby
<ericwood> >> Object.singleton_class.is_a?(Class)
<eval-in> ericwood => true (https://eval.in/40722)
<apeiros> it gets real weird when you hop over to inheritance of singleton classes
<Speed> hanmac: yeah, that's why I hoped there'd be another way...
<spike|spiegel> they kind of mirror regular chain
<spike|spiegel> run paraller
<hanmac> true, false and nil also are the ONLY instances where class and singleton_class are the same
<apeiros> surprised they even have a singleton_class
<apeiros> given that other immediates don't.
chimkan has joined #ruby
<apeiros> I guess it has something to do with "being the only instance"
wallerdev has quit [Quit: wallerdev]
momomomomo has joined #ruby
chimkan_ has quit [Ping timeout: 245 seconds]
<shredding> This is strange: Class < Module, but Module.is_a?(Class)
gasbakid has joined #ruby
<hanmac> shredding: its because Module itself is a Class instance
<apeiros> hanmac: it's circular
<ericwood> everything is a class :D
freeayu has quit [Remote host closed the connection]
mhillsman has joined #ruby
<apeiros> which comes first? the Class or the Module? :)
stuartrexking has joined #ruby
m104 has quit [Quit: bye]
<apeiros> how can Module be a Class when Class needs Module to be defined, but Module needs Class to be defined in order to…
<shredding> So it's a chicken egg problem, that is solved somewhere in the dark areas of the heap.
oktapodi_ has joined #ruby
<apeiros> shredding: as said, they cheat
pipework is now known as grumpwork
<ericwood> guyz plz stop hurting mah brain :|
cj3kim has quit [Ping timeout: 245 seconds]
<apeiros> hence what I said at the beginning: don't worry about those circularities. they don't really matter.
rodacato has joined #ruby
dweeb has quit [Quit: Computer has gone to sleep.]
<spike|spiegel> not really a chicken and egg... more of: pointing pointers at each other ;)
jprovazn has quit [Quit: Leaving]
<hanmac> apeiros: i think it makes "pinkie sense" ;D
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
zeel has quit [Remote host closed the connection]
<pontiki> aloha o/
oktapodi has quit [Ping timeout: 264 seconds]
devoldmx has joined #ruby
tommyvyo has joined #ruby
stuartrexking has quit [Client Quit]
<shredding> The fun part on learning a new language is that you got to read these epic answers on trivial questions on stackoverflow.
<spike|spiegel> you also can't have a singleton for Bignum ... coz... umm... to be uniform with Fixnum :D
<apeiros> spike|spiegel: same for Float
<spike|spiegel> yup
dhruvasagar has quit [Ping timeout: 264 seconds]
<spike|spiegel> makes little more sense now that flonums are in
<apeiros> how's it with Rational and Complex?
<apeiros> never checked
<spike|spiegel> they're coll
<spike|spiegel> cool*
<apeiros> they're inconsistent!!!!!!!!!
<apeiros> how dare they!
<mhillsman> how does one call a class method from an instance of said class
<apeiros> mhillsman: self.class.class_method_name
<apeiros> alternatively: ClassName.class_method_name
<apeiros> the former will use the "current" class in inherited classes
<apeiros> the latter will always use the base class
<hanmac> shredding interesting point: −0.0 and 0.0 has total different object_ids ;P … and on 64bit systems 0.0 has fixed object_id but −0.0 has not ,P
rickruby has joined #ruby
gesh has quit [Read error: Connection reset by peer]
<pontiki> o.0
Megtastique has quit [Quit: Megtastique]
gesh has joined #ruby
<spike|spiegel> never depent on 'em fixed ids
<ericwood> ^^^^^^
<mhillsman> what i mean is like, i did a get request that returned an object of net::httpresponse
joshsmith has joined #ruby
<apeiros> spike|spiegel: you mean my ObjectSpace._id2ref to get Floats is wrong? whyyyyyy?
gesh has quit [Read error: Connection reset by peer]
<mhillsman> and i wanted to use the body_permitted? class method of net::httpresponse
michael_mbp is now known as zz_michael_mbp
<hanmac> apeiros: because its different on 32/64 and flonum systems
stoffus has quit [Ping timeout: 260 seconds]
<apeiros> hanmac: legs. pulling. I am. :-)
gesh has joined #ruby
<mhillsman> but i get an error of undefined method
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
arturaz has joined #ruby
mary5030 has joined #ruby
<mhillsman> storing the returned object in say 'data' variable, would i say data.self.class.class_method ?
* apeiros off, commute, cya guys
apeiros has quit [Remote host closed the connection]
kirun_ has quit [Ping timeout: 240 seconds]
<spike|spiegel> apeiros: you should be fine as long as it's the same process that generated the id is using the value... otherwise so
<spike|spiegel> so -> no*
Krajsnick has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
dtcrshr has joined #ruby
dtcrshr has quit [Changing host]
dtcrshr has joined #ruby
tonini has quit [Remote host closed the connection]
Krajsnic_ has joined #ruby
Krajsnick has quit [Read error: Connection reset by peer]
gesh has quit [Ping timeout: 264 seconds]
trepidaciousMBR has quit [Quit: trepidaciousMBR]
Megtastique has joined #ruby
mnewton has joined #ruby
rickruby has quit [Ping timeout: 264 seconds]
bleubeard has quit [Remote host closed the connection]
tjbiddle has joined #ruby
trepidaciousMBR has joined #ruby
acrussell has joined #ruby
brennanMKE has joined #ruby
joast has joined #ruby
clocKwize has quit [Quit: clocKwize]
arturaz has quit [Ping timeout: 276 seconds]
RichardBaker has joined #ruby
mhillsman has quit [Remote host closed the connection]
xcv has joined #ruby
anay has quit [Remote host closed the connection]
wallerdev has joined #ruby
cascalheira has joined #ruby
bradsmith has quit [Remote host closed the connection]
Maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
gildo has quit [Ping timeout: 264 seconds]
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sambao21 has joined #ruby
lethjakman has joined #ruby
Ciscoridze has joined #ruby
Ciscoridze has quit [Client Quit]
gasbakid has quit [Remote host closed the connection]
Ciscoridze has joined #ruby
ahawkins has quit [Ping timeout: 240 seconds]
<lapidary> is there a way to limit an each loop to the first n results?
nomenkun has quit [Remote host closed the connection]
cj3kim has joined #ruby
<ismaelrb> array.first(20).each { … }
Kricir has joined #ruby
zachrab_ has quit [Remote host closed the connection]
tgunr has joined #ruby
lebek has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
interactionjaxsn has quit [Remote host closed the connection]
NeoPixel has quit [Quit: —I-n-v-i-s-i-o-n— 3.3 (November '11)]
interactionjaxsn has joined #ruby
cj3kim has quit [Ping timeout: 276 seconds]
<lapidary> ty ismaelrb
baroquebobcat has joined #ruby
Kricir has quit [Ping timeout: 248 seconds]
io_syl has quit [Quit: io_syl]
ssvo has quit [Ping timeout: 276 seconds]
sayan has quit [Ping timeout: 248 seconds]
cek has joined #ruby
realDAB has quit [Quit: realDAB]
<cek> well.. i'm caught in block trap. Want to supply a block to result of function , not to the func intself :/
himsin has joined #ruby
himsin has quit [Client Quit]
geggam has joined #ruby
interactionjaxsn has quit [Ping timeout: 240 seconds]
realDAB has joined #ruby
Trynemjoel has joined #ruby
bradsmith has joined #ruby
anay has joined #ruby
interactionjaxsn has joined #ruby
<pontiki> cek: .tap
mhillsman1 has joined #ruby
S0da has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
grzywacz has joined #ruby
grzywacz has joined #ruby
baroquebobcat has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
<cek> tnx
cek has quit [Quit: жопа диридай диридиридай]
saarinen has joined #ruby
Solnse has joined #ruby
threesome has quit [Ping timeout: 248 seconds]
Neomex has joined #ruby
apeiros has joined #ruby
iAreBaboon_ has joined #ruby
Peej has quit [Remote host closed the connection]
nari has quit [Ping timeout: 240 seconds]
<mhillsman1> can someone clarify this for me http://pastebin.com/raw.php?i=dp5gCRZp
<mhillsman1> if it is at all possible
_JamieD_ has joined #ruby
blip99 has quit [Ping timeout: 276 seconds]
jefflyne has quit [Ping timeout: 256 seconds]
<apeiros> oh, raw link. good. rids all those ads.
<mhillsman1> :D
randomautomator has joined #ruby
<canton7> mhillsman1, body_permitted is a class method, not an instance method
ssvo has joined #ruby
fredjean has joined #ruby
<mhillsman1> right, is there a way to access that class method with how my code is though?
xcv has quit [Remote host closed the connection]
<mhillsman1> i want to confirm that a body was returned
<canton7> Net::HTTPResponse.body_permitted?
jefflyne has joined #ruby
<shredding> How would I do myArray.collect! method :my_method_that_accepts_an_item
<canton7> no idea *why* it's a class method
<apeiros> mhillsman1: as said long before: obj.class.body_permitted?
<shredding> I can pass it a block, but since i need the block twice, it would be more dry.
<apeiros> canton7: because net/http "shards" by class
lethan has joined #ruby
<apeiros> i.e. whether a body is permitted on a specific response type is already known at class level
tgunr has quit [Quit: Nity nite]
<canton7> ah gotcha, makes sense
<canton7> so yeah, my example usage is wrong
<mhillsman1> apeiros: thank you
<mhillsman1> i didn't understand previously
<apeiros> yeah, I assumed you were in an instance method of that class
<apeiros> hence I said `self.class.class_method_name`
kaspergr_ has joined #ruby
<apeiros> from "outside", self becomes obj
<mhillsman1> gotcha now
<apeiros> or `res` in your case
<mhillsman1> awesome, thanks again
<apeiros> yw
<mhillsman1> works perfectly
cantonic has quit [Quit: cantonic]
ahawkins has joined #ruby
ddm has joined #ruby
rodacato has quit [Remote host closed the connection]
kirun has joined #ruby
mhillsman1 has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Ping timeout: 276 seconds]
mhillsman has joined #ruby
mercwithamouth has quit [Quit: leaving]
mercwithamouth has joined #ruby
devoldmx has quit [Ping timeout: 276 seconds]
cj3kim has joined #ruby
rickruby has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
blackmesa has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
spidergears has quit [Remote host closed the connection]
Nisstyre has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
Neomex has quit [Quit: Neomex]
<Speed> how do I open a new anonymous scope again in ruby?
rodacato has joined #ruby
tk_ has quit [Quit: ばいばい]
<Speed> I just need something where I can put a few things that will go out of scope, for a test
adeponte has joined #ruby
brennanMKE has quit [Remote host closed the connection]
acrussell has left #ruby [#ruby]
<shredding> okay it works with my_array!(&method(: my_method_that_accepts_an_item))
<shredding> sorry, my_array.collect!(&method(: my_method_that_accepts_an_item))
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<apeiros> `: my…`?
<apeiros> space?
realDAB has quit [Quit: realDAB]
<apeiros> that certainly syntax-errors, no?
cantonic_ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
seanmarcia has joined #ruby
mikepack has joined #ruby
spidergears has joined #ruby
mhillsman has quit [Read error: Connection reset by peer]
_seanc_ has quit [Quit: _seanc_]
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mhillsman has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
anay has quit [Remote host closed the connection]
stuartrexking has joined #ruby
enebo has joined #ruby
adeponte has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
gnuyoga has joined #ruby
<shredding> apeiros: it works like a char,
<shredding> oy, the space is a copy and paste error
<shredding> These blocks keep my code really dry.
yalue has quit [Ping timeout: 250 seconds]
saarinen has quit [Quit: saarinen]
lethan has quit [Remote host closed the connection]
tgunr has joined #ruby
LMolr has joined #ruby
stuartrexking has quit [Quit: Leaving...]
xcv has joined #ruby
zeromodulus has joined #ruby
zeromodulus has joined #ruby
anay has joined #ruby
Voodoofish430 has joined #ruby
<hanmac> Speed: with begin … end you can make a scope
goodgame has quit [Quit: Quitte]
kaspergr_ has quit [Remote host closed the connection]
RichardBaker has quit [Quit: RichardBaker]
baroquebobcat has quit [Quit: baroquebobcat]
kobain has joined #ruby
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
sambao21 has joined #ruby
<Speed> hanmac: but the variables are still accessible outside the scope made by begin/end
camilasan has quit [Remote host closed the connection]
niceguyjames has joined #ruby
niceguyjames has quit [Client Quit]
<hanmac> hm you are right ;/
zeromodulus has quit [Ping timeout: 256 seconds]
Peej has joined #ruby
<Speed> so it's more like an expression
<hanmac> Speed: proc { … }.call works
realDAB has joined #ruby
kurtisnelson has left #ruby [#ruby]
iAreBaboon_ has quit [Ping timeout: 245 seconds]
realDAB has quit [Client Quit]
swordsmanz_ has joined #ruby
swordsmanz has quit [Ping timeout: 264 seconds]
swordsmanz_ is now known as swordsmanz
<Speed> ah yes
goodgame has joined #ruby
goodgame has quit [Read error: Connection reset by peer]
g0bl1n has joined #ruby
blip99 has joined #ruby
stkowski has joined #ruby
spidergears has quit [Remote host closed the connection]
ehc has joined #ruby
rodacato has quit [Remote host closed the connection]
noname001 has quit [Ping timeout: 260 seconds]
bradhe has joined #ruby
<Speed> hmm
<Speed> I wrote my bindings with shared_ptr
<Speed> it works, but the surprising thing is
cody-- has joined #ruby
<Speed> that if I assign "t = sprite.tone"
vince_prignano has joined #ruby
<Speed> then get sprite out of scope to be GC'ed
<Speed> even if I force a GC collection round
robscomputer has quit [Remote host closed the connection]
brbcoding has joined #ruby
senayar_ has joined #ruby
<Speed> oh wait, no
moted has quit [Quit: moted]
<Speed> it just works proper. :)
qhartman has quit [Quit: Ex-Chat]
poga has joined #ruby
moted has joined #ruby
realDAB has joined #ruby
realDAB has quit [Client Quit]
senayar has quit [Read error: Connection reset by peer]
robscomputer has joined #ruby
RichardBaker has joined #ruby
spidergears has joined #ruby
<Speed> this is mruby code though
nathancahill has joined #ruby
kaspergrubbe has joined #ruby
cody-- has quit [Client Quit]
dagobah_ has quit [Remote host closed the connection]
<Speed> I'm still unable to find a solution if you cannot use shared_ptr by modifying the C code itself
kaspergrubbe has quit [Remote host closed the connection]
mityaz has joined #ruby
pskosinski has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
blip99 has quit [Ping timeout: 248 seconds]
smathieu has joined #ruby
s__dana has quit [Ping timeout: 264 seconds]
anonymuse has quit [Ping timeout: 248 seconds]
devoldmx27 has joined #ruby
dankest has joined #ruby
stuartrexking has joined #ruby
pothibo has joined #ruby
zeade has joined #ruby
senayar_ has quit [Remote host closed the connection]
mhillsman has quit [Read error: Connection reset by peer]
cads has joined #ruby
senayar has joined #ruby
chimkan has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 245 seconds]
mhillsman has joined #ruby
senayar has quit [Remote host closed the connection]
chimkan has joined #ruby
smathieu has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
senayar has joined #ruby
cody-- has joined #ruby
fgo has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
efrainolivares has joined #ruby
devoldmx has joined #ruby
robscomputer has quit [Ping timeout: 245 seconds]
anoldhacker has joined #ruby
<anoldhacker> Anyone care to explain what happens when I do JSON.parse("".to_json) ?
tgunr has quit [Quit: I'm outta here]
<ericwood> don't do that
<ericwood> hello, btw :)
baroquebobcat has joined #ruby
<apeiros> anoldhacker: what do you not understand?
<anoldhacker> Gee, thanks eric!
ndrei has joined #ruby
<anoldhacker> What do you get when you do it?
<anoldhacker> (That last was for apeiros)
<ericwood> >> JSON.parse(''.to_json)
<eval-in> ericwood => uninitialized constant JSON (NameError) ... (https://eval.in/40734)
<spike|spiegel> anoldhacker: that --> undefined method `to_json' for "":String
<apeiros> anoldhacker: the expected exception
spidergears has quit [Ping timeout: 256 seconds]
<apeiros> anoldhacker: also that's not the way this works
geekbri has quit [Remote host closed the connection]
<ericwood> >> require 'json'; JSON.parse(''.to_json)
<eval-in> ericwood => (https://eval.in/40735)
<apeiros> you tell us what you do, what you get, why it isn't what you expect etc.
devoldmx27 has quit [Ping timeout: 256 seconds]
<anoldhacker> I didn't expect to have to explain that I required json first.
<apeiros> anoldhacker: that's not the exception I got
<anoldhacker> I expect to be able to round-trip an empty string.
<apeiros> anoldhacker: ok, then: your expectation is wrong
ghr has quit [Quit: Computer has gone to sleep.]
JensenDied has joined #ruby
<apeiros> an empty string is not valid json
<spike|spiegel> empty string is not a ummmmm json thingy
tjbiddle has joined #ruby
<ericwood> >> require 'json'; JSON.parse(''.to_json).class
<eval-in> ericwood => (https://eval.in/40736)
f0ster has joined #ruby
<ericwood> heh
<apeiros> json root element *must* be object or array
jefflyne has quit [Ping timeout: 276 seconds]
<canton7> object and array are the only two valid outermost json constructs
<canton7> apeiros put it better
shredding has quit [Quit: shredding]
<apeiros> and object in the JS sense, as in {}
tatsuya__ has quit [Ping timeout: 248 seconds]
sambao21 has joined #ruby
adeponte has joined #ruby
<anoldhacker> Joy.
<ericwood> :D
lacko has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
momomomomo has quit [Quit: momomomomo]
rodacato_ has joined #ruby
<anoldhacker> Then I guess I'm unhappy with the error message. That could be made a lot more clear.
<anoldhacker> tybye
anoldhacker has left #ruby [#ruby]
<ericwood> bye
jefflyne has joined #ruby
<lacko> hello fine gentlemen, i have a problem with xmlbuilder. when i create a builder object i get an error stating that a builder constant is uninitialized. do you have any idea what could be causing this?
mhillsman has quit [Read error: Connection reset by peer]
mhillsman has joined #ruby
cantonic_ has quit [Quit: cantonic_]
mercwithamouth has quit [Ping timeout: 264 seconds]
threesome has joined #ruby
<apeiros> odd guy
ismaelrb has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> lacko: probably because you didn't require builder?
realDAB has joined #ruby
ChristianS has quit [Excess Flood]
<ericwood> lol
ChristianS has joined #ruby
realDAB has quit [Client Quit]
zsan has joined #ruby
nfk has joined #ruby
mhillsman has left #ruby [#ruby]
lacko has quit [Quit: Lost terminal]
Rylai has quit [Excess Flood]
BlakeRG has joined #ruby
cody-- has joined #ruby
Rylai has joined #ruby
_seanc_ has joined #ruby
smathieu has joined #ruby
frem_ has joined #ruby
erry has quit [Read error: Connection reset by peer]
Rylai has quit [Changing host]
Rylai has joined #ruby
io_syl has joined #ruby
sayan has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
baroquebobcat has quit [Quit: baroquebobcat]
tgunr has joined #ruby
erry_ has joined #ruby
cj3kim has joined #ruby
Es0teric has joined #ruby
vince_pr_ has joined #ruby
rodacato_ has quit [Remote host closed the connection]
digitalcake has joined #ruby
erry_ is now known as erry
jbpros has joined #ruby
freerobby has quit [Quit: Leaving.]
_JamieD_ has quit [Quit: _JamieD_]
vince_prignano has quit [Ping timeout: 256 seconds]
anay has quit [Remote host closed the connection]
musl has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
m8 has joined #ruby
baroquebobcat has joined #ruby
Megtastique has quit [Quit: Megtastique]
Spami has joined #ruby
vlad_starkov has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
rodacato has joined #ruby
browndawg has joined #ruby
freerobby has joined #ruby
frem_ has quit [Remote host closed the connection]
c0rn has joined #ruby
iliketurtles has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.0]
shaunbak_ has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
splittingred has joined #ruby
huoxito has joined #ruby
obs has quit [Remote host closed the connection]
thomaslee has joined #ruby
Kruppe has joined #ruby
locriani has joined #ruby
Notte has joined #ruby
nooodl has joined #ruby
thebope has joined #ruby
Matriks has joined #ruby
troessner has quit [Quit: Leaving]
anay has joined #ruby
grzywacz has quit [Ping timeout: 276 seconds]
Al_ has quit [Quit: Al_]
rupee has joined #ruby
axeman- has quit [Ping timeout: 276 seconds]
spider-mario has joined #ruby
Banistergalaxy has joined #ruby
axeman- has joined #ruby
<pontiki> guess that leaves me out :)
lnormous has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
iliketurtles has quit [Quit: zzzzz…..]
cody-- has joined #ruby
<nooodl> hey, i wrote a cool "symbols only" one-liner! ($_=->(_,__=_){$><<_<<' ';_<$$&&$_[__,_+__]})[$$/$$]
devoldmx27 has joined #ruby
JZTech102 has joined #ruby
iliketurtles has joined #ruby
randomautomator has quit [Remote host closed the connection]
AndChat| has quit [Ping timeout: 260 seconds]
randomautomator has joined #ruby
JZTech101 has quit [Disconnected by services]
senayar has quit [Remote host closed the connection]
<nooodl> (oops, that ' ' could've been $/ for nicer output)
mahmoudimus has joined #ruby
<pontiki> nooodl wins the "Making Ruby look like APL" Award
blackmesa has joined #ruby
JZTech102 has quit [Client Quit]
JZTech101 has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
locriani has quit [Remote host closed the connection]
tgunr has quit [Quit: I'm outta here]
browndawg has quit [Quit: Leaving.]
mrsolo has joined #ruby
locriani has joined #ruby
mrsolo has quit [Remote host closed the connection]
mrsolo has joined #ruby
anonymuse has joined #ruby
randomautomator has quit [Ping timeout: 264 seconds]
Zai00 has quit [Quit: Zai00]
maxmanders has quit [Quit: Computer has gone to sleep.]
lump has quit [Remote host closed the connection]
_seanc_ has quit [Quit: _seanc_]
codecop has joined #ruby
atyz has joined #ruby
rdark_ has quit [Quit: leaving]
randomautomator has joined #ruby
Krajsnic_ has quit [Remote host closed the connection]
havenwood has joined #ruby
skinny_much has quit [Quit: ZNC - http://znc.sourceforge.net]
Krajsnick has joined #ruby
froy has joined #ruby
kaspergrubbe has joined #ruby
c0rn has quit [Ping timeout: 245 seconds]
cantonic has joined #ruby
musl has quit [Quit: WeeChat 0.4.1]
musl has joined #ruby
_honning_ has quit [Ping timeout: 260 seconds]
eldariof has joined #ruby
c0rn has joined #ruby
shosti has joined #ruby
davidvl has joined #ruby
kaspergrubbe has quit [Ping timeout: 245 seconds]
jonahR has joined #ruby
<davidvl> hello people. does anybody know how can I round a integer to next number ended in 0, 5, 7 or 9 ??
<davidvl> for example: 22$ should be rounded to 25$
browndawg has joined #ruby
<davidvl> 26$ to 27$
haxrbyte_ has quit [Remote host closed the connection]
<apeiros> multiply, round, divide
<apeiros> or otherway round
Xiti has quit [Read error: Connection reset by peer]
RichardBaker has quit [Quit: RichardBaker]
s-e has quit []
<waxjar> a case statement with ranges?
cody-- has quit [Quit: Computer has gone to sleep.]
s-e has joined #ruby
cody-- has joined #ruby
altamic has joined #ruby
altamic has left #ruby [#ruby]
trepidaciousMBR has quit [Ping timeout: 264 seconds]
Yakko has joined #ruby
nitish has joined #ruby
nitish has joined #ruby
nitish has quit [Changing host]
yfeldblum has quit [Ping timeout: 245 seconds]
rickruby has quit [Remote host closed the connection]
popl has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
Xiti has joined #ruby
Davey has joined #ruby
colonolGron has joined #ruby
anay has quit [Ping timeout: 260 seconds]
IceDragon has joined #ruby
<apeiros> not so sure based on what rule 22 would round to 25
Inside has joined #ruby
Inside has joined #ruby
<apeiros> I mean, 23, ok
<apeiros> but why wouldn't 22 round to 20?
xavier23 has quit [Quit: xavier23]
interactionjaxsn has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
<Sou|cutter> apeiros: 'always round up' is a valid rule for some things
interactionjaxsn has joined #ruby
<apeiros> Sou|cutter: then you either say "round up" or "ceil". but "round" without additions is not "round up"
ehc has quit [Quit: ehc]
davidvl has quit [Quit: This computer has gone to sleep]
araujo has quit [Ping timeout: 268 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
<Sou|cutter> yes, well... people seldom use the right words for things
<apeiros> hence the question
RichardBaker has joined #ruby
<apeiros> but yes, him meaning "round up" would be an explanation
<apeiros> too hot for reasoning :(
<r0bglees0n> im too sexy for reasoning
interactionjaxsn has quit [Ping timeout: 240 seconds]
companion is now known as companion
baroquebobcat has joined #ruby
companion is now known as Companion
nadirvar_ has joined #ruby
Morrolan has quit [Ping timeout: 248 seconds]
iliketurtles has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
xaxxon has joined #ruby
Demo_of_doom has joined #ruby
RichardBaker has quit [Read error: Connection reset by peer]
BRMatt has quit [Read error: Operation timed out]
arya_ has quit []
arya_ has joined #ruby
Morrolan has joined #ruby
Inside has quit [Ping timeout: 276 seconds]
efrainolivares has joined #ruby
subbyyy has joined #ruby
alvaro_o has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
dtcrshr has quit [Read error: Operation timed out]
Megtastique has joined #ruby
RichardBaker has joined #ruby
trepidaciousMBR has joined #ruby
Megtastique has quit [Client Quit]
_seanc_ has joined #ruby
flou has quit [Quit: Textual IRC Client: www.textualapp.com]
subbyyy has quit [Ping timeout: 256 seconds]
s-e has quit [Quit: I need you no longer]
vlad_starkov has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
cantonic has quit [Quit: cantonic]
devoldmx27 has quit [Read error: Connection reset by peer]
f0ster has quit [Remote host closed the connection]
<Mon_Ouie> He did say "next number", not "nearest"
momomomomo has joined #ruby
devoldmx has joined #ruby
jbpros has quit [Quit: jbpros]
S0da has joined #ruby
skinny_much has joined #ruby
rickruby has joined #ruby
chrisja has joined #ruby
brennanMKE has joined #ruby
neonlex has joined #ruby
elaptics is now known as elaptics`away
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
Villadelfia has quit [Quit: Leaving.]
zsan1 has joined #ruby
dtcrshr has joined #ruby
_seanc_ has left #ruby [#ruby]
johnnyfuchs has joined #ruby
zsan has quit [Ping timeout: 276 seconds]
marcdel has joined #ruby
milesforrest is now known as milesforrest|afk
rickruby has quit [Ping timeout: 240 seconds]
patrikf has joined #ruby
maniacal has joined #ruby
<apeiros> Mon_Ouie: true, didn't see that
interactionjaxsn has joined #ruby
Jeff_D has joined #ruby
<nooodl> too bad he's... already gone.
jinie has quit [Ping timeout: 246 seconds]
blaxter has quit [Ping timeout: 248 seconds]
_whitelogger_ has joined #ruby
maxmanders has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
<Jeff_D> I haven't tried to look at Ruby libs for Git for nearly a year, but I remember finding Grit and wishing I had time to revive it, too
ehc has joined #ruby
phite has quit [Ping timeout: 246 seconds]
_whitelogger_ has joined #ruby
Megtastique has joined #ruby
<Jeff_D> and with that, I'm off to get some rack time; can't-miss meeting in 7 hours :P
<apeiros> and I go back kicking toss and terrans asses
yonahw has quit [Quit: No Ping reply in 180 seconds.]
digifiv5e has joined #ruby
Jeff_D has quit [Quit: JMP $]
digifiv5e is now known as Guest56543
fermion has quit [Ping timeout: 260 seconds]
fermion has joined #ruby
the_mentat has joined #ruby
yonahw has joined #ruby
Kovensky has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
freerobby has joined #ruby
Gnubie has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 248 seconds]
marcdel has joined #ruby
xcv has quit [Read error: Connection reset by peer]
xcv has joined #ruby
xcv has quit [Read error: Connection reset by peer]
xcv has joined #ruby
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
brennanMKE has quit [Remote host closed the connection]
marcdel has quit [Ping timeout: 240 seconds]
efrainolivares has joined #ruby
seanmarcia has left #ruby [#ruby]
xcv_ has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
xcv has quit [Read error: Connection reset by peer]
atno has quit [Remote host closed the connection]
jaynewstrom has quit [Remote host closed the connection]
scarolan_ has joined #ruby
cantonic has joined #ruby
Ciscoridze has joined #ruby
jonahR has quit [Quit: jonahR]
Ciscoridze has quit [Quit: WeeChat 0.4.1]
scarolan has quit [Ping timeout: 240 seconds]
marcdel has joined #ruby
jaynewstrom has joined #ruby
sparr has joined #ruby
<sparr> where is the appropriate place to report a mistake on http://www.ruby-doc.org/ ?
<sparr> (not sure if that site is officially part of the Ruby project)
<popl> sparr: it says so near the very bottom
maxmanders has quit [Quit: Computer has gone to sleep.]
<popl> s/so //
intuxicated has joined #ruby
xcv_ has quit [Remote host closed the connection]
rupee has quit [Quit: Leaving]
<Speed> when writing the C bindings, how does one check whether an object is of particular class?
saintcajetan has joined #ruby
_honning_ has joined #ruby
brennanMKE has joined #ruby
Andrevan has joined #ruby
Andrevan has joined #ruby
Andrevan has quit [Changing host]
wargasm1 has joined #ruby
wargasm has quit [Ping timeout: 264 seconds]
cads has quit [Read error: Operation timed out]
<Mon_Ouie> RTEST(rb_obj_is_kind_of(object, klass))
nitish has quit [Remote host closed the connection]
<sparr> popl: yes, but the instructions linked at the bottom of their site, for how to contribute documentation fixes, themself have problems
mary5030_ has joined #ruby
mary5030 has quit [Ping timeout: 256 seconds]
<popl> "If you have any questions or comments, subscribe to the ruby-doc mailing list and post there. The Ruby community is helpful and responsive, so don’t be afraid to ask."
RichardBaker has quit [Quit: RichardBaker]
mary5030_ has quit [Remote host closed the connection]
neonlex has quit [Quit: neonlex]
<popl> sparr: What problems are you encountering?
bradhe has quit [Remote host closed the connection]
mary5030 has joined #ruby
<sparr> well, the one that prompted me to ask... on http://www.ruby-doc.org/core-2.0/Time.html there's a mistake in this line:
<sparr> Time.new(2002, 10, 31, 2, 2, 2, "+02:00") #=> 2002-10-31 02:02:02 -0200
<sparr> the + and - appear to disagree
BizarreCake has quit [Ping timeout: 264 seconds]
zmansiv has joined #ruby
anonymuse has quit [Remote host closed the connection]
postmodern has joined #ruby
mansi has quit [Remote host closed the connection]
jbpros has joined #ruby
vlad_starkov has joined #ruby
cj3kim has joined #ruby
jonahR has joined #ruby
mansi has joined #ruby
<sparr> after that, attempting to follow the instructions on http://www.ruby-doc.org/improve-the-docs/ for contributing to the docs leads my local ruby repository to a state where `git fetch upstream` produces the error "fatal: Couldn't find remote ref refs/heads/master"
rickruby has joined #ruby
jbpros has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby
bradhe has joined #ruby
anonymuse has joined #ruby
<popl> Did you try the mailing list?
efrainolivares has quit [Quit: efrainolivares]
<sparr> although that's not important, I can see and edit the source code at this point. I just can't find the place where that documentation exists
vince_pr_ has quit [Remote host closed the connection]
wargasm1 has quit [Ping timeout: 248 seconds]
<sparr> posting to the mailing list for a one character typo doesn't seem appropriate
<popl> Why not?
Xeago has joined #ruby
<popl> And posting to the mailing-list to report there is a problem with the instructions on how to clone the git repo seems appropriate. Don't you think?
devoldmx27 has joined #ruby
Megtastique has quit [Ping timeout: 240 seconds]
<popl> Don't be so timid!
<popl> :)
sambao21 has quit [Quit: Computer has gone to sleep.]
tonini has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
fredjean has quit [Quit: Computer has gone to sleep.]
<popl> sparr: did you do the git clone git@github.com:<your-github-name>/ruby.git step?
Villadelfia has joined #ruby
<popl> or before that, go to github and actually clone the Ruby git repo?
<sparr> yes
<sparr> yep
maasdesigner1 has joined #ruby
<popl> hm
rickruby has quit [Ping timeout: 256 seconds]
<sparr> and "git remote" shows origin and upstream
colonolGron has quit [Quit: Lost terminal]
mary5030_ has joined #ruby
<MrZYX> git remote -v ?
maasdesigner1 is now known as maasdesigner
browndawg has left #ruby [#ruby]
devoldmx has quit [Ping timeout: 256 seconds]
mary5030 has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
havenwood has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
havenwood has joined #ruby
Kricir has joined #ruby
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SHyx0rmZ has joined #ruby
<sparr> four lines, can I paste here?
<popl> sparr: no
<popl> sparr: use the pastebin URL in the topic
havenwood has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
jbpros has joined #ruby
shredding has joined #ruby
<MrZYX> nothing wrong, hmm
<MrZYX> maybe the http version works for you: git remote set-url upstream https://github.com/ruby/ruby.git
ewnd9 has quit [Remote host closed the connection]
<sparr> anyway, made a pull request for my correction
<sparr> hope I got it right :)
mansi has joined #ruby
ewnd9 has joined #ruby
invsblduck has joined #ruby
mary5030 has joined #ruby
RichardBaker has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
g0bl1n has quit [Ping timeout: 245 seconds]
goshakkk has joined #ruby
superscott[8] has joined #ruby
theRoUS has quit [Ping timeout: 245 seconds]
tonini has quit [Remote host closed the connection]
mary5030_ has quit [Ping timeout: 260 seconds]
bradsmith has quit [Remote host closed the connection]
<sparr> MrZYX: no change in results
blackmesa has quit [Ping timeout: 240 seconds]
<MrZYX> hm, no idea then
havenwood has joined #ruby
mklappstuhl has joined #ruby
zsan has joined #ruby
<sparr> np, I'll just re-fork in the future if I need to make another pull request
Al_ has joined #ruby
Kricir has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
maxmanders has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
zsan1 has quit [Ping timeout: 268 seconds]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
zsan has left #ruby [#ruby]
Al_ has quit [Client Quit]
Kricir has joined #ruby
<xaxxon> is there a way to get a callback or inject code in before any method on an object is called?
Megtastique has joined #ruby
horofox_ has joined #ruby
horofox_ has quit [Client Quit]
rhys has quit [Quit: Leaving]
<apeiros> xaxxon: what?
<xaxxon> umm... I'm trying to make a lazy-initialize'd object for rspec to use.. I want to say MyClass.new.should_receive(:method_name).exactly(1).time <== and make that actually work
<xaxxon> for when method_name is called from within initialize
<xaxxon> so I was going to redefine new to not call initialize until the first time a method is called on the object
<apeiros> oh, you lost me at rspec, sorry
<xaxxon> rr.. except somehow except the rspec methods
<xaxxon> ok, it's not an rspec question.. that's just my motivation
<xaxxon> I want an object that always calls my code before it calls the actual method
sarkis has joined #ruby
allsystemsarego has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 245 seconds]
efrainolivares has joined #ruby
<xaxxon> that is all.. I'll just add some code that says self.___send___ :initialize,... unless @initialized or something
fredjean has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
<xaxxon> if there isn't a "built in" to do this, can you point me at some methods I could look at to maybe cobble this together?
<MrZYX> are you sure you don't search for any_instance? MyClass.any_instance.should_receive
cj3kim has quit [Read error: Connection reset by peer]
<xaxxon> yes, I specfiically want on a specific instance and the correct answer may vary between objects of the class
cj3kim has joined #ruby
brennanMKE has quit [Remote host closed the connection]
<xaxxon> I have written an "rspec_new" method where the block is set up to call rspec methods on the allocated but un-initialized object and then it calls initialize.. but that breaks the normal behavior of new, so I have to call it a special name
sarkis has quit [Client Quit]
thepumpkin has quit [Remote host closed the connection]
axeman- has quit [Remote host closed the connection]
<xaxxon> that's my actual question and my answer at the bottom is what I did that sort of works, but Iw ant to see if I can get rid of the special new function and make 'new' just work like normal and do what I want
nathancahill has quit [Quit: nathancahill]
<xaxxon> reading
Maoko has joined #ruby
Davey has joined #ruby
Mon_Ouie has quit [Read error: Connection reset by peer]
joshsmith has quit [Quit: joshsmith]
<MrZYX> MyClass.new.should have_received(:my_method) should work if I got that stuff right, never used it though
<pothibo> proc doesn't check arguments, correct?
Spami has quit [Quit: This computer has gone to sleep]
<xaxxon> MrZYX, I'll check it out, that's for sure
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lewix has quit [Remote host closed the connection]
<Maoko> May I have a little bit of attention here? I'm refactoring some code of my current project and now it has come to this https://gist.github.com/maokomioko/0fabe02ce7f2dcfca0d0 . Any idea of what could be done to dispose of case switch?
<havenwood> pothibo: yup, proc doesn't check arity, lambda does
<pothibo> havenwood: thanks, making sure before implementing proc that it was the one I needed :D
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
<havenwood> doesn't have strict arity**
<xaxxon> MrZYX, looks like that only works on stubbed functions. I guess I could stub it to call itself..
thepumpkin has joined #ruby
shosti has quit [Ping timeout: 276 seconds]
<MrZYX> I think there was an (ugly) config switch to record all methods
TacitBlue is now known as Tacit_AFK
neonlex has joined #ruby
Neomex has joined #ruby
rhys has joined #ruby
<MrZYX> ah, no, the note was about doubles as null objects which would record all calls
<xaxxon> well, I found a way to make it call the original function, so I just have to basically enumerate the method names that I want... trying now
Megtastique has quit [Quit: Megtastique]
rhys has quit [Read error: Connection reset by peer]
fermion has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
<xaxxon> yeah.. so apparently Class.any_instance.stub(:method_name).and_call_original will do it.
<xaxxon> s/Class/MyClass/
fredjean has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
wargasm has quit [Ping timeout: 240 seconds]
Nisstyre has quit [Quit: Leaving]
rhys has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
bradsmith has joined #ruby
pr0ggie has joined #ruby
Kricir has quit [Remote host closed the connection]
axeman- has joined #ruby
Kricir has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby
thebope has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
the_fallen has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
cj3kim has quit [Read error: Connection reset by peer]
anderson has joined #ruby
cj3kim has joined #ruby
Kruppe has quit [Remote host closed the connection]
cascalheira has quit [Quit: Leaving...]
realDAB has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bradsmith has quit [Ping timeout: 256 seconds]
Deele has quit [Ping timeout: 240 seconds]
willob has joined #ruby
mary5030 has quit [Remote host closed the connection]
netQT has joined #ruby
devoldmx has joined #ruby
x1337807x has joined #ruby
r0bby has joined #ruby
<pothibo> hmm, weird question, I'm trying to implement something that has different protocol and behave differently depending on the protocol. I wanted to include modules and notify the modules when I get the version of the protocol so I could configure the pieces properly. How would you do it?
efrainolivares has quit [Quit: efrainolivares]
jblack has joined #ruby
jbpros_ has joined #ruby
shredding has quit [Quit: shredding]
rickruby has joined #ruby
goshakkk has quit [Quit: Textual IRC Client: www.textualapp.com]
<pothibo> I'm thinking of using the Observer pattern, but I don't see a clear way to add the modules as observer when the object is instantiated
Maoko has quit [Ping timeout: 245 seconds]
eldariof has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
Trynemjoel has joined #ruby
shredding has joined #ruby
devoldmx27 has quit [Ping timeout: 256 seconds]
<Xeago> pothibo: mind explaining your issue a bit more?
jbpros has quit [Ping timeout: 240 seconds]
ismaelrb has joined #ruby
JZTech101 has quit [Quit: Bye]
yfeldblum has joined #ruby
<pothibo> Xeago: Sure. I am refactoring a library on websocket, the Handler, Handshake, and Close section of the socket are subject to protocol version. What I wnat is, when a connection is instantiated, I parse the version # and pass that version number to a module function that then configures some procs for that connection. I wonder how I could make my connection obejct talk to the modules
JZTech101 has joined #ruby
ebanoid has joined #ruby
Neomex has quit [Quit: Neomex]
xaxxon has quit [Quit: This computer has gone to sleep]
<Xeago> isn't there an observable stuff new in recent rubies?
Matriks has quit [Remote host closed the connection]
<Xeago> anyways, it is important to consider which objects know/are concerned about what
<pothibo> I was thinking of something like Connection#version=(number) and that function notifies all the modules included (I was thinking using the observable fromt Ruby STD to do it) but I don't see how to add the modules as observable when the connection is initialized
rickruby has quit [Ping timeout: 240 seconds]
jbpros_ has quit [Ping timeout: 256 seconds]
Maoko has joined #ruby
<pothibo> Xeago: yes, I want to use observable, I'm just stuck trying to add the modules at initialization time, is there a callback sent to every module to let them knwo the object is initialized?
<MrZYX> I guess I'd have a generic handler that takes the connection and parses the version number, and then a class for each protocol version that the generic handler passes the connection to
<MrZYX> the common stuff can then be extracted into base class(es)
<MrZYX> and/or modules
tgraham has joined #ruby
<Xeago> that would be my bet too
rodacato has quit [Remote host closed the connection]
<pothibo> yeah, but that doesn't answer my question
rodacato has joined #ruby
miskander has joined #ruby
<Xeago> I don't really see what the actual problem is, can you show us your attempt?
Vivekananda has joined #ruby
gyzmodo has joined #ruby
netQT has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<pothibo> it's fine, I have an answer, only wanted to know if there was something better out there
realDAB has quit [Quit: realDAB]
stoffus has joined #ruby
ArchBeOS has quit [Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212]]
SHyx0rmZ has quit [Ping timeout: 245 seconds]
michaeldeol has joined #ruby
jbpros has joined #ruby
Megtastique has joined #ruby
marcdel has joined #ruby
endzyme has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
axeman- has quit [Remote host closed the connection]
brennanMKE has joined #ruby
stoffus has quit [Quit: leaving]
cascalheira has joined #ruby
arya_ has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
_seanc_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hanmac has quit [Quit: Leaving.]
Companion is now known as companion
mark_locklear has quit [Ping timeout: 245 seconds]
nathancahill has joined #ruby
jbpros has quit [Ping timeout: 256 seconds]
Maoko has quit [Ping timeout: 256 seconds]
cantonic_ has joined #ruby
cantonic has quit [Ping timeout: 264 seconds]
cantonic_ is now known as cantonic
horofox has joined #ruby
Demo_of_doom has quit [Remote host closed the connection]
fermion has joined #ruby
efrainolivares has joined #ruby
timonv has quit [Remote host closed the connection]
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tjbiddle> Hi everyone :-)
joshsmith has joined #ruby
khismetix has joined #ruby
LMolr has quit [Quit: Leaving]
blackmesa has joined #ruby
chasep_work has quit [Quit: oops, wrong button]
rupee has joined #ruby
fermion has quit [Quit: Computer has gone to sleep.]
twoism has joined #ruby
jbpros has joined #ruby
the_fallen has quit [Remote host closed the connection]
smathieu has joined #ruby
shredding has quit [Quit: shredding]
horofox has quit [Quit: Leaving.]
Davey has quit [Quit: Computer has gone to sleep.]
smathieu has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
Andrevan has quit []
brbcoding has quit [Ping timeout: 245 seconds]
lebek has joined #ruby
BRMatt has joined #ruby
horofox has joined #ruby
obs has joined #ruby
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
ebanoid has quit [Quit: brbomgwtfbbq]
xavier23 has quit [Quit: xavier23]
pothibo has quit [Quit: pothibo]
lebek has quit [Ping timeout: 245 seconds]
jbpros has quit [Ping timeout: 256 seconds]
Yakko has quit [Ping timeout: 256 seconds]
xavier23 has joined #ruby
bricker_ has joined #ruby
bricker has quit [Ping timeout: 264 seconds]
fmcgeough has quit [Quit: fmcgeough]
agatha has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
retry has joined #ruby
bradsmith has joined #ruby
retry has quit [Client Quit]
x1337807x has joined #ruby
NealJ has joined #ruby
momomomomo has quit [Quit: momomomomo]
maxmanders has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
ewnd9 has quit [Remote host closed the connection]
Neomex has joined #ruby
mneorr_ has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
hackingoff has joined #ruby
sambao21 has joined #ruby
tes has joined #ruby
tes has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bradsmith has quit [Ping timeout: 246 seconds]
tatsuya_o has joined #ruby
trepidaciousMBR has quit [Quit: trepidaciousMBR]
Krajsnick has quit [Remote host closed the connection]
jbpros has joined #ruby
trepidaciousMBR has joined #ruby
efrainolivares has left #ruby [#ruby]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
trepidaciousMBR has quit [Client Quit]
habanany has quit [Read error: Connection reset by peer]
maxmanders has quit [Quit: Computer has gone to sleep.]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
breakingthings has quit [Quit: breakingthings]
<hackingoff> Some bundled gems are failing to install, under ruby 2.0.0-p247, due to a missing mkmf dependency. What do I need to grab to resolve it? Is ruby-1.9.x-dev safe to get to resolve that?
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
ismaelrb has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
mityaz has quit [Quit: See ya!]
v0n has quit [Ping timeout: 245 seconds]
the_fallen has joined #ruby
jaywastaken has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
intuxicated has quit [Ping timeout: 256 seconds]
horofox has left #ruby [#ruby]
habanany has joined #ruby
momomomomo has joined #ruby
<tjbiddle> hackingoff: Do you have the option to use RVM/Rbenv/Chruby?
Ziarkaen has joined #ruby
MrRacoon_ has quit [Quit: Lost terminal]
smathieu_ has joined #ruby
<tjbiddle> hackingoff: But be sure to check the project page for whatever gem you're installing to be sure you have all the deps
smathieu_ has quit [Remote host closed the connection]
<Ziarkaen> Is there a universal way to replace a = a.method with something like a.update(:method) for Objects a?
smathieu has quit [Read error: Connection reset by peer]
efrainolivares has joined #ruby
smathieu has joined #ruby
jonahR has quit [Quit: jonahR]
cmarques has quit [Ping timeout: 256 seconds]
thepumpkin has quit [Remote host closed the connection]
stuartrexking has quit [Quit: Leaving...]
kirun has quit [Quit: Client exiting]
habanany has quit [Ping timeout: 241 seconds]
<waxjar> not really Ziarkaen
<apeiros> Ziarkaen: you mean send?
<apeiros> >> "foo".send(:upcase)
<eval-in> apeiros => "FOO" (https://eval.in/40748)
<waxjar> some classes have methods ending in a bang (strip!) that alter the object in place
alvaro_o has quit [Quit: Ex-Chat]
sepp2k1 has quit [Read error: Connection reset by peer]
<apeiros> oh
<apeiros> misread
<apeiros> a couple of classes provide #replace
<apeiros> so, a.replace(a.method)
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
intuxicated has joined #ruby
r4nd0m1 has quit []
stuartrexking has joined #ruby
shosti has joined #ruby
amacgregor has quit [Read error: Connection reset by peer]
amacgregor_ has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
marcdel has joined #ruby
grumpwork has quit [Remote host closed the connection]
bricker_ has quit [Read error: Operation timed out]
toddWork_ is now known as orolo
ismaelrb has joined #ruby
lebek has joined #ruby
_honning_ has quit [Remote host closed the connection]
staafl has joined #ruby
bricker has joined #ruby
<dankest> Why does .each() keep turning my hash into an array?
interactionjaxsn has quit [Remote host closed the connection]
<dankest> Is there one that will just pull the value from a hash?
<dankest> Or if I just want the key from the first entry in the hash?
Astralum has quit [Ping timeout: 256 seconds]
<apeiros> dankest: .each doesn't do such a thing
<apeiros> .each returns the receiver
interactionjaxsn has joined #ruby
<apeiros> so if .each returns an array, that means you had an array to begin with
<dankest> Odd
<apeiros> >> {}.each { |x| x }.class
<eval-in> apeiros => Hash (https://eval.in/40749)
<dankest> I wonder if FactoryGirl is fucking up my hash then
Astralum has joined #ruby
thepumpkin has joined #ruby
<Ziarkaen> apeiros: Thanks.
Notte has quit [Remote host closed the connection]
<dankest> >> puts "factory girl, y u no work
<dankest> "
<eval-in> dankest => factory girl, y u no work ... (https://eval.in/40751)
<Mon_Ouie> Hah, that's kind of funny
<dankest> Can I flood the channel with it?
<Mon_Ouie> Let's inject code into eval.in!
<dankest> Or does it have a restricter?
<dankest> (1..99999999999).each {|i| puts i}
<dankest> :P
<ericwood> I think the problem is that he is smoking his hash
<Mon_Ouie> It only prints the first line
<dankest> Damn
<Mon_Ouie> I don't think there is a restriction on how often you can send requests to it though
<dankest> ericwood: as opposed to what?
<ericwood> idk
<dankest> Good one
interactionjaxsn has quit [Ping timeout: 268 seconds]
<apeiros> dankest: you can, but you'll get kickbanned
tgraham is now known as tgraham|away
vlad_starkov has quit [Remote host closed the connection]
<Mon_Ouie> Speaking of which, I probably should remove my old ones
cmarques has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
<Mon_Ouie> Most of them end up being reset by freenode and probably no one really knows who added them in the first place
<apeiros> yes, that's really annoying
<apeiros> it'd be really nice if you could provide a reason for the ban, and if the ban-time would stick
<apeiros> also IMO kick should == 5min ban
ssvo has quit [Quit: leaving]
ssvo has joined #ruby
hackingoff has quit [Ping timeout: 245 seconds]
orionstein is now known as orionstein_away
mneorr_ has quit [Remote host closed the connection]
dankest has quit [Quit: Peace]
davehimself has quit [Quit: Textual IRC Client: www.textualapp.com]
cmarques has quit [Ping timeout: 268 seconds]
momomomomo has quit [Quit: momomomomo]
ssvo has quit [Client Quit]
emergion has joined #ruby
intuxicated has quit [Ping timeout: 246 seconds]
BillCriswell has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
ismaelrb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alvaro_o has joined #ruby
ehaliewicz has joined #ruby
ismaelrb has joined #ruby
nari has joined #ruby
ssvo has joined #ruby
kpshek has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lebek has joined #ruby
BlakeRG has quit [Remote host closed the connection]
Morrolan has quit [Ping timeout: 240 seconds]
tommyvyo has quit [Quit:]
lebek has quit [Client Quit]
blackmesa has joined #ruby
MrZYX is now known as MrZYX|off
bricker_ has joined #ruby
lebek has joined #ruby
cmarques has joined #ruby
banisterfiend has joined #ruby
lebek has quit [Client Quit]
relix has joined #ruby
endzyme has quit []
adambeynon has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has quit [Client Quit]
Ziarkaen has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
Vivekananda has quit [Ping timeout: 240 seconds]
ssvo has quit [Quit: leaving]
bricker has quit [Ping timeout: 240 seconds]
lebek has joined #ruby
ddm has quit [Quit: Page closed]
cj3kim has quit [Remote host closed the connection]
intuxicated has joined #ruby
bradsmith has joined #ruby
digitalcake has quit [Quit: Leaving.]
cody-- has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Remote host closed the connection]
baordog has quit [Remote host closed the connection]
sam19113 has joined #ruby
bradhe has joined #ruby
bradsmith has quit [Ping timeout: 240 seconds]
huoxito has joined #ruby
Morrolan has joined #ruby
havenwood has quit [Remote host closed the connection]
obs has quit [Remote host closed the connection]
havenwood has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
radic_ has quit [Ping timeout: 240 seconds]
_helloworld_ has joined #ruby
codecop has quit [Remote host closed the connection]
radic_ has joined #ruby
Megtastique has quit [Quit: Megtastique]
jonkri has quit [Quit: jonkri]
jbpros has joined #ruby
Megtastique has joined #ruby
tgraham|away is now known as tgraham
enebo has quit [Quit: enebo]
Vivekananda has joined #ruby
mary5030 has quit [Remote host closed the connection]
miskander has quit [Quit: miskander]
ch_ has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
ehc has quit [Quit: ehc]
sambao21 has quit [Quit: Computer has gone to sleep.]
MrZYX|off is now known as MrZYX
Neomex has quit [Quit: Neomex]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cmarques has quit [Ping timeout: 248 seconds]
chriskk has joined #ruby
bradsmith has joined #ruby
d2dchat has joined #ruby
pothibo has joined #ruby
anonymuse has quit [Remote host closed the connection]
sam19113 has quit [Quit: sam19113]
ldnunes has quit [Quit: Leaving]
i_s has quit [Remote host closed the connection]
cpruitt has joined #ruby
i_s has joined #ruby
devoldmx3 has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
thepumpkin has quit [Remote host closed the connection]
spider-mario has quit [Remote host closed the connection]
BrianJ has joined #ruby
cmarques has joined #ruby
pentameter has quit [Read error: Connection reset by peer]
ehc has joined #ruby
sarkis has joined #ruby
thepumpkin has joined #ruby
jlast has quit [Remote host closed the connection]
anonymuse has joined #ruby
<conner> is the rspec book still current or is it out of date with currently best practice?
druonysus has quit [Ping timeout: 276 seconds]
cj3kim has joined #ruby
willob has quit [Quit: Leaving.]
tgraham is now known as tgraham|away
<tjbiddle> conner: I'd still read it. If anything has changed, it'd be syntax.
havenwood has joined #ruby
ismaelrb has quit [Quit: Textual IRC Client: www.textualapp.com]
kpshek has quit []
twoism has quit [Read error: Connection reset by peer]
twoism has joined #ruby
cmarques has quit [Ping timeout: 256 seconds]
linux_noob_666 has quit [Remote host closed the connection]
<conner> tjbiddle, I tend to have trouble finding documentation on matchers all the time
linux_noob_666 has joined #ruby
mneorr has joined #ruby
<tjbiddle> conner: Pop on over to #rspec (And *possibly* #rubyonrails - But they might tell you to go to #rspec as well lol) - I'm not in the best habit of testing so my opinion may be moot :)
tomzx_mac has joined #ruby
<conner> tjbiddle, point taken. Thanks :)
linux_noob_666 has quit [Remote host closed the connection]
stuartrexking has quit [Quit: Leaving...]
cody-- has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
atyz has quit [Quit: Leaving...]
neonlex has quit [Quit: neonlex]
jerius has quit [Ping timeout: 276 seconds]
* Nilium has discovered that spite-votes exist on Stack Overflow.
mansi has quit [Remote host closed the connection]
splittingred has quit [Quit: splittingred]
mansi has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zendeavor> of course they do
RichardBaker has quit [Quit: RichardBaker]
mneorr has quit [Ping timeout: 245 seconds]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mklappstuhl has quit [Remote host closed the connection]
<tjbiddle> Nilium: Spite vote?
cj3kim has joined #ruby
khismetix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mansi has quit [Ping timeout: 240 seconds]
ehc has quit [Quit: ehc]
<Nilium> Yes. Downvotes in spite of correctness because you said something someone didn't like.
Kabaka has quit [Ping timeout: 240 seconds]
atyz has joined #ruby
arya_ has joined #ruby
<zendeavor> i rather despise when obviously wrong or unsatisfactory answers are accepted and upvoted
<Nilium> Or when really poorly written questions that amount to 'gimme the codes' get 5 upvotes.
xpirator has joined #ruby
kaspergrubbe has joined #ruby
<Nilium> I'd link to an example but it's an Obj-C question, so that's way off in irrelevant-as-heck land
<zendeavor> you could find 50 more
endash has joined #ruby
<Nilium> That'd require me to read them, which isn't pleasant
<zendeavor> =[
Kabaka has joined #ruby
stuartrexking has joined #ruby
stuartrexking has quit [Client Quit]
<davidcelis> what even is pleasant nowadays
* davidcelis sighs
emergion has joined #ruby
<Nilium> Scratching a parrot's cheeks.
mercwithamouth has joined #ruby
* zendeavor expects cattens
Rubas has quit [Quit: Page closed]
twoism has quit [Read error: Connection reset by peer]
twoism has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
anonymuse has quit [Remote host closed the connection]
Grieg has joined #ruby
BrianJ has quit [Quit: Computer has gone to sleep.]
NealJ has quit [Ping timeout: 246 seconds]
<Grieg> hello
<endash> Nilium: stallman is that you?
gstamp has joined #ruby
<Grieg> if x is an array is this valid? x.to_i
emergion has quit [Ping timeout: 260 seconds]
<Nilium> I rather dislike Stallman.
<Nilium> I just happen to keep parrots as pets.
apeiros has quit [Remote host closed the connection]
subbyyy has joined #ruby
<endash> >> Array.instance_methods.include? :to_i
<eval-in> endash => false (https://eval.in/40755)
SCRIPT_KITTEH has joined #ruby
apeiros has joined #ruby
<endash> RMS certainly is a trip. Great source of high quality beard hair, though.
linux_noob_666 has joined #ruby
<Nilium> I mostly have the video of him eating skin off his foot and my dad's stories about him to go by.
<SCRIPT_KITTEH> as someone who has been studying C for several months as their first programming language, but recently started studying ruby, WOW ruby is so refreshingly convenient
<endash> SCRIPT_KITTEH: we also have ice water
devoldmx3 has quit [Ping timeout: 260 seconds]
<SCRIPT_KITTEH> ha :P
osvico has joined #ruby
<SCRIPT_KITTEH> i love the methods, so nice
devoldmx has joined #ruby
moslemsry121 has joined #ruby
moslemsry121 has quit [Killed (idoru (Spam is off topic on freenode.))]
adamholt has quit [Ping timeout: 245 seconds]
erichmenge has quit [Ping timeout: 245 seconds]
tatsuya_o has quit [Remote host closed the connection]
adamholt_ has joined #ruby
duke_nukem has quit [Ping timeout: 245 seconds]
erichmenge has joined #ruby
BombStrike has quit [Ping timeout: 245 seconds]
Koshian has quit [Ping timeout: 245 seconds]
halfie has quit [Excess Flood]
duke_nukem has joined #ruby
_helloworld_ has quit [Remote host closed the connection]
Koshian has joined #ruby
xaxxon has joined #ruby
halfie has joined #ruby
<endash> dont get too caught up in metaprogramming. even six years in i still end up refactoring my "clever" metaprogramming back out into standard ruby
pothibo has quit [Quit: pothibo]
<Nilium> Likewise. Usually.
BombStrike has joined #ruby
x1337807x has joined #ruby
ninegrid has quit [Ping timeout: 260 seconds]
<SCRIPT_KITTEH> metaprogramming?
<xaxxon> anyone ever seen a paramter mismatch cause a stack too deep error? I'm calling __send__ on an object and passing in *params and when the function I'm calling isn't expecting anything, I get a stack too deep error
<xaxxon> I've defined BasicObject.method_added but I don't see anywhere in my code that calling this function should cause this to be called
<endash> SCRIPT_KITTEH: using methods like define_method, instance_exec, etc to programmatically rewrite your code
<Rylai> oh man, trying to make impressive looking code but it ends up just being an unreadable mess
<Rylai> happens to me all too often
<tjbiddle> endash: Agreed. I originally had an app I thought was all fancy with metaprogramming. If you use it properly it can be useful - but 9/10 you're going to do it wrong and just dig yourself a hole lol
popl has joined #ruby
_seanc_ has quit [Quit: _seanc_]
hackingoff has joined #ruby
<Nilium> SCRIPT_KITTEH: Programming, but meta. See http://en.wikipedia.org/wiki/Metaprogramming for a better definition than I can come up with off the top of my head.
<tjbiddle> Rylai: Right? I'm finally starting to learn to get functionality first - And *then* refactor into making it be 'more impressive' - but at least at that point I can generally find where I'm over engineering something easier.
m8 has quit [Quit: Sto andando via]
<SCRIPT_KITTEH> thanks
<Nilium> Think stuff along the lines of dynamically creating methods, classes, modules, and so on.
geggam has quit [Remote host closed the connection]
<Rylai> it happens a lot when one learns about something new, and then sees EVERYWHERE as a place to apply it
<tjbiddle> Yep, heh
<Nilium> It's useful, but it's easy to abuse it when it's not needed.
shevy has joined #ruby
Guest93127 is now known as nitrodex
efrainolivares has quit [Quit: efrainolivares]
<endash> also the "DSLs are sexy, `def` isn't" trap
<Nilium> Also the fact that they call them DSLs at all.
<hackingoff> how do i get mkmf available under ruby 2.0.x?
<endash> DSAPI?
<Rylai> hackingoff: do you have ruby-dev installed?
<Nilium> I prefer conveniently-designed APIs.
<shevy> hackingoff from source install has it so you must have a crippled ruby build
<shevy> if it is debian, they hide it under some name hmm let's see
<hackingoff> so i should try reinstalling from rvm?
<havenwood> hackingoff: How did you build Ruby?
<shevy> oh... from RVM? that would be strange
<hackingoff> i didn't grab it from upstream debian, just did a defaultish install from RVM
<hackingoff> i tried grabbing the 1.9.x dev to see if "which mkmf" would give me something, but that didn't fly
<zendeavor> as an aside, there's no such thing as upstream debian
marcdel has joined #ruby
<shevy> not sure... RVM compiles from source right? so it should have it... you would have a mkmf.rb ... perhaps it's messing with debian ruby on your system?
<hackingoff> zendeavor: meant to say "i didn't get it from the repo provided to ubuntu/debian via apt-get"
g0bl1n has joined #ruby
<tjbiddle> hackingoff: Make sure you're in a new shell as well so that everything gets sourced correctly and added to your $PATH
lethjakman has quit [Ping timeout: 240 seconds]
<hackingoff> this is on a fresh DO rails droplet, if that makes any difference. it's fresh enough that i don't mind nuking it from orbit and starting fresh
<hackingoff> s/g fresh/g over/
<shevy> on a standard debian it should be something like: apt-get install ruby2.0-dev
<shevy> don't even know what is DO rails droplet hehe
<hackingoff> digital ocean's default image
<Rylai> digitalocean :/
<hackingoff> it's ubuntu 12 LTS
<Nilium> That sentence was the freshest sentence ever
dik_dak has joined #ruby
<Nilium> Well, those sentences.
<hackingoff> too legit to not abusively repeat adjectives
<shevy> aha, ubuntu
<SCRIPT_KITTEH> eww ubuntu
<hackingoff> i was being lazy and don't see an obvious advantage in going with something like arch instead
<Rylai> arch is not much better
<shevy> hackingoff perhaps try apt-get before RVM here
<Rylai> debian is the server distro of choice lol
<tjbiddle> Whoa, whoa - Why the Ubuntu hate up in here?! lol
<hackingoff> shevy: will give it a shot
<Rylai> but yeah
<hackingoff> ubuntu hate in the linux community? IMPOSSIBLE
<Rylai> lol
<endash> hackingoff: splitting infinitives is fine, though
<SCRIPT_KITTEH> i use mint
<zendeavor> arch is beautiful <3
<shevy> tjbiddle I only hate them because they do not make it convenient and easy for people to uncripple builds
<Nilium> Slackware4lyfe
<tjbiddle> hackingoff: Maybe the Desktop OS - but for a server I love it
<Rylai> SCRIPT_KITTEH: hi5
<zendeavor> Nilium: manage your own god damn dependencies
<Rylai> i use debian on my server and mint on my desktop
<Nilium> I do :D
<shevy> slackware is nice because it wants to stay simple
<Nilium> Well, I did, until I switched to Mac OS.
<SCRIPT_KITTEH> Rylai: hi5 :)
<shevy> but the linux distributions are seriously flawed
<zendeavor> Nilium: now you don't manage anything about your computer anymore
<Nilium> It's a nice feeling.
<shevy> :D
<tjbiddle> Nilium: I feel you there - I used to hate on Apple so much until I started using OSX hah - Now I just hate on iPhone :p
devoldmx has quit [Ping timeout: 240 seconds]
<shevy> omg
<Nilium> I still like my iPhone, but I honestly don't care all that much for cellphones in general.
<zendeavor> i can't have that control ripped from my fingertips
nezumi has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<shevy> you are all geeks
<Nilium> nerrrrrrrds
<zendeavor> if i can't explain why software is on my system, i want it gone posthaste.
<hackingoff> i can out-nerd that.
<tjbiddle> Man - Forget you guys!
<hackingoff> endash: do you have trouble enjoying star trek, because of rigid adherence to arbitrary rules?
* tjbiddle goes to watch Battlestar Galactica
<hackingoff> DATED SCI-FI BURN
<endash> haha
<SCRIPT_KITTEH> how do you know if someone is an arch linux user? answer: they'll tell you
efrainolivares has joined #ruby
MrZYX is now known as MrZYX|off
<hackingoff> SCRIPT_KITTEH: hehe. just like gentoo, a couple years ago
<zendeavor> s/arch //
<Nilium> The only spaces I recognize are Spaceballs.
<hackingoff> "We ain't found shit!"
<SCRIPT_KITTEH> hackingoff: yep :)
<shevy> we must beat gentoo, they use python for emerge
<zendeavor> guys i use nixos
<zendeavor> beat that
<Nilium> I use HAIKU for full hipster power.
<zendeavor> beos ripoff, not impressed
<Nilium> and let me regularly tell you about how beos is superior
<zendeavor> ooooooh you can tab all your windows
<zendeavor> so what.
<endash> hex editor and magnet, baby.
<hackingoff> the scariest shit to me about digital ocean: rails project is served from /home/rails
<Nilium> Hex editor? My magnet _is_ a hex editor.
<shevy> nixos has a cool idea
<hackingoff> and they have you log in as root without explicitly telling you to make another account asap
<zendeavor> shevy: the cool idea is just nix
agatha has quit [Quit: Leaving...]
<zendeavor> nixos is just a few defaults for you to start with
<shevy> zendeavor I did not want to accept directory names like 78937236897629 though
Ciscoridze has quit [Quit: WeeChat 0.4.1]
<zendeavor> why? you don't have to deal with the hashes
<shevy> gobolinux spoiled me
<zendeavor> GOBO
rodacato has quit [Remote host closed the connection]
<shevy> /Programs/Ruby/2.0.0
<shevy> I dont have to guess what is inside
<zendeavor> well to be fair, you're not supposed to go trundling around in the package prefixes
<tjbiddle> hackingoff: Why would it matter where it's served out of? So long as permissions are set securely
<tjbiddle> Also - isn't DO just a cloud provider? Why would it be preset to anywhere?
Kruppe has joined #ruby
<shevy> hackingoff does mkmf work now?
<Nilium> I trundle wherever I like. I trundle in /etc and I trundle all over /var and sometimes I trundle in other users' home directories.
xaxxon has quit [Quit: This computer has gone to sleep]
<zendeavor> Nilium: omg shame on you
<Nilium> Trundle is an awesome word.
<shevy> on my 1.9.3 it is in PREFIX lib/ruby/1.9.1/mkmf.rb
<zendeavor> you're welcome.
<shevy> I hate /etc
<endash> all this trundling reminds me of the Bass-Rankin classic, 'Twas the Night Before Christmas
<zendeavor> /etc was a cool idea until we got more than 5 config files for our systems
labrat__ has joined #ruby
hackingoff has quit [Disconnected by services]
<zendeavor> you know what was a really dumb idea? /etc/conf.d/
<shevy> it always is a mess
<shevy> yeah all *.d sub entries
labrat__ is now known as hackingoff
<shevy> it's like putting layers on layers on layers to hide complexity
<tjbiddle> shevy: What!? How are .d directories a bad idea? They make things so much easier for organizational purposes
<zendeavor> reduce unnecessary hierarchy
<shevy> tjbiddle to put it into /etc
<shevy> tjbiddle config files should be retained for the given versioned package
cdmnsr has joined #ruby
<tjbiddle> shevy: Are we talking about something in particular here? I'm speaking of *.d/ directories in general
gyzmodo has quit []
<tjbiddle> Especially from a configuration management perspective - if I want to template a file via Puppet for example - I now just need to pop a file into a *.d/ directory rather than manage the entire parent file
<zendeavor> i was talking about /etc/conf.d
<tjbiddle> zendeavor: Gotchya
madht96 has joined #ruby
<zendeavor> like, on my system, libvirt stuff is in there alone
<shevy> I have /etc/fb.modes and I dont know from where it came
SCRIPT_KITTEH has quit [Quit: Leaving]
<shevy> I also have /etc/default/ and I dont know what this is
<zendeavor> and i don't know why libvirt should be in conf.d/ instead of maybe libvirt.d
<zendeavor> it makes no sense
madht96 has left #ruby [#ruby]
_seanc_ has joined #ruby
<shevy> we even used to have /usr/X11R6 :D
<zendeavor> /usr/share/misc
<zendeavor> g++ gets its own subdir in /usr/include even
<shevy> hmm
<zendeavor> mandated.
<zendeavor> man hier
realDAB has joined #ruby
<shevy> I have a /usr/include/c++/4.7.1/
AlSquire has quit [Quit: This computer has gone to sleep]
<zendeavor> /usr/bin/X11
<zendeavor> is the traditional place to look for X11 executables; on Linux, it usually is a symbolic link to /usr/X11R6/bin.
<shevy> I also disliked /usr/lib and /usr/lib64, for me things used to be easier without the lib64 stuff
<shevy> but of course they can not easily solve that because the .so file names are the same
<shevy> /usr/lib64/libgcrypt.so and /usr/lib/libcrypto.so
realDAB has quit [Client Quit]
devoldmx3 has joined #ruby
<zendeavor> would make sense to me as /usr/lib{32,64} at least
<zendeavor> but too much old software expects /usr/lib
rhys has quit [Quit: Leaving]
iliketurtles has quit [Quit: zzzzz…..]
maniacal has quit [Remote host closed the connection]
<popl> zendeavor: Eventually it will be time to break backwards compatibility. What a headache.
<zendeavor> windows has the same problem! Program Files(x86)
havenwood has quit [Remote host closed the connection]
<popl> what's with system[32]?
<zendeavor> no clue
<zendeavor> windows boggles my poor little mind
<hackingoff> if installation and uninstallation were clean, users wouldn't have to ferret around in those folders to begin with
<zendeavor> that's what package managers are for
shosti has quit [Remote host closed the connection]
<zendeavor> to fix the inadequate makefiles that vendors ship with awful make uninstall targets
<hackingoff> thing is that they're not always running something recent enough. i got an old version of node from apt-get that was inadequate for whatever i needed at the time
predator217 has joined #ruby
Lewix has quit [Remote host closed the connection]
<zendeavor> that's why i love arch, makepkg is so simple to use for getting updated or old versions
<hackingoff> i goess some software will have a custom PPA or something that can be added to try to mitigate that
<hackingoff> my current flirtation with linux is rooted in the ruby environment being less of a pain in the ass here than in windows
<zendeavor> writing a .deb or .rpm is far more hassle
gr33n7007h has joined #ruby
<zendeavor> well, a spec i should say
sarkis has quit [Ping timeout: 268 seconds]
<Nilium> My switch to OS X was basically justified by it having a terminal, a shell, moderate POSIX-compliance, and not being Windows.
<Nilium> Also better desktop applications than Linux had (at the time, anyway)
<zendeavor> i don't use desktop apps =[
<popl> When software companies break backwards compatibility they should hire firms like Academi to go around and "take care" of all the non-compliant stragglers.
* endash switched in order to be one of the cool kids
<hackingoff> i like video games. i could list a lot of other reasons, but i feel the one makes my point well enough.
lebek has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
<hackingoff> video games -> stuck in windows.
<zendeavor> if you wanna be cool, switch to ksh as your user shell
<Nilium> I like breaking backwards compatibility. Seems like it's the cause of a lot of grief in bringing new/good things into use.
<hackingoff> did rush die in its cradle?
JumpMast3r has joined #ruby
<zendeavor> backwards compatibility is a drain on software progression
<Nilium> You mean zsh or fish, the new hipster shells
<zendeavor> no, ksh is the ultimate hipster shell
<hackingoff> lack of backwards compatibility is a drain on adoption
<zendeavor> forever.
<Nilium> I must be out of the loop on hipster shells.
<hackingoff> real hipsters use a custom-written shell in brainfuck with a pretentious name like fuxie
cody-- has joined #ruby
<Nilium> Also, as far as rush goes, my assumption is that whoever was working on it realized it was a really bad idea.
<zendeavor> just like the perl shell and the python shell
<endash> what was the name of that quasi graphical shell a concept vid came out for a few years ago
cody-- has quit [Client Quit]
<endash> vauge things i barely remember, part 1
baroquebobcat has quit [Quit: baroquebobcat]
Megtastique has quit [Ping timeout: 246 seconds]
gildo has joined #ruby
<endash> termkit
<zendeavor> that's a terminal thing though isn't it
<hackingoff> vshnu?
maroloccio has joined #ruby
Inside has joined #ruby
jbpros has quit [Quit: jbpros]
ch_ has quit [Remote host closed the connection]
<endash> yeah its pretty limited, n/m
<endash> also writtin in node? wtf?
<endash> ok never mind
<zendeavor> how do you feel about finalterm ;]
gyre007 has joined #ruby
<endash> i think the original concept video was just pie in the sky, the actual implemetation is different
tgunr has joined #ruby
iliketurtles has joined #ruby
jamesaanderson has joined #ruby
<hackingoff> i'm kind of hoping lighttable gets somewhere
devoldmx has joined #ruby
Taranis has joined #ruby
<invsblduck> hackingoff: ^^lol
<zendeavor> that will be awesome
<hackingoff> hey, it could happen
<endash> oh maybe its lighttable
<hackingoff> lighttable isn't a shell; it's an editor, but that could be what you had in mind
waxjar has quit [Ping timeout: 245 seconds]
sparr has quit [Ping timeout: 256 seconds]
<endash> memory aint that great
<hackingoff> don't sweat it
<endash> i'm conflating both
nari has quit [Ping timeout: 256 seconds]
<hackingoff> ah, didn't realize it was a hog
blackmesa has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Read error: Connection reset by peer]
Megtastique has joined #ruby
<hackingoff> my compromise was having sublimetext with a livereload plugin. doesn't give me the value flow, but i get immediate feedback during webdev
<endash> last updated in november
trivol has joined #ruby
<endash> hmm
<shevy> hackingoff that's why appdirs are nice in principle, you can just remove that directory for uninstall action
devoldmx3 has quit [Ping timeout: 245 seconds]
<shevy> on the linux distributions, without a package manager you are kinda lost as to how to cleanly uninstall a program again
<hackingoff> shevy: what about user-specific artifacts, though? on windows, registry hive entries, stuff in c:\users\username\appdata, and dotfiles/dotfolders in linux?
oktapodi has joined #ruby
<hackingoff> you're sort of lost on windows too, it's just more subtle because registry entries don't shit up the file system
waxjar has joined #ruby
<endash> bring back ini files
<hackingoff> unless you opt for portable versions of programs, which is only viable in some cases (7-zip) and not others (sublimetext, games with user save data, etc.)
<shevy> windows can be confusing, see zendeavor's comment about Program Files(x86) directory
<Rylai> windows is ridiculous
<endash> uhm windows 8 is UNUSABLE
<endash> random keys do random things
<zendeavor> endash: ini files didn't go anywhere
<endash> i found myself button mashing to get anything done
<hackingoff> win8 is fine
<shevy> :(
<shevy> I'd wish they would have just improved on XP rather than try to change the world...
<endash> which is how i know i'm old
<hackingoff> i don't like the start screen. i'm weird
<endash> as a young lad i woulda eaten that shit up
<zendeavor> it was an improvement to XP! that's why it needed 4x the resources!
<shevy> but the mobile sector is changing things, gnome 3 looks like a smartphone app now
<hackingoff> i use gnome-do to launch stuff, so i'm probably not normal
<zendeavor> duh, don't you know anything
<zendeavor> hackingoff: wot, gnome-do is still a thing?
<zendeavor> that project died
<hackingoff> it didn't stop working
Nisstyre has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
<shevy> endash, yeah... these days, the less and less time I spend with computers, the better
<hackingoff> partial matching launcher? yes, please!
joshsmith has quit [Quit: joshsmith]
<zendeavor> of course but yeah
mneorr has joined #ruby
<shevy> the only thing I like with computers is ruby
oktapodi_ has quit [Ping timeout: 264 seconds]
<hackingoff> i'd rather hit toggle->su<enter> than have to click on some bullshit like a menu or dock
<zendeavor> it's the prettiest launcher i know but it ain't the only one with fuzzy matching
<hackingoff> list some others. i'm completely open to trying stuff out
<hackingoff> fuzzy matching was the only reason i bothered with gnome-do
<hackingoff> s/was/is/
<zendeavor> i never got a chance to dig into gnome-do but i know all the others i've experienced severely lack some of the extended functionality
<hackingoff> i mostly use it as an improved alternative to the alt-f2 mode of launching stuff
<zendeavor> for example, dmenu_run is a fuzzy-matcher
<shevy> I hated unity so much
<Rylai> alt-f2 is great :(
efrainolivares has joined #ruby
<shevy> one of the first things I usually do is open a terminal
<hackingoff> dmenu_run depends on dmenu, though
<zendeavor> it's...part of dmenu
<hackingoff> alt-f2 isn't fuzzy; gnome-do is
<zendeavor> dmenu_run is like a wrapper script for dmen
<zendeavor> u
<popl> dmenu!
<popl> \o/
<hackingoff> looking further into it
<zendeavor> [zendeavor@rancor tmp]$ file /usr/bin/dmenu_run
<zendeavor> /usr/bin/dmenu_run: POSIX shell script, ASCII text executable
<popl> I rarely use it but it's there.
<hackingoff> jesus christ, i see that linux project presentation is still about where it was in the 90s, when it comes to arch
<shevy> hehe
<zendeavor> not sure what you're talking about
<popl> huh?
burlyscudd has joined #ruby
<zendeavor> i just happen to live in my tmux
<popl> me too zendeavor
<popl> unless I'm in Firefox
<hackingoff> i had to click on a non-highlighted link/region to get to the screenshot page, then scroll down about 900 pixels before seeing the first thumbnail
<shevy> you damn geeks!
<zendeavor> the only gui app i have is firefox and termite-git =\
<shevy> I <3 GUI
<hackingoff> and it shows a shot from 2008 (though i assume the gui hasn't changed much since then)
<shevy> but I also always need a terminal
BRMatt has quit [Ping timeout: 260 seconds]
<zendeavor> hackingoff: dmenu is just a plain-ass bar, it barely supports fonts
<popl> Yeah.
<zendeavor> this is to be expected, from suckless.
<popl> It's pretty ugly.
<hackingoff> let me make sure i get this completely straight, then
<popl> :)
<popl> suckless doesn't give a fuck about presentation, IMO
<hackingoff> in order to get access to dmenu_run, i need to dedicate screen real estate to dmenu's static bar
rickmasta has joined #ruby
<hackingoff> popl: you bet
<popl> at least that's my impression
Buuyo has joined #ruby
<hackingoff> that puts dmenu(_run) behind gnome-do for my use case