From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg via "Emacs development discussions." Newsgroups: gmane.emacs.devel,gmane.emacs.help Subject: urandom number in Emacs Date: Sat, 06 Nov 2021 17:35:25 +0100 Message-ID: <87lf21nsxe.fsf@zoho.eu> Reply-To: Emanuel Berg Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36860"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: emacs-devel@gnu.org Cancel-Lock: sha1:Wwx3WL60/wU7opirrLIN6ZVuHUE= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 06 17:36:12 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjOfr-0009QJ-W5 for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Nov 2021 17:36:11 +0100 Original-Received: from localhost ([::1]:54998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjOfp-0007h6-T9 for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Nov 2021 12:36:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjOfL-0006w0-My for emacs-devel@gnu.org; Sat, 06 Nov 2021 12:35:39 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:48790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjOfJ-0001Yn-Nd for emacs-devel@gnu.org; Sat, 06 Nov 2021 12:35:39 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mjOfG-0008YT-Ff for emacs-devel@gnu.org; Sat, 06 Nov 2021 17:35:34 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Followup-To: gmane.emacs.devel,gmane.emacs.help Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278877 gmane.emacs.help:134418 Archived-At: This is a dynamic module with a function that reads from /dev/urandom ... so more random numbers with `random-urandom' than with `random' (since Lisp cannot read from /dev/urandom because it's a non-regular file - IIUC?) - so instead this uses the same C as in pwgen(1) to do it, pretty simple I guess :P So now one can do (random-urandom) ... like any other Lisp function and be on everyone else's level. Only cooler B) See a very long discussion on gmane.emacs.help ... Anyway, one C file, one C header file, and one Makefile here: https://dataswamp.org/~incal/emacs-init/random-urandom/ Just do 'make run'. Keep it real time ... -- underground experts united https://dataswamp.org/~incal