https://brevzin.github.io/c++/2024/09/30/annotations/

This is a blog post that really is about C++, but with a look at how Rust does things. So, this is an interesting C++/Rust comparison for once.

24
3
GitHub - RReverser/serdebug: Serde-based replacement for #[derive(Debug)]
  • snaggen snaggen Now 100%

    I wanted to use the debug fmt functions, to allow for pretty debug also.

    2
  • github.com

    Last week I basically duplicated the serialization code to provide better debug output.... today, I see this pass in my Mastodon feed. 😀 Well... what are the odds... most likely close to 100% according to how the universe seems to operate.

    25
    4
    Scientists grow ‘lost tree’ mentioned in Bible using mysterious ancient seed
  • snaggen snaggen Now 50%

    No, but the process to identify the ones that work is all part of the modern medicine. Before that, placebo and lack of scientific methods made it impossible to separate a working substance from snake oil.

    0
  • Scientists grow ‘lost tree’ mentioned in Bible using mysterious ancient seed
  • snaggen snaggen Now 75%

    Yes, historical medicin was so good, lets work our ass off to recreate it...

    2
  • best linux terminal emulator
  • snaggen snaggen Now 100%

    Are you saying that it is common that people use utf8 characters that you cannot easily type on a standard keyboard? I'm very skeptical of this claim.

    1
  • best linux terminal emulator
  • snaggen snaggen Now 100%

    Good to know that every time I feel the need to use ALGOL 68, I must remember to disable ligatures. Still not sure this is going to be a huge problem 😂

    2
  • best linux terminal emulator
  • snaggen snaggen Now 100%

    Well, that was something.... I have used ligatures in my code editor for quite a few years now, and I have NEVER been confused about the ambiguity this person is so upset about. Why? I have never ever seen the Unicode character for not equals in a code block, simply since it is not a valid character in any known language. In fact, I have never even seen it in a String where it actually would be legal, probably since nobody knows how to type that using a standard keyboard. This whole article felt like someone with a severe diagnose have locked in on some hypothetical correctness issue, that simply isn't a problem in the real world.

    But, if you for some reason find ligatures confusing, then you shouldn't use them. But, just to be clear, there is not a right of wrong like this blog post tries to argue, it is a matter of personal taste.

    2
  • best linux terminal emulator
  • snaggen snaggen Now 100%

    Splits, ligatures tabs and more

    1
  • best linux terminal emulator
  • snaggen snaggen Now 100%

    Cosmic term is nice. Still just alpha, so there are rough edges though.

    3
  • Announcing Rust 1.81.0
  • snaggen snaggen Now 100%

    fs::exists() was a nice little improvement that I didn't know about until I read this announcement.

    7
  • How can we return to techno-optimism?
  • snaggen snaggen Now 100%

    Producing products that the users wants, and that solves tje users real problems. And not trying to make products as addictive as possible, to harvest as much user data as possible to sell.

    18
  • One Of The Rust Linux Kernel Maintainers Steps Down - Cites "Nontechnical Nonsense"
  • snaggen snaggen Now 100%

    The problem is that C is a prehistoric language and don't have any of the complex types for example. So, in a modern language you create a String. That string will have a length, and some well defined properties (like encoding and such). With C you have a char * , which is just a pointer to the memory that contains bytes, and hopefully is null terminated. The null termination is defined, but not enforced. Any encoding is whatever the developer had in mind. So the compiler just don't have the information to make any decisions. In rust you know exactly how long something lives, if something try to use it after that, the compiler can tell you. With C, all lifetimes lives in the developers head, and the compiler have no way of knowing. So, all these typing and properties of modern languages, are basically the implementation of your suggestion.

    16
  • Firefox rolls out Total Cookie Protection by default to all desktop users worldwide | It is Firefox’s strongest privacy protection to date, confining cookies to the site where they were created
  • snaggen snaggen Now 100%

    It is making the tracking protection part of containers obsolete, this is basically that functionality but built in and default. The containers still let you have multiple cookie jars for the same site, so they are still useful if you have multiple accounts on a site.

    3
  • Firefox rolls out Total Cookie Protection by default to all desktop users worldwide | It is Firefox’s strongest privacy protection to date, confining cookies to the site where they were created
  • snaggen snaggen Now 100%

    Container tabs are still useful, as they let you use multiple Cookie jars for the same site. So, it is very easy to have multiple accounts on s site.

    7
  • How to learn Rust?
  • snaggen snaggen Now 100%

    https://doc.rust-lang.org/book/ this is a great starting point. Then when you got the basics, and fiddled around a bit, then you can start looking for more specialized books (like Rust Atomics and Locks https://marabos.nl/atomics/ )

    23
  • Biden introduces Zelenskiy as ‘President Putin’ at Nato summit
  • snaggen snaggen Now 61%

    Have he said something even close to the stupidity of Trump? Like suggesting bleach against Covid? Why should all Trump opponents be measured with a different scale then Trump. Could you imagine the number of headlines required if Trump would get a headline every time he does anything on this scale?

    5
  • Russia's war-driven economy is so hot that the World Bank upgraded it to a 'high-income country'
  • snaggen snaggen Now 94%

    Well, not sure an inflation, twice the size of the GDP is positive for a country...

    17
  • How programmers comment their code
  • snaggen snaggen Now 100%

    Comment about image

    16
  • Rust has a HUGE supply chain security problem | Sylvain Kerkour | July 2, 2024
  • snaggen snaggen Now 100%

    Well.... it is true that it doen't have all these crates like Url included in the rust standard library, and hence it is not official. On the other hand Url was created by Mozilla to be used in Firefox, hence it is a quite competent crate that is very well maintained. And my guess is that the http crate may have the same kind of origins... but I'm not entirely sure about that.

    And even Java that includes quite a lot, still didn't get a good Http library until very recent, until then you had to rely on some obscure library created by the unknown organization Apache... so...

    As a developer you always have to think about what libraries you use, and if you trust them... that goes for pretty much any language.

    13
  • Started learning Perl
  • snaggen snaggen Now 100%

    Well, Perl is great for small scripts that works on large texts, that you process with regex. I still use Perl from time to time, for that kind of scripts. Also commandline, instead of awk/sed...

    4
  • Started learning Perl
  • snaggen snaggen Now 100%

    I learend it in the 90s, and was working on a large Perl codebase 2005 and a couple of years forward. And 20 years, it still started to feel dated, and 15 years ago it was just so out dated it hurt. So, starting to learn Perl 20 years ago would not have been great :) However, the things making Perl horrible, is pretty much threre in Python also with the addition of significant whitespace... so technically, going from Python to Perl might actually be a step in the right direction.... Now, if you excuse me, I will hide behinde this huge rock for a while to let the incoming projectiles settle.

    13
  • Found this on Mastodon https://fosstodon.org/@dpom/112681955888465502 , and it is a very nice overview of the containers and their layout.

    92
    4
    snaggen Now
    423 262

    snaggen

    programming.dev