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
henninb has joined #ruby
henninb has quit [Client Quit]
henninb has joined #ruby
henninb has quit [Client Quit]
henninb has joined #ruby
Aminda has quit [Read error: Connection reset by peer]
Aminda has joined #ruby
henninb has quit [Client Quit]
henninb has joined #ruby
jl- has quit [Ping timeout: 240 seconds]
henninb has quit [Client Quit]
henninb has joined #ruby
henninb has quit [Quit: leaving]
PedroG1 has joined #ruby
henninb has joined #ruby
henninb has quit [Client Quit]
henninb has joined #ruby
<PedroG1> How to test for strings like :'if ', 'if ', etc. s.start_with('if') says s='iffier'. This is a way to test for the token 'if'. The condition is that there are going to be whitespaces after 'if': space, tab, etc
henninb has quit [Client Quit]
keb has joined #ruby
henninb has joined #ruby
henninb has quit [Client Quit]
henninb has joined #ruby
henninb has quit [Client Quit]
henninb has joined #ruby
henninb has quit [Client Quit]
keb has quit [Ping timeout: 268 seconds]
matoro has quit [Ping timeout: 255 seconds]
markong has quit [Ping timeout: 244 seconds]
matoro has joined #ruby
matoro has joined #ruby
matoro has quit [Changing host]
jpn has joined #ruby
jpn has quit [Ping timeout: 244 seconds]
moldorcoder7 has quit [Ping timeout: 272 seconds]
Aminda has quit [Write error: Connection reset by peer]
Aminda has joined #ruby
<weaksauce> PedroG1 use a regex
<PedroG1> weaksauce, thank you. That helps
Vonter has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
Rounin has quit [Ping timeout: 268 seconds]
andrea[m]1 has joined #ruby
Linux_Kerio has joined #ruby
aeris has quit [Read error: Connection reset by peer]
nirvdrum has joined #ruby
nirvdrum has quit [Ping timeout: 272 seconds]
aeris has joined #ruby
jpn has joined #ruby
nirvdrum has joined #ruby
jpn has quit [Ping timeout: 272 seconds]
whysthatso125070 has quit [Read error: Connection reset by peer]
Ziyan has joined #ruby
whysthatso125070 has joined #ruby
Ziyan_ has joined #ruby
Ziyan has quit [Ping timeout: 268 seconds]
Aminda has quit [Ping timeout: 268 seconds]
nirvdrum has quit [Quit: nirvdrum]
jl- has joined #ruby
Aminda has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
jl- has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
aeris has quit [Quit: ZNC - http://znc.sourceforge.net]
aeris has joined #ruby
Mikaela has joined #ruby
Aminda has quit [Remote host closed the connection]
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #ruby
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
keb has joined #ruby
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
haytham has joined #ruby
Artea- has quit [Remote host closed the connection]
haytham has quit [Quit: Leaving]
jpn has joined #ruby
_ht has joined #ruby
jpn has quit [Ping timeout: 272 seconds]
Artea has joined #ruby
infernix has quit [Quit: ZNC - http://znc.sourceforge.net]
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp has joined #ruby
protektwar has quit [Quit: quitting away..]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
dviola has quit [Quit: WeeChat 3.6]
jpn has joined #ruby
infernix has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 244 seconds]
jpn has joined #ruby
jl- has joined #ruby
dionysus69 has joined #ruby
jl- has quit [Ping timeout: 268 seconds]
jpn has quit [Ping timeout: 276 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 272 seconds]
jpn has joined #ruby
protektwar has quit [Ping timeout: 272 seconds]
___nick___ has joined #ruby
aeris has quit [Remote host closed the connection]
Ziyan_ has quit [Ping timeout: 272 seconds]
aeris has joined #ruby
Ziyan has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
Mikaela has quit [Ping timeout: 268 seconds]
Sankalp has quit [Ping timeout: 272 seconds]
Mikaela has joined #ruby
Sankalp has joined #ruby
dviola has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 276 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
Mikaela has quit [Remote host closed the connection]
Mikaela has joined #ruby
markong has joined #ruby
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
jpn has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
Na_Klar has joined #ruby
<Na_Klar> Is that really expected behavior?
jpn has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
moldorcoder7 has joined #ruby
<Na_Klar> seems so .. these ! methods are some special kind ..
jpn has quit [Ping timeout: 244 seconds]
taiju has joined #ruby
jpn has joined #ruby
<Na_Klar> so, what do I do if I need a "not dependant copy" of a variable, I will alter with a ! method somewhere else, and my copy should be unaltered?
jpn has quit [Ping timeout: 268 seconds]
Rounin has joined #ruby
moldorcoder7_ has joined #ruby
moldorcoder7 has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
jl- has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
<Zerock> Na_Klar: arr[0] = $glob.clone
jl- has quit [Ping timeout: 268 seconds]
<Na_Klar> Zerock: ah well, good to know. thanks
<Zerock> but yes, all ! methods do something dangerous
<Zerock> most of the time they modify contents in place, but sometimes it's something else unexpected. I recommend carefully reading documentation before ever using one
keb has quit [Ping timeout: 268 seconds]
jpn has quit [Ping timeout: 268 seconds]
dionysus69 has joined #ruby
jpn has joined #ruby
fef has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
nmollerup has quit [Quit: Leaving]
<ccooke> ! is added to a method to warn you it does something dangerous, often side effects or self modifying. Most ! methods do have non-! versions. so for instance, what it looks like you wanted to do is $glob.slice() instead of $glob.slice!()
jpn has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
<Zerock> ccooke: actually slice and slice! do the opposites of each other.
<Zerock> I have an unrelated question: why does this line throw syntax error at the end: return command if name == key || command.aliases.include? name
<Zerock> when this line does not: return command if name == key || command.aliases.include?(name)
<Zerock> the only change is using parens or not
<ccooke> Zerock: ... That is not the case. Both slice!(2) and slice(2) return the same thing. the difference is that they modify the caller
<ccooke> (or not)
<Zerock> ccooke: not according to the official documentation...
<Zerock> slice! *deletes* the selected characters, while slice is just an index lookup
fef has quit [Ping timeout: 268 seconds]
<Zerock> I guess it depends on how you feel about "opposite" but to me, deleting is quite opposite from selecting
<Zerock> anyway that's not important
fef has joined #ruby
Ziyan_ has joined #ruby
Rounin has quit [Ping timeout: 268 seconds]
Ziyan has quit [Ping timeout: 272 seconds]
mbrndtgn has quit [Quit: Bye!]
mbrndtgn has joined #ruby
<Na_Klar> ccooke: good to know as well. I thought it just implies a self-modification. using .slice instead of .slice! is just half an option, since .slice returns the removed index and not the altered string. but one can workaround that ofc.
<Na_Klar> ccooke: ah, Zerock already stated that. nvm
<Zerock> yeah, it would be nice if there were a delete_index which did what slice! does without mutating the original string
<Na_Klar> yep. str[0, i] + str[i+1, str.length] is kinda ugly tbh
dionysus69 has quit [Ping timeout: 268 seconds]
<Zerock> Na_Klar: by the way, [x, y] means start at x and go on for y length, so that second one there is an index error
<Zerock> although it will still work I think
<Zerock> but just fyi
<Zerock> you could save a bit of text doing str[i+1..]
<Na_Klar> yeah, well str[2, inf] would also work :P
Mikaela has quit [Remote host closed the connection]
Mikaela has joined #ruby
markong has quit [Ping timeout: 268 seconds]
nmollerup has joined #ruby
markong has joined #ruby
jl- has joined #ruby
Ziyan_ has quit [Ping timeout: 244 seconds]
Ziyan has joined #ruby
dionysus69 has joined #ruby
Fridtjof has quit [Quit: ZNC - http://znc.in]
teclator has joined #ruby
cocalero has joined #ruby
Na_Klar has left #ruby [https://quassel-irc.org - Komfortabler Chat. Überall. ]
___nick___ has quit [Ping timeout: 240 seconds]
___nick___ has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
taiju has quit [Ping timeout: 244 seconds]
Ziyan_ has joined #ruby
Ziyan has quit [Ping timeout: 272 seconds]
jl- has quit [Ping timeout: 240 seconds]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
weaksauce has quit [Ping timeout: 255 seconds]
jl- has joined #ruby
markong has quit [Ping timeout: 268 seconds]
Mikaela has quit [Ping timeout: 268 seconds]
Michaela has joined #ruby
Fridtjof has joined #ruby
Fridtjof has quit [Ping timeout: 268 seconds]
jl- has quit [Ping timeout: 272 seconds]
Fridtjof has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
jl- has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
nirvdrum has joined #ruby
Michaela has quit [Remote host closed the connection]
Michaela has joined #ruby
Michaela is now known as Aminda
<arfy> Hi. I'd like some thoughts on the following. I've coded a little script that goes through midi files, and removes and modifies certain events. Part of the code uses reject! a couple of times to go through and filter out the events I don't want. Should I be too worried about speed of the code? Most of the time I'm only dealing with lists of maybe a thousand, maybe a couple of thousand items at worst.
<Zerock> arfy: I wouldn't worry about the speed unless you are dissatisfied with the performance
<Zerock> oftentimes the time spent thinking about optimizations outweighs the time saved by optimizing
ahayworth has joined #ruby
rhe has quit [Quit: Ping timeout (120 seconds)]
rhe has joined #ruby
ahayworth has quit [Remote host closed the connection]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has joined #ruby
fef has quit [Ping timeout: 268 seconds]
protektwar has quit [Ping timeout: 255 seconds]
cocalero has quit [Read error: Connection reset by peer]
cocalero has joined #ruby
rvalue has quit [Ping timeout: 272 seconds]
Ziyan_ has quit [Quit: Textual IRC Client: www.textualapp.com]
rvalue has joined #ruby
___nick___ has quit [Ping timeout: 264 seconds]
cocalero_ has joined #ruby
cocalero has quit [Read error: No route to host]
cocalero_ is now known as cocalero
thumbs has joined #ruby
Ziyan has joined #ruby
thumbs has left #ruby [#ruby]
keb has joined #ruby
Linux_Kerio has quit [Ping timeout: 268 seconds]
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
jl- has quit [Ping timeout: 268 seconds]
dionysus69 has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
jl- has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
jl- has quit [Ping timeout: 268 seconds]
jl- has joined #ruby
jl- has quit [Ping timeout: 272 seconds]
dionysus69 has joined #ruby
_ht has quit [Remote host closed the connection]
White_Lotus_24 has joined #ruby
White_Lotus_24 has quit [Client Quit]
jl- has joined #ruby
weaksauce has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
dionysus69 has joined #ruby
gr33n7007h has joined #ruby
nirvdrum_ has joined #ruby
nirvdrum has quit [Ping timeout: 240 seconds]
markong has joined #ruby
jpn has joined #ruby
maroloccio has joined #ruby
<John_Ivan> anyone here an ocaml programmer?
nirvdrum_ has quit [Quit: nirvdrum_]
jpn has quit [Ping timeout: 240 seconds]
<leftylink> well although I know ocaml, it would be too presumptuous for me to call myself an ocaml programmer, so I will not do that
<John_Ivan> leftylink, I'm having an issue with not having modules detected.
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
<John_Ivan> leftylink, sorry, had to step out. yes so, I'm basically not getting modules/packages detected, despite having used "opam" to initialize and install them. for example
<John_Ivan> leftylink, "opam init", "opam install piaf" is what I've done, for a http client
<John_Ivan> leftylink, but running a main.ml which has "open Piaf" complains that the module is unbound
<John_Ivan> any ideas?
Sankalp has quit [Ping timeout: 268 seconds]
jpn has joined #ruby
Sankalp has joined #ruby
jpn has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Ping timeout: 268 seconds]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
jpn has joined #ruby
nirvdrum has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
jl- has quit [Ping timeout: 276 seconds]
Sankalp has joined #ruby
<leah2> ask in #ocaml not #ruby
jpn has quit [Ping timeout: 272 seconds]
<John_Ivan> I did. they just two 2 hours to reply.
<John_Ivan> I had my problem solved :)
ahayworth has joined #ruby
jpn has joined #ruby
<leah2> good :)
jpn has quit [Ping timeout: 276 seconds]
Sankalp has quit [Ping timeout: 268 seconds]