From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23732 invoked from network); 18 Feb 2022 08:43:20 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 18 Feb 2022 08:43:20 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id B02759C78F; Fri, 18 Feb 2022 18:43:16 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id C09CA9BA3E; Fri, 18 Feb 2022 18:40:39 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (1024-bit key; secure) header.d=drijf.net header.i=@drijf.net header.b="lG35JUgL"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 138139BA3E; Fri, 18 Feb 2022 18:40:35 +1000 (AEST) X-Greylist: delayed 399 seconds by postgrey-1.36 at minnie.tuhs.org; Fri, 18 Feb 2022 18:40:33 AEST Received: from clue.drijf.net (clue.drijf.net [94.142.244.34]) by minnie.tuhs.org (Postfix) with ESMTPS id 32B879BA32 for ; Fri, 18 Feb 2022 18:40:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=drijf.net; s=default; t=1645173230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wRI1ppzRMI+N8skZo+FLNUCj5p1gCb8JJKRWcjs1xlw=; b=lG35JUgL5tG6hZsK6YwSjMAAxv45DtNwbP8L5At5rzDhpI9iQCMu9MFc7gf0seYEH4w6Pg DM+yG9B4UYKnKpTA+mnJq9ExqZmzXb23VxiJurg1i5WqFqh9mJPCXeHdG6iHO2I7Jf+iIb TLHTO87sG5HOgEAyd+eqkJzZXvCwHM8= Received: from clue.drijf.net (clue.drijf.net [94.142.244.34]) by mx1.drijf.net (OpenSMTPD) with ESMTPSA id a486b921 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 18 Feb 2022 09:33:50 +0100 (CET) Date: Fri, 18 Feb 2022 09:33:49 +0100 From: Otto Moerbeek To: Bakul Shah Message-ID: References: <202202160754.21G7sbUa011318@freefriends.org> <1nKFRN-4IZ-00@marmaro.de> <8735kig8vb.fsf@vuxu.org> <4E3028A1-EC08-424A-B814-CC2AEEEAEC7B@iitbombay.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E3028A1-EC08-424A-B814-CC2AEEEAEC7B@iitbombay.org> Subject: Re: [TUHS] Lorinda Cherry X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: The Eunuchs Hysterical Society Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Thu, Feb 17, 2022 at 01:44:07PM -0800, Bakul Shah wrote: > On Feb 17, 2022, at 1:18 PM, Dave Horsfall wrote: > > > > On Thu, 17 Feb 2022, Tom Ivar Helbekkmo via TUHS wrote: > > > >> Watching the prime number generator (from the Wikipedia page on dc) > >> running on the 11/23 is much more entertaining than doing it on the > >> modern workstation I'm typing this on: > >> > >> 2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x > > > > Wow... About 10s on my old MacBook Pro, and I gave up on my ancient > > FreeBSD box. > > That may be because FreeBSD continues computing primes while the MacOS > dc gives up after a while! > > freebsd (ryzen 2700 3.2Ghz): # note: I interrupted dc after a while > $ command time dc <<< '2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x' > xxx > ^C 11.93 real 11.79 user 0.13 sys > $ wc xxx > 47161 47161 319109 xxx > $ size `which dc` > text data bss dec hex filename > 238159 2784 11072 252015 0x3d86f /usr/bin/dc > > MacOS (m1 pro, prob. 2Ghz) > $ command time dc <<< '2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x' > xxx > time: command terminated abnormally > 1.00 real 0.98 user 0.01 sys > [2] 37135 segmentation fault command time dc <<< > xxx > $ wc xxx > 7342 7342 42626 xxx > $ size `which dc` > __TEXT __DATA __OBJC others dec hex > 32768 16384 0 4295016448 4295065600 100018000 > MacOS uses the GNU implementation which has a long standing issue with deep recursion. It even cannot handle the tail recursive calls used here and will run out of its stack. -Otto