Composers combine notes. That’s all.
— Igor Stravinsky
Fun stack machine code (Python 3) posted to github in file sm.py
.
Examples:
1. Simple instruction: run("1 2 add") ==> 3
2. More complicated code: run("1 2 add 2 3 add mul") ==> 15
3. New instruction: run("defprog cube dup dup mul mul /defprog 3 cube") ==> 27
4. Use variables: run("3 a sto 4 b sto a rcl square b rcl square add") ==> 25
You can also run this at the command line, e.g., python3 sm.py 1 2 add
.
Verbosity is on by default, in which case you get a stack trace, e.g.,
[nano] python3 sm.py 1 2 add 3 add
=================================
code: [‘1’, ‘2’, ‘add’, ‘3’, ‘add’]
———
token: 1
stack: [1]
———
token: 2
stack: [1, 2]
———
token: add
in exop, stack: [1, 2, ‘add’]
stack: [3]
———
token: 3
stack: [3, 3]
———
token: add
in exop, stack: [3, 3, ‘add’]
stack: [6]
==============
6
Say python3 sm.py
for more information.
zipTimer: an iPod/iPhone app for pacing piano practice, cooking, workouts, you name it.
Accidental photo … did I drop my camera? No memory of this one!
zipTimer: an iPod/iPhone app for pacing piano practice, cooking, workouts, you name it.
The house deals from a huge, essentially infinite, deck of cards composed of spades, hearts, diamonds, and clubs in equal proportions. Each person plays separately against the house. On each round, cards are dealt until a heart appears. The cards are counted. If there are an odd number, the house wins, and the player pays one dollar to the house for each card. If there are an even number, the player wins, and the house pays him $1.04 for each card. Is this a fair game?
Explain.
zipTimer: an iPod/iPhone app for pacing piano practice, cooking, workouts, you name it.
“Hardy made certain to show no reaction as he listened to his own history, the awards and honorary degrees that authorized his renown. It was a litany he had become used to, and which sparked in him neither pride nor vanity, only weariness: to hear listed all he had achieved meant nothing to him, because these achievements belonged to the past, and therefore, in some sense, no longer belonged to him. All that had ever belonged to him was what he was doing. And now he was doing very little.”
The Indian Clerk, by David Leavitt
Part One, Chapter 1
Pythnon code at github. Used python3 star.py 6 3 star
to produce image, which will be both displayed and stored in star3.eps
. The image shown here was subsequently modified with Pixelmator, e.g., produce white-on-black image instead of black-on-white.
zipTimer: an iPod/iPhone app for pacing piano practice, cooking, workouts, you name it.
Pythnon code at github. Used python3 star.py 4 3 cross
to produce image, which will be both displayed and stored in cross3.eps
. The image shown here was subsequently altered with Pixelmator (blue overlay added)
My ideas usually come not at my desk writing but in the midst of living.
– Anais Nin
zipTimer: an iPod/iPhone app for pacing piano practice, cooking, workouts, you name it.
My ideas usually come not at my desk writing but in the midst of living.
– Anais Nin
zipTimer: an iPod/iPhone app for pacing piano practice, cooking, workouts, you name it.
My ideas usually come not at my desk writing but in the midst of living.
– Anais Nin
zipTimer: an iPod/iPhone app for pacing piano practice, cooking, workouts, you name it.
Compositium 3 consists of four superimposed copies of an image representing two plumes created by Brownian motion. The copies have been translated, flipped, and arranged to counterbalance the irregularity of the plumes with a degree of symmetry and also to fill the canvas.
The original Brownian motion image was made with a new version of Kaleidoscope, an iphone app for running simulations and procedural art animations. This version features a drop-in architecture by means of which different dynamical systems can be dropped into the app with no changes to the rendering engine.
My ideas usually come not at my desk writing but in the midst of living.
– Anais Nin
zipTimer: an iPod/iPhone app for pacing piano practice, cooking, workouts, you name it.
Related: Compositium 1 | Compositium 2