conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add Tile class to script library.\n" }, { "from": "human", "value": "import terrain from require 'arms/constants'\n\nclass Map\n new: =>\n @size =\n x: 96\n y: 96\n @data =\n base_terrain: terrain.grass1\n base_elevation: 1\n tiles: {...
moonscript
chosen
[ { "from": "system", "value": "Add slash command to prime bot.\n" }, { "from": "human", "value": "-- Copyright (c) 2015 by Adam Hellberg.\n--\n-- Permission is hereby granted, free of charge, to any person obtaining a copy\n-- of this software and associated documentation files (the \"Software\")...
moonscript
chosen
[ { "from": "system", "value": "Update to use the new List API\n" }, { "from": "human", "value": "require \"LovePunk.utils.List\"\n\nexport ^\n\nclass eventlistener\n\tnew: =>\n\t\t@__listeners = {}\n\n\tadd: (type, f) =>\n\t\t@__listeners[type] = List! if @__listeners[type] == nil\n\t\t@__listene...
moonscript
chosen
[ { "from": "system", "value": "Remove viewport tag for now\n\nLooks better on mobile this way..\n" }, { "from": "human", "value": "html = require \"lapis.html\"\nimport to_json from require \"lapis.util\"\n\nclass DefaultLayout extends html.Widget\n content: =>\n js = (require 'views.ja...
moonscript
chosen
[ { "from": "system", "value": "Sort chosen tasks by id\n" }, { "from": "human", "value": "import Model from require 'lapis.db.model'\nclass Applications extends Model\n @relations: {\n { \"chosen_tasks\", has_many: \"ChosenTasks\" }\n { \"uploads\", has_many: \"Uploads\" }\n }...
moonscript
chosen
[ { "from": "system", "value": "Add return statements to moonscript test case\n" }, { "from": "human", "value": "describe 'moonscript tests', ->\n it 'works', ->\n assert.are.equal true, true\n\n" }, { "from": "gpt", "value": "describe 'moonscript tests', ->\n it 'works', ->\n ...
moonscript
chosen
[ { "from": "system", "value": "Return a method for the mixin instead of a class\n\n* This allows the user of the mixin to not have to use the moon.mixin\n function directly\n" }, { "from": "human", "value": "moon = require \"moon\"\n\nreturn class clone\n\tnew: =>\n\tclone: =>\n\t\tc = @@!\n\t\t...
moonscript
chosen
[ { "from": "human", "value": "Add unfinished boilerplate to SA tests\n\nsubmit-application test file is being prepared---now we added a\nwith_mock_fs function (with the ability to have write instead of read\nerror orchestrated)\n" }, { "from": "gpt", "value": "fsmock = require \"filesystem-mock\"...
moonscript
chosen
[ { "from": "system", "value": "Refactor submit-application and check class\n\nRemoved some boilerplate to make for more pleasant error reporting\nexperience. Also the code now checks if the submitted class was in the\nlist.\n" }, { "from": "human", "value": "content = require 'content'\nimport to...
moonscript
chosen
[ { "from": "human", "value": "Add a load time configuration\n\n* This still depends upon having a conf.lua file in the base project\n directory, but it goes through the process of handling the Love\n specifics.\n" }, { "from": "gpt", "value": "require_json = ->\n\tr, json = pcall require, \"dkj...
moonscript
chosen