beneggett has quit [Quit: Computer has gone to sleep.]
slainer68 has quit [Remote host closed the connection]
jonathanwallace has quit [Quit: WeeChat 0.4.0]
kf8a has quit [Ping timeout: 246 seconds]
wimplash has quit [Quit: Leaving...]
mastr has quit [Quit: Part]
threesome has quit [Ping timeout: 252 seconds]
ariedler has joined #ruby
tundrax has joined #ruby
colonolGron has quit [Ping timeout: 260 seconds]
kofno has quit [Remote host closed the connection]
rakl has quit [Quit: sleeping]
jbueza has quit [Quit: Leaving.]
graydot has quit [Quit: graydot]
bigkevmcd has quit [Ping timeout: 276 seconds]
jamesaxl_ has quit [Ping timeout: 264 seconds]
enriclluelles has quit [Remote host closed the connection]
ariedler has quit [Ping timeout: 256 seconds]
mpereira has joined #ruby
reset has quit [Read error: Connection reset by peer]
Squarepy has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
_Amaan has joined #ruby
seanmccann has quit [Quit: seanmccann]
pskosinski has quit [Quit: pskosinski]
nezumi has joined #ruby
beneggett has joined #ruby
robscomputer_ has joined #ruby
shinobi_one_ has quit [Quit: shinobi_one_]
bigkevmcd has joined #ruby
kofno has joined #ruby
ravster has left #ruby [#ruby]
robscomputer has quit [Ping timeout: 252 seconds]
icole has quit [Remote host closed the connection]
bricker has quit [Ping timeout: 252 seconds]
Spooner has quit [Quit: Leaving]
dcunit3d has joined #ruby
robscomputer_ has quit [Ping timeout: 248 seconds]
eka has quit [Quit: Computer has gone to sleep.]
JZTech101 has quit [Quit: Hmm... What to do now?]
dankest has quit [Quit: Leaving...]
tk_ has joined #ruby
BoomCow has joined #ruby
nik_-_ has quit [Quit: nik_-_]
yashshah has joined #ruby
brianpWins has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
rburton- has joined #ruby
BoomCow has quit [Client Quit]
dmiller has joined #ruby
havenwood has joined #ruby
Vivekananda has joined #ruby
<ploosh>
anyone up for a bit of a code review? i'm trying to implement a linkedlist in ruby and i can't say that i know what i'm doing. here's the code if anyone is interested: http://bpaste.net/show/t5igP3YyPBfaNPYm0tz7/
fermion has quit [Quit: Computer has gone to sleep.]
cookcode has quit [Quit: Leaving.]
rezzack has quit [Quit: Leaving.]
dcunit3d has quit [Quit: dcunit3d]
palantir has joined #ruby
<matti>
ploosh: Cool, but any reason why?
<matti>
ploosh: Do you need O(1) appends at the end, or something?
dmiller has quit [Ping timeout: 245 seconds]
<ploosh>
matti: i never went to school for cs, so i don't really know anthing about data structures or algorithms
<matti>
ploosh: Neither did ;]
<ploosh>
*or algorithms that operate on them.
<matti>
I mean, did I ;p
<ploosh>
so this is my attempt to fill in the gap?
<matti>
Cool beans :)
dcunit3d has joined #ruby
johnkary has quit [Quit: @johnkary]
<matti>
ploosh: If you have spare cycles, read on why LL are bad, and why are good.
moos3 has quit [Quit: Computer has gone to sleep.]
<matti>
ploosh: They have interesting properties.
codesoda has joined #ruby
daniel_- has quit [Quit: WeeChat 0.4.1]
<ploosh>
matti: will do.
<matti>
Not trying to be cheeky or anything.
<matti>
Its nice to know.
<matti>
:)
dayepa1 has quit [Ping timeout: 256 seconds]
<ploosh>
i'll make sure to read up on it
twoism_ has quit [Remote host closed the connection]
<ploosh>
did anything in particular stand out to you with the ruby?
<ploosh>
this is the first real thing i've written using it.
evenix has joined #ruby
xcv_ has joined #ruby
cj3kim has joined #ruby
_maes_ has quit [Ping timeout: 256 seconds]
evenix has quit [Ping timeout: 256 seconds]
Hanmac1 has joined #ruby
alanjc- has joined #ruby
alanjc- is now known as alanjc
tundrax has quit [Remote host closed the connection]
palantir has quit [Ping timeout: 252 seconds]
rakl has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
r0bgleeson has quit [Read error: Connection reset by peer]
xcv has quit [Ping timeout: 256 seconds]
dcunit3d has quit [Quit: dcunit3d]
chandankumar has joined #ruby
r0bgleeson has joined #ruby
lyanchih has joined #ruby
thomasle_ has quit [Remote host closed the connection]
dayepa has joined #ruby
TomJ has quit [Quit: TomJ]
cj3kim has quit [Remote host closed the connection]
cofin has joined #ruby
cj3kim has joined #ruby
nari_ has joined #ruby
cofin has quit [Client Quit]
brotatos has quit [Quit: WeeChat 0.4.1-dev]
dankest has joined #ruby
jacktrick has quit [Quit: Leaving]
graydot has joined #ruby
graydot has quit [Client Quit]
benzrf has joined #ruby
<benzrf>
hi!
<benzrf>
I don't know ruby very well, but...
<benzrf>
would I be entirely incorrect in guessing that saying 'x = 3' creates a new *method* that always returns 3?
emergion has joined #ruby
<Elico>
benzrf: it is not creating new methods but it creates new variable..
<benzrf>
ok...
<benzrf>
p:
<benzrf>
but
<Elico>
?
<benzrf>
isn't evaluating 'foo' equivalent to 'Kernel.foo' or something?
<benzrf>
oh wait
<benzrf>
hm
[[thufir]] has joined #ruby
slainer68 has joined #ruby
<Elico>
the methods are embedded in the new objects.. but they actually exists on the core\loadable modules.
<r0bgleeson>
benzrf: no, the parser resolves method look up versus local variable look up, in this case a local variable look up happens.
<benzrf>
ok
agjacome has quit [Quit: leaving]
<benzrf>
but variables share a namespace with methods...why?
<Elico>
to allow the user flexibilty..
<benzrf>
how so?
<r0bgleeson>
wait guys, this is getting silly
<r0bgleeson>
'foo' is a local variable in your example
<r0bgleeson>
it is bound to its scope (which could be a method)
<r0bgleeson>
you can resolve the ambiguity a few ways as well
<benzrf>
wait, does ruby let you nest functions?
<benzrf>
*methods
<r0bgleeson>
foo(), self.foo - those resolve as methods calls, even if 'foo' local var is in scope
<r0bgleeson>
you're thinking of closures id guess, and yes it has those
cofin has joined #ruby
cj3kim has quit [Remote host closed the connection]
<benzrf>
no, just nested methods
<benzrf>
syntactically speaking
<benzrf>
;p
<r0bgleeson>
for what purpose?
<benzrf>
jw
<benzrf>
in that case... methods you create in a blank file get attached to Kernel... that uses an eigenclass, right?
<r0bgleeson>
its possible but not something you'd normally do
kenneth has quit [Quit: kenneth]
<r0bgleeson>
where are you getting Kernel from?
<r0bgleeson>
they belong to 'main'
<benzrf>
well...
dmiller has joined #ruby
<benzrf>
if I load up irb and def foo, Kernel.foo is a thing
slainer68 has quit [Ping timeout: 256 seconds]
<benzrf>
btw, what's the difference internally between Foo::bar and Foo.bar?
<benzrf>
regex literals are a special case and not duplicable with user code, right?
gorpon has joined #ruby
<benzrf>
that is, they're bakedd into the language
<r0bgleeson>
you can use both, but you can also use :: for constant lookup, like Foo::Bar, and call with .
<r0bgleeson>
that's how its normally done
xcv_ has quit [Remote host closed the connection]
<r0bgleeson>
regexp's have a literal syntax and builtin ye
djwonk has quit [Quit: djwonk]
<r0bgleeson>
benzrf: check out that article i posted if you want to understand what happens when you define a method in the topmost scope
<benzrf>
ok looking
dmiller has quit [Ping timeout: 256 seconds]
palantir has joined #ruby
<benzrf>
:|
cj3kim has quit [Remote host closed the connection]
<benzrf>
If I want to really *get* ruby and how it works and what a class *is* and how things are defined in terms of each other to a fairly deep level...
<benzrf>
what should I read?
djwonk has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Eaven has joined #ruby
Guedes0 has joined #ruby
breadthfirst has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
breadthfirst has joined #ruby
cj3kim has joined #ruby
dcunit3d has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
benzrf has left #ruby [":|"]
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
artnez has joined #ruby
cj3kim has quit [Remote host closed the connection]
<artnez>
Is there a way to `rvm install` without MacPorts on OS X? It seems to autoinstall that as a dependency...
robottinosino has quit [Quit: WeeChat 0.4.0]
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
rburton- has quit [Quit: Leaving...]
moos3 has joined #ruby
twoism has joined #ruby
graydot has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
emergion has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
nezumi has quit [Ping timeout: 248 seconds]
tockitj has quit [Ping timeout: 276 seconds]
brunoro has quit [Quit: WeeChat 0.3.8]
dcunit3d has quit [Quit: dcunit3d]
mikepack has joined #ruby
radic_ has joined #ruby
djwonk has quit [Quit: djwonk]
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
breadthfirst has quit [Read error: Connection reset by peer]
jdunck has joined #ruby
breadthfirst has joined #ruby
blandflakes has joined #ruby
larissa has joined #ruby
twoism has quit [Remote host closed the connection]
radic has quit [Ping timeout: 252 seconds]
icole has joined #ruby
mikepack has quit [Remote host closed the connection]
AgentWillyWonka has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
bitZero__ has quit [Ping timeout: 276 seconds]
bitZero__ has joined #ruby
jurbat has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
icole has quit [Ping timeout: 245 seconds]
radic__ has joined #ruby
dcunit3d has joined #ruby
saarinen has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
dcunit3d has quit [Client Quit]
L8D has left #ruby [#ruby]
radic_ has quit [Ping timeout: 252 seconds]
beneggett has joined #ruby
Z_Mass has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
_seanc_ has quit [Quit: _seanc_]
dcunit3d has joined #ruby
artnez has quit [Quit: artnez]
chandankumar` has joined #ruby
chandankumar` has quit [Read error: Connection reset by peer]
twoism has quit [Remote host closed the connection]
palantir has quit [Ping timeout: 245 seconds]
twoism has joined #ruby
texasmynsted has joined #ruby
pitzips has joined #ruby
ttt has joined #ruby
ttt has quit [Remote host closed the connection]
breadthfirst has joined #ruby
ttt has joined #ruby
<texasmynsted>
anybody use tmux, bash and rvm and get a error every time that "rvm use" is executed? RVM is not a function, selecting rubies with 'rvm use ...' will not work? Then a message about no login shell? All I did was run "rvm use 1.9.3"
hamed_r has joined #ruby
BeegPeeg00 has quit [Remote host closed the connection]
marcdel_ has quit [Ping timeout: 256 seconds]
wsterling has quit [Remote host closed the connection]
ttt has quit [Remote host closed the connection]
apalmblad has joined #ruby
ntus1017 has quit [Remote host closed the connection]
cofin has quit [Quit: cofin]
breadthfirst has quit [Ping timeout: 256 seconds]
marcdel has joined #ruby
macmartine has joined #ruby
tomzx_mac has quit [Ping timeout: 256 seconds]
phipes has quit [Quit: phipes]
tjbiddle has quit [Ping timeout: 256 seconds]
saarinen has joined #ruby
BeegPeeg00 has joined #ruby
ipalaus has joined #ruby
ipalaus has quit [Changing host]
ipalaus has joined #ruby
jeka-91 has joined #ruby
brianherman has joined #ruby
phipes has joined #ruby
<bnagy>
texasmynsted: 'rvm is not a function' is covered in the FAQ etc
<bnagy>
you have to mess about with your .bashrc etc because rvm doesn't know how to unix
ipalaus has quit [Client Quit]
snorkdude has joined #ruby
alem0lars has joined #ruby
krainboltgreene has joined #ruby
jurbat has quit [Quit: Computer has gone to sleep.]
<texasmynsted>
hmm. ok
<texasmynsted>
i will check the FAQ.
<snorkdude>
Hey all. I'm trying to create a graph with ruby from a set of data points. I've got an array of x values which corresponds to an array of y values. What is the best way to create a line graph from these data points?
<snorkdude>
I've tried Gruff but I keep running into some weird font errors.
<bnagy>
afaik most people use one of the graphing frameworks
<bnagy>
felipec: on what basis is it more sensible for a HLL to treat 0 as false and 1 or 3 or 25 as true?
<bnagy>
apart from the fact that C does it, because asm does it
bigkm has joined #ruby
<milestone>
i am writing a gem and this is a class inside the lib folder which i am calling from my bin folder
<felipec>
bnagy: on what basis does it not?
<bhaak>
i think the original reason could phrased better: C and Asm do it because the 0 is the same as the NULL pointer in non-typed/lowly typed languages
<felipec>
bnagy: puts "bad" unless size
<bnagy>
felipec: because there is no material difference between one number and another, in a HLL
jgrevich has quit [Ping timeout: 248 seconds]
jgrevich_ has joined #ruby
fphilipe has joined #ruby
<bnagy>
felipec: right, you should right puts "bad" if blah.empty? or something
<bnagy>
so people can read your code
<bnagy>
*write
<felipec>
bnagy: so your rationale for what a HLL should do is implementation details rather than what makes sense to type?
<bnagy>
no, it's purely based on the fact that 0 as false makes no sense at all except in asm
<bhaak>
felipec: why is the object 0 different in it's _boolean_ value than other objects?
<bnagy>
even *nix can't agree on it - 0 is success as an exit code
dhruvasagar has joined #ruby
<felipec>
bnagy: yeah, and what happens if blah is nil?
<bhaak>
there is no semantic reason that an object should be considered false unless it is semantically considered false :)
butblack has quit [Ping timeout: 252 seconds]
swex has joined #ruby
icole has quit [Remote host closed the connection]
<bhaak>
then ruby will show that you have a bug in your code
<bnagy>
felipec: if it can be nil then go ahead and write unless blah, that's why nil is falsey
<felipec>
bhaak: what number should evaluate to false if not 0?
<bhaak>
instead of just swallowing it
fphilipe_ has joined #ruby
<felipec>
bnagy: what would return true if it's empty
<bhaak>
felipec: exactly. that's the question. and the answer in ruby is: none
<bnagy>
.empty? .size.zero? etc
fphilipe has quit [Read error: Connection reset by peer]
<felipec>
bnagy: python: 'if blah', ruby: 'if blah and not blah.empty?'
<bnagy>
actually making it clear what you think you're testing
<felipec>
yeah, python makes more sense
<felipec>
bhaak: and that answer is stupid
<bhaak>
0 is an ordinary number in Ruby and you have to justify it evaluating to false. in C there are reasons for it, in an HLL with a fully expanded object system, there aren't
<felipec>
bhaak: why none? why not pick one number?
jurbat has joined #ruby
bigkm has quit [Quit: Computer has gone to sleep.]
<bnagy>
because it screws the object model so people can, in some cases, write code that is shorter at the expense of being less clear
<felipec>
bhaak: that's bullshit
<felipec>
bhaak: object.to_bool <- there
<felipec>
no object model is screwed
<bhaak>
0 evaluating to false would be a special case. an exception you have to justify.
BeegPeeg00 has quit [Remote host closed the connection]
<bhaak>
in C, 0 and NULL are the same thing. that's why it's the same as false
<bnagy>
anyway if you like python better go write python. You asked a question, we gave you an answer
<felipec>
bhaak: stop repeating the same
<felipec>
I know why it's that way in C
threesome has joined #ruby
<felipec>
and even C makes more sense
<bnagy>
if I were interested in arguing with python zealots I would hang out on HN
<bhaak>
felipec: then bring better arguments why it should be false in ruby
<felipec>
bhaak: who is a python zealot?
<bhaak>
wrong nick
gorpon has quit [Ping timeout: 245 seconds]
<felipec>
bhaak: why would Fixnum.to_bool return always true?
<felipec>
bhaak: sorry
dhruvasagar has quit [Ping timeout: 264 seconds]
<bhaak>
because it isn't nil
<RubyPanther>
because they're objects.
<felipec>
that's not an argument
<bnagy>
and also it wouldn't because there's no to_bool for Fixnum
<RubyPanther>
and they're not instances of FalseClass or NilClass
<felipec>
bnagy: you are hopeless, you are just a parrot that repeats the status quo without devoting one neuron to reason if the status quo makes sense
Spami has joined #ruby
<bnagy>
no, I just thought about it ages ago
<felipec>
RubyPanther: you are just repeating what is the status quo
<felipec>
you are not explaning why it makes sense
lsone has quit [Ping timeout: 264 seconds]
<RubyPanther>
if your thinking is OO then it is obvious that 1 and 0 are both the same, number objects
<RubyPanther>
of course it is the status quo. That doesn't make it flawed. Or the reasons not exist.
lsone has joined #ruby
diegoviola has joined #ruby
<felipec>
RubyPanther: and you still haven't explained anything, other than the status quo
<RubyPanther>
it isn't a concept that is readily available for subjective opinion
<RubyPanther>
by "status quo" you mean, "reality" right?
<felipec>
ruby should add a method to_bool, similar to_s
<bhaak>
felipec: what about other special cases? if 0 is false shouldn't '', "", [], {} alse be false?
<RubyPanther>
maybe "ruby?"
<felipec>
then 'if foo' would translate that to 'if foo.to_bool'
<bnagy>
why would we need to_bool ?
<felipec>
then Fixnum, would return false when the number is '0'
<bnagy>
:|
<RubyPanther>
!![] => true
<bnagy>
if you want to test for zero test for zero, I cannot see how this is complicated to understand
<bnagy>
the only reason, ever, to have 0 evaluate as false is to make certain lines of code shorter
krainboltgreene has quit [Quit: krainboltgreene]
<bnagy>
the ruby designers decided that was NOT an adequate reason to add a special exception for just that one number
<felipec>
bnagy: that exactly the reason; it makes the code more readable
<RubyPanther>
if you don't understand that 0 is a number, not the lack of a number, then your math is pre-Roman
<felipec>
and theres *absolutely* no reason not to
<bnagy>
you can like it or not, but that's the reason and it's pretty clear and we have explained it five times
cookcode has quit [Ping timeout: 256 seconds]
<felipec>
RubyPanther: I'm not asing foo is a number, I'm asking if foo is true
<felipec>
bnagy: it's a bad reason
<felipec>
or rather, a non-reason
<felipec>
'just the way it is' is not a reason
<bnagy>
I didn't say 'just the way it is'
<bnagy>
I said 'the benefit is not worth making an exception'
<felipec>
bnagy: there is no exception, it's estending the language
<RubyPanther>
well, we're saying a lot more than that, but "the way it is" is in fact a reason when it comes to the semantics of a language
<RubyPanther>
language semantics already exist
<bnagy>
it's not an extension, it's a special case
<bnagy>
and there are plenty of cases where you want 0 to be true
bradhe has joined #ruby
rakl has joined #ruby
<felipec>
bnagy: no, object.to_bool is an extension
bothra has quit [Read error: Operation timed out]
bothra has joined #ruby
BeegPeeg00 has joined #ruby
ybart has joined #ruby
<RubyPanther>
the concept is along the lines of, you have an object, or a false, or a nil. Where nil is a special type of false that means either failure or an empty set
tomkad has joined #ruby
<felipec>
RubyPanther: you are still explaining the status quo
bradhe has quit [Ping timeout: 264 seconds]
<felipec>
RubyPanther: you don't explain why object.to_bool doesn't make sense
<RubyPanther>
felipec: do not say that again. You've said it 27 times and you're spamming
[[thufir]] has quit [Quit: Leaving.]
<felipec>
RubyPanther: you haven't answered, you answere something completely irrelevant more than 27 times
<RubyPanther>
if you wanted some nonsense like that you wouldn't want a new method though, you'd want to overwrite !()
<RubyPanther>
felipec: _please_stop_spamming_ if I didn't say what you wanted to hear, that is not cause for complaining. I said what _I_ had to say. You said _you_ had to say. No I won't say what you want to hear. 0 is a number, the answer is true.
nomenkun has joined #ruby
<RubyPanther>
because we say !!foo
dhruvasagar has joined #ruby
<RubyPanther>
it is short and everybody knows what it means
dhruvasagar has quit [Client Quit]
fixl has joined #ruby
dhruvasagar has joined #ruby
prk has joined #ruby
krainboltgreene has joined #ruby
BizarreCake has joined #ruby
bothra13 has joined #ruby
druonysuse has joined #ruby
jurbat has quit [Quit: Computer has gone to sleep.]
zeeraw has quit [Quit: Computer has gone to sleep.]
<felipec>
RubyPanther: 'if x' doesn't call !!x
<RubyPanther>
if !!x
bothra has quit [Ping timeout: 256 seconds]
BizarreCake has left #ruby [#ruby]
BizarreCake has joined #ruby
<bnagy>
... except you would never do that
marr has joined #ruby
<felipec>
RubyPanther: stop explaning what is the current situation
<felipec>
you guys are pointless, I'll implement it and send the patch
felipec has quit [Quit: Leaving]
<bnagy>
hahahaha
<bnagy>
you don't get it
druonysus has quit [Ping timeout: 256 seconds]
<bnagy>
it's not 'missing' because we can't implement it, it's missing because we don't want it
<bnagy>
but feel free to monkeypatch your own Fixnum to be stupid
<bnagy>
just please PLEASE stop talking about it
tjal has joined #ruby
Nisstyre-laptop has joined #ruby
Nisstyre-laptop has quit [Read error: Connection reset by peer]
Cultofmetatron has quit [Remote host closed the connection]
BizarreCake has quit [Read error: Connection reset by peer]
<RubyPanther>
class Fixnum; def !; self === 0 ? true : false end end
<philcrissman>
did someone say monkeypatching Fixnum?
* philcrissman
looks around
<philcrissman>
wut.
<RubyPanther>
X.x
lyanchih has quit [Quit: lyanchih]
justsee has joined #ruby
justsee has joined #ruby
felipec has joined #ruby
<felipec>
RubyPanther: bnagy: you guys are wrong, even matz disagrees with you, and to_bool will be implemented
tomkad has quit [Remote host closed the connection]
robscomputer has quit [Ping timeout: 252 seconds]
<philcrissman>
:)
mattbl has quit [Quit: This computer has gone to sleep]
<felipec>
matz: to_bool might be more descriptive then !! but I am not sure where to use them.
<bnagy>
And if (and other control structures) will never call bool conversion method in the future, for both simplicity and performance.
<bnagy>
felipec: you're trolling. Stop.
<felipec>
it's only a matter of performance, not semantics
<felipec>
if I implement it with good performance it goes in
felipec has quit [Client Quit]
<philcrissman>
performance! o_O
<bnagy>
haha
erichmenge has quit [Ping timeout: 256 seconds]
<philcrissman>
sigh
dhruvasagar has quit [Ping timeout: 252 seconds]
<RubyPanther>
he also said "And if (and other control structures) will never call bool conversion method in the future, for both simplicity and performance."
<RubyPanther>
"for both" you parse as "only one of?"
davidcelis has quit [Ping timeout: 256 seconds]
tjal has quit [Quit: WeeChat 0.3.8]
philcrissman has quit [Remote host closed the connection]
<RubyPanther>
I'm sure Matz means it when he says "And if (and other control structures) will never call bool conversion method in the future"
locriani has quit [Remote host closed the connection]
druonysuse has quit [Read error: Connection reset by peer]
locriani has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
druonysuse has joined #ruby
druonysuse has quit [Changing host]
druonysuse has joined #ruby
locriani has quit [Ping timeout: 248 seconds]
Bry8Star has quit [Ping timeout: 240 seconds]
Solnse has quit [Ping timeout: 276 seconds]
dangerousdave has joined #ruby
huoxito has quit [Ping timeout: 256 seconds]
monkegjinni has joined #ruby
emergion has joined #ruby
rakl has quit [Quit: sleeping]
dmiller has joined #ruby
Cultofmetatron has joined #ruby
k13n has quit [Ping timeout: 260 seconds]
<milestone>
if i create a file using File.new(Dir.tmpdir+"/myfilename.txt") will this work on any os?
altamic has joined #ruby
altamic has left #ruby [#ruby]
<milestone>
i am asking because of the "/" on windows it is "\" i have now indows to test it and i would like to know if i have to create the path using pathname
dmiller has quit [Ping timeout: 240 seconds]
<Hanmac>
milestone: i would prefer this File.join(Dir.tmpdir,"myfilename.txt")
_veer has quit [Read error: Connection reset by peer]
<apeiros>
milestone: windows accepts / as path separator just fine
bionhart has quit [Remote host closed the connection]
nomenkun has joined #ruby
_Bauer has joined #ruby
lkba has joined #ruby
motto has joined #ruby
shevy has joined #ruby
nomenkun has quit [Read error: Operation timed out]
m8 has quit [Ping timeout: 264 seconds]
Bauer1 has quit [Ping timeout: 256 seconds]
Kabaka has quit [Excess Flood]
<shevy>
test
viszu has quit [Read error: Connection reset by peer]
nfk has joined #ruby
bean has quit [Ping timeout: 256 seconds]
crazymykl has quit [Ping timeout: 248 seconds]
Kabaka has joined #ruby
srji has joined #ruby
cheese1756 has quit [Ping timeout: 252 seconds]
spider-mario has joined #ruby
JZTech101 has joined #ruby
dhruvasagar has joined #ruby
m8 has joined #ruby
<srji>
i want to iterate over a hash with more than one value. hash = {'Home' => %w{'Link', 'URL', 'Icon'}}. i've tried it with hash.each do |name, properties|
<srji>
but it wont work
<srji>
the context is to create a navigation list
motto has quit [Ping timeout: 240 seconds]
rton has left #ruby [#ruby]
cheese1756 has joined #ruby
<Spooner>
srji, The point of %w is that you don';t need so much syntax: %w{Link URL Icon}
<bnagy>
you need to iterate inside
jgrevich has quit [Remote host closed the connection]
<srji>
ok
<bnagy>
Spooner: I'm assuming the string is supposed to contain the single quotes
<Spooner>
bnagy, And each string, except the last one, also has a comma?
vikhyat has quit [Remote host closed the connection]
jwelzel has joined #ruby
jon_w has joined #ruby
jonathanwallace has joined #ruby
alem0lars has quit [Quit: Leaving]
nopolitica has quit [Ping timeout: 248 seconds]
Bauer1 has joined #ruby
robottinosino has joined #ruby
sailias has quit [Quit: Leaving.]
JZTech101 has joined #ruby
jwelzel has quit [Quit: The 7 Deadly Sins: Não tem comparação. [www.t7ds.com.br]]
vlad_sta_ has joined #ruby
kote has quit [Remote host closed the connection]
_Bauer has quit [Ping timeout: 248 seconds]
jon_w has quit [Quit: OH SHIT!\$@#\$ My mom caught me using t7DS! [www.t7ds.com.br]]
JZTech101 has quit [Client Quit]
JZTech101 has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
chile_andes has joined #ruby
cha1tanya has joined #ruby
nopolitica has joined #ruby
tundrax has joined #ruby
workmad3 has joined #ruby
dfdf has quit [Remote host closed the connection]
Spami has quit [Quit: Leaving]
eldariof has quit [Read error: Operation timed out]
mixel has joined #ruby
postmodern has quit [Quit: Leaving]
suciuvlad has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
tundrax has quit [Ping timeout: 248 seconds]
teddyp1cker has joined #ruby
kline has quit [Excess Flood]
cha1tanya has quit [Ping timeout: 256 seconds]
<Spooner>
Hanmac, There is wxruby-ruby19 which is newer than the wxruby (though all it is is fixed for 1.9).
balishag has joined #ruby
<Hanmac>
yeah but it is still swig shit
jlast has quit [Remote host closed the connection]
kline has joined #ruby
<Spooner>
It mostly works though, which is a step up from several of the GUI bindings that aren't aware of 1.9 ;)
<Hanmac>
if you want to help with my binding, you can doo ;P
<Spooner>
If I wasn't busy, I might ;)
<Spooner>
People keep needing me to do boring stuff! I hate people!
Proshot has quit [Quit: Leaving]
teddyp1cker has quit [Ping timeout: 245 seconds]
<Spooner>
srji, You never need to do: "#{i[:link_name]}" - it is the same as i[:link_name] (assuming it is a string, of course, but if it wasn't you'd use #to_s).
BSaboia has joined #ruby
t_p has joined #ruby
freeayu__ has joined #ruby
viszu has joined #ruby
futilegames has quit [Quit: futilegames]
BizarreCake has quit [Ping timeout: 245 seconds]
freeayu has quit [Ping timeout: 248 seconds]
ParanoidSP has joined #ruby
JDGuingao has joined #ruby
teddyp1cker has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
Guest50481 has quit [Remote host closed the connection]
<ploosh>
anyone up for a bit of a code review? i'm trying to implement a linkedlist in ruby and i can't say that i know what i'm doing. here's the code if anyone is interested: http://bpaste.net/show/t5igP3YyPBfaNPYm0tz7/
srji has quit [Remote host closed the connection]
dfdf has joined #ruby
_eo_ has joined #ruby
<MrZYX>
lines 24 to 30 are equal to args.each do |arg| add(arg) end
<ploosh>
MrZYX: awesome, thanks.
ravster has joined #ruby
<MrZYX>
in line 68 just start at 1 and get rid of 69 to 71
jeka-91 has quit [Ping timeout: 240 seconds]
echevemaster has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
srji has joined #ruby
<ploosh>
alright. anything else stand out as incorrect or could be better?
<MrZYX>
nothing obvious to me, looks quite good :)
<MrZYX>
well, you never set @next
osvico has joined #ruby
ia___ has quit [Quit: ia___]
<MrZYX>
(to anything but nil)
<MrZYX>
wait, nvm
<MrZYX>
scrolled up too high :P
<ploosh>
haha, i was like, "wait wait... node.next = something should've done that"
ArchBeOS has quit [Read error: Operation timed out]
<MrZYX>
I'd maybe check if index is valid in get and raise an argument error if not
<MrZYX>
so you don't run into NoMethod next for nil
alx- has joined #ruby
timonv has quit [Remote host closed the connection]
obs_ has joined #ruby
chiel has joined #ruby
krombr has joined #ruby
tommyvyo has joined #ruby
<ploosh>
true, i didn't even consider exceptions.
alem0lars has joined #ruby
<MrZYX>
and if you're super bored make Node a delegator
<ploosh>
i have no idea what that is, but i'll learn it because i'm super bored :P
obs has quit [Ping timeout: 256 seconds]
s1n4 has joined #ruby
s1n4 has joined #ruby
s1n4 has quit [Changing host]
freeayu__ has quit [Remote host closed the connection]
s1n4 has left #ruby [#ruby]
<ploosh>
MrZYX: thanks a bunch for the feedback. i find it hard to learn a language thoroughly when your code works, but there's no one to tell direct you to help make it better.
<MrZYX>
heh, that's why we got #ruby ;)
Ortuna has joined #ruby
piatek has joined #ruby
piatek has left #ruby [#ruby]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
skattyadz has joined #ruby
Kricir has joined #ruby
agjacome has quit [Quit: leaving]
mityaz has joined #ruby
srji has quit [Remote host closed the connection]
lkba has joined #ruby
BSaboia has quit [Quit: Leaving]
ArchBeOS has joined #ruby
ArchBeOS has quit [Changing host]
ArchBeOS has joined #ruby
JimmyNeutron has joined #ruby
krombr has quit [Quit: krombr]
mixel has quit [Quit: mixel]
chile_andes has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kofno has quit [Remote host closed the connection]
tundrax has joined #ruby
philcrissman has joined #ruby
tundrax has quit [Remote host closed the connection]
royalty has quit [Quit: This computer has gone to sleep]
dioms has joined #ruby
Beoran_ has joined #ruby
srji has joined #ruby
Beoran__ has quit [Ping timeout: 248 seconds]
<joshu>
hi guys I'm using logger and have this in my class initialise method @log = Logger.new('config/ffm.log') why do I get an error "undefined method `info' for nil:NilClass (NoMethodError)" when I do @log.info "testing" in another method?
<Hanmac1>
"initialize"
Hanmac1 is now known as Hanmac
<joshu>
yeah Hanmac "initialize" is the method it's my autocorrect that changed it here on IRC
pcarrier_ has quit [Quit: Computer has gone to sleep.]
<Hanmac>
ha the language fools you ;P
<joshu>
haha well that's not what's causing the error ;)
<Hanmac>
i think you need to gist more of your code
gyre007 has quit [Remote host closed the connection]
<joshu>
ok
saarinen has joined #ruby
Elico has quit [Ping timeout: 240 seconds]
tommyvyo has quit [Quit:]
nopolitica has quit [Ping timeout: 248 seconds]
statarb3 has joined #ruby
statarb3 has joined #ruby
saarinen has quit [Client Quit]
backjlack has quit [Remote host closed the connection]
royalty has joined #ruby
<joshu>
Hanmac problem solved ;)
saarinen has joined #ruby
Takehiro has joined #ruby
saarinen has quit [Client Quit]
backjlack has joined #ruby
saarinen has joined #ruby
bradhe has joined #ruby
pcboy__ has joined #ruby
megha has joined #ruby
ntus1017 has quit [Remote host closed the connection]
nopolitica has joined #ruby
pcboy_ has quit [Ping timeout: 252 seconds]
emmanuelux has joined #ruby
`brendan has joined #ruby
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
apeiros has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
<Hanmac>
joshu: what was the problem?
krainboltgreene has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
breadthfirst has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
LennyLinux has quit [Remote host closed the connection]
<Dwarf>
Hello, I'm making an IRC bot and I'm making it modular, the loading of the modules isn't so hard but I need to somehow hook the commands so it responds to them, anyone feel like brainstorming about it?
srji has quit [Remote host closed the connection]
<Dwarf>
Cause currently I don't have a clue on how to do it
<joshu>
Hanmac I had declared my @log = Logger.new ….. after a method call, so in that method I was referring to a non-existent @log object. Not sure I've got the lingo right
breadthfirst has joined #ruby
tundrax has joined #ruby
royalty has quit [Quit: This computer has gone to sleep]
LennyLinux has joined #ruby
Nisstyre has joined #ruby
baroquebobcat has joined #ruby
Takehiro has quit [Remote host closed the connection]
ariedler has joined #ruby
nopolitica has quit [Ping timeout: 252 seconds]
TheFuzzball has joined #ruby
wallerdev has quit [Quit: wallerdev]
bigjam has joined #ruby
Guest4950 has quit [Remote host closed the connection]
pcboy__ has quit [Ping timeout: 246 seconds]
JimmyNeutron has quit [Ping timeout: 252 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
bobbyz has quit [Ping timeout: 248 seconds]
pcboy_ has joined #ruby
ner0x has joined #ruby
sailias has joined #ruby
<ner0x>
What can I use to print the name of the class of the object I'm currently looking at?
<Morrolan>
object.class
bnagy has quit [Ping timeout: 252 seconds]
<Morrolan>
(.to_s if you want a string instead of the class object.)
<ner0x>
It just keeps returning "Class".
dmiller has joined #ruby
<ner0x>
That works. Thank you!
chandankumar has joined #ruby
<Morrolan>
:)
TheFuzzball has quit [Ping timeout: 252 seconds]
bobbyz has joined #ruby
Guest___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sailias has quit [Quit: Leaving.]
TheFuzzball has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
freeayu has quit [Ping timeout: 256 seconds]
dfdf has quit [Remote host closed the connection]
apeiros_ has joined #ruby
k13n has quit [Ping timeout: 260 seconds]
apeiros has quit [Ping timeout: 248 seconds]
umren has joined #ruby
balishag has quit [Ping timeout: 252 seconds]
nik_-_ has joined #ruby
prk` has quit [Ping timeout: 246 seconds]
freeayu has joined #ruby
srji has joined #ruby
srji has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
zx has joined #ruby
machuga|away is now known as machuga
breadthfirst has quit [Remote host closed the connection]
freeayu has quit [Remote host closed the connection]
breadthfirst has joined #ruby
cha1tanya has joined #ruby
JimmyNeutron has joined #ruby
Takehiro has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.1]
balishag has joined #ruby
fphilipe has joined #ruby
jamesaxl has quit [Ping timeout: 248 seconds]
monkegjinni has quit [Remote host closed the connection]
Sm3lly has quit [Ping timeout: 240 seconds]
machuga is now known as machuga|away
yacks has quit [Quit: Leaving]
jamesaxl has joined #ruby
ariedler has quit [Remote host closed the connection]
jamesaxl_ has joined #ruby
alem0lars has joined #ruby
nik_-_ has quit [Quit: nik_-_]
fphilipe has quit [Remote host closed the connection]
skattyadz has quit [Quit: skattyadz]
jamesaxl has quit [Ping timeout: 256 seconds]
chandankumar has quit [Read error: Connection reset by peer]
pcarrier_ has joined #ruby
johnkary has joined #ruby
sayan has joined #ruby
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
IceDragon has joined #ruby
prk has joined #ruby
sayan has quit [Max SendQ exceeded]
jeka-91 has joined #ruby
royalty has joined #ruby
browndawg1 has joined #ruby
nomenkun has joined #ruby
freerobby has joined #ruby
_eo_ has quit [Ping timeout: 264 seconds]
browndawg has quit [Ping timeout: 256 seconds]
cj3kim has quit [Remote host closed the connection]
<joshu>
In this block of code https://gist.github.com/anonymous/30845de2dabd74604e74 I'm wondering the best practice for defining instance variables. the variables @from_domain and @to_domain are only ever needed on line 26. Should I remove them from the parse_mail method and make them local to the mail_type method?
cj3kim has joined #ruby
Artheist has joined #ruby
<joshu>
or should I use the longer @from.split("@").last instead of defining a "specific" variable?
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
falood has quit [Remote host closed the connection]
bradhe has joined #ruby
k13n has joined #ruby
DestinyAwaits has joined #ruby
DestinyAwaits has joined #ruby
DestinyAwaits has quit [Changing host]
freerobby has quit [Ping timeout: 252 seconds]
spanx__ has quit [Ping timeout: 246 seconds]
spanx___ has joined #ruby
spanx___ is now known as spanx__
bradhe has quit [Ping timeout: 252 seconds]
chandankumar has joined #ruby
viszu has quit [Ping timeout: 245 seconds]
<ChristianS>
joshu: if you only need them within a single method, why make them instance vars? (didn't look at the code)
madb055 has quit [Remote host closed the connection]
madb055 has joined #ruby
<joshu>
ChristianS good point I'm still getting a hang of Ruby, so that's why I posted my code for feedback
gorpon has joined #ruby
cofin has joined #ruby
chandankumar has quit [Excess Flood]
nof13 has joined #ruby
finges has quit [Ping timeout: 256 seconds]
ybart has joined #ruby
umren has quit [Read error: Connection reset by peer]
jamesaxl_ has quit [Read error: Connection reset by peer]
bigjam has quit [Quit: HydraIRC -> http://www.hydrairc.com <- In tests, 0x09 out of 0x0A l33t h4x0rz prefer it :)]
iaj has quit [Ping timeout: 276 seconds]
<r0bgleeson>
joshu: no, that won't work, you assign the ivars in one method and access them in another
mattbl has joined #ruby
iaj has joined #ruby
jamesaxl has joined #ruby
chandankumar has joined #ruby
<joshu>
r0bgleeson that's if they are needed outside of a method, correct? so in my code as @from_domain and@to_domain are only needed within the mail_type method I should move them there but make them local varialbles
nari has quit [Ping timeout: 251 seconds]
kote has quit [Remote host closed the connection]
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
Takehiro has quit [Remote host closed the connection]
chandankumar has quit [Max SendQ exceeded]
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
<r0bgleeson>
joshu: but you assign the values used in mail_type in another method
tundrax has quit [Remote host closed the connection]
dmiller has joined #ruby
pitzips has quit [Ping timeout: 256 seconds]
<r0bgleeson>
oh sorry ChristianS gave you that advice, yes please look at the code, it's counterproductive to make a comment otherwise.
danslo has quit [Quit: danslo]
s1n4 has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
s1n4 has joined #ruby
s1n4 has quit [Changing host]
s1n4 has left #ruby [#ruby]
browndawg1 has quit [Quit: Leaving.]
prk has quit [Ping timeout: 256 seconds]
dmiller has quit [Ping timeout: 252 seconds]
deadalus has quit [Quit: Once more into the fray, Into the last good fight I'll ever know, Live and die on this day, Live and die on this day]
cofin has quit [Quit: cofin]
balishag has quit [Read error: Connection reset by peer]
apalmblad has joined #ruby
kote has joined #ruby
jnoob22 has joined #ruby
freerobby has joined #ruby
Sou|cutter has quit [Quit: Reboot]
Takehiro has joined #ruby
devoldmx3 has joined #ruby
Z_Mass has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
sayan has joined #ruby
poga has joined #ruby
shevy has joined #ruby
ToApolytoXaos has quit [Quit: Leaving]
mattbl has quit [Quit: This computer has gone to sleep]
workmad3 has quit [Read error: Operation timed out]
ner0x has quit [Quit: Leaving]
sayan has quit [Read error: Connection reset by peer]
ToApolytoXaos has joined #ruby
lessless has joined #ruby
royalty has quit [Quit: This computer has gone to sleep]
mgorbach has joined #ruby
<mgorbach>
Any guard users out there?
<lessless>
guys how to convert string variable value to a hash key?
<waxjar>
you can use any kind of object as a Hash key. do you mean a Symbol?
<lessless>
like s = 'abc' and {s.to_sym: 1} so {abc: 1}
<waxjar>
lessless: { s.to_sym => 1 }
royalty has joined #ruby
<waxjar>
{ abc: 1 } is short for { :abc => 1 }
<lessless>
waxjar, nope, it will be {s: 1}
<lessless>
'abc' is a value of a variable
F1skr has joined #ruby
breadthfirst has quit [Remote host closed the connection]
breadthfirst has joined #ruby
tvw has joined #ruby
<waxjar>
{ s: 1 } is equivalent to { :s => 1 }
<r0bgleeson>
no it wont lessless
<Spooner>
lessless, A Symbol is a variable, not a variable itself.
alem0lars has quit [Ping timeout: 245 seconds]
<r0bgleeson>
s.to_sym: "foo" is simply not valid syntax, { s.to_sym => "foo" } is, and does exactly what you expect
icecandy has quit [Remote host closed the connection]
davetherat has quit [Remote host closed the connection]
<Spooner>
I mean, the text in a Symbol is the value. It isn't a variable name.
davetherat has joined #ruby
<lessless>
so it is impossible to use a variable value as a hash key?
<r0bgleeson>
Morrolan: that block is invoked each time a value is not found at a key, where as Hash.new([]) shares a _single_ array each time a look up happens and a key is not found
DestinyAwaits has quit [Ping timeout: 264 seconds]
Inoperable is now known as Inoperabled
<lessless>
WOW
<Morrolan>
r0bgleeson: Ah, I see. :)
devoldmx has joined #ruby
<ixti>
i would suggest to think about \b (wor-boundary) and look-behinds
breadthfirst has quit [Remote host closed the connection]
larissa has joined #ruby
breadthfirst has joined #ruby
srji has quit [Remote host closed the connection]
jgrevich has joined #ruby
JeanMertz has joined #ruby
Z_Mass has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
Xeago_ is now known as Xeago
jamesaxl has joined #ruby
rusua has joined #ruby
tommyvyo has joined #ruby
BizarreCake has quit [Ping timeout: 245 seconds]
AndChat| has quit [Ping timeout: 256 seconds]
moshef has quit [Quit: moshef]
_seanc_ has quit [Quit: _seanc_]
_Amaan has joined #ruby
kil0byte has joined #ruby
gorpon has quit [Read error: Operation timed out]
tundrax has joined #ruby
autumn has joined #ruby
qgnufq has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
maxmanders has joined #ruby
rusua has quit [Quit: sleep!]
devoldmx has quit [Ping timeout: 252 seconds]
tvw has quit []
madb055 has quit [Ping timeout: 252 seconds]
maxmanders has quit [Client Quit]
icecandy has joined #ruby
nof13 has quit [Ping timeout: 252 seconds]
tk_ has quit [Quit: ばいばい]
dmiller_ has joined #ruby
jlast has joined #ruby
Sou|cutter has joined #ruby
rakl has joined #ruby
dmiller_ has quit [Remote host closed the connection]
dmiller has joined #ruby
dmiller has quit [Remote host closed the connection]
tundrax has quit [Ping timeout: 248 seconds]
artofraw has quit [Remote host closed the connection]
Eaven has quit [Read error: Connection reset by peer]
fermion has joined #ruby
devoldmx has joined #ruby
pcarrier_ has quit [Quit: Computer has gone to sleep.]
mgorbach has quit [Quit: Leaving...]
Eaven has joined #ruby
locriani has joined #ruby
Ontolog has quit [Remote host closed the connection]
Sm3lly has joined #ruby
bradhe has joined #ruby
k13n has quit [Ping timeout: 260 seconds]
DanKnox_away is now known as DanKnox
cantonic has joined #ruby
browndawg has joined #ruby
k13n has joined #ruby
LennyLinux has quit [Remote host closed the connection]
djwonk has joined #ruby
enebo has quit [Quit: enebo]
statarb3 is now known as Proshot
rakl has quit [Quit: sleeping]
Cultofmetatron has joined #ruby
devoldmx3 has joined #ruby
arubin has joined #ruby
tommyvyo has quit [Quit:]
Cultofmetatron has quit [Remote host closed the connection]
nof13 has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
heriC has joined #ruby
CaptainKnots has quit [Ping timeout: 248 seconds]
senayar has quit [Read error: Operation timed out]
bnagy has joined #ruby
senayar has joined #ruby
k13n has quit [Ping timeout: 260 seconds]
Kricir has joined #ruby
devoldmx has quit [Ping timeout: 245 seconds]
ngudut has joined #ruby
devoldmx3 has quit [Ping timeout: 246 seconds]
kote has quit [Remote host closed the connection]
colonolGron has joined #ruby
rakl has joined #ruby
ia___ has joined #ruby
CaptainKnots has joined #ruby
nomenkun has joined #ruby
Xeago has quit [Remote host closed the connection]
whowantstolivefo has quit [Ping timeout: 256 seconds]
<heriC>
Anyone know how to get variable values out of a binding from the time of an exception for a top-level exception handler?
AgentWillyWonka has joined #ruby
devoldmx has joined #ruby
rakl has quit [Quit: sleeping]
becom33 has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
<AgentWillyWonka>
I'm trying to escape dangerous characters from user input but haven't figured out a way to do this without knowing what is being supplied by user input first. Can someone explain to me how this could be done please?
guiocavalcanti has quit [Remote host closed the connection]
browndawg has quit [Quit: Leaving.]
guiocavalcanti has joined #ruby
graydot has quit [Quit: graydot]
<AgentWillyWonka>
hi yxhuvud I wanted to have a text area on a site that allowed users to copy paste or upload a file with "text" and the script would extract the domains from the text
<AgentWillyWonka>
I have the domain extraction working via regexp but I know I will run into problems down the road with allowing anything to be entered
<Morrolan>
What are you going to do with the extracted domains afterwards? Store them in a DB? Show it on an HTML page?
<AgentWillyWonka>
Hi Morrolan I will store them in memory output via html and make available via download
_bart has quit [Quit: _bart]
guiocavalcanti has quit [Ping timeout: 248 seconds]
<Morrolan>
If the resulting values are going to be part of an HTML document then it wouldn't hurt to run it through a function which escapes potential HTML tags.
<Morrolan>
(If your regex only, say, accepts alphanumeric characters in domain names, that is probably not even needed, however.)
bricker has quit [Ping timeout: 246 seconds]
<r0bgleeson>
heriC: you can access variables in a binding through Binding#eval.
becom33 has joined #ruby
mpereira has quit [Ping timeout: 245 seconds]
armin has joined #ruby
<AgentWillyWonka>
Morrolan: I'm going to look into that it makes sense. r0bgleeson I hadn't thought of that Im going to look into that also. - Thank you guys
<AgentWillyWonka>
:)
mpereira has joined #ruby
<Morrolan>
r0bgleeson was responding to someone else, AgentWillyWonka.
poga has quit [Remote host closed the connection]
JimmyNeutron has quit [Quit: Leaving]
<AgentWillyWonka>
lol
<AgentWillyWonka>
ok
<armin>
hi, i was trying to install gitlab from the installation tutorial on their github page but my debian squeeze has no "bundle" tool and i couldn't find one in the repos. any hint? i'm a ruby newb and would "just like to run gitlab"...
<Morrolan>
AgentWillyWonka: Regarding the escaping of HTML - if you are using Rack, then there's a function to do just that, by the way. No need to roll your own. :)
<Morrolan>
armin: `gem install bundler`
<heriC>
so far I can't figure out how to get the variables from the exception when it combines nil and the string
_maes_ has joined #ruby
ngudut has left #ruby [#ruby]
<AgentWillyWonka>
Morrolan: so you're saying when user inputs "string" the function would escape all potential harmful characters and I then run regexp?
txdv has joined #ruby
<heriC>
I feel like there is a way, and if I can get this going, my logging on cron-based ruby jobs will be amazing and totally diagnose-able after the fact.
<Morrolan>
No, you would extract the domains and, before embeding them in your HTML view, you'd escape it, AgentWillyWonka.
Spami has quit [Quit: This computer has gone to sleep]
tommyvyo has joined #ruby
<Morrolan>
I don't think you will have to worry about the user creating malicious input which makes the Regex engine blow up. :)
devdazed has quit [Ping timeout: 256 seconds]
<Morrolan>
(But I could be wrong.)
<AgentWillyWonka>
lol
proustian has quit [Ping timeout: 252 seconds]
LennyLinux has joined #ruby
workmad3 has joined #ruby
baba has joined #ruby
ia___ has quit [Remote host closed the connection]
Cultofmetatron has joined #ruby
megha has quit [Ping timeout: 245 seconds]
devdazed has joined #ruby
phipes has joined #ruby
mumblerit has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
ia___ has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
pipework has joined #ruby
pcarrier_ has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
atno has joined #ruby
devdazed has quit [Ping timeout: 248 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
jeka-91 has quit [Quit: Leaving]
devdazed has joined #ruby
sambao21 has joined #ruby
arya has quit [Ping timeout: 248 seconds]
alx- has quit [Quit: alx-]
Cultofmetatron has joined #ruby
johnkary has quit [Quit: @johnkary]
nomenkun_ has joined #ruby
tundrax has joined #ruby
sambao21 has quit [Ping timeout: 248 seconds]
arya has joined #ruby
nomenkun has quit [Ping timeout: 252 seconds]
baba has quit [Quit: WeeChat 0.4.0]
banjara has joined #ruby
tundrax has quit [Read error: Operation timed out]
<AgentWillyWonka>
Beautiful it worked thank you Morrolan
breadthfirst has quit [Remote host closed the connection]
nof13 has quit [Ping timeout: 256 seconds]
breadthfirst has joined #ruby
wallerdev has joined #ruby
snearch has joined #ruby
banjara has quit [Ping timeout: 252 seconds]
gogu has joined #ruby
bradhe has quit [Remote host closed the connection]
baba has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.0]
alx- has joined #ruby
devdazed has quit [Ping timeout: 264 seconds]
pitzips has joined #ruby
forcefsck has joined #ruby
devdazed has joined #ruby
DanKnox is now known as DanKnox_away
breadthfirst has quit [Remote host closed the connection]
Cultofmetatron has quit [Remote host closed the connection]
<skroon>
MrZYX: is it also possible to just replace the part of the capture group ?
<MrZYX>
if you have just one capture group, why make a group at all?
DonRichie has quit [Quit: Verlassend]
aeontech has quit [Quit: aeontech]
rickruby has quit [Remote host closed the connection]
<skroon>
MrZYX: I would like to replace someting like: G00X0.00756Y0.00876 would like to replace the number after X with some other number (for example: 0.5) and later on would like todo with the Y number
DonRichie has joined #ruby
<MrZYX>
have a look at lookaround expressions, they do not consume or go into the match, so you get something that you can replace completely
<skroon>
MrZYX: ok thanks
<skroon>
MrZYX: they are part of regex's ?
<MrZYX>
yup
heriC has quit [Quit: heriC]
TheFuzzball has quit [Quit: Leaving...]
mikepack has quit [Remote host closed the connection]
maxmanders has joined #ruby
pcarrier_ has joined #ruby
backjlack has quit [Remote host closed the connection]
druonysuse has joined #ruby
druonysuse has quit [Changing host]
druonysuse has joined #ruby
workmad3 has joined #ruby
Nisstyre has quit [Ping timeout: 256 seconds]
atno has quit [Remote host closed the connection]
tundrax has joined #ruby
yacks has joined #ruby
tjbiddle has joined #ruby
ravster has quit [Ping timeout: 264 seconds]
<Dwarf>
Are ruby sockets async?
tundrax has quit [Ping timeout: 245 seconds]
Faris has joined #ruby
jurbat has quit [Quit: Computer has gone to sleep.]
banjara has joined #ruby
mixel has joined #ruby
<brujoand>
hey guys, /wc
<brujoand>
lol
brujoand has left #ruby [#ruby]
johnnyfuchs has joined #ruby
Nahra has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
Nahra has quit [Client Quit]
banjara has quit [Ping timeout: 252 seconds]
Nahra has joined #ruby
Nahra has joined #ruby
Nahra has quit [Changing host]
Eaven has quit [Read error: Connection reset by peer]
billy_ran_away has quit [Ping timeout: 271 seconds]
nopper` has joined #ruby
s1n4 has joined #ruby
billy_ran_away has joined #ruby
rubycode has quit [Ping timeout: 271 seconds]
nopper has quit [Ping timeout: 271 seconds]
rubycode_ has joined #ruby
Eaven has joined #ruby
s1n4 is now known as Guest99046
Guest99046 has quit [Client Quit]
Nisstyre has joined #ruby
icecandy has quit [Remote host closed the connection]
dambler has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
brujoand has joined #ruby
rburton- has joined #ruby
<brujoand>
hoi, can I from within a ruby script, determine the full path of the ruby binary being used to run my script?
atyz has joined #ruby
robottinosino has joined #ruby
tomsthumb has joined #ruby
gogu has quit [Quit: leaving]
ravster has joined #ruby
busybox42 has joined #ruby
pipework has quit [Remote host closed the connection]
viszu has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
Bauer1 has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
plightbo_work has joined #ruby
<Spooner>
brujoand, RbConfig.ruby
Z_Mass_ has joined #ruby
<plightbo_work>
I am a total Ruby n00b and I honestly can't figure out why I'm getting an error about an unexpected "end" statement. Any tips? https://gist.github.com/lightbody/5650698
Z_Mass_ has quit [Client Quit]
pipework has joined #ruby
Ontolog has joined #ruby
<MrZYX>
ruby has no ++
<Spooner>
plightbo_work, No such thing as ++ in ruby. You want var += 1
<brujoand>
Spooner: sweet, found it. thanks :)
<plightbo_work>
ah, well that's a surprise. i guess i don't feel _too_ bad about that :)
prk has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Spooner>
plightbo_work, You can also use a default to save on that code.
<Spooner>
props_seen = Hash.new(0)
<plightbo_work>
Spooner: not sure I'm following
<plightbo_work>
ah
<Spooner>
Then you can just += 1 to it
<plightbo_work>
that's handy
cofin has joined #ruby
Sm3lly has quit [Ping timeout: 256 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
phipes has quit [Quit: phipes]
maxmanders has quit [Quit: Computer has gone to sleep.]
nomenkun_ has quit [Remote host closed the connection]
JDGuingao has quit [Ping timeout: 246 seconds]
bradhe has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
<plightbo_work>
Spooner & MrZYX -- thanks so much!
plightbo_work has quit [Remote host closed the connection]
guiocavalcanti has quit [Remote host closed the connection]
rickruby has quit [Ping timeout: 252 seconds]
guiocavalcanti has joined #ruby
Vert has quit [Remote host closed the connection]
tundrax has quit [Ping timeout: 252 seconds]
kjellski has quit [Quit: Leaving]
kjellski has joined #ruby
bradhe has joined #ruby
skroon has quit [Ping timeout: 252 seconds]
banjara has joined #ruby
arya has quit [Ping timeout: 248 seconds]
guiocavalcanti has quit [Ping timeout: 248 seconds]
royalty has quit [Quit: This computer has gone to sleep]
alx- has quit [Quit: alx-]
workmad3 has quit [Read error: Operation timed out]
guiocavalcanti has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
<txdv>
Hey guys
<txdv>
I need a lightweight ruby web framework which has good support for websockets(or long polling, whatever appropriate alternative backfall technoliges are out there)
<Spooner>
txdv, Sinatra is a great light weight web framework. Assume it does what you ask for though.
royalty has joined #ruby
banjara has quit [Ping timeout: 264 seconds]
pipework has quit [Remote host closed the connection]
breadthfirst has quit [Remote host closed the connection]
felipebalbi has joined #ruby
breadthfirst has joined #ruby
<felipebalbi>
hi, after upgrading to ruby 2.0 my script which posts to twitter stopped working with "execution expired (Twitter::Error::ClientError)". What could be wrong ?
bricker has joined #ruby
splittingred has quit [Quit: splittingred]
Nahra_ has joined #ruby
Nahra_ has quit [Client Quit]
arya has joined #ruby
breadthf_ has joined #ruby
breadthfirst has quit [Read error: Connection reset by peer]
<felipebalbi>
btw, no changes were made to my script. I also wrote a simpler version of it which just calls Twitter.configure and Twitter.update and it fails the same way
<txdv>
I just want to make that rb_Digest_SHA1_Init error go away
<havenwood>
txdv: If you want to solve RVM issue, #rvm is very helpful.
<pipework>
txdv: Jesus is busy right now, but I can take a message.
<txdv>
now it turns out there are millions of building solutions for ruby?
butblack has quit [Quit: butblack]
<pipework>
How many ways to compile software are there?
mixel has quit [Quit: mixel]
<txdv>
what happened to autoconf && ./configure --prefix=/opt/ruby && make && make install
randomguy_ has quit [Ping timeout: 246 seconds]
<txdv>
I just compiled from source and there is still the rb_Digest_SHA1_Init error, so rvm wont help me here
Kar- has quit [Remote host closed the connection]
phipes has joined #ruby
randomguy_ has joined #ruby
atyz has quit [Ping timeout: 252 seconds]
werdnativ has joined #ruby
radic__ has quit [Quit: Verlassend]
radic has joined #ruby
[[thufir]] has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
mikepack has quit [Remote host closed the connection]
AlSquirrel has quit [Ping timeout: 252 seconds]
lancepantz_ has joined #ruby
lancepantz_ is now known as lancepantz
robbyoconnor has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
zigomir has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
yshh has joined #ruby
agjacome has joined #ruby
<txdv>
even nm says that the symbol in sha1.so is not defined
<txdv>
the ruby build script is fucked up
suporte85 has quit [Quit: Saindo]
Z_Mass has quit [Ping timeout: 252 seconds]
Kricir has quit [Remote host closed the connection]
digitalcake has joined #ruby
<digitalcake>
is -> a new way to create a lamda?
pipework has quit [Remote host closed the connection]
<werdnativ>
digitalcake: yes
brotatos has quit [Quit: WeeChat 0.4.1-dev]
<digitalcake>
what version of ruby did that start in?
<werdnativ>
digitalcake: since 1.9, you can do ->(arg1, arg2){ wtf }
bradhe has quit [Ping timeout: 245 seconds]
Kricir has joined #ruby
arya has joined #ruby
<digitalcake>
werdnativ: thanks
saarinen has joined #ruby
<werdnativ>
and "do" is not part of the expression I wrote above… :)
tundrax has joined #ruby
<digitalcake>
yeah I figured
<digitalcake>
just never seen anyone use -> till today thought it was odd looking
<werdnativ>
it's just shorthand for one-liners
staafl_alt has quit [Read error: Connection reset by peer]
<heftig>
digitalcake: it is odd looking
kofno has quit [Remote host closed the connection]
<heftig>
i avoid it in favor of lambda {}
<werdnativ>
Hmm, tests are green locally: https://travis-ci.org/seejohnrun/ice_cube/jobs/7499384#L941 …any ideas what might be breaking these in Travis? It shows no diff. I checked the t0.usec, t0.utc_offset, t0.class, everything equals.
tundrax has quit [Read error: Operation timed out]
<werdnativ>
Tried running the specs with TZ=UTC to mimic their env, just can't reproduce the failure.
<txdv>
yeap
<txdv>
ruby build config fucking up
<havenwood>
i <3 stabby lambdas, stab stab stab!
arya has quit []
banjara has quit [Quit: Leaving.]
rouss has joined #ruby
predator217 has quit [Ping timeout: 246 seconds]
cj3kim has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
cj3kim has joined #ruby
nof13 has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
bigmac has joined #ruby
predator117 has joined #ruby
kil0byte has quit [Remote host closed the connection]
johnkary has joined #ruby
senj has quit [Quit: senj]
falood has joined #ruby
breadthf_ has quit [Remote host closed the connection]
breadthfirst has joined #ruby
breadthfirst has quit [Read error: Connection reset by peer]
Eaven has quit [Remote host closed the connection]
breadthf_ has joined #ruby
mikepack has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
bigmac is now known as i8igmac
Davey has joined #ruby
johnnyfuchs has joined #ruby
Faris has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
phipes has quit [Quit: phipes]
rouss has quit [Quit: Computer has gone to sleep.]