Sign in Join
Wiki copytemporary

EverettRandom: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Everett Random Integer Class
22
33### Summary
44
55The Everett interpretation of quantum mechanics ("Many Worlds") is that when an interaction is made with an elementary wave function (such as an electron or photon etc) the universe bifurcates. ref: [Wikipedia Many Worlds page](https://en.wikipedia.org/wiki/Many-worlds_interpretation)
66
77This happens naturally of course (just via radioactive decays in atoms of your body there are about 5000 bifucations per second) but this component brings into the mix "Free Will". By requesting a random number from the online source, which is a beam-splitter based in Austrailia you are bifurcating the Universe deliberately - that is, based on your Free Will. You may or may not find that interesting, but nevertheless this component gives you this ability (to "play God" with the Universe)
88
99The random numbers returned are truly random (i.e. not pseudorandom via algorithm)
1010
1111This package is a wrapper for querying a quantum number generator based in Austrailia.\
1212![](/wiki-images/d/d0/Everettrandom_screenshot.png)\
1313----
1414
1515#### Download
1616
1717- the everettrandom package can be downloaded as a zip from [Lazarus ccr site](https://svn.code.sf.net/p/lazarus-ccr/svn/components/everettrandom/latest_stable/updates/everettrandom.zip)
1818
19-\
2019----
2120
2221#### Installation and Usage
2322
2423- Open everettrandom.lpk and compile it.
2524- In your application, include everettrandom as a required package
2625- In a form unit:
2726 - In the Uses clause, add ueverettrandom
2827
29-\
3028----
3129
3230#### Code
3331
3432- Declare as a variable:
3533
3634``` pascal
3735MyEverett: TEverett;
3836```
3937
4038- In form Create:
4139
4240``` pascal
4341MyEverett := TEverett.Create(Self);
4442```
4543
4644- If you don't want to show a dialog whilst querying the server:
4745
4846``` pascal
4947MyEverett.ShowWaitDialog:=FALSE;
5048```
5149
5250- There are 3 functions that will retrieve a single integer:
5351
5452``` pascal
5553// Fetch a single random number
5654function MyEverett.GetSingle8Bit: integer;
5755function MyEverett.GetSingle16Bit: integer;
5856function MyEverett.GetSingleHex: String;
5957```
6058
6159- Array functions will put results into:
6260 - (GetInteger8BitArray, GetInteger16BitArray) populates
6361 ``` pascal
6462 MyEverett.IntegerArray[0..Pred(ArraySize)]
6563 ```
6664 - (GetHexArray) populates
6765 ``` pascal
6866 MyEverett.HexArray[0..Pred(ArraySize)]
6967 ```
7068- First set the properties:
7169 - MyEverett.ArraySize (default=1)
7270 - ..and for Hex results
7371 - MyEverett.HexSize (default=1) e.g. 1=00-\>FF, 2=0000-\>FFFF, 3=000000-\>FFFFFF etc.
7472- Result for array functions is TRUE(Success) or FALSE(failure)
7573
7674``` pascal
7775function MyEverett.GetInteger8BitArray:Boolean;
7876function MyEverett.GetInteger16BitArray:Boolean;
7977function MyEverett.GetHexArray:Boolean;
8078```
8179
8280------------------------------------------------------------------------
8381
8482#### Internationalisation
8583
8684- i8n: everettrandom has a 'locale' folder with all the .po files needed for translation. The base language is English
8785
88-\
8986----
9087
9188#### Demo App
9289
9390- In the /demo folder is a small application to demonstrate the use of everettrandom
9491- Compile and run the app to see if it runs OK on your system.
9592 - *The server can be busy, so be patient and wait for the result*
9693- Study the source code to see how to use the methods and properties of the everettrandom class
9794
98-\
9995----
10096
10197Minesadorada Last Edited: //
10298
10399---
104100*From the Free Pascal wiki, page "EverettRandom", as it stood on 2020-11-29 after a change by Jwdietrich, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
105101Category: Components
106102Category: Packages
107103Category: Statistical algorithms

Back to history