User loginNavigation |
LtU ForumGood languages with simple grammarI'm looking for pointers to languages that are considered expressive and usable, yet are defined by simple lexical grammars and parser grammars. One popular example is Python, which is almost LL(1) in simplicity. LISP is LL(1) and might be considered another example depending on one's views. C++ is, of course, a non-example since it isn't even definable in a context-free grammar. Functional multi-method programming languageGiven the recent discussion on topics like Nemerle and C# 3.0, Apple: procedural -> OO -> AOP -> advanced procedural, and other AOP type design concerns, it seems to me that a structurally typed, functional, multi-method (maybe plus predicate dispatch) programming language would allow for FP, OOP, and AOP development without requiring language-external solutions or hacks. Nice and CLOS support multi-method, but not really any other languages. Is there a reason that there is no discussion of multi-method programming? Is it simply too complex to reason about? Is it too slow? Or is there something else that I have missed? Thanks. Garbage Collection as a Lazy AlgorithmLately I've been thinking of garbage collection in terms of being a lazy algorithm. That is, I see a lot potential similarities between lazy evaluation and garbage collection. One of the main benefits of lazy evaluation is the modularity it provides by allowing finer-grained intermingling of programs (the separation of generation from selection). Garbage collection follows this pattern closely by allowing the allocation of memory anywhere, without having to worry about deallocation. Also, the freeing of unused memory is done dynamically on demand, instead of being determined at compile time. Again, similar to the execution path of a lazy program. And lazy evaluation makes it easier to reason about correctness, but harder to reason about efficiency. Much the same could also be said about GC. I think the unification of the two concepts could inform both areas. I could see a form of strictness analysis performed on our 'lazy' garbage collector which would produce a region inference algorithm or a compile time garbage collection algorithm. And maybe garbage collection research could help in developing better evaluation strategies. Although I have a harder time seeing it, might a generalization of the idea behind generational GC applied to an evaluation strategy lead to something similar to Optimistic or Eager evaluation? (That is, spend more time on executing younger thunks, etc.) Are there any papers out there which discuss the lazy aspects of garbage collection? Most Productive FP Lang?I realize this isn't really a theory question, and I humbly hope the moderators tolerate the thread anyway. However, this crowd probably knows more about FPLs than most, and hopefully this thread will be a useful resource to other people looking to get into an FPL. For my purposes, "productive" includes the following requirements, roughly in order of importance:
A rationale along with a given suggestion would be most welcome. Thanks. Is REBOL a pure functional language?REBOL creator Carl Sassenrath addresses this question in his blog. It's basic stuff, but it's interesting to even see the issue come up. REBOL is an interesting and odd language, if you've never seen it. (The answer to the question in the title, BTW, is "no.") By James Hague at 2005-09-15 13:26 | LtU Forum | login or register to post comments | other blogs | 7129 reads
Nemerle and C# 3.0Mentioned on OS News. Category theoryDoes anybody have any starting-out references for Category Theory in computer science? I did a maths degree, and while I came across the odd bit of category theory nobody in the maths faculty taught a course on it. I got the impression it was seen by many as a needlessly abstract way of rephrasing existing algebraic results, which didn't bring many new mathematical insights. But, since then I see references to it everywhere in connection with logic and theoretical computer science - trying to understand things like monads, domains, denotational semantics, type theory and so forth. The mathematical treatments I've seen have been horribly abstract and lacking in intuition so I thought I'd ask you guys if you know of any references from a slightly different perspective. Cheers, Perl and HaskellEdd Dumbill has an interview with Autrijus Tang on on Perl and Haskell. It's a much shorter read than the LINQ announcement from Microsoft, so if you only have a few minutes... 8^) Are you using delimited continuations?Recently, I used delimited continuations to do some "scope herding" in a little language I am implementing. In short, I wrote a pair of combinators enterBlock and bindLocal that use shift and reset (and Reader-monad features) to provide automatic scoping for block-local bindings. Through the magic of delimited continuations, code like this:
is (in effect) translated into code like this:
In the latter form, the scope of each local binding is expressed via the Reader monad's local combinator, which assures me that the binding's effects will not stray outside of the block established by enterBlock, regardless of how the block is exited. Given the number of recent papers on delimited continuations that have been discussed here on LtU, I was wondering what other nifty uses our readers may have found for them. Do you have a delimited-continuation trick or story to share? If so, what is it? Please do let us know! Building Compilers by Combining AlgebrasG. Kimmell, E. Komp and P. Alexander, "Building Compilers by Combining Algebras," Proceedings of the IEEE Engineering of Computer-Based Systems Symposium and Workshop (ECBS'05), Washington, DC, April 4-7, 2005. Embedded systems present a wide variety of challenges for developersDespite the embedded systems emphasis in the abstract this paper actually presents a fairly general approach to combinator-based compilation. The authors note that their approach should speed the development of compilers, interpreters, and type-checkers, while also making verification easier. It's probably worth noting here that this is not a paper about parser combinators, but rather presents a flexible, algebra-based approach to generating code from an AST. The authors claim that things like typechecking and optimizations can be accomplished simply by changing the carrier set of the algebra. By Allan McInnes at 2005-09-13 19:57 | LtU Forum | login or register to post comments | other blogs | 7261 reads
|
Browse archives
Active forum topics |
Recent comments
9 weeks 3 days ago
9 weeks 3 days ago
9 weeks 4 days ago
9 weeks 4 days ago
10 weeks 1 day ago
10 weeks 1 day ago
10 weeks 2 days ago
10 weeks 2 days ago
10 weeks 2 days ago
10 weeks 2 days ago