programming.dev

8,991 readers
343 users here now

Welcome Programmers!

programming.dev is a collection of programming communities and other topics relevant to software engineers, hackers, roboticists, hardware and software enthusiasts, and more.

The site is primarily english with some communities in other languages. We are connected to many other sites using the activitypub protocol that you can view posts from in the "all" tab while the "local" tab shows posts on our site.


๐Ÿ”— Site with links to all relevant programming.dev sites

๐ŸŸฉ Not a fan of the default UI? We have alternate frontends we host that you can view the same content from

โ„น๏ธ We have a wiki site that communities can host documents on


โš–๏ธ All users are expected to follow our Code of Conduct and the other various documents on our legal site

โค๏ธ The site is run by a team of volunteers. If youre interested in donating to help fund things such as server costs you can do so here

๐Ÿ’ฌ We have a microblog site aimed towards programmers available at https://bytes.programming.dev

๐Ÿ› ๏ธ We have a forgejo instance for hosting git repositories relating to our site and the fediverse. If you have a project that relates and follows our Code of Conduct feel free to host it there and if you have ideas for things to improve our sites feel free to create issues in the relevant repositories. To go along with the instance we also have a site for sharing small code snippets that might be too small for their own repository.

๐ŸŒฒ We have a discord server and a matrix space for chatting with other members of the community. These are bridged to each other (so you can interact with people using matrix from discord and vice versa.

Fediseer


founded 1 year ago
ADMINS

Some communities may be broken while we work on fixes

1
 
 

So I'm no expert, but I have been a hobbyist C and Rust dev for a while now, and I've installed tons of programs from GitHub and whatnot that required manual compilation or other hoops to jump through, but I am constantly befuddled installing python apps. They seem to always need a very specific (often outdated) version of python, require a bunch of venv nonsense, googling gives tons of outdated info that no longer works, and generally seem incredibly not portable. As someone who doesn't work in python, it seems more obtuse than any other language's ecosystem. Why is it like this?

2
 
 
3
4
5
37
submitted 3 hours ago by Spyros to c/linux
 
 

IT'S HERE!

6
7
8
 
 

What are your experiences with @postgresql jsonb columns as document store?

Is it easy to use from a Spring App? How fast is it? What are its limitations?

#postgresql #json #databases

9
 
 

The fourth iteration of a game jam all about accessibility is now open for registration, a month long jam about creating blind accessible games that starts in February!

Sign up here!

https://itch.io/jam/games-for-blind-gamers-4

Over the last 3 iterations we as a community have created over 70 blind accessible video games, and we would love if you all signed up and helped make this the most successful jam yet!

https://itch.io/jam/games-for-blind-gamers-3/entries https://itch.io/jam/games-for-blind-gamers-2/entries https://itch.io/jam/games-for-blind-gamers/entries

Also I will say programming accessibility for a game is an interesting challenge for anyone thinking about it. I had to learn a lot about API and screen readers to make my games usable for my entries!

10
11
12
 
 
13
 
 

Discovering your application by usecase validation. Make test writing fast, understandable by any human understanding English or French. Open source under MIT license.

[Cross-posted from https://programming.dev/post/21401242]

14
 
 

Hi everyone! I want to be able to access a (fuse-type) cloud drive mounted inside a container as the binary is proprietary and I do not want to mount it on the host for security and privacy purposes. I have tried to quickly spin a podman container and bind the folder that corresponds with the drive with the rshared flag but the folder appears to be empty on the host while inside the container it works just fine.

I am running the following commands:

$ podman unshare mount --make-shared --bind /clouddrive /clouddrive
$ podman run -i -t --cap-add=sys_admin --network host \
	--security-opt label=type:container_runtime_t \
	-v /cloudbinary:/bin/cloudbinary:ro \
	-v /clouddrive:/clouddrive:shared \
	--device /dev/fuse:/dev/fuse \
	-v /bin:/bin:ro \
	-v /lib64:/lib64:ro \
	--privileged --name=name image /bin/bash

Inside the rootless container I run:

# cloudbinary login username
<enter password>
<successful login>
# ls /clouddrive
file1 file2 file3

But on the host /clouddrive is empty:

$ ls /clouddrive
<nothing>

Running findmnt -o TARGET,PROPAGATION /clouddrive inside the container yields:

TARGET      PROPAGATION
/clouddrive shared,slave

Running findmnt -o TARGET,PROPAGATION /clouddrive on the host yields:

TARGET      PROPAGATION
/clouddrive shared,slave

I have almost no prior experience with podman but I read something about how a rootless container might not work because the user and group owning the folder is not the right one. Does anybody have an idea on how to fix this? Thank you.

Update: It seems the cloud binary is unmounting any drive with the same name at startup and mounting it's own drive. Would that be a problem? Running findmnt still shows shared but the slave label has disappeared after the binary mounts it's own drive. Is there anyway to "reshare" it at runtime/dynamically?

15
16
515
submitted 1 day ago* (last edited 1 day ago) by [email protected] to c/programmer_humor
 
 
17
 
 

The normal complaint new Zellij users have is that it has a lot of keybindings which are likely to conflict with programs like nvim or Helix that use a lot themselves. Before, the workflow was to lock Zellij with ctrl-g which let input go through to the focused shell/program.

The new mode has most of the keybindings behind the ctrl-g lock, e.g. a new tab is ctrl-g t n (instead of ctrl-t n). You can still use alt-(cursor) for changing focus and alt-n/alt-f for a new tiled/floating pane, but all other key presses get passed along.

You can switch between default and unlock-first (non-colliding) modes so if you need those alt shortcuts you can lock everything as before.

Plus some other nice features like being able to change modifier keys while running (via the Kitty Keyboard Protocol), and autoloading the new config when you edit the file.

18
 
 

Discovering your application by usecase validation. Make test writing fast, understandable by any human understanding English or French. Open source under MIT license.

19
8
submitted 10 hours ago* (last edited 10 hours ago) by AsudoxDev to c/programming
 
 

Hello, I am building a dashboard where users can add their own user scripts. I at least want to keep the last 100 log lines stored somewhere so that the user can check them later.

I thought of using the backend's sqlite database but that would slow down the performance of other querys that are much more high priority.

20
 
 

im working on a javascript UI framework for personal projects and im trying to create something like a React-hook that handles "encrypted at rest".

the react-hook is described in more detail here. id like to extend its functionality to have encrypted persistant data. my approach is the following and it would be great if you could follow along and let me know if im doing something wrong. all advice is apprciated.

im using indexedDB to store the data. i created some basic functionality to automatically persist and rehydrate data. im now investigating password-encrypting the data with javascript using the browser cryptography api.

i have a PR here you can test out on codespaces or clone, but tldr: i encrypt before saving and decrypt when loading. this seems to be working as expected. i will also encrypt/decrypt the event listeners im using and this should keep it safe from anything like browser extensions from listening to events.

the password is something the user will have to put in themselves at part of some init() process. i havent created an input for this yet, so its hardcoded. this is then used to encrypt/decrypt the data.

i would persist the unencrypted salt to indexedDB because this is then used to generate the key.

i think i am almost done with this functionality, but id like advice on anything ive overlooked or things too keep-in-mind. id like to make the storage as secure as possible.

feel free to reach out about my approach.

21
22
 
 

im working on a javascript UI framework for personal projects and im trying to create something like a React-hook that handles "encrypted at rest".

the react-hook is described in more detail here. id like to extend its functionality to have encrypted persistant data. my approach is the following and it would be great if you could follow along and let me know if im doing something wrong. all advice is apprciated.

im using indexedDB to store the data. i created some basic functionality to automatically persist and rehydrate data. im now investigating password-encrypting the data with javascript using the browser cryptography api.

i have a PR here you can test out on codespaces or clone, but tldr: i encrypt before saving and decrypt when loading. this seems to be working as expected. i will also encrypt/decrypt the event listeners im using and this should keep it safe from anything like browser extensions from listening to events.

the password is something the user will have to put in themselves at part of some init() process. i havent created an input for this yet, so its hardcoded. this is then used to encrypt/decrypt the data.

i would persist the unencrypted salt to indexedDB because this is then used to generate the key.

i think i am almost done with this functionality, but id like advice on anything ive overlooked or things too keep-in-mind. id like to make the storage as secure as possible.

feel free to reach out about my approach.

23
24
25
 
 

Blurb:

Cool particle systems have been popping up in games across the last decade. Why are these novel particle systems a new thing? What tech enables them? How many particles can a midrange gpu draw?

Topics covered: particle definition, gpu instancing, iterated function systems, the chaos game, matrix transformations, linear interpolation, fragment shader bottlenecks, point list meshes, extensions and applications of iterated function systems

view more: next โ€บ