Once per site, in the way that marriage is that one special day

Streamed

Fixing up json logs by not having nice things, once again kludging a workaround for a Rails feature by crashing the site at boot. Talked a bit about story merging, but didn’t get to code.

scratch


topics:
x PR hats https://github.com/lobsters/lobsters/pull/1385
x punycode https://github.com/lobsters/lobsters/issues/932
x PR /tags https://github.com/lobsters/lobsters/pull/1384
x PR URL canonicalization https://github.com/lobsters/lobsters/pull/1383
  fixing logs
  story merging goals + UI



title:
  once per site, in the way that marriage is that one special day
  hopefully this is the last time I have to have a kludgly blow up your site at boot feature

post-stream:
  dig out the scheme hat you just rejected bc you forgot to deploy 1385
  turn off ALE sorbet integration
    

Transcripts are generated with whisperx, so they mistranscribe basically every username and technical term. They're OK but not great, advice appreciated.

Recording



01:32hejihyuuga BREAKING MY RAILS APP?!
hejihyuuga egads
hejihyuuga hey pushcx hope you're doing well
That's my job. frici so you do, you're choppy
hejihyuuga audio is clipping in and out
I've actually been testing a social media app called DressCrossPost for posting to Mastodon and

02:24frici also Ahoy pushcx and folks
hejihyuuga hey Frici how are you
frici I'm doing rather well today, hope you're good too :)
hejihyuuga :D
hejihyuuga audio better now
Good to see familiar faces. Welcome back. easeout cheers
For anybody joining for the first time, this is Lobster's office hours. So if you have any question about... Thanks, Hedgie. frici yay, we now have a properly audible pushcx :D
Lobster's the site, which is this, or Lobster's the code base, which is my other tab, or Lobster's the community, which is the general. Let's have a nice place to hang out and chat about things. That's what this stream is for. So feel free to pipe up any time with questions or comments or whatever else is useful. We also run queries against the production database for people who want to understand things or just hejihyuuga I have a (quick) site design question. Is there any reason why "Newest" and "Top" are part of the sub nav bar instead of the main nav bar?
are curious how many times the word the has been used in a story title or whatever pretty much anything that doesn't reveal personal info or create a worst of leaderboard is fair game for queries and then for code if nobody has questions about stuff site designs are any reason why newest and top yes hedgy the newest and so I don't think newest has ever been in the top. hejihyuuga ahhhh i see
And the real short answer is trying to keep things pretty reasonable on a phone display. Because this horizontal scrolling thing kicks in. Yeah. I would love to cram a lot more in the sidebar or in the top nav, but there just isn't a way to do that, really. Maybe it would make sense to do like a hamburger menu just to list some more of those top kind of things. I don't know. I don't have a strong design sense about that. But I kind of made these frici I was about to suggest that yeah, both cause of size constraints and because its intuitive to phone people these days
didn't put recent over here but they're kind of sections so like this is the if you will the home page or the stories section and so the home page active newest top they all share a sub nav although it's a little inconsistent because active recent and the front page are all here and i think the home page just doesn't show the sub nav yeah because we wanted to keep it simpler and then comments I think if you're logged in, there might be an added subnav. Where are we here? Drop on down. On about, I also used the subnav to put a bunch more of these, like chat, stats, hats. hejihyuuga i've always been curious, since I primarily browse by newest but the option is hidden in the subnav. Thank you!
Let's see, where was the issue about this?

05:44So there was an issue or a pull request where we talked through a whole bunch of this. I think it was this one.

...59pushcx https://github.com/lobsters/lob…
Yeah, so someone... So someone reported this bug 632. pushcx https://github.com/lobsters/lob…
And then... elsewhere okay i was thinking it might have been this one elsewhere we had this issue 580 and i'll share a link that so the way the the right side menu used to work well actually the way the top left menu used to just be inline, and then this was a float right, and if you got wide enough, and it got noticeably wider when you're logged in, because there's more menu items, this is, you know, you see this, and if you've done HTML and CSS for a while, you're like, ah, it's a float bug, because this is so characteristic of float bugs, of things kind of falling down a line like that. And dpk0 evening
hejihyuuga hey dpk0 !
I left a long comment here that basically there's a bunch of places where we have layout issues where these things are just too darn wide because there used to be a heading in here. Hey, DPK, good to see you. frici Hey dpk
And so to your question, Hedgie, when we had like this little page title up in the menu, every problem was exacerbated. Excuse me. not exasperated. That's how I feel when I debug CSS floats. dpk0 whomst among us has not been exasperated by CSS
And I switched this, you know, I kind of surveyed all of the places where we don't have well-linked pages and can better organize things. And then I think somewhere down here I linked, yeah. So if you keep scrolling down this giant issue, easeout why do we even have that cascade
I listed basically every route on the site. So all of our URLs and tried to group them into categories or record what their text is because a bunch of this stuff are unlinked. hejihyuuga @dpk0 i think that set is empty
Especially upvoted. This one. I've improved it. It ended up going into some of the sub nav, but people never find that we have this upvoted feature so that you can find stories and comments that are missing for you. jmiven hello
Well, you know, now that we have nesting modules or the CSS nesting module, yeah, the nests aren't the modules. Module is the name of the part of the spec. Maybe all of this can be better. But this was where I put CSS Grid on the site for the first time. And it was really the first time I've used CSS Grid in Angular. I've used it a little bit at work, like tweaking others, but I never did a design from the start. And we have a bunch of other layout issues that are all float related. that show up on the user profile and show up on forms. And so there's another issue open for using CSS Grid to clean up forms. But yeah, so here's the pull request. And you can see, I feel like this was almost maybe the first thread or issue where I was like, oh, I should take lots of screenshots because I'm going to wonder what this looked like and what I was thinking in a couple of years. And I want to say there was like a small, the scroll bar keeps going. I want to say there was a bug or two afterwards. But that's about it.

10:02I tried pretty hard to encourage people to look at this because when you change site UI drastically people tend to get pretty annoyed and frustrated that a familiar thing has changed so. In general, I try not to change site nav too much that's why the. I started talking a bunch in my run up on blue sky to this about. story emerging, because if I'm going to play with that UI at all, I don't want to shock people, or I want people to have a chance to weigh in. So I hope that's a useful answer to your question, Hedgie. If you have any more follow-ups, feel free.

...52hejihyuuga thank you so much, was a great answer
Anyway, Jamie Evan and DPK, good to see you both again.

11:02You're welcome. I try and give the history and the context and the thinking for these things because nothing here is magic. Nothing here is like we sent it to a focus group. It's we're figuring it all out together and there is always more to do. So if you want to get involved, I hope you see that there is no magic and your contributions would be very welcome. Speaking of welcome contributions, Colonel, who recently submitted their first pull request, I believe this is their second now. Yeah. And there was a, oh, yeah, so there was DPK's bug. I forgot that was you that filed this. nogweii Hello!
She requested a hat, and I approved it, and it got rejected, and she helped troubleshoot it a bunch, which is basically the controller verb was going wrong. And... Ah, hey, Nagwe. Oh, Nagwe, what was that? Can you find the link for that bug that you and I were just talking on this morning? If you could drop that in chat, we can talk about that some more, too.

12:35nogweii sure: https://github.com/lobsters/lob…
So let's take a look. Reverted update and destroy to approve and reject for clear intent. Excellent. There was a typo. Oh, there's always formatting. Oh, that'd be about the bug. Delete request doesn't make sense. It's just destroyed. That's fine. Thanks, Nogwe. Let me get that over in a tab here, and I will come back to that in a minute. All right, so this one was, I had reorganized the hats controller a little, or we had just tidied something up. This didn't happen on stream, but the approve and reject stuff, See, I've been talking about, you know, yassification and trying to lean into the Rails CRUD model, and here kernel has leaned away from that, which honestly, if it gets us working hat requests, I am happy to have. Yeah, so the issue here was the form was not submitting with the proper HTTP verb because Rails overlays its whole idea for RESTful stuff on it, which like a dozen years ago was a really promising idea, but the browser makers never kind of followed suit. And so the forms all still have like this extra hidden input field called underscore method to set the HTTP verb That's what this is doing. But it doesn't. It's really hard to get a form that posts to two different endpoints. nogweii there's talk about adding the extra HTTP verbs as valid values for <form> action
nogweii still talks tho
Honestly, the bug might have just been the typo there. But I'm happy to take the whole thing.

14:54Let's talk about adding the HTTP first. Nagui, do you have a, yeah, I mean, you say still talks. It's been a dozen years since Rails leaned into it, I want to say, maybe more. And I'm a little, I think it's a shame because it's a reasonably good idea. You know, we turn a little bit into that Steve Yeagey post of execution in the kingdom of nouns. I've mentioned that on stream before, but it's actually, really satisfying and predictable. Oh, kernel added tests. What a wonderful contributor. dpk0 there’s been discussion of supporting that in HTML for as long as i’ve been writing HTML, it feels like
Oh, and there's scenario tests, so they're just end-to-end. And I don't need the puts, but I can delete that myself. I don't want to wait on a round-trip review. Yeah. There's a couple of those artifacts in HTTP, like different verbs. Can I just cancel? OK. Can I respond to multiple lines and say I suggest just deleting them?

16:20I'm wondering if this is going to give me the good.

...36I don't really have the mental model for when I'm allowed to do that on PRs and when I'm not. But it's certainly handy when I can just make the little one line change. So these tests seem pretty reasonable. The reload is there because they don't know about let bang.

17:11So we're just going to remove that.

...25I wonder if we have some standard RB rule that's like, don't use let bang. And I'm just going to run straight into that, but we'll see. I don't love shared stuff between specs, even this simple, but

...46If we can just tweak this stuff on top. Why does this keep doing a full page reload? Okay. So if we visit the hat requests, we fill in with reason. Why is this a, why is reason, because we look for it later? All right, fine. I usually just repeat data like this in tests, but I don't have a strong style preference on it. Great, let's merge. This is so nice. If I didn't just break the build, let's merge. I suppose I should wait politely to see if the build is actually going to pass.

18:49is actually one i've got it off screen but there is one hat that is waiting on production where i talked to the person i had to so i burned through the hat request queue and i approved i don't know a dozen hats and all of them got rejected and i went and dug them out of the logs a database backup so that i could approve all of them and manually create the hats in prod and manually message all of those users who got the rejection message including daphne and then i had to i left this one alone because i had emailed the person saying i need you to demonstrate xyz to show me that wonderful that you actually are qualified for this hat because they gave like a link that didn't actually have their name on it and then in the time waiting on that email this has gotten that email came back and then this is solved and so it makes a really nice little production test case.

20:08And let's grab that.

...54pushcx https://github.com/lobsters/lob…
Great. What a nice fix. Oh, I didn't, for anybody who was curious to see the details, I meant to share the pull request link or, you know, at least the issue link. Okay. So now off stream, I have my personal browser and I am going to approve this. So if I click, oh, it helps. I was so happy to have this that I didn't stop and deploy before I clicked on that. Okay. Okay. I'm making more work for myself is what I'm doing. Damn it.

22:01Let's be nice about self-talk.

...13Clearly, the lesson here is don't get happy. dpk0 was that my hat or another Scheme hat? 🤔
I got so happy to have this bug fixed because it had been so frustrating and embarrassing to have all of these hats rejected and have to go back on them. that I made the mistake of being happy and wanting to immediately use it before I deployed it. dpk0 you already manually approved mine
dpk0 ah nice
No, it was somebody else for Scheme. And let me see if I have it in my local database. I should. And I'm looking at this off screen because if I pull it up on screen, it's going to have like their personal email address and other stuff so here's the the hat page to look at for a second where'd it go was it not scheme Huh, why is this not in my local? So there's dpk. And a whole bunch of...

23:53I must've done some local testing and blown this up locally. so i will have to get back to that yeah heading back it's not in cache that's that's so frustrating that i have to dig that out because it and i was saying as i ran down the hat request bug maybe a week or two ago that I guess I'm okay with the way that rejecting a hat request just deletes it out of the database in the same way that approving a hat request just deletes it out of the database, as opposed to doing a set a deleted at timestamp or set a rejected at slash approved at timestamp and leave them in the database. And I was like, no, this is fine. This is simple code. I'm not going to need this. And then immediately just drove straight into the ditch. Cool. That'll teach me.

25:07pushcx https://github.com/lobsters/lob…
So actually, since it's just a quick demo and it's a talk about a topic, let me kind of jump around to the conversation about domains. which is not another one about self-promo, but it is domain related. So there was a, where are we?

...40pushcx https://lobste.rs/s/h1dnzu/char…
Skimming to find the, oh yeah. There was this post about someone who is very frustrated about Unicode errors. related to their name and they took a bunch of screenshots of sites that complain that their name is invalid in various ways in various languages and as someone i have fewer issues but i have similar issues because i have a space in my family name yeah this one just keeps going And in the conversation, where are we? Somewhere down here. dpk0 the hyphen in my surname is rejected by some systems, which is bad enough
Someone pointed out that, unfortunately, lobsters also doesn't display his name correctly in the URL. Hyphen in your surname is rejected by some system, which is bad. frici Oh yeah the first time i saw your family name, my thought was... he must be having "fun" with name forms
Yeah, that one, they're usually, hyphen is like, if you get one character that they correctly recognize out of the Latin alphabet, outside of the alphabet, it'll be a dash. I have a old coworker who had the Irish name of O'Neill, like O apostrophe, and every site that was incompetent at SQL injection would be like, oh, you can't put a apostrophe in a name, you dirty hacker. frici yeah hyphenated first or surnames have that problem too as dpk just said
And he's like, dude, it's a classic family name from Ireland. There are millions of us, come on. So the, puny code for this domain is this XN dash dash this guy.

27:44Yeah. The, it's kind of funny as a database nerd and a programmer to just have a name that constantly messes up databases. Well, let me put that differently. to have a name that databases and different services constantly fail to accommodate. And the only time it's been really frustrating is one of the credit report services here in the United States. I believe it was, I don't remember which, so I'm not gonna guess at which of the two it was. Oh, actually I can see it, because I put it in my notes, didn't I?

28:36phdhorrible the joys of living somewhere with a unicode name
dpk0 hahahaha
it was Equifax where I had to call to freeze my credit and they asked me what my last name was and so I told them it's Bot Harkins and the guy told me back that it was Bot Harkins without a space so that you can be correct the next time you called and I don't know I was in a little bit of a mood but usually I don't get too frustrated by their mistakes but having This credit agency that I never want to deal with in the first place tried to explain to me that I was wrong about my own family name was pretty frustrating. And anyways, yeah. pushcx https://www.kalzumeus.com/2010/…
dpk0 GDPR right to data correction moment, if you were in Europe
There's also that classic Patio 11 blog post, falsehoods programmers believe about names. oh yeah no i'm in the us we don't get rights ah political sorry i'm just i'm so frustrated i was just dealing just before this with a a credit card company that was punishing me with bureaucracy so i actually came on the stream pretty frustrated the This is a really nice post because it takes something that people feel like they have a pretty good feel for names and points out assumptions, especially cultural assumptions they're making. And I believe that Mackenzie just kind of dashed this off based on his personal experiences as someone with a American or American Irish name living in Japan where his name is getting translated into a non Latin alphabet and he especially has had to deal with issues where. His name gets transliterated in different ways. it's funny it's some of that is cultural so he went and lived in Japan for years and. Japan is, if I can paint with a broad brush, a very process oriented, I don't know, almost fastidious culture about a lot of like paperwork and process and government rules. And even if that's, you know, not what actually happens in reality, that is what is thought to happen. And so the way his name would get transliterated into different symbols by different organizations became a source of friction for him because when he went to a like bank A versus credit card company B, both of them would have their own canonicalization rules they wanted to impose and then be frustrated that the other entity did not canonicalize in the exact same way. And so now you have two pieces of paperwork that don't match. And so he had a bunch of friction there. And I've gone to India a bunch, not, you know, lived there 20 years like Mackenzie did in Japan, but I've gone to dpk0 i was about to say, ‘several’ is a bit of an understatement
india a bunch and they have several character sets and several writing systems and several languages to humorously understate it but the culture is very different and so absolutely everyone is very familiar with the kinds of errors that come up with getting your name transliterated into different character sets and i obviously am not from karnataka i am not a native kanada speaker I mean, you know, I show people with documents and they look at my face and they're like, you're not from around here. And so absolutely no one cares and the process doesn't care that your name is transliterated the exact same way multiple times. So it's just, it's very funny the way different systems and different cultural norms fail in such different ways. Yeah, several is... Several is an understatement. I mean, like, Kanada is the 20th most popular language in the world, and unless you're from South India, you've probably never heard of it. That's... I am not saying Canada with a weird accent. I am saying... There you go, Firefox. I am saying Kanada. K-A-N-N-A-D-A. dpk0 John Cowan explained it to me that a language having its own unique script is considered the sign of having a ‘real’ language and not just a dialect of some other Indic or Dravidian language
really is a lovely script i'm so bad at reading it ah we're not gonna get into language nerdery anyways neat language oh well all right maybe we can get into it i think that's a pretty useful bar one of the slightly funny things about it is it's under the script is under active development in a way that is very surprising to me as a westerner where like the letter z does not change the way that people write letters has not changed much in a couple of centuries and so if you where is it i swore it was on the page but basically In the alphabet, let's look in the writing system. Yeah, in the writing system, a bunch of the characters have been deprecated. And in the last couple of decades. And so my spouse is like, what do you mean this letter is gone? it's an interesting complication to realize oh the letters of your alphabet may change out from under you over the course of you know 20 years which is not a long time as computer systems go anymore it is very possible to work on a computer system that supports the alphabet and supports the language and to have to come back 10 or 15 years later and be like yeah by the way we no longer use that letter or A bunch of them are, I'm forgetting the grammar term, but it's when two letters together act as one sound. dpk0 (digraph)
So maybe the canonical example in English is th, where if you look at a word like the, it is not th, it is the, it is its own phoneme, digraph. Is it a digraph? I thought that was, yeah, actually, I think it is a digraph. I think you're right. It's been so long since I've studied that I don't remember these very well. The grammatical terms, I mean. And, oh, they don't even mention the deleted letters. Oh, here we go. pushcx https://en.wikipedia.org/wiki/K…
chamlis_ can you automatically convert text to remove the deprecated characters or is it more complicated than that?
Obsolete connotative letters. So for anybody curious. So a chunk of what's happening is I think just changing decisions around digraphs. Can you automatically convert text to remove deprecated characters or is it more complicated? I don't know. I will just leave you with the Wikipedia on that one. Because I am not really qualified to have an example. This is...

36:57yeah part of the reason i don't have an opinion is i'm kind of illiterate in india and the other part of the reason is i honestly because i didn't grow up speaking the language i have a really hard time hearing the difference between some of these letters and it is really funny like i've mentioned how much i love having the the cross-cultural the pile of nephews and nieces and cousins that kind of stampedes around at any family function i like that that's a human universal it also means that i have four-year-olds correcting my pronunciation who are like it's not anna it's anna and i'm like you just said the same word twice and they're like no it's not anna it's anna and i'm like i literally I had to practice that one to hear the difference.

38:06dpk0 there are still two different variants of Devanagari. although most modern editions i’ve seen use Mumbai forms, even Sanskrit readers for learners from 100 years ago use the Kolkata forms now considered ‘older’
So where this comes back to lobsters, because I swear it does, we've wandered a little, is we canonicalize URLs to their puny code version. This was part of why I thought that dpk0 not Dravidian, but i can read Sanskrit (slowly)
urls couldn't include non-ascii characters at all ah dpk it sounds like you know a lot more than me do you speak any dravidic languages or indic languages in general or is it just you know like you went down the Wikipedia rabbit hole for a while. dpk0 i’m an historical linguist by education
Ah, nice.

39:07Oh, I had no idea. That's fun. Yeah, just for funsies, when I was in college, I got really curious about where writing came from, because it's, you know, kind of a nice technology. And I learned some... Akkadian cuneiform. Not enough that I could really read it without a dictionary in one hand, but I mean, for anything but the hundred most common words. And just kind of fun to learn a language where you don't even know the alphabet.

...53dpk0 ooh, i don’t know Akkadian. my specialism is Indo-European, so we did Old Persian
And so if you want lobsters to support other alphabets a little bit nicer, there is this issue available. 32 indo-european old persian oh neat i don't know anything about persian languages so there's been some discussion of how we could implement these things which could be as simple as improving the display and i think that actually gets us most of the functionality and Where Nagwe came into it, thank you, was knowing that there was this library available for handling homographs, because there's lots of letters that look alike in Unicode, because Unicode is enormous. You don't want someone submitting, I don't know, google.com with a O from Cyrillic or Old Persian. Because I assume it has an O-shaped character that's pretty... Like, a round circle shows up in a lot of writing systems.

41:08Especially if that page is going to land you at a login page. So I'm not super worried we're going to see homograph attacks. Lobsters is not a great fishing vector. But it would be nice to be thorough about it. dpk0 it’s my understanding that OPer cuneiform looks like other cuneiforms, but if there is any relation it’s more like the relationship of Cherokee script to Latin script, where someone looked at other cuneiforms and went ‘oh, that’s how writing works’ and designed their own vaguely similar-looking script which has no actual similarities in terms of appearance to sound correspondence
So if anybody looked at this and went, boy, I wish we were better for this author. We could be, you could do it. I would love it. It's your understanding that cuneiform looks.

...48Oh, that's pretty neat. Yeah. There seems to be a bunch of that in, in old scripts where people just kind of get the idea of writing and are just like, oh, hey, that's great. Let's run with that. That's pretty neat to see. Yeah, it was one of those things where I got really into it for like a semester and a half. And then I had the books still and I kind of lugged them around for a decade. And then I had a really funny moment because I was like, all right, fine. I finally have to clean these things out of my library it's just like a foot of bookshelf space that i could have back they're lovely books and they're interesting but i'm never gonna get back into this and so i listed them on i think amazon has a way to list secondhand books and all of them were small print run academic books and they all immediately sold for like two to ten times what i paid for them So it was weird. I think it's like Lego sets where the volume is so low that if you get one of these and then hang on to it for a minute, somebody really wants it five or ten years from now. I understand there are Lego speculators who go pretty hard into collecting Lego for later resale. I'm telling you, the real money is in niche academic tomes.

43:35dpk0 i can understand that … there are definitely some out of print academic books i’d take if i saw one for a reasonable price on sale somewhere
I hope no one is tuning into this for business tips. Yeah, one of them, I want to say one of them by the guy who owns, I think it's cuneiform.org? Oh no, that's sad. There was someone, he was like cuneiform.com maybe?

44:12Okay, this is actually promising because I don't remember it being. This is one of those parkdomain.earthlink.biz. You're breaking my heart.

...26From like the late 90s, there was one guy who had a site about cuneiform. And it looked exactly like you're imagining with cuneiform in the Bible. That's definitely not the site I'm thinking of. All right. I don't want to shuffle around for this cuneiform.net. I would have sworn it was .org, but it's sure not cuneiform in the Bible. whatever this is is definitely not it it was like one it was one of those classic old websites where it had like no css and it was one grumpy guy's take on the topic and just an incredible deep dive and he had a fact that was like no i won't translate your name into cuneiform the idea of translating a name doesn't even make sense leave me alone and he had written just a gigantic book it was like the pages were u.s letter sized so pretty close to a4 size and it was i don't know an inch inch and a half thick and hard cover and i want to say that one sold for like 450 bucks and i was like whoa this is this is a lot and i ended up like searching the the recipient their shipping name and info just to make sure that it was a real person with a real place and i like called the office they were having it delivered to and the secretary was like oh yeah we know alice she gets all these weird ass books all the time and i was like all right this is legit all right so we have the slash tags page on lobsters that is pretty unchanged since the site started. The biggest change was I added this idea of categories. And when I added it, I specifically wrote in the meta, like, let's not try and ontologically categorize all of computing or the world. Let's just kind of lump things into rough categories so this page is a little bit more readable. But then once it existed, there was the opportunity to say, hey, let's add some more data to it. And I just kind of threw this February 22nd. Oh, I thought I put this in the issue tracker years ago when I last touched slash tags. I'm a little surprised it's only February. In any case, on 36,123, who is a wonderful and beautiful first time contributor, who surely is 10 feet tall and kind to small animals, has decided to take it on. So I wanted to review what this code was and check it out. Honestly, almost anything we could add to the tags page is probably worth adding. So we'll see how we go. so they said let's eager load the categories we are already loading them i don't understand what it means to order the categories by their oh i see they're doing one load okay and then filtering out What did this... What changed? Is this a white space?

48:40Yes. Okay. The white space got re-indented or something. I don't know what's different there. I don't really care. And so then they... count up various stats at least just some high level numbers that's kind of nice and then oh this is a i may have to make a css class for this because i think they're just using this byline class to get a slightly smaller font and i would prefer to keep that a little more semantic even if it's as simple as tweaking this to have another name and then editing the selector to say, you know, dot byline comma dot new class name. So let's take a look at this. I want to see what this looks like locally.

49:49Oh, I am previewing the new merge experience. So the new This seems very GitHub, why did you think I wonder if this is something about their branch name. I think their branch name includes the hash sign. I didn't know you could do that.

51:03That's a, they must use some different GY tooling than I do. Has anybody seen this where I actually wouldn't have thought that you could include a hash in a branch name now that I look at it?

...30And everything is going to say, The commit hash, which is a different concept.

...43Dealing with special characters. I had no idea Git was permissive about allowing characters and branch and tag names. You can even use slash? What?

52:07nogweii I feel like the remote ref name is simply wrong
Well, whatever this quoting is, it doesn't actually want to work.

...33dpk0 is that first git pull incantation actually correct?
dpk0 yeah
I feel like the remote run of fame is simply wrong. Is that first Git pullout and connotation actually correct? Let's look. That's the other.

...47Yeah, I think they actually named it. Because here it inserts a hash in both the URL and, I mean, there's no way this URL works, right? No. What's the hex value for a hash? 23? Oh, it did get encoded. It just wasn't displayed encoded when I was highlighting it. Okay, so it shows the branch. So no, they definitely named their branch with the hash there. I wonder if they maybe created it on GitHub. nogweii do you need to pull that branch over HTTPS, using the Ryzen114 repo rather than over SSH from the upstream repo?
There's any kind of... Let's try...

54:08No, this is just someone who's confused about which branch.

...18These are not really relevant. Do you need to pull it over HTTPS using their... I don't... I suppose I don't care how I pull it.

...39So wait, so if I said this, I'm going to get the same thing. I don't think that's meaningfully different, but you're saying pull it directly from Ryzen's repo, right?

55:07nogweii indeed, from their repo directly
all right let's try that so let's git pull and then grab that and bring my now stop that git

...34dpk0 try adding his fork as a remote and … oh, fixed
so if it were so what if i add just dot get on the end so the style for https is a little different here so this looks like if i said lobsters.get like that whoa nagwe good call huh i wonder if that's a a bug in GitHub. It's just weird enough. All right. So let's take a look at what this looks like locally.

56:32Oh, that's a lot of data.

...47nogweii style wise, that's a lot of visual noise :/
It is nice to add, but it's so visually dense that I almost can't read these blurbs anymore. I wonder if we could right align this without too much pain. Because these are inline. Or just make this whole thing a table. I mean, I know how to lay out a page in table tags. dpk0 CSS doesn’t have \hfill
I was there when the web was young.

57:29nogweii do we even need to show comments on stories with a tag?
CSS doesn't have backslash H fill, no, but it does have ways to do that with.

...38You know, in a way, none of this needs to be shown, but it is kind of neat, actually. I think comments is an interesting thing to include. Although I guess maybe comments per story is more interesting to me, but maybe I'm a little bit zoomed out.

58:06Oh, yeah, this plays real badly with there's a handful of topics that have a hotness mod on them.

...19Wrapping on to two lines is especially painful. You know, we were speaking of what things look like on mobile for the header. Yeah, that's a real wall of text.

...55nogweii embrace the multiline?
Yeah, the code is fine, but the design is a little overwhelming.

59:09Embrace the multi-line? Could be. So if I took, where is it?

...36I put a BR in front of here. That's taking a weird amount of time to load. Oh, it's that darn dev issue with caching. Pay no attention to the cache filling behind the curtain. Every once in a while in dev, a page load takes like 60 seconds. God, I got to fix that one for streams.

01:00:33dpk0 do you even want to show absolute numbers or just, say, the relative popularity of the tag? i hate to suggest a tag cloud but some similar kind of visualization (maybe like how the Lobsters logo changes colour depending on server load)
Good questions, dpk. You know, if we redid this as a table, clickable headers to sort would be pretty trivial. That's less noisy. Not great. Yeah.

01:01:11nogweii better but... yeah....
When I filed this, which one? I was trying to be deliberately vague and open-ended of, hey, there's lots of things we could do. And I feel like I got the exact stuff I listed rather than kind of playing with it. designing with it. I try and put some tasks in the issue tracker that are a little more design shaped in the hopes that somebody who is a designer would like to practice or contribute. This feels a lot like I talked about programmer visual design. Because it's when I as a programmer come up with design, is it technically has the right stuff but you don't look at it and go like ah yeah i understand what's going on on this page and these are there's so much info i almost wonder if it could be a separate thing i'm running up against my limits of not being a designer and trying to think of what even to add All right, so if I've reverted that, let me take a screenshot because that was the one thing that was missing from this.

01:03:40jmiven maybe those stats can be shown on each tag page (e.g. https://lobste.rs/t/security)
dpk0 https://lobste.rs/filters already has numbers in a table
jmiven but then you can't compare easily of course...
dpk0 no count of comment, but of stories and nr of people filtering
Don't quit.

01:04:05And the gate and file picker. No, you don't mean it. What is J 25th?

...21Okay. That's the screenshot making sure I'm attaching the right screenshot.

...38nogweii interesting, turning that page into a combo read-or-write page might work out @dpk0
Turn the page into a combo read or write page. Oh, you're saying slash filters.

...55All right, so I'm behind on discussion because I was writing. Hold on, let's pull those in. Yeah, you're right, DPK, the Basic numbers are here already. And I guess that's why this is in a table. And then here, there are no numbers.

01:05:47Thank you.

01:06:33Let's make this a link.

01:07:19nogweii sure!
Now, could you say what you mean by read or write? I don't totally follow that.

01:08:38I'm going to grab Jay Miven's contribution here.

01:09:02Jay Miven. I'm just assuming jmiven that you have the same username on GitHub, but let me know if you don't.

...14jmiven I do!
Are you dpk or dpk? Okay, dpk without and then jmiven? okay great then i can thank you both so not with a zero

01:10:26nogweii I mean merging the two pages together, basically. Hide the "Hide" column from logged out users, making it functionally & design-wise read-only. For logged in users, the page would be both a way to get those stats but also continue its hiding functionality.
Oh, have the hide column from logged out users making it. nogweii Yeah
So basically folding slash filters into the tags page.

...43Yeah, it's worth noting, actually. So I pulled up the production slash filters page. This works. nogweii Ohhhh right.
Since you are not logged in your filters will be stored in a long lasting browser cookie so. This was a really clever feature that. JCS added originally that if I wanted to I could check any of these and hide them, even without having to be logged in. and I do agree with your overall point that this could probably just be folded into slash tags. I mean, it would certainly improve discoverability of filters, which people don't find as often as they could.

01:11:50I mean, if we merged the two, I would pretty much just want to close this issue because this is dense enough.

01:12:14nogweii 'tis just a suggestion.
Yeah, it is just a suggestion. I'm kind of chewing on it. All of this is trade-offs where What do we want to do with the page and slash tags is nice enough. But boy, is there a lot of overlap between these two pages and filtered already has some of this core data plus a feature that is underutilized. So it's kind of automatically tempting to fold the two into each other in some way. Yeah, I don't know. It's not something I want to, you know, I don't feel so confident in it that I would file it as a feature request, but that's worth chewing on. And does, so does slash tags. Yeah, it does include a link to filter.

01:14:10I feel pretty bad. That's for this potential contributor who may feel like they wasted a bunch of time trying to add this stuff. Alm, if you are present, sorry about that. I'm not sure how much more I can say of that on the poll request or on the issue.

...45Sparklines, plural.

01:16:13Yeah, I don't know. Oh, I didn't even tag this one as good first issue because I assumed someone would have to be fairly familiar with the community to want to take it and to think of interesting stuff to do. Anyway. I am 0 for 2 on pull requests today of, you know, not deploying the one before I tried to use it and then maybe wasting a contributor's time. Maybe that is a good point to kind of do our station bumper, station ID. This is office hours for lobsters. If you have questions or want to talk about issues in the site, the community, the code base, we can jump into that. When people don't have stuff they want to talk about I work through the pull requests and the issues and then, when we don't have those I mean I just directly start breaking things I don't even need help.

01:17:28hmm.

01:18:07mcollardx Lobsters has an article on Theory-building and why employee churn is lethal to software companies practices baldurbjarnason.com ... Can you discuss your thoughts on the same?
my thoughts on that article oh i saw that go by and kind of skimmed it for topicality but i don't i didn't read it closely enough to have an opinion on it i did so for topicality if that's what you're asking for i looked at it and where'd it go yeah

...43so the i clicked into it because when something mentions employee churn i always wonder if it's going to be more about management and you know how to be a boss an em rather than how to write code and this was kind of right on the line of it but then it was also about

01:19:19how code is a product of a team. And I thought this was a useful presentation for, in a management context, I would call them ICs, individual contributors, but just developers in a human context.

...40Skimming this, I'm a little surprised to not see a mention of Conway's law.

...49I hope the discussion stayed roughly on topic.

01:20:03Yeah, it looks like we got a good discussion out of it. mcollardx yarrBrainChamp yarrBrainChamp yarrBrainChamp yarrBrainChamp
So mcollard, welcome to the stream. mcollardx Always.
Does that answer your question? mcollardx Thank you.
mcollardx Can you explain "topicality" and ...
I don't think it's super useful for folks time for me to like, I don't know what that emoji means. mcollardx That's a brain.
Yar brain champ. Yeah, this is Twitch culture. I have no idea what that means. Oh, it's a brain. Okay. I hope the implication of four brains is that I said something smart as opposed to I should get four brains. pushcx https://lobste.rs/about#topical…
mcollardx You already have four brains.
So when I say topicality, I'm referring to this definition of what belongs on the site and what doesn't. So I was answering you from a context of really our north star like all of this everything on the about page all the code base is do we have a functional community where people can where they think it's worth their time to contribute where they are sharing stuff and creating new stuff out of that conversation whether that's making connections to collaborate on projects whether that's sharing clever links whether that's explaining stuff to each other there's a big chunk of how i moderate that is making sure that people feel the psychological safety to ask questions because to ask a question you have to feel like you're not going to get made fun of for not already knowing the answer right that was a big if we dug back in a meta conversation before i was the admin i left a big comment about that particular aspect on easeout I've been spending time on IRC lately and forgot how bad that can be.
proposition of adding the unkind flag and i think it's been good for lobsters culture but then also there's stuff that's close to our topic that's really tempting in a bunch of ways so like management is tempting because we have Almost everybody on the site is a professional programmer or an aspiring professional programmer. Or, you know, some of us are just unprofessional programmers. But when basically everybody has a boss, it's really tempting to have stories on the site that are people griping about their bosses. Or if someone is an active Hacker News user where How to be a good EM is a totally topical story, but it's a very hard competition to get to the front page there. It is tempting to look at lobsters and say, oh, it's like Hacker News, but I can be on the homepage and link my management blog. So that's why management is explicitly listed as off topic is both, we have threads where people just kind of gripe about their job that are not the thing the site is about. or we get used for content marketing, which again is the thing the site is not about.

01:23:36mcollardx Do you ever notice you're so smart people don't understand a word you say?
nogweii wat
So I hope that's a useful answer.

...42Hmm, that is not a problem I have actually, no. People do not often... Tell me that and, in fact, when I moderate stuff and remove management actually people kind of question the opposite, do you know what you're doing.

01:24:07So.

...13How is this pull request oh okay I was gonna say how is this just one or two lines. mcollardx People will always doubt. This is a variation on ... what's the law where people thing they know more than they do...
And so we're saying, let's update the URL with what is coming back from the server, because the server already sends it. I'm a little surprised. So that's going to be over in Stories Controller. mcollardx Yea
I think the law where people think they know more than they do is that the Dunning-Kruger effect. where it's hard to judge how much you know about a topic if you really don't know anything about a topic. And so the most confident tend to be the least informed. So fetch URL attributes. Oh, this goes right down the rabbit hole into sponge, yeah.

01:25:14So the name of that so it's fetched attributes remember that.

...24Anyway, the colored I appreciate your compliments, but a big chunk of the my purpose with this stream is to make sure that folks don't put me on a pedestal and. realize like you could just watch me make typos and struggle through stuff and. mcollardx An observation of fac.t
fail to remember code I wrote a couple of weeks ago, or hassle around with different database designs, there's not a lot of magic in lobsters. dpk0 (stream motto: if it’s worth doing, it’s worth doing badly)
mcollardx Peak apprehension is relative.
The magic is people deciding it's worth their time to contribute to a community, which is their evaluation. So, ah, yeah, dpk, thank you for reminding me the stream model there. So we do

01:26:19I think this pull request is bugged. And I say that with the full knowledge that the last three times on stream that I have said I think a pull request is bugged, I was wrong.

...34So this fetched... Oh, okay. All right. So I didn't follow it all the way. So the fetched attributes does set up a reasonable default, and then it calls that fetched attributes HTML conditionally. I was thinking it was just a straight delegate method, and so maybe URL wasn't even going to be present. All right. So as long as there is a default URL, and then we set it if we have a canonical that would actually help sometimes. Let's jump back to master.

01:27:25Get back in sync with the remote. So I've been... So a thing that's happening here is what Yawaramin, yes, is Looking at is when you are submitting a story and you focus out of the URL field or you click the fetch title button we try to grab the title off of the html for the page. and We do stub that in so a thing that happens is. People often have, a page can have a canonical URL in it. Where is it? So if you have a meta tag, that is a link with the rel canonical, it is supposed to be like a permalink. And I say supposed to be, I don't have stats on this, but maybe once every, two years it's less common now there was some blog template that had it wrong and it was fairly popular on github pages but it's been corrected upstream now it's supposed to be there so that if you publish your blog at multiple urls one of them gets considered authoritative one of them is canonical one of them should get all of the seo and should be used for permalinks. And I think this feature came out of WordPress, which presents every blog at like 19 different URLs. And for a bunch of SEO reasons and just general organization, it's nice to consider one of them authoritative or best or canonical. nogweii huh, technically lobsters should honor a `Link: https://example.com;rel=canonical` HTTP header. Wonder how often that header is ever sent, though.
and so we use this if we have one but the hassle is this if it's not the domain root path is getting at a bug we see all of the time that somebody writes a blog Nagoya I have no idea I didn't know that was a feature so very often I have very often less often nowadays but we used to regularly see nogweii <link> is just a substitute for the HTTP header
links get submitted and they would have a link rel equals canonical in their header and it would just point at the blog root and i think what was happening there was people were making templates and then if you read link rel equals canonical and then it's just slash in the header of your blog template you may not realize that you're supposed to fill in nogweii Wasn't this a thing Google pushed as well?
something there it just looks like oh canonically this is on this blog and so people would publish blogs where all of their links would go to the home page of the blog and i think we see so much less of it because i added this check that says yeah it probably was google it's one of those things where If Google says something is good for SEO people want to do it and it's just automatically a standard. I don't know the actual story of the implementation of rel equals canonical though.

01:31:46So anyways, I wanted to dig down into this code because we do use a canonical URL if one is available.

01:32:00Let's see, there's another mention here somewhere.

...19nogweii from MDN: "Valid for <link>, it defines the preferred URL for the current document, which helps search engines reduce duplicate content."
Ah, thanks, Nagwe. If you want to throw a link to that MDN article, that would probably be useful for people as opposed to me rambling and trying to remember when it was introduced. So we do try to use those just to avoid having duplicate URLs, especially with WordPress blogs. However, when they're bad in the header, we have to fix them. I think this is fine. so we do them we replace the canonical url and i'm not immediately turning it up in the code there which is a little annoying and so sometimes we have had things where a story is submitted with a blog title then the link gets replaced with a canonical link to the blog's home page and then the submitter is like what i swear i pasted the link right or oh i must have accidentally grabbed only part of it and it was no this feature your blog has a bad header and told us a fib about the url and we believed you and i noticed that the error was this was a while ago i noticed that the error was nogweii rel=canonical was standardized with RFC 6596: https://www.rfc-editor.org/rfc/…
like always that it pointed at the homepage. And so I added that code and it solved darn near all of them. I can't remember the last time we had one of these. I thought I added that function. Come here. So 769, oh no, this is like a stolen valor thing. So this is the pull request. All right, maybe I just wrote up the issue. Yeah, I think I just figured it out and I am totally misremembering and stepping on this contributor Mark Billy named Yassy. Whoops. I am sorry, Mark. Yeah, I didn't write this code. Oh, gosh. I figured out what this bug was and what the pattern was. Oh, man. Usually I'm pretty good at remembering code that I've written. Dang. That's embarrassing. Man. mcollardx lol
So anyways, mcollard, if you're there, see, you can just hang out on stream and watch me make mistakes for hours. I have made one significant mistake for each of these pull requests that we've looked at. mcollardx I'm coding C++ and making my fair share of mistakes.
And we're only a ways in. All right. So with that said, let's make another error. Oh, yeah, C++. That's a rough one. Especially when it's very easy for errors in C++ to show up very far from where the actual bug is. I've written a small amount of C++ small patches to existing projects, but then I only ever really wrote programs in college in C++. That practice of, or that phenomena of the bug is in one function and it messes up a data structure that gets used a thousand lines and 10 minutes later was especially frustrating for me. Yeah, all right, so what was that? All right, so that was for this

01:36:47Is that 369? No. 368.

01:37:50nogweii are canonicalized URLs enforced anywhere since the submission page doesn't use the returned value from the server?
Are canonicalized URLs enforced anywhere? Yes.

...59Somewhere in story saving, it uses it. Unless this URL changed that? I don't believe so.

01:38:20Yeah, this didn't have to touch it.

...32Oh, and yeah, you can even see a spec that still exists if... What is the difference between these? Ah, so here's an example of where a canonical URL comes in. They have a slightly shortened one with slash A, And then their canonical points at slash articles. And we confirm that we get a 200 for that. And then yes, we do. You know, this touches fetched attributes, I think just to be a little faster. But when you submit a story, somewhere in one of the hooks, it does get actually used and replaces the users submitted.

01:39:28nogweii are ya sure about that?
But I cannot for the life of me spot where it happens.

...38Pretty sure about that because we didn't remove the feature in this pull request. And prior to this pull request, we had that bug all the time.

...57nogweii oh stories controller
It's possible we've subtly broken it. I should... All right, let me log in locally. Let's test it. Stories controller does it.

01:40:22nogweii part of #new
Yeah, here we go. Part of new. Yeah, you're looking at the same line, line 101.

...34Yeah, that should probably happen in the model, but I knew it was somewhere. Just didn't spot it. I was about to search off of fetched attributes and that would have turned it up because I knew it was somewhere.

01:41:09All right, makes the.

01:43:26All right, so hopefully we can make this even a little more obvious. Part of the reason I asked for this is a lot of times all the entropy in a URL is hanging out way on the right side of it. And if you are looking at the story submission form, which is going to load in a minute. The part of the URL that changed is going to be off screen to the right or just not visible to the right, especially if the canonical URL differs in a trailing slash or a dot HTML or a dot PHP or query params on the end. And so I am hoping that we could insert some kind of note here that your url got changed that would be really handy i think as opposed to you paste in a url you focus the next field and then you have no way of noticing because like who would focus back and scroll all the way to the right on long url basically nobody and this flash tells you that we did it But it tells you past tense. You'll see it. So this will show up if you preview, I think. Because otherwise, why would the... So in Rails parlance, new is the action for rendering a form and create is the action for persisting the form. So this must just be if you preview or you try to submit the story, but it has some other validation error and it comes back.

01:45:41Yeah. So there's a lot going on in that action there. We'll come back to stories controller here on stream, I'm sure. All right. So there's that PR URL. So I'm going to grab that.

01:46:10All right.

...17This is one of those little quality of life things where if you weren't sure that stories and comments where the two got objects on lobsters the amount of tiny little Polish things like is this the absolute best URL we could be using. would kind of clue you in.

...46I do wonder. I do wonder who. sets that link header. that Nagwe found. And I wonder if we should put in a feature request for it.

01:47:14nogweii From researching online, no one expects it as a header
I guess one of the... Yeah, we're going to have to fetch the HTML anyways. No one expects it as a header? Is it just one of those things where nogweii doing that is extraordinarily exotic it seems. Everyone sticks to the HTML.
Yeah, like SEO folks who are working on stuff are often working on on-page elements rather than server config. I can see doing that is extraordinarily exotic. Everyone sticks to the HTML. And I suppose if we made it, what, 12 years and change? 13? No, it's 12. Before somebody thought about it, we're probably pretty good to go another 12 without it.

01:48:18All right. And let's just leave that. nogweii yeah, I think your supposition about marketing folks sticking to on-page elements is accurate.
There's no need to find a whole new class of things that web servers do weird in the same way that We had to learn that lots of people have bad canonical tags. All right. There's the pull requests. Now is a great time if anybody has questions about stuff to pipe up. Otherwise, there was some stuff in issues to do. How did that already change to three? Did they already respond or is that? Ah, there's the extra comment, okay.

01:49:18nogweii I'm curious about something - what's the avg number of comments per tag?
What's the average number of comments per tag? nogweii not sure what that SQL looks like
nogweii for sure!
Are you okay if I use a database that's a couple of days out of date instead of pro? Oh, I know what that's going to look like. It's going to look like tag, tag, comma, average.

...52Well, what is it going to look like? It's going to be a join. We're going to just join across. Hold on, I'll come back to what that filter is. Join taggings on tag tag equals taggings dot tag ID. Join stories on taggings dot story ID equals stories dot ID. Group by. And then, so if I was just going to do stories, that would be it. And then I want to join to comments by, actually I can just skip over that, can I? join comments on comments.storyid equals taggings.storyid. We could just leave stories out of it. So if I said this, I would get the count. I know that's not what you want.

01:51:19The answer is going to be programming i'm just going to predict right off the top of head it's going to be the programming tag has the most. Assuming I don't have a sequel error. See Oh, I need to say must have lost it from tags. And then it's tags plural. And again tags plural.

...52Again, tags plural. You can tell that this Rails default is not what I would have picked. Hey, it's programming. And then... We almost want an intermediary table here, right? So... We want the story ID. So we're going to group by the tag comma.

01:52:47This is finding us the couple of stories that have Now that's fewest, but that's fine. And then with that, we want to say with. Tag story counts as. And we don't need an order. Let's select. Tag, comma, and then what is it? The avg of c from tag story counts group by tag ordered by one desk. I think that's it. So let's jump back up a little here. So the average Zig story gets 13 comments. That's kind of plausible. Like, I would believe these numbers. Ask tends to get 31. Yeah, these all seem kind of ordered by... pushcx with tag_story_counts as (select tags.tag, comments.story_id, count(*) as c from tags join taggings on tags.id = taggings.tag_id join comments on comments.story_id = taggin gs.story_id group by tags.tag, comments.story_id) select tag, avg(c) from tag_story_counts group by tag order by 2 desc limit 10 ;
jmiven only 10 for culture? Woah :)
to descending so let's take a top 10 just so i don't have to scroll up again announce gets 37 yeah this feels plausible so i think that gives you the kind of answer you want i will paste that over here in case you want to not have to retype it in case you want a different version but

01:54:54Only 10 for culture. Yeah, that puts it, you know, just off of this top 10 list here. Let's make it a top 20 list. That's kind of an interesting way of breaking it out. I never thought about that.

01:55:19jmiven rant & systemd go hand to hand I guess? ^^
systemd this one i almost want to chart over time because i remember 12 years ago when the site was young systemd was a little more contentious and i would bet that as systemd has become a little bit more less of a contended standard and more of the standard i know don't Don't tell me about Alpine and the other guys. I know your favorite Linux distribution doesn't use systemd and is better for it. We don't need to rehash any of these, but I bet this one has faded out. And then like Nix, that's matured a lot over the life of the site. nogweii would this be a useful stat for the tags/filters page?
I bet that goes up over time. jmiven err hand in hand
I am not so curious that I'm going to break this out into a chart over time, but would this be a useful stat for the tags and filters page?

01:56:20Hmm. I don't know, maybe. I mean, it's certainly interesting to me. easeout nix feels like it became a much bigger topic in the last couple years
Rant and systemd go hand in hand. Yeah, you know, JMib and you're getting at, we've never really done analysis of what kind of tags tend to get tagged together. So programming, despite my best efforts, gets tagged with every other programming language, even though the description of it says, please don't use this if you have a specific language tagged. I've got to put that in code. nogweii ooh clustering algorithms would be interesting to apply to lobsters tags
But then I would bet accessibility and design get tagged together a lot, or version control and practices get tagged together a lot. Clustering algorithms. Yeah, clustering. That's such a nice idea, actually. Let's put that in the description. Did I save that issue number? No, I did not. So it was 1384. Speaking of canonicalization, anybody catch that? Ooh, they closed their pull request. If I say... GitHub has merged the number space long since, forever, of issues and polls so that a number references canonical.

01:58:07All right. I appreciate them saying no worries. Actually, Nagoi, why am I doing this? Why don't you add this as a comment? You'll have more attention and then you'll automatically get credit for it. I won't have to thank you for it because you're right here. nogweii can do
Can I volunteer you to add that comment?

...35There is also... I know I mentioned it somewhere. No?

...49All right, not comments.

01:59:00Yeah. For submissions, I mentioned it once. No, only a year ago. Time flies. that there are things we could do to recognize stories that are, if not outright dupes, but very likely to be merged, like TF-IDF, which is, what is that? Term frequency inverse data frequency, which is a way of saying, does the term in this story, and that could be any kind of word in the title or word in the text of a story, Does it show up especially often compared to how often it shows up? So to give a canonical, actually, let's just go to Wikipedia. pushcx https://en.wikipedia.org/wiki/T…
I don't have to invent a description from scratch. I'm pretty sure I learned this one from Wikipedia. Wikipedia forever ago. But it's an idea of saying what rare or uncommon words show up in this document compared to the corpus of every comment we've seen or every story we've seen. And it's especially useful because for us, terms that would be unusual like monad or recursion well they're not so rare in ours so it would be a nice way there's another thing that we could put on the tags page of like what are the top related terms

02:00:51Let's jump back. Lost my place there. Did not lose.

02:01:03So now that we have years of content, I feel like there's a lot of potential for doing fun things with it, whether that's TF-IDF or other kinds of text analysis.

...22So I had started this stream out with that hat request fix up. And when I initially saw the hat bug where hats were getting rejected, I noticed that my prod log config was wrong. And I had hammered this out pretty fast. And if you dig through the Git log, you'll see I had a couple of revisions because I hammered it out too fast. And I didn't catch that there are a couple of issues like allocations that are up here. I tried to move them down into a hash so that when I wanted to do perf stuff, I could just filter out the performance related stuff. And most of the rest of the time, I could just throw it away or not select it. And that did not work out. but it did not work out in a consistent way. And so Colonel here who, I think they wrote the hair request PR that we just merged, didn't they? Maybe that's how they got interested in this. Yeah, this was them. That they investigated and found that This data is getting added by LogRage itself before it runs our various hooks and config. So if we jump over to the LogRage config, LogRage is the The Rails logging is very verbose and very multiline by default. And LogRage, I guess, is named by someone who was very frustrated by this approach and said, let's just log one line of JSON per request. And so if we're doing that,

02:03:48Allocation and durations are part of event, not event payload. So I could fix these two like that.

02:04:04But at the same time, I can't actually get rid of the top level one. This whole custom options DSL is oriented around adding things. And since this database time and this view time, so here's database time and here's view time, are already present, I guess I should just give up on this idea of having a perf hash. I kind of liked the idea of keeping them separate and being easy to throw them away, but I've been hacking up my jQuery pipelines on top, or not jQuery, JQ. JQ is that nice command line app for filtering JSON. So let me just toss this then.

02:05:14And I'm going to bounce the Rails server And then just click around a little locally to make sure we're still seeing some kind of log here.

...30So in development mode, I said it should still print the standard Rails verbose logs. And then here, yeah, so I've just dropped out the perf hash and these numbers that we care about. occasionally are still present. So that's fine. All right. I don't want to hack around with that, so.

02:06:01I will just add this.

...11And not I.

...38What was my issue number? 1372.

...57Can I spare one character? Yes. RM the perf hash.

02:07:10Great. Let's push that up before I forget.

02:08:14Great.

...22So there's a small bug fixed. Stop going to GitHub discussions. In case you're a regular stream watcher and you wonder, why does Peter keep jumping over the discussions tab? It has some keystroke shortcuts set up, and in my main browser profile, I override that keystroke. And so not intentionally, it just happens to use it. And so my keystroke for scroll to the top of the page gets picked up as the go to the discussions tab. So that happens all the time. All right.

02:09:06So this, speaking of issues where someone does the research and figures stuff out, which is just as good as opening a pull request.

...24Two streams ago, there was that little time bomb I implemented for the sister sites. two streams ago, trying to clean up old config stuff, inserted the time bomb, and then I inserted another one that at least had a nice error message last stream. And then I filed this issue, so hopefully we would have the opportunity to do more Rails yassification. And when I say that, I mean, just look more like a stereotypical Rails app. And Jean Boussier, Beirut, who I tried to nerd snipe into doing this, came along and cleaned up a bunch of other stuff and then was like, yeah, what are you talking about? And we have this pattern

02:10:40In the code. So I don't need that tab. So let's look at so you know you can aloft your github account so that your profile page will say you know authoritatively yes, this person owns this github account.

02:11:06The hassle is. No, not this file.

...17To OAuth to GitHub, we have to have, you know, there is a lobsters app. All it does is confirm that you can OAuth your account. This is what all of our account confirmation stuff looks like. We need these secrets and we have it set up so config initializers production reaches over and fills in these class variables note the double amp or double at sign these are class variables not instance variables which are real uncommon in ruby nowadays to the point that They are, so it doesn't come into play here, but in Ruby, class variables are also shared between inheriting classes. So if we had a class, I don't know, GitLab that inherited from GitHub, I know there isn't a family tree there, but work with me. updating this variable on the class github would also update it on any subclasses which is surprising and dismaying for folks and so to avoid that a real common linter rule or just rule of thumb is just don't use class variables i think they may also have a weird interaction with modules because modules go in the inheritance path, basically. I don't want to rabbit hole into how inheritance works in Ruby, but basically it's a totally reasonable practice to not use class variables. And part of it is for us, We want to set that secret at boot time, but this initializer runs not only before this code has been loaded once, but before Zeitwerk, the clever autoloader, has loaded. And that's how we ended up with this ugly kludge. Because in production, production.rb does not get checked into Git, as you can guess, for a file that is full of secret values.

02:14:25And so this is one of those places where our code base is both showing its age and showing, well, I guess it's three things. It's like the age of the code base in terms of we predate Rails really incorporating a better model for handling API keys. And then also the code base was created by someone who didn't really know Ruby idioms very well, and then also the Ruby idiom developed of boy class variables are kind of a foot gun so. I even one more thing about this that I would like to get rid of. Is. We use the standard linter, and the thing I like about it is I don't want to have opinions on 100 RuboCop cops. I originally added RuboCop to the code base, and I went through, oh man, like 300 cops to try to make them, you know, to choose the setting that matched our code base best and try to minimize the diff. It was this long, long project. Took me a lot of development time over a summer. maybe 2013 or 14. And then like every month, RuboCop has more cops added. And I am so happy to just use standard and defer to, you know, I almost say Justin Searle's opinion, but that community's opinion, I'm just done having opinions on linting issues. There are very few where I actually have an opinion on them. And so I think this naming slash variable name cop I don't remember if it's unhappy about the convention of caps should be a constant that you don't change, which this counts as a change, or if it's just unhappy about like don't use class variables, period. But I had to comment that one out because I didn't want to take on the refactor. You know, why don't I delete this config and we can see which it is.

02:17:03Okay, so it's just that we're reassigning a constant or something that looks like a constant because nothing is quite a constant in Ruby in the sense it is in other languages. So long since we implemented that,

...29I ran into a mention of the Credentials Store, which is Rails has grown a feature for handling API keys a little more safely. And Byroot doesn't like it, but one of the things I knew for context is that Byroot works at Shopify, which is, you know, one of the largest Rails apps in the world. by both line count and traffic. I would guess it is handily in the top five of both.

02:18:14So I asked a question or two because I was like, I think your intuition is enterprise here. And he said he prefers it because He likes this other one because the structure is in clear text, which makes it easier to know which keys actually exist. Given how rarely we add or remove keys, adding and removing keys is these third-party services, and we tend to be pretty strict around don't add dependencies on third-party services.

...59I think that's fine.

02:19:09It's funny, I follow by root on blue sky. And him saying, like, I have an opinion, you do what you like. I swear half of the posts I see by him are like, yeah, you do whatever you want. Like, I know you like some semper or break for I consider the version number just a string and I don't care about what 1.0 means to anybody else. He is definitely someone who has figured out that there are very few things that he thinks it's worth arguing about online, and I respect that quite a bit. I aspire to that. I spend a lot more time griping about stuff.

02:20:05So I joked about it in the run up to the stream posting on social media, but there is no way this works on the first commit. Aside from it's gonna blow up the sister sites who will have to run this command to create the everything. I know I'm gonna write this for lobsters and then it's just gonna blow up in prod. Because there's going to be some subtle misconfig, even if I do everything first.

...42This is an unusually wordy namespace for Rails. Rails.Application.Credentials. It's just like, what, 25 characters wide?

...59nogweii Could you start logging about a missing "MASTER_KEY" env var before doing the switch?
And I can use the bang version. That's great.

02:21:07Let's go learn more about credentials.

...18I think you actually can't boot a Rails app without this credentials file. you get a complaint that it's missing. So in that regard, while these individual keys wouldn't be present, and that's what I'm thinking is going to blow somebody up, I do at least think everybody will have the basic setup done.

...52The thing I would really like, and this isn't very Rails-y, is I'm thinking of the Lobster's code base as sort of a template for someone to pick up and run, where a lot of Rails stuff assumes you are running exactly one website out of the code base. And I would like to, I would really like to pre-fill just to list the keys that I want to see in it.

02:22:51Yeah, and I don't know how to give that hint.

02:23:03So I'm going to double check just to be safe and off screen, I am running Rails credentials show.

...21And it prints me a big secret key base. And then I am SSH-ing over to lobsters. And running the same command. Bundle exec rails credentials show. And making sure that I get a different value for secret key base. And I do. And I didn't... You know, I really didn't think that I would have been foolish enough to copy the production secret key base to my development machine, because if we lose the secret key base, you know, worst case scenarios, everybody is logged out and has to log back in again, because this is used to encrypt cookies. But that's not bad. That's survivable. I just wanted to make sure before I start running show or edit or diff here, nogweii what, leaking prod secrets? who would ever? :P
that I'm not going to show anything that matters in prod. So we can set... I don't think I've managed to... Well, I hope I haven't managed to print any prod secrets. I've been pretty deliberate about it and... Rails giving the whole environments thing is an enormous help. So I don't actually have a straight clone of production. jmiven it's alright, we know the password is hunter2
I think the command enrolls the project such that all credential files use the diff driver and get attributes. oh yeah yeah hunter two no it's password with a one at the end i don't feel like i understand what this enroll does to instruct git to call is it suggesting that you would commit your file and it would just keep it encrypted in nogweii rails' idea is to commit the encrypted credentials yaml file, yeah
your git database i don't want to do that i understand that theoretically the master key is encrypted and you know everything is state-of-the-art i don't like sharing even encrypted data i see encryption almost as a a fallback it buys you time so that zackisbob Hi I'm knew
if a secret thing is leaked you have time to roll the credentials before someone can start using them but there's and part of that is just you encrypt something and then 10 years later it's probably the same encrypted value and computers are you know 900 times faster or there is a surprising change like oh now there's a whole cloud hey zach is bob i think we saw you before once you don't have the first time chatter label but i think yeah the other thing that happens is some idea of it's hard to set up 200 servers to crack changes because ec2 starts up yeah zach is bob we saw you on zackisbob I'm not knew I forgot
frici what a memory
september 30 and you told us about eating vinegar and grapes which we don't need to talk about that all right so i am definitely not doing this enroll thing and i think i'm just going to be sol on providing an outline No, Fritchie, that sure wasn't my memory. You maybe weren't present for when I mentioned that in American Sign Language, my name literally includes the sign for forget.

02:28:02nogweii but doing `git diff` on the encrypted plain text is annoying/impossible-to-read. So instead of relying on the built-in diff algorithm, run the file through some rails tooling to provide a pretty diff (locally)
Alright. Yeah. Yeah, I'm familiar with doing that kind of diff on other binary files. Like I've seen one where people set up a visual diff for images so that they get more than just binary files differ, whatever that default git message is. But I'm so... I'm just not doing... I'm not committing a even encrypted credentials file. What I would like to do is commit a template. I think it's going to end up being a dot sample. And then it would be really nice. I know it's not going to be a thing we can do, but it would be really nice to set things up so that when someone tries to start rails you know in a development mode or in a production mode with this code base for the first time they get a message telling them hey here's how you set up this file that is not the rails standard message because the rails standard message is like oh just run this command to generate a master key and that's good they will need to but That is the point where I want to include instructions about how to set these up. So let's go ahead and say, not short. Oh, I guess I got that. Get rid of that alias and that one.

02:29:53Can't type. All right, so it just wants yaml so we're going to say and yes folks as i said off stream this is the one that's my local dev server since my local dev server only listens to localhost and we're going to end up rolling this at least once here in development i don't feel like i'm making a terrible mistake

02:30:28nogweii I have a `ber` alias, for `bundle exec rake`. Amused to see `be` for `bundle exec` is universal.
All right, it's capital I. All right, so it's config. We have a bar. Yeah, I used to have a for bundle exec rails. Maybe it was rake, and that's why I deleted it, because eventually everything moved over to the rails command, because they wanted to stop explaining why there were two commands. So let's go ahead and say, yeah.

02:31:21So they call it, let's just grab that default.

...39And I think there's going to end up being instructions here.

...50And I wonder if we're allowed to include new lines to organize. If I can put comments in it, we're already away from base YAML. So let's go ahead and say all of these.

02:32:31This one's going to come GitHub. These are going to come in hashes.

...50This one has a lot of explanation of how to. That's fine. Let's alphabetize as long as we're in here.

02:33:07And then these become lowercase and hashes.

...32If I were a clever man, I would just write a BIM macro to do these. But I know I'll spend more time debugging that than actually using it. So I'm just going to schlep it.

02:34:17Didn't change these.

...54If this is independent of, oh yeah. The way account linking works, we actually save the keys in the database.

02:35:39Because we sort of programmatically register as an app.

...51You are not allowed to write just Ruby here.

02:36:15So we have consistent styling. What's the YAML way to indicate null? Can I just leave it blank? And the reason I want to do this is I know the code introspects on itself and will tell you, hey, here's what these values should be. Or, you know, oh, next, go do this next step.

...57frici unless it does something weird its just "null"
I can say no.

02:37:13I can say no.

...26Or I can say, what is that, a tilde? That's not confusing. All right.

...58frici or ~ yeah but I hate tilde cause its not that intuitive unless you know it so can confuse other readers unnecessarily
Complete absence. Oh, it's getting it. Whether it's null because it's not present or null because you have a null. Yeah, there's maybe a little chat GPT happening there. All right. So I'm going to change these from Ruby hash kind of syntax to that.

02:38:31So if I've got all that, and I'm happy with the keys, happy with the placeholder values,

02:39:06All right. Yeah, the tilde is... Yeah, Freechi, I also would not use it. That's just surprising. And some of the YAML stuff where some of these values... The YAML type coercion is kind of constantly surprising to me. That's why I was particular about putting quotes around all these is I've been burned by things that look like numbers or look like hex values or... And O should be a false value, but instead is Norway. There's a classic. All right, so then I can take these out of here.

...57Let's leave a note.

02:40:23is those have moved into we now use the rails credentials system feature to store api keys see readme and what's this url actually i'm gonna just centralize it and i'll come back for the url and put it in the readme yeah so if that's there we can drop down to the readme and

02:41:20I will add the credentials somewhere in here. It's gotta happen before you're running a rails command. And after you have a Ruby version, you have to check out the code. So yeah, let's put it here. Run in rails credentials. Doesn't it have one where it creates the secret key base?

02:42:20I don't know why I'm reading when I can make grep read. It's even better than having an LLM read. All right.

...32All right, so Rails, you are definitely not listing all tasks.

...40You are still not listing all tasks.

...54Is it not considered a task?

02:43:09Let's see what it is. Don't try this on prod, kids. Oh, it's yamlinc. I got that wrong. Let's fix that.

...33All right. And then if I run Rails console, I should get that error about not having a base, right? No. All right. How about if I start the server?

...49No, seriously. So off screen, I just loaded localhost. Did it generate it and not tell me?

02:44:10This one's .

...30Okay, I thought I was definitely... Oh, is it the master key I'm thinking of? That doesn't sound right. I'm gonna look at this file off stream. That's just a different random hex hash.

02:45:12Looks for the master key in that end bar. Or that's awful. Or it takes precedence over config master key. That's what I'm conflating. So at startup, it tells you to create a master key. So let's get rid of that and see what the error is.

...49now i should get an error about not having one no still still no but for sure one of these commands was gonna print the oh you don't have it so and it is config secrets dot yaml is that the i think that's the old one hold on let's not cat it live on stream if i haven't looked at it june 26 so it was actually touched this year unlike the others this is an old one so config secrets yaml is

02:46:53for cookies but i want to say all of that moved over to the master key just generations of rails config at work not set up i meant server and off stream i'm going to reload yeah Still fine. So whatever Rails is doing, it is doing some kind of fallback so it's not complaining, which is fine because that does mean that I can write my own initializer that, like the kludge, is going to look for encrypted credentials and throw a instruction message if not.

02:48:03So I thought there was

...20Okay, so when we run this it creates the credentials file and it creates the master if it doesn't exist.

...40And then let's go look at.

...51That's no longer mentioned, so that's dead. And custom credentials. That's only for this. And then cookies.

02:49:19Don't remember where the key is for that. OK. All right. So I'm going to tell people on setup, Thing that I expected was that there was a command to generate secret key base.

02:50:06Intestine dev. Oh, that's why I'm not getting this error is because I'm running in dev mode. Other environments must use shown here in its encrypted state. Strongly consider changing them. I hate this Weasley like consider changing them like you have to tell people what are the considerations. When would they do it? And the answer is. If your secrets may have been exposed, you must rotate them. Is it a generate?

02:51:23It is neither of these. Rails generate security.

...57rate secret is that still a thing nope how about rails secret yes okay all right so

02:52:35I guess it doesn't need the ENC in the file name, huh? Because it's a sample? I don't know. It's going to go in yaml.ang? I feel fine. So let's copy and paste the contents of run in Rails. What's it called? because I don't put the rails, the bin on these other things. Rails secret.

02:54:34secret secret to generate a random value or secret key base.

02:55:55I guess you don't even need to do it in dev unless you're developing those features.

02:56:06I kind of would rather force people to do it. No, let's not. Yeah. So we're going to say this. Let's move this down to the production setup.

...50know it's no longer most administrative tasks that require use of the console in prod i've been slowly moving more and more of them into the website and it's both as a benefit to less technical less railsy people on sister sites but also just to make things more repeatable because otherwise we end up with Pretty frustrating prod bugs when I fat finger things on the console.

02:57:53It feels like a pretty good warning. And then I guess in development mode, hejihyuuga @Nogweii i'm forgetting how to do it, but i believe there's a way to "teach" git diff how to preprocess a file before it computes a diff
those specific features will say, hey, I don't have an API key, and we'll double check on that. That'd be pretty straightforward. hejihyuuga sorry i'm very out of date and out of context haha
Yeah, Hedgie, it's in the Rails credentials help, but that's not actually helpful for the thing I would really like, which is, I would love to be able to tell Rails, take this sample. You're fine. I'm happy to catch folks up on context. So there's that.

02:59:17defcantgame I mean I saw linux and rails dev and had to swing by
nogweii @HejiHyuuga yeah, the gotcha is that @pushcx doesn't want to commit the encrypted file at all, so although that's possible it's not wanted, heh
So there's that instruction. And now all of the code that used one of the old keys needs to change to use the new ones. Hey, DefCantGame, welcome. Oh, I mean, if you're used to Linux, you definitely can't game. Ha ha. That joke has aged pretty poorly, especially given ProtonDB and Steam Deck. defcantgame dont worry EA is making that meme alive aga
I actually find gaming on Linux pretty darn easy lately. Oh, yeah, Nagui, I think you're right. I see what your heji was meaning there. Yay? Oh, yeah, I have no idea. I actually... defcantgame Thats understandable
don't play a lot of triple a games or anything because most 3d games make me nauseous and so i play a whole bunch of video games but it's pretty limited to like 2d platformers and strategy games and puzzle games and basically if a game is 3d and has come out in the last 25 years i haven't played it there's maybe like defcantgame You arent missing much
two three games that didn't set me off or like i played the witness which did set me off but i played like half of it because i had to play in 30 minute chunks it was really interesting but i would play for 30 minutes and then i would have to stop and then play for 30 and stop It's hard to, you know, you say you aren't missing much. hejihyuuga it makes me sad whenever i hear that someone gets really motion sick at 3D games
I think there's actually a lot of interesting games that I would like to play, but it's very hard to like them when I feel physically nauseous looking at them.

03:01:07The funny thing is it may actually be less of a problem for me because VR doesn't set me off, which says it's probably related to the horizon line and not having a horizon line and my body getting out of sync with my eyes, where my inner ear is like, you're not moving. defcantgame That's interesting actually
And my eyes are like, oh, you're moving up and down and tilting. And that's what's causing the dissonance. And it doesn't happen in VR games. defcantgame can we get a scientist in here to figure this one out
So I don't know, maybe I'll get really into first person shooters if they all get ported over to one of the VR platforms.

...57i've actually done a ton of research on this def can't game i've played a bunch with different fps settings different lighting different fov in games and i've read some studies and that's why i'm saying i think it's the horizon line so if you search up horizon line nausea this is also why a lot of people get carsick while reading if you look down at the words on the page you can't see the horizon anymore so one of the easy fixes for people who get carsick is to hold the book up high enough that you still see the horizon in your peripheral vision

03:03:00defcantgame See usually i am the one teaching people something but I learned something new today
Well, welcome. I am happy to ramble about all kinds of stuff, so you can usually get me into some kind of weird trivia. And if you find a great link on Horizon Line Naja, it is totally welcome to share it back here in the chat.

...32I figure if I say the word credentials, someone will surely go and see the part where it says the word credentials. So now all of these references have to change to say like Rails application credentials, helps to spell it right, .clientid.present. I figure between naming the feature Rails application credentials and saying the word credentials here, we're pretty good. Yeah. We don't even have to say GitHub. We're under the class. nogweii getting semantic satiation yet, for "credentials"? :D
DefcantGame, do you stream and teach people to code? Let's just split this up. semantic satiation yeah it's becoming very very familiar but now that i've typed it once or twice i can just auto complete it all right so We're just going to have to keep replacing these.

03:05:06How many more? Oh, a couple more. All right. Still not worth automating.

...25nogweii I forget, do you use things like LSPs or other IDE-esque tools with your vim setup?
with that and then client ID down here I do use AIL, the Vim automatic linting engine that recently moved over to using the Ruby LSP. That's why this yellow is up on the stream is because I've started using Sorbet in recheck and AIL has auto detected that Sorbet is installed. And so it wants to Sorbet check everything, even though all of these files say typed false. It's like, what is this Rails constant? What could it be?

03:06:19But then otherwise, if I make some invalid syntax like this, you see the little red arrow in the corner. There's some LSP integration happening. I guess I don't need these line numbers. So this one is red because it's getting this sorbet stuff. It's like, no, this is fine. You don't need to second guess sorbet. Yeah. And so having Sorbet accidentally globally enabled is pretty frustrating. It's broken a bunch of LSP stuff. I will have to, why don't I put that on my to-do list, right?

03:07:15Sometimes when I put things on my to-do list, they even happen. All right, so there's GitHub. Now let's do diff bot. I should have just gone in the order that they appear. And let's jump back to GitHub and just copy this instruction. Great.

...42And then all of this. Yeah. Only two mentions? Easy.

03:08:01I was typing GitHub credentials client ID and client secret, wasn't I? I did include the GitHub namespace. We'll go back for that. Nobody caught that bug. Nobody gets to be VIP. Yep.

...31Got hub. Wouldn't that be nice? Oh, come here. Let's do this one. All right. And then update all the client secret ones.

03:09:03Easy enough. Keybase. Which also wants... A little fallback here. And this one actually... This one's a little funny because the note on securing rails app was that credentials overrides and bars. Wasn't it? There was something about.

03:10:04Was it in the help?

...15Come here. So it looks for the master key. You could set the unvar. frici ironically gothub is a thing that exists. and actually is kinda nice if you don't want to use github for your own reasons
If it's present, it takes... All right, I guess I'm just misremembering. frici https://codeberg.org/gothub/got…
Ironically, GitHub is a thing that exists, and it's actually nice if you don't want to use GitHub for your own reasons. What is it? OK. You sure about that, Fritchie? frici don't think it has a own url
Oh, OK. frici or own instance rather
Here, I can click this and yank over the tab. Turn to front end for GitHub written in Go. Oh, I think I've heard of this. So these are various. All right. Every once in a while, maybe like once a year, someone is like, I don't like GitHub. Let's move lobsters off of GitHub to my preferred code forge. And I'm kind of like, I understand that you care a bunch about this, but I would be giving up basically all of our contributors. For your moral satisfaction, that's a little rough.

03:12:21nogweii you should move lobsters to a ssh directory hosted on the server, no UI at all :P
To an SSH directory hosted on the server, no UI at all. I mean, there was that one April Fools where it became a Telnet BBS.

...41Yeah, so let's go ahead and default to null. Man, these are such long identifiers.

03:13:10It must be right in Java to have like 40 character name.

...26Application, credentials, key base, base URL, which is already set as a default. So that part's for done. We're going to just drop that. Last time I looked at Keybase, it didn't look like it was getting worked on anymore. I pulled up their GitHub repos, because that site is open source. nogweii keybase is definitely...different these days. :(
And I didn't see that there was any activity on their repos. But either they moved repos, or I was looking in the wrong place. I also know one time I swung through that site and I saw somebody with a swastika avatar, and I did not get the impression that they were from the subcontinent. And that made me real uninterested in continuing to maintain a keybase integration. Because if you can't get that level of moderation, it's still going to be defined. This one, you know, all the, And I want to peek at Mastodon app. I don't think any of these constants get reused. Mastodon app is where we register applications at the various Mastodon instances so that we can do the OAuth checks. so many rescues we have seen so much odd things out of things that people hope will auth as master instances but are not actually all right good so then these go away and

03:16:08Wait, I'm confused. Oh, it's doing the self.lookups instead of the double at sign lookups. Yeah, that was... One other reason that class variables are surprising in Ruby is that there are multiple ways to access them. Or maybe it was the accessor that I... Yeah, I don't know. I don't want to know. So...

...48Rails application credentials mastodon instance name.

03:17:00OK. I guess let's do the rest, right? Oh, and then also we're accessing them directly through the class variable. Now we're going to get them all.

...44Yeah.

...57Break this on multiple lines, because otherwise it's going to be 300 characters. My clever split. There it goes. So this becomes.

03:18:30That's so ridiculously long. Okay. That's just how it's going to be. Stream is running long. The cat is getting appealing. Hi, buddy.

03:19:17If not, let's make it two lines.

...38I know you perish, sir. What if you perish? What if? What if you don't get dinner 42 minutes early? That would be the end of the world. You would perish right here on my desk with your way fish figure. You are actually fairly round, buddy.

03:20:16So this is just a string, because we're trying to prompt people. So let's just tell them what to put in their file.

...43Is there another?

03:21:27I tried to make this, I try not to over-engineer this because it's something somebody only really needs to run once per site or once per accidentally leaking their credentials file. You know, so once per site in the same way that marriage is that one special day. And that's a title.

03:22:02I tried to balance not overengineering this with leading people through the setup flow reasonably. All right. Because, you know, I want to handhold a little, but I didn't want to...

...46If you got there, you already saw the README.

...58All right, token. Where's list ID? I didn't see that one go by, did I? It was split across lines. Hiding.

03:23:16I have one more. One more. All of them split across lines, which is only going to get worse with these giant identifiers.

...50The last is pushover, which is a little funny because it was the first integration because JCS runs it.

03:24:09What did I do there?

...16Rails application credentials dot pushover dot API token. That's also going to get swapped in here. And that's it. And then isn't there a, yeah, this becomes,

...57Subscription code. This is just getting to be shotgun surgery, touching all of these. And having touched all of them, I want to just real quick make sure that none of them are mentioned elsewhere. Because one of those things about the constants is... They're available everywhere. Yep, there's key base domain.

03:25:53Is that base URL? Yeah.

03:26:17wait that's not even the right i found all the base url ones all right hang on extra keybase so that one hits end what did i touch here that one just uses the all right put that back and then there's a keybase controller that also needs to be set. I could just narrow it.

03:27:19All right, check the rest of these.

...32Missed one here.

03:28:12All right, I've definitely hit the semantic saturation where, like, I almost can't read this path anymore. Like, I look at it and I'm like, I don't know, does it say the right thing? So, yeah, it goes R, A, C, and then the thing. Just a couple more. I already saw client ID and secret from GitHub. Did I see list ID? One more of those. All right, homestretch, API token and subscription code.

03:29:18just one, which should be a are you enabled question, shouldn't it? This enabled checks if there's an API token and this enabled checks if there's a subscription code. This is one of those, like I was coming here to write an enabled But there already is one. What does it mean to be enabled with an API token but not a subscription code? Probably it means you are not enabled. I haven't had to touch the pushover code. I'm going to just say enabled. I think that's OK. Hopefully, I am not just adding a bug.

03:30:43let's see how many typos i've added see if we get a bunch of syntax errors because standard rb and ale aren't saving me with that sorbet setup oh two fails it's not so bad five more four more it's just a little airborne it's still good it's still good

03:31:24Undefined method for nil. Now that's a weird one.

...38Let's start with just the user controller spec.

03:32:09so it's complaining that the domain is on a nil which implies that the missing thing is keybase which i guess is true in test because we didn't set this up in my test in fact i deleted things so that i would see errors like this so i think All right, so let's grab another streaming window, because otherwise I'm going to have to nest Vim, because the Rails credentials edit is going to start its own Vim, and I have that funny stream set up. Oh, that's interesting. It prefilled. Okay. So I'll leave that in place, and I will... select all this and paste so that should be enough to get the tests running right as long as we're in that lucy goose yaml yeah okay so this is actually really positive because now i have managed to break my dev setup which is just what I wanted to do so that I can write an initializer to say, hey, you have to do this thing. I also know even though dev didn't throw an error just loading the home page, it would have if I'd loaded a user page. So this instruction does have to be not in production setup, but in dev.

03:34:47So now let's grab this and bring this back up to here. And I will just put it there. So I am getting the production breakage or the boot time breakage that I wanted. Even if I don't write an initializer, and I would prefer not to write an initializer, because, boy, do I want to not have to hassle around and make sure that I'm running after the Rails credentials, but before the et cetera. Like, if you're going to get an exception, great. Oh, but the four sister sites. They are going to just blow up in prod unless I edit the kludge. So there's one more thing with the kludge. I'm not using Scratch much today, but I'm never juggling more than things fit on the screen. So that was up in SiteWork, right? Yep.

03:36:27Ah, I forgot to spell that out.

...38I guess I don't have to explain the useRails secret because it generates one there. Rails will give you a random value. On a new file, Rails will give you a new random value for secret key base you can use rails secret anytime you need to generate another great on a new file that's not good grammar is it for a new file On the first edit.

03:37:34On setup. On setup. This is setup though.

...46On setup. All right.

03:38:01And not comma. We're going to make all the grammar. All right. So if I were on Rails console, I get a giant exception because I missed one. No, I didn't. What are you mad about?

...41Something in config environment? Is there another? Let's go see what's in config environment.

...57Oh, I bet we're getting, so ag by default, respects your git config or your gitignore and yeah there we go so i have these two files that are gitignored that are setting those variables so let's because i developed some more of the mastodon stuff for actually i think i developed all the mastodon stuff boy this is a stream where i get in trouble when i say that though so as I already did when I forgot I did not actually write the code for better handling canonical URLs. So probably... I know we did the list stuff. I'm not going to check the blame. In a bigger sense, aren't I always to blame?

03:40:00you know what i think i actually pasted i think i may have accidentally not accidentally deliberately testing the mastodon setup required lots of rounds of yeah required lots of rounds of tinkering. And so actually there are what might be production values there. So let's just go ahead and delete that. Off stream. Look at me, I'm working with API keys this whole time and I'm not showing anything that's actually a production API key. I thought for sure I'd mess up and get one, right? And then I'd have to pause the stream and go roll stuff and actually doing pretty good. So even though I have made a couple of whopper mistakes on the stream, not anything that's like just things that are personally painful, not so much disastrous for the site where someone could start tweeting at us if Twitter is still up.

03:41:30So with that, now I should be able to open a console. And in the console, I should be able to say Rails application credentials secret key base to know if it's set up. Because if this value is missing, then my kludge can know that they didn't set up credentials. Really? You don't allow me to rs or ls? Oh, because it sorts and you're doing some... Hmm. No, that's weird. I was thinking maybe the hash that comes back is not quite hash-like enough for this.

03:42:44But it is, yeah, that might actually be a pry bug or an herb bug. All right. So if there isn't anything on credentials that says it's set up, we'll check here. So if it's, we actually want to fire, even if it's not production.

03:43:10All right.

...56hejihyuuga !faq
pushcx https://push.cx/stream
Sorry, no fact, Keji, but if you click through to underneath the thing, there's a link to, I'll just give it to you. Push.cx slash stream. hejihyuuga thank you
There's only two questions in the fact, but there is a fact.

03:44:27If you have any other question, feel free to ask. I wonder if in development it has to have this value if Rails will automatically create it. We'll test.

...53Migrate API keys.

03:45:23mcollardx You have to break some eggs to make a omlette. The mistakes are part of the journey.
So what I want to say for points are you have to update your config. And I want to explain a little bit that we did this. So a code bay lobsters code base now manages API keys. Using the new. Using the rails credentials. Feature that was. Seeing the new to us rails credentials. Feature I'm trying to say like. I guess I'm sort of reflexively defensive here where I'm trying to say we didn't do this before because we existed for like five years before it.

03:47:31So there's all that reasonable instruction. All right. And then. lobsters codebase now manages api keys using the new to us rails credentials feature oh man i must be getting a little tired nothing looks like it's spelled right anymore look for credentials and readme md for setup instructions and a template sorry for this one-time hassle this is not useful to

03:48:28sites that are to developers who are getting set up and running the tests for the first time. But I can't assume any of those configs are there. Because there is This is the only one you have to create. Yeah. So let's go ahead and say, let's move config. Let's move the one that we just made out of wait, I bet it made a master key too, right? Yeah. All right. So I want to, I want to get those out of the way and config master key. Let's move those out of here. And then I'm going to run that spec again and see if my error files fires. Yes. Good. So.

03:49:48If you used the old config.

03:50:21What's the way to say that they can? Oh, actually.

...39We could do this better. We can do this, and then I can say. And then here can be just the message.

...57I guess this one is called migrate API keys, right? And this one is called credentials set up.

03:51:32If you it's the right way to say, like, if you're not setting up for the first time, I guess, yeah, that, that other, that false start, if you use the old big Schleiser's production dot RB method, you can

03:52:07Your API keys are there and can be removed from that file. C config initializers production RB sample. Yeah, I don't think we need to explain every line you can delete. I think that's probably clear. All right. So now the lobsters could be seen. instructions. So if I try that again, I get, wow.

...52Let's explain what's going on here. Let's say setup required.

03:53:20OK. And then if it runs in production, it will also say, if you use the old method, your API keys are there and can be removed from that file after copying them to Rails credentials. then hopefully this is the last time i have to have a like kludgy blow up your site at boot feature oh man I don't love this kind of crash because again, I know that anybody who pulls this is going to get a crash from their production deploy, and that's pretty painful. But at least it is a break that is very clear about what's happening and it has instructions and it has comments and it is the least painful break I can make. And that's about as good as I can do right now, because we just predate that. All right, so having done that, let's put the credentials and the master key back in config and see if the specs run.

03:55:01Coming down on the home stretch here, so if anybody has any last questions or stuff they want to talk about, please throw your questions into the chat. Because if I can commit this, I'm going to end the stream because it's getting to cat food o'clock. And it's looking real good. Oh, standard, why don't you fix everything for me?

...32Why don't you fix everything unsafely for me? Don't use exit in Rails applications. What am I supposed to use? Rails logger debug. Whoa, that was indeed an unsafe edit.

...57Let's test this. Or you really don't like me wrapping onto a new line, huh? That is a limitation of standard RB there.

03:56:20Because I'm not actually passing a block. I'm passing a string.

...30And does the debugger even exist at this point? We got to test this again.

...42What the shit was that? All right, so I have my editor set up to run standard on right, and it just did the wrong thing. Are you confused about multiline? You're just confused in general about here doc. Wow. That is the first time I've seen standard RV go so wrong.

03:57:15jmiven standardrb is hungry too
Now you don't want to indent it at all. Are you on strike?

...25Yeah, no kidding. It's hungry. I don't know if you could hear the cat meowing in the background there. So where was that MV? Let's move the files away. frici sadly not.
Run that one spec that we know fails.

...48A syntax error? Am I writing Python with this triple quotes? There's something I haven't done for a hot minute. I bet it's still mad about syntax, isn't it?

03:58:23Gosh, standard RB, you could have just let me use puts.

...38Yeah, that's just... Standard RB does not know what to do with here doc. God, I've used here doc. We use it every time we have a big SQL code. That's weird. All right, what's the other multi-line string? Because I do not want to fight. Sure, a random medium post. Go away, oh my God. Who names your CSS?

03:59:36So you say I can do this, but standard RB just immediately demolished it. All right, let's actually do this different. What if I said config equals And then I grabbed this, and I said debug. and fig. Are we happy? Nothing's getting demolished. All right, we're happy. So we're just gonna do that again. I don't know what it is, but,

04:00:33So I get my nice exception. No. No, I get nothing. Because you replaced my puts with a debug instead of an error.

04:01:25How's that? Are you happy? I'm not happy.

...45And it deleted my, all right. I'm going to step away from the stream before I start yelling at standard RV. And I'm going to feed the cat and then I'm going to commit and push this. So thanks everyone for hanging out with me and coding. I hope if you had any ideas that I have for brains, they have been very thoroughly rebutted. mcollardx lol
Have yourself a nice evening and take care.