Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: I need a real big data stack Date: Thu, 21 Jan 2016 10:41:56 -0800 Organization: A noiseless patient Spider Lines: 8 Message-ID: <87egdapyff.fsf@nightsong.com> References: <20160120201512.65033651@t500> <87mvrzpv24.fsf@nightsong.com> <56a0b6d4$0$23801$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="560a36ee31cc4bcf69e115b311f0cc5c"; logging-data="11144"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/o3KqLGMxXT7mIPTkxoFxV" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:M+CGHrHJP4ug/ELVjMggtvKQdtk= sha1:pOe+C2aoE6IXIy1TxxQI10qc+xM= Xref: csiph.com comp.lang.forth:44996 Albert van der Horst writes: > E.g. one of the rosetta codes ask for the first N k-almost primes. > One could combine a set of N k-1-almost with a set of N 1-almost > given N^2 elements on the stack. Sort them and keep the N smallest > in the permanent store for k-almost primes. How do you sort N^2 elements on the stack, without randomly accessing its interior so you're not really using it as a stack?