Another newLISP-like language :)

Started by cormullion, January 29, 2008, 11:24:07 PM

Previous topic - Next topic

cormullion

Something called Arc. http://arclanguage.org/">//http://arclanguage.org/

HPW

#1
It is discussed for a long time here:



http://www.paulgraham.com/">http://www.paulgraham.com/



So everyone can try if the huge expectations into the latest kid of Paul Graham get into real.



http://www.paulgraham.com/arc0.html">http://www.paulgraham.com/arc0.html



http://ycombinator.com/arc/tut.txt">http://ycombinator.com/arc/tut.txt
Hans-Peter

newdep

#2
I can remember a seminar or paper where Paul mentioned Arc as a language

he carried a long time with him but never got to the point creating it.

...Now when i look at the link I see another Lisp-Cream... And thats quiet

logical because you cant twist a lambda much ;-)
-- (define? (Cornflakes))

HPW

#3
A side note: MzScheme is under LGPL.

So ARC should it be also?
Hans-Peter

newdep

#4
I understand that they use MzScheme because of the initial stage of Arc.

But i like that they created it in Scheme ;-)
-- (define? (Cornflakes))

Fanda

#5
My expectations were quite high, but there are some good things to look at ;-)



I believe that for example Clojure innovates more:

http://clojure.sourceforge.net/">http://clojure.sourceforge.net/



Fanda

ghfischer

#6
I read through the arc tutorial and am thoroughly unimpressed.



Most of the stuff I like newLISP already has, and there's no mention of any integrated web stuff (like net-* or *-url).



The one interesting feature I thought might be useful to put in newLISP is some version of Arc's uniq macro functionality.  Quoting in full


QuoteThe way to fix repeat is to use a symbol that couldn't occur in

source code instead of x.  In Arc you can get one by calling the

function uniq.  So the correct definition of repeat (and in fact

the one in the Arc source) is



(mac repeat (n . body)

  `(for ,(uniq) 1 ,n ,@body))



If you need one or more uniqs for use in a macro, you can use w/uniq,

which takes either a variable or list of variables you want bound to

uniqs.  Here's the definition of a variant of do called do1 that's

like do but returns the value of its first argument instead of the

last (useful if you want to print a message after something happens,

but return the something, not the message):



(mac do1 args

  (w/uniq g

    `(let ,g ,(car args)

       ,@(cdr args)

       ,g)))


I've always been ok with using leading underscores, but I could see the use in being able to use syntactic sugar like the following ...


(define-macro (foobar (m-uniq x y)) (set x (eval y)))

My $0.02

xytroxon

#7
I back tracked this from a posting on reddit you might find interesting...



Arc's not even an acceptable modern Lisp (xent.com)

http://reddit.com/r/programming/info/677u6/comments/">//http://reddit.com/r/programming/info/677u6/comments/



[FoRK] Arc's out, Nu vs. newLISP, and a retort to Paul Graham's elitism

http://www.xent.com/pipermail/fork/Week-of-Mon-20080128/048238.html">//http://www.xent.com/pipermail/fork/Week-of-Mon-20080128/048238.html


Quote...I'm coming to the conclusion that I reallyDontLike:  ObjCStyleCode:  

dueToTheRidiculouslyLongSelectors.  Really, I find it hard to read.  

OTOH, here is (mostly) the same thing in newLISP (sans shebang script  

scaffolding, urlencoding and arg processing...)



(define (shrink-url url)

   (get-url (append "http://tinyurl.com/api-create.php?url=">http://tinyurl.com/api-create.php?url=" url)))



newLISP is really a weird beast.  It is defiantly NOT lexically  

scoped, rather has a weird fluid or dynamic scoping mechanism built  

on the idea of first-class environments called "contexts."  Contexts  

form the basis of a kind of pseudo-module system, pseudo-object  

system, etc.  But it's funky, feels sort of retro.  OTOH, it's really  

seriously batteries-included, though;  has built-in remote execution,  

a web server with RESTful app framework --- that's built into the  

interpreter, command-line option, NOT a library.   It's even got  

funky stuff like bayesian classifier functions and finance functions  

like npv all built in --- not broken out into libraries or a standard  

lib or anything, just built-in functions.  And from the docs it's not  

clear that the author understands the difference between threads  

(which it doesn't support) and processes (which it does via fork and  

exec wrappers.)  Nonetheless it's one of the most immediately-useful  

out-of-the-box programming environment I've seen in a while for a  

wide variety of programming tasks.



And it's got the Best. Logo. Ever.



One of these days, if folks don't get their language crap together,  

I'm going to have to scratch that lifelong itch and roll my own.



Maybe arc will help me avoid that.
\"Many computers can print only capital letters, so we shall not use lowercase letters.\"

-- Let\'s Talk Lisp (c) 1976

cormullion

#8
QuoteBut it's funky, feels sort of retro.


That's my kind of stuff! :)



Here's some more "nothing wrong with retro" retro:



 http://www.fat-man.co.uk/docs/product_07/iTube_Mothership.shtml">//http://www.fat-man.co.uk/docs/product_07/iTube_Mothership.shtml

Jeff

#9
Arc is supposed to be the 100 year language.  Well, yeah, it's taken nearly that long to develop it, and when we get it, its a layer over scheme.
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

itistoday

#10
Advantages/disadvantages when compared to newLISP?
Get your Objective newLISP groove on.

Jeff

#11
Advantages: lexical scoping

Disadvantages: built on scheme, speed, less mature
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

jrh

#12
Quote from: "Jeff"Advantages: lexical scoping


Lexical scoping is nothing but a computer "science" shibboleth.

Jeff

#13
Then why use contexts or OOP at all?  OOP is entirely based in static scope.



The only other active languages that I know of that uses dynamic scoping is Perl and emacs lisp (if you consider that an active language).



I'm not saying that dynamic scoping is bad, but lexical scoping certainly cannot be denied as a valid and useful convention.
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

jrh

#14
Quote from: "Jeff"Then why use contexts or OOP at all?


Why indeed.  Especially when implemented in a half-assed kludgy way as in C++ or Java.



As for newLISP, I tried using contexts as objects but the performance was dog slow.  Whether FOOP is worth it remains to be seen.  I certainly haven't seen any advantages to it yet.  Every example seems to be more wordy and complex than just using lists and defined functions.



Pre-compiled components in packages or purchased code are OK, especially for gui stuff but that's not really what OOP is all about.



I remain sceptical and especially so as far as lightweight scripting languages like newLISP are concerned.