Skip to content

Instantly share code, notes, and snippets.

View whitten's full-sized avatar
💭
Looking at code

David Whitten whitten

💭
Looking at code
View GitHub Profile
@toddsundsted
toddsundsted / shapes.moo
Created December 3, 2011 11:22
LambdaCore Compatible Dump of Shapes
; create($nothing)
@verb #101:"_log" this none this xd
@program #101:_log
notify(player, tostr(@args));
.
@verb #101:"_suspend_if_necessary" this none this xd
@program #101:_suspend_if_necessary
ticks_left() < 10000 || seconds_left() < 2 && suspend(0);
@toddsundsted
toddsundsted / composed.moo
Created December 3, 2011 11:44
LambdaCore Compatible Dump of Composed
; create($nothing)
@prop #102."packages" 0 ""
@prop #102."provides_cache" 0 ""
@prop #102."requires_cache" 0 ""
@prop #102."last_fetch_index" 0 ""
@prop #102."archived" 0 ""
@prop #102."cached" 0 ""
@prop #102."archive_host" "207.210.101.162" ""
@prop #102."archive_port" 80 ""
@toddsundsted
toddsundsted / moocode_toolkit.moo
Last active January 12, 2023 03:54
Moocode Toolkit
;; while (read(player) != ".") endwhile
I M P O R T A N T
=================
The following code cannot be used as is. You will need to rewrite
functionality that is not present in your server/core. The most
straight-forward target (other than Stunt/Improvise) is a server/core
that provides a map datatype and anonymous objects.
@dobau
dobau / languages
Created April 21, 2012 14:23
languages list
A Sharp (.NET)|A# .NET
A Sharp (Axiom)|A# (Axiom)
A-0 System
A+ (programming language)|A+
A++
ABAP
ABC (programming language)|ABC
ABC ALGOL
ABLE (programming language)|ABLE
ABSET
@jddurand
jddurand / perl6advent.day18.with.marpa.pl
Last active June 21, 2017 18:38
Marpa::R2 version of Perl6 Advent Calendar - Day 18 – A Grammar with Duplicate checking Reference: https://perl6advent.wordpress.com/2013/12/18/day-18-a-grammar-with-duplicate-checking/
#!env perl
use strict;
use diagnostics;
use Marpa::R2;
use Encode;
use Carp qw/croak/;
use Data::Section -setup;
# Guess why
# ---------
@jddurand
jddurand / MarpaRulesByDepth.pl
Last active June 21, 2017 18:37
Inspect marpa grammar rules by depth
#!env perl
use strict;
use diagnostics;
use Marpa::R2 2.081001;
my $grammar = Marpa::R2::Scanless::G->new({ source => \do {local $/; <DATA>}});
my $fmt = "%5s %-20s %-20s %s\n";
printf $fmt, 'depth', 'ruleName', 'lhsName', 'rhsNames';
foreach (@{rulesByDepth($grammar)}) {
printf $fmt, $_->{depth}, $_->{ruleName}, $_->{lhsName}, join(' ', @{$_->{rhsNames}});
@sharwell
sharwell / Program.cs
Created April 1, 2014 11:24
TreePatternTest in C#
namespace TreePatternTest
{
using System;
using System.Collections.Generic;
using Antlr4.Runtime;
using Antlr4.Runtime.Tree;
using Antlr4.Runtime.Tree.Pattern;
class Program
{
@xem
xem / codegolf.md
Last active March 22, 2024 15:41
JS code golfing

codegolf JS

Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...

(For more info and other projects, visit http://xem.github.io)

(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)

@jddurand
jddurand / EBNF-ISO_IEC_14977_1996_E.pl
Created May 28, 2014 22:24
Marpa grammar of official EBNF ISO/IEC 14977:1996(E)
#!env perl
# -----------------------------------------------------------------------------------------
# Marpa grammar for EBNF published by ISO/IEC 14977:1996(E)
#
# Extensions are minor, and ONLY because our keyboards are more likely to expose Latin-1
# character rather than the Windows-1252 characters as per the spec, i.e.:
#
# Extension 1: Add ' to quoted strings (ISO published the special neighbour character ’)
# Extension 2: Add ^ to <other character> (ISO published the special neighbour character ˆ)
# Extension 3: Add ` to <other character> (ISO published the special neighbour character ‘)
@jddurand
jddurand / xml_1_0.marpa.bnf
Created June 2, 2014 20:22
W3C EBNF to Marpa using Marpa
inaccessible is ok by default
:start ::= document
AttDef ::= S Name S AttType S DefaultDecl
AttDef_any ::= AttDef *
AttType ::= StringType
AttType ::= TokenizedType
AttType ::= EnumeratedType
AttValue ::= _Lex030 _Gen060_any _Lex030
AttValue ::= _Lex032 _Gen063_any _Lex032