ckrailo has quit [Quit: Computer has gone to sleep.]
williamcotton has quit [Ping timeout: 244 seconds]
williamcotton_ is now known as williamcotton
sabooky has quit [Quit: leaving]
okc_frie` has quit [Ping timeout: 244 seconds]
poga has quit [Ping timeout: 260 seconds]
remi has joined #ruby
<bigoldrock>
has anyone here used jira-ruby ?
fivetwentysix has quit [Quit: fivetwentysix]
okc_frie` has joined #ruby
remi has quit [Client Quit]
<bigoldrock>
it's not clear why we have to use "a consumer_key and consumer secret." Assuming we can't have a user access REST api for jira, it's not clear how to register a new consumer on our jira server ;(
<eph3meral>
bigoldrock, is the gem published by the people who make jira?
<eph3meral>
bigoldrock, if so, then it's unlikely that you'll get much support from anyone here, chances are you'll be best off asking on the JIRA forums or the paid JIRA customer support
<canton7>
(incidentally, the bang doesn't mean "mutates the object", it means "this is the more dangerous method of a pair of methods with the same name")
fivetwentysix has joined #ruby
<offby1>
although I'm told that adding methods to core classes is a bad idea
artOfWar has joined #ruby
jgrevich has quit [Ping timeout: 240 seconds]
uris has joined #ruby
<canton7>
depends really. if you're writing code which someone else may use as part of their code, then yes, your monkey-patching may produce unexpected stuff for them. if you're the only person ever to use your code, knock yourself out
jenrzzz-mac has joined #ruby
abstrusenick has joined #ruby
<sridatta>
is it possible to include static resources (comfiguration files, text, etc) in a ruby gem?
apok_ has joined #ruby
Targen has quit [Ping timeout: 265 seconds]
CheeToS has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
apok has quit [Ping timeout: 244 seconds]
jgrevich has joined #ruby
tds has quit [Quit: tds]
<shevy>
sridatta I think so
<shevy>
but I have to find out myself how do specify that in .gemspec yet :P
apok_ has quit [Ping timeout: 245 seconds]
dbgster has joined #ruby
nazty has joined #ruby
kevinbond has joined #ruby
<sridatta>
shevy: once they are included, do you know how would I access the files within the ruby code?
fserb has quit [Quit: ttyl]
mrdtt has joined #ruby
<shevy>
not entirely sure about that myself
<shevy>
I solve this for now by specifying the absolute path to i.e. my yaml data
mrdtt has quit [Client Quit]
MasterIdler_ is now known as MasterIdler
libertyprime has quit [Quit: Lost terminal]
mrdtt has joined #ruby
libertyprime has joined #ruby
<nazty>
hey
<nazty>
i got a question
Fezzler has quit [Quit: Leaving]
<offby1>
ooh, a question! I love those
<shevy>
lies!
closedbracket has joined #ruby
<otters>
does he really have a question? I don't see one
<offby1>
he hasn't unwrapped it yet
<shevy>
do you have a question
<shevy>
this is the question
parzo has joined #ruby
<offby1>
Can I get a witness?
<otters>
I think he hasn't forced evaluation of the thunk yet
<otters>
wrong channel
<shevy>
20% of the newcomers never make it past the "I got a question" stage
Karmaon has quit [Quit: WeeChat 0.3.8-rc2]
<otters>
nazty: go on
<shevy>
and so many die out of curiousity!
Karmaon has joined #ruby
ringotwo has joined #ruby
<nazty>
whats the difference between MacRuby and the ruby you install using homebrew
<offby1>
I think MacRuby lets you access groovy OS X APIs that are written in Objective-C
<offby1>
thus you can write native Mac Apps with it.
<nazty>
i forgot i install MacRuby... and the did a brew install ruby...
<offby1>
never actually done that myself, though.
<offby1>
you'll have both now, and both should work fine (assuming they don't fight each other)
<nazty>
i did ruby -v and it shows 1.8
<offby1>
I myself use the macports one.
sleetdrop has joined #ruby
<nazty>
im not sure which ruby it is using though
<offby1>
nazty: that's probably the one that came with your mac :) The Macruby program is called "macruby".
libertyprime has quit [Quit: Lost terminal]
<offby1>
And you can do "type ruby" to see the full path of what you got
<banisterfiend>
offby1: hello! ltns!
<offby1>
try "type -a ruby" which will show _all_ the variants named 'ruby'
<offby1>
banisterfiend: ahoy
dv310p3r has joined #ruby
<banisterfiend>
offby1: do you recommend any good books to improve my elisp chops
<nazty>
/usr/bin/ruby
<offby1>
banisterfiend: I think the intro and the reference manual -- both of which come with Emacs -- are all you need.
<offby1>
at least they're all I needed.
<nazty>
offby1: that is what it gave me
<offby1>
nazty: OK, that's the one that came with your mac.
<offby1>
Try typing "type macruby"
<nazty>
im sure i install MacRuby, Cocoa, and the one on homebrew
<banisterfiend>
offby1: i'm degenerated where i have to have things on my kindle
<offby1>
or for that matter, "macruby -v"
L-----D has joined #ruby
<banisterfiend>
offby1: i guess i could buy pdfs of the manuals
brasten_ has joined #ruby
<offby1>
banisterfiend: heh. Can't help you there
<kenneth>
is there any way for the zmq gem to be async?
<offby1>
there's an O'Reilly book that's supposed to be good, but it's years old
<banisterfiend>
offby1: cos i do most of that kind of reading when im in planes and buses
<kenneth>
this is essentially meant to to provide a quick bridge of zmq streams over websockets
<bnagy>
don't know, I don't em em-zmq
<bnagy>
*use
Johhny8967 has joined #ruby
<bnagy>
I do all my stuff on the ffi lib
<bnagy>
I can see why it won't exit cleanly though
<bnagy>
unless the lib handles it somehow
tayy has quit [Remote host closed the connection]
banister_ has quit [Remote host closed the connection]
<kenneth>
bnagy: i tried to do it with the official lib before and couldn't get it to work right (i had it running on a thread but calling send on my EM web socket from outside of the EM thread is problematic
<kenneth>
how would you handle it?
<kenneth>
i'm *this* close to giving up and writing the damn thing on node.js
fbernier has joined #ruby
Targen has joined #ruby
jenrzzz-mac has quit [Ping timeout: 252 seconds]
dbgster_ has joined #ruby
<bnagy>
like I said, I don't use EM
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
erichmenge has quit [Quit: erichmenge]
<bnagy>
does it work, apart from not exiting cleanly?
<GreaterCore>
Spaceghostc2c: mail.body instead of either mail.html_part or mail.text_part?
<Spaceghostc2c>
Yeah, pretty sure.
mikeycgto has quit [Read error: Connection reset by peer]
rvmeier has quit [Ping timeout: 252 seconds]
test34 has quit [Ping timeout: 250 seconds]
artOfWar has joined #ruby
MrGando has joined #ruby
kevinbond has quit [Quit: kevinbond]
uris has quit [Quit: leaving]
Mcilvena has joined #ruby
benatwork has joined #ruby
artOfWa__ has joined #ruby
artOfWar_ has quit [Ping timeout: 260 seconds]
minijupe has joined #ruby
banister_ has quit [Ping timeout: 265 seconds]
pinar747 has quit [Ping timeout: 245 seconds]
nipra has joined #ruby
<GreaterCore>
where are the functions html_part and text_part for Mail defined?
ZachBeta has quit [Quit: Computer has gone to sleep.]
DrShoggoth has quit [Quit: Leaving]
artOfWar has quit [Ping timeout: 240 seconds]
benatwork has quit [Ping timeout: 246 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
Sheehan has quit [Quit: Sheehan]
aantix has joined #ruby
aantix has quit [Client Quit]
<EstanislaoStanis>
Hello everyone, ^-^. Could someone tell me the best way to go about creating windows and such with ruby without any gems? I'd really like to know how such things work before I use a gem for it. Any web tutorials or anything like that? Thanks!
<Spaceghostc2c>
I don't want anyone ever creating Windows with ruby. Damned horrid OS.
<EstanislaoStanis>
Er, I meant the gui things called windows.
artOfWa__ has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
artOfWar has quit [Remote host closed the connection]
artOfWar has joined #ruby
Mcilvena has left #ruby [#ruby]
artOfWar has quit [Read error: Connection reset by peer]
artOfWar_ has joined #ruby
<Gavilan>
EstanislaoStanis: You are trying to learn to use WinAPI from Ruby?
kylemcgill has quit [Remote host closed the connection]
dsa has quit []
<EstanislaoStanis>
Uh, yeah. I actually just found that in my book.
nfluxx has joined #ruby
joshman_ has quit [Ping timeout: 240 seconds]
cha1tanya has quit [Ping timeout: 248 seconds]
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
fivetwentysix has quit [Quit: fivetwentysix]
jrallison has quit [Ping timeout: 240 seconds]
kuranai|off is now known as kuranai
kuranai is now known as kuranai|off
andrewhl has joined #ruby
krz has joined #ruby
jrallison has joined #ruby
mgalgs has joined #ruby
indian has joined #ruby
hakunin has quit [Remote host closed the connection]
GreaterCore has quit [Quit: Ex-Chat]
hakunin has joined #ruby
<mgalgs>
ruby noob here, trying to download files over http. I'm having trouble handling 302's, the 'Location' header doesn't seem to be changing... See https://gist.github.com/2886707
jarednorman has quit [Ping timeout: 245 seconds]
jarednorman has joined #ruby
maletor has joined #ruby
artOfWar_ has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
ABK has joined #ruby
artOfWar_ has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
hakunin has quit [Ping timeout: 260 seconds]
abstrusenick has quit [Quit: abstrusenick]
sernin has quit [Quit: leaving]
artOfWar has quit [Ping timeout: 240 seconds]
Hanmac1 is now known as Hanmac
<dekz>
mgalgs: the location header did change, follow it recursively
hasrb has quit [Remote host closed the connection]
Solnse has joined #ruby
hadees has quit [Ping timeout: 246 seconds]
<mgalgs>
dekz: arg. i'm an idiot. thanks!
cha1tanya has quit [Ping timeout: 252 seconds]
Aaton_off is now known as Aaton
Aaton is now known as Aaton_off
ryanf has quit [Quit: leaving]
drspin has quit [Quit: leaving]
Eldariof-ru has joined #ruby
<dekz>
no problem, heres a quick way to dump headers next time: wget --server-response --spider uri
looopy has quit [Remote host closed the connection]
<visof>
Yeah I will try I'm on my phone can you send something from output as private please to figure it out using paper and pen
banister_ has joined #ruby
milestone has joined #ruby
<visof>
Bnagy make traceroute on your own for any url then private me with the output please
<bnagy>
oh, you can't traceroute from your phone :) I see
flype has joined #ruby
ryanf has quit [Quit: leaving]
freeayu has joined #ruby
fivetwentysix has quit [Quit: fivetwentysix]
<_marvin>
in average the 10threads handling 1k insert are about 1-2 seconds slower then the non-threaded
<bnagy>
visof: I think osx traceroute is different
simao has joined #ruby
<bnagy>
_marvin: which interpreter?
<_marvin>
if i change it to 100thread doing 100 inserts it even gets slower
<_marvin>
ruby
<_marvin>
no jruby or anything
<bnagy>
ok, so MRI 1.9?
<_marvin>
yes
<bnagy>
yeah that has a GIL
<_marvin>
1.9.2p290
<_marvin>
crap
<bnagy>
so threads are really only useful for IO bound operations
<bnagy>
try your test on jruby
<maccosmo>
1.9.2? :D
<bnagy>
although I'm not sure about the way you're using your db conn across threads there
<bnagy>
but I don't know the lib
<_marvin>
it has to do with multiple servers connecting and sending in data and each server connection was planned to be threaded
<bnagy>
naively I would have thought you would want one connection per thread
<bnagy>
I'm assuming mongo supports that
<_marvin>
it does but doesnt make a difference
<bnagy>
it won't with MRI, no
<bnagy>
unless your network connection to the DB is really bad
<_marvin>
2x1gb
negaduck has joined #ruby
<negaduck>
hi! how to delete an object attribute? In ruby i've got pr = $db['accounts'].find_one({:uid => uid}). I'd like to delete, for example, pr['email'].
<_marvin>
i had this test running on multiple setups
<_marvin>
2 physical servers 1 running the testapp 1 running the mongo
<bnagy>
negaduck: depends what class your pr object is
<_marvin>
also tested it on a bigger machine with 2 VM's
<_marvin>
same thing
Guest72442 has joined #ruby
<bnagy>
_marvin: did you test with jruby? It uses real threads
<bnagy>
just to check if your benchmark code is valid
<_marvin>
only difference is I tested it a testbox with an i7 and the timedifference is about 2-3 seconds where as on the xeon's the difference is below 0.5seconds
<_marvin>
but that was only with 10k requests but there is a lot lot more
<_marvin>
i will give it a try
<_marvin>
but I am not sure if the guys will put jruby on the live systems thats not up to my decision
siksia has quit [Read error: Connection reset by peer]
siksia has joined #ruby
Guest72442 is now known as davidw
<visof>
_marvin do you use linux
davidw has quit [Changing host]
davidw has joined #ruby
closedbracket has quit [Remote host closed the connection]
<_marvin>
i ran the test on 3 systems
closedbracket has joined #ruby
<_marvin>
one win, then on freebsd and then on arch
<_marvin>
always the same
<bnagy>
_marvin: yeah it's not that, I just want to be convinced that your benchmark is valid
<bnagy>
ie that you're using threads in a way that would improve performance if you had real threads
<_marvin>
bnagy: no worries i will try it just now
<_marvin>
yes you are right
closedbracket has quit [Remote host closed the connection]
<_marvin>
maybe it doesnt make a difference
<_marvin>
bnagy: testing jruby 1.7.0preview1 now
mengu has quit [Remote host closed the connection]
<_marvin>
jruby is even slower it seems
<bnagy>
it will definitely be slow to start
<bnagy>
cause of the jvm
<_marvin>
in mri 1.9 it takes 5.4sec nonthread and 6.5s threaded
<_marvin>
well I am only counting the time for the inserts not the start of the script or anything
<bnagy>
k
<_marvin>
in jruby it took for the nonthread 18secs and for the threaded 10secs
<_marvin>
well the threaded is faster but overall its slower
<bnagy>
ok if the threaded is faster then the way you're using threads might be OK
<bnagy>
would you mind making a new connection inside each thread?
<robotmay>
Might be worth giving Rubinius a go too, as that has native threading
<bnagy>
if they won't use jruby in prod I doubt they'll go for rbx :)
<robotmay>
;)
nfk has joined #ruby
<bnagy>
_marvin: none of those inserts collide, correct?
milestone has quit [Ping timeout: 245 seconds]
<_marvin>
and we are not talking about just changing one server to a different interpreter ^^
<_marvin>
bnagy: no none
<bnagy>
cool
milestone has joined #ruby
test34- has joined #ruby
sonne has joined #ruby
<sonne>
greetings!
<_marvin>
i even can see on the mongo side that one is slower then the other cause
<bnagy>
Busy old fool! Unruly Sonne!
<robotmay>
Maybe you could try doing multiple inserts per thread, rather than one insert per thread?
<_marvin>
on the one i get way more inserts per second then on the other
test34 has quit [Ping timeout: 260 seconds]
<sonne>
i see rdoc now generates documentation with darkfish by default - which i honestly hate... is there a way to make it generate the good old four framed html format by default instead?
<_marvin>
robotmay: not a real solution cause the data commes sparadicly in different sizes
<sonne>
(and maybe then rerun it on all the generated docs?)
<_marvin>
it might be just 1 insert or it could be 1000 in a second depending on the data
<bnagy>
did you test with one connection per jruby thread?
<_marvin>
bnagy: yes
* bnagy
curious
<_marvin>
ill try with a connection for each thread
<_marvin>
but I doubt it will be different
csmrfx has joined #ruby
<robotmay>
Which MongoDB adapter are you using?
<_marvin>
mongo
vectorshelve has joined #ruby
<csmrfx>
What do? Need check that web page has strings like 'src="http://that.domain.org/script.js"' and not strings like 'error: self-destruct imminent' and make a report of it, too. ?
<vectorshelve>
hemanth: hai bhai :)
workmad3 has quit [Ping timeout: 246 seconds]
<_marvin>
csmrfx: open-uri
<robotmay>
_marvin: Does that gem use native C extensions?
<hoelzro>
hemanth: that Perl code outputs nothing when I run it =(
<_marvin>
csmrfx: yeah open a url and get the text and then just regexp over it and count them
<hemanth>
hoelzro, your version?
<hoelzro>
5.16
imami|afk is now known as banseljaj
<hoelzro>
and 5.8
<hemanth>
on psh?
<robotmay>
_marvin: Are you waiting for the threads to return? If you don't need to know if the insert was successful then you could just fire and forget
tonini has quit [Remote host closed the connection]
<hoelzro>
I just test with all versions from 5.8 through 5.16; no output on any
<banister_>
csmrfx: hey carl, ltns
<csmrfx>
wat uppe, Mr. Banner
<vectorshelve>
hemanth: gave a comment :)
<hemanth>
hoelzro, OS? (must not really matter)
indian has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
<banister_>
csmrfx: can i mock u a little bit because english isn't your first language and u probably speak english with a weird accent
<banister_>
?
<banister_>
csmrfx: just a little bit
<csmrfx>
Mon Dieu! Moi anglaise c'est perfectomundo!
<banister_>
and only for a short tie
<banister_>
time
<csmrfx>
tsss
<banister_>
hehehe
banseljaj is now known as imami|afk
<_marvin>
robotmay: they do fire and forget i dont care
jbw_ has quit [Ping timeout: 260 seconds]
<robotmay>
_marvin: That's very odd then, especially on JRuby. Did you switch out the mongo adapter for jmongo?
<hemanth>
hoelzro, you on #perl?
<Hanmac>
book an room for an ruby and a python con at the same time ... and then watch this from the far :P
<hemanth>
hoelzro, see the eval bot there works fine
mucker has joined #ruby
<_marvin>
robotmay: ill have a look 1 sec
<sonne>
i'll try asking again: is there a way with rdoc to generate doc with the old four framed layout instead of darkfish?
<_marvin>
it automaticly uses mongo-java and bson-java
<csmrfx>
banister_: why mok me, pry 'n tell?
<hoelzro>
hemanth: #perl on Freenode?
<banister_>
csmrfx: for the lulz
<csmrfx>
woulda thoth you too buzy bein a ruby superstar now that pry is pop 'n all
prtksxna has joined #ruby
<csmrfx>
(see me english is purfex)
<robotmay>
_marvin: Ah ok. It is very odd. I'd be curious to see if it's equally slow on Rubinius
<banister_>
csmrfx: nah, nobody knows i wrote it so im not a superstar at all
<hoelzro>
hemanth: try sticking your script in a file and running it
<banister_>
csmrfx: kinda sux
<_marvin>
robotmay: well i wont test it cause its no option
<robotmay>
_marvin: Hah, alrighty :)
<_marvin>
it would be hard to get the admins to install jruby on couple of hundred servers though
<banister_>
csmrfx: anyway where u been?
fserb has quit [Quit: ttyl]
<banister_>
csmrfx: snowed-in ?
<csmrfx>
I've been in javascript and ocaml -land
<banister_>
csmrfx: cool, ive been in objc land
<_marvin>
well thanks for your tipps etc
<banister_>
not a particular hospitable environment
<_marvin>
I'll see how i get further with that
<banister_>
particularly*
<robotmay>
_marvin: Good luck :D
<_marvin>
thx!
<csmrfx>
why objc now that ruby has mine?
<banister_>
csmrfx: why you been doing ocaml?
<csmrfx>
Learning it for mining
<banister_>
csmrfx: rubymotion u man?
<banister_>
mean
<csmrfx>
ah, rubymotion yes
<banister_>
csmrfx: datamining u mean?
nilg` has joined #ruby
<csmrfx>
yes, one day
<banister_>
csmrfx: surely R or octave are better for that?
<csmrfx>
I'd like to start a genetics startup
<banister_>
i've been studying machine learning too
<banister_>
and been using octave for that
<banister_>
not bad, but horrible langugae, but powerful environment
<banister_>
i assume R is much the same
<csmrfx>
for what I was thinking I think its either C, C++, OCaml or such
<csmrfx>
but well, still workin on legacy webapps most of the time, nursing RSI
Jck_true has joined #ruby
<banister_>
csmrfx: why ocaml though?
<banister_>
csmrfx: since when has anyone suggested ocaml would be a good language for datamining?
<csmrfx>
OCaml is fast, it's weird, complete .. and fun
<csmrfx>
I'm a total noober still
jbw_ has joined #ruby
<csmrfx>
takes me 15 minutes to figure out how to call a function after I get one defined!
<csmrfx>
8P
chaotic_good has quit [Quit: Lost terminal]
<hemanth>
hoelzro, yes
<csmrfx>
Seems to me if you like ruby and/or js, you will like OCaml
<hemanth>
hoelzro, join #perl freenode
<banister_>
csmrfx: clojure/scala interest me more than ocaml
<csmrfx>
the fate of jvm in the hands of Oracle makes me kinda wonder...
<banister_>
csmrfx: how old is ocaml?
<csmrfx>
well, ocaml is kinda weird in that it's kinda really just old ML with some extensions
<relix>
when in the last file, the method acts_as_almanacable is called, inside acts_as_almanacable, self will refer to Almanac::ActsAsAlmanacable::ClassMethods, instead of AlmanacLabel as I would expect
<relix>
(crossposing from #ror since no one there has an answer)
<xbayrockx>
The history behind it is that during the Korean war, an American approached a Korean.
<xbayrockx>
The Korean did not understand the American, instead he pointed at him and called out "Mi Gook" which means "America" in Korean. The American then mistakened the Korean and thought the Korean was refering to himself as a "gook." After the Korean War, American started to refer to Koreans as Gooks for short term thinking it was a short name for Korean.
<relix>
ok, extra data point, if I call binding.pry inside AlmanacLabel definition, and check "self", it also points to Almanac::ActsAsAlmanacable::ClassMethods
xjiujiu has joined #ruby
clockwize has joined #ruby
<apeiros_>
relix: um, no, then you're not having your binding.pry inside the AlmanacLabel definition.
<apeiros_>
also line 3-5 is bullshit code. sorry to be so direct.
<hoelzro>
krz: I'm sorry, how is that grouping by name?
<hoelzro>
do you want the first entry for a given name? the last? any?
<shevy>
that result lost some data however
xclite has quit [Ping timeout: 248 seconds]
<krz>
hm maybe i should be looking at unique
<shevy>
I dont think .group_by works by losing data
jbw_ has joined #ruby
<shevy>
you could always make a new hash though
Tricks has joined #ruby
<shevy>
what I wonder is, why you need an array [{},{}] wouldn't a hash be simpler?
nirakara has joined #ruby
<krz>
arr.uniq {|x| x['name']} works
banister_ has joined #ruby
siksia has joined #ruby
asasasasasasasas has joined #ruby
Guest85656 has joined #ruby
<bnagy>
but...but...
<bnagy>
that's randomly lossy
<bnagy>
why store the data if you don't want it?
<Guest85656>
Do i need to install cocumber before installing ANSICON?
<Guest85656>
why ansicon escape sequences works in IRB and in usual ruby it doesn't
<Guest85656>
why ansicon escape sequences works in IRB and in usual ruby it doesn't?
zaargy has joined #ruby
timonv has joined #ruby
<shevy>
Guest85656 can you change your nick to a real one?
asasasasasasasas has quit []
xclite has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
Guest85656 has quit [Ping timeout: 244 seconds]
foofoobar has quit [Quit: bb]
prtksxna has quit [Remote host closed the connection]
fermion has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
twinturbo has joined #ruby
saschagehlich has joined #ruby
bigkevmcd has quit [Quit: outta here]
Enekoos has joined #ruby
bigkevmcd has joined #ruby
<Enekoos>
hola
mucker has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
<shevy>
hola que tal
<Enekoos>
genial
<Enekoos>
y tu?
<shevy>
lol
<shevy>
no hablo espanol
etehtsea has joined #ruby
Advocation has quit [Quit: Advocation]
<Enekoos>
jajaja yo si xD
mucker has joined #ruby
<shevy>
me cago en la leche
<shevy>
Enekoos you do happen to understand english or? :P
<Enekoos>
you know spanish bad worlds xD
<Enekoos>
not very good
Advocation has joined #ruby
<shevy>
you need only 100 english words anyway ;)
<shevy>
we write in simple english
<Enekoos>
I'm not sure this
<Enekoos>
thanks :)
<Enekoos>
all person in chat write in english?
<shevy>
usually yes
<shevy>
653 people here. perhaps only... 10 understand spanish
<shevy>
630... understand english :P
<Enekoos>
I like this 10 person xD
<shevy>
hehe
<shevy>
they sleep!
wlievens has joined #ruby
<shevy>
I learned spanish for 4 years in school, but that was many many years ago. I forgot most of it now :(
chico_chicote has joined #ruby
<wlievens>
I have a date for today, and a set of week numbers (cweek field) starting in today's week. I want to get the date of the monday in each of these week numbers. How do I do that?
<Enekoos>
I usually use irc server spanish people, but #ruby channel have only 3 or 4 persons
<wlievens>
I figured I would convert today to today's week's monday
<wlievens>
and then +7 in each step
<wlievens>
but how do I do the former?
<wlievens>
just loop back until monday?
geekbri has joined #ruby
<canton7>
wlievens, or, you can get today's wday, and use that to get to the monday
saschagehlich has quit [Ping timeout: 252 seconds]
saschagehlich_ is now known as saschagehlich
nanderoo has joined #ruby
<canton7>
so something like days_to_monday = the_date.wday != 0 ? the_date.wday - 1 : 6; the_date - days_to_monday
<canton7>
at least, that's how active_support does it
maletor has quit [Quit: Computer has gone to sleep.]
bosphorus has quit [Remote host closed the connection]
liluo has joined #ruby
mohits has quit [Ping timeout: 252 seconds]
ipoval has quit [Quit: ipoval]
vectorshelve has quit [Quit: Page closed]
fayimora has quit [Read error: Connection reset by peer]
<TTilus>
.beginning_of_week in activesupport afaik
ph^ has quit [Ping timeout: 252 seconds]
fayimora has joined #ruby
BiHi has joined #ruby
`brendan has joined #ruby
yannis has quit [Quit: yannis]
<dubios>
z
ph^ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
snearch has quit [Quit: Verlassend]
stoffus has joined #ruby
Asher has quit [Quit: Leaving.]
banisterfiend has joined #ruby
PragCypher has joined #ruby
polysics has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
polysics has quit [Read error: Connection reset by peer]
Solnse has quit [Ping timeout: 260 seconds]
polysics has joined #ruby
TheHunter_1039 has joined #ruby
<geekbri>
Anybody here familiar with RSpec? I'm looking to create a test that sends a call to the run function, and checks if it returns a certain object type. I'm not sure how that should work... should it be something like my_object.should_recieve(:new).should be_a_kind_of(My::Class)
ij has left #ruby ["WeeChat 0.3.7"]
<JonnieCache>
geekbri: should_recieve is itself an assertion
<JonnieCache>
its saying "this should fail if by the end of the example new hasnt been called"
<geekbri>
JonnieCache: ah ok I see. What kind of assertion makes sense then. Basically all I am really looking to do is see if an attr_accessor is actually returning the proper object it should be.
<JonnieCache>
should be what you need
<geekbri>
JonnieCache: ah yes, that seems to make sense. I need to get a deeper understanding of rspec, I just have to get this unit test stuff done by a certain deadline which isn't really providing me the time to research like I want :)
<JonnieCache>
geekbri: one thing, I think be_a_kind_of is outdated
<JonnieCache>
I think you just use be_a now
polysics has quit [Remote host closed the connection]
wangr has joined #ruby
krusty_ar has joined #ruby
<geekbri>
JonnieCache: oh interesting. i'll look into that
flip_digits has joined #ruby
<JonnieCache>
geekbri: in rspec any method named is_x? has an assertion of the form be_x
<JonnieCache>
so if your class had a method obj.is_primary? in rspec you could assert obj.should be_primary
<JonnieCache>
its built in
fbernier has joined #ruby
<geekbri>
JonnieCache: Ok. I will look into this, thank you very much.
Gavilan has quit []
cdempsey has joined #ruby
wlievens has left #ruby [#ruby]
vlad_starkov has joined #ruby
Asher has joined #ruby
benatwork has joined #ruby
mucker has quit [Quit: leaving]
catphish has joined #ruby
<csmrfx>
So, none of #jsrs have watchers or scrapers logging possible js errors?
benatwork has quit [Ping timeout: 246 seconds]
<catphish>
is there a way to get the kernel hostname with ruby 1.9?
tfitts has quit [Read error: Connection reset by peer]
wvms has quit [Quit: wvms]
krz has quit [Quit: krz]
tfitts has joined #ruby
<catphish>
ie `hostname`.strip but without the shell
<zaargy>
anyone tried to hardcode the rubygems GEM_PATH before?
<zaargy>
long story but i need to do this
krusty_ar has quit [Read error: Connection reset by peer]
thecreators has joined #ruby
krusty_ar has joined #ruby
<csmrfx>
oh, I'm on the wrong chan
cezar has joined #ruby
cezar has quit [Remote host closed the connection]
Tricks has quit [Quit: No Ping reply in 180 seconds.]
bosphorus has joined #ruby
Tricks has joined #ruby
samfisher has joined #ruby
PragCypher has quit [Remote host closed the connection]
samfisher has left #ruby [#ruby]
liluo has quit [Remote host closed the connection]
xaxisx has joined #ruby
nari has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
djdb has quit [Read error: Connection reset by peer]
seitensei has quit [Ping timeout: 252 seconds]
xnm has joined #ruby
Solnse has joined #ruby
tommyvyo has joined #ruby
catphish has quit [Remote host closed the connection]
sparrovv has joined #ruby
<shevy>
what was the idiomatic new way in ruby again to
<shevy>
return a random element from 20..50
<shevy>
was it .shuffle ?
<apeiros_>
rand(20..50)
<apeiros_>
but oh-noes, you need 1.9 for that :-p
<apeiros_>
(maybe 1.8.7 does it too)
<shevy>
I am on 1.9.3
<apeiros_>
what what what?!?
<shevy>
I even removed 1.8.7 yesterday :(
<apeiros_>
who are you and what have you done with shevy?!
nari has quit [Read error: Connection reset by peer]
<shevy>
I am rewriting all things right now
<apeiros_>
well, my congratulations :)
nari has joined #ruby
<shevy>
well it suddenly kinda happened
<apeiros_>
anyway, rand(20..50) is your answer then
<shevy>
also, 1.8.7 does not compile from source on this machine here :\
<shevy>
ok thanks
catphish has joined #ruby
<apeiros_>
and don't worry - we're here for you if you run into encoding issues. they really aren't all that hard ;-)
<shevy>
well, mistym told me a simple way that at least is a work around for now
<shevy>
in most situations, I will just use syck for the time being
<apeiros_>
ah, for yaml?
<shevy>
yeah. it was really the major thing that blocked me
<apeiros_>
yeah, had to stick with that in our production app for quite a while too :-/
<shevy>
the other things, changing ruby code, isn't so bad. just some warning fixes and so on, that is quite straightforward and only takes time (which I have right now)
lxsameer has quit [Read error: Operation timed out]
<apeiros_>
yeah, mostly it's some minor syntactic adaptions. the only real big things are encoding related issues and dependencies that need to be updated (and possibly changed API in-between)
lxsameer has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
nu7hatch has joined #ruby
hynkle has joined #ruby
n1x has joined #ruby
niklasb has joined #ruby
Asher has quit [Quit: Leaving.]
lxsameer has quit [Max SendQ exceeded]
chson has quit [Read error: Connection reset by peer]
sleetdrop has joined #ruby
virunga has joined #ruby
rippa has quit [Quit: derp herp]
PragCypher has joined #ruby
sleetdrop has quit [Remote host closed the connection]
<R3dy>
What woudl be the simplest way to round a number UP to the nearest 100
<R3dy>
so 271 becomes 300
Advocation has quit [Ping timeout: 244 seconds]
L-----D has quit [Quit: Leaving]
dtang has quit [Quit: dtang]
<shevy>
R3dy, 271.round -2 # => 300
<shevy>
.ceil might also work
TaTonka has joined #ruby
<shevy>
but you'd have to treat 271 as 2.71 I assume
dv310p3r has joined #ruby
<R3dy>
shevy: would that alwasy round up
<R3dy>
for example would 231 also go to 300?
saschagehlich has quit [Read error: Connection reset by peer]
<shevy>
of course not
<R3dy>
that's what I'm trying to do
<R3dy>
always go up to the nearest 100
<shevy>
then your example could have been the simplest one
<shevy>
201 would become 300
<R3dy>
sorry
<shevy>
I am not sure what the easiest way is for this
<jedmtnman>
R3dy: you can do the div trick too: (231/100.00).ceil * 100
<shevy>
oh yeah that works and seems easy
<R3dy>
jedmtnman: yep that's what I just found on the net
<shevy>
(201/100.00).ceil * 100 # => 300
<R3dy>
suppose I should have just googled for 5 seconds before bothering you folks
<shevy>
:)
<R3dy>
thanks!
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
hakunin has joined #ruby
<apeiros_>
shevy: hm, funny that round takes an argument, but ceil doesn't…
<mensvaga>
shevy: from yesterday, I got ruby compiled and installed on solaris 10, but I'm getting this error:
<mensvaga>
remote_fetcher.rb:329:in `rescue in connection_for': cannot load such file -- openssl (LoadError)
<mensvaga>
when using gems
sleetdrop has quit [Remote host closed the connection]
lxsameer has quit [Max SendQ exceeded]
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
sleetdrop has joined #ruby
<shevy>
apeiros_ yeah, actually I found that out by thinking "hmm... what happens if I pass a negative number to .round" :D I actually didn't know that was possible hehehe
lxsameer has quit [Max SendQ exceeded]
<apeiros_>
^^
<shevy>
mensvaga, well you miss the openssl bindings
lxsameer has joined #ruby
<shevy>
mensvaga, you have ruby extracted somewhere yes? go to ext/openssl
<shevy>
when you are there, run extconf.rb
<mensvaga>
OK
<shevy>
and look at where it fails
<shevy>
on most linux distributions is because of missing .h files. no idea what to do in solaris though hehehe :D
<mensvaga>
configure for ruby 1.9.3 (or at least the version I have) doesn't seem to have an openssl option
erichmenge has joined #ruby
<shevy>
though actually, if only openssl fails, th en you can still use most everything else in ruby... that does not depend on opeensl :P
<mensvaga>
when I specified openssldir (or whatever the old flag was) it said it didnt' recognize it.
<shevy>
yeah, the configure script lacks things
<shevy>
I opened a bug report for a libyaml configure option
<mensvaga>
o_O
<shevy>
because I hate that there is the warning "you dont have libyaml"
<shevy>
even "gem env" showed me that warning!
punkrawkR has joined #ruby
<shevy>
I really dont understand why gem env would show that warning
<shevy>
but it does
charliesome has quit [Ping timeout: 244 seconds]
bigkevmcd has quit [Quit: outta here]
kaneda_ has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
kaneda_ has joined #ruby
<mensvaga>
checking for openssl/ssl.h... no
<mensvaga>
where does it check for that crap?
jrist has quit [Read error: Operation timed out]
<shevy>
ok so you lack a header file
<mensvaga>
Do I need to copy the header files into that directory before I compile?
<shevy>
typically that would default to /usr/include so /usr/include/openssl/ssl.h
<shevy>
depends on where your prefix was for openssl
<shevy>
you can copy that structure to /usr/include , yes
<shevy>
but perhaps your openssl is missing something else
<shevy>
mensvaga, I am sure there is a recommended way for solaris to install a package completely
<mensvaga>
I've found different docs all over the place on how to do it.
<shevy>
some days ago I coped some .h files from ruby into /usr/include
<mensvaga>
That, and when I run ./config for openssl, it says my stuff isn't supported.
maasha has quit [Quit: Page closed]
<shevy>
I overwrote some headers from glibc, and now not every program compiles anymore :)
banisterfiend has quit [Read error: Connection reset by peer]
test34- has quit [Ping timeout: 260 seconds]
nlc has joined #ruby
kaneda_ has quit [Ping timeout: 248 seconds]
Ammar01 has joined #ruby
Jay_Levitt has joined #ruby
theRoUS_ has joined #ruby
andrewhl has joined #ruby
VivekVC has joined #ruby
nlc has quit [Client Quit]
Jay_Levitt has quit [Client Quit]
banisterfiend has joined #ruby
uris has joined #ruby
Jay_Levitt has joined #ruby
jmeeuwen has quit [Read error: Operation timed out]
mohits has quit [Ping timeout: 246 seconds]
theRoUS_ has quit [Changing host]
theRoUS_ has joined #ruby
theRoUS has quit [Disconnected by services]
theRoUS_ is now known as theRoUS
jmeeuwen has joined #ruby
theRoUS_ has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
chson has joined #ruby
saschagehlich has joined #ruby
Konboi has joined #ruby
kaneda_ has joined #ruby
crankycoder has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
uris has quit [Quit: leaving]
yannis has joined #ruby
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
benatwork has joined #ruby
ph^ has quit [Ping timeout: 252 seconds]
catphish has quit [Remote host closed the connection]
jeekl has quit [Remote host closed the connection]
yannis has quit [Quit: yannis]
ABK has quit [Ping timeout: 245 seconds]
tk___ has joined #ruby
dtang has joined #ruby
jeekl has joined #ruby
lkba has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
the_jeebster has joined #ruby
<the_jeebster>
hi folks. I've got a conditional statement inside of a method written using the ternary operator. Will a 'break' value end the method call?
<hoelzro>
break doesn't end methods
<hoelzro>
it ends blocks
<shevy>
do you have code the_jeebster to show what you want
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
<the_jeebster>
def some_method
<the_jeebster>
a = 5
<the_jeebster>
b = 3
<the_jeebster>
c = 6
<the_jeebster>
a == b ? true : false
<the_jeebster>
c == b ? true : false
<the_jeebster>
end
<hoelzro>
and you want to terminate the method if, for example, a == b?
<the_jeebster>
yes
niklasb has joined #ruby
<hoelzro>
if so, return if a == b
<the_jeebster>
and not continue on to a == b
<the_jeebster>
err c == b
test34- has joined #ruby
<hoelzro>
return if a == b
<the_jeebster>
so return. thanks!
<jedmtnman>
the_jeebster:
<jedmtnman>
it will also return the return of the expression:
<jedmtnman>
jruby-1.6.6 :001 > def foo
<jedmtnman>
jruby-1.6.6 :002?> a = 3
<jedmtnman>
jruby-1.6.6 :003?> b = 3
<jedmtnman>
jruby-1.6.6 :004?> return a == b ? "foo" : "bar"
<jedmtnman>
jruby-1.6.6 :005?> end
<jedmtnman>
=> nil
<jedmtnman>
jruby-1.6.6 :006 > foo
<jedmtnman>
=> "foo"
Sheehan has joined #ruby
yannis has joined #ruby
<the_jeebster>
ah, of course
<the_jeebster>
thanks
chson has quit [Remote host closed the connection]
test34 has quit [Ping timeout: 260 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
kevinbond has joined #ruby
etehtsea has quit []
<shevy>
ahhh
<shevy>
he meant "return" :D
<Jan_>
wow
<shevy>
got confused when he wanted to use break
td123 has joined #ruby
Jan_ is now known as DefV
ben_alman has quit [Excess Flood]
cbuxton has joined #ruby
<DefV>
the above must be some of the worst code ever
Richmond has joined #ruby
<jedmtnman>
DefV: thanks :/
banisterfiend has joined #ruby
eurek has joined #ruby
adamkittelson has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
mgalgs has quit [Remote host closed the connection]
niklasb has quit [Quit: WeeChat 0.3.8]
zinjacoder has quit [Remote host closed the connection]
atnight has joined #ruby
tatsuya_o has joined #ruby
Ankhers has quit [Ping timeout: 244 seconds]
ZachBeta has joined #ruby
uris has joined #ruby
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
kpshek has joined #ruby
devdazed has quit [Quit: Bye]
test34- has quit [Ping timeout: 260 seconds]
demian`_ has quit [Read error: No route to host]
zinjacoder has joined #ruby
linusoleander has quit [Quit: linusoleander]
ben_alman has joined #ruby
drknus_ has joined #ruby
niklasb has joined #ruby
schaerli_ has joined #ruby
drknus_ has quit [Remote host closed the connection]
<bnagy>
it's possible to rearrange that sentence to form one which is correct
<hashpuppy>
heh
PaciFisT has joined #ruby
<ccooke>
hashpuppy: Every object has a metaclass immediately "above" it in its method search path
td123 has quit [Quit: WeeChat 0.3.8]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
<ccooke>
hashpuppy: effectively, it's a class that just that object inherits from, that comes before the usual inheritance paths.
<ccooke>
hashpuppy: so a method defined in an object's metaclass is unique to that object
booginga has joined #ruby
<hashpuppy>
thanks. i am like 90% there
ckrailo has joined #ruby
<shevy>
:D
josefig has quit [Quit: Leaving]
jrallison has joined #ruby
<ccooke>
hashpuppy: Easiest to imagine it like this: You have class A, from which an object a is defined.
<ccooke>
hashpuppy: If you call a method on object a, it will look in class A for its definition first. If it doesn't find it, it will look in class A's inheritance chain, until it runs out
<ccooke>
hashpuppy: however, there is a hidden metaclass behind every object which is also searched.
daniel_hinojosa has joined #ruby
<ccooke>
hashpuppy: so the search goes: a's metaclass, A's metaclass, A, A's parent's metaclass, etc.
<hashpuppy>
ahh. ok.
<hashpuppy>
now why would one need that?
<ccooke>
well, if you define a method in a's metaclass, that method only exists on object a
Solnse has joined #ruby
<ccooke>
if you create another object from class A - let's call it a2 - then that method will not exist there
UNIXgod has quit [Ping timeout: 245 seconds]
<ccooke>
At the class level... every class is an object instance of Class.
kapone has joined #ruby
<ccooke>
defining things in the metaclass of that object defines new methods that are unique to that object
kapone has quit [Read error: Connection reset by peer]
<ccooke>
which is a nice way to add new *class* methods to a Class
PragCypher has quit [Ping timeout: 246 seconds]
<hashpuppy>
very nice explaination
<ccooke>
So there are methods like the attr family, which are methods on Class objects
geekbri has quit [Ping timeout: 244 seconds]
siksia has quit [Ping timeout: 246 seconds]
<nooodl>
hmm. is this line too clever to be "clear"?
<nooodl>
puts n until n == (n = bin_rotate n)
jenrzzz-mac has joined #ruby
<hashpuppy>
ok, the reason i asked is because i saw that code in this blog: http://www.travisdunn.com/web-hooks-in-ruby-on-rails. given what you've explained, i don't see a reason why it's necessary to use "class << self" for the def trigger_for_action. wouldn't you want def self.trigger_for_action?
tk___ has quit [Quit: ばいばい]
UNIXgod has joined #ruby
PragCypher has joined #ruby
<ccooke>
you can have class methods unique to your Class by defining a new *type* of Class object (so, something inheriting from Class), but then the only way you can make a new class that's an instance of your new Class-type, you'd have to use MyClass.new(ClasstoInheritFromIfAny) do ... end
<hashpuppy>
nooodl: i have no idea what that does
<hashpuppy>
not sure if that helps
wangr has quit [Remote host closed the connection]
<ccooke>
hashpuppy: I couldn't answer that directly, since I don't know much about RoR. I can take a look, but no promises :-)
jackiechan0 has quit [Quit: Sto andando via]
<hashpuppy>
ok
schovi has quit [Remote host closed the connection]
siksia has joined #ruby
<ccooke>
hashpuppy: the thing is, it's a subtle difference.
busybox42 has quit [Read error: Connection reset by peer]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
ceej has joined #ruby
busybox42 has joined #ruby
wangr has joined #ruby
maesbn has quit [Remote host closed the connection]
MasterIdler has quit [Quit: MasterIdler]
gilead has quit [Quit: Leaving]
Ankhers has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
ZachBeta has joined #ruby
aibo has joined #ruby
nari has quit [Ping timeout: 252 seconds]
fayimora has joined #ruby
wangr has quit [Remote host closed the connection]
sako has joined #ruby
fayimora has quit [Client Quit]
schaerli_ has joined #ruby
williamcotton has joined #ruby
williamcotton has quit [Client Quit]
wangr has joined #ruby
Solnse has quit [Ping timeout: 265 seconds]
schaerli_ has quit [Read error: Connection reset by peer]
bbttxu has quit [Read error: Connection reset by peer]
schaerli has quit [Ping timeout: 245 seconds]
schaerli has joined #ruby
williamcotton has joined #ruby
arturaz has quit [Ping timeout: 246 seconds]
bbttxu has joined #ruby
eurek has quit [Quit: Computer has gone to sleep.]
bbttxu has quit [Read error: Connection reset by peer]
flype has joined #ruby
sirecote has quit [Ping timeout: 244 seconds]
dtang has quit [Quit: dtang]
bbttxu has joined #ruby
flype has quit [Client Quit]
kenperkins has joined #ruby
negaduck has quit [Quit: negaduck]
mikepack has joined #ruby
flype has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
bbttxu has quit [Read error: Connection reset by peer]
bbttxu has joined #ruby
sako has quit [Ping timeout: 245 seconds]
sirecote has joined #ruby
wangr has quit [Remote host closed the connection]
brianpWins has joined #ruby
jprovazn has quit [Ping timeout: 248 seconds]
wangr has joined #ruby
geekbri has joined #ruby
bbttxu has quit [Client Quit]
ph^ has joined #ruby
tds has joined #ruby
apok has joined #ruby
<tds>
If I have an inherited constant and an inherited method, then the inherited method will use the constant from the lexical scope of the inherited method, even if I redefine the constant in my class, correct?
linusoleander has joined #ruby
bbttxu has joined #ruby
devdazed has joined #ruby
<Mon_Ouie>
tds: Right
dmerrick_ has joined #ruby
<Mon_Ouie>
You can use a method or an instance variable if you want to be able to change that behavior in subclasses
maesbn has joined #ruby
hoelzro is now known as hoelzro|away
forestbird has quit [Remote host closed the connection]
looopy has quit [Remote host closed the connection]
<tds>
so there's no easy way around this, except to not use constants?
flype has quit [Quit: Computer has gone to sleep.]
<tds>
I want my inherited method to resolve constants in the scope of my subclass rather than in the class where it was defined
flagg0204 has quit [Quit: leaving]
flype has joined #ruby
flype has quit [Client Quit]
cbuxton has quit [Quit: Leaving.]
sonne has quit [Quit: Leaving]
MasterIdler has joined #ruby
flype has joined #ruby
maesbn has quit [Remote host closed the connection]
Eldariof-ru has quit [Ping timeout: 240 seconds]
Konboi has quit [Remote host closed the connection]
thone_ has quit [Read error: Connection reset by peer]
engel has joined #ruby
looopy has joined #ruby
jprovazn has joined #ruby
<Mon_Ouie>
You can use your_class::Constant
phantasm66 has quit [Ping timeout: 244 seconds]
<Mon_Ouie>
But I would still advice against using constants for this
baroquebobcat has joined #ruby
ank has joined #ruby
<apeiros_>
tds: self.class::Constant
<apeiros_>
Mon_Ouie: why'd you advise against that?
<tds>
well I can give you a bit more detail if it helps
<tds>
basically I have a REQUIRED_METADATA constant
<tds>
there is some metadata required for the base class, but some of the subclasses require more
thone has joined #ruby
<Mon_Ouie>
I find using the method call mechanism more natural for this purpose
thecreators has quit [Ping timeout: 246 seconds]
<apeiros_>
tds: in that case, indeed self.class::REQUIRED_METADATA
bitsar2 has quit [Remote host closed the connection]
<tds>
thanks
vlad_starkov has quit [Read error: Connection reset by peer]
theRoUS_ has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<apeiros_>
you might ponder using a class method instead of a constant. but so far I see no strong reason to do it
vlad_starkov has joined #ruby
<matled>
apeiros_: I think a method has, in this case, the advantage that you cannot call the wrong method accidentally.
pk1001100011 is now known as mc_frog
phantasm66 has joined #ruby
Doppp has joined #ruby
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
phenrique has joined #ruby
<apeiros_>
matled: is that so? if it's an instance method, he has to provide a receiver too. I think using SomeClass instead of self.class is an easy mistake as well…
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
mc_frog is now known as pk1001100011
xnm has quit [Ping timeout: 246 seconds]
neersight[d] has quit [Ping timeout: 246 seconds]
<matled>
a more explicit mistake :)
engel has quit [Quit: bye]
jprovazn is now known as jprovazn_away
jchauncey has joined #ruby
engel has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
rvmeier has joined #ruby
<tds>
apeiros_: do you mean class method?
SegFaultAX|work2 has quit [Read error: Connection reset by peer]
neersight[d] has joined #ruby
<Mon_Ouie>
If you're calling the class method from an instance method
nonotza has joined #ruby
cbuxton has joined #ruby
<tds>
right
timonv has quit [Remote host closed the connection]
<tds>
yeah, I would be
SegFaultAX|work2 has joined #ruby
<tds>
I think I prefer the constant solution
itnomad has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
bier has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
cbuxton has quit [Client Quit]
iandalton has joined #ruby
cbuxton has joined #ruby
<tds>
thanks everyone
robotmay has quit [Remote host closed the connection]
theRoUS_ has joined #ruby
<iandalton>
I'm following the installation instructions for redcar (https://github.com/redcar/redcar/wiki/installation), and it says to run "jruby -S bundle install", but that prints "jruby: No such file, directory, or command -- bundle". What am I supposed to do?
youdonotexist has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
<xclite>
are you installing from source?
bradhe has quit [Remote host closed the connection]
<xclite>
because you can install the gem without getting JRuby setup
MasterIdler has quit [Quit: MasterIdler]
<iandalton>
I'm installing from source for development
<xclite>
for development of redcar or so you can develop ruby?
<xclite>
installing from source means you're working on redcar
Targen has joined #ruby
<iandalton>
it's a very beta program, so I might find as I use it that I have something to contribute
<xclite>
if you just want to *use* redcar, I'd just do `sudo gem install redcar`
Helius has quit [Ping timeout: 248 seconds]
xbayrockx has quit [Ping timeout: 246 seconds]
t0mmyvyo has joined #ruby
<iandalton>
but since I do want to install it from source, how do I do it?
<xclite>
well then you'll want to do the section titled "Dependencies: JRUby"
BiHi has quit [Quit: Computer has gone to sleep]
friskd has joined #ruby
<iandalton>
Yeah, I have that, otherwise the error would have been "jruby: command not found"
piotr_ has joined #ruby
ph^ has quit [Ping timeout: 246 seconds]
xbayrockx has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
schaerli has quit [Remote host closed the connection]
itnomad has quit [Quit: Leaving]
Dreamer3 has joined #ruby
andrewhl has quit [Remote host closed the connection]
ipoval has joined #ruby
SilverSwan has joined #ruby
<SilverSwan>
Hello
blacktulip has quit [Remote host closed the connection]
siksia has quit [Ping timeout: 240 seconds]
apok has quit [Quit: apok]
foofoobar has joined #ruby
mrdtt has quit [Ping timeout: 246 seconds]
chrismcg is now known as zz_chrismcg
<SilverSwan>
guys, I'm having a little problem with executing a .rb script is here anyone with a great heart that can give me just a little help?
MasterIdler has joined #ruby
jgarvey has joined #ruby
siksia has joined #ruby
<shevy>
SilverSwan no
PragCypher has quit [Remote host closed the connection]
ipoval has quit [Client Quit]
<shevy>
SilverSwan but paste your problem here
interopcop has joined #ruby
<SilverSwan>
:p
adamkittelson has quit [Remote host closed the connection]
<interopcop>
I'm looking for help on a complex mapping
<SilverSwan>
I writed a script to make a response time test results using browsermob and watir-webdriver
bier has joined #ruby
<SilverSwan>
i always copied and pasted into pry the script
<SilverSwan>
but im habing this error: ruby: no Ruby script found in input (LoadError)
<interopcop>
Carrier has one net_profile. NetProfile has many networks. Network has many ip_addresses. I want an array of all IPAddresses associated with this Carrier
savage- has joined #ruby
looopy has quit [Remote host closed the connection]
PragCypher has joined #ruby
<shevy>
SilverSwan that makes no sense. the error you describe here comes from within a .rb script
<shevy>
but you describe it to us as if you ran it from the commandline
<SilverSwan>
if i run [root@myhost 66]# ruby Responsetime_eventconsole_66.rb
<SilverSwan>
ruby: no Ruby script found in input (LoadError)
<SilverSwan>
[root@myhost 66]#
tatsuya_o has joined #ruby
<SilverSwan>
but if i copy and paste in pry works
<shevy>
SilverSwan aha
<shevy>
SilverSwan it may be that you do run that script, and this script returns that info to you
<SilverSwan>
aha
jimeh has joined #ruby
<shevy>
it's a strange error message though
<SilverSwan>
:/
<shevy>
:)
<SilverSwan>
do you think rvm mess it up?
<shevy>
no idea. I dont use rvm.
<SilverSwan>
I dont think its anyway.
<SilverSwan>
I'm kinda newbie at ruby.
<shevy>
SilverSwan well look at that .rb file
maletor has joined #ruby
<SilverSwan>
i think it may work generating a gemset
senny has quit [Remote host closed the connection]
<shevy>
I dont know what it does
quest88 has joined #ruby
<SilverSwan>
the .rb works perfectly, at least pasting it into pry or irb
Targen has quit [Ping timeout: 245 seconds]
Targen has joined #ruby
<iandalton>
xclite: what there could help?
jenrzzz-mac has joined #ruby
adeponte has joined #ruby
<xclite>
iandalton: If I were a developer who planned to contribute to an IDE, I might be able to recognize that I need to JRuby'
qwerxy has quit [Ping timeout: 244 seconds]
<xclite>
need to fix JRuby's path
adamkittelson has joined #ruby
<xclite>
or somehow get the gem on jruby's path
mohits has quit [Ping timeout: 246 seconds]
adamkittelson has quit [Remote host closed the connection]
flype has quit [Quit: Computer has gone to sleep.]
<iandalton>
xclite: I have never used Ruby. But even if a project's written in a language I haven't used before, if it's a beta product, I like to be able to fiddle with the source.
S2kx has joined #ruby
<xclite>
iandalton: this isn't a ruby problem, this is a path problem - jruby can't find the gem. that's why i linked to a problem with similar path issues
<nooodl>
what's the preferred way to count the size in bits of a positive integer? x.to_s(2).size feels messy
<nooodl>
is Math::log2(x).floor better?
banister_ has quit [Read error: Connection reset by peer]
adamkittelson has joined #ruby
cbuxton1 has joined #ruby
winux has joined #ruby
winux has left #ruby [#ruby]
eurek has joined #ruby
cbuxton has quit [Ping timeout: 245 seconds]
bosphorus has quit [Remote host closed the connection]
a_a_g has quit [Read error: Connection reset by peer]
banister_ has joined #ruby
a_a_g has joined #ruby
VivekVC has quit [Read error: Operation timed out]
svankie has joined #ruby
bahamas has joined #ruby
<svankie>
Hi everybody. How do I reference an instance method from another instance method in a class declaration?
<ccooke>
svankie: within an instance method, you can access another instance method just by its name. You could also use self.method, if that's not clear enough for you.
<bahamas>
hello. can anyone tell me how I can get rid of this http://bpaste.net/show/jZtqAP4PeyhC2w8OIN2n/? I don't have any ruby experience. I just need to use the gem to install some packages I need
<svankie>
ccooke: thanks. :-)
simao has quit [Ping timeout: 265 seconds]
eurek has quit [Quit: Computer has gone to sleep.]
<shevy>
bahamas that depends. are you stuck with debian?
sleetdrop has quit [Remote host closed the connection]
<shevy>
bahamas, I think that error comes from using an old rubygems version
keanehsiao has quit [Quit: keanehsiao]
<shevy>
you can do 'gem --version' to display your current gem version
PragCypher has quit [Read error: Connection reset by peer]
jackiechan0 has joined #ruby
PragCypher has joined #ruby
cpruitt has joined #ruby
drknus has joined #ruby
Vert has joined #ruby
<havenn>
need to set it up to launch the app if "Available" otherwise play sad trombones
Sheehan has quit [Quit: Sheehan]
maccosmo has quit [Quit: maccosmo]
Sheehan has joined #ruby
nfluxx has quit [Remote host closed the connection]
jenrzzz-mac has joined #ruby
nfluxx has joined #ruby
QKO has joined #ruby
drknus has quit [Client Quit]
MrGando has joined #ruby
banister_ has quit [Remote host closed the connection]
bahamas has left #ruby [#ruby]
keanehsiao has quit [Quit: keanehsiao]
Targen has quit [Ping timeout: 245 seconds]
rknLA has joined #ruby
<rknLA>
anyone in here do audio development with ruby? i'm trying to figure out some reasonable ways to do TDD for audio software, and google isn't helping much
ken_barber has joined #ruby
foofoobar has quit [Quit: Computer has gone to sleep]
counterbeing has joined #ruby
maccosmo has joined #ruby
qwerxy has quit [Quit: offski]
cbuxton has joined #ruby
niku4i has quit [Remote host closed the connection]
kenichi has quit [Remote host closed the connection]
Codif has joined #ruby
kryptek_ has joined #ruby
Vert has joined #ruby
<havenn>
rknLA: What kind of audio software?
<_marvin>
bnagy: i did a few more tests on a bigger machine with more or less threads more and less requests even a more faster mongodb with ssd's and its just the way it is
<_marvin>
ruby threads are slow
<rknLA>
interesting.
<rknLA>
live audio sampling.
<rknLA>
i.e. real-time recording and playback
<_marvin>
bnagy: i could not get the threaded version to work faster then the none thread
rknLA has quit [Remote host closed the connection]
axl_ has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
simao has joined #ruby
monokrome has joined #ruby
kenichi has joined #ruby
ronniy has quit [Remote host closed the connection]
crankycoder has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
sparrovv has quit [Ping timeout: 240 seconds]
<shevy>
wheeeee
<shevy>
I think my projects now work on 1.9.3 finally
simao has quit [Ping timeout: 265 seconds]
jackiechan0 has quit [Quit: Sto andando via]
<SilverSwan>
shevy: cool
<shevy>
hehe took me just a few years until I switched :P
<shevy>
but now... I kinda switched
<SilverSwan>
what did you switch?
<shevy>
from 1.8.7 to 1.9.3
<SilverSwan>
nice
<shevy>
there are still new warnings I have to figure out yet
<shevy>
information.rb:14: warning: character class has duplicated range: /(.*)-([\d\.\w]+)/
<SilverSwan>
mmmm
<SilverSwan>
too many code to migrate?
tectonic has quit [Ping timeout: 260 seconds]
Shoobdidoo has joined #ruby
<shevy>
quite a lot yeah
<shevy>
at least 6 years of writing ruby scripts
<SilverSwan>
Okay, thats a lot.
<yxhuvud>
shevy: \w might not work if you expect Ü to be matched any longer.
<SilverSwan>
It feels really nice when you sucessfully migrate lot of shit.
<SilverSwan>
Last year i migrated from 600 windows servers
<SilverSwan>
to 200 CentOS
<lectrick>
Did calling "super" always pass any args along that were sent to the method you're calling "super" from, or is that relatively new?
monokrome has quit [Excess Flood]
<SilverSwan>
and its amazing to see how it works now..
<shevy>
yxhuvud aaaaaaaah
<yxhuvud>
lectrick: no change there afaik.
<shevy>
yxhuvud so the error is _inside_ that regex
<apeiros_>
shevy: \w includes \d, which is why you get the warning
<shevy>
I wondered and wondered and thought that that ruby file has it duplicated somewhere else
<shevy>
ok, now it makes a lot more sense!
<lectrick>
yxhuvud: Ever? Or recently?
<shevy>
I mean the warning
<shevy>
not sure about my old code ;P
monokrome has joined #ruby
<apeiros_>
lectrick: always been like that. also note that super() won't pass args along, but will *still* pass a block on. only super(&nil) will stop the block from being passed.
tectonic has joined #ruby
<shevy>
lectrick I usually use super() explicitly
<shevy>
in def initialize at least
<lectrick>
shevy: yeah
<lectrick>
shevy: we have an odd situation where a test that passed in 1.9.2 is now failing in 1.9.3 and it passes if we change the "super" call in the initialize to "super()"
flashuni has joined #ruby
Targen has joined #ruby
<shevy>
yeah, I remember I once had something similar... forgot what, only remember that I changed super to super() and since that was using super() usually
Habib1983 has quit [Ping timeout: 252 seconds]
<shevy>
the python guys would say "that would not have been possible if ruby would have mandatory ()"!
flashuni has quit [Client Quit]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
Shoobdidoo has quit [Quit: Verlassend]
foofoobar has joined #ruby
hynkle has quit [Ping timeout: 244 seconds]
zerocool_ has left #ruby [#ruby]
chriskk has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
fserb has joined #ruby
saltnvinegar has joined #ruby
monokrome has quit [Ping timeout: 248 seconds]
mdw has joined #ruby
Aristata has left #ruby [#ruby]
monokrome has joined #ruby
jrist is now known as jrist-afk
monokrome has quit [Excess Flood]
zinjacoder has joined #ruby
<RubyPanther>
I almost always use super if I'm not passing in arguments. And if I am, I prefer to alter the ones I need to alter, and then I can super(*args) and not crash on new versions with extra stuff
<RubyPanther>
reduces coupling
mayankkohaley_ has joined #ruby
monokrome has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
mayankkohaley has quit [Ping timeout: 260 seconds]
<RubyPanther>
Every time I peeked in, it was all boring
fserb has quit [Read error: Connection reset by peer]
<saltnvinegar>
bahamas, did you install ruby gems via apt-get?
fserb has joined #ruby
<bahamas>
saltnvinegar: most likely or it came with ubuntu
<bahamas>
I don't remember installing it from source
<saltnvinegar>
IIRC, if you didn't install from source, you won't be able to update --system.
Codif has quit [Remote host closed the connection]
wangr_ has joined #ruby
<saltnvinegar>
does ~$gem list return anything?
<bahamas>
saltnvinegar: no package names
<bahamas>
gems, I mean
<saltnvinegar>
Can you even install a gem?
banjara has joined #ruby
wangr has quit [Ping timeout: 240 seconds]
<bahamas>
what gem should I try with?
<saltnvinegar>
Are you on a version manager, like RVM or rbenv
<bahamas>
saltnvinegar: nope. I have no experience with ruby. I just need vagrant to work with VMs
<saltnvinegar>
try gem install rspec since you are usin it. :P
killer has quit [Quit: Lost terminal]
rasbonics has joined #ruby
havenn has quit [Remote host closed the connection]
udante has joined #ruby
alexim has joined #ruby
<shevy>
told ya, you should have listened to my advice rather than stackoverflow :D
pmade has left #ruby ["rcirc on GNU Emacs 24.1.50.1"]
<shevy>
the main thing with debian is that one either should stay within it, or abandon it entirely (for ruby)
vlad_starkov has quit [Remote host closed the connection]
eurek has joined #ruby
havenn has joined #ruby
<bahamas>
saltnvinegar: installing worked and now those gems are displayed when running gem list
dekroning has joined #ruby
Industrial has left #ruby ["WeeChat 0.3.5"]
ryanf has joined #ruby
kpshek has quit [Read error: Connection reset by peer]
robotmay has joined #ruby
<jedmtnman>
shevy: haven't been following, but would it be easy to install rvm on debian and run it through that packaging system?
nat2610 has joined #ruby
kpshek has joined #ruby
kirun has joined #ruby
<bahamas>
ok, I'll just uninstall rubygems and install it again from source
<shevy>
no idea, I dont use rvm and I dont use debian. I found debian's way to cripple packages way too annoying, and rvm seems to add a layer that I never needed (I compile everything into standalone versioned directories myself, including ruby)
hynkle has quit [Read error: No route to host]
<nat2610>
Hi, I had a quick newby question. with Yaml, let say you have http://www.pastie.org/4045974, how to do you select the family name of Ken ?
hynkle has joined #ruby
yannis has quit [Quit: yannis]
<jedmtnman>
shevy: I don't do a lot of ruby anymore, so theres prob something better than rvm, but for most use cases, its pretty nice. I'm not a big systems guy, i just like it to 'work' and its a pretty fair shot at that.
<bahamas>
yeah, it looks like rubygems1.8 was installed separately from rubygems
<shevy>
nat2610 the yaml gets converted into ruby structures, a hash in this example. and you access this like you do with any other ruby hash
theRoUS has quit [Ping timeout: 260 seconds]
<shevy>
hash['player'][1]['family'] should work
<Sou|cutter>
side-note, I dislike storing names in multiple fields unless there's a very good reason
<shevy>
but it's terribly ugly
<burgestrand>
jedmtnman: rvm is still the thing to use, alternatively rbenv depending only on preference
jrajav has joined #ruby
<shevy>
jedmtnman yeah but I dont need it. I use ruby to switch between ruby versions anyway. all that is installed into /Programs/Ruby
<shevy>
though I have to admit, I removed 1.8.7 yesterday
cbuxton has quit [Ping timeout: 265 seconds]
<Sou|cutter>
shevy: hurray!
<msch>
anyone got a fix for a ruby daemon that get's "getaddrinfo: Temporary failure in name resolution" after a while? restarting fixes it, but that's a 37signals-style workaround :p
<shevy>
Sou|cutter hehe
<shevy>
Sou|cutter still have to fix some small things... but for now I spent enough time, will do something else than coding for today
<shevy>
jedmtnman, do you still program though?
<jedmtnman>
shevy: yah, and still do a fair bit of ruby, but lately been doing a lot of front end dev with coffeescript and backend with clojure
Doppp has quit [Quit: leaving]
pk1001100011 has quit [Quit: Burn your gods and kill the king; Subjugate your suffering; Dead heart, in a dead world]
pk1001100011 has joined #ruby
Doppp has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
<jedmtnman>
like today i wrote a post-commit hook in ruby, because it sounded nicer that doing it in bash.
<jedmtnman>
and the project required ruby anyway
<shevy>
hehe
<shevy>
bash!
<shevy>
I hope I never have to write a shell script again
<jedmtnman>
anyway if you're curious, go on the the #clojure channel and type
<jedmtnman>
,(doc map)
thecreators has joined #ruby
<deryl>
i know exactly what you mean. don't need to
<jedmtnman>
deryl: perhaps i wasn't directly telling you to do it
<deryl>
oh dude enough about it
<wmoxam>
what are you getting at jedmtnman ?
stephenjudkins has quit [Quit: stephenjudkins]
<jedmtnman>
wmoxam: i was just asking if the channel had something similar
<deryl>
he wanted to know if we had a doc bot online and one that let you eval ruby code in the channel
vitoravelino`afk is now known as vitoravelino
<wmoxam>
no, it doesn't
<wmoxam>
!next
m_3_ has joined #ruby
kuranai is now known as kuranai|off
schovi has joined #ruby
emmanuelux has quit [Read error: No route to host]
m_3 has quit [Ping timeout: 244 seconds]
kpshek has quit [Ping timeout: 252 seconds]
thecreators has quit [Ping timeout: 252 seconds]
Sgeo has left #ruby ["Leaving"]
a_a_g has quit [Quit: Leaving.]
lkba has quit [Ping timeout: 240 seconds]
pgentoo has quit [Remote host closed the connection]
<shevy>
we need a pry-bot
pgentoo has joined #ruby
the_jeebster1 has quit [Ping timeout: 245 seconds]
kpshek has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
wangr has joined #ruby
the_jeebster has joined #ruby
havenn has joined #ruby
wangr_ has quit [Ping timeout: 252 seconds]
foofoobar has quit [Quit: Computer has gone to sleep]
m_3_ has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
Criztian has joined #ruby
cbuxton has joined #ruby
CannedCorn has joined #ruby
m_3 has joined #ruby
olrrai has joined #ruby
<LiquidInsect>
4
<LiquidInsect>
ergh
Dr4g has quit [Excess Flood]
Dr4g has joined #ruby
zinjacoder has quit [Quit: Peace!]
mdw has joined #ruby
engel has quit [Quit: bye]
ramblex has joined #ruby
jenrzzz-mac has joined #ruby
Eldariof-ru has quit []
youdonotexist_ has joined #ruby
youdonotexist_ has quit [Client Quit]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
dekronin1 has joined #ruby
niku4i has joined #ruby
Goyo has joined #ruby
poppiez has joined #ruby
youdonotexist has quit [Ping timeout: 244 seconds]
<poppiez>
if I have a file called /var/folders/bla/bla/myJavaScriptFile.js.gz, how do I rename it to /var/folders/bla/bla/myJavaScriptFile.gz.js?
<poppiez>
basically, flip the "extensions"
dekroning has quit [Ping timeout: 246 seconds]
gheegh has joined #ruby
<gheegh>
Hey all. Quick question. Anyone seen open-uri leak memory? I have an app that's using it.. and after a few hours.. it crashes with an out of memory error..
jenrzzz-mac has quit [Quit: jenrzzz-mac]
niku4i has quit [Ping timeout: 265 seconds]
<RubyPanther>
gheegh: you probably have an each loop or something, where it can't free the memory until the whole loop ends because of how the closures work.
ryan0x2 has quit [Remote host closed the connection]
<RubyPanther>
Move your code into very short methods that call each other, instead of large loops, and the problem usually goes away.
<gheegh>
RubyPanther: That sounds right.. this is operating in a loop.
simao has joined #ruby
<RubyPanther>
The inside of the loop should almost always just be a single method call that receives the current element(s)
siksia has quit [Ping timeout: 260 seconds]
Vainoharhainen has joined #ruby
jenrzzz-mac has joined #ruby
<gheegh>
RubyPanther: Loading it to take a look based on your thought.. I feel like I've got the process in its own method.
Goyo has quit [Remote host closed the connection]
<RubyPanther>
Once I had a loop with open-uri and hpricot that was using over 1G of RAM and _why told me that about loops and just pasting the inside of the loop into a method dropped the RAM to like 100M
<RubyPanther>
I would not expect there to be any sort of actual leak with open-uri or any of the standard open stuff
<RubyPanther>
Because people hit that code pretty hard from inside daemons that run for months/years before being restarted
<gheegh>
RubyPanther: Thanks.. I'm looking into it.
shadoi has joined #ruby
<CannedCorn>
hey guys
<CannedCorn>
how would you start, kill, monitor processes in windows with ruby
shadoi has quit [Remote host closed the connection]
jcromartie has joined #ruby
shadoi has joined #ruby
<wmoxam>
CannedCorn: what do you mean by 'monitor'?
Zolrath has joined #ruby
simao has quit [Ping timeout: 265 seconds]
qwerxy has joined #ruby
<csmrfx>
CannedCorn: install virtualbox. install debian or arch. install rvm. use linux proc
khakimov has quit [Quit: Computer has gone to sleep.]
<csmrfx>
lord know if the support for win32ole ends in 1.6 or summin
rvmeier has quit [Quit: Saliendo]
<wmoxam>
CannedCorn: so?
mikejw has joined #ruby
<csmrfx>
hm, or was it so that win32ole comes with word or excel and such...
<wmoxam>
Service is just a process you want to start/stop/restart
<wmoxam>
...
<csmrfx>
...I forget, last touched ruby on win in 2k8 or something
dr_diamond has joined #ruby
dr_diamond has quit [Changing host]
dr_diamond has joined #ruby
<mikejw>
anyone know where my mkmf.log file is?
stephenjudkins has joined #ruby
avandenhoven has quit [Quit: avandenhoven]
siksia has joined #ruby
<csmrfx>
mikejw: "locate mkmf.log"
<CannedCorn>
not all processes in windows can be installed as services
<werdnativ>
on a system installed ruby (e.g. apt package), what sets up the GEM_HOME and GEM_PATH env vars? In my env I don't have these...
<wmoxam>
CannedCorn: I think you're going to have to be way more specific then
<csmrfx>
werdnativ: what do you refer to as 'env'?
Maghoole has joined #ruby
<werdnativ>
csmrfx, environment variables, `env` or `echo $GEM_HOME`
banister_ has joined #ruby
<Maghoole>
csmrfx, environment variables, `env` or `echo $GEM_HOME`
<csmrfx>
you mean, the shell environment, bash?
<werdnativ>
yes
swistak35 has quit [Remote host closed the connection]
<gheegh>
RubyPanther: Follow on question.. if you don't mind. I was using a backtick to run pdftotext to turn a PDF into a text file for processing. I'm wondering if you have a suggestion as to how to do that more memory efficient? That could be the other source of the leak.
<Maghoole>
yes
<RubyPanther>
gheegh: I doubt it is a leak, it is probably a matter of GC and doing more than one thing per method
<csmrfx>
werdnativ: I suppose the install script sets those
sepp2k has quit [Ping timeout: 246 seconds]
<csmrfx>
werdnativ: you installed gems via apt-get?
<RubyPanther>
For example if you have a loop with one line of code and you think, oh I don't need to put that one line in a method because it is just one line, well, you are already doing 2 things now.
<jlogsdon>
make a method for each line of code, sans flow-control
<werdnativ>
csmrfx: no, just ruby1.9.3 I could try installing rubygems from apt too, but "gem" was available after just ruby1.9.3
<Maghoole>
csmrfx: no, just ruby1.9.3 I could try installing rubygems from apt too, but "gem" was available after just ruby1.9.3
<jlogsdon>
why is Maghoole quoting werdnativ?
<werdnativ>
yeah, wtf is Maghoole?
<jlogsdon>
maybe he likes you :3
<RubyPanther>
Most of your temp values are sitting around waiting for the _exclosing_method_ of the _loop_ to exit before they get collected. Whereas if the inside of the loop the work is all done in another method, then it leaves scope before it even gets to the next loop iteration, so the GC works as expected
lkba has joined #ruby
robotmay has quit [Remote host closed the connection]
<Maghoole>
yeah, wtf is Maghoole?
<RubyPanther>
Note that in other languages, for example in Perl, the two styles would have the same memory profile.
youdonotexist has joined #ruby
zeromodu_ has joined #ruby
blkmajik has joined #ruby
<csmrfx>
is installing ruby and gems from source difficult these days?
<csmrfx>
or is it just a matter of knowing how to type 'make'?
rudolfrck has joined #ruby
chico_chicote has quit [Quit: Page closed]
zeromodulus has quit [Ping timeout: 252 seconds]
<rudolfrck>
what's the most used templating language, besides erb?
<RubyPanther>
csmrfx: for Ruby you also have to be able to type "./configure" and for gems, usually just "gem install foo"
LtHummus has joined #ruby
<csmrfx>
I'm just wondering if I'd dare werdnativ to apt-get remove and purge and then make from source
psycho_one has quit [Ping timeout: 246 seconds]
<csmrfx>
ooor, to rvm
UNIXgod has quit [Changing host]
UNIXgod has joined #ruby
<RubyPanther>
generally you would use rvm or rbenv and never use system gem packages
werdnativ has quit [Ping timeout: 246 seconds]
bluOxigen has quit [Ping timeout: 246 seconds]
indian has joined #ruby
indian has joined #ruby
indian has quit [Changing host]
Boohbah has joined #ruby
sparrovv has joined #ruby
indian has quit [Read error: Connection reset by peer]
CannedCorn has quit [Read error: Operation timed out]
dr_diamond has quit [Quit: Bye !]
beandip has quit [Quit: WeeChat 0.3.2]
beandip has joined #ruby
looopy has quit [Remote host closed the connection]
banister_ has quit [Read error: Connection reset by peer]
<borys_b_timakov>
Boohbah: aha so I should add this URI as a source to gem, thanks, let me try, and for example will it work for the rails framework installation?
mdw has quit [Ping timeout: 260 seconds]
<Boohbah>
borys_b_timakov: yes
hynkle has quit [Ping timeout: 246 seconds]
<borys_b_timakov>
Boohbah: thanks a lot, now I'm in process of adding a new source :(
LBRapid has quit [Quit: Computer has gone to sleep.]
Advocation has joined #ruby
youdonotexist has quit [Quit: youdonotexist]
Progster has quit []
s0ber has quit [Ping timeout: 252 seconds]
s0ber_ is now known as s0ber
havenn has joined #ruby
youdonotexist has joined #ruby
peterhil` has joined #ruby
maesbn has joined #ruby
niklasb has joined #ruby
siksia has quit [Ping timeout: 252 seconds]
brngardner has joined #ruby
Mchl has joined #ruby
stewart_ has joined #ruby
billiamii has quit []
stewart_ has quit [Client Quit]
stewart_ has joined #ruby
saschagehlich has quit [Read error: Connection reset by peer]
siksia has joined #ruby
nilg` has quit [Read error: Connection reset by peer]
bluenemo has quit [Remote host closed the connection]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
EstanislaoStanis has joined #ruby
kelseyhightower has joined #ruby
EstanislaoStanis has quit [Client Quit]
davidw has joined #ruby
chessguy has joined #ruby
davidw is now known as Guest8514
eignerchris has joined #ruby
niku4i has joined #ruby
IPGlider has quit []
maesbn has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
kelseyhightower_ has joined #ruby
kelseyhightower has quit [Read error: Connection reset by peer]
kelseyhightower_ is now known as kelseyhightower
c0rn has joined #ruby
minijupe has quit [Quit: minijupe]
Maghoole has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
ringotwo has joined #ruby
counterbeing has quit [Quit: Computer has gone to sleep.]
nixmaniack has quit [Quit: "sleep time.."]
EstanislaoStanis has joined #ruby
foofoobar has joined #ruby
c0rn has quit []
wmoxam has quit [Ping timeout: 245 seconds]
<EstanislaoStanis>
Could someone tell me why I get "undefined local variable or method 'name'..." for this http://pastie.org/4046705. Sorry, I = ubernoob. ^-^.
kelseyhightower has quit [Ping timeout: 246 seconds]
qwerxy has quit [Quit: offski]
yxhuvud has quit [Ping timeout: 244 seconds]
tomask has quit [Quit: Quit]
aibo has quit [Quit: Leaving]
ZachBeta has quit [Quit: Computer has gone to sleep.]
kpshek has quit []
peterhil` has quit [Quit: Must not waste too much time here...]
peterhil` has joined #ruby
fridim_ has quit [Remote host closed the connection]
<Tricks>
@EstanislaoStanis: Because you referenced "name" on line 19 without ever defining it.
robotmay has joined #ruby
niku4i has quit [Remote host closed the connection]
jenrzzz-mac has joined #ruby
Guest8514 has quit [Ping timeout: 246 seconds]
<Tricks>
Furthermore, what is "add_command", I don't see that method defined anywhere in your Dungeon class.
niklasb has quit [Ping timeout: 265 seconds]
<MrGando>
Hey guys, I would like to know what this means in ruby 'some_variable ||= SomeClass.new'
TheRealPygo is now known as pygospa
<EstanislaoStanis>
Oh, thanks. Silly me. So I have to define it first, and then put it between the (). Oh, and there is an add_command. I just cut out most of the unecessary stuff for the pastie.
dmerrick_ has quit [Quit: dmerrick_]
azm has quit [Read error: Connection reset by peer]
benatwork has quit [Remote host closed the connection]
fridim_ has joined #ruby
cantonic has quit [Remote host closed the connection]
Ankhers has quit [Remote host closed the connection]
foofoobar has quit [Quit: Computer has gone to sleep]
<Tricks>
@MrGarndo: It only sets the variable equal to the right side if the variable is not defined already.
wangr has quit [Ping timeout: 252 seconds]
stephenjudkins has joined #ruby
fserb has quit [Quit: ttyl]
<Tricks>
For example:
<Tricks>
a = 2
thecreators has joined #ruby
<Tricks>
a ||= 3
<Tricks>
puts a
<Tricks>
Would show a "2"
fbernier has quit [Ping timeout: 246 seconds]
<MrGando>
Tricks, fantastic thanks :)
<EstanislaoStanis>
Tricks: I'm just trying to create variables with that word, not actually pass in a variable with the first argument of the add_command method.
Nies has joined #ruby
<Tricks>
EstanislaoStanis
<Tricks>
Use hashes
sepp2k has quit [Read error: Connection reset by peer]
<Tricks>
And then pass a string when doing add_command
saschagehlich has joined #ruby
<EstanislaoStanis>
Would you mind giving me an example too?
<Tricks>
Give me a sec, I'll type something up.
tcopp has quit [Quit: leaving]
schovi has quit [Remote host closed the connection]
<EstanislaoStanis>
Tricks: Is that the only way to do this that is simple. I'm just interested. My main goal is to make my_dungeon.add_command(name,"data") to work. I think I could do it with the code you showed me, but I'd have to have an extra argument for the key, and then I'd have to deal with the hash instead of just having the command out in the open. Thanks for your help so far!
milestone has quit [Quit: milestone]
jgarvey has quit [Quit: Leaving]
<EstanislaoStanis>
*simple?
<shevy>
hmm something must have changed... between 1.8.7 and 1.9.3
<shevy>
a script that works with 1.8.7, no longer returns the correct result in 1.9.3
<Tricks>
@EstanislaoStanis: why would you need an additional argument?
fserb has joined #ruby
Foxandxss has joined #ruby
friskd has quit [Ping timeout: 252 seconds]
<EstanislaoStanis>
What I mean is simply that I'd have to define a key and value, instead of just a variable name.
ph^ has quit [Ping timeout: 260 seconds]
<EstanislaoStanis>
I'm not lazy, I'm just trying to understand what's going on.
locriani has joined #ruby
milestone has joined #ruby
noganex has quit [Ping timeout: 252 seconds]
<Tricks>
I still don't understand.
friskd_ has quit [Ping timeout: 240 seconds]
<Tricks>
Wouldn't the "value" be your "data"
<Tricks>
You'd still have two arguments.
<Tricks>
Not three.
cantonic has joined #ruby
xnm has quit [Read error: Connection reset by peer]
banister_ has quit [Read error: Connection reset by peer]
bricker88 has quit [Quit: Leaving.]
mdw_ has quit [Ping timeout: 246 seconds]
siksia has quit [Ping timeout: 252 seconds]
billiamii has joined #ruby
dv310p3r has quit [Ping timeout: 252 seconds]
balki has quit [Ping timeout: 252 seconds]
brasten has quit [Quit: brasten]
ryan0x2 has quit [Ping timeout: 246 seconds]
phantasm66 has quit [Quit: *sleeeeep*]
<EstanislaoStanis>
Ok, my bad. Let me try this out. I guess part of my question still stands: Is this the only way to do this as simply. I guess it just feels a little strange that I have to use a hash all of the sudden when I'm just trying to pass the name of a variable I want to define. Could I do something like to_s then back to whatever an object name would be?
bahamas has left #ruby [#ruby]
PragCypher has quit [Read error: Operation timed out]
<Tricks>
@EstanislaoStanis: I honestly think it is the best and cleanest way to do what you want to do.
vitor-br has quit [Quit: Saindo]
banister_ has joined #ruby
tvw has joined #ruby
<EstanislaoStanis>
Ok, thanks! I really appreciate it.
<RubyPanther>
ibash: there basically "aren't" memory leaks, because you're not given low level stuff to build leaks out of. If you have a leak in a C extension, normally you would use gdb, etc normally
<RubyPanther>
There are mostly only issues of garbage collection, and the Ruby profiler should show those pretty well
<ibash>
RubyPanther: okay, that will help with determining where garbage is created?
<dsimon>
also i suppose it's possible that your app design leaves objects around that you are not interested in keeping
PragCypher has joined #ruby
kelseyhightower_ has joined #ruby
<dsimon>
GC can't delete what you haven't marked as garbage
<RubyPanther>
ibash: you just look for what type of object there are a zillion of and go from there :)
jimmy__ has joined #ruby
azm has quit [Ping timeout: 256 seconds]
PragCypher has quit [Remote host closed the connection]
<ibash>
RubyPanther: thanks
zx has quit [Ping timeout: 265 seconds]
kelseyhightower_ has quit [Ping timeout: 244 seconds]
milestone has quit [Quit: milestone]
tvw has quit [Remote host closed the connection]
freeayu has quit [Quit: 离开]
sako has quit [Ping timeout: 240 seconds]
milestone has joined #ruby
Apocalypse has quit [Ping timeout: 250 seconds]
clockwize has quit [Quit: clockwize]
Apocalypse has joined #ruby
robotmay has quit [Remote host closed the connection]
bier has quit [Read error: No route to host]
linusoleander has quit [Read error: Connection reset by peer]
shadoi1 has quit [Quit: Leaving.]
mayankkohaley has quit [Ping timeout: 240 seconds]
cantonic has quit [Quit: cantonic]
bier has joined #ruby
brngardner has joined #ruby
banjara has left #ruby [#ruby]
cousine has quit [Remote host closed the connection]
uris has quit [Quit: leaving]
cantonic has joined #ruby
milestone has quit [Quit: milestone]
rubycoder123 has joined #ruby
Enekoos has joined #ruby
stefanp has quit [Ping timeout: 265 seconds]
<rubycoder123>
Can anyone help me with error regarding installing ruby?
baroquebobcat has quit [Quit: baroquebobcat]
apok_ has joined #ruby
udante has quit [Quit: Leaving...]
joshman_ has quit [Ping timeout: 244 seconds]
paul__ has quit [Ping timeout: 250 seconds]
cantonic has quit [Ping timeout: 244 seconds]
<ibash>
RubyPanther: so I'm trying to use ruby-prof with rails, any good guides for that you know of?
joshman_ has joined #ruby
<ibash>
rubycoder123: what's the error?
andrewhl has quit [Remote host closed the connection]
<rubycoder123>
I installed normally, but had to sudo the rvm recommended curl command. I can find it. one sec
kelseyhightower has joined #ruby
piotr_ has quit [Remote host closed the connection]
<rubycoder123>
here it is, "curl -L get.rvm.io | bash -s stable," but I did "sudo curl -L get.rvm.io | sudo bash -s stable"
<ibash>
RubyPanther: doesn't really have that much on ruby prof...
<RubyPanther>
...
jimeh2 has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<ibash>
rubycoder123: you're running this on osx? what's the error you're getting?
<rubycoder123>
ibash: now I cannot change the ruby version to a default, and my ruby is in the odd location "/usr/local/rvm/rubies/ruby-1.9.2-p320/bin"
<ibash>
RubyPanther: or maybe I'm doing it wrong… every time I run it it errors out
Jake232 has quit [Quit: Computer has gone to sleep.]
<banister_>
RubyPanther: did u miss me
[Neurotic] has joined #ruby
<rubycoder123>
ibash: ruby also has trouble finding gems
fantazo has quit [Remote host closed the connection]
<ibash>
rubycoder123: did you reload rvm and all that?
kelseyhightower has quit [Ping timeout: 246 seconds]
siksia has quit [Ping timeout: 245 seconds]
balki_ is now known as balki
jimeh has quit [Ping timeout: 252 seconds]
<rubycoder123>
ibash: I did a hunt for everything ruby-related, deleted it, and then used "rvm implode," and removed the "etc/rvmrc" file.
rdesfo has left #ruby [#ruby]
MrGando has quit [Quit: Bye]
<rubycoder123>
ibash: I am running osx, 10.7.3.
siksia has joined #ruby
nu7hatch has left #ruby [#ruby]
Sheehan has quit [Quit: Sheehan]
cantonic has joined #ruby
carpediembaby has joined #ruby
<ibash>
rubycoder123: okay
atnight has quit [Quit: Computer has gone to sleep.]
cousine has joined #ruby
<ibash>
rubycoder123: did this? source ~/.rvm/scripts/rvm
<rubycoder123>
ibash: that returned the error "No such file or directory" (I'm trying to install it globally)
<godzirra>
hey guys. Does anyone here use Guard? I'm trying to use it with growl, and I don't get any notifications, nor does it automatically re-run the tests when I save the spec file. What am I doing wrong?
PragCypher has joined #ruby
<ibash>
godzirra: you're doing it wrong
<ibash>
:p
<godzirra>
Obviously. :)
<ibash>
but seriously, did you install the growl dependencies?
<ibash>
I haven't used it w/ growl myself...
<godzirra>
I have growl installed. I didn't realize there was another dependency. Looking.
<rubycoder123>
bash: ok, let me implode, remove /etc/rvmrc, and then run that.
hasrb has quit [Remote host closed the connection]
td123 has quit [Read error: Connection reset by peer]
<robacarp>
godzirra: as for it not running when you save a spec, your guardfile probably needs modification
<ibash>
I got 99 probe and ruby prof is one
fserb has quit [Quit: ttyl]
<rubycoder123>
ibash: it will complete in ~5min
td123 has joined #ruby
<godzirra>
Hrm. I can't find growlnotify.
<robacarp>
godzirra: see my link to the documentation for growl
<godzirra>
robacarp: Really? It runs the tests correctly. Let me read up more on the docs I guess.
<godzirra>
Thanks ibash, I missed it
<rubycoder123>
ibash: oh wow, it's already done.
<dsimon>
ibash, i got 99 probes and Cassini-Huygens is one
<ibash>
:D
daniel_hinojosa has quit [Ping timeout: 256 seconds]
simao has joined #ruby
MrGando has quit [Quit: Bye]
PragCypher has quit [Ping timeout: 246 seconds]
zeromodu_ has quit [Remote host closed the connection]
kenichi has quit [Remote host closed the connection]
<rubycoder123>
ibash: it's complete.
<rubycoder123>
ibash: rvm instructs me to "First you need to add all users that will be using rvm to 'rvm' group, and logout - login again, anyone using rvm will be operating with `umask g+w`." and then to To start using RVM you need to run `source /etc/profile.d/rvm.sh`"
azm has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
AlbireoX`Laptop has joined #ruby
Chryson has joined #ruby
PragCypher has joined #ruby
<ibash>
rubycoder123: dooooo ittttt
jimmy__ has quit [Ping timeout: 252 seconds]
simao has quit [Ping timeout: 265 seconds]
<ibash>
rubycoder123: sudo adduser <your user name> rvm
Ripp___ has joined #ruby
<ibash>
or maybe that's an ubuntu command...
<ibash>
rubycoder123: sudo dseditgroup -o edit -a usernametoadd -t user rvm
Ripp__ has quit [Ping timeout: 245 seconds]
mvangal__ has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
Tomasso has joined #ruby
<rubycoder123>
for the first, bash didn't find the command adducer, and for the second, "Record was not found."
<rubycoder123>
ibash: see above
weasels has joined #ruby
weasels has quit [Client Quit]
<ibash>
you replace usernametoadd?
<ibash>
replaced* rubycoder123
<ibash>
hmm
maccosmo_ has joined #ruby
fivetwentysix has joined #ruby
dwaynecrooks has joined #ruby
maccosmo has quit [Ping timeout: 265 seconds]
maccosmo_ is now known as maccosmo
xaq has quit [Remote host closed the connection]
borys_b_timakov has quit [Remote host closed the connection]