havenwood changed the topic of #ruby to: Ruby 3.2.2, 3.1.4, 3.3.0-preview1: https://www.ruby-lang.org | Rules: https://ruby-community.com | Logs: https://libera.irclog.whitequark.org/ruby
shokohsc51085 has joined #ruby
shokohsc5108 has quit [Ping timeout: 250 seconds]
shokohsc51085 is now known as shokohsc5108
gh0st6 has joined #ruby
keypresser86 has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
John_Ivan_ has quit [Ping timeout: 260 seconds]
some14u has joined #ruby
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
FetidToot2 has joined #ruby
FetidToot has quit [Ping timeout: 256 seconds]
FetidToot has joined #ruby
FetidToot2 has quit [Ping timeout: 245 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ox1eef_> Cool and all, but just more reason for people to perceive Ruby as slow and unscalable: https://blog.redplanetlabs.com/2023/08/15/how-we-reduced-the-cost-of-building-twitter-at-twitter-scale-by-100x/
duderonomy has joined #ruby
reset has quit [Quit: reset]
caedmon has joined #ruby
rvalue has joined #ruby
caedmon has quit [Ping timeout: 245 seconds]
caedmon has joined #ruby
caedmon has quit [Client Quit]
caedmon has joined #ruby
seydar has joined #ruby
seydar has quit [Quit: leaving]
caedmon has quit [Ping timeout: 246 seconds]
<johnjaye> ox1eef_: but it says it's not an attack on mastodon's code base!
grenierm has joined #ruby
_ht has joined #ruby
neshpion has quit [Quit: neshpion]
konsolebox has joined #ruby
gh0st6 has quit [Quit: Connection closed for inactivity]
grenierm has quit [Quit: Client closed]
grenierm has joined #ruby
<johnjaye> where is the prime? function defined
<johnjaye> i'm poking around the ruby code but i don't see it anywhere. there is no lib/prime.rb
<leftylink> pandabot rb require 'prime'; 23.method(:prime?).source_location
<pandabot> ["/usr/lib/ruby/3.0.0/prime.rb", 35] - https://carc.in/#/r/fmov
<johnjaye> oh it's maybe in a different git repo then
<johnjaye> i just cloned ruby/ruby hoping to find it
<johnjaye> hmm it seems each library has its own repo
konsolebox has quit [Ping timeout: 250 seconds]
_ht has quit [Quit: _ht]
konsolebox has joined #ruby
konsolebox has quit [Remote host closed the connection]
konsolebox has joined #ruby
<havenwood> johnjaye: See https://stdgems.org/ for the gemified stdlib.
<havenwood> johnjaye: You might want to check out the https://github.com/mame/faster_prime RubyGem alternative.
<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]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
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
<weaksauce> basically
<weaksauce> in the main python repository
<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"?
<neshpion> are you looking for this? https://ruby-doc.org/3.2.2/
<johnjaye> i don't think that's the official site. ruby-lang.org unless i'm mistaken
<johnjaye> i just want to know the 'official' place where to find it
ua_ has joined #ruby
<neshpion> there's also this https://docs.ruby-lang.org/en/3.2/ -- but ruby-lang.org/documentation contains links to ruby-doc.org as well
<johnjaye> ah i see
polishdub has quit [Ping timeout: 256 seconds]
shokohsc51086 has joined #ruby
shokohsc5108 has quit [Ping timeout: 256 seconds]
shokohsc51086 is now known as shokohsc5108