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
Music_TitleScreen_Ch1:: | |
tempo 0, 144 | |
notetype 12, 10, 0 | |
octave 4 | |
note C_, 4 | |
callchannel ASubroutine | |
note C_, 4 | |
togglecall |
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
Music_TitleScreen_Ch1:: | |
tempo 0, 144 | |
duty 3 | |
notetype 12, 10, 0 | |
octave 3 | |
note C_, 8 | |
unknownmusic0xee 50 ; to the left | |
note E_, 8 | |
unknownmusic0xee 237 ; to the right | |
note G_, 8 |
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
def x | |
2 | |
end | |
p x # prints 2 | |
x = 1 | |
p x # prints 1 | |
p x() # prints 2 | |
# The above is... annoying, but makes sense. Here's the real WTF though: |
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
{-# LANGUAGE Haskell2010, GADTs, Rank2Types, FlexibleInstances #-} | |
module Main where | |
import Data.IORef | |
import Control.Applicative | |
data X v a where | |
E :: IO a -> X RValue a | |
V :: IO a -> (a -> IO ()) -> X v a |
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
Music_TitleScreen_Ch1:: | |
tempo 150 | |
octave 2 | |
notetype 1, 10, 0 | |
C_ 1 | |
endchannel | |
Music_TitleScreen_Ch2:: | |
Music_TitleScreen_Ch3:: | |
Music_TitleScreen_Ch4:: |
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
Music_TitleScreen_Ch1:: | |
tempo 130 | |
volume 7, 7 | |
toggleperfectpitch | |
duty 0 | |
notetype 6, 15, 7 | |
octave 4 | |
E_ 1 | |
F_ 1 | |
notetype 12, 15, 7 |
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
{- | | |
Extracts and injects files from the game Vagante's data.vra. | |
The format (after a 0x18-byte-long header) is a simple repeating pattern: | |
- length of filename (4 bytes little-endian) | |
- filename | |
- length of file data (4 bytes little-endian) | |
- file data | |
The files themselves are all nice standard formats: | |
OGG, WAV, PNG, JSON, TTF, and OpenGL fragment shader. | |
-} |
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
{- | | |
No attempt made to golf, but I did throw some alternate solutions in. | |
-} | |
module HW3 where | |
import Data.List (transpose) | |
skips :: [a] -> [[a]] | |
skips xs = zipWith const (map (f xs) [0..]) xs where | |
-- "zipWith const" clamps the first list to be no longer than the second. |
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
{-# LANGUAGE JavaScriptFFI #-} | |
module Main where | |
import Control.Concurrent | |
import Control.Monad | |
-- | Very simple, no exception safety. Intended for async JS functions. | |
parallel :: [IO a] -> IO [a] | |
parallel fs = do | |
vars <- forM fs $ \f -> do |
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 | |
# Run from the destination root (somedevice/music/): | |
# .../music.rb audiosource/artist1/album1 audiosource/artist2/album2 ... | |
require 'fileutils' | |
ARGV.each do |dir| | |
dir = File.absolute_path(dir) | |
album = File.basename(dir) |
OlderNewer