Programming

https://legal.programming.dev/docs/donation-policy/

Hi all, I'm relatively new to this instance but reading through the [instance docs](https://legal.programming.dev/docs/donation-policy/) I found: >Donations are currently made using [snowe’s github sponsors page](https://github.com/sponsors/snowe2010/). 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.*

127
17

Zig vs Rust. Which one is going to be future? I think about pros and cons and what to choose for the second (modern) language in addition to C. [@programming@programming.dev](https://programming.dev/c/programming)

35
62

\~ Code Crafters Cafe \~ Hello everyone. You know me from two scandalous topics: [It's time to return to the roots, to the C programming language](https://programming.dev/post/19946718) and [Why is C hidden gold](https://programming.dev/post/19946015). I have got enough answers and a predictable assessment. You might have thought that I was some old man from the past or an inadequate newbie who did not understand what he was saying. Some supported me. These topics were clearly fanatical. It's true. In fact, I am not for fanaticism. I am for restoring the true goals of programming as an art. I created my "cafe" even before this, first in irc, then in the matrix. This is a place for people who perceive programming as creativity, art, handmade, crafting. Here we are not tied to C or other languages. If you are a Rust programmer and do not want to [rewrite the whole world in Rust](https://programming.dev/post/18944040), you are welcome. If you are a JavaScript programmer and do not think that you need to learn TypeScript instead of JavaScript (because it is unsafe) and that everything should be written in Angular and React, you are welcome. You are tired of writing SaaS garbage, you are welcome. Whether you are a CSS artist, or just a creator, you are welcome. No idols, fanaticism, or heroes. A cozy place where you can share a common vision and feeling with like-minded people. The only rule is to be human and respectful. Official description: \~ A cozy place in the jungle of the techno world for all programmers who like to create high-quality and effective code from scratch with their own hands. Hobbyists, professionals, beginners, and just curious about how things really work. Handmade, free and open-source software written with a love for engineering and deep knowledge is code crafting. \~ Welcome to our campfire: irc: irc://irc.libera.chat/[#codecrafters](https://snac.bsd.cafe?t=codecrafters) matrix: [https://matrix.to/#/#codecrafters:bsd.cafe](https://matrix.to/#/#codecrafters:bsd.cafe) [@programming@programming.dev](https://programming.dev/c/programming) [@technology@lemmy.world](https://lemmy.world/c/technology)

22
7

I begun learning programming a few years ago, and it feels like I barely progressed. I know the basics and a bit of advanced python(I have learnt to use a few libraries), html and css plus a tiny bit of c++, but not much outside of those. I enjoy programming and solving problems using code, and it’s an enjoyable hobby of mine. But I feel like all I do is extremely basic and I want to advance but it feels overwhelming seeing the countless of things I could learn. I wanna know what are ways I can actually apply the things I have learnt/will learn on somewhat worthwhile things, because the main problem right now is that I don’t really have anything to do with the things I’ve learnt other than silly projects that don’t really last more than a day and aren’t that complex. I also want to advance my knowledge as previously stated since I feel like I know too little for the amount of time I’ve been learning to program. For context I’m still in school but not too far off from higher ed, and I have a decent amount of free time on most days(~2-4 hrs). Thanks if you reply

69
32
github.com

**I just spent 6 hours of debugging some code, just to find out I had to delete a line in a `.gitkeep` file:** I'm developing a Grav skeleton, which is a kind of template for [Grav CMS](https://getgrav.org) to easily create sites with it. Such skeletons can include themes and plugins, which can be used to enhance its features and make individual sites. Now I had this error that the sitemap.xml (used to tell search engines which pages should be indexed and where to find them) threw an error because the XML declaration wasn't on the first line as it should, but on the 2nd line. It came out that every page had this empty line, no matter if html, json or xml. To find the bug causing this, I first disabled all plugins and enabled them step by step to find out which one produces said bug. It was the [shortcode-core plugin](https://github.com/getgrav/grav-plugin-shortcode-core), which can be used to style text with more than just markdown. Since this plugin isn't related in any way to the [sitemap plugin](https://github.com/getgrav/grav-plugin-sitemap), I searched for other possible error sources. After some playing around, I found out that when I remove a theme, the bug simply disappears. With that info, it had to be a problem with said theme. Since themes can include custom shortcodes and the shortcode plugin did make some "noises", I started investigating a bit more with that. While trying to find the bug, I accidentally deleted the shortcode folder, which had only a .gitkeep file in it. This file was necessary that the folder persist with git versioning because if there was no such directory, the plugin would output an error message. I then recreated the folder manually and the error was still gone. Even after recreating the .gitkeep file, there was no empty line in the output. After trying to find the bug, I checked git to see which edit made the bug resolve. And there was it: the .gitkeep file I recreated had some changes? But I didn't make any changes to the file except for recreating it. Wrong. The file originally had 2 empty lines, probably accidentally. And by recreating the file, it only had one line which resolved the bug. It came out that somehow the shortcode plugin tried to get shortcodes from this file and likely added the 2 empty lines to the output. And an empty line before the start of the XML declaration causes the XML parser to output an error. Deleting the 2nd empty line from the .gitkeep file removes the empty line from the output and the error is gone. Bug fixed. --- And I spent 6 hours today with the help of a kind stranger in a discord channel who was a bit like a 2nd brain to me. It really helped having someone who hasn't worked on this skeleton and could see some bugs you don't see because you're too familiar with it ("Betriebsblind" in German). Edit: The plugins don't get maintained by me, they're getting maintained by the Grav team. I plan to create an issue on GitHub if I know more and probably identified the code causing the problem.

48
8
https://benrutter.github.io/posts/fun-with-hy/

Hy (a lisp built on top of Python similar to how Clojure is built on top of Java) released v1 recently. I couldn't resist playing with it and found it worked sooo nicely. Thanks all the maintainers for creating a great language!

4
0
positive-intentions.com

Functional Web Components https://positive-intentions.com/blog/dim-todo-list Github: https://github.com/positive-intentions/dim Demo: https://dim.positive-intentions.com

17
4

[@programming@programming.dev](https://programming.dev/c/programming) Nelua programming language, any one Nim or better? ”What is Nelua? Nelua is a systems programming language for performance sensitive applications, like real-time applications and game engines. Its syntax and semantics are similar to Lua, but its garbage collection is optional, it provides optional type notations, and it is free from an interpreter. Nelua uses ahead-of-time compilation to generate optimized native binaries. It is metaprogrammable at compile-time using Lua and it is simple and easy to use. Nelua takes advantage of ahead-of-time compilation using powerful, optimized C compilers such as GCC or Clang, and thus generates very efficient native code. No interpreter is needed at runtime. Nelua compiles to C first then to native code, thus you can read and debug the generated C code, mix in other C code without costs, create or use C libraries, use C tools, and reuse the generated C code. You can think of Nelua like a "better C" heavily inspired by Lua.” Any thoughts, experiences?

25
2

https://ideatrash.net/2024/09/lies-damn-lies-and-surveys-about-ai.html The author here breaks down GitHub’s self-congratulatory survey on Copilot and argues that GitHub’s claims are not supported by their data.

36
6

I am currently taking a cybersecurity course and as the topic of my project I chose pentesting. I am aware there are CTFs and intentionally vulnerable applications, but I thought it would be interesting and fun to audit projects of other people who are also just students and/or learning programming. If you have a webapp, mobile application or any other internet connected project that has enough of an attack surface then I would love to get in touch and possibly pentest it. Of course I'd report any issues I'd find so hopefully it would benefit both parties. I also do pentesting as my job, so I am not a total newbie. If you have any questions feel free to reply here or DM me. If you are scared of letting someone you don't know pentest your application (which is understandable) I can also help with setting up a testing environment, creating mock data, etc. Thanks in advance!

24
1

[@programming@programming.dev](https://programming.dev/c/programming) Why is C hidden gold? Let's say you decide to learn programming. You have two options. Either use the education system (college or courses) or become self-taught. In the first case, you will learn the programming languages that are imposed on you. The education system (universities, colleges, courses) uses the "modern" development stack. Because what matters to them is what can later bring income to companies and you in life, and taxes to the state. They are part of the system and that's how it works. Or because they want to get certificates from industry giants and use everything in their implementation - from development tools to ideology. Only a very few colleges and courses specializing in a very narrow field, such as embedded devices, can teach you the C language. If you choose to learn programming on your own, the first thing you will do is go to the Internet to determine where to start and what you need to learn today. Naturally, you will find there a lot of articles and posts on the topic of "what programming language to learn in X year". And they will contain a detailed or not very detailed comparison of “modern” languages. But you are unlikely to find the C language among them. Moreover, almost all of these languages will have the intention of being “C replacements”. Naturally, you will choose a new, powerful, and promising language that will replace the “dying C”, while you “look to the future”. You will never find phrases like “Rust is a replacement for Zig” or vice versa, they will all be “replacements for C”. And by doing this they are trying to hide the C language. We have seen why the C programming language is hidden. But suddenly one wonderful day you came across a post with the words “give C language a try”, or, if you are over 40, you remembered where you started learning programming as a child before you started writing all this “SaaS garbage”. And you thought “well, okay, what if there is something, here is nothing to lose anyway”. And you started learning C, simultaneously integrating into the C community. And then you discover, to your surprise, that the C language is simple and effective, applicable everywhere, and continues to develop. And the community is kind, not pompous, without hype, and buzzing with interesting projects. You realized that the C language is not dying and is not going to die, as the "gurus" on youtube taught you and representatives of the "modern" language communities argued with foam at the mouth. And that it is unlikely that C will be able to replace anything in the near future. It's as if you have found "your home" again, something you have been looking for a long time, but could not express in words. You have returned to the roots. And this is why the C language is gold. Look for your "gold", never give up. When you find it, you will know for sure that this is it. Thanks for reading!

-39
26

Functional Web Components [https://positive-intentions.com/blog/dim-todo-list](https://positive-intentions.com/blog/dim-todo-list) Github: [https://github.com/positive-intentions/dim](https://github.com/positive-intentions/dim) Demo: [https://dim.positive-intentions.com](https://dim.positive-intentions.com) Follow for more! [@programming](https://programming.dev/c/programming) [@opensource](https://lemmy.ml/c/opensource) [@learn\_programming](https://programming.dev/c/learn_programming) [@javascript](https://lemmy.ml/c/javascript)

0
0

[@programming@programming.dev](https://programming.dev/c/programming) It's time to return to the roots, to the C programming language. Why am I writing this post? Not because I hope for something or believe in change. These are just words. I could write this at the end, but then you would be looking for answers for me while reading, and I don’t need them. They won’t change anything. So here it is. I don’t claim to be a software development guru or a C language expert. I’m just a simple developer. \- Why are we looking for new technologies? Why do we want to be part of a community that is buzzing with new projects? Why do we think that this new programming language will definitely help us create something amazing and truly great and, of course, will make us rich and provide us with a comfortable old age? \- Why are we offered so many courses in so many programming languages and frameworks? Why do we teach what is required for companies that make money from us? \- Why are there a lot of conferences on banal simple things, such as \*\*\* framework or [###](https://snac.bsd.cafe?t=##) technology (so as not to offend anyone), and there, with a smart look, newly minted gurus tell us how important it is to be able to transfer the value to the client and how to use certain templates? \- Why do computers become more and more powerful, but programs continue to lag? \- Why, when applying for a job, do we look for a vacancy based on knowledge of a programming language, but find it only based on knowledge of certain frameworks? Is it really difficult for a professional programmer to learn a framework in a week? \- Why do we go into software development with the enthusiasm to create something great, but end up in a situation where we are developing some other catalog or some other digital yo-yo to make money? Reason: because we want our passion for programming, our interest, to also bring us income. Result: we do not earn this money for ourselves, but for companies whose main goal is to quickly receive income from the software they sell. I look at how programming has changed over the course of 25 years, what they teach at universities, and where they start. And I came to the conclusion that on a large scale, it was all for the benefit of giant companies or the government. We must protect the “intimate” knowledge of the foundations and water the roots ourselves. Because they don’t realize, they don’t see that if the roots are not watered, the branches on which they sit will dry out. Therefore, who, if not us?!

-47
20

I'm a newbie to ActivityPub so please be patient with me. All intros into ActivityPub speak about how a user of a server A subscribes to a specific community from server B, and then server A will be informed about changes in that community. But on lemmy it's possible to look at the posts of all communities. For a single concrete community it would be relatively easy: server A gets the request to serve the top post of a community on server B, so A simple asks B for the posts. But there is also the "posts from all communities" tab on the lemmy front page. This opens questions: Does each lemmy instance has a full copy of all posts of all communities? If this is true: How are new Instances discovered? Is each Instance distributing all updates to all other Instances? If each lemmy instance has only a partial dataset (this theory is backed by [[1]](https://join-lemmy.org/docs/administration/federation_getting_started.html#fetching-communities) _"Only if a least one user on your instance subscribes to the remote community, will the community send updates to your instance."_) then how is the "all posts" view composed? is it in reality not "all" but only "all posts that at least one user of this instance is subscribed to"? If this is the case: what happens if a bad actor subscribes to all communities of all servers? Is there a maximum number of subscriptions per user? The source of those questions is, that I'm looking for a way to subscribe to all events of all lemmy instances, to be able to build statistics about upvotes, new posts, comments etc. There seems to be a similar API endpoint for mastadon [[2]](https://docs.joinmastodon.org/methods/streaming/#public) but nothing for lemmy?!

27
8
https://jorenar.com/blog/less-known-c

cross-posted from: https://discuss.tchncs.de/post/22702031

39
1

I went to my local library today and noticed there's a lot of networking, cybersecurity, tcp/ip books from the early 2000s. Now, I want more modern versions of these types of handbooks. Does anyone know any good modern handbooks that deal with networking or network security standards? Thanks :)

26
4

I am a fresh software engineering graduate and I am looking for something to improve my problem solving skills, while I did learn about basic algorithms and data structures, I feel like I could learn further more, I know about big O, fast sorting algorithms, dynamic programming, backtracking, binary trees (Although I do not think I know everything about them), I also know about low level memory concepts. I am sure I forgot to mention some of the stuff I also know about, but I hope the ones I mentioned give a good insights on where I should move onto next.

41
15
github.com

From the repo > A (somewhat opinionated) list of SQL tips and tricks that I've picked up over the years in my job as a data analyst.

44
2
https://medium.com/javascript-in-plain-english/why-is-0-1-0-2-in-javascript-0-30000000000000004-4e1a500f5d55

Have you performed simple arithmetic operations like 0.1 + 0.2? You might have gotten something strange: 0.1 + 0.2 = 0.30000000000000004.

-54
16
github.com

This looks pretty cool for quick deployment of hobby projects. Production grade and easy to use is always a win in my book.

29
0

Git cheat sheets are a dime-a-dozen but I think this one is awfully concise for its scope. - Visually covers branching (WITH the commands -- rebasing the current branch can be confusing for the unfamiliar) - Covers reflog - Literally almost identical to how I use git (most sheets are either Too Much or Too Little)

550
56
servo.org

> You can now inspect the DOM tree, view styles, evaluate JavaScript, and read console messages in Servo!

81
3

I have a .Net Core (ver 8.0) multiproject solution which uses a native library on linux (.so). When I start the project with debugger on, the program exits with code 0 and without any messages when hitting the line which loads the library.\ Without the debugger, it runs without issues. So does somebody know how I can get debugging to work?

4
0

Hey all, I'm still a junior dev with years of experience in IT. One of the things I've noticed since making the switch is that (at least where I work) documentation is inconsistent. Things I encounter include incomplete documentation, outdated documentation and written process details that have assumed knowledge which makes it difficult for junior Devs to pick up. I've had a search and a lot of what is out there talks more about product and how to document that SDLC rather than best practice in writing and organising documents against the actual software engineering and its processes. Does anyone have any good sources or suggestions on how I could look to try and begin to improve documentation within my team?

61
32

I figured out how to remove most of the safeguards from some AI models. I don't feel comfortable sharing that information with anyone. I have come across a few layers of obfuscation to make this type of alteration more difficult to find and sort out. This caused me to realize, a lot of you are likely faced with similar dilemmas of responsibility, gatekeeping, and manipulating others for ethical reasons. How do you feel about this?

33
26
https://survey.stackoverflow.co/2024/

The really interesting part is IMO this one: ![](https://lemmy.world/pictrs/image/75a8d131-ff94-4cbb-adc4-f30054e53736.webp)

200
27

Sorry for the somewhat noob question, but how do you pick a library for making a GUI for your apps? My background is in physics, so most of my programming is perfectly find with a CLI that outputs a graph as a ps file or some csv. I am looking to learn about making some neat little GUIs. I was thinking it would be a good idea to try and build my GUI out of the browser so that my app can be as portable as possible, but does this mean it has to be in Javascript or can the backend be done in anything else? I am not really sure what I am asking, but wanted to get a feel for how people approach front ends. Thanks :)

74
32
https://survey.stackoverflow.co/2024/technology#1-operating-system

cross-posted from: https://lemmy.world/post/19949534 > Interesting distribution of OSes from Stack Overflow.

11
0