jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
<adam12> John_Ivan: Good to hear.
jpn has joined #ruby
soknte5 has quit [Ping timeout: 248 seconds]
Vaevictus has quit [Ping timeout: 248 seconds]
Vaevictus has joined #ruby
mitt3ns has joined #ruby
grokify has quit [Remote host closed the connection]
nirvdrum has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
crux73 has joined #ruby
toshiba__ has quit [Ping timeout: 250 seconds]
John_Ivan has quit [Ping timeout: 248 seconds]
nirvdrum has quit [Ping timeout: 268 seconds]
grokify has joined #ruby
cartdrige has joined #ruby
nirvdrum has joined #ruby
crux73 has quit [Ping timeout: 260 seconds]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
jpn has quit [Ping timeout: 264 seconds]
eddof13 has joined #ruby
Guest2735 has quit [Ping timeout: 264 seconds]
drainpipe has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
drainpipe has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
NightMonkey has quit [Ping timeout: 268 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Ping timeout: 252 seconds]
NightMonkey has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
nirvdrum has joined #ruby
nirvdrum has quit [Client Quit]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
eddof13 has joined #ruby
mikecmpbll has joined #ruby
onyx_ has quit [Read error: Connection reset by peer]
onyx has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Ping timeout: 248 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
D_A_N has quit [Quit: leaving]
mikecmpbll has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
Sheilong has quit []
mikecmpbll has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
eddof13 has joined #ruby
mikecmpbll has joined #ruby
grokify has joined #ruby
ur5us has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
crux73 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toshiba__ has joined #ruby
mikecmpbll has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
crux73 has quit [Ping timeout: 268 seconds]
crux73 has joined #ruby
toshiba__ has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 248 seconds]
mekhami has quit [Quit: WeeChat 2.8]
mikecmpbll has joined #ruby
eddof13 has joined #ruby
mikecmpbll has quit [Ping timeout: 264 seconds]
toshiba__ has joined #ruby
mikecmpbll has joined #ruby
eddof13 has quit [Client Quit]
cartdrige has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
crux73 has quit [Ping timeout: 268 seconds]
toshiba__ has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
crux73 has joined #ruby
mikecmpbll has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
cartdrige has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Ping timeout: 252 seconds]
polishdub has quit [Remote host closed the connection]
toshiba__ has joined #ruby
mikecmpbll has joined #ruby
crux73 has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
ur5us has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
Henry151 has quit [Ping timeout: 260 seconds]
crux73 has joined #ruby
cartdrige has joined #ruby
toshiba__ has quit [Ping timeout: 268 seconds]
crux73 has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
moldorcoder7 has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
mikecmpbll has joined #ruby
cartdrige has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
dionysus69 has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
CrazyEddy has quit [Ping timeout: 260 seconds]
ccapndave has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby
gonix has joined #ruby
mikecmpbll has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
gonix has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
ccapndave has quit [Quit: Textual IRC Client: www.textualapp.com]
mikecmpbll has quit [Ping timeout: 264 seconds]
CrazyEddy has joined #ruby
NightMonkey has quit [Ping timeout: 260 seconds]
Guest2735 has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
arahael has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
grokify has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
grokify has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
grokify has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
ur5us has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
TomyWork has joined #ruby
darkstardevx has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
darkstardevx has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mikecmpbll has joined #ruby
jvalleroy has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
arahael has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
royo25 has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
otisolsen70 has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
mitt3ns has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
mitt3ns has joined #ruby
ur5us_ has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
ur5us has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby
ur5us_ has quit [Ping timeout: 250 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 246 seconds]
ur5us_ has joined #ruby
ur5us_ has quit [Ping timeout: 260 seconds]
szkl has quit [Quit: Connection closed for inactivity]
grokify has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
wand has quit [Ping timeout: 258 seconds]
mikecmpbll has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
jpn has quit [Ping timeout: 250 seconds]
wand has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
teclator has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 264 seconds]
u0_a87 has joined #ruby
u0_a87 has quit [Quit: "Goodbye"]
markong has joined #ruby
mikecmpbll has joined #ruby
cartdrige has joined #ruby
mikecmpbll has quit [Ping timeout: 248 seconds]
jpn has joined #ruby
mikecmpbll has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Ping timeout: 252 seconds]
crux73 has joined #ruby
mikecmpbll has joined #ruby
cartdrige has quit [Ping timeout: 248 seconds]
mikecmpbll has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
jpn has quit [Ping timeout: 252 seconds]
szkl has joined #ruby
mikecmpbll has joined #ruby
nirvdrum has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
jpn has joined #ruby
mikecmpbll has joined #ruby
jpn has quit [Ping timeout: 248 seconds]
mikecmpbll has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
jpn has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
ua_ has quit [Ping timeout: 264 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
John_Ivan has joined #ruby
toshiba__ has joined #ruby
crux73 has quit [Ping timeout: 260 seconds]
nirvdrum has quit [Quit: nirvdrum]
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
crux73 has joined #ruby
D_A_N has joined #ruby
toshiba__ has quit [Ping timeout: 260 seconds]
toshiba__ has joined #ruby
crux73 has quit [Ping timeout: 268 seconds]
cartdrige has joined #ruby
toshiba__ has quit [Ping timeout: 268 seconds]
crux73 has joined #ruby
toshiba__ has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
crux73 has quit [Ping timeout: 246 seconds]
cartdrige has joined #ruby
toshiba__ has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
grokify has joined #ruby
<adam12> morning
jpn has quit [Ping timeout: 246 seconds]
jpn has joined #ruby
grokify has quit [Ping timeout: 248 seconds]
eddof13 has joined #ruby
_73 has joined #ruby
drainpipe has joined #ruby
drainpipe has quit [Client Quit]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jpn has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
grokify has joined #ruby
_73 has left #ruby [ERC (IRC client for Emacs 27.2)]
wand has quit [Quit: leaving]
wand has joined #ruby
grokify has quit [Remote host closed the connection]
jpn_ has joined #ruby
grokify has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
grokify has quit [Ping timeout: 248 seconds]
polishdub has joined #ruby
eddof13 has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
crux73 has joined #ruby
cartdrige has quit [Ping timeout: 246 seconds]
crux73 has quit [Ping timeout: 250 seconds]
nirvdrum has joined #ruby
hellstabber has joined #ruby
cAMP has left #ruby [#ruby]
splud has quit [Ping timeout: 252 seconds]
royo25 has quit [Quit: Bye]
reset has quit [Quit: reset]
pgib has quit [Ping timeout: 246 seconds]
grokify has joined #ruby
splud has joined #ruby
grokify has quit [Ping timeout: 248 seconds]
nirvdrum has quit [Quit: nirvdrum]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
darkstardevx has quit [Remote host closed the connection]
grokify has quit [Ping timeout: 252 seconds]
grokify has joined #ruby
darkstardevx has joined #ruby
nirvdrum has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
darkstardevx has quit [Max SendQ exceeded]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
jpn_ has quit [Ping timeout: 252 seconds]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
pgib has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
nirvdrum has quit [Quit: nirvdrum]
nirvdrum has joined #ruby
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
jpn has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
Vonter has quit [Quit: WeeChat 3.7]
Vonter has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
<rapha> evening :)
jpn has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
ua_ has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
___nick___ has joined #ruby
dionysus69 has joined #ruby
darkstardevx has joined #ruby
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #ruby
pgib has quit [Quit: 00 PC LOAD LETTER]
pgib has joined #ruby
<staff420> rapha: Hi!
sgt_chuckles has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
<sgt_chuckles> any python programmers here? I recently learned about Enumerators, and implemented an iterator method in a repository class, to iterate over database records like this: https://bpa.st/YDEA
<sgt_chuckles> I assume it works the same as a python generator, but not entirely sure.
eddof13 has joined #ruby
<sam113101> are there ruby libraries to colorize/bolderize/italize text in a terminal?
pgib has quit [Read error: Connection reset by peer]
markong has quit [Ping timeout: 248 seconds]
<sgt_chuckles> the example in ruby does one thing in that it allows you to declare a function that behaves like an iterator, but not sure if it gives (on demand) generation of values, which translates to lower memory usage, like generators do in python.
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<sgt_chuckles> low-level feature parity
___nick___ has joined #ruby
<adam12> sam113101: check out the ttytoolkit project. https://ttytoolkit.org
___nick___ has quit [Client Quit]
jpn has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
___nick___ has joined #ruby
eddof13 has joined #ruby
grokify has joined #ruby
grokify_ has joined #ruby
grokify has quit [Read error: Connection reset by peer]
jpn has quit [Ping timeout: 268 seconds]
ua_ has quit [Read error: Connection reset by peer]
<aestheti1> sgt_chuckles didn't click your link but check out Enumerable #lazy
<aestheti1> that example is using Rails's find_each which pulls 1000 records at a time
<aestheti1> so, your worst case memory usage should be around `data_source.all.limit(1000).to_a`
jpn has joined #ruby
<havenwood> sgt_chuckles: How many records do you expect to be fetched at a time? Is it most likely more than 1,000?
<sgt_chuckles> ideally one at a time. I was told `find_each` is more efficient that `.all` There are 72000 records in total
<sgt_chuckles> if its more space efficient to get 1000 at a time, then it's fine
<aestheti1> You probably don't want to do one at a time because that is going to be super slow and inefficient w.r.t. db access
<aestheti1> what you have there in the snippet is good
<sgt_chuckles> okay, thats good to know
TomyWork has quit [Remote host closed the connection]
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
ua_ has joined #ruby
grokify_ has quit [Remote host closed the connection]
jpn has quit [Ping timeout: 260 seconds]
howdoi has joined #ruby
sgt_chuckles has quit [Quit: Client closed]
jpn has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 252 seconds]
jpn has quit [Ping timeout: 250 seconds]
nirvdrum has joined #ruby
<adam12> I think find_each is paged per 1000, isn't it? At least for ActiveRecord.
_ht has joined #ruby
cartdrige has joined #ruby
jpn has joined #ruby
<aestheti1> by default yes that is truthy
nirvdrum has quit [Quit: nirvdrum]
<aestheti1> it delegates to find_in_batches
<aestheti1> which is by default batch_size: 1000
grokify has joined #ruby
<adam12> aestheti1: Ah. I didnt' see you said that earlier.
<aestheti1> np
<adam12> I have selective reading apparently :)
<aestheti1> i think we were talking over eachother
<aestheti1> was a good opportunity to review the docs anyway
<aestheti1> I was looking to see if it used #lazy internally but it doesnt, although what find_in_batches does and lazy do are sort of orthogonal
<aestheti1> but the way it is implemented it wouldn't fetch another 1000 until you go through the first batch
<aestheti1> so its kind of like a lazy1000
<aestheti1> well not really I guess if you keep chaining stuff onto the end, if you do end up needing to do a ruby select or something that calls to_a on the relation you end up getting the whole collection, I think
<aestheti1> e.g. Something.find_each.to_a is no different than Something.all.to_a (probably?)
<aestheti1> in fact it would probably be worse because it would hit the db more times
<aestheti1> anyway thats another topic for another day
crux73 has joined #ruby
grokify has quit [Ping timeout: 252 seconds]
___nick___ has quit [Ping timeout: 250 seconds]
cartdrige has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Ping timeout: 268 seconds]
Guimauve has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
<adam12> I wonder why the Observable module has a two-step notification process (changed, notify_observers).
ur5us_ has joined #ruby
nirvdrum has joined #ruby
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #ruby
<adam12> You'd think notify_observers would be enough...
grokify has joined #ruby
<adam12> Or rather, I'm surprised there isn't a method that just does both. Oh well.
RougeR has joined #ruby
rvalue has quit [Ping timeout: 260 seconds]
grokify has quit [Ping timeout: 250 seconds]
some14u has joined #ruby
_ht has quit [Quit: _ht]
Guimauve has quit [Quit: The Lounge - https://thelounge.chat]
Guimauve has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
rvalue has joined #ruby
toshiba__ has joined #ruby
crux73 has quit [Ping timeout: 252 seconds]
<staff420> Is there a better way to write this? if rand(0..1) == 1; puts "Hello World! (maybe)"; end
<staff420> if [true, false].sample; puts "Hello World! (maybe)"; end probably
crux73 has joined #ruby
kjetilho has left #ruby [#ruby]
cartdrige has joined #ruby
toshiba__ has quit [Ping timeout: 268 seconds]
crux73 has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Ping timeout: 252 seconds]
<weaksauce> staff420 eh the second kinda conveys meaning more so than the first but neither is all that great i guess.
Na_Klar has joined #ruby
<Na_Klar> Is there a way to InstructionSequence.compile_file() including all required/loaded files?
<staff420> weaksauce: True that (no pun intended)
markong has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
crux73 has joined #ruby
gproto23 has joined #ruby
toshiba__ has joined #ruby
cartdrige has quit [Ping timeout: 264 seconds]
crux73 has quit [Ping timeout: 252 seconds]
crux73 has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
gproto23 has quit [Remote host closed the connection]
toshiba__ has quit [Ping timeout: 252 seconds]
toshiba__ has joined #ruby
crux73 has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #ruby
crux73 has joined #ruby
toshiba__ has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Ping timeout: 250 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toshiba__ has joined #ruby
crux73 has quit [Ping timeout: 260 seconds]
crux73 has joined #ruby
toshiba__ has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
crux73 has quit [Ping timeout: 260 seconds]
otisolsen70 has quit [Quit: Leaving]
walez has joined #ruby
crux73 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
hightower2 has joined #ruby
toshiba__ has joined #ruby
grokify has joined #ruby
crux73 has quit [Ping timeout: 264 seconds]
grokify has quit [Ping timeout: 252 seconds]
sgt_chuckles has joined #ruby
walez has quit [Ping timeout: 252 seconds]
sgt_chuckles has quit [Quit: Client closed]
shokohsc has quit [Read error: Connection reset by peer]
shokohsc has joined #ruby
John_Ivan has quit [Remote host closed the connection]
John_Ivan has joined #ruby
crux73 has joined #ruby
toshiba__ has quit [Ping timeout: 264 seconds]
grokify has joined #ruby
cartdrige has joined #ruby
crux73 has quit [Ping timeout: 260 seconds]
grokify has quit [Ping timeout: 260 seconds]
RetroPunk has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
reset has joined #ruby
RetroPunk has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Client Quit]