Skip to content

Instantly share code, notes, and snippets.

@josefnpat
josefnpat / readme.md
Last active April 7, 2024 11:39
Going from Lua 5.2 to PICO-8's Lua

This information applies to the PICO-8 0.1.6 release.

This document is here to help folks with a proficiency in Lua understand the limitations and discrepencies between Lua and PICO-8's Lua.

You can always view the manual or yellowafterlife's extended 0.1.1 manual.

General

  • anything written in uppercase the PICO-8 editor or .p8 is made lowercase by the editor. → editing the .p8 file directly can work
  • print(function() end) outputs the string function instead of the string function: 0x0000000.
@rizo
rizo / fold-example.md
Last active June 11, 2017 05:17
Fold programming language examples.

Fold Programming Language

(This document is a draft.)

-- Single-line comments start with a doulbe dash.

---
@kjnilsson
kjnilsson / interop.fs
Created October 4, 2013 08:30
Interop with libraries written in csharp
let dependencies (package : IPackage) =
match package.DependencySets with
| null -> []
| sets ->
sets
|> filterNulls
|> Seq.map (fun d -> d.Dependencies)
|> filterNulls
|> Seq.concat
|> filterNulls
#!/usr/local/bin/io
Map setPair := method(k, v,
self atPut(k asMutable removePrefix("\"") removeSuffix("\""), v))
OperatorTable addAssignOperator(":", "setPair")
Builder := Object clone do(
output := Sequence clone
forward := method(
@xaviershay
xaviershay / gist:746997
Created December 19, 2010 00:10
IO code to interpret JS style hashes
# Code to interpret javascript style hashes, without having to source them from
# a different file (as happens when you use the operator table. The key
# does not have to be surrounded in quotes.
#
# {key: "my value}
# Resolver is a proxy object needed to figure out the key of a pair.
Resolver := Object clone
Resolver resolve := method(
# Jiggery-pokery to extract name and value from the message without eval-ing it