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>
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?!
<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
<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]
<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