havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.2, 3.1.4, 3.0.6, 3.3.0-preview1: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://t.ly/9ua4 | Logs: https://libera.irclog.whitequark.org/ruby/
roshanavand has quit [Ping timeout: 252 seconds]
konsolebox has quit [Quit: Leaving]
caedmon has joined #ruby
markong has quit [Ping timeout: 260 seconds]
m_antis has quit [Ping timeout: 245 seconds]
Guest8280 has left #ruby [WeeChat 4.0.0]
dviola has joined #ruby
Al2O3 has quit [Quit: I'm quitting, thanks for all the sharks.]
Al2O3 has joined #ruby
Al2O3 has quit [Remote host closed the connection]
Al2O3 has joined #ruby
Al2O3 has quit [Remote host closed the connection]
Al2O3 has joined #ruby
johnjaye has quit [Ping timeout: 240 seconds]
Al2O3 has quit [Changing host]
Al2O3 has joined #ruby
johnjaye has joined #ruby
caedmon has quit [Ping timeout: 250 seconds]
Huckleberry7777 has joined #ruby
Huckleberry777 has quit [Ping timeout: 264 seconds]
Huckleberry7777 is now known as Huckleberry777
jhass has quit [Ping timeout: 260 seconds]
Al2O3 has quit [Quit: I'm quitting, thanks for all the sharks.]
Al2O3 has joined #ruby
jhass has joined #ruby
Al2O3 has joined #ruby
Al2O3 has quit [Changing host]
Al2O3_ has joined #ruby
Al2O3_ has quit [Changing host]
Al2O3_ has joined #ruby
Al2O3_ has quit [Remote host closed the connection]
Al2O3_ has joined #ruby
Al2O3_ has quit [Changing host]
Al2O3_ has joined #ruby
Al2O3 has quit [Killed (molybdenum.libera.chat (Nickname regained by services))]
Al2O3_ is now known as Al2O3
jhass has quit [*.net *.split]
Huckleberry777 has quit [*.net *.split]
Arthur has quit [*.net *.split]
pounce has quit [*.net *.split]
meimei has quit [*.net *.split]
dalan0382 has quit [*.net *.split]
supay has quit [*.net *.split]
JSharp has quit [*.net *.split]
hrberg has quit [*.net *.split]
brokkoli_origin has quit [*.net *.split]
newton has quit [*.net *.split]
itok has quit [*.net *.split]
jetchisel has quit [*.net *.split]
alexisg has quit [*.net *.split]
whereiseveryone has quit [*.net *.split]
pjaspers has quit [*.net *.split]
caleb has quit [*.net *.split]
tsujp has quit [*.net *.split]
slondr has quit [*.net *.split]
matta has quit [*.net *.split]
g_sg has quit [*.net *.split]
sgtapple has quit [*.net *.split]
johnhamelink has quit [*.net *.split]
patrick has quit [*.net *.split]
graemefawcett has quit [*.net *.split]
Bounga has quit [*.net *.split]
helveticamono has quit [*.net *.split]
Manouchehri__ has quit [*.net *.split]
Cork has quit [*.net *.split]
splud has quit [*.net *.split]
pavelz has quit [*.net *.split]
hrberg has joined #ruby
Al2O3 has quit [Quit: I'm quitting, thanks for all the sharks.]
dalan0382 has joined #ruby
jhass has joined #ruby
Huckleberry777 has joined #ruby
Arthur has joined #ruby
alexisg has joined #ruby
JSharp has joined #ruby
jetchisel has joined #ruby
itok has joined #ruby
brokkoli_origin has joined #ruby
supay has joined #ruby
whereiseveryone has joined #ruby
pjaspers has joined #ruby
newton has joined #ruby
caleb has joined #ruby
tsujp has joined #ruby
matta has joined #ruby
pavelz has joined #ruby
sgtapple has joined #ruby
johnhamelink has joined #ruby
g_sg has joined #ruby
Bounga has joined #ruby
graemefawcett has joined #ruby
slondr has joined #ruby
patrick has joined #ruby
Manouchehri__ has joined #ruby
Cork has joined #ruby
helveticamono has joined #ruby
splud has joined #ruby
caedmon has joined #ruby
dalan0382 has quit [Max SendQ exceeded]
dalan03822 has joined #ruby
meimei has joined #ruby
Manouchehri__ has quit [Ping timeout: 245 seconds]
Al2O3_ has joined #ruby
itok has quit [Ping timeout: 245 seconds]
Manouchehri__ has joined #ruby
itok has joined #ruby
Al2O3_ has quit [Quit: I'm quitting, thanks for all the sharks.]
c10l8 has joined #ruby
c10l has quit [Ping timeout: 240 seconds]
c10l8 is now known as c10l
pounce has joined #ruby
caedmon has quit [Ping timeout: 240 seconds]
Perflosopher has joined #ruby
caedmon has joined #ruby
caedmon has quit [Client Quit]
caedmon has joined #ruby
caedmon has quit [Ping timeout: 250 seconds]
_ht has joined #ruby
Sankalp has quit [Ping timeout: 260 seconds]
Jojero has joined #ruby
MalusVulgaris has joined #ruby
caedmon has joined #ruby
caedmon has quit [Ping timeout: 260 seconds]
Sankalp has joined #ruby
roadie has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
MalusVulgaris has quit [Remote host closed the connection]
roadie has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.92)]
Fernando-Basso has quit [Server closed connection]
_ht has quit [Quit: _ht]
sympt has quit [Quit: Ping timeout (120 seconds)]
sympt has joined #ruby
roadie has joined #ruby
teclator has joined #ruby
roadie has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.92)]
Jojero has quit [Read error: Connection reset by peer]
teclator has quit [Ping timeout: 252 seconds]
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
Jojero has joined #ruby
Jojero has quit [Read error: Connection reset by peer]
Furai has quit [Quit: WeeChat 4.0.0]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
roshanavand has joined #ruby
Furai has joined #ruby
Jojero has joined #ruby
Jojero has quit [Ping timeout: 250 seconds]
gr33n7007h has quit [Ping timeout: 260 seconds]
hays has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
gr33n7007h has quit [Ping timeout: 245 seconds]
heartburn has joined #ruby
cata has joined #ruby
gr33n7007h has joined #ruby
bastelfreak has quit [Ping timeout: 600 seconds]
roshanavand has quit [Ping timeout: 245 seconds]
jhass[m] has quit [Server closed connection]
jhass[m] has joined #ruby
bastelfreak has joined #ruby
petru has joined #ruby
foxxx0 has joined #ruby
c10l has quit [Quit: See ya! o/]
smp_ has joined #ruby
smp has quit [Ping timeout: 246 seconds]
smp_ is now known as smp
roadie has joined #ruby
roshanavand has joined #ruby
keypresser86 has quit [Ping timeout: 250 seconds]
konsolebox has joined #ruby
c10l has joined #ruby
c10l has quit [Client Quit]
c10l has joined #ruby
roadie` has joined #ruby
roadie has quit [Ping timeout: 258 seconds]
benjaminwil has quit [Server closed connection]
benjaminwil has joined #ruby
Argorok has joined #ruby
markong has joined #ruby
c10l has quit [Quit: See ya! o/]
TomyWork has joined #ruby
roadie` has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.92)]
c10l has joined #ruby
roadie has joined #ruby
<nona> hmm so i guess the answer to my question is "all the cool rubyists on IRC manage to refuse the use of any IDE and hence we know nothing about them" :P
ollysmith has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
ollysmith has joined #ruby
teclator has joined #ruby
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
roshanavand has quit [Ping timeout: 245 seconds]
<sarna> the closest thing to an IDE that's convenient and should "just work" is vscode + some plugins - you could try that maybe?
FetidToot3 has joined #ruby
FetidToot has quit [Ping timeout: 246 seconds]
FetidToot3 is now known as FetidToot
roadie has quit [Ping timeout: 255 seconds]
teclator has quit [Ping timeout: 250 seconds]
roadie has joined #ruby
roshanavand has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
dionysus69 has quit [Quit: dionysus69]
markong has quit [Ping timeout: 250 seconds]
donofrio has joined #ruby
<adam12> nona: How do you like RubyMine otherwise? I could see it being helpful for refactorings.
<adam12> nona: I've been using vim for so long, my brain can't handle anything else.
roadie has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.92)]
roadie has joined #ruby
<nona> adam12: definitely the "helpful for refactoring" thing is there. at first i hated it because it uselessly annotates everything-and-the-kitchen-sink for you, including things like spell checking in [what it thinks is] strings. once you tame it a little it gets better. dislike: the default hotkeys, but that may just be a convenience thing on my part ("why can't everything just be vim, please? or at
<nona> least vscode?") what i found *very* helpful is that it manages to display the (English) string for the keys inside of I18n#t('...'), something I could never get to work in VSCode. on the other hand, that's a little half-done because you can't search for some string you saw in your app's UI and be taken to the places where that string would be pulled in by virtue of #t. default syntax highlighting is
<nona> really nice, i'd say better than with vscode's ruby/rails extensions ootb. the whole thing is kind of a mixed bag.
<adam12> That I18n feature sounds super handy.
<nona> indeed
<nona> and i'd _love_ to have it in vim and vscode
<adam12> I used VSCode for a bit (with Ruby bindings) but really didn't adopt it. I find it sluggish after using Vim for so long.
<nona> including searchability, although i realize that's difficult to implement and would likely need an auto-self-updating cache of some kind.
<adam12> I'd love for a killer Ruby plugin for neovim.
<nona> in my current project (lots of old historical overgrowth) that would be a game changer.
<nona> does neovim "just work" for you, switching over from "official" vim?
<adam12> I've mused on some features I think would be nice, like extract method, etc. I think with YARP, maybe we'll start to get those. I think you could get it with Treesitter but the API looks less elegant and more generic.
<adam12> Yes. For one, it ships with most of the vim-sensible defaults (which I think vim 9 does now, if it _doesn't_ detect a .vimrc file).
<nona> cool, might be time to try again
<adam12> My config is reasonably small with not a ton of plugins. It's written in Lua, which has been nice because I can extend it with simple things a lot easier.
<adam12> I have a `Referral` command that shells out to the referral gem then loads a quickfix window.
<adam12> So I could `:Referral -n User` and have all references to the User constant.
<nona> oh, wow
<nona> that's like what vscode does really well with javascript
<adam12> Yeah, I think you can get it with an LSP in some ways (References?). Referral supports a bunch of other stuff, like method calls.
<adam12> I don't write a lot of Javascript so I don't have a great comparison.
<adam12> (I use Unpoly on every project to avoid JS as much as possible)
* nona googles YARP and Unpoly
<adam12> https://github.com/ruby/yarp if it doesn't come up. Unpoly should.
<nona> ooh i've seen that before
<nona> but i'm so bad with all these JS things
<nona> there's a lot of high-level concepts to decode
<nona> like, why do people think something needs to exist
<adam12> I've been using Unpoly since like 2016? It's my _favourite_.
<adam12> I get a SPA like app without really writing any JS. Maybe a few tiny smidges.
<nona> what does it do for you that's not already being covered by Hotwire & friends?
<adam12> Well, Unpoly predates current Hotwire.
<nona> ok
<adam12> (old Hotwire wasn't the same as today's Hotwire)
<nona> so they do the same things?
<adam12> Very similar, yes.
<nona> ok
<adam12> Also similar to htmx, if you've seen it. But Unpoly is more batteries included than both htmx and Hotwire, but Hotwire has more streaming/frame stuff that Unpoly doesn't.
<adam12> Unpoly supports layers/journeys which is interesting.
<nona> the project i'll probably be working on for the foreseeable future, they're trying to move it from 6.1 & jquery/jquery-rails/ujs/etc. over to 7.0 with hotwire
<adam12> You create a new Widget, and need to assign a Company. Company doesn't exist, click here. You click, see new form to create company, and are then back to create the Widget with the form still pre-filled where you left it.
* nona googles htmx too
<adam12> Hotwire isn't a bad decision.
<adam12> Neither is Unpoly/htmx of course.
<nona> it can only get better from where it is right now :P
<adam12> LOL. It's all _soo_ bad.
<adam12> For me it's Unpoly, esbuild (if necessary), and maybe some tiny smidge of a Webcomponent for extra bits.
<adam12> I use Stimulus sometimes too, but webcomponents can almost always sub in.
<nona> modern JS seems to be like, this ancient beast which has kept evolving and evolving but anything non-superficial you want to do, you'd better have been part of the whole journey and be able to really get in the guts of it
<adam12> I don't even bother to look at the dependency tree for the JS portion of apps anymore. I wonder how many people update any of them.
<adam12> This morning I was `bundle outdated && bundle update X`, reviewing each change (checking changelogs, etc)
<nona> we're trying to. in the last project i was, which was plone/react-based, people had been keeping everything the same out of fear, almost panic. it's not a good situation to be in.
* nona tries out `bundle outdated`
<adam12> I couldn't imagine doing it with the 1000+ dependencies most React apps have. This is one of my largest apps and I'm 218 dependencies total (declared and transient).
<nona> ouch. `bundle outdated|wc -l` => 209. nevermind! close that terminal, quickly!
<adam12> LOL.
<nona> how do i get total dependencies? (bundler, not JS)
<adam12> `bundle list`
<nona> 335 o_O
<adam12> Is it a Rails app?
<nona> yes
<adam12> I wonder if that makes a difference. Rails plugins & extensions.
<adam12> This is a Roda+Sequel app, so sometimes we're inclined to just build what we need and not `gem install`
<nona> `grep rails Gemfile|wc -l` is 18 all on its own so i'd guess so, yeah.
<nona> it's probably best to wait for the 7.0/hotwire-rework to wrap up, only upgrading gems as needed, then move to ruby 3.0 (finally!!) and then do the `bundle outdated`, review Changelogs, `bundle update x` you described above. or perhaps even wait until it's up to 7.1...
<ox1eef_> I think an editor or IDE for just one language won't have a huge audience, because I don't write only Ruby and I don't want to write Ruby in a special editor just for it.
roadie has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.92)]
<adam12> nona: Oh yes! Gotta get to Ruby 3. This project started in 2016 so it wasn't super old, and I tried to tend to it frequently, but Ruby 3 upgrade was still a bit of a slog.
<adam12> I basically did it over 12 months of casually shipping a small PR here and there, once gems were updated.
<adam12> ox1eef_: I guess the benefit of Rubymine is it is based on IntelliJ so most keystrokes probably copy over. But opening of JSCharm then RubyMine then whatever else does sound a bit strange. Maybe the UX is better than that.
<ox1eef_> Right, I thought it was based on Eclipse but I think it is still a similar category. When it is just an extension of your editor, or an enhanced Ruby mode - makes a lot more sense.
<nona> ox1eef_: if you ever get one of the I18n (=> t() visual key replacement in-IDE) extensions working in VSCode please do let me know
otisolsen70 has joined #ruby
<adam12> I wonder if gettext is better in that regard. I haven't done any internationalization in years but I remember gettext being ahead in UX
<ox1eef_> My editor of choice is emacs (the doomacs variant). Some things I have to live without, or replace with an alternative that isn't instantly usable without some configuration.
<adam12> gettext seems to favour full strings vs just key lookup.
<ox1eef_> Still, doom does a great job with the configuration it does provide, and makes the while process much easier.
<ox1eef_> whole*
<adam12> I tried Doomacs a number of years ago and it was nice. It didn't fit my workflow at the time (but I don't recall what part).
<ox1eef_> I like it but evil mode is one of the first things I disable as far as defaults go.
<nona> adam12: my older projects were all gettext. and yes, in terms of maintainability it is much better, and also in terms of getting developers and translators work together and prevent mistranslations due to a lack of context.
<adam12> nona: That's the issue I ran into with i18n as well.
<adam12> Thankfully (unthankfully?), I deal with very little translation in recent projects.
<nona> if you ever get one again ... gettext with a database backend is nice.
<adam12> Yeah? I could see getttext paired with Sequel being a nice combo.
<nona> performance isnt a consideration since rails caches the lookups anyways
<nona> and the DB backend lets you have a nice UI for the translators
<nona> could even let them flag a string for "requesting screenshot", things like that is what i'm thinking about
roadie has joined #ruby
<adam12> That's an interesting idea.
<nona> hmm i have a different question
<nona> what's the role of omniauth in using auth0? like, what does it do for auth0?
<adam12> Is auth0 and oauth2 backend? Maybe omniauth is just a little bit of nice wrapping around the oauth2 flow.
<nona> not sure, trying to figure all that out at the moment (just using their sample app)
<ox1eef_> That's how I understood omniauth. As glue around the oauth2 flow.
markong has joined #ruby
<adam12> It's been forever since I used omniauth.
<ox1eef_> I think it is usually better to understand the underlying technology rather than learn a tool who provides a layer over it, however you gotta balance that with not reinventing the wheel all the time.
roadie has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.92)]
<nona> it's just that if you want to use auth0 with rails you'll be using omniauth because that's how auth0 seems to be designed
<nona> hmm ok so let's say omniauth is the rack plugin to integrate auth0 into rails
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
<adam12> As time passes, I feel that we're being told more and more not to do X because it's scary and unsafe.
<adam12> Dont' colocate servers because running your own hardware is scary and risky. Don't roll your own auth because auth is scary. Don't run your own databases because databases are scary.
olusx is now known as olus
c10l has quit [Quit: Ping timeout (120 seconds)]
c10l has joined #ruby
m_antis has joined #ruby
keypresser86 has joined #ruby
<sarna> adam12: have you heard of htmx? do you know how it compares to unpoly?
<adam12> sarna: I have and used it before, when it was IntercoolerJS. Unpoly is more batteries-included, and htmx is more low-level.
<adam12> sarna: For Unpoly, I just say handle all form submissions and local links, and it does PJAX style routing from there (if you're familiar with PJAX, Github circa ~ 2006 or something).
<adam12> sarna: Once I configure that, some actions might be more complex; a linked dropdown I might add an `up-validate` attribute to say, when this dropdown changes (your Country), update this new dropdown (your Region that might be in that Country).
<adam12> For htmx, you can do the same, but I don't know if it's done at the global level as it can be with Unpoly.
<adam12> Unpoly also ships with modals/popovers, drawers, multiple stacking of those, nice server side form validations, and a bunch of other bits.
<johnjaye> what are some cool ruby projects you know that are good to learn from or interesting?
<johnjaye> preferably things < 10k loc
<johnjaye> adam12: i want to roll my own database. where do i start
<adam12> johnjaye: I'd rebuild Redis. It's something a lot of people do for fun.
<adam12> johnjaye: The protocol is reasonably simple and you could implement all the different datastores (lists, whatever).
<adam12> johnjaye: They have their own style, but I enjoy reading the source code from Eventide. It's well thought out and very modular.
_ht has joined #ruby
<johnjaye> eventide post gres?
keypresser86 has quit []
<johnjaye> oh you mean redis-rb
<johnjaye> took me a few minutes to figure it out lol
keypresser86 has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
CrazyEddy has quit [Ping timeout: 246 seconds]
roadie has joined #ruby
<sarna> thanks adam12! it certainly looks interesting, I didn't know there was a battery-included htmx-like thing
<sarna> the future for websites looks bright :)
<adam12> sarna: I think they're both great.
<ox1eef_> I remember being impressed by Ruby's redis library. I'd check out Rack too. Go through the popular libraries. Usually fruitful one way or the other.
<adam12> I'm just heavily invested in Unpoly now as one of the maintainers. But I love it dearly and became a maintainer because I love it so.
<adam12> johnjaye: I'm specifically saying to rebuild the redis server, not the client. But you could use the redis-rb client ot talk to your "Redis" server that you built.
<ox1eef_> Look for something small though. When you look at Rails, you can find some patterns but it's generally too huge to totally understand.
CrazyEddy has joined #ruby
<johnjaye> adam12: oh ok. i thought we were talking about projects in ruby. the redis system is c
<adam12> johnjaye: You asked about two things.
<ox1eef_> Redis client is pure Ruby.
<adam12> johnjaye: 1. Cool ruby projects (I said eventide). 2. Build a database server (I said to implement the redis server in Ruby).
<johnjaye> yes there is redis which is its own thing, and redis-rb, which is the ruby client to access it. i see now
<ox1eef_> Redis in its own right is pretty cool
mahlon_ is now known as mahlon
Sankalp has quit [Ping timeout: 260 seconds]
<adam12> johnjaye: The Polished Ruby book is also worth exploring if you haven't already.
<adam12> the plugin system I've cribbed now multiple times for projects, and it's so enjoyable.
<adam12> (which is an extraction from Sequel and Roda)
<adam12> I use it in my "framework", where the HTTP portion is almost mostly optional (I still ship with a router dependency but I'm gonna fix that later). https://github.com/adam12/framework-2/blob/main/framework-core/lib/framework/plugins/http_router.rb
<johnjaye> ah ok
roshanavand_ has quit [Ping timeout: 250 seconds]
Sankalp has joined #ruby
<ox1eef_> Recently learnt that Module#prepend can be helpful for plugin systems as well. You can put modules (aka plugins) in front of another module, and alter behavior that way.
<adam12> ox1eef_: Yep. I've been using it to prepend custom initializer options.
<adam12> I'm not sure if it's gonna bite me yet or not, but it's my own project where I am using this pattern so YOLO
<ox1eef_> Ha I have the same worry. I think it is fair to say it is not without its cavaets.
<adam12> I tried to ship a use of `prepend` on a feature I was adding to Hanami
<adam12> and Tim Riley suggested we don't as it might make it unexpected for the users of the library.
<ox1eef_> I think the risk is that you create complex object relationships, and they become hard to follow
<adam12> I rarely use it since I adopted the plugin style that I mentioned earlier, because you can use regular include statements when done like that.
<adam12> but the `initialize` method seems especially crusty. Even libraries like dry-auto_inject seem to have a hardtime with it.
<adam12> I kind of wish we had some sort of after_initialize method that was an auto-hooked method.
<adam12> Then we could monkeypatch that.
<ox1eef_> Can you not monkey patch .new for that
<adam12> Yes, most likely.
<adam12> It might be nice to have in Ruby core, but I can see this already being kind of magical.
<adam12> I just want to sometimes configure an object from the outside, but not necessarily care about the method arguments to .new/initialize.
<ox1eef_> I think you can do that by calling allocate, then .send(:initialize(...), and after that would be the hook but it seems to need a really good use case.
<adam12> From my example, it uses a double-dispatch tell-don't-ask style principle, where the logger is told to build itself and then tell us the value through another method call (not a return value).
<ox1eef_> I like return values. xD
<adam12> So working around that by using `@logger ||= Logger.new` kind of breaks that. I'd need to `@logger ||= configure_logger && self` or something.
<adam12> LOL. So do I, but at least for constructing dependencies, I've found this pattern a lot nicer.
<ox1eef_> Fair enough
<adam12> Who knows. I've seen a lot of bad patterns in my life and this could be one.
<adam12> but it's been enjoyable so far.
<ox1eef_> That's why we got to be humble.
<adam12> 100%. I _love_ refactoring, sometimes to the detriment of others who just became accustomed to some shitty pattern.
<adam12> and my pattern might be shitty too. You just never know.
<adam12> bbiaf coffeee.
<ox1eef_> Exactly.
<ox1eef_> Important to not hype yourself up too much and be open to criticism.
<adam12> Github be offline :|
<aesthetikx> indeed
<aesthetikx> looking forward to the post mortem
<caleb> it's not just regular brownout dead
<caleb> it's hella dead
<aesthetikx> my guess is #regional #network #outage
<aesthetikx> its probably not even ruby's fault this time ;)
<adam12> LOL
<adam12> I'd probably bet you're right. It looked like a networking issue.
<adam12> Someone didn't `commit confirmed` their JunOS config.
<aesthetikx> not 100% on BGP, but does that take time to propate like DNS? e.g. if they 'push a fix' such that BGP routing changes, how long do you have to sit and wait for regional ISPs to pick that up?
<adam12> It has a reasonably quick convergence, tho I am not sure how long it takes for all the nodes to be aware of the paths.
<adam12> It went really slow for a while. Maybe they were mitigating a DDoS but went too far.
dviola has quit [Ping timeout: 250 seconds]
<aesthetikx> seems to be back
<adam12> Yep. For me as well.
<aesthetikx> welp back to work, see yall later
diego1 has joined #ruby
caedmon has joined #ruby
markong has quit [Ping timeout: 260 seconds]
caedmon has quit [Ping timeout: 260 seconds]
c10l has quit [Quit: See ya! o/]
c10l has joined #ruby
rvalue has quit [Quit: ZNC - https://znc.in]
<ox1eef_> Sorta weird to have a distributed tool but not the fault tolerance that comes with it.
* sarna goes off on a tangent about why y'all should try out using fossil instead
TomyWork has quit [Quit: Leaving]
rvalue has joined #ruby
grenierm has joined #ruby
octobear has joined #ruby
<adam12> aesthetikx: See ya.
<adam12> lol
<adam12> sarna: I like fossil but I have a hard time giving up rebase.
stephaniewilkins has joined #ruby
<ox1eef_> GitLab appears to be having issues too. Can't push.
Guest83 has joined #ruby
stephaniewilkins has quit [Quit: Client closed]
Guest83 has quit [Client Quit]
konsolebox has quit [Quit: Leaving]
_ht has quit [Quit: _ht]
<ox1eef_> Nothing (recent) about it on Twitter. Maybe just me.
octobear has quit [Remote host closed the connection]
tomtmym has quit [Quit: Gone.]
szkl has quit [Quit: Connection closed for inactivity]
otisolsen70 has quit [Quit: Leaving]
roadie has quit [Ping timeout: 255 seconds]
pyeri has joined #ruby
pyeri has quit [Client Quit]
Sankalp has quit [Ping timeout: 245 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
<ox1eef_> Anyone use anything special to organize todos - per project
markong has joined #ruby
<weaksauce> i personally have a "workspace" folder that has subfolders with notes and the main project directories
<weaksauce> projectname_workspace
<weaksauce> and a plugin that finds all the NOTE: TODO: FIXME stuff in the actual code
<ox1eef_> +1
plujon has joined #ruby
<plujon> bundle install # You are trying to install in deployment mode after changing your Gemfile. Run `bundle install` elsewhere and add the updated Gemfile.lock to version control.
<plujon>
<plujon> That may be helpful advice for a development machine, but it isn't so helpful when the production server is down. Is there some way to tell bundler to just install in deployment mode anyway?
libsys has joined #ruby
<weaksauce> you can't update the lockfile locally and then push it to the server?
<plujon> By "locally" do you mean on my "development machine" or in another directory on the production machine?
<weaksauce> yeah a dev machine
<weaksauce> if you really need to do it you could unset the deploy thing, install and then set the deploy flag again
<weaksauce> and then re installing of course
<plujon> Ugh, can I prevent bundler from ever touching or using ~/.bundle ?
<weaksauce> you can override it with BUNDLE_DEPLOYMENT=false bundle install
<plujon> Et tu, bundler?
<weaksauce> might want to add in a local custom location to install the gems to so you can wipe that easily
<plujon> Thanks; production server is back up.
<weaksauce> nice
<plujon> Is it possible to run a ruby site without using bundler? I find I really don't get along with it...
<plujon> I think I can't run 'bundle install' locally and then deploy Gemfile.lock (contrary to the advice) because my dev machine has a newer bundler that inserts: 'BUNDLED WITH 2.3.5' and the production bundler on one machine refuses to use the result.
<plujon>
<plujon> "You must use Bundler 2 or greater with this lockfile."
<weaksauce> are you not running identical rubies on the dev vs. prod machine?
<plujon> No
<weaksauce> i think that's your main beef with bundler
<plujon> There are multiple production machines and they have different versions of ruby.
<weaksauce> it's made to be used with all the versions in sync
<weaksauce> are they not all standardized?
<weaksauce> or the prod machines are different projects?
<weaksauce> every project should have a .ruby-version file with the best ruby version for that project
<weaksauce> and tooling should be there to enforce that version gets used
<plujon> echo 3 >.ruby-version # ?
<plujon> echo 3.0 >.ruby-version # ?
<plujon> I've never heard of .ruby-version before...
<weaksauce> yeah it's whatever you have installed. 3.0.0 or whatever
<plujon> Do you have to specify the patch-level?
<weaksauce> and use a program like rbenv to change it up based on that
<weaksauce> yeah if there is a specific patch you want to use
<weaksauce> whatever rbenv versions list out is what you'd put into the file
<ox1eef_> Rack question: can I provide the body as an IO that's streamed with more effieciency than reading a file into memory, and providing the contents to Rack as [200, {}, [contents]]
<weaksauce> interesting question but i don't think so
<plujon> ox1eef_: Is the body a file on disk?
<ox1eef_> Yep. I'm writing a Rack app that's essentially a static file server.
<ox1eef_> I thought it was one of the more recent cool Rack features but I was probably hallucinating.
<ox1eef_> Hrm.
<ox1eef_> Do I return that as the response body ? (StreamWrapper)
<weaksauce> i'm not sure... though that's the lint namespace so it might not be what you're looking for
<ox1eef_> plujon: That's good to know too. But I think my case isn't well suited for that. I'm writing a utility that can serve a local directory over HTTP. And puma is the web server. So I can't really pass it to nginx or something like that.
<weaksauce> there's that
<weaksauce> rack is not very well documented and the main site 404s
<ox1eef_> There's also a stream method which is interesting.
<weaksauce> the file.expand_path would open you up to attacks unless you lock it down permission wise
<ox1eef_> How so ?
<ox1eef_> It is joined to an absolute root path.
<weaksauce> if they can get the request path to something like ../../../../whatever they could theoretically get to any file
<ox1eef_> I don't think so. The path is expanded first, and then it is joined to "root" - which is the directory being served. So ultimately, everything is relative to the directory being served. No?
<plujon> If you use rvm, rbenv, chruby, how exactly do you ensure security patches are applied timely and automatically?
<ox1eef_> You would probably have to write a script for that.
<ox1eef_> There's no builtin way. That I know of.
<weaksauce> ah yeah it is tacked on to an absolute root you're right
<plujon> If, in contrast, you use the default ruby that comes with a Linux distribution, the distribution maintainers will distribute security patches, like other software, right?
<ox1eef_> Yep
<weaksauce> depends on the distro as to how fast those are updated
<ox1eef_> And I can't recall which, but I know some ruby version managers require you to upgrade the manager to have access to new ruby versions.
<weaksauce> the one that rbenv uses needs that yeah
<weaksauce> basically just a git pull though
<ox1eef_> Yeah. I think rbenv is designed around the concept of installing ruby on development machines rather than production servers.
<ox1eef_> Usually rare to have more than one Ruby on production
<weaksauce> it depends on the production process
<ox1eef_> I guess you might have two during an upgrade
<weaksauce> regardless of which version manager you use the .ruby-version is common
<ox1eef_> True
<plujon> Is there a spec for .ruby-version?
<weaksauce> chruby or asdf works fine too
<ox1eef_> I don't think .ruby-version is parsed the same by everyone. I recall differences. I think it depends on how the manager lets you switch. Eg if it supports 3.1, then it can parse that in .ruby-version.
<weaksauce> yeah
<weaksauce> chruby used ruby-3.2.1 or something like that and rbenv used 3.2.1
<weaksauce> last i checked
<ox1eef_> I use only one Ruby version. And on this machine that's 3.1
<plujon> So, developers are expected to set .ruby-version to the value of ruby that is used for that project in production, which implies a given project has a single "true ruby version" that it is deployed to, even if the same project is deployed to multiple servers? Hmm.
<ox1eef_> I remember there use to be so much hype about alternative Ruby implementations that it was quite common to have rbx and jruby installed via a manager.
<ox1eef_> plujon: Gemfile also records the ruby version if I'm not mistaken
<plujon> Do you mean Gemfile.lock?
<ox1eef_> I don't use .ruby-version myself, but it integrates with version managers and acts as a kind of documentation.
<ox1eef_> Yep Gemfile.lock
<plujon> Gemfile.lock does not identify the ruby version.
<weaksauce> gemfile lets you specify the ruby version though
<ox1eef_> Yeah - there's a DSL method.
<ox1eef_> Maybe that impacts Gemfile.lock
<ox1eef_> Nope
<weaksauce> yeah it does say it in mine
<weaksauce> RUBY VERSION
<weaksauce> ruby 3.1.4p223
<ox1eef_> Ah. Probably because I picked 2.0, and then ran bundle, which failed. So it never had a chance to update Gemfile.lock.
<weaksauce> ruby '3.1.4' # in the gemfile
<ox1eef_> Yep. Updates Gemfile.lock now.
<ox1eef_> Not sure I'd use it though. Maybe for a professional environment. In open source you are usually supporting a few versions.
<weaksauce> options yeah
<weaksauce> depends on what you need
<plujon> Why do you put ruby '3.1.4' in your Gemfile? Is it to force all those who use your code to use that version or ruby, or is it because you know your project specifically needs Ruby 3.1.4?
<ox1eef_> latter. For me anyway;
<plujon> Are you saying your project won't work correctly with, say, Ruby 3.2.2? Is that common?
<ox1eef_> I don't have a project where I require a specific version. But I think it depends on the setting. If you have a production server running one Ruby version, you want developers running the same.
<plujon> Did you mean "the former" rather than "the latter"?
<ox1eef_> Nope =)