Programming

26392 readers
181 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 2 years ago
MODERATORS
676
677
678
679
 
 

cross-posted from: https://gregtech.eu/post/18657076

if you've ever tried it, that is.

I'm considering giving it a go

680
681
682
683
 
 

After seeing this post I just thought it would be an interesting discussion. Obvious limits apply of 'you have to have at least some documentation,' so I'm not talking about something where there is none, and the feature set minimum would be less a question of whether you could complete X arbitrary project and more 'does the feature set make it easy to do everything?' You could essentially write everything in assembly, but would you want to?

On an arbitrary 1-10 scale, (1 being 'I'll build the features from nothing as long as the docs are good' and 10 being 'Who needs documentation? I'll happily read through the undocumented code until I find the ones that make magic happen.') where do your preferences lie?

Oh, and integers only. You can be nuanced in your ideas but no 5.5s allowed.

684
 
 

It's been a long time since 2023, when Bun.js arrived and disrupted the JavaScript world. During that time, I was working on something unusual—something that encourages all JS developers to write API code that actually runs on top of Rust.

I gave it my best and eventually published this framework on npm. Many people asked for async support, and after countless sleepless nights, I finally achieved it.

Have a look at this framework—still in beta, experimental, and currently working only on Linux, Windows, and ARM T4 on AWS. Brahma-JS is one of my favorite creations, and it has literally edged past uWebSockets.js.

At the same time, I’ve been thinking about the future of Node.js. It has dominated for the past 16 years, going through many ups and downs. I’m truly happy to be a part of this ecosystem and of npm.

685
80
submitted 7 months ago* (last edited 7 months ago) by popcar2@programming.dev to c/programming@programming.dev
 
 

I've been researching programming languages to find a good, high level language that compiles to a single binary that is preferably pretty small. After tons of research, I landed on Nim and used it to make a quick txt parser for a project I'm doing.

Nim seems absolutely fantastic. Despite being sold as a systems programming language, it feels like Python without any of its drawbacks (it's fast, statically typed, etc.) - and the text parser I made is only a 50kb binary!

Has anyone here tried Nim? What's your experience with it? Are there any hidden downsides aside from being kinda unpopular?


Bonus: I want to give a shoutout to how easy it is to open a text file and parse it line-by-line in this language. Look at how simple and elegant this syntax is:

import os

if paramCount() == 0:
  quit("No file given as argument", 1)

let filepath = paramStr(1)

if not fileExists(filepath):
  quit("File not found: " & filepath, 1)

for line in lines(filepath):
  echo line
686
 
 

This cute little daemon just sits in the corner and watches who messes with your directories. Give it a MiB of RAM and forget about it: it'll do everything else by itself.

If you're afraid of talking to daemon face-to-face, I provide you with small extensions for Caja and Midnight Commander file managers.

And there is, of course, a small config file for systemd to run the daemon automatically.

C++. GPL. Have fun.

https://github.com/ANGulchenko/whatmade

687
688
 
 

Software design is weird. I wrote this article about implementing a minimal kanban board and the trade-offs I needed to make.

689
 
 

Some of their stuff seems very popular, but i’m always a little distrustful, when i can’t figure out the business model of some org. They list 10 people involved - how do they make money?

690
691
692
 
 

Seems like a ton (over 1k) of people were affected because of an auto updating VS Code extension. Check your bashrc/zshrc and GitHub account if you use nx

693
694
 
 

I stumbled across this site. It's a kind of guessing game where you try to guess what the original content of a hash value is. Guesses are hashed and then scored by counting how many bits are different from the target hash so a random guess ought to be 512 or so. You're probably supposed to write a program to do the guessing for you.

Only your lowest score is kept. Can you beat the hash?

Disclaimer: not my site but I'm in love with the idea

695
696
 
 

A nice little reminder that clarity is not the same as verbosity. Also has some concrete tips for removing unnecessary verbosity in names, complete with examples. Though in some contexts, I might prefer a name like employeeToRole for a Map<Employee, Role> over the article's employeeRoles.

697
698
699
700
6
submitted 7 months ago* (last edited 7 months ago) by Lembot_0004@discuss.online to c/programming@programming.dev
 
 

I've finished a small project that is rather non-standard for me: it has just a few hundred lines of logic written by me, and most of the code is rather banal functions I picked up from the different articles and doc sheets (you know, those functions that are quite "atomic" like "check if the process is running" or "get the process name by pid by reading /proc dir" or "get a mount point by a filename")

The code was written in a "ok, let's experiment if I can do this" approach, so now it is in a complete mess.

So the question is if is there some AI that can do an initial code review for me? I've tried GhatGPT, but it was completely banal and useless.

view more: ‹ prev next ›