havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
chalkmonster has quit [Quit: WeeChat 2.8]
jenrzzz has quit [Ping timeout: 258 seconds]
r3m has quit [Quit: WeeChat 2.9-rc1]
r3m has joined #ruby
markong has quit [Read error: Connection reset by peer]
arzWZM has quit [Ping timeout: 240 seconds]
arzWZM has joined #ruby
ChmEarl has quit [Quit: Leaving]
Guest48 has joined #ruby
<mnathani> is || like BASH = for i in {1..10}; do $i; done?
<leftylink> I'm not sure I understood that question. in Ruby, || is the logical OR operator
<leftylink> since I suspect that's not the intended question, I look forward to a clarification of the question
<leftylink> so that it is actually possible to answer
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bamdad has quit [Remote host closed the connection]
bamdad has joined #ruby
<mnathani> I actually mean |test|
<leftylink> then it appears that when I answered this question yesterday
<leftylink> 2020-07-11 05:40:34 < leftylink> https://docs.ruby-lang.org/en/2.7.0/syntax/calling_methods_rdoc.html#label-Block+Argument
<leftylink> that my answer must have been deemed insufficient
<leftylink> I apologise that I was not able to give a sufficient answer at that time. I will retry.
<mnathani> I got confused with the multiple arguments
<leftylink> it is not possible, _in general_, to say how a function taking a block will use that block. one must consult the documentation or the source of that function. in some cases, it is obvious. like, with something like Array#each, it's obvious that the one block argument is each element of the array
<leftylink> &ri Hash#each
<leftylink> whereas we see from that documentation that for Hash#each, its two arguments are each key/value pair
<leftylink> if we weren't certain about Array#each, we would similarly look up its documentation to understand how the block would be used
<mnathani> Thank you. That makes more sense
prestorium has quit [Quit: prestorium]
prestorium has joined #ruby
<leftylink> you also wanted to know whether one can relate it to how `for` is written in other languages. it is true that the bash snippet `for i in {1..10}; echo $i` could be expressed in ruby as `(1..10).each { |i| puts i }`. so that is one way we can think about `each`. for other functions that take blocks, an equivalent in other languages would look different
jtdowney has left #ruby [#ruby]
jenrzzz has joined #ruby
<mnathani> is there a way to thread or parallel process things in ruby?
zacts has joined #ruby
<leftylink> it appears that you are not satisfied with the answers you received on 07-10. you should say why you are not satisfied. otherwise, what if someone gives you the exact same answer, and you have to say that you already got that answer before? then time will have been wasted.
<leftylink> I will provide some keywords that can be used as a starting point of a search. one might use Thread, built in to the ruby standard library. one might use the gem known as concurrent-ruby. one should be careful of the GVL, or some call it the GIL.
dviola has quit [Quit: WeeChat 2.8]
<leftylink> I am not comfortable providing further explanation without knowing what level of effort the querent has devoted to answering the question. it would not seem fair to me if I had to expend a lot of effort and the querent expends none.
arzWZM has quit [Ping timeout: 272 seconds]
arzWZM has joined #ruby
zacts has quit [Ping timeout: 240 seconds]
Guest48 has joined #ruby
<mnathani> I looked up concurrent-ruby and GVL so far and they look very helpful
<mnathani> I apologize for asking a lot of questions sometimes repeatedly
zacts has joined #ruby
Guest48 has quit [Ping timeout: 272 seconds]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
segy has quit [Ping timeout: 256 seconds]
segy has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
wymillerlinux has joined #ruby
comet23 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
greypack has joined #ruby
greypack has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
braincrash has quit [Quit: bye bye]
LtHummus has quit [Ping timeout: 272 seconds]
braincrash has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
arzWZM has quit [Ping timeout: 256 seconds]
arzWZM has joined #ruby
orbyt_ has joined #ruby
zacts_pi has joined #ruby
jenrzzz has joined #ruby
zacts has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
bruce_lee has quit [Ping timeout: 256 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
zacts_pi has quit [Ping timeout: 256 seconds]
ctOS has quit [Quit: Connection closed for inactivity]
alfiemax has quit [Ping timeout: 258 seconds]
zacts has joined #ruby
gix- has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
wymillerlinux has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
mheld has quit [Quit: Connection closed for inactivity]
polishdub has joined #ruby
Guest67237 has quit [Ping timeout: 264 seconds]
baweaver has joined #ruby
baweaver is now known as Guest37202
jenrzzz has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
zacts has quit [Ping timeout: 260 seconds]
polishdub has quit [Quit: leaving]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
comet23 has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 272 seconds]
alexherbo2 has joined #ruby
DTZUZU has quit [Ping timeout: 256 seconds]
DTZUZU has joined #ruby
zacts has joined #ruby
duderonomy has joined #ruby
govg has quit [Ping timeout: 272 seconds]
govg has joined #ruby
BenDover has joined #ruby
jenrzzz has joined #ruby
olblak has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
Industrial has joined #ruby
Industrial has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
davispuh has joined #ruby
chalkmonster has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
sagax has joined #ruby
jenrzzz has joined #ruby
<rapha> TIL "querent"
<rapha> good morning all
<rapha> hope everybody is having a wonderfully relaxing Sunday
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #ruby
tau has joined #ruby
tau has quit [Changing host]
tau has joined #ruby
oddp has joined #ruby
tau has quit [Remote host closed the connection]
davispuh has quit [Ping timeout: 272 seconds]
chalkmonster has quit [Quit: WeeChat 2.8]
_whitelogger has joined #ruby
zacts has quit [Ping timeout: 260 seconds]
Industrial has joined #ruby
greypack has joined #ruby
gix has joined #ruby
hiroaki has joined #ruby
<phaul> &ri Kernel#Array
<rubydoc> phaul: parser error at position 0 around `r'
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
<phaul> &ri Kernel#Array
<phaul> yay! :)
greypack has quit [Ping timeout: 272 seconds]
imode has quit [Ping timeout: 264 seconds]
cnsvc has quit [Ping timeout: 240 seconds]
greypack has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
arzWZM has quit [Ping timeout: 240 seconds]
arzWZM has joined #ruby
chalkmonster has joined #ruby
govg has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
dviola has joined #ruby
ho0po3 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
hiroaki has quit [Ping timeout: 272 seconds]
chalkmonster has quit [Quit: WeeChat 2.8]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
ho0po3 has quit [Quit: Leaving]
liKe2k1 has quit [Quit: ZNC - https://znc.in]
liKe2k1 has joined #ruby
TCZ has joined #ruby
markong has joined #ruby
Industrial has quit [Ping timeout: 258 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
jenrzzz has joined #ruby
TCZ has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 256 seconds]
markoong has joined #ruby
markong has quit [Ping timeout: 246 seconds]
mossplix has joined #ruby
ctOS has joined #ruby
prestorium has quit [Quit: prestorium]
kinduff has quit [Read error: Connection reset by peer]
mossplix has quit [Remote host closed the connection]
kinduff has joined #ruby
troulouliou_dev has joined #ruby
mossplix has joined #ruby
mossplix has quit [Remote host closed the connection]
troulouliou_dev has quit [Remote host closed the connection]
dviola has quit [Ping timeout: 272 seconds]
Industrial has joined #ruby
dionysus69 has quit [Remote host closed the connection]
mossplix has joined #ruby
dviola has joined #ruby
dviola has quit [Changing host]
dviola has joined #ruby
dviola has left #ruby [#ruby]
dviola has joined #ruby
hiroaki has joined #ruby
TCZ has joined #ruby
mossplix has quit [Remote host closed the connection]
AndreYuhai has joined #ruby
mozzarella has quit [Quit: WeeChat 2.8]
mozzarella has joined #ruby
FastJack has quit [Ping timeout: 256 seconds]
FastJack has joined #ruby
goepsilongo has joined #ruby
Industrial has quit [Read error: Connection reset by peer]
Industrial has joined #ruby
arzWZM has quit [Ping timeout: 258 seconds]
arzWZM has joined #ruby
Industrial has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Leaving]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
roshanavand has joined #ruby
oneeggeach has joined #ruby
yokel has quit [Ping timeout: 244 seconds]
roshanavand has quit [Client Quit]
oneeggeach has quit [Client Quit]
roshanavand has joined #ruby
yokel has joined #ruby
roshanavand has quit [Quit: Leaving]
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
AndreYuhai has quit [Quit: Leaving]
roshanavand has joined #ruby
Industrial has joined #ruby
roshanavand has quit [Client Quit]
roshanavand has joined #ruby
parallels has joined #ruby
roshanavand has quit [Client Quit]
roshanavand has joined #ruby
arzWZM has quit [Ping timeout: 256 seconds]
arzWZM has joined #ruby
jenrzzz has joined #ruby
reyfi9e has quit [Quit: Konversation term]
jenrzzz has quit [Ping timeout: 272 seconds]
BenDover has quit [Ping timeout: 264 seconds]
ajay has joined #ruby
<ajay> hi, I just entered this chat room, can't even tell whether this room is active or not.
<leah2> well, noone said something for the last 7h ;)
arzWZM has quit [Ping timeout: 246 seconds]
<ajay> oh, this seems to be active.What is difference between {:a=> 'hello'} and {"a":'hello'}?
arzWZM has joined #ruby
<havenwood> ajay: That's two ways of writing the same thing.
<havenwood> ajay: The more common, third way, to write it is: {a: 'hello'}
<havenwood> ajay: The key is the Symbol `:a` in all three cases.
<ajay> the strange thing is that, that works even if I've not defined that :a at all, and at the same time this is not a string.
<havenwood> ajay: A Symbol and String are different things. Your key `:a` is a Symbol and your value `"hello"` is a String.
<havenwood> &>> :a.class
<rubydoc> # => Symbol (https://carc.in/#/r/9eq8)
<havenwood> &>> 'hello'.class
<rubydoc> # => String (https://carc.in/#/r/9eq9)
<havenwood> &>> :a.to_s
<rubydoc> # => "a" (https://carc.in/#/r/9eqa)
<havenwood> &>> 'hello'.intern
<rubydoc> # => :hello (https://carc.in/#/r/9eqb)
<havenwood> ajay: {a: 'hello'}.keys #=> [:a]
<ajay> (by the way, I am using this chatroom over Hexchat on linux based laptop, which seems to be of 90s and I don't know much how to control like replying to a particular message and code formatting. Are there any other ways to access the same chat room?)
<havenwood> ajay: Any IRC client will do.
jottr has joined #ruby
<havenwood> ajay: You can even create your own client with Ruby, if you like.
<havenwood> ajay: Other off-the-shelf options include irssi, WeeChat, ERC, Smuxi, Quassel and mIRC.
<ajay> Thanks.
mossplix has joined #ruby
BH23 has quit [Ping timeout: 264 seconds]
comet23 has joined #ruby
chalkmonster has joined #ruby
ajay has quit [Quit: Leaving]
chalkmonster has quit [Client Quit]
BH23 has joined #ruby
BH23 has quit [Max SendQ exceeded]
troulouliou_dev has joined #ruby
mcon has joined #ruby
BH23 has joined #ruby
ChmEarl has joined #ruby
BH23 has quit [Max SendQ exceeded]
akem has quit [Ping timeout: 246 seconds]
BH23 has joined #ruby
BH23 has quit [Ping timeout: 265 seconds]
alexherbo2 has quit [Ping timeout: 272 seconds]
orbyt_ has joined #ruby
alfiemax has joined #ruby
imode has joined #ruby
BH23 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
goepsilongo has quit [Quit: Textual IRC Client: www.textualapp.com]
BenDover has joined #ruby
arcaos_ has quit [Remote host closed the connection]
arcaos has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
mossplix has quit [Remote host closed the connection]
davispuh has joined #ruby
akem has joined #ruby
Industrial has quit [Read error: Connection reset by peer]
Industrial` has joined #ruby
jenrzzz has joined #ruby
schne1der has joined #ruby
evdubs has quit [Ping timeout: 260 seconds]
mossplix has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
evdubs has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
LtHummus has joined #ruby
mossplix has quit [Remote host closed the connection]
Industrial` has quit [Read error: Connection reset by peer]
cnsvc has joined #ruby
roshanavand has quit [Quit: Leaving]
roshanavand has joined #ruby
skx86 has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
alfiemax has quit [Ping timeout: 272 seconds]
kristian_on_linu has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
prestorium has joined #ruby
BenDover has quit [Quit: BenDover]
wymillerlinux has joined #ruby
jenrzzz has joined #ruby
jetchisel has joined #ruby
markoong has quit [Ping timeout: 258 seconds]
markong has joined #ruby
prestorium has quit [Quit: prestorium]
jenrzzz has quit [Ping timeout: 256 seconds]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
prestorium has joined #ruby
schne1der has quit [Ping timeout: 265 seconds]
affix has joined #ruby
mcon has quit [Quit: mcon]
gavlee has quit [Ping timeout: 246 seconds]
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
akem_ has joined #ruby
akem_ has quit [Remote host closed the connection]
TCZ has joined #ruby
alexherbo2 has quit [Ping timeout: 272 seconds]
akem_ has joined #ruby
akem has quit [Ping timeout: 260 seconds]
Industrial` has joined #ruby
jenrzzz has joined #ruby
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
jenrzzz has quit [Ping timeout: 265 seconds]
nixy37179 has quit [Quit: The Lounge - https://thelounge.chat]
nixy37179 has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
affix has quit [Quit: Leaving]
markoong has joined #ruby
hiroaki has quit [Ping timeout: 272 seconds]
markong has quit [Ping timeout: 272 seconds]
kristian_on_linu has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
prestorium has quit [Quit: prestorium]
Industrial` has quit [Ping timeout: 272 seconds]
TCZ has quit [Quit: Leaving]
howdoi has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
gavlee has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
mostlybadfly has joined #ruby
thegeekinside_ has joined #ruby
oddp has quit [Ping timeout: 260 seconds]
markoong has quit [Ping timeout: 258 seconds]
thegeekinside_ has quit [Read error: Connection reset by peer]
skx86 has joined #ruby
ChmEarl has quit [Quit: Leaving]