Skip to content

Instantly share code, notes, and snippets.

View SocraticPhoenix's full-sized avatar

John-Ryan Dunn SocraticPhoenix

  • U.S.
View GitHub Profile
class TestSink extends MessageSink {
private MessageSink parent;
public TestSink(MessageSink parent) {
super();
this.parent = parent;
}
@Override
public Text transformMessage(CommandSource target, Text text) {
@SocraticPhoenix
SocraticPhoenix / TrackerTest.java
Created January 6, 2016 02:42
Testing block tracking in star API
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 socraticphoenix@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
Introduction
This document is intended to aid users of the JLSC configuration format.
Preliminary
Background
JLSC stands for JSON-Like Structured Configuration. JSON stands for JavaScript Object Notation, and information about it can be found at json.org. JLSC is partially based off of JSON, as well as HOCON and YAML, two other
configuration formats. The goal of the JLSC project is to simultaneously provide the best experience for the user, and the easiest development for the coder. JLSC has the same data structure of JSON, but it has more advanced
parsing and programitic interaction.
Java Basics
import java.util.Arrays;
public class Test {
public static void main(String... args) {
Test.testArray(p(""), "");
Test.testArray(p("h"), "h");
Test.testArray(p("hi"), "hi");
Test.testArray(p("fun"), "fun");
Test.testArray(p("bye"), "bye");
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 socraticphoenix@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
package com.gmail.socraticphoenix.planet9;
import com.gmail.socraticphoenix.planet9.grammar.line.lines.SourceExtendsStatement;
import com.gmail.socraticphoenix.planet9.grammar.line.lines.SourceIsStatement;
import java.io.IOException;
public class Test {
public static void main(String[] args) throws IOException {
package your.namespace.here;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* The Stopwatch class represents a mapping of versatile timing entries, each of which can be independently stopped, started, or examined.
*
* @param <T> The type of key to use for the timing entries
*/
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 socraticphoenix@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 socraticphoenix@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: