I'm not down with the new(er) [Ruby hash syntax][0]. I'm not down.
In javascript, I can do this:
hash = {
first : "one"
second : "two"
third : "three"
}| title An Auspicious Day v0.2.1 | |
| author arrogant.gamer | |
| homepage www.arrogantgamer.com | |
| flickscreen 20x10 | |
| color_palette proteus_rich | |
| ======== | |
| OBJECTS | |
| ======== |
| Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
| var Stack = function () { | |
| return { | |
| pop: function() { | |
| throw "popped from an empty stack"; | |
| }, | |
| push: function(value) { | |
| return (function (self) { | |
| return _.extend({}, self._incrementCount(), { | |
| head: value, | |
| pop: function () { |
| Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
I'm not down with the new(er) [Ruby hash syntax][0]. I'm not down.
In javascript, I can do this:
hash = {
first : "one"
second : "two"
third : "three"
}| -- @param _construct: map args --> object | |
| -- @param tcurtsnoc_: map object --> args | |
| Klass = function (_construct, tcurtsnoc_) | |
| local constructor | |
| local function copy(o) | |
| return constructor(tcurtsnoc_(o)) | |
| end | |
| constructor = function (...) |
| function do_socket_stuff () | |
| print("in") | |
| local http = require("socket.http") | |
| local ltn12 = require("ltn12") | |
| local base_url = "http://gamejolt.com/api/game/v1" | |
| --Helper for priniting nested table | |
| function deep_print(tbl) | |
| for i, v in pairs(tbl) do |
| love.viewport = require('libs/viewport').newSingleton() | |
| local STAR_SEED = 0x9d2c5680; | |
| local STAR_TILE_SIZE = 256; | |
| local rshift, lshift, arshift, bxor, tohex = bit.rshift, bit.lshift, bit.arshift, bit.bxor, bit.tohex | |
| -- Robert Jenkins' 96 bit Mix Function. | |
| -- Taken from http://nullprogram.com/blog/2011/06/13/ | |
| local function mix (a, b, c) |
| // this code is safe to copy/paste into your browser | |
| // but you should really try to write it out line-by-line ;) | |
| // this gist is based on a number of other excellent introductions to lambda calculus | |
| // classic: https://github.com/sjsyrek/presentations/blob/master/lambda-calculus/lambda.js | |
| // ornithology: https://www.youtube.com/watch?v=3VQ382QG-y4&t=3349s | |
| // and this one, in Ruby, called "Programming With Nothing" (excellent title) https://www.youtube.com/watch?v=VUhlNx_-wYk | |
| pair = x => y => a => a(x)(y) |