In comp.lang.javascript message <
XnsA1B15C7C...@194.109.133.133>
, Mon, 29 Apr 2013 09:05:30, Evertjan. <
exxjxw.h...@inter.nl.net>
posted:
>Dr J R Stockton wrote on 28 apr 2013 in comp.lang.javascript:
>
>> In comp.lang.javascript message
>> <
XnsA1AF6E3...@194.109.133.133>, Sat, 27 Apr 2013 10:50:16,
>> Evertjan. <
exxjxw.h...@inter.nl.net> posted:
>>
>>>Dr J R Stockton wrote on 26 apr 2013 in comp.lang.javascript:
>>>
>>>> In comp.lang.javascript message
>>>> <
XnsA1AD622F...@194.109.133.133> , Thu, 25 Apr 2013
>>>> 09:39:07, Evertjan. <
exxjxw.h...@inter.nl.net> posted:
>>>>
>>>>>
>>>>>function two(x) { return !isNaN(x) && x<10 && x>=0 ?"0" + x :x }
>>>
>>>> Gives an inappropriate string if the argument is the null value.
>>>
>>>How could you geve an appropriate string?
>>
>> Give the string "null", of course.
>
>Nonsense, "null" is not a string.
Yes : "null" is four letters in quotation marks, the content of a
string; or, alternatively, is six characters which are a JavaScript
literal representation of a string. The code
alert(LZ(null))
causes a box containing four letters n u l l to appear.
>Later, "white noice" became my ultimate goal in randomness, not trusting
>the pseudorandomness as delivered by formulae. A small chip using
>radioactive decay interval as a seeding source seemed the obvious choice.
It is the obvious choice. But some skill, thought, and experience is
needed to get a truly random sequence from what is necessarily part-
analogue hardware. One must, for example, remember that the mean
interval between successive decays is itself decaying ... and that no
such product can work for ever. Code such as that commended by Johannes
Baago/e is reliable and some of it gives an enormous cycle length.
Also, for testing, the random number sequence needs to be repeatable.
But is it a new edition of the digits, or merely the same 10^6 digits
repeated, which would be boring? In any case, the wording of interest
in the old edition is not necessarily repeated in the new one.
--
(c) John Stockton, nr London, UK. For Mail, see Home Page. Turnpike, WinXP.
Web <
http://www.merlyn.demon.co.uk/> - FAQ-type topics, acronyms, and links.
Command-prompt MiniTrue is useful for viewing/searching/altering files. Free,
DOS/Win/UNIX now 2.0.6; see <URL:
http://www.merlyn.demon.co.uk/pc-links.htm>.