Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

ANI Compiler

Name: Anonymous 2010-06-26 8:36

http://code.google.com/p/anic/
* Faster than C
* Fully parallel threaded code
* Optimized dataflow language
In fact, ANI is designed to abstract away from the idea of an "algorithm" altogether, which further goes to demonstrate that you can't neatly apply explicit ideas of parallelism to an implicitly parallel language.

Name: Anonymous 2010-06-26 9:12

interesting...

Name: Anonymous 2010-06-26 9:21

No anii jokes, please.

Name: Anonymous 2010-06-26 9:42

>>1
Erlang shows that it isn't hard to do parallelism with algorithms.

Name: FrozenVoid 2010-06-26 12:36

>>4
Erlang is also very slow.


__________________
Orbis terrarum delenda est

Name: Anonymous 2010-06-26 12:52

ANI's "latches" sound like a Monad. Someone needs to make such a Monad in haskell that automatically executes all operations concurrently.

Name: FrozenVoid 2010-06-26 12:54

I'll refute their FAQ point by point:
http://code.google.com/p/anic/wiki/FAQ
Q: How do I pronounce ANI / anic? What does ANI stand for?

A: ANI is pronounced just like the feminine name "Annie"; anic is just "panic" without the 'p'.

ANI stands for "Animus", but apart from the animus being a neat concept, the name was chosen because it generates reasonably clean search hits, in an attempt to avoid the name stomping fiasco that Google instigated with Golang.

Oh, that would be wrong:
About 133,000,000 results for ANI
http://en.wikipedia.org/wiki/ANI plenty of acronyms
And the idea that ANI is derived from animus is also wrong, since the latin root is ANIM->SUFFIX, i.e. ANIM-al, ANIM-ate, ANIM-ate
http://www.wordinfo.info/words/index/info/view_unit/2388/


__________________
Orbis terrarum delenda est

Name: FrozenVoid 2010-06-26 12:59

Q: Faster than C? How is that possible?

A: Traditional programs are single-threaded; in most cases, this is the category that C programs fall into.

In that sense, however, these programs are limited in the resources they can leverage; they can't take advantage of parallel execution on multiprocessor architectures, the kind that we're seeing become ever more prevalent today (and this trend looks like it's here to stay). Of course, if you're comfortable with juggling chainsaws, you can write multithreaded programs in C, but ask anyone who's worked on a large multithreaded system written in C and you'll see them cringe. C is an inherently single-threaded language with ugly multithreading support tacked on once the goof of originally omitting it was obvious. That means ugly code and cluttered binaries that will never run as fast as they could in a language designed from the ground up to be based around parallel execution.

That's the kind of language ANI is; in fact, ANI is so parallel that it's actually difficult to write traditional sequential programs in it. But the point is you should never have to: single-threaded programs are a thing of the past. The future lies in concurrency.

Parallel program never achieve linear speedup. Its hardware limited. This page provide no benchmarks to compare to. Do they mean, that poorly written single-threaded C is slower than multithreaded  ANI program? I'll like to see what they base this off. This is pretty bold claim for an alpha language thats "so parallel" that it needs no optimizations to beat GCC.



__________________
Orbis terrarum delenda est

Name: FrozenVoid 2010-06-26 13:06

Q: Why are backslashes (\) used as language operators? Isn't that confusing, given they're used in other languages as escape characters?

A: This is a valid point, but 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!

Incomers from other languages might be thrown off a tiny bit, but a programmer that's spent some time with ANI will quickly come to realize that there is actually never any good reason to end a line of ANI code with a syntactual backslash! If one insists on doing so anyway, they are writing ill-formatted code that would be confusing regardless of how backslashes are interpreted by the language. Thus, the backslash conflict is there in theory but irrelevant in practice.

The usage of \ in the language syntax is a thought-out practical compromise, though the issue may be reconsidered in the future depending on programmer feedback.


Thats pretty bad, since escape characters, urls and path separators share that character code. Adding it for the sole reason of avoiding pressing more than one button is silly, reminds me of huge chinese keyboards which have 1 glyph each. 
We waste far more energy type longer variable names.




__________________
Orbis terrarum delenda est

Name: Anonymous 2010-06-26 13:09

Definitely looks interesting, but then I haven't really looked at dataflow languages before so I wouldn't know whether this is really that novel.

>>5
Erlang is also very slow.
Is it? Seemed OK to me, but then I didn't use it a lot.

>>7-8
I'll refute their FAQ point by point
Thanks, FV. What would we do without you?

Name: Anonymous 2010-06-26 13:15

Still, I don't like how they automatically concatenate strings and integers with +. As awful VB might be, one good feature was a separate concatenation operator &.

Name: Anonymous 2010-06-26 13:19

>>9
urls and path separators
( ≖‿≖)

Name: FrozenVoid 2010-06-26 13:21

Q: How does one implement classical parallel algorithm X in ANI?

A: Such questions are probably misguided.

While nearly all instances of X are classic "embarassingly parallel" algorithms in the imperative programming sense, ANI's implicit fine-grained dataflow parallelism lends itself to a much, much broader field of application than just the explicitly parallel stuff most programmers are brought up with. In fact, ANI is designed to abstract away from the idea of an "algorithm" altogether, which further goes to demonstrate that you can't neatly apply explicit ideas of parallelism to an implicitly parallel language.

ANI aims to extract "good" parallelism (in the sense that with optimization, it converges to optimality) out of nearly anything just by the way that the dataflow paradigm forces you to think. Of course, this means that the naive parallelism of the classic "embarassingly parallel" problems naturally gets exploited -- but not only that, the language and compiler are specifically designed to discover and exploit the potential parallelism you didn't even realize was there.

So although it wouldn't be hard to re-implement the classic parallel algorithms in ANI, to do so for the sake of doing so would be to miss the point of the language. The reason those problems are considered classic is because they've been solved to death, and unlike every imperative language rehash that's come about in the last 20 years, ANI isn't designed to redo what's already been done. ANI is an experiment in thinking outside of the box and an attempt at altogether breaking free of the explicit imperative programming mindset (parallel or not).

One of ANI's central goals is to help programmers not have to think about the specifics of parallel algorithms in the first place by shifting the burden of discovering parallelism to the compiler. Thus, to ask how one would implement specific parallel algorithm X in ANI is probably the wrong kind of question to be asking, and an undesirable step backwards for a forward-thinking language.

------
Magical parallelism? I've never seen such thing before.
All programs for which the claim is:
 the compiler "knows" the best parallel implementation and its better than all other languages. Where are the benchmarks?






__________________
Orbis terrarum delenda est

Name: FrozenVoid 2010-06-26 13:28

Q: How does ANI resolve the fundamental issue of deadlock in parallel programming? How does the Dining Philosophers example on the main page work?

A: In ANI, under the hood, pipes implicitly enforce total resource orderings for acquiring data. Somewhat surprisingly, deadlock theory guarantees that there will be no deadlock if this condition is met.

The compiler attempts to figure out a static ordering for most data acquisition, but this is not possible with array elements; thus, array elements are resource-ordered using metadata annotations at runtime. Where the compiler cannot come up with a total resource ordering for data, and it comes across a dependency that it knows it won't be able to fully resolve with run-time ordering annotations, it will reject the program as unsafe, pointing out the dependency chain what causes the problem. Since this is dataflow programming, such analyses are very natural to do.

In the case of the Dining Philosophers program, a runtime resource ordering will suffice to ensure each philosopher (even the last one) will pick up the chopstick on their left first; the runtime will in this case allow for the chopstick acquisition order to be dynamically swapped as necessary.

Of course, this is rather technical and the point is that in most cases, programmers don't need to care about these details -- that's the compiler's burden! The one case where programmers will see them is when their program is provably unsafe and the compiler can't figure out a sensible way to fix the issue. Such a situation is at best an indication of a highly confusing flow of data, and at worst a nasty parallel programming bug; in both cases, the compiler would do well to flag an error, and that's exactly what it does.

----
Not unique to this toy language, such problems have been solved before, e.g. http://en.wikipedia.org/wiki/Fastflow_%28Computer_Science%29



__________________
Orbis terrarum delenda est

Name: Anonymous 2010-06-26 13:39

Don't you have anything better to do?

Name: Anonymous 2010-06-26 13:40

>but not only that, the language and compiler are specifically designed to discover and exploit the potential parallelism you didn't even realize was there.
Its like there is parallelism growing on the trees.

Name: Anonymous 2010-06-26 13:48

A proposal:
 rename the language to ANUS (to avoid clashes with existing acronyms and organizations). Currently the only problem is with
American Nihilist Underground Society, but they don't have anything but one website.

Name: Anonymous 2010-06-26 13:53

http://www.anus.com/
That website is hilarious. I want to be an ANUS member.

Name: Anonymous 2010-06-26 13:54

>>14
Solved with Sepples!=solved.

Name: FrozenVoid 2010-06-26 14:00

>>19
Sepples isn't inherently bad, its the stuff people do with it(like this toy language for example).


__________________
Orbis terrarum delenda est

Name: Anonymous 2010-06-26 14:02

>That's the kind of language ANI is; in fact, ANI is so parallel that it's actually difficult to write traditional sequential programs in it. But the point is you should never have to: single-threaded programs are a thing of the past. The future lies in concurrency.

>The future lies in concurrency.

That's fucking retarded. There are reasons to use low level languages. I'll stick with C thank you.

Name: 2010-06-26 14:02

But linus doesn't like it!!1 it must be bad!

Name: Anonymous 2010-06-26 14:16

ANUS - Faster than C, Safer than Java, Simpler than *sh

Name: Anonymous 2010-06-26 15:09

>>21
that it's actually difficult to write … programs in it.
This is what modern language designers actually believe is acceptable.

Name: Anonymous 2010-06-27 2:04

ANII compiler

Name: Anonymous 2010-06-27 3:07

>>23,25
He literally named his language BUTTHOLES, and you guys are still trying to modify it to be somehow offensive.

Name: Anonymous 2010-06-27 3:21

I take issue with ``ανιχ''. It should be ``ανικ'', really; χ doesn't make that sound, even at the end of words.

Name: Anonymous 2010-06-27 5:56

>>15
Please try to ignore troll posts.

Name: Anonymous 2010-06-27 7:48

>>26
U MENA FIGURATIVELY

Name: Anonymous 2010-06-27 8:00

>>29
Back to /lounge/, please.

Name: Anonymous 2010-06-27 11:16

Name: Anonymous 2010-06-27 11:19

>>31
You're not funny, and neither's your stupid link. Fack orf.

Name: Anonymous 2010-06-27 11:20

>>32
lolumad?

Name: Anonymous 2010-06-28 9:32

I want to be an ANI Programmer. Where do i sign up?

Don't change these.
Name: Email:
Entire Thread Thread List