Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Pascal is Pascal is Pascal is dog meat." -- M. Devine and P. Larson, Computer Science 340


devel / comp.lang.lisp / Re: .Re: another simple defmacro question

SubjectAuthor
* .Re: another simple defmacro questionRobert L.
`- Re: .Re: another simple defmacro questionRobert L.

1
.Re: another simple defmacro question

<sva4re$1ev3$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16932&group=comp.lang.lisp#16932

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!4LB8ASW99KTkgLVfDAzYZg.user.46.165.242.75.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.lisp
Subject: .Re: another simple defmacro question
Date: Fri, 25 Feb 2022 08:43:27 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <sva4re$1ev3$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Info: gioia.aioe.org; logging-data="48099"; posting-host="4LB8ASW99KTkgLVfDAzYZg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: XanaNews/1.18.1.6
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robert L. - Fri, 25 Feb 2022 08:43 UTC

> > (let ((stringlist)
> > (tmpstr))
> > (with-open-file (infile fname :direction :input)
> > (loop
> > (setq tmpstr (read-line infile nil nil))
> > (unless tmpstr
> > (return))
> > (push tmpstr stringlist)
> > ))
> > (setq stringlist (nreverse stringlist))
> > stringlist
> > ))
>
> It can be transformed into:
>
> (with-open-file (infile fname :direction :input)
> (loop for tmpstr = (read-line infile nil nil)
> while tmpstr
> collect tmpstr))

Gauche Scheme:

(use gauche.generator)

(with-input-from-file "word.data"
(lambda () (generator->list read-line)))

===>
("one two" "three" "four five")

Re: .Re: another simple defmacro question

<sva527$1hp6$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16933&group=comp.lang.lisp#16933

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!aioe.org!4LB8ASW99KTkgLVfDAzYZg.user.46.165.242.75.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.lisp
Subject: Re: .Re: another simple defmacro question
Date: Fri, 25 Feb 2022 08:47:04 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <sva527$1hp6$1@gioia.aioe.org>
References: <sva4re$1ev3$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Info: gioia.aioe.org; logging-data="50982"; posting-host="4LB8ASW99KTkgLVfDAzYZg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: XanaNews/1.18.1.6
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robert L. - Fri, 25 Feb 2022 08:47 UTC

On 2/25/2022, Robert L. wrote:

> > > (let ((stringlist)
> > > (tmpstr))
> > > (with-open-file (infile fname :direction :input)
> > > (loop
> > > (setq tmpstr (read-line infile nil nil))
> > > (unless tmpstr
> > > (return))
> > > (push tmpstr stringlist)
> > > ))
> > > (setq stringlist (nreverse stringlist))
> > > stringlist
> > > ))
> >
> > It can be transformed into:
> >
> > (with-open-file (infile fname :direction :input)
> > (loop for tmpstr = (read-line infile nil nil)
> > while tmpstr
> > collect tmpstr))
>
> Gauche Scheme:
>
> (use gauche.generator)
>
> (with-input-from-file "word.data"
> (lambda () (generator->list read-line)))
>
> ===>
> ("one two" "three" "four five")

Another way:

(call-with-input-file "word.data"
(cut port->string-list <>))


devel / comp.lang.lisp / Re: .Re: another simple defmacro question

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor