1
7

Hello lemmings, I made a program to ping every IPv4 address and collect data on respondents. I am almost done, but I want feedback on things I should change or how I can improve my current record of 5,000 pings / second.

I am currently aware that I need to properly parse the data I receive on the receive socket, since it's possible the TTL router messages might be confused as replies. ICMP is used on networks to inform other machines of network problems.

One issue I'm aware of is the tuning that has to go into maximizing throughput while also avoiding a total system freeze. My code seems to spend too much time opening sockets that it leaves no room for the actual OS. My only fix currently is limiting the CPU time to the ping timeout I used.

The overall program works like this: It keeps a linked list / pool of task objects. All objects are initially in the "free list" and then when they become associated with a socket, they move to the "active list". The program first checks for updated sockets with epoll which results in like 5% of sockets giving a response. It then closes any tasks that have timed out via linked list in O(1) each. The slow part is when it creates new sockets, since it doesn't really know when to stop, besides when the non-blocking socket informs it that it would block. I implemented a time limit on sending that is currently the maximum of the ping timeout. To increase throughput it seems like I need to streamline how I send ICMP packets.

https://github.com/bneils/PingStorm

2
15
rsync and outrage (medium.com)
submitted 2 days ago by cm0002@suppo.fi to c/programming@beehaw.org
3
11
submitted 6 days ago* (last edited 6 days ago) by RougeEric@lemmy.zip to c/programming@beehaw.org

I recently decided to ditch my ancient WordPress portfolio and build a new site from scratch.

Because I wanted to show off a little bit, I decided I wanted to make it into a 2D side-scroller using Little.js. The issue was figuring out how I could keep the site accessible.

I just wrote the first blog post in a series on how I am making that very site.
The site is still a work in progress; but I felt this could interest people here. And it gives me a chance to test out the blog feature I just coded in.

4
3

I wrote a blog post about me getting in to FSharp web application development, but am having issues deciding how I want the data access to look. I'm very much open to feedback!

5
7
OpenCL 3.1 is here (www.khronos.org)
submitted 1 month ago by JRepin@lemmy.ml to c/programming@beehaw.org

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

The Khronos OpenCL Working Group has released OpenCL 3.1, bringing widely deployed, field-proven capabilities into the core specification to expand functionality, including SPIR-V ingestion, that developers will be able to rely on across conformant implementations.

Features now mandated by OpenCL 3.1 have been deployed as extensions or optional capabilities. This is by design. The OpenCL working group evolves the specification by proving features in the field as extensions first, watching how they get used across multiple implementations, refining them based on developer feedback, and only then graduating them into the core specification.

Every conformant OpenCL 3.1 implementation will be required to consume SPIR-V kernels — a feature that has been one of the most requested by developers. OpenCL 3.1 additionally requires support for the SPIR-V query extension, which enables applications to enumerate the SPIR-V capabilities, extensions, and versions that a device supports, simplifying the adoption of new SPIR-V features as they become available.

Several features essential to HPC and AI kernels are also now mandatory in the core OpenCL 3.1 specification:

  • Subgroups, including shuffles, rotations, and an expanded set of supported data types. A fundamental building block for tuned reductions, scans, and matrix kernels.
  • Integer dot products, including saturating and accumulating variants, together with extended bit operations: Both map directly to dedicated hardware instructions on a wide range of modern silicon, and both are common building blocks for matrix multiplications and the low-precision arithmetic central to inference workloads.
  • A new query for the suggested local work-group size. This gives applications and profilers a runtime hint for the optimal work-group size for a given kernel and device, eliminating the need for manual tuning or repeated size calculations across multiple enqueues and improving performance predictability on diverse hardware.
  • A standard device UUID query, matching Vulkan’s VkPhysicalDeviceIDProperties::deviceUUID. This allows applications to correlate the same physical device across APIs, which is essential for multi-device systems and for external memory-sharing scenarios that span OpenCL and Vulkan.
6
8

wares was inspired by Obtainium and pkgit.

wares is available on GitHub. Looking for anyone willing to test, provide feedback, or even contribute

7
2

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

Ever seen our AOSP based apps (Phone,Messages,Gallery...) & thought I could make a difference to bring them up?

We're seeking a senior Android engineer to take ownership of the default app suite:

https://grapheneos.org/hiring#android-apps-software-engineer

Code standard is high, vibe coders need not apply.

8
44
submitted 2 months ago by Mubelotix@jlai.lu to c/programming@beehaw.org
9
2
10
10
11
18
12
11
submitted 3 months ago by troyunrau@lemmy.ca to c/programming@beehaw.org

You may have noticed that activity on the public Log4cxx, Log4j, and Log4net repositories has slowed since December 2025. I want to reassure you that the projects are still being actively monitored...

13
12
submitted 3 months ago by mothasa@x69.org to c/programming@beehaw.org

Companies are replacing entry-level coding positions with AI tools, creating a dangerous gap in the talent pipeline. If no one trains the next generation of developers, who will maintain and build the systems of the future?

14
20
15
17
submitted 5 months ago by yoasif@fedia.io to c/programming@beehaw.org

TL;DR: The big tech AI company LLMs have gobbled up all of our data, but the damage they have done to open source and free culture communities are particularly insidious. By taking advantage of those who share freely, they destroy the bargain that made free software spread like wildfire.

16
5
submitted 7 months ago by fhoekstra@feddit.nl to c/programming@beehaw.org

cross-posted from: https://feddit.nl/post/45839000

When publishing a package for use by programmers, automated changelog generation is very beneficial. In this blog post, I explore how to do it in a simple way that works everywhere.

17
-1
submitted 7 months ago by Mhad1@lemmy.zip to c/programming@beehaw.org

cross-posted from: https://lemmy.zip/post/52108691

Hi, this is a post for you to rant on your sore points on technology

See I am trying to think of a good project idea one that people actually want solved, is there an app you wished existed, a site u wanted, put it down here and hey what do you know you may just see an ad in some while that now it exists

18
20
19
8
20
8
21
32
submitted 7 months ago by cm0002@lemdro.id to c/programming@beehaw.org
22
13
submitted 8 months ago by wax@feddit.nu to c/programming@beehaw.org

What are some general recommendations to maintain a set of patches on top of a library distributed as a source tarball? Until now I've been adding the versions to a git repository by deleting previous files and adding the new files in a "upstream" branch, then merging that branch into the main branch which contains my patches. This turned into more work than I expected because they started moving files around and renaming in new releases.

I should probably be rebasing instead of merging, but are there any other recommendations for this type of situation?

23
13
submitted 9 months ago by ell1e@leminal.space to c/programming@beehaw.org

cross-posted from: https://leminal.space/post/24911246

I'll be self-hosting a service with user submissions soon, so I'm worried about the https://howto.geoblockthe.uk/ situation.

Based on this I've wondered, are there any community maintained geo block lists that might be useful? All database options I found are either 1. an on-demand online service which seems questionable for privacy reasons, or 2. IPv4 only, or 3. have weird terms of use with a gag clause regarding the entire company making it and other weird stuff.

I'm not a fan of geo blocking in general, but the situation is what it is.

PS: Please don't discuss the Online Safety Act itself too much in the comments, or whether somebody should be using a geo ip to handle this. While I might appreciate useful input on that, I'm hoping this post can remain a resource for those who are looking for such a database for other reasons as well.

24
14
25
-1
submitted 10 months ago by dontblink@feddit.it to c/programming@beehaw.org

TypeScript does not throw an error at compile time for accessing an out-of-bounds index. Instead, it assumes that the value could be one of the types defined in the array (in this case, 1 or 2) or undefined.

TypeScript automatically infers the type of a value accessed from an array, even if that access is out of bounds. It assumes that the value could be one of the defined types or undefined, which can lead to confusion if you expect stricter enforcement of valid indices.

I just spent the last 2 hours trying to understand why I was getting a valid type from something that shouldn't have been valid.

I think that the hate that JavaScript receives is well deserved, at least coming from Rust this is an absolute nightmare.

view more: next ›

Programming

15422 readers
13 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 3 years ago
MODERATORS