This file contains 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
/* Scenario 2008-2009 Bruce Pascoe | |
Version 2.1 | |
Scenario is an advanced cutscene engine for Sphere which allows you to | |
coordinate complex cutscenes via forks and synchronization. | |
*/ | |
function Scenario () | |
{ | |
this.FadeMask = CreateColor(0,0,0,0); | |
this.FocusStack = []; |
This file contains 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
#!/usr/bin/env ruby | |
require 'yaml' | |
# colorscheme_dir is the directory where all the YAML color scheme files are stored, | |
# current_colorscheme is the path to a symlink to a file in that directory. | |
$colorscheme_dir = "#{ENV['HOME']}/colorschemes" | |
$current_colorscheme = "#{ENV['HOME']}/.colorscheme" | |
$i3_config = "#{ENV['HOME']}/.i3/config" | |
$i3_config_marker_start = "### Autogenerated by ~/scripts/colorscheme ###" |
This file contains 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
// Syntax note: optionally whitespace-sensitive, \ is an alias for function, | |
// and -> at the end of a function means return the last value. | |
// Haskell-style (operator), which is implicit if an operator is the only | |
// argument to a function. | |
// The return value of a type function is compared to the value put in, | |
// and if they are === it type checks. | |
function Int(n) -> Math.floor(n) | |
function add(a: Int, b: Int) -> a + b |
This file contains 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
add := method(a, b, a + b) | |
getSlot("add") message setName("b") | |
getSlot("add") message next setName("-") | |
getSlot("add") message next argAt(0) setName("a") | |
# `add` now looks like | |
# method(a, b, b - a) | |
# Now I can't seem to get this part to work: |
This file contains 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
#!/usr/bin/env perl | |
use v5.16; # given/when | |
use strict; | |
use warnings; | |
use Getopt::Long::Descriptive; | |
use LWP::Simple; | |
use Mojo::DOM; | |
use Data::Dumper; | |
use Text::CSV::Slurp; |
This file contains 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
#pragma once | |
#include <memory> | |
#include <utility> | |
/** | |
* 𝕬𝖇𝖆𝖓𝖉𝖔𝖓 𝖆𝖑𝖑 𝖍𝖔𝖕𝖊, 𝖞𝖊 𝖜𝖍𝖔 𝖊𝖓𝖙𝖊𝖗 𝖍𝖊𝖗𝖊 | |
* | |
* | |
* You have been WARNED |
This file contains 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
#pragma once | |
#include <inttypes.h> | |
#include <limits.h> | |
namespace w30 { | |
typedef uint64_t state; | |
typedef uint32_t uint; |
This file contains 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
# encoding: utf-8 | |
require 'rubygems' | |
gem 'ruby-enum' | |
gem 'unicode' | |
require 'ruby-enum' | |
require 'unicode' | |
module IPA |
This file contains 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
import { CourseHelpers } from '../CourseData'; | |
import { Strategy, Aptitude } from '../HorseTypes'; | |
import { Region } from '../Region'; | |
import { Rule30CARng } from '../Random'; | |
import { RaceSolver, SkillType, SkillRarity } from '../RaceSolver'; | |
const base = { | |
speed: 1400, | |
stamina: 800, | |
power: 1000, |
This file contains 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
/** | |
* Use the PEXT instruction and perfect hash functions to store small integer maps | |
* inside a uint64_t (or smaller). | |
* | |
* Compile with `-Wno-multichar -mbmi2 -mlzcnt` (or -march=native on any recent x86 CPU). | |
* | |
* Modify `tbl` below to change the map. | |
* | |
* If it takes a long time and doesn't find a solution, fiddle with the hash function (`h`). | |
* |
OlderNewer