User loginNavigation |
LtU ForumHigh Performance and Generality - Functional ProgrammingGenerative Code Specialisation for High-Performance Monte-Carlo Simulations
By Isaac Gouy at 2007-04-11 02:37 | LtU Forum | login or register to post comments | other blogs | 6450 reads
Extensible Pattern Matching via a Lightweight LanguageNew draft of a paper by the F# team: Extensible Pattern Matching via a Lightweight Language Extension By Don Syme, Gregory Neverov, James Margetson
Don Syme's blog introduces the paper:
"Declarative" or "Functional"I was playing around for some time with "functional" thing like Haskell and Erlang. Actually I think things like "Scala" (on JVM) and "F#" (on CLR) are very promising. F# 1.9.1 releasedF# 1.9.1 has been released with a bunch of new features. LTU readers would probably be interested in the work on unifying object oriented and functional code: # Active Patterns. Active patterns give a form of extensible pattern matching on abstract values. F# active patterns allow you to pattern match against .NET object values such as XML, System.Type values and LINQ Expression trees. In this redesigned version they become an official part of the language and some novel additions give a lightweight and non-intrusive mechanism to both partial patterns, parameterized patterns and "complete" decompositions (views) of types. # Implicit Class Construction. This lovely feature makes writing classes considerably more succinct and helps to further bridge the gap between type-inferred functional programming and object-oriented programming. More info is available at Don Syme's blog here. By grant at 2007-04-07 23:34 | LtU Forum | login or register to post comments | other blogs | 6108 reads
Early Programming Languages (A Logic Puzzle)Chris Okasaki (of Purely Functional Data Structures fame) gives us Early Programming Languages (A Logic Puzzle) Try not to use your domain-specific knowledge. Aldor going open sourceAccording to the website, Aldor will be open source soon. See also: an old call to open the source, with a link to an online petition, and a recent and as-yet-unanswered query on the Aldor mailing list about the opening of the source. In a related note, there was a patch to Aldor that I found a few years ago called "Aldor--", but search engines are useless in helping me find this. Does anyone remember this? Deliverable code?I wonder what Ltuer's think about deliverability? What is deliverable code? When I think about dynamic vs. static languages a big difference is the nature of the end product. A scripting language might conclude with a script deliverable, but does anyone want to deliver a script? Dynamic languages are "programmer friendly" but the final compiled deliverable is almost certainly "compromised" (ie slower or less safe). Languages like Java and C# require an intermediate virtual machine. This is only acceptable due the pervasiveness of the environments and probably compromises other languages using the VM. Can we have it both ways? Good deliverable code and a highly productive development environment? For example I have occasionally developed an application in Lisp and then converted it to C, (but not recently). Surely there is a better way? Why can't you push instructions in MSIL/JVMLDoesn't it seem like a good idea to be able to push instructions onto the stack in the MSIL and JVML, and evaluate them later on? Generators/Iterators and lazy evaluationHi all I've been using OCaml for a year or so building an interpreter/compiler for the Python programming language as a research project. It's worked pretty well for most part, but I'm trying to implement some of the features of Python involving 'lazy' features, such as generator functions and list comprehensions. A generator in Python can be thought of as an arbitrarily generated 'lazy list'. As an example
def pow2(max):
start = 0
while (start .lt. max):
yield 2^start
start += 1
The 'yield' statement is the point where the function returns the next value and suspends itself until the next time it is 'forced'. At that time it resumes execution where it left off. OCaml makes this particularly hard to implement this due to lack of 'control flow' features, including even a call/cc. The only way I can see right now is breaking this code down into little functions and keeping track of the right function to call the next time. I've been thinking about whether I can express this in some elegant way in some lazy construct in OCaml, since this is basically a form of 'lazy' evaluation. However, I come from the C world and am not quite used to 'lazy' thinking :) Any ideas? Live coding festival and conferenceI hope this is relevant here, with the recent interest in the SuperGlue paper. There will be a festival of live coding in Sheffield, UK from 20-22nd July 2007. There's a call for participation out right now: http://livecode.access-space.org/ It is affiliated with TOPLAP, and supported by arts funding, so is particularly focused on live programming applications in music and video, with live performances being an important part of the programme. However, contributions on the computer science and philosophy side are very much welcome and indeed expected. While I'm here, here's a paper I'm really enjoying, which I have not seen mentioned here yet: |
Browse archives
Active forum topics |
Recent comments
8 weeks 4 days ago
8 weeks 4 days ago
8 weeks 4 days ago
8 weeks 5 days ago
9 weeks 1 day ago
9 weeks 1 day ago
9 weeks 2 days ago
9 weeks 3 days ago
9 weeks 3 days ago
9 weeks 3 days ago