Article View: pl.comp.programming
Article #217512Re: Jak zrobić test za pomocą PractRand?
From: M.M.
Date: Sun, 22 Aug 2021 00:43
Date: Sun, 22 Aug 2021 00:43
48 lines
5328 bytes
5328 bytes
On Sunday, August 22, 2021 at 2:32:25 AM UTC+2, osobli...@gmail.com wrote: > Zrobiłem hexdump pierwszych bitów: > > python3 Mojgenerator01.py | hexdump -n4000 | head > > 0000000 3031 3131 3131 3130 3131 3031 3131 3130 > 0000010 3131 3030 3030 3131 3030 3131 3131 3030 > 0000020 3030 3130 3031 3131 3030 3030 3131 3130 > 0000030 3030 3130 3030 3030 3131 3131 3131 3131 > 0000040 3031 3130 3131 3031 3031 3131 3030 3030 > 0000050 3031 3030 3030 3031 3130 3130 3030 3131 > 0000060 3131 3131 3131 3031 3130 3031 3131 3131 > 0000070 3030 3130 3130 3030 3030 0a31 3131 3130 > 0000080 3131 3031 3030 3131 3131 3130 3031 3131 > 0000090 3030 3131 3030 3030 3030 3031 3030 3131 > Traceback (most recent call last): > File "Collatzgenerator01.py", line 50, in <module> > print(binary) > BrokenPipeError: [Errno 32] Broken pipe > I nie wygląda to dobrze. Po pierwsze nie mogę zrobić hexdumpu 4000 bajtów. Czy ta komenda ma jakieś ograniczenie, czy program mi się wykrzacza? Po drugie, tak na oko, to nie są losowe bity. Nie wiem o co chodzi. Czyżbym się walnął w kodzie albo napisał aż tak beznadziejny generator? Wygląda bardzo dobrze, ale nie jak dane binarne, ale jak dane tekstowe, czyli potrzebujesz konwertera. U mnie wygląda podobnie: ./SimpPRNG 1 300 | xxd 00000000: 3131 3030 3031 3031 3131 3030 3031 3131 1100010111000111 00000010: 3131 3030 3030 3031 3131 3130 3130 3131 1100000111101011 00000020: 3131 3030 3130 3031 3031 3130 3130 3030 1100100101101000 00000030: 3131 3130 3030 3131 3131 3030 3131 3131 1110001111001111 00000040: 3030 3030 3030 3030 3131 3131 3130 3031 0000000011111001 00000050: 3030 3031 3031 3130 3131 3131 3131 3130 0001011011111110 00000060: 3030 3030 3131 3131 3131 3130 3130 3031 0000111111101001 00000070: 3030 3131 3030 3030 3031 3130 3131 3030 0011000001101100 00000080: 3131 3030 3130 3131 3130 3130 3030 3130 1100101110100010 00000090: 3031 3030 3131 3031 3131 3031 3131 3131 0100110111011111 000000a0: 3030 3130 3130 3131 3130 3131 3031 3131 0010101110110111 000000b0: 3031 3030 3131 3031 3130 3031 3130 3030 0100110110011000 000000c0: 3130 3031 3131 3130 3030 3130 3130 3131 1001111000101011 000000d0: 3030 3030 3031 3030 3030 3031 3131 3031 0000010000011101 000000e0: 3031 3130 3130 3031 3131 3131 3130 3131 0110100111111011 000000f0: 3131 3131 3030 3030 3031 3031 3130 3031 1111000001011001 00000100: 3031 3131 3131 3130 3030 3130 3130 3130 0111111000101010 00000110: 3031 3031 3030 3030 3030 3031 3031 3131 0101000000010111 00000120: 3131 3130 3030 3031 3130 3031 111000011001 Tylko u CIebie jest znak '0a31' na którym zapewne wywala się konwerter. Zobacz skąd jest to 0a, wywal i uruchom przez konwerter. Pozdrawiam
Technical Details
Message-ID:
<03af61d9-e808-4daf-82b1-82e45f41372dn@googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mailReferences:
<6a2d60cf-5d52-4f70-a0bb-67ac51f2ea47n@googlegroups.com> <0b0e0278-0506-4691-8051-1f73a327e87an@googlegroups.com> <1aabf0e1-8c01-4479-90fc-62d1026d221cn@googlegroups.com> <fcda7316-c8b0-445b-a5d5-2c8db0e2c939n@googlegroups.com> <59524bbe-00b1-4756-b359-19bb000e8641n@googlegroups.com> <2aec1845-1ec1-4e83-835a-ccc9aa089c23n@googlegroups.com> <f201e244-08b1-4ec6-977a-40aba70eac76n@googlegroups.com> <48a87319-4f87-4ace-b9e1-e8c9842514can@googlegroups.com> <5af4b1e3-4d68-4ea8-a5cf-7d2b1075041cn@googlegroups.com> <680b4111-0c0b-4406-ae78-fc27fa1a545an@googlegroups.com> <efe0a67a-6b05-40d2-b877-e5a51f57dd9fn@googlegroups.com> <cb8e26f0-392e-4848-b573-e232e943b6f5n@googlegroups.com> <08cd0111-4022-41af-a03a-a3a4a6307ef6n@googlegroups.com> <c66ce87b-7302-4c87-813b-187c36feffd1n@googlegroups.com> <4a215489-d501-49d5-ade6-cf771ffee901n@googlegroups.com> <7ccd7613-9d6d-4d46-b68f-1db4e9d7a5e3n@googlegroups.com> <9082e2ac-cd7d-436d-80a8-7d12109d3297n@googlegroups.com> <227b1c0e-5d3c-4323-a374-de316aec2ffcn@googlegroups.com> <11f92832-5699-4cf9-be0d-412f9248f4den@googlegroups.com> <97a8c494-64a8-46c0-a17a-114d86aa94d9n@googlegroups.com> <d5976242-a26f-4b4a-93c0-49f7c056c46dn@googlegroups.com> <bf97ae93-0973-4e7d-a7dc-36e681b2479bn@googlegroups.com> <bdc239bf-9878-4a79-a5c4-e007aee2c279n@googlegroups.com> <f453f15f-4c3f-4eee-9714-850a0fb56161n@googlegroups.com>Show Full Headers
Complete Article Headers
X-Received: by 2002:a05:622a:209:: with SMTP id b9mr24682906qtx.136.1629593011848; Sat, 21 Aug 2021 17:43:31 -0700 (PDT) X-Received: by 2002:a0c:f74d:: with SMTP id e13mr4503786qvo.40.1629593011759; Sat, 21 Aug 2021 17:43:31 -0700 (PDT) Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: pl.comp.programming Date: Sat, 21 Aug 2021 17:43:31 -0700 (PDT) In-Reply-To: <f453f15f-4c3f-4eee-9714-850a0fb56161n@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=37.128.16.171; posting-account=xjvq9QoAAAATMPC2X3btlHd_LkaJo_rj NNTP-Posting-Host: 37.128.16.171 References: <6a2d60cf-5d52-4f70-a0bb-67ac51f2ea47n@googlegroups.com> <0b0e0278-0506-4691-8051-1f73a327e87an@googlegroups.com> <1aabf0e1-8c01-4479-90fc-62d1026d221cn@googlegroups.com> <fcda7316-c8b0-445b-a5d5-2c8db0e2c939n@googlegroups.com> <59524bbe-00b1-4756-b359-19bb000e8641n@googlegroups.com> <2aec1845-1ec1-4e83-835a-ccc9aa089c23n@googlegroups.com> <f201e244-08b1-4ec6-977a-40aba70eac76n@googlegroups.com> <48a87319-4f87-4ace-b9e1-e8c9842514can@googlegroups.com> <5af4b1e3-4d68-4ea8-a5cf-7d2b1075041cn@googlegroups.com> <680b4111-0c0b-4406-ae78-fc27fa1a545an@googlegroups.com> <efe0a67a-6b05-40d2-b877-e5a51f57dd9fn@googlegroups.com> <cb8e26f0-392e-4848-b573-e232e943b6f5n@googlegroups.com> <08cd0111-4022-41af-a03a-a3a4a6307ef6n@googlegroups.com> <c66ce87b-7302-4c87-813b-187c36feffd1n@googlegroups.com> <4a215489-d501-49d5-ade6-cf771ffee901n@googlegroups.com> <7ccd7613-9d6d-4d46-b68f-1db4e9d7a5e3n@googlegroups.com> <9082e2ac-cd7d-436d-80a8-7d12109d3297n@googlegroups.com> <227b1c0e-5d3c-4323-a374-de316aec2ffcn@googlegroups.com> <11f92832-5699-4cf9-be0d-412f9248f4den@googlegroups.com> <97a8c494-64a8-46c0-a17a-114d86aa94d9n@googlegroups.com> <d5976242-a26f-4b4a-93c0-49f7c056c46dn@googlegroups.com> <bf97ae93-0973-4e7d-a7dc-36e681b2479bn@googlegroups.com> <bdc239bf-9878-4a79-a5c4-e007aee2c279n@googlegroups.com> <f453f15f-4c3f-4eee-9714-850a0fb56161n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <03af61d9-e808-4daf-82b1-82e45f41372dn@googlegroups.com> Subject: Re: Jak zrobić test za pomocą PractRand? From: "M.M." <mmarszik@gmail.com> Injection-Date: Sun, 22 Aug 2021 00:43:31 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit