Programming

24072 readers
212 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
1
 
 

Hi all, I'm relatively new to this instance but reading through the instance docs I found:

Donations are currently made using snowe’s github sponsors page. If you get another place to donate that is not this it is fake and should be reported to us.

Going to the sponsor page we see the following goal:

@snowe2010's goal is to earn $200 per month

pay for our 📫 SendGrid Account: $20 a month 💻 Vultr VPS for prod and beta sites: Prod is $115-130 a month, beta is $6-10 a month 👩🏼 Paying our admins and devops any amount ◀️ Upgrade tailscale membership: $6-? dollars a month (depends on number of users) Add in better server infrastructure including paid account for Pulsetic and Graphana. Add in better server backups, and be able to expand the team so that it's not so small.

Currently only 30% of the goal to break-even is being met. Please consider setting up a sponsorship, even if it just $1. Decentralized platforms are great but they still have real costs behind the scenes.

Note: I'm not affiliated with the admin team, just sharing something I noticed.

2
3
4
5
6
7
8
 
 

cross-posted from: https://sh.itjust.works/post/52190045

Microsoft wants to replace its entire C and C++ codebase, perhaps by 2030

9
 
 

Hi,

I'm a programmer with a bunch of years in IT and currently I'm trying to build my own project that can bring me enough revenue so I can leave my full-time job and focus on my projects only and eventually start my own business.

The main struggle right now is that I have too little time to work on my projects (around 3 hours per week) and I estimate it will take me at least 2 more years to start earning anything (not talking about real money so I can leave my full time job). I don't want to create any sort of scam just to grab some cash, but building a real complex software is a time consuming process, not speaking about that I must handle other stuff than programming (which I enjoy but this means I have even more work to do).

I'm wondering if anybody can give me any advice how to speed up that process or where I can get money to be able to focus on my ideas full time? Or maybe somebody tried to do the same and failed and can share what lessons they learned from their mistakes?

I'm looking for a real solutions, so please cut out generic advices like "just keep working" or "just find an angel investor". I understand that starting your own business is hard and requires to take a risk, but I'm looking for practical advices and not advices based on luck or having a huge start capital.

Thanks

10
11
12
 
 

For the last year, I've been working on a query language that aims to replace SQL and data frame libraries. It's continuation of my work on PRQL and EdgeQL.

Now I need feedback on usability, ergonomics and overall design. Read trough the examples, check out the CLI & tell me what could be better.

13
 
 

For the last year, I've been working on a query language that aims to replace SQL and data frame libraries. It's continuation of my work on PRQL and EdgeQL.

Now I need feedback on usability, ergonomics and overall design. Read trough the examples, check out the CLI & tell me what could be better.

14
 
 

The worst kind of accidental complexity in software is the unnecessary distribution, replication, or restructuring of state, both in space and time.

15
16
17
18
19
 
 

geteilt von: https://programming.dev/post/42846946

Hi everyone,

we, the iceoryx community, just released iceoryx2 v0.8, an ultra-low latency inter-process communication middleware in Rust, with C, C++, Python and with this release, C# bindings.

If you are into robotics, embedded real-time systems (especially safety-critical), autonomous vehicles or just want to hack around, iceoryx2 is built with you in mind.

Check out our release announcement for more details: https://ekxide.io/blog/iceoryx2-0.8-release

And the link to the project: https://github.com/eclipse-iceoryx/iceoryx2

20
 
 

Hello Programming.dev gang,

I'm still wrapping my head around classes, oop, and scoping, and was hoping to get some feedback. on a class definition.

Here's the background:

I'm implementing pydantic for handing my .env secrets and constants (Haven't gotten to a secrets manager yet), with pydantic_settings's BaseSettings and SettingsConfigDict, as well as pydantic's SecretStr.

I set up a parent class in settings.py to configure the .env file and settings, which you can see below.

settings.py Parent Class (click to expand)

from pydantic_settings import BaseSettings, SettingsConfigDict
from pydantic import SecretStr


class Settings(BaseSettings):
    model_config = SettingsConfigDict(
        env_file="/opt/pyprojects/media-scripts/.env.dev", extra="ignore"
    )

I've got a self hosted Baserow database that I'm using for my project, and I defined a class in baserow.py that inherits from the Settings class for the .env config, and has all of the fucntions for interacting with the database as methods of the class, which you can see below.

(I've got a number of other classes similar to Baserow planned that will inherit from the Settings class, provided I'm on the right track with this layout.)

I thought it was a good idea to put the methods in the class with the .env var attributes to keep scoping focused and local. I'm wondering if this is a good idea or not, and am also open to any other feedback on the code/classes anyone might have. Thank you to anyone taking the time to read and/or respond.

baserow.py with Baserow child class (click to expand)

import json

import requests
from pydantic import SecretStr

from mods.settings import Settings


class Baserow(Settings):
    br_url: str
    br_api: SecretStr

    def query_db(self, urlFilters):
        url = f"{self.br_url}?user_field_names=true&{urlFilters}"
        headers = {"Authorization": f"Token {self.br_api}"}

        brQueryResults = requests.get(url, headers=headers)

        return brQueryResults.json()

    def get_all_shows(self):
        url = f"{self.br_url}?user_field_names=true&size=200"
        headers = {"Authorization": f"Token {self.br_api.get_secret_value()}"}

        brQueryResults = requests.get(url, headers=headers)

        return brQueryResults.json()

    def post_db(self, showDictionary):
        brPostResults = requests.post(
            f"{self.br_url}?user_field_names=true",
            headers={
                "Authorization": f"Token {self.br_api.get_secret_value()}",
                "Content-Type": "application/json",
            },
            json=showDictionary,
        )

        print(json.dumps(brPostResults.json(), indent=2))

    def patch_db(self, showDictionary, row):
        brPatchResults = requests.patch(
            f"{self.br_url}?user_field_names=true",
            headers={
                "Authorization": f"Token {self.br_api.get_secret_value()}",
                "Content-Type": "application/json",
            },
            json=showDictionary,
        )

        print(brPatchResults)

    def delete_db_row(self, row):
        brDeleteResults = requests.delete(
            f"{self.br_url}{row}/",
            headers={
                "Authorization": f"Token {self.br_api.get_secret_value()}",
            },
        )
        print(brDeleteResults)

21
22
23
24
 
 

For a few months I've spent my free time working on a C++ messenger. It started off pretty simple, just two input boxes for IP address and port number, more of a fun experiment. From there it started to grow and soon allowed for peers to connect automatically using a relay. For a while it only allowed two people to speak at once, which was good for security but was very inconvenient. Now Retro Messenger allows multiple users to speak at once, sending encrypted files and messages that exist only in memory.

Although there is plenty of things I could improve, I was curious to see if anyone had suggestions or requests for what else could be added. I'm currently debugging a local-logs feature, and I could look into how to implement voice calls in the future. Thanks for your time and feel free to ask questions

Landing page: https://retromessenger.space/

25
view more: next ›