snaggen

joined 2 years ago
[–] snaggen@programming.dev 45 points 2 years ago* (last edited 2 years ago) (9 children)

I actually asked chatGPT about a specific issue I had and solved a while back. It was one of these issues where it looked like a simple naive solution would be sufficient, but due to different conditions that fails, you have to go with a more complex solution. So, I asked about this to see what it would answer. And it went with the simpler solution, but with some adjustments. The code also didn't compile. But it looked interesting enough, for me to question my self. Maybe it was just me that failed the simpler solution, so I actually tried to fix the compile errors to see if I could get it working. But the more I tried to fix its code the more obvious it got that it didn't have a clue about what it was doing. However, due to the confidence and ability to make things look plausible, it sent me on a wild goose chase. And this is why I am not using LLM for programming. They are basically overconfident junior devs, that likes mansplaining.

[–] snaggen@programming.dev 9 points 2 years ago (1 children)

This is obvious for people who understand the basics of LLM. However, people are fooled by how intelligent these LLM sounds, so they mistake it for actually being intelligent. So, even if this is an open door, I still think it's good someone is kicking it in to make it clear that llms are not generally intelligent.

[–] snaggen@programming.dev 2 points 2 years ago

That's why it felt very early to have used it before it was default, I mean before 2016 felt too early for me... But it was way before Covid, so I'd say around 2017.

[–] snaggen@programming.dev 2 points 2 years ago (2 children)

I know I have used it since Fedora made it default in 2016. I think I actually used it a while before that, but I don't have any thing to help me pin down the exact time.

Since I only use Intel built-in GPU, everything have worked pretty well. The few times I needed to share my screen, I had to logout and login to an X session. However, that was solved a couple of years ago. Now, I just wait for Java to get proper Wayland support, so I fully can ditch X for my daily use and get to take advantage of multi DPI capabilities of Wayland.

[–] snaggen@programming.dev 16 points 2 years ago (1 children)

That is the boring part when projects gets more mature...

[–] snaggen@programming.dev 2 points 2 years ago (1 children)
[–] snaggen@programming.dev 5 points 2 years ago (1 children)

No, that is not all the idea. You might have that idea, but it is not a basic idea at all. To keep something open (as in open source), you must put restrictions that prevents it from closing.

A government is not more free just because it lacks any restrictions, about becoming a dictatorship. It is just less restricted at this point in time. To ensure a free society, there needs to be restrictions in place that ensures it stays free. The same applies to software.

Many seems to believe that less restrictions means more free or open, that is not true. It is just less restricted.

[–] snaggen@programming.dev 8 points 2 years ago (3 children)

No, I think you missunderstand.... A joke is supposed to be funny.

 

Always good to read about how you can speed up compile times. I mean, sword fighting on office chairs are all fun, but still....

40
submitted 2 years ago* (last edited 2 years ago) by snaggen@programming.dev to c/rust@programming.dev
 

The Sovereign Tech Fund announced, in their latest news letter, that they are investing €99,060.00 in uutils coreutils which is a Rust rewrite of GNU coreutils. And here is a link to github https://github.com/uutils/coreutils

 

It is time for pre-release testing....

 

A saw this on Mastodon, and found it interesting. Rust already prevents a lot of race conditions, but deadlocks when using a mutex is still possible (and I have actually had one myself, though I caught it during testing). So, it would be nice if it would be possible to catch these cases at compile time. Now, seems to be just a proof of concept, but it is always nice to see the direction people are going and what areas are explored.

 

I found this review very interesting. It goes quite deep into the different problems. The author have done the research and does s good job of presenting it in a clear and understandable way.

232
submitted 2 years ago* (last edited 2 years ago) by snaggen@programming.dev to c/programmer_humor@programming.dev
 

fjärrinlägg från: https://programming.dev/post/10803496

TIL: Sweden had February 30 in 1712 https://en.wikipedia.org/wiki/1712_in_Sweden , so I decided to see how chrono handled that.

use chrono::TimeZone;
use chrono_tz::Europe::Stockholm;

fn main() {
    let feb30 =  Stockholm.ymd(1712,2,30);
    println!("Date: {:?}", feb30);
}
 target/debug/feb30
thread 'main' panicked at /home/snaggen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chrono-0.4.34/src/offset/mod.rs:252:40:
No such local time
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Result (as expected): Not well! 😄

I also tested Java with

ZonedDateTime feb30 = ZonedDateTime.of(1712,2,30, 0,0,0,0, ZoneId.of("Europe/Stockholm"));

with simmilar result

java.time.DateTimeException: Invalid date 'FEBRUARY 30'

So, lets take a minute of silence for all the programmers of history related software, may the spagetti monster have mercy on their souls.

view more: ‹ prev next ›