Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #20: divide-by-zero error


comp / comp.lang.scheme / Re: in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))

SubjectAuthor
* Re: in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))HenHanna
`- Re: in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))B. Pym

1
Subject: Re: From JoyceUlysses.txt -- words occurring exactly once
From: Paul Rubin
Newsgroups: comp.lang.lisp, comp.lang.scheme
Organization: A noiseless patient Spider
Date: Fri, 31 May 2024 07:40 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no.email@nospam.invalid (Paul Rubin)
Newsgroups: comp.lang.lisp,comp.lang.scheme
Subject: Re: From JoyceUlysses.txt -- words occurring exactly once
Date: Fri, 31 May 2024 00:40:59 -0700
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <878qzqtoms.fsf@nightsong.com>
References: <v3ame4$1qf6m$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Fri, 31 May 2024 09:41:06 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c1fe16f3e3b4431758512624042c13d3";
logging-data="2252582"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19c2U4ypaGcpzlZHQsr/E5f"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:TVvd+H2L8ZX73JEfTlvBi3diEvU=
sha1:E0Dg2ajXQ66Fxz55YKNQqmvuWfQ=
View all headers

> could someone give me a pretty fast (and simple) program that'd give
> me a list of all words occurring exactly once?

To first approximation, this works for me (bash command):

tr -c "[a-zA-Z-]" "\n" < ulysses.txt |sort|uniq -c|sort -n

Subject: Gauche Lrange -- to the maximum value that doesn’t exceed end.
From: HenHanna
Newsgroups: comp.lang.lisp, comp.lang.scheme
Organization: A noiseless patient Spider
Date: Tue, 18 Jun 2024 19:53 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.lisp,comp.lang.scheme
Subject: Gauche_Lrange_--_to_the_maximum_value_that_doesn’
t_exceed_end.
Date: Tue, 18 Jun 2024 12:53:19 -0700
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <v4sojg$1gg3l$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 18 Jun 2024 21:53:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1ff5838eddcfee2869179dd23adb7000";
logging-data="1589365"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+l8dvydHvfQXpP89y+zvPq6lMBS5kqn1I="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:gf5Mu3gaZdrvzyGTFNNWk8zts3c=
Content-Language: en-US
View all headers

gosh> (lrange 1 5)

(1 2 3 4)

lrange start :optional end step

Creates a lazy sequence of numbers starting from start,
increasing by step (default 1), to the maximum value that
doesn’t exceed end.

5 doesn't exceed 5, so (according to this spec.) 5 should be printed.

The correct English should be...

to the maximum value that is less than [end].

up to (and not including) the maximum value [end].

1

rocksolid light 0.9.8
clearnet tor