1
16
  • The developer of the 'node-ip' project made the GitHub repository read-only after disputing the severity of a reported vulnerability (CVE-2023-42282).
  • The vulnerability involved incorrect identification of private IP addresses in non-standard formats, but the developer argued it had a dubious security impact.
  • The situation highlights ongoing issues with unverified CVE reports causing unnecessary panic and frustration for open-source project maintainers.
2
4
submitted 3 hours ago* (last edited 3 hours ago) by MortySmith@programming.dev to c/programming@programming.dev
3
15

This specification defines the UUIDs (Universally Unique IDentifiers) and the UUID Uniform Resource Name (URN) namespace. UUIDs are also known as GUIDs (Globally Unique IDentifiers). A UUID is 128 bits long and is intended to guarantee uniqueness across space and time. UUIDs were originally used in the Apollo Network Computing System and later in the Open Software Foundation's (OSF) Distributed Computing Environment (DCE), and then in Microsoft Windows platforms.

4
85
submitted 17 hours ago by otter@lemmy.ca to c/programming@programming.dev
5
61

Fullstack GUI library for web, desktop, mobile, and more. In Rust using a HTML + CSS renderer built on top of Servo.

6
0
New UUID Formats (www.ietf.org)

This document presents new time-based UUID formats which are suited for use as a database key.

7
33

I've seen these posts

But actually I haven't been able to figure out exactly how to get the posts a user has made in lemmy. I've seen this page but I think this is for a different lemmy instance, I'm not sure https://join-lemmy.org/api/interfaces/GetPosts.html

Can anyone point me to a documentation on how to make this?

8
10

tl;dr technical about about the upcoming sched_ext interface in Linux 6.11, used for running out-of-tree CPU schedulers on the fly

9
178

The project home page.

The Github

Looks just like VS Code and I think it's still built on electron so take that as you will.

10
37
11
25
submitted 3 days ago* (last edited 3 days ago) by bullshitter@lemmy.ml to c/programming@programming.dev

I want to create an incremental search function for a language. It has to show the same result when I use either Devnagri or English ( how it sounds) For example : 'Kya' should show क्या , 'क्या' should show क्या

Please suggest some guide or tutorial, I am okayish in programming and open to learning

Cheers.

12
42

Looking for a change in work and would love suggestions on how to find jobs with understanding bosses and/or odd hours. I can always get my work done, but I tend to put in bizarre hours for my own projects due to the ebb/flow of chronic pain.

For me personally, I would prefer to work 16 hours on my good days and 0 hours on the days I can barely see straight because of migraine-level pain in my neck and back.

I'm currently working in San Francisco and have major issues getting to/from work without my entire day being focused on work-related travel (not to mention spending all of my time at home recuperating for the next work day)

I would take a massive pay cut to have a job from home with an understanding boss. Country is entirely irrelevant to me if they speak English and accept foreigners; otherwise, I know 2nd-grade-level Spanish, German, and French.

  • Is going through a recruiter a good idea?
  • Would there be any agencies that work specifically with disabled workers?
  • If not, what are good websites for actually getting call-backs on dev jobs?

I have all of the requirements for a home gig (desk, monitors, multiple computers, home server, webcam, etc), is there a way to subtly express that to a potential hiring manger?

13
73
14
9
submitted 4 days ago* (last edited 3 days ago) by fatbobman@programming.dev to c/programming@programming.dev

At WWDC 2024, Apple once again introduced a series of remarkable new APIs for SwiftUI’s ScrollView component. These new features not only enhanced developers’ ability to control scrolling behaviors but also reflected the ongoing evolution of the SwiftUI framework’s design philosophy. This article will explore these latest scroll control APIs and review the development of all significant APIs related to scroll control since the inception of SwiftUI. Through this micro view, we will reveal the changes in SwiftUI’s design style over the past few years and the underlying macro design trends.

15
59

I've encountered this many times where I simply don't understand the context and use of an API based of the API documentation unless I can find an example that already utilizes it in a working project. The first thing that comes to mind is Py Torch. I've tried to figure out how some API features work, or what they are doing in model loader code related to checkpoint caching but failed to contextualize. What harebrain details are obviously missing from someone who asks such a silly question?

16
27

A new ADP Research Institute report shows employment for software developers has declined from January 2018. Data elsewhere show fewer opportunities for people to fill software development and tech roles after the US labor market is no longer as hot as it was a few years ago.

"The tech job market has undeniably slowed since the end of 2022, cooling after a few years of rapid hiring during the pandemic recovery," Daniel Zhao, Glassdoor's lead economist, said in a written statement. "Rising interest rates, the end of pandemic-era trends and a slowing economy overall has crimped demand for tech workers."

17
-2

Check out our open-source, language-agnostic mutation testing tool using LLM agents here: https://github.com/codeintegrity-ai/mutahunter

Mutation testing is a way to verify the effectiveness of your test cases. It involves creating small changes, or “mutants,” in the code and checking if the test cases can catch these changes. Unlike line coverage, which only tells you how much of the code has been executed, mutation testing tells you how well it’s been tested. We all know line coverage is BS.

That’s where Mutahunter comes in. We leverage LLM models to inject context-aware faults into your codebase. As the first AI-based mutation testing tool, Mutahunter surpasses traditional “dumb” AST-based methods. Our AI-driven approach provides a full contextual understanding of the entire codebase, enabling it to identify and inject mutations that closely resemble real vulnerabilities. This ensures comprehensive and effective testing, significantly enhancing software security and quality.

We’ve added examples for JavaScript, Python, and Go (see /examples). It can theoretically work with any programming language that provides a coverage report in Cobertura XML format (more supported soon) and has a language grammar available in TreeSitter.

Check it out and let us know what you think! We’re excited to get feedback from the community and help developers everywhere improve their code quality.

18
-10
19
10
submitted 1 week ago* (last edited 1 week ago) by maximalian@sopuli.xyz to c/programming@programming.dev

I have a server (S-1) with HAProxy and a number of residential proxies (PR-s) as login-passwords-port. There're multiple users who will connect to the internet via S-1.

I want to have HAProxy to forward incomming traffic of the users via a random proxy amoung PR-s with 2 conditions:

  1. only when there's certain, pre-defined keyword in the URL, traffic must be routed via a proxy.
  2. In all other cases, it must go to a requested resource directly as is, without a proxy

How would I implement this?


(1) client -> HaProxy -> if keyword --> sub-proxy (random) -> website

(2) client -> HaProxy -> if no keyword --> website

20
14

I’m starting as data analyst (roughly bachelor level). My responsibility will be to analyze time series data and classify agents and write reports. I won’t be responsible for the database management. It’s likely that I have to use R because my colleagues use R. I guess I may use python if it’s more appropriate.

Which books and other things can you guys recommend? What should I avoid?

21
63
submitted 1 week ago* (last edited 1 week ago) by alphacyberranger@sh.itjust.works to c/programming@programming.dev

How do people find out or know whether your repo which is having MIT or apache or AGPL license is being used by a corpo and profiting from it and not making the code open source or paying license fees?

22
22
23
-33
24
435
submitted 1 week ago* (last edited 1 week ago) by ch00f@lemmy.world to c/programming@programming.dev

I originally told the story over on the other site, but I thought I’d share it here. With a bonus!

I was working on a hardware accessory for the OG iPad. The accessory connected to the iPad over USB and provided MIDI in/out and audio in/out appropriate for a musician trying to lay down some tracks in Garage Band.

It was a winner of a product because at its core, it was based on a USB product we had already been making for PCs for almost a decade. All we needed was a little microcontroller to put the iPad into USB host mode (this was in the 30-pin connector days), and then allow it to connect to what was basically a finished product.

This product was so old in fact that nobody knew how to compile the source code. When it came time to get it working, someone had to edit the binaries to change the USB descriptors to reflect the new product name and that it drew <10mA from the iPad's USB port (the original device was port-powered, but the iPad would get angry if you requested more than 10mA even if you were self-powered). This was especially silly because the original product had a 4-character name, but the new product had a 7-character name. We couldn't make room for the extra bytes, so we had to truncate the name to fit it into the binary without breaking anything.

Anyway, product ships and we notice a problem. Every once in a while, a MIDI message is missed. For those of you not familiar, MIDI is used to transmit musical notes that can be later turned into audio by whatever processor/voice you want. A typical message contains the note (A, B, F-sharp, etc), a velocity (how hard you hit the key), and whether it's a key on or key off. So pressing and releasing a piano key generate two separate messages.

Missing the occasional note message wouldn't typically be a big deal except for instrument voices with infinite sustain like a pipe organ. If you had the pipe organ voice selected when using our device, it's possible that it would receive a key on, but not a key off. This would result in the iPad assuming that you were holding the key down indefinitely.

There isn't an official spec for what to do if you receive another key-on of the same note without a key-off in between, but Apple handled this in the worst way possible. The iPad would only consider the key released if the number of key-ons and key-offs matched. So the only way to release this pipe organ key was to hope for it to skip a subsequent key-on message for the same key and then finally receive the key-off. The odds of this happening are approximately 0%, so most users had to resort to force quitting the app.

Rumors flooded the customer message boards about what could cause this behavior, maybe it was the new iOS update? Maybe you had to close all your other apps? There was a ton of hairbrained theories floating around, but nobody had any definitive explanation.

Well I was new to the company and fresh out of college, so I was tasked with figuring this one out.

First step was finding a way to generate the bug. I wrote a python script that would hammer scales into our product and just listened for a key to get stuck. I can still recall the cacophony of what amounted to an elephant on cocaine slamming on a keyboard for hours on end.

Eventually, I could reproduce the bug about every 10 minutes. One thing I noticed is that it only happened if multiple keys were pressed simultaneously. Pressing one key at a time would never produce the issue.

Using a fancy cable that is only available to Apple hardware developers, I was able to interrogate the USB traffic going between our product and the iPad. After a loooot of hunting (the USB debugger could only sample a small portion, so I had to hit the trigger right when I heard the stuck note), I was able to show that the offending note-off event was never making it to the iPad. So Apple was not to blame; our firmware was randomly not passing MIDI messages along.

Next step was getting the source to compile. I don't remember a lot of the details, but it depended on "hex3bin" which I assume was some neckbeard's version of hex2bin that was "better" for some reasons. I also ended up needing to find a Perl script that was buried deep in some university website. I assume that these tools were widely available when the firmware was written 7 years prior, but they took some digging. I still don't know anything about Perl, but I got it to run.

With firmware compiling, I was able to insert instructions to blink certain LEDs (the device had a few debug LEDs inside that weren't visible to the user) at certain points in the firmware. There was no live debugger available for the simple 8-bit processor on this thing, so that's all I had.

What it came down to was a timing issue. The processor needed to handle audio traffic as well as MIDI traffic. It would pause whatever it was doing while handling the audio packets. The MIDI traffic was buffered, so if a key-on or key-off came in while the audio was being handled, it would be addressed immediately after the audio was done.

But it was only single buffered. So if a second MIDI message came in while audio was being handled, the second note would overwrite the first, and that first note would be forever lost. There is a limit to how fast MIDI notes can come in over USB, and it was just barely faster than it took to process the audio. So if the first note came in just after the processor cut to handling audio, the next note could potentially come in just before the processor cut back.

Now for the solution. Knowing very little about USB audio processing, but having cut my teeth in college on 8-bit 8051 processors, I knew what kind of functions tended to be slow. I did a Ctrl+F for "%" and found a 16-bit modulo right in the audio processing code.

This 16-bit modulo was just a final check that the correct number of bytes or bits were being sent (expecting remainder zero), so the denominator was going to be the same every time. The way it was written, the compiler assumed that the denominator could be different every time, so in the background it included an entire function for handling 16-bit modulos on an 8-bit processor.

I googled "optimize modulo," and quickly learned that given a fixed denominator, any 16-bit modulo can be rewritten as three 8-bit modulos.

I tried implementing this single-line change, and the audio processor quickly dropped from 90us per packet to like 20us per packet. This 100% fixed the bug.

Unfortunately, there was no way to field-upgrade the firmware, so that was still a headache for customer service.

As to why this bug never showed up in the preceding 7 years that the USB version of the product was being sold, it was likely because most users only used the device as an audio recorder or MIDI recorder. With only MIDI enabled, no audio is processed, and the bug wouldn't happen. The iPad however enabled every feature all the time. So the bug was always there. It's just that nobody noticed it. Edit: also, many MIDI apps don't do what Apple does and require matching key on/key off events. So if a key gets stuck, pressing it again will unstick it.

So three months of listening to Satan banging his fists on a pipe organ lead to a single line change to fix a seven year old bug.

TL;DR: 16-bit modulo on an 8-bit processor is slow and caused packets to get dropped.

The bonus is at 4:40 in this video https://youtu.be/DBfojDxpZLY?si=oCUlFY0YrruiUeQq

25
56
A Rant about Front-end Development (blog.frankmtaylor.com)

Too good NOT to share.

My brothers and sisters in Christ I want you to know that I care about your souls enough to share these truths with you:

  • You don’t need JavaScript to make a web page.
  • You don’t need JavaScript to write styles.
  • You don’t need JavaScript to make an animation.
  • You don’t need JavaScript just to show content.
view more: next ›

Programming

16195 readers
455 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 1 year ago
MODERATORS