This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var binaryFormat = { | |
name: "jRPG binary format", | |
extension: "bin", | |
write: function(map, fileName) { | |
var m = { | |
width: map.width, | |
height: map.height, | |
layers: [] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEFINT A-Z | |
' this program sets 160x120 256 color VGA mode in QB1.1 | |
' downsides: qbasic drawing commands absolutely don't work correctly | |
' trick qbasic into thinking we're in VGA mode | |
SCREEN 13 | |
' set EGA mode 0Dh through int 10h in assembly | |
' this is equivalent to SCREEN 7 and using SCREEN 7 will work, but |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace DoubleDabble { | |
class Program { | |
static void Main(string[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<!-- | |
Just search and replace the following tags: | |
{name} replace with your printed name (ex 'Elon Musk') | |
{image-url} replace with a 4:3 image, presumably your avatar | |
{twitter-username} replace with your twitter username (ex 'elonmusk') | |
{profile-url} replace with your mastodon profile url (ex 'https://mastodon.social/@Gargron') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Interpretoy REPL</title> | |
</head> | |
<body> | |
<script> | |
// based on lispy by Peter Norvig: http://norvig.com/lispy.html | |
function load(source) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pico-8 cartridge // http://www.pico-8.com | |
version 18 | |
__lua__ | |
--[[function spline(x0,y0,x1,y1,c) | |
local dx = x1 - x0 | |
local dy = y1 - y0 | |
local step = dx/dy | |
local x = x0 - (y0 % 1) * step | |
local y = flr(y0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// coroutines for C adapted from Simon Tatham's coroutines | |
// https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html | |
// | |
// this implementation utilizes __VA_ARGS__ and __COUNTER__ | |
// to avoid a begin/end pair of macros. | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
// modify this if you don't like the `self->name` format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seed = 38 | |
function txp1() | |
if seed == 1 then | |
return seed | |
elseif seed % 2 == 0 then | |
seed /= 2 | |
else | |
seed = seed * 3 + 1 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading; | |
namespace Franca { | |
[StructLayout(LayoutKind.Explicit)] | |
public struct IncrementalID : IEquatable<IncrementalID>, IComparable<IncrementalID> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
public class P8Writer { | |
public const int RomSize = 0x4300; | |
NewerOlder