snaggen

joined 1 year ago
[–] snaggen 6 points 2 days ago

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

[–] snaggen 18 points 5 days ago (1 children)

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.

[–] snaggen 16 points 1 week ago* (last edited 1 week ago)

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.

[–] snaggen 3 points 1 week ago

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.

[–] snaggen 7 points 1 week ago

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.

[–] snaggen 23 points 1 week ago

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/ )

50
submitted 2 weeks ago by snaggen to c/rust
[–] snaggen 5 points 1 month ago (2 children)

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?

25
submitted 1 month ago by snaggen to c/rust
11
Rust Analyzer Changelog #241 (rust-analyzer.github.io)
submitted 2 months ago by snaggen to c/rust
[–] snaggen 18 points 2 months ago

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

[–] snaggen 16 points 2 months ago (2 children)

Comment about image

[–] snaggen 14 points 2 months ago (3 children)

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.

[–] snaggen 4 points 2 months ago

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...

[–] snaggen 15 points 2 months ago* (last edited 2 months ago)

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.

14
Rust Analyzer Changelog #240 (rust-analyzer.github.io)
submitted 2 months ago by snaggen to c/rust
29
submitted 2 months ago by snaggen to c/rust
98
submitted 2 months ago by snaggen to c/rust
 

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

15
Rust Analyzer Changelog #239 (rust-analyzer.github.io)
submitted 2 months ago by snaggen to c/rust
23
submitted 2 months ago by snaggen to c/rust
view more: next ›