programming.dev

8,668 readers
383 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

26
27
9
Announcing TypeScript 5.6 Beta (devblogs.microsoft.com)
submitted 18 hours ago by mac to c/typescript
28
29
30
31
32
33
34
submitted 20 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.

34
2
Day 21 - What next? (linuxupskillchallenge.org)
submitted 11 hours ago by livialima to c/linuxupskillchallenge
35
 
 
36
37
8
submitted 1 day ago* (last edited 1 day 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?

38
9
submitted 19 hours ago by mac to c/linuxmint
39
 
 
40
 
 

With great pleasure may I announce that our move off of wlroots is now complete and MR 6608 is now merged.

After over 1000 comments on 6608 alone, and over 3 months of the entire process, the rewrite is done.

With it, Hyprland is no longer a wlroots-based Wayland compositor, and instead, a fully independent implementation of the protocol.

Don’t worry though, all your wlroots apps will still work.

41
13
Game Design Concepts (thingspool.net)
submitted 20 hours ago by mac to c/gamedev
42
64
Announcing Rust 1.80.0 (blog.rust-lang.org)
submitted 1 day ago by mac to c/rust
43
44
 
 

QL was our first game and although it was a big milestone for us, it was created at a time before we understood version control software. We do not have access to the source code anymore and cannot make any fixes or changes to the game. Because of this, we have decided to disable the ability for anyone to buy copies of the game. Thank you for your time and feel free to reach out to us.

The trailer looks like an awesome vaporwave freeze tag indie game.

45
 
 

Announcements!

Blogs, Articles, and Posts

  • Extract LAPS Passwords and BitLocker Keys from Active Directory
    The below PowerShell can be used to extract LAPS Passwords and BitLocker Keys from Active Directory. This was written on Friday, July 19, 2024, due to the CrowdStrike Outage. If you choose to test this PowerShell, ensure that you update the argument for the SearchBase parameter to reflect your Active Directory domain.
  • The Maddening Side of the Microsoft Graph PowerShell SDK
    All software has unique quirks, and the foibles of the Microsoft Graph PowerShell SDK are well known. But it’s much harder when the underlying foundation contributes to the craziness as described in this article. Graph pagination works in a specific way and Microsoft tunes the Graph to deliver great performance by reducing the set of properties returned for objects. Both can cause concern for developers.
  • Find orphaned GPOs via PowerShell before migrating to Intune
    Many companies have already fully transitioned to Endpoint Management Intune and no longer need GPOs (Group Policy Objects). Others are in the preparatory stages. Therefore, I would like to provide some assistance for identifying orphaned Group Policy Objects. These can be relatively easily found and, if necessary, removed using PowerShell.
  • Convert RSA XML Private Key to PEM Format with PowerShell
    Recently I was working with a particular application that used certificates to secure communication. I wanted to put the certificates into Azure KeyVault. Azure KeyVault naturally allows you to store certificates. However, it only lets you upload certificates that are in PFX (PKCS#12) or CER (DER or BASE64 encoded).… keep reading
  • PowerShell script for automated remediation for CrowdStrike issue
    I have created a Powershell script for the Crowdstrike issue for some automation purposes. you can create a WinPE ISO File to boot into and remediate the crowdstrike issue. 3. Reboot: The system should boot normally. The script: This script is designed for use in an on-premises VMware environment.

Projects, Scripts, and Modules

  • pwshBedrock v 0.9.1
    pwshBedrock enables interfacing with Amazon Bedrock foundational models, supporting direct on-demand model calls via InvokeModel and the Converse API for supported models. It allows sending messages, retrieving responses, managing message context, displaying model information, and estimating token counts and costs. Use PowerShell to integrate generative AI applications with Amazon Bedrock.
  • ChocoLogParse v 1.0.0
    Parses Chocolatey logs into easy to use objects.

Books, Media, and Learning Resources

  • Diagnose Network Latency with PowerShell and SQLite [OC]
    In this video you’ll see how you can use PowerShell to check for network latency between multiple endpoints. You’ll learn how to record those results into a SQLite database with a just few commands, and no need to create any underlying infrastructure. Finally, you’ll see how you can view the data in PowerShell to help identify where and when you are experiencing network latency issues.

Community

  • Interactive Shell Sessions and Language Models: Steven Bucher on Project Mercury
    In the latest episode of the PowerShell Podcast, we sit down with Microsoft PM Steven Bucher to dive into Project Mercury, a cutting-edge CLI tool designed to provide an interactive shell session for chatting with language models. Steven walks us through the functionalities of Project Mercury and how users can leverage this innovative tool. He also shares his approach to product management, reflecting on his growth in the role over the past couple of years. We explore the importance of empowering others and how it serves as a pivotal goal in Steven’s professional journey. Join us for an enlightening conversation that blends technical knowledge with leadership wisdom.
  • PowerShell Community Call - July 18th, 2024
    The record of the July 18, 2024 PowerShell Community Call

Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

46
7
Ruby 3.2.5 Released (www.ruby-lang.org)
submitted 19 hours ago by mac to c/ruby
47
 
 
  • If you are running the BETA you don’t need to upgrade, use the Update Manager to apply available updates.
  • Upgrade instructions for Linux Mint 21.3 will be provided in a few days.
48
2
V 0.4.7 (github.com)
submitted 14 hours ago by mac to c/vlang
49
 
 
50
view more: ‹ prev next ›