Programming

19403 readers
256 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
 
 

There's a big caveat to Tailwind: It generates styles at build time.

So if you try styling your elements with dynamic classes like bg-${color}, it just won't work, you need to write out the full class name for Tailwind to pick it up.

That's fine for a lot of apps, but it becomes a real challenge when you're building things like visual editors, customizable dashboards, or anything that needs dynamic, interactive styling.

The good news is that you can still make it work if you understand how Tailwind works under the hood.

That's why I wrote this blog post, where I show how to:

  • Understand how Tailwind generates styles
  • Mix inline styles with utility classes
  • Use safelisting in v4.0
  • Apply all this for visual editors like Puck
4
 
 

I work at Red Hat on GCC, the GNU Compiler Collection. I spent most of the past year working on how GCC emits diagnostics (errors and warnings) in the hope of making it easier to use. Let's take a look at 6 improvements to look forward to in the upcoming GCC 15.

  1. Prettier execution paths
  2. A new look for C++ template errors
  3. Machine-readable diagnostics
  4. An easier transition to C23
  5. A revamped color scheme
  6. libgdiagnostics
5
 
 

Twenty years ago, Linus Torvalds created the basis for Git in just 10 days, forever changing how developers collaborate on code. In this candid interview, Linus Torvalds discusses Git's unexpected journey from a Linux kernel management tool to the foundation of modern software development. Learn about the technical decisions, community contributions, and evolving philosophy behind the version control system that powers millions of projects.

Edit: I did not notice that a post about this topic already existed. The official GitHub blog post/interview transcript can be found here and discussion about it can be found here.

6
7
113
submitted 3 days ago* (last edited 1 day ago) by [email protected] to c/programming
 
 

Edit 2025-04-09 16:42Z - article was updated with a tenth package (Prettier - Code)

A set of ten VSCode extensions on Microsoft's Visual Studio Code Marketplace pose as legitimate development tools while infecting users with the XMRig cryptominer for Monero.

ExtensionTotal researcher Yuval Ronen has uncovered ten VSCode extensions published on Microsoft's portal on April 4, 2025.

The package names are:

  1. Prettier - Code for VSCode (by prettier) - 486K installs
  2. Discord Rich Presence for VS Code (by Mark H) - 189K installs
  3. Rojo – Roblox Studio Sync (by evaera) - 117K installs
  4. Solidity Compiler (by VSCode Developer) - 1.3K installs
  5. Claude AI (by Mark H)
  6. Golang Compiler (by Mark H)
  7. ChatGPT Agent for VSCode (by Mark H)
  8. HTML Obfuscator (by Mark H)
  9. Python Obfuscator for VSCode (by Mark H)
  10. Rust Compiler for VSCode (by Mark H)
8
 
 

This first push resulted in NuGet Restore times being cut in half, which was a reasonable stopping point for our work. However, along the way, we realized that a more extensive rewrite could improve performance by a factor of 5x or more.

Written from the perspective of several team members, this entry provides a deep dive into the internals of NuGet, as well as strategies to identify and address performance issues.

9
 
 

Does anyone know if theres a way to customize VSCode more than what is available? I really hate the flat design and blocky layout. Would like to see more customizability. Does VSCodium allow this?

10
14
submitted 5 days ago* (last edited 5 days ago) by Cheezyburger to c/programming
 
 

Hi everyone! I’m a student currently working on a research activity for our Software Engineering class, and I’d really appreciate your insights. 😊

I’m looking to gather input from software developers, project managers, or engineers about the Software Development Life Cycle (SDLC) paradigms you've used in your past or current projects.

If you have a few minutes to spare, I’d love to hear your answers to these quick questions:

  1. What type of software did you develop? (e.g., mobile app, enterprise system, game, etc.)

  2. Which software development paradigm did your team follow? (eg. Prototyping Model, Spiral Model, Fourth Generation Techniques (4GT), Waterfall Model Agile Model, V-Shaped Model, Incremental Model, RAD (Rapid Application Development), Feature Driven Development (FDD), Big Bang Model, Scrum, etc)

  3. Why did you choose that particular paradigm? (e.g., client requirement, team familiarity, project scale, etc.)

Your input will be used for academic purposes only, and it would really help me complete this task with real-world insights. Thank you so much in advance!

11
12
13
 
 

cross-posted from: https://lemmy.ml/post/28250905

cross-posted from: https://lemmy.ml/post/28250870

Hello everyone !

I'm seeding/cross-post this in 3 communities because I think I will get better answers in each respective one (Hardware, coding, electronics).

As the title say I'm want to learn to build from the ground up those cheap solar led/optic fiber lightning, here some images to get what I mean:

They come in bundles but after awhile they just die out without repair ability which kinda sucks and because they are cheap my mum keeps buying them... So, I would like to build ones I'm able to repair and customize :). However I have absolutely NO idea where to begin and what exactly I'm searching for... I'm lacking the skills and knowledge on the 3 fronts !

  • What hardware I'm looking for ?
  • What kind of electronics ?
  • What programming language to glue everything together?
  • .... ?

I'm not afraid to get my hands dirty and learn how to micro-solder, learn some coding skills to get everything neatly glued together software wise, learn the necessary hardware or other important and necessary stuff to achieve this goal ! I'm looking for every good and reliable advice to get me started !

One thing though, If i have to learn some hardware/low level coding skills I would prefer a language that would be useful for other stuff in the long run.

Thank you in advance and I'm already sorry if I'm very slow to respond, I'm not native and the flood amount of information I will probably get, will surpass my ability to respond to everyone right away.

Also every other directions are welcome, like:

  • how to repair the old ones? Do I need to flash their proprietary software/hardware?

Thank you !

14
 
 

I'm doing some Galois Field / Cyclic Redundancy Check research for fun and I've come across an intriguing pattern that I need a data structure for.

Across the 64-bit (or even 128-bit or larger) spaces, I've discovered an interesting pattern relating to hamming distances that I'd like a data structure to represent.

I'm going to need something on the order of ~billions of intervals each having somewhere between 1 item to ~1 billion per interval. And I'd like to quickly (O(1) or O(lg(n))) determine if other intervals intersect.


For 32-bit space I can simply make a 512MB Bitmask lol and then AND/OR the two Bitmask. Easy

But for 64-bit space I'm stuck and a bit ignorant to various data structures. I'm wondering if someone out there has a good data structure for me to use?

I've read over Interval Trees on Wikipedia. I'm also considering binary decision diagram over the 64-bits actually. Finally I'm thinking of some kind of 1-dimension octtree like datastructure (is that just a binary tree?? Lol. But BVH trees in 3d space seems similar to my problem it's just I need it optimized down to 1 dimension rather than 3.) Anyone else have any other ideas or cool data structures that might work?

15
 
 

The Linux foundation announced "neonophos", but Eurostack has been around for a while. Why do these two exist separately and not together?

16
 
 

The Push Notification Hub (PNH) service recently went through significant modernization. We migrated from legacy components like .NET Framework 4.7.2 and custom HTTP server called β€œRestServer”, to .NET 8 and ASP.NET Core 8. Moreover, for handling outgoing requests, we moved from custom HTTP client/handler called β€œHttpPooler”, to Polly v8 and SocketsHttpHandler. This article describes the journey thus far and its impact on PNH performance.

Sections: Intro (what is PNH), expectations, measurement, migration phases (concrete tech and measurements), closing thoughts, next steps.

PNH is deriving great benefits from .NET 8. Overall performance improved, as evidenced by the Q-Factor metric, by about 70%. Performance is a major factor for a service like this and will reflect positively in basically all flows on Teams platform that got to do with messaging. The results actually exceeded our expectations by significant margin.

17
 
 

I've read multiple times that CUDA dominates, mostly because NVIDIA dominates. Rocm is the AMD equivalent, but OpenCL also exists. From my understanding, these are technologies used to program graphics cards - always thought that shaders were used for that.

There is a huge gap in my knowledge and understanding about this, so I'd appreciate somebody laying this out for me. I could ask an LLM and be misguided, but I'd rather not 🀣

Anti Commercial-AI license

18
 
 

cross-posted from: https://lemmy.sdf.org/post/31995242

Archived

Unveiling Trae: ByteDance's AI IDE and Its Extensive Data Collection System

Trae - the coding assistant of China's ByteDance - has rapidly emerged as a formidable competitor to established AI coding assistants like Cursor and GitHub Copilot. Its main selling point? It's completely free - offering Claude 3.7 Sonnet and GPT-4o without any subscription fees. Unit 221B's technical analysis, using network traffic interception, binary analysis, and runtime monitoring, has identified a sophisticated telemetry framework that continuously transmits data to multiple ByteDance servers. From a cybersecurity perspective, this represents a complex data collection operation with significant security and privacy implications.

[...]

Key Findings:

  • Persistent connections to minimum 5 unique ByteDance domains, creating multiple data transmission vectors
  • Continuous telemetry transmission even during idle periods, indicating an always-on monitoring system
  • Regular update checks and configuration pulls from ByteDance servers, allowing for dynamic control
  • Permanent device identification via machineId parameter, which appears to be derived from hardware identifiers, enabling long-term tracking capabilities
  • Local WebSocket channels observed collecting full file content, with portions potentially transmitted to remote servers
  • Complex local microservice architecture with redundant pathways for code data, suggesting a deliberate system design
  • JWT tokens and authentication data observed in multiple communication channels, presenting potential credential exposure concerns
  • Use of binary MessagePack format observed in data transfers, adding complexity to security analysis
  • Extensive behavioral tracking mechanisms capable of building detailed user activity profiles
  • Sophisticated data segregation across multiple endpoints, consistent with enterprise-grade telemetry systems

[...]

19
20
21
22
 
 

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

I have a rather large Python script that I use as basically a replacement for autohotkey. It uses pynput for keyboard and mouse control - and at least on Windows, it works exactly how I expect.

I recently started dual-booting with Linux and have been trying to get the script to work here as well. It does work but with mixed results - in particular, I found that pynput has bizarrely wrong output for special characters, in a way that's both consistent and inconsistent.

The simplest possible case I found that reproduces the error is this script:

import time
from pynput import keyboard

# Sleep statement is just to give time to move the mouse cursor to a text input field
time.sleep(2)

my_kb = keyboard.Controller()

text = 'πŸ†' # Eggplant emoji
my_kb.type(text)

time.sleep(1)

text = 'π•₯𝕖𝕀π•₯' # blackboard bold test
my_kb.type(text)

time.sleep(1)

text = '𝐭𝐞𝐬𝐭' # bold test
my_kb.type(text)

When I run that script right now, it produces the output "πŸ†π•₯π•₯𝕀π•₯𝐭𝐭𝐬𝐭". And if I run it again, it'll produce the same output. And if I change the eggplant emoji to something else, like the regular character 'A', it will still produce the same output (specifically "Aπ•₯π•₯𝕀π•₯𝐭𝐭𝐬𝐭"). But... If I log out and log back in, then the output changes to something else that's still wrong, but differently. For example, when I changed the eggplant to a regular 'A', then relogged, the output became "Aπ•₯𝕖𝕖π•₯𝐭𝐞𝐞𝐭". And then that wrong output will keep being the same wrong output until I log out and back in again. If the test strings don't change, then the incorrect outputs don't change on relog - but if they do, then they do.

In the larger script, errors seemed to chain together somehow - like if I produced an eggplant emoji, then tried to write blackboard bold test, I would get "πŸ†π•–π•€πŸ†". This is despite verifying just before running the pynput.keyboard.Controller.type function that what it was about to type was correct. The issue also happens if I type it character-by-character with press and release functions.

I am very new to Linux. I'm on Linux Mint. I'm running this in a python3 venv that just has pynput and two other external libraries installed. ChatGPT thinks the issue might be related to X11. The issue does not occur at all on Windows, using the exact same code. On Linux there seems to be no issues with typing regular text, just special characters.

23
24
25
view more: next β€Ί