apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
fayimora_ has joined #ruby
cantonic has quit [Ping timeout: 265 seconds]
cantonic_ is now known as cantonic
heftig has joined #ruby
ramblex has quit [Quit: ramblex]
crazed_ has joined #ruby
wallerdev has joined #ruby
ohcibi_ has joined #ruby
drPoggs has joined #ruby
queequeg1 has joined #ruby
vladiim has joined #ruby
CheeToS has joined #ruby
vandemar has quit [Ping timeout: 264 seconds]
emmanuelux has quit [Ping timeout: 264 seconds]
fayimora has quit [Ping timeout: 264 seconds]
crazed has quit [Ping timeout: 264 seconds]
welterde has quit [Ping timeout: 264 seconds]
dr_Poggs has quit [Ping timeout: 264 seconds]
vandemar has joined #ruby
lupine_85 has quit [Ping timeout: 264 seconds]
graspee has quit [Ping timeout: 264 seconds]
ohcibi has quit [Ping timeout: 264 seconds]
fayimora_ is now known as fayimora
graspee has joined #ruby
emmanuelux has joined #ruby
Icehawk78 has quit [Ping timeout: 265 seconds]
lupine_85 has joined #ruby
Icehawk78 has joined #ruby
wpaulson_ has joined #ruby
burntbit has quit [Ping timeout: 276 seconds]
yannis_ has joined #ruby
yannis is now known as Guest6114
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
vikhyat has quit [Quit: vikhyat]
Guest6114 has quit [Ping timeout: 272 seconds]
vikhyat has joined #ruby
ZachBeta has joined #ruby
mockra has joined #ruby
welterde has joined #ruby
MrGando has quit [Remote host closed the connection]
vikhyat has quit [Client Quit]
Vert has quit [Ping timeout: 252 seconds]
ciopte7 has quit [Quit: ciopte7]
heftig has quit [Quit: leaving]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
tewecske has quit [Quit: Leaving.]
zeromodulus has joined #ruby
tommyvyo has joined #ruby
Vert has joined #ruby
hubub has quit [Quit: hubub]
ZachBeta has quit [Quit: Computer has gone to sleep.]
heftig has joined #ruby
berserkr has joined #ruby
ZachBeta has joined #ruby
slap has quit [Quit: slap]
MrGando has joined #ruby
ipoval has joined #ruby
hubub has joined #ruby
wmoxam has joined #ruby
wpaulson_ has quit [Read error: Connection reset by peer]
iocor has quit [Quit: Computer has gone to sleep.]
apincombe has joined #ruby
zeromodulus has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
akem has quit [Ping timeout: 265 seconds]
pu22l3r has joined #ruby
robozahn has quit [Ping timeout: 260 seconds]
ryan0x2_ has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
ryan0x2 has quit [Ping timeout: 240 seconds]
enigma has quit [Quit: leaving]
apincombe has quit [Remote host closed the connection]
yannis_ is now known as yannis
MrGando has quit [Ping timeout: 265 seconds]
williamcotton has joined #ruby
Banistergalaxy has joined #ruby
dekz has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
<offby1> tightwork: I'm pretty ignorant of Ruby, and have been using REXML. I'm not sure that qualifies as a recommendation, but ...
<offby1> it's pretty easy
timepilot has joined #ruby
banisterfiend has quit [Remote host closed the connection]
apprentice has joined #ruby
mockra has quit [Remote host closed the connection]
heftig has quit [Remote host closed the connection]
heftig has joined #ruby
liluo has joined #ruby
mockra has joined #ruby
vladiim has quit [Quit: vladiim]
mockra has quit [Remote host closed the connection]
davidcelis has quit [Ping timeout: 244 seconds]
_iMBA has quit [Read error: Connection reset by peer]
_iMBA has joined #ruby
_iMBA has quit [Changing host]
_iMBA has joined #ruby
mockra has joined #ruby
chrismcg is now known as zz_chrismcg
slap has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
liluo has quit [Remote host closed the connection]
heftig has quit [Ping timeout: 245 seconds]
liluo has joined #ruby
carloslopes has joined #ruby
vladiim has joined #ruby
mockra has quit [Remote host closed the connection]
heftig has joined #ruby
pu22l3r has quit [Remote host closed the connection]
banghouse has joined #ruby
td123 has joined #ruby
heftig has quit [Client Quit]
ben_m has quit [Quit: Leaving]
crankycoder has joined #ruby
tommyvyo has joined #ruby
Xai has quit [Quit: Konversation terminated!]
wyclif has joined #ruby
<wyclif> hi
gtuckerkellogg has joined #ruby
<wmoxam> oh hai
techno has quit [Quit: Leaving]
tshine has joined #ruby
ryanf has joined #ruby
UNIXgod has quit [Ping timeout: 265 seconds]
umttumt has joined #ruby
nirakara has joined #ruby
zeromodulus has joined #ruby
<wyclif> Mr. Rogers used Ruby. Do you?
hemanth has quit [Read error: Connection reset by peer]
Hanmac has quit [Ping timeout: 246 seconds]
hemanth has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
Rachel_ has joined #ruby
wpaulson has joined #ruby
savage- has joined #ruby
`brendan has quit [Read error: Connection reset by peer]
<Banistergalaxy> wyclif: so does bill cosby
VegetableSpoon has quit [Remote host closed the connection]
coolwaters has joined #ruby
nari_ has joined #ruby
ryanf has quit [Quit: broken pipes |||]
carloslopes has quit [Quit: Leaving]
grantbdev has quit [Remote host closed the connection]
ZachBeta has joined #ruby
sbanwart has quit [Ping timeout: 244 seconds]
iori has joined #ruby
ryanf has joined #ruby
coolwate_ has joined #ruby
cyong has joined #ruby
Hanmac has joined #ruby
coolwaters has quit [Ping timeout: 245 seconds]
timepilot has quit [Quit: timepilot]
vladiim has quit [Quit: vladiim]
liluo has quit [Read error: Connection reset by peer]
seanstickle has quit [Quit: Nihil sub sole novum]
centipedefarmer has quit [Quit: Leaving]
subbyyy has quit [Read error: Connection reset by peer]
iori has quit [Remote host closed the connection]
ryan0x2 has joined #ruby
keanehsiao has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
sepp2k has quit [Remote host closed the connection]
liluo has joined #ruby
vladiim has joined #ruby
ryan0x2_ has quit [Ping timeout: 272 seconds]
ryanf has quit [Quit: broken pipes |||]
olrrai has joined #ruby
noganex has quit [Ping timeout: 244 seconds]
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
subbyyy has joined #ruby
iori has joined #ruby
subbyyy has quit [Max SendQ exceeded]
noganex has joined #ruby
subbyyy has joined #ruby
<wyclif> writing some ruby for the first time, this is nice
burntbit has joined #ruby
banisterfiend has joined #ruby
silentpost has quit [Ping timeout: 244 seconds]
Banistergalaxy has quit [Ping timeout: 264 seconds]
freeayu has joined #ruby
coolwate_ has quit [Read error: Connection reset by peer]
sorbo_ has joined #ruby
coolwaters has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
x0F_ is now known as x0F
Markvilla has quit [Quit: Markvilla]
bwlang has quit [Quit: bwlang]
berserkr has quit [Quit: Leaving.]
radic has quit [Disconnected by services]
radic_ has joined #ruby
vladiim has quit [Quit: vladiim]
radic_ is now known as radic
manizzle has quit [Ping timeout: 246 seconds]
manizzle has joined #ruby
rgrinberg has joined #ruby
wpaulson has quit [Read error: Connection reset by peer]
wpaulson has joined #ruby
heftig has joined #ruby
ryan0x2 has quit [Ping timeout: 255 seconds]
silentpost has joined #ruby
Enekoos has quit [Remote host closed the connection]
ryan0x2 has joined #ruby
sorbo_ has left #ruby [#ruby]
Guedes has quit [Ping timeout: 252 seconds]
frishi has joined #ruby
goraxe has joined #ruby
cyong has left #ruby [#ruby]
wpaulson has quit [Read error: Connection reset by peer]
Vert has quit [Read error: Connection reset by peer]
cyong has joined #ruby
savage- has quit [Remote host closed the connection]
zeromodu_ has joined #ruby
zeromodu_ is now known as zeromodulus_
zeromodulus has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
ryanf has joined #ruby
banisterfiend has quit [Remote host closed the connection]
slap has quit [Quit: slap]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
<wyclif> how do i return a reversed string instead of just printing it out?
_iMBA has quit [Quit: Leaving.]
_iMBA has joined #ruby
<bnagy> return str.reverse or just have str.reverse as the last statement in a method
<bnagy> second way is more idiomatic
cyong has quit [Quit: Leaving.]
remmy444 has joined #ruby
vitoravelino is now known as vitoravelino`afk
<wyclif> bnagy: thanks, working on it
yannis has quit [Quit: yannis]
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
ryan0x2 has quit [Ping timeout: 276 seconds]
axiak has joined #ruby
banisterfiend has joined #ruby
MrGando has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
Prometheus has quit [Ping timeout: 246 seconds]
axiak has quit [Client Quit]
<wyclif> bnagy: I'm not sure how I can return the reversed string, without just printing it out. I'm not allowd to call the string’s reverse method.
axiak has joined #ruby
<bnagy> eh?
Asher has quit [Quit: Leaving.]
<bnagy> returning something from a method and printing something are totally different
pLameN_4o has joined #ruby
<bnagy> def foo; return "hi"; end and def foo; "hi"; end both return that string
banisterfiend has quit [Remote host closed the connection]
Asher has joined #ruby
<pLameN_4o> hi there, I just installed Aptana studio 3 and I wan't to test if everything is working. But I receive error: http://pastebin.com/svXXY9pf
mpereira has quit [Ping timeout: 240 seconds]
<pLameN_4o> I also downloaded ruby.ruble and extracted it in both My Documents and <user name> folders inside "Aptana Rubles"
<pLameN_4o> but I still get the error
<pLameN_4o> any help?
zeromodulus_ has quit [Read error: Connection reset by peer]
zeromodulus has joined #ruby
<wyclif> bnagy: for example I know how to do something like this but I'm confused by "returning" vs. "printing". I'm not allowed to call the string's reverse method https://gist.github.com/2946664
banisterfiend has joined #ruby
frishi has quit [Quit: Leaving...]
<bnagy> you return things from methods / blocks etc. That is neither
ZachBeta has quit [Read error: Connection reset by peer]
zeromodulus has quit [Remote host closed the connection]
asuka_ has quit [Ping timeout: 252 seconds]
ZachBeta has joined #ruby
<wyclif> bnagy: this is literally my first ruby program. it prints the string in reverse, but I need to *return* it, I'm not sure I get the distinction. I just need to return a reversed string
<bnagy> start with writing def bullshit_reverse( str ) ... new_str; end
CheeToS has quit [Ping timeout: 260 seconds]
<bnagy> then fill in the blanks
mtm3 has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
asuka_ has joined #ruby
rippa has joined #ruby
burntbit has quit [Read error: Connection reset by peer]
chimkan_ has joined #ruby
vladiim has joined #ruby
silentpost has quit [Ping timeout: 264 seconds]
aeontech has joined #ruby
aeontech has left #ruby [#ruby]
<Paradox> wyclif, strings can be treated like arrays fyi
<Paradox> try "hello world".reverse in irb/pry
<Paradox> [1] pry(main)> "hello world".reverse
<Paradox> => "dlrow olleh"
<banisterfiend> Paradox: do u know about gist -i
<Paradox> banisterfiend, yup
<Paradox> but this is 2 lines
<samuelkadolph> Paradox: No, they can't be treated like arrays in 1.9.
<Paradox> samuelkadolph, uh…yeah they can
<samuelkadolph> They have a few common methods, but they aren't arrays
<Paradox> i'm running 1.9.3-p194
<Paradox> oh well, yeah
<bnagy> Paradox: honestly, if you can't be bothered to read even 3 lines back you're going to be useless like 80% of thetime
akem has quit [Read error: Connection reset by peer]
<samuelkadolph> Paradox: You called String#reverse, not Array#reverse
<Paradox> samuelkadolph, yeah, nvm, i mispoke
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<Paradox> oh derp
<Paradox> wyclif, ruby has implied returns, however, if you want to force one, you can do return
dhruvasagar has joined #ruby
<Paradox> in your case, return string.reverse would return it, as would plain old string.reverse
<Paradox> banisterfiend, the only problem i have with the gist gem is it wants me to store my password in plaintext somewhere
<samuelkadolph> In 1.9 they removed Enumerable from String and instead you can call chars, bytes, and codepoints to get enumerables
<wyclif> Paradox: thanks, yes, this is derp-worthy as i am a n00b
Boohbah has quit [Remote host closed the connection]
<Paradox> wyclif, np
axiak_ has joined #ruby
graft_ has quit [Ping timeout: 245 seconds]
hunglin has quit [Quit: Leaving.]
graft_ has joined #ruby
chimkan_ has quit [Quit: chimkan_]
<Paradox> samuelkadolph, yeah, i was a derp, i forgot that if you wanted to treat it truly like an array you had to use .scan(/./)
<samuelkadolph> Paradox: That's a horrible way. Use #chars
<banisterfiend> or #chars or #lines :)
<Paradox> lol, til
rippa has quit [Ping timeout: 246 seconds]
chimkan has joined #ruby
axiak_ has quit [Quit: leaving]
_iMBA has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
<bnagy> hm I always use split '', chars.to_a is pretty cumbersome
<samuelkadolph> That's almost as bad as scan /./
_iMBA has joined #ruby
Karmaon has quit [Remote host closed the connection]
Karmaon has joined #ruby
asuka_ has quit [Ping timeout: 265 seconds]
<banisterfiend> Enumerators in 2.0 should be a lot more array like
<banisterfiend> finally getting Enumerator#+
<bnagy> s.chars.inject([]){|s,c|s.unshift c}.join ok that's my initial golf entry for "reverse a string without using reverse"
EzeQL has joined #ruby
moshee has quit [Ping timeout: 245 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
apprentice has quit [Read error: Connection timed out]
<wyclif> bnagy: thanks, actually that is helpful
<bnagy> I really wanted rotate! to work :(
<samuelkadolph> Pft
<samuelkadolph> "abc".chars.reduce([], :unshift).join
apprentice has joined #ruby
Prometheus has joined #ruby
emmanuelux has quit [Remote host closed the connection]
<Paradox> grump
<bnagy> oh that's sweet, I didn't know about that inject syntax
<banisterfiend> "john".chars.reverse_each.to_a.join
<banisterfiend> cheating or no? :)
<bnagy> hmmm well it's not using String#reverse, so I guess not
<bnagy> 2 chars shorter than samuelkadolph
<samuelkadolph> Then just do "abc".chars.to_a.reverse.join
<bnagy> yeah I guess :( not really in the spirit though
ananthakumaran has joined #ruby
imami|afk is now known as banseljaj
Boohbah has joined #ruby
wmoxam has quit [Quit: leaving]
wedgeV has joined #ruby
mayankkohaley has joined #ruby
asuka_ has joined #ruby
savage- has joined #ruby
_madcoder_ has quit [Ping timeout: 260 seconds]
pLameN_4o has left #ruby [#ruby]
mrdtt has joined #ruby
<wyclif> bnagy: I sent you an email about all this if you're willing to read it
cj3kim has quit [Ping timeout: 276 seconds]
_iMBA has quit [Quit: Leaving.]
yonggu_ has quit [Ping timeout: 246 seconds]
mockra has joined #ruby
<bnagy> eh? wth?
<samuelkadolph> Creeper level: 54
<banisterfiend> bnagy: he's in your house
andrew_ has joined #ruby
mrdtt has quit [Client Quit]
TheFuzzb_ has joined #ruby
zz_chrismcg has quit [Ping timeout: 260 seconds]
mrdtt has joined #ruby
poindont` has quit [Read error: Connection reset by peer]
poindont` has joined #ruby
ghanima has joined #ruby
mrdtt has quit [Client Quit]
Alxanr has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
Alxanr has quit [Client Quit]
marknyc has quit []
Jck_true has quit [Read error: Connection reset by peer]
* bnagy checks 3 different email addresses in trepidation
Jck_true has joined #ruby
vladiim has quit [Quit: vladiim]
andrew__ has quit [Ping timeout: 260 seconds]
TheFuzzball has quit [Ping timeout: 260 seconds]
zz_chrismcg has joined #ruby
<bnagy> I JUST MET YOU AND THIS IS CRAZY BUT HOW TO REVERSE STRING???
charliesome has joined #ruby
cj3kim has joined #ruby
<wyclif> no creeping, I just have no idea what I'm doing and asking for help with a few assigned problems
mrdtt has joined #ruby
<samuelkadolph> Wait, is he hitting on you?
crazymykl has quit [Ping timeout: 246 seconds]
mikemac has joined #ruby
balki has joined #ruby
<bnagy> wyclif: emailing someone on IRC is creepy. Did I write my email address across my forehea and forget about it or something?
mockra has quit [Remote host closed the connection]
<Paradox> bnagy, for quoting that dumb song i'm now ignoring you :p
<bnagy> Paradox: it's a song?
<wyclif> bnagy: oh. ok. forget it. thanks anyway.
yonggu has joined #ruby
<bnagy> wyclif: I mean I don't mind helping, but that's a little outside my safe, happy place.
<samuelkadolph> bnagy: Having your full name on IRC probably doesn't help with that
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
<bnagy> [HAPPY--------|---NEEDANADULT]
<heftig> bnagy: he probably tried to send to your hostmask
vladiim has joined #ruby
<wyclif> bnagy: forget it. i'll try stackoverflow
<bnagy> samuelkadolph: yeah but that would imply that I am on google or something
mockra has joined #ruby
<wyclif> bnagy: eh, i *did not* google you. let's get that bit understood.
<bnagy> bzzt
<heftig> and hey, if you run a smtp server in a classic unix configuration that might actually successfully deliver mail to you
Progster has quit [Read error: Operation timed out]
<bnagy> wyclif: ahok...don't think you emailed me, then. Phew.
<Paradox> bnagy, yup, and the dumbshit redditors who keep parroting it will shit themselves to tell you how much they dont listen to "mainstream" radio
<wyclif> bnagy: nope that's why I asked you first
ianmassey-mob has joined #ruby
<banisterfiend> wyclif: how did u find his email address
mockra has quit [Remote host closed the connection]
<banisterfiend> oh
<bnagy> wyclif: in general I'm against doing people's homework for them, cause they don't learn, but most of us are happy to help with clarifications as long as it looks like you're trying
ianmassey-mob has left #ruby [#ruby]
<bnagy> Paradox: you would be amazed at how little mainstream media I get here. I just know it from imgur.
mayankkohaley has quit [Ping timeout: 264 seconds]
<Paradox> bnagy, i didnt know it was a song till my girlfriend told me
<Paradox> lol
<bnagy> I only do metamemes
<Paradox> and she's not very mainstream either
<wyclif> bnagy: right. i get that. i really don't want to be walked through it cos i agree that's no way to learn anything
<Paradox> here's a topic of conversation
Alxanr has joined #ruby
<wyclif> bnagy: i just need more time
Alxanr has quit [Client Quit]
<Paradox> progress bars
<bnagy> Paradox: it's not that I'm consciously anti-mainstream, it's just that I have no occasion to be exposed to any media except the internet
<Paradox> there are tons of gems out there
<Paradox> and most of them suck dick
<Paradox> bnagy, i just dont listen to radio, other than the occasional NPR or classical station, dont watch tv, and dont read the newspaper
<Paradox> so yeah, i get you
<Paradox> anyway
<Paradox> any recommendations for a good progress bar gem?
<bnagy> is that apropos progress bars or just in general?
<bnagy> cause I'd be willing to grant it as a general statement of fact
akem has quit [Ping timeout: 245 seconds]
<Paradox> lets say…wget style ones
<Paradox> that is [--- ] 30% 230kb…
td123 has quit [Quit: WeeChat 0.3.8]
EstanislaoStan has quit []
perryh_away is now known as perryh
<Paradox> tons of them…
ZachBeta has quit [Quit: Computer has gone to sleep.]
<bnagy> only time I have ever done anything like that I used the magic or \r
<bnagy> *of
<Paradox> heh
<Paradox> \r is the rewrite line right?
* Paradox is slightly durnk
perryh is now known as perry
<bnagy> aka half of the windows EOL bullshit, yeah
<Paradox> https://github.com/peleteiro/progressbar looks kind of nice
<Paradox> as does this one, lol: https://github.com/paul/progress_bar
savage- has quit [Remote host closed the connection]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
niklasb has quit [Read error: Operation timed out]
<Paradox> ooh, powerbar looks nice https://github.com/busyloop/powerbar
<ryanf> I've used that peleteiro one
andreime has joined #ruby
<ryanf> I'm sure they're all basically the same
<ryanf> I definitely recommend having a progress bar gem though, mostly because getting an automatic ETA on long-running tasks is awesome
BadAtom is now known as JvK
<Paradox> yeah, i have a little script right now…and this would be very useful
<Paradox> my script sends messages to multiple reddit users, and opens the user's text editor to write the messages
<Paradox> i dont want to package it for easy use though, too much script-kiddie abuse potential
<graspee> i read that so wrong
JvK is now known as BadAtom
<Paradox> wow
<Paradox> power-bar is nice
<Paradox> lets you change description text mid-progress
<Paradox> ie could say sending to user1 then switch to sending to user2
cyong has joined #ruby
Guedes has quit [Remote host closed the connection]
ZachBeta has joined #ruby
bfgun has joined #ruby
mtm3 has quit [Ping timeout: 245 seconds]
bfig has quit [Ping timeout: 260 seconds]
ananthakumaran has joined #ruby
stephenjudkins has joined #ruby
macmartine has quit [Quit: macmartine]
Synthead has quit [Quit: p33 ba115]
CheeToS has joined #ruby
alexmin has joined #ruby
macmartine has joined #ruby
vladiim has quit [Quit: vladiim]
noyb has joined #ruby
mockra has joined #ruby
Rachel_ has quit [Quit: Why is the alphabet in that order? Is it because of that song?]
vladiim has joined #ruby
<billiamii> TIL: There are gems available to hook omegle right up to clever bot with minimal work required...
BrightSyde has joined #ruby
Siphonblast2 has joined #ruby
yoklov has quit [Quit: bye!]
thecreators has quit [Quit: thecreators]
olrrai has quit [Ping timeout: 246 seconds]
<Siphonblast2> uggggh. This has been driving me up the wall. Someone please, please, please tell me why I keep getting 'undefined method my_sort'
<Siphonblast2> yes, I know. It's a redundant method. It's stupidredundantware.
lkba has quit [Ping timeout: 265 seconds]
<graspee> Siphonblast2: are you defining the method for strings?
<ryanf> Siphonblast2: gets returns a string
<ryanf> I believe it is short for "get string"
<graspee> yeah so it's not a method that strings will accept
<Siphonblast2> Yeah, I realize that, but I have absolutely no idea what the equivalent of gets is for arrays. (thanks a lot for the quick response btw).
<graspee> just change class Array
<graspee> to class String
<Siphonblast2> but what I'm trying to sort an *array* not a *string*. Are you recommending that I do that so that gets will work, or because you think that I'm dealing with strings?
wedgeV_ has joined #ruby
<graspee> you are dealing with a string
<graspee> a string comes back from gets
wedgeV has quit [Read error: Connection reset by peer]
wedgeV_ is now known as wedgeV
<graspee> then you are trying to call the my_sort method on that string
<ryanf> ^^
<Siphonblast2> okay, so when I get input from the user, and they input [x, y, z] what you're suggesting will still work?
ryanf has quit [Quit: leaving]
<Siphonblast2> I don't understand, I thought that it had to be dealt with as an array.
<graspee> whatever the user types will be a string
EskiMag has joined #ruby
<Siphonblast2> oh. wow. okay.
<graspee> you can convert it into something else obviously if you want
<Siphonblast2> I find that.. a bit. Odd/unintuitive.
<graspee> but the reason you're getting method not found is because you've defined a new method for the array class
<graspee> and then trying to call that method on a string
<graspee> and string doesn't know how to "my_sort"
banisterfiend is now known as horseman
<horseman> graspee: sup grasspiss
vladiim has quit [Quit: vladiim]
<Siphonblast2> Okay.
<graspee> Siphonblast2: you can do eval input
<graspee> and if the user entered [2,3] then you'll get an array
<graspee> but what if they don't enter an array?
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<Siphonblast2> I'm not quite sure how to do that (use eval).
<graspee> just like i said do eval input
<graspee> change input = gets into input = eval gets
<Siphonblast2> eval(input) ?
<graspee> but it's very ugly and error prone
fantazo has joined #ruby
<graspee> no
<graspee> what i typed
<Siphonblast2> hmm okay.
<graspee> ah wait i made a mistake
<graspee> i'm a noob but i'm the only one typing so i'll try it out hang on
<Siphonblast2> I can just make a control structure to handle the errors, correct? in psuedo code: if == EOF, puts 'enter an array'
<Siphonblast2> well kinda psuedo-code. heh.
<graspee> input = eval gets
ZachBeta has quit [Read error: Connection reset by peer]
<Siphonblast2> hmm
<bnagy> no no nonononono eval gets no
<graspee> but if you do input = eval gets and then try to do input.my_sort then you will get an error unless the user typed in an array e.g. [3,4]
<Siphonblast2> Sorry, but did I miss something else that you said? I changed the line to: input = eval gets
<Siphonblast2> and I'm getting the same error.
<graspee> what are you typing in for input?
nipra has joined #ruby
<graspee> when you test it
<Siphonblast2> (an array)
<Siphonblast2> I know there is something glaringly wrong I did.. so frustrating.
<Siphonblast2> I just can't see it.
ZachBeta has joined #ruby
<graspee> why are you writing code to sort an array anyway
<graspee> is this an assignment?
<Siphonblast2> yes.
<Siphonblast2> bloatware.
<Siphonblast2> #ohgodmakethepainstop
<bnagy> it's a really bad sort, btw :)
<Siphonblast2> I know
<Siphonblast2> but it's rudimentary enough for me to at least attempt.
<bnagy> ask the user to enter just numbers, separated by space or comma
<Siphonblast2> while I have a rudimentary knowledge of not only ruby, but also algorithms.
<bnagy> then split on that token
<Siphonblast2> insertion sort == uhhh
<bnagy> then at least you can error check
<graspee> he could use super ugly error checking the old way
<graspee> by checking the class of evaling the gets
<Siphonblast2> using just numbers, separated by commas gives me a syntax error (unexpected ',')
<Siphonblast2> I'll try without
<bnagy> a=gets.chomp.split(' '); fail"wrong" unless a.all? {|e| e.kind_of? Numeric}
<graspee> do you not think that line will stand out a mile compared to the way he's written the other lines?
<bnagy> no, eval gets is facestab territory
ananthakumaran has quit [Quit: Leaving.]
<graspee> sometimes mentioning eval is the only way to get people to talk
<Siphonblast2> goodness bnagy, what the hell is that you just wrote? I understand the assignment and chomp and split methods, but after that..
<bnagy> it just checks to make sure everything in the array you just made is kind of a number
<horseman> bnagy: nagg-dogg, go to armenia for your next mission i'll be cruising around that area too with my posse of beautiful young travellers
<graspee> teacher: "and who wrote this homework for you?"
<bnagy> although your array will work for everything that's comparable
<Siphonblast2> a sadist.
<Siphonblast2> I can't believe this is so complicated for me.
mayankkohaley has joined #ruby
<bnagy> horseman: nah, it's gonna be in asia somewher, almost certainly
<bnagy> Siphonblast2: look, there are two issues, just take them one at a time
<bnagy> first, make your sort work with a hardcoded array
<horseman> bnagy: yeah, good choice asian women are the bomb
<bnagy> next, work on getting an array from user input
yxhuvud has joined #ruby
andrew_ has quit [Remote host closed the connection]
andrew_ has joined #ruby
andreime has quit [Quit: Konversation terminated!]
chuck has joined #ruby
<Siphonblast2> @bnagy it works with a hardcoded, but if and only if I change the class to 'Array'. Otherwise, I get an undefined method error.
<Siphonblast2> The main problem is getting an array from user input
<bnagy> it should dfefinitely be defined on Array not String
<Siphonblast2> which I just fundamentally am absolutely lost.
<bnagy> a=gets.chomp.split(' ')
<Siphonblast2> that's what I thought.
<bnagy> or split ',' whatever
stephenjudkins has quit [Quit: stephenjudkins]
<bnagy> or gets.chomp.scan(/\d+/)
<bnagy> or...
<Siphonblast2> sorry for making you baby me, but can you explain why it's ',' rather than ' ' ?
<chuck> do any of you guys have experience with building gems that use bundler for dependencies?
<bnagy> well you have to tell the user which one you're expecting
<bnagy> except for the last way, but that's sneaky
<chuck> i'm running into an issue where I have "em-synchrony" and "thin" in my gemspec, and when I try to run bundle, it says this: https://gist.github.com/2946965
<chuck> (stratus is my gem)
<horseman> chuck: stratus is a nice name for a gem
<chuck> ah, I think I figured it out haha, nevermind!
<chuck> horseman, thanks!
stephenjudkins has joined #ruby
<chuck> to avoid being that person that asks a question, solves his problem, and leaves without sharing the solution, I just had to run "bundle update"
tamaldeaca has quit [Remote host closed the connection]
bier has quit [Quit: Ex-Chat]
tamaldeaca has joined #ruby
<Siphonblast2> @bnagy, your suggestion almost works. I may have interpreted what you said incorrectly, though.
andrew_ has quit [Ping timeout: 272 seconds]
<Siphonblast2> but what I get from the input is not a parsed array.
<Siphonblast2> it's basically weirdly sorted number printed on newlines
<Siphonblast2> but at least there are no errors
<Siphonblast2> interpreter-wise
robozahn has joined #ruby
andrew_ has joined #ruby
<bnagy> what text did you enter? And which code did you use?
alexmin has quit [Ping timeout: 272 seconds]
<Siphonblast2> output is an array with a bunch of elements that are ","
<Siphonblast2> and the sorted numbers, but 2, 3, 6, 7 from [6, 3, 27]
<Siphonblast2> so 27 got turned into two individual numbers.
<bnagy> uh is that split '' or ' ' (space)?
<bnagy> I'm betting ''
<Siphonblast2> you're correct.
<Siphonblast2> let me change it.
apprentice has left #ruby [#ruby]
<Siphonblast2> and now the output is weird
gtuckerkellogg has joined #ruby
<Siphonblast2> this program fucking hates me
<Siphonblast2> it *is* sorting correctly, however.
<Siphonblast2> and it *is* putting the numbers into an array
<bnagy> do p input after you get the input
<Siphonblast2> which is what I wanted.
<Siphonblast2> but
<Siphonblast2> formatting is bizzare.
<bnagy> to make sure it's what you expect
<Siphonblast2> okay.
<Siphonblast2> as in, p .input.my_sort?
<bnagy> also 'bizarre' and 'weird' are not problem statements
<Siphonblast2> sorry
<bnagy> no just p input
khakimov has joined #ruby
<bnagy> otherwise I would have said something else
h4mz1d has joined #ruby
<Siphonblast2> okay.
mikepack has joined #ruby
<Siphonblast2> p input gives me an array within an array.
tamaldeaca has quit [Quit: http://quassel-irc.org - Chatee cómodamente donde sea.]
<bnagy> it might help if you added the output to that gist
tamalsunh0 has joined #ruby
<Siphonblast2> ["[27,", "3,", "6]"]
<Siphonblast2> is the output from [27, 3, 6] as input
<Siphonblast2> using p input
<bnagy> oh right
<bnagy> just enter numbers separated by spaces, nothing else
paulmars has joined #ruby
ebanoid has joined #ruby
<paulmars> why does stout for `which cmd` not return anything in rib but work perfect in terminal: https://gist.github.com/2946989
<Siphonblast2> [27 3 6] yields ["3", "6]", "[27"]
<paulmars> other stdouts appear to work as expected
<Siphonblast2> really odd formating.
<bnagy> Siphonblast2: just enter numbers, separated by spaces. Nothing else. Do not enter any characters that are not numbers, space or enter.
<paulmars> 1> ensures that stout is being used correct?
<paulmars> but when backticks are used in irb, nothing is returned
<bnagy> no 1> redirects stdout
<horseman> offby1: sup e-dogg
<paulmars> sorry, OSX autocorrect. isn't that what I have. stdout in all situations?
<Siphonblast2> bnagy: when I do as you say, it returns what I entered, unsorted and in an array
<bnagy> paulmars: oic, you're trying to which an alias. I'm betting that's your issue, try `which ls`
noyb has quit [Ping timeout: 252 seconds]
<Siphonblast2> so 27 3 6 >> ["27", "3", "6"]
robozahn has quit [Ping timeout: 250 seconds]
<paulmars> bnagy: that works great. i'm trying to check if an alias exists in my system using ruby
hemanth has quit [Read error: Connection reset by peer]
<bnagy> Siphonblast2: correct. Then do my_sort on that
<paulmars> so i'm only curious about aliases
<bnagy> paulmars: well aliases are user shell specific
<Siphonblast2> shouldn't the line p input.my_sort be doing that already?
<bnagy> there is no such thing as an alias 'in a system'
hemanth has joined #ruby
<paulmars> bnagy: fair enough, is there any way to check if a user runs a ruby script?
<bnagy> Siphonblast2: yes. You have two p statements, right?
<tyman> what's the best gem for pulling users from active directory? (belch)
<tyman> s/belch/blech/
<Siphonblast2> no, bnagy, I do not. I simply have what I said. What did I miss? As in, what is the second p statement supposed to be?
MrGando has quit [Quit: Bye]
<bnagy> paulmars: uh `whoami` should work
<bnagy> Siphonblast2: input=gets.chomp.split(' '); p input; p input.my_sort
tvw has joined #ruby
<bnagy> first p should show an unsorted array, second should show a sorted one
rakunho has joined #ruby
wedgeV has quit [Quit: wedgeV]
SeySayux has quit [Ping timeout: 252 seconds]
<bnagy> paulmars: if you want to get aliases for the current user I think you're going to have to go grubbing around in env or something... sounds like google time
<paulmars> bnagy: thanks, i appreciate your help
<Siphonblast2> bnagy: I did as you said, and it is *really* close to being what I want. It prints the first array (input) as expected.
<paulmars> bnagy: i promise i did google, searching for ruby + alias obvious leads to a bunch of inaccurate pages for what I'm curious about. unfortunetly
<Siphonblast2> however, the second array isn't sorted.
<bnagy> paulmars: I would just work out how to do in in *nix
robozahn has joined #ruby
<Siphonblast2> it does: ["6", "3", "27"] >> ["27", "3", "6"]
<bnagy> Siphonblast2: pastie code again, and output. If the second array isn't sorted then your sort is broken or you're not calling it
<Siphonblast2> when I tested the sort, using a hardcoded array, it worked fine.
<Siphonblast2> I am so puzzled by this.
macmartine has quit [Quit: macmartine]
<bnagy> did you enter exactly the same array as you tested? :)
<bnagy> (no)
<paulmars> bnagy: thanks again. : )
Asher has quit [Remote host closed the connection]
h4mz1d has quit [Ping timeout: 246 seconds]
gregorg has quit [Read error: Connection reset by peer]
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
Asher has joined #ruby
<Siphonblast2> oh gosh you're right..
<Siphonblast2> no idea why it only works with the specific array I tested..
<bnagy> because your sort is buggy
horseman has quit [Ping timeout: 276 seconds]
ananthakumaran has joined #ruby
neersighted is now known as neersight[d]
graft_ has quit [Ping timeout: 255 seconds]
djdb has joined #ruby
graft_ has joined #ruby
fulmato has quit [Ping timeout: 240 seconds]
_iMBA has joined #ruby
mockra has quit [Remote host closed the connection]
EskiMag has quit [Quit: EskiMag]
wyclif has quit [Ping timeout: 245 seconds]
keanehsiao has quit [Quit: keanehsiao]
SeySayux has joined #ruby
digitalcakestudi has quit [Ping timeout: 244 seconds]
<Siphonblast2> the sort works with any hardcoded array.
<Siphonblast2> it's input that is the problem.
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
lxsameer has left #ruby [#ruby]
nirakara has joined #ruby
<bnagy> ahhh wait wait wait :) You're getting string sort
mtm3 has joined #ruby
Boohbah has quit [Remote host closed the connection]
<bnagy> input=gets.chomp.split(' ').map {|e| Integer( e ) }
<bnagy> string < is different to Fixnum <
Alxanr has joined #ruby
Alxanr has quit [Client Quit]
mockra has joined #ruby
BrightSyde has quit [Quit: On the other hand, you have different fingers.]
chimkan has quit [Quit: chimkan]
nirakara has quit [Ping timeout: 244 seconds]
<Siphonblast2> now it's 'invalid value for Integer().
<Siphonblast2> at this point I'm almost convinced that nothing I put in this interpreter will work :/
zomgbie_ has quit [Ping timeout: 245 seconds]
jameshyde has joined #ruby
<Siphonblast2> it works if and only if
andrew_ has quit [Remote host closed the connection]
<Siphonblast2> you enter numbers separated by spaces only
<Siphonblast2> like you said
<Siphonblast2> but the interpreter throws an error if the user enters an array.
<Siphonblast2> which is unfortunate :(
paulmars has quit [Quit: paulmars]
andrew_ has joined #ruby
<bnagy> you can't 'enter an array'
<bnagy> you can enter characters that look like ruby code for an array
<bnagy> but don't
Siphonblast has quit [Remote host closed the connection]
<bnagy> the line above, with Integer(e) is designed to throw an exception if the element can't be turned into a number
chimkan has joined #ruby
rakunho has quit [Quit: Saliendo]
burgestrand has quit [Quit: Leaving.]
<Siphonblast2> so is there a way to make it such that:
stewart_ has quit [Quit: Leaving.]
<Siphonblast2> my_sort(3,1,2) returns (not prints) [1,2,3]?
nirakara has joined #ruby
andrew_ has quit [Ping timeout: 276 seconds]
<bnagy> your my_sort is a method on Array
<Siphonblast2> I'm sorry.
punkrawkR has quit [Read error: Connection reset by peer]
<Siphonblast2> I typoed.
<bnagy> [3,1,2].my_sort will return [1,2,3]
williamcotton has quit [Quit: williamcotton]
_iMBA has quit [Quit: Leaving.]
<Siphonblast2> I want to write a method that takes an array as an argument, though.
<bnagy> ...
<Siphonblast2> my_sort([3,1,2] >> [1,2,3]
<Siphonblast2> Did I misunderstand you?
<Siphonblast2> I apologize..
<bnagy> ok, well that's not what you've got
mikepack has quit [Remote host closed the connection]
<graspee> what course is giving ruby homework anyway?
<graspee> because on principle i'd say 'cool course'
BrightSyde has joined #ruby
<Siphonblast2> how do I do that? doing my_sort(Array) or my_sort([]) or my_sort(Array[]) did not work
<Siphonblast2> as in, I tried each separately.
<graspee> but on the individual task you've been given i'd say, not very imaginative
<bnagy> Siphonblast2: you would need to define my_sort differently
<Siphonblast2> graspee: http://www.hashmaplabs.com/app_academy/code_test (I'm on assignment two.. it's due in less than an hour. I'm screwed.)
<Siphonblast2> but I'm trying.
<bnagy> Siphonblast2: why do you want to completely change everything when it is working?
BrightSyde has quit [Client Quit]
<graspee> if i understood right then, the code test is so they can see your level of ability before the course or something?
Bosma has quit [Ping timeout: 252 seconds]
nirakara has quit [Quit: This computer has gone to sleep]
<Siphonblast2> correct.
_iMBA has joined #ruby
<graspee> well surely you don't want to cheat then
<Siphonblast2> and clearly I've not met that standard.
TPFC-SYSTEM has joined #ruby
<Siphonblast2> I've been working on this for days.
<Siphonblast2> It's sad, it truly is.
<graspee> or they will think your skills at are a different level than they are and they can't give you the best help you need
<Siphonblast2> this is the most frustrating thing I've ever done.
<Siphonblast2> probably.
<Siphonblast2> but the weirdest thing is, they don' t expect any coding experience.
<Siphonblast2> as they say in the requirements/ summary of what they're looking for.
<Siphonblast2> and they say it should be able to be accomplished with a few hours of work a day.
<Siphonblast2> and yet, I've programmed some things in java before attempting this test, and still am at an absolute loss.
<bnagy> Siphonblast2: you're flailing. It's common.
<graspee> have you tried reading the materials they suggest on that page?
<bnagy> you're changing too many things at once, and not thinking through what you're doing
<Siphonblast2> Yes, I've read everything that is relevant.
<Siphonblast2> including more
<Siphonblast2> and excerpts of the ruby-doc.
dnyy has joined #ruby
<bnagy> like I said, your code is _working_ (assuming you put in the Integer map)
<Siphonblast2> anything I could possibly find. and similar things on stack overflow
<bnagy> you're just entering junk data
<graspee> maybe ruby is not the language for you then
<graspee> is this a paid course or something you've already paid for?
<Siphonblast2> this is a test to get into a course that I haven't paid for.
<graspee> but is it a course you pay for if you do it?
<Siphonblast2> that is going to be hosted near my location in a month.
<Siphonblast2> No.
<graspee> oh ok then
<Siphonblast2> except, when they redo it in the fall, after the initial run, it will be 7,500
<Siphonblast2> but for this initial run, it's free, on a scholarship so they say.
<graspee> is this like a beta then hehe
<Siphonblast2> yep.
<Siphonblast2> I was really excited for it too.
<Siphonblast2> now, honestly, I'm just cursing at ruby and about to give up. I guess I'm just not cut out for this.
<graspee> it's not ruby at fault thuogh
<Siphonblast2> this is going to sound absurd I guess to some , but I find C *way* easier than this..
<graspee> you kind of just dived into it too fast and need results faster than you will get them
<Siphonblast2> *that* is exactly what frustrated me the most.
<Siphonblast2> I'd have no problem, and want to, spend the next week debugging this if I have to.
<Siphonblast2> but I have a little over 30 minutes.
<Siphonblast2> it's so frustrating.
<Siphonblast2> my effort yields nothing under this time constraint.
nyuszika7h has quit [Quit: WeeChat 0.3.9-dev]
<Siphonblast2> which makes me feel like it's useless.
<graspee> well you could always submit what you have
<Siphonblast2> I will, but I'm absolutely disgusted and repulsed by it.
<graspee> maybe if they are testing the course they will want people from a broad range of skills and experiences
horseman has joined #ruby
<Siphonblast2> and embarrassed to send it.
bradhe has quit [Remote host closed the connection]
<graspee> ah the embarassment of showing off bad code
<Siphonblast2> well, yeah, that's always possible.
<graspee> i remember the days of when i'd rather show my naked body than my bad code
<Siphonblast2> Hearing you say that does make me feel a bit better at that possibility.
<Siphonblast2> hah.
<graspee> now my code is still bad but i have more confidence
<Siphonblast2> same here, right now.
<Siphonblast2> this code is atrocious, and I don't want *anyone* to attribute it to anything within a 50 miles radius of me.
<Siphonblast2> and the more I attempt to debug this, the more exhausted I get. :/
<Siphonblast2> which makes my debugging, obviously, less effective, since I've been doing this for 6 hours :/
<bnagy> what's to debug?
<Siphonblast2> only handling the input.
<Siphonblast2> works fine on a hardcoded array.
<bnagy> the code works
<Siphonblast2> yeah it did.
<Siphonblast2> but then, once I realized that it didn' t exactly fit the parameters of what they asked for.
<Siphonblast2> I changed something, and now it's all broken.
dhruvasagar has quit [Quit: Lost terminal]
<bnagy> all you were seeing was string sort behaviour when sorting strings
<bnagy> which is not unusual
EskiMag has joined #ruby
fantazo has quit [Remote host closed the connection]
alexim has quit [Ping timeout: 245 seconds]
<Siphonblast2> Yeah.
<bnagy> but the exercise has nothing to do with handling input
dhruvasagar has joined #ruby
<Siphonblast2> But what they asked for in the assignment was, (well, I'll just paste it):
<Siphonblast2> Write a method, my_sort, which takes an array as an argument and returns a sorted array. Make sure you return the sorted array; do not merely print it out. Do not worry how fast your sort method might be. It’s more important that your solution be clear and easy to understand. You should not use the array sort method.
<bnagy> yeah I read it
<Siphonblast2> oh
<Siphonblast2> my bad then.
<bnagy> you implemented Array#my_sort, which is just as good
<Siphonblast2> yeah. Honestly, I get the impression that they're nowhere near pedantic enough to scrutinize so heavily for new coders, especially when they asked for such a redundant method implementation.
<horseman> bnagy: hey naggy
robozahn has quit [Read error: Operation timed out]
<bnagy> Siphonblast2: to convert it all you need to do is take it out of Array, make it take a paramater like ary, and then replace all occurences of self with ary (although some of them are implied)
<bnagy> easy :P
ctwiz has joined #ruby
senny has joined #ruby
tamalsunh0 has quit [Quit: http://quassel-irc.org - Chatee cómodamente donde sea.]
<freeayu> anyone uses evernote-sdk-ruby?
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rakunho has joined #ruby
BrightSyde has joined #ruby
<Siphonblast2> I'm sorry bnagy, I truly am too exhausted to understand that at the moment.
<Siphonblast2> I've gone 6 hours without a break.
<Siphonblast2> I can barely think at this point.
subbyyy has quit [Quit: Leaving.]
Prometheus has quit [Ping timeout: 260 seconds]
rakunho has quit [Remote host closed the connection]
ZachBeta has quit [Read error: Connection reset by peer]
ZachBeta has joined #ruby
Siphonblast2 has quit [Ping timeout: 240 seconds]
ph^ has joined #ruby
heftig has quit [Quit: leaving]
ctwiz has quit [Quit: ctwiz]
nyuszika7h has joined #ruby
A124 has joined #ruby
A124 has left #ruby [#ruby]
jprovazn has joined #ruby
tomb_ has joined #ruby
Morkel has joined #ruby
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
workmad3 has joined #ruby
vectorshelve has joined #ruby
<vectorshelve> hemanth: hai bhai :)
<horseman> vectorshelve: do u have a man crush on hemanth
Boohbah has joined #ruby
BrightSyde has quit [Quit: bye]
<hemanth> horseman, lol
<hemanth> vectorshelve, :D
<vectorshelve> horseman: Takes one to know one!
VictorMartins has joined #ruby
nirakara has joined #ruby
<horseman> vectorshelve: i dont have a man crush on hemanth
mockra has quit [Remote host closed the connection]
<horseman> vectorshelve: i have eyes for other men
igotnolegs has quit [Quit: Computer has gone to sleep.]
vladiim has joined #ruby
zomgbie has joined #ruby
darthdeu has quit [Quit: Leaving...]
<vectorshelve> horseman: well.. if someone is wishing is friend everday all that you could pull out from it was this misconception that I have a man crush on him... personifies that u mind is so degraded with filthy thoughts.. FUCK OFF :D and never come back
<horseman> vectorshelve: i have a man crush on u
<vectorshelve> horseman: yeah I doubted that..
maesbn has joined #ruby
<horseman> vectorshelve: i wonder if there will be kisses or if your love will be rough
BrightSyde has joined #ruby
<vectorshelve> horseman: not the right person to talk to.. u need a partner go search for one in the backyard.. or get things going with ur neighbour's cow :D
<horseman> hemanth: can u tell me some indian words i can throw at vectorshelve so he will look at me with love in his eyes
_iMBA has quit [Quit: Leaving.]
<Paradox> which indian
<Paradox> navajo?
mockra has joined #ruby
BrightSyde has quit [Client Quit]
<vectorshelve> apeiros : Please kick this gay out -> horseman :D
<hemanth> Paradox, red.indian
BrightSyde has joined #ruby
<hemanth> horseman, lines might be 'tusi payr karth ho'
zommi has joined #ruby
BrightSyde has quit [Client Quit]
BrightSyde has joined #ruby
<vectorshelve> hemanth: :D haha
_iMBA has joined #ruby
BrightSyde has quit [Client Quit]
mtm3 has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
VictorMartins has quit [Quit: Sleeping]
BrightSyde has joined #ruby
qwerxy has joined #ruby
<horseman> hemanth: ok ill try
<horseman> vectorshelve: सूप पिग, उ माय गर्ल?
bluOxigen has joined #ruby
<vectorshelve> horseman: :D u know what that means it means " horseman is an assole " :D
daniel_hinojosa has quit [Ping timeout: 246 seconds]
AndChat164736 has joined #ruby
BrightSyde has quit [Quit: bye]
srji has joined #ruby
BrightSyde has joined #ruby
gilead has joined #ruby
BrightSyde has quit [Client Quit]
zomgbie has quit [Read error: Connection reset by peer]
francisfish has joined #ruby
BrightSyde has joined #ruby
billiamii has quit [Read error: Connection reset by peer]
BrightSyde has quit [Client Quit]
<bnagy> yeah no it doesn't
<bnagy> there aren't even any 'h's in there :)
BrightSyde has joined #ruby
srji has quit [Client Quit]
AndChat164736 has quit [Ping timeout: 246 seconds]
mockra has quit [Remote host closed the connection]
tonini has joined #ruby
Guest22319 has quit [Ping timeout: 246 seconds]
maletor_ has quit [Quit: Computer has gone to sleep.]
vladiim has quit [Quit: vladiim]
superguenter has joined #ruby
bosphorus has joined #ruby
yonggu has quit [Remote host closed the connection]
Guest22319 has joined #ruby
yonggu has joined #ruby
banseljaj is now known as imami|afk
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
superguenter has quit [Client Quit]
vladiim has joined #ruby
cj3kim has quit [Quit: Leaving]
crazed_ has quit [Read error: Connection reset by peer]
Guest22319 has quit [Read error: Operation timed out]
Guest22319 has joined #ruby
qwerxy has quit [Quit: offski]
BrightSyde has quit [Quit: bye]
rippa has joined #ruby
darthdeus has joined #ruby
crazed has joined #ruby
Eldariof-ru has joined #ruby
jimeh has joined #ruby
sandstrom has joined #ruby
<sandstrom> Anyone know how to simply rename a file (without concatenating) using the rake pipeline?
Boohbah has quit [Remote host closed the connection]
burgestrand has joined #ruby
Guest22319 has quit [Ping timeout: 252 seconds]
nirakara has quit [Quit: This computer has gone to sleep]
srji has joined #ruby
vikhyat has joined #ruby
schovi has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
_iMBA has quit [Read error: Connection reset by peer]
nytew has quit []
_iMBA has joined #ruby
<Spaceghostc2c> sandstrom: mv path/to/{file,newfilename}
Boohbah has joined #ruby
CheeToS has quit [Ping timeout: 250 seconds]
jameshyde has quit [Remote host closed the connection]
<vectorshelve> ..........................................................................................................................
cezar has joined #ruby
cezar has quit [Client Quit]
nso95 has quit [Ping timeout: 246 seconds]
iocor has joined #ruby
srji has quit [Quit: Lost terminal]
cyong has quit [Quit: Leaving.]
jenglish has joined #ruby
nso95 has joined #ruby
nso95 has quit [Changing host]
nso95 has joined #ruby
_iMBA has quit [Read error: Connection reset by peer]
_iMBA has joined #ruby
heftig has joined #ruby
vikhyat has quit [Quit: vikhyat]
vladiim has left #ruby [#ruby]
robozahn has joined #ruby
etehtsea has joined #ruby
ABK has joined #ruby
JohnBat26 has joined #ruby
maletor has joined #ruby
saschagehlich has joined #ruby
nfk has joined #ruby
ephemerian has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
eurbach has joined #ruby
sleetdrop has joined #ruby
Guest31653 has joined #ruby
zz_chrismcg is now known as chrismcg
chrismcg has quit [Changing host]
chrismcg has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
khakimov has quit [Quit: Computer has gone to sleep.]
BiHi has joined #ruby
berserkr has joined #ruby
robozahn has quit [Quit: leaving]
Duan has joined #ruby
Vainoharhainen has joined #ruby
<sandstrom> Spaceghostc2c: thanks for helping out. I don't understand, could you clarify?
qos has joined #ruby
keymone has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
bluenemo has joined #ruby
thecreators has joined #ruby
roolo has joined #ruby
wereHamster has quit [Remote host closed the connection]
Criztian has joined #ruby
Ammar01 has joined #ruby
bluenemo has quit [Ping timeout: 246 seconds]
nirakara has joined #ruby
blacktulip has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
saschagehlich has joined #ruby
tatsuya_o has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
qwerxy has joined #ruby
perry is now known as perryh_away
tatsuya_o has joined #ruby
mrbrdo has quit [Quit: mrbrdo]
kaiwren has joined #ruby
wereHamster has joined #ruby
maesbn has quit [Ping timeout: 245 seconds]
maesbn has joined #ruby
skinny_much has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
dpollen has joined #ruby
bluenemo has joined #ruby
InspiredSoul has joined #ruby
crazed has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
crazed has joined #ruby
skinny_much has quit [Remote host closed the connection]
skinny_much has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
blueOxigen has joined #ruby
Boohbah has quit [Remote host closed the connection]
fabrice31 has joined #ruby
robotmay has joined #ruby
dpollen has quit [Quit: dpollen]
adambeynon has joined #ruby
Liquid_X has joined #ruby
eighty4_ is now known as eighty4
eighty4 has quit [Changing host]
eighty4 has joined #ruby
Svitkona has quit [Ping timeout: 244 seconds]
Boohbah has joined #ruby
simao has joined #ruby
hatoishi has joined #ruby
hatoishi has quit [Client Quit]
Vendethiel has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
TPFC-SYSTEM has joined #ruby
lolmaus has joined #ruby
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
<Vendethiel> has anybody here installed TheRubyRacer on Windows ?
samuel02 has joined #ruby
<Vendethiel> I have Python2.7 and scons installed, and for some reason the v8 installer is trying to build a file which does not exist
<Vendethiel> g++.exe C:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a
<Vendethiel> whereas the directory only contains LICENSE files, readme, authors, changelog,...
tonini has quit [Remote host closed the connection]
qos has quit [Quit: Leaving...]
shadoi1 has quit [Quit: Leaving.]
qos has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
kaneda__ has joined #ruby
thecreators has quit [Quit: thecreators]
thecreators has joined #ruby
shvelo has joined #ruby
fayimora has quit [Ping timeout: 246 seconds]
<shvelo> Ahoy!
fermion has joined #ruby
keymone has left #ruby [#ruby]
dpollen has joined #ruby
_iMBA has quit [Read error: Connection reset by peer]
dpollen has quit [Client Quit]
_iMBA has joined #ruby
nirakara has quit [Ping timeout: 244 seconds]
S1kx has quit [Read error: No route to host]
t4lk3r has joined #ruby
S1kx has joined #ruby
bier has joined #ruby
red-panda has joined #ruby
shvelo has quit [Quit: Leaving]
ramblex has joined #ruby
d3vic3 has joined #ruby
Jackneill has joined #ruby
conceal_rs_ has quit [Read error: Operation timed out]
coolwaters has quit [Remote host closed the connection]
conceal_rs_ has joined #ruby
cheater__ has joined #ruby
_iMBA has quit [Read error: Connection reset by peer]
TPFC-SYSTEM has joined #ruby
_iMBA has joined #ruby
skinny_much has quit [Remote host closed the connection]
qwerxy has quit [Ping timeout: 244 seconds]
skinny_much has joined #ruby
cheater_ has quit [Ping timeout: 260 seconds]
swistak35 has quit [Quit: leaving]
Croms has quit [Quit: Linkinus - http://linkinus.com]
nfk has quit [Quit: yawn]
d3vic3 has quit [Ping timeout: 246 seconds]
qwerxy has joined #ruby
d3vic3 has joined #ruby
ohcibi_ is now known as ohcibi
<Xethron> Heya
<Xethron> I need to check if a certain name in the a hash table is defined... whats the best way of doing this?
Guest31653 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
<Vendethiel> if hash[name] ?
saschagehlich has quit [Quit: saschagehlich]
<Xethron> just "if (hash['name'])"
mpereira has joined #ruby
ramblex has quit [Quit: ramblex]
<Xethron> Vendethiel: perfect, thanks :D
vitoravelino`afk is now known as vitoravelino
vitor-br has quit [Quit: Saindo]
raz has joined #ruby
<raz> what are the best documentation generators? is sphinx (pocoo) still the way to go?
qos has quit [Quit: Leaving...]
arturaz has joined #ruby
<shevy> never heard of sphinx
<shevy> I only know rdoc and yard :P
skinny_much has quit [Remote host closed the connection]
zemanel has joined #ruby
<Duan> knowing one is enough.i think rdoc
<raz> well, those are great for api docs
<raz> i'm looking for "general docs" right now :)
<raz> there's the rails-guides generator but those are atrocious
<raz> perhaps i should just go asciidoc :/
<Duan> : )
hatoishi has joined #ruby
<shevy> hehe
nari_ has quit [Ping timeout: 245 seconds]
sleetdrop has quit []
<hatoishi> puts 'hi'
<hatoishi> puts 'hi'
<hatoishi> puts 'hi'
hatoishi has quit [Client Quit]
<bnagy> hi
<bnagy> => nil
<shevy> lol
theRoUS has quit [Ping timeout: 244 seconds]
Markvilla has joined #ruby
BiHi has quit [Ping timeout: 256 seconds]
liluo has quit [Remote host closed the connection]
mohits has quit [Remote host closed the connection]
tonini has joined #ruby
becomingGuru has joined #ruby
neku has joined #ruby
becomingGuru has left #ruby [#ruby]
_iMBA has quit [Read error: Connection reset by peer]
_iMBA has joined #ruby
jbw_ has quit [Ping timeout: 246 seconds]
skinny_much has joined #ruby
wookiehangover has quit [Ping timeout: 265 seconds]
MonkeyDust has joined #ruby
frishi has joined #ruby
MonkeyDust has left #ruby [#ruby]
rob_ has joined #ruby
<rob_> hi, could someone quickly explain to me the difference between the ruby1.9.3 package and the ruby1.9.1 package on ubuntu? /usr/bin/ruby1.9.1 --version seems to return version: ruby 1.9.3
ramblex has joined #ruby
<Cork> that sounds more like an ubuntu/debian question then a ruby one
<rob_> Cork: i asked in ubuntu and they said to ask here!
<Cork> well it doesn't sound like the 1.9.1 version really is 1.9.1
<rob_> i was wondering if anyone could expand upon this a bit :)
<graspee> ubuntu has 1.9.3
<graspee> but lots of folders and things are marked 1.9.1 because that's just how it is
<graspee> it means 1.9.1 or better
<rob_> installing the 1.9.3 package depends on 1.9.1 package but creates both /usr/bin/ruby1.9.1 and /usr/bin/1.9.3 but update-alternatives only lists 1.9.1
<graspee> if you do ruby --version you'll see ubuntu is using 1.9.3.p0
<rob_> graspee: ok
<graspee> it's just labelled 1.9.1. trust me it's not really that version. it's 1.9.3.p0
<Xethron> The Hash Table names are case sensitive... anyway to change it?
<bnagy> no
<rob_> so does the 1.9.3 package just create a symlink to 1.9.1 (which in turn is actually 1.9.3?)
<Hanmac> rob_ 1.9.1 is the API (or ABI) version ... means 1.9.3 is abi-compartible
<Xethron> :(
<bnagy> rob_: imho never ever use debian packages for ruby
<rob_> bnagy: i have no choice since we're in a production environment
<bnagy> Xethron: hash keys are objects and there is no way to make "Foo"=="foo"
<Cork> rob_: just use rvm
<Xethron> fook man
<Cork> no need to relay on the package manager
<bnagy> rob_: sorry but that's meaningless
<Xethron> :P
<Xethron> thanks bnagy
<rob_> we rely on puppet so installing ruby on a per-user basis isn't really an option
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
<graspee> you could still just download the tarball and make it and install it if you want
<graspee> for all users
d3c has joined #ruby
<rob_> what's the point in having distribution packages if they aren't usable?
<graspee> they are usable
<graspee> they are just out of date
jbw_ has joined #ruby
<bnagy> yes, you should ask the debian / ubuntu boys that
<graspee> like a lot of ubuntu stuff
n1x has joined #ruby
skinny_much has quit [Remote host closed the connection]
<Cork> and if you ever need to run different versions of ruby its a pain
<Cork> the ubuntu packages doens't handle that well at all
skinny_much has joined #ruby
<rob_> hopefully that wont be an issue
<rob_> if something needs a specific version then we can package that seperately
<graspee> is this some kind of rails thing
heftig has quit [Quit: leaving]
<rob_> graspee: what do you mean?
<graspee> i mean does the project use ruby on rails
ij has joined #ruby
<rob_> no
<graspee> wow. awesome then
<graspee> what does it do?
<rob_> because of less complexity?
<rob_> sinatra
niklasb has joined #ruby
<ij> Why would one write foo.id ? foo.id : nil? Only if one were to avoid false coming out of foo.id, right?
<graspee> oh i see
<bnagy> ij: personally, I don't think I ever would
<bnagy> if you ever need to differentiate between false and nil then something is too fragile
<ij> Well yeah, but that could be the *only* possible reason, if not sillyness.
<ij> Myeah.
<ij> Then it's probably jibberish, what I'm reading here.
<bnagy> chances seem high
kaiwren has quit [Quit: kaiwren]
<Hanmac> Ij in this case i would prefer foo.id || nil
* ij git-blames.
zeromodulus has joined #ruby
SeySayux has quit [Ping timeout: 272 seconds]
<horseman> ij: what do u mean git-blames ?
<ramblex> git blame shows you who changed each line
<horseman> yeah
BiHi has joined #ruby
<horseman> i didnt understand what ij meant though, he wanted to find who wrote that code?
<ramblex> presumably
rob_ has left #ruby [#ruby]
<shevy> <rob_> Cork: i asked in ubuntu and they said to ask here!
<shevy> damn debian bastards. they changed things, and redirect people to #ruby because of their own changes in the first place?
<Cork> shevy: most likely the uber users in the channel
<Cork> they normally don't know in or out of things
<shevy> good point
<graspee> i don't think the people in the irc channel are the same people responsible for packaging ruby
<Cork> nope
<Cork> don't think i ever saw a person in that channel that actually worked with the distro
<Cork> though haven't been there for ages, didn't see the point
zemanel has quit [Quit: Remote hottie closed the connection]
tk___ has joined #ruby
SeySayux has joined #ruby
robozahn has joined #ruby
fayimora has joined #ruby
n1x has left #ruby ["Ex-Chat"]
nanderoo has joined #ruby
umttumt has quit [Remote host closed the connection]
Criztian has quit [Read error: Connection reset by peer]
Criztian has joined #ruby
Criztian has quit [Read error: Connection reset by peer]
Criztian_ has joined #ruby
red-panda has quit [Remote host closed the connection]
cek has joined #ruby
mayankkohaley has quit [Ping timeout: 276 seconds]
<cek> Errno::ENOMEM - wow! first time I encounter this error.
tvw has quit [Ping timeout: 246 seconds]
<horseman> cek: what do u want me to do? open a window? gather these words into fugues of relief? or kiss ? so we can remain two awkward darlings of the infinite abyss
<shevy> cek how much RAM?
<cek> shevy, over 9000
<shevy> hehe cool
<cek> could easily be syck that's leaking
Dreamer3 has quit [Quit: Leaving...]
yeggeps has joined #ruby
geekbri has joined #ruby
DarthGandalf has quit [Ping timeout: 248 seconds]
Progster has joined #ruby
DarthGandalf has joined #ruby
<cek> 00002b7113e67000 2895016K rw--- [ anon ] doesn't give me much. What are good mem profilers for ruby? need to be like c profilers, with structres mem usage outline.
<cek> where i see what objects were given how much memory
bwlang has joined #ruby
bwlang has quit [Client Quit]
robozahn has quit [Read error: Connection reset by peer]
lupine_85 has quit [Changing host]
lupine_85 has joined #ruby
nisstyre has quit [Quit: Leaving]
Richmond has joined #ruby
robozahn has joined #ruby
toche has joined #ruby
skinny_much has quit [Quit: Colloquy for iPod touch - http://colloquy.mobi]
dr_diamond has joined #ruby
bfgun is now known as bfig
zeromodulus has quit [Remote host closed the connection]
EddieS has joined #ruby
EddieS is now known as Guest32320
Guest32320 has quit [Client Quit]
Richmond has quit [Quit: Leaving]
Doc_X has joined #ruby
EddieS_ has joined #ruby
mfridh has quit [Ping timeout: 245 seconds]
kaiwren has joined #ruby
cyborgv7 has joined #ruby
<cyborgv7> hi
<cyborgv7> im wondering if you could help
<cyborgv7> i am having an issue with a plugin i made which previously worked and now no longer dose
joch_n has joined #ruby
<cyborgv7> undefined method `downcase' for nil:NilClass
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Progster> gist
<ramblex> cyborgv7: put your code somewhere we can see it
<cyborgv7> np
<cyborgv7> line 61 and down
<ramblex> do you have any nil values in @rooms?
<cyborgv7> i dont believe so 1 min
<Progster> ramblex: the downcase is being called on choice
<Progster> oh my bad, dunno if it's happening on line 62 or 63. Noted
<cyborgv7> ah ffs my code had an addition
<cyborgv7> a1: 'Living room'
<cyborgv7> utorrent:
<cyborgv7> a2: 'Bedroom'
<cyborgv7> the utorrent is causing the issue i believe
<ramblex> looks likely
miho has joined #ruby
<cyborgv7> hmmm now its saying it dnt knw what the bedroom or livingroom is
<cyborgv7> :S
d3vic3 has quit [Quit: leaving]
miho has quit [Read error: Connection reset by peer]
<Progster> give the exact error msg
libertyprime has quit [Quit: Lost terminal]
<_br_> Does anyone know how to do object serialization with messagepack? Something which you can do with e.g. Marshall.dump or Ox.dump ?
libertyprime has joined #ruby
miho has joined #ruby
nari has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
krusty_ar has joined #ruby
<ramblex> cyborgv7: downcase! is your problem
<cyborgv7> whats the best solution please?
<ramblex> hm, maybe it isn't, sorry
<Progster> probably the way the regex is parsing
<_br_> Hm, seems you can't use msgpack that way. You need to define your own serializer to a primitive.
<_br_> .oO(FYI)
ryan0x2 has joined #ruby
_iMBA has quit [Read error: Connection reset by peer]
_iMBA has joined #ruby
Gavilan has left #ruby [#ruby]
<ramblex> choice is 'the bedroom' not 'bedroom'
ZachBeta has quit [Quit: Computer has gone to sleep.]
<cyborgv7> lol got it ty
vectorshelve has quit [Quit: Page closed]
snearch has joined #ruby
larissa has joined #ruby
<bnagy> _br_: all the 'easy' types will just MessagePack.pack
<bnagy> I wouldn't use to_msgpack if you ever want to work on jruby
swistak35 has joined #ruby
<bnagy> no symbol keys, either
slap has joined #ruby
<_br_> bnagy: Thanks for the advice, really interesting. The reason why I'm digging into this is that I have some objects which I just want to dump into Redis, and I thought msgpack would be a good fit after searching a bit Ox (Optimized XML) seems to be also quite fast (comparable to msgpack) for serialization/deserialization.
larissa has quit [Quit: Saindo]
<_br_> At the moment I am tempted to go with Ox. Seems that works out of the box.
larissa has joined #ruby
LowKey has quit [Quit: changing servers]
gentz has quit [Ping timeout: 246 seconds]
<bnagy> msgpack is screaming fast
phretor has joined #ruby
bfig has quit [Read error: Connection reset by peer]
<bnagy> I mainly like it because it serialzes binary without bitching or falling apart
yeggeps_ has joined #ruby
<bnagy> unlike eg json
nowthatsamatt_ has joined #ruby
<phretor> Hi, I'm new to Ruby and I wanted to ask if there is any Ruby-specific syntactic "trick" that could make this script better: http://pastie.org/4108280 - thanks in advance.
<_br_> bnagy: Jep, I saw that .. really fast.. https://gist.github.com/2692477
fmcgeough has joined #ruby
Axsuul has quit [Ping timeout: 276 seconds]
jrist-afk is now known as jrist
LowKey has joined #ruby
<toche> Hey guys, new programmer here.
<toche> What defines a method?
<cek> phretor, you should offload config.vm assignment to class/module that knows about config.vm.
<cek> toche, i define the method. give me the method name, i will either approve it or not.
<phretor> cek: what do you mean by "offload" here?
gentz has joined #ruby
yeggeps has quit [Ping timeout: 272 seconds]
fmcgeough has quit [Client Quit]
fmcgeough has joined #ruby
<toche> but they are basically "commands" that we can apply to our variables, right?
<toche> or to files
<horseman> toche: not really
iori has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
<horseman> toche: ruby uses OOP, so think of your program comprised of lots of entities called objects
zinjacoder has joined #ruby
hemanth has joined #ruby
<horseman> toche: in that context, a method is a message sent to one of those objects telling it to do something (normally)
<_br_> toche: Did you bother to read a manual introducing Ruby?
<horseman> toche: if i have a dog object, i can tell it to bark by invoking the bark method on it: dog.bark() #=> tells the dog to bark
<horseman> bark() is the method, dog is the object
<toche> @horseman, makes great sense.
<toche> thank you a lot, my explanation was probably wrong since i havent been introduced to objects yet.
<toche> @_br_, well, i am in the middle of a tutorial; was my question that stupid?
mfridh has joined #ruby
<_br_> toche: No, there are no stupid questions. Its just that you should grok that on the first pages of a intro book.
LowKey has quit [Quit: changing servers]
<horseman> toche: google for 'object oriented programming'
LowKey has joined #ruby
<_br_> toche: Try this one, its a lot of fun http://mislav.uniqpath.com/poignant-guide/book/chapter-1.html
<toche> well, i am afraid i fail that task, then :)
<toche> is this the famous book by why?
<toche> @horseman - thnx
<_br_> jep
<toche> cool, it was my plan to do it after the tutorial i am in the midst of at the moment.
wangr has joined #ruby
xea_ is now known as xea
<shevy> I found the book by _why confusing
fantazo has joined #ruby
liluo has joined #ruby
sepp2k has joined #ruby
v0n has joined #ruby
gtuckerkellogg has joined #ruby
subbyyy has joined #ruby
runa has joined #ruby
subbyyy has quit [Client Quit]
IrishGringo has joined #ruby
dv310p3r has joined #ruby
cousine has joined #ruby
Flutter has joined #ruby
<cyborgv7> ramblex - thank you bud :)
Flutter has left #ruby ["ERC Version 5.2 (IRC client for Emacs)"]
Mon_Ouie has quit [Ping timeout: 265 seconds]
My_Hearing has joined #ruby
tscolari has joined #ruby
<cyborgv7> anyone got a free half hour i could borrow your brain
<graspee> sorry i'm using it
<cek> phretor, what syntax sugar you wanted there?
<cyborgv7> lol
<cyborgv7> i have another plugin but i wanna make some values come from the db
sbanwart has joined #ruby
jimmy1980 has joined #ruby
<cyborgv7> lemme know if someone can help :)
lorandi has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<phretor> cek: do I need anything specific to use OpenStruct?
mayankkohaley has joined #ruby
yeggeps_ has quit [Ping timeout: 256 seconds]
<horseman> phretor: require 'ostruct'
robotmay_ has joined #ruby
yeggeps has joined #ruby
<cek> cyborgv7, yeah, $250/hr rate applies
<cyborgv7> lol
chimkan__ has joined #ruby
yannis has joined #ruby
<cyborgv7> i need like 30 min and would never pay tht much lol
<cek> "lol"
robotmay has quit [Ping timeout: 246 seconds]
yeggeps_ has joined #ruby
Guest85656 has joined #ruby
<Guest85656> How 2 specify PATH?
chimkan has quit [Ping timeout: 265 seconds]
chimkan__ is now known as chimkan
<cek> Guest85656, PATH1 = PATH2 = PATH
DefV has quit [Read error: Connection reset by peer]
<shevy> Guest85656 hey can you change your nick to a better one?
<bnagy> Guest85656: the question's not clear enough. What are you trying to do?
yeggeps has quit [Ping timeout: 244 seconds]
<cek> or 1.upto(2){|i| eval "PATH#{i} = PATH"}
<Guest85656> i type in terminal "gem install rubygame" and it says "no such file or directory"
<cek> you can specify 3 and more with that consturct
<shevy> guests never want to use real nicks :(
<Guest85656> yeah i've mistaken when joined. My name is habib
<bnagy> Guest85656: sounds like you installed ruby wrong, you need to follow a guide for whatever OS you're using. You're missing 'gem' it would appear
umttumt has joined #ruby
<Guest85656> i'll rejoin soon
<cek> Guest85656, type other commands then: "ls -1" is a good command. "cd `pwd`" is cool too
<Guest85656> i use cd
<cek> great, are you working in microsoft indian office?
<Guest85656> i've instaled it in windows
<Guest85656> no i'm in russia
<bnagy> via rubyinstaller?
nowthatsamatt_ has quit [Quit: nowthatsamatt_]
<Guest85656> yeah
<bnagy> normally it will install a shortcut to "command prompt with ruby"
<cek> а хуле тебя зовут как араба?
<bnagy> if you use that all your paths will work
williamherry has joined #ruby
<Guest85656> тебя сука забыл спросить как называться
<cek> jajajaja
<Guest85656> )))
chimkan has quit [Read error: Connection reset by peer]
chimkan__ has joined #ruby
williamherry has quit [Client Quit]
<Guest85656> yeah it did
<shevy> you should also be able to use win_key+R, then type "irb" or "irb.exe", then irb will start
<Guest85656> but the same answer as well
dekroning has joined #ruby
<Guest85656> irb is starting ok
<fowl> how to set PATH ^
<shevy> Guest85656 ok try require 'rubygems' in irb
federic has joined #ruby
<Guest85656> it's false
<bnagy> eh? What version of the rubyinstaller did you use? It has installed gem since forever
Duan has quit []
<shevy> Guest85656 and what happens when you type:
<shevy> Gem
<shevy> in irb
tommyvyo has joined #ruby
<Guest85656> 1.9.3
<shevy> must be capitalized
carloslopes has joined #ruby
<shevy> I have this rubyinstaller installed on windows too and gem works
<Guest85656> it puts how to use it
chson has quit [Remote host closed the connection]
<shevy> you can type Gem, then press enter, in irb. and no error happens, right?
<shevy> because you can then try...
<shevy> system 'gem install pry'
<shevy> try that
<shevy> then same with rubygame
<shevy> system 'gem install rubygame'
<Guest85656> i've just reinstalled ruby and last time it was ok. but i couldn't make rubygame work so i decided to do it from crear sheet
<shevy> Guest85656 I can assure you with 100% that rubygem works on windows too.
<fowl> Guest85656, i dont think rubygame is maintained anymore
<cek> he's got administrator restricted installations probably, that's why installer can't write to path var
<matled> uh, {foo: :bar} looks strange
zeromodulus has joined #ruby
Solnse has joined #ruby
<toche> i get a syntax error on the script there
<cek> matled, where did you get that code from? i stumbled upon it in one crancky gem
<toche> C:\Users\Tue Ullerup Hansen\Documents\GitHub\rubytraining>ex16.rb
<toche> C:/Users/Tue Ullerup Hansen/Documents/GitHub/rubytraining/ex16.rb:14: syntax err
<toche> or, unexpected tIDENTIFIER, expecting ':'
<toche> puts "Truncating the file. See ya!"
<toche> ^
<toche> C:\Users\Tue Ullerup Hansen\Documents\GitHub\rubytraining>
<matled> toche: ruby -e 'p({foo: :bar})', in some places you have to but braces around it so it may not be confused with a proc.
<matled> cek: I just wrote it and it looked strange to me :)
<fowl> toche, above that is an unclosed ternary
<cek> matled, don't use that contruct
<fowl> toche, line 12
<cek> you break 1.8 with it
<matled> cek: I don't care for 1.8 in this script
<Guest85656> ok i'll simply try to reinstall it again
<toche> thanks, fowl
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<cek> yeah, then I have to suffer when i install such gems
<toche> sometimes you just cant see the small mistakes even though your trying like shit :)
<bnagy> cek: upgrade :) 1.8 is ancient.
<bnagy> and slow
<fowl> toche, also, target ? file.open(filename, 'w') <-- why open this file? what are you going to do with it? how do you access it without assigning it to a variable
GoGoGarrett has joined #ruby
<fowl> oh i see the ? is supposed to be =
<bnagy> also I think you want File.open
<matled> toche: please don't use queries. and I assumed your syntax error was referring to my example, I didn't follow the chat before.
vlad_starkov has joined #ruby
<bnagy> and also more or less everything else
shevy has quit [Ping timeout: 265 seconds]
<GoGoGarrett> Is there an easy way to detect what element was repeated the most in an array
<bnagy> why chomp when you're going to write a \n anyway?
asobrasil has joined #ruby
<toche> @fowl, isnt it attached to variable "target"?
<bnagy> target.truncate target.size - what does it mean???
<cek> i don't like {key: val} syntax, it's ambigious and unreliable
<samuelkadolph> It's neither
<cek> besides, {'k': 'v'} doesn't work
<bnagy> basically...pretty much everything in that script makes my teeth hurt
<samuelkadolph> Because the new syntax is for symbol keys only
<fowl> toche, do "target =" not "target ?"
<cek> samuelkadolph, new syntax sucks. you must admit it.
<samuelkadolph> No it doesn't. It's awesome
<toche> well, most of the syntax is from this tutorial, so its not something i've really come up with, just trying to learn :)
<cek> samuelkadolph, prove it.
<toche> @fowl, have already changed it.
* deryl proves it by using it
<bnagy> GoGoGarrett: try group_by
<samuelkadolph> The only case where it sucks is when the value is a symbol. Then it just looks weird.
<cek> what was the reasoning of introducing it?
<samuelkadolph> It's awesome in all other cases.
jasond has joined #ruby
<graspee> fewer keystrokes
<graspee> neater looking code
<samuelkadolph> Languages evolve
<cek> how is that "neater"?
vikhyat has joined #ruby
<graspee> it just is
<horseman> cek: it's use case (afaik) is for emulating named arguments
<horseman> cek: named parameters*
<samuelkadolph> foo :abc => "abc", :def => "def" turns into foo abc: "abc", def: "def"
<samuelkadolph> Looks much nicer
<cek> horseman, noah, i'll tell you the reasoning, so that ruby looks more like json / javascript / python
<deryl> :key => "value" is neater than key: "value" ?
ananthakumaran has quit [Quit: Leaving.]
<bnagy> GoGoGarrett: hm I thought group_by took an implicit block of {|e| e} but seems not. ary.group_by {|e| e}.sort_by {|k,v| v.size}
<cek> foo abc: "abc", def: "def" -- really? you write this at work? let me talk with your manager.
<workmad3> cek: looks more like js and python... it would need to support "key": "value" in order to look like json :P
<horseman> cek: i somehow dont think that was the reasoning, it's an optimized syntax of 'has' specifically for the named parameters use cas
vikhyat has quit [Client Quit]
<horseman> cek: hash*
jrist is now known as jrist-afk
<bnagy> I love the new syntax in method args. I tend not to use it much in hash defs
<bnagy> but most of my hashes can't use symbol keys anyway :(
<cek> well specialy for those that like the beautiness, my code editor justifies the hash values, so that when you get the multiline hash assignment it looks really nice with all that indent
<GoGoGarrett> bnagy: https://gist.github.com/14f2c7001ef2136db18e these seems to be the output O.o
<bnagy> GoGoGarrett: that looks right
Guest85656 has quit []
<horseman> cek: i dont think that looks as nice as the new hash syntx, and i think matz agrees (or he wouldn't have added it) :)
habib has joined #ruby
<bnagy> GoGoGarrett: if you just want the most used elem tack .last.first on the end
<cek> probably was influenced by some rails shithead, who thought it would be nice to have my :crapctrler: does_wonders
<horseman> cek: relax
<fowl> lol
<cek> my crapctrler: does_wonders
<fowl> Don't complain that you are not getting what you want, Just be glad you are not getting what you deserve
<deryl> lol nice
<cek> --(c) adolf hitler ?
<workmad3> fowl: how about complaining that I'm not getting what I think I deserve? :)
<bnagy> Godwin!
<graspee> indeed
<bnagy> ding ding ding ding
andrew_ has joined #ruby
runa has left #ruby [#ruby]
<cek> yeah. americas woke up.
<graspee> i have no idea how someone can get so angry over syntactic sugar for hashes
habib has quit [Client Quit]
blacktul_ has joined #ruby
<graspee> you don't even have to use it!
sailias has joined #ruby
<workmad3> graspee: wow... you really haven't been on the internet much, have you? :P
<graspee> it's like raging because the restaurant gave you a mint with your coffee
andrew_ has quit [Remote host closed the connection]
blacktulip has quit [Ping timeout: 252 seconds]
<graspee> even if i have seen something a lot doesn't mean i understand it
<workmad3> graspee: grr, the foil on my mint was spearmint green when it contained a peppermint!!!!
andrew_ has joined #ruby
habib has joined #ruby
pu22l3r has joined #ruby
<cek> ruby is all about dsl. syms as hash keys are in the past.
<graspee> ruby is all about dsl? that's news to me
shevy has joined #ruby
<horseman> it's a lot about dsls
<habib> someone here said that rubygame is not supported enymore?
<horseman> Habib: use gosu
<horseman> or ray
<graspee> if people are using dsls i would think they have even less reason to get upset about syntax in ruby itself
<horseman> shevy: : stop recommending rubygame :P
<fowl> Habib, not much work on it recently
<fowl> use gosu or ruby-sdl-ffi instead
andrew_ has quit [Ping timeout: 272 seconds]
<habib> what is gosu? is it a gem?
<graspee> it's a 2d game programming library and yes it's a gem
chimkan__ has quit [Quit: chimkan__]
<habib> is it better than rubygame?
<habib> i didn't try rubygame too btw
fmcgeough has quit [Read error: Connection reset by peer]
fmcgeough has joined #ruby
sailias has quit [Quit: Leaving.]
<horseman> Habib: it's built on opengl so it's faster, it's also properly maintained
heftig has joined #ruby
<makkura> Habib: rubygame hasn't caught on as well as pygame. You see it's versions are getting pretty old and it doesn't get a lot of community love :(
uris has joined #ruby
bglusman has joined #ruby
<habib> ok then i'll try gosu
<habib> thnx
cek has quit [Quit: жопа диридай диридиридай]
<bnagy> that ruby hardway exercise is retarded
<habib> and what about ray? and ruby-sdl-ffi
<bnagy> target.truncate(target.size) :<
thecreators has quit [Ping timeout: 255 seconds]
<bnagy> should be called rubythetardway
<horseman> makkura: rubygame is just a fucking name
yannis has quit [Quit: yannis]
<graspee> eh?
<horseman> makkura: gosu is the ruby gaming library, and it's quite healthy
<graspee> what do you mean it's "just a fucking name"?
<horseman> i mean it's irrelevant if rubygame hasn't caught on as well as pygame, that's no the comparison to make
<horseman> the comparison is between gosu and pygame
<graspee> rubygame was initially based on pygame
<horseman> it took the name from pygame
<graspee> no it took more than that
<horseman> and it was built on sdl, aside from that i dont think there's much similarity
<graspee> there was at least in earlier versions
yugui_zzz is now known as yugui
<horseman> anyway, the comparison to make is between pygame and gosu, since gosu is the maintained, used, and successful gaming library for ruby
<makkura> horseman: it is completely relevant since that is what rubygame's intent is. My statement is that it hasn't caught on as well as it was intended to and so hasn't gotten the support needed to be a great library and is thus getting out of date. I didn't think it was necessary to elaborate after pointing out that it's releases are old though.
axl_ has joined #ruby
<shevy> the problem with rubygame is that it never really got picked up by anyone
<shevy> http://www.pygame.org/news.html - they showcase their games here, which is an incentive for newcomers
<makkura> Yeah. I had looked at it some time ago and the community following seemed really sparse :(
<habib> so
<habib> i've reinstalled ruby
<habib> and typed in terminal gem install gosu
<habib> c:\>gem install gosu
<habib> ERROR: While executing gem ... (Errno::ENOENT)
<habib> No such file or directory - C:/Users/ ЎЁЎ
mengu has joined #ruby
<habib> wtf
<horseman> makkura: my point is that joe nooby-stein could have taken the name 'rubygame' and built a crappy gaming lib out of it. It may sound like 'pygame', but that alone means nothing. The gaming library for ruby is Gosu. afaik rubygame has always been pretty broken, and was never comparable to pygame
<shevy> Habib do other gems install
<shevy> try "gem install pry"
<shevy> Habib, also try it from irb. via system 'gem install NAME_HERE'
<shevy> that is an odd path btw
<habib> c:\>gem install pry
<habib> ERROR: While executing gem ... (Errno::ENOENT
<habib> No such file or directory - C:/Users/ ЎЁЎ
<shevy> why does it ask for Users? did you install into that dir?
<habib> yeah
<shevy> yeah, the problem is on your system
billy_ran_away has joined #ruby
<habib> no it's in d:\coding\ruby
<shevy> aha
<libertyprime> plus Gosu is more Hipster
<habib> how to specify path
<shevy> well, I made it simpler. I installed into c:/Ruby193
<shevy> no idea
<shevy> :)
<graspee> (plus banister did stuff with gosu)
<habib> )))
<xclite> yeah that's not really a wtf moment Habib, that's you not knowing paths =p
<fowl> libertyprime, just the maintainers
<billy_ran_away> Quick question, can the [] method take a block?
<shevy> Habib, I am sure there is some way
<shevy> billy_ran_away, every method in ruby accepts a (one) block
<bnagy> billy_ran_away: which [] method
<habib> ok' i'll try to reinstall it in c:\ruby
<bnagy> you can define that method on anything
<shevy> Habib \o/
<billy_ran_away> Look at my examples: http://cl.ly/HTNe
<habib> but i guess it wont help
<billy_ran_away> The first one, the test method works, but the [] method with the block doesn't...
<shevy> oh you mean like that
<bnagy> billy_ran_away: I will never look at a url shortener link, ever
<shevy> def [](input, &block)
Vert has joined #ruby
<makkura> horseman: but that isn't the case. It was intended to follow in the footsteps of pygame in how it worked so that it was pygame for ruby. It just didn't turn out as well as intended. It isn't as if it's some kind of scamware or something. Nothing to get bent out of shape on.
<shevy> billy_ran_away well why do you use &block
<shevy> usually, you do this inside a method:
<graspee> "Many of the tutorials and examples for pygame will work with rubygame (after some minor modification) so I encourage you to consult those as well. Pygame's 'chimp' tutorial example has been translated to rubygame, with differences noted in the comments. See 'chimp.rb' in the samples directory packaged with rubygame. "
<shevy> foo = yield if block_given?
GoGoGarrett has left #ruby ["It ain't no lie, Baby bye bye bye"]
awarner has joined #ruby
awarner has quit [Read error: Connection reset by peer]
<billy_ran_away> bnagy: it's not a link shortener, it's cloud app....
<shevy> pastie.org is the best
<deryl> http://gist.github.com is best
awarner has joined #ruby
<shevy> :D
<shevy> seems you can do only primitive games with pygame too ... :P http://www.pygame.org/shots/2384.jpg
<billy_ran_away> I like being able to to hit command-c and then ctrl-option-c and then have the url in my clipboard
<billy_ran_away> anyway, why does the first method, but the second one doesn't?
<shevy> http://www.pygame.org/shots/1621.png ack, even modern browser games have better graphics
jrist-afk is now known as jrist
lolmaus has quit []
<shevy> billy_ran_away why do you use &block
<billy_ran_away> Because I want to the block to be a Proc
<habib> so it seems that problem wasn't in ruby location
<billy_ran_away> shevy: Right?
<shevy> billy_ran_away, well then you probably know more than I do
<shevy> I have no idea. you said you need the block to be a proc
<shevy> I have no idea why, but you surely have a solid reason
<fowl> billy_ran_away, i dont see how you can call that method, i did class Foo; def []() yield end end how do you expect to call this? Foo.new[] do ... end doesnt work
<shevy> billy_ran_away, here how one tends to use yield and blocks in a simple way http://pastie.org/4108674
<billy_ran_away> assert_equal 'SUCCESS', formats[:upcase] { "success" }
vlad_starkov has quit [Remote host closed the connection]
<billy_ran_away> fowl: assert_equal 'SUCCESS', formats[:upcase] { "success" }
pk1001100011 has joined #ruby
<habib> how do u set the name of who u talking to?
<fowl> billy_ran_away, does that work for you
<shevy> Habib what... talking to where
<shevy> Habib, ah... in my IRC client, I type "Ha", then I press tab
<billy_ran_away> fowl: Nope, but assert_equal 'SUCCESS', formats.test(:upcase) { "success" } does
<shevy> Habib, Habib Habib Habib
<shevy> see, multiple Ha<TABs>!
yannis has joined #ruby
<billy_ran_away> fowl: I'm just wondering why the [] method seems to have trouble with blocks...
pawdro has joined #ruby
tvw has joined #ruby
dorei has joined #ruby
<fowl> syntax weirdness
<fowl> it happens
<dorei> hello
<shevy> [] is also Array
<pawdro> hi, does anyone use graphviz gem? I have a problem with making graph with few nodes with the same label (ruby only make one per label), but I nedd few
<dorei> is there a way to add users to a unix system using ruby?
<Tasser> shevy, [] is kinda equivalent to Array.neq
<pawdro> does anyone can help?
<Tasser> dorei, in case of doubt, use #shelljoin and system
<habib> shevy thnx!)
<shevy> dorei you can use system() just fine
<billy_ran_away> bnagy: Did you check out my example?
<dorei> Tasser: i though of using %x[useradd someuser -p somepassword] but i've found no way to create sha-512 passwords
<billy_ran_away> bnagy: I think if there's anyone who knows the answer, it's you
<shevy> to play a file via mplay from ruby you can do: system 'mplayer foo.avi' or `mplayer foo.avi`
<billy_ran_away> bnagy: Someone who refuses to use a link shortener sounds like someone who knows what they're doing : )
<bnagy> billy_ran_away: I don't. afaict the parser hates it
carlyle has joined #ruby
<billy_ran_away> bnagy: damn
<shevy> bnagy dont be so shy
<shevy> bnagy we all know you are among the cleverest here :)
<billy_ran_away> bnagy: Thanks for looking though : )
<bnagy> pff you know more than I do then
yankhates has joined #ruby
rorrego has joined #ruby
<bnagy> I just use you guys when I can't be arsed writing code
<fowl> lol
fantazo has quit [Remote host closed the connection]
<fowl> what is this back rubbing day?
<fowl> everybody rub the back of the nearest rubyist and tell them how nice their code is
internet_user has joined #ruby
Prometheus has joined #ruby
ph^_ has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
zeromodulus has quit [Remote host closed the connection]
<habib> how to make ruby look for gems in repozitary. not in local user path
hynkle has joined #ruby
<xclite> Habib, it's not looking for the gem in your local path, it's looking for the gem command
axl_ has quit [Read error: Connection reset by peer]
<xclite> Habib, the gem command is used to install gems
<xclite> Habib, and that's what uses the repository.
markab has joined #ruby
axl_ has joined #ruby
<billy_ran_away> Haha, got it: assert_equal 'SUCCESS', formats.[](:upcase) { "success" }
linoj has joined #ruby
ph^ has quit [Ping timeout: 260 seconds]
<billy_ran_away> Which means I won't be doing it this way cause this is u-g-l-y it ain't got no alibi
<billy_ran_away> I wanted this to work formats[:upcase] { "success" }
ph^_ has quit [Ping timeout: 252 seconds]
joshman_ has joined #ruby
joshman_ has quit [Client Quit]
nipra has quit [Ping timeout: 264 seconds]
<bnagy> wow, that's awful (.[]() { ... }
mrdtt has quit [Remote host closed the connection]
<bnagy> looks like thought bubbles on acid
<billy_ran_away> bnagy: haaha
joshman_ has joined #ruby
erichmenge has joined #ruby
yannis has quit [Read error: Connection reset by peer]
yannis has joined #ruby
uris has quit [Quit: leaving]
axl_ has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
pawdro has quit [Ping timeout: 265 seconds]
<habib> i've installed rubygems
<_br_> Congratulations !
ananthakumaran has joined #ruby
<bnagy> no, that's bad
<habib> but when in irb i'm typing require 'rubygems' it still false
kevinbond has joined #ruby
<bnagy> 1.9.3 already has rubygems
<bnagy> false is not an error, it means it was already required
<habib> yeah and it's still false
<fowl> Habib, if you want to see an error try require 'skdhfksjhf'
bglusman has quit [Remote host closed the connection]
gtuckerkellogg has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bnagy> true means 'ok I did' false means 'no I have that already'
<habib> ah ok then how to install gems which not local
<habib> bnagythnx
<bnagy> gem install gemname
tonini has quit [Remote host closed the connection]
<bnagy> it always uses rubygems.org as a soure
<habib> ok i typein gem install gosu
<habib> and it says
cousine has quit [Remote host closed the connection]
<bnagy> the suspense!
<habib> while executing gem... no such file or directory
<habib> ))))
<bnagy> your system is screwed somehow
<habib> haha
<bnagy> although for gosu I would be surprised if you don't need devkit
<fowl> gosu should be a binary
<habib> ok ill install devkit
yankhates has quit [Quit: leaving]
<habib> i can try gem install pry
<bnagy> on windows? How do they get the c runtimes to not explode?
<fowl> bnagy, tell him how to update gems
yankhates has joined #ruby
<habib> i've just instaled latest ones
<habib> fowl
<horseman> bnagy: on windows they have a precompiled binary
liluo has quit [Remote host closed the connection]
joch_n has left #ruby ["Linkinus - http://linkinus.com"]
<bnagy> if it's fresh rubyinstaller 1.9.3 then the problem isn't with the gem version
<habib> and ruby is latest too
<bnagy> horseman: on "windows" ... o_0
<fowl> run gem -v
yankhates has quit [Client Quit]
<habib> so i think that the thing is in default paths list
yankhates has joined #ruby
<horseman> bnagy: ya, it's a platform gem
td123 has joined #ruby
<bnagy> ok then :)
<habib> do u know how to know and edit default paths list?
<bnagy> why are you obsessed with paths?
yankhates has quit [Client Quit]
pkondzior has joined #ruby
<fowl> type echo %PATH% in cmd
<habib> cos it says no such file or directoryu
codestorm has quit [Read error: Connection reset by peer]
yankhates has joined #ruby
<bnagy> ENOENT says I looked for this thing and it doesn't exist
ackz has joined #ruby
axl__ has joined #ruby
<bnagy> whatever No such file or directory - C:/Users/ ЎЁЎ is supposed to be
codestorm has joined #ruby
yugui is now known as yugui_zzz
<horseman> Habib: ЎЁЎ
<bnagy> but I have no idea what that means in your language / charset, so it's useless to me
tk___ has quit [Quit: ばいばい]
miho has quit [Read error: Connection reset by peer]
<habib> i don't know too
<habib> so the next problem is how to set up russian output)))
<bnagy> but anyway if it's looking for it then it thinks it should exist
axl_ has quit [Ping timeout: 245 seconds]
axl__ is now known as axl_
<bnagy> so you don't need to tell it where it is via PATH
Enekoos has joined #ruby
<bnagy> cause it aint there
djdb has quit [Remote host closed the connection]
theRoUS has joined #ruby
theRoUS has joined #ruby
<habib> yeah and allso i don't have a folder which's name consist of 3 chars
<bnagy> what's the normal smoke test? rdiscount?
<bnagy> trollop should be small and pure ruby I think
<matled> can ffi call some function if a pointer goes out of scope? in DL I could do @ptr.free = Libary['some_func'] to set a destructor. In ffi I only found the ManagedStruct, but I don't want to attach a struct to the pointer.
miho has joined #ruby
<bnagy> matled: I thought it more or less cleaned up after itself, unless it's a weird case
<bnagy> you can explicitly call free on a pointer, but my understanding was that you don't really have to
<habib> is it better to use linux to code in ruby?
<graspee> yes
<matled> bnagy: well, the malloc is inside the C code, so ffi would better not just free the pointer returned by my function.
<bnagy> I know for a fact that if you don't hold on to pointers you need they go away and your program segfaults :)
<My_Hearing> matled: Wrap your pointer in another object and use ObjectSpace.define_finalizer
My_Hearing is now known as Mon_Ouie
<bnagy> god no
<bnagy> define_finalizer basically never works
axl_ has quit [Read error: Connection reset by peer]
Prometheus has quit [Ping timeout: 260 seconds]
<graspee> it's perfectly possible to code in ruby in windows, you can get your same editors like gvim or geany or emacs, and with cygwin you get a very unixy environment but it's just not the same imho
shvelo has joined #ruby
<bnagy> matled: imho assume they get cleaned up automatically, then test to see if you're leaking
<Mon_Ouie> The only other way is explicitly calling a #free method
kaiwren has quit [Quit: kaiwren]
<habib> if linuxMint size?
axl_ has joined #ruby
<habib> or which distr?
<bnagy> I just spent 4 hours wrestling with git on windows :|
<habib> lol)))
<bnagy> I run more ruby on windows than most people, but I don't dev on it, the toolchain is just too creaky
* Hanmac prefer to write the bindings itself ... because its better then FFI ...
<habib> bye
<habib> c ya soon
<bnagy> o/
lkba has joined #ruby
sailias has joined #ruby
<bnagy> haha I didn't see the nick change, but I just noticed My_Hearing :D
wmoxam has joined #ruby
<bnagy> Mon_Ouie: so should I be using finalizers in ffi code, or what? I never do and have never seen a leak
<bnagy> and working with define_finalizer really does suck a lot of balls
axl_ has quit [Read error: Connection reset by peer]
digitalcakestudi has joined #ruby
theRoUS has quit [Quit: Leaving]
<Mon_Ouie> If you're just using mallocs (i.e. FFI allocates the pointers), no; but if your pointers come from some other source (e.g. if you wanted to bind the libc, the result of fopen), then yes
theRoUS has joined #ruby
<bnagy> ah right, so FFI::Pointer objects that you create are ok
axl_ has joined #ruby
<bnagy> hm I need to go poke some code again... haven't leaktested or a few versions :/
habib has quit [Ping timeout: 260 seconds]
<bnagy> ok dinnertime
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
ryan0x2_ has joined #ruby
tcopp has joined #ruby
<matled> bnagy: well, the malloc is inside the C code, so ffi would better not just free the pointer returned by my function.
chson has joined #ruby
<matled> ups, wrong window (arrow up + enter)
hunglin has joined #ruby
theRoUS has quit [Quit: Leaving]
<Hanmac> i tricked the GC in my bindings ... aslong the C++ object is alive, the GC does not delete the ruby object :P
oooPaul has joined #ruby
CheeToS has joined #ruby
ephemerian has quit [Quit: Leaving.]
iocor has joined #ruby
<burgestrand> FFI::Pointer need to be explicitly freed
ph^ has joined #ruby
<burgestrand> FFI::AutoPointer will call a piece of code on GC which allows you to explicitly free resources if necessary
<fowl> burgerstand is a fixture which contains much wisdom
<shevy> hehe
<burgestrand> bnagy: ^
<burgestrand> Be very careful even with FFI::AutoPointer, it even has a warning in the documentation. It allows a block… but don’t use it :p
<matled> burgestrand: but to free it explicitly I'd have to set up a finalizer or call .free before the object goes out of scope?
<burgestrand> matled: not with FFI::AutoPointer, it helps you with that (it uses define_finalizer under the covers(
dfr|work has joined #ruby
billiamii has joined #ruby
<burgestrand> matled: I’m not sure how much this helps you, but here’s how I’ve used it: https://github.com/Burgestrand/libspotify-ruby/blob/master/lib/spotify/types/pointer.rb
<burgestrand> Actually, I could simplify that for you way more
avandenhoven has joined #ruby
graspee has quit [Quit: leaving]
<matled> burgestrand: ah, I just read the documentation of AutoPointer#initialize, that looks good.
<burgestrand> matled: :)
andrew_ has joined #ruby
<burgestrand> matled: just don’t pass the block to it, like it says in the warning
Jay_Levitt has joined #ruby
xaq has joined #ruby
larissa has quit [Quit: Saindo]
TechCel has joined #ruby
<matled> burgestrand: works, thanks :)
ben_alman has quit [Excess Flood]
Progster has quit [Ping timeout: 265 seconds]
<burgestrand> matled: \o.
<matled> passing blocks to C is so nice
<burgestrand> It’s a bit fun to test the auto-GC
kaiwren has joined #ruby
rcassidy has joined #ruby
<burgestrand> Especially since there’s no good way to be sure :p
<burgestrand> (that the test always work, that is)
ben_alman has joined #ruby
PaciFisT has joined #ruby
ryan0x2_ has quit [Remote host closed the connection]
zeknox_ has quit [Quit: leaving]
zommi has quit [Remote host closed the connection]
soulcutter has joined #ruby
axl__ has joined #ruby
MasterIdler has joined #ruby
ryan0x2_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
axl_ has quit [Ping timeout: 246 seconds]
axl__ is now known as axl_
hemanth has joined #ruby
ckrailo has joined #ruby
flakrat has joined #ruby
ABK has quit [Ping timeout: 265 seconds]
RainbowDashh has joined #ruby
hynkle has quit [Quit: hynkle]
Markvilla has quit [Quit: Markvilla]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
nat2610 has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
Prometheus has joined #ruby
cbuxton has quit [Read error: Connection reset by peer]
cbuxton has joined #ruby
burgestrand has quit [Quit: Leaving.]
<rcassidy> ruby-doc.org is down :(
crazydiamond has joined #ruby
<Tasser> rcassidy, use rubydoc.info
<rcassidy> Tasser: <3 ty
<crazydiamond> Hi. How do I install Ruby module (gem)?
vlad_starkov has quit [Ping timeout: 245 seconds]
<Mon_Ouie> gem install foo
pdtpatrick has joined #ruby
jimmy1980 has quit [Ping timeout: 255 seconds]
<crazydiamond> Mon_Ouie: I use this command, but see no output
<Mon_Ouie> Wait a moment
hynkle has joined #ruby
carloslopes has quit [Ping timeout: 272 seconds]
albemuth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
quest88 has joined #ruby
soxet has joined #ruby
hemanth has joined #ruby
JohnBat26 has quit [Ping timeout: 265 seconds]
xaq has quit [Remote host closed the connection]
Jay_Levitt has quit [Quit: Linkinus - http://linkinus.com]
rcassidy has left #ruby [#ruby]
<soxet> Is $SAFE=4 safe enough to allow users to execute unsanitized code
jimmy1980 has joined #ruby
<billy_ran_away> Can anyone think of a good way to DRY this and up make it prettier? http://cl.ly/HTj5
robdodson has joined #ruby
<billy_ran_away> Doesn't need to be one line, just DRY and without local variable assignment...
cbuxton has quit [Quit: Leaving.]
davidw has quit [Ping timeout: 252 seconds]
<dorei> ruby-doc is down :(
thone has joined #ruby
<crazydiamond> How do I install gem from *.gem local file?
<billy_ran_away> crazydiamond: Should just be gem install /path/to/foo.gem
<billy_ran_away> dorei: Use rubydoc.info
<crazydiamond> <billy_ran_away>: thanks
gitmo has joined #ruby
<Sigma00> are you... are you copy-pasting nicks? o_O
blueOxigen has quit [Ping timeout: 255 seconds]
ABK has joined #ruby
thone_ has quit [Ping timeout: 246 seconds]
bglusman has joined #ruby
EskiMag has quit [Remote host closed the connection]
EskiMag has joined #ruby
umttumt has quit [Remote host closed the connection]
RainbowDashh has quit [Quit: Computer has gone to sleep. DERPY HOOVES SLAMMING THE LAPTOP LID MISTAKE?]
<billy_ran_away> Sigma00: lol
fbernier has joined #ruby
apok has joined #ruby
zeromodulus has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
quest88 has quit [Quit: quest88]
bglusman has quit [Ping timeout: 276 seconds]
CannedCorn has joined #ruby
rakunho has joined #ruby
davidcelis has joined #ruby
jprovazn is now known as jprovazn_away
schovi has quit [Remote host closed the connection]
Eldariof-ru has quit [Ping timeout: 240 seconds]
the_jeebster has joined #ruby
axl_ has quit [Quit: axl_]
pdtpatrick has quit [Quit: pdtpatrick]
perryh_away is now known as perryh
jimmy1980 has quit [Ping timeout: 246 seconds]
berserkr has quit [Quit: Leaving.]
froy has joined #ruby
axl_ has joined #ruby
<Vendethiel> Hey
kaiwren_ has joined #ruby
<Vendethiel> it looks like ruby gem signup form is not working anymore ...
<Vendethiel> ok, worked on the second try. wtf?
umttumt has joined #ruby
Synthead has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
kaiwren has quit [Ping timeout: 246 seconds]
tvw has quit [Remote host closed the connection]
kaiwren_ is now known as kaiwren
hemanth has joined #ruby
williamcotton has joined #ruby
neku is now known as neku|away
<FlyingFoX> how would I delete one element of an Array that contains multiples of this element? Example of what i mean: http://stackoverflow.com/q/11086322/783912
sbanwart_ has joined #ruby
sbanwart has quit [Ping timeout: 245 seconds]
robdodson has quit [Quit: robdodson]
francisfish has quit [Remote host closed the connection]
d3vic3 has joined #ruby
sbanwart_ is now known as sbanwart
zeromodulus has quit [Remote host closed the connection]
<xclite> FlyingFox: Do you want the new array to only have one of each value, or do you ONLY want to delete one of the duplicates
kaiwren has quit [Quit: kaiwren]
kenperkins has quit [Quit: Computer has gone to sleep.]
<FlyingFoX> xclite: i only want to delete one of the duplicates
<xclite> FlyingFoX: i.e. [1, 1, 1, 2] should return [1, 1, 2]?
francisfish has joined #ruby
<FlyingFoX> so if a = [1,1,1,2] i want to get [1,1,2]
xaq has joined #ruby
<xclite> hm that's a neat question
<billiamii> Are there any cross platform text to speech gems?
davidcelis_ has joined #ruby
mockra has joined #ruby
<billiamii> Rather, any gems that abstract away the platform-specific stuff
williamcotton has quit [Quit: williamcotton]
robotmay_ has quit [Remote host closed the connection]
nari has quit [Read error: Operation timed out]
davidcelis has quit [Ping timeout: 276 seconds]
<shevy> billiamii dont think so
<davidcelis_> FlyingFoX: answered.
<shevy> I dont even think there is any useful text-to-speech open source library out there
mikepack has joined #ruby
<billiamii> dang.
<shevy> billy_ran_away, why dont you do:
baroquebobcat has joined #ruby
<shevy> _ = formats.names.map { |format| format + " " + name }
<billy_ran_away> that would have worked!
<shevy> no I am not finished
<shevy> _ << name unless formats.are_exclusive?
<billy_ran_away> Yea I forgot about that variable
<shevy> 2 lines vs. your current... 4 or 5 lines
<billy_ran_away> Instead I went with this: http://cl.ly/HSpP
davidcelis_ has quit [Client Quit]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<shevy> aha
<billy_ran_away> shevy: But yea that could have DRYed and cleaned it up too. Thanks for the suggestion!
jhunter has quit [Ping timeout: 252 seconds]
<Mon_Ouie> davidcelis: I think he wanted a generic solution, not just remove one duplicate of a specific object
socomm has joined #ruby
<davidcelis> Mon_Ouie: His question was to delete the first occurrence
lambdan has joined #ruby
<Mon_Ouie> I meant he probably wants [1, 1, 1, 2, 2, 3, 3, 3] to return [1, 1, 2, 3, 3]
jhunter has joined #ruby
<chson> how does one determine which gems versions have been required in a script?
<davidcelis> How can you assume that? His question gave only one example, in which the array only had one element that was duplicated. Nothing in his question made it seem to me that his array would contain multiple duplicate elements and that he'd want to remove one of each
<davidcelis> FlyingFoX: What exactly are you looking to do?
<chson> pp ENV isn't it
<FlyingFoX> davidcelis: it seems your answer does what i want :). just needed a bit to check that
<Mon_Ouie> "I have an Array that contains *some* elements multiple times"
<davidcelis> Mon_Ouie: Sure, but his example looked specifically for only one of those elements (1)
<davidcelis> I just find it difficult to make that assumption
savage- has joined #ruby
pdtpatrick has joined #ruby
cousine has joined #ruby
jenglish has quit [Remote host closed the connection]
<Mon_Ouie> Whatever, it's fun to do
jenglish has joined #ruby
maesbn has quit [Ping timeout: 252 seconds]
sailias has quit [Quit: Leaving.]
<billy_ran_away> Given this line: @masks["mask"].value_from(@object) Is there any way for the value_from method to access the mask string it was accessed by?
macmartine has joined #ruby
<davidcelis> Mon_Ouie: Edited to include that either way ;P
sbanwart_ has joined #ruby
<billy_ran_away> masks is a class that inherits from array
sbanwart has quit [Ping timeout: 264 seconds]
<billy_ran_away> mask is a custom class
<davidcelis> FlyingFoX: If it works for you, can you make sure to accept the answer? :)
<billy_ran_away> masks is an instance of a class that inherits from arrays
<billy_ran_away> that's what i meant anyway
<FlyingFoX> davidcelis: i will do that, but that clone part does not work
<Hanmac> billy_ran_away, inherit the default class may not a good idea ... some kind of decorator arrond is better
<FlyingFoX> because if i chain the clone this way the result is 1 instead of the array
<davidcelis> FlyingFoX: Edited
<davidcelis> FlyingFoX: Just assign the clone to a variable and call the delete_at on it, really. Simple
<billy_ran_away> Hanmac: Why is that?
mockra has quit [Remote host closed the connection]
<Hanmac> because some functions expect the real object (some of the C functions)
<FlyingFoX> davidcelis: hm yeah, but thats pretty much what i am already doing
<davidcelis> FlyingFoX: Basically, but a bit cleaner IMO
<billy_ran_away> Hanmac: Here's what I have so far: http://cl.ly/HTKa
<billy_ran_away> Hanmac: Can you point me to an example?
<FlyingFoX> davidcelis: thats right.
habib has joined #ruby
<billy_ran_away> Hanmac: The basic idea here is that a mask can be accessed with formats, like "capitalized title" and the mask object with the name "title" needs to know that in this instance it was called with the format "capitalized"
<FlyingFoX> davidcelis: i will look a bit further into this and accept your answer when i have decided what to do. thx for helping me :)
zeromodulus has joined #ruby
gilead has quit [Quit: Leaving]
zomgbie has joined #ruby
TPFC-SYSTEM has joined #ruby
Araxia_ has joined #ruby
EskiMag has quit [Ping timeout: 250 seconds]
umttumt has quit [Remote host closed the connection]
freeayu has quit [Quit: 离开]
sailias has joined #ruby
MrGando has joined #ruby
perryh is now known as perry
artOfWar has joined #ruby
bradhe has joined #ruby
ipoval has quit [Quit: ipoval]
ABK has quit [Ping timeout: 272 seconds]
sbanwart_ has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
robozahn has quit [Ping timeout: 246 seconds]
balki has quit [Read error: Operation timed out]
bigoldrock has joined #ruby
<Hanmac> billy_ran_away: i would build the masks class like this : http://pastie.org/4109317
apok has quit [Quit: apok]
randomautomator has joined #ruby
Habib1983 has joined #ruby
senny has quit [Remote host closed the connection]
<billy_ran_away> Hanmac: What does that do for you?
Habib1983 has quit [Client Quit]
<habib> Hy everyone
<habib> Hi!
<billy_ran_away> Hanmac: I can tell it's better then what I have now, but it gives me something extra too?
<habib> bnagy was it u who told me about guso?
balki has joined #ruby
artOfWar has quit [Remote host closed the connection]
schovi has joined #ruby
<habib> i need something like rubygame/ can anyone tell me?
artOfWar has joined #ruby
alexim has joined #ruby
darthdeus has quit [Quit: Leaving...]
sbanwart has joined #ruby
skyjumper has joined #ruby
<Hanmac> Habib maybe you like #gosu?
zomgbie has quit [Read error: Connection reset by peer]
soulcutter is now known as Sou|cutter
twinturbo has joined #ruby
neersight[d] is now known as neersighted
SegFaultAX|work2 has joined #ruby
<habib> yeah thnx
mneorr1 has joined #ruby
itnomad has quit [Quit: Leaving]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
arturaz has quit [Ping timeout: 248 seconds]
pdtpatrick_ has joined #ruby
snearch has quit [Quit: Verlassend]
pdtpatrick_ has quit [Read error: Connection reset by peer]
mneorr has quit [Ping timeout: 252 seconds]
roolo has quit [Quit: Linkinus - http://linkinus.com]
kaiwren has joined #ruby
kpshek has joined #ruby
kaiwren has quit [Client Quit]
strnx has quit [Excess Flood]
kenperkins has joined #ruby
pdtpatrick has quit [Ping timeout: 276 seconds]
strnx has joined #ruby
mneorr1 is now known as mneorr
balki has quit [Read error: Operation timed out]
CheeToS has quit [Ping timeout: 252 seconds]
mockra has joined #ruby
carloslopes has joined #ruby
<Enekoos> hello
iocor has quit [Quit: Computer has gone to sleep.]
<Enekoos> If I put : hash = {
<Enekoos> "method" => "torrent-add",
<Enekoos> "arguments" => {
<Enekoos> "paused" => paused
<Enekoos> } I can access from hash.arguments? script say this error: undefined method `arguments' for {"method"=>"torrent-add", "arguments"=>{"paused"=>false}}:Hash (NoMethodError)
<Enekoos> ://
gianlucadv has quit [Excess Flood]
stephenjudkins has joined #ruby
burgestrand has joined #ruby
mockra has quit [Remote host closed the connection]
artOfWar_ has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
cousine has quit [Remote host closed the connection]
gianlucadv has joined #ruby
pr0zac0x2a has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
artOfWar_ has quit [Remote host closed the connection]
<davidcelis> Please use gist to share code; it's spammy to paste it in here
rakm has joined #ruby
<davidcelis> Enekoos: And that's not how hashes work; you access it like hash["arguments"]
<davidcelis> Enekoos: If you want to call keys as method, use an OpenStruct
lxsameer has quit [Ping timeout: 245 seconds]
eywu has joined #ruby
sterNiX has joined #ruby
sterNiX has quit [Changing host]
sterNiX has joined #ruby
balki has joined #ruby
sterNiX has quit [Read error: Connection reset by peer]
tomb_ has quit [Quit: Computer has gone to sleep.]
strnx has quit [Excess Flood]
<Enekoos> this code is from gem, gem work but I copy for add more def and break :/
balki has quit [Read error: Connection reset by peer]
balki has joined #ruby
carloslopes has quit [Quit: Leaving]
phretor has quit [Quit: phretor]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
carloslopes has joined #ruby
ABK has joined #ruby
strnx has joined #ruby
williamcotton has joined #ruby
mockra has joined #ruby
williamcotton has quit [Remote host closed the connection]
flip_digits has joined #ruby
tds has joined #ruby
williamcotton has joined #ruby
nilg has joined #ruby
nilg has quit [Remote host closed the connection]
mikepack has joined #ruby
<shevy> hmmm
<shevy> what was the disadvantages of OpenStruct again?
<shevy> I remember there was some, because I once decided against it... but I forgot why
<shevy> :(
apok has joined #ruby
nilg has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
bigdc1 has joined #ruby
RainbowDashh has joined #ruby
nilg has quit [Remote host closed the connection]
<davidcelis> shevy: my guess is just that it's not nearly as performant as a hash
<shevy> hmmmm
<davidcelis> shevy: Yep, OpenStructs are slow and memory intensive
<davidcelis> shevy: Structs and Hashes are not
<shevy> ohh
<shevy> perhaps I meant Structs
<shevy> I wanted to do something like
<shevy> CONFIG.browser_location = '/tmp/firefox'
darthdeus has joined #ruby
williamcotton_ has joined #ruby
hynkle has quit [Ping timeout: 244 seconds]
RainbowDashh has quit [Client Quit]
kenichi has joined #ruby
brasten has joined #ruby
mikepack has joined #ruby
lambdan has quit [Quit: leaving]
bigdc1 has quit []
alexmin has joined #ruby
williamcotton has quit [Ping timeout: 265 seconds]
williamcotton_ is now known as williamcotton
schaerli has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
mikepack has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
sterNiX has joined #ruby
sterNiX is now known as sterNiX
ananthakumaran has quit [Quit: Leaving.]
ABK has quit [Ping timeout: 246 seconds]
burgestrand has quit [Ping timeout: 245 seconds]
avandenhoven has quit [Quit: avandenhoven]
Synthead has quit [Remote host closed the connection]
mikepack has joined #ruby
etehtsea has quit []
moted has joined #ruby
robozahn has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
cousine has joined #ruby
shadoi has joined #ruby
Ammar01 has quit [Quit: Leaving]
Vert has quit [Ping timeout: 252 seconds]
uris has joined #ruby
<davidcelis> what happened to you, ruby-doc.org/ ? :(
khakimov has joined #ruby
<shevy> yeah
<shevy> you used to be cool!
<shevy> and now
<shevy> you are just down...
<shadoi> start.gotapi.com
<shadoi> aww, they don't cache anymore
tewecske has joined #ruby
vikhyat has joined #ruby
fermion has quit [Ping timeout: 240 seconds]
yankhates has quit [Quit: leaving]
twinturbo_ has joined #ruby
ken_barber has joined #ruby
yankhates has joined #ruby
<shadoi> pry-doc ftw
kevinbond has quit [Quit: kevinbond]
schaerli has quit [Remote host closed the connection]
neku|away is now known as neku
yankhates has quit [Client Quit]
yankhates has joined #ruby
twinturbo has quit [Ping timeout: 246 seconds]
twinturbo_ is now known as twinturbo
tewecske has quit [Read error: Operation timed out]
tatsuya_o has quit [Remote host closed the connection]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<Tasser> davidcelis, rubydoc.info
erichmenge has left #ruby [#ruby]
Synthead has joined #ruby
<Tasser> shevy, down after it used to be cool?
adamkittelson has joined #ruby
stephenjudkins has quit [Read error: Connection reset by peer]
ringotwo has joined #ruby
Poapfel has quit [Quit: Weechat 0.16]
stephenjudkins has joined #ruby
sharms has joined #ruby
chrismcg is now known as zz_chrismcg
ramblex_ has joined #ruby
ramblex_ has quit [Client Quit]
BiHi has quit [Quit: Computer has gone to sleep]
lxsameer has quit [Ping timeout: 248 seconds]
burgestrand has joined #ruby
ramblex has quit [Ping timeout: 272 seconds]
cek has joined #ruby
daniel_hinojosa has joined #ruby
<cek> What option parser do you prefer? mine is optparse
workmad3 has quit [Ping timeout: 246 seconds]
<Tasser> trollop
zeromodulus has quit [Remote host closed the connection]
Poapfel has joined #ruby
<shevy> yeah Tasser
<shevy> gone like the wind
<shevy> I parse options on my own
<shevy> :-)
frcp has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<cek> i've seen choice, but it doens't have "built-in" validation, like optparse does. opts.on('--opt N', Float,...)
shvelo has left #ruby [#ruby]
<cek> parsing on your own is cool when you've got 1 option.
frcp has left #ruby [#ruby]
<cek> shevy, share. what's your github repo?
<shevy> I use git like only 1 in 3 months ;(
<cek> I also dislike lackness of color in optparser
lxsameer has quit [Client Quit]
<shevy> I am trying to slowly turn my stuff into gems first :P
pvh has quit [Quit: Connection closed for inactivity]
<shevy> like 1 gem... in 1 month (haha)
<cek> i like the shellsplit function
fayimora has quit [Quit: Busy…..zzzzz]
<Tasser> but ARGV.shift in simple cases :-)
vlad_starkov has joined #ruby
gitmo has left #ruby [#ruby]
uris has quit [Ping timeout: 246 seconds]
<shevy> well I dont use ARGV directly, every time I wanna make use of it directly, it tells me it is tainted input
<shevy> usually I write a class, then I check on ARGV after if __FILE__ == $PROGRAM_NAME
<billiamii> I'm getting receiving this exception "net/protocol.rb:141:in `read_nonblock': end of file reached (EOFError)" pretty frequently when calling Net::HTTP::Post
<shevy> it can get too long for more things though, then it's time to use something else
<shevy> _ = ARGV
<shevy> case _[1]
fulmato has joined #ruby
tomask has joined #ruby
<shevy> when 'disable_colours','dcol' # etc...
tomask has quit [Changing host]
tomask has joined #ruby
<shevy> object.disable_colours
francisfish has quit [Remote host closed the connection]
<billiamii> Anybody know what's up there? All the info I can find points to ruby 1.8 + ssl issues, but neither of these are applicable here...
mrsolo has joined #ruby
<cek> billiamii, yes, peer sending EOF.
<cek> closing the stream with fin
celm has joined #ruby
sapht has joined #ruby
<ekaleido> c.body_str can either be "not found" or some other value, so whats the painfully easy way to evaluate whether c.body_str is "not found"?
<billiamii> cek, Ahh. Hmm.
cbuxton has joined #ruby
<sapht> hello, getting this error trying to add a source for rubygems: SocketError: getaddrinfo: Name or service not known, ruby 1.9.1 via rvm, curl resolves properly, dig gives correct dns information
<shevy> if c.body_str == 'not found'
Drewch has joined #ruby
<cek> sapht, ipv6 not working?
tomb_ has joined #ruby
<cek> ping source
<sapht> cek: yeah ping resolves correctly
<sapht> i've never configured ipv6 for anything so that might be an issue
mockra has quit [Remote host closed the connection]
btanaka has joined #ruby
<sapht> any quick way to see if ipv6 is working?
* dross yawns
<dross> lo all
<dross> <3 ruby
<dross> something I really never paid attention to which python doesn't have
<dross> thread priority
graft_ is now known as graft
<dross> :)
jhchabran has quit [Ping timeout: 265 seconds]
RainbowDashh has joined #ruby
mjb2k has joined #ruby
<sapht> i've only ever had this problem with gems, also, apt and curl and everything else work flawlessly
<Tasser> dross, threads in ruby? O.o
<cek> yeah, in jruby
<nullsign> is there an awk style method in ruby for parsing an array?
hynkle has joined #ruby
<dross> even ruby's green threads have priority
<dross> python does not
<thedonvaughn> sapht: "ping6 ::1" to ping localhost. atleast you'll see if the stack is working
<cek> python is dead. nullsign, what's awk?
<thedonvaughn> assuming you mean linux
stephenjudkins has quit [Quit: stephenjudkins]
niklasb has quit [Ping timeout: 260 seconds]
Morkel has quit [Quit: Morkel]
<dross> something I'm just running across while doing some mission critial work
<sapht> thedonvaughn: yeah, debian. ping6 ::1 works
<nullsign> how would i do awk -F_ '{print $2}' with ruby as a method like array.awkmethod(_) etc
<thedonvaughn> nullsign: like '{print $1}' etc? why?
<dross> of course, some would say screw threads and just run two programs which do message passing
<shevy> what is this awk abomination doing
<nullsign> i need to clip out put of a filename and assign it to an array
MrGando has quit [Quit: Computer has gone to sleep.]
c0rn_ has joined #ruby
miho has quit [Read error: Connection reset by peer]
<nullsign> part/put, typo
<cek> split('_')
<thedonvaughn> nullsign: array << filename.split('blah')
<sapht> any alternatives to rubygems.org that i could try? gems.rubyforge.org? i really just need to install sass for the frontenders and be done with it
<nullsign> split will split them into 2 items, i need only the 2nd value .
<thedonvaughn> nullsign: array << filename.split('blah')[1]
<nullsign> oh.
<nullsign> right.
<shevy> nullsign, it is an array
<thedonvaughn> :)
<nullsign> ...
centipedefarmer has joined #ruby
* nullsign banfs head on desk
<shevy> and you know array operations dont you!
<shevy> like array[3] !!!
<nullsign> yes..
* shevy banfs desk on head
<oooPaul> Or array.last :)
* wmoxam bangs shevy's head on desk
<shevy> :(
<nullsign> can you do more than one method on an array in a single string?
<shevy> in a string?
<nullsign> yeah
miho has joined #ruby
<shevy> do you have a moebius strip now... with arrays in strings in arrays... :)
<nullsign> like a split and gsub
<shevy> you can chain methods
<oooPaul> As long as the methods line up with the return value of the previous call.
<cek> nullsign, you probably wanted File.basename
<shevy> array.split('x').gsub(/lala/,'die!!!')
<oooPaul> ["foo/bar"].split("/").first.gsub("f", "g") => "goo"
<shevy> oooPaul.kiss.hug.kill
<oooPaul> Er, get rid of the square brackets in there. :)
<cek> exit('die')
<oooPaul> No such method "kill" on HugClass. :(
<shevy> hmm that uses 'die' as return value?
<nullsign> oh
<nullsign> thats... so simple
<shevy> I think C returns integers or? when setting exit status
<shevy> exit 'goto 42'
<cek> it's internal hack, that way ruby process sends debug information to developers
<shevy> good old ... uhm... exception handling in the old way
Alxanr has joined #ruby
bluenemo has quit [Remote host closed the connection]
<oooPaul> Unix processes can return an integer back to the OS on exit.
Alxanr has quit [Client Quit]
<cek> directly into their brain
<shevy> the brain interface is still for the future!
<shevy> once I have it, I will code INSTANTLY
<cek> exit status is so in the past
<wmoxam> shevy: Microsoft is releasing that today
<cek> shevy, will you have a pony parade of your own?
<shevy> cek hmm nah... if there really would be a really good brain interface, I'd try to be as productive as possible in as little time as possible
<shevy> until then, I will be slacking and drinking beer
<cek> shevy, you would explode and stain the room
JohnBat26 has joined #ruby
<shevy> wmoxam, I cant trust Microsoft... ever since they added "ribbon interface", I realized that they purposely make things harder to use, and come up with propaganda to disguise this fact
<cek> sapht, what's the full error? what's the source name?
<shevy> it's the whole disease of "if it does not change, it is dead"
<shevy> a wheel does not get better if it looks like a rectangular :(
<wmoxam> shevy: no way, their stuff is so fast and easy to use, no wonder they are #1!!!
<cek> source 'https://rubygems.org'
<shevy> well they killed competition
<sapht> just a sec
<shevy> and, the competition killed itself too :P like BeOS
<sapht> this is the full error: SocketError: getaddrinfo: Name or service not known (http://rubygems.org/specs.4.8.gz)
<shevy> but I think HTML5 is making microsoft matter less and less
<sapht> looks like https is going to fail similarily
ringotwo has quit [Ping timeout: 276 seconds]
<nullsign> is this good? metric = list.split('_')[2].gsub('.rrd','')
<wmoxam> shevy: you're just jealous of their success
<sapht> lol i typoed rubyforge.org; and then it says 404... so it evidently resolves rubyforge.org but not rubygems.org
<Tasser> nullsign, does its job, do you really need gsub? There's also File.basename, if these are the semantics
<shevy> nullsign dunno. it seems ok... I would not think of it as the most beautiful piece of code ever though
<nullsign> yeah.
<shevy> wmoxam more annoyed about having to deal with shortcomings :)
<nullsign> how does file.basename work?
<sapht> are there any mirrors to rubygems.org i could try?
<nullsign> im giving a dir list
<shevy> I need to fix the win 7 of my mother soon... and I dont know how yet
clockwize has joined #ruby
federic has quit [Remote host closed the connection]
mockra has joined #ruby
mengu has quit [Quit: Konversation terminated!]
<matled> how does Enumerator work internally? is it a separate thread (or something similar), which yields the objects?
musee has quit [Quit: terminated]
sailias has quit [Ping timeout: 240 seconds]
<nullsign> .
<Tasser> matled, nah
clockwize has quit [Ping timeout: 245 seconds]
<matled> if (ptr0->fib) {
<matled> /* Fibers cannot be copied */
Eldariof-ru has joined #ruby
<matled> just found that in the source
becom33 has joined #ruby
stepnem has quit [Ping timeout: 245 seconds]
zeromodulus has joined #ruby
clockwize has joined #ruby
jxpx777 has joined #ruby
tomb_ has quit [Ping timeout: 244 seconds]
cynosure has quit [Read error: Connection reset by peer]
axl_ has quit [Read error: Connection reset by peer]
aquaranto has joined #ruby
axl_ has joined #ruby
musee has joined #ruby
VictorMartins has joined #ruby
VictorMartins has quit [Client Quit]
kirun has joined #ruby
* theRoUS is back again with another metaprogramming question
llaskin has joined #ruby
<llaskin> is there an easy way to install the latest patch level of ruby?
<llaskin> that is, i have ruby 1.8.7 patchlevel 249
<davidcelis> rvm or rbenv
<llaskin> but would like patch level 352
<davidcelis> is p249 your system ruby?
<llaskin> but i had originally installed ruby1.8 using apt-get
<davidcelis> ew
cynosure has joined #ruby
<davidcelis> switch to rbenv or rvm, llaskin
<Sigma00> llaskin: just get rid of it and install rvm
<llaskin> will wiping ruby get rid of my gems and require a reinstal?
jrist is now known as jrist-afk
<Hanmac> llaskin you can use "update-alternatives --config ruby"
<davidcelis> reinstalling gems is easy
<theRoUS> i want to create a nested module, with a name not known until run-time. last week i was chastised for doing string evals, but i don't see how to do this otherwise. basically: http://pastie.org/4109826
andrewpthorp has joined #ruby
Markvilla has joined #ruby
Aristata has quit [Quit: Leaving.]
<cek> theRoUS, use autoload
<Hanmac> theRoUS: parent_module_object.const_set(newmodname.capitalize.to_sym,Module.new)
ananthakumaran has joined #ruby
<Hanmac> cek: i read autoload should be removed
zomgbie has joined #ruby
<cek> who said that? it's a cool way of keepin mem usage down
stat1x has quit [Remote host closed the connection]
<theRoUS> Hanmac: cool
stat1x has joined #ruby
bwwrd has joined #ruby
imami|afk is now known as banseljaj
Markvilla has quit [Quit: Markvilla]
brianpWins has quit [Quit: brianpWins]
erikstraub has joined #ruby
clockwize has quit [Quit: clockwize]
cousine has quit [Remote host closed the connection]
Solnse has quit [Remote host closed the connection]
Solnse has joined #ruby
<cek> well, its being replaced with similar functionality
<cek> which is okay to me
mikepack has quit [Read error: Connection reset by peer]
<RubyPanther> IMO we should resolve that one by throwing out threads
avandenhoven has joined #ruby
<RubyPanther> Well, thank Matz for mRuby lol
Gurpartap has joined #ruby
<Gurpartap> Can I ask a question about net/ssh here?
<Gurpartap> It might just be a simple code logic question, about which I'm not sure
<llaskin> will RVM ever switch from the currently selected ruby version?
<cek> yes, correct, threads should be dismissed from ruby core
<llaskin> i am assuming on reboot?
<llaskin> it will switch to the default version?
<cek> 1 ruby process per 1 ruby vm.
dr_diamond has quit [Quit: Bye !]
mikepack has joined #ruby
<Sigma00> llaskin: yup
<llaskin> ok
<wmoxam> Gurpartap: don't ask to ask, just ask ;>
llaskin has left #ruby [#ruby]
fbernier has quit [Ping timeout: 246 seconds]
<Gurpartap> wmoxam: dang. after hours of troubleshooting, i just figured it out right now
khakimov has quit [Quit: Computer has gone to sleep.]
<Gurpartap> wmoxam: dang. after hours of troubleshooting, i just figured it out right now
<Gurpartap> oops #webchatfail
<Gurpartap> for the record, i couldn't get net/ssh to accept my pem/rsa private key.
hashpuppy has joined #ruby
<Gurpartap> the problem was that i was, unknowingly, copying it incorrectly (without newlines)
<Gurpartap> that's all
<Gurpartap> thanks wmoxam
<wmoxam> Gurpartap: ah
<hashpuppy> how do i handle something that will "warn"
fbernier has joined #ruby
stepnem has joined #ruby
voodoofish430 has joined #ruby
<hashpuppy> or does it just always return nil?
<wmoxam> Gurpartap: sometimes you just need to think about asking a question to answer it ;)
mockra has quit [Remote host closed the connection]
<Gurpartap> hashpuppy: 100.times {print "WARNING."}
<hashpuppy> lol
<hashpuppy> i mean, how to i rescue from it
<Gurpartap> hashpuppy: use rescue ;)
<hashpuppy> so, it actually throws an exception?
olrrai has joined #ruby
_whitelogger has joined #ruby
brasten has quit [Quit: brasten]