Programming

13562 readers
1 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 2 years ago
MODERATORS
1
2
 
 

geteilt von: https://feddit.org/post/10033814

Excellent new tool to learn Git!

3
 
 

I wrote this implementation many years ago, but I feel it didn’t receive the recognition it deserved, especially since it was the first freely available. So, better late than never—I’d like to present it here. It’s an algorithm for computing the Weighted Voronoi Diagram, which extends the classic Voronoi diagram by assigning different influence weights to sites. This helps solve problems in computational geometry, geospatial analysis, and clustering, where sites have varying importance. While my implementation isn’t the most robust, I believe it could still be useful or serve as a starting point for improvements. What do you think?

4
 
 

AWS Certified Cloud Practitioner - Free Practice Quiz

Hey 👋,

Recently I obtained the certificate and I thought it would be great to have a free quiz!

5
6
7
 
 

Let's say I have to host 25 websites.. How do I know how powerful should my VPS be? Which specs it should have, how fast the connection should be to handle X visits per day?

How do you understand which are your system requirements BEFORE deploying a project? Do you just make estimates and then scale up? Or there's some kind of tool to benchmark? how to handle this kind of stuff?

8
9
 
 

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

I wrote a CLI tool that generates basic scaffolding for all sorts of coding projects, from Zig applications to NPM packages.

Feel free to ask questions or contribute!

10
 
 

I am a jr. Dev, but not imaginative. I find most programming languages to be poorly advertised and explained. Usually they assume too much knowledge.

What would I use Web Assembly, like Goblin (https://spritely.institute/), for? Are there examples of Web Assembly programs?

It is for web pages, or online games? Can they be run offline?

11
 
 

Hi all, I am one year into my coding journey and could use a little guidance on a project. I have created a Python program that provides real-time hockey stats and game information, using API calls (documentation here: https://github.com/Zmalski/NHL-API-Reference). The code is working, and it's really fun to see stats updating in real time as I'm watching my favorite sport. Just one problem: this is all happening in the terminal window 😆 What Python library would you recommend for creating a pleasing visual display for dynamically-generated data? I thought it might be Pygame, which I have some experience with, but now I'm not sure. Right now I'm only presenting text and numbers, not drawing any plots, but should I consider matplotlib? Thanks for any advice!

Edit: I think the term for what I'm trying to make is a "dashboard"? Is that correct, and does that help answer the question? Thanks y'all!

12
 
 

Hi! I'm trying to achieve this configuration: essentially all the traffic in the network should pass the content filtering in the proxy, assume I have control over the clients. All not proxied traffic should be blocked by default.

I know not all network traffic can pass through proxy, but I'm not sure I understand how actually all of this work.

My UFW firewall configuration is the following:

To                         Action      From
--                         ------      ----
3128                       ALLOW OUT   Anywhere                  
53                         ALLOW OUT   Anywhere        

53 is for DNS requests (that cannot pass through the proxy), even if I use DOH this port needs to be open for bootstrapping.

3128 is Squid proxy port.

I'm assuming the following:

client -> dns request (53) / cannot be handled by the proxy -> dns response client -> proxy (all ports that the proxy can handle) -> http/https/ftp response client -> blocked (all other ports)

But from UFW logs it looks like the client is trying to make requests (eg. https requests) directly through port 443, instead that passing from 3128.. Maybe I'm getting something wrong here on how Proxies work.

Do you have any suggestion?

13
 
 

After finding myself another time completely sucked by all the internet bullshit, finding a huge difficulty doing whichever task involves using a computer, I think I am finally sure to address the need of better moderation on the internet.

Not for platforms, but for people.

So many people have these kind of problem with the internet: there is too much dispersion, it is hard to use it while staying focused on a single task and it's hard not getting hooked by one of the countless activities you can find online. Weren't PC conceived to be "bycicles for the brains"? The internet was supposed to be a place where to share things to each other. It's a tool, but a tool needs to be at the service of who's using it, and so many people nowadays have no fucking idea of what they are doing. And even between tech savvy people (I include myself here too), how many of us do you think could decide to stop using all the bad side (because we know it's bad, I mean we're on Lemmy) of the internet just with will force?

People should have the right to use the internet it as they please, but as we have so many tools for finding and consuming mindlessly everything on the web, and as they are pushed towards us so strongly, I think it's right to give more options to "opt out" as well, for one that desires so.

I think we lack tools for moderation, for making a clear distinction between "I wanna consume this kind of content" and "I wanna stay the hell away from all this bullshit".

It's cool there are alternatives: Lemmy it's really safer as a space compared to the hell that's Reddit now, but I think we should go deeper than that and decide to opt out better from what we don't like as well, and while the focus should still be "build a better internet/software/hardware", I think we need to address the problem of the difficulties on taking distances from certain aspects of the currently unavoidable and somewhat desperate situation of the web.

Linux has a clear solution for managing one's activity on a computer: users, groups and ownership. The admin has the complete freedom to shape the environment for the users. And it's very effective, once a directory belongs to another user, you cannot read it without the other user consent (or the admin). There's not so much space for bypassing this, and it's effective.

But what do we have for the web?

We can use browser extensions, proxies, DNS filtering, VPNs, blacklists etc etc.. But bypass methods for all this kind of filtering is one web search away. At least most of that.

I've come to a point that I am thinking only strict whitelisting with only the few sites you want could be good, blocking every other connection. But it still looks incredibly hard with so many sites using CDNs now, and so many new domains registered.

We should be able to have something like users on accessing web content too: Jane is allowed to visit streaming sites, Bob wanna focus on studying and can only visit cultural content. But I think categorization and moderation of an ever changing content, which is not as "static" as on an OS, needs ever changing moderating tools as well.

I think AI could have an amazing role in this, they can scrape content before we visit it and understand if it is suitable for our purpose. And since content always changes, ai will be always changing as well. I am also thinking that setting something like an "AI in the middle" in between https requests could have it's role, even if privacy concerns would need to be addressed. I like the concept of something like openai's omni-moderation API for example.

Projects like TOR focus on breaking censorship and that is amazing, but I don't see why a user shouldn't be able to censor some content reliably by himself if he wants to (on a client level).

I don't know, but I feel like a better control on how we use the web would be needed, if someone wanna have a talk/brainstorm I can make a Matrix room.

14
15
 
 

Not directly related to programming, but i was thinking it might be too technical for technolgy post.

16
 
 

Do you want to support our community? If any of the content found on our platform has contributed something to you, help us grow by participating in it, interacting with other programmers. Create your account today. https://chat-to.dev/ #programming #programmers #hacker #code

17
 
 

What are some programming languages that reuse most of the syntax of another (rather than just a few elements of it?)

18
38
submitted 3 months ago* (last edited 3 months ago) by [email protected] to c/[email protected]
 
 
19
20
 
 

Even through it has some flaws, e.g. it's not fully memory safe (there are some programming languages that are even safer, like Ada)?

21
 
 

I'm looking to get a lemmy bot figured out for posting sports scores in real-time (or near it) like Reddit had for NHL games. The lemmy api reference states that rust has the api as a loadable library, but I've only ever done C/C++ and python. Anything Coursera style to get a basic overview of how to get started in Rust?

I did also see lemmy-bot but it looks like it doesn't handle post editing at the moment, and not sure i really want to learn how to use npm to be honest.