Skip to content

Instantly share code, notes, and snippets.

@RhetTbull
RhetTbull / minimal.py
Last active December 9, 2024 16:08
Implements a minimalist macOS Cocoa application in python using pyobjc that doesn't require a NIB file
"""Implements a minimalist Cocoa application using pyobjc
Based on the example found here:
https://www.cocoawithlove.com/2010/09/minimalist-cocoa-programming.html
To run this:
- save as minimal.py
- pip3 install pyobjc
- python3 minimal.py
@nataliefreed
nataliefreed / turtle.pde
Last active March 21, 2025 10:26
Turtle Graphics in Processing: This program shows another way to think about moving through Processing's coordinate system, inspired by Logo. Instead of placing points on a grid, you can imagine yourself as being somewhere on the grid, facing a direction. You can move forward or turn. The drawn line follows behind you.
// Turtle Graphics in Processing
// Natalie Freed, February 2013
// This program shows another way to think about moving
// through Processing's coordinate system. Instead of placing
// points on a grid, you can imagine yourself as being somewhere
// on the grid, facing a direction. You can move forward or turn.
// The drawn line follows behind you.
PVector loc; //current location
float orientation; //current orientation