Skip to content

Commit

Permalink
Merge pull request #10 from mohayonao/classlib
Browse files Browse the repository at this point in the history
add NotYetImplemented as placeholder
  • Loading branch information
mohayonao committed Mar 23, 2014
2 parents 7c60575 + 6d477d9 commit c5b63d0
Show file tree
Hide file tree
Showing 29 changed files with 3,753 additions and 73 deletions.
1,904 changes: 1,868 additions & 36 deletions build/scscript.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scscript",
"version": "0.0.5",
"version": "0.0.6",
"author": "Nao Yonamine <mohayonao@gmail.com>",
"homepage": "http://mohayonao.github.io/SCScript/",
"bugs": "https://github.com/mohayonao/SCScript/issues",
Expand Down
55 changes: 54 additions & 1 deletion src/sc/lang/classlib/Collections/Array.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,60 @@
}

sc.lang.klass.define("Array", "ArrayedCollection", {
constructor: Array
constructor: Array,
NotYetImplemented: [
"$with",
"reverse",
"scramble",
"mirror",
"mirror1",
"mirror2",
"stutter",
"rotate",
"pyramid",
"pyramidg",
"sputter",
"while",
"lace",
"permute",
"allTuples",
"wrapExtend",
"foldExtend",
"clipExtend",
"slide",
"containsSeqColl",
"unlace",
"prUnlace",
"interlace",
"deinterlace",
"flop",
"multiChannelExpand",
"envirPairs",
"shift",
"powerset",
"source",
"asUGenInput",
"asControlInput",
"isValidUGenInput",
"numChannels",
"poll",
"dpoll",
"envAt",
"$newClear2D",
"$new2D",
"at2D",
"put2D",
"fill2D",
"atIdentityHash",
"atIdentityHashInPairs",
"asSpec",
"fork",
"madd",
"asRawOSC",
"printOn",
"storeOn",
"prUnarchive",
]
});

$SC.Array = function(value) {
Expand Down
92 changes: 90 additions & 2 deletions src/sc/lang/classlib/Collections/ArrayedCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,96 @@

require("./SequenceableCollection");

sc.lang.klass.define("ArrayedCollection", "SequenceableCollection");
sc.lang.klass.define("ArrayedCollection", "SequenceableCollection", {
NotYetImplemented: [
"$newClear",
"indexedSize",
"size",
"maxSize",
"swap",
"at",
"clipAt",
"wrapAt",
"foldAt",
"put",
"clipPut",
"wrapPut",
"foldPut",
"removeAt",
"takeAt",
"indexOf",
"indexOfGreaterThan",
"takeThese",
"while",
"replace",
"while",
"slotSize",
"slotAt",
"slotPut",
"slotKey",
"slotIndex",
"getSlots",
"setSlots",
"atModify",
"atInc",
"atDec",
"isArray",
"asArray",
"copyRange",
"copySeries",
"putSeries",
"add",
"addAll",
"putEach",
"extend",
"insert",
"move",
"addFirst",
"addIfNotNil",
"pop",
"overWrite",
"grow",
"growClear",
"seriesFill",
"fill",
"do",
"reverseDo",
"reverse",
"windex",
"normalizeSum",
"normalize",
"asciiPlot",
"perfectShuffle",
"performInPlace",
"clipExtend",
"rank",
"shape",
"reshape",
"reshapeLike",
"deepCollect",
"deepDo",
"unbubble",
"bubble",
"slice",
"$iota",
"asRandomTable",
"tableRand",
"msgSize",
"bundleSize",
"clumpBundles",
"prBundleSize",
"includes",
]
});

sc.lang.klass.define("RawArray", "ArrayedCollection");
sc.lang.klass.define("RawArray", "ArrayedCollection", {
NotYetImplemented: [
"archiveAsCompileString",
"archiveAsObject",
"rate",
"readFromStream",
"powerset",
]
});

})(sc);
96 changes: 95 additions & 1 deletion src/sc/lang/classlib/Collections/Collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,100 @@

require("../Core/Object");

sc.lang.klass.define("Collection", "Object");
sc.lang.klass.define("Collection", "Object", {
NotYetImplemented: [
"$newFrom",
"$with",
"$fill",
"$fill2D",
"$fill3D",
"$fillND",
"hash",
"species",
"do",
"iter",
"size",
"flatSize",
"isEmpty",
"notEmpty",
"asCollection",
"isCollection",
"add",
"addAll",
"remove",
"removeAll",
"removeEvery",
"removeAllSuchThat",
"atAll",
"putEach",
"includes",
"includesEqual",
"includesAny",
"includesAll",
"matchItem",
"collect",
"select",
"reject",
"collectAs",
"selectAs",
"rejectAs",
"detect",
"detectIndex",
"doMsg",
"collectMsg",
"selectMsg",
"rejectMsg",
"detectMsg",
"detectIndexMsg",
"lastForWhich",
"lastIndexForWhich",
"inject",
"injectr",
"count",
"occurrencesOf",
"any",
"every",
"sum",
"mean",
"product",
"sumabs",
"maxItem",
"minItem",
"maxIndex",
"minIndex",
"maxValue",
"minValue",
"maxSizeAtDepth",
"maxDepth",
"deepCollect",
"deepDo",
"invert",
"sect",
"union",
"difference",
"symmetricDifference",
"isSubsetOf",
"asArray",
"asBag",
"asList",
"asSet",
"asSortedList",
"powerset",
"flopDict",
"histo",
"printAll",
"printAll",
"printcsAll",
"dumpAll",
"printOn",
"storeOn",
"storeItemsOn",
"printItemsOn",
"writeDef",
"writeInputSpec",
"case",
"makeEnvirValPairs",
]
});

})(sc);
71 changes: 69 additions & 2 deletions src/sc/lang/classlib/Collections/Dictionary.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,77 @@
}

sc.lang.klass.define("Dictionary", "Set", {
constructor: Dictionary
constructor: Dictionary,
NotYetImplemented: [
// "$new",
"$newFrom",
"at",
"atFail",
"matchAt",
"trueAt",
"add",
"put",
"putAll",
"putPairs",
"getPairs",
"associationAt",
"associationAtFail",
"keys",
"values",
"includes",
"includesKey",
"removeAt",
"removeAtFail",
"remove",
"removeFail",
"keysValuesDo",
"keysValuesChange",
"do",
"keysDo",
"associationsDo",
"pairsDo",
"collect",
"select",
"reject",
"invert",
"merge",
"blend",
"findKeyForValue",
"sortedKeysValuesDo",
"choose",
"order",
"powerset",
"transformEvent",
"embedInStream",
"asSortedArray",
"asKeyValuePairs",
"keysValuesArrayDo",
"grow",
"fixCollisionsFrom",
"scanFor",
"storeItemsOn",
"printItemsOn",
]
});

sc.lang.klass.define("IdentityDictionary", "Dictionary");
sc.lang.klass.define("IdentityDictionary", "Dictionary", {
NotYetImplemented: [
"$new",
"at",
"put",
"putGet",
"includesKey",
"findKeyForValue",
"scanFor",
"freezeAsParent",
"insertParent",
"storeItemsOn",
"doesNotUnderstand",
"nextTimeOnGrid",
"asQuant",
"timingOffset",
]
});

$SC.Dictionary = function(value) {
return new Dictionary(value);
Expand Down
19 changes: 18 additions & 1 deletion src/sc/lang/classlib/Collections/Environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@

require("./Dictionary");

sc.lang.klass.define("Environment", "IdentityDictionary");
sc.lang.klass.define("Environment", "IdentityDictionary", {
NotYetImplemented: [
"$make",
"$use",
"make",
"protect",
"use",
"protect",
"eventAt",
"composeEvents",
"$pop",
"$push",
"pop",
"push",
"linkDoc",
"unlinkDoc",
]
});

})(sc);
Loading

0 comments on commit c5b63d0

Please sign in to comment.