From 5b05f2323c948b294d5ca793870b0d32eb235abc Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 10 Jul 2023 14:12:56 +0100 Subject: (bsearch)+Elisp script to generate random values in bsearch.txt Generates *LIST-SIZE* number of random numbers (within bounds 0, *UPPER-BOUND*) and inserts them one by one into bsearch.txt. Each number is separated by a newline. --- bsearch-gen.el | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bsearch-gen.el diff --git a/bsearch-gen.el b/bsearch-gen.el new file mode 100644 index 0000000..79aac56 --- /dev/null +++ b/bsearch-gen.el @@ -0,0 +1,9 @@ +(defconst *LIST-SIZE* 128) +(defconst *UPPER-BOUND* 1024) +(with-current-buffer (find-file "bsearch.txt") + (mapcar + #'(lambda (res) (insert (format "%s\n" res))) + (cl-loop + for i from 0 to *LIST-SIZE* + collect + (random *UPPER-BOUND*)))) -- cgit v1.2.3-13-gbd6f