[HN Gopher] The Bel Language (2019)
___________________________________________________________________
The Bel Language (2019)
Author : montyanderson
Score : 39 points
Date : 2024-05-19 14:14 UTC (8 hours ago)
(HTM) web link (sep.turbifycdn.com)
(TXT) w3m dump (sep.turbifycdn.com)
| ModernMech wrote:
| Bel, not Bell.
| 1f60c wrote:
| If you're wondering what's up with the strange URL, apparently it
| _is_ official. paulgraham.com links to it here:
| https://www.paulgraham.com/bel.html
| akkartik wrote:
| This is important enough that I think
| https://www.paulgraham.com/bel.html (1) should be the main link
| we're discussing. For one,
| https://sep.turbifycdn.com/ty/cdn/paulgraham/bellanguage.txt
| (2) refers extensively to the Bel sources which are at
| https://sep.turbifycdn.com/ty/cdn/paulgraham/bel.bel?t=16882...
| (3). But you won't get 3 from 2.
| cpach wrote:
| I think the original URL was
| https://sep.yimg.com/ty/cdn/paulgraham/bellanguage.txt [0]
|
| However, Yahoo Stores (which is the, er... CMS that 'pg uses)
| was aquired in 2022[1], and it seems that the new owner
| migrated some assets to a new domain.
|
| [0] See
| https://web.archive.org/web/20191012073002/https://www.paulg...
|
| [1] https://help.turbify.com/s/article/faq-merchant-solutions-
| up...
| tmtvl wrote:
| Bel is an interesting language. I really like the first-class
| macros, but wrb and rdb are kinda silly. As abstractions that get
| optimised into something more sensible I suppose they're fine,
| but yeah, modern filesystems don't really do single-bit reads and
| writes.
| sctb wrote:
| I wouldn't diss those functions on the basis of modern
| filesystems. I would diss them because you could write a
| shorter bel.bel with rdc/wrc instead and, IMHO, without making
| the language less self-specified (since 'chars contains opaque
| character values from the host system).
| lisper wrote:
| Well, it's a noble goal, but fails rather spectacularly right off
| the bat.
|
| > Bel has four fundamental data types: symbols, pairs,
| characters, and streams.
|
| The inclusion of streams is already enough to make me go WTF, and
| the absence of numbers, vectors, and functions as primitives is a
| big yellow flag. Punning lists as functions is huge blunder
| because it makes it nearly impossible to compile the language.
| smj-edison wrote:
| > I want to be clear about what Bel is and isn't. Although it
| has a lot more features than McCarthy's 1960 Lisp, it's still
| only the product of the formal phase. This is not a language
| you can use to program computers, just as the Lisp in the 1960
| paper wasn't. Mainly because, like McCarthy's Lisp, it is not
| at all concerned with efficiency. When I define append in Bel,
| I'm saying what append means, not trying to provide an
| efficient implementation of it.
|
| That doesn't seem to be their goal.
| lisper wrote:
| OK, that's a fair point. But punning lists as functions is a
| still mistake for other reasons. For example, it makes it
| impossible to tell the difference between a list that is
| actually intended to be a function, and one that just happens
| to end up looking like a function by happenstance. It's fine
| to _represent_ functions as lists, but having functions
| actually _be_ lists rather than a first-class primitive is a
| huge mistake. If you 're going to do that, you might as well
| just start with McCarthy's original primitives, or heck, even
| just the untyped lambda calculus. What is the point of adding
| characters and streams?
| sctb wrote:
| Perhaps to make it a real programming language that you
| could use to do stuff?
| lisper wrote:
| What part of "This is not a language you can use to
| program computers" wasn't clear?
| sctb wrote:
| The "language" part. In context it seems to refer to the
| implementation, not the specification. I take it that pg
| does intend to specify a useful programming language, but
| not implement it.
| akkartik wrote:
| I think one reason to add characters and streams is so you
| can implement read and print, the R and the P in a Lisp
| REPL. The original Lisp assumes s-expressions are given,
| but provides no mechanism for creating them out of
| characters read from keyboard or printed to screen. Bel is
| taking the same axiomatic approach of the original Lisp but
| to a more realistic system.
|
| Similarly, ccc exists so onerr can exist, which exists so
| saferead can exist, which exists so the REPL can show
| errors on screen.
|
| That hangs together for me. But I still don't understand
| the distinction you're making between representing as lists
| vs being lists.
| lisper wrote:
| > so the REPL can show errors on screen
|
| And how do you formalize the screen? (BTW, this is just
| speculation on your part. The word "screen" doesn't
| actually appear anywhere in the article.)
|
| You can't have it both ways. Either you are going to
| formalize everything, or you're going to punt at some
| point and yield to practical considerations. And
| formalizing I/O is particularly hard.
|
| > I still don't understand the distinction you're making
| between representing as lists vs being lists.
|
| (lambda () t) is a list. In McCarthy's original lisp, as
| in Bel, this list IS a function. This would work:
| (setq l '(lambda () t)) (l) --> T
|
| But in modern Lisps you have to EVALUATE this list in
| order to get a function that you can call. In Scheme:
| ts> (define l '(lambda () #t))
| l ts> l (lambda () #t) ts> (l)
| Error: illegal function ts> (define p (eval l))
| p ts> p #<CLOSURE> ts> (p)
| #t ts> (procedure? l) #f ts>
| (procedure? p) #t ts> (list? l)
| #t ts> (list? p) #f
| smj-edison wrote:
| To be honest, as I've read more of the Bel document, I have
| to say streams and characters feel rather "bolted on",
| especially since streams only work with binary. It feels
| like it's trying to straddle both the practical and
| theoretical, and ends up being a bit of a mess. I
| appreciate people exploring new concepts, but honestly this
| doesn't feel that novel.
| kazinator wrote:
| It's Bel not Bell; fix headline.
| tlb wrote:
| Fixed, thanks.
| dang wrote:
| Related:
|
| _Show HN: Bel_ - https://news.ycombinator.com/item?id=21231208 -
| Oct 2019 (456 comments)
|
| maybe also:
|
| _Show HN: Bel in Clojure_ -
| https://news.ycombinator.com/item?id=29812347 - Jan 2022 (13
| comments)
| davnicwil wrote:
| For those unware, worth noting here that Bel was designed by Paul
| Graham.
| mepian wrote:
| Was it ever explained why pg abandoned Arc so quickly?
| lisper wrote:
| Some useful context that is not apparent from the linked page:
|
| https://www.paulgraham.com/bel.html
___________________________________________________________________
(page generated 2024-05-19 23:00 UTC)