Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)TH
Posts
11
Comments
602
Joined
2 yr. ago

  • In general I agree: ChatGPT sucks at writing code. However, when I want to throw together some simple stuff in a language I rarely write, I find it can save me quite some time. Typical examples would be something like

    "Write a bash script to rename all the files in the current directory according to

    <pattern>

    ", "Give me a regex pattern for <...>", or "write a JavaScript function to do <stupid simple thing, but I never bothered to learn JS>"

    Especially using it as a regex pattern generator is nice. It can also be nice when learning a new language and you just need to check the syntax for something- often quicker than swimming though some Geeks4Geeks blog about why you should know how to do what you're trying to do.

  • My test suite takes quite a bit of time, not because the code base is huge, but because it consists of a variety of mathematical models that should work under a range of conditions.

    This makes it very quick to write a test that's basically "check that every pair of models gives the same output for the same conditions" or "check that re-ordering the inputs in a certain way does not change the output".

    If you have 10 models, with three inputs that can be ordered 6 ways, you now suddenly have 60 tests that take maybe 2-3 sec each.

    Scaling up: It becomes very easy to write automated testing for a lot of stuff, so even if each individual test is relatively quick, they suddenly take 10-15 min to run total.

    The test suite now is ≈2000 unit/integration tests, and I have experienced uncovering an obscure bug because a single one of them failed.

  • First of all, that speech is awesome.

    But I want to comment on something regarding modding, and ask an honest question: Shouldn't reiteration of historical speeches or texts be omitted from rules about slurs? I mean, reiterating a speech, or a section of Huckleberry Finn, is obviously not the same thing as devaluing someone by calling them a slur. We actually have a quite hot debate going on in my country about this now, where some teachers were harassed for "being racist", because in class they read aloud a famous poem written by an immigrant about racism, where he writes some of the things that were shouted at him. The whole point of the poem, and of reading it in class, is of course to make a point out of how bad racism is, and to educate about racism. Still, these teachers have been stamped as "racists" because they reiterated specific words in the poem.

    For the honest question (I'm not American or a native english speaker): Isn't there a historical difference between the word "Negro", and a certain similar word I'll refrain from reiterating? The way I've understood it, the former is a historically more neutral form, that was simply used the way we today would use "black person", while the latter has more or less always had some kind of devaluating undertone. I've gotten that interpretation, among other things, from having read speeches where people are promoting equal rights, and use "Negro" to refer to black people, while clearly not believing that they are inferior in any way (hence the promotion of equal rights). Of course, today, both words are considered unacceptable, but I would like to clarify if I've misunderstood, as it helps in interpreting things that were said or written in the past.

  • I would love to see Harris just stop for a second, turn over towards Trump, and say something like "Your mic is turned off you know, could you stop yelling for a moment?", and have the cameras cut to a silent video of Trump furiously yelling at his turned-off mic.

  • This is a very "yes but still no" thing in my experience. Typically, I find that if I write "naive" C++ code, where I make no effort to optimise anything, I'll outperform python code that I've spent time optimising by a factor of 10-30 (given that the code is reasonably complex, this obviously isn't true for a simple matrix-multiplication where you can use numpy). If I spend some time on optimisation, I'll typically be outperforming python by a factor of 50+.

    In the end, I've found it's mostly about what kind of data structures you're working with, and how you're passing them around. If you're primarily working with arrays of some sort and doing simple math with them, using some numpy and scipy magic can get you speeds that will beat naive C++ code. On the other hand, when you have custom data structures that you want to avoid unnecessarily copying, just rewriting the exact same code in C++ and passing things by reference can give you massive speedups.

    When I choose C++ over python, it's not only because of speed. It's also because I want a more explicitly typed language (which is easier to maintain), overloaded functions, and to actually know the memory layout of what I'm working with to some degree.

  • The point the other commenter is making, which I fully agree with, is that I can have legitimate reasons for not wanting to update. Windows shoving updates down my throat when they can potentially break critical stuff on my machine is pretty much just equivalent to forcing malware on me.

  • I think it's horrible to see what the Taliban government is doing to oppress the people of Afghanistan. I'm also surprised that so few people of Afghanistan showed any real will to prevent Taliban from taking power. They had 20 years to prepare, with ample support and loads of equipment from NATO and others, and when the foreign forces left they just ... capitulated.

    It's baffling to me that seemingly nobody was willing to fight to prevent this. Thousands of people were at the airport during the last evacuations, and I vividly remember videos of people holding on to cargo planes that were taking off in an effort to get out of the country. Lots of people clearly knew it was going to get bad, but seemingly nobody was willing to fight to prevent it. I honestly have a hard time understanding how that happened.

  • Of course, Li-ion batteries will never cover large-scale power demand. Not primarily because of lack of lithium, but because it's a technology that scales far too poorly into the MWh/TWh scale, and has a far too short lifetime.

    The battery tech we need for truly large scale storage is different from what we need for small, portable storage. Stuff like redox-flow batteries are looking promising.

    There's also hydrogen, with different storage methods being actively researched- from direct storage to using ammonia as a carrier.

    The issue with using mechanical storage (like pumped hydropower) is threefold (off the top of my head):

    1. It has ridiculously low energy density
    2. Even after > 100 years of pumps and turbines, the power loss in a pump/release cycle is very high.
    3. It's heavily limited by geography

    I'm not saying pumped hydropower isn't part of the solution: I believe the solution is that we need many solutions. I just think it's important to point out that battery tech isn't some monolithic thing, and that there are issues with pumped hydropower (and mechanical storage in general).

  • And that's just regarding stuff that's distributed pre-built with a package manager. Truth is, if you're down to build stuff from source, you can just follow the Linux guide and everything will work right out of the box far more often than not.

  • I've been doing the same thing, went back to read it now, and I have to admit I had a good time. Even though it took time to manually turn my comments into gibberish, it gave some hilarious results!

  • Came here to say this. Just get home brew up and running. One you have gcc and your other basic tools installed, there's very few Linux guides that won't work on a Mac. A couple shell tools have different names, but that's about it.

  • The currently most viable counter to artillery in Ukraine today appears to be either fpv drones, which have relatively short range and limited payloads, or counter-battery radar + artillery, which exposes your artillery by putting it in range of enemy artillery.

    Ukraine typically has more accurate artillery than Russia, and seems to win more artillery duels, but of course still has an issue because of Russias huge volume of guns.

    Targeting the drone operators is definitely something both sides do- they were considered priority targets last time I heard someone mention it. The issue, as someone else pointed out, is locating and hitting a small, highly mobile person or group that can operate from behind cover and concealment. That turns out to be pretty hard. Just consider that an infantryman's primary survival strategy is "stay hidden when you can, covered when you can, and move as fast as possible when exposed", and that drone operators are doing exactly that, while also not needing to stick their head out to be effective.

  • The issue with cruise missiles and bombers as a response to artillery fire is the response time and air defences.

    A cruise missile launched from well within Russia takes long enough to reach the target that mobile artillery has sufficient time to get out. You also need a significant amount of missiles if you want to get any through the air defences.

    Bombers struggle to get in range for conventional bombs without being shot down. They also have the issue of response time.

    Cruise missiles and bombers are more suited to rather stationary targets, like a command Center, FOB, strongpoint or trench system.

  • I'm all for age of consent, but considering that you can have graduates as old as 19-20, and teachers as young as 23-24, I have to admit it seems a bit strange to put restrictions on what they can do outside of (1) what is legal, and (2) what effects their job (like having a relationship with a current student, especially one that you teach).

    Like, I know several people in my graduating high-school class that were with someone older than our youngest teacher, a couple of which are still together with the person 10 years later.