Happy Birthday, dear Lambda: 17 is good edition

Seventeen years ago to the day, LtU was born. I guess it's about time I stop opening these birthday messages by saying how remarkable this longevity is (this being the fate of Hollywood actresses over 25). Still, I cannot resist mentioning that 17 is "good" (טוב) in gematria, which after all is one of the oldest codes there are. It's is very cool that the last couple of weeks had a flurry of activity. This old site still got game.

I will not try to summarize or pontificate. The community has grown too big and too unruly for that and I have been more an absent landlord recently than a true participant (transitioning from CS to being a professional philosopher of science and having kids took a bit more of my free time than I expected).

One thing I always cherished about LtU was that we welcomed both professional, academic work, and everything and anything that was cool and fun in programming languages. It was never a theory only site. So here's a little birthday party game instead of a long summary.

Which new (or old) languages inspire you to think that a good language can smoothly allow people to reach heretofore hard to reach semantic or abstraction levels?

I mean things that affect how the little guy thinks, not formal semantics, category theory, or what have you.

I'll start with two unconventional languages that I have had the pleasure (and exasperation) of using recently. Both are in some respects descendants of Logo, the language through which I was introduced to programming when I was a ten year old child in Brookline. They are NetLogo and ScratchJr.

NetLogo is a language for building agent based models (here's a classic ABM for you to enjoy; if you install NetLogo there's an implementation in the model library). While some aspects of the language semantics (and syntax) are irritating, NetLogo is very good at what it does. I may say more in the comments, but the key is that a simulation consists of multiple agents, who can move and interact, and the language makes building such simulations straightforward. There is a central clock; you can address multiple agents using conditions ("ask guys with [color = red] [die]"); implicitly have code run by each agent etc. In fact, you hardly think about these issues. If you have no previous background in programming, it feels natural that keeping track of these and other details is not part of the task programming.

ScratchJr is for young kids. It allows them to create little animated scenes, which may be responsive to touch and so on. You can record sounds and take pictures and use them as first class elements in your animations. But the nice thing for me was to notice how natural it is for kids to use the event-driven model (you can "write" several bits of code, and each will execute when the triggering event happens; no need to think about orchestrating this) as well as intuitively understand how this may involves things happening concurrently. These things just emerge from the way the animations are built, they are not concepts the programmer has to explicitly be aware of (which is a good thing, considering she is typically a five year old).

When I see philosophy students writing netlogo and reasoning about the behavior of the agents and when I see kids playing with ScratchJr, I am reminded why I found this business of "engineering abstractions" so enticing when I first used structured programming to design vocabulary for the program I was writing and when I heard some language described as a language for stratified design.

So which are your nominations for cool language based abstractions, for the little guy? Just to give us all some motivation and maybe get me worked up enough to finally delve into algebraic effects?

Happy birthday, LtU-ers. Keep fighting the good fight!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Egel Language

Egel is a small toy language based on eager combinator rewriting which could be nice for novice programmers. For academics, the closest is untyped lambda calculus, or -of course- combinator calculi like SKI.

A small example:


namespace Fibonnaci (
  using System

  def fib =
    [ 0 -> 1
    | 1 -> 1
    | N -> fib (N-2) + fib (N-1) ]
)

using Fibonnaci

def main = fib 5

Because it does away with types, the only thing you need to learn students is rewriting; i.e., expansion and substitution. It has rewriting semantics so when a combinator fails to rewrite on a pattern because none of the alternatives match, it will just return the unevaluated application.

Egel is homoiconic, it centers around the basic building blocks of a combinator and clearly denotes the definition of those with square brackets. Constants are written in lowercase, variables in uppercase.

def flip = [ F, X, Y -> F Y X ]

It's just a fun manner of introducing people to the basics of functional programming. There is a rudimentary website for Egel here, and work is in progress on an interpreter on github. I wrote a small number of example programs.

At the moment you can write small programs for the interpreter and it features a basic REPL. The interpreter should compile and run on any unix with libicu, unicode support installed.

Pure Language

Have we ever discussed the Pure Language or other term rewriting languages at LtU? There are some interesting examples.

Happy birthday LtU!

This has been one of my favorite websites for years, thank you for starting it Ehud!

I am also a big fan of Logo and the ideas that Seymour Papert had for teaching elementary school mathematics ("mathland").

For my son, building logic gates in Minecraft was probably the most useful tool to help him understand basic logical connectives. Programming-focused games like Lightbot and "Human Resource Machine" were also pretty effective (Lightbot is kind of like a goal-oriented, discrete version of Logo).

Ages? I've recently went

Ages?

I've recently went back to Papert's notion of "object-to-think-with" for a paper I am writing (on simulations in population genetics). It's in Mindstorms. I was reminded how inspiring that book was. (I read it as a kid, so I wasn't the target audience, but his story about gears sure made me think about gears a lot.)

My son is 11 now, but was 7

My son is 11 now, but was 7 when he first got started with Minecraft (and I tried a few other games with him before that). I also really liked Papert's Mindstorms book and many of the other things that he wrote. It's very sad that he died recently.

Redstone is a fun way to think about circuits, almost like real electrical circuits in a lot of ways. Now my son spends a lot of time playing Pokemon and seems to have a lot of wild theories about combining probabilities (but I have a hard time following all of it).

Yeah, we should try

Yeah, we should try Minecraft... My daughter didn't seem interested (she somewhat enjoyed the books). In school they were introduced to CodeMonkey. Don't get me started on Pokemon.

This is a good time to

This is a good time to mention that I'm leaving PL. I mean, I will continue doing the research I've been doing, but I've stopped seeing it as PL research and more as interactive abstraction environments that help users solve problems and generalize their solutions. Of course, that could easily have been PL, but the area seems to be saturated with other topics, so might as well branch out.

Still sounds very PLy to

Still sounds very PLy to me...

Yes. But communities are

Yes. But communities are formed around conversations, and the PL community just isn't interested in having these conversations. And we won't be competing with the machine learning zeitgeist head on unless we change up our game.

Or to put it this way: there is an obvious opportunity of applying PL concepts in new ways to create new user experiences. But it is post-PL, it doesn't have to fit in the current socially defined framework that we see as PL.

Still sounds very LtUy to me :-)

Fortunately, we of LtU are our own community.

I'm not leaving LtU, well, I

I'm not leaving LtU, well, I don't interact much here anymore. But when I have something new to show, I'll post it for sure.

Good thinking!

You should turn that idea into tools people can use for logics. I.e., define a logic and interactively 'debug' it. Could be useful for lots of PhD students.

Then again, there already is ghc..

It sounds like PL left you

Fields of research are defined by the set of questions they ask. When the questions seem irrelevant it's time to start a new field.

It's where the money is

Afaik, science is driven by funding, and funding is driven by political consensus. In the end, science is where the money is.

Don't cry for me, PL Research

PL can't "leave you" if what you're doing isn't what PL research normally does.

Most PL research focuses on dealing with symbolic languages. This has naturally tended to gravitate towards the formal possibilities this entails, for a variety of good reasons.

The idea that fields are "defined by the set of questions they ask" doesn't capture the existence of relationships between the questions. It suggests an arbitrariness that doesn't match the observed reality. Some classification systems are more useful than others.

There's a very natural division between the user interface to programming, and the symbolic representation, manipulation, and comprehension of programs. It doesn't seem at all surprising that these would be different fields or subfields.

There are many concerns that are mostly confined to the user interface & experience field, but languages with a visual representation are still going to have mappings to a symbolic form. As soon as you're dealing with something for which such a mapping exists, all traditional PL research will apply.

We don't generally confuse tools like spreadsheets, or Mathematica, with mathematics itself. The case with PLs seems quite similar.

Fields pivot all the time.

Fields pivot all the time. They chase after the hotness, AI becomes machine learning becomes deep learning, almost no one is doing old AI anymore because...no one will read their papers or fund their projects.

PL was supposed to have a monopoly on the use of language to instruct computers by building programs, but how that is actually defined by the community is very narrow. In fact, that PL has not cared much about programmer experiences at all is a travesty, this neglect have had huge detrimental effects on otherwise very viable languages (e.g. one that starts with an S). Language cannot be detached from how it is used, or the interface that it is used. If it is, then it just becomes another theory area that most people won't be able to emphasize with.

But anyways, I'm not even worried about this. Rather, ya, some of the PL concepts we kick around the community can be usefully applied to programming and programming environments, but we don't talk about that, so you aren't going to be able to pick out those ideas in context by reading POPL proceedings, for example. For the work I'm doing, language is a means, not an end.

People are voting with their feet

I increasingly see people concerned with the human aspects of PL moving into adjacent fields such as HCI, Design, Information Science, and Education.

Depends

We don't generally confuse tools like spreadsheets, or Mathematica, with mathematics itself.

You could arguably make the case that that is exactly what a lot of academic research is about. Confusion of tools with mathematics, i.e., the tool should be mathematical as possible. This whereas tools which concentrate on just being tools, a convenient thing in the hands of a programmer, usually beat whatever that line of thought produces.

Not against that line of research, but the premise might be wrong.

mixin it up

Seventeen years ago to the day, LtU was born.

Congrats :)

Which new (or old) languages inspire you to think that a good language can smoothly allow people to reach heretofore hard to reach semantic or abstraction levels?

I think one big area that languages have to figure out "for the normal person" is concurrency. CPUs are going wide, but not speeding up, so even the typical cheap phone now has 4+ CPU cores. Somewhere over 99% of system programmers cannot write safe concurrent code to save their lives. Functional programming abstractions can help, particularly if everything you build is a spreadsheet, and even-driven programming models look like a good solution for many other cases.

So which are your nominations for cool language based abstractions, for the little guy? Just to give us all some motivation and maybe get me worked up enough to finally delve into algebraic effects?

As a rule of thumb: Make the simple things simple, and the hard things possible.

My choice for "thing I'd most like to see become pervasive" in OO programming languages: the concept of the mix-in.

Now what was that language

Now what was that language that emphasized mixins...

Scala at one time.

Scala at one time.

prediction ...

There will probably be at least one more language supporting mixins in the near future ;-)

Programming games

We're working toward an even more explicitly game-like introduction to programming with the Reduct game (CHI'17). It's not really "programming" yet, but hopefully the next iteration will be. Fans of lambda calculus should find it comfortable.

It is a fun game, but I

It is a fun game, but I don't seem to get what it has to do with programming?

The Lambda Calculus is a way that describes how the computer works, when programmers should really focus on abstraction and problem solving, lambda is a silent implementation detail.

Incidentally, I wonder what

Incidentally, I wonder what a game focused around abstraction would look like? Take concrete things, generalize them, use them in different ways?

Ha!

That was so addictive that I finished all 72 of them. Now I am not sure whether to thank or scoff you.

Great game.

Congratulations

This is very nice. It might even serve as an introduction to sub-structural logics and/or the linear lambda-calculus.

Fun

My only wish in doing them is that you had a couple of harder puzzles for each new concept you introduce, before moving on to the next concept. For example, is it even possible to make a wrong move on puzzle 71, the penultimate puzzle?

It is an excellent introduction to the experience of programming

It is an excellent introduction to the experience of programming because it progressively introduces new notation that is more cumbersome but the same power as the old. The only problem is that it has been made easy to the point that there is not much "puzzle" involved in the puzzle game. Linearly and affine typed objects would make the game more interesting and they are a common feature of puzzle games.

I introduced it to the #esoteric channel and they were excited by thought that unlocking the hidden levels would give you access to delimited continuations. I think adding continuations would also would have some interesting puzzle possibilities.

Happy birthday

Happy birthday, LtU :)

I have drifted away in recent years, but lately I find myself maintaining a JIT compiler (LuaJIT fork - "RaptorJIT") and so maybe it is time to re-engage :)

Welcome back, Luke :)

Welcome back, Luke :)