Skip to content

Instantly share code, notes, and snippets.

@CoderPuppy
CoderPuppy / index.js
Created February 11, 2013 13:53
voxel.js game
var voxel = require('voxel');
var createGame = require('voxel-engine')
function sphereWorld(x, y, z) {
// return the index of the material you want to show up
// 0 is air
if (x*x + y*y + z*z > 15*15) return 0
return 3;
};
@CoderPuppy
CoderPuppy / index.js
Created February 15, 2013 13:44
voxel.js game
var voxel = require('voxel');
var createGame = require('voxel-engine');
function sphereWorld(x, y, z) {
// return the index of the material you want to show up
// 0 is air
if (x*x + y*y + z*z > 15*15) return 0
return 3;
}
@CoderPuppy
CoderPuppy / graphics.rb
Created February 20, 2013 22:02
Part of a jruby game graphics library
require 'set'
class Window
def initialize
@frame = javax.swing.JFrame.new
@frame.default_close_operation = javax.swing.WindowConstants.EXIT_ON_CLOSE
@input = Input.new(@frame)
end
@CoderPuppy
CoderPuppy / index.js
Created March 10, 2013 19:10
voxel.js game
var voxel = require('voxel');
var createGame = require('voxel-engine');
function sphereWorld(x, y, z) {
// return the index of the material you want to show up
// 0 is air
if (x*x + y*y + z*z > 15*15) return 0
return 3;
}
@CoderPuppy
CoderPuppy / code.lua
Created October 26, 2013 00:49
Stuff for PirateAE
local monitor = peripheral.wrap('back') -- Open the monitor
term.redirect(monitor) -- Start sending stuff to the monitor
term.setCursorPos(1, 1) -- Chooses where to write text
term.write('Top Line') -- Writes text
term.setCursorPos(1, 2) -- Chooses where to write text
term.write('Bottom Line') -- Writes text
term.restore()
@CoderPuppy
CoderPuppy / readme.md
Last active December 30, 2015 10:49
Distributed VM/Language/Runtime

very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very hard

scuttlebutt? wouldn't really work because of the time limitation and i need much more than it

So requirements:

  • Distributed
  • Secure
  • Persistent
/* poland/runtime/Call source file, generated with rock, the ooc compiler written in ooc */
#include <ooc/poland/poland/runtime/Call.h>
#include <ooc/sdk/lang/Abstractions.h>
#include <ooc/sdk/lang/Buffer.h>
#include <ooc/sdk/lang/BufferIterator.h>
#include <ooc/sdk/lang/Character.h>
#include <ooc/sdk/lang/Exception.h>
#include <ooc/sdk/lang/Format.h>
#include <ooc/sdk/lang/IO.h>
/*Base: abstract class {
print: abstract func(foo: Foo)
}
Foo: class extends Base {
name: String
init: func(=name)
print: func(foo: Foo) {
raise(foo name)
}
PObject: class extends PUserData {
init: func
}
PUserData: abstract class {}
PCall: class extends PUserData {
fromObjects: static func(args: ...) -> This {
args each(|arg|
match arg {
@CoderPuppy
CoderPuppy / new-idea.md
Last active January 2, 2016 23:39
New idea for DDB

cyphernet

cells are just data; the id is the hash of the data; thus you can't change the data

An imaginary orm based on what I read on cyphernet:

// Author
{
	_links: [ 'type' ],