havenwood5 changed the topic of #ruby to: Ruby 3.3.6 (3.4.0-preview2) https://www.ruby-lang.org | Logs https://libera.irclog.whitequark.org/ruby
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
Versality has joined #ruby
Versality has quit [Changing host]
Versality has joined #ruby
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
<gr33n7007h> jhass: please could you update ruby to 3.3.5 on carc.in now arch linux have finally packaged latest ruby. (when you've got time of course ;)) be very greatful & thank you in advance.
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
Versality has quit [Remote host closed the connection]
Versality has joined #ruby
Versality has quit [Changing host]
Versality has joined #ruby
Versality has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
Versality has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
Versality has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
Versality has joined #ruby
Versality has quit [Changing host]
Versality has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby
c10l has quit [Quit: Ping timeout (120 seconds)]
dhruvasagar has quit [Ping timeout: 272 seconds]
c10l has joined #ruby
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
Versality has quit [Remote host closed the connection]
Versality has joined #ruby
mange has joined #ruby
konsolebox has joined #ruby
dhruvasagar has joined #ruby
Versality has quit [Remote host closed the connection]
Versality has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
Versality has quit [Remote host closed the connection]
Versality has joined #ruby
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
donofrio has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
donofrio has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Remote host closed the connection]
donofrio has joined #ruby
tyzef has joined #ruby
tyzef has quit [Max SendQ exceeded]
donofrio has quit [Ping timeout: 252 seconds]
konsolebox has quit [Ping timeout: 245 seconds]
brw has quit [Ping timeout: 244 seconds]
<gr33n7007h> >> p :hi
<ruby[bot]> gr33n7007h: # => :hi ...check link for more (https://carc.in/#/r/he54)
konsolebox has joined #ruby
<gr33n7007h> >> RUBY_DESCRIPTION
<ruby[bot]> gr33n7007h: # => "ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]" (https://carc.in/#/r/he56)
<gr33n7007h> ok.
donofrio has joined #ruby
brw has joined #ruby
brw has quit [Ping timeout: 255 seconds]
brw has joined #ruby
konsolebox has quit [Ping timeout: 276 seconds]
konsolebox has joined #ruby
donofrio has quit [Ping timeout: 276 seconds]
finsternis has quit [Read error: Connection reset by peer]
tyzef has joined #ruby
Linux_Kerio has joined #ruby
tyzef has quit [Quit: It was nice to meet you o/]
kludger has joined #ruby
oneeyedalien has joined #ruby
oneeyedalien has quit [Remote host closed the connection]
tyzef has joined #ruby
tyzef has quit [Max SendQ exceeded]
kludger has quit [Read error: Connection reset by peer]
kludger has joined #ruby
kludger has quit [Remote host closed the connection]
kludger has joined #ruby
kludger has quit [Ping timeout: 276 seconds]
konsolebox has quit [Ping timeout: 252 seconds]
grenierm has joined #ruby
lunarkitty has quit [Quit: Ping timeout (120 seconds)]
konsolebox has joined #ruby
vnpower has quit [Remote host closed the connection]
vnpower has joined #ruby
mange has quit [Quit: Quittin' time!]
Linux_Kerio has quit [Ping timeout: 244 seconds]
lunarkitty has joined #ruby
konsolebox has quit [Ping timeout: 264 seconds]
chen has quit [Quit: No Ping reply in 180 seconds.]
chen has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
weaksauc_ has joined #ruby
weaksauce has quit [Ping timeout: 252 seconds]
konsolebox has joined #ruby
grenierm has quit [Quit: Client closed]
tweaks has quit [Ping timeout: 260 seconds]
tweaks has joined #ruby
<isene> How do I get rindex to match as many as possible consecutive occurences of this pattern (it naturally only gives me the index of the start of the last match); /(\u0001.*?(?<!\e\[0m)\u0002)+/
<isene> Or more simply with a pattern like /a/ and a text like "1234aaaa", I want rindex (or something else) to return the index 4
kjetilho has quit [Quit: WeeChat 4.0.4]
kjetilho has joined #ruby
tyzef has joined #ruby
<isene> Or even more precisely - I want something that return index 8 from the string "aaaa1234aaaa" when matching against /a+/
konsolebox has quit [Ping timeout: 250 seconds]
tyzef has quit [Quit: WeeChat 3.8]
<constxd> isene:
<constxd> "aaaa1234aaaa".to_enum(:scan, /a+/).map {Regexp.last_match}.last.offset(0)[0]
brokkoli_origin has quit [Ping timeout: 276 seconds]
brokkoli_origin has joined #ruby
konsolebox has joined #ruby
donofrio has joined #ruby
brokkoli_origin has quit [Remote host closed the connection]
brokkoli_origin has joined #ruby
GvJordan has joined #ruby
rhrf has quit [Ping timeout: 255 seconds]
Jordan has quit [Ping timeout: 255 seconds]
rhrf has joined #ruby
donofrio has quit [Ping timeout: 245 seconds]
donofrio has joined #ruby
Linux_Kerio has joined #ruby
donofrio has quit [Ping timeout: 276 seconds]
Versality has quit [Remote host closed the connection]
Versality has joined #ruby
<gr33n7007h> >> "aaaa1234aaaa".rindex(/(?<!a)/)
<ruby[bot]> gr33n7007h: # => 8 (https://carc.in/#/r/he6z)
<gr33n7007h> >> "aaaa1234aaaa".rindex(/(?<!a)/); $~.offset(0)
<ruby[bot]> gr33n7007h: # => [8, 8] (https://carc.in/#/r/he71)
<gr33n7007h> >> "aaaa1234aaaa".rindex(/(?<!a)a+/)
<ruby[bot]> gr33n7007h: # => 8 (https://carc.in/#/r/he72)
<gr33n7007h> >> "aaaa1234aaaa".rindex(/(?<!a)a+/); $~.offset(0)
<gr33n7007h> >> "aaaa1234aaaa".rindex(/(?<!a)a+/); $~.offset(0)
<gr33n7007h> ooops... think i broke the bot :P
<gr33n7007h> isene: ^^
c10l has quit [Quit: Ping timeout (120 seconds)]
donofrio has joined #ruby
c10l has joined #ruby
<isene> hmmm. which of these two (contxc's and gr33n7007h's) would have the best performance?
<gr33n7007h> isene: benchmark them
<gr33n7007h> isene: just ran a little benchmark and scan is ~4.5x slower
hwpplayer1 has joined #ruby
<isene> Nice. Thanks
<gr33n7007h> np 👍
konsolebox has quit [Ping timeout: 250 seconds]
<isene> for t = "\u0001\e[3m\u0002\u0001\e[1m\u0002Geir Isene\u0001\e[0m\u0002\u0001\e[0m\u0002"
<isene> and @rs = /(\u0001.*?(?<!\e\[0m)\u0002)+/
<isene> I get: t.rindex(/(?<!#{@rs})#{@rs}/)
<isene> which gives: invalid pattern in look-behind: /(?<!(?-mix:(\u0001.*?(?<!\e\[0m)\u0002)+))(?-mix:(\u0001.*?(?<!\e\[0m)\u0002)+)/ (RegexpError)
<isene> But with constxd's solution, it works
donofrio has quit [Ping timeout: 276 seconds]
hwpplayer1 has quit [Quit: I'll be back later]
konsolebox has joined #ruby
<isene> Goddamn. I have working code here. Approaching a pure ruby replacement for curses
<isene> With around 200 lines of code. I will now implement an inputbox for text in this "rcurses" as an added benefit - with text in bold, italic, underline and with fg/bg colors, left/right/center justified - like a mini text editor inside a pane. And gone will be the idiotic color pairing of curses.
donofrio has joined #ruby
user71 has joined #ruby
pages has quit [Ping timeout: 252 seconds]
pages has joined #ruby
<gr33n7007h> isene: hows that work then?
<gr33n7007h> if it works with scan it will work with rindex/index
<gr33n7007h> but i can't see how as it's raising a RegexpError meaning a malformed //
konsolebox has quit [Ping timeout: 252 seconds]
<gr33n7007h> bbl gotta go. i'll take a look when i'm back :P
konsolebox has joined #ruby
dhruvasagar has joined #ruby
hiddenman has quit [Ping timeout: 260 seconds]
<isene> Cool thanks
trillion_exabyte has quit [Ping timeout: 244 seconds]
trillion_exabyte has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
trillion_exabyte has quit [Ping timeout: 260 seconds]
cornett has joined #ruby
trillion_exabyte has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
aindilis has quit [Ping timeout: 248 seconds]
aindilis has joined #ruby
kludger has joined #ruby
konsolebox has joined #ruby
cappy has joined #ruby
cuppajoeman has quit [Quit: Connection closed for inactivity]
dviola has quit [Ping timeout: 252 seconds]
kludger has quit [Read error: Connection reset by peer]
kludger has joined #ruby
hwpplayer1 has joined #ruby
<tweaks> i
konsolebox has quit [Ping timeout: 250 seconds]
kludger has quit [Quit: kludger]
kludger has joined #ruby
desnudopenguino has quit [Ping timeout: 255 seconds]
konsolebox has joined #ruby
konsolebox has quit [Ping timeout: 265 seconds]
<weaksauc_> gonna put this on github isene ?
Sampersand has joined #ruby
kludger has quit [Ping timeout: 252 seconds]
kludger has joined #ruby
aesthetikx has quit [Ping timeout: 252 seconds]
hwpplayer1 has quit [Quit: I'll be back later]
dhruvasagar has quit [Ping timeout: 260 seconds]
desnudopenguino has joined #ruby
dhruvasagar has joined #ruby
Sampersand has quit [Quit: Client closed]
dhruvasagar has quit [Ping timeout: 252 seconds]
Sampersand has joined #ruby
Sampersand has quit [Quit: Client closed]
Sampersand has joined #ruby
dhruvasagar has joined #ruby
Sampersand has quit [Quit: Client closed]
Sampersand has joined #ruby
magni has quit [Quit: Connection closed for inactivity]
dhruvasagar has quit [Ping timeout: 244 seconds]
donofrio has quit [Ping timeout: 252 seconds]
Sampersand has quit [Quit: Client closed]
dhruvasagar has joined #ruby
diego has joined #ruby
diego is now known as Guest2596
dhruvasagar has quit [Ping timeout: 255 seconds]
hwpplayer1 has joined #ruby
<isene> weaksauc_: Of course. As Public Domain.
kludger has quit [Quit: kludger]
dhruvasagar has joined #ruby
hwpplayer1 has quit [Quit: I'll be back later]
Guest2596 has left #ruby [WeeChat 4.4.3]
dhruvasagar has quit [Ping timeout: 276 seconds]
dviola has joined #ruby
kludger has joined #ruby
dhruvasagar has joined #ruby
kludger has quit [Max SendQ exceeded]
donofrio has joined #ruby
Linux_Kerio has quit [Ping timeout: 260 seconds]
kludger has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
kludger has quit [Max SendQ exceeded]
__DuBPiRaTe__ has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
kludger has joined #ruby
trillion_exabyte has quit [Ping timeout: 248 seconds]
trillion_exabyte has joined #ruby
dhruvasagar has joined #ruby
cappy has quit [Quit: Leaving]
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
hwpplayer1 has joined #ruby
donofrio has quit [Ping timeout: 255 seconds]
hwpplayer1 has quit [Quit: I'll be back later]
kludger has quit [Read error: Connection reset by peer]
kludger has joined #ruby
kludger has quit [Read error: Connection reset by peer]
kludger has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
c10l has quit [Remote host closed the connection]
c10l has joined #ruby
dhruvasagar has joined #ruby
c10l has quit [Remote host closed the connection]
user71 has quit [Quit: Leaving]
c10l has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
c10l has quit [Remote host closed the connection]
kludger has quit [Read error: Connection reset by peer]
c10l has joined #ruby
dhruvasagar has joined #ruby
kludger_ has joined #ruby
hightower2 has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 260 seconds]
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
mooff has quit [Ping timeout: 260 seconds]
cleo has quit [Ping timeout: 260 seconds]
Manouchehri has quit [Ping timeout: 260 seconds]
sts has quit [Ping timeout: 260 seconds]
wryish has joined #ruby
szkl_ has joined #ruby
Munto has quit [Ping timeout: 248 seconds]
Thanzex0 has quit [Ping timeout: 248 seconds]
sts has joined #ruby
szkl has quit [Ping timeout: 260 seconds]
twopoint718 has quit [Ping timeout: 260 seconds]
szkl_ is now known as szkl
dorian has quit [Ping timeout: 264 seconds]
Thanzex0 has joined #ruby
mooff has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
wryishly has quit [Ping timeout: 248 seconds]
fcser has quit [Excess Flood]
ruby[bot] has joined #ruby
twopoint718 has joined #ruby
Manouchehri has joined #ruby
fcser has joined #ruby
dorian has joined #ruby
Munto has joined #ruby
hiddenman has joined #ruby
ua_ has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
hiddenman_ has joined #ruby
hiddenman has quit [Read error: Connection reset by peer]
mange has joined #ruby
dhruvasagar has joined #ruby
kstatz12 has joined #ruby
kstatz12 has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby
desnudopenguino has quit [Ping timeout: 276 seconds]
Versality has quit [Remote host closed the connection]
Versality has joined #ruby
Versality has quit [Changing host]
Versality has joined #ruby
ua_ has joined #ruby
<weaksauc_> isene sweet