Programming

17000 readers
94 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 1 year ago
MODERATORS
51
 
 

A judge has dismissed the majority of claims in a copyright lawsuit filed by developers against GitHub, Microsoft, and OpenAI.

The lawsuit was initiated by a group of developers in 2022 and originally made 22 claims against the companies, alleging copyright violations related to the AI-powered GitHub Copilot coding assistant.

Judge Jon Tigar’s ruling, unsealed last week, leaves only two claims standing: one accusing the companies of an open-source license violation and another alleging breach of contract. This decision marks a substantial setback for the developers who argued that GitHub Copilot, which uses OpenAI’s technology and is owned by Microsoft, unlawfully trained on their work.

...

Despite this significant ruling, the legal battle is not over. The remaining claims regarding breach of contract and open-source license violations are likely to continue through litigation.

52
53
54
55
56
 
 

This is more of a system config question than a programming one, but I think this community is the best one to ask about anything Git-related.

Anyway, I am setting up a new project with hardware that has 2 physical drives. The "main" drive will usually be mounted and have 10-20 config files on it, maybe 50-100 LOC each. The "secondary" drive will be mounted only occasionally, and will have 1 small config file on it, literally 2 or 3 LOC. When mounted, this file will be located in a specific directory close to the other config files.

I would like to manage all of these files using git, ideally with a single repo, as they are all part of the same project. However, as the second drive (and thus the config file on it) will sporadically appear and disappear, Git will be confused and constantly log me adding and deleting the file.

Right now I think the most realistic solution is to make a repo for each drive and make the secondary drive a submodule of the main. But I feel like it is awkward to make a whole repo for such a simple file.

What would you do in this situation, and what is best practice? Is there a way to make this one repo?

57
139
How to learn Rust? (lemmy.world)
submitted 2 weeks ago* (last edited 2 weeks ago) by [email protected] to c/programming
 
 

I want to learn Rust. There are so many resources available and I am unsure which one to go for, and if there are any tips on getting started?

I am a software developer by trade

Edit: Thanks for all the great replies!

58
 
 

It just occured to me, that I haven't asked anything on SO for a while now. It might even be years, the last I asked for help.

Most of the problems I come across were already faced by someone else.

Do you guys feel the same?

59
3
iCloud: Who holds the key? (2012) (blog.cryptographyengineering.com)
submitted 3 weeks ago by lysdexic to c/programming
60
 
 

I recently stumbled across Cludflares trustpilot page and the reviews were completely mismatched from the way I have experienced people talk about them on forums. The reviews on trustpilot make them sound awful, but I have only seen recommendations for them on forums, often people say they are the best DNS provider.

Whats up with that? Does anyone know why there is such a disparity.

61
62
 
 

Really intriguing article about a SQL syntax extension that has apparently already been trialed at Google.

As someone who works with SQL for hours every week, this makes me hopeful for potential improvements, although the likelihood of any changes to SQL arriving in my sector before I retire seems slim.

63
16
submitted 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/programming
 
 

I've read an article which describes how to simulate the close ports as open in Linux by eBPF. That is, an outside port scanner, malicious actor, will get tricked to observe that some ports, or all of them, are open, whereas in reality they'll be closed.

How could this be useful for the owner of a server? Wouldn't it be better to pretend otherwise: open port -> closed?

64
42
submitted 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/programming
 
 

Direct link to the table, for those who block off-site scripts:

https://flo.uri.sh/visualisation/19114866/embed?auto=1

Some of the labels don't seem to show up unless you zoom out.

65
 
 

For Box2D version 3.0 I decided to finally try using SIMD as it is meant to be used for solving contacts. Making contacts solve faster could yield large performance gains so I decided it would be worth the effort.

But how can I gather 4 or 8 contact pairs to be solved simultaneously? The key is graph coloring. The idea is to have a handful of colors to be assigned to all the contact constraints. For example, suppose I have 6 colors and I want to assign all the contacts to one of those 6 colors. Contact constraints act upon two bodies at a time. With graph coloring the restriction is that within a single color a body can only appear once or not at all.

...

I did all this work to enable SIMD processing. Did it help? Box2D has a benchmarking console application to help answer this question. I implemented SSE2, Neon, and AVX SIMD instruction sets in the Box2D contact solver. I also implemented a scalar reference implementation. I have 5 benchmarks scenarios that push Box2D in various ways. See the benchmark results here.

The large pyramid benchmark with 4 workers has the following numbers:

  • AVX2 : 1117 fps = 0.90 ms
  • Neon : 1058 fps = 0.95 ms
  • SSE2 : 982 fps = 1.02 ms
  • scalar (AMD): 524 fps = 1.91 ms
  • scalar (M2): 679 fps = 1.47 ms

...

The bottom line is that making good use of SIMD can be a lot of work but it is worth the effort because it can make games run significantly faster and handle more rigid bodies.

66
67
 
 
68
 
 

Is the new #zed editor mostly hype rn?

I can believe it’s good and cool ( built in graphics and collab seem to me like good ideas).

But as someone who happily stayed with sublime (with LSPs a likely game changer) …

takes like “it’s fast!”, “LSP!”, “it now has snippets!” … along with people telling me it has a plug-in system, but doesn’t (cf python/lua runtimes of sublime/nvim) give me massive hype vibes and honestly just feels very “2020s-tech”.

#programming

@programming

69
14
submitted 3 weeks ago* (last edited 3 weeks ago) by AsudoxDev to c/programming
 
 

cross-posted from: https://programming.dev/post/18411894

Hello Lemmings!

I am thinking of making a community moderation bot for Lemmy. This new bot will have faster response times with the help of Lemmy webhooks, an amazing plugin for Lemmy instances by @[email protected] to add webhook support. With this, there is no need to frequently call the API at a fixed interval to fetch new data. Any new data will be sent via the webhook directly to the bot backend. This allows for actions within seconds, thus making it an effective auto moderation tool.

I have a few features I thought of doing:

  • Welcome messages
  • Auto commenting on new posts
  • Scheduled posts
  • Punish content authors or take action on content via word blacklist/regex
  • Ban members of communities by their usernames/bios via word blacklist or regex
  • Auto community lockdown during spam

What other features do you think are possible? Please let me know. Any questions are also welcome.

Community requested features:

  • Strike system

Strikes are added to a certain member of the community and the member will be temporarily banned within a time period if their strike count reaches a certain threshold

  • Post creation restriction by account age

If an account's age is lower than X, remove the post.

70
31
Firewalling Your Code (lackofimagination.org)
submitted 3 weeks ago by Aijan to c/programming
71
 
 

A project I saw linked in the css post, and wanted to share, because I love the insanity.

72
73
 
 

Hey all, I made a Firefox extension (signed by Mozilla) specifically to add Show/Hide Child Comments functionality similar to how RES had it (where the parent comment is still visible).

It's not very useful, but I could use some feedback on tightening up the Javascript. I'm not a JS beginner, but I know I can do better, so any tips are welcome!

EDIT: Also, if anyone has any suggestions for the extension, I'm open to those as well.

74
75
 
 

What is the CS / uni goto course for this, or what really clicked for you?

view more: ‹ prev next ›