Off Topic
    • Categories
    • Tags
    • Users
    • Groups
    • Amazon
    • OT Fundraiser
    • Register
    • Login

    The OFFICIAL programming thread

    Tech
    22
    1.4k
    10.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • HogH
      Hog @Kilemall
      last edited by Hog

      @Kilemall said in The OFFICIAL programming thread:

      @Hog said in The OFFICIAL programming thread:

      @Hog said in The OFFICIAL programming thread:

      Contrast that with something like the Dart language which I’ve been playing with this week: it is backwards compatible to version one, includes a huge amount of stuff in their standard libraries (so that is also backwards compatible) and it means you can find a 7 year old Dart tutorial using similarly aged packages and your code will just fucking work.

      That was a brain fart. I was talking about Go in the above, not Dart. I dunno where “Dart” came from since I haven’t touched that in a couple of months. The only thing they have in common is that they are both languages created by Google.

      Like every language, Go has some warts and weirdness. The use of capatilization to determine privacy for example is a very weird choice. E.g. “position” is a private member, “Position” is public. Had to laugh after stumbling across the below maybe a day after having a similar but less violent reaction to the idea:

      YT Shorts: Primagen. Golang is great and here’s why I hate it

      Sounds like a UNIX supremacist conceit.

      You talking about file paths/names being case-sensitve in *nix when traditionally they weren’t in other operating systems?

      I think it’s just a concession to the lazy or slow typists. Instead of typing “pub foo” or “public foo” you get to write “Foo” and save yourself some keystrokes. Golang seems to attract people that are like that - there’s a hella lot of example Go code floating around with one letter variable names for instance.

      I’m down with x,y and i,j being used in loops but I would reject any other use of it if I were doing a code review in any other language. Some poor dev shouldn’t have to figure out wtf “m” stands for when they are supporting your program that just fell over in production at 3 am.

      1 Reply Last reply Reply Quote 2
      • HogH
        Hog
        last edited by

        A 10x faster TypeScript

        Was just watching the above (few month old) vid where they announced the rewrite of the TypeScript compiler from JavaScript to Go and are getting a 10x performance increase. They demonstrated how the current TypeScript compiler takes 63 seconds to compile the whole VS Code codebase from scratch whereas the Go version only takes 6 seconds. Whole thing sounds great yadda yadda and I’m sure the 10x speed increase is very welcome but I’m just awestruck how the JavaScript version can compile 1.5 million lines of code in 4,500 files in only 60 seconds which was obviously not the point of the demo.

        1 Reply Last reply Reply Quote 2
        • HogH
          Hog
          last edited by Hog

          Thought this from the front page of Hacker News today was interesting:

          3636e5e4-b553-42f0-93fd-c7a3e064f3b8-image.png

          AI World Clocks

          It’s a website that, every minute, asks 9 AI models (including GPT5, GPT4) to generate minimal code to show an analog clock with the correct, current time. Since it changes every sixty seconds, I can’t tell what it will look like when you click the link but the couple of times I tried it, only one of the nine clocks was accurate and some were barely recognizable as clocks. Interestingly, the AI model that succeeded in the task one minute failed the next minute and a different, previously failing, AI model succeeded so it wasn’t even possible to say, oh XYZ model is the best.

          I asked Gemini if the task limits and overall prompt were fair for testing different AI model’s code generation abilities and Gemini snitched on its friends and said the task was demanding but fair.

          HogH 1 Reply Last reply Reply Quote 2
          • HogH
            Hog @Hog
            last edited by Hog

            @Hog said in The OFFICIAL programming thread:

            it wasn’t even possible to say, oh XYZ model is the best.

            Looking at the hacker news comments and also viewing the clocks myself over several minutes, it seems like the Kimi K2 model is the most often correct. It still fails sometimes but not as often as the others. GPT5 or DeepSeek v3.1 might be second.

            1 Reply Last reply Reply Quote 0
            • HogH
              Hog
              last edited by Hog

              It fascinates me how there is a seemingly infinite number of ways the Qwen 2.5 model can fuck up the task. These are just 7 examples from maybe 12 attempts / minutes:

              collage_4x2.jpg

              Qwen 2.5 is not a state of the art model by any means but, still. You’d think it would at least fail in the same general step each time and not produce such random results. It’s not like it’s iterating and deliberately trying new approaches. Each time, it has no awareness that it has ever done the task before.

              GustafG 1 Reply Last reply Reply Quote 0
              • GustafG
                Gustaf @Hog
                last edited by

                @Hog said in The OFFICIAL programming thread:

                It fascinates me how there is a seemingly infinite number of ways the Qwen 2.5 model can fuck up the task.

                So AI truly has reached human levels of competence! We are truly living in the future!

                "Let's give it a week! Still a disaster? Let's give it another week…" -Tazz

                1 Reply Last reply Reply Quote 3
                • Gators1G
                  Gators1
                  last edited by

                  Kinda agree that Google should throw out an AI solution or something for this.

                  why everyone is mad at google (this time)

                  alt text

                  1 Reply Last reply Reply Quote 1
                  • HogH
                    Hog
                    last edited by Hog

                    Yeah I dunno. I mean given they own YouTube they should certainly be contributing dollars or resources to the ffmpeg project regardless but the world is a better place with their fuzz tool that finds these vulnerabilities and I’m not sure an entity finding and reporting a vulnerability should be obligated to fix it. They’d probably just shut the tool down if they had to. Other projects actually pay people to find vulnerabilities.

                    As an aside, that person behind that ffmpeg tweet has touched off a huge controversy and a lot of bad blood in the ffmpeg project. There was a vote to have their posting rights removed for poorly representing or misrepresnting the project and then people who voted in favor of that started getting TOS’d for bullying. Only mention it because I happened to watch the below for some reason and it went into detail about the drama:

                    Getting Ragebaited By FFMPEG Again!!
                    1 Reply Last reply Reply Quote 0
                    • Gators1G
                      Gators1
                      last edited by

                      I think the tool is awesome, but the time limit thing is sort of arbitrary. Nobody is thinking about whether this is a significant vulnerability, but the effect where they just report and auto disclose in 90 days is where there is a problem. Like in this case maybe there’s one download a year of the thing that was broken from the 1990s, but the Google disclosure makes it look like FFmpeg is broke and they have to deal with that fallout if they don’t fix it immediately. And also in this case if FFmpeg is integral to Youtube, they should give back and help with these things.

                      As far as the Twitter fight, I thought “talk is cheap, send patches” was pretty funny.

                      alt text

                      1 Reply Last reply Reply Quote 1
                      • Gators1G
                        Gators1
                        last edited by

                        Weird, in java: 1 == 1 is true and 1000 == 1000 is false. Seems like a communist language or something Tigger would like.

                        alt text

                        1 Reply Last reply Reply Quote 1
                        • HogH
                          Hog
                          last edited by Hog

                          Gemini gave me a long boring explanation of why that might happen with autoboxing and said you should do the comparison this way:

                          Integer.valueOf(1000) == Integer.valueOf(1000)
                          

                          I think I must have spent all of 24 hours learning Java decades ago before thinking, nah this is bullshit (too much boilerplate) and never touching it again. Stuff like the above seems to confirm it.

                          1 Reply Last reply Reply Quote 2
                          • Gators1G
                            Gators1
                            last edited by

                            This works too:

                            Integer a = 1000;
                            Integer b = 1000;
                            System.out.println(a.equals(b)); // true

                            And yeah, I would have quit as well had I even tried to learn it. That’s stupid.

                            alt text

                            1 Reply Last reply Reply Quote 1
                            • KilemallK
                              Kilemall Careful, railroad agent
                              last edited by

                              Code snobs!

                              https://i.imgur.com/hX2CMMZ.jpg

                              Never go full Lithu-
                              Twain

                              No editing is gonna save you now-
                              Wingmann

                              http://s3.amazonaws.com/rrpa_photos/72217/DSC_2528.JPG

                              http://s3.amazonaws.com/rrpa_photos/20416/PTOB 101_resize.jpg

                              1 Reply Last reply Reply Quote 2
                              • Gators1G
                                Gators1
                                last edited by

                                And Fortran boy shows up, the cave drawings of coding.

                                alt text

                                O 1 Reply Last reply Reply Quote 2
                                • O
                                  oyaji @Gators1
                                  last edited by

                                  @Gators1 said in The OFFICIAL programming thread:

                                  And Fortran boy shows up, the cave drawings of coding.

                                  Bah. We should have stopped at FORTRAN and Pascal. They did everything an engineer needed.

                                  © 2015 - 2025 oyaji

                                  KilemallK 1 Reply Last reply Reply Quote 0
                                  • KilemallK
                                    Kilemall Careful, railroad agent @oyaji
                                    last edited by

                                    @oyaji said in The OFFICIAL programming thread:

                                    @Gators1 said in The OFFICIAL programming thread:

                                    And Fortran boy shows up, the cave drawings of coding.

                                    Bah. We should have stopped at FORTRAN and Pascal. They did everything an engineer needed.

                                    Dads sims were Fortran and M204.

                                    https://i.imgur.com/hX2CMMZ.jpg

                                    Never go full Lithu-
                                    Twain

                                    No editing is gonna save you now-
                                    Wingmann

                                    http://s3.amazonaws.com/rrpa_photos/72217/DSC_2528.JPG

                                    http://s3.amazonaws.com/rrpa_photos/20416/PTOB 101_resize.jpg

                                    1 Reply Last reply Reply Quote 2
                                    • HogH
                                      Hog
                                      last edited by Hog

                                      I like Rust but it can pretty quickly get very unergonomic depending on the complexity of what you are trying to do (and async in Rust is a clusterfuck IMO) so I generally prefer to code in something else. That said, these claims are pretty dramatic:

                                      We adopted Rust for its security and are seeing a 1000x reduction in memory safety vulnerability density compared to Android’s C and C++ code. But the biggest surprise was Rust’s impact on software delivery. With Rust changes having a 4x lower rollback rate and spending 25% less time in code review, the safer path is now also the faster one.

                                      I drilled Gemini on the 1000x reduction claim and Gemini calculated it to be closer to 5000x.

                                      Rust in Android: move fast and fix things

                                      Rust in Android: move fast and fix things

                                      Posted by Jeff Vander Stoep, Android Last year, we wrote about why a memory safety strategy that focuses on vulnerability prevention in ...

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post