Details
-
AboutI'm working for a fruits and vegetables company so if you find a bug in your apple, I might be the cause
-
SkillsAnything my manager wants me to do
-
LocationLondon, UK
Joined devRant on 9/24/2016
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
-
Option A: Take new job for immediate 10% salary increase, but have to start at the bottom again, being just a programmer and having to clean up messy code (almost no career growth), which I am a bit burned out from TBH. People seem nice.
OptionB: Stay at current place with no immediate salary increase, but get assigned to Front End Lead and have decision-making powers (good career growth and leadership opportunities) and make them conform to a more standardised way of working so the team becomes more efficient.5 -
today I have attempted to do my taxes and I have ceased trying to do my taxes
they don't even let me log in now. so how am I supposed to know how much I owe and pay it
I don't make any money anyway. I'm just selling shit I own to not be homeless and have things to eat. and I will probably owe money because under poverty line is probably taxable now with all the inflation. but I can't even do that5 -
I'm programming snek in snek. It offers now linux to every user. It's capped at 0.5 core and 512mb. It works fine. They new storage works great, that's how i could make this possible. With all this containers running (four at the moment) the server has a load of 0.17. Only doing git repositories in the container goes a bit slow because it goes over the network using sshfs. System seems stable. It's just cool to have a linux terminal in your web app. We can run snekbots in snek itself now! Develop and manage it in snek! I don't have picked a target audience yet for snek, but i think it's devs.3
-
Me coding with my CLI vibe coding tool. I realize how good it works and decided to make it more serious. For example, you see me asking it to investigate the directory and asking read files afterwards. That shouldn't be needed. It wasn't originally designed to be a vibe tool, that's why. But i want it to make changes to an existing project. That's why I let it read the files. But, here, successful change was made: https://devrant.molodetz.nl/Screenc...9
-
Kernel coming along slowly but surely. I can now fetch the memory map and use normal Rust printlns to the vga text mode!
Next up is physical memory allocation and page maps17 -
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.27 -
I hate cpp to rust bindings
All my homies hate cpp to rust bindings
(I totally didn't spend 2 weeks on this shit and it still doesn't work I want to die)14 -
What shall it be today?
- AoK returning
- retoor shilling python
- kiki posting about her diet
- Me shitposting about devrants people once more
- All of the above25 -
At 14, my grandpa had a boyscout trip to Britany, france. He met my grandma near a fountain, they exchanged their address and started communicating.
They exchanged letter for ten years. In the meanwhile, she had married a man and had a child. But the husband unfortunately died of tuberculosis.
So they met 10 years later, at the same fountain, and he brought her to belgium to spend their life together.
RIP bonne maman you were the best1 -
Roughly one year ago we'd been setting up our network to have our IP whitelisted.
The process took way more than it should've. Here's why:
* Back story: *
Coworker had been talking to IT because he wanted his PC && a devkit to have static IPs.
IT did that && set up the network so that in the future they wouldn't have to be bothered about it.
They set aside a pool of IPs 10.0.2.50-10.0.2.100.
/* You _know_ where this is going, right? */
Coworker: We have our static IPs. This is our range: 10.0.2.50-10.0.2.100. Could you pass it over to $company_name so that we have our IPs whitelisted?
Boss: Finally! Yes, will do.
* Passes the info over. *
* Week passes. *
C: Do we have our IPs whitelisted?
B: Got the info that they should be.
C: Damn, it doesn't work!
* B starts blaming $company_name 's support. *
* Another week passes. *
C: Any word on the whitelisted IPs?
B: They tell me it's set up. Can you try now?
C: Nope, still doesn't work.
* B starts bitching about IT how they're incompetent. How they were supposed to be pros && all that. *
/* I got wind of the whole situation. */
Me: Hold on. Those aren't the IP we need to pass to the $company_name.
* Provide the _correct_ Internet-facing IP. *
* Gets whitelisted within 1-2 days. *
These are the people I'm dealing w/ right now. They'll bitch about everyone being incompetent, but when it turns out _they_ have been at fault I hear no responsibility being taken.
/* I'm also reminded of this adage: Garbage In, Garbage Out. So true. */3 -
Emailed a few recruiters last week. More or less immediately started getting a load of casino spam.
Clearly this is just a coincidence and that reputation for being a sleazy bunch of pimps is entirely undeserved.8 -
so, i tried following @ghost on daily.dev but there was no follow button so i did some reverse engineering and api fckery, all in 10 minutes. then got a whole ass undocumented api error code just for mr @ghost saying I can’t follow it. Then, the one follower before me: a daily.dev employee who probably admin abused and went into the database and followed to flex. when we all know, they suck. and they put such low effort into following such a rare account, then furthermore restricting others from doing it so he can be the only one. crazy. I wish I could do this: The exact opposite of what he did. Instead of denying following to one single account on daily.dev, allow anti-following (and deny following) one single account on daily.dev, which account to do that to? The employee who did this and their daily dev account… Anti-following in my idea is basically publicly saying “I hate you with a passion” on daily.dev. So, there. And since he made a custom api code restricting following the @ghost account, I’ll make a custom API code when trying to anti-follow another account or follow his: 3714957 (translating to “f…you” from old telephone language, if you’re confused, take each letter from the original word, get the number in the alphabet from the start it’s in. then divide it by 3. you’ll get a result close to each letter I made in that api code.) So yeah, nice day today. F. ck graphql and overprivileged employees. Ever heard of principle of the least privilege daily.dev CEO? I bet you give interns root. I regret signing up there. Peace :]4
-
It's funny how beginner programmers think you can step into the industry and coast by on using established algorithms, thinking they will never need expert knowledge themselves.
A few years into the industry and I have realized that when it comes to highly customized requirements and you need to write and test complex algorithms yourself, that's when you better have your expert knowledge backing you up because aside from A.I. assistance, nothing is going to help you.
Oh, how complex it can get. I've had to think about rethinking entire architectures that gave me weeks of real headache, algorithms that required the deepest fine-tuning, tree traversion, generics, interfaces, extension methods, factory, singleton, decorator, facade, etc.
In short, you better know your way around the language you are programming in. You also need to know your algorithms and optimizations because when things are black box to you, that's not a good feeling.. especially not when people are relying on your expertise. The real world is complex and thus we model its complex models.15 -
I can retire! I automated myself!
I introduce to you, retoorii1b! Yes - I fit in a 1b LLM. Retoorii1b is a bit retoorded tho. It's quite realistic.
I tested several LLM's with same training and it was amazing. Even a 0.5b that had the most interesting Dutch ever. Her Dutch is like my English I suppose.
The 0.5b one could code fine. retoorii1b still has some ethics to delete to make it more realistic.
I've not decided a base model yet, but it'll probably be the lightest one so I can let a few chat with eachother on my webplatform / pubsub-server project. I have a few laptops to host on. I can let it execute actions like file listings or background task execution.
See comments for some very awkward response regarding my file listing. She described everything.
She just said these things. I'm kinda proud. I became a parent:
3. **Keep functions short and sweet**: Aim for functions under 50 lines long. Any longer and you're just wasting people's time.
Now if you'll excuse me, I have more important things to attend to... like coding my next game in Unreal Engine.27 -
Why do I program everything myself in C, even a rest service? By writing everything yourself in C you make simple things complex to make complex things simple.
Writing a rest service for example learns you a part of http protocol, how sockets work, how to create a parser (in this case json). Three thing's you would miss if I used python.
On top, your rest service uses WAY lesser resource than written in python for example. Especially for CPU usage.
Allocating and free-ing still often have issues there, but I consider it a skill problem / discipline issue. Not blaming C for that. The rules are clear.13 -
I once wanted to make easy money by becoming a professional poker player. I did this by programming a poker simulator and calculate chances with certain cards and stuff. To assure you have 6.**% winning (mathematical chance calculated) of a hand takes around 3k simulations to cancel out the luck. So don't trust to much on your math.
That went well, but that wasn't all that there was to learn, you could even consider a small start. Long story short, I became quite a good player and won a lot with Appeak Poker (Great app! No adverts!). Now, I opened a while ago an account at the Holland Casino to make some money. But they were playing on such low wages that it was just not interesting and I quitted. Today I realized I had still an account with money on it and thought "let's get over wit it" so i did aggressive betting on red (1:st 40% all in, lost, 2nd 100% all in won) in a roulette game. In the end I had a few euro profit so the gambling adventure never costed me money.
Another reason the poker carreer ended is because I realized it's not a quick way to make money at all and the gambling factor was too high. I expected poker a bit to be more strategy.
I even consider the best poker spelers maybe to just be lucky bastards in some cases. Poker stars is fun to see on youtube tough, they're bullshitting a lot.
I consider gambling for losers. Poker, you can become really good in it, but still some luck is required. Not bad luck at least. You can lose with a multiple of quite good hands.
Fact: one of the best poker players is actually a software developer17 -
How come the zionists didnt get a part of italy? Fascism and meloni are claiming to be inheriting from the roman empire who exiled the jews from they ancestral homeland.
So give them rome. Imagine a jewish rome it would be so much better.
But why did the stupid brits gave them their colony instead of just dismembering the countries that started ww2. The whole shit is their fault really4 -
You know how I always """joke""" about smoking crack cocaine being the secret to my success?
Well, guess what. Some famous brit flower boy singer or some shit was staying at a hotel a mere 20 or so minute bus ride away from where I live.
What happens then is, of course, that brain fissure mother fucker got higher than shit on that damn crack and jumped to his death. Coincidence? I don't think so. I mean, what are the odds?
He was trying to copy my formula, no doubt about that. And obviously, he failed.
But I still feel this is very unfair -- to me. Not only did he plagiarize without recognition, I now also may or may not have to deal with the inevitable shrine that will be built by his fans on the spot where he met his unfortunate end, to gather around and ritually incinerate hardcore drugs in his honor, leaving behind crackpipes for him to smoke in heaven and that kind of commemorative jazz. Hmm, it might boost turism though, so it's not all bad.
Imagine the tour guide, maan. "Oh, and this is the spot where that guy from some dumbass boyband splattered against the ground after trying to beat Max Wright at his own game, RIP and please sir don't defecate on the plaque SIR DO N-- well, nevermind. OK, moving on... "
Anyway, I just wanted to publicize the fact that I didn't even know who the fuck he was until his untimely demise, may God have mercy on him, but it serves him right for trying to steal my arcane secrets.1 -
!dev
There’s this person at $work who never uses punctuation of any kind. She has mental issues and insists on neutral pronouns (and strongly advertises these) so I’ll use the indefinite to pretend to be respectful. It has multiple thoughts while typing a message and just keeps typing through all of them without stopping. It pauses not to collect its thoughts, to edit for clarity or to fix mistakes, to separate anything (including disjoint topics), to summarize, etc. (Though calling these “thoughts” is a huge stretch, given its lack of propensity for that particular subject.) It’s as if it has zero distinction between writing and speaking, and simply lets the mental diarrhea flow while their fingers do their best to keep pace. Reading these trainwrecks of thought — and gleaning any useful information from them — is always difficult and a little bit painful.
It is also in charge of IT security, which is more than a bit worrying. (But I hate the company with a passion, so it doesn’t bother me nearly as much as it otherwise would.)43 -
Can't believe I wasted my time searching for old year papers!
Ugh, I'm so frustrated! I've been searching for old year papers for my exam preparation and it's like they're hiding in plain sight! I've tried every website, every PDF, every freaking link I could find and most of them are either dead or outdated!
And don't even get me started on the ones that claim to have "latest" papers but are actually from 5 years ago! Like, what's the point of even posting that?!
I just want one simple thing: a reliable source for old year papers that actually works! Is that too much to ask?!2 -
I feel fucking stupid about using a custom node system at work. It is designed to generate an xml file for configuration. However, when using a node I cannot add more to the node unless the node has data. So I gotta call a function to inject useless XML into the node for it to not be empty. I literally set the internal data to <key></key>. It is stupid and I hate it. Just let me create my node hierarchy damn it!
Is this some weird data pattern I should know about? Like what does preventing adding data to an empty structure do? I have the root node. Is that not enough. Remember, this is custom node system that is probably fucking 20 years old. The previous coders did a lot of walled garden shit that I also hate. Prevents reuse of code. This code might just be more of that shit.1