We're making this up as we go
Streamed
Mod mail feature development with special ~guest~ host ChaelCodes.
scratch
topics
ublock origin rule to hide stories with combinations of tags
PRs
score display https://github.com/lobsters/lobsters/pull/1777
devcontainers, docs https://github.com/lobsters/lobsters/pull/1796
webmentions to activejob https://github.com/lobsters/lobsters/pull/1626
search button layout https://github.com/lobsters/lobsters/pull/1792
brakeman to CI https://github.com/lobsters/lobsters/pull/1786
split out mod comment deletion https://github.com/lobsters/lobsters/pull/1786
high contrast https://github.com/lobsters/lobsters/pull/1780
issues
sister site spammed https://github.com/lobsters/lobsters/issue/1794
visitors tag filters https://github.com/lobsters/lobsters/issues/1685
mod comment undeleting https://github.com/lobsters/lobsters/issues/1582
not trying to be a Twitch affiliate/partner/etc.
https://old.reddit.com/r/Twitch/comments/1o1w1ed/an_inside_look_at_three_months_of_earnings_on/
https://levels.fyi
streaming breakdown
viewers/$
||
||
||
||
||
| \_
+---------------------------------------- percentile
^ me
title
post-stream
Transcripts are generated with whisperx, so they mistranscribe basically every username and technical term. They're OK but not great, advice appreciated.
Recording
03 ChaelCodesThat's a great expectation versus reality.
StreamElements ChaelCodes is now live! Streaming Software and Game Development: [Ruby/Rails] Let's contribute to Lobsters! 🦞 Special Guest - @pushcx
MacabreMan VoHiYo
Is it the back button?
It's legit the back button.
ChaelCodes Hello!! o/
Turbo Leaks doesn't like the back button.
I don't care.
Oh, oh, okay.
It passed.
All the chinks passed.
Yes.
Yes.
I figured it out.
We'll say all name.
I like it.
So I'm going to refresh this and I'm going to say, hey, I'm attending Strange Loop.
Magnifique.
I love it.
The only thing is, this is a terrible show page.
[SPEAKER_05]: Yeah, there's a lot of...
UncleScientist i fooooound you
Whoever's throwing down a whole bunch of items and causing the lag, quit it!
I will come find you with my delete key!
Hi Ruby!
ChaelCodes lol
Did you show up just for cat attention time?
ChaelCodes not yet!
UncleScientist UncleScientist subscribed at Tier 1. They've subscribed for 60 months! oh, yeah, advent of code soon
[SPEAKER_05]: That is the cutest thing in the world!
Awww!
Streamlabs unclescientist just subscribed with Tier 1!
You are someone who understood the assignment, Ruby.
You are someone who understood the assignment.
ChaelCodes 12 puzzles this time!
You showed up and you were like, cat attention, cat kisses, cat kisses.
That was when Rachel decided.
Oh, I know that shoulder head boop.
Shoulder head boop.
[SPEAKER_05]: Oh, my heart.
UncleScientist lookin' forward to it!
[SPEAKER_05]: Oh, you're so cute.
matthewd__ matthewd__ subscribed at Tier 1. They've subscribed for 54 months!
What do I do when you're so cute?
Streamlabs matthewd__ just subscribed with Tier 1!
I found you.
RuggMatt 1500 UTC already!
Hello and welcome, everyone.
UncleScientist hihi
Hi, Uncle Scientist.
Hi, Macabre Man.
I have, ah, and Rugmat says 1500 UTC already.
FailedSleep me != first
Yes, daylight savings time happened, but that doesn't affect me.
I stream at 1500 UTC.
UncleScientist !lobsters
StreamElements https://Lobste.rs is a friendly and delightful community for sharing links about programming topics and commenting on them. https://twitch.tv/pushcx runs office hours for them on Monday and Thursday and they welcome contributors: https://github.com/lobsters/lob…
Today, we are working on lobsters, and we have a very, very special guest with us today.
02:21 pushcxHello, I'm Peter.
Hi, Peter.
FailedSleep we need the smtp report please
I run Lobsters, and I'm a little camera shy, so you only get Chael's video, not mine.
But we'll see how this goes.
...35 ChaelCodesExcellent. So our mysterious voice in the sky As previously mentioned is Peter from Lobsters. He is the maintainer of Lobsters and has graciously agreed to join us today. So here is what we're working on. Today we're going to work on ModMail. So can you talk a little bit about why you want ModMail?
...56 pushcxSure.
Can you show the homepage of the site maybe for anybody who hasn't seen it?
So this is Lobsters.
It looks a lot like Hacker News or Reddit, but we are 1,000 times smaller and less important.
But it's basically just a forum about programming.
And because we are small and unimportant, we can put a ton of polish into all of our details, especially around moderation and encouraging a pretty chill community, which I think is what caught Chael's attention.
And then she has very...
ChaelCodes !so @pushcx
StreamElements Hey! It's @pushcx, they were just in Software and Game Development. Rails dev and office hours for https://Lobste.rs Ask questions anytime. I code when not answering questions. at https://twitch.tv/pushcx
03:30 ChaelCodesknow why don't you say something about that we have a little lag so we're going to be talking over each other until we find a rhythm yeah yeah yeah so absolutely 100 so push tx has been streaming on twitch and one of the things that he does extraordinarily well is explain the reasons behind the decisions that they make the moderation tools for this are incredible and expansive and i was incredibly impressed everything from Tattles for like different activities people take that could potentially be like spammy but aren't actually spam To the moderation and attention to that and like there's just a layer of attention to every single detail inside Lobsters to really cultivate that healthy community and I think that's really cool Yeah, thank you so
04:19 pushcxI would slightly disagree.
Our mod tools are not actually super expansive.
They're just what we do have has a lot of polish.
Because Lobsters has an invite system, we get away with having really thin mod tools in some ways and very few anti-spam controls, which otherwise we would be buried by.
Yeah, I should mention for folks who are new to the site that
DaRuudii cerian1Hai
We do not have an invite system because we are the cool kids clubhouse that only cool kids are let in.
It's just so that we don't have to be buried by cheap Viagra now kind of spam, which would be a major problem for us.
corbob corbob subscribed with Prime. They've subscribed for 3 months, currently on a 3 month streak! chaelcTyping
Streamlabs corbob just subscribed with Twitch Prime!
So Chael is going to be adding a feature called Mod Mail that is one of those things that is like, I think I'm stealing it from Reddit 10 years ago and putting our own little spin on it.
FailedSleep oh sure, you want everybody to buy expensive viagara ??? elitst
J why don't you talk through the feature because then also help that will help us catch any kind of misunderstanding between us because we kind of hacked out this design plan pretty fast, the other day.
05:27 ChaelCodesI'm excited to do that.
First, I'm gonna say hello to some subscribers and we've got a hype train running.
So if you wanna do like a subscription or anything like that, that will result in more like emojis dumped on everybody in chat.
Uncle Scientist, thank you so much for the resubscription, 60 months, that's huge.
Matthew D, thank you so much for the resubscription, 54 months.
Hi, welcome, nice to see you again.
And Failed Sleep has requested an SMTP report.
Subject is good, BCC is good, NCC is good.
Streamlabs Thank you for following polaris_x1!
all right and core bob thank you so much for the subscription with twitch prime hi welcome all right and failed sleep's commentary is oh sure you want everybody to buy expensive viagra instead of cheap viagra and what do you think would you prefer people buy expensive viagra on lobsters or the spam tool is really just about preventing all sorts of abuse yeah it's all sorts and then it had this
06:28 pushcxYou know, I don't have a lot of strong opinions on where you get your pharmaceuticals, but it's funny what a knock-on effect the invite system has had because there is so much abuse we skip out on by
Accounts are just a little bit of a pain in the ass to get because we don't see people who roll up to threads and are like, hey, here's a really touchy topic.
FailedSleep is big lobster backed by big pharma?
I'm going to make a brand new account to poop in this thread, which is a very common occurrence in other forums.
And not seeing that is much less stress for the moderators.
07:04 ChaelCodesThat makes sense.
But we still need some good moderation tools, which is why we're working on the ModMail tool here.
Streamlabs Thank you for following LoFiMeme!
So my understanding of ModMail is basically right now when a moderator messages a user, that's a one-on-one conversation between one moderator and one user.
Because of that, that means that one moderator is responsible for the entire life cycle of that conversation.
It means other moderators can't step in.
And it also means other moderators don't know what conversations are happening or are not happening, which means that they're worried about stepping on each other's toes.
...39 pushcxThis also means that users who would like more feedback on something just all default to DMing me because I'm the most active.
And then this is a self-reinforcing problem.
FailedSleep does lobsters require proper capitalization or can we use ChaelCase?
I am always looking for these kinds of feedback loops where we are accidentally encouraging the wrong thing and doing so encourages even more of it.
So having ModMail would help break that, I
08:07 ChaelCodesI think that'll help too.
ChaelCodes !lobsters
StreamElements https://Lobste.rs is a friendly and delightful community for sharing links about programming topics and commenting on them. https://twitch.tv/pushcx runs office hours for them on Monday and Thursday and they welcome contributors: https://github.com/lobsters/lob…
FailedSleep chaelCase
Also, thank you for following Polaris X1 and lo-fi meme.
So Lobster is being an open source tool, and I'll drop the link to that there.
I've gone in and created this issue to basically describe what our potential solution is.
And so we're thinking about creating this new mod meal object that's going to kind of own the conversation.
for this that's going to have a subject, a message, an author.
So this author is the original mod who started it, or it could be a user that is submitting a discussion for the moderators to talk about.
We're going to have this remind mods at that's automatically set to one week from the last message to make sure that moderators are keeping on top of this.
And this was a new change that we discussed in the comments.
And so the idea here is that this will actually send a notification to
all of the mods if nobody has responded to this in a week, correct?
09:03 pushcxYes, that is exactly the reminder I want out of it.
...08 ChaelCodesOkay. And then, we have many references that way you can reference multiple comments, multiple stories. So that's going to need to be polymorphic. and then we're going to have many recipients. So sometimes when you're having a moderation conversation, you may want to bring in multiple users, to have this conversation and kind of like moderate between them. or it might just have one, and then all moderators will be able to view all mod mails. Yes. All right. Then reference recipient, just your standard like joy and table situation. And then over here we have our mod mail message. So this one is going to reference a mod mail ID. It's going to have an author and it's going to have a message. The author here is either the moderator or the user who's replying. The message is the message. This is going to have many notifications. So the notification is going to attach to that message. Do we want to... How do we want to generate the notifications for this? Like, does a notification go out to all moderators when somebody replies? Or does it just go out to the user when a moderator replies?
10:15 pushcxIt certainly needs to go to a user when the moderator replies.
And then, yes, I think... Let's start with notifying all of the moderators when messages have new conversations.
So there's the...
inbox feature that kind of rolls up all the notifications so on lobsters when somebody gets a dm or gets a reply to their comments there's some optional settings around this it goes to their inbox and i would like for moderators for this to appear in their inbox as well ah yeah so chale is showing how a bunch of replies to her comments show in this thing and so having like one unified activity stream is super handy
UncleScientist @RuggMatt can you pin that lobsters output to the chat?
Although, the, the limited, the way rails does polymorphic stuff and like multi-table joins is just a constant source of pain for me.
So I'm really curious to see if we have enough of a pattern that this is going to be straightforward or if it's, wild and frustrating.
11:26 ChaelCodesOkay.
UncleScientist yay thanks
we can kind of like so i'm imagining this is probably going to be multiple prs rolling out like the first one is probably going to be like okay so we're just getting these objects out there and then we've got the ui so you can see it and then maybe another one that adds in notifications and that way we're kind of like incrementally building on this yeah that sounds totally fine i don't have a strong feeling on
RuggMatt @UncleScientist <3
...50 pushcxworkflow as long as we don't break production like I did 10 minutes before stream. For anybody who doesn't know, the layout on the site was real funky for about 15 minutes before the stream started. I had rolled up some very small PRs and deployed them, and that was a bad idea. So I am still sorting out what that bug was.
12:16 ChaelCodesYou were very like, I've broken production 15 minutes before we're doing this stream. Why am I?
...24 pushcxWhy did I do this?
LoFiMeme Hey what does it mean when the lobsters logo in the top left sometimes goes bright red instead of dark red?
I've done a little bit of live media work.
So I, in another life, was a professional journalist at the Washington Post.
And breaking production during breaking news was like the deep horror.
And so I was having some flashbacks to it.
The 2008 election season.
...47 ChaelCodesYes.
Okay.
But we're not actually using Maine as our base dev container.
corbob That sounds like a very good idea...
So even if it was broken there, we would be fine here.
Low Finding has a question, which is, hey, what does it mean when the Lobster's logo in the top left sometimes goes bright red instead of dark red?
13:03 pushcxIt is a traffic measure.
If you hover your mouse over it, it will show you a rough idea of
like are we as active as we've been in the last couple of weeks and if it's saying zero percent something is bugged could you reload this page real fast yeah would it help if i were on the home page instead of inbox all no it should happen everywhere it's it's very fiddly because we have to cash the heck out of it so it may be one of those where it's working for
visitors but not users this is a thing that is a perennial pain in the butt is i often break the site for visitors and not logged in users and i never see the visitor version i am logged in yeah so all right so that's a bug and i will stick it in the
RuggMatt i hear a cat
issue tracker, but the gist of what that feature is supposed to be is the L gets lighter when we have more traffic.
And it's just kind of at a glance, you can see the pulse of the site of whether people are commenting and voting a lot in the last hour or so.
14:23 ChaelCodesAll right.
Also, Rugmat, Uncle Scientist, thank you for suggesting that we pin the lobsters output to chat.
I think that was a really good idea.
Okay.
The_Sailsman Just checked as a non-logged in user, and I'm getting 0% on the frontpage.
I have another question from Field Sleep, which was, does lobsters require proper capitalization or can we use Chael's case?
This is a joke because...
I misspelled Bitburner for the entire time I was playing the game.
Not misspelled, miscapitalized it.
And so we're going to modify this question to what is the correct pronunciation and usage of lobsters?
Do we have a dot?
Do we capitalize it?
All of those questions.
15:02 pushcxIs that a question for me?
Yes.
So the site name doesn't have a dot and is plural.
Our domain name is also plural and has a dot.
And it is maybe worth mentioning that it is just a cute hack that there is a .rs top-level domain for the Republic of Serbia.
Jedi_Megaman g'morning fellow keyboard crunching kitties konbanTaps
The name doesn't mean anything, and we started using it about six years before that weird self-help guru's fans started calling themselves lobsters because of a big embarrassing mistake he made about evolution that they don't seem to understand as a terrible mistake.
corbob But it is written in rust right? Everything rust related things always use .rs right?
so if you don't know who i'm referring to please stay ignorant he's very weird perfect and the salesman says just checked as a non-logged in user and i'm getting zero percent on the front page yeah that's broken sorry about that we be related to bumping the server as part of trying to fix it that's totally possible that i bumped some cash along the way
16:07 ChaelCodesAll right, and JediMegaman says, good morning, fellow keyboard-crunching kitties. Hello. Also, Regmat mentioned that the cat was here. She came in, turned around, and walked back out. So she is not currently here anymore. And Corbob says, but it is written in Rust, right? Everything Rust-related always uses a .rs, right?
...27 pushcxIt is a, yeah, that's a real common expectation. And we do joke about rewriting in Rust. I'm not. quite mad enough at Rails to get there, but we'll see.
...41 ChaelCodesSo wait, would you consider rewriting it in Rust?
corbob moreamFlip moreamTable
...46 pushcxI think for, I think it's not the best choice of language for web development, which is all about, I have these strings and I want to mush them together and mutate them. And if I were to rewrite it, I would lean towards like Elixir, Python, or I am slowly getting care mad enough to consider writing my own programming language, but that is a giant rabbit hole.
17:17 ChaelCodesYeah, that's a refactor that might take a while.
...20 pushcxA couple years.
...21 ChaelCodesAll right.
So I think we're ready to get started with actually setting lobsters up.
corbob I'm going to file an issue and open a PR to rewrite it in rust, how hard could it be KappaHD
I have been on a separate branch working on a dev container setup.
So today's goal is to work on ModMail, but if my dev container setup sucks, then today we're probably going to end up working on dev containers.
All right.
So the first thing that we kind of need to do is we need to clone this with HTTPS instead of SSL.
RuggMatt ssh *
I've been working with dev containers for a while, and one of the things that I've noticed is if you do it with SSL, you have to forward your SSH agent and that doesn't always work.
And I've been trying to get that to work well.
LoFiMeme I thought github recommended https now?
pushcx corbob: just make claude do it, right? :p
but it hasn't so what i found is that if i clone it with https and i have any sort of credential manager stored which is pretty easy to set up vs code will actually forward that which helps all right now we'll reopen this with lobsters
RuggMatt vs code also should forward the ssh agent. at least it does for me
And what we should see is that, let's see.
I'm gonna CD back into lobsters.
corbob They have docs where they claim it (ssh key forwarding) works... but I've never gotten it to work...
We're in that main branch.
I'm gonna list my branches.
I should have a dev container one.
Let's see if this works.
Perfect.
So we've swapped over to our dev container branch.
And now what I can do is I can come over here to where I'm using WSL Ubuntu and I can reopen in container.
And let's see if that works.
Let's see.
Rugmat says, oh, hang on.
Lofi Meme says, I thought GitHub recommended HTTPS now.
They do, and I think that's probably why this works with HTTPS, and it does not work otherwise.
Let's see.
PushGX says, Corbob, just make Claude do it, right?
[SPEAKER_05]: Theoretically, but we don't... Yeah, he was joking about... Yeah.
Oh, you're talking about the PR to rewrite in Rust, but we're not actually using Claude today, are we?
19:41 pushcxNo, and I would ask that you please don't, because... There isn't a really clear answer to who owns the copyright to code bases that have vibe code in them. And I don't want to lose that.
...57 ChaelCodesThat is very, very fair. So just to restate that, Lobsters does not accept any sort of AI-assisted or AI-written PRs.
20:09 pushcxYeah, no, there's a note in the contributing doc
pulgamecanica OMGGGGG Hello
...14 ChaelCodesYeah, so I have actually turned off copilot for today.
Rugmat says, VS code should also forward the SSH agent, at least it does for me.
I'm glad that that works for you.
I have been struggling to get that to work and this is now the third dev container set up that I have built.
And that's probably like a me setting it up thing, but that's part of why I'm starting to like move to using HTTPS.
And Korbalb says they have docs where they claim it works, but I've never gotten it to work.
And that's my experience as well.
Pulga Mechanica says, OMG, hello.
Hello, Pulga Mechanica.
How are you doing today?
Do you want to say hi to Pulga Mechanica, Peter?
pulgamecanica I admire you so much Chaels! Let's gooo
...58 pushcxHowdy.
I don't know if I'm being addressed, but sure, howdy.
pulgamecanica Howdy
Yeah.
You have a much more high energy style than I do, so...
21:08 ChaelCodesIt depends on the day. I am. Let's see. I want to make sure that I incorporate you and that you can have a conversation with everybody in chat to Polka Mechanica. Mechanical Flea is somebody who has been in my community for a really, really long time. Let's see. Yeah. So we're currently setting up and connecting to our dev container. at present, prior to my PR going in, there is a Docker set up for lobsters right now. And so I've kind of used that and branched off of it to set up the dev container.
...51All right, here we go.
Excellent.
So we're running the post create command and we are inside of our container and it has failed.
And I actually kind of expect this to happen.
And that's part of why I feel like this one isn't quite ready to go.
Mohaidaracherif hello
Let's see.
22:14 pushcxSo this is kind of neat for me to get to look over your shoulders. You're setting up with a dev container because I have deliberately avoided putting time into learning Docker, even for development, because I've been doing Ruby forever and I'm very comfortable juggling six versions of Ruby. And so it's neat to get to see how this works. Thank you.
...34 ChaelCodesYeah, I'm glad.
Let me...
There we go.
I'm going to open this in a preview.
So this is the new documentation that I am working on in this branch.
Mohaid Ar-Sharif says, hello.
Hello.
pulgamecanica Ruby is love
Do you want to say hello, Peter?
...57 pushcxDo I? I don't...
...58 ChaelCodesIt's up to you.
...59 pushcxI don't know, man. I don't think I can match your energy. I think that's going to have to be you managing the chat because...
23:08 ChaelCodesOkay.
...09 pushcxI will direct questions in your direction and you can just kind of like... Yeah, I'm keeping an eye on it to help answer questions or, well, you know, joke around with Korvob. But I don't think I can manage a hello to everybody, especially... I actually don't watch a lot of Twitch, so I don't understand the community norms around, like, shoutouts for subscriptions or things. It's all just kind of Washington.
...33 ChaelCodesVery fair. Very fair. All right. I can roll forward with that. Rug mat redeemed to hydrate, so I'm going to take a sip of my coffee because I don't actually have water with me today.
...44 pushcxYeah, there's very visibly a lot of...
Jedi_Megaman Does @pushcx have a kitty?
You know, you can see that we are making this up as we go, which is one of the things I like to do on my stream is not have a really polished stream.
People can just watch me making typos and bugs because I think one of the values of streaming the dev work is it takes the mystery out of it.
It doesn't look like the site development is a magical thing that just happens with nobody's input.
It is very clearly...
24:11 ChaelCodesjust some guy with vim hacking away in the exact same way that anybody can which you know hint hint contributors are welcome i agree with that and that's kind of how i approach it too i once saw what is it
pulgamecanica I like this guy! Very good communication skills. I can see myself being overwhelmed with Twitch, kinda relates
I once saw a Renaissance Festival performance by a group called Barely Balanced.
And they have deliberately, so it's an acrobatics troupe.
And the first time I watched it, like the three of them are all having fun.
They're like enjoying like their acrobatics and they're making mistakes and everything.
I went and watched it a second time.
Every single mistake was like scripted.
the jokes were scripted but what it made me realize is that having that feeling of authenticity and those mistakes is like part of making it enjoyable so yeah Jedi Mega Man has a question which is does Push CX have a kitty yes and I have so on my streams I don't have a face cam going but I do have a supervisor camera because occasionally Raz
25:32 pushcxhops up on a filing cabinet that's over my shoulder to kind of supervise things and so i joke about him being the stream boss and we do not have a whole webcam set up working but he did just arrive on my desk so you may hear a meow or the sound of him knocking over my microphone and shoving the mouse off my desk because he does a big sprawl
ChaelCodes !so @pushcx
...57 ChaelCodesAnd Polga Mechanica says, I like this guy.
StreamElements Hey! It's @pushcx, they were just in Software and Game Development. Rails dev and office hours for https://Lobste.rs Ask questions anytime. I code when not answering questions. at https://twitch.tv/pushcx
Very good communication skills.
I can see myself being overwhelmed with Twitch.
Kind of relate.
So PushCX does his own Twitch stream where he does Lobster's office hours, where he reviews PRs, talks about the reasoning behind Lobster's and the decisions that he's made.
BR4VE7RAVE1ER hi! who its talking? your ai assistant?
And it's a really nice stream that I enjoy watching.
26:18 pushcxThanks.
pushcx https://push.cx/stream
And yeah, if your folks want to watch or see more about it, like I have a little FAQ and such.
I have an archive of my streams that I have hacked up on my blog.
So you can see all, man, what has it been?
I've been streaming about about a year.
pulgamecanica I'll follow
Jedi_Megaman konbanTaps konbanPhew konbanLuv lidiavTableslap
Streamlabs Thank you for following Ohq86!
So like call it like 50 streams or 55 weeks and six hours a week.
BR4VE7RAVE1ER ah, sorry. its another strimer. not ai assistant
So there are many hundreds of hours of stream.
archives on there.
Oh, y'all call them VODs.
That's right.
See, I know the Twitch lingo.
They're VODs.
27:01 ChaelCodesVideo on demand. Yes. Also, Brave Traveler would like to know if you're my AI assistant.
...09 pushcxI think intelligence is pushing it.
...14 ChaelCodesAlso, hello and welcome. Thank you for following OHQ86. All right, so what I did is I just copied the credentials in using Rails credentials edit. So I haven't actually passed any values into this, but it looks like I do need to run credentials edit in order to pass values in. Can you talk a little bit about what this is and why you're using Rails' new credentials feature?
...42 pushcxYeah, Rails credentials is one of the,
I don't know, 18 ways that Rails has managed production secrets in the 20 years that it's been out.
And it is basically for things like, hey, what's the password to the production database or the production API key for Mastodon?
And so those have to be stored somewhere.
And the place that we are storing them is this Rails credentials feature.
pulgamecanica he's right ruby has had so many ways for this
So they are encrypted and then
Yeah, it's one of those.
There are many like it, but this one is mine.
Ways of managing credentials and people do environment variables and one password and various things with faults in their name.
28:33 ChaelCodesAnd this is what we're currently using. Is there a way to set up like defaults for your credentials? Because I've noticed that this doesn't actually run unless the default credentials are set and stored. which is actually presenting a challenge in the dev container.
...52 pushcxI have no idea.
So because the thing is, like, we could ship a default file, but I think it would be encrypted.
pulgamecanica using an .env should do that
And so we'd have to also ship a default private key.
And that just feels like
Hey, point this gun at your foot.
Why don't you roll this right into production with a credential that I had to commit to the.
Yeah.
I don't know how to do that without, so I don't.
A codebase is an open source because otherwise people just sort of automatically start conspiracies about social sites like, oh, the moderators push this story up and down the homepage.
pulgamecanica ahshshaha
pulgamecanica true
And one of the nice things about lobsters being open source is we can link to the source code and be like, hey, that's literally not a feature.
We can't do that.
We can't edit a comment.
pulgamecanica He's right
We can't X, Y, and Z.
But being open source, people have looked at the code base and been like, hey, I'd like to run a site that looks like that.
And so we call those sister sites and, you know, in the vein of sister cities.
And I think it is super neat, but I am not running a like, hey, let me make an alternative to discourse or PHP BB and actually support that.
This is really the lobsters code base rather than a general purpose forum.
And so I...
Yeah.
It's, it's just sort of a, like how much open source maintenance work do you want to take on?
30:29 ChaelCodesYeah. Did that make sense? okay. And so Pogo Mechanica says using a .env should do that. Are you talking about as an alternative to credentials or are you saying in addition to credentials, we should be able to set some default values if we have a .env because that is something that I'm currently trying to work on for the dev container. And also Pogo Mechanica completely agrees, with the whole thing about like linking to.
...55 pushcxIt's kind of a side rant, but like the big early slogan of Rails starting in 2005 was convention over configuration. And now Rails has like I think probably a dozen built-in ways to do configuration or really common standard-ish ways to do configuration because there's the .env files, there's database.yaml, there's this credentials, there's config initializers, there's config boot app and production. If I'm looking for where configuration is set, I actually have to look in nine or 10 different places because Rails has accumulated a lot of config and a lot of options over the decades. And I don't know, we'll see if somebody ever comes in with a broom and it's not going to be us today.
31:49 ChaelCodesNo, no, no, no, definitely not.
Today, what we're doing and in particular, what we're doing right now is we're running Rails fake data.
pulgamecanica in addition, on the docker compose u can set the secret to be an .env file
Which is going to take a few minutes, but, how do you run your fake data?
What sort of fake data is in there?
What tools are you using?
I think I saw that y'all have Faker.
32:11 pushcxYeah.
So I added Faker to the test suite a while ago to generate fake data.
Like, oh, I need a story.
Let's have some lorem ipsum text in it rather than just title one and
pulgamecanica Faker is Love!!1 U use it often in my seed files
Then I rolled that into a rake task called fake underscore data that is just handy for contributors where it generates, I think, 100 or so fake users and a bunch of comments and stories and even moderation actions.
Yeah, and Chael has it up now.
And it's just intended to be if you are a developer and you want to contribute to the site, which all the cool kids do, you can do so with a bunch of lorem ipsum text rather than, hey, you got the site stood up.
Now here's a totally empty website that looks nothing like production.
You just have to imagine how everything looks.
And the code for this is
You know, it is not the best code in the world, but it's doing a very procedural task.
It's generating some at least realistic-ish fake data, and it's straightforward to extend when someone is like, hey, you know, it would be great if fake data had some DMs between people because I want to work on the inbox feature.
Great.
Just slap it at the end and go.
33:35 ChaelCodesThat makes sense. And I think one of the things that we discussed when we were talking about the issue for ModMail is having a couple of ModMails out there in the fake data section.
...43 pushcxYeah, that would be lovely.
pulgamecanica Yeah true, it makes the app even feel different, even the tests!
...45 ChaelCodesThat definitely feels like a follow-on task because that feels like something that we can just add on in a separate PR, but yeah.
...54 pushcxYeah, yeah, totally. And also it's kind of tedious to run the fake data task on stream because it takes two or three minutes.
34:02 ChaelCodesOh, it's done.
...04 pushcxOh, good.
...06 ChaelCodesAll right. So that should be our dev container set up. So what I've done so far is I edited our credentials, copied in everything from credentials, YAML, encoded sample, run bin setup. This mostly just sets up the databases and things like that. I noticed that you don't have a database that YAML committed. You actually copy over a sample one.
...29 pushcxYeah, because if I committed it, it would overwrite what contributors have. And the classic Rails style was you don't commit database YAML because it has your production secrets in. And I think, I don't know, as of most of a decade, seven or eight years at least, the answer is, well, you do commit that. And all it does is include things from envars, but we are doing the older style of that. We have been running since Rails, I think we started with 4.1 or 4.2 13 years ago, so we have a couple of places where, yeah, we are 10 years out of date on Rails style. And we keep up to date. We're running 8.0 in production now. I'm sure 8.1 will be a pretty straightforward update, but we have a couple of these oddities that are the very old style.
35:28 ChaelCodesAnd going back to the topic of fake data, Polka Mechanicus says, yeah, true. It makes the app even feel different, even the tests. And I agree with that. Sorry, go ahead.
...38 pushcxI was just going to say it's very nice to see something on your dev instance instead of just no stories, no search results, no comments, no anything. Clicking around and seeing lorem ipsum is like you kind of get a feel for the shape of it. Like it makes a tree of replies on a sample store and you're kind of like, oh yeah, this comment is indented. I need to keep that in mind for CSS.
36:02 ChaelCodesYeah, I completely agree.
pulgamecanica Lol true!
And I think that it makes it a lot easier when we're looking at a view like this one.
I assume that there's some default users created for this as well, right?
...14 pushcxYeah. You should have an admin named test test. And then if you want to log in as any of these lorem ipsum users, I don't think they have a default password, but it's like a one-liner in the console to replace them.
...28 ChaelCodesOkay.
what is test tests password?
pulgamecanica maybe it's the same username the password?
...35 pushcxno, sorry. It's username test password test.
...39 ChaelCodesGotcha.
...42 pushcxI think, I think this is my local config I've hacked on. [SPEAKER_05]: Cool. Yes, you're logged in. So one fun thing is we have a lot of inline moderator UI where I know it is not commercial best practice anymore, but we don't have a separate admin interface with a different view of the site. There is just a lot of mod stuff. that when you're logged in, the site works and looks different and there's extra UI. So for the eagle-eyed viewers, Chael now sees a dozen stories that were removed or deleted, and then also all of the stories now have a mod edit link under them that was not present before. Yeah.
37:26 ChaelCodesOh, interesting. Okay. let's see. So tags illo at PCMS. Let's add a 2021 to this.
...40 pushcxThat's a very common moderator edit.
You'll have to add a reason.
so lobsters has a moderation logs.
pulgamecanica I guess it's okay to have mod stuff, I like mod stuff actually! Let them haters say but I love the in-mod, of the files hahahaha
You can see the production one from LinkedIn, the footer of every page, but, the it's under your red banner.
the moderation log is a public record of things that the moderators have done or that the users have done that are moderation shaped.
Like users can suggest fixing the tags or titles on stories.
[SPEAKER_05]: Mm-hmm
And there's this very public record of what's happened.
So there's a lot less like, I swear there was a comment that said, you should rewrite the site in Rust.
Was it secretly deleted?
Well, no.
pulgamecanica Ii have seen even a mix of admin pages separately, from the controllers, but also sharing some modding on the "public" ones
These moderation actions are all public.
And it's a foundational principle of the community, transparency, and that moderators must be accountable to the users.
And so you can, there are people who like every day read the mob log and are like, did Peter fuck this one up?
Did he delete a comment he shouldn't have?
Is he like being a tyrannical jerk?
And sometimes it's just, Hey, Peter, you missed something or it's, Hey, I don't think this is what you thought it was.
RuggMatt was that one of your discord sounds coming through the stream? or am i going crazy :P
I get this feedback pretty regularly, but sometimes, and hopefully never it's, Hey, Peter, you called this one really wrong.
And the policy is wrong and it should be different.
And.
RuggMatt nvm i found it
The moderation log, the transparency of it, allows people to judge mod actions for themselves and either give feedback directly or in meta threads or elsewhere, or even just decide for themselves, boy, this moderation, I disagree fundamentally with it.
This isn't the place for me.
So that's been really valuable.
39:36 ChaelCodesI can definitely see that.
Let's see.
pulgamecanica U know PostHog, even can recorrd the messages you don't send? they record as you type characters in the input, it's like session capturing... crazy.... imagine moderation by that?
Polka Mechanica says, I guess it's okay to have mod stuff.
pushcx https://lobste.rs/moderations
I like mod stuff, actually, let the haters say, but I love the in-mod of the files.
I have even seen a mix of admin pages separately from the controllers, but also sharing some modding on the public ones.
I actually agree with moderation being on the page and in line as well.
...57 pushcxBecause I feel like that... That inline is a mod view.
That's you as a moderator seeing...
So it's one of those things for mods to build context.
pulgamecanica @pushcx <3
You are immediately seeing the actions that have happened on this story or on the submitter or on...
the comments in this story because one of the things the mods constantly need is hey let me get up to speed on the context because a thing that happens like humans have moods and if someone leaves a comment that's kind of mean and nasty a lot of the times it's something really crappy happened to them and they have a coping mechanism where they want to
make themselves feel better by sharing the bad mood like there's that classic Calvin and Hobbes comic or maybe their coping strategy is to make themselves feel smarter by making somebody else feel dumb and it's not healthy and we remove those kinds of comments but it's real common but it's not like a mood goes away and having a mod delete your comment never improves somebody's mood and so if we have the context that
the moderators have had three interactions with this person in the last couple of hours or yeah somebody else has deleted comments in here we come in with a lot more context so the the peril of this inline mod ui is you just have to know which is for the moderators there's been an open issue for like eight six seven years that's like boy this stuff really could use a consistent graphic design treatment
because mods can't remember what's mod only anymore.
Yeah.
pulgamecanica wize, moderation sounds hard, I wouldn't have the heart to mod anywhere... not even chaels stream which is the of the few streams I watch
41:47 ChaelCodesI almost feel like, well, I don't want to rely on colorblindness, but, or I don't want to rely on color because of people who are colorblind, but I almost feel like having it in a separate color with a separate background color would help with that.
42:00 pushcxYeah. Or we could put like a candy cane stripe along the side. Something a little bit obnoxious would be. We never do like a candy cane strike. Yeah. I like that. What's the issue number on that one?
...16 ChaelCodesWait, can I do that one?
That one sounds way easier than this Maudeville one.
pushcx https://github.com/lobsters/lob…
haven't you publicly committed please to add the feature i've needed for years yes i will add the feature you've needed for years no i'm mostly joking polka mechanica says wise moderation sounds hard i wouldn't have the heart to mod anywhere not even chiel's stream which is one of the few streams that i watch i'm definitely very selective when it comes to like picking moderators and making sure that they have the right
chamlis_ put the mod controls in comic sans it's the only way
What's the room looking for?
Yes, exactly.
...55 pushcxSo I just threw the link in your chat, but if anyone is feeling spry on front end design stuff,
Yeah, I actually only opened the issue a year ago.
I had said five or six.
I just misremembered because I've been thinking about it for years.
I go through my backlog of my wishlist of ideas.
pulgamecanica @pushcx VoteYea
I joke that it's a write-only text file because I just keep putting ideas in and I never get to any of them.
pulgamecanica lets goooo
And then every year or so, I come and paste some issues into the public issue tracker for contributors to consider taking on.
43:35 ChaelCodesdo we want this remind mods at to be a date time or a date?
...41 pushcxDate time, I think.
...43 ChaelCodesOkay. Also we have a special guest in chat. It's Shamless. Shamless has showed up to say, put the mod controls in Comic Sans. That's the only way.
...55 pushcxI, you know, Shamless has made a lot of contributions to lobsters, especially on the front end. So I trust her judgment here. And actually, Comic Sans would be a really easy way to do it. I wouldn't end up breaking the layout again like I did this morning. It would just be very obvious. So that's not a terrible idea, Chamlus. I know it's tongue in cheek, but I think you're onto something.
44:26 ChaelCodesOK. Oh, go ahead.
...28 pushcxThere is a little, there's a couple of little Easter eggs in the site. You pull up the slash hats page.
...36 ChaelCodesOh, the hats. Oh, my God, the hats. I love the hats.
...45 pushcxSo when people comment on the site, sometimes they're like, I'm officially, you know, I'm a core Linux kernel developer or I'm a banana king.
Right.
Yeah.
pulgamecanica MY DREAM
I'm actually involved with the software project.
No, I work at Mozilla.
I'm the person who created that programming language.
And so people can have hats that they can wear when they're doing comments.
pulgamecanica Literally I want to do Rails contrib then many Linux ones!
So they don't have to do that like throat clearing thing in every single comment or forget about it.
And there is one very small Comic Sans joke in here.
pulgamecanica The dream
If you scroll way down or just control F for OpenBSD, all the OpenBSD hats are in Comic Sans.
[SPEAKER_05]: Why?
This is not my gag.
This guy who created the site, JCS, is an OpenBSD developer and a lot of the early site was OpenBSD and
I couldn't tell you his motivation.
pulgamecanica OpenBSD!!! Let's gooo
I guess they didn't want to take themselves too seriously, or maybe it is a meme there, kind of like it is in Haskell.
So I don't know.
45:51 ChaelCodesVery fun. Okay, so we need something other than Comic Sans, because Comic Sans has already been claimed for OpenBSD.
...59 pushcxI don't know. I mean, or we could just imply that all OpenBSD contributors are moderators on the site, which I don't know. I don't think they want to be responsible for it. They have enough on their plates.
46:14 ChaelCodesWell, and now with these new changes, they would get an email for every single comment thing for every single week. You know, probably more regularly.
...24 pushcxThere are a couple of those ancient Greek democracies that worked by sortition, where the way they elected officials was they would just throw everybody's name in a hat. or, you know, a jar and then pull out a name and be like, congrats, you're the mayor now. I feel like I could do that to people occasionally on the site and be like, all right, well,
...47 ChaelCodespunish you you're now a moderator on the site well i feel like lobsters is so very focused on the experience of people who are both commenting and like creating stories and it's very thoughtfully curated and i feel like a moderator has so much power to change how how a site is perceived
47:16 pushcxYeah.
Yeah.
No, I should be explicit that I'm really tongue in cheek about that and wouldn't actually do it.
marcoroth_ HeyGuys
so there's a, a lobsters chat room and it's over on IRC because, we're very youthful and, one of our, our regular chatters, named Fi1729 has pointed out that the, Comic Sans meme probably started with Libre SSL.
they had a like weaponizing Comic Sans.
joke so that's probably where we picked it up from i know there was some overlap between them and openbsd developers but it's been like 15 years since that schism so i i'm getting fuzzy on it yeah hey marco we probably have somebody watching who's 15. maybe but not from australia
pulgamecanica W8, is this The MarcoRoth!?
A couple of years ago, I was mentoring a junior developer at a bootcamp and I helped them solve a problem, like a little team of developers.
PapaSmurfOfDeath o/
pulgamecanica From from Herb?
And one of the developers turned to the other and he was like, see, this is why I said we should call Peter over for help because he's been programming longer than you've been alive.
And I was just like,
schizophrenicWebdeveloper is this special guest a ghost? I can't see him?
it was like the like drinking from the wrong cup in the indiana jones movie where i just aged immediately and turned into dust because he was accurate i had been programmed that guy but i was not prepared for that
marcoroth_ @pulgamecanica yes 👀
48:49 ChaelCodesthankfully i'm not there yet speaking of special guests let's see okay so really quickly hi papa's worth of death nice to see you again schizophrenic web developer says is this special guest a ghost i can't see him can you speak to whether or not you are a ghost you did just say that you turned to dust yes and i i am old and decrepit but no i'm actually just camera shy
ChaelCodes !so @pushcx
StreamElements Hey! It's @pushcx, they were just in Software and Game Development. Rails dev and office hours for https://Lobste.rs Ask questions anytime. I code when not answering questions. at https://twitch.tv/pushcx
And the person that I'm streaming with today is PushCX, maintainer of Lobsters, who also streams on Twitch.
pulgamecanica :o no way it's you omggggg loved your speech in Portugal, tryied it already in my Rails Blog!
And you can go follow if you want to.
So, oh, yes, he does office hours on Lobsters on Twitch, where he talks about PRs that need to be reviewed, makes changes to Lobsters itself, and talks about some of the design decisions behind and in Lobsters.
And I've been very much enjoying his streams.
Now, really quick, so today we're working on Mod Meal.
I've got a scaffold command here, Rails G scaffold Mod Meal.
pushcx Hey Marco, good to see you as always. :)
We've got our subject, which is a string, our message, which is a string, our author, which is a references, a remind mods at, that's a date time, and a created at, that's a date time.
Does that all feel correct to you?
50:04 pushcxYes.
...05 ChaelCodesBeautiful.
PapaSmurfOfDeath was watching pushcx the other day going through the PRs, was cool
I think I want to go with scaffold as the way of, like, creating it and everything.
I kind of, like, was unsure about this part because I know that we want to essentially use, like, inbox and notifications for a lot of our UI.
But I kind of, I feel like this might be the best way to, like, get started at least.
...30 pushcxYeah, I feel like an individual modmail conversation is going to need a view. [SPEAKER_05]: Mm-hmm. Because the inbox doesn't replace the threaded view of a public conversation. And the DM feature is not threaded at all. So the point of the inbox is to link people over to the other parts of the site, really.
51:03 ChaelCodesThat makes sense.
All right.
So let me look at my migration.
pushcx Ah, hey again!
I should probably have looked at this before.
Migrate module, beautiful.
All right, let's see.
And PopserveDev says, was watching Push CX the other day going through PRs was cool.
I'm assuming that was Monday.
Okay, so timestamps is creating our thing there, so we don't need that.
Our author is null false, foreign key true.
I think that's right.
I'm wondering if that's gonna work.
Okay, go ahead.
PapaSmurfOfDeath was it Monday?! it’s been a busy week ahahaha
...51 pushcxI was gonna say mod mails is the individual message.
marcoroth_ @pulgamecanica Awesome, thanks for giving it a shot! 🙌
...57 ChaelCodesMod mails is the parent task. The conversation. Yeah, the conversation.
52:03 pushcxThen it shouldn't have an author.
...07 ChaelCodesIf a user creates it, submitting it to the mod.
...13 pushcxOh, you just wanna, yeah, maybe call them like conversation starter or something.
...18 ChaelCodesOkay.
...19 pushcxAnd then I think you can probably just delete the message field.
I know I approved it a second ago, but that's, wasn't the first thing in it?
No, you got a better idea?
I see your finger.
pulgamecanica pulgamecanica gifted a Tier 1 sub to pushcx! They have given 3 Gift Subs in the channel!
...32 ChaelCodesYou said that you wanted to be able to accept questions from the community.
...36 pushcxRight. But that's so when somebody, when a user starts a conversation, they would fill in a, what do you call it? Fill in a subject and fill in a message. And that message text could be the first instance of the associated message record. Can you flip over to your, issue for a second?
53:00 ChaelCodesYeah.
Okay.
So the way you want to run this is the message is here.
Stoney_Eagle stoney90Waving
PapaSmurfOfDeath chaelcRuby chaelcTyping
...06 pushcxyes okay i think the one on modmail is redundant and i didn't catch it until just looking at the migration yeah that's fine okay and so do you want to strip out author as well i don't really think it matters who started it and it'll be obvious from the first message associated okay yeah yeah i guess we can just drop that
...34 ChaelCodesOkay.
I was imagining like, what am I thinking?
I was imagining like a created by or created at field for that one.
But yeah, if you just want to do subject and remind mods that, we can definitely do that.
pushcx Ah thanks. I have no idea how subs work, but I am aware that is a gift in Twitch culture.
Do you want to keep subject?
Also, hi, Stoney Eagle.
Nice to see you.
Polga Mechanica, thank you so much for gifting a sub to PushCX.
54:00 pushcxYeah, I was actually going to say it too, that I don't actually know how subs work, but I know it is considered, you know, a kind gift in Twitch culture. So thanks.
...10 ChaelCodesYou can use new emojis in my chat. Is that all it gets you?
...15 pushcxI have actually been like typing text emojis because I don't...
Some of the Twitch emojis, they seem to be...
pulgamecanica We get a pretty Cat from Chael, is it Pearl or Ruby?
freighted with connotations that I'm oblivious to where like, I mean, yes, this emoji is called laugh out loud, but if you use that one instead of lol, you're actually implying that the thing is not funny.
And so I feel like if I try and use Twitch emojis, let alone custom channel ones, I'm just going to be like putting my foot in my mouth.
...47 ChaelCodesYeah, you know, actually, if there are additional connotations, I am not aware of them.
JDDoesDev ChaelCodes!
RuggMatt LUL
pulgamecanica Hahahsahas true LOL
...55 pushcxyeah but then some of them like i just don't know the lingo like poggers seems to mean lol or like a cheer and it's like a reference to a thing that happened 15 years ago and i only know what happened in bruby 15 years ago not what happened on justin.tv yeah no i don't i don't use poggers either hi jd does stuff nice to see you
55:24 ChaelCodesOkay, so we have a subject, we have a remind mods at, we have a timestamps, and then everybody else is going to reference this mod meals object. Sound good.
...36 pushcxYeah.
Yeah.
It's the core that things hang around, but it's, itself, it's one of those joint tables.
PapaSmurfOfDeath I haven’t heard this platform referred to as justin tv in a while ahaha
JDDoesDev oh
That's not going to end up having a lot of fields on it.
JDDoesDev stoney's here... not the kind of environment i want to be in
...47 ChaelCodesthat's fine i i do think that it should have a subject that way when we're displaying a title you can see like yeah moderation action like this is the conversation okay all right let's go in here migrate well it's a good thing that first migration failed
PapaSurfajah says, I haven't heard this platform referred to as JustinTV in a while.
Yeah, I haven't done that.
I wasn't here in the JustinTV days.
Alright, cool.
So now we have our CreateModMails object.
Let's see.
I kind of want to...
pushcx ah, source for the comics sans thing, also from phy1729 in the lobsters IRC: https://www.openbsd.org/papers/…
Do we want to work on some of these like mod mail references and recipients and other objects before we get into the message or just go for the message?
Let's just go ahead and create the message and then we'll start connecting some of these up.
I think that'll be a better way to do it.
All right.
JDDoesDev @PapaSmurfOfDeath some of the API still references it in urls with `jtv`
The good news is that a lot of these are the same.
And I think I was going to remove some of the options like destroy and other stuff.
Let's see.
[SPEAKER_05]: Yeah.
So we have our subject.
We have our author references.
No subject for this one.
Going straight into message.
57:25PapaSmurfOfDeath oh really that’s interesting 👀
Let's see.
Author mod mail ID.
PapaSmurfOfDeath the more you know
Odd mail ID.
That one's a references.
Oh, shoot.
Should I have made that?
Oh, no, we took the author off.
So I don't need to do anything with that.
Don't need to do anything with notifications and don't need to do anything with created ad.
...51 pushcxOn these associations, there's a style thing of
Do you name the foreign key for the table it's targeting or the role it's playing?
pulgamecanica !lurk brb
Streamlabs pulgamecanica, thank you for letting me know you're here. You enjoy the stream however you like. <3
StreamElements brb, thank you for letting me know you're here. You enjoy the stream however you like. <3
So does a comment have an associated dot user ID or does it have a dot author ID that still points at the user's table and
We mostly choose for style in this code base to use the name of the table.
So it's comment dot user ID, story dot user ID, and you just have to know that means author.
But I slightly prefer actually naming the thing for the role it plays rather than the name of the table.
58:36 ChaelCodesYeah, I think I'm tempted here to use user ID because I know references will work.
...42 pushcxYeah.
...43 ChaelCodesAnd I don't have to go through and look at the actual thing to figure out how to rename it, essentially. And have the foreign keys work. Cool. Because I don't remember that off the top of my head at this exact moment. We can go through and do it, author, if you really feel strongly. But it sounds like you don't.
59:05 pushcxNo, I was trying to explicitly say, like,
marcoroth_ FWIW; the command is cut off by the red banner if you type in the terminal
there is a design style issue and I don't have a super strong opinion on it.
JDDoesDev @PapaSmurfOfDeath do an inspect on the emotes. they all live at the cdn`jtvnw`
And you know, there's a lot of style issues where it's like, well, I have an opinion, but it's nowhere near as strong as the opinion that I love contributions from random developers, so.
...28 ChaelCodesThat is a really good point actually.
...31 pushcxOh, speaking of opinions I don't have, do you have your editor configured to automatically run standard RV?
...39 ChaelCodesI do not. I prefer to use linters and I don't like things jumping around in my editor. I don't mind if it like, when I save, if it does that, but.
...51 pushcxYeah, I do it on save too.
...52 ChaelCodesYeah. but, but it drives me kind of nuts if things are like moving around while I'm working on it. I'm more than happy to run standard RV at the end. very comfortable with like cleaning up my commits afterwards.
01:00:08 pushcxlet's see.
...10 ChaelCodesCan't create table, lobsters development, mod meal messages, foreign key constraint is incorrectly formed. Let's see. Which one? Well, something is complaining. Oh, go ahead.
...29 pushcxMessage should probably also be null false, right?
...33 ChaelCodesYep.
...35 pushcxIs there any reason you split these up into separate migrations?
...45It's a style I haven't seen before is why I'm asking.
Jedi_Megaman @marcoroth_ oh dang, I didn't notice till now, cuz I got Chael on a small monitor 🔍
...51 ChaelCodesi normally do that marco roth says for what it's worth the command is cut off by the red banner if you type in the terminal let me see if i can yeah i think i'm gonna actually just like can you throw on transparency on it like i don't actually care about our brand color i joke about it but
01:01:23 pushcxlet me get into that scene can i throw transparency on it yeah i have no idea you have such a fancier setup than i do for folks who haven't seen my stream like 60 of it is a full screen vim terminal and the other 40 is a full screen firefox it's a whole
marcoroth_ I feel like having one create_table per migration is usual, given that's how the scaffold generator works
Oh, I recently added my first text overlay so I can say that the stream is ending in a minute if folks have final questions.
That's my big fancy graphic design.
01:02:06 ChaelCodesHow's that?
...06 pushcxThat's better.
Do Twitch people call these chyrons?
Do you know that lingo from broadcast TV?
Jedi_Megaman oho, that looks nicer serfinThumbsup
...15 ChaelCodesDo Twitch people call what chyrons?
...18 pushcxYeah, this... So this label at the bottom that says what you're working on and my name, do you call them chyrons? I guess not, because you're making a face at that name.
...30 ChaelCodesWhat is a chyron?
...32 pushcxYou know when you turn on the local TV and there's, like, the person with...
Jedi_Megaman I thought it was called a "Marquee" or something
Jedi_Megaman "chyron"?
very nice hair reading the news at you underneath it's like mayor fights a dog in an alley you know like that that title of what's happening is called a chiron c h y r o n c h y r o n yeah maybe it's greek the the first system that
RuggMatt i feel like i learned this word recently but forget where i learned it
created these in the late 70s or early 80s was called Chiron, and so they're all called Chirons.
Maybe grab the Wikipedia page.
Clearly, this bit of old people trivia is grabbing the chat.
01:03:15 ChaelCodesYeah, OK, I'll do that. Marco Ross says, I feel like having one create table per migration is usual, given that's how the scaffold works. And I think it makes rolling back easier. I generally try to go with thin slivers of functionality and layering. The fact that this was C-H-Y-R-O-N instead of C-H-I-R-O-N is like wild to me.
...38 pushcxOh, hey, the company's still going. I didn't know. What company? Yeah, the company Chiron that invented it. I didn't realize they were still around.
...48 ChaelCodesOkay, I think I missed that part. Okay, wow.
...51 pushcxYeah, I was saying late 70s, early 80s.
The company that invented the like...
putting the title under the newscaster's face was named Chiron.
Jedi_Megaman Merrium-Webster defines "Chyron" as: a caption superimposed over usually the lower part of a video image (as during a news broadcast). Etymology after the Chyron Corporation, American manufacturer in the 1970s of a character-generating device that created such captions
And so these all, all these little overlays in broadcast TV get called Chirons.
01:04:07 ChaelCodesOkay.
...08 pushcxSo, you know, when there's the little moving strip of headlines, that's called the crawl.
RuggMatt news ticker
So, you know, like at the bottom where it's like either the stock ticker on like MSNBC or, or what is it?
Like there's a different business channel.
I can't remember the name of,
or it's like running the little headlines of like Man Bites Dog at the bottom.
RuggMatt <marquee>man bites dog</marquee>
Those are, that's a crawl.
...30 ChaelCodesOkay, so that's a crawl. One minute. Somebody's described it as a marquee. Oh yeah, Rugmat's calling it new sticker marquee.
...40 pushcxYeah, marquee is the old HTML tag, which is finally deprecated and leaving browsers, which I am offended by.
RuggMatt leaving browsers what?
The web should stay ugly.
...51 ChaelCodesWell, that was in my intro video as we were playing around with the marquee feature.
Oh yeah, Jedi Mega Man says, I thought it was called marquee or something.
And Chiron, Chiron.
Oh, that's interesting.
Stoney_Eagle marquee has been deprecated for years
And Rugnut says, I feel like I learned this word recently, but forgot where I learned it.
Yeah, that's interesting.
I think in Twitch, we normally just call it an overlay.
But that refers to everything.
So like my webcam, that's an overlay.
pushcx https://caniuse.com/marquee
This at the bottom here, overlay.
Anything else I may put.
Also, you keep describing my setup as very advanced.
My setup is not advanced compared to some of the stuff that I have seen.
RuggMatt @pushcx still 95%
Some people have the little games that you can play while they're streaming and you drop your character.
That used to be really popular when I first started streaming was dropping a little character in that danced around at the bottom of the screen.
01:05:48 pushcxI had some ideas for that.
It would be fun if there was a web page where folks in the chat could
mess with the terminal background color or actually make pop-ups show up on the screen but i can't get a twitch api key because of ridiculous spam controls so i haven't done like any of the stuff i wanted to do i think it would be and of course because of the way i stream this would be like a vim script plugin that integrates with the twitch api not an overlay that runs in obs
ChaelCodes !so @finitesingularity
StreamElements Hey! It's @finitesingularity, they were just in Software and Game Development. OBS Plugin Live-coding. Some bug-fixes on Stroke/Glow/Shadow and QAU. at https://twitch.tv/finitesingula…
01:06:24 ChaelCodesI know people who used to make it so that you could change their actual, like, theme and background.
[SPEAKER_05]: Yeah.
Yeah, that kind of nonsense.
Let's see.
Finite Singularity has some, like, wild stuff.
Like, he has a video that comes in where, like, he has a video of himself walking in and pouring himself water.
RuggMatt i love the finite clones
And he does a whole bunch of, like, Twitch whatever stuff where it's, like...
I don't even know how to describe it.
It's like a whole bunch of filters and stuff like that to change up what's happening with the video.
Yeah, Redmat says I love the finite clones.
RuggMatt sometimes his dog comes on stream and codes
I'm looking through this and I am trying to find who is responsible for this failing.
Because it keeps talking about method missing.
01:07:14 pushcxYou didn't get like
marcoroth_ I think if you say "references" you don't need to add "_id"
a blast of music for three seconds, did you?
RuggMatt i heard no music
Because the cat just stepped on the keyboard and hit the play button, and that didn't come through, right?
...24 ChaelCodesI did not.
...26 pushcxOh, phew.
...28 ChaelCodesI'm going to do... Yeah, I'm going to dip into the documentation really quick and make sure that I'm using references correctly.
pushcx phew
Active record.
My...
Yeah, you.
Creating a table, column, references.
Let's see, a foreign key can be created with the, okay, so I am using this wrong, maybe, probably.
Add reference, yeah.
Yep, okay, so the problem here might be that I've got an ID.
Let's try this one.
01:08:12 pushcxYeah, my usual strategy is I just rep all my old migrations and be like, oh, right, that's what I'm doing.
...20 ChaelCodesLet's see. Create usernames. No references in here.
...25 pushcxOh, yeah, you can see, actually, it just said bigint instead of...
...35 ChaelCodeshere's oh yeah your second one there references domain is and references record references blog there's no ids on these yeah type foreign key type foreign key true null false i feel like this is kind of what i'm going for oh this this actually is perfect because this is oh did my no don't do that my mouse just died
Yeah.
Margaret Ross says, I think if you say references, you don't need to add ID.
exegeteio Heyo, @chaelcodes and chat.
01:09:12 pushcxHang on. Yeah. He has this habit of, correctly explaining how basic rails features work to me. Yeah. It's a very useful thing he does, but one of the ways I say it on stream is that keeping up the running banter and like moving the project forward and keeping half an eye on chat takes like 30 or 40% right off the top of my ability to code. So. I make a lot more goofs and I forget obvious stuff and I struggle to name things a little more than I usually do.
...44 ChaelCodesYeah, normally it's Matthew D and Taosha for me.
Let's see.
Exegete, hello.
It's so nice to see you again.
Exegete says, hey, I'll chill goods in chat.
So my mouse just died.
Streamlabs Thank you for following tiozat!
see this is the real ultimate power of vim is you you wouldn't even notice it's really dead oh my gosh i hate this hang on i mean theoretically oh please don't make me do this all right i'm gonna yank this one and then i don't know i guess control tab yeah does somebody want to ask a a question about moderation or like
01:10:24 pushcxangry old man opinions about Rails because I can just kind of vamp for 10 minutes if you give me something to get started on.
...31 ChaelCodesOh, I like that plan. Thank you for following Tia's ad.
...37 pushcxOh, I guess I could finish that thought about migrations.
So I had asked Chael about why she split up the createModMail and the createModMail messages into two migrations.
exegeteio It’s deader than dead, it’s dead dead dead!
Because I see migrations as an atomic deployable unit, and it's not obvious, but rails wraps these in a DDL transaction when the backend supports it.
exegeteio Moderation? How many cookies is too many?
So I guess what I'm saying is it doesn't make sense to me to run and like create the join table without creating the messages.
corbob I bought some AA rechargeable batteries because I was tired of my mouse dying... then I proceeded to buy a new mouse with built-in rechargeable battery LUL
And I either want them to succeed together or fail together.
So I was puzzled by why she split them up, but you know, I phrased it as a question rather than a, Hey, you're doing it wrong.
Because very often if I actually ask it as a question, someone is like, here's a thing you didn't consider.
And I get better feedback.
01:11:37 ChaelCodesYeah, if you want me to put them in one, I'm happy to put them in one.
...40 pushcxIn my eyes, I can actually... Nope, I don't care because I'm going to deploy the PR as one thing, so.
PedroSMMoreira Hello there! been a long time, hope all is well
Again, this doesn't rise to the level that I would block a PR over.
...52 ChaelCodesLet's see.
Exodidio says, moderation, how many cookies is too many?
Cookies like web cookies or cookies like cookies for moderators?
Pedro S. Moreira says, hello there.
Been a long time.
pushcx yeah this is why I have a wired mouse
Hope all is well.
Hi, nice to see you.
It has been a while.
Let's see.
PapaSmurfOfDeath I don’t actually use a mouse
corbob There's no such things as too many cookies
Cor Bob says, I bought some AA rechargeable batteries because I was tired of my mouse dying.
Then I proceeded to buy a new mouse with a built-in rechargeable battery.
Fun, exciting.
Pushyx says, yeah, this is why I have a wired mouse.
Popsroof just says, I don't actually use a mouse.
And Corbob says, there's no such thing as too many cookies.
So I really like my mouse.
corbob this message brought to you by the letter C and the Cookie Monster
It's a cheap little $7, like, what is it?
I think it's called like a jelly mouse, jelly comb mouse.
I got it off Amazon years ago and normally it is incredibly, like it behaves incredibly well and I never have to worry about it.
Today was the exception.
I think it's probably been a few years since I've had to change the battery.
But yeah.
Are we supposed to be giving moderators cookies?
I have not been doing that.
Let's see.
RuggMatt cookies for mods?
to go back to that previous reference.
All right, so I think what I have now is I can probably go here to mod note.
Not my notes, my nails.
Great, and now we have a new mod mail with a subject, a message, an author, a remind mods ad, a created ad.
exegeteio Am I the only one who spent way too much on a Navigator mouse for my Voyager keyboard? PrideLaugh
azureusflames cookie mods = chocolate chips and rasins Kappa
And I think the reason for this author and message and all that other stuff is because we haven't changed it from when we initially ran that.
Let's see.
I have not played with either the Voyager keyboard or a Navigator mouse.
Alright, let's see.
I think they should be able to be- I think that mods should be able to have a choice in what type of cookies they get for their moderation.
Let's see, okay.
So I have this, it exists.
corbob @exegeteio OMG.... I am fighting myself... I want to order one so bad...
I think the first thing we need to do is we need to go through and update that form.
pushcx oh, I have a keyboard similar to the voyager, an Iris
So I'm gonna go to ModMail.
And we're gonna go to the model, that looks good.
I'm going to go to ModMail's form.
Sweet.
Oh, this is interesting.
All right, so we have prohibited this mod mail from being created, errorful messages, subject message.
So we're deleting these.
We're removing the author ID.
Do you want the remind mods at to be a field in the forum?
I would assume that's just handled on the backend.
01:14:55 pushcxOkay.
Yeah.
I don't think it's...
It's one of those where like, I would rather throw it in as like just automatically set it as one week out.
corbob @exegeteio I assume you're signed up for the Ergo and saw the printable to move the navigator to the other side of the thumb cluster...
And if in three or four months, I'm like, no, I really need to set reminders differently.
We'll do it differently.
That makes sense.
Why are your, why are the divs on lines 14 and, I guess it's 28 different color.
01:15:23 ChaelCodesOh, that would be because they don't have her working.
Hang on.
exegeteio @corbob I am not particularly happy with it. Having to pause between “click” and “type”, is bugging me.
...27 pushcxLike the slash div and the open div on like 17 and 19 are green.
ghost_user_1984 @pushcx I could make a highly specific joke about that.
I have like no syntax highlighting on mine, so it really catches my eye that your open and closed tags are different colors.
PapaSmurfOfDeath I feel like I’m boring, I have a 60% keychron keyboard and like a $5 wired mouse xD
...41 ChaelCodesThank you, Marco.
...48 pushcxYeah, for anybody who doesn't recognize Marco's name, he's the author of Herb and doing a ton of
very interesting and useful stuff around Rails Frontend.
RuggMatt would it be a good idea to add the extensions to the recommended extension option for dev containers?
01:16:06 ChaelCodesAll right, so here we go. I think the next thing I wanna do is I wanna set up references. So this is belongs to author.
...20 pushcxBelongs to user. Oh no, right, author, you called it, sorry.
...26 ChaelCodesThis doesn't exist anymore. We deleted that.
...28 pushcxYeah.
...30 ChaelCodesYeah.
marcoroth_ @RuggMatt It actually is part of the official Rails Devcontainer now 🥳
I'm just going to have to go through here and clean each of these up as we go through here.
For a new one, it should just have the message option.
Yep.
Let's see.
Rugmat says, would it be a good idea to add the extensions to the recommended extension option for dev containers?
I think standard RB should probably be in the recommended extension option.
And Marco Roth says that Herb is actually part of the official Rails dev container now, so maybe.
Let's see.
corbob so twitch gave me a "reminder" that I could press alt+up to reply to things... and it doesn't work...so that was a helpful reminder from them moreamLUL
And Ghost User, if you want your joke said, you gotta say your joke.
All right.
01:17:18 pushcxOh, it is worth maybe calling out that Ghost User is Hunter, who's a moderator on the site and will be a future user of this code. So worth saying hi.
...32 ChaelCodesWelcome, Ghost User.
I hope you enjoy what we're building here today.
Let's see.
I think the next part is like building out those references.
I do have to build the tables for those.
ghost_user_1984 This is why I don’t say the joke
I think...
...56I was thinking about this earlier about whether I wanted mod mail reference or mod mail recipient to be a has and belongs to many or a has many.
ghost_user_1984 very hard to remember what is and isn’t mod context
And I think I kind of wanted them to be...
models on their own, because I can see these being extended in the future.
01:18:20I feel like now is a really good time to point out that if I do it the way I'm currently doing it, we're going to end up with four different migrations. And I can pivot at this point and make it all one migration. I just historically have created them separately.
...38 pushcxI care about getting a PR. This is not... I don't have a strong opinion on this one.
...45 ChaelCodesAlright, so here's our mod mail references. Mod mail and reference.
...59I'm going to take a brief minute over here to check polymorphic associations.
01:19:13Polymorphic true adds belongs to taggings taggable polymorphic true.
Let's see, advanced associations.
Yeah, that doesn't actually have anything about how to generate it.
corbob Is there ever a scenario where you might want to run only one of the migrations?
I would assume that I can just do references, reference, references, polymorphic.
I mean, I can modify the actual migration once it's in there.
Let's see.
CorBob says, is there ever a scenario where you might want to run only one of the migrations?
azureusflames is there easter eggs built in ? 😳
Let's see.
I guess not.
It's more that like, I like the fact that you have the individual failure cases and you can see when the failures happen.
Azarius Flame says, is there Easter eggs built in?
And I think that Lobster says a lot of Easter eggs.
01:20:25ghost_user_1984 All the time
corbob That's fair.
i think we've talked about a few of those already and ghost user 1984 says this is why i don't say the joke it's very hard to remember what is and is not mod context all the time we actually talked about that a little bit a minute ago making all of your moderation views comic sans let's see yeah i like james's joke idea more the more i think about it
Let's see.
Reference null, polymorphic true, null false.
ghost_user_1984 from a DBA perspective smaller migrations make it safer to push them forward on larger datasets
Polymorphic true, foreign key true.
Ghost user says, from a DBA perspective, smaller migrations make it safer to push them forward on larger data sets.
So maybe that.
Let's see.
Created my mod mail, my mod mail messages.
I've got my references going in.
And then I've got one more, which is,
exegeteio Let's tap some Rails experience... What's your goto way of organizing code that doesn't fit into Controller / ActiveRecord ? Service objects, ActiveModel::Model, Actors, etc?
corbob I'm assuming that migrations here work similar to EntityFramework migrations where you can run them individually, but they're all chained in sequence so you can't run migration 3 without already running 1 then 2...
My mod mail recipients, mod mail references.
exegeteio !Lobsters
StreamElements https://Lobste.rs is a friendly and delightful community for sharing links about programming topics and commenting on them. https://twitch.tv/pushcx runs office hours for them on Monday and Thursday and they welcome contributors: https://github.com/lobsters/lob…
I'm actually gonna make this a user.
What do you think about that?
PapaSmurfOfDeath but playing devils advocate it is harder to rollback several migrations than 1?
That way we would have recipients, but it would actually return users.
and let's run our migrations.
01:22:18 pushcxSeems good to me. Okay.
...25 ChaelCodesMigrations field to run.
PapaSmurfOfDeath I don’t have a strong opinion either
Lovely.
ghost_user_1984 @PapaSmurfOfDeath True, but if you’re rolling back you’re normally restoring a snapshot.
Mod meal recipients, mod meal null false, foreign key true, user null false, foreign key true, bundle exec, db.
...49Korbob says, I'm assuming that migrations here work similar to entity framework migrations where you can run them individually, but they're all changed in sequence, so you can't run migration three without already running one than two.
That is correct.
marcoroth_ does it have to be "mod_mail"?
PapaSurfandessa says, but playing devil's advocate, is it harder to roll back several migrations than one?
I don't have a strong opinion either.
And ghost user says, true, but if you're rolling back, you're normally restoring a snapshot.
And Marco Roth says, does it have to be mod underscore mail?
Thank you, Marco Roth.
01:23:21 pushcxOh, the URL? Yeah, I mean, we're stealing the term from Reddit, and they always run it together, so we probably should in the URL. The database table, I guess I would expect it to be... The Rails convention, yeah.
...50 ChaelCodesI think Marco just caught the fact that I use modmail without the underscore.
...56 pushcxOh, okay.
...57 ChaelCodesYep. Oh wait, but these are the... Let's see. This is my model for this one. This one fails probably because... References? Yep, references.
01:24:16Let's see.
marcoroth_ I think, otherwise you have to name the model "Modmail", or be always explicit about the names in all associations
It is actually kind of hard to tell which one is failing in the trace.
Let's see.
...30exegeteio My internet is garbage. Did ya'alls talk about Rails logic locations?
Cannot add a foreign key to a polymorphic relation.
That makes sense.
...36 pushcxThere's the kind of rails limitation on polymorphism that I mentioned keeps biting me. You know, is this going to be straightforward or are we going to like fall into one of these rabbit holes? I know I hit this one with the notification system.
...56 ChaelCodeswhich makes sense because it's a similar place.
pushcx nope
Marco Roth says, I think otherwise you have to name the model ModMail or always be explicit about the names and all associations.
Yeah, I just forgot that it's Mod underscore Mail.
Wait, is it Mod underscore Mail?
Yes.
01:25:15 pushcxYeah, because you capitalized the M. Brails is going to stick an underscore in there.
...20 ChaelCodesAnd I think that's good because for screen readers, it actually makes it easier if you replace all of the
exegeteio Forgive a repost: Let's tap some Rails experience... What's your goto way of organizing code that doesn't fit into Controller / ActiveRecord ? Service objects, ActiveModel::Model, Actors, etc?
places where you're supposed to have a space with either an underscore or capitalization an exegesis my internet is garbage did y'all talk about rails logic locations no i don't think so not yet why are you failing so references reference null false polymorphic true ah nope that's right
modmail foreign key true, modmail recipient, modmail user false foreign key true, foreign key true, null false.
All right, let's try and find an error in here.
Let's see.
Default strategy method missing.
Is it modmail?
ghost_user_1984 @exegeteio Trailblazer had some good ideas.
I thought it was, yeah.
I'm going to swipe this for user and put it here.
And put it here.
Nope.
marcoroth_ @exegeteio I have been enjoying `ActiveRecord::AssociatedObject` a lot
Hang on.
I thought I had swiped it.
Messages.
Yank this line.
Recipients.
Ask P. Nope.
I want to yank this line, come over here to recipients, and put it here.
Perfect.
exegeteio @ghost_user_1984 My last job we did Trailblazer for everything. I really like it, but it feels a bit heavy.
01:27:01 pushcxI don't know why the M was- Yeah, on five you have an extra R in references. Or hat. I'm like two seconds behind on talk.
...10 ChaelCodesYeah, no, that's fair. I did have that. Let's see.
...18Exodidio says, for Giver Repos, let's tap some Rails experience.
What's your go-to way of organizing code that doesn't fit into a controller or active record?
Service objects, active model model, actors, etc.
PapaSmurfOfDeath I really like trailblazer
ghost_user_1984 I think the problem is that there isn’t a good way to slowly approach the problem.
...31 pushcxWell, so I follow the very classic Rails style of just slap it anywhere with no coherent structure or overall system design.
So you will find authorization logic down in our models.
You will find...
It's a mess.
I'm being self-deprecating about it.
But it's funny that at only 14,500 lines, that perennial issue in Rails is visible in lobsters, where we have business logic in controllers, controller logic in models.
It's really hard to divide this stuff well.
PedroSMMoreira I think it was Tenderlove that answered this with "in the file system", wasn't it?
ghost_user_1984 you either have a little to where it doesn’t make a problem, or you have too much and it it’s a mess to deal with and you need something like trailblazer
exegeteio Chael is aware that I work on a codebase with many ~5k line long controllers. And one 4k line, with a 3k line Concern included. 😬
01:28:16 ChaelCodesYeah, I think at least in my case, I tend to rely on service objects only when I have something that either interacts with multiple models or if I have something where it's kind of like an action that's taking place.
pushcx big oof
PapaSmurfOfDeath trailblazer saved a legacy project that I was on with hugeee files
But yeah, a couple of them are talking about Trailblazer, which I haven't played with before.
ghost_user_1984 my first job had a 20k line concern
...36 pushcxTrailblazer is like a set of conventions for Rails for how to organize your code.
It's
Opinions on top of opinions, you know, because Rails is famously opinionated.
ghost_user_1984 which I wrote…
ghost_user_1984 but that’s a longer story
...58 ChaelCodesHas many recipients. Let's see. And Pedro S. Moreira says, let's see. Wait, hang on. I lost it. It was in the thread. I saw it a second ago. There we go. I think it was Tenderlove that answered this with in the file system, wasn't it?
01:29:20 pushcxOh, yeah. So the file system is a legacy key value store with very odd semantics.
...33 ChaelCodesThrough. I misspelled through there. I think I spelled through correctly there has many recipients through mod mail recipient. Maybe. Yes. My recipient belongs to a mod mail belongs to a user. Yes. my message... Yeah. And has many references through... What did I do there?
01:30:20 pushcxYou know, one style thing you're doing that is exactly what I like is, the join tables are models in their own right.
They're not just called, like,
exegeteio !lurk Meeting jail time.
Streamlabs exegeteio, thank you for letting me know you're here. You enjoy the stream however you like. <3
StreamElements Meeting, thank you for letting me know you're here. You enjoy the stream however you like. <3
marcoroth_ you can pass a constant to `through:`? 👀
mod and mail, like, span together the default Rails style, I really do think that there is no such thing as a join table that doesn't have any extra attributes or logic and shouldn't be a class in and of itself because they are always meaningful.
...56 ChaelCodesI will say, like, it's very, very, very rare that there is one that can just be a has-many-through, or has and belongs to many, which I think is where that happens.
01:31:09 pushcxYeah, yeah.
...10 ChaelCodesMichael Roth says you can pass a constant to through. Maybe, maybe not.
...14 pushcxOh, yeah, no. So I just gripped the models, and it's got to be a symbol, because otherwise you end up with circular references if you're naming the constant, because you can't load one model without loading the other model if they're referring to each other. I mean, there's black magic you could do in Ruby to support it, but it's not... I don't know. We'll see where things go with Prism, because now that Prism has added macros to Ruby, all kinds of nonsense is available.
...46 ChaelCodesAll right, let's see.
So theoretically, this should work to create our references.
marcoroth_ It would be much nicer if you could pass a Constant, it reads so much nicer
I kind of want to... Yeah, I think I want to make a test for this really quick, because that's going to make me feel a lot more confident about this.
corbob "There's black magic you could do to support it" ... that's the best way to support things. Job security and all that LUL
01:32:05 pushcxSo I've heard of tests.
...12 ChaelCodesSo for me, I think this first one is just like I want to be able to create it.
pushcx it's the ruby way
So we're going to describe.
And I may not keep this test, but I just want to make sure that I can put the objects that I think I can in here and that I can create this the way that I want to create it.
...33 pushcxSounds good.
corbob @pushcx the only tests you need: https://github.com/auchenberg/v…
...34 ChaelCodessubject modmail.create step afk for a minute or two here yeah okay marco ross says it would be much nicer if you could pass a constant it reads so much nicer i'm glad you caught that before i like ran the test and found out that it broke
privann !lobsters
StreamElements https://Lobste.rs is a friendly and delightful community for sharing links about programming topics and commenting on them. https://twitch.tv/pushcx runs office hours for them on Monday and Thursday and they welcome contributors: https://github.com/lobsters/lob…
Let's see, CorBob says there's black magic you could do to support it.
That's the best way to support things, job security and all that.
We're only gonna pull out the Rustonomicon for the Rust rewrite of Lobsters.
All right, let's see.
Okay, so I'm gonna create this.
I want some references.
I'm gonna pass references into this.
And then recipients, I'm going to assume there's some users in here somewhere.
I'm going to start off with just one, I think.
Yeah, I'm probably there's probably a factory in here somewhere.
I don't know if this is going to work.
marcoroth_ @corbob love this LUL
I'm just going to put some stuff out here.
And then if it doesn't work, then I'll look at the actual documentation to see how it works.
This might need to go into an array, not sure.
All right, let's see.
So I've got my subject, mod meal create, references, references, recipient user.
I'm gonna come in here and I'm gonna start with an empty references because that's one of the things that we wanna be able to support is that this is nullable.
01:34:23And then I'm just gonna make a block here.
Is expected to... Gosh, I don't know.
Suppose I want change modmail from zero to one.
Change.
But I really wanna be able to step in here, actually.
It creates the modmail.
There's a couple of things that I'm going to want to do on creation, like setting that date attribute that updates, checking to make sure notifications are created and things like that, which is why I think I am going to probably keep this test.
But for right now, I'm just kind of like seeing if this works.
So let's call a subject here.
pushcx corbob: heh, excellent
And then...
Expect.
01:35:33Mind me a legal subject. Expect to. I don't like this test.
...45 pushcxBecause of the letter, because of because of the type check.
...50 ChaelCodesHonestly at this point I'm just like throwing something in there so that I have something to tell me like this exists, this works, this is a thing. Let me close that. So I'm gonna do an rspec.
01:36:12I don't like the structure of the test because I don't think there's any sort of point in Mod Meal to be kind of Mod Meal.
I think the sort of test that we'll actually want in here is confirming that we're setting that value.
Okay, so could not find the association modmail references in model modmail.
That's a good thing to know about.
Has many references through, modmail references.
Yeah, I don't think that's how I actually do this.
So y'all are talking about using...
prior work, but I don't know where the prior work is here.
So I'm actually gonna...
PapaSmurfOfDeath as if that has 15k stars
Hang on.
I think this is users actually.
No, that's users.
This is references.
through my mail references.
But you're the one that's failing?
Yeah, you're the one that's failing.
All right, let's see.
I normally go to actually like the guides and stuff like that when I'm looking for how this works.
Longs to versus has, has many through, through manifests, has many manifests.
OK, so I think what we're looking for here
is a has many mod mail references and has many mod mail recipients.
01:38:06Hmm. Something about this doesn't quite feel right. but it does look like how you would do this. Cause you have a manifest belongs to assembly belongs to part has many manifest assemblies parts.
...27 pushcxYeah. I think when you name it, the, the first argument, that symbol is whatever the heck you want the association to be named. And it doesn't particularly care about the class name.
...42 ChaelCodesYeah.
...53marcoroth_ oh, I think you could also say: `has_many :recipencets, class_name: "ModMailReciepients"` instead of `through`
class name users.
Yeah.
Let's see.
01:39:02 pushcxOh, do you just, it's maybe it's the through. yeah. You know what? I'm, I'm just getting there a little bit slower than you. I think you got it.
...16 ChaelCodesMark Ross says, Oh, I think you could also say has many recipients class name, mod meal recipients instead of through, I think I want my recipients to be the users that we find on mod mail recipients. And I'm not sure if this is actually correct.
...37But this is also kind of why I created a test on the model is so I could poke here and be like, does this work?
marcoroth_ oh I see, yup right.
uninitialized constant mod mail reference.
missing model class reference for the mod meal references association okay so i think this is the nope missing model class reference for the mod meal references association you can specify a different model class with the class name object hmm
01:40:27marcoroth_ class_name is the constant name in a string
Let's see.
So this reference should be the actual object over here from here.
Reference.
This should be polymorphic true.
Maybe that's what's messing up.
Let's try this again.
Class name is the constant name in a string.
Okay.
All right, so this one is our users.
User probably.
Let's see, and which one's broken?
Cannot have a HasManyThrough association modmail references on the polymorphic object reference reference without source type.
Try adding source type reference to HasManyThrough definition.
Let's see.
I'm going to try and look at this section again belongs to imageable polymorphic true class employee has pictures as imageable has many pictures as imageable.
I mean, theoretically.
Nope.
Okay.
on the polymorphic object reference reference.
Mod mail references.
I think part of it is that it's trying to use this mod mail references and that's actually not what we want.
Unless it's this.
Source type reference.
What is a source type?
I don't think I've had to work with a source type before.
I don't like doing this without reading the documentation.
Let's see.
Let's try running this.
Okay, one error occurred.
Uninitialized constants, modmail reference.
See, that's where this to me looks like the wrong type of object.
..
Has many references.
01:42:46 pushcxI feel like this should be... Marco has said that line five user has got to be a string. It should be capital, but it's got to be a string again because of the circular loading issue.
...59 ChaelCodesLet's see. Class name user, source type reference.
01:43:09You know what I'd like to do?
marcoroth_ what model should reference point to in the end? That's what you want to put there for the source_type
I'd like to focus on one of these at a time.
...16 pushcxThat's totally reasonable.
...19 ChaelCodesYeah.
That might make it a little bit easier for us.
Yeah.
Let's try to do those references first.
Michael Ross says, what model should reference point to in the end?
That's what you want to put there for the source type.
Our reference, what we'd like to do is have a polymorphic reference to either a comment, a story, or something else, preferably a comment or story.
Let's see, okay.
So this is looking for modmail reference, source type reference.
I wanna know what this source type is.
Rails, source type, polymorphic association.
marcoroth_ so you would say: has_many :comment_references, ..., source_type: "Comment"
Yay, here's our Rails guides.
Streamlabs Thank you for following Yoginth!
I don't think I've actually done this before.
Let's see.
PuercoPop I normally get the the code working w/o the through shortcut and then on the clean up of the PR add it
So you would say has many comment references, source type comment.
Thank you for following.
01:44:32The through association can be any type of association, including other associations, but it cannot be polymorphic.
Source associations can be polymorphic as long as you provide a source type.
Oh, interesting.
As long as you provide a source type.
exegeteio Hi, @PuercoPop ! Welcome in!
Well, that kind of like... Let's see.
Yoginth yo i'm coming back to the stream after 2.5 years damn!
That's less fun.
Let's see.
Yoginth how's your cat doin?
PerkaPop says, I usually get the code working without the through shortcut and then on the cleanup of the PR at it.
And Juggins says, yo, I'm coming back to the stream after 2.5 years.
How's your cat doing?
Cats are fine.
They are not getting nearly as much attention and they don't like hanging out on stream as much anymore.
01:45:30Well, that's disappointing. I also want to know what a source type is. Here we go. The source type option specifies the source association type for has many through association that proceeds through a polymorphic association. So has many paperbacks through books, source format, source type paperback. Has many books.
01:46:00RuggMatt you owe me IIII cats now
Belongs to format polymorphic true.
Class hardback paperback.
So I can only do as many paperbacks?
Hmm.
Rugmat says, you owe me four cats now.
I am aware.
I will add a fourth cat onto my little page.
Well, I don't like that.
marcoroth_ it's kind of a filter for saying "give me all [source_type] for this polymorpic association".
Define redeemed cat attention time.
There's no cat here, just to be clear.
I cannot give you cat attention time right now.
Stoney_Eagle lets make it a full proper break stoney90Giggle
don't even need the cat attention time they like to redeem cat attention times when I'm thinking because I'll think out loud while I pet the cat aha this kind of puts a damper on things don't you think
because we could theoretically go in here and say like, okay, so we have our comments references.
We have our, let's see, source type reference.
01:47:29marcoroth_ you can also just leave out the has_many :references, as you don't stricly need it
Because we have our comment references and then we would have our story references and we would kind of have to stitch them all together.
...53Source format belongs to format.
01:48:03I'm trying to check through this to make sure I understand how this works.
So the class book belongs to format, which is polymorphic.
I assume that that's a reference to hardback or paperback.
I really wish they would include data in here sometimes.
marcoroth_ and just point to the join table
Rugmat, Radium Stretch, and Marco Ross says, you can also just leave out the Hasmonee references, as you don't strictly need it.
...31 pushcxOh, I thought you did.
...33 ChaelCodesYeah, how else would we get our references? And just point to the Joy-In table. Oh. Oh. Okay. Okay.
...51Let me poke around with this really quickly. What I'm gonna do is I'm gonna come over to this object. I'm gonna do a binding.irb. All right, let's see. Well, first of all, let's see if this object even creates or whether we get near. We get near! Undefined method references for an instance of mod meal. let's see huh i only have my mail references thank you i'm just gonna delete all of this and we're gonna create it and then what i'm gonna do is i'm gonna poke around inside here Let's see, I think this might be the Aperture one here. Okay, so I have my modmail.modmail references. This should be null, good. Do we have a comment in here? I do not, okay. I'm gonna do a factorybot.create comment.
01:50:17And I'm gonna guess that this works.
And it does, perfect.
I'm gonna pass this comment into here.
No, I'm gonna have to do modmail reference.
Okay, hang on.
I have created a modmail here.
Yes.
So I think what we can do is we can create a modmail reference and then I can pass in modmail.
And I don't think I need to pass in the modmail there.
And then my reference can be my comment.
Maybe.
No.
Failure.
Lovely.
Unknown attribute error self.
Unknown attribute mod meal for mod meal reference.
marcoroth_ I think you had a belongs_to :modmail in that model
Okay.
Mod meal.
Mod meal.
That did not work either.
Why?
Mod meal reference.
Mod meal reference.
I've spelled everything correctly.
I am creating it.
It belongs to mod meal, not mod meal.
Okay.
01:51:43Michael Ross says, I think he had a belongs to mod mill in that model. Yep. Yep. That's what it is. I'm listening.
...54 pushcxI said, I wonder if some of this is just the hassle that scoped models are. Like, if we didn't have to repeat the word mod mill at the start of everything, would you catch these easier?
01:52:11 ChaelCodesMaybe.
...22Probably. Let user create user, monmail spec. But I noticed that everything is at the same hierarchical level in lobsters and that you don't really have like sub directories, which is why I went with this approach versus creating a module.
...42 pushcxI actually added our first one for controllers in the last, maybe a year ago for specifically for moderation stuff, because
Like the form for editing stories was really overloaded with conditionals for the fields and the options that moderators should see, but not the users.
And then, I mean, it was just shotgun with these predicates.
So, we've been slowly splitting those out to separate models or I'm sorry, separate controllers and separate views in a directory.
marcoroth_ namespaces even more annoying to work with when referencing associations and table names LUL
01:53:27 ChaelCodesSo you're doing that over in controllers, but you're not doing that over in models yet. Is that accurate? [SPEAKER_05]: Yeah. And Marco Ross says namespace is even more annoying to work with when referencing associations and table names.
...42 pushcxOh, well, that sounds like the voice of experience.
...49 ChaelCodesI'm going to try and save this.
Okay.
False.
False.
Errors.
My reference type blank message required if, let's see.
Hang on a second.
marcoroth_ yup, definitely got bitten by that before
Attribute equals reference, type equals blank, options message required.
Okay, so my reference is required and my reference is not present.
Nil.
Okay, so let's make that equal to
comment.first.
Oh, comment doesn't exist, does it?
Yeah, that's not a let bang, so it doesn't have this comment.
Great.
Okay.
But that's fine.
We'll just do a factory bot.create comment.
Okay, let me try that again.
mmr.reference equals comment.first, comment exists.
And Mark Roth says, yep, definitely got bitten by that before.
Yeah, I'm surprised that we're having as much trouble with this as we are.
It seems like this should be more straightforward.
I'm gonna try saving this.
Okay, it did save.
Now I wanna look at my MMR.
I have a reference type of comment, mmr.comment failed.
mmr.reference succeeds, okay.
And so now what I wanna do is I wanna go to my modmail, I think.
modmail.first, and we're gonna make that mm.
Okay, so if I do mm.modmail references,
What do I see?
Oh, look, I see my comment.
Right now, it's a mod meal reference and not an actual comment.
01:56:07Oh, my meal references dot join references.
Can I do that?
marcoroth_ I don't think you can on polymorphic assoications
I never remember whether it wants the full isn't that going to be what includes is the preload yeah performance one I'm trying to do it so that we can do mm.modmeal references and then just pull the reference from each I don't think you can on polymorphic associations no and correct again
marcoroth_ that's why you need to source type, so rails can join it against the comments table
wrong argument type expected module interesting see that could just mean that i've got my syntax wrong oh you did like that an error occurred when inspecting the object association not found association name references was not found
yeah marco ross says that's why you need to source type so rails can join it against the comments table each do i'm gonna call this mmr and then i'm gonna do mmr dot reference and
we won't have too many of these you know what i mean yeah i'm really i'm thinking more about how to get this on the front end and see that's my comment because what i want to do is yeah
Let me try this.
I've got my mod mail.
I'm trying to create it.
PienoPakis !lobsters
I'm going to do mod mail references.
StreamElements https://Lobste.rs is a friendly and delightful community for sharing links about programming topics and commenting on them. https://twitch.tv/pushcx runs office hours for them on Monday and Thursday and they welcome contributors: https://github.com/lobsters/lob…
The problem is we'd have to create them as mod mail references in order to get my comment in there.
And my mod mail doesn't exist yet.
You know what I mean?
marcoroth_ You can do: has_many :comment_references; has_many :other_references
01:58:31 pushcxYeah.
marcoroth_ and then def references = comment_references + other_references
Always a bit of chicken and egg thing happening with aggregate records.
...41 ChaelCodesLet's see. Markerbaugh says you can do as many comment references, as many other references. How would the other references work, though? I would have to do, like, comments references, topics references, story references. I mean, we could start with comments. I just, I don't like how that works. Because it severely restricts what we can possibly use as a reference. But we also don't have the UI yet for this.
01:59:23We can try and sketch it out as that though.
...32Belongs to...
Comment references.
Through.
marcoroth_ yeah, you have to do it for each model you can reference in the polymorphic association, or just map it all in Ruby afterwards
Disappointing.
Reference.
Hang on, this is not the right place for this.
I actually want the mod meal object itself.
02:00:08And I don't want belongs to, I want has many. Has many comment references through modmail references.
...23Underscore instead of dash. Mark Ross says, yeah, you have to do it for each model you can reference in the polymorphic association or just map it all in Ruby afterwards. I think I'm actually leaning towards mapping it all in Ruby. The only problem being that I can't pass it in.
...46Yeah, the only problem being that I can't pass it in.
...54taucher2003 o/
Yeah, sorry, I don't wanna freeze up.
I wanna keep things like moving and flowing.
So we'll try starting with this.
Let's see.
Dasha, hi, nice to see you, good timing.
All right, and maybe what we do is we work through recipients next, because I think that recipients is gonna be the more straightforward one.
Because we have our, has many recipients, hang on.
02:01:29 pushcxAnd it's not polymorphic at least, yeah?
...31 ChaelCodesNo, it's not polymorphic, and thankfully it should not be. Our recipients should always be users. let's see mod meal references it creates the mod meal mod meal subject binding.irb so my reference here i'm gonna let mod mail reference Let's see. And we're going to do reference dot create. And then we're going to do reference comment. Hmm. I'm not sure this is going to work, but I'm going to try it.
02:02:43marcoroth_ I _think_ `mod_mail.comment_references << comment` would work if you have it setup right
I know it's definitely not gonna work if I pass a modmail into this.
Marco Ross says, I think modmail comment references comment would work if you have it set up right.
Let's see, undefined local variable or method modmail references.
02:03:14That would imply that we add our references after we create our modmail object.
marcoroth_ L8 is singular instead of plular
marcoroth_ or the other way around rather
modmail.comment references comment.
...41Let's see. Yep. Hmm. I'll try running this and then we'll come in and we'll start adding users.
...51Let's see.
Could not find the source association's comment reference or comment references in model modmail reference.
Try has many comment references through modmail references.
Modmail has many comment references through my mail references source type comment On my mail reference, okay, so my thing is that should not actually be a mod mail reference object over here This should be a mod mail As annoying as it is I'm gonna pivot to user I
And then we can come back through here.
I'm going to run this just to see if it works, if I'm not trying to pass anything.
marcoroth_ I think it needs a `source: :reference` on the comment_references
Linate is singular instead of plural or the other way around.
Ah, the one I just deleted, of course.
Let's see.
line 13 no i'm pretty sure that one should be plural i think it needs a source reference on comment references let's see that actually does make sense source reference
02:05:32 pushcxYou know, I don't think I've ever used source and source type, which might be part of why I've struggled with polymorphic joints.
...39 ChaelCodesSame. Same here. I don't think I've worked with either of those either. Okay, so this is passing, which is good.
...45 pushcxThat is a very beautiful green dot.
...47 ChaelCodesYes.
And now I want to do something.
Modmail.com.
comment references dot first to equal comment.
Yes.
Let's run that one can delete that one.
and then I can go through and start working on the user.
marcoroth_ the whole problem with joining polymorphic associations is why we got delegated types, but this space is so confusing in general.
So I think for this one, create,
I have many mod mail recipients.
I have many recipients through mod mail with a class name of user.
Marco Ross says the whole problem was joining polymorphic associations is why we got delegated types, but the space is so confusing in general.
How did delegated types differ from polymorphic associations?
It's more the terminology there where I'm like, cause I've mucked around with polymorphic associations a couple of times.
I haven't run into this one, this particular problem yet though.
02:07:16I'm going in here. I'm creating users in this case. I want to be able to say recipients, I want to have an array, and a pass users in it. Yeah, and I want that to work. I'm just going to run the test and see if it works as is. It does not, lovely. Could not find the source association recipient or recipients in model modmailrecipient. Through modmailrecipient source name. Has many modmailrecipients. This should know that I'm looking at modmail. Has many recipients through modmailrecipients class name user. What now? Hang on.
02:08:22Yeah, is it one of modmailer user?
...30pushcx Yeah, I think it's one of the unfortunate fallouts of the active record pattern, you end up very coupled to individual tables and lose the benefits of projections.
User?
Let's see.
I would have thought that the class name would cue it into that.
...49marcoroth_ check the mod_mail_receipient model
Makarov says, check the modmail recipient model.
To see if we have the modmail problem again.
No, it belongs to user.
Oh, it worked.
Okay, good.
Let's see.
02:09:09Expect modmail recipients. dot first to equal user. Excellent. Okay, now we're getting somewhere.
...36Okay, good. This works, that connects, that created. Good. Excellent. I'm just gonna come in here really quick and do a modmail.save because I'm not convinced that that's saved. I'm gonna run this again. This is a really messy spec and I don't like it, but I'm gonna keep it for now. This is gonna have a lot of cleanup, I think. Okay, good. I think we're ready to hop over to the form now. Modmail form. Let's see. Alright, so these are my errors. Prohibited the mod meal. Right now I have a subject.
02:10:31Div. And then I'm going to close this. I'm going to theorize something. And maybe this is right, maybe this is wrong. But I'm going to theorize that if I go look at messages inside here, I'm going to have a user.
...48 pushcxWhoever's logged in is at user. That's our global.
02:11:02 ChaelCodesI think this is the one that I'm looking for. Yeah. And then we'll hop over here to our mod meal. 2D indent. And my label here is going to be. Oh, that's going to be fun. Recipient username.
...35 pushcxSo a thing I think you are kind of slipping into is the pattern i just talked about wanting to break where you are creating one form that is used for both users and moderators and i think we probably want to have two forms because it's the behavior is going to be pretty different because the user an individual user doesn't get to choose a recipient a moderator may choose a recipient And it feels very small, but the number of conditionals only grows.
02:12:18 ChaelCodesI agree with you. I think at this point, what I'm trying to get to is one working form for moderators.
...25 pushcxOkay.
...27 ChaelCodesThen... And right now, what I'm actually thinking about is this form. I'm imagining that when we're looking at comments and things like that, because you mentioned... It's not comments. There's like a mod view for comments. And this is localhost, so it should be fine for me to look at this.
...51 pushcxYeah, it's under slash mod. There's the mod activity. And... mod notes and the various dashboards and they're gonna be pretty empty because the fake data doesn't populate enough stuff but yeah so there's the moderator view of the mod log and notes and if you go to if you add on the end slash flagged underscore comments that's the one i'm looking for add slash one week or slash one W cause you have to have a timestamp on it and the sub nav is missing. Cause you know, everything's a little bit clunky in the admin views because it only has four people who are very familiar with the interface.
02:13:44 ChaelCodesSo, okay. So. Ah, we don't have any flagged comments. Let me come over here. Yeah, I'm gonna flag this. Flag this as, I don't know, spam. There we go. So if I look over here and I look at flagged comments, because I'm a moderator, did it... No, it's because there aren't two.
02:14:21 pushcxBecause this... two on the same comment because we're still trying to iron out the like people use flags just to disagree with things so that dashboard actually only shows comments which are have two flags that are the same from two different people on them which is irritating for your testing purposes why don't you we could do it in the console pretty quick
...51 ChaelCodesYeah, I think we can do it in the console and that's going to be the best way to do it.
...56 pushcxBecause you want it to be from somebody else.
...58 ChaelCodesYeah. I was thinking about logging out and logging back in, but then we would have to log out and log back in.
02:15:05 pushcxYeah, so I hope you have tab completion. Could you say capital V vote dot vote and hit tab ah good the vote thusly on story or comment this is a very long method name because the original developer was a c programmer where you only have positional arguments and so he is trying to list in the method name all of the arguments so open parentheses and then you want to say minus one Cause that's the direction of the vote, which is how flags are stored. we want a nil cause that's the story ID or actually, flip back to your browser. We need to grab that comment. Yeah. can you, if you, yeah, just click on it and the short ID will be the HTML anchor.
02:16:10 ChaelCodesWhere do I click? Cause I'm, I'm clicking here and that's taking me to the user. Okay. Timestamp. Okay.
...16 pushcxYeah. so that the part after the underscore, just the unders after the underscore, the last six characters. Yeah.
...25 ChaelCodesGotcha. Cause the first one's comment.
...27 pushcxRight. So we need to throw away this line that we've half written and, In the console.
...35 ChaelCodeswe need to throw this away.
...38 pushcxWhat? Yeah. Hit control you. Cause we've got to pull the comment out of the database twice. so if you do like C equals yeah. Comments and you can use my slash method there.
...49 ChaelCodesOh yeah.
...51 pushcxYeah.
...53 ChaelCodesYeah. Okay.
...54 pushcxSo it goes, so it's capital T comment slash. Yeah. You don't need the space, but, and then string or symbol of the short ID you grabbed.
02:17:03 ChaelCodesOkay.
...05 pushcxSo that's a convenient lookup method for comments. And so then we want to say, yeah, vote, vote thusly.
...17 ChaelCodesThere we go. Vote thusly, negative one, nil.
...23 pushcxNot nil, it's comment.story.id.
...34And then the next arg is going to be comment.id. And next is going to be who does it. So that'll be, let's say, user.last.id. And we want to pick the same reason as the one that you chose. You chose spam, I believe. Spam. So single character string S, capital S, actually.
02:18:00 ChaelCodesAll good here?
...02 pushcxCapital S on that. Probably okay, but all right, hit enter and we should have another spam vote.
...09 ChaelCodesOkay.
...10 pushcxAnd then now it should be on your dashboard. Now I'm sad. Why is it not on your dashboard? Let's hit up and instead of user last ID, yeah, I was just going to do something like that.
...30 ChaelCodesThere we go.
...32 pushcxHey, there we go. A couple of flags. It's on the dashboard. What a naughty comment.
...36 ChaelCodesYes. Okay, so what I am imagining is that at some point we will have, like, a button here that basically opens this form directly from this comment and, like, preloads the comment as a reference.
...51 pushcxYeah, I don't have a preference whether that's a inline form or... I think it's easier if it's you go to the controller and it renders a form because this view of a comment is rendered many places. And so inlining it everywhere is just a little bit of a nightmare because if I'm picking a comment that's like eight levels deep, then my form is going to be half as wide because comments get indented as you go reply, reply, reply.
02:19:30 ChaelCodesAnd I think it would probably be better if we open it in a separate form. That way they can add additional references if they need to. And we took the message out of the form. So they need to be able to reply with what it is that they want to say to the person. Yeah. Yeah. I need to take a really quick bio break.
...52 pushcxSo what we're going to do. Yeah. If you have like a placeholder there, you can put that up or if you want to leave up Oh, yeah, that's right. I forgot. You're like a professional Twitch streamer. I'm not even an affiliate.
02:20:08 ChaelCodesYeah, well, this is not like affiliate or stream or anything like that. I actually don't know if you're going to be able to chat during this. Let's find out. No, I don't think you're in this one. Hang on, I can add you to this one so you can talk to chat if you want to. I remember how to do this. Scene, add existing orange guest webcam. Now we can hear you.
...47 pushcxI'm an orange guest?
...49 ChaelCodesYeah, the webcam border when somebody has a webcam is orange.
rndm_dev a orange guest :D
...55 pushcxOkay.
...56 ChaelCodesYeah.
All right.
I'm going to be right back.
So I'm going to turn my webcam off and yeah, y'all can play a stream Pierce game while I'm gone.
pushcx funny given the nickname "the orange site" for the forum we forked off of
Streamlabs Thank you for following jhcdev!
RuggMatt 32 42
RuggMatt type the #s of the parirs in the chat
02:21:44 pushcxi don't know if i'm audible but i have no idea if i'm supposed to be doing something to like play the game
02:22:16rndm_dev its like a memory game right?
RuggMatt yes memory
RuggMatt 32 17
RuggMatt 32 40
rndm_dev 11 39
taucher2003 26 34
RuggMatt there we go
Sure looks like a memory game.
pushcx 18 423
RuggMatt 30 8
pushcx 18 43
RuggMatt 23 24
Oh, hey.
RuggMatt 41 37
rndm_dev 31 51
It does work.
02:23:19Thank you.
02:24:31RuggMatt the question is is the game set up on autopilot to automatically go to the next level
RuggMatt oh great
pushcx 14 46
marcoroth_ 1 5
Thank you.
02:25:10RuggMatt 26 57
marcoroth_ 1 18
pushcx 20 29
pushcx very cute animals
rndm_dev 24 9
marcoroth_ 5 18
RuggMatt hello chael
taucher2003 35 50
You've got a hot mic, Jill.
...22 ChaelCodesHow did you know I was back, Rugnat?
You've got a hot mic.
Oh, I've got a hot mic.
RuggMatt i could hear it
That explains it.
All right, let's see here.
Rugnat says, I could hear it.
RuggMatt game over
I will let this game play out.
Oh, and then we will head back to our actual game.
Okay.
Wrong one.
There we go.
I swear I have it set so that like,
I can swap between tall desk and cam and big desk and cam, but that just didn't work, and I don't know why.
Also, normal desk and cam.
Okay, there we go.
All right, so we have our comments here.
What we were just discussing is the form.
So right now we have this subject, we have this to, we have a create mod mail.
Theoretically, this is my user.
Our user in this case for our flag comment, we don't have to use this, but is,
Streamlabs Thank you for following MeridianYerg!
emmerich hon the mona oh this is interesting so there's no auto completion thank you for following meridian yerk all right let's see i feel like normally this page let me let me go to messages
No, this doesn't have any sort of autocomplete in it, does it?
Correct?
Peter?
02:27:08 pushcxNo, no. We have no username completion feature. Okay. It would be nice to have usernames complete in the private messages or especially to have short IDs complete when merging stories, but nothing like that.
...29 ChaelCodesokay let's see here's my div i'm gonna check something really quick i'm gonna look at your ui for this form i have this class labeled grid yeah if chanlis is still watching she's responsible for a lot of this layout she did a big
...53 pushcximprovement to our UI, which was pretty brittle.
02:28:01 ChaelCodesI'm guessing that's what I probably want to do here.
...05 pushcxYeah.
Yeah, there's very minimal markup now.
And it's much harder to break the page, especially on mobile.
RuggMatt Who is the coolest Doctor in the hospital? The hip Doctor!
...15 ChaelCodesThat is good. And then I think I probably, it looks like delete each of these.
...22 pushcxYeah, you only need the one div around the whole thing, not around each field.
...28 ChaelCodesThe submit, it looks like, is outside of that.
And it looks like it does not have a div.
And let's see if that looks prettier.
Rugmat says, who is the coolest doctor in the hospital?
The hip doctor!
All right, let's see.
MeridianYerg o7 Sure thing! Just happened by the stream, currently travelling but wanted to make sure I can catch your future streams when I get home at the end of the month.
I'm gonna come over here.
Step out of responsive mode.
Okay, that looks a lot better.
We have our subject, we have our two.
02:29:11chamlis_ I've still got a bunch to go through and gridify at some point, maybe some day we can be float-free...
Meridian Yang says, sure thing.
Just happened by the stream, currently traveling, but wanted to make sure I can catch your future streams when I get home at the end of the month.
Ah, great to hear.
I look forward to seeing you.
Shamlist says, I've still got a bunch to go through and gridify at some point.
Maybe someday we can be float free.
That would be nice.
Okay, so I have my subject.
I have my two.
My problem is that my two right now is just for one user.
And ideally, we'd be able to pass multiple users through.
I'm thinking about how to handle this.
And we don't really have any sort of, I'm guessing we don't have any prior work around this.
Is that accurate?
...52 pushcxAround, sorry?
...55 ChaelCodesCapturing multiple users in an input.
...59 pushcxDefinitely not.
02:30:01 ChaelCodesOkay. I'm kind of considering just having a comma separated situation.
...07 pushcxThat seems like the easiest thing.
marcoroth_ or just limit to one user for nw
Honestly, how about space separated?
Because comma is not a valid character in usernames anyways, or space.
So just space separated is fine.
...22 ChaelCodesSounds good.
Marco Ross says, or just limit to one user for now.
That could definitely be an option, but I feel like I've got to parse an array into...
I feel like I have to turn it into an array anyway in order to support the...
prime_coder !project
ChaelCodes !lobsters
StreamElements https://Lobste.rs is a friendly and delightful community for sharing links about programming topics and commenting on them. https://twitch.tv/pushcx runs office hours for them on Monday and Thursday and they welcome contributors: https://github.com/lobsters/lob…
ChaelCodes !so @pushcx
StreamElements Hey! It's @pushcx, they were just in Software and Game Development. Rails dev and office hours for https://Lobste.rs Ask questions anytime. I code when not answering questions. at https://twitch.tv/pushcx
situation on the back end the relationship on the back end let's see so i'd rather try and figure that out prime coder says project so today i'm contributing to lobsters with the maintainer push cx aka peter
All right, I've got this.
I've got messages.
I'm gonna go to random comments.
marcoroth_ if you give the input the right "name" it will map/convert it for you
I'm gonna grab a random user, Friesen Moses.
That feels good.
Okay, so this would be to both of them.
Marco Ross says, if you give the input the right name, it will map convert it for you.
So I have actually done that part before.
prime_coder sup @ChaelCodes @pushcx poggers
02:31:33 pushcxI haven't, I'm curious to see it.
...38 ChaelCodesYou can basically go in here and make it an array. So you see how this is like modmail subject. Your input recipient username would look like that for multiple inputs. Let me see.
02:32:08Promcoder says, sup, chillcodes, pushcx, poggers, hello. All right. I don't know how to do that in here, though. I also don't think that this is the right field. Yeah. Which is part of why I'm kind of tempted... Hmm... Yeah, I'm not sure how to actually do that inside here as this like text field. I suppose we could look into that really quickly.
...49I am looking for form helpers rails. Yep. Option groups for select binding select. Collection select. The thing is that we're not using like... I'm gonna take a look at this really quick.
02:33:27Oh, this one's interesting. Field set tag. I haven't played with this one before. Like I said, I've done the... What is it? No, that doesn't look right, actually. Text, text, text, text. Text area, text field.
...48Yeah. Placeholder, query, nil, nil. Yeah, I know how to do it in HTML. I don't know how to do it through... Rails and their form helpers. Well, but also I would imagine that in the controller is where we're actually gonna separate these. Does that feel right to you? Recipient username, recipient username.
02:34:27 pushcxmod mails controller here's our mod mail params and we obviously need to strip this back because we deleted a couple of fields yeah as long as we're in here do you want to shove this controller into the mod directory and have it inherit from the mod controller I'm aware that Scaffold dumped a bunch of files around, but... Yep.
02:35:00 ChaelCodesI'm good with that. .. So would this be Meal's controller?
...13 pushcxYeah, I kind of see the... Because everything under there is kind of moddy. How did I do this with mod activities? Because... That one had the prefix. Excuse me.
...27 ChaelCodesMod, mod controller.
...32 pushcxOh, yeah. You know, I just called it like mod notes. I see there is the notes controller and mod activities is activities controller. So yeah, that's good.
...47 ChaelCodesAnd then it looks like based on this, you're importing mod, mod controller.
...51 pushcxYeah, you want to inherit from that.
...56 ChaelCodeshas the auth stuff that you need of hey user shouldn't be in the mods directory sounds good to me all right so we have our mod mod controller and that's the meals controller All, show, new, edit, create, mod mail params. Good, and then what we're probably gonna need to do is go update this in the routes really quick. Perfect. Here's your little mod section.
02:36:51All right, let me try mod.
...59 pushcxIf you search for notes, you'll find it.
02:37:02 ChaelCodesYeah, all right, here it is. 250. Hang on. We're modifying my mails, not messages yet.
...17 pushcxscroll down here to 250 and messages even have separate controller i guess it's the target of the form if we want to be real restful about it yeah all right yeah
...49 ChaelCodesHang on, your other resources are down here.
...53 pushcxYeah, this file is pretty disorganized and I don't have any strong feelings about it.
02:38:05 ChaelCodesI think this will...
marcoroth_ `draw` to the rescue LUL
Males.
...11 pushcxYeah.
...12 ChaelCodesYeah. And I think that would point to mod males. and when we come here to our actual controller, this has been renamed correctly. Makaroth says draw to the rescue. Wait, where is their draw? I have so many files now.
...41 pushcxIs it a rails feature?
...43 ChaelCodesI've definitely heard of it before.
marcoroth_ you can split up your routes.rb file with `draw`
I'm blanking though.
Let's see.
Let's close vote.
Macross says you can split up your routes file with draw.
Got it.
...57 pushcxOh. That's kind of like, yeah, I can split up my models with includes and you still have the same giant model. You just have it split across 10 files. Like we would still have the same number of routes if if we were in like such a big development team that we were using pack work to keep people from stepping on each other's toes i would see some value in it but right now it's just kind of like i don't know what would we call the two separate files routes one to a hundred and routes 101 to 201 like the the division is arbitrary
02:39:43marcoroth_ i guess you _could_ do `draw :mod` for the mod routes
Or really, the better way of saying it is it wouldn't reflect a meaningful way of organizing the work or.
marcoroth_ but it doesn't really help do much in this case
...58 ChaelCodesMy girl says, I guess you could do draw mod for the mod routes.
02:40:03 pushcxYeah, it's kind of the only really conceptually separate part, and it's eight or ten lines i don't know i'm also and some of this is being an older programmer but i'm comfortable with a source file that's a thousand lines long if there's a thousand lines of routes like that's just what there is
...45 ChaelCodesI'm thinking I could maybe create... Ah, no, no, that's bad. That's a bad idea. We should do this in the controller. I was sitting there thinking that perhaps I could have like a mod mail usernames and then just pass it in there and then in the model do our separation. But I think it's probably better to do that in the controller because that's where you would expect to be parsing parameters.
02:41:20 pushcxYeah, it feels like a controller kind of concern.
...21 ChaelCodesYep. Yep. Yep. All right, so what I wanna do here is mod mail mail.
...42Hmm. Let me go up here and try recipient usernames. split on space okay so here's what i'm kind of thinking if we have this prams recipient usernames what i want to do is I wanna split those on the space and then find them as a user, where username, paramsrecipientusernames.split. Nice. Yeah, and then we'll just do, and then,
02:42:52 pushcxdot recipients equals recipients sweet do you get a benefit out of splitting that onto two lines like so if you threw away the post condition by using the ampersand dot in front of the split is there a benefit to having an intermediate variable
02:43:29This is one of those minor style things that I'm asking to ask.
I don't love the ampersand dot.
marcoroth_ you could also do .to_s.split(" ")
I kind of call it, it's just me.
I'm trying to make it happen.
I'm calling it the nil propagation operator because it just helps you spread nil through your program more often.
But then, I don't know, it just seems nice to throw away the post condition and do this work right on the model.
...55 ChaelCodesSo... My first thought is that params could be an empty string. Marco Roth is suggesting making it .2s.split to kind of like force it to be a string. Which actually the if params wouldn't help if it was an empty string.
02:44:18 pushcxI thought params is always structured, like it's always a hash.
...25 ChaelCodesparams is i'm thinking about the value so maybe i should clarify that i'm thinking the value of recipient usernames could be an empty string i suppose i could do either dot 2s dot split or ampersand dot split which would mean that this wouldn't fail i'm also kind of thinking are we overwriting recipient but yeah i i guess there's no point in putting it in a variable
marcoroth_ but having the if condition saves you a db query in case it empty
other than like readability yeah if you like it that's and i am kind of thinking about whether or not we would overwrite it and mark roth says but having the if condition saves you a db query in case it's empty that's we could still that gets you much because this is you know an end point that's maybe going to get hit 10 times a day by moderators
And there's nothing saying that we can't do the if here as well.
02:45:33 pushcxYeah.
...59 ChaelCodesYeah, there's something saying we can't do it here as well.
02:46:12I think nil and empty strings are both falsy. We can test that though.
...20 pushcxEmpty string is truthy.
...23 ChaelCodesEmpty string is truthy?
...25 pushcxYeah.
...26 ChaelCodesIs it present that we have to do here then? yeah okay all right so now this should fail and we need mod mails mod mails controller index is missing a template for request formats this is probably because in our views we haven't moved it yet bottles views Mod Meals, Rename, Mod Slash Meals. And if I try to refresh this, it works now. We create a new Mod Meal, Subject 2. Now, Emerich and Friesen are both fighting, so let's... Send these to a little message.
02:47:38All right, subject. Please stop fighting. Take it off. Take it off the mind. Thank you. Create mod mail. All right, missing partials.
...55 pushcxBecause we shoved the controller over and we didn't move the views.
02:48:00 ChaelCodesI did just move the views, but it looks like the problem is that we have this underscore mod, and that's been moved.
...07 pushcxI blinked and didn't see it, yep. So my streams on Thursday are usually about three hours, because one of the reasons I do the office hour streams is so that Lobsters doesn't totally take over my life like it wants to. And it doesn't work for that at all, of course, but I do try to keep... my streams to a fairly time box structure and you kind of run these giant marathon streams so I am basically saying that it's coming up on like where I should roll out and I feel like it's actually a pretty good place because we've talked through the feature and we've gone from the database stuff all the way up through the the view layer and the controllers and some of the UI stuff. Do you feel like you're in a good place? Is there any like as a user questions you have that I could answer before I roll?
02:49:08 ChaelCodesI think I'm in a good place and I'm happy to keep like churning on this and working on it. And I did expect that you were going to tap out before the end. And thank you so much for hanging around as long as you have.
...18 pushcxIt's been a lot of fun. You have a much more energetic stream than I do. And oh, you maybe want to update your Chiron because I will not be present, but it's got my name on it.
...33 ChaelCodesGood point. Will do. I'll probably turn it off actually.
...41 pushcxAnd I'm really looking forward to the PR and I will see you later to your whole very active chat and subscribers and everybody.
...51 ChaelCodesthank you so much for joining us today. it was nice seeing you and yes, I will keep working on this and I'll have a PR to you at some point. no promises that it'll be today though, because this feels like a big meaty chunk of functionality.
02:50:04 pushcxYeah. And like an hour to a time went into that fighting the, the joins and such. So I know how development goes. There's waiting for like two years for this. There's no rush.
...17 ChaelCodesExcellent.
All right.
See you later.
Thanks.
Bye.
RuggMatt did we do my stretch?
pushcx have fun folks!
Hi everyone.
It's just us again.
All right.
So let's see what we have.
Rugman says, did we do my stretch?
No, I didn't.
I forgot.
I was sitting there like thinking to myself, oh my God, I need a bio break.
but like, I just want to finish this one last thing before I do it for like maybe 20 minutes or so.
Let's do a stretch now.
I think it's a good time for it.
All right.
we're gonna do a chest stretch.
So this stretch is good for posture.
You wanna sit upright and away from the back of the chair, pull your shoulders back and down, extend your arms out to the side and gently push your chest forward and up until you feel a stretch across your chest.
You wanna hold this for five to 10 seconds and repeat five times.
All right, one, two, three, four, five, and relax.
One, two, three, four, five, and relax.
And one, two, three, four, five and relax.
And one, two, three, four, five and relax.
And one, two, three, four, five and relax.
All right.
Let's see if we can kind of like get this working.
I'm gonna refresh this so we have mod meals one.
Okay, it fails.
Excellent.
Let's think about why that is.
So it's looking for missing partial mod, mod meals, mod meal.
I think at this point though, we should probably be looking for mod meals.
Oh, this is gonna be because it links to the actual partial in here.
So let's try looking at our show page.
I think what I wanna do next is I wanna play around with this show page and see if I can get it to a point where it... Oh, this is interesting.
Render at ModMail.
Oh.
I don't think it knows that it's looking for ModMail's mail.
I think we're probably going to have to manually pass this.
But what I want to do next is I want to focus on displaying our mod mail and all of the values associated with it, particularly those references, because I think that's going to be where most of our problems are.
Edit mod mail path might still work with the new route.
Back to mod mails probably won't.
But yeah, let's focus on mod, mails, mail.
I think that render is new where it's got the implicit location, but I might be wrong.
I'm going to go over here and I'm going to look at render.
marcoroth_ it's newish, that it adds it as part of the scaffold
This is dumb, I should know how to do a partial off the top of my head, but it's not coming through right now.
Let's see.
Mike Ross says, it's newish that it adds it as part of the scaffold.
Yeah, I have not seen that before, I don't think.
I don't want action controller, I want this one.
Yeah, this is what I'm used to seeing where it explicitly lists what this is and then passes in this post post on you.
So I think that's what we're looking for here, where we're rendering
this and then let me go ahead and take a look at this object really quick mod mail yeah so that's probably gonna be mod mail like that comma and then this would be i think underscore mail is gonna be enough
We'll come back over here and check this.
All right.
Missing partial mod mails, underscore, underscore mail.
All right.
You don't like the underscore.
That's fair.
I can see why you would not like an underscore.
All right.
So I'm going to refresh this.
There we go.
I like that.
Okay.
So we took out the message, which is why this one is failing.
So let's go back over to this one.
So I want to keep my subject, ditch this message, ditch this author because that no longer exists.
I'm going to keep the remind mods at.
I'm going to eliminate the created at.
We've got it as a timestamp so we can add it back in whenever we want.
All right.
And this is ID Dom ID mod meal.
Interesting.
That also looks new.
Beautiful, okay, so we have a mod mail was successfully created.
I like seeing that.
It's interesting that it shows it twice.
That's not your fault though.
I think that's probably the fault of this one.
And I'm gonna eliminate that because I'm guessing I don't need that.
Come back over here.
So my mod mail was successfully created.
Subject, please stop fighting.
Take it offline.
Thank you.
Remind mods at and a date.
So I've edit this mod mail back to mod mails and destroy this mod mail.
I actually want to remove the ability to destroy a mod mail entirely.
And that is actually in the issue itself.
My guess is this does not work.
Correct.
Okay.
No surprises there.
02:56:38How do I do domains again?
...47Yeah. I'm trying to remember how in a route to do this if it's not present. This is also a terrible name for this. Call that back to mod mail. I do want to be able to edit this mod mail. Let me see if that one works. My guess is not, because if you look, it's got mod, mod mails, mod mail.
02:57:23Ah, the problem here is actually the partial being missing, which means that the route is working. Let me look at my index. Yeah. I've got mod mails. Let's make that mod mail. Content for title, mod mails. We'll go ahead and delete that green notice because I'm pretty sure we don't want that one. Delete that. Mod mails dot each do at mod mail, render mod mail. So this is gonna be the one where we're replacing that with our explicit reference.
02:58:14link to show this mod mail. Mod mail. Show this mod mail is kind of a weird thing.
...28Let's make that view mod mail. And here's a new mod mail. New mod mail pack. Sweet. All right. Let's try this again. Yay! Mod mail, subject, please stop fighting. Take it offline, thank you. And we can view that mod mail, sweet. I'm not sure that this is how I wanna display this with rendering the entire mail object. I think I would probably prefer just to have like a mod mail title. Let's see. Yeah, probably just a title there.
02:59:23So we're gonna do modmail.title. And let's make that a link to, and then we'll pass in modmail. And we'll delete that, delete that, delete that, delete that.
...49No, you didn't like that? I thought for sure we had a title. We don't have a title, we have a subject.
03:00:02Refresh.
There we go.
Please stop fighting.
Streamlabs Thank you for following juhsuedde!
Take it offline.
Thank you.
New mod mail.
Subject to.
All right.
Now let's see.
Thank you for following.
I'm going to leave like a to do note here.
I don't think I'll just leave it to do here.
I want to add updated at and last reply.
actually I'm going to make this add last message and last message author.
I think this is going to help the moderators know which one they're replying to.
yeah.
Okay.
I like that.
Then we have our new mod mail that seems to be working.
That takes us to this form, which has a subject, a to, and then we can create the mod mail.
The problem right now is when we're looking at our references, we're not actually creating the references here on the mod mail, which is what I would like to do.
Let me try this.
I wanna try displaying my references here.
So I'm actually gonna come back over here to the console and I'm gonna do, let's take two comments and pass them into references because we have those, at least for now.
Do I have this stored?
I do not.
MM equals mod meal dot blast.
Great.
I guess it doesn't matter which comments I use.
MM dot comment references.
I'm going to pass in comment dot first.
Good.
MM dot save.
True.
Lovely.
And if I refresh this, I see nothing because I haven't added it yet.
I'm going to hop over here to the show that renders mail.
I'm going to hop over here to the mail object.
And we're going to come in here and just paste this in.
I am wondering how well this will work with what we learned from the form earlier, which is this labeled grid.
I know for a fact that the labeled grid works for forms.
I don't know if it works here.
So I'm gonna keep this just kind of rolling by not adding that yet.
Although I might wanna add it in the future.
References.
03:03:25There we go. And then I want to do mod underscore mail dot, and this is what I was kind of thinking about earlier, is that I can just do mod mail references dot each do,
...57Hmm, mmref.
03:04:05I wanna try and make it a little more descriptive than just mmr. And I think mm is close enough that you'll be like, yeah, that's modmail and ref is obviously for references. Without having to type out the entire thing every single time.
...27I probably wanna link to the reference. But for now, let's just do an mmref.reference.
...42mmref.reference. Save it. Refresh. All right, so that's my comment. How do I want my comments to look? And how do I want them to link? Good question. I'm gonna open up. I'm thinking about that moderation log, right? Because theoretically, no, see this separates it into like comments, stories, et cetera. So like if I have a flagged story, I would see that there. I do have that activity log though. What is the moderations log of? Moderations controller. Let's see. There's my index, moderation log, values none, moderation.all. Yeah, so that's gonna be moderations. hmm. Not ideal. Let's see. Hmm. What can I rely on my reference having? Maybe I can't. Comment. So my comment here should have... Tagging's links, incoming links has one notification. Yeah, this one probably just has a message. Does it have a link? From comment dependent destroy. I don't know that that's necessarily a link to the comment though. Yeah, see that story, story, story. How do we display these? Let me look at moderation. Index.
03:07:02All right, so there's my moderation index.
Hey, good to see you.
You've redeemed a hydrate.
I went and got water during my last bio break.
Hmm.
Here's my partial table.
That's probably the one that I'm looking at.
Let's see.
There's table, moderations each.
Created at mod moderator is from suggestions.
If mod story, we have routes, title, path, mod.story, story, mod.story, title.
Else if mod.comment.
Routes, comment, target, path, mod.comment.
Comment by...
Streamlabs Thank you for following jesor24!
This is probably what I'm looking for.
And it looks like you can do a moderation on a tag or a moderation on a category.
Thank you for following jessor24.
I wonder...
So my problem is that we don't have a lot of, so Lobster's does not use any JavaScript at all.
But what I'm considering is that maybe instead of having references here, this should actually be a link to moderations.
In which case I should be able to use whatever is in here for moderations.
This does mean that we probably need to go with, ah,
comment references.
Marker Roth is probably over there like, yeah, you do need to go with comment references.
It looks like that was the right option.
All right, so we need to do MM.
03:09:00This would be a comment.
And then I would come over here and I would essentially steal this.
marcoroth_ LUL
And then we would have to go through each of the different type of operations.
And if that's the case, what I probably wanna do is validate that I support the type over here in my, what is it?
That I support the type, or that I validate against the type inside of my
mod nail recipient reference.
Yeah.
Yep, so this is belongs to reference polymorphic true.
And we would say validates.
Oh shoot, what's it called?
It's like validates inclusion in.
Yeah, validate reference type.
marcoroth_ wasn't there an option for "valid models" for a polymorphic association?
inclusion and then i think it's like comment is that right that doesn't feel right maybe that is right string marco ross says wasn't there an option for valid models for a polymorphic association that's new
to me, that is new to me.
Polymorphic, valid.
Models.
03:10:54Let's look in here and see what we have.
We have add reference users role, foreign key, articles authors, reviewer, primary key email.
Using the change method running migrations.
Polymorphic.
Okay.
So I think supplier type references.
Oh, there it is.
You do curly braces, polymorphic.
That's what I was looking for.
Let's see.
See this guide to learn more about polymorphic associations.
There we go.
As imageable, imageable type, add index, imageable type, imageable ID, belongs to imageable polymorphic true.
Let's see.
I think I'm looking for the section where we get to the models.
I don't really want single table inheritance for this one.
Oh, here's the delegated types you were talking about earlier.
Let's see, setting up delegated types.
Interesting.
First declare a delegated type in the superclass entry.
Yeah, I don't think this is what we're looking for.
Let's see.
I mean, theoretically, we could use that for moderatable or referenceable options.
Let's see.
marcoroth_ it might be `types: []` but maybe I'm misremembering
countercache true, class name, dependent, foreign key, primary key, touch, yeah I don't see, joy and table, deprecated, scopes, general scopes, includes,
Read only, select.
Marco Ross says it might be types, but maybe I'm misremembering.
03:13:32Ah!
Oh, that's the delegated type bit again.
Hmm.
Hmm.
marcoroth_ ah, maybe I was thinking of that
I'm not sure that's what we want.
And Mark Ross says, oh, maybe I was thinking about that.
Yep.
But maybe not.
Table won't be a delegated type.
Shared attributes in a superclass table and have separate tables for subclass specific attributes.
Yeah, I don't think that's the woman that we're looking for.
I'll try again, though.
03:14:25Looks like it's delegated types.
Hmm.
And really what we're looking for is references here.
All right.
So let's go back to validate reference type inclusion comment.
I cannot remember anything ever.
I would be in a lot of trouble if I tried to do anything offline.
Yeah, in, there it is.
Inclusion, curly braces, in, and then it's Bonjolo W.
And for now it'll just be comment and then we'll come in and we'll add the additional fields that we can use.
All right.
So we've got a reference type.
It's an inclusion in comment.
I am still kind of sad that this doesn't just magically work.
that's for messages.
marcoroth_ yeah, looks like a validation is the way to go
yes right and then there's my reference and if this is comment then i want to try and copy yes this from moderations where did it go what dot each do type checked
Mike Ross says, yeah, it looks like a validation is the way to go.
Yeah.
I think that's probably the right option here.
the traditional option.
03:16:17Where did comment go? Okay. So if mod.com and we're looking for routes.com and target path, mod.com and comment by username on title suite. So that's going to be four lines.
...35Paste that, delete that. That does close the A. Instead of mod.comment, we would just do comment, comment, comment. And then we'll do for the indent. I'm gonna come over to here and test this out. And it fails. Unknown key inclusion. That validates this, comma, inclusion.
03:17:25Where are you?
I'm gonna close this.
Close this.
Take a look out here for reference.
Validate reference type.
That feels correct.
Validates, plural.
There we go.
And let's try that again.
Refresh.
Ha!
References, comment by iGoldnerFrederick on Qui Adispis Quis.
I would prefer that these have like a little bit of a new line situation to them.
how can I get that?
Let's see.
nope, I'm looking for mail.
Close that one.
Okay.
anttonmaptton Hey ! Coucou VoHiYo
I think I'm going to have to give up on.
There we go.
So this is strong, strong.
Anton Maptan says, hey, cuckoo.
Hello.
Nice to see you, Anton Maptan.
All right.
So I have my strong here.
Maybe just like a div.
I could put a div in.
Not very pretty, though.
Hmm.
03:19:02can get something working and i can get something running and then i can go through and i can modify it some more six indent because the thing is i really don't know that much about yeah how this works internally so that's one comment and that's looking good i think what i'm going to do next is i'm going to add a second comment And I'm going to do comment.last. And then we'll do save. Refresh. All right, so that's not what I want. I actually want a list here. So I'll make this unordered list, unordered list. Each of these can go inside an ally. And I'm not sold on this or convinced that this is the best option, but I'm just trying to get some of the data in the right spots and then I can go through and I can modify this further. Let's see. And I'm making sure that I have all of the things that I'm looking for. So this is my moderations. This is the table that I use for moderations. So this one is actually a table that's got date, time, moderator, thing, action, reason, which I think makes sense for this. And maybe it's what we end up using over here. Hmm. Maybe. Now that doesn't really make sense for references. Oh, that actually looks good. Hey, I like that. All right. So these are my references, remind mods at, and then our first thing is going to be a message that's associated with this. do I want to show remind mods at maybe, maybe not. I'll leave it for now. All right, we'll come in here and the next thing I wanna do is I wanna have many messages. I think that's gonna be the next key element of this.
03:21:48Cause I have my users, my users are receiving this.
Do I wanna communicate who my recipients are?
Yeah, I wanna communicate who my recipients are.
So let's do that next actually.
we'll make that recipient lovely close this de-indent it and monmail recipients modulo equals
mod mail dot recipients this equals is unnecessary yep do recipient and then we'll do a little end here and inside here i'll just start with recipient
That looks good.
Save it.
Refresh it.
No, I didn't like it.
That's because I did modmail instead of mod underscore mail, which I'm pretty sure I'm just going to do for the rest of time that I'm working on this.
Okay, so I have no recipients.
That's interesting.
marcoroth_ manually refreshing the page, how annoying Kappa
Let's look at mm.recipients.
That is accurate.
I have not set this to receive anything from users.
Marco Ross says, manually refreshing the page.
How annoying.
I think you would have a very hard time convincing PushCX to add a byte server to this.
Midith316 hey chael
There's very much like a...
You know like how monks can be aesthetic?
marcoroth_ I know LUL
Where it's like limiting all possible outside stuff magic?
My girl says, I know.
Yeah.
Mideth says, hey Chael.
Hi Mideth, nice to see you.
Okay.
So I have my recipient.
I'm gonna pass some users into this.
I'm gonna use comment.first and comment.last, and I'm gonna make both of them my recipients.
I am actually thinking about this, and I attempted to pass users in when I created this, and that did not work.
So I'm gonna keep that in mind.
Let's see.
liftswithastraightbar I've logged in, therefore I am.
mm.recipients.
Midith316 any of the furballs around? :)
And I'm gonna put in, lifts of the ship I says I've logged in, therefore I am.
Hi lifts.
All right.
Comment.first.author?
User?
Definitely not user.
Author?
Doesn't exist, cool.
I'm just gonna do comment.first.
user ID.
Dang it, it was user.
Okay.
User.
Excellent.
Okay, so that worked.
mm.save.
You know what I bet?
I'm gonna go look at that controller.
Neil's controller.
right here when I do this?
No, I do a monmail.save.
Okay, I'll have to keep that in mind.
I'll have to fix that.
All right, let me refresh this.
Oh, I don't have recipients.
Okay, let me try that.
I misspelled recipients.
Okay, okay, okay, okay, okay.
I do have recipients now.
My recipients are in a ray.
Meta says, any of the fur balls around?
No, they've come in and like swept through, but none of them have stayed today.
They're just not as into hanging out on stream anymore.
RuggMatt gotta shake those treats harder
Rugmat redeemed a cat attention time.
Midith316 lol
Because Rugmat has now redeemed five cat attention times, it is abundantly obvious.
The rug mat has tick marks.
And not 1,111.
I can shake the cat treats, but I don't think they're gonna show up.
03:26:51Midith316 i didnt realize there was a tally
She said right before Ruby showed up.
Mita says I didn't realize there was a tally.
There is.
Now we have to see if Ruby's actually gonna hop on the thing.
No.
Ruby's hanging out under the desk right now.
Are you gonna come up here?
03:27:18RuggMatt and if ruby will stay for a whole 5 minutes or so
I'm gonna try one thing.
...43I've moved the safe so she can use it as a step stool.
...54Nope, she's not interested.
Yeah, she just rubbed against it and was like, nah, I'll pass.
All right.
Okay.
I have this recipient usernames.
This did not work.
I have users here and recipients.
I want to display those.
This is my mail comment references.
Here is recipients do recipient.
RuggMatt cats up
Here should be recipient, which is not being displayed.
Yeah.
Interesting.
Regmat says cats up.
Oh, she's clever.
She knew.
We'll start with two.
All right.
So here's kind of like, here's my plan and here's what I'm thinking.
you can tell me what you think about this ruby so right now what we have is we have a page for the mod mail and it currently shows at least the references we only support comment references so what i need to do is i need to include story references and i need to include tag references because i think both of those are things that can trigger moderation
I need a way to actually pass those into the form because right now we're adding them inside of the UI.
Not in the UI, we're adding them in the console.
And so yeah, I need a way to add those in the UI.
One of the challenges that I have with this
is that there's pretty much no JavaScript in lobsters whatsoever, which is really cool, but it also means that it's difficult to dynamically add additional fields.
And I have multiple references here.
So I wanna be able to say like, here's three or five or 10 references to moderation events.
marcoroth_ didn't they have some javascript in the admin section?
And like,
I suppose I could do what we're doing currently, which is like use space to separate them.
Marco Ross says, didn't they have some JavaScript in the admin section?
I can take a look at that and see if they have some there.
I don't remember it.
And like pushy X has specifically talked about the fact that he's managed to limit it as much as possible.
But yeah, I can go check and see if there's some in there.
Because if so, we could have adding additional fields.
And maybe we could even add additional fields to support adding additional users.
My other thought is that seems like something that could be added later as well.
All right, let me add two more minutes.
That's one minute, two minutes.
I'm trying to scope this down as small as possible so we can get to something that's mergeable.
marcoroth_ one way would be to include all users in the DOM, but that's not great LUL
And I think my MVP for this is just going to be, I have all the models, they're present.
People outside can't access it.
I need to work on the tests too.
I think the tests are gonna be a key part of this.
Marco Ross says, one way would be to include all users in the DOM, but that's not great.
Honestly, like we could do like a collection select dropdown.
I am kind of imagining that for the most part, we're going to be interacting with this outside of this actual UI with the form.
But I'm also kind of thinking you can improve the form afterwards, as long as you've got the data in the correct spots.
I definitely think that the rake task to notify admins and generate notifications is like a secondary task.
Okay, so let me think about specifically the parts that need to work.
I need to be able to add references.
I think it should be, I think it should support references to all of the different types, comments, stories, and...
03:32:31Comment stories and tags. Maybe we just start with comments.
...42Maybe we just start with comments and stories?
No, okay.
And now I'm getting back to the point where I'm supporting comments, stories, and tags.
jamesnvc using <datalist> and putting users in the DOM doesn't seem that crazy to me, I've done something very similar before...
Hang on, I'm gonna do one more cat and then we will be done with rug mats.
03:33:08Hmm.
James NVC says, using data list and putting users in the DOM doesn't seem crazy to me.
I've done something very similar before.
RuggMatt until you have a lot of mods lol
I'm not against the idea, especially since I think Reels does support multi-select.
...29Ringmat says, until you have a lot of mods, lol.
So this is not actually for moderators.
Moderators are the ones who can view it.
This is literally for the users that are receiving the mod mail.
marcoroth_ but if you have multiple 10k users it's getting heavy to render that page
So it is all users on the site, not necessarily just the moderators.
That's probably a better interface too.
Midith316 havent been here in a bit, hows the family
jamesnvc you can use datalist then a list attribute on an input, so you can just type & it uses the datalist as the autocomplete source
Mark Ross says, but if you have multiple 10K users, it's getting heavy to render that page.
03:34:09Jameson VC says you can use a data list and a list attribute on an input so you can just type and it uses the data list as the autocomplete sort. These are the last two cats, by the way. We've gone through all five of Rugmats, I believe, and now we're on to Fine and Stoney's.
...38I don't think the input is that important.
I think the input is something that we can change in the future that would only involve changing the controller and the actual form.
And PushCX even mentioned wanting two different forms, one for moderators and one for users, where the users would be like, I have submitted a question to the moderation team instead of DMing him.
Yeah.
So I'm inclined to think that our first pass should probably be finding all the places we display it, displaying references and displaying recipients and getting messages working.
Okay.
Getting messages working.
Yep.
Now I've got this.
We need to display references.
We need to display recipients and we need to get messages working.
Once we get those three things working, I think we'll have an MVP.
And I think that we can change out how we do,
how we input our references and our recipients.
And we can change that based on the form and we can change it in the future to use or not use JavaScript.
Yeah.
Yeah, okay.
So my next step is to make sure that on the show page, I am displaying recipients.
Does that sound good?
Streamlabs Thank you for following sm_mouse!
Yes.
Then once I'm displaying recipients on the show page, my next job is to do messages and then to make sure I've got the authorization.
Thank you for following us in mouse.
And I can set aside like the form and the input for now.
03:36:22All right. I forgot how helpful that is. Okay. Get recipients working, get messages working, and then we don't have to worry about it anymore. So this is recipient. That should currently be displaying. It is not. My MM does have recipients? Yes. And they are users. Hmm. manually refresh. Nothing. Interesting. Let me see if it's just like, nope, there's nothing there. Okay. Modula equals recipient. Mod mail recipients do. I'm just going to do this really quickly to make sure that this isn't something dumb like there's no output here. Nope, that's not it. Okay. Interesting. Huh. Did I do mm.save? mm.reload. MM dot recipients. Still present. Refresh. Now why on earth are you not present? This should not be necessary. I'm gonna try it anyway. What? Why? No, hang on. Wait, that's weird. Why are you a collection proxy?
03:38:34marcoroth_ good linter rule suggestion, thanks!
each oh each each yep i needed to you know when i had my my collection proxy object i needed to call each on it that that might have helped okay there's my users gonna delete this one i'm gonna make this a list again and i'm gonna make it an unordered list oh unordered list
So, unordered list.
Macaron says, good linter rule suggestion.
Thanks.
I'm glad I could be of use.
I'll continue to make mistakes on stream so you can come up with good ideas for your linter.
All right, let me close this one.
Refresh.
let me come over here i bet somewhere i have a username link user.username that's not a link to the user though and i think in this case we probably should link to the user and that's how we link to a user it looks like
03:40:03Close it.
Delete that.
Link to user.username, user path, user?
jamesnvc *recipient
Maybe?
I have no idea if this is gonna work.
Nope, it didn't like that.
Undefined local variable or method user.
That's probably because you're a recipient.
JamesNBC says star recipient.
you know there's some delay also which means that y'all are actually picking up on these faster than like i am theoretically maybe because it's very like it's very common that i like i'm looking at this i look over to chat and y'all already have the solution not all that each one though i missed an opportunity there i should rephrase this
jamesnvc lol
Thank you, JamesNBC, for catching that in case I didn't.
Yeah.
Okay, I think I'm with this.
Let's see.
Yeah.
Okay.
I need a state on this because PushCX wants to be able to close it.
03:41:48do need to state on this what are the statuses though do moderations have statuses moderation okay stat i don't know if it's status or state so i'm doing stat and there's nothing here fun All right, so that's probably a to-do here. Before I add anything about notifying the moderators, we are gonna need to do that. All right, so over here I have add last message and last message author. I have my recipients, I have my remind mods add. I'm actually gonna delete this one for now. And I think we'll come in and we'll do that later. So here's my mod mail. I think what I wanna do next I almost feel like I want this to be like a separate section. Do maybe class ID messages.
03:43:01I don't know what that's going to do. I know I want it to be in a separate section here. I don't know what this is going to do, so I'm going to leave that out. I can make this a section, though. I don't know what that's going to do either, but I at least know it's valid HTML. I want messages.
...26Modulo. Let's do modmail.mod. messages this one is a straightforward has many because each of them references that each do and message yes yeah that's probably the way to do it
03:44:08Can you include messages on one object?
I don't think I've played around with that before.
Does it automatically get included?
I'm going to pass a message here.
CodeRushed 5 raiders from CodeRushed have joined!
Streamlabs coderushed just raided the channel with 5 viewers!
And my guess is this is going to fail because I haven't written anything related to this yet.
Ta-da, it fails.
Beautiful.
That's what I want to see.
CodeRushed, hello and welcome.
It's nice to see you.
CodeRushed Nice to see you too
Okay, I have been doing this thing where I invite people to stream together with me to talk about what they were working on.
I think you were here when I did this last time.
CodeRushed Right
CodeRush says, nice to see you too.
Yeah.
CodeRushed Sure
Do you wanna come on stream for a few minutes, talk about what you're doing?
CodeRush says, right, yeah.
Sweet, okay, I'm gonna swap over to Face.
And then, I don't have this set up.
I need to open Brave real quick.
RuggMatt welcome raiders
CodeRush says, sure, excellent.
Hello and welcome readers.
It's nice to see you.
CodeRushed I forget how we did this
There we go.
Guest star.
Excellent.
Join the call.
Excellent.
Code rushes.
I forgot how we did it last time.
Yeah.
I'm going to invite guest.
I'm going to do code rushed.
There we go.
03:45:36Did you see an option to join somewhere, maybe?
...45CodeRushed Not seeing an option yet.
I sent an invite, I don't know where those show up.
I'm still figuring this out.
All right, include my camera.
Code Rush is not seeing an option yet.
Sweet, I love that.
Invite guests.
I did try that.
Invite link, send invites.
03:46:14 pushcxGot rushed.
...15 ChaelCodesOne day I'm gonna get this to be really smooth and everything.
Pending.
Okay, I do have a pending invite for you.
Let's see.
Hmm.
CodeRushed Let me ask chat gpt where it might be
I have a pending invite for you.
I don't remember how to do this though.
Code rushes.
Let me ask chat GPT where it might be.
Let's see.
Oh, and I need to, I need to make one other change stream together.
No, that looks like it actually will work.
Okay.
I told you.
Is not working today.
I'm going to transition really quickly to our stream together scene.
Turn mine off.
Good, okay.
And then let me go in here and let me see.
CodeRushed I'
CodeRushed I
CodeRushed I'm still looking.
properties no okay that's not working today excellent i don't know why that's not working today because it has worked in the past scene ad existing big desperate scam wrong scene code rushed scene
an existing webcam plus cover there we go shrink that into the corner this one right here is the one that i want there you are welcome back oh i found the join button
[SPEAKER_00]: It's to the right of your name.
[SPEAKER_00]: Oh, to the right of your name.
[SPEAKER_00]: Let me mute that back there.
[SPEAKER_00]: So now I can see you.
[SPEAKER_00]: I think I hear you.
[SPEAKER_00]: Can I hear you or no?
Can you hear me?
[SPEAKER_00]: Can you say something?
[SPEAKER_00]: Good question.
Can you hear me?
Can you hear me?
[SPEAKER_00]: Okay, I can hear you now.
[SPEAKER_00]: Let me try muting one more time.
[SPEAKER_00]: I'm like, wait, I'm going to mute you.
[SPEAKER_00]: I was hearing myself come back.
Yeah, I am actually hearing you.
[SPEAKER_00]: Now, can you talk?
I am talking.
Can you hear me?
03:49:20[SPEAKER_00]: Okay, so I'm getting feedback from me. [SPEAKER_00]: And when I unmute the site, I can only hear you.
...33RuggMatt what happened to the cmera colours
[SPEAKER_00]: I don't remember this at all, this problem mapping before.
Let's see what's going on.
So I'm using the OBS virtual camera, which is supposed to not affect my camera colors, but sometimes, yeah, sometimes I run into issues when I'm trying to use my camera in two places at once.
liftswithastraightbar This is how meetings when COVID started felt like
Theoretically, though, I'm not using my camera in two places at once.
Theoretically, I am just using it in the one place.
But yeah, that's not working.
This is how meetings when COVID started felt like.
Hi, CodeRushed.
[SPEAKER_00]: Okay.
[SPEAKER_00]: Hi there.
How are you?
[SPEAKER_00]: But yeah, I'm still not getting your audio from a place that's not the...
[SPEAKER_00]: Well, thank you for asking.
[SPEAKER_00]: I'm fine.
[SPEAKER_00]: I just muted.
[SPEAKER_00]: I've got two browsers up here.
[SPEAKER_00]: You can see like this one here.
[SPEAKER_00]: What I want to do is get your sound from here.
Can you hear me?
[SPEAKER_00]: And where's this going?
[SPEAKER_00]: Maybe I send it to my headphones.
[SPEAKER_00]: Whoops.
RuggMatt you have the window muted in the top right coderushed
[SPEAKER_00]: Can I hear you now?
[SPEAKER_00]: Can you say something?
I am saying something right now.
I am purple in pink.
[SPEAKER_00]: I saw your mouth move, but I didn't hear it.
TheCodingSauce @RuggMatt ^^
I'm definitely, I think I'm using the right one.
Because I'm using my wavelengths.
[SPEAKER_00]: What other choices do I have?
[SPEAKER_00]: Throw it there.
Microphone.
let's see.
Rugmat says you have the window muted in the top right code rushed.
Oh, but yeah, he can't see that.
[SPEAKER_00]: Oh, look at this.
Let me start...
There we go.
How's that?
Okay, got it.
[SPEAKER_00]: Okay, I got you now.
03:51:32[SPEAKER_00]: Woo! [SPEAKER_00]: Okay. [SPEAKER_00]: Oh, but... [SPEAKER_00]: Okay, wait, hold on. [SPEAKER_00]: Oh, but it unmuted over here. [SPEAKER_00]: I said I got you, but now when I mute this, it mutes the other one, doesn't it? [SPEAKER_00]: Let me close this. [SPEAKER_00]: Wait, I think I've fixed it. [SPEAKER_00]: I can't have that. [SPEAKER_00]: Okay, yeah, now I hear you. [SPEAKER_00]: That's great. [SPEAKER_00]: Okay, can you see my screen? I can see your screen. It's a little cut off though. [SPEAKER_00]: Oh, it is. I think that has to do with my view because I can see you fully over here. [SPEAKER_00]: Okay. Let me try. [SPEAKER_00]: I see. [SPEAKER_00]: I'm looking at... [SPEAKER_00]: I'm just trying to...
03:52:24[SPEAKER_00]: I got it.
[SPEAKER_00]: Now at least I have feedback on where the code is.
[SPEAKER_00]: So what I can do is move this and kind of do that.
[SPEAKER_00]: So it looks like it's taking just the center, which is kind of interesting right there.
schizophrenicWebdeveloper The Bald and the Beautiful!
[SPEAKER_00]: Okay.
[SPEAKER_00]: Whoops.
[SPEAKER_00]: That's not what I want to do.
[SPEAKER_00]: This right here is what I want to do.
[SPEAKER_00]: All right.
[SPEAKER_00]: So we are working on something called AI Gen, which is a feature inside CodeRush.
[SPEAKER_00]: CodeRush is free.
[SPEAKER_00]: Add in for Visual Studio.
[SPEAKER_00]: You okay if I just start going, right?
[SPEAKER_00]: I figured you want me out of here as soon as possible.
[SPEAKER_00]: So it allows me to use voice to make changes in the code.
[SPEAKER_00]: Right now I've got what a calculator application.
[SPEAKER_00]: I'm not sure what the state of my calculator is on this.
[SPEAKER_00]: Let's run it and take a look and see what's going on with it.
[SPEAKER_00]: okay all right so it's actually in pretty good shape it's actually done a lot of things right here and looks like we've got some resizing options here but these buttons are all created dynamically right here from these classes here which i'm gonna just take a bunch of them and delete them okay okay like that so we're gonna delete those we're gonna come over here and i'm gonna say
[SPEAKER_00]: Hey, I want to create four new implementers of I can calculate, but I want them to be different from the ones we've already done.
[SPEAKER_00]: And I want them to be not simple.
[SPEAKER_00]: I want them to be kind of advanced calculations that would make sense on a calculator.
[SPEAKER_00]: Wait, I don't remember how many I said I wanted.
[SPEAKER_00]: I think I want four new ones.
[SPEAKER_00]: Okay.
[SPEAKER_00]: So that's my command.
[SPEAKER_00]: Now what it's doing is it's going out, it's sent that voice to Azure.
[SPEAKER_00]: It's brought that back as text.
[SPEAKER_00]: It took that text, sent it out to a context determining AI, which then comes back and says, here's what we need to send, the big reasoning model.
[SPEAKER_00]: And then it came in and it started creating these other pieces that are in here.
[SPEAKER_00]: Down here, you can see these are the four it added.
[SPEAKER_00]: So it looks like a hypotenuse calculator is what it's got.
[SPEAKER_00]: And a module seven calculator.
[SPEAKER_00]: I can just hit F8 to kind of go through these and we can see all of the text there with that button text.
[SPEAKER_00]: So now the... Can you show what edit prompt does?
[SPEAKER_00]: Yes.
[SPEAKER_00]: Yes.
Oh, so what you can see here is the actual text to speech prompt that you just put in and you can go in and modify it and rerun it basically.
[SPEAKER_00]: Yes.
[SPEAKER_00]: Yeah.
[SPEAKER_00]: If I hit send, what it'll do is it'll undo all the changes I did and it'll resend it out.
[SPEAKER_00]: Anyway, that's it.
[SPEAKER_00]: I should stop talking.
[SPEAKER_00]: That's the essence of what we're doing.
[SPEAKER_00]: It's just high speed coding assistance inside of Visual Studio.
Well, thank you so much for sharing.
That's really cool.
What we're doing over here today is we're working on lobsters and contributing to it.
And right now we are working on a mod queue.
So we're trying, well, not a mod queue.
We're working on mod mail.
The mod queue is later, but basically we're going to build a way for moderators to communicate with users, multiple users at the same time, and for all moderators to be able to see all moderation messages that have been sent to users.
[SPEAKER_00]: Right.
[SPEAKER_00]: Yes.
[SPEAKER_00]: I think I've seen you work on this a little bit.
This is my first time working on lobsters, actually.
[SPEAKER_00]: Okay, so it was lobsters.
[SPEAKER_00]: I don't know what that is.
[SPEAKER_00]: I saw you working on something before, I thought.
[SPEAKER_00]: I may be remembering this wrong, but I thought it was like a website kind of interface where I could go in and talk to people, make changes or something along those lines.
[SPEAKER_00]: Am I remembering anything correctly or no?
I have worked on Meet Another Day before and Ruby Events before.
So Ruby Events is basically like it has a listing of every single Ruby event that has happened and will happen.
And it's got videos that have been uploaded.
And I think when you dropped in, maybe we were working on mutual events, which is like showing which events attendees have gone to.
[SPEAKER_00]: Yes, yes, yes.
[SPEAKER_00]: I remember that.
[SPEAKER_00]: Okay.
[SPEAKER_00]: So that's not Lobsters.
[SPEAKER_00]: What's Lobsters?
No.
Okay.
So Lobsters is this community that's based around like programming link aggregation.
So if you think of something like Hacker News or like Reddit, where you've got all the links and stuff, but what Lobsters does is it brings a lot of care and attention and moderation to that.
So imagine those communities, but not toxic and explicitly focused on programming topics.
[SPEAKER_00]: Oh, I'm a big fan of Not Toxic, by the way.
[SPEAKER_00]: I will take that.
[SPEAKER_00]: That's the best.
I recommend checking it out because like you can access all of the links and read the conversations before you log in.
And I really enjoy it.
[SPEAKER_00]: It's very nice.
[SPEAKER_00]: Okay.
[SPEAKER_00]: Well, thank you so much.
[SPEAKER_00]: I love it.
[SPEAKER_00]: And thanks for letting me do this.
[SPEAKER_00]: This was fun.
Yeah.
I like bringing people in, especially thank you for the raid.
Hello and welcome to Code Rush viewers and I'll see
[SPEAKER_00]: All right, take care.
Bye.
[SPEAKER_00]: Bye.
There we go.
Okay.
RuggMatt camera still funky
My poor face.
It is green and purple now.
I'm enjoying bringing people on.
I really wish it were a little bit smoother.
Rugmat says camera's still funky.
RuggMatt did u try turning it on and off again
Yep, that it is.
Alright, I'm going to go into studio mode.
I'm going to open my webcam.
My webcam has actually been acting a little bit weird today.
There's the cam link.
chendler_ you are very nice person Chael
RuggMatt classic
Magmat says, did you try turning it on and off again?
Yeah, so the weird purple and green colors is when my camera is used by two different sources at once, and then it has to be toggled off and back on again to work.
Theoretically, I was using my OBS virtual camera, but clearly I was not.
Chandler says, you are a very nice person, Chiel.
schizophrenicWebdeveloper @chendler_ yep Chael is good person!
Thank you, I appreciate that.
I am a very nice person.
But yeah, I like collaborating with others and I like having those sorts of conversations and seeing what other people work on and seeing Code Rushed have like the text to speech AI is fascinating to me.
That's very cool.
Oh, Ragmat says classic and Schizophrenic says, yep, Chael is a good person.
Thank you.
So I have my Mod Meal messages.
This is not currently working.
We need to go and make this work.
corbob I just realized I was in a 2.5 hour debug session and get got basically not very far LUL
So we're gonna open Mod Meal.
And Mod Meal is gonna has many.
marcoroth_ reminds me of the IT Crowd "Hello Computer" scene LUL
Corbob says, I just realized I was at a 2.5 hour debug session and got basically not very far.
You know, I'm feeling the same way.
Michael Ross says, it reminds me of the IT Crowd hello computer scene.
Okay, I've seen IT Crowd.
I do not remember the hello computer scene.
Let's see.
I remember turning it on and off again.
I remember when they discovered the vampire in the data center.
He's been on Taskmaster.
I don't remember his name though.
What was I doing?
corbob hello it, yuh huh, have you tried turning it off and back on again? yeah, no, there you go, I just heard it.
Has many mod mail messages.
Yeah.
This should work because messages.
Mod mail messages.
Mod Meal message, because I'm looking for the model.
Yep.
Yeah, it belongs to Mod Meal.
I don't think I need the ID there.
And I don't think I need the ID there.
There we go.
That should work.
04:00:33[SPEAKER_05]: Hmm. [SPEAKER_05]: Hmm.
...44OK, my mail and user. I'm going to check the migration really quick to make sure that we fix this. No, I know we fix this. Yeah, we had to fix this in order for the migration to actually run because we used references. I'm going to refresh this, but this isn't going to work yet because I used messages and not my mail messages. I need to go to mail message. Mod mail. Messages. Haha! Ho! Yay! I mean, it doesn't work, but like, yay! Okay. here's my section. I'm just gonna put like a little... I don't know... H3? Messages. All of this is like absolutely the wrong thing to put here because I'm not using an existing reference. Okay, in general, I like to have like a little reference that I'm pulling from, but here I do not. So I think we're gonna wanna embed our message create inside of this. And maybe we don't even have a separate like page for it. I don't know. Let's see. Yeah, this messages really needs to be the next thing that I do. I don't have any messages currently. I want to create a message, so I need a form to create a message. So I think the last thing I'm going to want to do here is I'm going to want form. [SPEAKER_05]: Yeah.
04:02:38Form four. Let me try some, I've got this mod mail messages. I'm gonna rename this one and then everything's gonna break again. There we go. So here's mail messages. Here's my form. Form with model mod mail messages, do form. If mod mail message dot errors dot any prohibited this mail message from being created. Yeah, this is definitely wrong. I don't need to actually display this. I think this can just be a hidden field. Yeah. Yes, all of these go into, what was it called again? Here's the form labeled grid. Labeled grid. All right, so here's our Mod Meal ID. I do want my label for my message. These two get de-indented. I think this is a hidden field. And this is user ID.
04:04:13All right, so here's kind of what I'm imagining. Delete that, delete that. Delete this, put it up here, delete that. Indent these, delete that. And then I think form.submit does not go in a separate div. Let me check. Okay, the labeled grid goes and then the form.submit, okay. So actually, delete. De-indent. Excellent. Alright, so the next thing I'm going to want to do is I'm going to want to have this form. And I'm going to go steal this from like the new page. Yeah. Perfect. Yank that one. Come over here to mail. Put that there, delete that. Indent this, indent this. Instead of form, this is gonna be mail messages.
04:05:26Yes, slash form. And then I need to like create this object, which is my mod mail message. yes yes do i want to create this here or do i want to create this in the controller i think i want to create this in the controller yes i'm going to call this new mod mail message Okay. And then I'm going to go to mail controller. Lovely. here's my show new mod mail message equals.
04:06:32modmail message dot new user here is at user and then modmail is at modmail. That looks good. I'm happy about that. I'm going to go in and I'm going to make another small change here. I'm going to do at messages, and this is going to be equal to at modmail.messages.order created at. There we go. That way everything shows in the correct order every single time. I don't know if this is right, if I'm going to need to ascending or descending it, but the good news is that that's a fairly easy thing to figure out. The next thing I need to do is over here in my mail.html.erb is make this app messages. There. I think that works. And I like that. Refresh. It broke. Okay. That's because I didn't make this mod mail messages. I got it before chat, dude.
04:08:09All right, let me refresh this. Missing partial meal messages form. All right, maybe I need to fully lay it out if it's like not inside here, right? Yeah, no, maybe. So let's try mod slash mail messages slash form. Maybe. Hopefully. Probably?
...40Yes!
Oh, good.
Oh, I like it.
Do I like it?
Maybe, kind of.
Create mod mail message.
Maybe?
mean it's not bad i would probably inline that though yeah i'd probably inline that let's look at our form here wrong form this is meals let me close that one messages
ModMailMessagesForm.
Index.
There are so many of these.
Okay.
ModMailMessageForm.
Yes.
Instead of doing labeled grid, I'm gonna make this a div.
I don't think this is gonna have any spacing though, is my one thing.
Refresh.
Doesn't have any spacing.
Could be worse.
Okay.
But yeah, that looks good.
I'm gonna create a message and submit it.
And I have no idea if it's gonna work.
Let's see.
You two have been fighting
All over the site.
Stop it.
Yay.
No.
corbob stahp!
Missing template, my mail messages, new application, new with locale in blah, blah, blah, blah, blah.
So I think my problem here is probably that there were values missing, which means this failed.
Kripop says stop.
Yes, exactly.
Hmm.
I'm not even sure new is the one that we want.
My mail messages new.
I need to change the routes in order for this to work.
Routes.rb.
Let's go in here.
My mail messages.
Delete that one.
Let's see.
Yep, there's mails.
Post this here.
And then this here.
We'll make this mail messages.
And then we'll go to mod mail messages.
Controller.
Change this to ModMailMessagesController.
Set ModMailMessage.
The rest of that all stays the same.
But you get renamed with a slash.
Which of course moves you into the mod folder.
Alright, let's try that again.
Backspace.
Refresh.
S-T-A-H-P. Stop.
Stop.
Ah, Mod Meal must exist.
User must exist.
Ha ha ha.
Ooh, excellent.
Recording
RuggMatt oh hello?
07 ChaelCodesLet me try.
Rugnut says, oh, hello.
Yes, indeed.
RuggMatt the stream died for a sec
corbob stream just turned off and back on again...
We got values that I like seeing.
RuggMatt then it came right back
You know what I could do?
On that new form, I could link to the mod mail and show it.
Oh!
Redmat says the stream died for a second, stream just turned off and back on again, then it came right back.
No, I have fixed it.
I was doing so well for so long.
I thought things were properly fixed.
Oh, I hope it's, if this breaks all of a sudden and like it starts being a thing again, I will be heartbroken because for a while we were having a whole bunch of issues with instability.
Let's see.
And I thought I fixed them all.
If they come back, I will be just distraught.
See, this is a hidden field recipient username.
And I thought that's how you did this.
Hmm.
Hmm.
stronglytyped_ hi
Mobile ID, user ID.
Both of those should work.
Strongly typed says hi.
Hi, strongly typed.
RuggMatt hi @stronglytyped_
Let's try this.
Let's go back.
And let's inspect this.
So this is type hidden.
adrian_learns riyinaHey hi
Input, input.
These don't have values.
And I think they are supposed to.
StreamElements ChaelCodes is now live! Streaming Software and Game Development: [Ruby/Rails] Let's contribute to Lobsters! 🦞 Special Guest - @pushcx
I also suspect... No, that looks like the right, those look like the right values.
Oh, no, wait, they do have values.
They have value one and value two.
That might be accurate, actually.
Hmm.
02:29RuggMatt !lobsters
StreamElements https://Lobste.rs is a friendly and delightful community for sharing links about programming topics and commenting on them. https://twitch.tv/pushcx runs office hours for them on Monday and Thursday and they welcome contributors: https://github.com/lobsters/lob…
I should check the parameters that the controller accepts.
Adrian Learns says hi.
Hi, Adrian Learns.
Okay.
...44Huh.
Okay.
Let's go and look at our controller.
Ah, you know what?
We might be filtering out the params because of the IDID thing.
Mod, mail, messages, controller.
Haha, it is!
Oh, good.
All right, I'm going to eliminate these.
Save it.
Okay, okay, okay.
Stop.
I probably need to refresh that.
stronglytyped_ who's pushcx? am I missing something
Oh, no, wait, hang on, maybe.
Missing partial mod.
Mod meal messages, mod meal messages with locale, blah, blah, blah, blah, blah.
Oh, it's the show page.
I think I want to show the mod meal.
Strongly Typed says, who's PushCX?
Am I missing something?
So earlier today, we had PushCX on the stream, which was very nice.
So PushCX is the moderator of Lobsters.
RuggMatt !so @pushcx
StreamElements Hey! It's @pushcx, they were just in Software and Game Development. Rails dev and office hours for https://Lobste.rs Ask questions anytime. I code when not answering questions. at https://twitch.tv/pushcx
Today, what I'm doing is I'm working on Lobsters, and I am working on this massive feature request called Mod Meal.
Basically, the idea is moderators want to be able to send people a message and have all the other moderators see it and see it represented in the activity log and everywhere else.
Dun-dun-dun-dun.
And PushCX is another streamer in the Ruby space who does very similar content to what I do, but he focuses on Lobster's office hours.
So what he does is he will answer questions about PRs, he'll review PRs, work on feature work, explain how Lobster's works under the hood.
And it's been really cool and interesting to see that.
Okay.
stronglytyped_ awesome, is the codebase entirely rails,activerecord?
yes so today we're contributing to lobsters next stream we're contributing to lobsters that i'm off for two weeks and i'll decide what we're doing in january because december will be advent of code so yes let's see yeah okay so there is a mod mail a message
Oh, oh, look, there it is.
Okay, there it is.
There's my mod mail message.
Excellent.
Oh, perfect.
Exciting.
CodingWithCaleb Hi!!
Okay, let me go in here to, oh, there's so many of these.
Okay, here we go.
So here's my message.
I probably want to do message dot message.
That's the body of it.
Coding with Caleb says, hi.
Hi.
Strongly Types says, awesome.
Is the code based entirely Rails ActiveRecord?
corbob @CodingWithCaleb moreamWave
Yes, in fact, we got to fight with ActiveRecord earlier today because I wanted to set up polymorphic relationships through a many to many relationship, which is admittedly complicated.
Yeah, admittedly complicated.
Okay, so here's my message.
I'm probably going to steal the syntax.
Message dot user.
06:08stronglytyped_ chocojICANT nice
Yeah.
Name.
And let's come back to this refresh.
Oh.
Message dot user dot username is probably what that's going to look like.
...29All right, refresh.
Yay, stop but the user is test.
CodingWithCaleb I'm having a cosy evening this evening. Got some food on the way & planning to go to sleep around 10
Good.
Okay, so we have this thing, inbox and like we have messages that are coming in through there.
So I think that's what I'm gonna look at next is how we do those messages.
I'm also gonna close a whole bunch of these
because I'm having trouble like finding the things that I actually wanna work with in here.
So yeah, I'm gonna close a whole bunch of these because I'm just opening them with Command P anyway.
stronglytyped_ i worked on gumroad for a very little bit and honestly rails is pretty impressive. I've also worked on forem (what dev. to is based on) but mostly on their frontend
Yep, yep, yep, yep, yep.
Okay, perfect.
That's what I want.
Coding with Caleb says I'm having a cozy evening this evening.
Got some food on the way and planning to go to sleep around 10.
That sounds lovely.
Strongly typed says I worked on Gumroad.
Oh, Gumroad.
like, ..
Oh, she used to go by Purple Elf, and I don't know what her name is now.
I worked on Gumroad for a little bit, and honestly, Rios is pretty impressive.
I've also worked on 4M.
I've contributed to 4M too, which Dev2 is based on, but mostly on their front end.
Oh, I added the Twitch clips to them.
They're liquid tags.
RuggMatt !so mayarainer
Okay, so.
StreamElements Hey! It's mayarainer, they were just in Software and Game Development. rust chat server!! 💜 adding pinned messages and invites !fishies at https://twitch.tv/mayarainer
I'm so sorry.
I need another bio break.
Let me pull up.
Let's see, where is it?
Oh, Maya Rainier.
That's right.
That's right.
Okay.
CodingWithCaleb I also got some Japanese incense which I had on earlier, though I was a little worried about setting the fire alarm off
I'm getting rust now.
Okay.
give me like one second to pull a stream pierce.
Sweet.
Okay.
I have to be right back.
Let me...
10:53stronglytyped_ amazing. yeah maya is great
stronglytyped_ purple142Love
RuggMatt i can hear ur mic again
SurlyDev 14 30
RuggMatt type the pair #s in chat
RuggMatt 32 40
Jedi_Megaman 10 35
SurlyDev 19 18
RuggMatt 13 33
Jedi_Megaman 7 16
RuggMatt 22 33
SurlyDev 38 17
stronglytyped_ god this is great who made these stream games??
RuggMatt 12 46
SurlyDev 38 27
RuggMatt 31 48
SurlyDev 6 26
SurlyDev 53 54
SurlyDev 52 18
RuggMatt 21 54
SurlyDev 52 17
SurlyDev 52 27
Jedi_Megaman 51 34
SurlyDev 52 6
RuggMatt 38 40
Bhushan217 22 24
RuggMatt is that a chael i hear?
Hang on.
There we go.
SurlyDev 44 24
And back to here.
Hi.
Rugmat says, is that a chair right here?
RuggMatt LUL i was still playing
Yes.
It's gone.
Sorry, Surly.
Also, hi, Surly.
RuggMatt 22 11
OK. StronglyType says, god, this is great.
Who made these stream games?
I, yes.
I really like this one.
It was, Rugrats says I was still playing.
No, it did the one, two, three, and then it swapped.
I saw it.
It did the one, two, three, and then I swapped.
ChaelCodes https://streampairs.com/en/syst…
This one is streampairs.com.
Okay.
Sterling Dafferty and Stretch.
I think that's a good idea.
corbob inconcievable!
Where is Stretch?
Let's do an upper body twist.
My heart is pounding.
I ran up and down the stairs.
I'm very out of shape.
This stretch will develop and maintain flexibility in the upper back.
You wanna sit upright with your feet flat on the floor.
Cross your arms and reach for your shoulders.
Without moving your hips, turn your upper body to the left as far as is comfortable.
Hold for five seconds.
One, two, three, four, five.
stronglytyped_ I've also seen one where you do anagrams?
Then you're gonna repeat on the right side.
Okay.
You ready?
Let's do it together.
One, two, three, four, five, and swap.
One, two, three, four, five, and swap.
One, two, three, four, five, and swap.
One, two, three, four, five, and swap.
1 2 3 4 5 and swap 1 2 3 4 5 and swap 1 2 3 4 5 and swap 1 2 3 4 5 and swap 1 2 3 4 5 and swap 1 2 3 4 5
Big stretch.
Strangletapes says, I've also seen one where you do anagrams.
Is that the one where it used to be like Wordle but like chat did it?
That one chat said worked okay.
I don't know because I'm never there when we're actually playing the games.
But yeah, chat said that one only worked okay so I don't do that one anymore.
RuggMatt @stronglytyped_ the one you are thinking of is wos.gg
Next we're gonna look at messages.
stronglytyped_ yess
yeah i think i want message html erb and that one is here in our inbox oh and regmat says the one you're thinking of is wasp.gg ah okay this one yeah yeah yeah there you go play locally for streamers twitch and youtube
It works really fast and easy, I will say that.
Here we go.
Let's look at this.
14:16If message.author, interesting. Inline avatar for at user message.author. Hmm, interesting. Comment unread if is unread. Div class equals message. Details byline. Well, let's try grabbing this entire thing, basically. And then we'll just see which parts we can strip out of it.
...56Hmm. I think what I wanna do is I wanna use mail messages. So we do modulo equals render, and then we have to do the whole thing. So it'd be mod mail messages. Oh, you know what? We renamed this, didn't we? to mail message. Mail message. Yep. And then mail message. Maybe it's mod mail message. Mod mail message.
16:01Delete that one. And then if I come look at, let's see. Well, first I just wanna make sure that this actually loads. Refresh. It doesn't, yay.
...19Let's see. Missing partial mod mail message. Mail message. Mail messages.
...37There we go.
Yep.
That's the one I'm looking for.
And refresh.
There we go.
Perfect.
Okay.
Now I can come over here and I can yank this entire thing.
I can open, let's see, mod mail message, HTML mail message.
Yeah.
And we'll just come in here and we'll put this here.
And we'll pretty much delete all of this.
Except maybe this part.
Yes.
Let's delete through there.
Here's my class message.
Put that there.
Replace that with a space.
Looks good.
And then I can delete all of this.
Yay.
All right.
paulkokos o7 ruby girl
I want to keep message.
I don't think I have this voters section.
mostly because I don't have an Izzo red.
Paul Coco says Ruby girl.
Yes.
Accurate.
Maybe I should change my name.
Okay.
So mod meal message.
If monmail message dot user.
paulkokos ruby queen would be convenient
Inline avatar for user.
Monmail message user.
Paul Coco says Ruby Queen would be convenient.
That feels like a little much.
Let's see.
paulkokos :D
modmail message user.
Yes, if I wanted to keep the author, user.username, what I would probably do is just alias it, which I am considering.
19:23mod mail message i don't think we currently have a short id for this we might but i don't think we do for now i'm gonna make this id and make this mod slash mail messages message.id
If as unread, comment unread, unread, end.
Okay.
I don't think that we have unread stuff in here yet.
So I'm going to delete that.
Delete that.
Then we have the subject.
Do I have that?
I don't think I have that.
I think I just have a body.
I don't think I even have a linkified body.
Yeah, I think I just have...
CodingWithCaleb I was just collecting my food order, and nothing makes you feel more like a stalker than following someone else up 8 flights of stairs
message well hang on I have this raw message dot link if I'd body I would put money on that being a thing inside of message so for now we'll just do message
Let's see.
Coding with Caleb says, I was just collecting my food order and nothing makes you feel more like a stalker than following someone else up eight flights of stairs.
Were you following your delivery driver?
I can imagine that making them very nervous.
CodingWithCaleb Noo, it was a neighbour
All right, I'm gonna delete this one.
All right, let's see.
There's message ID, my mail message.
Coding with Caleb says, no, it was a neighbor.
Theoretically, they should know who you are.
CodingWithCaleb I go down to collect the food because I _don't_ expect the delivery driver to do that walk
My mail message, my mail message, my mail message, my mail message, my mail message, my mail message.
Okay.
Save this.
I mean, theoretically, I don't need the raw.
Stop!
Test, 18 minutes ago.
Yay!
That looks pretty good.
I like that.
Could definitely look better if we had like a little more space between our messages and our message.
Please stop fighting on the site.
We have a dedicated wrestling ring for that.
Failed.
Cool.
Missing partial.
ModMailMessage, ModMailMessage, with this, and that's ModMailMessageShowHTML.erb.
Okay, so when we create a new one, I'm going to go to ModMailMessageController.
When we create a new one, currently we route to that new page instead of doing... No, no, no, create.
Yeah, yeah, yeah.
Instead of redirecting to ModMailMessage, I think we should actually redirect to ModMail.
Yes.
Yes.
Please stop fighting on the site.
We have a dedicated wrestling ring for that message.
Sweet.
That looks pretty good.
Coding with Caleb says I go down to collect the food because I don't expect the delivery driver to do that walk.
I was kind of wondering why you were following them instead of like, but also I can imagine you being like, oh, I've ordered my food to arrive before I do.
But yeah.
I like this.
CodingWithCaleb our elevator is currently getting entirely replaced
Let me submit another one.
Here is another new message.
Conan with Caleb says our elevator is currently getting entirely replaced.
I see.
Here's another, oh!
Did y'all see that?
That looked so good.
Okay.
It's obviously like everything's too condensed.
There isn't enough spacing around it, but like, did you see when I typed the, okay.
Like, hang on, hang on, hang on.
Watch this.
It looks very nice.
even though it's server side rendering with no magic.
Cause I'm pretty sure we don't have CSS transitions here.
24:26I like it. That made me happy. Okay, that looks good to me. I want my message to be a text area. That's my next thing that I want to work on. Let's close that, close that, close that. Message, text. No, this is the wrong thing. Mod, message, form. There we go. I want to make this a text area.
25:01That's better.
Can I make it big?
I have no idea what UI tools I have at my disposal.
I have no idea what UI tools I have at my disposal.
Let's go look.
Hang on.
I'm having a thought.
Inbox.
Skip slow queries for flag warning and mode development.
Unread.
Messages.
This is what it looks like when I compose a message.
Right now it's got a to, it's got a subject, it's got a message.
It does all this nice highlight-y stuff that we're not getting today.
And I like this.
This is very nice and big.
So let's take a look.
Here's our form for this.
And where is my message form?
Yes.
Method post errors for new message.
Well, I think that's probably what we want to do.
Ahnzh o/
P. Errors for mod mail message.
Lovely.
Arns, hi, nice to see you.
All right, now let's start deleting these.
Yes, excellent.
All right.
Here's my messages.
Div class, labeled grid.
Do I have to use a labeled grid?
There's max length.
Wearable hats, put on hat.
Submit replying reply send message We don't love it but Because I do feel like if you just have the one It probably looks better to just have you know the one I
All right, so this is here.
Inbox messages.
This is here.
Refresh.
See, doesn't it look kind of weird to be like, here's my message.
It's off to the side.
Here's my create mod meal message.
You know what I mean?
Compose message.
That does help.
27:50And there's no spacing for the submit. And this one there is.
28:00Let's see. I'm going to side by side these. See, this is F submit. Form with models, new message, URL, new message, method post, locals, new message, replying.
...23Ahnzh how are you doing
Labeled grid.
The submit is outside of the labeled grid.
Now how does it end up with nicer spacing then?
Maybe it's in the actual like, do you think?
Ann says, how are you doing?
I'm doing well.
I'm working on lobsters.
Things are actually starting to like shape up into what I was looking for.
I've been working on the data layer and some of the like bare bones basics here.
So I'm really excited that this is starting to have an actual UI that's something I can interact with.
The part that I'm trying to work on is improving the section with messages.
I suppose I can just pick a random user and start messaging them.
Yeah, I can do that.
let's see.
Oh, hang on.
let me go back to my UI here.
Yeah.
Mod mails one.
let's see.
Who is this person?
You.
I will message you.
Two.
Subject.
JonSugar frowns are bad, so let’s all smile, I caught you live, it’s for sure been a while.
Old DM.
Feedback.
Hello, I'm a moderator, providing you with feedback.
John Sugar says, frowns are bad, so let's all smile.
I caught you live, it's for sure been a while.
Aw, what a lovely poem.
Your message has been sent.
Sent, okay.
30:13Hmm. I know this is scent. I feel like, hmm.
...42Okay, let's try this. Here is a second message. Your message has been sent.
...57Well, I don't necessarily love that. Where's the thread? There should be a thread in box.
31:16There should be a thread, don't you agree?
...26No, I'm confused.
...36RuggMatt nice to meet u confused, i'm matt
Yes, I'm confused.
Rugmat says, nice to meet you, Confused and Matt.
Lovely.
...50Like, these should be part of a thread. Don't y'all agree? Maybe? .. Yeah, that should be part of a thread, I think. Maybe. I feel like it should be. Keep us new. You do not have any private messages. Inbox. Like, there should be, like, a little bit of a... Okay, let me try this. Round two, sending three messages. Because maybe the first one is treated like a little bit... Oh no. No?
32:48I mean, somebody, hmm.
Let me, hmm.
Okay, let me try this.
Jedi_Megaman @RuggMatt i thought you were a rug, not a mat.... konbanHuh
Message.
All your invite privileges have been revoked.
Okay, so there's a couple of different messages.
RuggMatt @Jedi_Megaman what's the difference?
Let's see.
And Jedi Mega Man says, I thought you were a ruck, not a mat.
33:40This is confusing to me.
Let me try message index.
Jedi_Megaman @RuggMatt rug's gotta be fuzzy, mats can be non-fuzzy
Okay, if messages.any, you do not have any private messages, compose message, replying false.
34:12Hmm. Message.EachDoMessage. Oh, this is actually... Rugmat says, what is the difference between a rug and a mat? JediMegaMan says, a rug's gotta be fuzzy. Mats can be non-fuzzy. Yeah, I'll buy that one. Okay, so this is from to receive sent. Okay. Message notification read at checkbox tag delete message short ID... Message author, stylized hat, styled user's link. How long ago, Nable? You do not have any... Hmm. Replying false. And what is the difference between replying false and replying true?
35:09Is it just here?
Is that the only...
Ah, huh, yes.
That is, hmm.
Hmm.
JonSugar am I hallucinating or are you using a different theme?
I think we're gonna have to build some stuff of our own here.
We could try looking at the inbox.
Ah, inbox, inbox.
Unread.
No notifications to show.
John Sugar says, am I hallucinating or are you using a different theme?
Same theme.
Yeah, it's Horizon.
There's a lot more color over here.
Herb has identified multiple issues and errors in all of these.
133 of them, to be precise.
marcoroth_ I might be the Semantic Spinel theme from Ruby LSP
marcoroth_ it*
including this one attribute value should be quoted cell spacing quote always wrap attribute values in quotes marco ross says it might be the semantic spinel theme from ruby lsp no this is horizon let's see the yellow is different though
But I think the yellow does show up in my normal one.
Edwin Bepp, Redeemed Hydrate.
I'm gonna take a sip.
But these are all my colors.
Hmm.
Hmm.
37:13Let's try inbox.
Inbox HTML.
CodingWithCaleb might be a neat contrib to fix the errors and add CI for them
Message.
Div class equals message, voters, details, byline, message body.
Not particularly helpful.
If I go to my inbox, render partial messages sup nav.
Useful.
Let's see.
Coding with Caleb says might be a neat contribute to fix the errors and add CI for them.
Yes.
I think pushy X did talk about wanting to add, herb to CI, but, it would require.
He, he mentioned it at requiring adding JavaScript in some way, but I think that was actually quite a few months ago.
I think that was, that might be before the linter was actually released.
Because the Linter was a fairly recent release, right?
Let me think.
Possible flag warning, notifications present, comments, comment one notifications, messages, comment subtree, render message, message is unread, notification read at dot nil.
Oh no, I've disconnected again.
Did I disconnect and reconnect?
RuggMatt not fo rme
Okay, let's close that one.
38:49CodingWithCaleb Not sure, there were linters back when I was doing rails over a year ago, but this might be a different one
RuggMatt still streaming here
CodingWithCaleb Smooth sailing here
Rug mats is not for me.
Okay, so maybe it's just my chat connection.
Coding with Calypso is not sure.
There were linters back when I was doing reels over a year ago, but this might be a different one.
This is a new one, yes.
Comment subtree.
I don't think I'm actually looking for comments.
I think I'm looking for messages.
Message message is unread.
Notification dot notifiable.
When message.
Comment subtree.
Comment subtree.
Can I try a div with that?
39:38I'm gonna close this one I'm gonna open let's see this one yeah okay and then div class equals and you called it
Wait, what?
No, I had it a second ago.
I'm just going to guess.
Subtree.
If it doesn't do anything useful, I'll just assume that I did the wrong thing.
Three indent.
Come over here.
Hmm.
Didn't do anything useful.
Okay.
If I come over here and I look at unread messages.
I definitely don't want to do whatever this is.
I... Yeah, that one's...
I don't think that one's for us.
..
I kind of just want, like, a box.
It's killing me that I don't have, like...
RuggMatt tailwind!?
my little Bulma utility classes where I'd even take some Tailwind where I could just say like, hey, give me some extra spacing around this object.
41:21Ringmaster's Tailwind.
RuggMatt style="padding: 10px"
Yeah, I'd take some Tailwind.
Let me try this.
...34Tab.
CodingWithCaleb We could make a new stylesheet?
I don't know, we'll do like H3.
Compose message.
RuggMatt stream is stutttering
Slash.
Yeah.
Rugman says style padding 10px.
CodingWithCaleb @RuggMatt Not for me :thinking:
Oh, stream is stuttering.
No, I've done, I've made no changes.
Coding with Caleb says we can make a new style sheet.
I...
RuggMatt blame my internet then
I'm hesitating because I don't know what I'm actually supposed to do here.
Maybe H4.
42:17JonSugar stream is smooth for me
Nah, H3.
...27Dragmat says, blame my internet then. Coding with Caleb says not for me. And John Sugar says stream is smooth for me. Okay. I keep having these like, cause you remember when I had like the three streams where I kept running into issues and it was like killing me. I'm like, y'all are making me nervous.
...49This is obviously no use.
I don't actually have stuff here to display.
I don't have comments from people or messages, so it's kinda like, I don't really have a good way to be like, hey, give me a little extra cushion here.
JonSugar maybe the stream choked when you mentioned tailwind
Let's see.
I thought this div comments subtree was gonna do it, but it did not, so it's probably time for me to go look in inbox, HTML.
CodingWithCaleb I once did a stream for work where my computers hard drive had filled up. Turns out streaming & recording with a full hard drive causes lots of problems
and see what this actually was.
It was a class comment subtree on LI and then we have a render for message.
So let's make that an LI instead of a div and see if that maybe gives me a little more, a little more cushion.
Ah, John Sugar says, maybe the stream choked when you mentioned Tailwind.
It was shocked.
Absolutely stunned.
Coding with Caleb says, I once did a stream for work when my computer's hard drive has filled up.
Turns out streaming and recording with a full hard drive causes a lot of problems.
That, I've been having issues with space in general.
That might be what's happening here.
Okay, so that did not help.
That was not helpful in any way, shape, or form.
And it didn't give me the spacing I wanted.
Rude.
44:23How do we do this? Notifications filter should display case notification not notifiable. When comment, use this one. When message, use this one. Hmm. I mean, I am using a message, kind of. Part of the problem is that I can't see what this looks like.
...57No notifications to show. More link. Maybe I'll just send myself a message. I think that's what I'm gonna have to do. Because I feel like... Well, no, there is an UI for this yet.
45:19I need cushiony space. Where can I find cushiony space? I suppose I can just go rummage around in the style sheets. Applications. Lobsters doesn't use CSS features until the widely available baseline standard, but I make an unprincipled exception for has because it solves so many big problems. Common color schemes. Comments controls height. Body text area input button. Body. A. L. I. H1. H. That gives me a little bit of an idea. Here's my messages that each do message render my mail messages mail message. So I don't think this one actually helps me all that much. The H3 I think fix the spacing issue here. Although I hate this button.
46:30Let me open this form. This is my mail message. And we just put some text in here. Send message.
...49Did that work? No, you hated that. No comma.
47:00There we go. Okay, that's better. Still hate it, but better. Okay. Should I move this up above the messages? Maybe. Yeah, I think that's a better place for it. Here's mail, references, here's compose message, section. Ah, okay, no, I can't do that because this is in the mail. Okay. And this is in the show. Okay. Hmm.
...57My mail message, mail message, mail message.
Here's my message body.
What if I replace this with a P tag instead of a div?
P tag.
Ooh, what if I look into what linkified body does?
Oh, oh, okay.
That looks way better.
It's not great.
It's kind of ugly, but it does look better.
okay.
I'm going to check something really quick.
I'm going to check how the linkified thing works.
I'm going to look into message, our model there.
Cause if I remember correctly, we had like a linkified thing.
Okay.
Linkified body.
Okay.
Mark down our two HTML body as of created at perfect.
All right.
So we're going to do a three ink that, and then we'll go to my mail message and then we'll just come in here.
Oh, P P there we go.
And then what I can do is over here, I can make this linkified message.
Streamlabs Thank you for following piripy!
and let's make that linkified message message.
Lovely.
Thank you for following Piripi.
Welcome.
Okay.
refresh.
Okay.
let me try this.
I'm going to swap these back for divs.
50:04Refresh this.
Oh, interesting.
Did I save this?
I saved this.
piripy <3
I for sure saved this.
I for sure saved this.
Ah, making it a linkified body gave it some more spacing.
Okay.
Let me try something a little bit longer.
Okay, here we go.
Hello.
taniwha3 7 raiders from taniwha3 have joined!
Streamlabs taniwha3 just raided the channel with 7 viewers!
I've noticed some moderation concerns on the site.
It seems like y'all keep arguing whenever
Hey, Taniwa.
Hello and welcome.
Thank you so much for reading.
I have been trying something new lately, which is whenever somebody reads me, I bring them in on stream together, and then we can have a short little conversation about what you've been up to, what I've been up to, and what your post-stream routine is.
taniwha3 hello!!! i forgot to change my title from music to software
Are you interested in doing that?
Also, hello, Taniwa's readers.
Nice to meet you.
Today, what I'm doing is
Tony West says, hello, I forgot to change my title from music to software.
I see, so you work on music and software.
Oh yeah, yeah, yeah.
Okay, so today what I'm doing is I'm contributing to Lobsters.
taniwha3 was teaching networking. unfortunately not today, though! i need to run to a meeting cashme13CrySad but leaving my fam with you today!
Lobsters, which is lobster.rs, is basically a link aggregation site.
taniwha3 take care and have an amazing day
RuggMatt !so taniwha3
StreamElements Hey! It's taniwha3, they were just in Music. Short stream, newbie learning ableton maybe? at https://twitch.tv/taniwha3
And what it does is it has a really nice community around it, really good moderation tools, and it is focused primarily on programming.
GANit_ak Hello world! :)
Taniwa says, was teaching networking.
Unfortunately, not today though.
I need to run to a meeting, but leaving my fam with you today.
Take care and have an amazing day.
Bye, Taniwa.
Rugmat, thank you so much for shouting them out.
Gunny AK says, hello world.
Hi, nice to meet you.
I'm Jill Codes.
This is lobsters.
It's a very nice, like,
What's the word I'm looking for?
Like well-moderated, like thoughtful site that curates links of programming things.
And yeah, it's really cool.
It's really nice.
And today what we're doing is we're working on moderation.
So we're working on the ability for moderators to message users and for all moderators to be able to see those mod mail messages.
Okay, so let's see.
Hello, I've noticed some moderation concerns from the site.
It seems like y'all keep arguing whenever you...
encounter each other on the website.
So what I'm doing with this one is I'm trying to get a better idea of what it's going to look like if we have a little bit more text here, because I think some of the responses I've put in here thus far are pretty flippant.
So I'm going to kind of see if I like it with a longer format.
And Regmet has redeemed a stretch.
So let's do a stretch.
Let's do some hip marching.
So this exercise will strengthen hips and thighs and improve flexibility.
You wanna sit upright and do not lean on the back of the chair.
Hold the sides of the chair.
Lift your left leg with your knee bent as far as is comfortable.
Place your foot down with control.
Repeat with the opposite leg.
And you wanna do five lifts with each leg.
All right, you ready?
Let's do it together.
One, two,
three four five six seven eight nine ten hopefully you feel your hips and thighs have been strengthened all right let me poke around in this again okay so hello i've noticed some moderation concerns on the side it seems like y'all keep arguing whenever you encounter each other
in the comments and make a point of commenting on each other's stories i don't know if this is friendly or not but it sets a bad tone and
precedent for other users.
54:32Can you explain what's going on?
And let's see if we can sort this out.
So no one needs to be banned.
Send message.
Aw.
Oh, interesting.
Data too long for column message at row one.
Trilogy read row.
Hmm.
That feels like a fairly short message.
That, yeah, that feels like a fairly short message.
So that's not right.
Okay.
Streamlabs Thank you for following 0v3rl4p5!
Let me...
I've never seen that one before.
Data too long for column.
Trilogy.
Thank you for following, overlaps.
Welcome.
Yeah, there's a hard limit on how much data can be stored in a single row from MySQL table regardless of the number of columns for the individual column length.
Yes.
Well, how do I?
Interesting.
Oh, text, medium text or long text.
OK, so now I'm kind of wondering what size I ended up with.
I'm used to Postgres where normally you would get something fairly large if you change that.
Let's see.
It looks like here is where my changes are.
let's see we have my mail messages string message that feels like a fairly normal size i'm gonna try looking in here for message messages here we go
And let's try going to that one.
Okay, so there's that.
Oh, body size medium.
Interesting.
Interesting.
Size medium.
I've never seen this before in my life.
Is this like a MySQL thing instead of a Postgres thing?
Like, size medium.
Okay.
Let's look at the migration.
messages let's see and escape that i don't want to no i don't want to use this command p migrations messages i'll add hat message author nullable create my mail messages suggested tagging story text searching fix up messages
Rename column messages.
Yeah, that's not what I'm looking for.
I'm looking for body.
Command P migrate messages.
So have y'all seen this like size medium thing before?
Am I just like the only one that has never seen this before?
Let's see.
Let's try message.
Add hat, mod mail, remove.
Create active storage tables.
That doesn't feel right.
Nope, that doesn't feel right either.
Hmm.
All right, let's try this.
Message.
Hmm.
Hang on.
My, great.
yeah add oh i bet it's in another one okay create table messages hmm that feels like what it should be hmm
Let's try this.
Let me look at message again.
This is application model, belong to recipient, class user, user, user.
Is there anything in here that would change the attribute used?
No, and I know the table is messages.
Let's use regex.
And we'll just use dot star.
no, this is weird.
This is weird.
This is weird.
Theoretically at some point we should have had a migration that created messages.
I don't need to do this.
What I can do instead is look for size medium.
Yes, I can look at, that's the schema.
Text.
Size medium, add column, story text description, text size medium.
What is after title?
Okay.
Now I need to open my actual migration in order to do this.
Mod mail messages.
01:00:36RuggMatt :after title is like where to place the column in the actual db order
There we go.
And instead of a string, you're a change add column.
Okay.
So probably a text size medium.
T dot text message size medium.
No false.
Rungmat says after title is like where to place the column in the actual DB order.
Oh, huh, interesting.
Hmm.
Space.
Hmm.
Okay.
This feels right.
unfortunately what i need to do is i need to do a rollback okay rake db rollback it's like four colon four maybe
If it's not, this is gonna be real messed.
Let's see, I did mean roll back.
RuggMatt say goodbye to all your test messages
There's a way to roll back.
Ah, you can roll back a specific migration.
Or you can roll back a specific number of times.
Regmet says, say goodbye to all your test messages.
I'm fine with that.
Let me roll back a specific migration.
rollback specific migration let me spell that one active record migrations updating rolling back so i can do step equals three step equals three
01:02:54I could just roll back four. I'm fine with rolling back four. I like how we had the whole conversation about like one migration versus multiple migrations. And then when given the actual opportunity. Oh no. Oh, Warren heinous inline partial initialized found app view comments threads. Canis. Fascinating. You're using a multiple database application. To use dbrollback, you must run the namespace with a version. Available tasks are dbrollback primary, dbrollback cache, and dbrollback queue. Alright, so in this situation, I believe we want primary.
01:03:51Yay! There we go. By the way, it's really weird to me that I'm not putting like bundle exact before all of these. Okay, so that should work now. I'm glad we tested out like a much longer one. I also think that we should probably know how big a size medium is so that we can have a validate for the size. Message body should have it. Message model. validates body length within this. Yes. Yes. Yes. Perfect. close that one. Open this one. Close that one. Mod mail message at models. Feast. No! Yay. We don't need any of that. There we go. Should be under 8,192 characters. That feels good. Let's see. Sweet. There we go. New mod mail message. Hmm. That's not ideal. Good, you should not exist. There we go, new mod meal.
01:05:48We don't have the ability to add references yet. Yeah. We don't have the ability to add references yet.
01:06:13Okay. Please stop fighting. Create modmail. Modmail was successfully created. Message. So I don't have recipients here, and I would like that to work. So let's focus on that part next. I'm going to open up modmail.com. Yeah, my mail message is back. My mail spec. There we go. This spec was generated. Scaffold API is available. Let's delete all of that. So this is now mod slash mails. Valid attributes, add a hash of attributes valid for your model. Honestly, nothing should be enough. No, I think I need recipients probably. Do I need recipients? Theoretically. That's probably something I should validate, isn't it? Yeah. Let's look at migrate. Mod mail. Create mod mails. Subject. Remind mods at. Okay, so there's really nothing there except for the subject.
01:07:59And the subject isn't required.
It probably should be.
Let's see.
Subject.
Streamlabs Thank you for following DoncoTech!
Put another set of curly braces in there.
01:08:19Thank you for following Donkotech, welcome.
DoncoTech uuh comercial break still ongoing
Lead valid attributes.
...32DoncoTech ok im back
Subject, moderation males, subject.
Donkotech says, commercial break still ongoing.
Okay, I'm back.
Hi, welcome, thank you for following.
Yeah, I don't turn on, I don't do ad breaks.
DoncoTech yeah of course
That way, as soon as you get through the pre-roll ad, you can just stay and not have any ads.
Let's see.
Donkotex says, yeah, of course.
Yeah, I feel like a lot of people do like the ad breaks and stuff like that.
And I can see the argument for it, but.
Okay, let's do some curly braces in here.
01:09:24There we go. Get index, render successful response, modmail create valid attributes, get modmails URL, expect response to be successful. Maybe we just start with this one? Yeah, let's see if this even runs. Let's see. I'm wondering if the mod meals URL is correct. Because we did change. We did change that. I like this heinous inline partial initialized. That's not me though. That's comments threads. In comments comment dot html dot erb. and home and stories and lists detail.
01:10:27I am wondering where heinous inline partial came from though.
...36It doesn't sound like a Rails thing. Yeah, here it is. I knew it. Okay, do heinous inline partials replacement. Let's see. Do heinous inline partials. Let's see. Do underscore heinous inline partial replacement. Hmm. There it is. Run once at startup. Let's see. NS inline partials dot each do file name partial name Template didn't match an open and closing tag one per file. Well, that's interesting Are we stuck
01:11:44We're definitely not stuck on an IRB. It doesn't seem to be proceeding through the mod mail spec though, which is interesting. It could just be that it's taking a while to load, but I do think, let's see, that our spec is faster than this when I run the entire thing. I'm hesitant to like swap off just in case like it does work. But it has been a few minutes.
01:12:27And this create bang should fail if we have invalid attributes. Let's see. Hmm. Add assertions for updated state. Redirects to the mod mail. With invalid parameter.
...54Hmm. Okay.
01:13:00Gonna interrupt again to force quit. This is dumb and I don't expect this to work. that I'm gonna do bundle exec rspec and see if it changes anything. My guess is no. Let's see. Yeah, no, that didn't change anything. All right, let's try this. I'm gonna run one specific test. I've got bundle exec rspec, spec request mod meal spec. And I'm gonna run exclusively... Yeah, I'm gonna run exclusively 33 here.
01:14:00It definitely made it to run options. Which, if we look, did not output before. but it's also not doing much.
...30Let's see.
...37Yeah, that's not doing anything. That's a little alarming, actually. Yeah, that's not great. Especially because when we began this, I ran bundle exec rspec in general, and that actually didn't take too long to get started and start running. Yeah, see, it worked. Oh, that's weird. Okay, no, that's weird. And it's concerned about the controllers. Mod messages controller type routing. Okay, realistically, like a routing spec is entirely unnecessary. Yeah, so I'm gonna go ahead and delete those two routing specs. I'm not a big routing spec fan. I don't think it's particularly helpful. RM. spec routing rugmat redeemed cat attention time i don't have a cat oh i do have a cat
01:16:09RuggMatt would you look at CAT
All right, let's review what's complete and what's incomplete.
No, no, no, no, no.
Hi.
Rugmat says, would you look at cat?
Yeah.
Are you going to start showing up?
I moved the safe so that she can hop up on here in like a little two step.
So apparently you're just getting old, girl.
Apparently you're just getting old.
RuggMatt how old is ruby?
Okay, so let's talk about what's done and what's not done.
So what's done is we have a UI.
RuggMatt !ruby
We can create a mod meal.
RuggMatt !cats
If we have references and if we have recipients, then those references and recipients are displayed.
Things that are not done.
We do not send any sort of notification to the recipients.
We do not allow recipients to see these anywhere.
Like they have to know that they've got this message and like go to it.
I think the notification is going to be key too.
Rugmat says, how old is Ruby?
She was born in 2012.
Yeah.
So she's 13 now.
You're getting old.
You're 13.
And what I'm working on right now is making sure that I can add recipients through the UI.
References is kind of like waiting a minute.
Because if I can get recipients working, then we can probably go through and parse like
GANit_ak cuty kitty magicswordSeerlove
references because the references is polymorphic the recipients at least i know i'm working with a username i suppose i should raise an error if i attempt to add a recipient that is not an actual user candidate k says cute kitty yes all right
yeah so let's focus on what we're doing right now which is trying to get recipients up and working so that i can like save those and i think that's probably where i'm gonna call it is like if i can get recipients working that's probably where i'm gonna wrap this up all right let's go back to no i'm pushing all the wrong buttons
Okay.
So I've removed this spec routing, MonMail's routing spec.
I'm also going to remove this one, MonMail's messages routing spec.
01:19:08Cannot remove no such file or directory. That is probably because this is caps locked. Hmm. Okay. Let's try bundle exec again. Do you notice how much faster the bundle exec RSpec is? And it actually worked. Meanwhile, when I tried that, I just think it's really weird that when I tried doing a specific one, it choked, but it also did not tell me why it choked. All right, so here I'm rolling through and I'm running these. I'm actually going to tap out early and go back to this one. All right, so this opens my new form.
01:20:04I'm imagining this page, this new form that we're working on right now, modifying, like going through a lot of changes before we've got the actual solution to it.
I just want it to like kind of work right now.
I think we need notifications before it's MVP though.
Yeah.
And I think we did discover something important, which is that we needed to change the size for our message.
Hmm.
Streamlabs Thank you for following MrZ_091!
yeah thank you for following mr z091 welcome yeah it looks like it's choking again that's interesting i have not experienced this before
Yeah, where the entire test suite will run, but not one specific test.
I'm going to see if the entire test does run because I thought that deleting those two routing specs would fix that issue, but it looks like it did not.
So I'm just going to let this whole thing run through in the background where I kind of poke around with our controller here.
Now, the reason I wanted to get into that request spec is because we are about
gonna close all these because i have so many files that i'm dealing with right now we are looking at this mod meals controller and right now we're looking at create so i have this recipients theoretically we have this recipient username so we're splitting based on space
and passing that in and what i kind of want to see is if that works in any way shape or form it might even be looking at this it might be mod meal recipient usernames that might be what's happening here actually
yeah that might be what's happening here okay let me try this please stop fighting let me go back please stop fighting part two
Create Mod Meal.
Oh, okay, that was it, it works.
Okay, good.
Okay, huh, all right.
Now I need my references.
This is the part where it gets kind of tricky because again, we've got comments and we've got stories and we've got other types of objects.
While I would be willing to do a dropdown that's just straight up like every single recipient or every single user in the entire code base, I'm definitely not willing to do every story, tag, and comment.
I think that that would be too much.
That would definitely overwhelm things.
Let's look at how we identify a comment.
It's probably that short ID from earlier.
Let's compose a message here.
Hello, this is a message from your moderation team.
01:23:37I like this. We need to enter. We are concerned. about some of the fights and disagreements that we've seen on the site. It seems like both of y'all are commenting, are seeking at each other's stories. Each other's stories. to leave nasty comments and you argue every time you run into each other on the site. On the site. In the comments.
01:24:43What's happening here? And how do we resolve it? So neither of you get banned. This is why I'm not a moderator. Oh, it failed. Undefined method body for an instance of mod mail message. I don't have a body.
01:25:19Undefined method body for an instance of modmail message.
Yeah, I don't, I don't, I don't have a body.
Modmail message controller.
create.
lilsafbig hi
Message params.
Message message.
Where do you think this is being called?
Lil Saf Big says, hi.
Hi.
lilsafbig what are you working on?
Nice to meet you.
How are you?
hmm.
Undefined method for an instance of module message.
There's nobody here.
There's my message.
01:26:16Hmm.
...22create okay let's try this mod mail message model this is linkified message linkified that's me that's me screwing that up again all right let me hit back Let me send message. Yay. Oh, it worked. Okay. And it looks good. okay. no, we don't. And let's do grumpy face. Send message. Message is too short. Minimum is 20 characters. No. We don't fight. I don't even know this person.
01:27:31Send message.
...37I'm sorry. I'll ignore and report.
...57Report and ignore in the future.
Now we'll do sad face.
There we go.
That looks good.
Lil Saf Big says, what are you working on?
I'm working on a site called Lobsters.
It's a lobster.rs, basically what it is.
It's a very, like, friendly and welcoming site that aggregates programming links.
And you got a lot of votes and stuff like that on whether or not they are good links.
And, yeah.
It's very nice, very pleasant to read.
The comments are very nice.
lilsafbig oh cool
And right now what I'm working on is a way to make, ensure that that remains the case.
So I'm working on a mod mail option, which means the moderators will be able to have like a little conversation together.
And like all of the moderators will be able to see all of the messages and, reply to them.
LittleSafbake says, oh, cool.
Thanks.
I like it.
Today I'm working a lot on the UI for this.
So we've got recipients.
We've got messages.
lilsafbig never seen ruby code before
I think next what I need is references.
Streamlabs Thank you for following lilsafbig!
But I might tap out on references for today.
LilSapic says, I've never seen Ruby code before.
And thank you so much for following.
I like it.
It's pretty.
It's pleasant to work with.
And it's very nice.
I... Yeah, I'm tired.
It's been a long stream.
Today we had PushCX on, who's the maintainer of this.
And I think for now, I'm probably gonna like...
Commit this...
it's probably not draft PR ready, but I think I can at least generate.
Yeah.
I can at least take all this and sort it into like a kind of a thing.
GANit_ak thanks this is cool to do this on stream
Yeah.
Start breaking it down into some additional issues too.
All right.
Cause I'm tired.
Get an AK says, thanks.
This is cool to do this on stream.
yeah i like doing open source contributions i feel like you kind of have to do open source on on twitch because everybody can see it so it's not like it's not really closed source anymore if everybody can see it i don't know where i was going with that like i said pretty tired been doing this for a while but yeah i like doing it and it's fun all right so most of these are untracked files
Wow, that's a lot of untracked files.
GANit_ak helps people understand the context and point of view of the mods
All right, so I'm currently in an interactive ad and I wanna start thinking about which of these files I want to keep and which ones I do not.
Gennady K says, it helps people understand the context and point of view of the mods.
Yeah, and it shows a tool that I don't think we would normally be able to see.
All right.
So let's think about things that I want to keep.
I definitely want to keep my controller.
I don't really care about these helpers.
I don't even know if this is a common pattern here.
So I'm going to leave that out.
Five through eight.
I want to keep all of those.
One, two, five through eight.
Let's see.
I want to keep all of the views for now.
I think, one of the things that I talked about is removing destroy as an option.
And I think we are going to continue to do that.
So let's see nine through 20.
Yeah, I think I want nine through 20.
01:31:57and then let's see i want all of these migrations so that's 21 through 24. let's see i don't want the helper specs because i didn't take the helpers as far as the actual like specs go
I think I'm gonna want 27 and 30, but recipient and reference are both kind of like, they are models and typically I do put specs on all of my models, but these are like joy and table models.
So I don't know if we're going to need them yet.
So I'm gonna focus on 27 and 30.
We know for a fact that, let's see,
RuggMatt bless u
Ah, excuse me.
31 and 32 are not working.
01:33:05Because those are the R-spec ones that we're working on. Rugmat says, bless you. Thank you very much, Rugmat. So I'm gonna keep those. And then, yeah. I'm not gonna keep any of the view specs. I don't normally use those or keep those. Alright, so those are all the ones that I'm going to add. Get commit dash M. No, sorry, we're not there yet. Next, I need patch adding. So these are the changed ones. And the ones I wanna change here are two and three. I don't want the git ignore. That's gonna be my change to the credentials. But I do wanna go through and patch add my config dash slash routes in my DB schema. All right, so inside of moderation, I now have a resources mails and a resources mail messages. Yes, I want both of those. Yes, I want to change the date time here for my schema.
01:34:15Here are my mod mail messages. I can see I've got my size medium now, which was a bug that we just found a few minutes ago. And yes, I want all of these. Good. Here are my foreign keys. I'm going to take a look through these real quick. My ModMail messages. I want to be able to find those based on ModMail. Yep. My ModMail messages users. Yep. My ModMail recipients. Yep. My ModMail recipients. Yep. And my references should reference their ModMails. That all looks good to me. So I'm going to say yes to that. Sweet. And I'm going to queue for quit. Yay. git commit dash m first pass at modmail. I'm probably gonna end up going through here and making a bunch of changes, but let's at least get this up and in existence. Oh, author identity unknown. Darn. I thought I fixed this. Let's see. So one of the things that we did today is we set up the dev container.
01:35:47So let's do that one.
And so there's a chance that I haven't got my pass keys and everything else set up correctly yet.
There we go.
Okay.
Let's try that again.
Yay.
First pass at ModMail 28 files changed.
Let me go in here.
I'm going to do a get switch dash C and I'm going to call this the ModMail branch.
Yay.
Get push.
Get push set upstream origin ModMail.
I have it set up not to ask these things.
There we go.
Excellent, excellent.
That exists, it's running, and now I'm gonna roll credits, because I'm tired and I want a snack.
And we've been at this for a very long time now.
I want to say thank you to our new followers, LolSafBig, MrZ091, Donko Tech, Overlaps, and PiraPie.
Jedi_Megaman lidiavHello
I also want to say thank you to our moderators, Lips with a Straight Bar and Rugmat, for ensuring that our chat stays as friendly and lovely as the community over at Lobster's.
And I want to say thank you to Taniwa and CodeRushed for the raid.
Bye, Jedi Mega Man.
RuggMatt raid cassidoo?
Also, I have been forgetting, because apparently I'm completely new to this whole Twitch thing and I've never done it before, that I'm supposed to go get a raid when I queue up the credits.
And I forgot.
Rugmat says raid Cassidoo as you command.
marcoroth_ Thanks for the stream!
Alright, let's see.
Following.
There we go.
Jedi_Megaman yes yes, raid us to someone's stream
And Cassidoo.
And start raid.
Do-do-do-do.
Marco Ross says, thanks for the stream.
Thank you for dropping by and helping me debug things.
GANit_ak magicswordSeerClap databaesVIBE
Jenna Megaman says, yes, yes.
Rate us to someone's stream.
Yes, yes.
So pedestrian.
All right.
Well, thank you all so much for joining me.
I hope that you had a good time.
Bye, Gany.
RuggMatt thank u for streamining
Thank you for joining us and following.
All right.
I'm going to end the stream and send you off now.
Bye.
Oh, Ragmat says, thank you for streaming.
You're welcome.
I'll see y'all next week where we're going to continue this story and continue working on lobsters.
All right.
For real now.
Bye.