Details
-
AboutI like trolling people using \u202e :)
-
SkillsJava, C++
-
LocationGermany
Joined devRant on 3/17/2017
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
-
@linuxxx sounds interesting, I need that a lot sometimes
-
You mean something like https://www.copy-paste.online/ with a small difference, your site works and that one doesn't
-
@Wisecrack not exactly but it's close to what I tried
-
@Wisecrack in short, I found that if I can find the middle of the two primes of a number, I can calculate the primes easily. And such a number can always be written as (m-d)*(m+d) or just m^2-d^2. If you find an integer solution for that, you win, but I couldn't find anything on the internet on how to solve a difference of squares for integers.
So what I found is basically nothing, just that any product of 2 primes can be written as a difference of squares like m^2-d^2 where m and d are both positive integers and m > d.
I got some promising functions and graphs but in the end they all were just some transformation of m^2-d^2 which we can not solve for integers easily.
But it was fun to try all this -
@Wisecrack huh funny that you are the first comment I see since some weeks here, it's me the guy who tried breaking it too! xD
-
Also, I think you should take a RST URGently and FINally stop with these bad puns.
-
You have SYNned.
-
Right, I forgot to thank you for this tip, it is indeed awesome! Not that great on my phone sadly
-
Oopsie, now I found a mistake!
There are three possibilities where "f00bar" fits 3 times:
It fits exactly twice into the last 12 x's and has also the three possibilities in the first 8 x's.
f00barxx-xxxx-4xxx-yxxx-f00barf00bar and that first part can be moved to the right twice.
So that's a total of 35, not 33.
Now the odds are defined by (sorry, I don't know the English terms for that) the combinations where it happens divided by the amount of all combinations.
The amount of all combinations is 2^122 and, as I just found out, we have 35 combinations where f00bar appears at least once.
That makes it to be 35/(2^122) which is about 6.58 * 10^-36. I am not going to write those numbers out again, just replace the 6.21 from my previous comment with 6.58.
But as I already mentioned, I am not very good at this part of mathematics sooo... I could be wrong by a lot -
@cmarshall10450
A UUID has the format of
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
Where 4 is always 4 and y has the two top bits set (only values from 8-b), so that's 128-6=122 changeable bits.
Now, since "f00bar" has a length of 6, I searched where it could fit:
In the first 8 x's, there are 3 possibilities, offset 0, 1 and 2 (meaning it can be moved to the right by 0, 1 or 2 characters, like so: f00barxx-..., xf00barx-... and xxf00bar-...).
The middle parts are only 4 characters long, so don't bother checking them.
The last 12 x's have 7 possibilities, offset 0-6 (same thing again). That's 3+7=10 where exactly one occurrence is possible.
For the combinations where we have f00bar twice in one UUID, simply multiply 3 by 7, that's just switching all the offsets from before. Now, since f00bar is 6 characters long it fits perfectly into the last 12 x's twice, so that's +1. We have 3*7+1=22. -
@v-vp
Keep in mind that I am the worst person to find for such a task but I was bored so I did it anyway...
Considering you want it to be without "-" in between the word:
There are 3+7=10 possibilities to have it exactly once, 3*7+1=22 to have it twice and even 1 possibility to have it three times! This makes a total of 33 possibilities.
A UUID consists of 128 bits of which, assuming you use version 4, 6 of the bits are always the same, leaving us with 122 bits.
As a result, the probability to have _at least one_ "f00bar" in a version 4 UUID is 33/(2^122) which equals approximately 6.21 * 10^-36 or about 6.21 * 10^-34%.
So that's 0.000000000000000000000000000000000621% if I'm not wrong -
Just for clarification, what does sound mean in this context? There are literally 42 translations for sound
-
That's the reason the equals method exists, you wouldn't use == for string comparison either
-
@ScriptCoded nah I like the original one better, Notepad it is!
-
@stop what do you mean? Either they return back to the INPUT chain or they are dropped I thought, only these two possibilities
-
@Wisecrack well right now I got it down to 1.44 seconds for a 45 bit number, single threaded on my CPU. No idea if this is good or horrible... 100ms for 35 bits though
The primes are 2 orders of magnitude apart (in decimal) in both cases.
But compared to what I had in mind this morning, that's a massive improvement -
Man you got me with this... I can't stop trying new ways to do this and I even found some ways that look promising, but they are completely different approaches than yours. I got my algorithm down to a very very basic problem which can easily be sped up and multithreaded and used by my GPU, sooo... well let's see how this goes.
I don't expect too much though -
Well that's funny because yesterday I thought about looking into this exact thing but I was too busy to even begin looking into it. Now this appears in my feed
-
At least Java is programming, that on the top is compiling, no programming involved right there 🤔
-
When I was at around the age of 12 maybe I still thought noreply is said as nore-play. I had no clue what this was supposed to mean, until my dad finally told me about it. (Also, German here)
-
And to our fellow dev friends, let's submit a � because that is fucking scary.
-
I like those. It's always fun to mess with them and write a bot to fuck up their database.
-
@SADAVA https://devrant.com/rants/2263628/... I don't know, but I'd say the post could be legit
-
I want this game
-
Well I guess you guys have a fair point, for servers/services it's not really doable.
But! I still think, for client side applications such as a web browser, a file explorer, etc there should be an additionally selectable box to toggle regex search mode.
I mean, I have used regex search in sublime text A LOT. Like literally everytime.
Sure, you have the problem of reDOS (attacks?) mistakes, they will only happen locally, but sublime text has this problem, too, and I really don't see it as a problem if you are careful. -
@RememberMe I copy them from a unicode app where you can just enter the unicode hex number and copy it
-
Also, there are a lot more of these combining characters, which you can apply to most symbols. You can also combine combining characters to get complete garbage, you might have seen this before:
T̷̥̘̉e̶̙̟̯̠̅̀̀̉̊͊x̶̨̩̟͙̯̜̦͈̰͓̌̎̂̌͊t̸̡̩̼̝̼̝̥̫̂́́̐̀̽͝ͅ -
@inaba let me introduce you to "COMBINING DIAERESIS" unicode 0x0308.
You can put it right after most symbols, which includes the reversed e, and you get these dots on top of the character before. -
@bigOHNOtation I mean in general, sure for particular problems I try to find my way through with grep or some programming, but having regex directly implemented in browsers or file explorer would sometimes really be helpful.
-
@inaba
ɘ̈
Let me get you some of this, too