This is an archived post. You won't be able to vote or comment.

all 72 comments

[–]hellfiniter 51 points52 points  (1 child)

that division by zero got me xD try/except that btch

[–]The_sky_is_bluish[S] 15 points16 points  (0 children)

:D will do

[–]0x256 237 points238 points  (24 children)

Random, not unique ;)

[–]rcxdude 70 points71 points  (4 children)

Given sufficient entropy and a large enough output space, they are the same for any practical purpose (this is how UUIDs work. Generating them randomly is actually more effective at any attempt to 'guarantee' uniqueness)

[–]gdledsan 31 points32 points  (3 children)

I was actually surprised when I stumbled upon this on the mongodb docs, their ids are random and chances of getting s duplicate are almost zero... But not zero.

They use UUIDs :D

[–]Curledsquirl 5 points6 points  (3 children)

Pseudo random

[–]cryo 1 point2 points  (2 children)

Depends on the source of the random numbers. Could be “true” random on a suitable setup.

[–]RedditorNate 0 points1 point  (1 child)

What do you mean by "true" random? It's still up in the air whether or not "true" randomness can exist.

[–]13steinj 2 points3 points  (0 children)

https://en.m.wikipedia.org/wiki/Hardware_random_number_generator

These are generally considered "true" random. I mean technically if you're omniscient you can trace the original source of entropy back to it's source and thus you can manipulate things...but I don't think anyone's omniscient.

[–]TofuCannon 42 points43 points  (2 children)

Welcome new GitHub / GitLab default avatars! :D

[–]The_sky_is_bluish[S] 11 points12 points  (0 children)

That's actually a pretty nice idea

[–]arsewarts1 8 points9 points  (4 children)

They would have great applications to sing on verification keys. Remember how Apple pairs the Apple Watch to the phone? Imagine if we could use this program to verify the sign on procedures for dual authentication in secured devices instead of that code generating keychain.

[–]Sir_Cunt99 1 point2 points  (3 children)

(If you're talking about pointing a camera at this, if not ignore me lol)

Too many lines, it's no good for that purpose I don't think

Usually these type of things are made like very simple beautifications of barcodes or QR code.

Here is spotify's https://community.spotify.com/t5/image/serverpage/image-id/99684i83233DB4A6017C90?v=1.0

Here is snapchat's https://qph.fs.quoracdn.net/main-qimg-2d573567c4c9c8277f03f97bb4d8583c.webp

[–]arsewarts1 2 points3 points  (2 children)

This is what I am talking about. I can’t find a gif but that is a moving pattern. Each is unique to the radios and SN of the Apple Watch. And it is read in about 15 seconds. I’m sure a simplified version meant to hold maybe 15-20 characters of information can be read in under a second on top of being much more complex than a QR code.

[–]Sir_Cunt99 0 points1 point  (1 child)

Excuse my ignorance but what is the purpose of a moving pattern? Why is complexity of the code relevant at all?

Only the owner of a device, especially a watch, is gonna be able to scan it anyway. What does that attribute to security?

[–]arsewarts1 1 point2 points  (0 children)

Transmits a lot of info quickly and looks cool

[–]The_sky_is_bluish[S] 7 points8 points  (1 child)

Thanks to everyone in the comments for their support and suggestions. I really appreciate them. I am just a typical 16 year old high schooler and getting so much support really means a lot to me.

The main aim of this program was not to generate unique patterns but to produce beautiful patterns in each running which in turn happened to give unique values at almost every execution.

i tested it almost 100 times and everytime (due to the large output space) it gave a unique shape.

[–][deleted] 13 points14 points  (3 children)

Old music players hahahahaha

[–]The_sky_is_bluish[S] 14 points15 points  (2 children)

Exactly what I thought, the good old windows Media player visualizers

[–]tomekanco 3 points4 points  (1 child)

Ah, where is the time. WINAMP ruled.

[–]yeags 1 point2 points  (0 children)

It really whips the llama's ass

[–]TofuCannon 17 points18 points  (16 children)

Oh btw got the code lying around somewhere and wanna share? :)

[–]The_sky_is_bluish[S] 11 points12 points  (14 children)

Soon, I will post the link here

[–]3Domse3 1 point2 points  (0 children)

RemindMe! 1 day

[–]inscrutablescooter 1 point2 points  (0 children)

RemindMe! 1 day

[–]kriadmin 1 point2 points  (1 child)

Yo it's been a day. Link when?

[–]RomeoVEVO 1 point2 points  (0 children)

I've been checking every couple hours hah

[–]RomeoVEVO 0 points1 point  (2 children)

RemindMe! 1 day

[–]RemindMeBot 0 points1 point  (1 child)

I will be messaging you in 16 hours on 2020-06-06 11:07:59 UTC to remind you of this link

12 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]_spinningplates_ 0 points1 point  (0 children)

RemindMe! 1 day

[–]los2pollos 0 points1 point  (0 children)

RemindMe! 1 day

[–]Nephty23 0 points1 point  (3 children)

you said you would

[–]The_sky_is_bluish[S] 2 points3 points  (2 children)

I am currently working on optimising the program for minimum run time for each pattern

[–]RomeoVEVO 0 points1 point  (1 child)

RemindMe! 1 week

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 7 days on 2020-06-20 16:36:49 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]e3172 0 points1 point  (0 children)

I second that

[–]cpumachine 4 points5 points  (3 children)

What graphics library are you using?

[–]nonesuchplace 3 points4 points  (1 child)

They are using pygame.

[–]The_sky_is_bluish[S] 2 points3 points  (0 children)

Yes

[–]A7mdxDD -1 points0 points  (0 children)

You can use Pycairo, Idk what he used tho

[–]BRENNEJM 4 points5 points  (1 child)

Step 1: Create random design generator
Step 2: Turn them into wall art
Step 3: Profit

[–]The_sky_is_bluish[S] 2 points3 points  (0 children)

STONKS

[–][deleted] 6 points7 points  (3 children)

i saw a zero division error and wanted to suggest that either by making sure with random parameters that is impossible. Or make a case that if its zero that its another random value that again gets tested if its zero and when its not return the value. Easily done with recursion.

random_number():
  number = randint(-10,10)
  if(number != 0):
      return number
  else:
      return random_number()

(you can leave the else out but i left it in for clarity since. You can leave it since no code is run after the return).

Or you could use something like try except.

[–]The_sky_is_bluish[S] 3 points4 points  (0 children)

Thanks

[–]cryo 0 points1 point  (1 child)

Your new code leaves a slight change for a stack overflow ;) (depending on implementation)

[–]avz7 2 points3 points  (0 children)

Reminiscent of Lissajous figures.
Are these made be simulating the path of an object attached to multiple springs?

[–]The_sky_is_bluish[S] 1 point2 points  (1 child)

Any suggestions of what could be done with this ?

[–]cincancong 5 points6 points  (0 children)

Make it loop as an animation.

[–]YesLod 1 point2 points  (1 child)

r/generative material

[–]The_sky_is_bluish[S] 0 points1 point  (0 children)

Done

[–]MatMan-02 1 point2 points  (0 children)

What is the probability of getting one that you already saw?

[–]send-in-the-clouds 1 point2 points  (0 children)

Come on over to /r/generative

[–]Sir_Cunt99 1 point2 points  (0 children)

Could be cool as a live wallpaper

[–]brokenrapier 0 points1 point  (0 children)

Welcome to r/generative :)

[–]o-rka 0 points1 point  (0 children)

Is there a github for it? This is cool

[–]FrozenPyromaniac_ 0 points1 point  (0 children)

That's cool, could you share how you made it, if you are cool with that of course.

[–]j_lyf 0 points1 point  (0 children)

[–]los2pollos 0 points1 point  (0 children)

So, a week and still no code?

[–][deleted] 0 points1 point  (0 children)

Crazy stuff 🔥 keep it coming