<soveran>
drbrain: it's far fetches in the fact that it's not something that could be applied lightly to the current rubygems
<drbrain>
How do I know that I want Foo1 or Foo2?
<soveran>
it would work like it does in golang, node, etc.
<soveran>
you declare how you want to name the module you load
<drbrain>
what if I want Foo1 and you want Foo2, but they are incompatible?
<drbrain>
how does a user who depends on both of our libraries share data?
<drbrain>
… data generated by Foo
<soveran>
are you aware of how it works in other languages?
<soveran>
python, golang, node
<soveran>
etc.
fromonesrc has quit []
<drbrain>
in rubygems such a scenario is not allowed
<soveran>
yes, I know
<drbrain>
can you explain how python, golang or node allows such a scenario?
dvu has quit [Ping timeout: 252 seconds]
fromonesrc has joined #rubygems
<soveran>
yes, the module you load has a default name
<soveran>
(specified by the path)
<soveran>
but you can assign the module to a different name
fromonesrc_ has joined #rubygems
<soveran>
you can refer to that new name after loading the file
<drbrain>
but they're still incompatible
jfelchner has quit [Ping timeout: 264 seconds]
jfelchner has joined #rubygems
<drbrain>
what benefit does this allowed incompatibility bring?
fromonesrc has quit [Ping timeout: 240 seconds]
fromonesrc_ is now known as fromonesrc
fromonesrc has quit [Client Quit]
<soveran>
drbrain: you could have different versions of the same library running side by side
<drbrain>
I don't know if that is a benefit
<soveran>
say Redis 4 comes out
<soveran>
you have a library that depends on Redis 3 and another that depends on Redis 4
<soveran>
in that case, you could fulfill both needs
<drbrain>
but I've also doubled the connection count for my redis server
<drbrain>
it sounds problematic
<soveran>
not necessarily, but that's besides the point
<soveran>
the advantage would be that you can upgrade library A that depends on Redis 4 while you wait for library B to be compatible with it
<drbrain>
but then I need to edit my code to use Redis4 vs Redis during this period, right?
<soveran>
that's one possibility, yes
<drbrain>
is there another?
<soveran>
yes, to load it into a namespace
<soveran>
MyApp::Redis, AnotherApp::Redis
<drbrain>
so then I have to edit my code to use the namespace, right?
<soveran>
that would be cleaner, probably
<soveran>
let's say my gem is Sidekiq, then I would load the library in Sidekiq::Redis
<drbrain>
that doesn't seem any different
<soveran>
that would be the best practice, probably
<drbrain>
this idea seems to make the multiple version problem in RubyGems worse, not better
<drbrain>
instead of letting RubyGems say "you can't do that" in advance you need to check by hand and work around the problem
<drbrain>
gems that share state across instances (such as connection pools) no longer work properly
<mootpointer>
evan: Ping
<evan>
mootpointer: hey
<mootpointer>
Winner!
<evan>
i'm a single parent this evening
<evan>
so I'm in and out for the next hour and a half.
<mootpointer>
No worries, I can handle that. Mind if I /msg?
<drbrain>
soveran: what do you do for C extensions?
<soveran>
drbrain: I'm not talking about something that is backwards compatible, btw
<soveran>
so C extensions should be modified to work for this to make sense
<evan>
mootpointer: no problem
<drbrain>
soveran: then you have lots of work ahead of you before RubyGems can consider it
crandquist has quit [Read error: Connection reset by peer]
<drbrain>
including buy-in from the ruby community
yerhot has joined #rubygems
crandquist has joined #rubygems
<drbrain>
note that load does not work at all with shared libraries:
<drbrain>
load '`gem which zlib`', true
<soveran>
drbrain: was it a bad idea to ask you guys about your take on it?
<drbrain>
soveran: I am very skeptical
<soveran>
I've noticed :-)
<drbrain>
also, I don't like to support features in RubyGems that only a few people would use
<soveran>
it could be for rubygems 10 or rubygems 100
<soveran>
but I think it's the proper way to build a module system
<drbrain>
well, you'll need to start with support in ruby as load can only import ruby source files
yerhot has quit [Remote host closed the connection]
<drbrain>
soveran: even for less world-changing ideas I am skeptical
tenderlove has quit [Remote host closed the connection]
<soveran>
yes, I'm also skeptical by default, so I understand your position
<drbrain>
it's difficult to support one-off features if the submitter abandons them, but easy to recommend they create some kind of plug-in
acts_as_coder has quit [Read error: Connection reset by peer]
<soveran>
I think if you or evan, qrush, raggi, etc. investigate more on how golang, npm, python, etc., use the module system, maybe you will see more advantages than those I described
<soveran>
and if it makes sense to you guys, it could be part of rubygems ten years from now
<soveran>
as it is a huge change
<evan>
advantages for what?
<evan>
(there is a big, long, scrollback)
<soveran>
hahahahaha
<soveran>
evan: the idea is to be able to load libraries in anonymous modules
<qrush>
in 4+ years of ruby i have never had a library name conflict
<qrush>
also, <3 go's packaging
<qrush>
i love go in general. i would love to be writing more of it
ddd has quit [Read error: Connection reset by peer]
ddd has joined #rubygems
mikewintermute has quit [Quit: mikewintermute]
wedgeV_ has joined #rubygems
wedgeV has quit [Read error: Connection reset by peer]
whit537 has quit [Read error: Connection reset by peer]
whit537 has joined #rubygems
dvu has joined #rubygems
<soveran>
hey qrush
<qrush>
yo
<soveran>
that way of using modules like in node, python, go, etc., gives you an advantage for cases when you need to resolve conflicts
<soveran>
the example would be a system that uses sidekiq and redis-store
<soveran>
if a new version of redis-rb is out, then a new version of sidekiq is released and redis-store stays behind
<soveran>
you can't upgrade redis-rb or sidekiq until redis-store catches up
<soveran>
with the other approach, that's not an issue
<qrush>
ah
<soveran>
and again, it's not something that could be implemented right now
<qrush>
yeah this is a pita
<qrush>
not sure how other languages handle this
<soveran>
it could be a decade away, because too much has been built upon the existing solution
<soveran>
in other languages, you can import a module that is local to what you are developing
<soveran>
and you can rename or namespace the modules you are loading
<soveran>
similar to the example I gave earlier: you could have Sidekiq::Redis and Ost::Redis loading different code
dvu has quit [Ping timeout: 252 seconds]
<soveran>
if we were to design rubygems from scratch today, I would vote for that feature. As it's not the case, I'm fine with just bouncing the idea around, hoping that in the far distant future we could have something like that in Ruby.
<qrush>
if there's anything i've learned is that RG has evolved
<qrush>
and that it will continue to, if people care enough about it
<qrush>
i'm not sure how productive it is to wish/rethink stuff like this
<qrush>
instead explain the problem and how to fix it
<qrush>
i dont think most people using ruby/rails have run into this problem
<qrush>
mostly only gem developers do
<qrush>
you should totally post more about this though. why is it a problem, how does it come up, how can it be solved, what would need to change, etc
<qrush>
post about how other languages handle this with concrete examples of doing so
<qrush>
why this matters to ruby
<qrush>
and how non-gem developers will benefit too :)
<soveran>
ok
<soveran>
I'll try
vertis1 has quit [Quit: Leaving.]
yerhot has joined #rubygems
tcopeland1 has joined #rubygems
tcopeland has quit [Ping timeout: 252 seconds]
yerhot has quit [Ping timeout: 272 seconds]
newUser1234 has joined #rubygems
wolfeidau has quit [Read error: Connection reset by peer]
wolfeidau has joined #rubygems
qmx is now known as qmx|away
ckelly has quit [Quit: Leaving...]
<zzak>
i havent read the full discussion
<zzak>
but if you ask me, library == class or module, and ruby lets you re-open these
<zzak>
so having 2 different libraries under the same name is like asking for 2 different classes under the same name
dvu has joined #rubygems
dvu has quit [Ping timeout: 256 seconds]
ckrailo_ has joined #rubygems
<soveran>
zzak: the way it works in python, node and go is not improvised, they have studied it, and ruby's solution is a bit careless and old. The fact that we've been using it so far doesn't mean we have the perfect solution
<zzak>
do they have open classes?
<zzak>
they are different languages
acts_as_coder has joined #rubygems
wolfeidau has quit [Remote host closed the connection]
tenderlove has joined #rubygems
reset has quit [Ping timeout: 255 seconds]
<soveran>
zzak: it's unrelated to open classes, and yes, those are different languages
acts_as_coder has quit [Quit: Leaving.]
<evan>
new .au mirror is now active!
<drbrain>
\o/
benwoody has joined #rubygems
benwoody has left #rubygems [#rubygems]
<evan>
I love that the instant I deploy the change
<evan>
the access log starts to roll in on it
<evan>
it's only for IPs tagged as AU
<evan>
we may want to add NZ in there too
<drbrain>
probably
mockra has quit [Remote host closed the connection]
martinisoft has quit [Quit: martinisoft]
newUser1234 has quit [Remote host closed the connection]