Arc Forumnew | comments | leaders | submitlogin
Heretic Idea and The current most succinct language
2 points by zmei_goryn 6158 days ago | 7 comments
If we choose as criterion for development of language, the language expressive power, than the most expressive language is Python at least if we judge by results of Computer Language Benchmarks. In terms of gziped code size Python is first and Lisp and Scheme are at 20th and 21st places.

http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&calc=Calculate&xfullcpu=0&xmem=0&xloc=1&binarytrees=1&chameneosredux=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1&regexdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1&threadring=1

Should we build Arc starting with Python?



3 points by Jekyll 6158 days ago | link

Typically, people optimise for speed and not terseness in the shootout. If you look at how the languages perform in terms of terseness you find:

Dynamic languages with no possibility of optimal type declarations come first, followed by statically typed type inferring languages, then a ragbag of stuff including dynamic languages with optional type declarations like SBCL.

Then Java and Ada at the back.

You want the lisp to be shorter? Try taking out the type declarations. They're optional.

-----

2 points by nostrademons 6158 days ago | link

You wanna try a port? One of the examples for Yapps is a Lisp reader (http://theory.stanford.edu/~amitp/yapps/yapps2/manual/node2....), and once you've done the reader building an evaluator is standard Lisp stuff. Arc data types map very closely to standard Python types, and Python can do introspection on stack frames with the inspect module, though I don't think you could handle the scope chain using object prototypes like I did in ArcLite (though maybe with a bit of metaclass/getattr hacker...) You've got both the Arc and ArcLite source code to refer back to.

I was kinda curious what a Python port would look like - a lot of the boilerplate in ArcLite is dealing with language issues that Python has solved, like the lack of list comprehensions or decent string methods. But I couldn't justify spending any more time on it. It'd be neat to see the line counts of Scheme, Python, and JavaScript versions all together.

-----

1 point by zmei_goryn 6158 days ago | link

Sorry for misunderstanding! My heretic idea is that given the arc goals we should not improve scheme or lisp but instead improve python given the evidence in benchmarks!

-----

4 points by nostrademons 6158 days ago | link

Well, as a Python programmer, I'd be all for that...

However, I don't think that's really Arc's goals, which I think were foremost to create a language that PG would like to program in. If he wanted to program in Python, he would. Also, the existing Arc community seems largely drawn from disenchanted Lispers who really like the syntax and macros of Lisp, but don't want to deal with onions in the existing languages.

-----

1 point by shiro 6157 days ago | link

If you use succinctness as the only metric, I wonder how well J performs.

-----

3 points by treef 6158 days ago | link

gzipped? python uses lots of its libraries to do it's stuff. I think arc can be lots shorter then python even at this point.

-----

2 points by zmei_goryn 6158 days ago | link

In this particular case libraries don't matter much as the tasks in benchmarks are mostly algorithmical, e.g. like finding spectral norm of matrix, summing numbers or solving n-body problem. Maybe for development of language it would be great if somebody could write some benchmarks to test arc brevity.

-----