From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: Why have both `random' and `cl-random'? Date: Sat, 10 Feb 2024 03:10:17 -0500 Message-ID: References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35703"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 10 09:11:05 2024 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 1rYiS1-00098o-5o for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Feb 2024 09:11:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYiRK-0006qP-El; Sat, 10 Feb 2024 03:10:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYiRI-0006oL-Jr for emacs-devel@gnu.org; Sat, 10 Feb 2024 03:10:20 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYiRI-0004E5-8O for emacs-devel@gnu.org; Sat, 10 Feb 2024 03:10:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=ehIEr+9pAE9/WIbRgSYaoCpHTajT+6dnzqUAs/6Dd4M=; b=EI5RK00VpIe8 EFrX7Euh4z6yWB3IVL4ulIyF6aGTJo4KWJyjlmKlM2X7a+Od7BbLUWDvHIbsxYtYVOLVgARywRLSq N3gEzqr23RfWHxhfBKphIDz1Yw0cPvYSF2JhrtVyXFgF0EGhvAJhCEMpM4JnDEK4BCxIjejxMXe2g Se47VK8l3VfBEakfzzd0SOBHUwXOGkj0mqBl1YGMkD0b06919wlXrWAFBMIFB/96LxXBQfpgMoToX b6WIoDO1W7ryl5np7jwWumwlZhQJHXYTwn+S90QCZOXmpBfldeDPp4Z4P/o8NltMcZZyGmY8u63yF r0RpzFKGm7AHBkSdgXJESw==; Original-Received: from ams by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rYiRF-0005MS-Aa; Sat, 10 Feb 2024 03:10:17 -0500 In-Reply-To: (message from Richard Stallman on Thu, 08 Feb 2024 22:49:26 -0500) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316087 Archived-At: As far as I can tell from the doc strings, the user level funcionality of the two is the same. If there is a difference, I can't tell it from those doc strings. But they compute values in different ways If there is no significant user-visible difference, could the two be merged? cl-random allows you to specify the seed, while random does not -- both allow means to limit the value. Maybe random could be expanded to also have the seed? (random &optional LIMIT SEED) then cl-random would become a call to (random LIMIT STATE) ... If there is a significant raal user-visible difference, would people please describe it in the doc strings, so a user can decide which one to use? The major difference is that one can use cl-random for reproducable random numbers, while random cannot.