
Why Arc is bad for exploratory programming - mqt
http://arcfn.com/2008/05/why-arc-is-bad-for-exploratory.html
======
gruseom
I'm tired of this incessant chatter about libraries, libraries, libraries in
discussions about language. Of course libraries matter; I don't want to write
code to convert a bitmap to jpeg. But the "libraries are the new language"
belief is a gross exaggeration that has become way too commonplace. If it were
true, we'd all be programming in C.

Programmers are not welders. Programming means writing new code. Language is
the medium of that code, it is hugely important, and it gets _more_ important
as the complexity of one's problem increases. The only way that libraries
would become more important than language is if programmers stopped working on
complex problems or new problems.

Ultimately, this overemphasis on libraries is a variation of the discredited
"code reuse" meme, in which programs are imagined to be strung out of
components, so all you need is enough components.

Edit: Another common thing about these discussions is otherwise intelligent
people ignoring the fact that it is possible for a program written in one
language to call a library written in another.

~~~
jimbokun
"Edit: Another common thing about these discussions is otherwise intelligent
people ignoring the fact that it is possible for a program written in one
language to call a library written in another."

And this is a huge differentiator among languages.

Scala and Clojure have immediate access to the vast expanse of Java libraries.
Python has a very good mechanism for wrapping and calling C/C++ libraries.

As far as I know, Arc does not yet particularly shine in this area, although I
believe some arc hackers are working on it.

~~~
aaronblohowiak
Glue! As perl was, so ruby is becoming (a nice glue.)

I like JRuby, cause it lets me use the gynormous amount of java libs in terse,
"powerful", ruby without jumping through hoops.

Why are so many people afraid/resistant to this paradigm?

------
xirium
I'll paraphrase the argument as "Blub doesn't include an XML parser therefore
Blub is rubbish."

Open source used to have a similar issue regarding Microsoft Word documents:
"Open source operating systems were rubbish because there wasn't any software
to read and write Word documents." Now that such functionality is available,
the argument moves to another feature such as boot time or support for native
applications.

Let's imagine that we have an open source operating system that runs all
games, boots in 10 seconds, works with 6000 random devices and comes installed
with a terse language which fetches web pages, parses XML, talks to 20
databases and Java applications. How much of this functionality will be of any
consequence in 10 years?

~~~
Husafan
I think your paraphrasing is incomplete. It would be truer to the op's point
to say, "Blub does not include an XML parser, therefore Blub is rubbish for
exploratory programming with XML documents."

------
pg
Obviously what I meant is that the core language is tuned for exploratory
programming.

Also, I disagree with his criteria. Speed isn't really important for it. And
dynamic typing, which he omits, is very important.

~~~
henning
Why is dynamic typing important?

I had an enjoyable time prototyping optimization heuristics in OCaml, where
Arc would have been completely inadequate because it lacks floating point
speed.

~~~
pg
_it lacks floating point speed_

How much slower are floating point operation in Arc than OCaml?

~~~
henning
Have a look at
[http://shootout.alioth.debian.org/gp4/benchmark.php?test=all...](http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=mzscheme&lang2=ocaml)
\- instead of twiddling your thumbs for 20 seconds the way I did, you go and
get a cup of coffee or check email/blogs or something else that takes your
mind off the task at hand.

The reason I mention this niche (where C libraries you could call do you
little or no good) is because things like optimization heuristics and machine
learning are the most common form of exploratory computing and programming I
know of. The biggest symptom of this is that there are dozens of "machine
learning" toolkits, environments, libraries, etc all intended to provide a
situation that frees you from worrying about extraneous details (like how to
get data out of crappy HTML in order to do some kind of data analysis
project), but a lot of people just code everything from scratch in vanilla
Java/C/Python/whatever.

The way I write programs, generally, is I do the simplest possible test that
still embodies the essential idea behind what I want to do and grow it from
there. Thus a language supporting that has to be flexible, and I don't see why
dynamic typing is necessary or sufficient for that.

The type system has little or nothing to do with also supporting essential
features that support the way I think: closures, combinators, metaprogramming,
and other things that often make life a lot easier.

~~~
igouy
[http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?t...](http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test=all&lang=ikarus)

------
Tichy
I am not very deep into it yet, but my impression is that it is often
surprisingly simple to provide lacking libraries for LISP.

As an example, this is an interface to the Cairo graphics library for
MzScheme: [http://planet.plt-scheme.org/package-
source/samth/cairo.plt/...](http://planet.plt-scheme.org/package-
source/samth/cairo.plt/1/0/cairo.ss)

I haven't tried it out yet, but I sure had expected a lot more code. Now that
is just a connector to an existing C library, but in other cases I was also
surprised by the brevity of the code.

Actually I was surprised by the brevity of the code in "Programming Collective
Intelligence", too. For the time being, I consider that kind of stuff part of
my fun projects, so I decided to do them in Scheme. The upside is that if a
library is missing, you get a chance to actually provide it yourself and make
a name for yourself in the Open Source world.

Also, I like implementing those algorithms. With another language, there might
not be an excuse for implementing the algorithms from the book by yourself,
because libraries already exists. With Scheme, I have a justification to
implement them myself.

Interfaces to web services might also not be so important, and easy to
implement by yourself.

~~~
rsheridan6
It's not always about algorithms. If you need, say, something that can parse
rfc 822 messages, you have to read the rfc, implement it, find out which
applications you need to talk to have implemented it incorrectly, and then
work around those bugs. Even if you could write the implementation in 2
minutes, you've still got a time consuming task on your hands. Worse, you will
probably need to implement more than one library for a medium sized
application if you're using an unpopular language, so multipy the time it
takes to finish the task above by x.

~~~
Tichy
Sure, but somebody has to make a start, or we will be stuck with Java forever.
Maybe you can often use libraries from other languages, too, as in the example
of the Cairo lib.

~~~
rsheridan6
>Sure, but somebody has to make a start, or we will be stuck with Java
forever.

True. It's just better to go into it with open eyes.

> Maybe you can often use libraries from other languages, too, as in the
> example of the Cairo

That helps, but it's still a time consuming task to understand a standard and
a C (or whatever) API, design your own API in the 100 year language of your
choice, and implement it (and document it if you're really being good). I
spent a fair amount binding C libraries for Chicken Scheme (which has a good C
FFI) and Scheme48, so I know this from experience.

------
garethm
As far as I can tell, the problem here is to some degree one of conflicting
generalisations. The article is trying to explore a different space to the
space for which Arc was designed to be used for exploring.

Just like flippers, scuba gear, and a diving mask might be suboptimal for
exploring a jungle or the moon, but great for exploring underwater, choosing
an appropriate environment for the space you want to explore is something
worth thinking about.

------
skenney26
I guess the title "Arc could use more libraries" isn't as attention-getting as
"Why Arc is bad for exploratory programming."

~~~
jmatt
If arc could seamlessly access PLT scheme's libraries that would be a good
start. I know from first hand experience that there are a number of ways to
access PLT scheme from arkani and arc. But, there are two big issues. First
there are type differences between fundamental types (lists gah). This means
there can be a lot of work to convert between PLT scheme and arc, not
impossible but time consuming. Secondly, there is no nice way to pull in a PLT
library and just use it in arc. Of course this could be implemented - it's
just not there yet.

There are two choices I see going forward immediately. Arc and the arc
community starts implementing their own libraries or we find a way to use PLT
scheme's libraries (ok maybe sbcl if you are using arkani).

------
mnemonicsloth
_Arc is inexplicably lacking trig, exp, and log_

Okay, I haven't used Arc in a while -- existing Scheme codebase -- but Arc is
built on PLT, which is compliant with R5RS, which does include basic math
functions:

<http://www-sop.inria.fr/mimosa/fp/Bigloo/doc/r5rs-9.html>

(search for sin, cos, etc).

Did Arc forget how to talk to the numerics library? Rebind "cos" "sin" and
"exp"? Is this guy just being stupid?

'splain me please.

~~~
sacado
In ac.scm, add :

    
    
      (xdef 'cos 'cos)
      (xdef 'sin 'sin)
      (xdef 'exp 'exp)
    

And you're done.

~~~
rkts
I think that should be

    
    
      (xdef 'cos cos)
    

etc.

~~~
sacado
yep, you're right. sorry.

------
mqt
What's the status of Arc?

Interest on arclanguage.org seems to be fading.

~~~
pg
What do you mean by "status?"

~~~
EliAndrewC
I don't know precisely what the grandparent was asking, but many of us are
curious about two things. First, when the next release will happen, since the
previous release was 80 days ago. Second, what new
features/functions/libraries are being added to the language; presumably some
of the things from your poll at <http://arclanguage.org/item?id=4070>

------
lacker
I think it might help to have an official statement, like, "We plan to add all
these libraries, in time. You can help somehow." One issue in the Arc
community is there's no clear way to contribute. A lot of this angst about
lacking libraries could be turned into a polite suggestion to help build the
language.

Perhaps there should be AEP = Arc Enhancement Proposals a la Python's PEPs.

------
rms
>Arc is unfinished. It's missing things you'd need to solve some types of
problems. But it works well for basic web apps.

~~~
tokipin
from: <http://www.arclanguage.org/>

------
tx
Throwing together a bunch of libraries and gluing them together with
"surprisingly few" lines of Python code isn't exploratory programming.

It's hardly programming at all.

------
utx00
what's being explored? is c++ better than arc for this "exploring" ... it has
more libraries ;)

i wonder why people are not writing more apps in arc. there seems to be a lot
of activity porting it to different environemnts, writing compilers,
optimizers, creating a repository .... but no app. (other than hacker news)

~~~
jcl
Apps take time. IIRC, for a long time the big Python applications were Grim
Fandango and some research software at LLNL.

~~~
LogicHoleFlaw
Actually, large chunks of Grim Fandango were written in Lua.

[http://www.grimfandango.net/?page=articles&pagenumber=2](http://www.grimfandango.net/?page=articles&pagenumber=2)

~~~
jcl
You're absolutely correct... I'd somehow conflated the two in my mind. I guess
the first big Python game was actually Eve Online. I can't recall any big,
early Python applications outside of the LLNL work... which, I suppose, says
even more about applications being a poor indicator of early language uptake.

------
zach
Good point. Using a good language with great libraries is like prototyping at
TechShop. <http://techshop.ws/>

There's a place for great languages with less-comprehensive libraries, no
doubt. But if you want to make something that works today...

