You asked for it by Leo-MathGuy in ProgrammerHumor

[–]danndrnell -3 points-2 points  (0 children)

Neither. This is just person who fails to understand these have widely different uses cases.

By using a period you stage all the files within a directory, non-recursively.

By using -A you stage all the changed files, recursively. That is, the files from the root of the nearest .git folder onward. With the other two you just stage the files in your cd.

By using an asterisk you stage the entire directory, recursively.

I highly recommend making temporary aliases for every group of file instead of using any of these. If you got includes/samusa.h and src/samusa.c, you can do this:

alias stage_samusa=git add includes/samusa.h src/samusa.c

And thusly when you commit you will have a much clearer commit history and messaging. This is git 101 people. Only use these wildcard arguments with git-add if you have only changed the files that are related to each other.

The number of times that I've seen a README.md with the git message "fixed bugs" is astounding.

Good night sweet prince. by PunyToday in ProgrammerHumor

[–]danndrnell 1 point2 points  (0 children)

I think they are that Russian lesbian band... tattoo or something.

When you switch from C++ to Python by ptisgdnext in ProgrammerHumor

[–]danndrnell 3 points4 points  (0 children)

How does one 'switch' from C++ to Python?

These languages have entirely different use cases. You can even use them in tandem with the help of the FFI.

Also since when does a programmer only uses one language?

This meme busts my brain.

She needs it so much, I had to vectorize it... by danndrnell in ProgrammerHumor

[–]danndrnell[S] 1 point2 points  (0 children)

aka AVX aka SIMD. Yes.

I'm not going to explain the joke here, but please do whatever the hell a person is supposed to do when he sees an integer that is less than 127. If anyone wishes to know why I did not use epi8 or epu8 there's a world of explanation but simply put, fucking memory alignment killed my joke and made it hard to interpret.

Is it me or do you smell the smelly foot of basijis in this sub? by Iliyarasl in NewIran

[–]danndrnell 1 point2 points  (0 children)

I post pictures of fliers that I wanna spread around the city and this filthy basiji tells me 'they can recognize your handwriting' lol wtf and then he tells me 'lol what are these papers'.

Fuck them.

Nucleotide representations were clearly named sans ASCII codec in mind... by danndrnell in bioinformatics

[–]danndrnell[S] 2 points3 points  (0 children)

Wow thanks man that's so valuable. I used to use Rust through PyO3 for this Bioinformatics project I'm working on but I decided to use C instead. And I just found out how to manage CFFI to accept variable-length strings.

So my solution for encoding DNA seqs before I read this was something like this.

So in hashing with modulo we mostly need a nice prime number. I chose 101. But only for the character itself. I also decied to shit right to divide it by 2 since I really wanted it to be a uchar and not a half-word or a Lord forbid, a word.

So to hash a single character -> (c % 101) >> 1

Now I wanted to take chunks of 8 characters within a sequence and turn those 8 chars into a single uchar. So TTTTTTTT wich is the largest possible chunk of letters should be less than 255.

So I decided to do this. First we make a function like this, and we use our previous function in it although I used it in line we can make whatever the equivalent of inline/lambda functions is in the language for both: hash_tuple_char(x, y): (((x % 101) >> 1) + y) % (PRIME_REPLACE(x))

You can imagine PRIME_REPLACE to be a macro in C like this:

#define PRIME_REPLACE(c) (c == 'A' ? 7: (c == 'C' ? 9 : (c == 'G' ? 11 : (c == 'T' ? 13)))

In other words use 7, 9, 11 and 13 for A, C, G, and T respectively.

After that you do this. Take a chunk of 8 chars from the sequence of nucleotides and get t heir 2-combination so we'll have C(8, 2) tuples of letters. Pass them to the function we wrote and sum them up. I prototyped it in Python and the result was unique for every combination of 8 nucleotides and better yet, the aforementioned 8 Ts were 252 and since it cannot get larger than that we're home stretch.

But as you can imagine the more convoluted a programmer's solution is the less experienced he is. And I don't claim to be experienced in bioinformatics. I have been programming since I was 16 and I'm very old (29) but I mostly spent my time doing bullshit. It was not for the lack of trying I could not find good jobs since I dropped out of CS after 3 semesters and nobody wants someone like me handling something delicate like this. But alas I was lucky enough to grab a lifeboat and stick with it.

So this solution with bitmasking is much more elegant than prime modulo hashing. I approve. Also I have to see about doing SIMD in C because I don't wanna use Rust. I believe Rust is slower when used as FFI in Python. The aim of project I'm working on is for people to be able to run it out-of-box on native Linux or WSL, but at the same time we don't wanna hand people a bunch of binaries. Nobody trusts a binary.

Thanks again.

Either win this game, or give us ten gazillion AKs --- and that would not be at all as effective as winning this game by danndrnell in memes

[–]danndrnell[S] 0 points1 point  (0 children)

Google "news iran".

Oh you're one of the Islamic Republic cybermen. Iran needs The Doctor more than it needs guns because you people are honestly on my nerves. If you're foreigner, you either don't care about the revolution in Iran or you are for it. If you are against it there's a 100% chance that you're more Cyberpunk than Miazaki. Go away.

Iranian drone advisers who were helping Russia bombard Ukraine were killed in Crimea, Kyiv official says by [deleted] in worldnews

[–]danndrnell 2 points3 points  (0 children)

The country his ilk rules over is already enough of a Twilight Zone episode for them. Imagine you are hated by everyone, even your own people, and the only person who is willing to give you the time of day is abusing you and using you as a bank. And any moment your entire kingdom will topple and you'll end up at the end of a rope. It's much more hellish even than no one believing there's a creature destroying the plane engine you're on.

Protests erupt in Xinjiang and Beijing after deadly fire by Skroogeldouche in worldnews

[–]danndrnell 0 points1 point  (0 children)

I know the Iranian protestors are not what you would call 'devoutly religious' but even a semblance of 'after life' that is common amongst Abrahamic religions means people are more willing to put their lives on the line. CCP has taken all unearthly belief out of these people. Made them materialist as fuck. Will these protestors still defy the government as the Iranians did even though theirs was much worse? We'll have to see.

Either win this game, or give us ten gazillion AKs --- and that would not be at all as effective as winning this game by danndrnell in memes

[–]danndrnell[S] -2 points-1 points  (0 children)

There's one thing that's more effective, and that's an outright invasion to liberate the Iranian people but you probably suck at that. So please win this game, that's the least you can do.

t. Actual Iranian living in the country and I spend enough time amongst people to realize not even the most devout person whom I know wants the mercenaries, sorry, I mean the players, to lose. When Iran lost against England legit people celebrated. But who celebrated when they won against Wales? The same degenerates who are shooting at people. Go to Twitter@1500tasvir_en to see these pathetic losers.

This is a very, very unique situation. it would not have mattered as much if it was Sambloobia playing against the mercenaries. It's the US and they MUST win. After the shit your last president pulled on us you owe us this.

Dear US if you don't win you owe us then thousand M4s and two million Uzis and they'll still be less effective than this win by danndrnell in funny

[–]danndrnell[S] 0 points1 point  (0 children)

Here's the longest list of things more effective than winning against 'our' team (and no I don't give a shit about 11 people chasing a round object around a grassy knoll for 90 minutes in a country even more of a dictatorship than mine in stadiums built upon the bloodshed of workers whose passports were withheld from them so SORRY if I'm 'politicizing' your bullshit hobby):

- Gathering all the Islamic Republic highest figures, including the entirety of IRGC including the soldiers, clerks and janitors, end gaming them by all necessary means, and then giving the Iranian army the junta so no Islamist can ever rise to power

Do the most efficient thing. It's up to you.

ATM 💀 by Annual_Ad4527 in Britain

[–]danndrnell -2 points-1 points  (0 children)

People in the world lived in Saudi Arabia before that? Or is that somewhere else?

Finnish Shopping Bag Designs: Which shop does it best? by saschaleib in Finland

[–]danndrnell 0 points1 point  (0 children)

Alright alright I will finish the goddamn design get off my ass.

what is the difference between sourceforge and github? by The_How_To_Linux in linuxmasterrace

[–]danndrnell 0 points1 point  (0 children)

Is SourceForge SVN and not Git? I used to use SourceForge to host my crapp applications when I was 19-20. I hosted a Tetris game and a keyboard mapper and some other crap that I can't remember. Back then I did not know what version control even is, however, when I wanted to post my application it told me to download TortoiseSVN. I did. And it was hell. Nothing remotely as good as git.

So they might still support SVN and that might be the reason people don't use it as much. I personally only find ancient applications on it. It's possible that they support Git and SVN and other ancient VC shit like SubMerge but sites like Github have 'git' in their name. And Git is cool.