<sam113101>
23.prime? is faster than Prime.prime?(23), btw
<sam113101>
they are different implementations
infinityfye has joined #ruby
infinityfye has quit [Remote host closed the connection]
FetidToot has quit [Ping timeout: 245 seconds]
willfish has joined #ruby
FetidToot has joined #ruby
FetidToot has quit [Ping timeout: 250 seconds]
FetidToot has joined #ruby
<johnjaye>
i don't really understand referring to the standard library as gems
<johnjaye>
usually one speaks of the library and the "standard library".
crespire has joined #ruby
crespire1 has quit [Ping timeout: 256 seconds]
crespire has quit [Ping timeout: 246 seconds]
alaurie has joined #ruby
crespire has joined #ruby
TomyWork has joined #ruby
Bish has quit [Ping timeout: 260 seconds]
gr33n7007h has quit [Ping timeout: 252 seconds]
gr33n7007h has joined #ruby
konsolebox has quit [Ping timeout: 250 seconds]
Bish has joined #ruby
MarvelousWololo has quit [Read error: Connection reset by peer]
gr33n7007h has quit [Ping timeout: 256 seconds]
gr33n7007h has joined #ruby
splud has quit [Ping timeout: 246 seconds]
grenierm has quit [Ping timeout: 246 seconds]
splud has joined #ruby
splud has quit [Ping timeout: 256 seconds]
weaksauc_ has quit [Ping timeout: 244 seconds]
weaksauce has joined #ruby
splud has joined #ruby
dviola has quit [Ping timeout: 245 seconds]
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
nmollerup has quit [Ping timeout: 248 seconds]
alaurie has quit [Quit: Leaving]
infinityfye has joined #ruby
coffeejunk_ has joined #ruby
nona has joined #ruby
konsolebox has joined #ruby
desnudopenguino has quit [*.net *.split]
patrick- has quit [*.net *.split]
johnjaye has quit [*.net *.split]
Perflosopher has quit [*.net *.split]
sarna has quit [*.net *.split]
acosta has quit [*.net *.split]
jetchisel has quit [*.net *.split]
dannyAAM has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
polychromata has quit [*.net *.split]
helveticamono_ has quit [*.net *.split]
newton has quit [*.net *.split]
Cork has quit [*.net *.split]
coffeejunk_ is now known as coffeejunk
Perflosopher5 has joined #ruby
desnudopenguino has joined #ruby
jetchisel has joined #ruby
patrick- has joined #ruby
dannyAAM has joined #ruby
johnjaye has joined #ruby
acosta has joined #ruby
Cork has joined #ruby
helveticamono_ has joined #ruby
sarna has joined #ruby
polychromata has joined #ruby
newton has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
reset has joined #ruby
pookie has quit [Quit: All for nothing]
olspookishmagus has joined #ruby
konsolebox has joined #ruby
some14u has joined #ruby
shokohsc51088 has joined #ruby
shokohsc5108 has quit [Ping timeout: 248 seconds]
shokohsc51088 is now known as shokohsc5108
konsolebox has quit [Read error: Connection reset by peer]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has joined #ruby
RDMengineer has joined #ruby
user23 has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
some14u has quit [Client Quit]
caedmon has joined #ruby
teclator has joined #ruby
konsolebox has joined #ruby
Sankalp has quit [Ping timeout: 246 seconds]
Sankalp has joined #ruby
user23 has quit [Remote host closed the connection]
otisolsen70 has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
willfish has quit [Quit: WeeChat 4.0.2]
<ox1eef_>
johnjaye: The standard library being gems means that they can be developed (and released) independent of Ruby releases. The exception to that rule is default gems, which are too interwined into Ruby to develop independent of it.
John_Ivan_ has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
RDMengineer8 has joined #ruby
RDMengineer has quit [Ping timeout: 245 seconds]
RDMengineer8 is now known as RDMengineer
Sankalp has quit [Ping timeout: 250 seconds]
Sankalp has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
rvalue has quit [Ping timeout: 256 seconds]
rvalue has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
TomyWork has quit [Remote host closed the connection]
<johnjaye>
ah i don't really understand the distinction
<johnjaye>
in python for example it's just, here's the standard library that comes with the interpreter. then everything else you download from a repo or package system
<johnjaye>
> Default gems are Ruby stdlib libraries that were converted to gems. Similar to non-gemified part of stdlib, you cannot remove them.
<johnjaye>
so it's a gem... but you can't delete or uninstall it
<weaksauce>
johnjaye it's used to make development easier
<leftylink>
for me the standard library just means if I install Ruby I'm guaranteed to have this thing. the detail of whether it's a gem is an implementation detail that matters not to me
<weaksauce>
base64 is not essential to ruby so why would it be part of the ruby core development overhead?
<weaksauce>
also it's funny that base64 is just a wrapper for pack and unpack
<weaksauce>
and the entire file is like 100 lines
konsolebox has joined #ruby
<johnjaye>
leftylink: well. it's a matter of definitions
<johnjaye>
it's like telling me a car is a horseless carriage. it's a bit confusing
<adam12>
weaksauce: LOL. rack/rack just removed base64 dependency with `unpack('m')` (or something like that)
<weaksauce>
haha
<leftylink>
I hope that a resolution to the confusion will be found, then.
konsolebox has quit [Read error: Connection reset by peer]
nmollerup has joined #ruby
Sampersand has joined #ruby
Sampersand has quit [Quit: Client closed]
konsolebox has joined #ruby
_ht has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
some14u has joined #ruby
MarvelousWololo has joined #ruby
constxqt has joined #ruby
<johnjaye>
if i want to build ruby can i do it in a separate dir
<johnjaye>
like mkdir mydir; cd mydir; ../make
<johnjaye>
hmm that didn't work.
<johnjaye>
i guess maybe i'm supposed to run configure itself then
<constxqt>
hey bros
gr33n7007h has quit [Ping timeout: 258 seconds]
<leftylink>
I wonder if make -C is the right way to do this. been too long since I used make
<johnjaye>
well i'll just do an in-tree build for now
<constxqt>
i am looking for some design input and i usually like how ruby does things. im wondering how one might implement this in Ruby
<constxqt>
i have this class: class Sync { init(x) { @x = x; @m = Mutex() } __missing__(name, *args) { with @m.lock() { member(@x, name)(*args) } } }
gr33n7007h has joined #ruby
<constxqt>
that just wraps an object and defers all method calls to it but calls them while holding a mutex lock
<constxqt>
but i don't have a way to retrieve the wrapped object, and i don't want to add another method on the Sync class because then it might conflict with a method on the wrapped object
<constxqt>
how would you guys implement the Sync class in ruby
<constxqt>
is there a way to do it without shadowing any methods on the wrapped object
infinityfye has quit [Quit: Leaving]
_ht has quit [Remote host closed the connection]
<leftylink>
I guess if I want to be silly I would justify overriding Sync#itself by saying "all methods on Sync should be as if they were called on the wrapped object therefore #itself is no exception"
<leftylink>
it doesn't add another method on Sync because it already had the itself method
<leftylink>
so it fits the letter of the law
<leftylink>
I think it doesn't fit the spirit though so shrug
BSaboia has joined #ruby
<leftylink>
I would never actually do this
caedmon has quit [Quit: caedmon]
<constxqt>
why not?
caedmon has joined #ruby
johnjaye has quit [Ping timeout: 245 seconds]
<leftylink>
I think the surprise of having `itself` not be the Sync object would be worse
caedmon has quit [Remote host closed the connection]
<constxqt>
oh you wouldn't do that exact approach
c10l6 has quit [Quit: See ya! o/]
<constxqt>
i thought you meant you'd never want a class like this to begin with
gr33n7007h has quit [Ping timeout: 252 seconds]
gr33n7007h has joined #ruby
c10l6 has joined #ruby
johnjaye has joined #ruby
kaivai has quit [Ping timeout: 250 seconds]
otisolsen70_ has joined #ruby
otisolsen70 has quit [Ping timeout: 260 seconds]
otisolsen70_ has quit [Quit: Leaving]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
neshpion has joined #ruby
ua_ has quit [Ping timeout: 250 seconds]
<johnjaye>
where is the official list of default gems and the ruby stdlib
<johnjaye>
or do you just have to "read the source"?