Programming

19755 readers
82 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 [email protected]



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
 
 

Undefined Behavior in C and C+- is often exploited by compilers for optimization. Therefore, it is frequently believed that permitting Undefined Behaviour makes such programs faster, even if the architectures of today's hardware are wildly different from the tiny and bare-bones CPUs these languages were once developed for, fifty years ago.

This study examines whether this is the case, by disabling many of such optimizations in clang and running a wide range of "optimized" and "unoptimized" benchmarks on Intel, AMD, and ARM architectures.

The general result is that while there are differences, the benchmarks do not run significantly faster with "optimizations". A slowdown was observed on ARM - only if no link time optimization (LTO) was used. Averaged ifferences even with all "ub-based optimizations" enabled or disabled were typically below 2%, which is at the noise threshold.

There were also many cases where "UB-optimizations" made programs perform worse.

There were exceptions found to this general summary, and the causes for this were tracked down and explained.

Considering all that, the performance impact of permitting UB appears to be... a myth?

4
 
 

I'm new to lemmy and somebody suggested me this community after l formed mine own😊😊😊

This looks far too advanced, while mine would be more focused on the beginners into the world of coding, who are just putting out baby steps 😆😆😆

5
 
 

Some thoughts/predictions about how open source developers will be forced to choose their path with GenAI.

Full disclaimer: my own post, sharing for discussion and to find out if anyone has any brilliant ideas what else could be done. It looks like self-posts are okay here but let me know if I'm wrong about that.

6
45
Git without a forge (www.chiark.greenend.org.uk)
submitted 2 days ago by maxint to c/programming
7
 
 
8
9
10
36
submitted 3 days ago* (last edited 3 days ago) by [email protected] to c/programming
 
 

It seems that GitHub is being blocked in my region as well as other options from U.S. based companies (e.g. GitLab)

Where should I migrate my repos? Codeberg is an option as it’s Europe based so isn’t blocked in my region. Codeberg Pages is also nice to have. However, Codeberg seems to push for excluding proprietary software dependencies, which might limit the kinds of projects I can do.

Another option is to self-host Gitea, I could use my old laptop for that. Gitea doesn’t have a GitHub pages, but there seems to be third-party plugins that allow that. The downside with self-hosting (for me) is that it means I’m unable to collaborate with others (since it’ll be local) and I can’t easily share my projects. It will also probably be harder to set up.

What other options are there, or are these two the best options for me?

edit: decided on Codeberg, how do I make my static pages to work with Codeberg Pages? I've switched to a "pages" branch and the website doesn't work (https://username.codeberg.page/repo-name/)

How do I make static pages work with Codeberg???

11
12
 
 

Healthy open source communities don’t just form around code, but also around shared values and a vision for how their work can improve the world. The true measure of the success of open source is its impact— how the technologies we develop are leveraged to bring about positive social, cultural, and political change.

13
14
 
 

https://github.com/thingsiplay/crc32sum

# usage: crc32sum [-h] [-r] [-i] [-u] [--version] [path ...]

crc32sum *.sfc
2d206bf7  Chrono Trigger (USA).sfc

Previously I used a Bash script to filter out the checksum from 7z output. That felt always a bit hacky and the output was not very flexible. Plus the Python script does not rely on any external module or program too. Also the underlying 7z program call would automatically search for all files in sub directories recursively when a directory was given as input. This would require some additional rework, but I decided it is a better idea to start from scratch in a programming language. So I finally wrote this, to have a bit better control. My previous Bash script can be found here, in case you are curious: https://gist.github.com/thingsiplay/5f07e82ec4138581c6802907c74d4759

BTW, believe it or not, the Bash script running multiple commands starts and executes faster than the Python instance. But the difference is negligible, and the programmable control in Python is much more important to me.


What is this program for?

Calculates the CRC hash for each given file, using Python's integrated zlib module. It has a similar use like MD5 or SHA, but is way, way weaker and simpler. It's a quick and easy method to verify the integrity of files, in example after downloading from the web, to check data corruption from your external drives or when creating expected files.

It is important to know and understand that CRC-32 is not secure and should never be used cryptographically. It's use is limited for very simple use cases.

Linux does not have a standard program to calculate the CRC. This is a very simple program to have a similar output like md5sum offers by default. Why use CRC at all? Usually and most of the time CRC is not required to be used. In fact, I favor MD5 or SHA when possible. But sometimes, only a CRC is provided (often used by the retro emulation gaming scene). Theoretically CRC should also be faster than the other methods, but no performance comparison has been made (frankly the difference doesn't matter to me).

15
16
 
 

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

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

This is a showcase of combining vibe coding with the Fediverse and attempto controlled english (ace).

I'm fascinated by vibe coding, but I'm also highly critical of it. It fascinates me, because it enables people, who normally cannot code to be able to generate running code. What I don't like, is that it just isn't actual programming. It's closer to a wishing well. It fosters a quasi-magical understanding of programming and computer science, which is already too common in current society (I wrote a paper about it here: https://philpapers.org/rec/BINAKR). That's why, in my opinion, the Fediverse should set a counter-point here with something like a first-order logic language like ACE, which actually brings people closer to an actual understanding of computer science concepts like modeling and logic without hiding the complexity behind seemingly "magic", and could also result in better code.

The above demo shows a glimpse of how this could look like on the Fediverse. Imagine communities being able to form their own spaces on the social web through language! Simply using natural language will probably not be specific enough here. We always imagine everything getting much easier, but that's just the logic of digital capitalism that tries to sell us innovation as inventing yet a more easy way to get your coke handed to you, which can only lead to more and more environmental destruction. So, what will the language interface for the future digital look like? I think it will be more something like the semi-formalic language found in technical manuals, cooking recipes and judicial texts. Something like ace, in between coding, domain specific languages, modeling and natural language. And people who are experts at this and know the old technical stuff that no one understands anymore will be the new "coders". But maybe I'm wrong.

Repo: https://github.com/bluebbberry/AceCoding.social.

17
11
submitted 1 week ago by xoron to c/programming
 
 

I made something to try out for "funtional webcomponents" with vanillaJs. I'm working towards a UI framework for my personal projects. It's far from finished but i thought it might be an interesting concept to share.

18
19
20
22
Making Software (www.makingsoftware.com)
submitted 1 week ago by [email protected] to c/programming
21
22
23
 
 

I left Github a while ago and have been relying on simple pre-push scripts in my workflow, but would like to be able to test PRs from others without putting my machine at risk. Besides codeberg and radicle (neither of which have reliable CI), I also have a build machine, where I could run CI jobs, however it is important that the CI jobs can also run locally so that external people do not require access to the build machine.

Is there a CI that can do those things (run locally and remotely)?

Anti Commercial-AI license

24
25
view more: next ›