Giver of skulls

Verified icon

  • 0 Posts
  • 43 Comments
Joined 101 years ago
cake
Cake day: June 6th, 1923

help-circle

  • They’re in the defence industry, so I understand why they put limits on nationality. Their selection is very weird, though. Even with security clearance issues, you’d expect a French company to put French citizenship on the list.

    The job description is here. My guess is that the “TACTICOS Combat Management System” is being developed on from various offices, and that they’d like someone to either be fully local or be able to communicate efficiently with any other office (to prevent cultural communication boundaries or something like that).

    It’s also possible this is some kind of passport thing. Not every country has passport deals with the same countries. If there’s a chance you need to be shipped off to a certain place, the whole process will be a lot easier if you have a passport that allows for a quick and easy work visa.


  • I’m not sure this proposal can replace Typescript. It doesn’t support any of the more powerful Typescript features as far as I can tell. Basic types in Javascript are a great step forward, but I don’t expect them to be very popular if they can’t describe things like partial JSON objects for working with APIs.

    Out of all the transpiler steps in “modern” JS, I don’t think I’ve ever seen Typescript suck up all that much performance. Splitting code into streaming files, doing whatever dark magic makes modern JS compatible with IE 9 for some reason, and setting up hot reloads used to be the heaviest part of my workflow. Working with Typescript sucked up a lot of RAM in my IDE, but that as mostly because the types I was working with were created in Javascript that read like code golfing sometimes, generating three or four types for every possible API call.


  • No, that’s not valid HTML, but to the annoyance of pedants and purists everywhere, this is spec-compliant HTML that doesn’t even generate a warning in the validator:

    〈!doctype html>
    〈html lang="en">
    〈title>Hello〈/title>
    〈p>world
    

    Always remember to save dozens of bytes by ignoring optional closing tags and unnecessary opening tags! You’ll save microseconds of network transfer time and piss off dozens of people who inspect your HTML!

    Edit: damn you, Lemmy, stop stripping my tags! Just pretend 〈 is the real less-than character because Lemmy strips it out.



  • Cargo is a pretty good tool, but it’ll happily fill up your disk with cached copies of crates that you downloaded somewhere in your user folder. Using a modern fs like BTRFS with extent deduplication helps to save space, but it doesn’t solve the problems.

    pip and npm are practically equally bad, at least the maintained versions. If you’re using old versions that haven’t been supported for years (Python 2 etc.) then you’re in for a world of pain with both.

    There are much worse alternatives. Anaconda, for example, takes half an hour to resolve dependencies while also autoloading itself into your shell, adding up to half a second (I timed this! I thought zsh was bugged!) of latency between shell prompts.

    The worst tool is probably what many C(++) projects seem to do: use Git as a dependency manager by including entire git repos as submodules. I’m pretty annoyed at having to keep multiple versions of tokio around when building a Rust project, but at least I’m not downloading the entire commit history for boost every time I clone a project!


  • The non standard byte lengths Microsoft still maintains are all perfectly valid within the C/C++ spec. They sure chose interesting defaults, but the issue is that the language spec basically defines a byte and says “as long as short is shorter than int and long isn’t shorter than int you’re probably good, good luck lol”.

    Microsoft did royally fuck up with VC++ 6 adding tons of non standard extensions in ways that weren’t immediately recognisable (though they were improvements tk the language) but they’ve mostly corrected themselves since.

    If data structures weren’t working with MSVC, you’re probably working with non-portable code in the first place. Don’t assume an int is 32 bits long! I’ve tried compiling a library or two for microcontrollers and people sure like to pretend that the standard defines them to be 32 bit at minimum! Why can’t people usebint32_t if they need to hold numbers of a certain size, for fuck’s sake.

    It’s pretty funny how MSVC went from “invented their own dialect” to “one of the most complete compilers when it comes to modern standards”. Their error messages have improved massively as well. Their tools just don’t do Linux or obscure architectures, malking them a rather regrettable choice for many open source projects out there.



  • Serverless and no code sounds like the homoeopathic approach to software.

    Paying a subscription (flat fee per developer + a percentage of your revenue, of course!) to give managers the feeling that business is doing better. Unlike most improvement solutions, this one doesn’t actually introduce unpredictable third party code into your business that IT needs to fight into submission and firewall the hell off, so you’re actually saving money in the process!


  • As for point two and three: have you ever seen what happens when someone new tries to get a patch intl the Linux kernel, the world’s most famous open source project? There is no single issue tracker, the only way to submit patches is by email, the patches themselves get through several chains of developers responsible for specific parts of the kernel, getting code reviewed can take a while, and most people give up before they’ve refactored their code to the Linux kernel specifications.

    The status of the server doesn’t make any difference when it comes to open sourcesness. It wasn’t that long ago that every open source browser was exactly that: an open source client to proprietary servers.


  • Last time I set up such a system was for a course several years ago, I don’t know what linters are popular these days. Flint used to be pretty good but it’s no longer maintained. Back then I set up a combination of cppcheck, clang with almost every optional warning, and clang-tidy for formatting. clang-analyze and cppcheck will compliment each other nicely but you do need to play around with their configuration to make informed decisions about conflicting advice every now and then.

    Microsoft’s compiler does have warnings about certain risky uses of raw pointers, so using MSVC may be a good idea for safe programming until clang and g++ catch up. On the other hand, MSVC++ is behind on certain other C++ features, so you’ll have to weigh your options here.

    There isn’t much documentation I can find on the topic of setting up a linter to enforce modern memory management. Most people asking for information about it seem to get responses from C++ experts telling them raw pointers are fine for and that you shouldn’t be scared of them, but I disagree.

    Sadly, no tooling I know of has sufficient detection of pointer footguns (such as smart pointers made out of smart pointers leading to double frees).



  • IntelliJ has a setting like that, it’ll auto correct/lint/format files on save. Super useful, except sometimes when it’ll fuck up your entire file because it placed a bracket at the wrong place.

    I’ve had it do that at some point when I forgot a semicolon in Javascript at exactly the wrong position. You see, Javascript can work without semicolons and it’ll automatically add them for you, except in a few cases where you need to be explicit.

    For example:

    const mishmash = 13 + 'world'
    
    [13].length
    

    This will place the semicolon after the .length, turning the code into const mishmash = 13 + 'world'[13].length.

    In my case, it tried to be smart about inserting a semicolon in an unexpected case, and it turned nested .map() call into something completely unexpected while I hit ctrl+a on unfinished code. Took me a git reset to get something readable out of the that file again!

    As for Rust: using some macros tends to make it suggest baffling syntax alterations sometimes. When you fuck up a macro in such a way that the macro no longer generates correct syntax, you can get the Rust compiler to suggest placing semicolons halfway through statements or even words.


  • Don’t overestimate Rust, I’ve dealt with plenty of segfaults using it. Hell, I’ve had a situation where the Rust compiler generated some kind of instruction that wasn’t compatible with my CPU, that sure was fun to debug!

    Rust has issues with interoperability with system libraries. It solves this (sort of) through static linking, but static linking is why we’re still receiving daily updates for programs that open WebP files over a week since the library has been fixed on every single platform. Plus, there’s no good way to make a Rust UI that doesn’t look like it came out of a video game. Then there’s the whole async deal, which is great until you need to send anything more complex than an integer between threads.

    C++ isn’t exactly resistant to segfaults, but with C++11 things have become orders of magnitude better. C++ versions up to C++23 have improved things even more. If only people actually used those features…

    I think a good C++ dev using modern tooling can probably write code that’s just as stable as and even more compatible than Rust code, but many programmers are stuck in their old ways, or on old compilers, or think they don’t need Valgrind because they’re rockstars.

    Take a look at SerenityOS if you haven’t already. It’s an OS designed from the ground up, written in modern C++ (as in, the standard build script will compile a compiler because most distros don’t have compilers modern enough to run it). It includes everything from a kernel to a web browser and a Javascript engine. That project kind of redeemed C++ in my eyes.


  • C++20 (or even C++23 if you can find a compiler that supports it) is pretty great if you use smart pointers and concepts rather than malloc and raw templates. This is especially so if you enable all the useful warnings you can find and use a good IDE.

    Sadly, most C++ software out there was written in the 2000s and needs to be compatible with the original author’s VAX machine running Linux 2.3, so using modern compilers often becomes a challenge.

    Coming from other object oriented languages, C++ does have some weird quirks (like the way it deals with default initialisers) but none of that is impossible to learn. Sadly, it’s bogged down by decades of old, shitty C++ that it needs to support

    I suppose you could use good linting tools to ban raw pointers and enforce move()s, but honestly, I would start any new C++ project in Rust instead. Rust has its issues (especially with C++ interop), but until Carbon is ready for production use, I think it’s the best way to handle C++.