On 06/02/2014, at 11:43 AM, srean wrote: > > On Wed, Feb 5, 2014 at 6:12 PM, john skaller <skal...@users.sourceforge.net> > wrote: > > On 06/02/2014, at 9:32 AM, srean wrote: > > > Another option which is closer to Raoul's suggestion is to have a flag to > > disable inlining globally for debugging purposes. > > --inline=10 > --debug > --debug-compiler > --usage=prototype > --usage=debugging > --noinline > > > Great! these look useful. Have to find out what each does.
It's documented, and you can do flx --help. > > One must get used to the fact that in Felix. "inline" is not merely an > optimisation. > > That's an excellent way to put it because people will be able to relate to > the narrative around tail calls: semantics vs optimization. There is a joke: A Frenchman and an American are talking about some software and the principles behind it. The American says "Well, it works in practice!" To which the Frenchman replies: "Ah, but does it work in theory?" As an amateur mathematician and user of Ocaml, I'm very much on the Frenchman's side :) So you may be surprised at the Felix philosophy, optimisation first, correctness second. This is based on an observation that really good theory ALWAYS has a really good implementation. If the implementation is complicated the theory is probably screwed. Changing implementations to meet theoretically produced semantics isn't the only way. Another way is to change the theory to match the implemented semantics! So you want to know why schannels accumulate readers (or writers) until there's matching write (or read), and them match just one pair? Because the implementation is simplest. The implementation is TELLING me the semantics. In practice, one tries to make the implementation match some reasonable theory and simultaneously make a reasonable theory for the implementation and somehow make the two meet. But presuming some theory is paramount for some reason when we're dealing with Cybernetics -- man machine interface -- is suspect. It isn't pure mathematics, although you need that, nor is it psychology or industrial requirements or pragmatics, but some blend of all of these. I'm chasing performance, and hence "indeterminate evaluation" drops out as part of the required theory. In practice fixing to lazy evaluation leads to Haskell performance issues and fixing eager evaluation to those in say, C/C++. Its so bad in C89 that programmers resort to macros for performance. Better to have strongly typed macros as in Felix :) > I have to figure out how to expose a C library api from Felix. But that is > another topic entirely. Dont explain it in this thread, I will never find it > when I need it. They keyword is "export". export fun felixfun of (int) as "cfunction"; Creates an extern "C" wrapper for the Felix function. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language