Lambda the Ultimate - Fun
http://lambda-the-ultimate.org/taxonomy/term/5/0
enGoogle announces Logica: organizing your data queries, making them universally reusable and fun
http://lambda-the-ultimate.org/google-announces-logica
<p >You can read more about it at the Google Open Source blog post, <a href="https://opensource.googleblog.com/2021/04/logica-organizing-your-data-queries.html">Logica: organizing your data queries, making them universally reusable and fun</a>.</p>
<p >They advocate for datalog-like language they developed internally at Google.</p>
<p >The reason?</p>
<blockquote ><p >Good programming is about creating small, understandable, reusable pieces of logic that can be tested, given names, and organized into packages which can later be used to construct more useful pieces of logic. SQL resists this workflow. Although you can encapsulate certain repeated computations into views and functions, the syntax and support for these can vary among implementations, the notions of packages and imports are generally nonexistent, and higher-level constructions (e.g. passing a function to a function) are impossible.</p></blockquote>FunThu, 29 Apr 2021 14:50:27 +0000LAMBDA: The ultimate Excel worksheet function
http://lambda-the-ultimate.org/node/5621
<p ><a href="https://www.microsoft.com/en-us/research/blog/lambda-the-ultimatae-excel-worksheet-function/">Post by Andy Gordon and Simon Peyton Jones on LAMBDA</a> giving Excel users the ability to define functions.</p>
<blockquote ><p >
Ever since it was released in the 1980s, Microsoft Excel has changed how people organize, analyze, and visualize their data, providing a basis for decision-making for the millions of people who use it each day. It’s also the world’s most widely used programming language. Excel formulas are written by an order of magnitude more users than all the C, C++, C#, Java, and Python programmers in the world combined. Despite its success, considered as a programming language Excel has fundamental weaknesses. Over the years, two particular shortcomings have stood out: (1) the Excel formula language really only supported scalar values—numbers, strings, and Booleans—and (2) it didn’t let users define new functions.</p>
<p >Until now.
</p></blockquote>FunLambda CalculusWed, 27 Jan 2021 03:27:09 +0000Applications of Blockchain to Programming Language Theory
http://lambda-the-ultimate.org/ltu-blockchain-plt-thinktank
<p >Let's talk about Blockchain. Goal is to use this forum topic to highlight its usefulness to programming language theory and practice. If you're familiar with existing research efforts, please share them here. In addition, feel free to generate ideas for how Blockchain could improve languages and developer productivity.</p>
<p >As one tasty example: Blockchain helps to formalize thinking about <a href="https://en.wikipedia.org/wiki/Mutual_knowledge_(logic)">mutual knowledge</a> and <a href="https://en.wikipedia.org/wiki/Common_knowledge_(logic)">common knowledge</a>, and potentially think about sharing intergalactic computing power through vast distributed computing fabrics. If we can design contracts in such a way that maximizes the usage of mutual knowledge while minimizing common knowledge to situations where you have to "prove your collateral", third-party transactions could eliminate a lot of back office burden. But, there might be benefits in other areas of computer science from such research, as well.</p>
<p >Some language researchers, like Mark S. Miller, have always dreamed of <a href="https://www.youtube.com/watch?v=j5SuqIrgRJU">Agoric and the Decades-Long Quest for Secure Smart Contracts</a>.</p>
<p >Some may also be aware that <a href="https://www.innoq.com/en/articles/2019/07/verifikation-von-smart-contracts/">verification of smart contracts</a> is an important research area, because of the notorious theft of purse via logic bug in an Ethereum smart contract.</p>FunImplementationSemanticsMon, 13 Apr 2020 14:38:12 +0000History of Lisp
http://lambda-the-ultimate.org/node/5548
<p ><a href="http://jmc.stanford.edu/articles/lisp/lisp.pdf">History of Lisp</a> <em >(The history of LISP according to McCarthy's memory in 1978, presented at the ACM SIGPLAN History of Programming Languages Conference.)</em></p>
<p >This is such a fun paper which I couldn't find on LtU. It's about the very early history of programming (1950s and '60s), back when things we take for granted today didn't exist yet.</p>
<p >On taking apart complex data structures with functions like CAR and CDR:</p>
<blockquote ><p >It was immediately apparent that arbitrary subexpressions of symbolic expressions could be obtained by composing the functions that extract immediate subexpressions, and this seemed reason enough to go to an algebraic language.</p></blockquote>
<p >On creating new data, i.e. CONS:</p>
<blockquote ><p >At some point a cons(a,d,p,t) was defined, but it was regarded as a subroutine and not as a function with a value. ... Gelernter and Gerberich noticed that cons should be a function, not just a subroutine, and that its value should be the location of the word that had been taken from the free storage list. This permitted new expressions to be constructed out of subsubexpressions by composing occurrences of cons</p></blockquote>
<p >On inventing IF:</p>
<blockquote ><p >This led to the invention of the true conditional expression which evaluates only one of N1 and N2 according to whether M is true or false and to a desire for a programming language that would allow its use.</p></blockquote>
<p >On how supreme laziness led to the invention of garbage collection:</p>
<blockquote ><p >Once we decided on garbage collection, its actual implementation could be postponed, because only toy examples were being done.</p></blockquote>
<p >You might have heard this before:</p>
<blockquote ><p >S.R. Russell noticed that eval could serve as an interpreter for LISP, promptly hand coded it, and we now had a programming language with an interpreter.</p></blockquote>
<p >And the rest is history...</p>FunHistorySat, 25 Aug 2018 17:43:23 +0000 ICFP Programming Contest 2018
http://lambda-the-ultimate.org/node/5540
<p >Yep, it <a href="https://icfpcontest2018.github.io/">on</a>!</p>FunFunctionalSat, 21 Jul 2018 06:45:18 +0000How to Write Seemingly Unhygienic and Referentially Opaque Macros with Syntax-rules
http://lambda-the-ultimate.org/node/5517
<a href="http://okmij.org/ftp/Scheme/Dirty-Macros.pdf">How to Write Seemingly Unhygienic and Referentially
Opaque Macros with Syntax-rules</a><br >
By Oleg Kiselyov<br >
<blockquote >
This paper details how folklore notions of hygiene and referential transparency
of R5RS macros are defeated by a systematic attack. We demonstrate
syntax-rules that seem to capture user identifiers and allow their own identifiers
to be captured by the closest lexical bindings. In other words, we have written
R5RS macros that accomplish what commonly believed to be impossible.
</blockquote>FunMeta-ProgrammingThu, 22 Mar 2018 02:22:21 +0000A unified approach to solving seven programming problems
http://lambda-the-ultimate.org/node/5470
<p >A <a href="http://dl.acm.org/citation.cfm?id=3110252&CFID=805521128&CFTOKEN=83435544&preflayout=flat">fun pearl</a> by William E. Byrd, Michael Ballantyne, Gregory Rosenblatt, and Matthew Might from ICFP: seven programming challenges solved (easily!) using a <I >relational</I> interpreter. One challenge, for example, is to find quines. Another is to find programs that produce different results with lexical vs. dynamic scope.</p>
<p >The interpreter is implemented in miniKanren (of course), inside Racket (of course). </p>FunFunctionalLogic/DeclarativeMon, 04 Sep 2017 18:44:29 +0000p5.js
http://lambda-the-ultimate.org/node/5450
<p >p5.js is a JavaScript library inspired by <a href="https://processing.org/">Processing</a>. Seems it could be a fun way to introduce non-CS types to programming. The <a href="http://hello.p5js.org/">demo</a> is particularly well done; check it out first. The actual home of the project is <a href="https://p5js.org/">here</a>. </p>FunGeneralTue, 11 Jul 2017 19:14:25 +0000Co-hygiene and quantum gravity
http://lambda-the-ultimate.org/node/5441
<p ><b ><a href="http://fexpr.blogspot.com/2017/06/co-hygiene-and-quantum-gravity.html">Co-hygiene and quantum gravity</a></b>. <span title=":P">Some light weekend reading by John Shutt.</span></p>
<p >The post starts with a dazzling proposition:</p>
<blockquote ><p >Gravity corresponds to pure function-application, and the other fundamental forces correspond to side-effects. ... quantum non-locality ("spooky action at a distance") is part of the analog to side-effects ...</p></blockquote>
<p >I can't do it justice here, so if you're interested in John's fascinating take on the relationship between lambda calculus and quantum physics, hop on over!</p>FunHistoryParadigmsTheorySat, 17 Jun 2017 15:11:24 +0000Portable Efficient Assembly Code-generation in High-level Python
http://lambda-the-ultimate.org/node/5251
<blockquote ><p ><a href="https://github.com/Maratyszcza/PeachPy">PeachPy</a> is a Python framework for writing high-performance assembly kernels.</p>
<p >PeachPy aims to simplify writing optimized assembly kernels while preserving all optimization opportunities of traditional assembly.</blockquote>
<p >
You can use the same code to generate assembly for Windows, Unix, and Golang assembly. The library handles the various ABIs automatically. I haven't seen this cool project before.</p>
<p >Among the cool features is the ability to invoke the generated assembly as regular Python functions. Nice.</p>DSLFunThu, 17 Sep 2015 00:53:19 +0000Tracking the Flow of Ideas through the Programming Languages Literature
http://lambda-the-ultimate.org/node/5203
<p ><i >Michael Greenberg, Kathleen Fisher, and David Walker, <a href="http://www.cs.princeton.edu/~mg19/papers/snapl2015.pdf">"Tracking the Flow of Ideas through the Programming Languages Literature"</a>, SNAPL 2015.</i></p>
<blockquote ><p >How have conferences like ICFP, OOPSLA, PLDI, and POPL evolved over the last 20 years? Did generalizing the Call for Papers for OOPSLA in 2007 or changing the name of the umbrella conference to SPLASH in 2010 have any effect on the kinds of papers published there? How do POPL and PLDI papers compare, topic-wise? Is there related work that I am missing? Have the ideas in O’Hearn’s classic paper on separation logic shifted the kinds of papers that appear in POPL? Does a proposed program committee cover the range of submissions expected for the conference? If we had better tools for analyzing the programming language literature, we might be able to answer these questions and others like them in a data-driven way. In this paper, we explore how <i >topic modeling</i>, a branch of machine learning, might help the programming language community better understand our literature.</p></blockquote>
<p >The authors have produced some really interesting visualizations of how the topic content of various conferences has evolved over time (it's interesting to note that OOPSLA isn't really about OO software development any more, and that PLDI appears to have seen an increasing emphasis on verification and test generation).</p>
<p ><b >Also of potential interest to LtU readers:</b> there is a prototype tool at <a href="http://tmpl.weaselhat.com/">http://tmpl.weaselhat.com/</a> that is based on the work presented in this paper. It allows you to upload a paper PDF, and will return the 10 most closely related papers according to the POPL/PLDI topic model. It could be a handy research tool. But, if nothing else, it's a fun way to see what else is related to a paper you're interested in.</p>FunGeneralHistoryMon, 20 Jul 2015 19:49:32 +0000Cakes, Custard, and Category Theory
http://lambda-the-ultimate.org/node/5200
<p ><A href="http://www.eugeniacheng.com/">Eugenia Cheng</A>'s new popular coscience book is out, in the U.K. under the title <A href="http://www.amazon.co.uk/Cakes-Custard-Category Theory-understanding/dp/1781252874/ref=sr_1_1?ie=UTF8&qid=1422244697&sr=8-1&keywords=eugenia+cheng">Cakes, Custard and Category Theory: Easy recipes for understanding complex maths</A>, and in the U.S. under the title <A href="http://www.amazon.com/How-Bake-Pi-Exploration-Mathematics/dp/0465051715/ref=sr_1_1?ie=UTF8&qid=1419352340&sr=8-1keywords=eugenia+cheng">How to Bake Pi: An Edible Exploration of the Mathematics of Mathematics</A>:</p>
<blockquote ><p >
Most people imagine maths is something like a slow cooker: very useful, but pretty limited in what it can do. Maths, though, isn't just a tool for solving a specific problem - and it's definitely not something to be afraid of. Whether you're a maths glutton or have forgotten how long division works (or never really knew in the first place), the chances are you've missed what really makes maths exciting. Calling on a baker's dozen of entertaining, puzzling examples and mathematically illuminating culinary analogies - including chocolate brownies, iterated Battenberg cakes, sandwich sandwiches, Yorkshire puddings and Möbius bagels - brilliant young academic and mathematical crusader Eugenia Cheng is here to tell us why we should all love maths.</p>
<p >From simple numeracy to category theory ('the mathematics of mathematics'), Cheng takes us through the joys of the mathematical world. Packed with recipes, puzzles to surprise and delight even the innumerate, Cake, Custard & Category Theory will whet the appetite of maths whizzes and arithmophobes alike. (Not to mention aspiring cooks: did you know you can use that slow cooker to make clotted cream?) This is maths at its absolute tastiest.<br >
</BLOCKQUOTE></p>
<p >Cheng, one of <A href="https://www.youtube.com/user/TheCatsters">the Catsters</A>, gives a guided tour of mathematical thinking and research activities, and through the core philosophy underlying category theory. This is the kind of book you can give to your grandma and grandpa so they can boast to their friends what her grandchildren are doing (and bake you a nice dessert when you come and visit :) ). A pleasant weekend reading.</p>Category TheoryCritiquesFunGeneralSemanticsTheoryFri, 17 Jul 2015 16:47:21 +0000 Don Syme receives a medal for F#
http://lambda-the-ultimate.org/node/5193
<p ><A href="http://research.microsoft.com/en-us/people/dsyme/">Don Syme</A> receives the Royal Academy of Engineering's <A href="http://www.raeng.org.uk/grants-and-prizes/prizes-and-medals/individual-awards/silver-medal">Silver Medal</A> for <A href="http://www.raeng.org.uk/news/news-releases/2015/july/pioneering-innovators-to-receive-academy-silver-me">his work on F#</A>. The citation reads:<br >
<BLOCKQUOTE ><br >
F# is known for being a clear and more concise language that interoperates well with other systems, and is used in applications as diverse asanalysing the UK energy market to tackling money laundering. It allows programmers to write code with fewer bugs than other languages, so users can get their programme delivered to market both rapidly and accurately. Used by major enterprises in the UK and worldwide, F# is both cross-platform and open source, and includes innovative features such as unit-of-measure inference, asynchronous programming and type providers, which have in turn influenced later editions of C# and other industry languages.<br >
</BLOCKQUOTE></p>
<p >Congratulations!</p>Cross language runtimesFunFunctionalGeneralImplementationObject-FunctionalOOPParadigmsSoftware EngineeringFri, 03 Jul 2015 19:16:06 +0000Conservation laws for free!
http://lambda-the-ultimate.org/node/5078
<p >In this year's <A href="http://popl.mpi-sws.org/2014/">POPL</A>, <A href="bentnib.org">Bob Atkey</A> made a splash by showing how to get <A href="http://bentnib.org/conservation-laws.pdf">from parametricity to conservation laws, via Noether's theorem</A>:</p>
<blockquote ><p >
Invariance is of paramount importance in programming languages and in physics. In programming languages, John Reynolds’ theory of relational parametricity demonstrates that parametric polymorphic programs are invariant under change of data representation, a property that yields “free” theorems about programs just from their types. In physics, Emmy Noether showed that if the action of a physical system is invariant under change of coordinates, then the physical system has a conserved quantity: a quantity that remains constant for all time. Knowledge of conserved quantities can reveal deep properties of physical systems. For example, the conservation of energy, which by Noether’s theorem is a consequence of a system’s invariance under time-shifting.</p>
<p > In this paper, we link Reynolds’ relational parametricity with Noether’s theorem for deriving conserved quantities. We propose an extension of System Fω with new kinds, types and term constants for writing programs that describe classical mechanical systems in terms of their Lagrangians. We show, by constructing a relationally parametric model of our extension of Fω, that relational parametricity is enough to satisfy the hypotheses of Noether’s theorem, and so to derive conserved quantities for free, directly from the polymorphic types of Lagrangians expressed in our system.
</p></blockquote>Category TheoryFunFunctionalLambda CalculusScientific ProgrammingSemanticsTheoryType TheoryTue, 28 Oct 2014 07:52:46 +0000Seemingly impossible programs
http://lambda-the-ultimate.org/node/5074
<p >In case this one went under the radar, at <A href="http://www.cse.psu.edu/popl/12/">POPL'12</A>, <A href="http://www.cs.bham.ac.uk/~mhe/">Martín Escardó</A> gave a tutorial on <A href="http://www.cs.bham.ac.uk/~mhe/.talks/popl2012/escardo-popl2012.pdf">seemingly impossible functional programs</A>:</p>
<blockquote ><p >
Programming language semantics is typically applied to<br >
prove compiler correctness and allow (manual or automatic) program<br >
verification. Certain kinds of semantics can also be applied to<br >
discover programs that one wouldn't have otherwise thought of. This is<br >
the case, in particular, for semantics that incorporate topological<br >
ingredients (limits, continuity, openness, compactness). For example,<br >
it turns out that some function types (X -> Y) with X infinite (but<br >
compact) do have decidable equality, contradicting perhaps popular<br >
belief, but certainly not (higher-type) computability theory. More<br >
generally, one can often check infinitely many cases in finite time.</p>
<p >I will show you such programs, run them fast in surprising instances,<br >
and introduce the theory behind their derivation and working. In<br >
particular, I will study a single (very high type) program that (i)<br >
optimally plays sequential games of unbounded length, (ii) implements<br >
the Tychonoff Theorem from topology (and builds finite-time search<br >
functions for infinite sets), (iii) realizes the double-negation shift<br >
from proof theory (and allows us to extract programs from classical<br >
proofs that use the axiom of countable choice). There will be several<br >
examples in the languages Haskell and Agda.
</p></blockquote>
<p >A <A href="http://math.andrej.com/2007/09/28/seemingly-impossible-functional-programs/">shorter version</A> (coded in Haskell) appears in Andrej Bauer's blog.</p>Category TheoryFunFunctionalParadigmsSemanticsTheoryWed, 22 Oct 2014 09:57:47 +0000