Skip to content

Instantly share code, notes, and snippets.

View toddsundsted's full-sized avatar

Todd Sundsted toddsundsted

View GitHub Profile
@toddsundsted
toddsundsted / moocode_toolkit.moo
Last active January 12, 2023 03:54
Moocode Toolkit
;; while (read(player) != ".") endwhile
I M P O R T A N T
=================
The following code cannot be used as is. You will need to rewrite
functionality that is not present in your server/core. The most
straight-forward target (other than Stunt/Improvise) is a server/core
that provides a map datatype and anonymous objects.
@toddsundsted
toddsundsted / composed.moo
Created December 3, 2011 11:44
LambdaCore Compatible Dump of Composed
; create($nothing)
@prop #102."packages" 0 ""
@prop #102."provides_cache" 0 ""
@prop #102."requires_cache" 0 ""
@prop #102."last_fetch_index" 0 ""
@prop #102."archived" 0 ""
@prop #102."cached" 0 ""
@prop #102."archive_host" "207.210.101.162" ""
@prop #102."archive_port" 80 ""
@toddsundsted
toddsundsted / shapes.moo
Created December 3, 2011 11:22
LambdaCore Compatible Dump of Shapes
; create($nothing)
@verb #101:"_log" this none this xd
@program #101:_log
notify(player, tostr(@args));
.
@verb #101:"_suspend_if_necessary" this none this xd
@program #101:_suspend_if_necessary
ticks_left() < 10000 || seconds_left() < 2 && suspend(0);
@toddsundsted
toddsundsted / fileio-1.5p3.patch
Created August 5, 2011 02:08
FileIO v1.5p3 Patchfile
diff --git a/ChangeLog-fileio.txt b/ChangeLog-fileio.txt
new file mode 100644
index 0000000..9596740
--- /dev/null
+++ b/ChangeLog-fileio.txt
@@ -0,0 +1,29 @@
+Version 1.5p3 - Jul 11
+----------------------
+ - Added return value check on calls to binary_to_raw_bytes (via out_filter)
+ - Replaced use of fgets to better handle files with null bytes
@toddsundsted
toddsundsted / gist:1616304
Created January 15, 2012 16:17
PLEAC: File Access (Scala)
/* File Access
* see http://pleac.sourceforge.net/pleac_perl/fileaccess.html
* Scala 2.9.1
*/
import scripting.file._
import scripting.file.Implicits._
/* Introduction */
@toddsundsted
toddsundsted / gist:1613243
Created January 14, 2012 22:52
PLEAC: Process Management and Communication (Scala)
/* Process Management and Communication
* see http://pleac.sourceforge.net/pleac_perl/processmanagementetc.html
* Scala 2.9.1
*/
import scala.sys.process._
import scala.io.Source
import java.io.File
/* Gathering Output From a Program */
@toddsundsted
toddsundsted / gist:1505615
Created December 21, 2011 10:58
Creating a Running Application Inside the Play Console
import play.core._
import play.api._
import play.api.mvc._
import java.io._
import play.api.Play.current
val app = Application(new File("."), new ApplicationClassLoader(this.getClass.getClassLoader), None, Play.Mode.Dev)
@toddsundsted
toddsundsted / gist:1398354
Created November 27, 2011 22:51
Dump of the Objects in the Primitive Package
@create $nothing named Primitive Package:
@prop #34299."identifier" "primitive" r
@prop #34299."version" "0.0.1" r
@prop #34299."manifest" {} r
;;#34299.("manifest") = {{#34299, "package"}, {#34300, "dictionary"}, {#34303, "int_proto"}, {#34304, "float_proto"}, {#34306, "str_proto"}, {#34307, "err_proto"}, {#34308, "list_proto"}, {#34309, "map_proto"}, {#34310, "lambda_proto"}}
@prop #34299."relocate" {} r
;;#34299.("relocate") = {"dictionary.int_proto", "dictionary.float_proto", "dictionary.str_proto", "dictionary.err_proto", "dictionary.list_proto", "dictionary.map_proto", "dictionary.lambda_proto", "dictionary.frobs"}
@prop #34299."requires" {} r
;;#34299.("requires") = {{"kernel", ">= 1.0.4"}}
@prop #34299."instructions" {} r
@toddsundsted
toddsundsted / base64.patch
Created August 7, 2011 17:06
Base64 Patch
diff --git a/Makefile.in b/Makefile.in
index 76a351f..48c58a1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -29,13 +29,15 @@ CFLAGS = -O
YFLAGS = -d
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
-CSRCS = ast.c code_gen.c db_file.c db_io.c db_objects.c db_properties.c \
- db_verbs.c decompile.c disassemble.c eval_env.c eval_vm.c \
@toddsundsted
toddsundsted / fileio-1.5p2.patch
Created August 2, 2011 01:35
FileIO v1.5p2 Patchfile
diff --git a/ChangeLog-fileio.txt b/ChangeLog-fileio.txt
new file mode 100644
index 0000000..d242e08
--- /dev/null
+++ b/ChangeLog-fileio.txt
@@ -0,0 +1,15 @@
+Version 1.5p1 - Dec 97
+----------------------
+ - Fixed bug where tabs were not included in the input stream
+ - Added CHANGELOG to the distribution