t95341 has quit [Remote host closed the connection]
t42369 has joined #ruby
jlogsdon has quit [Ping timeout: 268 seconds]
T0m209847 has joined #ruby
T0m209847 has quit []
johnjohnson has quit []
melvinram has joined #ruby
nateberkopec has quit [Quit: Leaving...]
manizzle has quit [Ping timeout: 268 seconds]
Vert has quit [Read error: Connection reset by peer]
wmoxam has joined #ruby
csquared has joined #ruby
LouisGB has joined #ruby
jarek has quit [Quit: jarek]
heftig has quit [Ping timeout: 245 seconds]
heftig has joined #ruby
csquared has quit [Ping timeout: 244 seconds]
axl_ has quit [Quit: axl_]
jjang has quit [Remote host closed the connection]
adamkittelson has quit [Ping timeout: 248 seconds]
pdelgallego has quit [Quit: pdelgallego]
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-dev)]
specialGuest has quit [Quit: WeeChat 0.3.8]
__class__ has quit [Ping timeout: 264 seconds]
justsee has quit [Quit: Leaving...]
thunderstrike has quit [Remote host closed the connection]
axl_ has joined #ruby
chrisja has quit [Quit: leaving]
x77686d_ has joined #ruby
x77686d_ has quit [Read error: Connection reset by peer]
x77686d_ has joined #ruby
Z_Mass has quit [Ping timeout: 248 seconds]
<shevy>
man
<shevy>
I just had oddity in old code I wrote once
<shevy>
case user_input
<shevy>
when 'convert'
<shevy>
# here, about 15 lines of special handling, then:
<shevy>
convert(arguments)
LouisGB has quit []
x77686d has quit [Ping timeout: 244 seconds]
x77686d_ is now known as x77686d
<shevy>
it killed me mentally to sanitize the arguments twice
<shevy>
once outside the convert() method, and additionaly once inside the convert method
csquared has joined #ruby
<shevy>
and I ended up asking myself "why did I do this back then ... why..."
<shevy>
it kept me busy for 20 minutes
niklasb has quit [Ping timeout: 248 seconds]
<shevy>
until I simply rewrote the convert() method from scratched and discarded the crap 15 lines too
linoj has quit [Quit: linoj]
<shevy>
*from scratch
savage- has quit [Ping timeout: 244 seconds]
<Sou|cutter>
I like subtracting lines
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
linoj has joined #ruby
<shevy>
yeah
statarb3 has quit [Read error: Operation timed out]
<shevy>
but I also wondered why it is outside the method
rudyl313 has quit [Quit: Page closed]
<shevy>
methods really tidy up things
x77686d has quit [Ping timeout: 265 seconds]
SQLStud has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
artOfWar has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
iamjarvo has joined #ruby
wallerdev has quit [Quit: wallerdev]
infinitiguy has quit [Quit: Leaving.]
t42369 has quit [Remote host closed the connection]
t1977 has joined #ruby
wallerdev has joined #ruby
jjang has joined #ruby
jjang has quit [Remote host closed the connection]
tiripamwe has joined #ruby
c0rn_ has quit [Ping timeout: 244 seconds]
fyolnish_ has joined #ruby
wmoxam has quit [Ping timeout: 244 seconds]
luist has joined #ruby
nateberkopec has joined #ruby
macmartine has joined #ruby
kenneth has quit [Quit: kenneth]
wmoxam has joined #ruby
nateberkopec has quit [Client Quit]
SiliconDon has quit [Quit: SiliconDon]
sirish has joined #ruby
randomau_ has quit [Remote host closed the connection]
csquared has left #ruby [#ruby]
g_rotbart has joined #ruby
dmiller has joined #ruby
brianpWins has quit [Quit: brianpWins]
wpaulson has joined #ruby
reset has quit [Read error: Connection reset by peer]
<staunch>
i am playing with mechanize, i do agent.get('login url'), then i login correctly with forms, then i do agent.get'different url') and i loose the login session
<staunch>
any advise
<staunch>
for changing pages and keeping persistence
reset has joined #ruby
awarner has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
blazes816 has quit [Quit: This computer has gone to sleep]
<staunch>
@a.max_history = 0 # reduce memory if you make lots of requests
<staunch>
sorry shouldn't have done that
<staunch>
with the pste
Know1edge has quit []
linoj has quit [Quit: linoj]
melvinram has quit [Quit: melvinram]
machty has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby
ringotwo has joined #ruby
<shevy>
hey guys
<shevy>
let's say I have data like this:
<shevy>
63 Celsius are 145.400 Fahrenheit.
<shevy>
64 Celsius are 147.200 Fahrenheit.
<shevy>
65 Celsius are 149.000 Fahrenheit.
<shevy>
Now I was thinking
<shevy>
I could turn this into a bunch of arrays like
<shevy>
[63, 145.400]
w400z has quit []
<shevy>
does anyone know if, given a bunch of data like that, a computer program could find out the algorithm in use?
<shevy>
the formula at hand would be
tommyvyo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
<shevy>
(63.to_f * 9 / 5) + 32 # => 145.4
Brainix has quit [Quit: Brainix]
<shevy>
I'd like the computer to tell me that formula though
ringotwo has quit [Remote host closed the connection]
<davidcelis>
yes
<davidcelis>
treat them like coordinates, graph the line
<davidcelis>
the formula is the line
<seanstickle>
shevy: or use some of that neat genetic algorithm stuff
daidoji has joined #ruby
<seanstickle>
shevy: or, you know, statistical regression
dmiller has joined #ruby
Hanmac1 has joined #ruby
manizzle has joined #ruby
luxurymode has joined #ruby
<shevy>
oh
<shevy>
treating them like coordinates, that is actually a nice idea
<daidoji>
hello Ruby
<daidoji>
I'm in here once again with the same question from the other night
Hanmac has quit [Ping timeout: 252 seconds]
<shevy>
seanstickle: I know what coordinates are, but when it comes to "statistical regression", I am big big noob :)
<daidoji>
is there a gem or some kind of markdown tool that I can feed ruby code into in order to get markup like on ruby-lang.org?
erichmenge has joined #ruby
<shevy>
daidoji are you from japan?
<seanstickle>
shevy: you have Excel or some other number crunchy thing?
<daidoji>
shevy, I'm afraid not
<shevy>
seanstickle hmm... on my laptop downstairs... yeah
tiripamwe has quit [Ping timeout: 244 seconds]
<seanstickle>
shevy: You plunk in the data, and it'll give you the linear equation.
sirish has quit [Ping timeout: 256 seconds]
<seanstickle>
shevy: easy peasy
<shevy>
daidoji, I dont know much about markup... for .md files I use Kramdown ... Kramdown::Document.new(File.read("this_file.md")).to_html other than that hmm... I use coderay when I need to parse code formatted something via colours
ryanf has joined #ruby
enyo has quit [Read error: Connection reset by peer]
<shevy>
seanstickle cool, did not know that. will test that tomorrow then
<daidoji>
shevy, wait what?
enyo has joined #ruby
Anonyneko has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
Guedes has quit [Quit: Saindo]
shadoi has quit [Quit: Leaving.]
jhchabran has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
shadoi has quit [Remote host closed the connection]
gfontenot has quit []
jhchabran has joined #ruby
chrstphrhrt has joined #ruby
apok has quit [Ping timeout: 244 seconds]
minijupe has joined #ruby
jjbohn has joined #ruby
chrstphrhrt has left #ruby [#ruby]
chrstphrhrt has joined #ruby
naz has joined #ruby
t1977 has quit [Remote host closed the connection]
t41092 has joined #ruby
chrstphrhrt has quit [Quit: chrstphrhrt]
pskosinski has quit [Remote host closed the connection]
khakimov has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
ckrailo has quit [Quit: Computer has gone to sleep.]
mascool has quit [Ping timeout: 240 seconds]
dpk has quit [Quit: Asleep at the keyboard.]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
<daidoji>
:-( ruby-lang webmaster says its all edited by hand
<daidoji>
thats lame
justsee has quit [Quit: Leaving...]
<daidoji>
guess I have a new project although i feel like someone should have written this before now
ScottNYC has quit [Quit: ScottNYC]
seanwash has joined #ruby
nari has joined #ruby
pipopopo has quit [Ping timeout: 240 seconds]
pipopopo has joined #ruby
jjbohn has quit [Quit: Leaving...]
<koshii>
When I type hash = Hash.new([]) and then hash[:one] << "uno", why can't I see "uno" when I type hash into irb?
<koshii>
I just see []
Chryson has joined #ruby
dmiller has quit [Remote host closed the connection]
darren has quit [Remote host closed the connection]
ilyam has joined #ruby
shadoi has joined #ruby
dmiller has joined #ruby
<koshii>
And why does hash[:three] show ["uno", "dos"] even though I did not ever put a third value into the hash?
<koshii>
fowl: Is that its primary function? I thought it was a container with kind-of pointers.
<fowl>
koshii: no, when you do Hash.new([]) you're setting that empty array as the default value
<koshii>
Yes
<koshii>
Oh I see. And then I'm popping values into the ARRAY inside the hash?
<koshii>
That's why they didn't appear when I wrote hash into irb
<koshii>
(Which only slightly makes sense)
<fowl>
koshii: instead of saying the default value should be an empty array, you're saying the default value should be this array
t41092 has quit [Remote host closed the connection]
CarlB_the_great has quit [Remote host closed the connection]
<koshii>
Oh.
t23010 has joined #ruby
<koshii>
fowl: So that still doesn't explain for me why "hash" doesn't return something, unless the array that I'm defaulting to is not contained within the hash?
macer1 has joined #ruby
<koshii>
fowl: "hash" only returns something if I add hash[:one] etc
<examancer>
I have a class and I would like to dynamically mixin methods from a list of possible modules based on configuration options passed to #initialize. Is there any way to do this?
<koshii>
Hey I was reading this book by a guy called "Why" and read a bit about him on Wikipedia. Does anyone know why he wanted to be anonymous in the first place? Was he working for some big company that wouldn't let him do that kind of work or something?
maletor has quit [Quit: Computer has gone to sleep.]
<seanwash>
Oh, you mean Why the lucky stiff?
<koshii>
seanwash: Yeah.
<daidoji>
why not?
Agis__ has joined #ruby
Taichouchou2 has joined #ruby
<seanwash>
koshil: yeah, I don't know.
<koshii>
Heh
<fowl>
koshii: the internet is full of crazies, anonymity is sensible
<koshii>
I mean, it's neat. I don't have some issue with it, I'm just wondering.
<fowl>
plus it made him mythical, like batman
<koshii>
Exactly what I was about to say.
<seanwash>
I concur.
<examancer>
Nobody really knows why _why wanted so much privacy, but its not difficult to come up with plausible explanations
<rking>
I think _why was just odd. I wouldn't try to rationalize it in any standard way.
<koshii>
fowl: Hey thanks for that ruby-doc link; I think I've got it now.
<koshii>
examancer: What's the leading theory? :-)
<examancer>
i just find it sad that he decided he no longer wanted to participate in the Ruby community
<rking>
Yes, sad.
pdtpatrick has quit [Quit: pdtpatrick]
maletor has joined #ruby
<koshii>
Maybe he did what he came to do. :-)
<rking>
Like E.T.
<examancer>
koshii: I've read some stuff that has tracked him down and contacted him. He just wants to be left alone. that's explanation enough for me.
<koshii>
Yeah, it makes sense. It's a lot of work maintaining a public personality, too.
<examancer>
he will be missed. he was a good developer, and a great educator
<koshii>
I can understand why he might not want to.
<koshii>
examancer: For all we know he might be educating and developing under yet another alias. :-)
<examancer>
he's clearly still a developer from what I've read... just not a very public one unless he is using a very distinct persona
<koshii>
examancer: I guess it's not too hard to do.
bapa has joined #ruby
<fowl>
you guys dont think he went back to his home planet?
<koshii>
:-)
<examancer>
we can all only hope to have the impact on a community that _why had on Ruby
<koshii>
Please launch your funny educational books this way. :-)
<koshii>
I'm happy to beta-test
<examancer>
heh
<koshii>
Hey is there anything like Squeak-Smalltalk's cool method browser for Ruby?
<koshii>
Morphic
<koshii>
Actually I'm sorry, that's not what it's called. But do you guys know what I'm talking about?
<fowl>
koshii: there is pry
<koshii>
fowl: I installed that!
<koshii>
fowl: I didn't get it. :(
<fowl>
koshii: install the pry-doc gem and you have access show-doc and show-source commands
<fowl>
show-doc "Hello".chomp
<fowl>
koshii: its irb improved with more introspection magic. you can cd into an object and explore it with ls
<koshii>
fowl: Yeah I played around with it. By "I didn't get it" I guess I just mean that I didn't find it very intuitive.
<rking>
koshii: It's definitely the method-browser equivalent you're looking for.
bapa has joined #ruby
<rking>
cd Class then ls then ? a_method then $ a_method
<fowl>
koshii: well it really becomes useful when you're debugging. you have a problem line that throws exceptions you can put a binding.pry in your code before it hits that expression and when ruby hits it, pry will open at that spot, you can see all local variables and walk around in your program like neo in the matrix
<davidcelis>
examancer: well dude all it does is return Qnil
<davidcelis>
what do you want them to do, document that it returns Qnil? ;)
<koshii>
Pry feels vaguely emacs-ish to me, in the sense that it's this monolithic do-everything tool. I wonder how far this is going to go. :-)
<fowl>
davidcelis: thats because it's supposed to be overwritten
<examancer>
it would be nice if the document clearly spelled out that the method is triggered with a module has been extended into a something
<examancer>
and that the object which extended it is passed as the only argument
jrajav has joined #ruby
<examancer>
and that you should overwrite it if you want to trigger further action when your module is extended
etank has joined #ruby
wo66le has quit [Quit: Computer has gone to sleep.]
<rking>
koshii: Good intuition. Banister is an emacs-head. IMO the balance between "small tools that do their job well" and "monolithic beasts" is an ebb and flow. Solutions from one inform the other.
AnarchoTroll has joined #ruby
<koshii>
rking: Heh. No doubt.
<examancer>
davidcelis: what is Qnil anyways? is that different than regular nil?
<davidcelis>
examancer: some C construct
<davidcelis>
I haven't done much source diving into Ruby aside from finding out how Symbols are implemented
<rking>
Qnil is the C token to mean Ruby's nil.
<examancer>
ah. cool
<Banistergalaxy>
Qnil == nil, yeah
<koshii>
So who here has done something with RubyMotion already?
<examancer>
i wanted it so when an instance of class A extends module B, that module B would then also mixin/extend module C into instance A
<davidcelis>
Banistergalaxy: oh hey looks like you have some fanboys in here banister
<bnagy>
examancer: I guess they want you to use extend_object, not extended
<bnagy>
which _is_ documented
<examancer>
bnagy: would that allow me to do the same thing? looking at it now
<examancer>
my library will need to work with 1.8, so looking there as well...
jasonkuhrt has quit [Quit: Leaving...]
<examancer>
looks like it works in both. thanks. i'll use that instead
<examancer>
kind of odd that initialize isn't documented there... nor is it documented anywhere else in the core docs
<examancer>
or at least not where i could find
diegoviola has quit [Ping timeout: 245 seconds]
daidoji has quit []
shadoi has quit [Ping timeout: 244 seconds]
<examancer>
guess there is a reference to it in Class#new
SegFaultAX has joined #ruby
joshw701 has joined #ruby
adamkittelson has joined #ruby
<bnagy>
the rdocs are admittedly not a great place for understanding core 'how things work' concepts
<bnagy>
they're tactical, method by method docs
jeff_sebring has joined #ruby
dr_diamond has joined #ruby
dr_diamond has quit [Changing host]
dr_diamond has joined #ruby
phanousit has joined #ruby
phanousit is now known as siameseguy
<examancer>
yeah. for better or worse PHP docs do both. about the only thing i still like about PHP over Ruby
eignerchris has joined #ruby
<siameseguy>
hello, I'm getting a "nil is not a method error for my code: http://pastie.org/4614105. can someone help me?
wmoxam has quit [Ping timeout: 268 seconds]
awarner has quit [Remote host closed the connection]
<examancer>
not sure where to find that kind of "how things work" info about Ruby without searching google and SO
<siameseguy>
whoops i meant "nil is not a symbol" error
<rking>
siameseguy: After the first time the .call() runs, the return value is assigned to next_room.
dr_diamond has quit [Client Quit]
<rking>
Which in this case is the nil coming back from the puts 'This is the main hallway.'
<examancer>
siameseguy: on the first loop it will find the method #main_hallway, but that method returns nil
<examancer>
so on the next loop it will call method(nil) which doesn't make sense
jrajav has quit [Quit: The best darkness is strange and surprising]
<siameseguy>
examancer: so its because the method is empty?
<rking>
Add :main_hallway (on a line by itself) after line 17 and you'll forever be stuck in the main hallway, but it won't error.
jenrzzz has quit [Ping timeout: 246 seconds]
<examancer>
siameseguy: the problem is you are assigning the return value of main_hallway to next_room, and main_hallway doesn't return anything but nil
stanzgy has joined #ruby
<siameseguy>
ok i think i ge tit
eignerchris has quit [Remote host closed the connection]
adamkittelson has quit [Remote host closed the connection]
<examancer>
rking's solution would work. seems inevitable that you are going to either get an error or an infinite loop with the direction you are going
<siameseguy>
it was an infinite loop
<bnagy>
def def lost_in_void; "You are lost in the void because my programmer screwed up. You die."; exit; end
<examancer>
i like bnagy's solution :-)
<siameseguy>
i plan to add more rooms, so hopefully it will be ok
<bnagy>
also please get rid of all the ()
<siameseguy>
ok will do
<bnagy>
this is not python
<siameseguy>
haha
<siameseguy>
this is just my engine to move me from room to room
wmoxam has joined #ruby
n_blownapart has joined #ruby
brianpWins has quit [Quit: brianpWins]
cakehero has joined #ruby
koshii has quit [Ping timeout: 244 seconds]
savage- has quit [Remote host closed the connection]
<rking>
bnagy: Heck yes. I already played all my superfluous-()-hate cards for today, but I'm right there with you.
Agis__ has quit [Quit: Agis__]
jorge has joined #ruby
sirish has joined #ruby
<n_blownapart>
hi I looked at Logger methods, but cannot find a "logfile method which returns a writable file handle on a log file." what would this method look like? thanks.
<n_blownapart>
kindly inform me about " a logfile method that returns a writeable file handle on a log file means, if you have time. thanks
<n_blownapart>
strike: means ^^
skyjumper has left #ruby [#ruby]
maletor has quit [Quit: Computer has gone to sleep.]
jlogsdon_ has quit [Remote host closed the connection]
<examancer>
n_blownapart: sounds like you just want to open a file in a writable way, it just so happens that the file is a log file. see File#new
mwilson_ has quit [Excess Flood]
reset has quit [Ping timeout: 256 seconds]
mwilson_ has joined #ruby
<n_blownapart>
thanks examancer but how would it write a file "handle" . that is not an assignment, ie "fh" ?
zhutingting has joined #ruby
<examancer>
File#new returns a file object, which internally has a handle on the file. you can then use methods like #write, #rewind, #read on that object
kiyoura has quit [Quit: Leaving]
<n_blownapart>
oh so its internal, just assign say fh = File.new ? the method would be for lines 7 and 8 here: http://pastie.org/4614217 examancer
<bnagy>
either use the block form to File.open or wrap your code with begin ... ensure; fh.close; end
zhutingting has quit [Read error: Connection reset by peer]
<n_blownapart>
ugh. I'm just following the book. bnagy ensure is the next chapter topic examancer
<bnagy>
which book has code like that?
<n_blownapart>
the well-grounded rubyist david black bnagy pax
jrist is now known as jrist-afk
<deryl>
love that book
<bnagy>
the well grounded rubyist opens a filehandle and doesn't use the block form or ensure close?
<bnagy>
which page?
<n_blownapart>
god deryl bnagy it got great reviews just trying to learn this shit. ensure comes on the following page to this code.
x77686d has joined #ruby
ananthakumaran has joined #ruby
<bnagy>
ok well if you want to learn page by page from the book, then don't ask here, it will mess up your careful learning checdule
<bnagy>
*schedule
<deryl>
hehe, you might want to read through the entire chapter (or at least the complete section) before you ask
uris has quit [Quit: leaving]
<deryl>
the way david breaks it down, waiting the whole chapter is probably the best way. I found that a notepad next to me for the tangents i thought of really helped
banisterfiend` has joined #ruby
bbloom has joined #ruby
<n_blownapart>
deryl: ok thanks , I was doing decently until now.
seanstickle has quit [Quit: seanstickle]
<seanwash>
Can you guys recommend any books that don't necessarily teach syntax, but teach how to think as a programmer? Or maybe ways to go about solving problems that programmers generally come across?
Banistergalaxy has quit [Ping timeout: 245 seconds]
freeayu has quit [Quit: This computer has gone to sleep]
mwilson_ has quit [Excess Flood]
AnarchoTroll has quit [Quit: Leaving]
mwilson_ has joined #ruby
<seanwash>
I feel like I'm learning syntax ok, but knowing what to do with that syntax is where I struggle!
<bnagy>
'learn to program' is often recommended
<seanwash>
bnagy: hokay
<bnagy>
I'll be honest, though, imo thinking like a programmer is learned through use
<banisterfiend`>
n_blownapart:didnt u send me an email saying u were banned? :P
<bnagy>
reading and writing code
williamherry has joined #ruby
<seanwash>
bnagy: That's true
<seanwash>
bnagy: good point
<n_blownapart>
banisterfiend`: bnagy you guys should just crucify me and get it over with.
jenrzzz has joined #ruby
<bnagy>
doesn't matter what language
<williamherry>
I already installed rails use gem install rails, and I can see rails from gem list, but rails command is not available, more step should I do?
<banisterfiend`>
n_blownapart: no, i thought you were saying you were actually banned --- banned means you were ip address is blocked from joining this channel and you can't send messages here
<bnagy>
williamherry: you could try #rubyonrails
<bnagy>
or google rails install guide or something
<rking>
bnagy: Hrm. His problem sounds like a gem path one, not sure if it's necessary to deflect to rails.
<n_blownapart>
banisterfiend`: why for asking questions which are too basic?
<rking>
williamherry: What about this one?: gem install pry then pry
headius has quit [Quit: headius]
<n_blownapart>
banisterfiend`: by the way learning pry is no cake walk either.
<banisterfiend`>
n_blownapart: how come? it's just IRB with a few extra commands :)
<n_blownapart>
banisterfiend`: its very cool. I got through the Josh Cheek video. it was fun. at least I enjoy it but sorry to be a nuisance.
macmartine has joined #ruby
cj3kim has quit [Quit: Leaving]
sirish has quit [Ping timeout: 245 seconds]
<n_blownapart>
banisterfiend`: did the pry show-doc command get replaced recently by show-source ?
<banisterfiend`>
n_blownapart: no, they're different commands. show-doc shows documentation, show-source shows source code
<banisterfiend`>
y?
emmanuelux has quit [Ping timeout: 246 seconds]
<n_blownapart>
banisterfiend`: I was hung up on that for like a day, then I realized it could have been josh cheek mistake in the narration.
<banisterfiend`>
hung up on it for a DAY? :P dude, u can always just type 'help' in pry
<ryanf>
oh, that josh cheek screencast is really old
<banisterfiend`>
and it tell su what the commands too, alternatively check out the wiki
<ryanf>
there's probably lots of stuff that has changed
<banisterfiend`>
do*
<banisterfiend`>
that's true
<n_blownapart>
banisterfiend`: exaggeration, but I was glad to figure it out I would say... :)
<banisterfiend`>
cool
jerrad has quit [Quit: Leaving...]
seanwash has quit [Quit: Leaving.]
aristidesfl has quit []
<n_blownapart>
banisterfiend`: others highly recommend pry as a way to learn it so thanks..
koshii has quit [Ping timeout: 252 seconds]
koshii has joined #ruby
Hanmac1 has quit [Read error: Operation timed out]
brianpWins has joined #ruby
adeponte has joined #ruby
ilyam has joined #ruby
ilyam has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
mml has quit [Quit: leaving]
zodiak has joined #ruby
Hanmac has joined #ruby
c0rn_ has quit []
td123 has joined #ruby
jankly_ has quit [Quit: Leaving]
kenneth has joined #ruby
vivien__ has joined #ruby
kenneth has quit [Quit: kswizz.com]
seanyo has joined #ruby
c0rn_ has joined #ruby
c0rn_ has quit [Client Quit]
burgestrand has quit [Quit: Leaving.]
cakehero has quit [Quit: Computer has gone to sleep.]
c0rn_ has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
quest88 has left #ruby [#ruby]
Agis__ has joined #ruby
drago757 has joined #ruby
Hanmac has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
x77686d has quit [Quit: x77686d]
Spooner has quit [Read error: Connection reset by peer]
Agis__ has quit [Client Quit]
iamjarvo has quit [Ping timeout: 244 seconds]
drago757 has quit [Read error: Connection reset by peer]
drago757 has joined #ruby
tonini has joined #ruby
Progster has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
aidanna has quit [Quit: Ex-Chat]
seanyo_ has joined #ruby
sailias has joined #ruby
nesoi has joined #ruby
<nesoi>
what's the best way to install ruby 1.9 on osx?
anybody has joined #ruby
yasushi has joined #ruby
seanyo has quit [Ping timeout: 264 seconds]
<banisterfiend`>
nesoi: rvm or rbenv
<nesoi>
not rubyforge rubyosx?
yoklov has joined #ruby
<nesoi>
I tried before and had all kinds of problems
<bnagy>
wow, I was sure you would use uniq &:sort, Hanmac
becom33_ has quit [Ping timeout: 248 seconds]
<bnagy>
you never miss these kinds of opportunities :)
<cearls>
yeah, nothing like asking for help and looking at what i'm asking.. it's working, i'm using matches.include? to check if it already exists before adding it
<al2o3cr>
-e:1:in `eval': "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<shadoi>
I tried to reproduce it, and it stopped happening
<shadoi>
I think maybe I was stomping on STDOUT somehow, I'm still very confused by it
<banisterfiend`>
shadoi: k00
<shadoi>
I'll try to make a simple test-case and see if I can make it happen. Pry was basically just complaining that it couldn't open STDOUT, i've also see it complain that it can "infer basepath"
<shadoi>
Probably because of the Celluloid method proxy
<vectorshelve>
shevy: now I am working behind a proxy well.. agent = Mechanize.new do |a| a.proxy_host = 'proxy.example' a.proxy_port = 8080 end throws erro
<vectorshelve>
error*
Hanmac has joined #ruby
baphled has joined #ruby
<matti>
;]
<vectorshelve>
matti: Hi ;)
<vectorshelve>
shevy: any luck ? I think it should work for you.. if you aint behind a proxy :)
chimay has quit [Remote host closed the connection]
<shevy>
ruby/site_ruby/1.8/hpricot_scan.so
<shevy>
well my hpricot one doesnt work
<vectorshelve>
shevy: solved :D
<shevy>
:(
<vectorshelve>
shevy: so I should then think about providing user an API for adding proxy :) good idea
bluOxigen has quit [Ping timeout: 268 seconds]
neku has quit [Read error: Connection reset by peer]
<vectorshelve>
shevy: what happened ?
<shevy>
ruby begins to feel like a big patchwork of failing components
<shevy>
dunno
<shevy>
said it installed hpricot, but it didnt
<matti>
shevy: I am matz's evil twin. Didn't you know?
seich- has joined #ruby
Xeago has joined #ruby
<RubyPanther>
1.8 stopped being the current stable version like... years ago. I would expect it to have lots of bit-rot by now.
robustus has joined #ruby
elhu has quit [Client Quit]
<vectorshelve>
shevy: dont be sad... ruby is beautiful and powerful too so she can always protect her virgintiy and sanctity and make way to salvation ;)
<shevy>
RubyPanther it's not only that. things that are promoted like bundler, which I find awful. there is this tendency in the ruby world to make things simpler and also dumbing things down at the same time
ge0pan has joined #ruby
<shevy>
vectorshelve yeah ruby is great. but why didn't matz envision something like gems in the first place
mneorr has quit [Remote host closed the connection]
<Muz>
shevy: what is your problem with Nokogiri? Aside from the slightly wonky syntax, and weird return values, it's hardly unusabe or lacking of features and capabilities.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
lkba has quit [Quit: Bye]
ge0pan has quit [Client Quit]
<shevy>
yeah nokogiri works actually
<shevy>
require 'nokogiri' # => true
<shevy>
mechanize doesn't now though
<shevy>
for some reason, mechanize wants to require hpricot
<RubyPanther>
shevy: that is absurd, bundler doesn't dumb things down at all it is totally configurable.
qwerxy has joined #ruby
<shevy>
lol
<RubyPanther>
Frankly I can't see how a person could dislike bundler if they were around before it
<shevy>
so according to you, bundler never does anything clever on its own?
<Muz>
RubyPanther: it does add a layer of complexity and fussing to deploying code onto other machines, but once you get over that hurdle and learn how it works, it's fine.
Virunga has joined #ruby
<Muz>
Then again, that's like any tool. Learn how it works. ¬_¬
workmad3 has quit [Ping timeout: 265 seconds]
<Muz>
shevy: what does it do that's so objectionable?
<shevy>
now I know, according to RubyPanther, banister complained about something bogus back then apparently
t44656 has quit [Remote host closed the connection]
* Muz
doesn't see how else things get fixed if people just grumble about the behaviour and make no effort to get it improved or fixed.
darren has quit [Remote host closed the connection]
t46947 has joined #ruby
<shevy>
Muz I actually don't remember what he complained about precisely :\ it was something that was done in addition to what he tried to do
saschagehlich has joined #ruby
saschagehlich has quit [Client Quit]
LouisGB has quit [Disconnected by services]
n8888 has joined #ruby
<shevy>
I did! I filed two issues in total about bundler so far
gentz_ has joined #ruby
<RubyPanther>
It doesn't add a layer of complexity, it removes a fuzzy "have a sysadmin fix the install" layer and replaces it with a standard command that has predictable results that don't change just based on which gems were _installed_
<shevy>
but they were smaller and unrelated to that
<Muz>
shevy: and were they fixed? :P
<shevy>
Muz yeah
<Muz>
Quit yer whinin' then. ;)
<shevy>
I am not saying the bundler team is incompetent
FlyingFoXy has joined #ruby
bluOxigen has joined #ruby
<yxhuvud>
RubyPanther: there are parts of bundler documentation and discoverability that could be a lot better though
paolooo has joined #ruby
Zespre_ has joined #ruby
flagg0205 has joined #ruby
davidcelis has quit [Ping timeout: 240 seconds]
nopper has quit [Ping timeout: 240 seconds]
Zespre has quit [Ping timeout: 240 seconds]
jkyle has quit [Ping timeout: 240 seconds]
Gate has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
flagg0204 has quit [Ping timeout: 240 seconds]
gentz has quit [Ping timeout: 240 seconds]
notbrent has quit [Ping timeout: 240 seconds]
mohits has quit [Ping timeout: 240 seconds]
lectrick has quit [Ping timeout: 240 seconds]
manouche has quit [Ping timeout: 240 seconds]
Poapfel has quit [Ping timeout: 240 seconds]
jord_ has quit [Ping timeout: 240 seconds]
Jelco_ has quit [Ping timeout: 240 seconds]
FlyingFoX has quit [Ping timeout: 240 seconds]
Guest26352 has quit [Excess Flood]
djdb has quit [Ping timeout: 240 seconds]
resure_away has quit [Ping timeout: 240 seconds]
Derander has quit [Ping timeout: 240 seconds]
jord has joined #ruby
Guedes0 has joined #ruby
lectrick__ has joined #ruby
<shevy>
github issue reporting is very cool
fyolnish_ has quit [Ping timeout: 256 seconds]
Poapfel has joined #ruby
resure_away has joined #ruby
manouche has joined #ruby
Gate has joined #ruby
Gate has quit [Changing host]
Gate has joined #ruby
Jelco_ has joined #ruby
<RubyPanther>
The old way, for example you would have conflicts where a gem that relies on something like ActiveSupport but doesn't declare the version breaks things unless it is loaded after rails. Well, what if you ahve a gem that has to load first? Before you would have to do what, make changes to a third party gem and tote your own copy around in vendor and have your app blow up if somebody installed a gem with a newer number?
jenrzzz has joined #ruby
jkyle has joined #ruby
<shevy>
from about 10 reports I ever did on sourceforge in like 5 years, 2 were fixed or addressed. on github, from about 20, about 15 got fixed or handled, the others still somehow addressed
djdb has joined #ruby
davidcelis has joined #ruby
und3f has quit [Ping timeout: 240 seconds]
<vectorshelve>
shevy: the problem is with gem compatibility and improper version management
bluOxigen_ has quit [Ping timeout: 248 seconds]
<vectorshelve>
shevy: rest is cool
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
nopper has joined #ruby
<shevy>
sounds as if you ran into your share of problems already vectorshelve :)
<RubyPanther>
Ruby doesn't _have_ proper version management, bundler adds it in a way that is transparent to the gems and takes advantage of what versioning Ruby does have. And solves the whole problem. And handles the issues of version consistency between developers/deploys
und3f has joined #ruby
Derander has joined #ruby
<RubyPanther>
Is it perfectly documented? No, but neither is anything these days.
Jonah11_ has joined #ruby
rohit has joined #ruby
<Jonah11_>
strange behavior in my rspec tests, the "before" block does not seem to be getting run -- why not? https://gist.github.com/3524671
Taichouchou2 has quit [Remote host closed the connection]
jrist-afk has quit [Ping timeout: 260 seconds]
berserkr has joined #ruby
Vert has joined #ruby
ph^ has joined #ruby
<Muz>
Jonah11_: should line 10 not be 'it "always call" do'
<Muz>
?
<Jonah11_>
Muz: doh! ty
Agis__ has joined #ruby
resure_away has quit [Remote host closed the connection]
jlebrech has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
<jlebrech>
are there any tutorials on writing extensions to rspec, a bit like cucumber
t46947 has quit [Remote host closed the connection]
cascalheira has joined #ruby
t55075 has joined #ruby
<vectorshelve>
shevy: no I always thought if that could have been done properly.. it could have been much better
heisenmink has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
fyolnish has joined #ruby
<hemanth>
best way to avoid deprecated warning ruby1.9 is?
<vectorshelve>
hemanth: rvm... proper gem set.. atleast helps to reduce some issues !!
<hemanth>
or else is there way to redirect them ?
mneorr has joined #ruby
<hemanth>
I don't want them to be on stdout
tyrant has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
notbrent has joined #ruby
<hemanth>
iconv deprecation warning with ruby 1.9.3
rohit has quit [Ping timeout: 264 seconds]
<statarb3>
pid newbe questions, when i create a new file with the File.new and read it later in with r (read options) and do puts book.read it spits out the content of the file, however when i do it again it does not spit out the content of the file
<hoelzro>
statarb3: you're calling read twice on the same file handle?
<hoelzro>
keep in mind that read maintains a sort of cursor in the file, so a single read moves it to the end of the file
<statarb3>
oh, is that so, well i did not know that
<hoelzro>
I think File.read(filename) will do what you want
<hoelzro>
or rewind, like Muz suggests.
steven- has quit [Ping timeout: 246 seconds]
<hemanth>
i need unrequire method :\
<Muz>
Having a quick read through the IO and File doc pages should give you an idea of what you can do with files, and how they work.
strzalek_ has joined #ruby
ringotwo has joined #ruby
strzalek has quit [Ping timeout: 248 seconds]
strzalek_ is now known as strzalek
<statarb3>
thanks guys let me try thisa
snearch has joined #ruby
<statarb3>
:) thanks hoelzro and muz for your tips :)
<sent-hil>
hemanth: $VERBOSE=nil?
<hemanth>
sent-hil, came across that, but it had loads on down votes, wonder why
Takehiro has joined #ruby
tonini has quit [Remote host closed the connection]
<sent-hil>
down votes where?
pskosinski has joined #ruby
steven has joined #ruby
fastred has quit [Quit: fastred]
fyolnish has quit [Remote host closed the connection]
fastred has joined #ruby
dhruvasa1ar has quit [Ping timeout: 244 seconds]
banseljaj has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
dhruvasagar has joined #ruby
alienvenom has joined #ruby
jhunter has joined #ruby
<sent-hil>
holy crap, i turend on verbose mode and i got three pages of warnings
<hemanth>
stackoverflow
<hemanth>
:D
wallerdev has quit [Quit: wallerdev]
<JonnieCache>
>> $VERBOSE = true; puts "lol"
<al2o3cr>
(NilClass) nil, Console: lol
<JonnieCache>
awww :(
<hemanth>
>> $VERBOSE = nil; require "lol"
<al2o3cr>
-e:1:in `eval': cannot load such file -- lol (LoadError), from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
Musfuut has joined #ruby
Agis__ has quit [Read error: Connection reset by peer]
<sent-hil>
hemanth: not sure, i turned it off in specs when i was working with em-http-request, haven't caused any trouble yet
Musfuut is now known as Guest24624
G has joined #ruby
<hemanth>
sent-hil, nice, will stick to that as of now
RichieEvan has joined #ruby
Agis__ has joined #ruby
ph^ has joined #ruby
sent-hil has quit [Remote host closed the connection]
tundrax has joined #ruby
johnnyfive has joined #ruby
freeayu has quit [Quit: 离开]
CoolCold has left #ruby [#ruby]
s1n4 has joined #ruby
s1n4 has quit [Client Quit]
Guest24624 is now known as Musfuut
strzalek has quit [Quit: strzalek]
jrist has joined #ruby
ph^ has quit [Ping timeout: 240 seconds]
lampe2 has joined #ruby
Sou|cutter has joined #ruby
Elico1 has joined #ruby
Zespre_ has quit [Ping timeout: 268 seconds]
<Elico1>
is it possible to run some loop in background without forking or threading?
_bart has quit [Quit: _bart]
Foxandxss has joined #ruby
indian has joined #ruby
Huis has joined #ruby
<hoelzro>
Elico1: for what purpose?
Huis has left #ruby [#ruby]
<Hanmac>
"is it possible to get from A to B without moving" :P
dhruvasagar has quit [Ping timeout: 244 seconds]
jwbuurlage has joined #ruby
dhruvasagar has joined #ruby
<Elico1>
well i wrote an application .. small proxy.. and it based on two incoming tcp ports. and i need a way of both serving clients and other tasks
mc0e1 has joined #ruby
<Mon_Ouie>
You could use IO.select to know when the clients sent you data and process their requests then, and also do the rest of your work in the main loop
<Elico1>
ok seems reasonable
<Elico1>
my question is...
vlad_starkov has joined #ruby
Zespre has joined #ruby
mc0e has quit [Ping timeout: 246 seconds]
<Elico1>
i do use select for recvmsg but how about accept?
<Elico1>
server.accept ?
<Mon_Ouie>
A TCPServer is an IO object to, and can be passed to select
melvinram has quit [Quit: melvinram]
<matti>
Elico1: Look at EventMachine :)
<matti>
Mon_Ouie: Doing IO.select nowadays is so '70s ;p
<Elico1>
matti: i looked at it... i wrote another server with event machine
<Elico1>
but now with this one i'm having trouble
x0F_ has joined #ruby
x0F_ has quit [Changing host]
x0F_ has joined #ruby
x0F has quit [Disconnected by services]
x0F_ is now known as x0F
<Hanmac>
matti and what is writing an own tcpserver in C "is it so 60's"? xD
<Elico1>
since it's a proxy i need for it to manage both sockets
<Elico1>
Hanmac: it's so 20's...
<heisenmink>
Elico1: why can't you do that with eventmachine?
<Elico1>
heisenmink: i have tried but it dosnt seems to work for me.. my mind is locked up now
<matti>
Hanmac: No, that is plain crazy ;p
<matti>
[ I am joking of course ]
ph^ has joined #ruby
<Elico1>
if you are willing to help me thing loundly about it i will be happt
Zespre has quit [Ping timeout: 245 seconds]
<Hanmac>
it was part of my job education to do this
dekroning has quit [Ping timeout: 256 seconds]
<heisenmink>
Elico1: you should use eventmachine and offload heavy tasks to background jobs that report back to the event machine.
<heisenmink>
Elico1: fire away with the questions
<heisenmink>
or code pastes
Zespre has joined #ruby
<Elico1>
heisenmink: so i wrote a tcp server that works..
<matti>
Hanmac: I spent some time writing in C too, select and epoll -- we've had complex relationship ;]
elhu has joined #ruby
ly_gs has joined #ruby
<Elico1>
the idea is : i have two tcpservers one on each port.. this i can WITH em
<Elico1>
but the complex part is that i need to take two incoming connections and transfer data between them
<bnagy>
Hanmac: binding I guess, you're right. I didn't check :)
arkiver has joined #ruby
<matti>
heisenmink: Not using enable_proxy?
<heisenmink>
matti: I have no idea what I am doing
chimay has joined #ruby
<matti>
Hahaha
dhruvasagar has quit [Ping timeout: 240 seconds]
<Elico1>
thanks heisenmink
<matti>
heisenmink: +1 :)
<bnagy>
if (part.weight > 0 rescue false);
<matti>
bnagy: Nasty.
<matti>
;d
<bnagy>
explicit tests are for people with time
<arkiver>
When i write foo = "bar = 'something'" and call eval(foo) and later when I do this: >>bar, I get an error message "undefined local variable" doesn't the eval method run the code and shoudn't it create the variable ??
dhruvasagar has joined #ruby
<Hanmac>
arkiver maybe it does, but you cant trust eval
<Hanmac>
or you used wrong
<arkiver>
ahh
<arkiver>
Hanmac, Does it change the environment when executing the eval method ?
<Elico1>
it's simple... twp tcp ports.... two servers.... two clients... initiate connection to both sides and then let them speak with each other until anyone of them end the connection...
nilg has quit [Ping timeout: 268 seconds]
<banisterfiend>
matti: i assume that's what all your ";]" are secretly about
<Mon_Ouie>
becom33_: Because you demand an argument after -x, a.k.a --os?
<Elico1>
but the example from before was pretty nice..
<matti>
becom33_: parse! twice?
<Elico1>
on the event machine
<matti>
banisterfiend: LOL
<becom33_>
Mon_Ouie, i know . but I wanna put a grab that error and put somthing else
Guedes0 has quit [Quit: Saindo]
<becom33_>
matti, yea my bad
<bnagy>
becom33_: helps if you tell people the error
<matti>
banisterfiend: You are just jealous :)
<bnagy>
becom33_: also optparse sucks, use trollop
<bnagy>
becom33_: I didn't say I could help, dude, just that without the error nobody else can either :) this is why I use trollop, that syntax is uuugly
nari has quit [Ping timeout: 245 seconds]
<Mon_Ouie>
Just removing the extra call to parse! should fix it
vlad_starkov has quit [Remote host closed the connection]
Progster has joined #ruby
Zolrath has joined #ruby
schaerli has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
Virunga has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
Virunga has quit [Remote host closed the connection]
fixl has joined #ruby
Virunga has joined #ruby
deryl has joined #ruby
strzalek has joined #ruby
Schmidt has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
snearch has quit [Quit: Verlassend]
vlad_starkov has joined #ruby
mucker has joined #ruby
mneorr_ has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
mneorr has joined #ruby
timonv has joined #ruby
s1n4 has joined #ruby
_pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego is now known as pdelgallego
cascalheir has joined #ruby
qwerxy has quit [Read error: Connection reset by peer]
qwerxy has joined #ruby
frogprince_mac has joined #ruby
maasha has quit [Quit: Page closed]
jjbohn has joined #ruby
cascalheira has quit [Ping timeout: 246 seconds]
dmiller has joined #ruby
geggam has quit [Read error: Connection reset by peer]
RudyValencia has quit [Read error: Connection reset by peer]
RudyValencia has joined #ruby
frogprince_mac has quit [Read error: Connection reset by peer]
mneorr has quit [Remote host closed the connection]
justsee has quit [Read error: Connection reset by peer]
frogprince_mac has joined #ruby
mneorr has joined #ruby
lolsuper_ has quit [Read error: Connection reset by peer]
pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
lolsuper_ has joined #ruby
lolsuper_ has quit [Changing host]
lolsuper_ has joined #ruby
areil has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 264 seconds]
Banistergalaxy has joined #ruby
Zespre has quit [Ping timeout: 252 seconds]
poppiez has joined #ruby
Zespre has joined #ruby
justinmcp has quit [Remote host closed the connection]
vectorshelve has quit [Quit: Page closed]
g_rotbart has quit [Remote host closed the connection]
lampe2 has quit [Quit: Verlassend]
heftig has quit [Quit: leaving]
<bnagy>
is there a slick way to get require_relative to work when a file is eval'ed?
Eplemosen has joined #ruby
<bnagy>
I get can't infer basepath
M- has joined #ruby
<Mon_Ouie>
AFAIK you can't, it only works with the standard methods to load a file (which I don't think is a useful restriction)
<bnagy>
hm
<Mon_Ouie>
You could just set the load path, even temporarily
<bnagy>
k
<bnagy>
well the file I am reading is the one that has require_relative
<bnagy>
let's imagine I can't change that file
BiHi has joined #ruby
M- has quit [Client Quit]
<bnagy>
basically the idea is to get a class from a file when we don't know the classname
cascalheir has quit [Ping timeout: 250 seconds]
<Mon_Ouie>
Well, pretty much the only way would be to redefine require_relative then
<bnagy>
so I make a module, read the file, eval, and then do Sandbox.constants.first
Criztian has quit [Remote host closed the connection]
<bnagy>
if there's a better pattern for that, that would be fine as well
<bnagy>
hmm maybe I could get get toplevel constants, require the file, then get constants again
heisenmink has quit [Remote host closed the connection]
<banisterfiend>
bnagy: cant u use ripper or sth for that
geekbri has joined #ruby
<banisterfiend>
bnagy: or if you are guaranteed the file contains simple code, u can just scan through it for regex for /^module (\w+)/ or sth
IPGlider has quit []
<bnagy>
banisterfiend: yeah but that would be horrible :)
<bnagy>
looks like diffing Object.constants works
<banisterfiend>
not as horrible as evalling it in a random module just to find the name of the class ;)
<banisterfiend>
unless u want to keep teh code once u've eval'd it?
<bnagy>
I do
<banisterfiend>
k00
heftig has joined #ruby
<bnagy>
I gotta give it as a klass to another object
<Xeago>
what is a klass?
relix has joined #ruby
<banisterfiend>
Xeago: cooler way of saying class
<bnagy>
a term people use when referring to holding a Class in a variable
<Xeago>
to avoid name conflict?
<banisterfiend>
yea
<Xeago>
aight
<Xeago>
sensemaking skills+1
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
qwerxy has quit [Read error: No route to host]
Hanmac has quit [Ping timeout: 248 seconds]
qwerxy has joined #ruby
relix has quit [Client Quit]
pdelgallego has quit [Ping timeout: 245 seconds]
wmoxam_ has joined #ruby
<Mon_Ouie>
If you use Ripper, the code won't detect smart things like using const_set or A = Struct.new(…)
jorge has joined #ruby
<Mon_Ouie>
The latter doesn't really qualify as a clever trick, actually
<ccooke>
neither does the former, really
<shevy>
hehehe
tk__ has joined #ruby
strzalek has quit [Read error: Connection reset by peer]
Speed has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
vectorshelve_ has quit [Quit: Page closed]
nanderoo has joined #ruby
Virunga has quit [Remote host closed the connection]
yoklov has joined #ruby
yoklov has quit [Client Quit]
wangr_ has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
wangr has joined #ruby
freeayu has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
t85234 has quit [Remote host closed the connection]
t15366 has joined #ruby
sailias has joined #ruby
nwest has joined #ruby
seanwash has joined #ruby
jrajav has joined #ruby
dpk has joined #ruby
workmad3 has joined #ruby
jasonkuhrt has joined #ruby
Takehiro has quit [Remote host closed the connection]
Eplemosen has quit [Quit: NOPE]
nateberkopec has joined #ruby
edwardj has quit [Remote host closed the connection]
Denommus has joined #ruby
vivien__ has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
Zespre has quit [Ping timeout: 265 seconds]
dhruvasagar has joined #ruby
yasushi has joined #ruby
Takehiro has joined #ruby
kn330 has joined #ruby
jwbuurlage has quit [Read error: Connection reset by peer]
Huis_ has joined #ruby
jwbuurlage has joined #ruby
wangr has quit [Read error: Connection reset by peer]
erichmenge has joined #ruby
Takehiro has quit [Remote host closed the connection]
wangr has joined #ruby
Zespre has joined #ruby
<kn330>
What would be the best way to perform modular arithmetic on matrices in ruby? eg: {Inverse(A) mod(26)} | reference: http://is.gd/aWRjsP , Hill Cipher
jonathanwallace has quit [Remote host closed the connection]
allsystemsarego has quit [Client Quit]
Coad has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
gyre007 has joined #ruby
<gyre007>
guys, I have a question about unicorn...i have it running on my server however it's spiking up my CPU like crazy...I've no idea why...CPU is constantly on 99% because of unicorn despite the fact that the site is not being accessed by anyone...does anyone know how to approach the investigation ?
Tomasso has joined #ruby
GenghisKen has joined #ruby
GenghisKen has quit [Changing host]
GenghisKen has joined #ruby
wangr has quit [Read error: Connection reset by peer]
Zolrath has quit [Quit: Computer has gone to sleep.]
<Coad>
?
wangr has joined #ruby
asobrasil has joined #ruby
<gyre007>
Coad, it's about restarting I guess...it's constantly on 100% although the preforked processes are dying and the new ones are eating as much as the old ones...ill have a look
<Coad>
Damn :/
jorge has quit [Remote host closed the connection]
<gyre007>
oh and I have only 2 workers
<Coad>
hmm
<gyre007>
im thinking it might be related to disk space usage ?
<gyre007>
it's almost 100%
<gyre007>
well actually it's 100%
<Coad>
wtf
<Coad>
HMmm, have you tried deploying this to heroku and seeing how that goes?
JoshWines has quit [Ping timeout: 245 seconds]
<Coad>
It could be something wrong with the servfer config
WellMux has quit [Ping timeout: 245 seconds]
<gyre007>
its running on VM...yesterday all was ok when I set it up...I stopped the VM when I went home started it today and Unicorn is going nuts :)
<gyre007>
dodgy bizzare stuff :)
elhu has quit [Ping timeout: 244 seconds]
JoshWines has joined #ruby
GoGoGarrett has joined #ruby
fmcgeough has joined #ruby
tommyvyo_ has joined #ruby
tommyvyo_ has quit [Changing host]
tommyvyo_ has joined #ruby
elhu has joined #ruby
mmitchell has joined #ruby
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
<kn330>
Is there any library to calculate the Modular Multiplicative Inverse of a matrix? eg: {Inverse(A) mod(26)} | reference: http://is.gd/aWRjsP , Hill Cipher
axl_ has joined #ruby
mmitchel_ has joined #ruby
mmitchell has quit [Read error: Operation timed out]
iori has quit [Remote host closed the connection]
infinitiguy has joined #ruby
jwbuurlage has quit [Read error: Connection reset by peer]
Huis_ has quit [Read error: Connection reset by peer]
freeayu has quit [Ping timeout: 256 seconds]
vitoravelino is now known as vitoravelino`afk
vitoravelino`afk is now known as vitoravelino
Agis__ has quit [Quit: Agis__]
cantbecool has joined #ruby
uris has joined #ruby
Liothen_ has quit [Remote host closed the connection]
wangr has quit [Read error: Connection reset by peer]
CarlB_the_great has quit [Ping timeout: 244 seconds]
CarlB_th_ has joined #ruby
wangr has joined #ruby
fixl has quit [Ping timeout: 264 seconds]
nochaman_ has joined #ruby
iamjarvo has joined #ruby
wmoxam_ has quit [Ping timeout: 244 seconds]
joaoh82 has joined #ruby
nyuszika7h has left #ruby [#ruby]
rh1n0 has joined #ruby
jonathanwallace has joined #ruby
Coad has quit [Ping timeout: 244 seconds]
wangr has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
wangr has joined #ruby
wangr has quit [Read error: Connection reset by peer]
jclem has joined #ruby
rh1n0 has quit [Client Quit]
wangr has joined #ruby
Coad has joined #ruby
Coad has quit [Client Quit]
tiripamwe has joined #ruby
johnlcox has joined #ruby
wangr has quit [Read error: Connection reset by peer]
paolooo has quit [Quit: Page closed]
wangr has joined #ruby
jclem has quit [Client Quit]
paolooo has joined #ruby
stopbit has joined #ruby
rrichards has joined #ruby
bier has quit [Read error: Connection reset by peer]
Spooner has joined #ruby
pdelgallego has joined #ruby
bier has joined #ruby
jgarvey has joined #ruby
<nochaman_>
what is here this ?
seanwash has quit [Quit: Leaving.]
<Muz>
You no make English sense good.
<nochaman_>
ok
mmitchel_ has quit [Remote host closed the connection]
<nochaman_>
i reading english good
seanyo has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
CarlB_th_ has quit [Ping timeout: 265 seconds]
kiyoura has joined #ruby
nochaman_ has left #ruby [#ruby]
<Hanmac>
ruby has no "this" :P it has "self" :D
joshman_ has joined #ruby
mmitchell has joined #ruby
indian has quit [Ping timeout: 240 seconds]
wangr has quit [Read error: Connection reset by peer]
t98789 has quit [Remote host closed the connection]
t62190 has joined #ruby
noam has quit [Ping timeout: 245 seconds]
ping-pong has joined #ruby
gfontenot has quit []
mmitchell has joined #ruby
ringotwo has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
vikingly has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
diegoviola has joined #ruby
geekbri has joined #ruby
jorge has joined #ruby
<vikingly>
Hi! I have a timezone (e.g 'america/los angeles') and want to create an arbitrary time in a zone (e.g month: 1, day: 1, hour: 1, min:1, sec: 1), but I have a problem with ruby time requiring a time offset.
otters has joined #ruby
wangr has quit [Read error: Connection reset by peer]
<vikingly>
the formatted offset is different in daylight savings, so it is dependent upon time. How do I get the formatted offset at a specific time in ruby?
noam has joined #ruby
tagrudev has quit [Remote host closed the connection]
jclem has joined #ruby
wangr has joined #ruby
mohits has quit [Read error: Connection timed out]
jorge has quit [Ping timeout: 245 seconds]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
jjbohn has joined #ruby
jprovazn is now known as jprovazn_away
the_hack has joined #ruby
jprovazn_away has quit [Quit: Leaving]
yasushi has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 264 seconds]
DrShoggoth has joined #ruby
wangr has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
wangr has joined #ruby
seanwash has left #ruby [#ruby]
mmitchell has quit [Remote host closed the connection]
<kiyoura>
you know you're a hacker when you have off-by-one's in ruby <_<
fantazo has quit [Remote host closed the connection]
Quadrant_ has quit [Quit: Leaving]
arturaz has quit [Ping timeout: 264 seconds]
<Hanmac>
kiyoura what is off-by-one?
gfontenot has joined #ruby
bwwrd has joined #ruby
bwwrd has quit [Client Quit]
<kiyoura>
when dealing with linear operations [typically arrays or strings] and accidentally iterate above/below boundaries
bwwrd has joined #ruby
pskosinski has joined #ruby
<pskosinski>
What is wrong with this line? $to_remove.each{|el| el = el.sub('/', '\')}
quest88 has joined #ruby
<pskosinski>
I get: unterminated string meets end of file
_jgr_ has joined #ruby
rubious has joined #ruby
<Hanmac>
>> [].each{|el| el = el.sub('/', '\\')}
<al2o3cr>
(Array) []
D4T has joined #ruby
<pskosinski>
Oh :x
wangr has quit [Read error: Connection reset by peer]
<pskosinski>
Thank you. :)
wangr has joined #ruby
<koshii>
Jesus Ruby Koans is brilliant. Brilliant, I say!
<Hanmac>
kiyoura what did you do?
tiripamwe has quit [Ping timeout: 260 seconds]
<D4T>
whats the best way of doing something like: puts "something" unless myString == "foo" || myString == "bar"
<D4T>
that only matches against "foo" for some reason
macer1 has quit [Read error: Connection reset by peer]
quest88 has quit [Quit: quest88]
<kiyoura>
Hanmac: i kept an index variable to keep track of position in each_char (so that i could use it again later) for two encrypt/decrypt methods and forgot i essentially post-incremented
<kiyoura>
so i had to index -= 1 before going through the string again to decrypt
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 15.0/20120824154833]]
<Hanmac>
what about: each_char.with_index ?
<kiyoura>
haha, wasn't aware!
<kiyoura>
oh that's a 1.9 method?
vikingly has quit [Read error: Connection reset by peer]
macer1 has joined #ruby
<Hanmac>
yeah, isnt it a nice reason to upgrade? :P
<kiyoura>
XD
atmosx has joined #ruby
<kiyoura>
im still an ANSI C guy Hanmac <_<. but i'll try
<shevy>
save for the Encoding addition in 1.9
<Hanmac>
yeah come to the "1.9" side ... we have cooler methods :D
<kiyoura>
haha well let me 'master' 1.8 first! i think using rails will force me to use 1.9 anyways
<atmosx>
hello, shevy I need a hint
<shevy>
I am curious how mruby will try to solve internationalization
<kiyoura>
what i do like is that ruby 1.9 is much faster
<Hanmac>
shevy you mean internationalized error messages?
Virunga has quit [Read error: Connection reset by peer]
<shevy>
no I mean Encoding actually. if we would have only one language, internationalization would be super simple
t62190 has quit [Remote host closed the connection]
wangr has quit [Read error: Connection reset by peer]
<atmosx>
I have a class method that returns tweets like -> puts "#{text}, #{id}, #{time}, #{location}" … for each tweet, now what is the best way for another method to get this info? return?
t70485 has joined #ruby
Virunga has joined #ruby
<shevy>
call it
<shevy>
Foo.name
wangr has joined #ruby
wangr has quit [Read error: Connection reset by peer]
<shevy>
is that like a monadic function but valid for nil values?
chussenot has joined #ruby
<kiyoura>
variadic *
<kiyoura>
shevy: a function that excepts multiple (indefinite) arguments
<atmosx>
I must start using hashes for these values
<atmosx>
hmm
<atmosx>
looks cleaner and easier, I never use them
sj26 has joined #ruby
wangr has quit [Read error: Connection reset by peer]
williamherry has quit [Ping timeout: 264 seconds]
Caius has joined #ruby
tiripamwe has joined #ruby
wangr has joined #ruby
<kiyoura>
s/excepts/accepts/
burgestrand has quit [Quit: Leaving.]
<shevy>
kiyoura aaaah varargs
<kiyoura>
yeah
<shevy>
vampiric functions
cantonic has joined #ruby
<shevy>
they drain all your time
<kiyoura>
lmao
<shevy>
kiyoura do you have a japanese nick?
<koshii>
atmosx: If my experience with Ruby Koans and the subsequent discussion of nuances on this channel are any indicator, a lot of people don't use them/understand them.
<shevy>
I never looked at ruby koans
* Hanmac
throws "->" at the vampiric functions
<shevy>
Hanmac lol
<kiyoura>
shevy: indeed i do, but coincidentally i just thought it up randomly XD
<shevy>
finally I see why matz added ->
ken_barber has joined #ruby
<atmosx>
koshii: well yes, but I'd like to use them… I see them in all 'code tha matters'… I was taking a deeper look at 'tweestream' github repo's code… I've seen many things I don't understand or never saw before
<shevy>
or he thought ruby needs it because perl has it too
<atmosx>
they also use hashes all the time
<atmosx>
anyway
<kiyoura>
imo dont compare ruby to perl <_<
mmitchell has joined #ruby
<kiyoura>
ruby is like a full toolset, perl is just a pocket knife
sendoushi has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
<mark_locklear>
hey guys...I have a small script I am writing that needs to login to a db with the username and password. I am assuming I don't want this in clear text in the script. what is the best way to handle this. An include file?
<kiyoura>
shevy: liek a boss
<shevy>
hehe
<koshii>
It's a fact: people whose primary languages are C and Assembly are 80% more likely to have a ponytail.
bradhe has quit [Remote host closed the connection]
Synthead has joined #ruby
<matti>
kiyoura: I might be slow today, but ... I don't follow ;]
aganov has quit [Read error: Connection reset by peer]
<shevy>
koshii when they still have enough hair
<koshii>
shevy: True. :-)
<kiyoura>
koshii: <_< f u
<hoelzro>
mark_locklear: a config file, maybe
<koshii>
haha
<kiyoura>
so what if i have a ponytail right now
t70485 has quit [Remote host closed the connection]
<atmosx>
koshii: http://www.youtube.com/watch?v=4XpnKHJAok8 … a friend of mine, who is a .NET programmer - now he is learning python at a fast pace - told me that he sounds a bit becuase he's so full of himself… On the other hand he knows how to write code.
t68500 has joined #ruby
<koshii>
kiyoura: Hope your C is good :)
<shevy>
atmosx what!
<shevy>
atmosx why do you befriend pythonista!!!
* shevy
turns his head away sadly
the_hack has joined #ruby
<atmosx>
shevy: I told him to switch whilst in time, hahaha
<kiyoura>
koshii: i hope so too!
<atmosx>
shevy: he'll be converted in time, don't worry
<shevy>
atmosx, btw you should upload the code snippet to pastie.org you try to use for your class method
<koshii>
Ugh, 240p :)
* matti
gives kiyoura teh looks and cries
<koshii>
I can't believe we used to put up with this.
<atmosx>
shevy: I'll gist it wait
<shevy>
koshii be thankful it was not recorded with a potato
<koshii>
:D
<kiyoura>
matti: wait a minute.. by good C..do you mean readable?
<kiyoura>
XD
tk__ has quit [Quit: ばいばい]
<shevy>
today I saw a documentation, how a spider sees objects
imami|afk is now known as banseljaj
<koshii>
shevy: An 8-legged spider?
<kiyoura>
shevy: she Observers :p
<shevy>
the spider was not able to make out too much details, and it felt rasterized, but you could still recognize the face of a human quite easily
<shevy>
yeah koshii... a jumping spider (the kind that tries to catch its prey with a jump... most spiders normally use a web)
levieraf has joined #ruby
<koshii>
Oh you really DO mean a spider.
bwwrd has quit [Quit: Computer has gone to sleep.]
<shevy>
yeah
<levieraf>
Hi guys
<koshii>
shevy: Send me that?
<shevy>
they can see a human face
<levieraf>
sorry for the that will do
<levieraf>
Create an interface Electric that has the methods IsCharged and Charge. IsCharged should return false unless Charge has been called.
<levieraf>
Create a class Prius that implements Electric. Prius should override IsCharged to return false if the car has traveled over 100 miles since the
<levieraf>
last charge.
<levieraf>
Extend the class Prius with the class Car.
<levieraf>
Car should have a function called OdometerReading that returns the total number of miles a vehicle has traveled.
<levieraf>
Car should have a method called Drive that takes a single argument, this is the number of miles that the car will drive.
<levieraf>
Prius should override the method Drive so if the integer passed in is greater than 100 then the car will only drive 100 miles (the range of the
<shevy>
koshii hmm will try to find it, it was not on youtube but on a channel
<shevy>
levieraf
<levieraf>
vehicle)
<koshii>
WTF
<shevy>
why do you do that
<shevy>
can someone ban him
<koshii>
Accidental pasting probably.
<matti>
kiyoura: ? :)
<matti>
kiyoura: I am still asking about Hash passing.
<levieraf>
shevy, sorry again my friend
<shevy>
looks like java homework assignment
<shevy>
class Car
<shevy>
def Drive
<atmosx>
[18:12:14] <levieraf> sorry for the that will do <--- he did it on purpose. He is evil
<shevy>
but why is it upcased?
<kiyoura>
matti: yeah sorry wrong person
<shevy>
def Drive(argument_here)
olrrai has joined #ruby
<shevy>
also you cant extend a class in ruby with another class. you can only subclass. unless I am wrong
<levieraf>
how i can do that?
olrrai has quit [Client Quit]
<shevy>
and extend a module
<shevy>
first create a .rb file
<shevy>
:D
<shevy>
then start with class Prius
<shevy>
once that is finished and works
<shevy>
class Car < Prius
jlebrech has quit [Remote host closed the connection]
<shevy>
(or other way around, I have no idea what you need actually lol)
<levieraf>
shevy, look that
<shevy>
you simply turn reallife descriptions into ruby code
<shevy>
"IsCharged should return false unless Charge has been called."
<shevy>
when Charge is called, set an @instance_variable
<shevy>
def IsCharged
<shevy>
return @is_charged
<shevy>
horrible method names you have to use btw
<shevy>
in ruby idiom it is more often seen to have things like
<shevy>
def is_charged?
<shevy>
@is_charged
<atmosx>
Failed to connect to Twitter: Rate limit exceeded. Clients may not make more than 150 requests per hour. <---- #blah
ph^ has joined #ruby
<shevy>
:(
maesbn has quit [Remote host closed the connection]
<shevy>
bastards
<shevy>
write them a hate mail
<shevy>
if they ignore it
<atmosx>
yes, they killed Kenny!
mmitchell has quit [Remote host closed the connection]
mark_locklear has quit [Remote host closed the connection]
<Hanmac>
chomp is fine too
wangr has quit [Read error: Connection reset by peer]
carloslopes has quit [Quit: Leaving.]
philips_ has quit [Excess Flood]
philips_ has joined #ruby
wangr has joined #ruby
aaroncm has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
<cearls>
File.foreach faster than deadlines?
<cearls>
readlines
<hoelzro>
they're probably synonyms
adeponte has joined #ruby
rrichards has quit [Quit: Leaving...]
maletor has joined #ruby
yonggu has joined #ruby
<Hanmac>
cearls the difference isthat foreach dont create an array first ... when you map it readlines create an array twice
c0rn_ has joined #ruby
khakimov has joined #ruby
levieraf has quit [Quit: Saliendo]
jorge has joined #ruby
flip_digits has quit [Quit: Computer has gone to sleep.]
kvirani has quit [Remote host closed the connection]
recycle has joined #ruby
havenn has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
aibo has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
crowea has joined #ruby
wangr has quit [Read error: Connection reset by peer]
crowea has left #ruby [#ruby]
wangr has joined #ruby
ttilley has joined #ruby
<aibo>
Hello, can't delete XML Node from XML tree using nokogiri gem, here is my code `page.search('//td[@class="Right"]').each { |node| node.remove }` it does nothing
shevy2 has joined #ruby
<cearls>
Hanmac: what about getting lines that are more than 2 characters? does that need to be separate?
jorge has quit [Remote host closed the connection]
shevy has quit [Read error: Operation timed out]
jorge has joined #ruby
Eplemosen has joined #ruby
recycle has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
timoshin has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
jorge has quit [Remote host closed the connection]
Zolrath has joined #ruby
brianpWins has quit [Quit: brianpWins]
Xeago_ has joined #ruby
Xeago has quit [Ping timeout: 268 seconds]
mklappstuhl has joined #ruby
pricees has joined #ruby
recycle has joined #ruby
Xeago_ has quit [Remote host closed the connection]
t93507 has quit [Remote host closed the connection]
t9829 has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
rrichards has joined #ruby
benq has joined #ruby
rubious has quit [Quit: Leaving...]
cearls_ has joined #ruby
cearls has quit [Ping timeout: 245 seconds]
cearls_ is now known as cearls
ph^ has joined #ruby
willb has quit [Ping timeout: 244 seconds]
jorge has joined #ruby
LBRapid has joined #ruby
timonv has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
xorigin has quit [Quit: leaving]
pricees has quit [Quit: leaving]
pricees has joined #ruby
c0rn_ has quit []
havenn has quit [Remote host closed the connection]
Vert has quit [Read error: Connection reset by peer]
wangr has quit [Read error: Connection reset by peer]
x77686d has joined #ruby
WellMux has joined #ruby
bradhe has quit [Remote host closed the connection]
wangr has joined #ruby
eignerchris has joined #ruby
jrist is now known as jrist-doc
cbuxton has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
s1n4 has quit [Quit: leaving]
willb has joined #ruby
jrajav has quit []
<lectrick__>
hoelzro: Yeah that was the idea. where's your code? :)
wangr has quit [Read error: Connection reset by peer]
luist_ has joined #ruby
wangr has joined #ruby
luist_ is now known as luist
yonggu has quit [Remote host closed the connection]
<hoelzro>
class Test; include MooseyFate; has :foo,
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
adamkittelson has joined #ruby
Guest77283 has joined #ruby
pskosinski has quit [Remote host closed the connection]
Guest77283 has quit [Read error: Connection reset by peer]
caveat- has quit [Ping timeout: 245 seconds]
Guedes0 has joined #ruby
mmitchell has quit [Ping timeout: 244 seconds]
shadoi has joined #ruby
pskosinski has joined #ruby
wangr has quit [Read error: Connection reset by peer]
jasonkuhrt has joined #ruby
wangr has joined #ruby
mascool has joined #ruby
zigomir has quit [Ping timeout: 265 seconds]
jasonkuhrt has quit [Client Quit]
jwbuurlage has joined #ruby
Huis has joined #ruby
WellMux has quit [Ping timeout: 252 seconds]
specialGuest has quit [Quit: WeeChat 0.3.8]
recycle has quit [Remote host closed the connection]
xclite has quit [Quit: Leaving]
hadees has joined #ruby
Virunga has joined #ruby
<lectrick__>
hoelzro: Where's your inline test suite? :)
<hoelzro>
this was for a one-off, so there is none yet ;)
deryldoucette has joined #ruby
<lectrick__>
For my libs I usually have something like this at the bottom so that "running" the class definition directly actually runs the test suite for it:
<lectrick__>
if __FILE__==$PROGRAM_NAME; require_relative '../../test/unit/lib/array_utils_test'; end
<lectrick__>
yes, yes, i know require_relative sucks, sigh
Takehiro has quit [Remote host closed the connection]
levieraf has joined #ruby
JustinCampbell has joined #ruby
recycle has joined #ruby
deryl has quit [Ping timeout: 245 seconds]
deryldoucette is now known as deryl
v0n has joined #ruby
<levieraf>
hi guys
vivien__ has quit [Ping timeout: 246 seconds]
hadees has quit [Ping timeout: 246 seconds]
<levieraf>
I have got a question about the use of variable that used @ and @@ in a class
<levieraf>
??
lurksia has joined #ruby
lurksia has quit [Changing host]
lurksia has joined #ruby
<levieraf>
thanks
<matti>
@@ - class, @ - instance.
<lectrick__>
levieraf: Just ask the question.
<matti>
Lol
<lectrick__>
@@variable is accessible by both the class itself and its instances, AND its subclasses (which refer to the SAME OBJECT it points to, note!!!)
machty has joined #ruby
* matti
notes
<lectrick__>
@variable is only accessible by the context where it is defined. If at the class level, only by the class definition. If in an instance method, every instance gets its own copy of that variable.
recycle has quit [Remote host closed the connection]
* matti
notes
<matti>
;-)
<lectrick__>
That's @@ vs. @ in a nutshell.
Zolrath has quit [Quit: Computer has gone to sleep.]
BiHi has quit [Quit: Computer has gone to sleep]
* matti
notes
wangr has quit [Read error: Connection reset by peer]
<lectrick__>
Also, @@ will raise an error if you try to access it without setting it first. @variable just returns nil.
<matti>
:)
<levieraf>
ok
<levieraf>
thanks lectrick__
wangr has joined #ruby
specialGuest has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<lectrick__>
I can't tell you how many things I had to read before I understood the 3 sentences I just typed lol
<matti>
Haha
<matti>
lectrick__: +1
statarb3 has quit [Ping timeout: 252 seconds]
pdelgallego has quit [Quit: pdelgallego]
t58753 has quit [Remote host closed the connection]
t83945 has joined #ruby
jorge has quit [Remote host closed the connection]
apok has quit [Remote host closed the connection]
apok has joined #ruby
bluenemo has quit [Remote host closed the connection]
jrist-doc is now known as jrist
cj3kim has quit [Quit: This computer has gone to sleep]
_bart has joined #ruby
<levieraf>
lectrick__, jajajajajjajajajajajaja, hermano ahora si me hiciste reir jajajajajajaj - jajajajajjajajajajajaja brother made me laugh now if jajajajajajaj
<levieraf>
lol
<lectrick__>
??
alvaro_o_ has joined #ruby
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
hadees has joined #ruby
mohits has quit [Ping timeout: 264 seconds]
kvirani has joined #ruby
berserkr has joined #ruby
<burgestrand>
I always enjoy seeing ha-ha in other languages. :3
alvaro_o has quit [Ping timeout: 260 seconds]
willb has quit [Ping timeout: 245 seconds]
<burgestrand>
Japanese has the best one. w.
Eldariof-ru has joined #ruby
statarb3 has joined #ruby
Russell^^ has joined #ruby
hadees has quit [Ping timeout: 246 seconds]
vlad_sta_ has quit [Remote host closed the connection]
Bosma has joined #ruby
wangr has quit [Read error: Connection reset by peer]
ph^ has joined #ruby
frogstarr78 has joined #ruby
wangr has joined #ruby
joaoh82 has joined #ruby
mrdodo has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
benq has quit [Quit: Leaving]
benq has joined #ruby
enyo has quit [Read error: Connection reset by peer]
<rippa>
wwww
workmad3 has quit [Ping timeout: 264 seconds]
WellMux has joined #ruby
willb has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
seanyo has quit [Read error: Connection reset by peer]
c0rn_ has joined #ruby
JustinCampbell has joined #ruby
enyo has joined #ruby
kn330 has quit [Ping timeout: 246 seconds]
cj3kim has quit [Ping timeout: 276 seconds]
JustinCampbell has quit [Remote host closed the connection]
mmitchell has joined #ruby
s1n4 has joined #ruby
x77686d has quit [Quit: x77686d]
voodoofish430 has joined #ruby
wangr has quit [Read error: Connection reset by peer]
wangr has joined #ruby
dhruvasagar has joined #ruby
Spooner has joined #ruby
recycle has joined #ruby
kn330 has joined #ruby
daniel_hinojosa has joined #ruby
SCommette has quit [Quit: SCommette]
erichmenge has joined #ruby
Takehiro has joined #ruby
SCommette has joined #ruby
wedgeV has joined #ruby
SCommette has quit [Client Quit]
i0n has joined #ruby
i0n has quit [Changing host]
i0n has joined #ruby
jerrad has joined #ruby
havenn has joined #ruby
johnlcox has quit [Ping timeout: 265 seconds]
zii has joined #ruby
johnlcox has joined #ruby
SCommette has joined #ruby
SeoxyS has joined #ruby
kenneth has quit [Read error: Connection reset by peer]
SeoxyS is now known as kenneth
mmitchell has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 246 seconds]
froy has joined #ruby
ph^ has quit [Remote host closed the connection]
chrisja has joined #ruby
GenghisKen has quit [Ping timeout: 244 seconds]
kn330 has quit [Ping timeout: 260 seconds]
schaerli has joined #ruby
mmitchell has joined #ruby
hadees has joined #ruby
t83945 has quit [Remote host closed the connection]
recycle has joined #ruby
t87451 has joined #ruby
johnlcox has quit [Ping timeout: 246 seconds]
Huis_ has joined #ruby
jwbuurlage_ has joined #ruby
jwbuurlage has quit [Read error: Connection reset by peer]
jwbuurlage_ is now known as jwbuurlage
Huis_ has quit [Client Quit]
jwbuurlage has quit [Client Quit]
kn330 has joined #ruby
Huis has quit [Read error: Connection reset by peer]
recycle has quit [Remote host closed the connection]
joaoh82 has quit [Remote host closed the connection]
linoj has quit [Ping timeout: 240 seconds]
CarlB_th_ has joined #ruby
dangerousdave has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
froy has joined #ruby
CarlB_the_great has quit [Ping timeout: 245 seconds]
joaoh82 has joined #ruby
Takehiro has quit [Ping timeout: 265 seconds]
ph^ has quit [Remote host closed the connection]
geekbri has quit [Remote host closed the connection]
Virunga is now known as LennyLinux
zommi has quit [Remote host closed the connection]
cczona has joined #ruby
pricees has quit [Ping timeout: 240 seconds]
jamiltron has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
cczona has left #ruby [#ruby]
asteve has quit []
twigmorewelsh has quit [Ping timeout: 264 seconds]
Zolrath has joined #ruby
timonv has joined #ruby
blazes816 has joined #ruby
c0rn_ has joined #ruby
Rikkit has joined #ruby
Rikkit has quit [Remote host closed the connection]
CarlB_th_ has quit [Remote host closed the connection]
elux has quit [Quit: Bye!]
LennyLinux is now known as virunga
bradhe has joined #ruby
virunga is now known as LennyLinux
<bradhe>
Is there a method I can call to tell if a given object is truthy? I have an array of booleans and I want to see if they're all true, something like [true, true, true, false].all?(&:some_method)
recycle has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
fixl has joined #ruby
becom33 has quit [Ping timeout: 245 seconds]
erichmenge has joined #ruby
cdepue has joined #ruby
iamjarvo has joined #ruby
becom33 has joined #ruby
s1n4 has left #ruby ["leaving"]
cantonic has quit [Quit: cantonic]
mmitchell has quit [Remote host closed the connection]
Schmidt has joined #ruby
banseljaj is now known as imami|afk
Virunga_ has joined #ruby
Virunga has quit [Quit: Sto andando via]
recycle has joined #ruby
cantonic has joined #ruby
c0rn_ has joined #ruby
recycle has quit [Remote host closed the connection]
jamiltron has quit [Quit: Leaving.]
cakehero has quit [Quit: Computer has gone to sleep.]
sailias has quit []
mmitchell has joined #ruby
dmiller has joined #ruby
jamiltron has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
darren has joined #ruby
carloslopes has quit [Quit: Leaving.]
CarlB_the_great has quit [Remote host closed the connection]
Danielpk has quit [Quit: Danielpk]
mklappstuhl has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
darren_ has joined #ruby
jjbohn has quit [Quit: Leaving...]
quazimodo has joined #ruby
workmad3 has joined #ruby
DrShoggoth has joined #ruby
Xeago has quit [Remote host closed the connection]
darren has quit [Ping timeout: 245 seconds]
recycle has joined #ruby
covi has joined #ruby
recycle has quit [Remote host closed the connection]
darren_ has quit [Ping timeout: 244 seconds]
hsbt is now known as hsbt_away
jamiltron has quit [Quit: Leaving.]
hsbt_away is now known as hsbt
alanp has joined #ruby
mmitchell has quit [Remote host closed the connection]
Kudos has quit [Ping timeout: 264 seconds]
johnlcox has quit [Quit: Computer has gone to sleep.]
alanp_ has quit [Ping timeout: 264 seconds]
johnlcox has joined #ruby
CarlB_the_great has joined #ruby
wo66le has joined #ruby
frogstarr78 has joined #ruby
recycle has joined #ruby
rins has quit [Ping timeout: 268 seconds]
recycle has quit [Remote host closed the connection]
jrist is now known as jrist-afk
darren has joined #ruby
joshman_ has quit [Ping timeout: 265 seconds]
himsin has quit [Read error: Operation timed out]
Takehiro has joined #ruby
himsin has joined #ruby
otters has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
jtdowney has quit [Remote host closed the connection]
pskosinski has quit [Disconnected by services]
jasmina87SA__ has joined #ruby
just4dos has quit [Ping timeout: 245 seconds]
jasmina87SA__ has quit [Read error: Connection reset by peer]
qwerxy has joined #ruby
sirish has joined #ruby
ngoldman has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
Kudos has joined #ruby
Takehiro has quit [Ping timeout: 265 seconds]
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
i0n has joined #ruby
i0n has quit [Changing host]
i0n has joined #ruby
gyre008 has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
<gyre008>
guys, Im trying to install the rubyracer gem?.but the install is failing with: extconf.rb:16: undefined method `include_path' for Libv8:Module (NoMethodError)?anyone has an idea how to fix this ?? Im banging my head against the table..
<blazes816>
according to the very first link google returned for your error message. just confirming you didn't even try to find the answer
<gyre008>
I DID
sdwrage has joined #ruby
<gyre008>
i tried all answers i found
<gyre008>
didnt see this one
recycle has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<gyre008>
blaze816 I did that now and the install fails with: :) -> `gem_original_require': no such file to load -- libv8 (LoadError)
scriabin has quit [Remote host closed the connection]
yasushi has joined #ruby
bier has quit [Ping timeout: 248 seconds]
stopbit has quit [Quit: Leaving]
<blazes816>
try "gem install libv8 && gem install therubyracer" now
<blazes816>
if that doesn't work i'd just install node, TRR kind of blows a little bit anyways
<gyre008>
will try
t27661 has quit [Remote host closed the connection]
t18397 has joined #ruby
neohunter has joined #ruby
<neohunter>
anyone have exp with ruby-gmail ?
<gyre008>
blazes816 fails with the same error
yasushi has quit [Ping timeout: 268 seconds]
<gyre008>
as before
<gyre008>
undefined method `include_path' for Libv8:Module
just4dos has joined #ruby
Asher1 has quit [Quit: Leaving.]
<blazes816>
gyre008: osx?
Asher has joined #ruby
wo66le has quit [Quit: Computer has gone to sleep.]
<gyre008>
blaze816 Ubuntu
<blazes816>
good man
sepp2k1 has quit [Remote host closed the connection]
<gyre008>
:)
<blazes816>
what version of libv8 you have?
<gyre008>
doesnt help haha
<gyre008>
you mean the OS or the gem
<blazes816>
gem
<blazes816>
looks like they removed that method
<gyre008>
libv8 (3.11.8.3 x86_64-linux)
redgetan has joined #ruby
<neohunter>
i need to retrieve emails from my email accounts, what do you recomment, using an IMAP gem or using ruby-gmail gem?
machty_ has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
hoelzro is now known as hoelzro|away
awarner has quit [Remote host closed the connection]
cearls has quit [Quit: cearls]
<blazes816>
gyre008: you okay with some guerrilla debugging? try adding "alias_method :include_path, :libv8_include_path" to line 57 of libv8/lib/libv8.rb
<blazes816>
then try the install. it should work. looks like a bug.
kvirani has quit [Remote host closed the connection]
<gyre008>
let me see
iamjarvo has joined #ruby
bier has joined #ruby
<gyre008>
blazes816 that file has only 50 lines :)
jorge has quit [Remote host closed the connection]
<gyre008>
but that Rails app im installing needs that gem...
infinitiguy has quit [Client Quit]
<gyre008>
how does installing nodejs help ?
SCommette has quit [Quit: SCommette]
berserkr has joined #ruby
<blazes816>
sorry, I assumed you were just looking for the JS env
<gyre008>
nope :(
CarlB_the_great has quit [Remote host closed the connection]
<arubin>
If a method accepts two parameters and an optional block, can it be called with the first two arguments in parentheses and the block after them?
<arubin>
I ask only because I am trying to understand some code.
eignerchris has quit [Ping timeout: 246 seconds]
emmanuelux has joined #ruby
dpk has joined #ruby
<blazes816>
you mean like: foobar(a, b) { puts 'in a block' } ?
<blazes816>
yes
<arubin>
Yes, that is exactly what I mean.
<arubin>
What exactly is happening there? Do the parentheses simply not matter at all?
GoGoGarrett has joined #ruby
adamkittelson has joined #ruby
<blazes816>
it's basically syntactic sugar around creating the block, assigning it to a var, and passing it manually
t18397 has quit [Remote host closed the connection]
<blazes816>
or something like: foobar(a, b, Proc.new{ puts 'in a block' })
t14787 has joined #ruby
bwlang has left #ruby [#ruby]
<arubin>
Okay. Thank you.
jorge has joined #ruby
w400z has quit []
hadees has quit [Quit: hadees]
recycle has quit [Remote host closed the connection]
macmartine has joined #ruby
bluOxigen_ has quit [Ping timeout: 252 seconds]
diegoviola has joined #ruby
lkba has quit [Ping timeout: 268 seconds]
recycle has joined #ruby
Tomasso has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Ping timeout: 264 seconds]
sdwrage has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Remote host closed the connection]
recycle_ has joined #ruby
recycle_ has quit [Remote host closed the connection]
recycle has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
pricees has quit [Quit: leaving]
luist has quit [Quit: luist]
sailias has joined #ruby
Takehiro has quit [Ping timeout: 244 seconds]
josh^ has joined #ruby
lkba has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
i0n has quit [Quit: Lost terminal]
nari has joined #ruby
SQLStud has quit [Quit: Leaving]
wedgeV has quit [Quit: wedgeV]
erichmenge has joined #ruby
erichmenge has quit [Client Quit]
stkowski has quit [Quit: stkowski]
redgetan has left #ruby ["Leaving"]
sdwrage has joined #ruby
gyre008 has quit [Quit: Leaving]
BSaboia has quit [Read error: Connection reset by peer]
LouisGB has quit [Ping timeout: 244 seconds]
uris has quit [Quit: Lost terminal]
rins has joined #ruby
khakimov has joined #ruby
TandemAdam has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
`damien has joined #ruby
LouisGB has joined #ruby
A124 has joined #ruby
dv_ has quit [Read error: Connection reset by peer]
ken_barber has quit [Remote host closed the connection]
dv_ has joined #ruby
nwest has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
jorge has quit [Remote host closed the connection]
Elico1 has left #ruby [#ruby]
qwerxy has quit [Quit: offski]
sdwrage has quit [Quit: geekli.st/programmer]
nari has quit [Ping timeout: 244 seconds]
joephelius has quit [Quit: WeeChat 0.3.8]
infinitiguy has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]