Skip to content

Instantly share code, notes, and snippets.

View acbart's full-sized avatar

Austin Cory Bart acbart

View GitHub Profile
@acbart
acbart / Platipy Todo
Last active December 12, 2015 08:08 — forked from rdeaton/gist:4734021
Spyral:
* Event unregistering
- All events in a namespace
- A specific namespace -> handler mapping
* Move animation code into Sprites
* Get rid of sprite.update
* Let Scenes be actors
* Fix AggregateSprites
* Add sprite.kill
* Fix clock bug
@acbart
acbart / SpriteCSS
Last active December 12, 2015 08:08
Example Syntax for different abilities in our Sprite CSS language - should be parsable with YAML
# Comment
# Should these be broken up by Scene? By Sprite?
# Do we use "eval" to parse values?
# Style collection of widgets
.style:
property: value
# Variables
@acbart
acbart / blockpy_dict_blocks
Created February 3, 2015 19:51
dict_get and dict_create_with blocks for blockpy
// The raw blocks
Blockly.Msg.TYPE_CHECK = "check type of"
Blockly.Msg.DICT_KEYS = "get all keys of "
Blockly.Msg.DICT_GET = "get value of key"
Blockly.Msg.DICT_GET_TO = "from"
Blockly.Msg.DICTS_CREATE_WITH_INPUT_WITH = "dict of"
Blockly.Msg.DICTS_CREATE_WITH_TOOLTIP = "Create a new dictionary"
Blockly.Msg.DICTS_CREATE_EMPTY_TITLE = "Create empty dict"
Blockly.Msg.DICTS_CREATE_WITH_CONTAINER_TITLE_ADD = "key-value pairs"
@acbart
acbart / gist:5df7062cb4861f09ebd2
Last active November 17, 2023 08:49
Blockly SVG -> Image
function render() {
aleph = Blockly.svg.cloneNode(true);
aleph.removeAttribute("width");
aleph.removeAttribute("height");
aleph.removeChild(aleph.children[0]);
aleph.removeChild(aleph.children[1]);
aleph.removeChild(aleph.children[1]);
if (aleph.children[0].children[1].children[0] !== undefined) {
aleph.children[0].removeChild(aleph.children[0].children[0]);
aleph.children[0].children[0].removeAttribute("transform");
id Base Curb Weight Acceleration Driveline Hybrid Height Length Width Top Speed Model Year Engine Engine Type Horsepower Make Size Torque Transmission Number Of Forward Gears Classification year highway_mpg city_mpg fuel
2004 Pontiac GTO Coupé Pontiac 5.7L 8 Cylinder 6 Speed Manual 0 0 0 0 0 0 2004 Pontiac GTO Coupé Pontiac 5.7L 8 Cylinder 8 Cylinder 0 Pontiac 5.7 0 6 Speed Manual 6 Manual transmission 2004 26 16
2004 Pontiac GTO Coupé Pontiac 5.7L 8 Cylinder 4 Speed Automatic 0 0 0 0 0 0 2004 Pontiac GTO Coupé Pontiac 5.7L 8 Cylinder 8 Cylinder 0 Pontiac 5.7 0 4 Speed Automatic 4 Automatic transmission 2004 20 15
2005 Pontiac GTO Coupé Pontiac 6.0L 8 Cylinder 4 Speed Automatic 0 0 0 0 0 0 2005 Pontiac GTO Coupé Pontiac 6.0L 8 Cylinder 8 Cylinder 0 Pontiac 6 0 4 Speed Automatic 4 Automatic transmission 2005 19 14
2005 Pontiac GTO Coupé Pontiac 6.0L 8 Cylinder 6 Speed Manual 0 0 0 0 0 0 2005 Pontiac GTO Coupé Pontiac 6.0L 8 Cylinder 8 Cylinder 0 Pontiac 6 0 6 Speed Manual 6 Manual transmission 2005
@acbart
acbart / gist:5d3fdfd8d363af26a59c
Created June 25, 2015 11:57
The nine inhabitants of Bool -> Tri
F1: Bool -> Trio
True -> Link
False -> Gannon
F2: Bool -> Trio
True -> Link
False -> Zelda
F3: Bool -> Trio
True -> Link
False -> Link
F4: Bool -> Trio
@acbart
acbart / gist:c695355880a706a4ff59
Last active August 29, 2015 14:23
The eight inhabitants of Tri -> Bool
G1: Trio -> Bool
Link -> True
Zelda -> True
Gannon -> True
G2: Trio -> Bool
Link -> True
Zelda -> True
Gannon -> False
G3: Trio -> Bool
Link -> False
good = [0,1,2,3]
good.append(5)
bad = "Not a list"
bad.append(5)
B…y.BlockSvg
RTL: false
childBlocks_: Array[0]
collapsed_: false
colourHue_: 170
comment: null
contextMenu: true
deletable_: true
disabled: false
editable_: true
@acbart
acbart / gist:75e8ae0bec497da18b60
Last active August 29, 2015 14:28
Why is computing hard to learn?
I’m not familiar with that article, but it reminds me of one of my “first day of class” lectures.
Imagine you were assigned to write a 20-page paper, by the end of the semester, on Napoleon’s invasion of Russia. What would you need to know?
[Guided classroom discussion, usually producing something like the following:]
Know about Napoleon and Russia
Know how to do library research
Know how to structure a 20-page paper so it’s coherent.
Know how to budget your time so you finish it by the end of the semester
Now suppose you were required to write this paper in Swedish, using a quill pen. What else would you need to know?