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
<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
<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
<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?
<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
<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)
<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]
<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]
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.
<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
<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.
<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
<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
<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
<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.
<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....
<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
<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.
<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(
<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]
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]
<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 .
<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>
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