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
Feed
All
Post Types
- Rants
- Jokes/Memes
- Questions
- Collabs
- devRant
- Random
- Undefined
Cancel
All
-
So I promised a post after work last night, discussing the new factorization technique.
As before, I use a method called decon() that takes any number, like 697 for example, and first breaks it down into the respective digits and magnitudes.
697 becomes -> 600, 90, and 7.
It then factors *those* to give a decomposition matrix that looks something like the following when printed out:
offset: 3, exp: [[Decimal('2'), Decimal('3')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('2')]]
offset: 2, exp: [[Decimal('2'), Decimal('1')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('1')]]
offset: 1, exp: [[Decimal('7'), Decimal('1')]]
Each entry is a pair of numbers representing a prime base and an exponent.
Now the idea was that, in theory, at each magnitude of a product, we could actually search through the *range* of the product of these exponents.
So for offset three (600) here, we're looking at
2^3 * 3 ^ 1 * 5 ^ 2.
But actually we're searching
2^3 * 3 ^ 1 * 5 ^ 2.
2^3 * 3 ^ 1 * 5 ^ 1
2^3 * 3 ^ 1 * 5 ^ 0
2^3 * 3 ^ 0 * 5 ^ 2.
2^3 * 3 ^ 1 * 5 ^ 1
etc..
On the basis that whatever it generates may be the digits of another magnitude in one of our target product's factors.
And the first optimization or filter we can apply is to notice that assuming our factors pq=n,
and where p <= q, it will always be more efficient to search for the digits of p (because its under n^0.5 or the square root), than the larger factor q.
So by implication we can filter out any product of this exponent search that is greater than the square root of n.
Writing this code was a bit of a headache because I had to deal with potentially very large lists of bases and exponents, so I couldn't just use loops within loops.
Instead I resorted to writing a three state state machine that 'counted down' across these exponents, and it just works.
And now, in practice this doesn't immediately give us anything useful. And I had hoped this would at least give us *upperbounds* to start our search from, for any particular digit of a product's factors at a given magnitude. So the 12 digit (or pick a magnitude out of a hat) of an example product might give us an upperbound on the 2's exponent for that same digit in our lowest factor q of n.
It didn't work out that way. Sometimes there would be 'inversions', where the exponent of a factor on a magnitude of n, would be *lower* than the exponent of that factor on the same digit of q.
But when I started tearing into examples and generating test data I started to see certain patterns emerge, and immediately I found a way to not just pin down these inversions, but get *tight* bounds on the 2's exponents in the corresponding digit for our product's factor itself. It was like the complications I initially saw actually became a means to *tighten* the bounds.
For example, for one particular semiprime n=pq, this was some of the data:
n - offset: 6, exp: [[Decimal('2'), Decimal('5')], [Decimal('5'), Decimal('5')]]
q - offset: 6, exp: [[Decimal('2'), Decimal('6')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('5')]]
It's almost like the base 3 exponent in [n:7] gives away the presence of 3^1 in [q:6], even
though theres no subsequent presence of 3^n in [n:6] itself.
And I found this rule held each time I tested it.
Other rules, not so much, and other rules still would fail in the presence of yet other rules, almost like a giant switchboard.
I immediately realized the implications: rules had precedence, acted predictable when in isolated instances, and changed in specific instances in combination with other rules.
This was ripe for a decision tree generated through random search.
Another product n=pq, with mroe data
q(4)
offset: 4, exp: [[Decimal('2'), Decimal('4')], [Decimal('5'), Decimal('3')]]
n(4)
offset: 4, exp: [[Decimal('2'), Decimal('3')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('3')]]
Suggesting that a nontrivial base 3 exponent (**2 rather than **1) suggests the exponent on the 2 in the relevant
digit of [n], is one less than the same base 2 digital exponent at the same digit on [q]
And so it was clear from the get go that this approach held promise.
From there I discovered a bunch more rules and made some observations.
The bulk of the patterns, regardless of how large the product grows, should be present in the smaller bases (some bound of primes, say the first dozen), because the bulk of exponents for the factorization of any magnitude of a number, overwhelming lean heavily in the lower prime bases.
It was if the entire vulnerability was hiding in plain sight for four+ years, and we'd been approaching factorization all wrong from the beginning, by trying to factor a number, and all its digits at all its magnitudes, all at once, when like addition or multiplication, factorization could be done piecemeal if we knew the patterns to look for.2 -
For the past 5 odd years my Bluetooth headphones wouldn't connect to my laptop properly and I had to issue a second Connect command while the first was pending to get it working. I even wrote a script to automate this: https://github.com/lbfalvy/...
Today Bluez finally released a patch for this. That's right, after many years, today the issue got fixed; Connect now returns an error if a call is already pending.
My headphones still don't work, but my workaround is now correctly recognized as invalid input.1 -
a friend of mine sent me some hobby drama and it reminded me of this innate fear I have that's difficult to explain and nor do I really know where it's from or how to describe it
honestly, fuck, I don't know how to describe it
because the issue is every time you do something good for the world, the world ends up vilifying you for it
I saw this when I was growing up and making mods for games, I'm seeing it now in this hobby drama to such a striking degree
this person outdid the community, became famed and god-like a figure due to their personal drive being different, and now... even the people describing the drama are editorializing them into a hated villain of the arc. I literally can't find their original posts, people just say rumoured things about them but won't link them which is super suspicious. even if they do link to a post of theirs the account is banned so I can't read the posts, the website link is 404, etc
the community quotes their backtalk to the person instead of what the person actually said and celebrates it and it's making my stomach churn
this feels like a hit job
then they make fun of this person for being "paranoid everyone is against them" um yeah you literally shit talk them, probably are making things up about them, vilifying them at literally every opportunity, trying to use cheap gotchas to feel superior... I'm starting to think this person is correct, and I want to read what they wrote instead (because of the few quotes they had actual insight into the hobby-sphere) but it seems like you've somehow scrubbed it off the internet, wtf?
I like building things but my fear is exactly this. I've done it in the past when I was little and in my experience if you build something people love, somehow it is a gateway to them mistreating you because they feel entitled to you. so why would you ever contribute to humanity if this is what happens? ever since I was a kid I wanted to keep these things to myself. fame is terrifying. does it even make sense? I can't even put it into words
it would be nice if you could do things and make humanity better but somehow by doing things you literally bring out the worst in them. and yeah, you can tank it and endure it, but it makes you ask why are you doing it if it's so evil onto them? why does this happen? it also frankly sucks, like who wants all this drama? you give people stuff and they spit in your face? that's just depressing. how are you to sleep at night, wrestling with that sort of community integration, doubting if that's your place in life, your purpose? why even? does it even make the world better, or are you making it worse by a chemical reaction of your existence combining with the masses generating vitriol fluids in the collective consciousness? it's just somehow so fucked up4 -
My freelancing journey so far:
In Jan, I continued working for an Indian client I got back in November last year. A Shopify app built with Laravel/MySQL stack.
In Feb, I got three more clients. One, who's from Bulgaria, wants a Shopify app built with Laravel/MySQL
The second one, who's from the UK, wants me to convert their Yii2 application to Laravel.
The third one, also a UK client, wants me to integrate a fulfillment center to their Shopify store.
This month, I continued working for the above clients and now the Bulgarian client wants me to work on a Typescript + Svelte application. I'm really excited for it.
So yeah.. Just wanted to share it. I'm not making a point or any joke or something.1 -
What sentence can have five ‘and’s in a row, like this ‘and and and and and’ and still make perfect sense?2
-
“httpOnly cookies prevent XSS attacks”… wow.
As if not being able to get your cookies is going to stop me from doing bad things.
When I'm in via XSS, it's over. I'm changing the page content to your sign-in form with “please sign in again” notice, but it sends email/password straight to me. What percentage of users is going to enter their data? What do you think? With password managers prefilling data, and the annoyance being one “enter” hit away, I think a lot of users will fall for that. No one, including you, will be able to tell the difference without devTools.
You can rotate the session token, but good luck rotating the user's password.
Oh, did I tell you I could register a service worker using XSS that will be running in background FOREVER?
But don't listen to me. Don't think. Just use httpOnly and hope for the best. After all, your favorite dev youtuber said they could protect you from XSS.2 -
I suggested we make a feature that has a checkbox that is greyed out and always selected. It would have words describing what the checkbox does. This would inform the user about how the feature works, but won't allow them to change that behavior.
So I am ready and willing to create user hostile software features. I am ready to work for Microsoft.1 -
Californian companies like Meta, Microsoft, Google and countless startups have been investing and growing, making devs crazy with incredible salaries, incomprehensible hiring processes and toxic corporate culture. They tried to make masses of end users beta-test their MVP products and services, turning them into subscribers and regular customers. Then they laid off many of their engineers and try to run their businesses using immature artificial intelligence instead. All that happens in a wealthy country where illiteracy, poverty, and violence is on the rise and the only promising candidates for the presidential election will be two white old men. Any questions?4
-
I did it. I sold my soul to the devil and contacted a recruiter myself. He helped me find a new challenge 5 years ago, maybe he can do that trick again.1
-
Got to talking with someone in our company about AI generated code. I said we still have to audit the code, understand how it works, and ensure there isn't any nefarious libraries or code in what is produced. Like what we "should" be doing when we find libraries on the web. I explained how people will purposely create libraries that are spoofs of other libraries, but have malicious code embedded in them. It doesn't take much to imagine someone using a sketchy AI to push this kinda code.
How do you reasonably fight this if we start increasingly relying on generated code by AI? So I suggested we need an AI to review AI generated code. Then we need an AI to review the AI that reviews the AI generated code. Then... -
Only for german speakers... or anyone that really wants to play with google translate to decipher this.
ChatGPT... easily lied to and persuaded to go against its bs safeguards... still cant figure out how to give popular lyrics, or admit it doesnt know... so it makes up songs. Quite amusing ones tbh
https://chat.openai.com/share/...2 -
I regret being mean.
Growing up, I went to International school. Everything was taught in English. I transferred from a Russian school after studying for 6 years. It felt like a heaven although my dad was busting his ass off to pay my tuition.
We had many students from many countries. 2 students from North Korea. I use to make fun of them but now I think I should have nicer. I miss my school and that time. We to sneak to auditorium, hide there from teachers. We use to play "zombie", in pitch black, 1 becomes a zombie and others hide and run from the zombie. We use to play the piano and beautiful music there. The playful and joyful time where everything seemed possible and we had bright futures ahead of us, I miss that.
I want to become more loving and kind person.
https://youtube.com/watch/...8 -
white house props up "memory safe" languages
cloudflare releases all in one network connections library pingora as open source (for rust, a memory safe language)
cloudflare is sus. they were hosting that Ukranian kill-list that was routed through Langley/FBI. when contacted by multiple people, they ignored the violations and complaints to take down the website
SEE IT WAS SUS
so I guess if you can put spyware on the low level and convince everyone to move to it it'll give you an Intel advantage
cloudflare being a CDN sure would give the American gov a lot of metadata to work with
and ofc businesses just want something that works, so on we go5 -
Asked junior how did they find out the location of the bug, got a copy-paste reply from chatgpt explaining the code.
AI is allowed at work, and idgaf if they use it or not. But the whole situation, including the fact of not just replying “I used it to understand/solve the problem”, makes me wonder if SE as we know will end not because AI will replace us, but because AI will make all the fears people had with stack overflow, come true, but worse.
At least with stack overflow people needed to be able to form the question or to search on the website lol.3 -