Grilled Cheese

ExploreLog inSign up
Terms of UsePrivacy PolicyCommunity StandardsHelpGet the app

Grilled Cheese is a product of Village Compute

Version devBuilt at: 2026-12-03 22:42:33 EST

PhotosVideosAllPeople
LatestRanked
@raganwald.functional.cafe.ap.brid.gyNov 21, 2026, 3:31 PM

WIP on this #concatenativelanguage idea. Here we define `cons`.

1. Quoted placeholders that match what must be to the left of `cons`;

2. A proper (closed over the placeholders only) definition of how to rewrite the matching quoted placeholders if `cons` is […]

[Original post on functional.cafe]

// [B] [A] cons == [[B] A]
export const cons = define('cons', [ [B], [A] ], [ [[B], A] ],
  [ [], coup, sap ],
  [ [[], k], [], sPrime ],
  [ cake, [], k ]
);
@raganwald.functional.cafe.ap.brid.gyNov 15, 2026, 4:58 PM

“Run!”—Dr. Alan Grant, Jurassic Park (1993)

#concatenativelanguage

import { A } from "../tooling/placeholders.common";
import { proper } from "../tooling/proper";

export const run = proper([ [A] ], [ A, [A] ], 'run');
@raganwald.functional.cafe.ap.brid.gyNov 15, 2026, 4:31 PM

I was today years old when I learned that the #concatenativelanguage wiki https://concatenative.org:

“Was built with the #Factor web framework, Furnace. The HTTP server is written entirely in Factor and supports HTTPS via the OpenSSL binding. Wiki pages are written using the Farkup markup […]

functional.cafeOriginal post on functional.cafe
@raganwald.functional.cafe.ap.brid.gyNov 9, 2026, 2:32 PM

Promises made, promises kept. May I present... 🥁...

The Resplendent Quetzal, a fixed point construction for Concatenative Combinators, a #concatenativelanguage. It's isomorphic to the Z combinator, via a “long-tailed-lark.”

In the example implementation of […]

[Original post on functional.cafe]

/*
 * The Resplendent Quetzal is a fixed point combinator that adapts the Z combinator
 * to Concatenative Combinators. In classical combinatory logic, the Y combinator
 * has at its heart a lark, ƛf.ƛx.f(xx). To work in a call-by-value language, we make
 * one more parameter eplicit: ƛf.ƛx.ƛu.f(xx)u. That is the Z combinator.
 * 
 * In Concatenative Combinators, the lark is defined as [B] [A] lark == [[B] B] A. To
 * function as a call-by-value fixed point, we define the long-tailed-lark as
 * [C] [B] [A] longTailedLark == [C] [[B] B] A. The extra [C] serves the same function
 * as the `u` in the Z combinator.
 * 
 * When we make a Z combinator using a long-tailed-lark, we have a Resplendent QUetzal.
 */

// [C] [B] [A] longTailedLark == [C] [[B] B] A
export const longTailedLark = proper([ [C], [B], [A] ], [ [C], [[B], B], A ]);

export const resplendentQuetzal = construction([ [Fn] ], [ [longTailedLark], [mockingbird], bluebird ]);

displayAs({ 'long-tailed-lark': longTailedLark, 'resplendent-quetzal': resplendentQuetzal });

// ---------- test cases ----------

const isEven = construction([ [N] ], [
  [
    swap, dup, isZero,
      [
        [pred], cons,
        dup, isZero,
          [
            [pred], cons, thrush
          ],
          [ zap, zap, [F] ],
        cond
      ],
      [ zap, zap, [T] ],
    cond
  ], resplendentQuetzal
]);

test("resplendent-quetzal isEven", () => {
  expect(render([ [0], isEven ])).toEqual(render([ [T] ]));
  expect(render([ [1], isEven ])).toEqual(render([ [F] ]));
  expect(render([ [2], isEven ])).toEqual(render([ [T] ]));
  expect(render([ [3], isEven ])).toEqual(render([ [F] ]));
});
@raganwald.functional.cafe.ap.brid.gyNov 7, 2026, 9:39 PM

New #concatenativelanguage goal:

Write a combinator worthy of the Smullyan/Church nickname “The Resplendent Quetzal.” I happen to be working on a fixed point combinator, and if it ends up with a structure anything like Y/Z, I may have my name.

mastodon.social#CostaRica #Birds Woke up before the birds to get a chance to see the Resplendent Quetzal. Bingo!! Saw several males and one female. They are magnificent!! This was such a treat. (photo attached)
@raganwald.functional.cafe.ap.brid.gyNov 3, 2026, 9:35 PM

Concatenative Combinators aren’t a #concatenativelanguage in the strict sense. Although it’s true that any two valid programs catenated together form a valid program, it is not true that any bisection of a valid program results in two valid programs.

This is because concatenative combinators […]

functional.cafeOriginal post on functional.cafe
@raganwald.functional.cafe.ap.brid.gyOct 29, 2026, 12:49 PM

A #concatenativelanguage built around a dequeue seems like the perfect language for fooling around with Post machines.

https://concatenative.org/wiki/view/Deque

concatenative.orgDeque