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!
BSaboia has joined #ruby
dualfade has joined #ruby
`brian has quit [Quit: WeeChat 1.9.1]
`brian has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
ph88 has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
oddp_ has quit [Ping timeout: 265 seconds]
ph88 has quit [Ping timeout: 272 seconds]
segy has quit [Excess Flood]
segy has joined #ruby
dualfade has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 260 seconds]
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
mikhailnovikov has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
elphe has quit [Ping timeout: 246 seconds]
elphe has joined #ruby
dualfade has joined #ruby
roshanavand__ has joined #ruby
elphe has quit [Ping timeout: 240 seconds]
roshanavand_ has quit [Ping timeout: 272 seconds]
ur5us has joined #ruby
drincruz has joined #ruby
_whitelogger has joined #ruby
wymillerlinux has joined #ruby
dualfade has quit [Ping timeout: 240 seconds]
drincruz has quit [Ping timeout: 256 seconds]
FrankyCyborg has quit [Quit: The Sleep Monster got me!]
elphe has joined #ruby
cd has quit [Quit: cd]
gix has quit [Ping timeout: 256 seconds]
cthu| has quit [Ping timeout: 264 seconds]
drincruz has joined #ruby
NightMonkey has quit [Quit: ZNC - http://znc.in]
howdoi has quit [Quit: Connection closed for inactivity]
NightMonkey has joined #ruby
NightMonkey has quit [Quit: ZNC - http://znc.in]
NightMonkey has joined #ruby
wildtrees has quit [Quit: Leaving]
DTZUZU_ has joined #ruby
DTZUZU has quit [Ping timeout: 264 seconds]
arturyx has joined #ruby
arturyx has quit [Client Quit]
bamdad has quit [Remote host closed the connection]
bamdad has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
braincrash has quit [Quit: bye bye]
Exuma has joined #ruby
braincrash has joined #ruby
drincruz has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dualfade has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
postmodern has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
fabio_ has joined #ruby
MadLamb has quit [Ping timeout: 260 seconds]
drincruz has quit [Ping timeout: 272 seconds]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
bruce_lee has quit [Ping timeout: 272 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
howdoi has joined #ruby
cthu| has joined #ruby
ChmEarl has quit [Quit: Leaving]
plutes has quit [Quit: If you judge me now, you have judge me prematurely.]
alfiemax has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wymillerlinux has quit [Read error: Connection reset by peer]
DTZUZU_ is now known as DTZUZU
graphicsv has quit [Quit: Connection closed for inactivity]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
roadie has joined #ruby
bsdbandit-01 has joined #ruby
mossplix has joined #ruby
schne1der has joined #ruby
mossplix has quit [Ping timeout: 240 seconds]
roadie has quit [Ping timeout: 272 seconds]
roadie has joined #ruby
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
roadie has quit [Ping timeout: 260 seconds]
Mikaela has quit [Ping timeout: 258 seconds]
s2013 has quit [Quit: Textual IRC Client: www.textualapp.com]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
cthu| has quit [Ping timeout: 258 seconds]
arturyx has joined #ruby
arturyx has quit [Client Quit]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
cloaked1 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mikhailnovikov has joined #ruby
roadie has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
roadie has quit [Ping timeout: 260 seconds]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
dionysus69 has joined #ruby
BenDover has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
Uncle_Cid has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
UncleCid has quit [Ping timeout: 240 seconds]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
bsdbandit-01 has joined #ruby
cnsvc has quit [Remote host closed the connection]
cnsvc has joined #ruby
Furai has quit [Quit: WeeChat 2.8]
alexherbo2 has joined #ruby
sonne has joined #ruby
Furai has joined #ruby
bocaneri has quit [Ping timeout: 256 seconds]
bocaneri has joined #ruby
jetchisel has joined #ruby
pankaj_ has joined #ruby
mossplix has joined #ruby
ua has quit [Read error: Connection reset by peer]
ua_ has joined #ruby
roadie has joined #ruby
robert__ has joined #ruby
Uncle_Cid has quit [Ping timeout: 258 seconds]
pankaj_ has quit [Ping timeout: 246 seconds]
pankaj_ has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
howdoi has quit [Quit: Connection closed for inactivity]
apteryx is now known as Guest68538
Guest68538 has quit [Killed (tepper.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
roadie has quit [Ping timeout: 272 seconds]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
deathwishdave has joined #ruby
mossplix has quit [Remote host closed the connection]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
roadie has joined #ruby
ph88 has joined #ruby
oddp_ has joined #ruby
mossplix has joined #ruby
mozzarel1 has joined #ruby
mozzarella has quit [Read error: Connection reset by peer]
mozzarel1 is now known as mozzarella
schne1der has quit [Ping timeout: 256 seconds]
jinmiaol1 has joined #ruby
jinmiaol1 has quit [Client Quit]
jinmiaol1 has joined #ruby
jinmiaol1 has quit [Client Quit]
jinmiaol1 has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
jinmiaol1 has quit [Remote host closed the connection]
jinmiaoluo has joined #ruby
jinmiaoluo has quit [Client Quit]
jinmiaoluo has joined #ruby
jinmiaoluo has quit [Quit: WeeChat 2.8]
jinmiaoluo has joined #ruby
jinmiaoluo has quit [Client Quit]
jinmiaoluo has joined #ruby
mikhailnovikov has quit [Ping timeout: 272 seconds]
pankaj_ has quit [Quit: Leaving]
arzWZM has quit [Ping timeout: 264 seconds]
arzWZM has joined #ruby
_whitelogger has joined #ruby
ellcs has joined #ruby
mixfix41 has joined #ruby
cnsvc has quit [Quit: WeeChat 2.8]
imode has quit [Ping timeout: 256 seconds]
mikhailnovikov has joined #ruby
mikkus has joined #ruby
mika_ has joined #ruby
nayena has joined #ruby
sagax has quit [Quit: Konversation terminated!]
ellcs has quit [Ping timeout: 260 seconds]
sagax has joined #ruby
fabio_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
AndreYuhai has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
vondruch_ is now known as vondruch
jinmiaoluo has left #ruby ["WeeChat 2.8"]
schne1der has joined #ruby
alexherbo2 has quit [Ping timeout: 272 seconds]
fercell has joined #ruby
MasterNayru has quit [Quit: No Ping reply in 180 seconds.]
MasterNayru has joined #ruby
nayena has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nayena has joined #ruby
drincruz has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
alexherbo2 has joined #ruby
fercell has joined #ruby
markoong has joined #ruby
_whitelogger has joined #ruby
alexherbo2 has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 260 seconds]
fercell has quit [Ping timeout: 264 seconds]
fercell has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
markong has joined #ruby
markoong has quit [Ping timeout: 246 seconds]
nayena has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz has quit [Ping timeout: 272 seconds]
ph88 has quit [Ping timeout: 260 seconds]
drincruz has joined #ruby
nayena has joined #ruby
ph88 has joined #ruby
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 258 seconds]
vondruch_ is now known as vondruch
nayena has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexherbo2 has joined #ruby
nayena has joined #ruby
deathwishdave has quit [Quit: Textual IRC Client: www.textualapp.com]
TCZ has joined #ruby
Uncle_Cid has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
ph88 has quit [Quit: Leaving]
drincruz has joined #ruby
robert__ has quit [Ping timeout: 264 seconds]
nayena has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Uncle_Cid is now known as pwnd_nsfw
mossplix has quit [Remote host closed the connection]
fercell has quit [Ping timeout: 240 seconds]
dviola has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
fercell has quit [Ping timeout: 265 seconds]
fowl has joined #ruby
fercell has joined #ruby
mossplix has joined #ruby
cd has joined #ruby
<AndreYuhai> How can I see what headers are sent when I make a request with Mechanize?
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<AndreYuhai> Because I am still not sure how the headers are sent. Like do cookies set previously get sent?
<AndreYuhai> I was always passing my own headers.
roadie has quit [Ping timeout: 260 seconds]
fercell has quit [Ping timeout: 260 seconds]
maidhc has joined #ruby
fercell has joined #ruby
<AndreYuhai> To my surprise, log file works for that purpose.
maidhc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
markong has quit [Ping timeout: 240 seconds]
markoong has joined #ruby
dviola has joined #ruby
<apteryx> Would someone know at what stage the file lib/ruby/vendor_ruby/cache/pkg/package-version.gem is produced? Probably during 'gem install' but I'm not sure. Is it possible to prevent installing this cached gem altogether?
dviola has quit [Ping timeout: 256 seconds]
drincruz has joined #ruby
roadie has joined #ruby
schne1der has quit [Ping timeout: 260 seconds]
roadie has quit [Ping timeout: 256 seconds]
dviola has joined #ruby
<al2o3-cr> AndreYuhai: you can view the request headers with a hook.
<al2o3-cr> AndreYuhai: agent.pre_connect_hooks << -> (_agent, req) { req.each_header { |field, value| puts "#{field} ::: #{value}" } }
dviola has left #ruby [#ruby]
dviola has joined #ruby
<AndreYuhai> al2o3-cr, oh I didn't know about that. Better than checking the log file. Thank you :)
<al2o3-cr> AndreYuhai: welcome.
govg has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
fercell has joined #ruby
baojg has quit [Remote host closed the connection]
fercell has quit [Ping timeout: 240 seconds]
baojg_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
TCZ has quit [Quit: Leaving]
fercell has joined #ruby
roadie has joined #ruby
wymillerlinux has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
kktt007 has joined #ruby
roshanavand__ has quit [Remote host closed the connection]
roshanavand__ has joined #ruby
postmodern has quit [Quit: Leaving]
lxsameer has joined #ruby
nayena has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
mika_ has quit [Quit: Leaving]
mikkus has joined #ruby
troulouliou_div2 has joined #ruby
TCZ has joined #ruby
nayena has quit [Ping timeout: 272 seconds]
mossplix has quit [Remote host closed the connection]
markong has joined #ruby
markoong has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Leaving]
SeepingN has joined #ruby
regedit has joined #ruby
testbot47 has joined #ruby
testbot47 has quit [Remote host closed the connection]
mikkus has quit [Quit: Leaving]
davispuh has joined #ruby
ChmEarl has joined #ruby
mossplix has joined #ruby
robotmay has quit [Ping timeout: 258 seconds]
robotmay has joined #ruby
BSaboia has joined #ruby
Esa__ has joined #ruby
kktt007 has left #ruby ["WeeChat 2.8"]
duderonomy has quit [Ping timeout: 256 seconds]
cthu| has joined #ruby
nate48423 has quit [Ping timeout: 244 seconds]
nate48423 has joined #ruby
markong has quit [Ping timeout: 240 seconds]
troulouliou_div2 has quit [Quit: Leaving]
duderonomy has joined #ruby
schne1der has joined #ruby
fercell has quit [Quit: WeeChat 2.8]
alexherbo2 has quit [Ping timeout: 272 seconds]
russt has quit [Quit: That's all, folks!]
russt has joined #ruby
baojg_ has quit [Remote host closed the connection]
baojg has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
mossplix_ has joined #ruby
mossplix has quit [Ping timeout: 256 seconds]
drincruz has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
drincruz has joined #ruby
lxsameer has joined #ruby
nate48423 has quit [Ping timeout: 246 seconds]
nate48423 has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndreYuhai has quit [Quit: Leaving]
ximovai has joined #ruby
howdoi has joined #ruby
imode has joined #ruby
alfiemax has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
alfiemax_ has quit [Ping timeout: 260 seconds]
Technodrome has joined #ruby
ellcs has joined #ruby
alexherbo2 has joined #ruby
mossplix_ has quit [Remote host closed the connection]
mossplix has joined #ruby
alfiemax has quit [Ping timeout: 258 seconds]
r29v has joined #ruby
alfiemax has joined #ruby
DEac- has quit [Quit: Reconnecting]
DEac- has joined #ruby
xco has joined #ruby
DEac- has quit [Client Quit]
DEac- has joined #ruby
DEac- has quit [Client Quit]
DEac- has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
wymillerlinux has quit [Ping timeout: 258 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
DEac- has quit [Quit: Reconnecting]
DEac-_ has joined #ruby
DEac-_ is now known as DEac-
bsdbandit-01 has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
akem has quit [Ping timeout: 246 seconds]
DEac- has quit [Quit: Reconnecting]
DEac- has joined #ruby
ellcs has quit [Ping timeout: 256 seconds]
regedit has quit [Quit: Connection closed for inactivity]
akem has joined #ruby
maidhc has joined #ruby
maidhc has quit [Client Quit]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maidhc has joined #ruby
cthu| has quit [Read error: Connection reset by peer]
DEac- has quit [Quit: leaving]
cthu| has joined #ruby
DEac- has joined #ruby
skx86 has quit [Quit: Connection closed for inactivity]
xco has joined #ruby
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
alfiemax has joined #ruby
maidhc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 240 seconds]
cnsvc has joined #ruby
lmat has joined #ruby
<lmat> Am I a retard or does it take extra mental effort to read "unless"?
<adam12> yes
<apotheon> No?
<apotheon> I mean, I wouldn't use it in complex conditionals, but if it's just a simple "unless" it seems the same as "if" to me, in terms of readability.
<adam12> lmat: It's generally in the eye of the beholder, but personally I'll only use `unless` in postfix scenarios with a very clean predicate.
<apotheon> I find "unless" better for readability than "if not" or "if !", personally.
<apotheon> If there's an else involved, though, I'll just reverse the order of "if" and "else" or something like that, generally.
<apotheon> Like I said, I like "unless" for only simple cases.
<adam12> I'll reach for `if !` if it's a block almost always. My brain decomposes the intent a bit easier than `unless`.
<adam12> Again, I think it's definitely developer dependent. Some people just read it differently.
<adam12> But for someting simple like `do_work unless busy?` the postfix `unless` works well.
<xco> when i do `?x` I get "w" back
<xco> why can't i do it for a whole world? like `?world` to get "world"
<havenwood> &>> 'world'.chr
<rubydoc> # => "w" (https://carc.in/#/r/9f2h)
<havenwood> # => "x"
<xco> havenwood thanks but that's not answering my question i think :D
<havenwood> xco: ?x is a character literal :O
<havenwood> xco: so just one chr
<xco> got it
<xco> can i join many char literals together?
<xco> havenwood like say ?someletters
<xco> to get "someletters"?
mikhailnovikov has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<adam12> xco: What are you looking to achieve at a higher level?
<xco> adam12 nothing. just experimenting :)
<xco> i somehow felt there could be a nifty way to join many characters together
<leftylink> it's too bad because
<leftylink> as you know, you can do
<leftylink> &>> 'a' 'b'
<rubydoc> # => "ab" (https://carc.in/#/r/9f2i)
<leftylink> but you cannot do the same with ?
<leftylink> &>> ?a ?b
<rubydoc> stderr: -e:5: syntax error, unexpected `end', expecting ':'... check link for more (https://carc.in/#/r/9f2j)
<xco> havenwood usually knows these kinds of tricks
<leftylink> NOPE
<leftylink> SO
<leftylink> so, I dunno
<adam12> leftylink: I thought so too. Had to check.
<leftylink> of course, one can do something like
<leftylink> &>> %w(a b c).join
<rubydoc> # => "abc" (https://carc.in/#/r/9f2k)
<leftylink> but that is hardly the same thing
<leftylink> not the same thing at all, in fact
<lmat> Okay, so it's just me (regarding "unless") :-)
<lmat> Every time I see it, I think "hmm, unless means if not...right? Yeah, I think so. Wait...yeah. Yeah, it does. If not, okay."
<leftylink> will use unless, but will get angry if someone uses unless-else because come on
skx86 has joined #ruby
<adam12> imho, I find unless as a block run the risk of double negation too, when people start getting lazy when updating code. Just tack on this crazy conditional to the end of the already crazy conditional. It's team dependent and not specifically because of `unless` but I find it happen with more frequency.
<leftylink> would I be happy if there were an elsunless... I... will think about that
<lmat> leftylink: I'll sit for five minutes reading that :-P
alfiemax has quit [Ping timeout: 258 seconds]
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
maidhc has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
<havenwood> xco: You can do `'s' 'o' 'm' 'e'` but not `?s ?o ?m ?e`. The character literal is actually disfavored, for a few reasons.
<havenwood> xco: The bigger problem is folk got hung up on the 1.8-to-1.9 difference in behavior.
<havenwood> xco: It fell out of favor in 1.9 and has never regained prominence since there's a perception it has no added value.
<havenwood> &>> 's' 'o' 'm' 'e'
<rubydoc> # => "some" (https://carc.in/#/r/9f2o)
<havenwood> &18>> ?x
<rubydoc> # => "x" (https://carc.in/#/r/9f2p)
<havenwood> xco: Matz has mentioned its removal as a feature but I believe it was decided it wasn't worth fixing all the random code that uses it.
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
<havenwood> xco: I personally kinda like the character literal, but the community consensus is to hate them.
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
<xco> yeah i've seen many places that discourages it's use. though i haven't found a solid reason people don't want to use it havenwood
bsdbandit-01 has joined #ruby
canton7 has quit [Quit: ZNC - http://znc.in]
canton7 has joined #ruby
<havenwood> xco: The reason in my opinion is the breaking change in Ruby 1.9.
<havenwood> xco: Something that doesn't work in 1.8 and 1.9 falls out of favor when moving forward.
<xco> havenwood oh i see. this things are hard to deal with
gix has joined #ruby
<havenwood> xco: In Ruby 1.8 and earlier...: ?a #=> 97
<havenwood> xco: It went from #chr to #ord.
<havenwood> xco: Other way around, I mean - #ord to #chr.
<havenwood> &>> 'world'.ord
<rubydoc> # => 119 (https://carc.in/#/r/9f2r)
<havenwood> &>> ?w.ord
<rubydoc> # => 119 (https://carc.in/#/r/9f2s)
<havenwood> &>> ?w
<rubydoc> # => "w" (https://carc.in/#/r/9f2t)
<havenwood> xco: Used to be `119` and now it's `"w"`.
<havenwood> xco: There was no compelling reason to keep using character literals, but nobody wanted to use something that breaks on 1.8 and confuses folk.
<havenwood> xco: Now... 1.8 is gone. We probably shouldn't care, but folk just remember "avoid character literals" and not the why.
<havenwood> They don't bother me.
<xco> so i'd say iti's perfectly safe to keep them right?
<havenwood> Live in the now!
<xco> they don't seem to be a problem at all
<xco> who uses 1.8 now anyway?
<xco> link in production
<havenwood> time travelers
<xco> hahhaaa
<xco> next tiem i see someone discouraging it's use i'd ask "WHY?"
<xco> actually i saw people talking about this on rubocop
<havenwood> The why is a historical 1.9.
<havenwood> xco: It fell out of favor due to 1.8 legacy and *was* scheduled for removal in 3.0.
schne1der has quit [Ping timeout: 258 seconds]
<xco> got it
<havenwood> I never bought into the call for removal. I just don't care. Removing is super painful so I expect to have character literals for possibly long enough that they fall back in favor. :P
BenDover has quit [Quit: BenDover]
<xco> good thinking :D
<havenwood> They'll survive 3.0. If they survive 4.0 I expect folk will have forgotten 1.8.
<xco> definitely
shokohsc has joined #ruby
<adam12> 4.0 ....
<adam12> I wonder if 3.0 ETA has moved at all
<havenwood> adam12: Christmas!
<havenwood> adam12: (But which Christmas?)
<adam12> Indeed.
<adam12> havenwood: Have you been playing with steep at all? Seems like it's moving at a decent pace.
bambanx has joined #ruby
<havenwood> adam12: Trunk is still named "2.8" but release plans are still 3.0. If 2.8 renames to 3.0 we'll know Matz' decision.
<havenwood> adam12: Yes, love Steep in VSCode. Sooooo cool. :D
<adam12> havenwood: Yeah? I'm on VS Code now so I'll have to give it a try.
akem has quit [Remote host closed the connection]
<havenwood> adam12: I'm really please I was able to recruit the Ruby core member working on types with baweaver's help, and that Square can support his work.
<adam12> havenwood: Yeah that's awesome.
<havenwood> adam12: https://github.com/ruby/rbs
<havenwood> adam12: Steep is certainly further along but I really wish type-profiler worked on large codebases: https://github.com/mame/ruby-type-profiler
<havenwood> Level 1 type checker ftw.
<havenwood> I'm glad Sorbet is moving from RBI to RBS support too. RBS \o/
<havenwood> No announcement to drop RBI yet, but seems inevitable?
<adam12> I haven't been able to use Sorbet yet. No FreeBSD release, and once I moved back to Linux for devel, couldnt' get `sorbet init` to finish.
linuus[m] has joined #ruby
akem has joined #ruby
lmat has quit [Ping timeout: 256 seconds]
markong has joined #ruby
lmat has joined #ruby
<deimos_> Hi, i'm trying to understand what i'm seeing. Say you're parsing 10-50GB webserver logs with ruby. IO.readlines(logfile).lazy.each do... still reads the file into an anonymous array in memory, right?
<havenwood> adam12: It doesn't work on 2.7, so meh.
<havenwood> adam12: C++ >.>
<deimos_> versus, say, IO.foreach(logfile) which basically "streams" a file one new line at a time into a block
<havenwood> deimos_: Yeah, just the `IO.readlines(logfile)` is already an Array of the full file in memory.
<havenwood> deimos_: The subsequent #lazy doesn't change that.
<deimos_> the code with IO.readlines is throwing memory errors
<havenwood> deimos_: Yeah, #readlines reads all lines into memory at once.
<deimos_> ok, what's that array called if not explicitly assigned to anything? anonymous array? temporary array?
<deimos_> undefined array?
<havenwood> deimos_: I'd say transient, but it's just the same as if you did: lines_in_memory = IO.readlines(logfile); line_in_memory.lazy...
<deimos_> ok
roshanavand__ has quit [Ping timeout: 240 seconds]
<deimos_> i did understand it correctly, just not clear terminology
<havenwood> deimos_: Yes, seems so.
<deimos_> going to add a comment to make sure next person doesn't try to go back to "IO.readlines"
roshanavand has joined #ruby
<deimos_> since i've changed all their code to IO.foreach(logfile)
<deimos_> IO.foreach.lazy seems, silly to me
markoong has joined #ruby
arzWZM has quit [Ping timeout: 240 seconds]
arzWZM has joined #ruby
<havenwood> deimos_: It depends, I suppose. I you don't need lazy enumeration then I agree it's not needed.
markong has quit [Ping timeout: 272 seconds]
<havenwood> If you don't*
<havenwood> deimos_: I'd say "IO::readlines returns an Array of all lines, reading the entire file into memory."
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<deimos_> trying to understand their mindset, i suspect the original person thought IO.readlines(logfile).lazy created an enumerator and didn't load it into an array because they didn't define a name for the array
<deimos_> it does create an enumerator, but also an array
<havenwood> deimos_: Yup, it certainly seems they were simply mistaken about how it works.
<havenwood> deimos_: Yeah, the #lazy is simply too late. An Array with all lines in memory has already been returned by the previous method in the method chain.
<deimos_> yeah, thanks for confirming my suspicions
<havenwood> any time
maidhc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<deimos_> for comic relief, in reading this code, I couldn't wrap my head around this "hash", Visitor.new("user agent","ipaddress","returncode", "bytessent")
<deimos_> until i realized way too late that it was a struct
ur5us has joined #ruby
maidhc has joined #ruby
<havenwood> deimos_: There's discussion of adding a Struct literal in Ruby 3, speaking of.
<havenwood> ${user: "user agent", ip_address: '5.5.5.5'}
<havenwood> Anonymous Struct
maidhc has quit [Client Quit]
<deimos_> hmm
<deimos_> i use openstruct for lots of stuff, but structs are much, much faster
<deimos_> afaict, openstruct is written in ruby and struct in c
<havenwood> deimos_: OpenStruct has a fundamental problem of breaking the method cache if you're defining members at runtime too.
<havenwood> deimos_: Though it was made faster in recent Rubies. It was optimized around the time of Ruby 2.5 IIR.
elphe has quit [Ping timeout: 240 seconds]
maidhc has joined #ruby
oneeggeach has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
MrCrackPot has joined #ruby
mossplix has quit [Read error: Connection reset by peer]
cfjk9 has joined #ruby
cfjk has quit [Read error: Connection reset by peer]
cfjk9 is now known as cfjk
mossplix has joined #ruby
maidhc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maidhc has joined #ruby
alexherbo2 has quit [Ping timeout: 256 seconds]
postmodern has joined #ruby
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
oneeggeach has quit [Quit: Leaving...]
cliluw has quit [Ping timeout: 258 seconds]
cliluw has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
troulouliou_dev has joined #ruby
maidhc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 264 seconds]
thegeekinside has joined #ruby
thegeekinside_ has joined #ruby
mossplix has quit [Remote host closed the connection]
evert has quit [Quit: ZNC - https://znc.in]
evert| has joined #ruby
evert| is now known as evert
venmx has joined #ruby
thegeekinside has quit [Quit: Leaving]
thegeekinside_ has quit [Quit: Leaving]
thegeekinside has joined #ruby
thegeekinside has quit [Remote host closed the connection]
_whitelogger has joined #ruby
orbyt_ has joined #ruby
oncall-pokemon has quit [Quit: Connection closed for inactivity]
Omnilord has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby