
Anic: Faster than C, safer than Java, simpler than *sh - nice1
http://code.google.com/p/anic/
======
pudo
> ANI is an attempt to fuse the intuitive feel of shell scripting

Am I the only one who still has to google most of 'sh's predicates and syntax?

~~~
stingraycharles
That's probably because most people only sporadically have to write
shellscripts. If you had to write it every day, I bet you wouldn't have that
problem.

Having said that, I personally don't feel shellscripting is all that intuitive
either.

~~~
scott_s
As soon as my shellscripts need control structures, I jump to a "real"
language like Perl or Python.

~~~
ash
Haven't used it much, but I find Fish shell control structures much more
consistent that those in *sh: <http://fishshell.org/>

------
almost
The first example given is a perl-golf style obfuscated thingy. Does that
strike anyone else as possibly the absolute worst thing you could possible do
when showing someone a language for the first time and wanting to make a good
impression?

The next example is a little better, I still have no idea what it means but at
least it looks like I possibly might once I've read the docs (which I will do
now).

~~~
almost
Having read the tutorial it (the dining philosophers problem example) now
looks quite elegant. I'm still a little unsure about exactly what latches do
and when you're meant to use the -> operator though. A quick syntax summary
would really help.

~~~
nex3
But that's not the first example. The first example is the clock, which the
page says is "terse but complete", and which uses very few names longer than
three letters and very little whitespace.

~~~
almost
Oh yes, that still looks like line noise and I still think it's about the
worst possible first example I can imagine.

------
aaronblohowiak
This is pretty cool. The compiler figures out the order of execution and
parallelization of your code for you, based on a dependency graph that is
generated from the code. So, you simply describe the behavior of your data and
every description is assumed parallel.

Once you read the basic tutorial, the language is not hard to read.

~~~
dkersten
Standard dataflow stuff really. Still, I'm excited to see how this turns out.

------
ramchip
Quite interesting concept, but I looked through the code repository and didn't
find any code generation at all. Only a parser. I think it may be very
"alpha".

~~~
axman6
Alpha implies that there's something that somewhat works. I wouldn't consider
just parsing something as working, myself.

~~~
ultimus
True, it's not alpha yet. But a lot of the semantic processing is being put
into the grammar since in ANI, once a program is grammatically sound, it's
just left-to-right type validation and dumping out boilerplate assembly for
the equivalent of a type-safe stack machine. So even as it stands, the
compiler is doing a nearly complete job of rejecting invalid programs, which
really is the bulk of the work in compiling ANI.

------
tlammens
They forgot readability.

~~~
jhickner
I thought so at first as well, but if you go through the tutorial, the syntax
actually begins to look quite elegant.

It just comes off as odd at first because it's dealing with concepts that are
actually pretty unique (to my knowledge at least) - streams and latches.

~~~
aaronblohowiak
Agreed. There's a lot of semantics in that there syntax ;)

------
swolchok
Is this a joke? The URL spells "panic".

~~~
pavelludiq
_anic is the reference implementation compiler for the experimental, high-
performance, statically-safe, fully implicitly parallel, object-oriented,
general-purpose dataflow programming language ANI._

I really hope its a joke.

~~~
dkersten
Why do you hope this is a joke?

~~~
pavelludiq
The description sounded too over the top, too many words. Kind of like "The
peoples socialist democratic republic of ..." its a pattern that rings
negative alarms.

~~~
dkersten
Maybe, though its pretty descriptive and definitely plausible (for a dataflow
language anyway).

~~~
eru
Yes, also (usually kinds of) object-orientation and (nice) static type systems
don't go together well.

------
TomasSedovic
Someone is definitely "high on their own supply".

On the other hand, (having read the tutorial) it does seem to be interesting
concept that could be helpful in some fields.

Pitty it's so poorly marketed. I hope they change that after it becomes a
usable product.

~~~
dkersten
Its in the very early pre alpha stages right now, so I guess with a bit of
work, it could be pitched better.

Of course, the real barrier to using this for real projects would be library
support.

------
tlack
This is a brilliant concept. Finally something new worth being excited about.

~~~
aaronblohowiak
Graph-based approaches to program flow control are pretty interesting. The
connecting of things to each other in a stream-like fashion is similar to
Chuck, which you might enjoy.

~~~
tlack
This is very interesting, thank you. Any others like this?

I'll contribute something to you, in return: if you're interested in graph-
based audio/visual programming, check out vvvv for Windows. It's like
Processing, but visual (i.e., designed via UI), and very very fast. It was
made by visual artists who actually use it to make big bucks, rather than
computer science weenies.

~~~
dkersten
Theres plenty of dataflow-type languages out there. One of the most
interesting, IMHO, is Lustre, since it seems to be used heavily in the defence
and aerospace industries, though its pretty tough to find any information
about it (though there were quite a few code examples in a recent SIGPLAN
publication).

Besides that, you may find the languages listed here interesting:
[http://stackoverflow.com/questions/461796/dataflow-
programmi...](http://stackoverflow.com/questions/461796/dataflow-programming-
languages/949771#949771)

I've been playing around with dataflow concepts myself and personally see them
as the way forward in programming, though I'm not quite sure yet how it would
need to be done to catch on as a mainstream language. I think I'll play with
anic for a bit and see what happens :)

~~~
axman6
Once they actually have a compiler you mean?

~~~
dkersten
Indeed

------
berlinbrown
Faster than C. That is a bold claim.

~~~
bmunro
And it doesn't actually do any code generation yet.

~~~
axman6
Our compiler parses ANI soo much faster than GCC compiles whole programs, it
makes GCC look pathetic!

------
scotty79
I can't wait to turn it into webapp framework.

------
eplanit
The write-up reads like an advertisement for a weight-loss product.

------
leif
I don't know about anyone else, but when the homepage screams "portable" and I
still need to add header includes to get it to compile (and the tests fail
even then), I get worried.

~~~
ultimus
It's portable in the sense portability concerns are at the forefront and the
stable build will work with all of the major OSes; tests fail because it's
simply not all implemented.

------
Pistos2
I wonder why the author chose to use backslash instead of any other character.
Backslash is used for escaping in nearly every other language.

~~~
dkersten
According to the newly added FAQ:

 _backslashes were chosen for a purely pragmatic reason; on virutally all
keyboards, backslashes are very easy to type (requiring only a single
keystroke). This is a handy property for backslashes to have because in ANI,
you'll be typing them a lot!_

------
willhf
I want:

    
    
      Many more examples contrasted with the equivalent imperative code.
    
      Examples with elaborate data structures.
    
      Implementation overview (current & objectives).
    
      Benchmarks on a multicore.

------
bmunro
You have to read the tutorial.

It does a much better job of explaining the language.

ANI seems to be quite an interesting language. I haven't looked at dataflow
languages before, so this might be fairly standard.

------
drhowarddrfine
Is every language claiming to be faster than C now?

~~~
robryan
Id assume that it's not going to be faster for all uses, maybe it means faster
than C for a problem that can leverage concurrency well.

~~~
axod
Since we all have hundred core CPUs now.

~~~
Devilboy
4 is not too far from 100 in tech time.

~~~
axod
ah takes me back to the 90s.

------
axod
>> "Think of ANI as a way to write fast, statically-guaranteed safe, well-
structured, and highly parallelized software without ever encountering memory
management, threads, locks, semaphores, critical sections, race conditions, or
deadlock."

You can do that in pretty much any language if you decide to. I'm not seeing
the point here, and the syntax is just horrible.

