havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.0, 3.0.3, 2.7.5: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
hanzo has joined #ruby
markong has quit [Ping timeout: 240 seconds]
<mooff> ello
CrazyEddy has joined #ruby
krishnac has quit [Remote host closed the connection]
<mooff> had an 'ooh' wrt the IRC bot API - 'what if on(/^foo (.*)/) { do_something_with $1 } can work?'
<mooff> but the globals are thread-local and method-local variables
<mooff> and attempting to set them raises a SyntaxError
perrierjouet has joined #ruby
hololeap has joined #ruby
bluedust has joined #ruby
bluedust has quit [Ping timeout: 272 seconds]
<weaksauce> typically you'd save the block and save the regex and match on the regex and create a match object to be bound into the block
<weaksauce> mooff
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
<ox1eef> perlish
oxfuxxx has quit [Ping timeout: 272 seconds]
oxfuxxx has joined #ruby
TCZ has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
oxfuxxx has joined #ruby
va5c0 has quit [Quit: WeeChat 3.4]
oxfuxxx has quit [Ping timeout: 252 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
libsys has quit [Ping timeout: 256 seconds]
libsys has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
oxfuxxx has joined #ruby
TCZ has quit [Quit: Leaving]
oxfuxxx has quit [Ping timeout: 240 seconds]
kaivai has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
donofrio has joined #ruby
Rounin has quit [Ping timeout: 240 seconds]
kaivai has joined #ruby
<mooff> the perlishness is nice from the perspective of people who don't know Ruby using it like a magical command language over IRC
<mooff> terse but readable one-liners :)
<mooff> hmm. what if i patched Regexp.last_match ?
<mooff> it aint called when accessing $1 or $~
kaivai has quit [Ping timeout: 252 seconds]
kaivai has joined #ruby
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
libsys has quit [Remote host closed the connection]
libsys has joined #ruby
donofrio has quit [Ping timeout: 240 seconds]
bluedust has joined #ruby
ralu has quit [Ping timeout: 256 seconds]
ur5us_ has quit [Ping timeout: 240 seconds]
reset has quit [Quit: reset]
hanzo has quit [Quit: Connection closed for inactivity]
ur5us_ has joined #ruby
ralu has joined #ruby
bluedust_ has joined #ruby
ur5us_ has quit [Ping timeout: 240 seconds]
bluedust has quit [Ping timeout: 252 seconds]
hololeap has quit [Excess Flood]
splud has quit [Ping timeout: 256 seconds]
hololeap has joined #ruby
gr33n7007h has quit [Quit: WeeChat 3.4]
Pipip has joined #ruby
gr33n7007h has joined #ruby
bluedust has joined #ruby
bluedust_ has quit [Ping timeout: 252 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
ua_ has quit [Ping timeout: 256 seconds]
teclator has joined #ruby
ua_ has joined #ruby
aeris has quit [Ping timeout: 240 seconds]
aeris has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
Rounin has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4]
va5c0 has joined #ruby
perrierjouet has joined #ruby
<ox1eef> i'd prefer an API that yielded captures to the block, or an API that yielded some sort of "bot" object that provided access to the captures.
entropie has quit [Ping timeout: 256 seconds]
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 252 seconds]
Pipip has quit [Quit: Ex-Chat]
entropie has joined #ruby
va5c0 has quit [Ping timeout: 252 seconds]
entropie has quit [Ping timeout: 240 seconds]
va5c0 has joined #ruby
entropie has joined #ruby
splud has joined #ruby
bluedust_ has quit [Remote host closed the connection]
Dooky has joined #ruby
Dooky has quit [Client Quit]
jhawthorn has joined #ruby
jhawthorn_ has quit [Ping timeout: 268 seconds]
bluedust has joined #ruby
Dooky has joined #ruby
markong has joined #ruby
gproto23 has joined #ruby
va5c0 has quit [Ping timeout: 240 seconds]
va5c0 has joined #ruby
<fowl> Pass the matches to the block and use _1, etc to access them
Dooky has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
markong has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
ua_ has quit [Ping timeout: 252 seconds]
ua_ has joined #ruby
reset has joined #ruby
markong has joined #ruby
<adam12> morning
Dooky has joined #ruby
oxfuxxx has joined #ruby
Dooky has quit [Ping timeout: 272 seconds]
<ox1eef> happy tuesday
Dooky has joined #ruby
oxfuxxx has quit [Quit: Yankies Motherfh@ckers C0[k Astroboys]
oxfuxxx has joined #ruby
<adam12> happy tuesday!
<mooff> happy tuesday
<mooff> imo _1 _2 is confusing, their meaning doesn't "jump out" in a code block
<mooff> which is a very subjective feeling, as i think @1 and @2 would do so a lot more
<leah2> but it's not instance scoped :p
<ox1eef> they're no more confusing than $1 if you don't know ruby at all.
<leah2> obviously it should be $_1
<leah2> or $_[1] # /me runs
havenwood9 has joined #ruby
<nakilon> $1 does not match the canonical identifier regex
<ox1eef> i think it'd be nice if $N were to work, but i wouldn't make it the first-class API. I'd yield what's useful, and make sure to not use instance_eval or any of that trickery with the block.
<nakilon> everybody knows _anything is just a cariable, not anything special
<nakilon> *variable
havenwood is now known as Guest3475
havenwood9 is now known as havenwood
Guest3475 has quit [Ping timeout: 256 seconds]
Dooky has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oxfuxxx has quit [Ping timeout: 252 seconds]
va5c0 has quit [Ping timeout: 256 seconds]
va5c0 has joined #ruby
JayDoubleu_ has quit [Ping timeout: 252 seconds]
JayDoubleu_ has joined #ruby
<mooff> @@ isn't instance scoped either :P
<mooff> $#{n} isn't global :)
<mooff> ^ for that reason, i actually kind of like the idea of them working as numbered params for blocks
<leah2> @@ i forgot about already :p
<ox1eef> i think rubocop recommends, Regexp.last_match[n]
<leah2> rubocop can shut up :p
<ox1eef> well, i agree, rubocop defaults are too much. no room to breath.
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
devz3ro has quit [Remote host closed the connection]
dangerousdave has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Remote host closed the connection]
_aeris_ is now known as aeris
va5c0 has quit [Ping timeout: 240 seconds]
va5c0 has joined #ruby
gr33n7007h has quit [Quit: WeeChat 3.4]
gr33n7007h has joined #ruby
aeris has quit [Ping timeout: 240 seconds]
infinityfye has joined #ruby
aeris has joined #ruby
sagax has joined #ruby
Dooky has joined #ruby
gproto23 has quit [Remote host closed the connection]
gr33n7007h has quit [Ping timeout: 240 seconds]
howdoi has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
va5c0 has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
dangerousdave has joined #ruby
_ht has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
___nick___ has joined #ruby
markong has quit [Ping timeout: 272 seconds]
va5c0 has joined #ruby
va5c0 has quit [Ping timeout: 272 seconds]
va5c0 has joined #ruby
va5c0 has quit [Ping timeout: 252 seconds]
va5c0 has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
va5c0 has quit [Ping timeout: 272 seconds]
<weaksauce> who was asking about templating options a while back?
<weaksauce> other than haml/slim/erb
<weaksauce> curious gem but interesting
micah has left #ruby [#ruby]
va5c0 has joined #ruby
va5c0 has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
<adam12> weaksauce: Maybe me? I have an obsession with template options right now, since I feel like we're falling behind.
<weaksauce> yeah i think it was you adam12
<adam12> weaksauce: Papercraft is super similar to a lot of others. Tubby, Markaby, Erector, and a million more.
<weaksauce> anyhoo that looks interesting
<adam12> They are super slow :( All those method calls.
<adam12> If you look at an ERB template, it's usually like 90% strings with a few expressions.
<weaksauce> yeah but also could be nice on personal projects
<adam12> I like the composability of them tho.
<weaksauce> how slow are we talking?
ur5us has joined #ruby
<adam12> Depends on the template I guess, but we might be talking a 10 call ERB template vs a 50 call Papercraft template.
<adam12> (or more)
<weaksauce> it would be really neat if they had a preprocessing step that compiled out all the calls that were static
<adam12> I'm trying to find time to experiment with parsing HTML with some sort of LALR or PEG. I'd love to see something like Laravel's Blade (but without the regexp gsub) or HEEX from Elixir.
<adam12> I think Sharon is looking at compiling a template, so it would work out to being similar to ERB. That would be nice.
<adam12> Compiling to Temple might be interesting since it has some built-in optimizations.
<adam12> It reminds me of something like Racket where you can define all your markup using the same SEXP as your code.
<adam12> There's also Trenni, which is written by Samuel. It's similar to some template frameworks that originated with Ramaze back around 2008. There's Mote from Soveran, which is incredibly cool but fucks up the backtrace when there's an exception, since the line numbers are not correct with the implementation.
ur5us_ has joined #ruby
<adam12> Most of these template frameworks mess up the line numbers, making them (imho) unusable on anything other than my own projects. I have a hard enough time with juniors than having to explain mis-matched line numbers :P
va5c0 has joined #ruby
<adam12> Still cool tho. I feel like we just stopped experimenting for the most part.
_ht has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 240 seconds]
<ox1eef> ruby has lost some traction but that has hidden blessings - popularity doesn't bring only positive changes.
oxfuxxx has joined #ruby
<weaksauce> ah yeah i could see that being annoying to track down
___nick___ has quit [Ping timeout: 252 seconds]
va5c0 has quit [Ping timeout: 240 seconds]
<weaksauce> i'm kinda annoyed by haml
<adam12> I can never remember the syntax. Same with Slim.
<adam12> Mote might be my ideal syntax, but I'd love to perhaps see some sort of extension that would allow custom HTML elements.
infinityfye has quit [Quit: Leaving]
ur5us_ has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
<weaksauce> mote is interesting
va5c0 has joined #ruby
markong has joined #ruby
mkara has joined #ruby
mkara has quit [Client Quit]
<weaksauce> tiny library too
<weaksauce> all of 68 lines of code
va5c0 has quit [Ping timeout: 256 seconds]
<kaleido> i like my lines of code like i like my women. 68 or less.
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
donofrio has joined #ruby
moldorcoder7_ has quit [Ping timeout: 256 seconds]
moldorcoder7 has joined #ruby
bluedust has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
Pixi_ has joined #ruby
Pixi has quit [Ping timeout: 240 seconds]
duds- has quit [Read error: Connection reset by peer]
duds- has joined #ruby
donofrio has quit [Ping timeout: 272 seconds]
<havenwood> Please just totally avoid any jokes that might be construed as off color in the light least favorable to the joke. We're trying really hard to make Ruby communities welcoming to all so please just take extra care to avoid even a hint of sexism or ageism.
<havenwood> I keep wishing Ractors would land with Proc support and not be experimental anymore... I need to quit checking so often and just wait for Ruby 3.2. >.>
siasmj has quit [*.net *.split]
ox has quit [*.net *.split]
shokohsc has quit [*.net *.split]
jhass has quit [*.net *.split]
szkl has quit [*.net *.split]
mixfix41 has quit [*.net *.split]
Henry151 has quit [*.net *.split]
itok has quit [*.net *.split]
finsternis has quit [*.net *.split]
dorian has quit [*.net *.split]
peer has quit [*.net *.split]
A_Dragon has quit [*.net *.split]
forvelin has quit [*.net *.split]
legahc has quit [*.net *.split]
siasmj has joined #ruby
jhass has joined #ruby
szkl has joined #ruby
shokohsc has joined #ruby
mixfix41 has joined #ruby
itok has joined #ruby
Henry151 has joined #ruby
finsternis has joined #ruby
dorian has joined #ruby
ox has joined #ruby
A_Dragon has joined #ruby
peer has joined #ruby
forvelin has joined #ruby
legahc has joined #ruby
shokohsc has quit [Max SendQ exceeded]
finsternis has quit [Max SendQ exceeded]
mixfix41 has quit [Max SendQ exceeded]
finsternis has joined #ruby
Dooky has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shokohsc has joined #ruby
<weaksauce> what do you do with all your async stuff havenwood
szkl has quit [Ping timeout: 250 seconds]
itok has quit [Ping timeout: 250 seconds]
szkl has joined #ruby
itok has joined #ruby
ur5us_ has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kinduff> Does anyone know how to remove the autocomplete prompt from the Ruby console, eg?
<kinduff> Meaning this window
<kinduff> Thank you so much
<kinduff> I was going crazy
oxfuxxx has quit [Ping timeout: 272 seconds]