havenwood changed the topic of #ruby to: Ruby 3.4.3, 3.3.8 https://www.ruby-lang.org | Log https://libera.irclog.whitequark.org/ruby
rvalue has quit [Ping timeout: 252 seconds]
Perflosopher0387 has quit [Ping timeout: 248 seconds]
fantazo has quit [Ping timeout: 272 seconds]
mahlon has quit [Ping timeout: 272 seconds]
ftajhii has quit [Ping timeout: 248 seconds]
ih8u has quit [Ping timeout: 248 seconds]
ih8u has joined #ruby
o0x1eef has joined #ruby
rvalue has joined #ruby
mahlon has joined #ruby
fantazo has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 252 seconds]
ih8u2 is now known as ih8u
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 252 seconds]
ih8u2 is now known as ih8u
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 252 seconds]
ih8u2 is now known as ih8u
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 272 seconds]
ih8u2 is now known as ih8u
wbooze has quit [Quit: Leaving]
wbooze has joined #ruby
FetidToot has quit [Read error: Connection reset by peer]
nikkys has quit [Ping timeout: 272 seconds]
nikkys has joined #ruby
zphinx has quit [Ping timeout: 252 seconds]
zphinx has joined #ruby
o0x1eef has quit [Ping timeout: 272 seconds]
o0x1eef has joined #ruby
vigumnov has joined #ruby
victori has quit [Ping timeout: 248 seconds]
kerzhak has quit [Quit: ZNC 1.9.1 - https://znc.in]
kerzhak has joined #ruby
Fridtjof has quit [Quit: ZNC - http://znc.in]
Fridtjof has joined #ruby
Vonter has quit [Ping timeout: 245 seconds]
Vonter has joined #ruby
oznek__ has joined #ruby
oznek_ has quit [Ping timeout: 244 seconds]
oznek__ has quit [Remote host closed the connection]
mange has joined #ruby
jmcantrell has quit [Ping timeout: 244 seconds]
ih8u has quit [Remote host closed the connection]
ih8u has joined #ruby
schne1der has joined #ruby
grenierm has joined #ruby
andy-turner has joined #ruby
andy-turner has quit [Remote host closed the connection]
andy-turner has joined #ruby
<nakilon> here is example of how new docs suck
<nakilon> I want to use a ffi-related snippet; it defined a Ruby module, extends it with FFI::Library, and so on; I want to have the module anonymous, so I google: "ruby module new"
<nakilon> 3 search results are blacklisted by me already via browser extension uBlacklist, and the 6th result is https://docs.ruby-lang.org/en/3.4/syntax/modules_and_classes_rdoc.html
<nakilon> so I hit this page that looks more like a book that a reference documentation; yes, having such official book is nice, but I wanted to see a documentation on a specific stdlib method Module::new
<nakilon> so I ctrl+F, "module.new" -- 0 results; "okay, where is this method?" I think, and click the "Methods" https://i.imgur.com/abQMnNo.png -- what?
<nakilon> maybe I need to scroll down? under the Module-related pages there is a block "Pages" and what's what? LEGAL? bsearch? where am I?! the whole idea of having a topic-specific block of pages ABOVE the list of ALL pages is a pure insanity
<nakilon> I don't even know how to get back here if I click in some another page from that list
<nakilon> and I still have no idea where is there _actual Module documentation_
<nakilon> and with this insane line spacing I feel like I'm on a Sony Ericsson GPRS WAP forum and 24'' monitor was a useless thing to buy
<nakilon> looks like I have to type "module::new" into a search input field; are you aware of how not many people know how to type this? most of the coders don't know the difference between # and ::, they never document things to ever spend a time to learn this 'language'
<nakilon> but even if I type it in, the link I need to click is at the very bottom of the page, why the hell? https://i.imgur.com/pxElgaz.png
<nakilon> do you even think it is trivial to screenshot this? no! I'm on macos and once I start pressing the keys that are supposed to do nothing (control, shift, ...) for a screenshot shortcut, the page changes -- why?!
<nakilon> once I put my fingers on control and shift, it jumps to god knows where: https://i.imgur.com/HMLXGqr.png
<nakilon> even Confluence looks good after this
<mange> When I enter "module new" (without the quotes) in the search box on https://docs.ruby-lang.org/en/3.4/ then Module.new is the fifth result (and is pretty prominent, with its size).
<mange> And if I use a search engine to search for "ruby anonymous module" then the third result is the docs.ruby-lang.org page for Module, where I can ctrl+f for "anonymous" and am taken immediately to the right method.
<mange> I admit that I expected Module.new to work in the search box on docs.ruby-lang.org. I think that should work, given you can define methods using "def Module.new".
<nakilon> why in search results the "new()" and "Module" are on different lines (and with spacing)? with this veeeeery low contrast <hr> between the search results you have to figure out it is one result, not two
<mange> Couldn't tell you.
<nakilon> for example, this is a starting point that I'm thinking to bookmark https://www.rubydoc.info/stdlib/core/index because old docs looked more like this
<nakilon> there I can find the ::new without search input field
<mange> You mean by clicking on Module? I can't see "new" anywhere on that page.
<nakilon> but the website glithches when I press 'back'
<nakilon> mange: yes, first clicking on Module
<nakilon> then I scroll to "constructor details" or ctrl+f, whatever
<mange> Right, but if you already know you're looking for Module, you can just type that in the top-left box of docs.ruby-lang.org and hit enter, right?
<nakilon> with the glitches of rubydoc.info I would love to see the stdlib docs on gemdocs, but they are not there AFAIK
royo25 has joined #ruby
cappy has joined #ruby
infinityfye has joined #ruby
infinityfye has quit [Remote host closed the connection]
infinityfye has joined #ruby
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 248 seconds]
ih8u2 is now known as ih8u
grenierm has quit [Ping timeout: 240 seconds]
schne1der has quit [Ping timeout: 272 seconds]
schne1der has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
schne1der has quit [Ping timeout: 248 seconds]
schne1der has joined #ruby
lirion has quit [Quit: ヾ(ʘ‿ʘ)]
lirion has joined #ruby
cappy has quit [Quit: Leaving]
schne1der has quit [Ping timeout: 260 seconds]
<moo> damn i love how elegant "redo" is in ruby loops. is there any other lang that has it? none that i know..
<moo> inb4 "goto" ;)
brokkoli_origin has quit [Ping timeout: 276 seconds]
andy-turner has quit [Quit: Leaving]
andy-turner has joined #ruby
schne1der has joined #ruby
andy-turner has quit [Remote host closed the connection]
brokkoli_origin has joined #ruby
<o0x1eef> Python doesn't have it?
infinityfye has quit [Killed (NickServ (GHOST command used by infinityfye__!~infinityf@154.180.128.224))]
infinityfye__ has joined #ruby
infinityfye__ is now known as infinityfye
schne1der has quit [Ping timeout: 260 seconds]
schne1der has joined #ruby
wbooze has quit [Quit: Leaving]
wbooze has joined #ruby
wbooze has quit [Quit: Leaving]
<moo> "#{"foo" if true}" this broke me :)
wbooze has joined #ruby
schne1der has quit [Ping timeout: 252 seconds]
wbooze has quit [Quit: Leaving]
GreenResponse has joined #ruby
schne1der has joined #ruby
Inline has joined #ruby
wbooze has joined #ruby
wbooze has quit [Max SendQ exceeded]
wbooze has joined #ruby
wbooze has quit [Max SendQ exceeded]
wbooze has joined #ruby
kerzhak has quit [Ping timeout: 264 seconds]
<CalimeroTeknik> ("foo" if true) is a correct expression but not (nil else "bar")?
<mange> (nil or "bar")?
<CalimeroTeknik> fair enough!
<CalimeroTeknik> ("foo" if false or "bar") does not work though, but with more parens it does
<CalimeroTeknik> that feels a little bit baroque
o0x1eef has quit [Ping timeout: 265 seconds]
schne1der has quit [Ping timeout: 260 seconds]
schne1der has joined #ruby
Sheilong has joined #ruby
mange has quit [Quit: Zzz...]
brokkoli_origin has quit [Ping timeout: 248 seconds]
infinityfye has quit [Ping timeout: 245 seconds]
infinityfye has joined #ruby
sleetdrop has quit [Quit: ZNC 1.8.2+deb2ubuntu0.1 - https://znc.in]
sleetdrop has joined #ruby
brokkoli_origin has joined #ruby
royo25 has quit [Quit: Goodbye cruel world]
kerzhak has joined #ruby
kerzhak has quit [Remote host closed the connection]
kerzhak has joined #ruby
Evil-Bob has quit [Quit: The Lounge - https://thelounge.chat]
Evil-Bob has joined #ruby
Evil-Bob has quit [Client Quit]
<moo> CalimeroTeknik (nil unless "bar") works too
Evil-Bob has joined #ruby
<moo> ("foo" if false or "bar") seems to work fine tho?
user71 has joined #ruby
infinityfye has quit [Killed (NickServ (GHOST command used by infinityfye__))]
infinityfye__ has joined #ruby
infinityfye__ is now known as infinityfye
<havenwood> CalimeroTeknik: A `:foo if false or :bar` is flow control like a `:foo if :bar unless false` or `false or :bar and :foo`, in the if/else & and/or variants.
<havenwood> If you're not actually doing flow control, boolean logic precedence may be less likely to bite you: false || :bar && :foo
<havenwood> (When mixed with assignment, etc.)
schne1der has quit [Ping timeout: 248 seconds]
fantazo has quit [Quit: Lost terminal]
kerzhak has quit [Quit: ZNC 1.9.1 - https://znc.in]
kerzhak has joined #ruby
Tempesta has quit [Quit: See ya!]
inline_ has joined #ruby
wbooze_ has joined #ruby
wbooze has quit [Ping timeout: 245 seconds]
Inline has quit [Ping timeout: 268 seconds]
naiithink has joined #ruby
naiithink has quit [Client Quit]
kerzhak has quit [Remote host closed the connection]
andy-turner has joined #ruby
kerzhak has joined #ruby
tubbo has joined #ruby
kerzhak has quit [Quit: ZNC 1.9.1 - https://znc.in]
kerzhak has joined #ruby
mikko has joined #ruby
lucasb has joined #ruby
<mikko> is there a more elegant way to do command pipelines in ruby than abusing strings like system("a '#{a_arg1}' | b '#{b_arg1}' '#{b_arg2}' | c")
<mikko> API like `spawn([a, a_arg1]) | spawn([b, b_arg1, b_arg2]) | spawn([c])` would be nice but i couldn't find anything like that
user71 has quit [Quit: Leaving]
<weaksauce> mikko open3#pipeline?
<mikko> weaksauce: ooh nice, thanks!
inline_ has quit [Quit: Leaving]
wbooze_ has quit [Quit: Leaving]
infinityfye has quit [Read error: Connection reset by peer]
andy-turner has quit [Quit: Leaving]
<CalimeroTeknik> moo, try ("foo" if true or "bar")
<CalimeroTeknik> I mean… ("foo" if false or "bar") doesn't evaluate to "bar"
<moo> ah yeah it returns foo
<moo> well i am disappointed i can't override false (FalseClass) to equal true :P
<moo> best i can do is override false.to_s :P
wbooze has joined #ruby
FetidToot has joined #ruby
<mikko> moo: don't let anyone tell you what you can't do: class FalseClass; def ==(other) = other==true; end
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
jmcantrell has joined #ruby
GreenResponse has quit [Quit: Leaving]
wbooze_ has joined #ruby
wbooze is now known as Guest599
Guest599 has quit [Killed (tantalum.libera.chat (Nickname regained by services))]
wbooze_ is now known as wbooze
Guest599 has joined #ruby
Inline has joined #ruby
kerzhak has quit [Ping timeout: 264 seconds]
Inline has quit [Quit: Leaving]
jmcantrell has quit [Ping timeout: 252 seconds]
infernix has quit [Ping timeout: 252 seconds]
infernix has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]