<Spooner>
Fighterr: require 'rubygems' # before other gems, if on 1.8.7
<Fighterr>
Spooner : It's working , thanQ
<Spooner>
Fighterr: Perhaps an odd question, but why start using Ruby 1.8.7 rather than 1.9.2? I can understand why people stay on 1.8.7, because of legacy code.
<zenspider>
because it works better
<Spooner>
It does? Even after all this time?
<zenspider>
what does time have to do with it?
<zenspider>
Stalkr_: I'd prolly poke at something like imagemagick/rmagick or ffmpeg... prolly the latter first because imagemagick is such a bitch to deal with
<zenspider>
omg... graphviz is STILL rendering :(
Nisstyre has joined #ruby-lang
<Spooner>
Well, I wouldn't recommend 1.9.3 to anyone, because it is not mature, but 1.9.2 is hardly bleeding edge.
<Stalkr_>
ffmpeg with Ruby or how? Not sure what it is
<Fighterr>
Spooner : in my case , my ec2's instance provides 1.8.7 by yum installer...
<Spooner>
Ah, I was wondering if it was the OSX having 1.8.7 bundled in. Yeah, I guess that makes sense.
<zenspider>
I still use stock ruby on my mac... works great.
<Spooner>
(That is, in making distribution to non-ruby people easier, rather than a boon for the developer directly).
<zenspider>
I only use 1.9.x for compatibility testing
takaokouji has joined #ruby-lang
<Spooner>
I must admit that 1.9.2 load times were a joke on Windows, so I am incredibly thankful for 1.9.3 and probably should have used 1.8.7 longer myself :)
<zenspider>
or not used windows...
<Spooner>
I did run tests in my Linux VM because even in a VM they were faster :)
rushed_ has joined #ruby-lang
havenn has joined #ruby-lang
ec2-user has joined #ruby-lang
jtoy has joined #ruby-lang
<WillMarshall>
Anyone know where I can learn in more detail about the execution order of include, extend and the Class callbacks in Ruby?
<WillMarshall>
I'm trying to learn how to be clever with dynamically loaded modules at runtime, I've got everything working fine but I'd like to solidify my understanding of exactly how it all works
jakko has joined #ruby-lang
tyfighter has joined #ruby-lang
neoesque has joined #ruby-lang
<zenspider>
WillMarshall: execution order?
<WillMarshall>
zenspider: What get included when where
srbaker has joined #ruby-lang
<WillMarshall>
Which order the callbacks run, etc
<WillMarshall>
e.g. if I'm dynamically creating classes and assigning them to constants, which callbacks will let me access the class_name and which won't?
<injekt>
throw some statements in the hook methods?
<zenspider>
include is just a method call. so it happens when it happens...
<zenspider>
assignment (lhs = rhs) requires rhs to be defined, and the inherited callback happens when something is inherited, so assignment won't have happened yet
twittard has joined #ruby-lang
<zenspider>
there's very little magic involved ... it should be pretty straight-forward top-to-bottom evaluation
<zenspider>
minitest 2.11.2 released
<injekt>
changes!
<zenspider>
I love my release process
<zenspider>
takes ~2 minutes to prep the history, bump, commit, package, push, push doco, announce to blog, and announce to email
<injekt>
yeah, mine just doesn't do the announcements is what i mean
<injekt>
ala boring
<zenspider>
put that in the history file, update my VERSION const, commit, rake release VERSION=newversion
<andrewvos>
oh hai
neoesque has joined #ruby-lang
<injekt>
o/
srbaker has joined #ruby-lang
<andrewvos>
\o
<andrewvos>
injekt: Your idea for that songs site has resulted in more amazing music than I ever could have imagined, by the way.
<injekt>
<3
<andrewvos>
You have made my life a lot better. Well played Sir.
<schlecht>
injekt is pure genius.
<andrewvos>
Indeed
cored has joined #ruby-lang
cored has joined #ruby-lang
<cored>
hello all
<cored>
I have a question
<cored>
how can I opening a class and over writting a method on that class
lightcap has joined #ruby-lang
<cored>
call the old implementation the default one before my implementation?
<andrewvos>
class Bla; def method; end;end;
<andrewvos>
cored: ^^^^
<injekt>
cored: use a method lias
<injekt>
alias
<cored>
yes
<cored>
that's the anser
<cored>
injekt: thanks
<injekt>
sure
<injekt>
andrewvos: so, lots and lots of toonz?
<andrewvos>
injekt: YES
<injekt>
:D
<andrewvos>
Heard some weird new bands. Tomorrow I'm going to give a lot of my friends commit rights and see what happens. Mostly it will be lemonparty I think, but I'm sure some good songs will be added :)
<injekt>
lol
<andrewvos>
heh
<andrewvos>
Ok night everyone
<cored>
don't see the need of this
<cored>
I'm starting to think to compose behaviour from a module is way better
<andrewvos>
cored: The need of what?
<cored>
I mean for my implementation sorry
<andrewvos>
SOLID
<cored>
it doesn't look right to open a class
<andrewvos>
cored: ^^
<injekt>
it's usually not
<andrewvos>
Yeah what he said
<andrewvos>
Ok not getting dragged into everything
<andrewvos>
Night xx
<schlecht>
andrewvos: code
<injekt>
andrewvos: gn!
<andrewvos>
schlecht: huh?
<injekt>
he's saying dont sleep
<injekt>
code
<schlecht>
No I'm not
<injekt>
no he's not
<andrewvos>
he's not
<injekt>
but i am
<injekt>
!
<schlecht>
20:27 < andrewvos> You have made my life a lot better. Well played Sir.
<andrewvos>
hehe
<schlecht>
code to whatever that's referring to.
<andrewvos>
schlecht: What's your point brohan sebastian bach
<andrewvos>
schlecht: fuckingawesomesongs.com
<schlecht>
Goodnight then.
<andrewvos>
schlecht: Submit a cool song in a pull request = permanent commit rights
<schlecht>
That's PG18.
<andrewvos>
New rule
<schlecht>
I hate git.
<andrewvos>
Ok night
<injekt>
git <3
<andrewvos>
schlecht: AHHH NOOO GIT IS LOVELY
<injekt>
andrewvos: you suck at sleep, might as well give up
<andrewvos>
:(
<zenspider>
schlecht: yay!
<injekt>
I have!
Dreamer3 has joined #ruby-lang
<schlecht>
Can I put Pimp C ?
<injekt>
zenspider: nooo
<andrewvos>
Have to do an interview tomorrow though
<injekt>
i dont speak to many london based rubyists so usually remember when I do :)
looopy has joined #ruby-lang
<andrewvos>
schlecht: I seem to remember denying that pull request :|
<andrewvos>
injekt: You're in london
<andrewvos>
?
<schlecht>
andrewvos: For Pimp C or Dream Theater?
<andrewvos>
schlecht: Dream Theater
<injekt>
andrewvos: not right now, but I come from london and spend most of my time there
<schlecht>
andrewvos: Ah, not my sort of music anyway.
<injekt>
andrewvos: I live in basingstoke right now, until I head to canada again (possible)
<deryl>
thus the k for the c
* deryl
runs
kurko_ has joined #ruby-lang
<andrewvos>
injekt: Ok well if you're looking to do some ruby it would be nice to work with you (probably). Msg me :)
<andrewvos>
Anyway, I'm really leaving now.. Night everyone x
<injekt>
andrewvos: you do much ruby at bbc? oO
<injekt>
psh
<epitron>
hey, i'm trying to do somethign sneaky, and i'm too tired to figure it out. :) I wanted to make Proc#* repeatedly apply a proc to itself.... similar to object.method.method.method.method
<ec2-user>
i got some warning messages when i execute ruby
<ec2-user>
injekt : Warning: multi_json is using default ok_json engine. Suggested action: require and load an appropriate JSON│ quit [Ping timeout: 245 seconds] │01:54 < �ϴ���> 아.. 작년지진때 library.
Luxx_ has joined #ruby-lang
<ec2-user>
inkekt : i wonder thatwhy this message is appeared ?
<schlecht>
gem install json
chessguy has joined #ruby-lang
ahs3- has joined #ruby-lang
<ec2-user>
schlencht : and then ?
<injekt>
try try again
<schlecht>
ec2-user: quit irc.
lordofth1dance has joined #ruby-lang
<ec2-user>
schlecht : is that a joke ?
<schlecht>
It requires you to install drivers this way.
<ec2-user>
but the warning is about load library , not just installing
<schlecht>
You need to install it to load it, silly.
<schlecht>
The only way to install drivers is to reboot your machine.
<schlecht>
So you need to quit irc.
<ec2-user>
r u kidding me ?
<schlecht>
Nope
<schlecht>
It's all in the stuxnet headers.
<zenspider>
schlecht: try not to be too much of an asshole
<ec2-user>
to install by gem is not involved rebooting
<schlecht>
ec2-user: Then stop asking silly questions, and install the gem.
BadQuanta has joined #ruby-lang
<ec2-user>
schlecht : u r really man
<chessguy>
ec2-user: that's what she said
<zenspider>
ec2-user: installing the gem is the correct answer.
<injekt>
+1 for installing the gem
dous has joined #ruby-lang
<chessguy>
hey, why don't you try installing the gem? ( i have no idea what you guys are talkign about)
<ec2-user>
but i don't need to reboot my machine
<injekt>
what does this have to do with rebooting?
<injekt>
did you install the gem?
<schlecht>
Probably not.
<ec2-user>
yes
<injekt>
and did you run it again?
<ec2-user>
no..
<ec2-user>
yet installing
<injekt>
so... run it again?
<ec2-user>
my ec instance speed is suck
<schlecht>
I managed to fully confuse this person beyond reasonable doubt.
<schlecht>
I feel slightly guilty.
bglusman has joined #ruby-lang
<ec2-user>
schlecht : hey , cheer up
<schlecht>
Guilt gone.
<ec2-user>
um.....
<ec2-user>
i thinkt that the gem's server(") is pretty slow
<ec2-user>
schlecht : may i get the reason from you ?
kurko_ has quit ["Saindo"]
<schlecht>
Huh?
<schlecht>
Wed Feb 15 04:17:30 EET 2012
Heimidal has joined #ruby-lang
<schlecht>
Night.
<ec2-user>
schlecht : you in germany ?
<schlecht>
Yes, Germany is EET.
<ec2-user>
schlecht : i'm sorry that here is in south korean
<ec2-user>
schlecht : in the daytime
<ec2-user>
installing still continue
havenn has joined #ruby-lang
achiu has joined #ruby-lang
SuperTaz_work has joined #ruby-lang
seanstickle has joined #ruby-lang
srbaker has joined #ruby-lang
MistyM_ has joined #ruby-lang
chimkan_ has joined #ruby-lang
oddmunds_ has joined #ruby-lang
srbaker has joined #ruby-lang
tomzx has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
fayimora_ has joined #ruby-lang
uniqanomaly has joined #ruby-lang
hagebake has joined #ruby-lang
hagebake has joined #ruby-lang
chimkan has joined #ruby-lang
<slyphon>
soo sinatra, yeah?
<slyphon>
'/foo/:bar/baz/:spam' doesn't seem to parse out like how i think it should
hagebake_ has joined #ruby-lang
havenn has joined #ruby-lang
HW42_ has joined #ruby-lang
havenn has joined #ruby-lang
chimkan has joined #ruby-lang
kp666 has joined #ruby-lang
<jtoy>
is there a safe way to get the name of the current method I am in?
elux has joined #ruby-lang
erpuds has joined #ruby-lang
guns has joined #ruby-lang
sinuc has joined #ruby-lang
sinuc has joined #ruby-lang
rippa has joined #ruby-lang
hagebake has joined #ruby-lang
xjiujiu has joined #ruby-lang
Karmaon has joined #ruby-lang
scyrmion has joined #ruby-lang
kke has joined #ruby-lang
nacengineer has joined #ruby-lang
yfeldblum has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
dv310p3r has joined #ruby-lang
werwolf has joined #ruby-lang
Luxx_ has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
jorgenpt has joined #ruby-lang
corsican has joined #ruby-lang
havenn has joined #ruby-lang
gokul has joined #ruby-lang
twittard has joined #ruby-lang
sideshownz has joined #ruby-lang
anthony has joined #ruby-lang
hagebake has joined #ruby-lang
achamian has joined #ruby-lang
srbartlett has joined #ruby-lang
robbyoconnor has joined #ruby-lang
macmartine has joined #ruby-lang
<zenspider>
jtoy: why would you want to do that?
<jtoy>
zenspider: i am using your mintiest :) with vcr, so every single one of my tests consists of def test_long_name; VCR(same_name_as_test_name) do ….end; end
<jtoy>
I'm getting sick of writing the name twice for every test
<zenspider>
get a better editor?
<erikh>
maaaaacrroooooooos
<zenspider>
tho in the case like that, you can use minitest
<zenspider>
__name__ is the name of your test
<erikh>
oh that's hot
<zenspider>
but really... get a better editor :P
wyhaines has joined #ruby-lang
<jtoy>
zenspider: yeah, i could do completion too, I'm using vim, hard to beat that :) but i'll use __name__ for now
<jtoy>
thx!
MistyM_ has joined #ruby-lang
<zenspider>
emacs beats it :P
<rippa>
functional programming in javascript is painfuk
<rippa>
*l
<rippa>
*ck
<zenspider>
haha
<zenspider>
both
<erikh>
painfuck: purely functional bf
hagebake_ has joined #ruby-lang
brownies has joined #ruby-lang
<hagebake_>
rippa: why do you say that? in javascript function programming doesn't make the syntax worse than it is usually, but in ruby, if you want to pass multiple functions or one not as the last paramter, you get ugly-looking code.
Heimidal has joined #ruby-lang
<rippa>
in JS syntax is already ugly
<rippa>
and passing functions requires even more of it
hagabaka has joined #ruby-lang
<hagabaka>
but the ugliness doesn't result from functional programming
<hagabaka>
in ruby if you wanted to pass two anonymous functions in a function call, you would have to either wrap do...end in parentheses, or enclose a multi-line block with { }, which is uglier than "normal" ruby code or javascript
<rippa>
how is that uglier than javascript?
<rippa>
it alreade uses {} for all blocks
gja has joined #ruby-lang
znz_jp has joined #ruby-lang
gja has joined #ruby-lang
<zenspider>
hagabaka: in other words, if you want to bypass ruby's syntax for a single block pass, you have to make the code look like javascript?
tejas has joined #ruby-lang
sinuc has joined #ruby-lang
<hagabaka>
worse than javascript
tejas has quit [#ruby-lang]
<hagabaka>
since it's inconsistent with regular ruby syntax
<zenspider>
saying lambda {} is basically the same as function () {}
gja has joined #ruby-lang
<rippa>
puts(lambda {1}, lambda {2})
<rippa>
looks fine to me
<zenspider>
lambda {} is not inconsistant with ruby's syntax considering it IS ruby's syntax (well... api, really)
gja has joined #ruby-lang
gja has joined #ruby-lang
<hagabaka>
I'm not talking about the use of {} itself, but the inconsistency
<rippa>
where?
gja has joined #ruby-lang
gja has joined #ruby-lang
<rippa>
you always pass anonymous function with lambda {} or Proc.new {}
<hagabaka>
of course it's *valid* ruby, but it's ugly since usually multi-line blocks would be in do..end instead of {}
<rippa>
hagabaka: that's your preference
<zenspider>
I was just about to say that
<zenspider>
I don't have that rule... you do
<zenspider>
I use the weirich method... works much better for me
<hagabaka>
well if you don't follow certain style guidelines, nothing stops ruby from being uglier than javascript, whether there's functional programming involved
<hagabaka>
what I mean is basically that if you program in javascript in the first place, { } and ; are already a given. javascript with functional programming looks about the same as without it
<hagabaka>
and other than syntax, I don't see what to complain about javascript regarding functional programming either
X99 has joined #ruby-lang
sinuc has joined #ruby-lang
<zenspider>
hrm... doesn't work :( words.with_index.each_cons(2) do |(a, ia), (b, ib)|
<zenspider>
what's a good way to do that?
<zenspider>
rippa: fwiw... I totally agree
<rippa>
zenspider: each_with_index
<rippa>
with_index is for enumerators only
X99 has joined #ruby-lang
<WillMarshall>
How can I get the child classes of a parent class?
<shevy>
'"I thought of objects being like biological cells and/or individual computers on a network, only able to communicate with messages" --Alan Kay, creator of Smalltalk, on the meaning of "object oriented programming"'
<shevy>
he is right!
<shevy>
of course every cell needs to be organized like a mini-CPU too (with its "genome" and one needs to have the ability to modify this "genome" at run-time)
Asher1 has joined #ruby-lang
jakko has joined #ruby-lang
beiter has joined #ruby-lang
havenn has joined #ruby-lang
banistergalaxy_ has joined #ruby-lang
krz has joined #ruby-lang
krz has joined #ruby-lang
<banistergalaxy_>
hey frens
<judofyr>
hey banistergalaxy_
<judofyr>
you're galaxy today?
fayimora has joined #ruby-lang
<banistergalaxy_>
judofyr: fo shizzle, banisterfiend is banned
<banistergalaxy_>
;)
<judofyr>
huh?
<shevy>
still???
<banistergalaxy_>
yeah
<shevy>
one thing to have in common with RubyPanther!
<shevy>
:>
<banistergalaxy_>
haha yeah i guess
<banistergalaxy_>
judofyr: wat up
bow777 has joined #ruby-lang
<bow777>
56421
<bow777>
hi there
bow777 has quit [#ruby-lang]
<shevy>
that's an odd way to count
achamian has joined #ruby-lang
krz has joined #ruby-lang
HW42 has joined #ruby-lang
roadkith has joined #ruby-lang
toretore has joined #ruby-lang
CodeBlock has joined #ruby-lang
chimkan__ has joined #ruby-lang
chimkan__ has joined #ruby-lang
Stalkr_ has joined #ruby-lang
Defusal_ has joined #ruby-lang
Karmaon has joined #ruby-lang
wyhaines has joined #ruby-lang
Stalkr_ has joined #ruby-lang
tekin has joined #ruby-lang
spuk has joined #ruby-lang
Fullmoon has joined #ruby-lang
roadkith has joined #ruby-lang
senthil has joined #ruby-lang
jakko_ has joined #ruby-lang
mark_locklear has joined #ruby-lang
tomzx has joined #ruby-lang
ryez has joined #ruby-lang
yalue has joined #ruby-lang
jxie has joined #ruby-lang
jxie has joined #ruby-lang
MistyM_ has joined #ruby-lang
havenn has joined #ruby-lang
Spooner has joined #ruby-lang
dmathieu has joined #ruby-lang
tekin has joined #ruby-lang
codewrangler has joined #ruby-lang
fritzek has joined #ruby-lang
judofyr has joined #ruby-lang
MistyM_ has joined #ruby-lang
fritzek_ has joined #ruby-lang
fayimora has joined #ruby-lang
fritzek_ has joined #ruby-lang
Sailias has joined #ruby-lang
yfeldblum has joined #ruby-lang
divoxx has joined #ruby-lang
dfr|mac has joined #ruby-lang
robbrit has joined #ruby-lang
Oloryn_lt1 has joined #ruby-lang
tekin has joined #ruby-lang
looopy has joined #ruby-lang
Xzyx987X has joined #ruby-lang
jtoy has joined #ruby-lang
malev has joined #ruby-lang
Indian has joined #ruby-lang
bglusman has joined #ruby-lang
malev has joined #ruby-lang
<ryez>
so silent here today? because v-day was too exaustive?
<ryez>
it's cool to see how the changing code affects the thing being created
amerine has joined #ruby-lang
fayimora has joined #ruby-lang
<ryez>
yes, that's something myself never thought about
<ryez>
kind of ahha moment
krz has joined #ruby-lang
sternicus has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
Daerun has joined #ruby-lang
<robbrit>
ryez: the shame is those tools aren't real
Austin__ has joined #ruby-lang
<ryez>
probably true, anyway the idea is delivered clearly
<robbrit>
yeah it'd be really sweet to have something like that
dcheung has joined #ruby-lang
fayimora has joined #ruby-lang
Asher has joined #ruby-lang
slyphon has joined #ruby-lang
spuk has joined #ruby-lang
<ryez>
the idea almost perfectly explains why, in my current organization, people were still doing manual testing (for a long time) on some data transforming programs, because there's no tool for people to generate proper input data in an intuitive way,
outoftime has joined #ruby-lang
rippa has joined #ruby-lang
<ryez>
we need to create a tool to generate emulative data, in a quick and intuitive way
<andkerosine>
Criticisms would be much appreciated.
banderson623 has joined #ruby-lang
* jaimef
looks for a way to compare changes to a json structure.
<andkerosine>
Hm?
<andrewvos>
jaimef: If you find a nice way, please msg me ;)
<jaimef>
saving ohai.all_plugins in json to track state on servers, and was looking for a way to compare.
curtism has joined #ruby-lang
<jaimef>
is there a structure more suitable? yaml?
brian_anderson has joined #ruby-lang
voker57 has joined #ruby-lang
nacengineer has joined #ruby-lang
cyri_ has joined #ruby-lang
jensen_ has joined #ruby-lang
<erikh>
there's a structural diff util in activesupport
<erikh>
I can't remember what the require/class name is though
<erikh>
it's not hard to write your own though
MarkDBlackwell has joined #ruby-lang
rushed has joined #ruby-lang
lightcap has joined #ruby-lang
<MarkDBlackwell>
A weird thing is happening, which I don't remember before (and it works fine without `print'): ruby -e"print ([1,2].each do end)" is giving me, `syntax error, unexpected keyword_do_block, expecting ')' '. BTW, this happens on two systems, on Ruby 1.8.6-p0, 1.8.7-p357, 1.9.2-p290 and 1.9.3-p0. Two sets of parentheses makes it work! print (([1,2].each do end)) But, why?
lake has joined #ruby-lang
Sailias has joined #ruby-lang
a1ph4g33k has joined #ruby-lang
andkerosine has quit [#ruby-lang]
nacengineer has joined #ruby-lang
dejongge has joined #ruby-lang
<manveru>
MarkDBlackwell: because you got a space between print and (
<uniqanomaly>
no
<uniqanomaly>
print ([1,2].each{}) does work
<manveru>
so does print([1,2].each do end)
<uniqanomaly>
with space
<manveru>
yeah, because {} has higher precedence
<uniqanomaly>
ok
<manveru>
if you say print (, then ruby will think that you pass only one argument
<MarkDBlackwell>
manveru, you are *so* right! Thank you. :)
<manveru>
compare p(1,2,3) to p (1,2,3)
patant has joined #ruby-lang
yxhvuud has joined #ruby-lang
<manveru>
no idea why people like to put spaces around those parethesis
<manveru>
writing 'foo ()' and 'foo { | bar | }' and the like...
leonL has joined #ruby-lang
* manveru
hides from the flame war
<chris2>
hehe
<rippa>
I write "foo(" but "foo {"
<chris2>
yeah
leonL_ has joined #ruby-lang
<rippa>
probably for consistency
<MarkDBlackwell>
manveru, I don't like to put spaces before parentheses, but I wrongly had print,p,puts as a special (syntax) case--wrongly not thinking of them as methods; thanks again.
<rippa>
so both "foo {" and "foo do" have a space
Mchl has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
<erikh>
i like it for if/while/until/etc
<erikh>
nice for complex conditionals.
MarkDBlackwell has quit [#ruby-lang]
danielvdotcom has joined #ruby-lang
<andrewvos>
Hmmm
<andrewvos>
Is there any way to get around $SAFE ?
<erikh>
no
<andrewvos>
$SAFE=1 more like
<andrewvos>
Damnit
<andrewvos>
Net http is crapping out when I try to request a url
<andrewvos>
And I can't disable safe
<erikh>
well, I think there are a few techniques but you should avoid walking around it
<andrewvos>
erikh: It's for a bot
<andrewvos>
rbot to be exact
dejongge has joined #ruby-lang
<erikh>
on both counts drbrain is probably your guy
<erikh>
fwiw, $SAFE is designed to only increase and allow less and less operations per increment
<andrewvos>
drbrain: Thoughts on getting around SAFE=1 when doing a net/http request. I'm getting "Insecure operation - initialize" :(
<erikh>
iow, the whole point is that you can't step around it
<andkerosine>
I'm passing an absolute path to a local file to require, and it's still loading the one from rvm/gems. How to prevent this?
Phlogistique has joined #ruby-lang
robbrit has quit [#ruby-lang]
<jaimef>
hmm mash
<outoftime>
andkerosine: paste in the require line?
dfr|mac has joined #ruby-lang
<andkerosine>
It's an absolute path, I can assure you. : )
erpuds has joined #ruby-lang
<burgestrand>
andkerosine: if it’s an absolute path it loads the file at the absolute path; it might be that that file loads something else however
<drbrain>
andkerosine: ruby 1.9 will load both
<andkerosine>
Well, I have my gem installed locally, but I'd now like to tinker with it, preferably without having to uninstall it.
<outoftime>
andkerosine: are you using bundler?
<andkerosine>
Emptying $: doesn't work, just breaks other stuff.
<drbrain>
andkerosine: ruby -I lib
<drbrain>
andkerosine: -I takes precedence over rubygems
Sailias has joined #ruby-lang
jamw has joined #ruby-lang
Fullmoon_ has joined #ruby-lang
srbartlett has joined #ruby-lang
<S1kx>
i'm experiencing extremely high cpu utilization with rbenv + jruby 1.6.6 + celerity, is this a known problem? using 100% on both cores for 30 secs for just opening a site
mikeric has joined #ruby-lang
<headius>
it's because jruby's so fast
<headius>
USE ALL THE CORES
<headius>
I have not heard such a report for jruby alone, so perhaps something in celerity is odd
<whitequark>
Y U NO LEAVE SOME CPUS TO THE OS JRUBY?
<S1kx>
i wish i didnt have to use jruby
<S1kx>
then i wouldnt have had to change like 50% of my code either >:|
<S1kx>
but its the only way to run htmlunit right now
<whitequark>
S1kx: that most probably means you have bad code in the first place
<whitequark>
good code doesn't break even with 1.8->1.9 transition, much less mri->jruby.
<headius>
S1kx: I don't really know how celerity works
<S1kx>
no it means I am using the new hash syntax for example, which even jruby 1.6.6 doesnt support yet
<whitequark>
S1kx: jruby --1.9
<headius>
I hope you didn't change a bunch of 1.9 code because you didn't know the --1.9 flag
<S1kx>
^
<S1kx>
thanks, didn't know about that
<whitequark>
have you tried, like, reading documentation?
<S1kx>
last time I used jruby there was no 1.9 support at all, so no in this case, no.
<headius>
it will be nice when we're just 1.9 mode by default
<S1kx>
i suppoes it must be something with the general java settings on my vm
<a1ph4g33k>
headius: isn't that coming with 1.7 ?
<a1ph4g33k>
( btw ... thank you for jruby ... it's good stuff )
looopy has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
<headius>
a1ph4g33k: yeah...master is already 1.9 by default
<headius>
I keep forgetting when I'm fixing 1.6 bugs
srbartle_ has joined #ruby-lang
havenn has joined #ruby-lang
razu_ has joined #ruby-lang
razu_ has quit [#ruby-lang]
razumasu has joined #ruby-lang
loincloth has quit [#ruby-lang]
eggman2001 has joined #ruby-lang
<mrb_bk>
anyone here know anything about compiling kgio/unicorn on centos6?
<eggman2001>
I have two strings that appear to be identical but str1 == str2 #=> false and I don't know why
<mrb_bk>
getting a conflict with double definition of RUBY_UBF_IO
<a1ph4g33k>
eggman2001: whitespace differences?
<eggman2001>
both have the same size
<eggman2001>
and I don't see any differences in whitespace
<a1ph4g33k>
which version of ruby?
<eggman2001>
they both have just one space
<eggman2001>
1.9.2
<drbrain>
eggman2001: encoding
<eggman2001>
same encoding. str1.encoding == str2.encoding #=> true
<andkerosine>
Instead of bothering with closing some methods off, I'm just trusting that the user won't call nonsense methods and including all of the actions for each object. Looks cleaner, feels nicer, but I hate how redundant that looks.
<andkerosine>
Can classes like those be declared inside of an iterator?
<drbrain>
andkerosine: I think this look great
<andkerosine>
Fuck yes!
<andkerosine>
Thank you, kind sir.
<andkerosine>
Really does mean more than that exclamation might imply.
<drbrain>
andkerosine: you can add metaprogramming to create initialize, but I don't think it's worth it
<drbrain>
this is straightforward and easy to read
<drbrain>
adding metaprogramming would save three lines per class at the cost of 5-10 lines that are harder to read
<andkerosine>
As should perhaps be expected given that it's built on your library. : )
<andkerosine>
Fair enough.
<drbrain>
nice: uri = URI(Paths[:"#{@kind}_about"] % @name)
<drbrain>
andkerosine: do you know about unless?
<drbrain>
if ! is the same as unless
<andkerosine>
Mm-hmm. It's just the first language I've used to have that keyword, so it hasn't stuck yet.
<andkerosine>
Definitely an improvement in terms of readability.
slaytanic has joined #ruby-lang
<drbrain>
IMO, consistency is more important, especially if you're learning
<eggman2001>
if I pull a string for a external source, how does something like "foo" with encoding of UTF-8 end up with a bytesize of 4?
<drbrain>
eggman2001: what are the bytes?
<drbrain>
eggman2001: there's multiple "o" and "f" code points and a non-breaking space
SuperTaz_work has joined #ruby-lang
<eggman2001>
drbrain: to be more exact, the str = "Q4 2011" and str.bytes.to_a = [81, 52, 194, 160, 50, 48, 49, 49]
<drbrain>
(although I think the byte size would be > 4 if a non-breaking space were present)
h4y4shi_ has joined #ruby-lang
<drbrain>
eggman2001: it's the space
<shevy>
I hate shell scripts :(
<eggman2001>
drbrain: I'm trying to understand how this happens? I got the string using nokogiri
<drbrain>
eggman2001: [194, 160] is the UTF-8 code point C2 A0 and the unicode NO-BREAK SPACE
<drbrain>
eggman2001: then it's a no-break space in the source document
<drbrain>
possibly
<drbrain>
for UTF-8 output, matches \u00A0
<drbrain>
so that's the character you get
<drbrain>
eggman2001: you can transcode to ISO-8859-1
<drbrain>
str.encode Encoding::ISO_8859_1
<eggman2001>
ahh I see. and \u00A0 is the UTF-8 code point C2 A0, hence the 2 bytes?
<drbrain>
yes
<drbrain>
if you're on a Mac the Character Viewer can let you browse unicode codepoints
<eggman2001>
it's generally preferable to work in utf8 as opposed to ISO-8859-1 though right?
<eggman2001>
i'm using a pc and ubuntu
<drbrain>
I'd say yes to that
<eggman2001>
very helpful. thanks!
<drbrain>
if you're trying to perform string matching there are unicode extensions to regexp
<drbrain>
\s will match an ASCII space, but not a no-break space
<S1kx>
seems like its nothing in ruby then
<drbrain>
[[:space:]] will match any unicode Whitespace character
<drbrain>
or \p{Space}
bglusman has joined #ruby-lang
rasmus_ has joined #ruby-lang
postmodern has joined #ruby-lang
<postmodern>
memos
<eggman2001>
I see that the source code is "Q4 2011" as suspected. But how would I get the to be replaced with a single space?
razumasu has joined #ruby-lang
<drbrain>
a regular space?
<eggman2001>
yes
<drbrain>
str.gsub(/\p{Blank}/, ' ')
<drbrain>
or if you want to collapse multiple spaces
<drbrain>
str.gsub(/\p{Blank}+/, ' ')
<drbrain>
if you want to include newlines, carriage returns, etc. use \p{Space}
H2H has joined #ruby-lang
<eggman2001>
gotcha. thanks!
Cherrum has joined #ruby-lang
petercooper has joined #ruby-lang
Sailias has joined #ruby-lang
hhatch has joined #ruby-lang
<razumasu>
Just started testing out Ruby and finding it great fun, but i have a (noob) question. When doing stuff in the irb console, is it possible to somehow save the sessions work you've done in a file?
<andkerosine>
razumasu: No, but get yourself a proper editor that can execute code directly and you're set. : )
<razumasu>
I've picked up Rubymine, but i was just wondering if it was possible through the irb console (because it's so fun to use!). But thanks for the answer! :-)
<erikh>
you could always wrap irb, but it's probably more trouble than it's worth.
<injekt>
hmm
<razumasu>
Yeah :-) I am just testing out the language, coming from C# and .net. Just got pretty hooked by the irb way of testing things out :-)
<injekt>
I would personally recommend against using an IDE for writing ruby
dfr|mac has joined #ruby-lang
Carnage\ has joined #ruby-lang
fayimora has joined #ruby-lang
yfeldblum has joined #ruby-lang
<zenspider>
meh. IDEs are fine for newbs
<erikh>
I don't always wrap irb, but when I do I do it with eventmachine
<erikh>
true story
<zenspider>
razumasu: you can turn on irb history tho... that way you can search through it / reuse lines etc... but irb doesn't have a persistent state like smalltalk or lisp does
kyrylo has joined #ruby-lang
burgestrand has joined #ruby-lang
tedwing has joined #ruby-lang
<tedwing>
Does anyone have experience compiling Ruby 1.9.3p0 on Mac OS X 10.4 Tiger?
<tedwing>
I'm getting an error
<tedwing>
Or perhaps is there a preferred version of gcc that I should be using?
<drbrain>
tedwing: what error?
leonL has joined #ruby-lang
<drbrain>
I can make guesses
<tedwing>
process.c:4110: error: implicit declaration of function 'ruby_setreuid'