User loginNavigation |
LtU ForumDefunctionalization+Refunctionalization+Expression ProblemInteresting paper which suggests you can solve the expression problem by defunctionalizing, converting data to codata and refunctionalizing (and vice versa). Suggests that the function type is a special case of codata with a single destructor. An impure solution to the problem of matching fansSome time ago, I found an impure solution to the problem of matching fans in Lamping's abstract algorithm. It is described in [1] and implemented in [2], the essential part of source code being available in [3]. My understanding is that the algorithm effectively eliminates the need in bookkeeping nodes (so-called "oracle") for optimal reduction in case of arbitrary untyped λ-terms. Although I have no formal proof for its correctness yet, the amount of testing [4, 5] that have already been done leaves little room for counterexamples. Questions remaining open are: how to (dis)prove correctness of the algorithm as well as how to simplify and improve the algorithm? Any help would be highly appreciated. [1] https://arxiv.org/abs/1710.07516 Are "jets" a good idea?I've noticed the beginning of a trend in hobbyist/amateur programming language theory. There have been a number of recent programming languages that have extremely minimalistic semantics, to the point of being anemic. These languages typically define function types, product types, the unit type, perhaps natural numbers, and not much else. These languages are typically capable of universal computation, but executing programs in them directly would be comically slow, and so what they do is recognize special strings of code and replace them with implementations written in a faster meta-language. This pair of the recognized string of code and the efficient replacement is known as a "jet", or an "accelerator". Some languages that do this:
My question is this: is this idea of "jets" or "accelerators" a serious approach to programming language implementation? There's an obvious question that comes to mind: how do you know the object language program and the meta-language program you've replaced it with are equivalent? Simplicity claims to have done a number of Coq proofs of equivalence, but I can't imagine that being sustainable given the difficulty of theorem proving and the small number of developers able to write such a proof. Urbit takes a rather cavalier attitude towards jet equivalence by advocating testing and simply treating the jet as the ground truth in the case of a conflict. And I know David posts here so I hope he will respond with Awelon's take on this matter. Here is an excerpt from the Simplicity document arguing in favor of jets:
In the interest of charity, I'll also try to make an argument in favor of this approach, although I remain skeptical: an extremely minimal programming language semantics means a language designer can truly consider their work to be done at some point, with no further room for improvement. A minimalistic Python would have largely avoided the fiasco involved in the upgrade from Python 2 to Python 3, by pushing all of the breaking changes to the library level, and allowing for more gradual adoption. Languages features added to JavaScript in recent years (like classes, async/await, modules and so on) would also have been libraries and presentation layer additions instead of breaking changes at the implementation level. Help with HerbelinDISCLAIMER: I'm uneducated with PLT and don't know what I'm talking about, so please forgive any whacked terminology. Ok, that outta the way... I'm trying to make my way through The Duality of Computation (https://pdfs.semanticscholar.org/048f/c94be2ec752bb210c5f688cba0200c1a1f92.pdf), and this stuff, like most everything posted on this fascinating website, is way over my head. I can't follow most of the back half of the paper, but I was hoping someone might have the spare time to answer two newbie, school-level, questions... 1) (The silly one.) How on earth do you pronounce the "mu, mu with tilde" calculus. It'd literally be easier to read this if I knew how to read it. Is there some definitive guide for people who just figured out that the funny squiggle so many these papers is pronounced "eta"? :) 2) (The basic one.) The authors talk about the call-by-value side of the duality as dealing with "Environments with holes." This reminds me of PTS, with it's capital-PI lambda expressions that can close over terms or types. What's the difference between an "Environment with a hole" and a lambda over environments? And what does that mean for compiled languages, where environments aren't parameters? Any help on either question would be appreciated. Project Loom: adding fibers and continuations to JavaJust saw this on Hacker News -- Project Loom: Fibers and Continuations for the Java Virtual Machine with the following overview:
I'm a fan of fibers, and this has quite a bit of interesting material in it for like-minded folks. Non-determinism: a sublanguage rather than a monad
Non-determinism: a sublanguage rather than a monad
A Framework for Gradual Memory ManagementI do not know how much interest this community has in the intersection of programming languages, memory management and type systems, but for those intrigued by such topics, you might find this paper on Gradual Memory Management to be worth reading. It proposes that a language's compiler offer more sophisticated type systems that enable a program to flexibly support multiple memory management mechanisms for improved performance, and do so with safety guaranteed at compile time. The described type systems build up from Rust's lifetime-driven owner/borrower model as well as Pony's reference capabilities (mutability/aliasing permissions). The paper also references Microsoft's experimental work on Midori. I welcome any feedback or questions. By jondgoodwin at 2017-09-14 22:41 | LtU Forum | login or register to post comments | other blogs | 4267 reads
Programming language Theme-DI have implemented programming language Theme-D, which is a Scheme-like programming language with static typing. Some properties of Theme-D include: Theme-D homepage is located at Theme-D can also be found at I have also ported (a subset of) guile-gnome GUI library to Theme-D. Its homepage is located at - Tommi Höynälänmaa The Platonic Solids of Software Construction and Their Realization in CThe Platonic Solids of Software Construction and Their Realization in C Synopsis - Here I try to contrive 5 (actually ends up being 6) 'Platonic Solids' of software construction - IE, the fundamental elements of programming that all programmers in all business domains end up leveraging regardless of their general purpose programming language. As a practical matter, I then demonstrate how different aspects of each element are either supportable - or not supportable in C. A language like C is chosen partially because when we use it to encode these elements, its weak language semantics actually enable us to understand each element in a more isolated way. For discussion at this level of analysis, this turns out to be useful. However, I warn readers that this gist-article is more conjecture than science, an emerging idea that, if accurate in its notions, is a precursor to a rigorous investigation. That is why I offer it up for evaluation and critique here. BCS FACS - Annual Peter Landin Semantics Seminar: Compiling Without Continuations, Prof Simon Peyton Jones, 12th Dec, 6pm, LonBCS FACS - Annual Peter Landin Semantics Seminar: Compiling Without Continuations Date/Time: Tuesday 12 December 2017, 6.00pm - 9.00pm Venue: BCS, 1st Floor, The Davidson Building, 5 Southampton Street, London, WC2E 7HA Speaker: Professor Simon Peyton Jones, FRS (Microsoft Research) Cost: Free Booking: https://events.bcs.org/book/2701/ Synopsis: Peter Landin (1930 - 2009) was a pioneer whose ideas underpin modern computing. In the 1950s and 1960s, Landin showed that programs could be defined in terms of mathematical functions, translated into functional expressions in the lambda calculus, and their meaning calculated with an abstract mathematical machine. Compiler writers and designers of modern-day programming languages alike owe much to Landin's pioneering work. Each year, a leading figure in computer science will pay tribute to Landin's contribution to computing through a public seminar. This year's seminar is entitled “Compiling Without Continuations” and will be given by Professor Simon Peyton Jones, FRS (Microsoft Research). Programme 5.15pm Coffee 6.00pm Welcome & Introduction 6.05pm Peter Landin Semantics Seminar Compiling Without Continuations Professor Simon Peyton Jones, FRS (Microsoft Research) 7.20pm Drinks Reception Seminar details GHC compiles Haskell via Core, a tiny intermediate language based closely on the lambda calculus. Almost all GHC’s optimisations happen in Core, but until recently there was an important kind of optimisation that Core really did not handle well. In this talk I’ll show you what the problem was, and how Core’s new “join points” solve it simply and beautifully, by effectively allowing Core to express control flow as well as data flow; there are strong links to so-called “continuation passing style” (CPS) here. Understanding join points can help you are a programmer too, because you can write code confident that it will optimise well. I’ll show you a rather compelling example this: “skip-less streams” now fuse well, for the first time, which allows us to drop the previous (ingenious but awkward) workarounds. By paulboca at 2017-09-10 18:02 | LtU Forum | login or register to post comments | other blogs | 2608 reads
|
Browse archives
Active forum topics |
Recent comments
1 day 16 hours ago
2 days 13 hours ago
3 days 18 hours ago
3 days 18 hours ago
1 week 1 day ago
1 week 1 day ago
1 week 1 day ago
4 weeks 2 days ago
5 weeks 20 hours ago
5 weeks 1 day ago