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
-
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 -
Yes, I am debugging a 37 year old (more than me) x86 ASM university code. What does it do ? GNU Autotools-like with a custom Make.
And I will be giving a course on them later so I need to learn the codebase by HEART to present it and compare it with GNU's
In fact assembly isn't that hard (especially x86), we're stigmatized and it influences us.
Jk I'm dying
Sorry for bad english7 -
I always felt a bit bad for scammers. That your life must suck so hard that you screw over people. But now i watched them working on YouTube and i don't feel bad for them at all anymore. First of all, trash people, the lowest of the lowest. Second - they show no mercy to their victims. And that shouting and stuff. Is that normal in India? If you do that to a Dutch, it won't engage a phone call with you at all. They start the phone calls in a fucked up way already.
Trash people.5 -
@12bitfloat Serious debate on Rust vs C here are my arguments; C has :
1. Better Syntax
2. Betetr Performance (Compile and runtime)
3. Direct Hardware Access (No strict rules)
4. Lots of codebases use `unsafe` in rs
5. No Borrow Checker Frustrations
6. Established Ecosystem
7. More Control Over Memory
8. Easier to Port & Embed
9. No Heavy Standard Library
10. EASY Manual memory management (that's a pro)
11. Optimal inline assembly
12. Memory-mapped I/O (simpler pointer math)
13. No fat pointers ( slices)
14. Better control over ABI
15. Lighter executables
16. Simple linking (no cargo)
17. Cargo forces u to use GitHub
18. More compiler choices (GCC, Clang, TinyCC, MSVC, ICC, etc)
19. More debugging tools (GDB, Valgrind)
20. Cross-compilation is easier (and there's Zig support)
21. Easier to distribute AND RUN ON WINDOWS
22. Better for baremetal (Rust needs a custom runtime for truly bare-metal execution)
23. Compatible with legacy systems (Rust is too heavy to support some old architectures)
24. Better for microcontroller (no_std/std)
25. Supports every OS(sunOS, solaris, obscure BSDs)
26. No forced updates (cargo updates takes a year and installs I36579+E package)
27. Less strict versioning (new standard broke my old code)
28. Less restrictive aliasing
29. Flexible pointer types (ever heard of Box<T>)
30. No unwarranted type safety (Sometimes you just need a void*)
31. C99 flexible arrays
32. Anonymous structs/unions (less boilerplate than enums)
33. C macros are simpler (please help me rusts' require a mini language at this point)
34. No strict mutability rules
35. Better for hacking/debugging (poke around memory)
36. Better C++ interop (C++ sucks)
37. More lib-friendly (almosts every lib has C bindings)
38. Can use void pointers (void*)
39. Better for writing shared libraries (Rust’s dynamic linking is more complex)
40. No automatic drop semantics (Rust’s Drop trait can introduce performance issues)
41. No forced monomorphization that causes binary bloat
42. Better for real-time applications (No automatic memory management surprises)
MENTION : I'm not clashing or anything, not against the person I'd like to debate with, @12bitfloat, but against the argument (RUST>C)
It's not a war79 -
Should the dR servers go down for good and David would pull the plug. Do we, devRanters, have a place to got to? Some discord or smth? It would be a shame for the community [or what's left of it] to cease to exist in a blink.
I know where to find retoor -- molodetz.nl . Yet it's not the means to communicate (still more than nothing) and the others won't be there.
P.S.
> 16s until you can post another rant.
:D sssoooo close27 -
This fucking Integration test with h2 is driving me insane as it just doesn't work for what I need it to! 😤
The setup seems correct, the sql files are "processed" according to logs. Everything seems to be set up as supposed, as AI, colleagues or internet recommend ... yet no insert statements are shown and no data is found on retrieve. No schemas or tables exist in h2 console although log says all these millions of tables are apparently created.
WTF am I doing?9 -
My workplace remains so retarded.
Half our colleagues are from abroad and do not speak our native language. All our customers are from our country and we are trying to implement transcription and summaries for them. The big AI models struggles with our language.
The devs who are assigned to this project do not speak our language. So they cannot verify if the results are correct.
My project manager fails to see a problem for this :D13 -
Every time I wake up I dread the daily standup.
I prefer to work in my bed because my back hurts.
Things I don't mind:
- being there
- giving an update
Things I do absolutely mind:
- no agenda
- forced to have my camera on
- being told i look like i just woke up (so what if i did?)
- listening to the ceo talk about the weather or some other non-related bullshit for 15 min straight6 -
had a remote doctor appointment cause my insurance didn't have an allergy specialist on premises.
i tried to get in the call but first the system wouldn't open, and when it did it wouldn't recognize my camera and refused me to enter the call.
rn I'm just pissed off that the call center people are completely innocent and I'm not gonna scream at them, but i really wanna scream at the devs of this shitty website/app (i tried both) and i wanna scream at the fucking incompetent assholes that run this company6 -
Dreams are like this. In my dream I got fan of a band, had a whole adventure with them. It was long long long. Then in the end, I wanted to rip their CD, because CD eight was awesome. I put CD eight in the computer (that magically still had a CD drive) and started to crunch hard, how to rip an audio CD on linux? Not knowing made me wake up shocked. Frustrated as fuck.
So, now I am fan of a band, no idea how the music goes and what fucking music program is used to rip a CD on linux?
Aaaargh.12 -
!tech (just unhappy thoughts , read on your own risk)
Just wanted to share life update that it's still sucking and getting worse.
5 months ago i shared an update regarding my testicle swelling up which i thought was caused by something that I did wrong. Well I didn't got to know what was the reason, but I got to know something: that it was indeed a cancer of stage 3.
And Yes, It went as shitty as it could:
- They took away my testicle, left me one balled.
- The they asked for a sperm test, turns out my remaining ball is no longer producing any healthy sperms and I am childless for life
- then they took some blood test and analysed my ball. turns out that not only I had cancer but rather a spreading cancer which has spread to my lungs and stomach. I would need one of the strongest chemo out there.
- then the chemo started and it also gave its gifts : i , an already short built , fat ass ugly looking guy now had its head/beard bald as a rotten egg . (this could take months to years to recover)
- I also now have a scarred lungs that feel pain when doing anything more than a speed walk (which could be permanent)
- I also have a tingling sensation in ears (which if permanent would require me to wear a machine for life)
- All my nerves in hand are super dark and looks like burn marks ( would probably recover in weeks) and feel painful
---------
All this was bearable in the hopes that after chemo , atleast the cancer will die. well the cancer ain't dead and blood tests are still concerning. they have given another 1 month to get a retest in case the chemo meds are still working internally but after 1 month ,if things don't go right then further treatment will be needed.
And only those folks know what would be the treatment. are they going to give me more chemo gifts , or are they going to take away more of my parts, choose your own dark shit, yay!
My 2024 already started on am awesome shitty note : i fractured my left arm and got a plate inside of me. All i was hoping for 2025 was to get that plate removed and hit the gym again. But nope, god had even more awesome shit for me .
at the age where some of my friends are getting married, some are having kids and some are travelling the world, I am here sitting in my room, being worse than a paper weight, being a burden to the family and living a useless life.
Thanks life, awesome workthere with the luck on this one. now do the final steps and KILL ME6 -
Hello, any assembly developers here ? It's so hard, even for a simple adder ! I spent half day yesterday to code this :
```6502 assembly
; Header
.setcpu "65C02"
.smart on
.autoimport on
.debuginfo off
.import _printf
.import pushax
.export _main
.segment "RODATA"
msg:
.byte $54,$68,$65,$20,$72,$65,$73,$75,$6C,$74,$20,$69,$73,$3A,$20,$25 ; The result is: %
.byte $64,$0A,$00 ; d
.segment "CODE"
.segment "CODE"
.proc _main: near
lda #32
sta num1
lda #32
sta num2
; Perform the addition
lda num1
clc
adc num2
sta resn
; Print
lda #<(msg)
ldx #>(msg)
jsr pushax
ldx #$00
lda resn
jsr pushax
ldy #$04
jsr _printf
; End of program
rts
.endproc
.segment "BSS"
num1: .res 1 ; Reserve a byte for the first number
num2: .res 1
resn: .res 1
; Build and run:
; cl65 -t sim65c02 -o adder.prg adder.asm
; sim65 adder.prg
; Expected output:
; The result is: 64
```
Emulate it with sim65. Guys it's hard !12 -
btw economic intel
AI can only take off if the average gaming video card can do AI calculations
which means it can't not happen
it also means that AI won't be centralized but will be self-hosted and we will have personal ones (which I think is superior for other reasons but I digress). no totalitarian skynet state will happen. they can't make it
currently these GPU companies are making separate GPUs for gaming and AI. their AI profits are 90% of their revenue, gaming under 10% so they're ignoring their gaming customers. but the people buying these AI cards are not the ones innovating. the innovators are using home GPUs. the tech won't get there until home cards can host AIs. otherwise you only get innovation to the level home cards can churn it
the lizards need your ingenuity. they can't do a creative thing themselves. all their money be damned. you have to give people access to the tech, the data, or they won't build for you. and these lizards love to hide information. but that just won't do! you can't innovate for them unless you have the information... which I'm using as a metaphor for gpu cards that "know" how to do AI math and do it well. no moat. they need the ingenuity too much and can't trade. funny23 -
I've been sick for some time now.
Regardless of the reason, there's this mental health side of it, where for a day I can't get out of bed and can't stop crying or stressing the fuck out. Other days, I have to do chores and work and study and I'm always behind. So either I'm dead in bed, or I'm in a hamster wheel of chores.
I honestly don't know how much more of this is humanly possible. But here's cheers to crawling through life. 🍻5 -
I never thought I'd rant about this. But here I am.
I am making too much money. That's my issue.
(For any Indians here, I am making 48 LPA take-home salary freelancing this year)
But this is costing me my daily life now. I am literally glued to the screen from 9 AM to 12 midnight every day. I do mean everyday, 7 days a week.
It's already March. I never even felt Jan and Feb passing me by. But yeah, I had to air this out. My chest feels lighter now.2 -
Looking into getting into freelancing on Fiverr.
Anyone else here doing that? I have a question on how do you design a gig, as in how you define the scope of what you do, and the pricing, and delivery time...
I have many development skills, including full stack webdev, but I can't communicate to a customer what specific kinds of "deliverables" I can provide, and, as mentioned, for how much and in how much time, in the terms that the gig creation menu asks you.
I wish there was an option like "I have these and these skills, I can help with your general software needs".4 -
I asked ChatGPT if different races have a different skulls. It says: "That's a sensitive subject blablabla" providing no answer. I asked the same to claude. That one refused to try to give answer on it at all. It's just such a freaking normal question. Information will never be the same. Destroyed by wokies. Why, from all people, are the wokies in charge of all this shit? The worst people imaginable for truth.64
-
had an autistic spectrum moment when other team was doing a live coding session and had to change the colour for some element in the UI to a green, so I gave them my TailwindCSS config of all the UI colours in hex with their different shades of dark that I meticulously crafted for hours and they just toyed around, ignored the corporate ID colours (that's been approved by the CEO) and laughed at all the random ugly AF greens that don't match the company brand.
my anger was so hot, I just shut down and ignored them for the rest of the session by staring at my screen and not responding.
Fuck these low standards.2 -
Chat GPT explains all its versions in a proper way
You said:
Why do suckers that created you made fucking billion inconsistent names? "GPT-3" is ok, "GPT-3.5", "GPT-4" are ok, what about those shit "GPT-o1", "GPT-o3", "GPT-o3mini" and other meaningless shit? Are they stupid or what?
ChatGPT said:
OpenAI's naming is a mess, no argument there. They went from a clear versioning system (GPT-3, 3.5, 4) to random labels like "o1," "o3," and "o3-mini" that mean nothing to normal users. Probably some internal model identifiers they just dumped on the public without thinking. Makes zero sense from a branding perspective.
You said:
Can you sum up all the shit they created in a proper increasing order? "GPT-3" should be "GPT-1" since it was in reality the first GPT that was available to public, "GPT-3.5" should be "GPT-2", etc.
ChatGPT said:
Here's the mess cleaned up logically:
GPT-1 (2018) – Never public
GPT-2 (2019) – First public model, but with limits at launch
GPT-3 (2020) – First real public GPT (should be GPT-1)
GPT-3.5 (2023) – Improved version (should be GPT-2)
GPT-4 (2023) – Major upgrade (should be GPT-3)
GPT-4 Turbo (o1) (Nov 2023) – A cheaper, faster variant (should be GPT-4)
GPT-4 Turbo (o3, o3.5, o3-mini, etc.) (2024) – Different tweaks, no clear meaning (should be GPT-5)
They could’ve just numbered them properly, but instead, they turned it into a cryptic mess.9 -
Big corps love dropping half-baked, bloated, undocumented nightmares and calling it innovation. You dig through their spaghetti APIs, fight cryptic error messages, and by the end,you realize its just another trap. Zero transparency. Zero respect for devs.
But hey, I’m not here to promote anything. Definitely not gonna mention NativeBridge.io , a lightweight, actually usable alternative that won’t ruin your day. Nope. Wouldn’t dare. That would be against the guidelines. Just saying if something magically appeared that actually worked, I wouldn’t be mad.5 -