User loginNavigation |
LtU ForumWTF: A DSL for hand-written 4-function calculatorsIn one sense, this is light enough that I feel bad posting it to LtU. In another, though, it's entirely relevant: this guy started out inventing a DSL for pen-strokes, combinations of them, and relations between these combinations, and ended up with a simple OCR-based 4-function calculator. This was one of the cleverest bits of just-because programming language work and contrived abstraction that I've seen in a long time. Sample:
Zero is
a large circle
One is
either
a long vertical line
or
a long vertical line
a very small slash line
top of first joins top of second
User namesI've noticed that several new members chose obscure user names, instead of using their regular names. This is discouraged around here. Please see the LtU policy regarding user names, and at least provide identifying information in your user profile (e.g., a homepage url), if you keep using a handle instead of your real name. On top of the reasons explained in the policy pages, LtU is being constantly attacked by spammers these days. Spammers ususally use strange usernames, and this allows me to catch them before they beign posting. However, the effectiveness of this technique depends on genuine members using their real names, so please help by abiding to this policy. Thanks. Trickles: A Stateless Network Stack for Improved Scalability, Resilience and FlexibilityTrickles: A Stateless Network Stack for Improved Scalability, Resilience and Flexibility (PDF) by Alan Shieh, Andrew C. Myers, Emin Gun Sirer (2005)
What you get when you combine continuations and networking. The idea should be obvious to most LtUers. I really can't believe this hasn't been mentioned on LtU before. The site is here. Partial evaluation applied to high speed lighting previewOstensibly, The Lightspeed Automatic Interactive Lighting Preview System by Ragan-Kelly et al. is about graphics, not programming language theory, and the abstract would confirm that opinion:
However, I think it is an interesting example of a practical application of partial evaluation and specialization. 3D rendering is a computationally expensive process, but often the work of graphics artists is to make incremental changes rather than rendering fresh images from scratch. Lightspeed performs static dependency analysis of code written in the C-like Renderman shader DSL (RSL). The code is then specialised so that a static part (including a large 'cache' containing a partial computation) runs in the usual way in Renderman shader language on (a virtual SIMD machine on) the CPU, and a dynamic part is generated so as to run on a different architecture: GPGPU. The dynamic part contains the parameters that artists need to update frequently, resulting in fast previewing of results. PS Note the 'lighting' in rendering-speak can mean any computation performed at a piece of geometry at the point at which you would compute the interaction between light and surface. Often it doesn't actually mean lighting. (Disclaimer: I'm not an author on this paper but I did have an almost negligible bit of involvement.) Typed callcc in a stack-based languageI have been playing with the idea of adding a call-with-current-continuation primitive (
callcc : ('A ('A ('A -> 'B) -> 'B) -> 'B)
The formal semantics would be: [$A [$B] callcc $C] == [$A [$C] $B] An example usage would be:
>> define do_twice { dup [apply] dip apply }
>> define test { 1 [do_twice] callcc inc }
>> test
stack: 3
My questions are: am I doing this right? Does the type look correct? Is it a good idea to add continuations to Cat? Thanks in advance! Merging Functions, Modules, Classes, the whole nine yards...Say we have a declarative language, where foo(a, b, c) gamma = a * b rho = b * c gamma * rho bar(a, b, c) extends foo gamma = a * a is a piece of code in which Of course, the above example is little bit simplistic. Far more interesting is the use of the implies operator ( foo(a, b, c) 'a' -> a 'b' -> b 'c' -> c 'foo' -> 'foo' bar(a, b, c) extends foo 'foo' -> 'bar extending foo' Here we use the implies operator to mean "when Now that I have thought this language up, I have to work on it. I swore there would never be a day when I would stray from the well settled lands of software development to wander in the wilds of language design! Alas, I am doomed. All I ask from ltu is some thoughtful criticism of my idea, some pointers to earlier work in this domain and some suggestions about the syntax. What I want in the end is a language that is process/message oriented like Erlang but also has straightforward syntax for the notion of 'inheritance'. IM IN UR COMPUTER, HAXIN UR CODEFor those of you hep cats who are hep to the lolcat scene, there's a new programming language, lolcode, designed specifically for the needs of your cat, being developed by the best feline researchers. Example: HAI CAN HAS STDIO? I HAS A VAR IM IN YR LOOP UP VAR!!1 VISIBLE VAR IZ VAR BIGGER THAN 10? KTHXBYE IM OUTTA YR LOOP KTHXBYE Happy caturday. KTHXBYE. CONTEXT07. Delimited contexts in OS
Context 07 is the Sixth
International and Interdisciplinary Conference on Modeling and Using
Context. Here's the List of accepted
papers
Chung-chieh Shan and I have submitted a paper on delimited contexts in operating systems and the zipper OS (which has not been formally published). Systems programmers do use contexts whether they are aware of that or not. The first version of UNIX on PDP-7 already implemented delimited continuations, in the form of co-routines between user programs and the shell. Being aware of delimited continuations may help systems programmers to better implement context switching, signal handling, etc., using the techniques developed in programming language research. It also leads to new insights, for example, that checkpointing a process and snapshotting a file system are essentially the same activity. The final paper is available at http://okmij.org/ftp/papers/context-OS.pdf There is little new there for long-time LtU members; however, this time the material is presented systematically and in context. By Oleg at 2007-06-02 05:13 | LtU Forum | login or register to post comments | other blogs | 9579 reads
Correctness of ParsersHi all, I'm looking for literature which focuses on proving context-free parsers correct. For example, I have work by Sikkel on Parsing Schemata and work by Cliff Jones on formalizing Earley's algorithm, and looking for other ways that people have formalized and proved those (and other context-free) parsers. Thanks for any recommendations, |
Browse archives
Active forum topics |
Recent comments
8 weeks 4 days ago
8 weeks 4 days ago
8 weeks 5 days ago
8 weeks 5 days ago
9 weeks 2 days ago
9 weeks 2 days ago
9 weeks 3 days ago
9 weeks 3 days ago
9 weeks 3 days ago
9 weeks 3 days ago