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
jimeh has quit [Remote host closed the connection]
jimeh has joined #ruby
donofrio has joined #ruby
cyberban` has joined #ruby
cyberbanjo has quit [Remote host closed the connection]
ur5us_ has joined #ruby
Guest5584 has quit [Ping timeout: 240 seconds]
Rounin has quit [Ping timeout: 260 seconds]
cocalero has joined #ruby
libsys has quit [Remote host closed the connection]
libsys has joined #ruby
cyberban` has quit [Remote host closed the connection]
cyberbanjo has joined #ruby
<ox1eef> looks like there's more drama and push back against DHH in the rails community
<newton> water is wet
<nakilon> what drama
<weaksauce> a few core rails maintainers quit
<nakilon> I wish all the rails maintainers quit, lol; people would finally realise that there is a programming language called ruby so I would get a job
<nakilon> though maybe it won't change anything and programming would be still about making websites, just with another framework, sigh
<nakilon> *would be still considered to be only about
<ox1eef> i don't know what's behind it exactly, looks like a disagreement of some kind.
<ox1eef> nakilon: as i read on twitter, it's not a matter of just moving to hanami or whatever, rails has its feet dug deep and too many rely on it for it to be that simple.
bluedust has joined #ruby
<nakilon> I mean not that rails is misused or something, I don't care of what people do with it; I mean that I can't find a job because I don't fit the people imagination of what the computers are, what the programming is, the whole computer science is unknown to them and they don't realise what I'm doing, sometimes they even insult me on interviews
<nakilon> new people contact me every day saying that they've got a job for me, and when I say that I don't make websites they assume that I'm idiot with fake resume who's fooling them and half of communications end with "we don't need juniors" or "have you tried to become a programmer?"
<ox1eef> well, that's not nice. my opinion is from the view that there shouldn't be one choice, and for all practical intents and purposes, thats often the reality. itd be nice to see another framework with different ideas.
<nakilon> "your portfolio does not have any websites -- do you even know any programming language? even a bit?" -- real question from the 2nd last interview (even 3rd stage of it)
<ox1eef> well, ruby is most often used as a web language. python has more diverse use cases.
<apotheon> If enough core maintainers left, they could just fork it.
bluedust has quit [Ping timeout: 256 seconds]
<apotheon> Ruby has more diverse use cases, even if the majority of use is on the web.
<nakilon> when I join non-rails company, then for being rubyist rather pithon coder I always get the lowest possible pay, and when coworkers discover I know all their stuff and start fixing urgent issues and saving the projects they start collectively dislike me for being "not like them"
<nakilon> basically being a rubyist is a label on you, and you could be considered a person only if you make website in rails but I don't that, I'm not interested in'
<apotheon> in short "people suck"
Numocha has joined #ruby
<ox1eef> well, whatever happened must have happened in the shadows. it seems possibly related to emerging technology like web3/crypto.
ur5us_ has quit [Ping timeout: 240 seconds]
bluedust has joined #ruby
Numocha has quit [Ping timeout: 256 seconds]
Numocha has joined #ruby
bluedust has quit [Remote host closed the connection]
hanzo has joined #ruby
bluedust has joined #ruby
constxd has quit [Quit: WeeChat 2.8]
Numocha has quit [Quit: WeeChat 3.4]
eddof13 has joined #ruby
ur5us_ has joined #ruby
bluedust has quit [Remote host closed the connection]
cyberbanjo has quit [Remote host closed the connection]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
infinityfye has joined #ruby
ur5us_ has quit [Ping timeout: 240 seconds]
infinityfye has quit [Quit: Leaving]
donofrio has quit [Ping timeout: 256 seconds]
infinityfye has joined #ruby
teclator has joined #ruby
oxfuxxx has quit [Read error: Connection reset by peer]
crst has joined #ruby
oxfuxxx has joined #ruby
Rounin has joined #ruby
ur5us_ has joined #ruby
Furai has quit [Quit: WeeChat 3.4]
Furai has joined #ruby
fercell has joined #ruby
cxl has joined #ruby
<cxl> Hi all, my ruby is a little rusty... What is the best practice regarding classes vs instances? If I have a class that doesn't really need to be instantiated to function (i.e. it's mostly stateless and functional), is it ok to only use class methods and never get an instance of that object? Or should I instantiate everything every time?
<ox1eef> cxl: when the methods are stateless it's especially fine.
<cxl> ox1eef: noted, thanks
<ox1eef> generally stateful class methods cause trouble in multi-threaded environments and usually not recommended in that case.
<jhass[m]> a class that you never instantiate is a module :)
<ox1eef> agreed, you may not need a class at all.
oxfuxxx has quit [Quit: Yankies Motherfh@ckers C0[k Astroboys]
oxfuxxx has joined #ruby
oxfuxxx has quit [Remote host closed the connection]
oxfuxxx has joined #ruby
<cxl> right, by state I meant more like it has instance variables that are instances of other objects.
ur5us_ has quit [Ping timeout: 240 seconds]
<cxl> Another question, about the YARD documentation format: if I have a method `def foo(my_param:, other_param:)`; what do I write as the doc string? `@param my_param [String] ...` or `@param :my_param [String] ...`?
TCZ has joined #ruby
Guest5584 has joined #ruby
jmcgnh has quit [Ping timeout: 256 seconds]
<ox1eef> the former
<ox1eef> if it has state such as instance variables, you might want to use an instance of a class instead.
<ox1eef> the idea is to contain state, when you work with instances who create local references to other objects, you can keep that object local to a thread, and run one-per thread without any issues. it's only one idea, and for your situation maybe that's not something to care about.
jmcgnh has joined #ruby
walez has joined #ruby
<cxl> ox1eef: yes, that makes sense. I didn't express it well but that's what I meant with state.
oxfuxxx has quit [Quit: Yankies Motherfh@ckers C0[k Astroboys]
oxfuxxx has joined #ruby
oxfuxxx has quit [Client Quit]
cocalero has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<cxl> How would I write a YARD docstring for this `def myfunc(options)` where options is a hash, keys are symbols, values vary; and I want to specify the keys names because it's basically a params list. That is, I'd call this function with `myfunc(myparam: 'value', otherparam: 3)` and I want to explicitly document that myparam and otherparam exist along with what they're used for.
<cxl> It seems like [Hash<Symbol, String|Numeric>] wouldn't be sufficient to achieve that.
oxfuxxx has joined #ruby
TCZ has quit [Quit: Leaving]
oxfuxxx has quit [Ping timeout: 250 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
Guest5584 has quit [Ping timeout: 256 seconds]
Guest5584 has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
oxfuxxx has joined #ruby
Guest5584 has quit [Ping timeout: 250 seconds]
Guest4448 has joined #ruby
Guest4448 has quit [Client Quit]
Guest5584 has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
arkantos has joined #ruby
<cxl> jhass[m]: thanks
cahoots has joined #ruby
<cahoots> hi, i want to have two constructors, intialize(file:) and initialize(hash:). however, i get "results.rb:20: circular argument reference - hash" when i try this. any ideas?
<cahoots> ha, got it now
graywolf has joined #ruby
<jhass[m]> Ruby doesn't have overloads, the last method definition with the same name wins
<jhass[m]> I tend to define class methods like def self.from_file/def self.from_hash for these kind of cases
cahoots has quit [Ping timeout: 256 seconds]
factor has quit [Read error: Connection reset by peer]
factor has joined #ruby
graywolf has quit [Quit: WeeChat 3.3]
crst has quit [Quit: Leaving...]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 256 seconds]
arkantos has quit [Quit: Connection closed for inactivity]
ruby-eval has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 240 seconds]
impermanence has joined #ruby
Aylat has joined #ruby
Aylat has quit [Changing host]
Aylat has joined #ruby
walez has quit [Quit: Leaving]
Aylat has quit [Quit: Leaving]
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
bluedust has joined #ruby
<nakilon> or like Vips::Image.new_from_array
<nakilon> though why not check the arg class on fly
llua has quit [Ping timeout: 256 seconds]
bluedust has quit [Ping timeout: 272 seconds]
llua has joined #ruby
gr33n7007h has quit [Quit: WeeChat 3.4]
donofrio has joined #ruby
In0perable has quit [Quit: All your buffer are belong to us!]
aeris has quit [Remote host closed the connection]
hololeap has quit [Read error: Connection reset by peer]
aeris has joined #ruby
hololeap has joined #ruby
skryking has quit [Remote host closed the connection]
skryking has joined #ruby
Inoperable has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
cocalero has joined #ruby
cocalero has quit [Client Quit]
hanzo has joined #ruby
donofrio has quit [Ping timeout: 268 seconds]
<mooff> is there a handy way to tell if a module / constant name is already taken by a public gem?
___nick___ has joined #ruby
<mooff> with a side order of why are all the good gem names taken 🤓
<apotheon> mooff: Search for it at rubygems.org, I guess, or using the gem command.
<apotheon> $ gem search goodgemname
<apotheon> Oh, module. Wait.
<apotheon> forget what I said
<apotheon> I clearly haven't been awake long enough.
<mooff> np. i have been checking rubygems.org for gem names
<apotheon> A module search at rubygems.org would be quite handy.
<mooff> i think i remember adam's site listing modules
<mooff> naw, just gem names with some PascalCase
* mooff brews self and apotheon some coffee
<apotheon> Thanks.
<apotheon> I should brew some tea, actually.
<apotheon> steep
<apotheon> whatevs
_ht has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
skryking has quit [Remote host closed the connection]
skryking has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
TCZ has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
ur5us_ has joined #ruby
donofrio has joined #ruby
unyu has quit [Quit: brb]
_ht has quit [Remote host closed the connection]
___nick___ has quit [Ping timeout: 240 seconds]
<adam12> mooff: Not modules, tho most of the time there's a gem name -> namespace convention that everyone follows (tho they don't have to).
unyu has joined #ruby
tangy has joined #ruby
TCZ has quit [Quit: Leaving]
hololeap has quit [Excess Flood]
hololeap has joined #ruby
skryking has quit [Quit: Konversation terminated!]
impermanence has quit [Quit: Ping timeout (120 seconds)]
infinityfye has quit [Quit: Leaving]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
cyberbanjo has joined #ruby
phryk has quit [Quit: ZNC 1.8.2 - https://znc.in]
phryk has joined #ruby
cyberbanjo has quit [Remote host closed the connection]
cyberban` has joined #ruby
cyberban` has quit [Remote host closed the connection]
Exuma has joined #ruby
yos has quit [Ping timeout: 256 seconds]
yossarian has joined #ruby
yossarian has joined #ruby
yossarian has quit [Changing host]
ur5us_ has quit [Remote host closed the connection]
ur5us_ has joined #ruby
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest5584 has quit [Ping timeout: 250 seconds]
TCZ has joined #ruby
Exuma has joined #ruby
Exuma has quit [Client Quit]
unyu has quit [Quit: WeeChat 3.4]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]