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
bastienleonard has quit [Ping timeout: 240 seconds]
desnudopenguino has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 268 seconds]
jpn has quit [Ping timeout: 255 seconds]
crundar has quit [Quit: Client closed]
jpn has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
s-liao-2000 has joined #ruby
ur5us has joined #ruby
John_Ivan_ has quit [Read error: Connection reset by peer]
John_Ivan has joined #ruby
jl- has joined #ruby
jl- has quit [Ping timeout: 255 seconds]
jhass has quit [Ping timeout: 248 seconds]
perrierjouet has quit [Quit: WeeChat 3.5]
perrierjouet has joined #ruby
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
wand has quit [Ping timeout: 268 seconds]
wand has joined #ruby
jpn has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.5]
perrierjouet has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
jhass has joined #ruby
kiki_lamb has joined #ruby
onyx has quit [Read error: Connection reset by peer]
jl- has joined #ruby
jl- has quit [Ping timeout: 246 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 246 seconds]
Ziyan has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
jpn has joined #ruby
dionysus69 has joined #ruby
jpn has quit [Ping timeout: 255 seconds]
dostoyevsky2 has quit [Ping timeout: 272 seconds]
bastelfreak has quit [Ping timeout: 272 seconds]
dostoyevsky2 has joined #ruby
bastelfreak has joined #ruby
sagax has joined #ruby
stylo has joined #ruby
jl- has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
jl- has quit [Ping timeout: 268 seconds]
jpn has quit [Ping timeout: 256 seconds]
jpn has joined #ruby
rvalue has quit [Ping timeout: 260 seconds]
rvalue has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
teclator has joined #ruby
jpn has quit [Ping timeout: 246 seconds]
Rounin has joined #ruby
TomyWork has joined #ruby
_ht has joined #ruby
sympt6 has joined #ruby
sympt has quit [Ping timeout: 260 seconds]
sympt6 is now known as sympt
Ziyan has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jpn has joined #ruby
protektwar has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 268 seconds]
Vayl has joined #ruby
<Vayl> Just a quick hello as this is the first time I join this channel 👋🏼💎
protektwar has joined #ruby
protektwar has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
Furai has quit [Quit: WeeChat 3.5]
dionysus69 has joined #ruby
Ziyan has joined #ruby
Vayl has quit [Quit: Client closed]
s-liao-2000 has quit [Quit: Client closed]
Furai has joined #ruby
Ziyan has quit [Ping timeout: 268 seconds]
Ziyan has joined #ruby
jpn has quit [Quit: Lost terminal]
dionysus69 has quit [Read error: Connection reset by peer]
sam113101 has quit [Quit: WeeChat 3.5]
sam113101 has joined #ruby
Ziyan has quit [Ping timeout: 264 seconds]
Ziyan has joined #ruby
Ziyan_ has joined #ruby
Ziyan has quit [Ping timeout: 256 seconds]
jpn has joined #ruby
jl- has joined #ruby
jl- has quit [Ping timeout: 246 seconds]
markong has joined #ruby
ur5us has joined #ruby
stylo has quit [Quit: Connection closed for inactivity]
dionysus69 has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
fcser has quit [Excess Flood]
fcser has joined #ruby
marahin has joined #ruby
jl- has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
dionysus70 is now known as dionysus69
jl- has quit [Ping timeout: 256 seconds]
jpn has quit [Ping timeout: 246 seconds]
gproto23 has joined #ruby
s-liao-2000 has joined #ruby
Ziyan_ has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
Ziyan has joined #ruby
s-liao-2000 has quit [Quit: Client closed]
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ixti has joined #ruby
Ziyan has joined #ruby
<ixti> Hi all. Does anybody have thoughts on / experience with semantic_logger?
<ixti> Curious about the problems and workarounds you may have come with.
jl- has joined #ruby
jl- has quit [Ping timeout: 268 seconds]
Ziyan_ has joined #ruby
Ziyan has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Ping timeout: 255 seconds]
moldorcoder7 has joined #ruby
CrazyEddy has quit [Ping timeout: 255 seconds]
siery has joined #ruby
yCrazyEdd has joined #ruby
protektwar has quit [Ping timeout: 272 seconds]
bit4bit has joined #ruby
artyn has joined #ruby
siery has quit [Quit: WeeChat 3.5]
gproto23 has quit [Read error: Connection reset by peer]
dviola has joined #ruby
jl- has joined #ruby
jl- has quit [Ping timeout: 246 seconds]
dviola has quit [Quit: WeeChat 3.5]
bastienleonard has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Remote host closed the connection]
_aeris_ is now known as aeris
dviola has joined #ruby
szkl has joined #ruby
jl- has joined #ruby
jl- has quit [Ping timeout: 268 seconds]
dviola has quit [Quit: WeeChat 3.5]
dviola has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
TomyWork has quit [Quit: Leaving]
foxxesStar has quit [Ping timeout: 255 seconds]
foxxesStar has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
markong has quit [Ping timeout: 255 seconds]
desnudopenguino has joined #ruby
John_Ivan has quit [Ping timeout: 246 seconds]
John_Ivan has joined #ruby
jl- has joined #ruby
jl- has quit [Ping timeout: 268 seconds]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
Exuma has joined #ruby
Exuma has quit [Client Quit]
constxd has joined #ruby
John_Ivan_ has joined #ruby
John_Ivan has quit [Ping timeout: 240 seconds]
Ziyan_ has quit [Ping timeout: 268 seconds]
Ziyan has joined #ruby
protektwar has quit [Ping timeout: 248 seconds]
Ziyan has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
ur5us has joined #ruby
cocalero has joined #ruby
Ziyan has quit [Ping timeout: 255 seconds]
Ziyan has joined #ruby
jl- has joined #ruby
jl- has quit [Ping timeout: 256 seconds]
constxd has quit [Ping timeout: 255 seconds]
Ziyan has quit [Ping timeout: 264 seconds]
Guest69 has joined #ruby
Ziyan has joined #ruby
cocalero has quit [Ping timeout: 246 seconds]
Vonter has quit [Ping timeout: 246 seconds]
Guest69 has quit [Quit: Client closed]
perrierjouet has quit [Quit: WeeChat 3.5]
wand has quit [Remote host closed the connection]
wand has joined #ruby
Ziyan has quit [Ping timeout: 268 seconds]
Ziyan has joined #ruby
bit4bit has quit [Quit: Leaving]
ur5us has quit [Ping timeout: 268 seconds]
_ht has quit [Remote host closed the connection]
perrierjouet has joined #ruby
Ziyan has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
victori has quit [Ping timeout: 255 seconds]
jl- has joined #ruby
Ziyan has quit [Ping timeout: 272 seconds]
Ziyan has joined #ruby
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
jl- has quit [Ping timeout: 256 seconds]
gproto23 has joined #ruby
jpn has quit [Quit: Lost terminal]
swaggboi has joined #ruby
Na_Klar has joined #ruby
gproto23 has quit [Remote host closed the connection]
<Na_Klar> "hello\ntest".split(" ") => ["hello", "test"] ... that's just insane. sorry. and some people wonder why developers dislike high-level languages.
erblack has joined #ruby
markong has joined #ruby
erblack is now known as erb
jpn has joined #ruby
<weaksauce> > If pattern is a single space, str is split on whitespace, with leading and trailing whitespace and runs of contiguous whitespace characters ignored.
<Na_Klar> insane.
<weaksauce> "hello\ntest".split(/ /) => ["hello\ntest"]
<Na_Klar> "hello\ntest".split("\u0032") => ["hello\ntest"] ... brilliant
<weaksauce> it's from awk
<weaksauce> > As another special case, split emulates the default behavior of the command line tool awk when the PATTERN is either omitted or a string composed of a single space character (such as ' ' or "\x20", but not e.g. / /). In this case, any leading whitespace in EXPR is removed before splitting occurs, and the PATTERN is instead treated as if it were /\s+/; in particular, this means that any contiguous whitespace (not just a single space
<weaksauce> character) is used as a separator.
<Na_Klar> useless overkill
<weaksauce> k
<Na_Klar> </rant>
erb has quit [Quit: Client closed]
yCrazyEdd is now known as willow
joshcom has joined #ruby
joshcom has quit [Quit: Leaving]
joshcom has joined #ruby
<ixti> Na_Klar: what would you expect "hello\ntest".split("\u0032") to return? o_O
<Na_Klar> ixti, read the whole context
<ixti> Na_Klar: I did, and still not sure what's wrong with the result
<Na_Klar> nothing. \u0032 works as expected. it's just insane that you have to use char-codes to get the expected result, just because some parameter (!) is doing obscure magic.
<ixti> You don't have to use char codes
ur5us has joined #ruby
<ixti> "hello\ntest".split("#") => ["hello\ntest"]
<ixti> ignore me
<Na_Klar> no ... you didn't get it
<ox1eef_> their point is that " " is understood as \n, and it's a valid one to be air
<ox1eef_> fair*
<ixti> I dyslexic I guess :D
<ixti> I read U+0023
<Na_Klar> I see, nvm
<ixti> ox1eef_: I agree about " "
<ixti> Na_Klar: On the other hand `U+0032` is 2 :D
<ixti> "hello\ntest".split("\u0020") => ["hello", "test"]
victori has joined #ruby
<ixti> Regardless if you pass "\u0020" or "\x20" or " " it's the same
<ox1eef_> it's still wacky behavior, and turns the simple case into something totally unexpected.
<Na_Klar> ixti: oh you are right, then even using a char-code does not avoid the magic
<ixti> Well, it depends on what to consider magic :D
<Na_Klar> imo you can't do that with a parameter. ok, you could make an own method for it. "hello\ntest".fairy_tale_split() .. why not? but do I have now to read every single api reference to be sure that some parameter will not do obscure things? that's too much of "usability".
<ixti> Documentation is pretty clear on String#split :D
joshcom has quit [Ping timeout: 255 seconds]
<gr33n7007h> ^ this
<weaksauce> it was inherited from perl which inherited it from awk
<weaksauce> since ruby is very perl based it makes sense
<ox1eef_> so, what's the alternative? how is the case handled to only split on " " ?
<Na_Klar> then it was stupid also in perl in awk. you can't let do parameters stuff, dependant on how you write them. a " " is a straight char.
<Na_Klar> ox1eef_: apperantly you can use .split(/ /)
<ox1eef_> good to know
<ixti> ox1eef_: you supposed to use regexp, yeah
<ox1eef_> documentation or not, history or not, i don't see that as a good API. it's error prone.
<ixti> Na_Klar: How would you know the signature of a method without reading documentation? o_O
<ixti> guess based development? :D
<Na_Klar> actually, I think I won't use split() anymore at all. what also is odd about ruby's split is that: "hello\n".split("\n") => ["hello"] .. in any other language I know it would be ["hello", ""]
victori has quit [Ping timeout: 240 seconds]
<Na_Klar> which is a straigt loss of information, because I cannot disgingiush "hello\n" from "hello" anymore, after the split.
<ixti> Na_Klar: it seems like you're actually looking for `String#lines`
<Na_Klar> no, that has nothing do to with "\n"
victori has joined #ruby
<Na_Klar> could be any other char
<ixti> Oh I got what you mean.
<weaksauce> if you read the docs you can pass in -1 to have the information you are looking for
<gr33n7007h> Na_Klar: to get that behavior you have to pass a limit to split, which would be -1 in your case.
<weaksauce> by default it omits null
<Na_Klar> good lord .. more magic
<ixti> Na_Klar: how's that magic?
desnudopenguino1 has joined #ruby
<ixti> I really don't understand how's documented parameters handling is magic :D
<weaksauce> it isn't
<weaksauce> it was a design decision
desnudopenguino has quit [Ping timeout: 268 seconds]
desnudopenguino1 is now known as desnudopenguino
<Na_Klar> ... some very "apple-ish" design, as it seems to me
<ixti> I mean, I agree that probably keyword args would be be more readable :D
vigumnov has joined #ruby
victori has quit [Read error: Connection reset by peer]
<ixti> And it might be that method is not suitable for some specific cases...