Programming thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
fuck every language specific package manager including haskell's
Speaking of which, does anyone know a more general solution?

Portage has this sub-project called Prefix. It is, in simple terms, Portage in a venv.
I would love to use it, sadly its so unstable that running the installation script months apart always results in different kinds of errors for me.

Currently I'm managing my C/C++ dependencies using Peru.
It is not ideal, but it does not make me nauseous, unlike git sub-modules.

On an unrelated note, the next time someone suggests that I should install a super-special, hecking amazing package manager for my editor's plugins, I'm committing a hate crime.
 
  • Thunk-Provoking
Reactions: Belisarius Cawl
Speaking of which, does anyone know a more general solution?

Portage has this sub-project called Prefix. It is, in simple terms, Portage in a venv.
I would love to use it, sadly its so unstable that running the installation script months apart always results in different kinds of errors for me.
if you want a package manager that can do venv-like shit you might want to look at nix or guix
 
  • Informative
Reactions: Belisarius Cawl
Currently I'm managing my C/C++ dependencies using Peru.
It is not ideal, but it does not make me nauseous, unlike git sub-modules.
I've come to the conclusion that it's better to just not use anything for dependencies, point to the directories that contain the stuff you need, done. If you have a lot of stuff, a sysroot/prefix and pkgconfig works well.

On an unrelated note, the next time someone suggests that I should install a super-special, hecking amazing package manager for my editor's plugins, I'm committing a hate crime.
What? You don't have a package manager for managing your text editor's package managers of plugins? I am shocked! :o
 
I've come to the conclusion that it's better to just not use anything for dependencies, point to the directories that contain the stuff you need, done. If you have a lot of stuff, a sysroot/prefix and pkgconfig works well.
yeah building your stuff from the system libraries is always the most based option, and should be taken when reasonably possible
 
Hardlinks are one if the most based thing linux has done.
It gives the user so nuch freedom to screw with programs that demand so much of your system.
Now you can put anything you want onto an external drive.
Have a 1 TB program that was mafe by pajeets and only ever accepts being installed to /bin ?
Hardlink that shit to 1TB SSD you plug in over USB, nothing changes except you need the drive plugged in.
 
Hardlinks are one if the most based thing linux has done.
It gives the user so nuch freedom to screw with programs that demand so much of your system.
Now you can put anything you want onto an external drive.
Have a 1 TB program that was mafe by pajeets and only ever accepts being installed to /bin ?
Hardlink that shit to 1TB SSD you plug in over USB, nothing changes except you need the drive plugged in.
i'd rather be using things like file system namespaces for shit like that tbh (pajeetware will kindly redeem the sandbox container)
also i don't think hard links work across file systems because a hardlink has to be the same inode referenced from 2 or more directories
maybe you're thinking of symlinks which are a completely different animal (i agree, they are pretty good)

still symlinks and hardlinks aren't even a linux thing because those are well-known features of many unix-style kernels and their system distributions
also this doesn't have the most to do with programming (it's tenuously related i guess so i won't complain too hard)
 
i'd rather be using things like file system namespaces for shit like that tbh (pajeetware will kindly redeem the sandbox container)
also i don't think hard links work across file systems because a hardlink has to be the same inode referenced from 2 or more directories
maybe you're thinking of symlinks which are a completely different animal (i agree, they are pretty good)

still symlinks and hardlinks aren't even a linux thing because those are well-known features of many unix-style kernels and their system distributions
also this doesn't have the most to do with programming (it's tenuously related i guess so i won't complain too hard)
You're right, I mean symlinks.
And yeah apologies, random thought I had.
 
I fucking love simlinks. I can shove all my configs in single git repo and then just relink it on any new machine using bash script.
I know some use GNU Stow for it, but never really bothered to learn it. Anyone can sell it to me?
 
I fucking love simlinks. I can shove all my configs in single git repo and then just relink it on any new machine using bash script.
I know some use GNU Stow for it, but never really bothered to learn it. Anyone can sell it to me?
It very much depends on what you want to do, and how many machines are being configured. For my part, I never made use of GNU Stow because the several main things were just fish, oh-my-fish, as well as vim, and now nvim (Oops, forgot tmux.) It's a shitty custom job but it works. For more advanced computers, a hardware and software solution like mine might not be effective.
 
Last edited:
  • Like
Reactions: ADHD Mate
I fucking love simlinks. I can shove all my configs in single git repo and then just relink it on any new machine using bash script.
I know some use GNU Stow for it, but never really bothered to learn it. Anyone can sell it to me?
I have been using Stow to manage my dotfiles for years.
Not a single complaint. Its as simple as a rock, If you have a free afternoon and choose to learn it, you biggest problem will be to decide what to do with the rest of your time.
 
Rust is the voldemort/hitler of programming languages confirmed
no there are multiple and rust is just one of them
this category includes other shitshow languages like node.js and go
Rust is the language that powers the Kiwi Farms, which is basically Nazi Germany if you think about it.
not yet because the current forum software is in php and that rust forum will definitely be finished real soon now
 
hitler of programming languages
If Javascript is Hitler then I'm a Nazi.
When my Javascript code runs too fast, I add random await's before every expression until it runs at just the right speed. (Got to make my beautiful custom-made loading spinner show up!)
JavaScript:
async function factorial(n) {
    let ret = await 1;
    for (let i = await 1; await (await i <= await n); await i++) {
        ret *= await await await await await await await i;
    }
    return await ret;
}
 
If Javascript is Hitler then I'm a Nazi.
When my Javascript code runs too fast, I add random await's before every expression until it runs at just the right speed. (Got to make my beautiful custom-made loading spinner show up!)
JavaScript:
async function factorial(n) {
    let ret = await 1;
    for (let i = await 1; await (await i <= await n); await i++) {
        ret *= await await await await await await await i;
    }
    return await ret;
}
this isn't written as a recursive function (returning a promise of course) that calls itself twice and adds the result, causing high algorithmic complexity and allocating tons of stack space
 
Symbolic links have been supported since windows 7 (or vista?), you just have to grant your account permission to create them. Strangely it requires elevated permissions on administrator accounts.
They were introduced with3.1 NTFS in XP, but it required a bit of cli jiggery pokery to actually use them. Vista introduced mklink and made the process a lot easier.
 
Would like to use graphics API, I have apple silicon and a riced out Linux thinkpad. MetalAPI is newer so probably better, I guess, but openGL would be more documented/easier. I just want to make spinny things and play with geometrical 3d plots.
 
Would like to use graphics API, I have apple silicon and a riced out Linux thinkpad. MetalAPI is newer so probably better, I guess, but openGL would be more documented/easier. I just want to make spinny things and play with geometrical 3d plots.
Kinda depends on the Thinkpad, but Vulkan is liable to work well on both.
 
Back