havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.2, 3.1.4, 3.0.6, 3.3.0-preview1: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://t.ly/9ua4 | Logs: https://libera.irclog.whitequark.org/ruby/
aesthetikx has quit [Ping timeout: 240 seconds]
ruby-eval has quit [Remote host closed the connection]
ruby-eval has joined #ruby
roadie has joined #ruby
pvalenta_ has quit [Ping timeout: 246 seconds]
pvalenta has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
ruby-eval has quit [Remote host closed the connection]
ruby-eval has joined #ruby
ruby-eval has quit [Quit: lol]
ruby-eval has joined #ruby
ruby-eval has quit [Remote host closed the connection]
ruby-eval has joined #ruby
ruby-eval has quit [Client Quit]
ruby-eval has joined #ruby
ruby-eval has quit [Client Quit]
ruby-eval has joined #ruby
ruby-eval has quit [Client Quit]
ruby-eval has joined #ruby
ruby-eval has quit [Remote host closed the connection]
ruby-eval has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
shokohsc9 has joined #ruby
shokohsc has quit [Ping timeout: 256 seconds]
shokohsc9 is now known as shokohsc
roadie has joined #ruby
hansolo has quit [Remote host closed the connection]
roadie has quit [Ping timeout: 248 seconds]
<mooff> now we have endless methods, is it time for endless defless methods?
<mooff> uppercase(str) = str.upcase
lena64t has quit [Remote host closed the connection]
lena64t has joined #ruby
shokohsc9 has joined #ruby
sickdyd has joined #ruby
shokohsc has quit [Ping timeout: 268 seconds]
shokohsc9 is now known as shokohsc
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
<johnjaye> mooff: run what now on a dreamcast?
<johnjaye> ruby?
Guest92 has joined #ruby
Guest92 has quit [Quit: Client closed]
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
optimi has joined #ruby
dalan0382 has quit [Quit: dalan0382]
dalan0382 has joined #ruby
ur5us has joined #ruby
roadie has joined #ruby
optimi has quit [Ping timeout: 240 seconds]
roadie has quit [Ping timeout: 248 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
<havenwood> isene: You can cache compiled intermediary representation (YARB) to memory disk, like Bootsnap does with Rails by default.
<havenwood> See the yomikomu gem for an example, or this gist https://gist.github.com/havenwood/465eb969ef1fb817e4ad493701b0020e
<havenwood> It can save about 30% of execution time, depending.
<havenwood> Languages like Elixir build the feature in. Ruby has the functionality, so projects like Rails can utilize it, but it's not built into RubyGems.
<havenwood> This is an example of compiling all gems. https://gist.github.com/havenwood/414367192cf22f66d01a3117064713e7
<havenwood> I think it'd be a good idea for RubyGems to compile automatically on install and use that YARB unless the SHA changes.
<havenwood> Better yet would be to compile all `ruby` scripts.
<havenwood> Currently, the best way to get ruby to run quickly is `--disable-gems`, since loading RubyGems is pretty heavy.
roadie has joined #ruby
Linux_Kerio has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
grenierm has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
roadie has joined #ruby
muzzle41 has joined #ruby
ur5us has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
roadie has joined #ruby
muzzle41 has quit [Ping timeout: 268 seconds]
roadie has quit [Ping timeout: 248 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
roadie has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
allott has joined #ruby
infinityfye has joined #ruby
crespire1 has joined #ruby
crespire has quit [Killed (NickServ (GHOST command used by crespire1))]
ur5us has joined #ruby
Shell has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
invent has joined #ruby
Shell has joined #ruby
allott has quit [Ping timeout: 268 seconds]
hindsi77 has joined #ruby
invent has quit [Ping timeout: 268 seconds]
hindsi77 has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 250 seconds]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Linux_Kerio has quit [Ping timeout: 240 seconds]
jvalleroy has joined #ruby
___nick___ has joined #ruby
ur5us has joined #ruby
_ht has joined #ruby
<isene> Can that be done from inside the script (rsh or rtfm in this case)?
comeli89 has joined #ruby
lena64t1 has joined #ruby
grenierm has quit [Ping timeout: 245 seconds]
lena64t has quit [Ping timeout: 240 seconds]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
comeli89 has quit [Ping timeout: 268 seconds]
madprops has left #ruby [Leaving]
___nick___ has joined #ruby
polishdub has quit [Ping timeout: 240 seconds]
sickdyd has quit [Ping timeout: 240 seconds]
polishdub has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
sickdyd has joined #ruby
sickdyd has quit [Ping timeout: 265 seconds]
sickdyd has joined #ruby
roadie has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.91)]
perrierjouet has quit [Quit: WeeChat 3.8]
johnjaye has quit [Ping timeout: 265 seconds]
johnjaye has joined #ruby
Linux_Kerio has joined #ruby
blackmetal has joined #ruby
joto has quit [Quit: The Lounge - https://thelounge.chat]
joto has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
gr33n7007h has joined #ruby
gr33n7007h has quit [Ping timeout: 264 seconds]
gr33n7007h has joined #ruby
TomyLobo has joined #ruby
gemmaro has joined #ruby
perrierjouet has joined #ruby
blackmetal has quit [Quit: Lost terminal]
shokohsc5 has joined #ruby
shokohsc has quit [Ping timeout: 240 seconds]
shokohsc5 is now known as shokohsc
rvalue has quit [Quit: ZNC - https://znc.in]
rvalue has joined #ruby
gemmaro has quit [Remote host closed the connection]
tomtmym has quit [Quit: Gone.]
tomtmym has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
ruby-eval has quit [Excess Flood]
ruby-eval has joined #ruby
hansolo has joined #ruby
Linux_Kerio has quit [Ping timeout: 240 seconds]
szkl has quit [Quit: Connection closed for inactivity]
gr33n7007h has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
roadie has joined #ruby
aesthetikx has joined #ruby
<aesthetikx> Does ruby have an equivalent of rust's &str, e.g. the ability to create multiple 'slices' of a shared string without copying each time?
<aesthetikx> e.g. if I have x = "somestring".freeze and then later y = x[3..4], is that copying bytes to a new string if y is not subsequently mutated?
<mooff> good question
<johnjaye> yes i agree as well. good question.
Linux_Kerio has joined #ruby
nmollerup has quit [Ping timeout: 265 seconds]
<aesthetikx> I know perl recently added this, I didn't think ruby did. I have some rust program that I wrote that is pretty efficient, that I want to port to ruby because rust is so painful
<aesthetikx> the bulk of the program is comparing tons of substrings from a file to a known string, which doesn't seem like a very ruby optimal task
<aesthetikx> performance is not that important, but would be nice.
<aesthetikx> nice to at least do it properly, anyway, even if the overall runtime is worse
nmollerup has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
<mooff> aesthetikx: try making a 500MB string, freezing it, then taking a subslice
<mooff> then check the memory use of the interpreter
<aesthetikx> it does appear to use more memory, based on my quick test
<mooff> i think there are String methods to check regex from a given offset
<mooff> at least something like that rings a bell
___nick___ has quit [Ping timeout: 240 seconds]
A_Dragon has quit [Killed (Stx (*Kiss of death*))]
A_Dragon has joined #ruby
_ht has quit [Quit: _ht]
tomtmym has quit [Quit: Gone.]
johnjaye has quit [Ping timeout: 240 seconds]
Linux_Kerio has quit [Ping timeout: 256 seconds]
johnjaye has joined #ruby
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 264 seconds]
Sankalp- is now known as Sankalp
infinityfye has quit [Quit: Leaving]
roadie has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
roadie has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
pantin has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
lena64t2 has joined #ruby
lena64t1 has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
pantin has quit [Ping timeout: 268 seconds]
SunClonus has joined #ruby
SunClonus has quit [Read error: Connection reset by peer]
roadie has quit [Ping timeout: 248 seconds]
creeds has joined #ruby
french77 has joined #ruby
creeds has quit [Ping timeout: 256 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
roadie has joined #ruby
philos33 has joined #ruby
french77 has quit [Ping timeout: 268 seconds]
heathe62 has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
philos33 has quit [Ping timeout: 268 seconds]
heathe62 has quit [Ping timeout: 264 seconds]