Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

All programmers are playwrights and all computers are lousy actors.


devel / comp.lang.lisp / Sigils over namespaces

SubjectAuthor
* Sigils over namespacesElijah Stone
+* Re: Sigils over namespacesKaz Kylheku
|`* Re: Sigils over namespacesElijah Stone
| `- Re: Sigils over namespacesKaz Kylheku
+- Re: Sigils over namespacesZyni Moë
`- Re: Sigils over namespacessteve gonedes

1
Sigils over namespaces

<ab1d9c4-5ba4-cef-fb8d-315b49a6b9bf@elronnd.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: elro...@elronnd.net (Elijah Stone)
Newsgroups: comp.lang.lisp
Subject: Sigils over namespaces
Date: Mon, 26 Apr 2021 22:00:21 -0700
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <ab1d9c4-5ba4-cef-fb8d-315b49a6b9bf@elronnd.net>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="0-1568378833-1619499623=:58622"
Injection-Info: reader02.eternal-september.org; posting-host="460b590f39c5bf782b9620a8006c18eb";
logging-data="25031"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/T0O374SgdfW1JBASBU5Ig"
Cancel-Lock: sha1:aXQrtZPoEYKe/YyLF8bYB+Z7TOU=
 by: Elijah Stone - Tue, 27 Apr 2021 05:00 UTC

Consider sigils (in a proposed lisp-1) as an alternative to namespaces (in
a lisp-2).

They solve the traditional problem:

(let (($cons 5)) (cons $cons $cons)) ; → (5 . 5)

They also obviate funcall:

(defun abs ($x)
((if (< $x 0) &- &+) $x))

As well as making things generally more consistent:

(let ((&foo (lambda ($x) (+ 2 (* 2 $x)))) ; look, ma; no labels!
($foo 5)) ; uniform binding for all sorts
(foo $foo)) ; → 12

(An unsigilled symbol in the head position of a list to be evaluated is
treated as though it had the & sigil; this is just syntactic sugar:

(let ((&foo (lambda () 5))
($foo (lambda () 6)))
(foo) ; → 5
(&foo) ; → 5
($foo)) ; → 6)

(They also enable string interpolation which, though not a must-have, is
still pretty nice.)

Thoughts?

-E

Re: Sigils over namespaces

<20210427085858.565@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: 563-365-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.lisp
Subject: Re: Sigils over namespaces
Date: Tue, 27 Apr 2021 15:59:30 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <20210427085858.565@kylheku.com>
References: <ab1d9c4-5ba4-cef-fb8d-315b49a6b9bf@elronnd.net>
Injection-Date: Tue, 27 Apr 2021 15:59:30 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2a50cb469edb08d831f61743dbb536a5";
logging-data="23909"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/7iDWeUviViU+R8d/fjXqgvZFDdF4Wx8="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:P98lkK9Q/D7lZ26qp5/6f+7Lwhw=
 by: Kaz Kylheku - Tue, 27 Apr 2021 15:59 UTC

On 2021-04-27, Elijah Stone <elronnd@elronnd.net> wrote:
> (let ((&foo (lambda () 5))
> ($foo (lambda () 6)))
> (foo) ; =E2=86=92 5
> (&foo) ; =E2=86=92 5
> ($foo)) ; =E2=86=92 6)
>
> (They also enable string interpolation which, though not a must-have, is
> still pretty nice.)
>
> Thoughts?

Please repost without MIME quoted printable encoding.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal

Re: Sigils over namespaces

<s69h7l$ij4$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: no_em...@invalid.invalid (Zyni Moë)
Newsgroups: comp.lang.lisp
Subject: Re: Sigils over namespaces
Date: Tue, 27 Apr 2021 17:21:57 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <s69h7l$ij4$1@dont-email.me>
References: <ab1d9c4-5ba4-cef-fb8d-315b49a6b9bf@elronnd.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 27 Apr 2021 17:21:57 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4f9f752673a92db885b2f85d3be5f3e5";
logging-data="19044"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KIXZEU4HNTMnp+lB0HIJgI6JFVy1oYpw="
User-Agent: NewsTap/5.5 (iPad)
Cancel-Lock: sha1:lYhflPyE6LMuYVvuZMyJeopiOPU=
sha1:liqtLajOySRc6uxUbY3gMG2I+0M=
 by: Zyni Moë - Tue, 27 Apr 2021 17:21 UTC

Elijah Stone <elronnd@elronnd.net> wrote:

>
> (let ((&foo (lambda ($x) (+ 2 (* 2 $x)))) ; look, ma; no labels!
> ($foo 5)) ; uniform binding for all sorts
> (foo $foo)) ; → 12
>
> (An unsigilled symbol in the head position of a list to be evaluated is
> treated as though it had the & sigil; this is just syntactic sugar:
>

All the disadvantages of a Lisp-1 with all the disadvantages of a Lisp-2 at
the same time! Wonderful. You could add a special @ sigil for arrays
perhaps, to make it even better.

--
the small snake

Re: Sigils over namespaces

<6d7a924a-9f88-4d5b-749a-50fba4a4d7bd@elronnd.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: elro...@elronnd.net (Elijah Stone)
Newsgroups: comp.lang.lisp
Subject: Re: Sigils over namespaces
Date: Tue, 27 Apr 2021 13:50:11 -0700
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <6d7a924a-9f88-4d5b-749a-50fba4a4d7bd@elronnd.net>
References: <ab1d9c4-5ba4-cef-fb8d-315b49a6b9bf@elronnd.net> <20210427085858.565@kylheku.com>
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=US-ASCII
Injection-Info: reader02.eternal-september.org; posting-host="460b590f39c5bf782b9620a8006c18eb";
logging-data="28912"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+HnvGtlxDvIJcbQYcEBQh"
Cancel-Lock: sha1:aiS3SUg4rYvABZJflKm4yXhUuHM=
In-Reply-To: <20210427085858.565@kylheku.com>
 by: Elijah Stone - Tue, 27 Apr 2021 20:50 UTC

On Tue, 27 Apr 2021, Kaz Kylheku wrote:

> Please repost without MIME quoted printable encoding.

Here:

Consider sigils (in a proposed lisp-1) as an alternative to namespaces (in a lisp-2).

They solve the traditional problem:

(let (($cons 5)) (cons $cons $cons)) ; -> (5 . 5)

They also obviate funcall:

(defun abs ($x)
((if (< $x 0) &- &+) $x))

As well as making things generally more consistent:

(let ((&foo (lambda ($x) (+ 2 (* 2 $x)))) ; look, ma; no labels!
($foo 5)) ; uniform binding for all sorts
(foo $foo)) ; -> 12

(An unsigilled symbol in the head position of a list to be evaluated is
treated as though it had the & sigil; this is just syntactic sugar:

(let ((&foo (lambda () 5))
($foo (lambda () 6)))
(foo) ; -> 5
(&foo) ; -> 5
($foo)) ; -> 6)

(They also enable string interpolation which, though not a must-have, is
still pretty nice.)

Thoughts?

-E

Re: Sigils over namespaces

<20210427162639.327@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: 563-365-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.lisp
Subject: Re: Sigils over namespaces
Date: Tue, 27 Apr 2021 23:36:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <20210427162639.327@kylheku.com>
References: <ab1d9c4-5ba4-cef-fb8d-315b49a6b9bf@elronnd.net>
<20210427085858.565@kylheku.com>
<6d7a924a-9f88-4d5b-749a-50fba4a4d7bd@elronnd.net>
Injection-Date: Tue, 27 Apr 2021 23:36:02 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="dea939605f9930c023d507303b3c0754";
logging-data="12903"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dCua2pkK1mgB4LYQiN2f3aYzzP1P1QSo="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:3JPg7vVSUXynsClbKLHPzRL6bgc=
 by: Kaz Kylheku - Tue, 27 Apr 2021 23:36 UTC

On 2021-04-27, Elijah Stone <elronnd@elronnd.net> wrote:
> On Tue, 27 Apr 2021, Kaz Kylheku wrote:
>
>> Please repost without MIME quoted printable encoding.
>
> Here:
>
> Consider sigils (in a proposed lisp-1) as an alternative to namespaces (in a lisp-2).
>
> They solve the traditional problem:
>
> (let (($cons 5)) (cons $cons $cons)) ; -> (5 . 5)
>
> They also obviate funcall:
>
> (defun abs ($x)
> ((if (< $x 0) &- &+) $x))

The question is, what are exactly & and $? It matters. Not always, but
sometimes.

Though subjectively, I wouldn't "go" for any version of this,
any halfway sane implementation should have it so that $abc and &abc
are both notations based on the same symbol abc. So that is to say,
they are a shorthand notation like:

$abc -> (var abc)
&abc -> (fun abc)

> As well as making things generally more consistent:
>
> (let ((&foo (lambda ($x) (+ 2 (* 2 $x)))) ; look, ma; no labels!
> ($foo 5)) ; uniform binding for all sorts
> (foo $foo)) ; -> 12
>
> (An unsigilled symbol in the head position of a list to be evaluated is
> treated as though it had the & sigil; this is just syntactic sugar:

But surely that's not what's happening with (let ...). The real rule has
to be that an unsigiled symbol in the head position is resolved in the
function space, where macros and special operators lie (other than
symbol macros).

Also, if foo is a macro, you probably don't want &foo to see it:

(let ((&foo (lambda ())))
(macrolet ((foo () ...))
&foo)) ;; expansion leaves this alone, so it refers to the lambda

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal

Re: Sigils over namespaces

<87sg3btdou.fsf@gmail.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!feeder1.feed.usenet.farm!feed.usenet.farm!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 27 Apr 2021 20:12:19 -0500
From: sgonedes...@gmail.com (steve gonedes)
Newsgroups: comp.lang.lisp
Subject: Re: Sigils over namespaces
References: <ab1d9c4-5ba4-cef-fb8d-315b49a6b9bf@elronnd.net>
Date: Tue, 27 Apr 2021 21:12:17 -0400
Message-ID: <87sg3btdou.fsf@gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:Bd1U1ZH71qu4O5KHDfaYc1wCvAQ=
MIME-Version: 1.0
Content-Type: text/plain
Lines: 26
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-MaCM8q3sq2fvaEc2j6MMAM/1iXADVTluMx8l3fGQpVhdk6J5izSupe+aeDSChLnVwX9APVYoF95JMQ+!GCQNMRotkm3Zg6ylxUJQXV8yh1uHMGmIJHSqG1dGVvSKi7um
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1600
 by: steve gonedes - Wed, 28 Apr 2021 01:12 UTC

Elijah Stone <elronnd@elronnd.net> writes:

> They also obviate funcall:
>
> (defun abs ($x)
> ((if (< $x 0) &- &+) $x))

What is it with funcall? You have to call a function eventually. instead
of using call or syscall; in common lisp they use funcall.

I mean reducing function calls is usually good.

> (They also enable string interpolation which, though not a must-have, is
> still pretty nice.)
>

> Thoughts?

I would love to have something like perl's format feature for lisp. Something
simple. Ahh, they'll probably use pcre or something...

> -E

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor