Programming

17978 readers
209 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
 
 

I'm a D developer who recently got into the whole WASM thing with it using betterC (I do plan to write my own very minimalistic runtime to allow me using classes yet again), and currently I'm looking into enhancing the language's support of WASM in one way or another, especially when it comes to two "exotic" types of WASM, externref and funcref (there's also exnref, but it's just before finalization, so I'm waiting a bit with that one).

Me and others also programming in D have experimented with LDC (D compiler with LLVM backend) attributes since those types supposed to be address space 10 and 20 pointers, but I don't know whether the issue is that LDC doesn't handle type/pointer attributes the way we expected it to thus ending up generating i32 instead, or that I specifically need to emit the types for the LLVM backend.

3
 
 

I am currently searching for a name that I can use for a software project. Id like to have a short one that has no real meaning associated with it. I already asked some ai's. All names that I found sound terrible or have some meaning attached to it. . Like the name is already used for some medication or so.

How do you guys come up with names?

4
5
 
 

With all the CDNs and content been served from several locations for a single web page for example, would it be possible to implement a maintainable whitelist in something like a proxy? Does it makes sense? Or I would break half of the websites?

6
 
 

I regularly hear people asking which programming language to learn, and then reeling off a list of very similar languages (“Should I learn Java, C#, C++, Python, or Ruby?”). In response I usually tell them that it doesn’t really matter, as long as they get started. There are fundamentals behind them.

What do I mean when I say fundamentals? If you have an array or list of items and you’re going to loop over it, that is the same in any imperative language. There is straightforward iteration and there is iterating over all unordered combinations and a few other patterns, but those patterns are basically the same in C, Java, Python, or Fortran. Having neural pathways that fluently express intention in these patterns, the same way you express thoughts in sentence structures in English, are fundamentals.

But not all languages have the same set of patterns. The patterns for looping in C or Python are very different from the patterns of recursion in Standard ML or Prolog. The way you organize a program in Lisp, where you name new language constructs, is very different from how you organize it in APL, where fragments of symbol sequences are both the definitions of behavior and become the label for that behavior in your mind.

These distinct collections of fundamentals form various ur-languages. Learning a new language that traces to the same ur-language is an easy shift. Learning one that traces to an unfamiliar ur-language requires significant time and effort and new neural pathways.

7
 
 

So when I started programming in 2001, it was du jour in the communities I participated in to be highly critical of other languages. Other languages sucked, the people using them were losers or stupid, if they would just use a real language, such as the one we used, everything would just be better.

Right?

This sort of culturally-encoded language was really prevalent around condemning PHP and Java. Developers in these languages were actively referred to as less competent than developers in the other, more blessed languages.

And at the time, as a new developer, I internalised this pretty heavily. The language I was in was blessed, obviously, not because I was using it but because it was better designed than a language like PHP, less wordy and annoying than Java, more flexible than many other options.

It didn’t matter that it was (and remains) difficult to read, it was that we were better for using it.

I repeated this pattern for a really long time, and as I learned new languages and patterns I’d repeat the same behaviour in those new environments. I was almost certainly not that fun to be around, a microcosm of the broader unpleasantness in tech.

At least, until I got called on it.

8
9
 
 

How can it have a system partition which is read only and still make the user create and use its files? How does it differ from Linux in terms of permissions and user management? How are the users kind of "confined" in android?

10
 
 

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

I would like to code for a living and to contribute to open source projects and things, but my coding skills are absolute shit after taking online courses and watching video tutorials. How can I learn to code for real?

What I would like to learn is algorithms, web development ("full stack"), how layouts work (both in like kotlin compose and HTML) and how to read other peoples code. Maybe thats more than I can chew, but its probably good for me to try out many things before getting settled on one.

Now I have been coding for a while already (~ 4 years), but I kind of feel like I need more guidance to be able to actually create code that works as intended intentionally, and not through trial and error / stack overflow. As for what level i am at, CS50 is probably my only qualification, I have played around with APIs (I.E. making discord bots), and made some html "apps" (horribly made, but things like the "genius" game and a calculator) and "prototype" react websites (as in, really bare bones, barely working).

I do plan on taking CS or something similar, but i'm not yet in college, and I would like to have a good head start before getting there.

Sorry for my bad English, and any help is appreciated.

11
 
 

I'm currently suffering a dilemma and I’m considering using Odin over Rust.

I was hoping for friendly and positively constructive assessments of which language and why from anyone who wishes to answer?

12
 
 

I need JSON-like database and it should also have a storage to store media like images or videos.

13
14
15
16
25
submitted 3 days ago* (last edited 2 days ago) by [email protected] to c/[email protected]
 
 

I don't like front-end development but I enjoy writing things by hand rather than rely on one-off classes. Even in my blog, I tend to write a lot of HTML manually throughout the post, like creating a quick container to put two images side-by-side and center them, making blockquotes, the occasional nested list, in-line CSS, etc...

I've written some of it in VSCode and Joplin but I didn't find it comfortable to write in either of them. What editor/extensions do you use to make dealing with HTML easier? I'm currently looking at Emmet, but it looks a bit intimidating to learn.

Edit: I ended up using Emmet for writing HTML in general along with Espanso for quickly inserting some templates I use. It's working out pretty well!

17
 
 

IRL, I once listed my favorite bands across metal, rock, hip-hop, electronic, and drum n bass and was hit with "that's standard programmer music".

As someone with little physical human contact outside of work and actually meeting devs outside to find out they listen to the same music was a little surprising. That was a tiny sample though and this is the web though and people are from all over, what kind of stuff do you listen to? Favorite genres, artists, or just "everything" even noise?

18
 
 

It won't give you a standalone course in python but as a supplement outside of projects and something to see your code working in real time it's a great little tool. Been about a year since I used python and it was a good little refresher.

19
 
 

Computer scientists often deal with abstract problems that are hard to comprehend, but an exciting new algorithm matters to anyone who owns books and at least one shelf. The algorithm addresses something called the library sorting problem (more formally, the “list labeling” problem). The challenge is to devise a strategy for organizing books in some kind of sorted order — alphabetically, for instance — that minimizes how long it takes to place a new book on the shelf.

20
 
 

"Unbinding Paste somehow fixed [it] for me." "Paste stopped working for me after upgrading electron to 32.3.0. Downgrading electron back to 32.2.8 resolves the issue."

I experienced the same issue and same hilarious fix.

Neither right-click:paste or ctrl-v:paste work anymore for text copying. All other actions seem to work fine including copy. It is to note that right-click:paste works within the terminal window but nowhere else.

I am on 1.96.4 on Windows and it is working but the Insider build is not.

21
 
 

So I want to block hexbear.net. I see it's in the instance blocked list. However I still see their communities on community search. HOWEVER, I also can't block them from my profile, it doesn't give me the option. Known bug? User Error?

22
23
 
 

For those of you unaware: https://nushell.sh/

This is by far the most unique shell out there, since it doesn't use raw text as output/input to command line calls, but instead an actual data structure. It's like if every CLI call returned a database table, in a way.

24
 
 

Anyone using soucehut (sr.ht)? Can you please explain to me how you navigate the site?

I really like the minimalist approach and extremely fast website UI, but I just cannot navigate the site.

If I'm looking at source of a repo on https://git.sr.ht/ and want to see open tickets, how do I navigate to https://todo.sr.ht/ ? If I click on "todo" at the top, it takes me to my todo lists, not todo of the project I was just looking at.

25
13
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/[email protected]
 
 

Figured I would just ask for the abstract basics. Just consider me an amateur noob. I was digging into ComfyUI code to look into integrating or rewriting a script of mine into a custom node for the first time. The source for custom nodes sourced through the ComfyUI node manager have some kind of Yarn package or system. I have no idea what that is or what it is used for and figured it might make a light conversation.

view more: next ›