<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
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]
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
<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]
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
<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]
<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!
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]
<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\"]")
<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 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?
<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]
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
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
<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>
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]
<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]
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]
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]
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
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
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.
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?
<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?
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]
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…]
<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
<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
<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