Banistergalaxy has quit [Ping timeout: 240 seconds]
Banistergalaxy has joined #ruby-lang
svyatov has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 240 seconds]
rsl has quit [Quit: Computer has gone to sleep.]
<erikh>
zzak: haha. I know right?
tbuehlmann has quit [Remote host closed the connection]
thone_ has joined #ruby-lang
erichmenge has quit [Quit: Arrivederci!]
thone has quit [Ping timeout: 252 seconds]
erichmenge has joined #ruby-lang
grzywacz has quit [Read error: Connection reset by peer]
<zzak>
will that work?
<erikh>
eh, maybe?
sepp2k1 has quit [Remote host closed the connection]
<zzak>
im not really sure how that works
thinkdevcode has quit [Remote host closed the connection]
headius has joined #ruby-lang
headius has quit [Client Quit]
ruurd has quit [Quit: Leaving...]
gianlucadv has quit [*.net *.split]
ryanlecompte has joined #ruby-lang
gianlucadv has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
qwerxy has joined #ruby-lang
afgenera_ has quit [Remote host closed the connection]
afgeneralist has joined #ruby-lang
postmodern has joined #ruby-lang
Croms has joined #ruby-lang
xyzodiac has quit [Ping timeout: 255 seconds]
xyzodiac has joined #ruby-lang
\xDE\xAD\xC0\xDE has joined #ruby-lang
<\xDE\xAD\xC0\xDE>
is there a way to define a method similar to the way haskell does it without using if statements? like def foo([]); []; end; def foo([x]); x; end;
esad has joined #ruby-lang
<\xDE\xAD\xC0\xDE>
something in that vein of thought
gaveen has quit [Remote host closed the connection]
<ryanf>
no
<Croms>
\xDE\xAD\xC0\xDE: You mean pattern matching? Not as far as I know. If you redefine a method you override the previous one.
<\xDE\xAD\xC0\xDE>
Croms: yes pattern matching, whenever i google pattern matching ruby i just get blogs on how to do regex
VegetableSpoon has quit [Ping timeout: 248 seconds]
m3nd3s has quit [Remote host closed the connection]
<Croms>
\xDE\xAD\xC0\xDE: Ruby has the concept of the underscore for unused variables, but I think pattern matching really is specific to ML-like languages.
<\xDE\xAD\xC0\xDE>
Croms: ok thanks
<\xDE\xAD\xC0\xDE>
i just realized today that head, *tail = %w{some list of things} is a cool trick
charliesome has joined #ruby-lang
faces has quit [Read error: No route to host]
faces has joined #ruby-lang
<\xDE\xAD\xC0\xDE>
i guess case statements work well enough, i just implemented quicksort using it
<drbrain>
you can use gist.github.com for long output
<mars777>
oh wait i know whats wrong
<mars777>
just a sec
kurko_ has joined #ruby-lang
<mars777>
yea t works
<mars777>
yea it works
<drbrain>
excellent
<mars777>
Do you know how to work with Collectd?
<mars777>
May I share a script with you in gist, I need help with?
<mars777>
It pertains to the Getopslong question
<mars777>
?
<drbrain>
I haven't worked with collectd, but I can take a look
<mars777>
its ok let me share my work thus far
replore has joined #ruby-lang
KA_ has joined #ruby-lang
wyhaines has joined #ruby-lang
mistym has joined #ruby-lang
hakunin has quit [Ping timeout: 244 seconds]
kurko_ has quit [Ping timeout: 252 seconds]
kurko_ has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
Zopsi has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
<Zopsi>
If I have an instance variable and want to pass it to a function that requires it be in double quotes... how would I do that?
KA_ has quit [Quit: KA_]
kurko_ has joined #ruby-lang
<seanstickle>
Zopsi: present example
KA_ has joined #ruby-lang
replore has quit [Remote host closed the connection]
<Zopsi>
seanstickle: Forgive me if I am wrong, but I want to pass this to @phone1 = Call.new(params[:callee]) a function dial("@phone1","SIP/trunk/@phone1"). First time using ruby.
<seanstickle>
That is quite confusing. Can you post code to pastie.org or point to an example?
imperator3 has joined #ruby-lang
imperator2 has joined #ruby-lang
imperator has joined #ruby-lang
replore has joined #ruby-lang
<Zopsi>
seanstickle: I guess to simplify this a bit I could add that I just want to know if the ruby compiler parses instance variables inside double quotes.
<seanstickle>
I have no idea what expect of the double quotes
<seanstickle>
what *you* expect of the double quotes
<seanstickle>
It's just a string
KA_ has quit [Quit: KA_]
kurko_ has quit [Ping timeout: 245 seconds]
kurko_ has joined #ruby-lang
replore has quit [Remote host closed the connection]
wyhaines has quit [Remote host closed the connection]
ruurd has quit [Quit: Leaving...]
cultureulterior_ has quit [Quit: cultureulterior_]
jxie has quit [Quit: leaving]
wallerdev has quit [Quit: wallerdev]
ryanlecompte has joined #ruby-lang
ruurd has joined #ruby-lang
cirwin has quit [Ping timeout: 244 seconds]
ebouchut has quit [Ping timeout: 250 seconds]
ebouchut has joined #ruby-lang
VegetableSpoon has joined #ruby-lang
ryanlecompte has quit [Ping timeout: 255 seconds]
MaddinXx_ has joined #ruby-lang
mytrile has joined #ruby-lang
apeiros_ has quit [Ping timeout: 245 seconds]
madish has joined #ruby-lang
mytrile has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
toretore has joined #ruby-lang
<charliesome>
who here is subscribed to the ruby-core list?
<charliesome>
if anyone is… how did you subscribe? I've tried about 3 times but it never sends me any emails
Mon_Ouie has quit [Ping timeout: 240 seconds]
Mon_Ouie has joined #ruby-lang
spike|spiegel has quit [Ping timeout: 260 seconds]
kain has joined #ruby-lang
m3nd3s has joined #ruby-lang
stardiviner has joined #ruby-lang
thatdutchguy has joined #ruby-lang
gaveen has quit [Ping timeout: 252 seconds]
rekky has quit [Quit: rekky]
thatdutchguy has quit [Ping timeout: 250 seconds]
zz_chrismcg is now known as chrismcg
anannie has quit [Remote host closed the connection]
chrismcg is now known as zz_chrismcg
gaveen has joined #ruby-lang
ebouchut has quit [Quit: ebouchut]
vlad_starkov has quit [Remote host closed the connection]
rekky has joined #ruby-lang
schaerli has joined #ruby-lang
Assurbanipal has joined #ruby-lang
Assurbanipal has quit [Client Quit]
ruurd has quit [Quit: Leaving...]
esad has quit [Ping timeout: 252 seconds]
chris2_ has left #ruby-lang [#ruby-lang]
chris2 has joined #ruby-lang
voker57 has quit [Ping timeout: 240 seconds]
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
nyuszika7h has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
imperator has joined #ruby-lang
imperator2 has joined #ruby-lang
imperator3 has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
banister_ has quit [Remote host closed the connection]
ruurd has joined #ruby-lang
dhruvasagar has joined #ruby-lang
krz has joined #ruby-lang
vlad_starkov has joined #ruby-lang
banisterfiend has joined #ruby-lang
anannie has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
ebouchut has joined #ruby-lang
AndChat| has joined #ruby-lang
nertzy2 has quit [Ping timeout: 252 seconds]
Banistergalaxy has quit [Ping timeout: 245 seconds]
ruurd has joined #ruby-lang
ruurd has quit [Client Quit]
nertzy2 has joined #ruby-lang
justinram has joined #ruby-lang
Asher2 has quit [Quit: Leaving.]
Asher has joined #ruby-lang
justinra_ has joined #ruby-lang
justinram has quit [Read error: Connection reset by peer]
banisterfiend has quit [Remote host closed the connection]
<seydar>
Mon_Ouie: so i gots another question about coolline
<seydar>
in the #reset_line method, it erases the entire line so that it can be reprinted with the changes. this is good because it allows for the transform_line proc
<seydar>
however, i'm using it to read input for a shell
<seydar>
which means that if the previous program's output has no trailing newline
<seydar>
the output on that line will be erased
<Mon_Ouie>
Ah, I see what you mean
ryanf has joined #ruby-lang
<Mon_Ouie>
I think not starting to print at the beginning of the line would be problematic though (when computing column number, etc.)
spuk has quit [Ping timeout: 240 seconds]
<seydar>
i changed it momentarily to simply not have the initial #reset_line
<seydar>
but that only alleviated some of the pain
<seydar>
the ideal solution would be one where #reset_line only resets the visible characters
<seydar>
but i couldn't make it work effectively
<Mon_Ouie>
Ideally, I guess it would add a new-line automatically
<seydar>
i thought i'd bring it up with you since you are more knowledgeable than i
ruurd has quit [Quit: Leaving...]
<seydar>
i agree, if i could tell when there wasn't a newline present, then i would just add it
<seydar>
but i don't know how to read the last character that was printed to STDOUT without duplicating streams (and i don't even know how to duplicate streams sent to a process)
FreeFull has joined #ruby-lang
<Mon_Ouie>
I don't think you can read what was written to stdout. You might be able to get the current column number, although I don't know how
<seydar>
oooh, now there's a thought
tonni has joined #ruby-lang
<Mon_Ouie>
ncurses can do that, so there must be a way — it's probably much more terminal dependant than what's already in Coolline though
<FreeFull>
I have @messages[method] = 0 if @messages[method] = nil where @messages is a Hash, but the following line @messages[method] += 1 still gives me undefined method `+' for nil:NilClass
diegoviola has joined #ruby-lang
<Mon_Ouie>
FreeFull: You used "=" instead of "=="
<FreeFull>
Oh
<FreeFull>
>.< stupid mistake
<Mon_Ouie>
You could also use a hash with a default value: Hash.new(0)
<FreeFull>
I tried Hash.new(0) first but it didn't work because I forgot @ for @messages, and then I changed things around trying to figure out why it didn't work =P
<seydar>
Mon_Ouie: io/console can do that too, right?
<FreeFull>
Thanks, that worked
<seydar>
Mon_Ouie: coolline already uses io/console so it should be good
<Mon_Ouie>
How can I try that curses interface btw?
<Mon_Ouie>
It's a separate gem?
<seydar>
Mon_Ouie: you'd have to pick it apart out of the code.
<drbrain>
Mon_Ouie: an unreleased gem, since it requires ruby 2.0
<seydar>
ruco is simply someone's project, and in it he wrote some nice bindings
m3nd3s has joined #ruby-lang
<Mon_Ouie>
seydar: I was talking about rdoc-browser ;)
<seydar>
ah, whoops. i'm a nerd
<drbrain>
if you have ruby 2.0 you can ruby -Ilib bin/rib
<drbrain>
after checking it out, of course
<drbrain>
there's bugs, I haven't worked on it since the 1.9.3 release
ebouchut has quit [Quit: This computer has gone to sleep]
benanne has quit [Quit: kbai]
Mon_Ouie has quit [Ping timeout: 264 seconds]
seydar has quit [Quit: leaving]
ryanf has joined #ruby-lang
lcdhoffman has joined #ruby-lang
havenn has joined #ruby-lang
mjio has joined #ruby-lang
zspencer has quit [Quit: zspencer]
havenn has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 255 seconds]
havenn has joined #ruby-lang
r0bby has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 252 seconds]
r0bby is now known as robbyoconnor
m3nd3s has quit [Ping timeout: 240 seconds]
Mon_Ouie has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 240 seconds]
spuk has joined #ruby-lang
spuk has quit [Client Quit]
spuk has joined #ruby-lang
gaveen has quit [Ping timeout: 260 seconds]
dedis has joined #ruby-lang
m3nd3s has joined #ruby-lang
ryanf has joined #ruby-lang
banisterfiend has joined #ruby-lang
anannie has quit [Ping timeout: 248 seconds]
achiu has quit [Quit: WeeChat 0.3.9.1]
achiu has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
lcdhoffman has joined #ruby-lang
ryanf has quit [Ping timeout: 264 seconds]
mjio has quit []
ryanlecompte has joined #ruby-lang
<whitequark>
does anyone ever use trust/taint in ruby?
<whitequark>
that seems completely ad-hoc, not really reliable (all it takes is one missed OBJ_INFECT in MRI), and I've yet to hear about someone actually using it
<seydar>
whitequark: I keep getting "`write_array_of_pointer': value is not a pointer (ArgumentError)" when trying to do BB#call and a bunch of LLVM::Floats
<seydar>
i tried doing #to_ptr on the floats to no avail
<whitequark>
sorry, no idea
<seydar>
and i have another question on why a function would fail to verify when its dumped output looks totally fine
<drbrain>
seydar: looks != is
Averna has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
<seydar>
drbrain: right, which is why i was wondering if anyone knew any reasons why a function would fail to verify
mistym has quit [Remote host closed the connection]
gaveen has quit [Remote host closed the connection]
m3nd3s has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]