On 08/12/2012, at 9:41 AM, srean wrote: > In these languages you do everything to avoid writing loops, primarily > because thats a performance killer like no other. You avoid loops by using > several array manipulation primitives, you pay the functional call overhead > (inlining is a potential win that they miss out on), which is not terrible, > but also the copying overhead. They do try to design the sematics (and data > structures) in a way that copies can be avoided but for many cases they > cannot be.
Unfortunately the advice is usually wrong. Pass by value is MUCH BETTER than using references. Copying is highly efficient. Why? Because copying is easy optimise away. Pointer/reference aliasing and objects are not. > Though the culture of loop avoidance is primarily motivated by performace > arguments, it has an oft ignored byproduct of equally important value: It > leads to very succinct code and this to me is a benfit in of itself. One can > over do it in some languages like APL where it starts resembling line noise. Aw, APL Is COOL! > There is a new language aimed at the same domain as Numpy. It is getting a > lot of attention. Its called Julia. I've seen it. Not impressed ;( > Its pros are (i) much cheaper function calls and (ii) JITed loops. That's the problem JIT. YUCK. Dynamic. YUCKER! > It addresses the perfomrance problems of loops, but what that means is that > you have to go back to the more verbose loop based programming style and > throw away the succinct style. > > Famous last words : One should be able to have the cake and eat it to > > and I think thats were Felix can help. DSSL's allow you to have any succinct consistent style you want, where consistent means it generates more verbose code. > > p.s. Last point documentation is indeed tedious, boring and ungratifying, but > unfortunately its a nonnegotiable prerequisite if you want users. Thats one > of the reason I keep harping about it, and the blog. And there are two > functions that documentation meets, one is for the developer, to remind > him/her of a subtle point, and another is for a user. You need both. I know. However I would like to generate detailed documentation so it is always up to date. I would like to do what Interscript previously allowed: to use tutorial examples as regression tests so we're sure they're correct. And I would like to be able to write "self-documenting code". In other words, code that is readable in details at least, and commentable at higher levels. What I want to avoid is "cut an paste documentation" where I have to copy all the methods out of a class, delete the implementations, then explain it all. That's too much work for me. Its three times more work that writing the code, and at this time the Felix project just doesn't have the manpower. The //$ doc comments are a good step. I can now generate a more or less complete and accurate description of the library (including syntax) by simply adding some annotations in the source. I know this is not enough. I'm happy to write higher level conceptual documents and some tutorial stuff, but basically I am always seeking a way to make the code more "literate". Python doc strings seem to work quite well: I use them a lot help(name) is very good. The biggest problem I have with documentation isn't writing it as such: the problem is organisation. This is where the wiki would be good because it allows, to some extent, writing random articles and then re-organising them later (i.e. refactoring the docs). At present, the webserver provides a low level support. I can automatically index documents named fred_99.fdoc with a tool, insert new numbers with another tool, and the webserver itself provides Next function. But cross referencing doesn't exist. The synchronisation issue is quite critical. Arrays are currently in FLUX. I have not yet sorted out how to deal with them properly. having an actual user of (math) arrays will really help. EG your comments on needing slices. DSSL support here is tough. I would like to be able to handle tensors correctly, optimally, and statically. It's quite hard to do this :) -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language