programming.dev

8,666 readers
513 users here now

Welcome Programmers!

programming.dev is a collection of programming communities and other topics relevant to software engineers, hackers, roboticists, hardware and software enthusiasts, and more.

The site is primarily english with some communities in other languages. We are connected to many other sites using the activitypub protocol that you can view posts from in the "all" tab while the "local" tab shows posts on our site.


๐Ÿ”— Site with links to all relevant programming.dev sites

๐ŸŸฉ Not a fan of the default UI? We have alternate frontends we host that you can view the same content from

โ„น๏ธ We have a wiki site that communities can host documents on


โš–๏ธ All users are expected to follow our Code of Conduct and the other various documents on our legal site

โค๏ธ The site is run by a team of volunteers. If youre interested in donating to help fund things such as server costs you can do so here

๐Ÿ’ฌ We have a microblog site aimed towards programmers available at https://bytes.programming.dev

๐Ÿ› ๏ธ We have a forgejo instance for hosting git repositories relating to our site and the fediverse. If you have a project that relates and follows our Code of Conduct feel free to host it there and if you have ideas for things to improve our sites feel free to create issues in the relevant repositories. To go along with the instance we also have a site for sharing small code snippets that might be too small for their own repository.

๐ŸŒฒ We have a discord server and a matrix space for chatting with other members of the community. These are bridged to each other (so you can interact with people using matrix from discord and vice versa.

founded 1 year ago
ADMINS

Canvas has ended! ๐ŸŽจ - final canvas

1
 
 

(Alt: The Drake meme. Upper panel shows him hiding his face from "Securing Customer Data". Lower panel shows him smirking at "Securing Public API Documentation")

2
3
119
Code Reuse (8 May 2018) (programming.dev)
submitted 15 hours ago by mac to c/monkeyuser
 
 
4
114
submitted 15 hours ago by mac to c/comics
5
85
[xkcd] Git Commit (programming.dev)
submitted 14 hours ago by mac to c/comics
 
 

Hover Text:

Merge branch 'asdfasjkfdlas/alkdjf' into sdkjfls-final

Transcript

| | Comment | Date | |


|


|


| | (main) | created main loop & timing control | 14 hours ago | | (main) | enabled config file parsing | 9 hours ago | | (main) | misc bugfixes | 5 hours ago | | (main) | code additions/edits | 4 hours ago | | (main) | more code | 4 hours ago | | (branch) | here have code | 4 hours ago | | (branch) | aaaaaaaa | 3 hours ago | | (main) | adkfjslkdfjsdklfj | 3 hours ago | | (main) | my hands are typing words | 2 hours ago | | (main) | haaaaaaaaands | 2 hours ago |

6
7
8
9
34
submitted 14 hours ago by Gabbagen to c/godot
 
 

Hello) Haven't seen nice videos exploring hierarchical state machines, so I decided to share my tutorial here. In the video I break down one of Dark Souls III bosses and then use Godot to recreate it.

10
 
 

I'm about to go ahead and go 100% Linux on my PC and completely get rid of Windows. The latest advancements in Windows application compatibility for Linux has taken strides and it's now easier than ever to run Windows apps thanks to Wine and Bottles and Steam's Proton. There's literally nothing I can't do in Linux that I could do in Windows.

The distro of choice I will probably go for is going to be Kubuntu. But I've been looking at immutable distros as a more stable alternative. But, it sounds to me like it's more adapted for smaller devices and IoT, like the Steam Deck or similar handheld devices.

Have you installed an immutable distro on your PC? What distro did you use? What was your experience like? What were the pros and cons according to you?

11
 
 
12
24
submitted 13 hours ago by mac to c/jenkins
13
14
22
submitted 5 hours ago* (last edited 5 hours ago) by [email protected] to c/python
 
 

cross-posted from: https://mastodon.social/users/Berin/statuses/112836125469155607

New Ren'Py Lemmy Community!

Heyo, I made a community for Ren'Py developers to ask for help and share their projects! Feel free to tag it to crosspost your mastodon posts, just like this post here. (But read the rules first, please)

https://discuss.tchncs.de/c/renpy

@renpy

#RenPy #GameDev #VNDev #IndieDev #VisualNovel

Hello Python community! I wanted to present the newly-made Ren'Py community on here.

Ren'Py is a Python-based game engine for visual novel development aimed at beginner developers with little prior programming experience. It uses a simple movie script-like syntax and provides both must-have visual novel components and tons of quality-of-life features out of the box. Capable Python programmers can easily extend the framework via custom components.

If you ever wanted to create an interactive fiction game, feel free to take a look!

[email protected]

15
16
 
 

I am trying to use wireshark to verify that my outgoing rsync is encrypted. I can easily see that the SSH protocol packets are reported as "Encrypted packet." The other packets being exchanged are TCP packets, I am not sure how to actually verify if these are encrypted, and if not, if they contain anything sensitive.

Should TCP be encrypted? Can they leak anything when facilitating the ssh connection? How can I tell?

17
13
Game Design Concepts (thingspool.net)
submitted 15 hours ago by mac to c/gamedev
18
19
20
9
Announcing TypeScript 5.6 Beta (devblogs.microsoft.com)
submitted 12 hours ago by mac to c/typescript
21
9
submitted 13 hours ago by mac to c/linuxmint
22
8
submitted 23 hours ago* (last edited 23 hours ago) by [email protected] to c/programming
 
 

Hello folks. So I'm still not good at Rust and learn even basics after years (just on and off doing some stuff). I'm currently working on my first small GUI application with FLTK in Rust. It's not that important for my question, but I think this gives a bit of context. The actual question is about struct and impl, using a builder pattern like pattern, but without impl builder and build() function.

Normally with the builder pattern, there are at least two structs and impl blocks. One dedicated to build the first struct. But I am doing it with only one struct and impl block, without a build() function. But it is functionally (at least conceptional) the same, isn't it? A shorted example for illustration:

Edit: Man beehaw is ruining my code blocks removing the opening character for >, which wil be translated to < or or completely removed. I use a % to represent the opening.

struct AppSettings {
    input_directory: Option%PathBuf>,
    max_depth: u8,
}

impl AppSettings {
    fn new() -> Self {
        Self {
            input_directory: None,
            max_depth: 1,
        }
    }

    fn input_directory(mut self, path: String) -> Self {
        self.input_directory = match path.fullpath() {
            Ok(p) => Some(p),
            Err(_) => None,
        };

        self
    }

    fn max_depth(mut self, levels: u8) -> Self {
        self.max_depth = levels;

        self
    }
}

And this is then used in main like

    let mut appsettings = AppSettings::new()
        .input_directory("~/test".to_string())
        .max_depth(3);

BTW I have extended PathBuf and String with a few traits. So if you wonder why I have code like this path.fullpath() . So just ignore that part. I'm just asking about the builder pattern stuff. This works for me. Do I miss something? Why would I go and do the extra step of creating another struct and impl block to build it and a final struct, that is basically the same? I don't get that.

Is this approach okay in your mind?

23
7
Ruby 3.2.5 Released (www.ruby-lang.org)
submitted 13 hours ago by mac to c/ruby
24
 
 

All I want to do is put a still image over a MP3 so I can upload a song to Youtube. (Sidenote: It feels really good to find a song I want to show someone that isn't already on Youtube. It used to be a somewhat regular thing i'd do, I have about a dozen Youtube videos that are just songs I uploaded because I wanted to show them to someone, but I guess Youtube got more stuff and my taste got more pedestrian, so I haven't felt the need to do it until now. Feels good!)

I used VEED, a web editor, and it produced a >300mb file. That seems a bit excessive. For the curious, this is the song: https://youtu.be/iLz7VXhCrnk

25
 
 

cross-posted from: https://lemmy.world/post/17984566

Hi all,

mpv communities seem to be tiny in lemmy, so I'm sharing it here.

This is a program I made for music control from local network.

You can run it in a computer with some local media files, or youtube links or any other links yt-dlp supports. And then with the server, you can control the media player and the playlist from any devices in your local network. So that you can just show a QR code or something to house guests for parties, or have it bookmarked within family to control the music.

I wanted to make something similar to how youtube app let's you play in TV and such, but my skills were not enough to do that. So I tried a simple alternative that works with computers. In an ideal world, I could make "Play with local mpv server" option come while on other android apps, but I have zero experience in android app development and it looks complicated.

I know some other programs also give option to control media, but I wanted to give it a go with a simple implementation. Making the web-server was a tricky part. Only tutorial from the rust book was useful here as every other web server developement in rust seems to be async ones using libraries so I would have to make a complicated system to communicate with the mpv. Using the simple Tcp connection let me make a thread with mpv instance in the scope. I do need to support https and file uploads and other things, but I haven't had any luck finding a solution that works with simple Tcp connection like in the tutorial. Let me know if you know anything.

Github: https://github.com/Atreyagaurav/local-mpv

view more: next โ€บ