Skip Navigation

Posts
16
Comments
396
Joined
3 yr. ago

  • But there is context to it:

    The report on Product Security Bad Practices warns software manufacturers about developing "new product lines for use in **service of critical infrastructure or [national critical functions] **NCFs in a memory-unsafe language (eg, C or C++) where there are readily available alternative memory-safe languages that could be used is dangerous and significantly elevates risk to national security, national economic security, and national public health and safety."

    It's for new products that are very important to critical infrastructure and need to be safe as possible. The article writer seem not to be aware of this context:

    Take Rust in Linux, for example. Even with support from Linux's creator, Linus Torvalds, Rust is moving into Linux at a snail's pace.

    Because Linux is the biggest software in the entire world and they do lot of stuff their own way. Rust is integrated slowly for future new projects. It makes sense to move in snail pace. The government doesn't suggest the Linux project to stop using C entirely. The government "recommends" to start new projects in memory safe languages, if it is a critical software. That makes sense to me.

    You see, people who've spent years and sometimes decades mastering C don't want to master the very different Rust. They don't see the point.

    No, totally wrong. C programmers in Linux do not NEED to learn or master Rust. They just need to cooperate. The problem is, that some C programmers refuse to cooperate with Rust. They just want Rust to disappear. That has nothing to do with mastering the language. They refuse to make changes to their C code, so it can cooperate with Rust code via bindings.

    After all, they can write memory-safe code in C, so why can't you?

    Nonsense argument, and false too. If that was the case, why do we have memory safe languages? Clearly people make mistake, old and new. Besides Linux is not the only software in the world.

    Converting existing large codebases to memory-safe languages can be an enormous undertaking.

    Nobody says old code should be rewritten in Rust. Neither the government, nor the Rust programmers in Linux suggest that. It's not about rewriting code in memory-safe languages, its about new projects.

    Either this article is a misrepresentation or misunderstanding. Or I misunderstand the article or government. I don't know anymore...

  • "I'd just like to interject for a moment. What you're referring to as Linux, is in fact, Rus/GNU/Linux, or as I've recently taken to calling it, Russian Federation plus GNU plus Linux minus Linus."

  • Only possible because its FOSS. Hopefully this shows more governments why FOSS is awesome.

  • it depends. Its not like every user and question requires a new account. There was a time where these companies had a Reddit group instead Discord. Its the same effort to create an account one time, but then it can be reused. Also there is this login with existing accounts (like Google or other methods), as a secondary option.

    If we are speaking about a dedicated forum, that's another thing. But since I gave up Reddit and because Fediverse is small, I started back creating accounts for forums. But only if really want to be part of it. But yes, agreed this is not convenient and Discord has a plus point here. Also Discord is integrated in other services as well (I think on game consoles, not sure).

    I see its pros and cons and why its successful. Also there is no better alternative for what it does. I'm just critical about the negative impact of it. I'm so glad that StackOverflow is not close like Discord.

  • Also for people its often an embarrassment to ask certain questions, because they think its a stupid question. In a forum, everyone can see it and comeback years later (which is a good thing btw, but for some embarrassing). A chat is forgets much quicker and better.

    I think asking niche questions in a forum is very helpful too, otherwise you will only find common questions. Actually the niche questions answered and maybe corrected over time is very useful in forums. Because in a chat often niche questions requires the right person to be in the right group at the right time.

  • Especially Discord is bad, because it cannot be indexed by web search engines. And the entire structure is not really good for long term, compared to dedicated posts in forums.

  • C++ innovates often first and adapts it into mainstream. And its kind of a swiss-army knife. You don't need to use and learn everything, just pick what you need. Unless you need to get into an old existing code base...

    Just an idea: The language could be divided into multiple standard levels, where each level has more features and functionality. It would be essentially a "restricted", "standard" and "full" version of the language, where full is basically what it is now and the others are constrained versions with less functionality (no multiple inheritance and what not rules). But at this point, if you don't use the language in its full, why bother with it at all? Just thinking a bit...

  • Rust: The Phantom Menace

  • I knew it! I always had this gut feeling that a byte has 8 bits. /s

  • Does crates.io have a backup plan?

    Jump
  • If the domain .io ever gets unusable, then all it needs for Rust / creates.io is to change the respository setting in the configuration of your project to point to new location. Maybe this could be done automatically through an update of Rust tools. It will probably cause headache for automated build systems and for newcomers, but overall its not as bad of an issue as it looks like, I think.

    But I agree on that it wasn't a good idea to use .io and .rs as their backbone. It should have been .com or .org in example, where you know wouldn't go away ever. Not a fan of country level domains for important projects.

  • I just found nvim-ufo - "The goal of nvim-ufo is to make Neovim's fold look modern and keep high performance."

  • I'm not a C programmer, but looking at the changes and improvements, there are lot of good advancements I would not want to miss out on: C11 (C17 just fixes a few little issues from C11) > C23

    Stuff like Multi-threading support, Improved Unicode support, Add memccpy() and whats so bad about Various syntax changes improve compatibility with C++? C doesn't exist in a vacuum. If you don't want learn the new changes or do not want rely on it because of compatibility reasons, I can understand. But why would you not use newer C versions, if there is no compatibility with older version "required"?

  • I don't think folding code parts is a default feature that everyone needs. Vim has folding already and I never use it. To me it is kind of pointless. If the code is messy, then you probably should split it up into several files. There is also a better way to me, through listing jump points on the side (such as function definitions). But its good to have extensions to provide that functionality if you rely on.

    The second option is clearly superior

    No, the first option is clearly superior. I don't like collapsed code, its hiding stuff and doesn't help in anything to me. Its better to see the entire context. The same list of function definitions can be displayed in a more useful jump list on the side (in my opinion).

    But maybe its a question of implementation. I would like to see advancements in this field, to see if it is more useful than the current features we have to fold methods and functions.

  • According to TIOBE (note can be found if you scroll down a bit):

    The programming language SQL was added to the TIOBE index in 2018 after somebody pointed out that SQL is Turing Complete. So although this language is very old, it has only a short history in the index.

  • I read further and there is some clarification if you scroll down to "Very Long Term History". Visual Basic and (Visual) Basic are two entries, where Visual Basic refers to "Visual Basic .NET" since 2014. And (Visual) Basic from the 90s to 2014 is a collection of all Basic dialects, which includes Visual Basic .NET. Color me impressed how to confuse people.

    There is a difference between "Visual Basic" and "(Visual) Basic" in the table above. Until 2010, "(Visual) Basic" referred to all possible dialects of Basic, including Visual Basic. After some discussion, it has been decided to split "(Visual) Basic" into all its dialects such as Visual Basic .NET, Classic Visual Basic, PureBasic, and Small Basic, just to name a few. Since Visual Basic .NET has become the major implementation of Visual Basic, it is now called "Visual Basic".

  • I can't take https://www.tiobe.com/tiobe-index/ seriously: Visual Basic on place 7 of most popular programming languages right after JavaScript? More popular than Go, Rust, PHP and SQL? Haskell is more popular than TypeScript (scroll down to see other places)? TIOBE isn't a good metric, as they only check a few websites and a few engineers:

    The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular web sites Google, Amazon, Wikipedia, Bing and more than 20 others are used to calculate the ratings.

  • Once a developer starts charging for his product, the code is no longer open-source--it's proprietary, which falls under completely different licensing rules.

    This is wrong. Open Source does not mean its free of charge. You can copy and fork the code and do whatever you want with it (including selling). And the developer has the right so sell the product too. This does not mean its proprietary, if the license and the code is Open Source.

    Because people think Open Source means free of charge, is the problem why the Open Source developers have a hard time to make money and a living.

  • If you already have the screenshot files, then ImageMagick can create collages from multiple images. I've done that myself too. So that part can be easily automated through scripts.

     
        
    # program input-files frame input-size output-file
    montage shadow*.png -frame 5x4 -geometry 680x160 ./collage.png
    
      

    In the above command montage is a tool that comes with ImageMagick. First argument is a list of files to as input, here all .png files starting with name shadow*, so it does not load up the existing collage.png file (which is the output). Then you specify the frames, how its ordered for each row. Then the size for the input images. Here all images have the same size. And at last you specify a single filename as output.