havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0-rc1, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
prion has joined #ruby
Technodrome has joined #ruby
<apotheon> siaw23: For certain? I don't think that's really even an option -- to be perfectly positive. I'm pretty sure, though, considering that's the official release date.
<siaw23> apotheon i thought i saw an RC2 somewhere but not sure
<siaw23> RC2 will mean close to finishing i'd thought
jenrzzz has joined #ruby
ur5us has joined #ruby
hiroaki has quit [Ping timeout: 272 seconds]
<apotheon> yeah, probably close
orbyt_ has joined #ruby
dfucci has joined #ruby
DaRock has joined #ruby
DaRock has quit [Client Quit]
zacts has quit [Quit: leaving]
dfucci has quit [Ping timeout: 246 seconds]
<Technodrome> is there a british equivalent to a funnel cake?
zacts has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
braincrash has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
Rudd0 has quit [Ping timeout: 260 seconds]
va5c0 has quit [Ping timeout: 272 seconds]
ian| has quit [Quit: Exiting]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
prion has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Remote host closed the connection]
<apotheon> Technodrome: I think funnel cakes came to the US from Germany, and to Germany from Persia, and never really made much of an incursion into the UK.
<Technodrome> I see
<Technodrome> yeah i mean she was just obsessed with them like it was some exotic treat
<apotheon> Who was obsessed with them?
<apotheon> I wonder if you meant to ask your question in a different channel.
<Technodrome> a girl who works at the front desk of my building
<Technodrome> she's from northern england
<Technodrome> i did apotheon , by accident i put it in Ruby
<Technodrome> still nice to know its sorta german inspired i guess
weaksauce has joined #ruby
chouhoulis has joined #ruby
<apotheon> Technodrome: Funnel cakes became a big thing in the US thanks to Pennsylvania Dutch (which is a weird way of saying "certain German immigrant communities in the US") coming up with a cool way to make tasty cake-pastry things with funnels and a thin batter made with baking powder, then selling the stuff at county fairs.
<Technodrome> I see yeah
<apotheon> The basic recipe, except for the use of baking powder (I think), just came from Germany, though.
<Technodrome> i mean they are sorta street food thing here in nyc as well
<apotheon> I have some good memories of funnel cakes in the northern US midwest at fairs when I was a kid.
<Technodrome> like a carnival?
<apotheon> yeah, kinda like that
<apotheon> The kinds of fairs I recall were sometimes carnivals, but often less carnival-ish -- maybe kinda like a renaissance faire, but without the anachronistic theme, instead with more of a "local rural" theme.
chouhoulis has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
<Technodrome> apotheon i see
<Technodrome> just coney island here in nyc really
<apotheon> There was also a great renfaire when I was a kid that had some of the best spanikopita ever made. As a kid, I loved this fencing thing they had, where two people wear fencing masks with balloons taped to them and try to pop each other's balloons with the fencing foils to "win".
<apotheon> I don't recall whether that renfaire had funnel cakes. My favorite things about that place were the balloon fencing and the spanikopita (which I called "spinach pie" at the time).
<Technodrome> sounds amusing
<apotheon> I really need to start building a file management web application in Ruby next year.
<apotheon> Technodrome: As an adult, I ultimately ended up working at a renfaire booth (in a different state) where my job was to teach people the basics of fencing, either fence with them or referee as they fenced each other, and somehow be pseudo-anachronistically amusing.
<Technodrome> and somehow you got into ruby thereafter ha
<apotheon> yep
<apotheon> BASIC -> Logo -> C -> C++ -> shell -> JavaScript -> PHP -> Perl -> Ruby
<Technodrome> just curious how old are you apotheon ?
<apotheon> That's my path through significant language adoptions.
<Technodrome> BASIC in the 70's or BASIC in 2002
<apotheon> I've been 42 for over 3.5 years now.
<apotheon> (I stopped aging at 42.)
<apotheon> BASIC at about 1980.
<apotheon> I don't recommend it, but it was basically my only option at the time.
<Technodrome> I'm 33 , so PHP was first for me at 15 quite honestly
<apotheon> There were other languages along the line, but the above is the main thread through them.
<Technodrome> it would be sexier if I started with some other programming language though
<apotheon> I was playing with code at about five, I think.
gix has quit [Ping timeout: 240 seconds]
<apotheon> PHP was the BASIC of the early 2000s, just as Java was the COBOL.
<Technodrome> yeah, I mean I enjoyed PHP , i got into cherrypy with python shortly after and then rails like in 06
<apotheon> I kinda enjoyed PHP for a bit, but I basically only used it as a templating language.
<apotheon> Once I started pushing the boundaries of that, I started hating it.
<Technodrome> it was fun getting stuff running and making money
<apotheon> I actually used Perl before PHP, I think, but it wasn't as central to productive coding at first.
<apotheon> Yeah, getting paid is fun.
<Technodrome> we had a restaurant invoice script thing we made where a few local places would put their invoices in, then got sent to vendors, they would pay through our payment portal, we charged a percent, otherwise free
<Technodrome> food trucks and stuff back then didn't really have computers and offices etc
<apotheon> right
<Technodrome> outside of working full time in Rails, i've never made a dime off anything rails i've created
<apotheon> I've been paid to write Rails code.
<Technodrome> for whatever reason the stuff that makes money either ends of being Python or PHP
<Technodrome> yeah apotheon same, but i mean a creation of your own
<apotheon> Yeah, I haven't made money off my own Rails project for my own purposes.
<apotheon> That's really my fault, though.
<Technodrome> yeah same, something about the early days with PHP , coding wasn't the result it was a means
<Technodrome> now coding is sorta the "means" so to speak
<apotheon> These days, most of my code is just for tools, basically.
<apotheon> I write a lot of library, command line, and personal interest web application code.
<Technodrome> there was a bunch of books being thrown away, I actually saw a stack of PHP ones, you know old ones like 2003 and stuff. Building shopping carts and this or that, it was sorta nostalgic so I took them
<apotheon> The last time I wrote commercial code of any kind, I reimplemented an employer's website with up-to-date tools, because the toolset for the old website was unmaintained at that point. That was around the end of 2017.
<Technodrome> Using even the php4 object system properly and using smarty for templates , you could sorta create decent web app structure for that time period
<apotheon> That's not to say that I haven't been writing code for web applications for public use, but they're not really *commercial* sites.
<apotheon> . . . like a nonprofit association website that I wrote and am going to have to rewrite soonish.
<Technodrome> i am working on a non profit tool in rails for some people
<apotheon> You write code for nonprofits? That's cool.
<Technodrome> and probably going to get a rails position since i'm not a big fan of my python one atm
<Technodrome> python job is django, so not micro frameworks or nothing but still
<Technodrome> just doesn't feel as smooth as rails
<apotheon> Yeah, I really have never enjoyed Python coding except when working with Flask.
<Technodrome> i prefer django over flask
<Technodrome> but maybe thats because i know the api like the back of my hand
<Technodrome> which is half the reason i get pulled into python all the time
Xiti has quit [Quit: Leaving]
<apotheon> Flask is basically just Sinatra written in Python, which is why I liked it.
<apotheon> It was nothing like writing typical Python.
<apotheon> That employer's website I mentioned got rewritten (by me) using Frozen Flask, which is a static site generator wrapped around Flask.
<apotheon> Well . . . I'm off to other things. Ta.
akem has joined #ruby
Xiti has joined #ruby
ttoocs has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 268 seconds]
TCZ has quit [Quit: https://github.com/srgx]
jenrzzz has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
HeavenDestroyer has quit [Remote host closed the connection]
akem has quit [Quit: Leaving]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
prion has joined #ruby
Swyper has quit [Ping timeout: 260 seconds]
zacts has quit [Quit: leaving]
javawizard[m] has joined #ruby
Rudd0 has joined #ruby
sleetdrop has joined #ruby
javawizard[m] is now known as javawizard
javawizard is now known as javawizard2539
ChmEarl has quit [Quit: Leaving]
javawizard2539 is now known as javawizard
javawizard is now known as jcp
ur5us has quit [Ping timeout: 258 seconds]
akem has joined #ruby
jenrzzz has joined #ruby
prion has quit [Ping timeout: 256 seconds]
akem has quit [Quit: Leaving]
meinside has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
MuffinPimp has quit [Quit: Goodbye.]
MuffinPimp has joined #ruby
al2o3-cr has quit [Quit: WeeChat 3.0]
va5c0 has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
va5c0 has quit [Ping timeout: 240 seconds]
DTZUZU_ has joined #ruby
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #ruby
DTZUZU_ has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Remote host closed the connection]
envex has joined #ruby
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 2.8]
s3nd1v0g1us has joined #ruby
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
s3nd1v0g1us has quit [Client Quit]
Xiti has quit [Quit: Leaving]
maryo has joined #ruby
jmcgnh has quit [Ping timeout: 260 seconds]
mich_ has joined #ruby
jmcgnh has joined #ruby
kaleido has quit [Quit: peas]
kaleido has joined #ruby
kaleido has quit [Changing host]
kaleido has joined #ruby
nofxx_ has joined #ruby
nofxx__ has quit [Ping timeout: 240 seconds]
akem has joined #ruby
Xiti has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
scapegoa_ has joined #ruby
mich_ has left #ruby [#ruby]
scapegoa_ has quit [Client Quit]
Emmanuel_Chanel has joined #ruby
dfucci has joined #ruby
cd has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has quit [Quit: Leaving]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
cd has joined #ruby
prion has joined #ruby
dfucci has quit [Ping timeout: 258 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dittonedo has joined #ruby
dfucci has joined #ruby
akem has quit [Ping timeout: 260 seconds]
burgestrand has joined #ruby
cliluw has quit [Ping timeout: 240 seconds]
cliluw has joined #ruby
prion has quit [Ping timeout: 264 seconds]
danielk43[m] has quit [Quit: Idle for 30+ days]
ur5us has joined #ruby
vondruch has joined #ruby
jenrzzz has joined #ruby
royo25 has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 260 seconds]
kashike has quit [Ping timeout: 244 seconds]
mr_rich101 has joined #ruby
mr_rich101 has quit [Quit: ZNC - http://znc.in]
weaksauce has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
cd has quit [Quit: cd]
bsdbandit-01 has joined #ruby
dfucci has quit [Ping timeout: 258 seconds]
<dostoyevsky> What variable contains the current filename in this context <<ruby -ne 'puts $FILE if /something/' *>>
Tuor has left #ruby ["https://quassel-irc.org - Chat comfortably. Anywhere."]
<leah2> is there a ruby markdown library that allows for filters on the AST (as pandoc e.g.)?
royo25 has quit [Remote host closed the connection]
dfucci has joined #ruby
royo25 has joined #ruby
dittonedo has quit [Quit: WeeChat 2.5]
prion has joined #ruby
tfreedman has joined #ruby
jhill has joined #ruby
ec has joined #ruby
englishm has joined #ruby
manveru has joined #ruby
<EdwardIII> not long to dec 25th, exciting
chromis has joined #ruby
Lewix has joined #ruby
Lewix_ has joined #ruby
afisher has joined #ruby
r3my has joined #ruby
kevinsjoberg has joined #ruby
<EdwardIII> i guess a lot of big ruby software cos will be adopting RBS once it's out and final
clinth has joined #ruby
kozowu has joined #ruby
CustosLimen has joined #ruby
dputtick has joined #ruby
stryek has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
lolol has joined #ruby
<lolol> hi
Jack has joined #ruby
hiroaki has joined #ruby
Jack has quit [Ping timeout: 256 seconds]
lolol has quit [Ping timeout: 245 seconds]
dviola has quit [Ping timeout: 240 seconds]
leftylink has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
leftylink has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
Emmanuel_Chanel has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
dfucci has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
dfucci has quit [Ping timeout: 246 seconds]
prion has quit [Ping timeout: 240 seconds]
prion has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
somazero has joined #ruby
dfucci has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
<havenwood> EdwardIII: We're already adopting RBS and using Steep. Really nice. :) Granted, we employ the author, but for critical Ruby code it's a lovely additon.
bsdbandit-01 has quit [Read error: Connection reset by peer]
stryek has quit [Quit: Connection closed for inactivity]
Emmanuel_Chanel has quit [Ping timeout: 258 seconds]
momo_ has joined #ruby
<momo_> hello
<EdwardIII> havenwood: employing the author must really help speed up adoption haha
Swyper has joined #ruby
<momo_> can sorbet handle private definitions of initialize() when called with new?
<momo_> https://sorbet.run/#%23%20typed%3A%20true%0Aclass%20A%0A%20%20extend%20T%3A%3ASig%0A%0A%20%20sig%20%7Bparams(x%3A%20Integer).void%7D%0A%20%20private%20def%20initialize(x)%0A%20%20end%0Aend%0A%0Adef%20main%0A%20%20A.new(91)%20%20%0Aend
<EdwardIII> havenwood: en10n you use RBS and steep together? or you're migrating from steep? sorry i've been out of the loop with ruby for a while
<EdwardIII> so sorry if that is a stupid question
<momo_> I am getting an error: non-private call to private method initialize.
<havenwood> EdwardIII: We use RBS and Steep together. (Soutaro authored both.)
Mia has quit [Write error: Connection reset by peer]
dfucci has quit [Ping timeout: 240 seconds]
<havenwood> momo_: I don't know, but now that I think of it, #initialize is typically already private.
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
<momo_> havenwood: think so to, I will ask in slack.
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
<EdwardIII> havenwood: is that company square? as in square enix?
<Technodrome> apotheon flask itself is a sinatra clone for sure, but the issue is, ruby is just more fun overall. People make gems to do more quirky slick things. You never really get the same thing in Python except for maybe 2005 in Turbogears
<EdwardIII> no, different square
<havenwood> EdwardIII: Nope, not Square Enix or Squarespace. Just plain 'ole Square. :)
<EdwardIII> cool stuff though
<havenwood> EdwardIII: Same CEO as Twitter—hat's how you can recognize us, hah.
Mia has quit [Write error: Connection reset by peer]
<havenwood> apotheon: <3 Roda.
<EdwardIII> havenwood: good pedigree :)
<havenwood> Looks neat, but all my reflektions fail? Hem. https://github.com/refIekt/reflekt
<EdwardIII> havenwood: have you used roda in prod? i was tempted to use it when playing around with serverless (i like rails but it's no good there)
somazero has quit [Quit: Leaving]
<havenwood> EdwardIII: Yeah, I've used it in prod but not recently. My partner's open source apps are in Roda too, so that's my current "prod" Roda.
<EdwardIII> ooh cool, can you link to an interesting one? be cool to see how they structure it
<havenwood> EdwardIII: This one is unfortunately shutting down, since Goodreads API is ENDING. :( https://www.yonderbook.com/
<EdwardIII> ah that's a shame! time to make a goodreads alternative with an open api? :D
* havenwood glares at Amazon...
Rudd0 has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
HeavenDestroyer has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
Mia has joined #ruby
Mia has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
HeavenDestroyer has quit [Client Quit]
HeavenDestroyer has joined #ruby
Emmanuel_Chanel has joined #ruby
momo_ has quit [Quit: leaving]
<EdwardIII> havenwood: what kind of stuff do you do at work? webdev?
<havenwood> EdwardIII: I lead the del rel team.
<havenwood> EdwardIII: dev*
<EdwardIII> developer relations?
<havenwood> EdwardIII: yup
<EdwardIII> sounds pretty fun! what does that involve?
<havenwood> EdwardIII: Advocating for developers with product teams and engineers and evangelizing APIs and SDKs with things like videos, posts, tweets, and so on.
<havenwood> EdwardIII: https://twitter.com/squaredev
<EdwardIII> sounds like good fun. blogging?
<havenwood> EdwardIII: https://www.youtube.com/squaredev
<havenwood> EdwardIII: Yeah, that too. https://developer.squareup.com/blog/
<EdwardIII> very cool
impermanence has quit [Quit: Connection closed]
<Technodrome> havenwood what have you been up to?
<havenwood> Technodrome: o/
<havenwood> Technodrome: Not sleeping, that's for sure!
<havenwood> Technodrome: How about you?
<Technodrome> I had to port an old PHP app for some internal time reporting to Ruby, rails, devise, cancan was super smooth
<Technodrome> almost used pundit but changed my mind
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
smurfke has joined #ruby
lipoqil has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
bsdbandit-01 has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
bsdbandit-01 has quit [Read error: Connection reset by peer]
al2o3-cr-tmp has joined #ruby
al2o3-cr-tmp is now known as al203-cr
bkuhlmann has joined #ruby
mconnolly has joined #ruby
hiroaki has quit [Ping timeout: 256 seconds]
dfucci has joined #ruby
ninth has joined #ruby
ninth_ has joined #ruby
cliluw has quit [Ping timeout: 240 seconds]
cliluw has joined #ruby
ninth_ has quit [Client Quit]
ninth has quit [Client Quit]
burgestrand has quit [Quit: burgestrand]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
hiroaki has joined #ruby
lucasb has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
mue has joined #ruby
dfucci has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bsdbandit-01 has joined #ruby
maryo87 has joined #ruby
Besnik_b has joined #ruby
Besnik_b has quit [Client Quit]
maryo has quit [Ping timeout: 240 seconds]
dfucci has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
dfucci has joined #ruby
ellcs has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
<tempate> Can one do something like a.all?.with_index ?
stryek has joined #ruby
Rudd0 has joined #ruby
bsdbandit-01 has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
<havenwood> tempate: a.each_with_index.all?
<tempate> havenwood: precisely
<tempate> Thanks
bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
bvdw has quit [Remote host closed the connection]
chouhoulis has joined #ruby
dfucci has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
bkuhlmann has quit []
mue has quit [Quit: leaving]
drincruz has joined #ruby
royo25 has quit [Quit: Bye]
pothibo has joined #ruby
<baweaver> havenwood ^^^
ChmEarl has joined #ruby
<havenwood> baweaver: LiveViewesque :)
<havenwood> baweaver: I like it.
Xiti` has joined #ruby
Xiti has quit [Ping timeout: 256 seconds]
woodruffw has quit [Ping timeout: 264 seconds]
<baweaver> Now to get back to writing guides and content for Ruby class
<leah2> isnt that new react server side thingy also sending html over the wire?
<leah2> everything old is new again
bvdw has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Changing host]
woodruffw has joined #ruby
<baweaver> 🎶 It's the ciiiiircle of devvvvvv, and it moves ussss Aaaalllll 🎶
cer0 has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
moldorcoder7 has quit [Ping timeout: 256 seconds]
dfucci has quit [Ping timeout: 240 seconds]
bsdbandit-01 has joined #ruby
moldorcoder7 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
woodruffw has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
mich9x has joined #ruby
ian| has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Changing host]
woodruffw has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
ellcs has quit [Ping timeout: 268 seconds]
Emmanuel_Chanel has quit [Quit: Leaving]
mich9x has quit [Quit: mich9x]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
pothibo has quit [Quit: Connection closed]
Emmanuel_Chanel has joined #ruby
cowgomoo has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
drincruz has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
orbyt_ has joined #ruby
drincruz has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
cognemo has quit [Quit: cognemo]
cognemo has joined #ruby
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
hiroaki has quit [Ping timeout: 246 seconds]
bambanx has joined #ruby
thecoffemaker has quit [Ping timeout: 260 seconds]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
dionysus69 has quit [Quit: dionysus69]
hiroaki has joined #ruby
bsdbandit-01 has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
bambanx has quit [Read error: Connection reset by peer]
bambanx has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
Emmanuel_Chanel has quit [Quit: Leaving]
bambanx has quit [Read error: Connection reset by peer]
bambanx has joined #ruby
Emmanuel_Chanel has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
dfucci has joined #ruby
coniptor has joined #ruby
cer0 has quit [Ping timeout: 240 seconds]
va5c0 has joined #ruby
bubu has joined #ruby
prion has quit [Ping timeout: 260 seconds]
bubu is now known as pupu
<pupu> anybody home?
pupu has quit [Remote host closed the connection]
<apotheon> hm, two minutes
<apotheon> not long to wait
<leftylink> too bad
bambanx has quit [Read error: Connection reset by peer]
Xiti` has quit [Quit: Leaving]
xf3rno_ has joined #ruby
cer0 has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
bsdbandit-01 has joined #ruby
mconnolly has quit [Quit: WeeChat 2.9]
ur5us has joined #ruby
Xiti has joined #ruby
gix has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
maryo87 has quit [Read error: Connection reset by peer]
maryo87 has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
maryo_87 has joined #ruby
bsdbandit-01 has joined #ruby
maryo_87 has quit [Remote host closed the connection]
maryo_87 has joined #ruby
maryo_87 has quit [Max SendQ exceeded]
maryo_87 has joined #ruby
ellcs has joined #ruby
maryo87 has quit [Ping timeout: 260 seconds]
aremaref has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
ruurd has quit [Quit: bye folks]
bsdbandit-01 has joined #ruby
<leah2> hm, apparently the reason is that many spa are too big now...
xf3rno_ has quit [Ping timeout: 240 seconds]
maryo_87 has quit [Ping timeout: 264 seconds]
prion has joined #ruby
va5c0 has quit [Ping timeout: 256 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
ua_ has quit [Ping timeout: 256 seconds]
TCZ has joined #ruby
thecoffemaker has joined #ruby
aremaref has quit [Ping timeout: 240 seconds]
braincrash has quit [Ping timeout: 256 seconds]
pothibo has joined #ruby
ua_ has joined #ruby
aremaref has joined #ruby
aremaref has quit [Ping timeout: 272 seconds]
cuerbot has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
bsdbandit-01 has joined #ruby
braincrash has joined #ruby
jenrzzz has joined #ruby
dfucci has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
cliluw has quit [Ping timeout: 264 seconds]
cliluw has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
prion has quit [Ping timeout: 260 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weaksauce has joined #ruby
balo has quit [Ping timeout: 256 seconds]
pothibo has quit [Quit: Connection closed]
braincrash has quit [Ping timeout: 256 seconds]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
bsdbandit-01 has joined #ruby
<tempate> It should be faster to check whether an element is in a set than in an array, right?
somazero has joined #ruby
somazero has quit [Max SendQ exceeded]
somazero has joined #ruby
prion has joined #ruby
<leah2> yes
<leah2> for big sets at least
ellcs has quit [Ping timeout: 268 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
<tempate> My code is quite slow for some reason
<tempate> I think it may have to do with the fact that I have to compare whether a given array has already been seen
<tempate> As I change arrays all the time I have to make a copy before saving it, which takes time
<leah2> are you doing aoc?
<tempate> I am, yes
dfucci has quit [Ping timeout: 256 seconds]
<tempate> How did you know :^)
<leah2> and you saw the part that the recursion only uses a limited set of cards
<leah2> i did it earlier
<tempate> oh, nice
<tempate> I saw that part, yes; I don't see how it's pertinent
<leah2> well if you forget it, it takes a loooot longer :D
<leah2> so, how long does it take?
<tempate> 2.1s
<tempate> Part 2 that is
<leah2> sounds ok to me...
<tempate> My friend's code was ~500ms
<leah2> also in ruby?
<tempate> In Python
<tempate> I was thinking I could maybe hash the arrays and save them?
<tempate> That way I only need to compare the hashes
<tempate> And I avoid having to copy the array every time I save it
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
ur5us_ has quit [Ping timeout: 260 seconds]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
bsdbandit-01 has joined #ruby
TCZ has quit [Quit: https://github.com/srgx]
bsdbandit-01 has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
<havenwood> tempate: Show your code?
<tempate> havenwood: yes, sorry, this is what I currently have: https://github.com/Tempate/Advent-of-Code-2020/blob/master/day22/main.rb
<tempate> havenwood: I was thinking lambda functions may be more suited (and faster?) than those small functions I have
bsdbandit-01 has joined #ruby
<havenwood> tempate: It's not a big deal, but File.open without a block doesn't close the file. Instead, combine lines 4 & 5 with: input = File.read("input.txt").split("\n\n")
<tempate> havenwood: oh, alright
<havenwood> tempate: Or maybe even?: File.readlines("input.txt", chomp: true)
<havenwood> tempate: #any? is better than #map here since it'l shortcircuit https://github.com/Tempate/Advent-of-Code-2020/blob/master/day22/main.rb#L64
<tempate> havenwood: will that split my file into two sections, based on the "\n\n" ?
<havenwood> decks.any? { |deck| deck.size.zero? }
bsdbandit-01 has quit [Read error: Connection reset by peer]
<leftylink> eh?
<leftylink> that's an &:empty? if I ever saw one
<havenwood> leftylink: Good point.
<havenwood> tempate: Instead of `index +1` you can `with_index(1)` here https://github.com/Tempate/Advent-of-Code-2020/blob/master/day22/main.rb#L74
bsdbandit-01 has joined #ruby
<havenwood> tempate: desks.any?(&:empty?)
<havenwood> decks* >.>
<havenwood> tempate: Use two spaces in Ruby land.
<tempate> So many improvements, good, good
<tempate> havenwood: right, right, I haven't changed my editor yet
bsdbandit-01 has quit [Read error: Connection reset by peer]
<tempate> apologies
<havenwood> tempate: Run it with a --jit flag, assuming your benchmark accounts for warmup time.
<leftylink> oh, completely forgot there's `push` that can take multiple args because of me using << all the time...
<tempate> Do you like the small functions?
<tempate> Should I just have that code in the main thing? Or maybe make lambdas?
<havenwood> tempate: Extract even more methods from the long ones. Put these together in a class that initializes with the input and assigns an @input instance variable that the other methods use. Make them all private but for the one that runs it.
<havenwood> tempate: Alternatively, don't use @input and put these in a module instead of a class.
<havenwood> tempate: If the file is named "main.rb" the class or module should be Main.
<tempate> Hmmm
<havenwood> tempate: Maybe start with a module?
<havenwood> tempate: module Main
<havenwood> tempate: module_function
<tempate> Alright, I can do that
<havenwood> tempate: then the methods you have.
bsdbandit-01 has joined #ruby
<leftylink> that play_subgame is a zip
<havenwood> tempate: can you save `parse(input)` as a local variable and reuse it twice, here? https://github.com/Tempate/Advent-of-Code-2020/blob/master/day22/main.rb#L78
<havenwood> tempate: parsed_input = parse(input)
<tempate> leftylink: what do you mean?
<leftylink> I mean that one should be using zip there, not each_with_index.
<tempate> havenwood: well, the problem is that the function messes with the array of decks it's given
ur5us has joined #ruby
<tempate> havenwood: I could make a deep copy instead of calculating it twice, sure
cliluw has quit [Ping timeout: 256 seconds]
<havenwood> tempate: I just mean don't call the method twice, just save the result of the first time you call it.
ur5us_ has quit [Ping timeout: 258 seconds]
<havenwood> tempate: Oh, you're mutating it?
cer0 has quit [Quit: leaving]
<havenwood> tempate: Yeah, cheaper to dup in that case still.
<havenwood> tempate: I guess maybe not if you're deep modifying?
<tempate> havenwood: I am modifying it, yes
<leftylink> it's an array of two arrays of ints, it'll be fine, map(&:dup)
<tempate> havenwood: err, deep modifying it
<havenwood> tempate: what leftylink said
<havenwood> tempate: how long does it take now?
<tempate> Pretty much the same as it did before, tbh
<tempate> 1.7s
<tempate> I made a change which made it drop from the 2.x s it was taking earlier
<tempate> I'm basically only saving one of the decks
<tempate> I was saving both before
ruby[bot] has quit [Remote host closed the connection]
cnsvc has joined #ruby
ruby[bot] has joined #ruby
<tempate> Let me figure out how to change the identation in vscode and I'll update it
<havenwood> tempate: Ruby Ruby with `--disable=gems` for a quicker startup time.
<havenwood> tempate: Try with and without `--jit` too.
ruurd has joined #ruby
<havenwood> tempate: Probably need to look at the tight loop portion and optimize that.
<tempate> 1.69s :^)
<havenwood> tempate: Is that with --jit and dup?
braincrash has joined #ruby
<tempate> Yes
<havenwood> tempate: Show the code and command you're running?
<havenwood> tempate: How long does it take just to read the file?
<havenwood> tempate: What's the slow part?
<tempate> I just uploaded it
<tempate> The 2-spaced indentation is on its way
<tempate> havenwood: The slow part is run_game2
<havenwood> tempate: On line 70, do: decks.zip(cards).all? { |deck, card| card <= deck.size }
<tempate> oh, right, I forgot to change that
<tempate> Down to 1.55s
bsdbandit-01 has quit [Read error: Connection reset by peer]
<havenwood> tempate: You might try SortedSet instead of Set.
<havenwood> tempate: If you install an RBTree gem, SortedSet will also use the C implementation of a sorted set. https://github.com/kyrylo/rbtree3
<tempate> 1.65s with SortedSet
<havenwood> tempate: gem install rbtree
<havenwood> tempate: SortedSet will use it automagically.
<havenwood> (Just put it in the Gemfile.)
<havenwood> tempate: I'd extract more methods from the slow part then benchmark.
<tempate> I can only paste the output I just got
<havenwood> tempate: gem install ruby-prof
cliluw has joined #ruby
<tempate> Installed; the warnings keep coming
<havenwood> tempate: What's the command that you're running?
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
<tempate> time ruby main.rb --disable=gems --jit
<havenwood> tempate: I'd highly recommend hyperfine.
<havenwood> tempate: hyperfine "ruby main.rb --disable=gems --jit"
<havenwood> tempate: Assuming macOS: brew install hyperfine
<tempate> Fedora
<havenwood> tempate: dnf install hyperfine # :)
<tempate> right
<havenwood> tempate: You might try Ruby 3.0.0-rc1. I'd profile it and find the slow part.
<havenwood> tempate: Also, try TruffleRuby.
<tempate> havenwood: what's TruffleRuby?
Technodrome has joined #ruby
bsdbandit-01 has joined #ruby
Xiti has quit [Quit: Leaving]
cd has joined #ruby
bsdband58 has joined #ruby
bsdbandit-01 has quit [Ping timeout: 264 seconds]
postmodern has joined #ruby
<tempate> havenwood: Thanks for the amazing help as always
bsdband58 has quit [Read error: Connection reset by peer]
bsdbandit-01 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
Xiti has joined #ruby
<havenwood> tempate: It's an alternative implementation of Ruby, like JRuby.
<havenwood> tempate: rvm get head && rvm install truffleruby
<havenwood> tempate: Always interesting to compare JRuby and TruffleRuby when benchmarking.