Demos

Screens that ship with LP-9: business tables and entry, child windows, a monitoring wall, things moving on a map. Each is written in LP-9 alone, with no other library.

Every picture on this page is a frame LP-9 drew itself, without opening a window.

LP-9 also comes with small programs that show one feature of the language at a time; they are listed at the end of this page.

Haneda Airport

Haneda: four runways, taxiways, aircraft on the aprons, and the radio traffic bottom left

North wind: landing on 34L and 34R, leaving from 34R and 05

Four runways, 750 taxiways, the aprons, the terminals, the shore of Tokyo Bay. Not a picture: lines and faces in decimetres, from OpenStreetMap. Panning and zooming are a multiply and a divide, so it stays sharp however close it is looked at.

Every aircraft is an actor, and the only thing that knows where it is. It taxis along a route worked out from the taxiways and, at the holding point, asks the tower for the runway -- the one thing on an airport that cannot be shared. It asks again where its route crosses a runway in use, and an arrival asks before it starts the approach. A queue at any of the three is that message not having come back yet.

The radio in the corner is the traffic itself. Every line is a message one actor sent another; nothing is written for the display.

At first a frame drew 7,392 pieces: an empty piece was stretching its parent's box to the window's top left corner, so the rectangle to draw again was the whole window. With that fixed, and groups skipped by their box, a frame draws 427. The 750 taxiways are passed over with one comparison.

The World's Aircraft

1,200 aircraft flying over a world map

1,200 aircraft, each an actor moving at its own interval

The coastlines are 5,128 points of Natural Earth data, projected to Mercator and written as whole numbers. The map is lines drawn with Paint line:, and so is every aircraft: fuselage, wing and tailplane. Panning and zooming are a multiply and a divide; not one Float is used.

Each of the 1,200 aircraft is an actor flying its own leg between two airports at its own interval. It knows nothing of the others or of the window: it is told where the map is looking, works out its place on the screen, and answers a description. A region whose aircraft did not move answers the same description as last frame, so the runtime leaves those pixels alone.

A Monitoring Wall

A wall of 280 readings, those out of band in red

283 actors; the red ones are out of band

280 readings, each an actor with its own interval, its own walk and its own band. No clock drives them together and no list is swept. It is the opposite of a game: in a frame a few change, and the rest answer the same description as before.

The median frame drew 16 pieces. A frame in which eleven cells moved draws eleven small rectangles, not two hundred and eighty.

Everything the Screen Can Do

The market page: eight stocks with price, change and trend, the tape, the risers and the indices

Pick a page on the left; this is the market

Every widget in one window: a list of pages on the left, the chosen page on the right. Market, monitoring, buttons, input, text, choices, lists, progress, dates, layers, shapes and colours. Each page is one method answering a Paint, so adding one is a name in the list and a method beside the others.

On the market page an actor per stock posts its own prices at its own interval, and one actor collects them and hands them to the tape, the ranking of risers and the sector averages. No thread or clock is written anywhere: while a turn is parked in OS sleep:, the domain runs the other actors.

A Table of Orders

A table of orders: slip number, due date, item, quantity, amount

Columns are defined once; the heading, the cells and the sorting read the same definition

A column is a value: a title, a width, and whether it reads right to left. The heading, each row's cells and the sorting all read the same columns. The rows are actors owning their regions, so a row that did not change is the same description as the frame before. The heading is outside the scrolling box, so it stays while the rows move under it.

The quantity can be typed into. The typed quantity is held by the row's actor, so sorting and saving ask the rows, and sort and save what is shown now rather than what was loaded. Amounts are Decimal.

Child Windows

Three child windows overlapping inside one window

Drag by the title bar; a press brings one to the front; the corner resizes

Windows inside one window, each an actor owning its region. The stacking order is the Array of windows itself: Paint group: draws later pieces over earlier ones, and a press looks backwards, so the one on top answers. Bringing a window to the front is moving it to the end of the array.

The confirmation dialog is lifted with Paint modal:. While it is up, a press that misses it reaches nothing.

The Small Programs

Programs that show one feature at a time, numbered in reading order.