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
a1eaiactaest has quit [Quit: reason slepe]
<conjunctive> Hi, any recommendations on a property testing library? Trying to navigate between the various options.
<ox1eef> what is a property testing library
<conjunctive> Oops, *property-based testing library. Sometimes called generative testing.
seifeslimene has quit [Ping timeout: 256 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ox1eef> ah i see, i dont have much knowledge of that
<conjunctive> 0x1eef: That's ok! Appreciate the quick response :)
rawley has quit [Read error: Connection reset by peer]
rawley_ has joined #ruby
rawley_ has quit [Remote host closed the connection]
rawley_ has joined #ruby
ur5us has joined #ruby
duds- has quit [Quit: Leaving.]
duds- has joined #ruby
rawley_ has quit [Quit: Leaving]
rawley has joined #ruby
rawley has quit [Client Quit]
rawley has joined #ruby
trillp has joined #ruby
hanzo has joined #ruby
hd1 has joined #ruby
<hd1> how do I access variables passed to an erb?
<hd1> for example, if I have "render :template => "search", :articles => @articles" in my code, how do I access articles in search.html.erb?
reset has quit [Quit: reset]
<havenwood> hd1: @articles
<havenwood> hd1: Ah, I misunderstood your question rereading. See https://guides.rubyonrails.org/layouts_and_rendering.html#passing-local-variables
<hd1> dealing with rails 5 here, not 7, if that makes a difference
<havenwood> And I see you in #rubyonrails, which is a better place for the question. :) Yes, it does make a difference since how to pass local variables changed slightly.
<havenwood> hd1: 5.0, 5.1 or 5.2?
<havenwood> I guess that actually doesn't make a difference, but was going to link you to the right guide.
<havenwood> hd1: Okay, so Rails 5 already was doing: locals:
<havenwood> hd1: But yeah, check the Rails 5 docs since I clearly don't recall. ¯\_(ツ)_/¯
<hd1> that comes up blank :(
<hd1> if I move the definiiton of the "variable" into the view, it works fine, but I don't feel I should put too much logic in my view
ur5us has quit [Ping timeout: 240 seconds]
yosafbridge has quit [Quit: Leaving]
emcb52 has joined #ruby
emcb5 has quit [Ping timeout: 256 seconds]
emcb52 is now known as emcb5
yosafbridge has joined #ruby
<havenwood> hd1: Did you try?: locals: {articles: @articles}
<havenwood> hd1: With `articles` in your code.
Rounin has quit [Ping timeout: 260 seconds]
<ox1eef> pretty sure locals: {} is required when passing locals
emcb55 has joined #ruby
emcb5 has quit [Ping timeout: 240 seconds]
emcb55 is now known as emcb5
d-s has joined #ruby
d-s has quit [Ping timeout: 272 seconds]
fowl has joined #ruby
yuckey2d has quit [Quit: The Lounge - https://thelounge.chat]
trillp has left #ruby [#ruby]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
rawley has quit [Remote host closed the connection]
seifeslimene has joined #ruby
seifeslimene has quit [Client Quit]
seifeslimene has joined #ruby
pgib has quit [Ping timeout: 245 seconds]
Tempesta has quit [Ping timeout: 265 seconds]
Tempesta has joined #ruby
o|||||o has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
o|||||o has quit [Ping timeout: 256 seconds]
leah2 has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
hd1 has quit [Quit: Connection closed]
polishdub has quit [Ping timeout: 256 seconds]
John_Ivan has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
leah2 has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
leah2 has quit [Ping timeout: 240 seconds]
leah2 has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
gproto23 has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
Vrganj has joined #ruby
_ht has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Remote host closed the connection]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
oxfuxxx has joined #ruby
oxfuxxx has quit [Remote host closed the connection]
reset has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Remote host closed the connection]
oxfuxxx has joined #ruby
Vrganj has quit [Quit: Leaving]
oxfuxxx has quit [Remote host closed the connection]
oxfuxxx has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
moldorcoder7 has joined #ruby
gr33n7007h has joined #ruby
Rounin has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
markong has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Quit: Yankies Motherfh@ckers C0[k Astroboys]
oxfuxxx has joined #ruby
some14u has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oxfuxxx has quit [Ping timeout: 260 seconds]
some14u has joined #ruby
ivanf has quit [Ping timeout: 256 seconds]
ivanf has joined #ruby
fercell has joined #ruby
<mooff> how do you deal with wanting code to be simple to read as possible, but also have affordances?
hololeap has quit [Remote host closed the connection]
<mooff> e.g. i want someone to be able to scan this base class as quickly as possible & put it out of their mind
<mooff> but ideally it would also default an optional parameter to self.class.name&.split('::').last
hololeap has joined #ruby
<mooff> which takes more attention to read. the class reads less like a 'PORO' to the eye and more like it's actually doing something
Fridtjof has quit [Quit: ZNC - http://znc.in]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
___nick___ has joined #ruby
d-s has joined #ruby
Fridtjof has joined #ruby
some14u has joined #ruby
d-s has quit [Ping timeout: 272 seconds]
<mooff> i'd like the nick to default to the name of the class, but not if you pass nick: nil.
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
John_Ivan has joined #ruby
<mooff> so that e.g. "WolframBot.run 'irc.libera.chat'" works.
<mooff> maybe i could do it in Bot.run (../iirc.rb:44), with "user_params[:nick] = self.name&.split('::').last if !user_params.key?(:nick)"
<mooff> sorry for spamming.. thinking out loud. how do you know when to worry about it, and when not to? lol
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
<nakilon> if that's wolfram alpha bot, I have own one ) takes a lot of code to parse the api response for good formatting
d-s has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
oxfuxxx has joined #ruby
<adam12> conjunctive: I use Rantly on a project. Jury is still out if it's helped at all, but it's stayed out of my way.
<adam12> mooff: Not sure if I follow exactly, but I'd move that code to a named method in like Utils or something. Utils.demodulize(self) and then forget about it.
seifeslimene has quit [Ping timeout: 256 seconds]
weaksauce has quit [Ping timeout: 240 seconds]
rawley has joined #ruby
eldritch has quit [Quit: bye]
glider has quit [Quit: ZNC - https://znc.in]
a1eaiactaest has joined #ruby
akochi[m] has joined #ruby
<akochi[m]> Heya
oxfuxxx has quit [Remote host closed the connection]
oxfuxxx has joined #ruby
<mooff> nakilon: i'd love to see the processing
<mooff> i've used the short answer API, which too often knows something but just says "No short answer available"
eldritch_ has joined #ruby
glider has joined #ruby
o|||||o has joined #ruby
a1eaiactaest has quit [Ping timeout: 272 seconds]
tuxcrafter1673 has quit [Ping timeout: 256 seconds]
oxfuxxx has quit [Ping timeout: 272 seconds]
oxfuxxx has joined #ruby
roadie has joined #ruby
markong has quit [Ping timeout: 272 seconds]
oxfuxxx has quit [Ping timeout: 252 seconds]
oxfuxxx has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
weaksauce has joined #ruby
gproto23 has quit [Quit: Leaving]
oxfuxxx has quit [Ping timeout: 260 seconds]
oxfuxxx has joined #ruby
justOkay has quit [Read error: Connection reset by peer]
justOkay has joined #ruby
teclator has joined #ruby
hololeap has quit [Remote host closed the connection]
hololeap has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
r3m has quit [Quit: WeeChat 3.5-dev]
r3m has joined #ruby
oxfuxxx has joined #ruby
nmollerup has quit [Quit: Leaving]
roadie has quit [Ping timeout: 252 seconds]
roadie has joined #ruby
rawley has quit [Ping timeout: 252 seconds]
oxfuxxx has quit [Read error: Connection reset by peer]
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
r3m has quit [Quit: WeeChat 3.5-dev]
r3m has joined #ruby
mahlon has quit [Ping timeout: 252 seconds]
MaXxer0 has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
___nick___ has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
ur5us has joined #ruby
opv has joined #ruby
<opv> hi all, i'm not a coder but an admin trying to build and work with vagrant, a ruby application. trying to gain a fundamental understanding of the pieces
<opv> the instructions have me run bundle install, then bundle --binstubs exec, and tells me to run from the exec folder
<opv> can you tell me which other files/folders from the repository i would need to carry over together with these stubs for the application to work?
<opv> thank you very much
mahlon has joined #ruby
_ht has quit [Remote host closed the connection]
Guest65 has joined #ruby
rawley has joined #ruby
r3m has quit [Quit: WeeChat 3.6-dev]
r3m has joined #ruby
comet23 has joined #ruby
<comet23> why is ruby in the top 10 disliked programming languages?
<leah2> why do you ask a channel full of people that probably like it?
<comet23> i mean that makes sense to me
<comet23> people who like it so much will understand why other people don't like it
<leah2> i guess the answer is legacy rails code bases :p
<comet23> i'm skimming through this article because i'm bored lol
rawley has quit [Remote host closed the connection]
rawley has joined #ruby
oxfuxxx has joined #ruby
<apotheon> comet23: People have issues.
oxfuxxx has quit [Ping timeout: 272 seconds]
roadie has quit [Ping timeout: 250 seconds]
perrierjouet has quit [Ping timeout: 272 seconds]
<weaksauce> kinda vacuous premise that stackoverflow is a good indicator of developer happiness
Guest65 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
oxfuxxx has joined #ruby
aesthetikx has joined #ruby
roadie has joined #ruby
<mooff> "least disliked"... "5. Bash"
roadie has quit [Ping timeout: 252 seconds]
sagax has quit [Quit: Konversation terminated!]
<adam12> I'd probably 2nd legacy rails code bases.
<ox1eef> i think it comes down to ruby being easy to pick up and widely popular at one stage, thanks to Rails. that brought a lot of new comers who frankly didnt know better, and wrote a lot of garbage code.
<adam12> Tho isn't there a saying: the languages that people aren't complaining about are the ones nobody is using.
<ox1eef> i also think DHH is the face of ruby for some, and he's a divivise character. truth is only God really knows.
roadie has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
perrierjouet has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
<apotheon> 22:14 < mooff> "least disliked"... "5. Bash"
<apotheon> holy fuck
szkl has joined #ruby
<apotheon> Why do I think the negativity about Ruby is primarily related to C, Java, and Python coders (in no particular order)?
<apotheon> Meanwhile, I quite like both C and Ruby.
<apotheon> Actually, it might be C++, not C.
<ox1eef> i'm enjoying rust
<ox1eef> started learning a few days ago
<apotheon> cool
<apotheon> What resources are you using to learn it?
<mooff> apotheon: i was thinking that i initially had frustration with Ruby because i didn't understand it
<mooff> whereas if you're used to say Java, you won't have as much difficulty understanding PHP, or vice versa
<apotheon> I see.
<apotheon> Yeah, that kinda makes sense.
<ox1eef> i bought a book on kindle: O'Reilly, Programming Rust.
<ox1eef> the other books i saw seem a bit outdated, from 2018
<apotheon> ox1eef: I guess you'd say it's a good book, then.
<apotheon> I'll make a note of that.
<ox1eef> yeah, mostly so.
<ox1eef> last night i started a fun project, implementing prototype-based inheritance in Ruby. pretty much done. more or a less a clone of Object.create() from JS.
<mooff> ooh.
<apotheon> About twenty years ago I created a prototype-based object system for Perl, using closures, because it was essentially the best way to organize my current project.
<ox1eef> nice =)
<apotheon> . . . but that was because Perl's OOP facilities were awful.
<apotheon> Your thing seems like it'd be more fun.
<ox1eef> i remember something like moose
<ox1eef> it was a cpan thing, so it didnt seem like part of the language
<apotheon> That didn't exist yet, as far as I recall -- it was probably a year or two away.
<apotheon> If it did exist, it hadn't become popular enough for anyone to have mentioned it to me or where I might encounter it.
<ox1eef> the source is here: https://github.com/0x1eef/proto.rb - i still need to fix the readme, and all that stuff, but its functional and specs you can check out
<apotheon> Yeah, Moose hails from 2006.
<apotheon> My Perl usage was dropping off precipitously around then, shortly after I got into Ruby.
<apotheon> ox1eef: That looks like it does the thing!
<ox1eef> perl was my first language
<ox1eef> maybe it will rise again with perl6
<apotheon> Perl was the first or second that I used while getting paid money.
<apotheon> lemme see . . .
<apotheon> hmm
<apotheon> I don't recall whether Perl or PHP was first.
<ox1eef> perl was first
<ox1eef> oh sorry ha
<apotheon> I learned several before that, though.
<ox1eef> misundestood you
<apotheon> Perl 6 changed its name because even the Perlists realized it wasn't Perl any longer.
<ox1eef> what is it called now?
<apotheon> Thanks to slow dev, bad licensing like the old Perl, and the dissociation with Perl, it seems doomed to irrelevance.
<apotheon> It's called Raku.
<ox1eef> cool
<ox1eef> yeah i think it will be playing catch up
<leah2> i think the license is it's least problem :p
<apotheon> It looks like it was a released thing in 2015.
<apotheon> leah2: Yeah, it has other issues. The fact it uses a unique-ish copyleft license means that it won't be very attractive to people who want to interoperate with other things, though.
roadie has joined #ruby
<apotheon> . . . which causes network effect problems.
<ox1eef> it use to be that perl was in the base of *nix systems, and tooling would be written with it. iirc perl even uses or used it.
<ox1eef> i meant, git uses or used it
<apotheon> Yeah, Perl used to be everywhere.
<leah2> a
<leah2> a
<leah2> gah
<leah2> also i never heard the perl license being an issue, ymmv
<apotheon> I think Perl lost some people not only to "Perl 6" development, but also to other languages because people were tired of waiting for "Perl 6".
<ox1eef> i think osx saw the benefit in that, by packaging up python, ruby, etc
<leah2> it's just a huge language with not really good implementation
<apotheon> leah2: Back when Perl first caught on, having a quirky license was kinda "normal".
<leah2> and noone but perl5'ers was interested anyway, is my impression
<apotheon> yeah
<apotheon> Outside of the Perl world, mostly people didn't want to touch anything with Perl in the name.
<ox1eef> regardless of implementation, it is still a language of ideas that other languages took with them, including ruby, and it is also arguably the work of an eccentric genius.
<apotheon> Dissociating it from Perl with the name change was too little, too late, and lost a lot of Perl 5 users.
<leah2> ox1eef: sure, it's a work of art
<apotheon> Yeah, Perl itself inspired a lot of stuff elsewhere in the programming world.
<apotheon> I don't sharpen sticks to hunt my lunch any longer, though.
<apotheon> Okay, that's probably an overly-harsh characterization.
<apotheon> Ruby has really spoiled me, though.
roadie has quit [Ping timeout: 268 seconds]
<apotheon> I can hunt my lunch with a smartphone now.
<leah2> :)