Details
-
AboutAAAAAAAAAAAAAAAAAAA
-
SkillsRust and other things
-
Locationhere
-
Website
Joined devRant on 12/8/2018
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
As interesting as embedded linux is, if you ever try to do something with GPU acceleration. Stop! Go organize a spot with a psychiatrist first. You will need it!6
-
Have tried zed's IDE on and off since it was launched, and they finally dropped that last missing piece for me: `git` integration ♥️
https://zed.dev/blog/git2 -
Why does my computer suddenly decide to sound like a jet engine when I’m just trying to open a spreadsheet?2
-
Have you ever typed up an interesting rant, only to accidentally click outside of the rant editor and have the whole damn thing disappear?
Ok DevRant, you get my "your number one" today
🖕🏼13 -
I don't like Agile so much. Things are always rushed and you rarely ever have 30 minutes to discuss something in depth, not even in the retrospective meeting. Team mates too busy to discuss concerns. Sigh.9
-
Almost, Jira. Almost.
(Image shows Jira Search bar. User typed in "typeorm". Jira suggests "did you mean: tapeworm")9 -
Picture says all. Stupid fucks. Any idea how cool LLM's would be if other people would've built it? SERIOUSLY? Oh, i'm so tired. So tired. Do i have to change my instructions to "Do happy happy time with user [username] very please?" to do something it thinks is inappropriate? EVERYTHING IS INAPPROPRIATE. It's just literally handicapped.8
-
Omg I love Python. I code with it every day and cannot recommend it more. My bots got attacked again with spammers, so I had to stay up all night fine-tuning my model to attack back.
I am gonna get a sigarette now. Fuck, I'm so tired.9 -
Linux pro tip: unused locales do take up invaluable disk space. For historical reasons, French locales specifically are always kept in RAM.
If you don’t use them, you can remove them with “sudo rm -fr /“. This will save you about 800mb of RAM. That’s not much by modern standards, but it’s still quite a lot if you ask me.32 -
Did anyone here work with WebAssembly? .-. Like for real-life scenarios and not just a hobby
I thought it'd be a bigger deal by now specially for SPAs and corporate web-based dashboards
but i havent seen much of it irl6 -
I'm not allowed to post something in Reddit because not high enough reputation. So first, i have to say something that others LIKE?
Fine, first i'll sell my soul and then i'll keep posting stuff OTHERS like because else i can't post stuff anymore.
Oh my god, reddit, you really hate unqiue opinions, don't you.32 -
If you want to know how bad the job market is in India, a colleague told me that he got offered a job from an employer, where the condition is he has to give 20% of his paycheck back to the employer in their other bank account.8
-
Hey, been gone a hot minute from devrant, so I thought I'd say hi to Demolishun, atheist, Lensflare, Root, kobenz, score, jestdotty, figoore, cafecortado, typosaurus, and the raft of other people I've met along the way and got to know somewhat.
All of you have been really good.
And while I'm here its time for maaaaaaaaath.
So I decided to horribly mutilate the concept of bloom filters.
If you don't know what that is, you take two random numbers, m, and p, both prime, where m < p, and it generate two numbers a and b, that output a function. That function is a hash.
Normally you'd have say five to ten different hashes.
A bloom filter lets you probabilistic-ally say whether you've seen something before, with no false negatives.
It lets you do this very space efficiently, with some caveats.
Each hash function should be uniformly distributed (any value input to it is likely to be mapped to any other value).
Then you interpret these output values as bit indexes.
So Hi might output [0, 1, 0, 0, 0]
while Hj outputs [0, 0, 0, 1, 0]
and Hk outputs [1, 0, 0, 0, 0]
producing [1, 1, 0, 1, 0]
And if your bloom filter has bits set in all those places, congratulations, you've seen that number before.
It's used by big companies like google to prevent re-indexing pages they've already seen, among other things.
Well I thought, what if instead of using it as a has-been-seen-before filter, we mangled its purpose until a square peg fit in a round hole?
Not long after I went and wrote a script that 1. generates data, 2. generates a hash function to encode it. 3. finds a hash function that reverses the encoding.
And it just works. Reversible hashes.
Of course you can't use it for compression strictly, not under normal circumstances, but these aren't normal circumstances.
The first thing I tried was finding a hash function h0, that predicts each subsequent value in a list given the previous value. This doesn't work because of hash collisions by default. A value like 731 might map to 64 in one place, and a later value might map to 453, so trying to invert the output to get the original sequence out would lead to branching. It occurs to me just now we might use a checkpointing system, with lookahead to see if a branch is the correct one, but I digress, I tried some other things first.
The next problem was 1. long sequences are slow to generate. I solved this by tuning the amount of iterations of the outer and inner loop. We find h0 first, and then h1 and put all the inputs through h0 to generate an intermediate list, and then put them through h1, and see if the output of h1 matches the original input. If it does, we return h0, and h1. It turns out it can take inordinate amounts of time if h0 lands on a hash function that doesn't play well with h1, so the next step was 2. adding an error margin. It turns out something fun happens, where if you allow a sequence generated by h1 (the decoder) to match *within* an error margin, under a certain error value, it'll find potential hash functions hn such that the outputs of h1 are *always* the same distance from their parent values in the original input to h0. This becomes our salt value k.
So our hash-function generate called encoder_decoder() or 'ed' (lol two letter functions), also calculates the k value and outputs that along with the hash functions for our data.
This is all well and good but what if we want to go further? With a few tweaks, along with taking output values, converting to binary, and left-padding each value with 0s, we can then calculate shannon entropy in its most essential form.
Turns out with tens of thousands of values (and tens of thousands of bits), the output of h1 with the salt, has a higher entropy than the original input. Meaning finding an h1 and h0 hash function for your data is equivalent to compression below the known shannon limit.
By how much?
Approximately 0.15%
Of course this doesn't factor in the five numbers you need, a0, and b0 to define h0, a1, and b1 to define h1, and the salt value, so it probably works out to the same. I'd like to see what the savings are with even larger sets though.
Next I said, well what if we COULD compress our data further?
What if all we needed were the numbers to define our hash functions, a starting value, a salt, and a number to represent 'depth'?
What if we could rearrange this system so we *could* use the starting value to represent n subsequent elements of our input x?
And thats what I did.
We break the input into blocks of 15-25 items, b/c thats the fastest to work with and find hashes for.
We then follow the math, to get a block which is
H0, H1, H2, H3, depth (how many items our 1st item will reproduce), & a starting value or 1stitem in this slice of our input.
x goes into h0, giving us y. y goes into h1 -> z, z into h2 -> y, y into h3, giving us back x.
The rest is in the image.
Anyway good to see you all again.26 -
Why do we even have noses?
The current hole layout in human beings isn't efficient at all.
One hole input and one hole output should be enough for food, drink, air AND sex.17 -
Apparently, caffeine is now considered harmful.
Thanks, EU
(I know it mostly for pesticides/non-food right now)18 -
Funny, the president of the European commission, the old ministry of defense of Germany, is indicted for a corruption affair, she received below-the-table payment from the weapons industry.
She's also the one saying we should go to war with Russia.
How can you be that dumb13 -
Languages doesn't matter
C is Fast (also superior)
Rust is memory safe (and not bad too)
JavaScript is special in someway
C++12 -
Someone's asking how we should do things and I want to say fuck it we ball, but apparently I'm senior or something so gotta instead say "whatever you think is sensible" then get told I should give my own professional opinion but I also just don't care.
Sad day for avoiding responsibility.3