adam12 changed the topic of #ruby to: Ruby 3.3.1, 3.2.4, 3.1.5 https://www.ruby-lang.org | Logs https://libera.irclog.whitequark.org/ruby
desnudopenguino has quit [Ping timeout: 272 seconds]
desnudopenguino has joined #ruby
wyclif has joined #ruby
wyclif has quit [Ping timeout: 260 seconds]
finsternis has joined #ruby
jenrzzz has joined #ruby
wyclif has joined #ruby
TomyLobo has quit [Ping timeout: 268 seconds]
wyclif has quit [Ping timeout: 252 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
wyclif has joined #ruby
wand has joined #ruby
wyclif has quit [Ping timeout: 260 seconds]
<zayd> https://bpa.st/CIWA trying to put the function gr33n7007h gave me into a class, and it says "undefined local variable or method `parse_lspci_output' for class Rubyfetch::GPU (NameError)", i'm assuming i missed something obvious here?
wand has quit [Remote host closed the connection]
wand has joined #ruby
wyclif has joined #ruby
wyclif has quit [Ping timeout: 264 seconds]
wyclif has joined #ruby
pascal_blaze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
pascal_blaze has joined #ruby
Guest18 has joined #ruby
Guest18 has quit [Client Quit]
jenrzzz has quit [Ping timeout: 245 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
<weaksauce> zayd yes
<weaksauce> you are setting it on the class itself
<weaksauce> def initialize and do it there on an instance
<zayd> i changed the function to initialize
<weaksauce> no
<zayd> oh
<weaksauce> the @gpus part
<weaksauce> attr_reader :gpus
<weaksauce> def initialize; @gpus = ... ; end
<weaksauce> GPU.new.gpus
<zayd> hold on i'm kind of lost here
<zayd> so i add the attr_reader, put @gpus into initialize(), and then what?
<weaksauce> use it
<weaksauce> create a new gpu and use the var
<zayd> weaksauce: i put `puts "GPUs: #{GPU.class_eval '@gpus', __FILE__, __LINE__}"`, but it doesn't print anything. i assume at this point it would be best to just create the classes normally instead of doing this :p
<zayd> yeah i'll do that
<weaksauce> x = GPU.new
<weaksauce> x.gpus
<zayd> yep it worked
<zayd> i just need to iterate the values and then i'm done with that part
<zayd> sorry for always seeming so braindead in here btw, i'm still kind of new to ruby and am often going on less than 4 hours of sleep lol
<weaksauce> no worries
<zayd> oh god apparently sandisk drives fit the "3D" regex due to weird branding, i'll fix that later on though as it seems easy to do
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
konsolebox has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
pascal_blaze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
_ht has joined #ruby
XV8 has joined #ruby
_ht has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 252 seconds]
grenierm has joined #ruby
osc4rpt has quit [Ping timeout: 245 seconds]
osc4rpt has joined #ruby
fercell_ has quit [Quit: ZNC - https://znc.in]
fercell has joined #ruby
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
wyclif has quit [Ping timeout: 245 seconds]
Trivial has joined #ruby
wyclif has joined #ruby
gaussianblue has joined #ruby
<leftylink> pandabot: rb require 'prime'; (1..100).select(&:prime?).repeated_combination(6).map(&:sum).select { |x| x.prime? &
<pandabot> stderr: -e:3: syntax error, unexpected `end' - exit 1 - https://carc.in/#/r/groj
<leftylink> pandabot: rb require 'prime'; (1..100).select(&:prime?).repeated_combination(6).map(&:sum).select { |x| x.prime? && x < 100}.tally
<pandabot> stderr: playpen: application terminated abnormally with signal 31 (Bad system call) - exit 1 - https://carc.in/#/r/grok
<leftylink> you are kidding me sir
<leftylink> and how ignominious that I got it on an ID that is an actual word
oz has quit [Remote host closed the connection]
ox has joined #ruby
<leftylink> you know what, it must be because I asked for too many things at once
<leftylink> pandabot rb require 'prime'; (1..100).select(&:prime?).repeated_combination(6).lazy.filter_map { |x| s = x.sum; s if s.prime? && s < 100 }.tally
<pandabot> {13=>1, 17=>3, 23=>6, 29=>11, 41=>27, 47=>38, 53=>53, 71=>112, 83=>171, 89=>207, 19=>3, 31=>12, 43=>29, 59=>70, 73=>117, 79=>141, 37=>20, 61=>73, 67=>92, 97=>249} - https://carc.in/#/r/gror
<leftylink> thank you, interesting. that is quite a few
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
desnudopenguino1 has joined #ruby
grenierm has quit [Quit: Client closed]
desnudopenguino has quit [Ping timeout: 268 seconds]
desnudopenguino1 is now known as desnudopenguino
jenrzzz has joined #ruby
wyclif has quit [Quit: leaving]
jenrzzz has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
donofrio__ has joined #ruby
donofrio_ has quit [Ping timeout: 240 seconds]
georgemp has quit [Quit: ZNC - https://znc.in]
georgemp has joined #ruby
pascal_blaze has joined #ruby
desnudopenguino has quit [Ping timeout: 245 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
donofrio__ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
donofrio has joined #ruby
pascal_blaze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
crespire1 has quit [Ping timeout: 240 seconds]
Trivial has quit [Ping timeout: 255 seconds]
XV8 has quit [Quit: Konversation terminated!]
Pixi` has joined #ruby
Pixi has quit [Ping timeout: 252 seconds]
desnudopenguino has joined #ruby
ox is now known as oz
user71 has joined #ruby
Trivial has joined #ruby
_ht has joined #ruby
olus has quit [Quit: No Ping reply in 120 seconds.]
olus has joined #ruby
lucerne has quit [Quit: Ping timeout (120 seconds)]
lucerne has joined #ruby
___nick___ has joined #ruby
Trivial has quit [Ping timeout: 252 seconds]
ken_barber has joined #ruby
gaussianblue has quit [Quit: leaving]
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 256 seconds]
desnudopenguino1 is now known as desnudopenguino
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
moo has quit [Quit: moo]
moo has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
con3 has joined #ruby
con3 has quit [Remote host closed the connection]
con3 has joined #ruby
<adam12> Has anybody shipped anything notable in mruby? If so, how was the experience?
con3 has quit [Quit: ZNC 1.8.2 - https://znc.in]
con3 has joined #ruby
TomyLobo has joined #ruby
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
konsolebox has quit [Quit: .]
rvalue- has joined #ruby
rvalue has quit [Ping timeout: 256 seconds]
rvalue- is now known as rvalue
ken_barber has quit [Quit: Client closed]
___nick___ has quit [Ping timeout: 260 seconds]
polishdub has quit [Ping timeout: 252 seconds]
user71 has quit [Quit: Leaving]
konsolebox has joined #ruby
_ht has quit [Remote host closed the connection]
Perflosopher has joined #ruby
<havenwood> leftylink: Since Ruby's Prime is so slow I might even not use it to check for primes on the second pass. 🤦 I think Ruby should just switch to mame's faster_prime gem as the default Prime.
<havenwood> valid = Prime.take_while { |prime| prime < 100 }
<havenwood> (valid & valid.repeated_combination(6).map(&:sum).filter { |sum| sum < 100 }).tally
<weaksauce> havenwood any issue made on the bug tracker for that idea?
<mooff> adam12: there's https://dragonruby.org/
reffle has quit [Remote host closed the connection]
reffle has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
dstein64- has joined #ruby
jenrzzz has joined #ruby
dstein64 has quit [Ping timeout: 264 seconds]
dstein64- is now known as dstein64
<adam12> mooff: Have you used it at all?
<adam12> Is anyone going to Rails World
<havenwood> weaksauce: There are a few issues about making Prime faster, but apparently as a "hobby library" folk want Prime to stay simple. https://bugs.ruby-lang.org/issues/16468
<havenwood> I think anything in stdlib should be recommendable for use, personally. Mere examples don't need to be in user space.
<havenwood> I'd rather have no Prime in stdlib rather than an overly simple implementation that performs very poorly.
<havenwood> Way more folk are using Prime compared to folk gazing at the simple code. The faster_prime library is simply better.
<havenwood> Ruby stdlib isn't generally good examples of Ruby code, so I think we should focus on correctness and performance rather than "hobby" and "for fun" code.
<havenwood> Or at least document that things like #curry won't ever work properly, since they're "for fun" and not real. You wouldn't guess from the docs.
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
<havenwood> Prime should at the minimum mention it's intentionally simple and give faster_prime a shoutout as what you should use if you really want a pure Ruby Prime library with the stdlib interface.
<havenwood> I'd rather make these things real or remove them, but documenting the jokes and just for fun or example stuff would be nice.
hwpplayer1 has joined #ruby
konsolebox has quit [Quit: .]
r3m has quit [Ping timeout: 272 seconds]
r3m has joined #ruby
hwpplayer1 has quit [Quit: I'll be back tomorrow]
donofrio_ has joined #ruby
donofrio has quit [Ping timeout: 255 seconds]
r3m has quit [Ping timeout: 255 seconds]
r3m has joined #ruby