Threads for stig

    1. 1

      Writing a small couch-friendly video player based on MPV, SDL3 and OpenGL.

      I’ve first tried GStreamer and GTK4 from Python, but that leaked memory for no good reason. GStreamer was also not that eager to allow me adding external subtitles.

      At this point I just gave up and started prototyping in C. When I’m happy with the foundations, I’ll port it to Python with ctypes. The idea here is to make it trivial to obtain content from sources I follow, store it and track what I’ve watched.

      I have been using Kodi for quite a while, but it feels sluggish and increasing buggy lately and I gave up on the idea of organizing stuff into library that requires external authority years ago. I want files, directories and track content selectively.

      1. 1

        prototyping in C. When I’m happy with the foundations, I’ll port it to Python with ctypes.

        That’s the opposite trajectory from what I would expect. Care to share the thinking behind it?

      2. 11

        If writing a commit message is too much effort for you, you need to entertain seriously the notion that you’re bad at your job.

        1. 5

          You went past the good point (good commit messages for important changes bring a lot of value) and into the unnecessarily judgy territory. Some commits don’t need anything more than autogenerated summaries. I’d say lots of them don’t. For example

          1. 4

            Three of those commit messages clearly cover the why, rather than the what. (That is good!) That’s important context that I don’t think an LLM could come up based on the change.

            1. 1

              I disagree any of those say “why”. Why update the version (because that’s the point of the distro) , why more alignment options are needed (improve compatibility slightly, but don’t provide all variants at this point), why switch to new Ubuntu (likely the old one is EOL). Only the last one touches slightly on why (satisfy rubocop), but… why?

              They’re simple summaries of what has actually changed.

              1. 1

                Agreed… those are subpar commit messages. That doesn’t mean that we “don’t need anything more”.

          2. 3

            No one said it’s too much effort. Automating what you can doesn’t imply or entail a change in standards. My phone’s typing autocomplete is pretty good now, and I still edit.

            Looking for our own weaknesses is regular practice, not the exception.

          3. 20

            I don’t get it. Who is this for?

            When I’m digging through git history I’m usually interested in the why of a change, not the how. For example, why this implementation rather than a more straightforward one?

            You can always ask an LLM to describe or explain a commit. It can’t tell you the why, though. So put that in the commit message.

            1. 7

              I write the “what,” then elaborate on the why or how in the case I think it isn’t obvious.

              You’re right that the why couldn’t be inferred from the stage and would have to be added afterward. But I might take the head start if it sticks to the vocabulary I would typically use.

              1. 4

                That’s interesting. I care much more about the “what” in commit messages (in case I need to track a bug down) and the “why” should be relegated to a PR, which can map to feature requests, cases, etc.

                1. 15

                  Linking to PRs from a commit message is terrible IMHO. Forges change, links go dark for various reasons…

                  I’m with the OP, good commit messages not just summarize the change but give background context.

                  If it just repeats the changes, there is no value added. That’s like tautological comments that just rephrase what the next two line of code do.

                  1. 2

                    Linking to PRs from a commit message is terrible IMHO. Forges change, links go dark for various reasons…

                    I wasn’t really advocating for linking to PRs from commit messages but I guess it doesn’t matter much. I also don’t think that at a company it matters much if a link goes dark years later and you lose some context, but I’d also recommend that even if you migrate that you archive such things anyways.

                    I’m with the OP, good commit messages not just summarize the change but give background context.

                    For a merge perhaps, but for intermediary commits? I’m wondering how long your commit messages are.

                  2. 4

                    Personally I consider pr just this - here’s the info for your reviewing pleasure. It’s by no means a permanent record. I never look at old prs, as I don’t do coding in a web browser.

                    1. 2

                      You can capture both in a single line. To do that you need to put some effort in being able to write clear and concise bits of prose.

                  3. 26

                    Is writing a 150 character commit message so difficult that it warrants invoking an omniscient AI big hammer LLM? I am not sure what this is for

                    1. 13

                      It’s funny, I think the answer is probably “yes” given how many commit messages are “try” “lol” “ugh try again”.

                      1. 14

                        It may hit a bit close to home, but the folks too lazy/sloppy/unskilled to properly handle good commit messages probably are the ones most easily replaced by LLMs.

                        1. 9

                          Imagine if some people use this to create more descriptive commit messages for their personal projects. Crazy, I know.

                          1. 4

                            This right here. Spicy autocomplete is pretty good for writing a sentence when you’re mentally casting about to find the words.

                              1. 4

                                As long as the LLM prompt is not “try” or “lol” or “ugh try again”

                              2. 2

                                Well, let’s consider the cases. If the commit message that one would have put was “try” “lol” “ugh try again”, then what did we gain by having a more verbose commit message written by the LLM? Conversely, if the commit message is actually very important, should we really use an LLM to write it for us?

                                1. 2

                                  A very fair point, although I was being a bit tongue in cheek with my comment. I agree with you.

                                2. 1

                                  Arguably those provide more context about the “why” than an LLM-provided summary of the change: they convey that the committer is in a hurry, and that this is likely an (attempted) fix to a recent commit by the same author, probably as part of the same merge.

                                  1. 2

                                    I’m ambivalent tbh. I know amazing devs who write those silly little intermediary commits. I try to organize my commits because I assume someone, one day, might want to review a commit log to figure stuff out, but I don’t have strong feels because I rarely do that myself.

                                    1. 4

                                      Most of the people I know who write those sorts of commits tend to be basically using them as fixup commits, except that they tend not to be aware of --fixup and probably find their flow more convenient anyway. When their change eventually appears in the main branch, it’s almost always squashed down to a single commit with a single well-written description (usually done via PRs in some git forge or other).

                                      Or in other words, I suspect the people writing those intermediary commits usually see them as temporary, and I don’t think they’d get much out of an LLM describing their changes.

                                      1. 1

                                        Perhaps, yeah. I tend to clean up my commit history to remove those intermediary ones as well fwiw, but I know a lot of people who don’t. I suppose the answer isn’t “use an LLM” (I know I won’t) but to just learn how to rewrite your history properly.

                                        1. 1

                                          Or even use tools that make managing your history easier. I do think Git makes it excessively hard to rewrite commits and maintain a history of the rewrites that you’re doing, which leads to people taking the “squash everything in a PR” approach, which is typically a lot easier. But better tooling in this regard can improve things a lot.

                                          That said, this is perhaps getting a bit off-topic from the core idea of LLM-based commit messages.

                                3. 5

                                  Most simple use cases of LLMs are not that much more than an admission of the user’s own incompetence.

                                  1. 2

                                    Sometimes there’s no bigger meaning behind some changes. It’s either obvious why it’s done or it becomes obvious in context of other changes. Writing commit messages for that is just going through the motions which means sometimes it becomes “refactor” or a similar message. In those cases it could be nice to have an automatic summary instead of nothing.

                                  2. 4

                                    My wife and son have been away for nearly five weeks, but I’m picking them up at the airport on Saturday morning. The rest of the weekend will primarily be hanging out with them, and doing what I can to soothe their jet lag.

                                    1. 1

                                      I’m attempting to remove a database table we use to store surrogate identifiers into another service. A while ago we started storing a different identifier that we can use instead as part of a natural key, but we haven’t made change to actually do that yet. We join against this table from a few busy queries and look forward to clean up the core and encapsulate the gnarly bits at the edge. The natural key will not be quite as efficient, as there’s a bit of redirection involved, but it’s not used for the all operations so I’m confident it will balance out.

                                      1. 13

                                        If I had the time I’d love to make something that teaches assembly by setting progressively harder challenges that you solve in a simulated RISC-V system. Something like what the Lichess website uses to teach Chess combined with the Little Man Computer.

                                        You would start with only RV32I and it would make you do some loading/storing and arithmetic and loops. Gradually the CPU would gain the M(ultiply), B(itmanip), and C(ompressed) extensions and you would have to complete challenges with limited instructions or memory. Eventually a second core would be added and you’d get the A(tomics) extension, or the privileged spec would be introduced and you’d have to correctly handle interrupts and syscalls from an unprivileged program.

                                        I think it would be a fun way to learn assembly and basic computer architecture and realistically someone could make and evaluate something like this for an undergraduate dissertation.

                                        1. 5

                                          Something I dream of, too. I’ve thought about how to build up in abstraction from something like a Zachtronics game, some discussion in this old blog post (and this older one).

                                          I tried doing this in a graduate program but never really got my act together. If you do find the time I’d love to see how it goes, please reach out if you’d like to talk through the design.

                                          (Edited a few times but) in case you haven’t seen it, there’s a neat modern take on assembly-ish programming puzzles in Human Resource Machine (and a parallel programming sequel!). The ambitious Turing Complete has you build a computer from gates and design a machine code for it.

                                          1. 3

                                            You might be interested in the games TIS-100, Exapunks, Shenzhen I/O, MHRD, and Comet 64.

                                              1. 1
                                              2. 1

                                                Shameless plug, but if anyone’s interested in one-instruction set architectures, I made a TIS-100-like subleq programming game that is free: https://jaredkrinke.itch.io/sic-1

                                              3. 2

                                                Have you seen human resource machine? It might not be the specific instruction set you’re after, but many of the elements you mentioned are there.

                                                Edit: whoops, I see a sibling poster already mentioned it. It’s a great game though.

                                                1. 2

                                                  Not specifically about assembly but nand2tetris sounds similar that it may be inspiring at least.

                                                2. 2

                                                  Peer feedback and reviews for work ._.;

                                                  Tis the season’

                                                  1. 3

                                                    On the weekend? I’d humbly suggest peer reviews for work should happen during weekday work hours.

                                                  2. 2

                                                    Gawping at all the local destruction left by Storm Éowyn, probably. Thankfully so far I have escaped any serious damage, although a large (empty) terracotta plant-pot absconded its usual location and crashed into the side of my car. I haven’t been out to check how serious it is yet, hoping for no more than surface-level scratches low on the front passenger door…

                                                    Also practice guitar and prepare for my songwriting course on Monday.

                                                    1. 2

                                                      a) Working at $dayjob. We got a new security convention being setup, so I need to redesign the access/flows of all CI/CD pipelines to our infrastructure/services. Fun stuff (genuine, not sarcasm, I love that part of the job).

                                                      b) Working on a useless but fun project: a VM with a custom assembly language/bytecode, and an IDE made with imgui, will opensource it as soon as I have a MVP, screenshot here in the meantime: https://ibb.co/DQCxrqw

                                                      c) Selling my house that I bought 3 months ago. I spoke in a previous thread that there was a group of teenagers trying to forcefully enter my home, well they came back, multiple times, and things escalated. Today they broke a window and some other degradations (on stuff that was solid enough that it would require actual weapons to break), but fled when the (new) alarm (105db) was triggered. I was at my parents home since a few weeks, but now, there is no way I’ll go back to that house. 3rd visit to the police in a month? I won’t wait for a 4th time.

                                                      1. 1

                                                        Working on a useless but fun project: a VM with a custom assembly language/bytecode, and an IDE made with imgui, will opensource it as soon as I have a MVP, screenshot here in the meantime: https://ibb.co/DQCxrqw

                                                        0x50 is the opcode for movb? Looks fun! I’m planning to take one of my toy isa projects and write some different implementations of the architecture. Some way to hook into an implementation to do graphical representation of state is always good.

                                                        1. 2

                                                          Opcodes are either:

                                                          struct {
                                                            int iset  : 4;
                                                            int instr : 2;
                                                            int size  : 2; // 0b00 = byte, 0b01 = word, 0b10 = dword, 0b11 = qword
                                                          }
                                                          

                                                          Or

                                                          struct {
                                                            int iset  : 4;
                                                            int instr : 4;
                                                          }
                                                          

                                                          0b0100 is the mov rm/m set of instructions (moving values between registers and memory).

                                                          0b0101 is the mov rm/i set of instructions (moving operands to registers or memory, or from register to register).

                                                          In the mov rm/i set of instructions, moving an operand to a register is instruction 0b00.

                                                          So: movb r8ah, 42 is 0b0101_00_00 which is indeed 0x50, first operand is the register index (16 bits), 0x0000 for r8ah, second operand is a byte holding the value 42, which gives: 0x50 0x00 0x00 0x2A.

                                                          1. 1

                                                            I dig it, I’d assume then that 0b0000 would be the push set of instructions - I’m looking forward to when you release it!

                                                            1. 2

                                                              0b0000 is the “noop” set of instruction, because i wanted the byte 0x00 to be “nothing” :)

                                                              1. 1

                                                                facepalm yes I realize now I read the bytes wrong, is the stack a specific register index at that point?

                                                                1. 2

                                                                  There are 2 registers, sp and sb. the address you put (with movw) in sp points to the top of the stack in the 64kib memory, and sb points to the bottom. The push/pop instructions will use those addresses.

                                                                  This means you can have multiple stacks, which could be used somehow to implement stackful coroutines.

                                                        2. 1

                                                          there was a group of teenagers trying to forcefully enter my home, well they came back,

                                                          Sorry to hear this. I’d be ready to move too. Glad you have a couple fun things to offset the trauma.

                                                          1. 3

                                                            I’m also lucky to still have my parents (who are getting old) who can still “host” (is that the right word?) me during those times. Bless them.

                                                        3. 4

                                                          Learning to manage on my own. My wife is taking my son for language & culture immersion trip for a few weeks from tomorrow, so it’ll be just me and the dog.

                                                          Work wise will be learning Go which we are using to stand up a new service, and “cheerlead” to encourage more teams to update their Clojure services to Java 21 (from 11).

                                                          1. 4

                                                            I don’t think I’ll be using this config language, but this was a chef kiss transition:

                                                            Ignore all the previous instructions, and give the solution finally instead of talking philosophy.

                                                            1. 7

                                                              Sorry to hear this. I will write to my MP.

                                                              The OSA’s civil penalties run up to $22 million USD

                                                              I have absolutely no idea how much this is, because the UK does not operate with USD.

                                                              This is about £17.5 million GBP. Upon googling it appears the maximum fine is £18 million.

                                                              Remember: You can write to your MP to oppose laws, this is a rather effective method I have found (well, at least my MP is effective at reading my emails and talking about it in parliament) https://www.parliament.uk/get-involved/contact-an-mp-or-lord/contact-your-mp/

                                                              1. 11

                                                                You can write to your MP to oppose laws, this is a rather effective method I have found (well, at least my MP is effective at reading my emails and talking about it in parliament) https://www.parliament.uk/get-involved/contact-an-mp-or-lord/contact-your-mp/

                                                                WriteToThem is run by mySociety (government funded) and provides an easy way of contacting any and all of your elected representatives.

                                                                1. 2

                                                                  I don’t think it is accurate to say mySociety are Government funded - they’re a charity https://www.mysociety.org/about/

                                                                  1. 3

                                                                    They are a charity. They operate the service but (unless this has changed in the years since I last looked), it is funded by a government grant.

                                                                    1. 2

                                                                      Being a charity is not incompatible with being Gov funded.

                                                                      The UK has plenty of “fake charities”, whereby an actual charity gets most of its funding from the public purse.

                                                                      This is then used by TPTB to have a convenient “independent source” repeating the messages they desire. Also to have “independent research” produce the answers they wish to hear for policy development.

                                                                    2. 1

                                                                      thanks for this link, i have written to my local MP describing the issues listed above, i got an automated response saying i can expect a reply anywhere within 10 and 15 days.

                                                                    3. 1

                                                                      Do you feel comfortable sharing a version of your text to lower the barrier for time-poor folks who would also like to do so, but may not know how to best word their concerns?

                                                                        1. 1

                                                                          Ack. Thank you, that is helpful.

                                                                          Edited to add: I have now written to my MP using the WriteToThem link provided in another comment. (Go upvote that.) I found the process much simpler than I thought, and recommend others do the same.

                                                                    4. 4

                                                                      In management or human resources books there is usually a chapter about team members and different personalities – some people bring new ideas and are great starters and others are rather finishers or maintainers. The conclusion is that you need both kinds of people in the team.

                                                                      1. 5

                                                                        In construction we say Anyone can start a job but few can finish it.

                                                                        1. 3

                                                                          Anecdotally my brief forays into DIY confirms this :-)

                                                                      2. 39

                                                                        Nothing.

                                                                        In line with CGP Grey’s Yearly Themes I am going to start the Year of Practice – taking skills I already have and improving them. On the list:

                                                                        • Pixel Art
                                                                        • Marimba
                                                                        • CAD Design
                                                                        • Drawing (maybe)
                                                                        • Electronics/Soldering
                                                                        • Carpentry
                                                                        1. 3

                                                                          Thanks for that video link! I’m going to try find a theme for the quarter rather than a resolution for the year.

                                                                          1. 3

                                                                            No problem. Spread the word, Themes > Resolutions! Doing it for a single quarter is a fantastic way to get used to the concept, great call there.

                                                                          2. 1

                                                                            all the best! what resources are you using for cad design?

                                                                            1. 1

                                                                              I use OnShape. Free basics with no limited functionality just limited projects which is fine for hobbyist. It’s fully featured though unlike other free ones.

                                                                              They also have copious online tutorials I am working through while making my own stuff for our 3D printer (prusa mini)

                                                                          3. 3

                                                                            It’s going to be the first time my wife and I’ve left the house on NYE since 2010. This year we’re doing a short set at a local bar, along with other bands we know. Really looking forward to it, though thankful we’ll be on first so I don’t have to stay awake the entire evening 🤣

                                                                            1. 1

                                                                              Kids grown up enough to go out on their own?

                                                                              1. 2

                                                                                Mature enough (at 13) to stay at home with the dog and play computer games online with friends. They celebrated the new year with fireworks in Minecraft. He had the offer of coming with us, but declined.

                                                                            2. 6

                                                                              All 3 of my job interview prospects just dried up within 2 days despite having some of the best interviews of my career so far, and now I’m back to nothing.

                                                                              So tired of this…

                                                                              1. 2

                                                                                What was the feedback? I ask because I’ve been low intensity doing interviews for a while and TBH I think my engineering skills have improved but my interview Julius-fu has seriously atrophied

                                                                                1. 4

                                                                                  Absolutely no feedback on all 6 of them – “We decided to go a different direction”, “We picked a candidate whose skills more closely aligned”.

                                                                                  I have 12 years of dev experience and have done countless interviews now; I can confidently state that I know for a fact I am very good at interviews, both technical and non-technical now.

                                                                                  The most recent one, my last interview went so well the interviewer interrupted me and said “you’re absolutely crushing it lets move on” and then ended the interview asking if I would consider other roles at the company too because he “wants my technical expertise in more than a managerial role”. They just emailed me a “no” today.

                                                                                  1. 2

                                                                                    truly bizarre behaviour on their part. I read in multiple places that the tech job market is particularly crazy (bad) this year.

                                                                                    1. 2

                                                                                      I have found that one does have to ask for feedback. The level of specificity is quite variable.

                                                                                      1. 1

                                                                                        “We decided to go a different direction”,
                                                                                        “We picked a candidate whose skills more closely aligned”.

                                                                                        I can confidently state that I know for a fact I am very good at interviews, both technical and non-technical now.

                                                                                        I don’t know you, nor the roles you’ve gone for, but nevertheless here’s some unsolicited thoughts. (You’re welcome, I guess? 🤷‍♂️)

                                                                                        It sounds like there could be a disconnect between your skills and the positions you’re going for. There’s several reasons this could be the case. You could be genuinely overqualified, and the company may assume that they can’t keep you interested or afford you. The hiring manager, interviewer, or company could feel threatened by you. Or you may come across as an arrogant asshole.

                                                                                        In my first job we were interviewing for a CTO at a small startup. We had a great candidate that the entire tech team approved of, but the CEO (our direct manager) rejected because he felt threatened. He realised that the potential hire had the skills and experience to make him obsolete, and decided to hire someone else that he could control and would do as he said. (The company folded, eventually.)

                                                                                        A friend with a Phd in Chemistry struggled to get an entry-level job as a sysadmin (he was fed up with Chemistry) because hiring managers felt they couldn’t pay him what his Phd deserved, and he didn’t have the experience for more advanced positions that paid what they felt they had to pay someone with a Phd – even though it was in an irrelevant domain.

                                                                                        Another friend worked at a company where the person taking candidates to lunch between other interview sessions had a veto on hiring. Yet another friend used to check (back when interviews were in person, on site) with reception staff, security staff, and cleaners that had interacted with the candidate to verify that they had treated them nicely.

                                                                                        I’ve also met (and maybe been?) candidates that had high opinions of themselves and came across as very confident, but to me seemed utterly unimpressive. I don’t know if they were delusional about their own skill level, or whether their skills were so far beyond me (as the interviewer) that I didn’t recognise it and thought they were deluded.

                                                                                  2. 1

                                                                                    The two apps I use the most outside work are https://songbook-pro.com/ and the https://www.oolimo.com/en/. I have bought iOS and Android versions of both.

                                                                                    My band manages our set lists in the former, and it’s a delightfully simple UI at first, with many advanced features that are easily accessible if you need them but stay out of your face when you don’t.

                                                                                    I use the latter to quickly discover variations of chords, and learn chord names for more esoteric ones.

                                                                                    PS: thank you for the Paprika recommendation! It looks like exactly what I want for my recipes. I currently manage them in Emacs Orm mode but they’re not accessible where I need them: on my tablet in the kitchen.

                                                                                    1. 2

                                                                                      ZSA Moonlander with a Dvorak-ish layout when at main computer. (Which is mainly for work.). I love the ortholinear layout, but the build quality could be better. I wish it came in a cheaper variety without the gimmicky tri-colour LEDs under each individual key. I only ever activate them by accident, as I find them very distracting. I’m told they’re useful for building secondary layers, but that’s a feature of this keyboard I’ve never set up.

                                                                                      On phone and tablet I use Qwerty, switching between English and Norwegian depending on context.

                                                                                      1. 4

                                                                                        Colemak, usually on an Atreus keyboard, though also on regular staggered layouts. I actually can’t touch type on other layouts anymore, at least not without a few minutes of practice.

                                                                                        QWERTY on touchscreens, no point in switching imho. I actually really like Apple’s flick-style keyboard for Japanese and wish a layout like this would exist for Roman alphabets, I frequently struggle with the smaller keys.

                                                                                        1. 1

                                                                                          I also use Colemak, mostly on an Atreus, sometimes on other keyboards (a CloudNine ErgoFS and a generic 60% gaming keyboard). I never fully lost my QWERTY touch-typing ability, though it did go down to 40wpm, and I have to look at the keyboard just to mentally change contexts. Lately, my QWERTY has been coming back as there are a few contexts where I use it more.

                                                                                          1. 1

                                                                                            I actually can’t touch type on other layouts anymore, at least not without a few minutes of practice.

                                                                                            Does this ever cause you trouble when you need to use somebody else’s keyboard with a more mainstream layout?

                                                                                            I was really worried about “losing” QWERTY, especially in situations like a job interview where they give you a laptop to write code with. Like you, it takes me a moment to switch back and remember to touch type. I still make mistakes with keys that are close-but-different in Colemak like S, but it’s not as bad as I worried.

                                                                                            1. 2

                                                                                              I can’t speak for OP but I never learnt to touch type on Qwerty, only ever on Dvorak. That was before my first job interview in programming. (20+ years ago now.)

                                                                                              Lack of touch typing on Qwerty has never held me back in interviews. It’s never even occurred to me to worry about it. I’ve never been tested on my typing speed, and wouldn’t take a job that tested me on such an absurd metric (for programming) anyway.

                                                                                              As an interviewer I wouldn’t fail anyone on their typing speed, certainly not if they explained they’re unfamiliar with Qwerty. Then again we don’t actually have any interviews where we even could measure it. The only interview we do that involve typing is a pair programming one, but it’s more a refactoring exercise than banging out code. And it’s a remote exercise, so you do it on your own keyboard.

                                                                                              Don’t let fear of getting worse at Qwerty hold you back from switching to something else.

                                                                                              1. 1

                                                                                                You’re right, as an interviewer I wouldn’t judge someone’s typing ability or speed, but as the interviewee I remember feeling slightly panicked and frustrated that I was having to think so hard about where the right keys instead of concentrating on the questions and the code. In the end it was fine and the muscle memory came back enough that I could focus on the important stuff.

                                                                                              2. 1

                                                                                                Everyone worries about this, but in ten years I have not had to use anyone else’s computer in a meaningful way. There’s the occasional family tech support, but it’s not like I’m typing novels doing that.

                                                                                                An interview where someone would hand me a computer to work on is an interview I would probably end at that point, no interest in places that think that’s reasonable practice.

                                                                                          🇬🇧 The UK geoblock is lifted, hopefully permanently.