havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.1, 3.0.3, 2.7.5: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
bjonnh has joined #ruby
bjonnh has quit [Changing host]
Guest3952 has quit [Ping timeout: 240 seconds]
Goodbye_Vincent has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
Rounin has quit [Ping timeout: 272 seconds]
hololeap has quit [Remote host closed the connection]
hololeap has joined #ruby
ur5us has joined #ruby
asveepay has joined #ruby
<nakilon> I feel like I need something like this made in Ruby https://github.com/afroisalreadyinu/miniboss#lifecycle-events to control a pile of doker containers on my server
<nakilon> not just compose replacement but something higher; maybe I'm reinventing something though, but currently I have a huge README-like config copypasta I put together for a case "if I need to recreate/fix the server" that is a hugely easier because of being in docker-compose that hwat it was before but I feel like it can be even better
<nakilon> some docker services orchestration with ability to write their management logic as a Ruby script
<ox1eef> Python looks to be leading in that area
<nakilon> it's leading in wasting people resources
<nakilon> /s
<ox1eef> what do you mean
<ox1eef> python is lucky in that way, far more diverse application of use in the mainstream.
<ox1eef> at one time it seemed it could have been ruby, i remember vagrant being ruby once.
<nakilon> the mainstream is not code or even use pc but sit and drink in night club
<nakilon> and to not build anything
<nakilon> rather destroy, consume and create problems, not solve
<ox1eef> haha true
<nakilon> idk what was that luck that vagrant was in ruby, not pithon, but they are of absolutely the same range of applicabiilty
<ox1eef> on twitter python is what everyone learns and recommends, at least among the influencers
<ox1eef> indeed, i think that too, theyre both as capable as each other.
<nakilon> anyway, I've fully switched from pithon 9 years ago and don't wanna waste 90% of time again on solving the errors that are happening due to the bad language design and tooling
<ox1eef> another cool thing written in python is youtube-dl
ur5us has quit [Ping timeout: 240 seconds]
bluedust has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 256 seconds]
SteveR has joined #ruby
bluedust has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust_ has quit [Ping timeout: 256 seconds]
bluedust has quit [Read error: Connection reset by peer]
bluedust has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 272 seconds]
bluedust has joined #ruby
bluedust_ has quit [Ping timeout: 256 seconds]
teclator has joined #ruby
bluedust has quit [Remote host closed the connection]
Rounin has joined #ruby
gr33n7007h has quit [Ping timeout: 252 seconds]
TCZ has joined #ruby
SteveR has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Leaving]
r3m has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 240 seconds]
_aeris_ is now known as aeris
michigan has quit [Quit: Connection closed for inactivity]
Guest3952 has joined #ruby
bluedust has joined #ruby
ua_ has quit [Read error: Connection reset by peer]
ua_ has joined #ruby
bluedust has quit [Remote host closed the connection]
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
factor1 has joined #ruby
factor has quit [Ping timeout: 256 seconds]
factor1 is now known as factor
vit has joined #ruby
vit is now known as Guest5584
Guest3952 has quit [Ping timeout: 256 seconds]
phryk has quit [Read error: Connection reset by peer]
phryk has joined #ruby
Aylat has joined #ruby
Aylat has joined #ruby
Aylat has quit [Changing host]
Aylat has quit [Ping timeout: 250 seconds]
gr33n7007h has joined #ruby
bluedust has joined #ruby
bit4bit has joined #ruby
smp has quit [Quit: ZNC 1.8.2 - https://znc.in]
smp has joined #ruby
infinityfye has joined #ruby
infinityfye has quit [Client Quit]
infinityfye has joined #ruby
infinityfye has quit [Client Quit]
orbyt has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust has quit [Remote host closed the connection]
constxd has joined #ruby
<constxd> bros
<constxd> how do i become a ruby guru
<adam12> constxd: Write me some of this, and I will consider you a ruby guru. Plus a cheque for $15 S+H. https://github.com/camping/camping/blob/f2820bbb103f9cfe225647339a4b939560314eec/lib/camping-unabridged.rb#L646-L652
<constxd> adam12: wtf is this
<apotheon> I think, technically, to be a guru you have to act as a teacher/mentor/guide for others.
<constxd> maybe guru is the wrong word
<constxd> how do i become a ruby wizard
<weaksauc_> a crime
<weaksauc_> that's what that code is
oz has quit [Remote host closed the connection]
<mooff> o.O agree
<mooff> was Camping going for low character count, as well as low line count?
<adam12> Heh
<adam12> mooff: < 4k
<adam12> I like to read the unabridged camping source every once in a while.
<adam12> I'd never suggest writing code in why's style, but I think it's fun to look at.
<mooff> it is cool for sure, it's just also a crime :P
<mooff> i should take a step back and say i appreciate what it is the more i think about it
<mooff> i hadn't heard of Camping until it was brought up here
ox has joined #ruby
wnd has quit [Quit: Caught sigterm, terminating...]
<mooff> (b=$'.split(/^@@\s*(.+?)\s*\r?\n/m)).shift rescue nil
<mooff> what's that line about in Camping.goes ?
<adam12> I think it's to support inline templates. __END__; @@layout Some layout @@index This is the index. Etc.
<adam12> It's neat because I've never seen $' before. It's not even listed as a global, but I think it's an alias for DATA.
<weaksauc_> it's the string to the right of the last successful match apparently
weaksauc_ is now known as weaksauce
<adam12> weaksauce: That's a single quote and not a backtick tho, no?
<adam12> (Unless I'm going crazy)
<weaksauce> it is
<mooff> $` is just above $' there
<weaksauce> backtick is left of the match
<weaksauce> ' is right of the match
<adam12> weaksauce: Huh, you're right. I wonder how I glazed over that.
<adam12> Downside of single char globals, I guess.
<weaksauce> yeah those are less than useable tbf
<weaksauce> holdover from perl i'm sure
<gr33n7007h> prefer MatchData#pre_match for $` and MatchData#post_match for $'
<mooff> E_DRUNKONPERL
<mooff> surprised reading English.rb that global variables can be aliased
<mooff> :: alias $prematch $`; 'hello world'=~/ /; $prematch
<ruby-eval> => "hello"
Guest35 has joined #ruby
<leah2> aliases are weird ;)
mksybr has quit [Quit: WeeChat 3.4]
Guest35 has left #ruby [#ruby]
eddof13 has joined #ruby
donofrio has joined #ruby
eddof13 has quit [Client Quit]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
howdoi has joined #ruby
ur5us has joined #ruby
gr33n7007h has quit [Ping timeout: 260 seconds]
gr33n7007h has joined #ruby
oxfuxxx has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
ur5us has quit [Quit: Leaving]
ur5us has joined #ruby
ged has joined #ruby
<apotheon> constxd: one spell at a time
orbyt has quit [Quit: Textual IRC Client: www.textualapp.com]
TCZ has joined #ruby
r3m has quit [Quit: WeeChat 3.5-dev]
nmollerup has quit [Quit: Leaving]
oxfuxxx has quit [Ping timeout: 250 seconds]
teclator has joined #ruby
teclator has quit [Client Quit]
oxfuxxx has joined #ruby
<constxd> apotheon: how to start learning spells tho
<apotheon> practice, projects, and a good book perhaps
<apotheon> probably need a wizard's tome, yeah
<constxd> need fast track
<weaksauce> eye of newt it is
<constxd> what is the optimal wizard's tome
<apotheon> Oh! Well, there's a fast-track method, called Learn Programming in Only Ten Years!
<constxd> i don't need to learn programming just ruby
<apotheon> The novice's tome for Ruby is Eloquent Ruby.
<apotheon> Ah, that's much quicker than learning programming.
<constxd> but i want to understand all the magic that most resources gloss over
<apotheon> Start with Eloquent Ruby, then go to POODR or Understanding Computation, then whichever of them you didn't already read, then Metaprogramming Ruby.
<apotheon> There's your path.
<constxd> what if i start with metaprogramming ruby
<constxd> will i be lost
<apotheon> It turns out that's actually kind of a fast-track except maybe Understanding Computation (it depends on the student), because they're all very well-written books that are easy and fun for the talented student to get through.
<apotheon> probably
<apotheon> You'll definitely skip some very important stuff.
<apotheon> Going straight to Metaprogramming Ruby is a great way to be a danger to yourself and others.
<apotheon> There's some deep magic in Understanding Computation, too.
<apotheon> I *suppose* you could get to Understanding Computation *after* Metaprogramming Ruby.
<constxd> what about ruby under the microscope or whatever
<apotheon> . . . but you should definitely get POODR between Eloquent and Metaprogramming.
<apotheon> I haven't read it, yet, but I'd recommend that only after the other four. For one thing, it won't be as useful to you until you've gotten that far.
<apotheon> probably won't, anyway; as I said, I haven't read it yet
TCZ has quit [Quit: Leaving]
<constxd> most of the programming i do is in my own toy language and it's so satisfying when you have good mental model of what everything is doing under the hood
<constxd> then i'll run into something where i need a language with a better ecosystem and get frustrated because i don't understand exactly how everything works
oxfuxxx has quit [Ping timeout: 250 seconds]
<constxd> i want to know ruby as well as i know my own language so it feels automatic to write
<apotheon> Well . . . I guess you could go for Microscope sooner, if you're less interested in wizardry-quickly.
<constxd> man $85 cad for paperback Eloquent Ruby
<apotheon> That's more sage area, not wizard area.
<apotheon> Holy shit. Why is it that expensive?
<apotheon> Go somewhere piracy is legal and get an ebook.
<apotheon> (I think it's kinda clever how I avoided running afoul of the IRC network's rules against illegal stuff.)
<apotheon> I'm kidding, obviously.
<apotheon> Wow, it's about 53 USD on Amazon for the paperback.
<newton> wonder if there aren't so many copies anymore? it was $30 USD in 2012 :^)
<newton> library genesis, a totally real and normal library, has a lot of programming ebooks. encourage buying books that are reasonably priced.
wnd has joined #ruby
oxfuxxx has joined #ruby
<constxd> i like physical books
<constxd> but yeah this is kinda pricy
<newton> same. I tried doing the ebook thing, still prefer having the real thing on my shelf
<weaksauce> i've seen eloquent ruby on github in a country where piracy is legal
<weaksauce> i think it's out of print?
<newton> github would remove it if it was DMCA'd, since github is in a jurisdiction where it isn't legal, I think
<apotheon> newton: It's a nice library.
<apotheon> newton: I agree with the encouragement of reasonably priced book sales.
<apotheon> My big problem with Eloquent Ruby is the pricing and (if they're still doing it) DRM.
<newton> i think weaksauce is right that it's probably not in print anymore. 11 years old now
<legit> I wish Eloquent Ruby got an update
<apotheon> constxd: get it from the friendly library
<weaksauce> you could shoot him an email if you want http://eloquentruby.com/pages/about/
<weaksauce> though is he dead?
<apotheon> newton: An epaper style ereader goes a long way toward making ebooks better.
<weaksauce> guess not he retweeted someone last year
<newton> weaksauce, he liked a 21h old tweet recently too
<newton> I was not prepared to hear russ olsen died :')
<weaksauce> oh that's good
<legit> weaksauce: doesn't seem dead, but more interested in Clojure now
<apotheon> newton: They're still different from dead tree format, but I find a DRM-free EPUB sideloaded on an epaper-style ereader is a trade-off rather than inferior.
<weaksauce> i just saw his website hadn't been updated since 2015
<legit> And Haskell heh
<weaksauce> the copyright thing
<apotheon> Yeah, he wrote a Clojure book in 2018, apparently.
<apotheon> bummer
<apotheon> Does Clojure compile to object code via LLVM yet?
<weaksauce> the pdf of it was formatted well
<apotheon> weaksauce: . . . of which?
<weaksauce> i don't think epub is workable for programming books
<apotheon> Why not?
<weaksauce> eh the eloquent ruby
<apotheon> PDFs are fucking *awful*.
<apotheon> I found the EPUB of Eloquent quite nice.
<weaksauce> probably is yeah since ruby code is double space indented
<apotheon> Some programming books are definitely not as good in EPUBs, but that's largely a matter of how you organize the book, I think.
<weaksauce> and most of it was prose anyway
<weaksauce> and my physical copy is fairly small for a programming book too
<apotheon> Head First C was not well-formatted for EPUB. Holy crap.
<apotheon> It's also a Head First book, so . . . y'know, there are going to be issues.
oxfuxxx has quit [Ping timeout: 240 seconds]
<apotheon> It's notable, though, in that the topic areas it covers is about 50% of the way toward a C equivalent to Eloquent Ruby, which was interesting.
<apotheon> The didactic style was crap, though, and while 50% is much closer than the vast majority of other books I've seen . . . it still doesn't measure up.
eddof13 has joined #ruby
donofrio has quit [Ping timeout: 245 seconds]
<apotheon> Ruby has an amazing lineup of high quality learning materials.
bit4bit has quit [Ping timeout: 256 seconds]
<apotheon> constxd: There's another path to wizardry, but it involves apprenticing with the right people, and much of that is a matter of lucking into the right people, so it's not something very susceptible to deterministically pursuing the path.
<apotheon> constxd: Stay away from IDEs when learning it if you want to gain wizard skills, too.
<constxd> dont worry i would never use a ruby ide
<constxd> well maybe an lsp server
<newton> i don't use vscode but lsp's being extracted into something a lot of editors can use is pretty awesome
oxfuxxx has joined #ruby
<apotheon> Yeah, don't do that. Just lean heavily on ri and/or web-based Ruby class documentation.
<newton> solargraph is a good lsp for ruby, though it struggles with large apps
<apotheon> Using "smart" tools for it will hinder your development of wizardry.
<apotheon> It's using someone else's wand with spells preset in it.
<apotheon> I'd only use an LSP for corporate deathmarch shit, probably.
<apotheon> . . . and not even that, because I wouldn't seek a corporate death march job.
ruby-eval has quit [Remote host closed the connection]
<apotheon> I'd turn down a job that was overly corporatized unless I was planning to just pad a resume at the corp's expense (thus making the relationship between me and the employer equitable), and I refuse jobs that aren't remote work with highly flexible hours.
<apotheon> . . . or maybe, instead of resume padding, preparing to be a whistleblower, I guess.
Guest5584 has quit [Ping timeout: 272 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bit4bit has joined #ruby
bit4bit has quit [Client Quit]
<mooff> here are some really nice spells
oxfuxxx has quit [Ping timeout: 256 seconds]
<legit> rubyapi.org is nicely formatted
<mooff> ooh, so it is
oxfuxxx has joined #ruby
<mooff> ruby-doc.org was my main reference when learning Ruby, and still is
ur5us has quit [Ping timeout: 240 seconds]
<mooff> the links weren't meant to be facetious, the method lists really were eye opening and it felt like learning powerful new spells every time
<mooff> the core classes are pretty good
oxfuxxx has quit [Ping timeout: 240 seconds]
<constxd> question
<constxd> inside of a method definition, @foo refers to the instance variable foo belonging to the `self` object
oxfuxxx has joined #ruby
<constxd> if if you have another object of the same type, you need to use the instance_variable_get method with :@foo to get its @foo?
<weaksauce> or have it be attr_reader/attr_accessor/attr_writer
<constxd> so you can't have like
<constxd> `private` attributes
<weaksauce> nothing in ruby is truly private no
Manouchehri has joined #ruby