0
27
TheTrueLinuxDev

@programming.dev

TheTrueLinuxDev 17 points 3 years ago

Yup and I am getting sick of hearing this even on Arch Linux. Like, mofo, you could literally run a snapshot or backup before upgrading, don't blame us if you're yoloing your god damn computer. Windows have exactly the same problem too and this is why we have backups. Christ.

On my Arch Linux Install, I literally have a Pacman Hook that would forcibly run backup and verify the said backup before doing a system-wide update.

path: 0 2678021 2683733, hotness: undefined, score: 17, children: 6
TheTrueLinuxDev 15 points 3 years ago

How it really works:

mpf_t temperature;
If confused...

It's arbitrary sized floating precision number provided in LibGMP and you can find more information about mpf_t here.

path: 0 2518591, hotness: undefined, score: 15, children: 0
TheTrueLinuxDev 10 points 3 years ago

I think it's asinine to ask the developer who contribute to your project, literally taking the time of the day writing the code and submit PR to your project, to pay money to you.

I wouldn't even bother contributing to the project at that point.

path: 0 2233654 2233700 2233736 2234806 2235669, hotness: undefined, score: 10, children: 1
TheTrueLinuxDev 8 points 3 years ago

path: 0 1748828, hotness: undefined, score: 8, children: 0
TheTrueLinuxDev 5 points 3 years ago path: 0 2233654 2233700 2233736, hotness: undefined, score: 5, children: 3
TheTrueLinuxDev 5 points 3 years ago

I would most likely be using C11 for threads.h and stdatomic.h for foreseeable future, the problem with using the latest and greatest standard is the risk of compiler not supporting it, so I would likely wait at least 5 years before switching to C23 sometime in 2028 or 2029. There was a bit of a controversy around optional bound checking in C11 that they end up removing/deprecating it.

I don't plan on using #embed or constexpr in favor of maintaining common C programming practices, language familiarity is still an important factor to thriving project as much as people nag on me to rewrite everything in Rust or C++.

path: 0 2161512, hotness: undefined, score: 5, children: 7
TheTrueLinuxDev 5 points 3 years ago

Yep, and if open source licensing could be revoked on a whim, you can imagine the chaos that ensued. That would be my understanding as well, old version that have MPL license is perfectly fine to fork off, newer version might not be as it is under a different license. One of the reason why I liked Apache License is that it have make it explicitly clear that it's irrevocable whereas MPL it is operating on an assumption that it's not revocable. The most fundamental problem with the legal system in USA is that no law is "set in stone" and leaving things to assumption is open to reinterpretation by the judge who may have sided against you. (Hell, Google vs Oracle on Copyrighted API is still on case-to-case basis, so take it as you will.)

Disclaimer: I am not a lawyer. I just share what I learned from Legal Eagle youtube and few other sources.

path: 0 2457358 2457533 2458230, hotness: undefined, score: 5, children: 1
TheTrueLinuxDev 4 points 3 years ago

This is not the first time it happens with Dotnet Open Source packages, there are some pretty funky things going on namely:

Imagesharp (They re-license from Apache 2 to something like Community/Commercial licenses and threw a huge fit over it)

Fody (It expects the software contributors of Fody to be a patron.)

path: 0 2233654, hotness: undefined, score: 4, children: 5
TheTrueLinuxDev 4 points 3 years ago

I tried to use it, but it have some big issues in reliability, because at the end of the day, despise the dataset it's trained on, it's still something I describes as a "language interpolation."

It sometime make TERRIBLE recommendations for which tools/libraries I should explore, because it assumes that those libraries might have support. Those libraries never does and so I wasted weeks on it. (It doesn't help that both code and project are undocumented.)

So after that experience, I demote ChatGPT usefulness to just "cleaning up pre-written documentation so it sounds better." That's it.

path: 0 81104, hotness: undefined, score: 4, children: 0
TheTrueLinuxDev 4 points 3 years ago

Probably this script:

#!/bin/bash

if [ -z "$1" ]
then
        echo "Please provide git repository url as an argument for this script."
        exit 1
fi
regex='(https?|ftp|file)://[-[:alnum:]\+&@#/%?=~_|!:,.;]*[-[:alnum:]\+&@#/%=~_|]'
if [[ $1 =~ $regex ]]
then
basename=$(basename $1)
reponame=${basename%.*}
curl -X 'POST' 'https://localgitea.com/api/v1/repos/migrate?access_token={Access Token Here}' \
  --insecure \
  -H "accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{  "clone_addr": "'"$1"'",  "issues": false,  "labels": false,  "lfs": false,  "mirror": true,  "mirror_interval": "96h0m0s",  "private": false, "repo_name": "'"$reponame"'", "pull_requests": true,  "releases": true, "repo_owner": "githubpublic",  "service": "git",  "wiki": true}'
else
        echo "Invalid URL"
        exit 1
fi

You can adjust it as needed and as for why I have --insecure flag, I have a direct network cable between my PC to the server, so encryption or HTTPS is not needed here. This is probably my favorite command, because I would write above as .sra.sh in home directory and then alias the .bashrc to make a sra command by adding alias sra=/home/{your user account}/.sra.sh in .bashrc and from there, anytime I have an interesting repository that I want to archive, I simply run sra {git url} and that's it. It also specify the mirror interval manually for 4 days interval rather than every 8 hours that would've needlessly spam the git server.

This is something I rely on everyday both as developer and system admin, I would maintain a different supply chain and prevent a supply chain attacks by generating my own package feeds/registry automatically from Gitea/Forgejo.

Edited to Add: I noticed this community is Powershell, here the powershell version of above:

param (
    [Parameter(Mandatory=$true)]
    [string]$gitRepoUrl
)

function Test-Url($url) {
    $regex = "(https?|ftp|file)://[-[:alnum:]\+&@#/%?=~_|!:,.;]*[-[:alnum:]\+&@#/%=~_|]"
    return $url -match $regex
}


$basename = Split-Path $gitRepoUrl -Leaf
$reponame = [System.IO.Path]::GetFileNameWithoutExtension($basename)

$headers = @{
    'accept' = 'application/json'
    'Content-Type' = 'application/json'
}

$body = @{
    'clone_addr' = $gitRepoUrl
    'issues' = $false
    'labels' = $false
    'lfs' = $false
    'mirror' = $true
    'mirror_interval' = '96h0m0s'
    'private' = $false
    'repo_name' = $reponame
    'pull_requests' = $true
    'releases' = $true
    'repo_owner' = 'githubpublic'
    'service' = 'git'
    'wiki' = $true
} | ConvertTo-Json

Invoke-RestMethod -Uri 'https://localgitea.com/api/v1/repos/migrate?access_token={Access Token Here}' -Method POST -Headers $headers -Body $body -SkipCertificateCheck
path: 0 1861163, hotness: undefined, score: 4, children: 1
TheTrueLinuxDev 3 points 3 years ago

I definitely recommends that you start learning about the LL(k), LALR, and perhaps even Earley Parser algorithms. I am assuming you have picked up a little bit on LL(1) parser and some basic lexer, so mastering the parser algorithms are basically the next stop for you.

Once you get the grasp of those things, you are well on your way to designing a programming language.

path: 0 2436153, hotness: undefined, score: 3, children: 0
TheTrueLinuxDev 3 points 3 years ago

Yep, biggest reason why I chose C language is Foreign Function Interface. Code you write for C is more than likely to be usable in just about any other languages.

path: 0 2161512 2174030 2192288, hotness: undefined, score: 3, children: 5
TheTrueLinuxDev 2 points 3 years ago

Oof, sorry. :( I had hoped that they sorted it out by then...

path: 0 2508161 2511551 2512559, hotness: undefined, score: 2, children: 0
TheTrueLinuxDev 2 points 3 years ago

I would spend it on language translation basically, paying someone to translate international documentations on things that aren't documented in USA no matter where you look.

path: 0 2238968, hotness: undefined, score: 2, children: 2
TheTrueLinuxDev 2 points 3 years ago path: 0 108817 161566, hotness: undefined, score: 2, children: 0
TheTrueLinuxDev 2 points 3 years ago

Not necessarily, you still need backups or snapshots especially on home directory in case software have a nasty bug like deleting your data.

path: 0 2678021 2683733 2691982 2693282, hotness: undefined, score: 2, children: 4
TheTrueLinuxDev 1 point 3 years ago

Lol, that one way to put it. Basically a language convergence, not a bad thing to be honest.

path: 0 2479151 2494787 2495403 2495591 2496845 2497376, hotness: undefined, score: 1, children: 0
TheTrueLinuxDev 1 point 3 years ago

I don't think so on the extensibility aspect alone, some of the Rust syntax/trait does not map well to other languages when other languages attempts to extend Rust library. I write C code in a way that it would be extensible from any languages.

path: 0 2161512 2174030 2192288 2194192 2194193, hotness: undefined, score: 1, children: 3
TheTrueLinuxDev 1 point 3 years ago

Yup, been writing a new shader language to replace GLSL and HLSL for Vulkan Compute purposed, but I eventually switch from SPIR-V IR to MLIR and use IREE Compiler which accepts the MLIR and compile it to any of CUDA, ROCm, SPIR-V and so forth.

A lot of it was because of my unadulterated hatred toward our current Machine Learning Frameworks...

It's one of the project that I've been working on to outright replace Pytorch/Tensorflow and ban those two framework from my office forever. I got fed up not knowing how much exactly do I need in memory allocation, computational cost, and so forth when running or training neural net models. Plus I want an easier way to split the model across lower-end GPU too that doesn't rely on Nvidia-only GPU for CUDA code. I also wanted to have SPIR-V as a fallback compute kernel, because if CUDA/ROCm is too new for GPU, you're SOL, but if you have SPIR-V, chances are, any GPU made in the last 10 years that have a Vulkan Driver, would likely be supported.

One of the biggest plus with MLIR is that you are also future proofing your code, because that code could feasibly be recompiled for new devices like Neural Net accelerator cards, ASIC, FPGA, and so forth.

path: 0 2479151 2494787, hotness: undefined, score: 1, children: 4
TheTrueLinuxDev 1 point 3 years ago path: 0 2508161, hotness: undefined, score: 1, children: 2

thanks for using Leebra!

go to feed...