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
crankharder has joined #ruby
protektwar has quit [Remote host closed the connection]
sam113101 has quit [Ping timeout: 246 seconds]
protektwar has joined #ruby
protektwar has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
crankharder has joined #ruby
crankharder has quit [Client Quit]
TCZ is now known as proportions
proportions has quit [Quit: Tcl has many different data types, not just strings.]
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
<ox1eef> adam12: rubydoc.info does indeed use .yardopts, but it seems to not pick up my template. im not sure if that is a bug, or for security reasons.
roadie has joined #ruby
<ox1eef> another helpful resource was the source for the 'default' gem: https://github.com/lsegal/yard/tree/main/templates/default/ - most directories have a setup.rb file that can be used to alter the default template without changing the template itself, i thought that was cool
<ox1eef> s/gem/template/
<ox1eef> if i was picking between rdoc and yard, id probably choose yard, because each part of the default template can be hooked into and changed. that makes it easy for small improvements and the like, much less work than a whole new template.
o|||||o has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
Vonter has joined #ruby
jhass has quit [Ping timeout: 240 seconds]
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
FetidToot has quit [Quit: The Lounge - https://thelounge.chat]
FetidToot has joined #ruby
nirvdrum has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
FetidToot has quit [Quit: The Lounge - https://thelounge.chat]
FetidToot has joined #ruby
protektwar has quit [Quit: No Ping reply in 180 seconds.]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
Rounin has quit [Ping timeout: 246 seconds]
jhass has joined #ruby
nirvdrum has quit [Ping timeout: 248 seconds]
valeness_ has quit [Quit: WeeChat 2.3]
nirvdrum has joined #ruby
sunqiuqi has joined #ruby
Vonter has quit [Quit: WeeChat 3.5]
sunqiuqi has quit [Client Quit]
o|||||o has joined #ruby
entropie has quit [Quit: ""]
entropie has joined #ruby
o|||||o has quit [Read error: Connection reset by peer]
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
ua__ has quit [Ping timeout: 240 seconds]
nirvdrum has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nirvdrum has joined #ruby
ua__ has joined #ruby
totoro has quit [Quit: ZNC 1.8.2 - https://znc.in]
totoro has joined #ruby
nirvdrum has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nirvdrum has joined #ruby
nirvdrum has quit [Client Quit]
nirvdrum has joined #ruby
nirvdrum has quit [Client Quit]
totoro has quit [Quit: ZNC 1.8.2 - https://znc.in]
totoro has joined #ruby
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
idiocrash has joined #ruby
idiocrash_ has joined #ruby
idiocrash has quit [Ping timeout: 246 seconds]
comet23 has joined #ruby
<comet23> how can i take this regular expression stored in a variable and apply it to a regular expression search? https://bpa.st/ASTQ
<leftylink> since it is a string and it needs to become a regular expression, it seems that in this instance one should consider Regexp.new.
<leftylink> pandabot: ri Regexp.new
<leftylink> then it may be used like any other regular expression, such as those created from literals
<comet23> so like domains = Regexp.new { (www\.)?[a-z0-9-]+\.(com|net|org|io|)(\.[a-z]{2,3})? }
<comet23> or domains = "(www\.)?[a-z0-9-]+\.(com|net|org|io|)(\.[a-z]{2,3})?"
<comet23> regex = Regexp.new { domains }
ralu1 has quit [Quit: The Lounge - https://thelounge.chat]
ralu1 has joined #ruby
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
ralu1 has quit [Read error: Connection reset by peer]
ralu1 has joined #ruby
<comet23> my method doesn't work =/
<comet23> the regular expression works but the test cases are failing =*(
<leftylink> well, given the documentation of String#match, this should be completely unsurprising.
<leftylink> so, reading the documentation of String#match would be highly recommended in this situation.
<comet23> telling someone politely to rtfm is never helpful
taupiqueur has joined #ruby
idiocrash has joined #ruby
aesthetikx has quit [Ping timeout: 272 seconds]
idiocrash_ has quit [Ping timeout: 246 seconds]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby
comet23 has quit [Quit: Client closed]
_ht has joined #ruby
idiocrash_ has joined #ruby
idiocrash has quit [Ping timeout: 256 seconds]
___nick___ has joined #ruby
some14u has joined #ruby
roadie has joined #ruby
dionysus69 has joined #ruby
q3lont has joined #ruby
TCZ has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 256 seconds]
mixfix41 has quit [Quit: need to reboot]
taupiqueur has quit [Quit: taupiqueur]
dionysus69 has quit [Ping timeout: 246 seconds]
Rounin has joined #ruby
Vonter has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 256 seconds]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
TCZ has quit [Quit: Tcl has many different data types, not just strings.]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 256 seconds]
Tempesta has quit [Quit: See ya!]
crankharder has joined #ruby
gr33n7007h has quit [Ping timeout: 256 seconds]
crankharder has quit [Ping timeout: 246 seconds]
some14u has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crankharder has joined #ruby
hololeap has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
aesthetikx has joined #ruby
crankharder has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
TCZ has joined #ruby
cuppajoeman has quit [Ping timeout: 248 seconds]
cuppajoeman has joined #ruby
gr33n7007h has joined #ruby
mixfix41 has joined #ruby
<ox1eef> 20 years ago it wasn't done politely, that's progress.
crankharder has joined #ruby
roadie has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
<leftylink> well, I see my role to be one of helping others help themselves
<leftylink> I will do my best to do that. including reassessing when methods are not effective and replacing them with methods that are
crankharder has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
<leftylink> but, I do not think it would be wise to stray from that role
<leftylink> if being in this channel was a job, my job would be to put myself out of a job
<leftylink> so that once someone asks for help they'll never need to again
TCZ has quit [Quit: ...]
<ox1eef> adam12: another yardoc-template tweak, this time sorting the method list for a given module / class according to the line number where they are defined. this is a big improvement for me, it lets me arrange methods in the source code and see the same order in the doc listing: https://github.com/0x1eef/trip.rb/commit/d1df32ee7b95fad237b636eb9b16d9629cd6438c
<ox1eef> leftylink: that's fine, based on pastes and what they said, they probably need to spend more time learning the basics.
ssh073 has quit [Remote host closed the connection]
ssh073 has joined #ruby
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
oxfuxxx has quit [Ping timeout: 250 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
dionysus69 has joined #ruby
<ox1eef> came across a funny quote: 'LISP programmers know the value of everything, but the cost of nothing'.
hanzo has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
protektwar has quit [Remote host closed the connection]
finsternis has quit [Read error: Connection reset by peer]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
comet23 has joined #ruby
<comet23> how would i use any? to iterate over an array of hashes?
<comet23> how would i use any? to iterate over an array of hashes whose values are arrays?
TCZ has joined #ruby
idiocrash has joined #ruby
idiocrash_ has quit [Ping timeout: 256 seconds]
<ox1eef> comet23: what do you want to do exactly
<ox1eef> There's Hash#values, that would give you access to an array of arrays.
<ox1eef> it'd be easier to suggest something if you explain what the problem is you are trying to solve
<comet23> basically i have an array that looks like this [{ :name => "Chad", :numbers => [1, 3, 5]}, { :name => "Ryan", :numbers => [5, 3, 2]}]
<comet23> i want to use any to see if there are any numbers that are 1
<ox1eef> ary.any? { _1[:numbers].include?(1) }
<comet23> what is _1?
<ox1eef> it could also be: ary.any? { |p| p[:numbers].include?(1) }
crankharder has joined #ruby
<ox1eef> _1, _2, etc is a relatively new feature that provides access to block arguments without specifying them explicitly.
<comet23> is there a way of doing this with a comparison operator?
<ox1eef> probably, ary.any? { _1[:numbers] { |n| n == 1 } }
<ox1eef> woops
<ox1eef> probably, ary.any? { _1[:numbers].find { |n| n == 1 } }
<ox1eef> fixed.
crankharder has quit [Ping timeout: 246 seconds]
gr33n7007h has quit [Ping timeout: 246 seconds]
<comet23> thank you very much :)
<ox1eef> yw
<comet23> what is the reason behind using _1?
<ox1eef> it is nice in cases like this where i dont know the domain, and so using _1 instead of thinking up a name that makes sense is easier.
<comet23> that makes sense
gr33n7007h has joined #ruby
TCZ has quit [Quit: ...]
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
comet23 has quit [Quit: Client closed]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
sam113101 has joined #ruby
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
dionysus70 is now known as dionysus69
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
ur5us has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
kaivai has quit [Remote host closed the connection]
TCZ has joined #ruby
kaivai has joined #ruby
oxfuxxx has quit [Ping timeout: 248 seconds]
___nick___ has quit [Ping timeout: 246 seconds]
factor has quit [Read error: Connection reset by peer]
dionysus69 has quit [Read error: Connection reset by peer]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
hanzo has quit [Quit: Connection closed for inactivity]
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has joined #ruby
gramps has joined #ruby
_ht has quit [Remote host closed the connection]
xlymian has joined #ruby
TCZ has quit [Quit: ...]
xlymian has left #ruby [ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
TCZ has joined #ruby
TCZ has quit [Remote host closed the connection]
xlymian has joined #ruby
xlymian has quit [Remote host closed the connection]
hololeap has quit [Ping timeout: 240 seconds]
xlymian has joined #ruby
hololeap has joined #ruby
xlymian has quit [Quit: ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
idiocrash has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
oxfuxxx has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 250 seconds]
oxfuxxx has quit [Quit: [H]EAT ROX FUCK R0X SHIT BRIX.]
TCZ has joined #ruby
Sheilong has joined #ruby
q3lont has quit [Ping timeout: 240 seconds]
xlymian has joined #ruby
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
xlymian has quit [Read error: Connection reset by peer]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 248 seconds]
xlymian has joined #ruby
xlymian has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 250 seconds]