10 ms·
Anic - Faster than C, Safer than Java, Simpler than *sh
- sbeckeriv 14y agoNo one pointed out it says panic in the url? http://code.google.com/p/anic/ http://code.google.com/p/anic/
- efnx 14y agoThis same repo was posted here in November of 2010. I started following it, but the owners quickly got overwhelmed with other projects, or work, and it all lost steam. I deleted my google group membership yesterday. Funny this pops up now.
- efnx 14y agoI'm sorry, it was posted at hackurls.
- v33ra 14y agoLooks like it's not in active development. The documents and source code are dated 2010. http://code.google.com/p/anic/source/list http://code.google.com/p/anic/source/list http://code.google.com/p/anic/w/list http://code.google.com/p/anic/w/list
- zheng 14y agoAt first I thought this was a joke due to some of the copy, but after reading through the tutorial a bit, it seems pretty interesting. Less hyperbole would be nice though. From the FAQ, ANI (the language, anic is the reference compiler) is faster than C because it is automatically parallel code. Not exactly what I think of when someone says "faster than C". Nevertheless, for a modern take on a dataflow language, ANI is intriguing. If nothing else, the paradigm is probably different enough from imperative/OOP/functional that it is worthwhile to learn even if ANI doesn't take off.
- naturalethic 14y agoAfter reading through the tutorial I'm absolutely fascinated. What an interesting paradigm!
- joshbaptiste 14y agohttp://news.ycombinator.com/item?id=1042122 http://news.ycombinator.com/item?id=1042122 http://news.ycombinator.com/item?id=1898573 http://news.ycombinator.com/item?id=1898573 sigh I still can't get past the syntax..
- tedunangst 14y agoFront page claims there's a Pascal dining philosopher's implementation on the Wikipedia page. Except there isn't. There's a link to the article about Rosetta Code. After following that link, and then clicking around some more, I still haven't found this Pascal version to compare.... Anyway, the reason I ask is because I wanted to know what this line does: =;
- osener 14y agoSeems like it got removed, here it is: https://en.wikipedia.org/w/index.php?title=Dining_philosophers_problem&oldid=419110832#Example_solution https://en.wikipedia.org/w/index.php?title=Dining_philosophe...
- evincarofautumn 14y agoThat line has no counterpart outside of ANI. At first I thought it was some kind of guard or synchronisation point, but according to the Yacc grammar, it just separates “instructors” from “outstructors”[1]. Like the rest of the syntax, it’s not terribly clear at first glance. [1]: http://code.google.com/p/anic/source/browse/src/parserGrammar.y#401 http://code.google.com/p/anic/source/browse/src/parserGramma...
- tedunangst 14y agoSo much for simpler than sh...
- kstenerud 14y agoWhy, oh WHY did they make extensive use of the backslash character? Backslash is almost universally used as an ESCAPE SEQUENCE INITIATOR. Any other use is just going to be confusing. Especially when you end up making constructs like "(\a/\b)", or having to context shift because of string escape sequences like "\n".
- hahainternet 14y agophp amespace ragedy
- chime 14y agohttp://code.google.com/p/anic/wiki/FAQ http://code.google.com/p/anic/wiki/FAQ > 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. To see what the backslash does, see the Pipes section: http://code.google.com/p/anic/wiki/Tutorial http://code.google.com/p/anic/wiki/Tutorial Edit: I'm not defending these arguments, simply pointing out that the developers have put forth some reasons.
- norswap 14y agoYeah right, I guess the 100 millions or so French-speaking people don't amount to much. On French keyboards it's ctrl+alt+"<" (which is at the bottom left of the keyboard), or, when available "Alt Gr"+"\". Going out of your way to produce such small and dubious improvement is always a bad idea imho. If you really think C syntax is a pain point, the sanest thing to do is to go with textual keywords like in ruby or lua.
- lazyjones 14y agonot again, it was posted recently and still has no working implementation apparently so we can verify the "faster than C" claim.
- colanderman 14y agoTry to imagine, if you will, the amount of time and effort it would take you to write a bug-free, efficiently multithreaded real-time clock + infix calculator hybrid application in a language like C. Wait, what? Why...?
- franzus 14y agoI bet this has been done before and is available as a C library ...
- mahmud 14y agoHow much are you betting? "multithreaded real-time clock + infix calculator hybrid application" sounds useless and stupid in any language. No one who can code would be stupid enough to write such a thing, specially in C, and specially as a freely available library.
- jlgreco 14y ago*especially Sorry. Anyway, the components that you would need to build such a thing are certainly all available.
- stesch 14y agoThe \] in the examples look so strange, I thought they are some formatting error.
- deleted 14y ago[deleted]
- canadaduane 14y agoI've been on the mailing list for over a year, and unfortunately, the developer seems to have abandoned it. Cool project though.
- stesch 14y agoOops. Project looks a bit dead. Newest code from 2010.
- vhf 14y agoLatest commit Sep. 2010. Is this project still alive ?
- rdtsc 14y ago> a=[int\]<-0; op=[char\]<-' '; b=[int\]<-0; r=[int\]<-0; 0 { clock => [int ms] { ("\r" + ms/1000.0 + ":" + a + op + b + "=" + r) ->std.out; 1 std.delay (ms+1) clock} }; inLoop => {\std.in->a \std.in->op \std.in->b inLoop}; \\op ?? {'+': (\a+\b) '-': (\a-\b) '': (\a\b) '/': (\a/\b) : 0} <->r; That is not exactly selling the language. Saw that, closed the page.
- hamai 14y agoMaybe the tutorial would be a better first impression: http://code.google.com/p/anic/wiki/Tutorial http://code.google.com/p/anic/wiki/Tutorial I thought the idea of Streams was interesting and appreciate OP for posting this. This is a free creation by someone out there who gave their time to do something harmless, useful and freely shared.
- rdtsc 14y agoThere is obviously a lot of effort put in it. The idea behind it is so cool. He shared and put it up. That's very good. But unfortunate part of sharing is also receiving criticism. Sometimes criticism is stronger when the initial expectation is higher. I think most clicking that link got excited about all the features they read before then they got disappointed when they saw that piece of code. So his job is not to babysit other techies, i.e. he doesn't care about how others see this project, so then he wouldn't mind the criticism either, right?
- fsaintjacques 14y ago
- anuraj 14y agoBetter than sliced bread ....
- Morg 14y agoThe only thing that's faster than C and still a usable language is Fortran. It has been like that for three decades, I'll be surprised the day it's not the case anymore.
- sswezey 14y agoThe url ends in p/anic The syntax looks awful and confusing
- forgotAgain 14y agoIs it April 1st already?
- jmduke 14y ago* The language couldn't possibly be simpler... * followed by * getChopsticks = [--> ?] { \chopstick, \nextPhil.chopstick --> }; * is just dripping with irony.
- pnathan 14y agoDataflow ideas are cool, but this syntax is kind of crazy. It sounds like a neat concept to redo in a more palatable approach.
- ricardobeat 14y agoOriginal post 3 years ago: http://news.ycombinator.com/item?id=1042122 http://news.ycombinator.com/item?id=1042122 Is there a repository of sample code? I'm curious about how interacting with the filesystem, network, graphics would look like.
- scott_s 14y agoIn CS literature, this programming model is called "stream computing." I work on System S, which is the research name of IBM's InfoSphere Streams, which is a distributed, realtime (edit: soft realtime; so, high throughput, low latency, but not hard realtime with guaranteed deadlines) streaming system with an associated language. Another project in this area is Storm. See this comment thread for more on that: http://news.ycombinator.com/item?id=3193115 http://news.ycombinator.com/item?id=3193115 But, Anic seems to be more related to the kind of streaming languages that came from the digital signal processing and embedded worlds. See, for example, the StreamIt project: http://groups.csail.mit.edu/cag/streamit/ http://groups.csail.mit.edu/cag/streamit/ In particular, a StreamIt tutorial: http://groups.csail.mit.edu/cag/streamit/papers/streamit-cookbook.pdf http://groups.csail.mit.edu/cag/streamit/papers/streamit-coo... Note that Streams, Storm, Anic, StreamIt all have the same underlying programming model, but Streams and Storm target a different area than Anic and StreamIt. Streams and Storm target the emerging area of "big data" where you need to distribute your computation across a cluster. Anic and StreamIt are lower level: applications such as video decoding are streaming in nature, but one typically implements them on a single chip, and often even in hardware. Standard disclaimer: my views are not official IBM views.
- TazeTSchnitzel 14y agoANI greatly resembles the programming language I was thinking of creating. Oh well.
- Ralith 14y agoSo contribute to it!
- emilis_info 14y agoCommits to ANI stopped nearly two years ago. Maybe you should still try? You would learn a lot and that would make you a better programmer.
- adrusi 14y agoor just contribute to ANI, if you don't want to reinvent the wheel.
- tuananh 14y agothe syntax looks like a PITA. i stopped reading right after i saw it.
- archivator 14y agoThis looks like Communicating Sequential Processes with an ugly syntax and a standard library. What am I missing here?
- cheald 14y agoAnd apparently less readable than Perl.
- bhavin 14y agoIt would help if fellow HNers read through the content a bit before upvoting something quickly. Here is a project which was last updated more than 2 years ago (no changes in source/tutorial/wiki in 2 years). There's no working implementation to support the claim. Any sane programmer would highly doubt existence of a (faster_than_C && safer_than_java) claim. Why are we as a community are becoming more and more obsessed with sensational link-baits?
- dkersten 14y agoAgreed: http://code.google.com/p/anic/source/list http://code.google.com/p/anic/source/list there has been no updates since 2010. I was honestly surprised to see this on HN and actually had to double check that I wasn't seeing an old HN submission for some reason. I was briefly involved in this project, I wrote some code for instruction selection, was active on the mailing list and had a few lengthy discussions about dataflow programming with Adrian/Ulitmus. Last I heard, in early 2011, he was still working on it, but in private, and he had changed focus somewhat to something even more ambitious. I voiced my concern over raising the bar before the first simpler version was released and feature creep, but I guess his mind was made up. I haven't heard anything since, despite trying to reach him a couple of times :-( So, from this, I would say that ANI can safely be assumed dead unless a working compiler is surprise-released.
- ramchip 14y agoSame here, I had some discussion with the creator but it looked rather doomed from the start. He was worrying about parser optimization, logo design, and interactive shells, when there wasn't even any (hand-)compiled program or proof of concept of the semantics...
- Ralith 14y ago> Any sane programmer would highly doubt existence of a (faster_than_C && safer_than_java) claim. I dunno, mlton was of that order and that was ages ago.
- aklofas 14y agoI'm pretty sure anic is fake and the website was built by a troll. My brain cannot find any meaning and any of the code. It's just gibberish
- gweinberg 14y agoYes, this "language" is clearly a joke. I'm surprised to see so many comments treating it as if it were serious.
- Too 14y agoSuddenly regular expressions felt so readable.
- jpenner 14y agoInteresting ideas, but the compiler produces zero-byte executables and crashes trying to build the two-liners in the tutorial.
- podperson 14y agoIf you're going to complain about the syntax, complain that everything is left-to-right (except math inside expressions) except initializing variables which, for some reason, is right-to-left.
- j_baker 14y agoanic is the reference implementation compiler for the experimental, high-performance, implicitly parallel, deadlock-free general-purpose dataflow programming language ANI. One other thing: anic is buzzword-compliant.
- InclinedPlane 14y agoRight, because the concerns we have today primarily is high-performance uniprocessor computing. Or maybe not. Does it seem to anyone else that almost all of the people creating new languages lately are generally tackling the wrong problems?
- borplk 14y agoLooks like they developed it behind closed doors without asking a single person.
- soup10 14y agoIn short, ANI seeks to break out of the shackles of imperative programming -- a stale paradigm which for four decades has produced hundreds of clones of the same fundamental feature set, none of which offer intuitive hands-off concurrency, and differing only in what lengths they go to to sugar-coat the embarrassing truth that they're all just increasingly high-level assemblers at heart; Haha. The entire point of programming is to tell the hardware what to do. Any programming language that is not 'high-level assembly' has severe leaky-abstraction problems. The reason C and C++ still enjoy so much success despite limited syntax is that they stay true to the hardware and don't force another layer of abstraction on you.
- infinitesimal 14y agoFunctional programming is a leaky abstraction?
- swah 14y agoHm, this logo reminds me of Factor...
- tawm 14y agoYou are now thinking with pipes.
- asynchronous13 14y agoThis is remarkably similar to HDL in concept (though not in syntax).
- deleted 14y ago[deleted]
- buster 14y agoPlease, the next person who designs a language (which are often enough US people i guess), CHECK KEYBOARD LAYOUTS IN EUROPE FIRST. Really. It's a pain to type []{} and \ on a german keyboard especially if it's supposed to be like every second character! Stop it. Please. Especially when there are proven languages that can cope without all this sh*t (yes, i am looking at python here). Edit: Although this might be an interesting language there is no way i am going through this syntax just to "check it out". Lost an opportunity to gain a new community member.
- DanielRibeiro 14y agoComments from former submission: http://news.ycombinator.com/item?id=1042122 http://news.ycombinator.com/item?id=1042122
- alok-g 14y agoSee also: http://en.wikipedia.org/wiki/Dataflow_programming#Languages http://en.wikipedia.org/wiki/Dataflow_programming#Languages
- MindTwister 14y agoDid anyone notice this little gem in the URL? /p/anic