This is an implementation of monads in a way that is pretty for LiveScript(given its amazing syntactic structures). This was originally a comment for LiveScript #426.
Gulp, while being a great build system, isn't perfect. Its plugin system is immature and not as full-featured as Grunt. I created gulp-grunt as a remedy for this problem, making it possible to import tasks from Grunt to gulp.
However, sometimes you want to use variables in both files. How? Well, use an accessory file to define all your variables, and import it from both.
// do cb only once | |
function do_once(cb) { | |
var has_called = false; | |
// the function that is returned | |
return function () { | |
if(!has_called) { | |
cb.apply(arguments); | |
has_called = true; | |
} | |
} |
In this document I hope to expose a new way of managing nested views and even routing/controllers in Marionette. This is rather opinionated, but hopefully in a good way. It provides a replacement for what are typically called 'controllers', which Marionette and Backbone don't have. In any case, it certainly makes Marionette more opinionated, but it does not in any way restrict users from doing certain things.
package org.spongepowered.api. | |
import java.util.*; | |
public class Hello { | |
public static void main(String[] args) { | |
EntityComponentSystem ecs = new EntityComponentSystem(); |
// Represents a thing in the game world | |
interface Body { | |
int getID(); | |
} | |
// Represents a behavior | |
interface Component { | |
So in thinking through the use-cases of commands w.r.t. Sponge I came uo with an algorithm for dealing with /command word conflicts.
I'm going to gloss over a few details that prepare the data structures in Sponge that hold information about the mapping of "command" to "plugin" off for a moment. I have another idea there... but for the problem scope limited to just de-conflicting:
Imagine each plugin is a node in a BST (binary search tree).
granite | |
husk | |
bukkit | |
sponge | |
rainbow | |
spigot | |
forge | |
trident | |
glowstone | |
vanilla |
Biomes | |
==== | |
River | |
Ocean | |
Extreme Hills | |
Nether | |
The End | |
Frozen Ocean | |
Frozen River |
// a client-side package (nudge nudge wink wink) | |
{ | |
"name": "my-name", | |
"owner": "org-or-user", | |
"version": "0.5.0", | |
"paths": { | |
"artifact": "builds/my-name-*.jar", | |
"docs": "docs/" | |
}, | |
"dependencies": { |