<whitequark>
you could say that directories are "namespaces", and thus require_relative searches the "current" namespace instead of "global"
arBmind has quit [Ping timeout: 244 seconds]
<yxhuvud>
how I dislike projects that keep to one file.
kyb3r_ has quit [Ping timeout: 240 seconds]
kyb3r_ has joined #ruby-lang
cornerman has quit [Ping timeout: 258 seconds]
cornerma1 is now known as cornerman
<apeiros_>
whitequark: and why would you also concern yourself with how a library is distributed? you pile up concerns that really do not matter to what your library does.
<centrx>
ActiveSupport::Concerns?
<centrx>
jk HO HO HO!
<whitequark>
apeiros_: because I don't write abstract libraries in vacuum.
<apeiros_>
whitequark: I didn't say you do. but that's a false dichotomy.
<whitequark>
can you explain why you eschew one filesystem-based loading mechanism in favor of another filesystem-based loading mechanism, again?
<whitequark>
the <id> thing is nonsense. that's not how any ruby works.
<apeiros_>
"lets create unflexible, strongly coupled system because we will never want to change how anything works". sorry, this is silly and I'm not up to discuss it.
<apeiros_>
no, not everything we do is because "solve problem X!"
<apeiros_>
we also do things because they enable things we do specifically *not* consider
<apeiros_>
and the way to that is by not introducing coupling where it is not necessary.
<whitequark>
let's make a weakly coupled system so as to enable unintended naming clashes! ok, gotcha.
<apeiros_>
false dichotomy again.
<whitequark>
you still haven't said what would be achieved by not having this coupling, except some vague "unflexibility"
<apeiros_>
01:08 apeiros_: no, not everything we do is because "solve problem X!"
<apeiros_>
01:08 apeiros_: we also do things because they enable things we do specifically *not* consider
<apeiros_>
00:31 apeiros_: … but granted, ruby makes so little of its code loading system, that it probably won't even matter any time soon.
<whitequark>
so, nothing
<apeiros_>
and as said before, past midnight here. I won't go beyond that.
duderonomy has joined #ruby-lang
midhir has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
gwendall has quit [Remote host closed the connection]
pwnz0r has quit [Remote host closed the connection]
Technodrome has joined #ruby-lang
<Technodrome>
apeiros_: so rvm is still the most popular ?
<apeiros_>
Technodrome: no idea
Missphoenix has quit [Quit: Leaving]
<apeiros_>
it is certainly still popular.
<Technodrome>
i noticed there is rbenv
<Technodrome>
and chriby
<Technodrome>
chruby
<Technodrome>
all kinds of stuff
symm- has joined #ruby-lang
hakunin has quit [Ping timeout: 244 seconds]
hakunin has joined #ruby-lang
shinnya has quit [Ping timeout: 264 seconds]
jxie has joined #ruby-lang
jxie has quit [Client Quit]
jxie has joined #ruby-lang
simi has quit [Ping timeout: 245 seconds]
Musashi007 has joined #ruby-lang
nisscrooge has quit [Ping timeout: 245 seconds]
elia has quit [Quit: Computer has gone to sleep.]
yock has joined #ruby-lang
hendranata_ has joined #ruby-lang
yock has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
hendranata_ has quit [Client Quit]
hendranata_ has joined #ruby-lang
yusuf has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
dorei has quit []
<duderonomy>
I think you can skip rvm and simply use rbenv.
<duderonomy>
gemsets and bundler make rvm seem redundant to me.
tkuchiki has joined #ruby-lang
|jemc| has quit [Ping timeout: 255 seconds]
matp has joined #ruby-lang
matp_ has quit [Ping timeout: 244 seconds]
mattwildig has quit []
yfeldblum has joined #ruby-lang
nisscrooge has joined #ruby-lang
jxie has quit [Ping timeout: 244 seconds]
iamninja has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
jxie has joined #ruby-lang
charliesome has joined #ruby-lang
chills42 has joined #ruby-lang
dik_dak has joined #ruby-lang
gwendall has joined #ruby-lang
gwendall has quit [Ping timeout: 240 seconds]
j4cknewt has joined #ruby-lang
gwendall has joined #ruby-lang
gwendall_ has joined #ruby-lang
gwendall has quit [Ping timeout: 244 seconds]
rahul_j has joined #ruby-lang
pwnz0r has joined #ruby-lang
pd_ has joined #ruby-lang
r0bby_ has joined #ruby-lang
charliesome_ has joined #ruby-lang
charliesome has quit [Ping timeout: 264 seconds]
rahul_j has quit [Client Quit]
Technodrome has quit [Quit: Technodrome]
vlad_sta- has joined #ruby-lang
imajes_ has joined #ruby-lang
dik_dak_ has joined #ruby-lang
btcctf_ has joined #ruby-lang
Gate_ has joined #ruby-lang
jo__ has quit [Quit: Connection closed for inactivity]
mistym has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
Technodrome has quit [Quit: Technodrome]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dabradley has quit [Ping timeout: 250 seconds]
j4cknewt has joined #ruby-lang
pwnz0r has quit [Remote host closed the connection]
j4cknewt has quit [Ping timeout: 264 seconds]
Miphix has joined #ruby-lang
dabradley has joined #ruby-lang
havenwood has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
nofxx_ has quit [Ping timeout: 245 seconds]
mcclurmc has joined #ruby-lang
gwendall has joined #ruby-lang
charliesome has quit [Quit: zzz]
Technodrome has joined #ruby-lang
bmichelsen has joined #ruby-lang
loincloth has joined #ruby-lang
gwendall has quit [Ping timeout: 250 seconds]
rahul_j has joined #ruby-lang
loincloth has quit [Ping timeout: 245 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
rahul_j has quit [Ping timeout: 244 seconds]
rahul_j_ has joined #ruby-lang
charliesome has joined #ruby-lang
tkuchiki has quit [Quit: Leaving...]
yfeldblum has quit [Remote host closed the connection]
mistym has joined #ruby-lang
charliesome has quit [Quit: zzz]
tkuchiki has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
revath has joined #ruby-lang
symm- has quit [Read error: Connection reset by peer]
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
loincloth has joined #ruby-lang
simi has joined #ruby-lang
loincloth has quit [Ping timeout: 258 seconds]
Miphix has quit [Quit: Leaving]
yfeldblu_ has joined #ruby-lang
Miphix has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 240 seconds]
rbrs has joined #ruby-lang
Kabaka has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
kyb3r_ has quit [Read error: Connection reset by peer]
kyb3r_ has joined #ruby-lang
rahul_j_ has quit [Quit: rahul_j_]
mcclurmc has quit [Remote host closed the connection]
rahul_j has joined #ruby-lang
mcclurmc has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
mcclurmc has quit [Ping timeout: 245 seconds]
Miphix has quit [Read error: Connection reset by peer]
Bwild has joined #ruby-lang
rbrs has quit [Remote host closed the connection]
JohnBat26 has joined #ruby-lang
yfeldblum has joined #ruby-lang
hahuang62 has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
rahul_j has quit [Quit: rahul_j]
rahul_j has joined #ruby-lang
Musashi007 has joined #ruby-lang
Miphix has joined #ruby-lang
bmichelsen has quit [Quit: ZZZzzz…]
jxie has quit [Quit: leaving]
kapil__ has quit [Quit: Connection closed for inactivity]
Technodrome has quit [Quit: Technodrome]
charliesome has joined #ruby-lang
j4cknewt has joined #ruby-lang
Missphoenix has joined #ruby-lang
kerunaru has joined #ruby-lang
j4cknewt has quit [Ping timeout: 250 seconds]
fusillicode has joined #ruby-lang
Miphix has quit [Ping timeout: 265 seconds]
Technodrome has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
fusillicode has quit [Ping timeout: 245 seconds]
Menorah has quit [Quit: This computer has gone to sleep]
Musashi007 has joined #ruby-lang
dellavg_ has joined #ruby-lang
kerunaru has quit [Max SendQ exceeded]
kapil__ has joined #ruby-lang
fusillicode has joined #ruby-lang
yock has joined #ruby-lang
solars has joined #ruby-lang
yock has quit [Ping timeout: 252 seconds]
kerunaru has joined #ruby-lang
loincloth has joined #ruby-lang
klmlfl has joined #ruby-lang
hahuang62 has joined #ruby-lang
cantonic has quit [Quit: cantonic]
loincloth has quit [Ping timeout: 265 seconds]
<maloik>
hmm, I'm trying out a colleague's 27" display and I get the feeling there's a problem with my settings, as if the refresh rate isn't high enough (but it's locked at 60hz)
<maloik>
using OSX and a ~2 y/o macbook pro
<maloik>
anyone know how to google for this? :/
<maloik>
it's more obvious on dark text on a white bg
hahuang62 has quit [Ping timeout: 272 seconds]
rbrs has joined #ruby-lang
Sadin has quit [Remote host closed the connection]
<Mon_Ouie>
Because the inherited method is called as soon as the subclass is created
<Mon_Ouie>
Which is, before the method Rock.key and Punk.key are defined
<apeiros_>
nofxx_: take a close look at where the error happens
<apeiros_>
it's not in `p Rock == Punk`
<nofxx_>
Mon_Ouie, apeiros_ ah, crystal clear now. thank you
<godd2>
why doesn't if fail right after Rock is defined?
AmirolAhmad has joined #ruby-lang
<apeiros_>
why would it?
<Mon_Ouie>
godd2: the call to == happens because of the call to Enumerable#include?
<nofxx_>
godd2, the array is empty
<Mon_Ouie>
Since at first the array is empty there are no elements to compare it against
<nofxx_>
nothing to == against
<godd2>
ah of course
oleo has joined #ruby-lang
<nofxx_>
Well, was trying to do some fancy checking....I could do something like find_dups afterwards but is there someway that could work?
<nofxx_>
like a way to write your plugins but making sure they use a certain namespace inside the gem
yfeldblum has joined #ruby-lang
<nofxx_>
a different*
<nofxx_>
actual code is: fail "Already defined #{base}" if Foo.plugins.include?(base)
skade has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
AmirolAhmad has quit [Ping timeout: 250 seconds]
skade has joined #ruby-lang
<Mon_Ouie>
I don't think that would work, because the inherited method is only going to be called the first time anyway
Bwild has quit [Quit: leaving]
<godd2>
nofxx_ before I offer any advice, I have to know: will this code be going into production? or is this a project for better understanding metaprogramming?
yfeldblum has quit [Ping timeout: 245 seconds]
<nofxx_>
godd2, going to use on production... going to be an open source gem, it's a crawler which looks for specific information
<godd2>
then my advice is to not use metaprogramming to do whatever it is you're trying to do.
<godd2>
and for whatever solution you come up with to favor composition over inheritance
loincloth has quit [Ping timeout: 245 seconds]
<godd2>
After all, I'd say that rock and punk are each a MusicGenre or something
<godd2>
or Music::Genre
<godd2>
however, against my better judgement, one solution to your current problem is to make @music = Set.new
elia has joined #ruby-lang
<godd2>
that will enforce uniqueness of elements of @music. of course, you'll have to require 'set'
<godd2>
then you can delete the trailing unless Worker.music.include?(base)
arBmind has quit [Quit: Leaving.]
<nofxx_>
godd2, thanks for the advice... hehe my german sheppard decided it's play time here... oh boy, choose another breed if you enjoy peace
<soahccc>
Don't know what the problem is but keep in mind that for a lot of iterations it is way faster to just []#<< and then []#uniq! instead of using Set or checking []#include? before each []#<<
<bradland>
is there an rbenv channel? i know rvm has one
<havenwood>
bradland: there's an #rvm or #chruby channel but no rbenv
<bradland>
bummer
<daften>
the strange is again, rbenv is the exact same version on my 2 machines
<havenwood>
bradland: wish they'd do like rbfu and ruby-versions and self-deprecate in favor of chruby...
<bradland>
daften, in order ot isolate the issue, you could try invoking the ruby binary directly
<bradland>
daften: rbenv is rarely *exactly* the same in two locations ;)
<bradland>
minimum snark intended on that one
<bradland>
i would definitely try invoking the ruby binary directly though
<daften>
i don't know chruby, but in web dev rvm and rbenv seem to be the standards afaik
<bradland>
just use the full path to it
<daften>
ok, give me a sec :)
nofxx has quit [Ping timeout: 264 seconds]
<daften>
directly indeed gives me no problems with the grep
<daften>
the main difference is the install method, directly on my old machine, with homebrew on the new one
<havenwood>
daften: Quite a few authors and maintainers are moving from rbenv to chruby, though rvm is alive and well.
<bradland>
so there’s your culprit
<bradland>
it’s rbenv that is generating that output
<havenwood>
daften: I guess the Basecamp folk push rbenv.
<daften>
@havenwood: what's the main advantage with chruby? it seems like less at very first sight, no executable shims
Musashi007 has joined #ruby-lang
<bradland>
somewhere in the depths of rbenv, you have an un-quoted path being passed go grep
<bradland>
chruby uses a much simpler approach to managing rubies
<havenwood>
daften: Instead of maintaining a shim garden it correctly sets the Ruby environment variables.
<bradland>
if you’re starting with a new machine, i’d definitely go that route
<havenwood>
daften: RVM can actually use chruby as its switcher. MRVM is built in for chruby and a --chruby flag is coming.
<havenwood>
daften: Though typically RVM is used as both installer and switcher.
<havenwood>
daften: chruby users typically either use ruby packages, build their own or use ruby-install, you're choice
<havenwood>
s/you're/your
<daften>
ruby-build is also usable it seems
<daften>
i'll take a look at it, thanks for the tip, although rbenv is bloated, it does have it's advantages, and with the plugins like rbenv-rehash, and so on, it's very usable IMO
<havenwood>
daften: yeah, though i'd advise against ruby-build since it doesn't use your package manager for dependencies. so you can update your openssl package, rebuild ruby through ruby-build and it'll still use whatever old openssl ruby-build shipped with.
<havenwood>
daften: at least if you know it's doing that ^ you can deal with it, but most folk don't seem to know.
<daften>
ah, ok, good to know too
<daften>
i didn't know that ;)
<daften>
sometimes, in IT, we get waaay too many options :D
<bradland>
rehash is really only necessary because of rbenv’s use of shims, btw.
<bradland>
agree 100% on the options. total pain in the ass.
<bradland>
i try to switch as little as possible.
<bradland>
i never switched from RVM over all the “overwriting cd is bad, mkay” fluff
<havenwood>
daften: ruby-install uses your system package manager to install dependencies, no shims, can install Rubies that don't have formulas if you just provide the md5 or shasum, etc.
<bradland>
but chruby is so good, i can’t overlook it
<daften>
i'll keep it into account, atm i'm already working with rbenv, but i'll try out chruby on a vm quicky or something
<tbuehlmann>
I also use ruby-install and chruby and can just agree
oleo has quit [Ping timeout: 245 seconds]
Musashi007 has quit [Quit: Musashi007]
oleo has joined #ruby-lang
lapide_viridi has quit [Quit: Leaving]
<bradland>
errr, uh. has YAML.dump always serialized strings that look like time values as actual YAML Time objects, or is this new behavior?
<bradland>
oh boy
<bradland>
so, under 1.9.3, i get strings in my YAML, but under 2.1 I get actual Time objects
<bradland>
this is not cool
<bradland>
if i serialize an object, what i get back is not the same thing
<daften>
i found the issue, it's due to rbenv-bundler-ruby-version, there was the offending grep
<daften>
thanks very much for the help @bradland and @tbuehlmann, i'll take a look at chruby now :)
<bradland>
you bet
araujo has quit [Ping timeout: 258 seconds]
funnel has quit [Ping timeout: 252 seconds]
nofxx has joined #ruby-lang
slawrence00 has joined #ruby-lang
funnel has joined #ruby-lang
dellavg_ has quit [Ping timeout: 250 seconds]
araujo has joined #ruby-lang
<daften>
a question: how are executable gems handled with chruby?
<daften>
ok, nevermind, that's with the env variables i guess :)
<bradland>
yep, with the correct PATH, GEM_HOME, GEM_PATH, etc, everything “just works"
yatish27 has quit [Remote host closed the connection]
<daften>
and chruby just fixes those env variables, and ruby-install handles installation, allright, now trying to figure out what i'd miss from rbenv :)
<whitequark>
personally I don't even use ruby-install, on non-OSX ./configure --prefix=/opt/rubies/ruby-* && make && sudo make install is sufficient...
araujo has quit [Max SendQ exceeded]
mattwildig has joined #ruby-lang
araujo has joined #ruby-lang
<daften>
yeah, but osx, install and prerequisites .. :)
yatish27 has joined #ruby-lang
Technodrome has joined #ruby-lang
<Technodrome>
Good day
stamina has quit [Quit: WeeChat 1.0.1]
GBrawl has joined #ruby-lang
yatish27 has quit [Ping timeout: 252 seconds]
<daften>
with chruby, as far as i can see, there is no alternative to rbenv-bundler, which eliminates the need for bundle exec, is there?
<daften>
the thing is, i mainly, if not always, work in projects with a gemfile, so the bundle exec is very annoying for me
djbkd has quit [Remote host closed the connection]
Guest26597 has quit [Remote host closed the connection]
<daften>
what does RUBYGEMS_GEMDEPS do?
<daften>
is that not only from 2.2.0 onwards?
<havenwood>
daften: It's a RubyGems feature. You can get it with earlier Rubies by updating your RubyGems: gem update --system
<bradland>
havenwood: do you have a canonical source for documentation on RUBYGEMS_GEMDEPS? or is this one of those things we have to source-dive to understand?
<daften>
but it means you need a per-path env variables to be able to set that env variable, so it seems like shifting the problem
<daften>
still strange, to have to set a env variable, in a file, that points exactly to that file :D
<daften>
even with the autodetect :)
<daften>
do you guys know why RUBYGEMS_GEMDEPS=- isn't simply the default?
<bradland>
“auto discovery” often leads to “auto confusion” when you’re not expecting it
<bradland>
in general, convenience features default to off for that reason
<havenwood>
daften: Say if you're using Ruby for general scripting, nothing to do with an app. If there's a Gemfile anywhere in an intermediate you'd possibly get irrelevant warning and stuff loaded, etc.
<daften>
ah, ok, true
amsi has quit [Quit: Leaving]
<daften>
i use ruby for provisioning (chef), but just getting started, and for web projects (compass and so on), so very different mindset to "real" ruby programming
oleo has quit [Quit: Verlassend]
<bradland>
personally, i still use rvm on my primary development machine because i have no objections to their implementation, and they seem to have a very strong focus on making sure that rvm stable “just works”
<bradland>
i also have some very old projects where gemsets are nice
GBrawl has quit [Quit: (null)]
simi has joined #ruby-lang
<daften>
atm i think i'll stick to rbenv, it was one plugin that was faulty, the rest is fine and it works for me atm, but i know basically how i can switch to chruby fairly easily
<daften>
so when i'm bored or rbenv is really annoying ...
<daften>
it's been a fruitful learning evening for me, thx @bradland and @havenwood again, when in belgium, come see me for free beer or waffles :p
<bradland>
will do!
<havenwood>
daften: :)
fusillicode has quit [Quit: Leaving.]
djbkd has joined #ruby-lang
daften has quit []
bennyklotz has quit [Quit: leaving]
bennyklotz has joined #ruby-lang
|jemc| has joined #ruby-lang
bennyklotz has quit [Client Quit]
arBmind has joined #ruby-lang
bennyklotz has joined #ruby-lang
amclain has joined #ruby-lang
bennyklotz has quit [Client Quit]
bennyklotz has joined #ruby-lang
mattwildig has quit []
ur5us has joined #ruby-lang
ur5us has quit [Ping timeout: 264 seconds]
arBmind1 has joined #ruby-lang
yatish27 has joined #ruby-lang
arBmind has quit [Ping timeout: 255 seconds]
oleo has joined #ruby-lang
oleo has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby-lang
amclain has quit [Quit: Leaving]
yatish27 has quit [Ping timeout: 245 seconds]
amclain has joined #ruby-lang
dorei has joined #ruby-lang
oleo has joined #ruby-lang
oleo has quit [Read error: Connection reset by peer]
j4cknewt has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
<hakunin>
we should propose a new ruby feature, custom short-circuiting operators. great idea or the greatest idea?
oleo has joined #ruby-lang
hahuang65 has quit [Ping timeout: 272 seconds]
mistym has quit [Remote host closed the connection]