Arc Forumnew | comments | leaders | submitlogin
Will/Can Arc create a LISP-revival?
8 points by schtog 5855 days ago | 14 comments
i have learned about LISP through a lot of extatic blogposts and most of all, Paul Grahams essays. i like the language so far even if i have some issues with it, well covered here: http://bc.tech.coop/blog/060403.html http://www.pchristensen.com/blog/articles/lisp-the-golden-age-isnt-coming-back-lets-welcome-a-bright-future/ also, while LISP isnt a pure functional language its pretty close no? i think it slimiting but whatever it works for a lot fo people.

anyway, do you think Arc could be a revival for LISP? it seems to solve a lot of the stuff mentioned in the articles.

however how big is the buzz? there a rw quite a few projects going on, at first i got the impression of it being a lot but the forum is quite still at the moment and there is not a whole lot of articles about it.

what do you think?



10 points by KirinDave 5855 days ago | link

The thing is, tech wise Common Lisp is in very good shape. It could very much take C++'s place and everyone would be happier and probably get similar performance with cleaner code.

Likewise, Scsh shows that a lisp-1 could encroach on territory typically occupied by Ruby and Perl.

These aren't Lisp's problems. Lisp's problems are social. It has no anchor point, and most of the modern, successful languages have an anchor point either in a tightly knit community, a corporate backer, or a charismatic personality. pg could assume this roll, but thus far he hasn't opened up the arc development enough to really allow that to happen. Given his duties at Y-combinator, I guess this is understandable, but it's not helping Arc at all.

-----

2 points by skenney26 5854 days ago | link

Arc seems pretty open to me. There's nothing stopping people from creating countless useful libraries. I'm guessing that many people have turned away from Arc after seeing the dirth of libraries. Paradoxically, that's one of the things that attracts me to Arc. There are many opportunities to make an early impact within the Arc community.

-----

2 points by KirinDave 5853 days ago | link

All of the work in anarki could be invalidated by the next pg arc release. Since pg is the font of arc, there is nothing anyone could say about it.

The community forks arc, but they aren't included.

-----

5 points by drcode 5855 days ago | link

Well, I don't think anyone can say arc has been getting any "buzz"...

Besides the early flurry of articles at its release it hasn't really gotten much notice. But that's OK- the goal of this language is to create something with a long time horizon in mind. Nobody, not even pg, would argue that arc, in its current form, is much of a technological breakthrough yet. Its contributions are more conceptual at this point. I think, though, for a certain style of programmer (such as myself and the few others frequenting this forum :-) it has a lot to offer, even in its current, incomplete, form.

If arc causes a Lisp revival, it would probably take a long time (a decade?) for that to happen. The chance that any new programming language will survive that long is small, so I think you'd have to be pretty sober about the odds involved. However, I have no doubt that arc will presage features in successful future languages, even if it, in itself, may have only a small chance of success.

-----

5 points by sacado 5855 days ago | link

Lisp is a strange world. It is very powerful and you can easily tailor the language the way you want. That, plus the fact there are many dialects, and that even within major dialects, you have many slightly different implementations, makes it harder to build a community.

Arc has a few advantages : it's got a canonical implementation (the fact that code is specification makes it easier), a charistmatic benevolent dictator and it is directed toward a popular and modern concern : web apps.

It could make Lisp popular, but it needs some kind of killer app. The news app is cool, but it won't be enough. Anybody's got an idea ?

As for being purely functional or not, well I really like the compromise Lisp (and particularily Arc) is. You can make your programs purely functionals, and it is generally easier, but you can also switch to an imperative paradigm whenever it makes sense.

-----

6 points by almkglor 5855 days ago | link

> it's got a canonical implementation

...until you realize that nearly every non-pg, non-rtm Arc user prefers to use the non-canonical Anarki, and recommends it because of the sheer number of bug fixes (never mind the new features, such as 'defcall, 'defm, 'p-m:, 'sync, 'thread-local, 'file-table ... etc.)

> It could make Lisp popular, but it needs some kind of killer app. The news app is cool, but it won't be enough. Anybody's got an idea ?

http://arclanguage.com/item?id=5697

-----

2 points by sacado 5854 days ago | link

Yes, but Anarki's primary goal is still to keep fully compliant with canonical Arc (except for bugs, of course). Now, sure, there are the additions...

-----

4 points by almkglor 5854 days ago | link

There's also the other problem with canonical Arc: pg has expressly stated that he will not retain backward compatibility between versions.

This also means that if Anarki tries to keep full compliance with ArcN in the future, without pg updating ArcN reasonably frequently, eventually (in a year? half a year?) Anarki will either: 1) die out as a source of innovation, because people will simply rather wait for pg's next update rather than push a change that might be overridden by pg in the future, or 2) drift so far away from pg's internal ArcN that when pg releases it, the merge hell will be very, very hot.

Take an example this: http://arclanguage.com/item?id=6138

  arc> (ssexpand 'foo?x)
  (is foo x)
Certainly I could implement that, and I think it's a good idea. The problem is pg's plans: does he intend a different meaning for #\? ? I don't dare to push this on Anarki, because if I do, I don't dare use it anyway, because pg might change its meaning in the future.

Edit: Ah, crick. I wish I can just say "Anarki promises to always keep compatibility with existing Anarki code. If pg breaks existing Anarki code in the next ArcN, we either (1) ignore the new feature, especially if we as a community feel that the existing Anarki feature is better, (2) rename pg's feature if possible, or (3) write a converter for old ArcN-1 based Anarki to ArcN based Anarki. Feel free to program in Anarki, where the magic carpet is assured of not being pulled out under you while you're exploring."

-----

4 points by applepie 5855 days ago | link

> the fact that code is specification makes it easier

The fact that broken pg's code is specification is a pain in the back and doesn't make anything easier.

Read RnRS for a _real_ specification of Lisp.

-----

3 points by sacado 5854 days ago | link

I was not talking in practice, in was meaning "in theory". In theory, the fact that most of the language is specified via code helps avoiding incompatible implementations. In practice, that's another problem, but it's only the beginning...

-----

2 points by almkglor 5854 days ago | link

Where pg fails.... --warning-blatant-self-promotion-- Anarki! Whee!

Hmm. Probably need a "Report on Anarki" as a spec of the standard Anarki, particularly 'call* and 'defcall, which may very well be the most important extension in Anarki.

-----

2 points by lojic 5855 days ago | link

I think it's way too early to comment on whether Arc will create a Lisp revival. I believe that the official development team currently consists of a couple of guys, and I expect at least one of them has a very busy schedule, so Arc is a part time gig.

Arc went through a "quiet period" from 2003 to 2008, and it's currently in a mini quiet period.

-----

1 point by schtog 5855 days ago | link

is the good stuff about lisp to tied in with the syntax and notation?

i mean changing the notation to normal 2+2 instead of + 2 2 and getting rid of the parenthesises, is that really really hard to do and still keep all the features of the language? i guess it is since it hasnt been done.

macros in the lispway seems to be the biggest thing about the language. macros are dependent on code being lists and lists being code right? they are hard to do without parenthesises and notation?

-----

25 points by almkglor 5855 days ago | link

Let me tell you a story about a language called "Stutter". It's a full m-expr language. Function calls have the syntax f[x], math quite sensibly uses a + b * c notation, etc. The only weird thing is that assigning a variable uses the set special form - set[x 42] - because of some weird stuff in the parser that is only tangentially related to our discussion.

Now I'll introduce to you a special syntax in Stutter. In Stutter, () introduces a data constant called an array, which is just like any other sequential data collection in any other language. So it's possible to do something like this in Stutter:

  set[var  (1 2 3 4)]
Stutter is a dynamically-typed language, and arrays can contain strings, numbers, or even arrays:

  set[var (1 "hello" ("sub-array" 4 ))]
Let me introduce to you something new about Stutter. In Stutter, variable names are themselves data types. Let's call them labels (this is slightly related to why we have a set[] special form). And like any other data type, they can be kept in arrays:

  set[var (hello world)]
Remember that () introduces an array constant. So (hello world) will be an array of two labels, hello and world. It won't suddenly become (42 54) or anything else even if hello is 42 and world is 54. The variable's name is a label, but the label is not the variable (at least not in the array syntax; it was a bit of a bug in the original implementation, but some guys went and made code that used labels in that manner and it got stuck in the language spec).

The array is just like any other array in any other language. You can concatenate them like so:

  set[var append[(array 1) (array 2)]]
  => now var is (array 1 array 2)
You can add an element in front of it like so:

  set[var cons[1 (some array)] ]
  => now var is (1 some array)
Array access syntax is not very nice, but it does exist:

  nth[1 (this is the array)]
  => this returns the label "is"
You could create an empty array with:

  nil[]
And you could create an array with a single element with:

  array["hello"]
  => returns the array ("hello")

Oh, and remember those guys who abused the labels in array syntax I told you about? Well, they created a sort-of Stutter interpreter, in Stutter. However, they sucked at parsing, so instead of accepting files or strings or stuff like that, their Stutter interpreter accepted arrays. They were going to make the parser later, but they just really sucked at parsing.

They called their Stutter interpreter "lave", because they were hippie wannabes and were tripping at the time they were choosing the name. It was supposed to be "love", but like I said, they were tripping.

Of course, since lave accepted arrays, it couldn't get at the nice f[x] syntax. So they decided that the first element of an array would be the function name as a label. f[x] would become the array (f x).

lave had some limitations. For example, instead of Stutter's nice infix syntax a + b, lave needed (plus a b). Fortunately lave included a plus[x y] function which was simply:

  define plus[x y]
   x + y
So how come these guys became so influential? You see, Stutter's BDFL is a bit of a lazy guy. He is so lazy that he didn't even bother to fix up the syntax for if-then-else. In fact, there was no if-then-else. What was in fact present was a ridiculously ugly cond syntax:

  cond[
    { x == y
         ...your then code...
    }
    ;yes, what can I say, Stutter's BDFL is lazy
    { !(x == y)
         ...your else code...
    }
  ]
lave's creators pointed out that you could in fact represent the above code, in lave-interpretable arrays, as:

  (cond
    ( (eq x y)
      ...your then code...)
    ( (not (eq x y))
      ...your else code...))
Then they created a new Stutter function which would accept 3 arrays, like so:

  if[
    (eq x y)
    (...your then code...)
    (...your else code...)]
And then it would return the cond array above.

It looked like this:

  define if[c then else]
    append[
        (cond)
        cons[c
          array[then]]
        cons[ append[(not) array[c] ]
          array[else]]]
You could then use an if-then-else syntax like this:

  lave[
    if[ (eq x y)
         (...your then code...)
         (...your else code...)
     ]
  ]
Then they thought, hmm, maybe we can integrate this into our lave function. So they wisely decided to create a new feature in lave, called "orcam". I think it was supposed to be "okra", but unfortunately I asked them about it while they were tripping, so maybe I just got confused.

Basically, you could tell lave that certain Stutter functions would be treated specially in their lave-syntax. These functions would have the "orcam" property set in some private data of lave. Instead of just running the function, lave would extract the array components, pass them to the function, and then run whatever array that function returned. So you could simply say:

  lave_set_orcam_property[(if)]
  lave[
   (if (eq x y)
      (...your then code...)
      (...your else code...)
   )
  ]
Because of this, people started creating all sorts of orcam-property-functions. For example, there was only a while loop in the language (lazy, lazy). Someone created an orcam-property-function called for:

  define for[s c u code]
    append[ (begin) //begin{} is just a compound statement
        cons[ s
            append[(while)
                cons[c
                    cons[ code array[u]]
                ]
            ]
        ]
    ]
So you could do:

  for[(set i 0) (less i 42) (preincrement i)
    (begin (print i))]
And it would look like:

  (begin
    (set i 0)
    (while (less i 42)
       (begin (print i))
       (preincrement i)
    )
  )
So if you wanted something like a C for loop you could do:

  lave_set_orcam_property[(for)]
  lave[
    (for (set i 0) (less i 42) (preincrement i)
        (begin
             (print i)
        )
    )
  ]
It was particularly difficult to create nice orcam-property-functions, but it was easier than trying to get Stutter's BDFL to move.

Soon after lave's creators added orcam-property-functions, Stutter's BDFL decided to do something about the language. He was always bothered about the bug in Stutter array syntax where something like (hello world) would return, well, the array (hello world), instead of sensibly returning an array with the values of hello and world. So he introduced the `, syntax. An array constant prefixed with "`" would have a special meaning. It would not be completely a constant. Instead, when it saw a "," Stutter would evaluate the expression following the comma and insert that element into the array being created. So `(,hello ,world) could now become (42 54), if hello was 42 and world was 54.

Some of the top ocam-property-function writers realized that Stutter's new `, syntax would really, really help. For example, instead of the kludgy, virtually unreadable if code, you could just write:

  define if[c then else]
   `(cond
        (,c ,then)
        ((not ,c) ,else)
    )
And you could also define for as:

  define for[s c u code]
     `(begin
          ,s
         (while ,c
              ,code
              ,u
          )
      )
However, you weren't limited to just the `, syntax. It was usually the best choice, but if there was a lave-expression array you wanted that couldn't exactly be given by "`,", you could still use the good old append[] and cons[] functions. In fact, for really complex lave-expression arrays, a combination of the new `, syntax and the old append[] and cons[] functions would do quite well.

Because of this, creating orcam-property-functions became easier and their power skyrocketed. Other languages which automatically evaluated variable labels in their arrays couldn't imitate it (so what was originally a bug - that (hello world) did not evaluate the variables hello and world - became a feature). Worse, those other languages' arrays sometimes couldn't themselves contain arrays, or even have different types.

Their arrays just weren't powerful enough to hold code, so other languages never managed to create a powerful orcam-property syntax.

Eventually, people were writing Stutter programs like so:

  lave[
   (define (fn x)
      (if (less x 1)
          1
          (times x (fn (minus x 1)))
      )
   )
  ]
And so, Stutter's BDFL decided to be even more lazy and simply wrote Stutter as:

  while[true]{
    print[ lave[ read[] ] ]
  }
so that everyone didn't have to keep writing "lave[]"

-----