Skip to content

Instantly share code, notes, and snippets.

@rndmcnlly
rndmcnlly / Bloom Ladder Quizzes Development.md
Last active November 9, 2023 01:38
I had a chat with ChatGPT about how to make a quiz for my class, and the scope grew and grew.

You:

What are the important things I should remember about the Flyweight pattern so that I will know how to apply it and evaluate the correctness of the application?


ChatGPT:

The Flyweight pattern is a structural design pattern that is all about using memory efficiently. It's particularly useful when dealing with a large number of objects that have some shared state. Here are the key points to remember about the Flyweight pattern:

@rndmcnlly
rndmcnlly / README.md
Last active September 8, 2022 22:13
NeoFeud on Android

This guide describes how to play NeoFeud by Silver Spook Games on Android devices. These steps should work for almost any other game created in Adventure Game Studio (AGS) as well.

Requirements

Guide

@rndmcnlly
rndmcnlly / interstellar.als
Created September 3, 2022 22:54
Alloy model of space trading simulation game
-- This a mostly-faithful translation of interstellar.lp from https://gist.github.com/rndmcnlly/cc801233012df3cb0883
-- Integer-indexed orbitals were dropped in favor of systems just having a set of planets because the order isn't interesting.
-- This first block of definitions defines the static configuration of the story world.
sig Commodity {}
private enum Equipment { Jumpdrive }
private enum Location { Orbit, Surface }
fun shuttleDestination: Location -> one Location { Orbit -> Surface + Surface -> Orbit }
@rndmcnlly
rndmcnlly / sudoku.als
Created September 2, 2022 20:50
Sudoku solving in Alloy
sig Number {}
sig Group {contains: disj set Number} {
#contains = 3
}
one sig Board {
assign: Number -> Number -> one Number
} {
all n, x: Number | one assign.n & x -> Number
all n, y: Number | one assign.n & Number -> y
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rndmcnlly
rndmcnlly / README.md
Last active February 22, 2021 19:04
A search engine in a gist!

This gist implements a self-contained search engine for the VisualGenome scene corpus. The user interface is built from ipywidgets and presented with Voilà. The corpus is downloaded in the postBuild script so that fresh Binder sessions don't need to wait for this each time. Ideally even more pre-processing would be done here so that the interface gets to a responsive state faster.

launch binder

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rndmcnlly
rndmcnlly / Grid Embedding.ipynb
Created May 7, 2017 21:24
Recreating the grid embedding tool from https://adamsmith.as/papers/fdg2012generation.pdf with Clingo-5
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.