User loginNavigation |
Traceable Data Types for Self-Adjusting ComputationThis post is triggered by Jules asking, essentially, how could FRP support imperative structures? Part of the answer is about interface -- a command becomes an input stream of commands, which is a common pattern in systems like Max/MSP, and most FRP systems also provide mutable reactive cells (... a worthwhile topic for another day). More interesting is when we want a particular imperative implementation that the automatic incrementalizer wouldn't have picked, such as a hand-tuned one in a lower-level language. Sometimes, a reactive language supports interfacing with alternative implementations in other languages automatically, as in Crossing State Lines: Adopting OO Frameworks to Functional Reactive Languages, but, as long as the incrementalization algorithm supports foreign computations, even language users can do it (e.g., Flapjax supports manual lifting of the DOM, I also did arrays, etc.). The following recent paper, Traceable Data Types for Self-Adjusting Computation, can be interpreted as an explanation of why it has been sensible performance-wise for an FRP system like Flapjax to lift a library like the DOM: in a typed setting, the library is an ADT that has been tuned to take care of its own incrementalization and thus we just need a bit of glue to lift it:
A little more out there, and why I liked this paper, is its typed phrasing allows you to reduce the typical lifting+FFI approach for automatic incrementalization of general programs to being an instance of the the expression problem. An intuitionistic logic that proves Markov's principle“An intuitionistic logic that proves Markov's principleâ€, Hugo Herbelin, LICS 2010.
Markov's principle is an axiom of "Russian constructivism". It says that if P is a decidable predicate (i.e., the formula ∀x. P(x) or ¬P(x) is constructively provable), then if we know that P is not always false (ie ¬(∀x. ¬P(x))), then there exists an x such that P holds (ie ∃x. P(x)). One operational way of understanding this axiom is that it says is that if we know P is not always false (on, say, the natural numbers), we can find an element for which it is true with a while-loop: check to see if 1 is true, and then check to see if 2 is true, and so on, stopping when you hit a number for which it holds. This means that Markov's principle is a principle of unbounded search, and as a result it has controversial status in intuitionistic mathematics -- should we regard a program with a non-constructive termination proof as a constructively terminating program? (The answer is, as usual, "it depends": in different applications you can want it or not.) However, just chucking an axiom like ¬(∀x. ¬P(x)) → ∃x. P(x) into your proof rules is not very nice from a proof-theoretic perspective. It mixes up a bunch of different logical connectives, and adding it as an axiom will break things like the cut-elimination theorem for sequent calculus. In this paper, Herbelin exploits (a) the fact that Markov's principle is a (mildly) classical principle of reasoning, and (b) the fact that classical logic is connected with control operators like continuations, to give a logic which is proof-theoretically well-behaved, but which supports Markov's principle. The trick is to add first-class continuations, but only for value types (ie, you can throw products and sums, but not functions). What I find surprising is that this same class of restriction also arises in another paper on control operators at LICS -- Noam Zeilberger's paper "Polarity and the Logic of Delimited Continuations" uses it too. (This paper deserves a post here too.) Compiling Structural Types on the JVMHere's a little sausage making article for JVM language implementors. In Compiling Structural Types on the JVM: A Comparison of Reflective and Generative Techniques from Scala’s Perspective, Gilles Dubochet and Martin Odersky describe
There's no discussion of the the proposed JVM "method handles" and whether they might be an even better solution than runtime reflection. Whiteoak was mentioned previously on LtU. By James Iry at 2010-06-30 15:18 | Cross language runtimes | Implementation | Scala | 5 comments | other blogs | 13568 reads
Xtext: An IDE on the cheapThe introduction of Helios (Eclipse 3.6) included the release of version 1.0 of Xtext - Language Development Framework.
Given a grammar, Xtext derives a parser and an IDE with syntax highlighting, code completion, code folding, outline view, real-time error reporting, quick fixes among other standard IDE features. The models then can be used as an EMF Resource(ie as an interpreter) or with a little more work they can be used to generate code as well. Check out the video clips on their website or the Webinar for a more detailed look. Why Undergraduates Should Learn the Principles of Programming LanguagesWhy Undergraduates Should Learn the Principles of Programming Languages
It would be nice if people interested in this as much as Kim Bruce could actively post such stuff to LtU as contributing editors, hint hint professors... Edit: In case Kim Bruce is listening, I found this link today via Hacker News posting. There are some comments there, too. Intel Concurrent Collections for Haskell
In short CnC purports to be a "a graph-based data-flow-esque deterministic parallel programming model". An open-source Haskell edition of the software was recently released on Hackage. A series of blog posts describe the implementation: #1, #2, #3, #4, #5 (the last post links to a draft paper). Personally, I would have preferred a more concise and down to earth description on the whole thing. If you have experiences to share, please do. By Ehud Lamm at 2010-06-24 05:07 | Functional | Parallel/Distributed | 7 comments | other blogs | 13102 reads
OpenSCAD - The Programmers Solid 3D CAD Modeller
In days gone by I used to post examples demonstrating the power of DSLs over GUIs. This is a nice example I came across recently. The scripting approach may be useful, of course, to 2D CAD as well. Here is an amusing example. Maybe the analog computing DSL I fantasized about should output SCAD scripts instead of compiling directly to g-code... A Theory of Typed Hygienic Macros
A Theory of Typed Hygienic Macros, a dissertation by Dave Herman
SIGPLAN's first Programming Languages Software Award goes to LLVM
By bashyal at 2010-06-08 21:18 | Cross language runtimes | General | 14 comments | other blogs | 17185 reads
Racket ReleasedRacket is a programming language. Racket is the language implementation formerly known as PLT Scheme. Racket is available now. To quote the release announcement:
If you haven't looked at, say, Typed Racket or how to create your own languages in Racket, now might be a good time. |
Browse archives
Active forum topics |
Recent comments
22 weeks 4 days ago
22 weeks 4 days ago
22 weeks 4 days ago
44 weeks 5 days ago
49 weeks 11 hours ago
50 weeks 4 days ago
50 weeks 4 days ago
1 year 1 week ago
1 year 5 weeks ago
1 year 5 weeks ago