Skip to content

Commit

Permalink
Updating to support WhizzML v0.35.0
Browse files Browse the repository at this point in the history
  • Loading branch information
osroca committed Sep 17, 2019
1 parent 3531c04 commit 9af538d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ whizzml.user.reserved_names().filter(function(p) {
```

## Current WhizzML Version supported
0.33.1 (06-18-2019)
0.35.0 (08-29-2019)
9 changes: 9 additions & 0 deletions WhizzML.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@
{"trigger": "empty?\tCheck if string, list, or keys in map is empty", "contents": "empty? "},
{"trigger": "even?\tCheck if even", "contents": "even? $1"},
{"trigger": "every?\tCheck if every", "contents": "every? $1"},
{"trigger": "execution-inputs\tList of values used as input arguments in the execution", "contents": "execution-inputs $1"},
{"trigger": "execution-logs", "contents": "execution-logs $1"},
{"trigger": "execution-output-resources\tList of BigML resources created in the execution", "contents": "execution-output-resources $1"},
{"trigger": "execution-outputs\tList of outputs in the execution", "contents": "execution-outputs $1"},
{"trigger": "execution-sources\tList of the scripts being executed and their dependencies", "contents": "execution-sources $1"},
{"trigger": "exp", "contents": "exp"},
{"trigger": "fetch\tRetrieve a resource", "contents": "fetch $1"},
{"trigger": "field-categories\tGet the list of categories from a categorical field distribution", "contents": "field-categories $1"},
Expand All @@ -140,6 +145,7 @@
{"trigger": "flatline-splice", "contents": "flatline-splice"},
{"trigger": "flatline-str", "contents": "flatline-str"},
{"trigger": "flatline-str-splice", "contents": "flatline-str-splice"},
{"trigger": "flatten", "contents": "flatten $1"},
{"trigger": "floor", "contents": "floor"},
{"trigger": "for", "contents": "for"},
{"trigger": "gamma", "contents": "gamma"},
Expand Down Expand Up @@ -237,6 +243,7 @@
{"trigger": "odd?\tCheck if odd", "contents": "odd? $1"},
{"trigger": "or\tLogical OR", "contents": "or $1 $2"},
{"trigger": "parse-resource-id\tParse resource-type and ID", "contents": "parse-resource-id \"$1\""},
{"trigger": "partial\tReturns a new procedure", "contents": "partial $1"},
{"trigger": "positive?\tCheck if positive", "contents": "positive? $1"},
{"trigger": "pow", "contents": "pow"},
{"trigger": "ppr-str", "contents": "pr-str"},
Expand Down Expand Up @@ -272,6 +279,7 @@
{"trigger": "resource-name\tGet the name of the resource", "contents": "resource-name $1"},
{"trigger": "resource-property\tGet a resource property", "contents": "resource-property $1 $2 $3"},
{"trigger": "resource-type\tGet resource-type from ID", "contents": "resource-type \"$1\""},
{"trigger": "resource-types\tReturns a sorted list of strings of the available types", "contents": "resource-types"},
{"trigger": "resource-workflow\tSummarizes the operations to reproduce a BigML resource", "contents": "resource-workflow $1 $2 $3"},
{"trigger": "resources", "contents": "resources"},
{"trigger": "reverse", "contents": "reverse"},
Expand All @@ -289,6 +297,7 @@
{"trigger": "sha256\tCompute the SHA256 hash of a string", "contents": "sha256 $1"},
{"trigger": "sin\tSine", "contents": "sin $1"},
{"trigger": "sinh\tHyperbolic sine", "contents": "sinh $1"},
{"trigger": "sleep\tWait milliseconds", "contents": "sleep $1"},
{"trigger": "smacdown--actual", "contents": "smacdown--actual"},
{"trigger": "smacdown--aggregate-predictions", "contents": "smacdown--aggregate-predictions"},
{"trigger": "smacdown--candidates", "contents": "smacdown--candidates"},
Expand Down
2 changes: 1 addition & 1 deletion WhizzML.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ contexts:
scope: support.function.whizzml
- match: '(?<![*+!_?\-])\b(boolean|categorical-field|contains-string|contains|datetime-field|empty|even|every|field|integer|items-field|list|map|matches|member|negative|nil|number|numeric-field|odd|positive|procedure|real|regexp|resource-done|resource-id|set|string|text-field|zero)\?(?![*+!_?\-])'
scope: support.function.tester.whizzml
- match: '(?<![*+!_?\-])\b(abort|abs|acos|add|and|append|apply|asin|assoc|assoc-in|atan|butlast|capitalize|ceil|chi-squared-test|compare-objects|concat|cons|cos|cosh|count|create|create|create-and-wait|create-and-wait-anomaly|create-and-wait-anomalyscore|create-and-wait-association|create-and-wait-associationset|create-and-wait-batchanomalyscore|create-and-wait-batchcentroid|create-and-wait-batchprediction|create-and-wait-batchprojection|create-and-wait-batchtopicdistribution|create-and-wait-centroid|create-and-wait-cluster|create-and-wait-composite|create-and-wait-configuration|create-and-wait-correlation|create-and-wait-dataset|create-and-wait-deepnet|create-and-wait-ensemble|create-and-wait-evaluation|create-and-wait-execution|create-and-wait-forecast|create-and-wait-fusion|create-and-wait-library|create-and-wait-linearregression|create-and-wait-logisticregression|create-and-wait-model|create-and-wait-optiml|create-and-wait-pca|create-and-wait-prediction|create-and-wait-project|create-and-wait-projection|create-and-wait-sample|create-and-wait-script|create-and-wait-source|create-and-wait-statisticaltest|create-and-wait-timeseries|create-and-wait-topicdistribution|create-and-wait-topicmodel|create-anomaly|create-anomalyscore|create-association|create-associationset|create-batchanomalyscore|create-batchcentroid|create-batchprediction|create-batchprojection|create-batchtopicdistribution|create-centroid|create-cluster|create-composite|create-correlation|create-configuration|create-dataset|create-dataset-split|create-deepnet|create-ensemble|create-evaluation|create-execution|create-forecast|create-fusion|create-library|create-linearregression|create-logisticregression|create-model|create-optiml|create-pca|create-prediction|create-project|create-projection|create-random-dataset-split|create-rng|create-sample|create-script|create-source|create-statisticaltest|create-timeseries|created-resources|create-topicdistribution|create-topicmodel|current-time|dataset-choose-objective-id|dataset-get-objective-id|define|delete|difference|dissoc|dissoc-in|div|drop|exp|fetch|filter|field-categories|field-distribution|field-items|field-optypes|field-terms|filter|find-field|flatline|flatline-listify|flatline-splice|flatline-str|flatline-str-splice|floor|for|gamma|get|get-in|handle|head|identity|insert|intersection|iterate|join|json-str|keys|lambda|last|levenshtein|list|list-anomalies|list-anomalyscores|list-associations|list-associationsets|list-batchanomalyscores|list-batchcentroids|list-batchpredictions|list-batchprojections|list-batchtopicdistributions|list-centroids|list-clusters|list-composites|list-configurations|list-correlations|list-datasets|list-deepnets|list-ensembles|list-evaluations|list-executions|list-forecasts|list-fusions|list-libraries|list-linearregressions|list-logisticregressions|list-models|list-optimls|list-pcas|list-predictions|list-projections|list-projects|list-samples|list-scripts|list-sources|list-statisticaltests|list-timeseries|list-topicdistributions|list-topicmodels|ln|log|log-debug|log-error|log-info|log-level|log-progress|log-warn|log10|log2|logged-progress|lower-case|make-map|map|matches|max|max-key|md5|mean|merge|merge-datasets|min|min-key|not|nth|or|parse-resource-id|pow|ppr-str|pr-str|pretty-whizzml|prog|raise|rand|rand-int|rand-range|range|re-quote|read-number|reduce|rem|remove|remove-duplicates|repeat|repeatedly|replace|replace-first|replace-first-string|replace-string|resource-done?|resource-fields|resource-id|resource-id?|resource-ids|resource-name|resource-property|resource-type|resource-workflow|resources|reverse|round|row-distance|row-distance-squared|scriptify|select-keys|set-log-level|set-rng-seed|sha1|sha256|sin|sinh|smacdown--actual|smacdown--aggregate-predictions|smacdown--candidates|smacdown--data->dataset|smacdown--do-iteration|smacdown--evaluate|smacdown--expected|smacdown--get-id|smacdown--make-ensemble|smacdown--p-improvement|smacdown--predictions|smacdown--project|smacdown--schedule|smacdown--trees-in-ensemble|smacdown-optimize|some|sort|sort-by-key|split|split-regexp|sqrt|stdev|str|subs|subset|superset|tail|take|tan|tanh|to-degrees|to-radians|union|update|update-and-wait|upper-case|values|variance|version|version-major|version-micro|version-minor|wait|wait-forever|wait-forever*|when|with-time-log)\b(?![*+!_?\-])'
- match: '(?<![*+!_?\-])\b(abort|abs|acos|add|and|append|apply|asin|assoc|assoc-in|atan|butlast|capitalize|ceil|chi-squared-test|compare-objects|concat|cons|cos|cosh|count|create|create|create-and-wait|create-and-wait-anomaly|create-and-wait-anomalyscore|create-and-wait-association|create-and-wait-associationset|create-and-wait-batchanomalyscore|create-and-wait-batchcentroid|create-and-wait-batchprediction|create-and-wait-batchprojection|create-and-wait-batchtopicdistribution|create-and-wait-centroid|create-and-wait-cluster|create-and-wait-composite|create-and-wait-configuration|create-and-wait-correlation|create-and-wait-dataset|create-and-wait-deepnet|create-and-wait-ensemble|create-and-wait-evaluation|create-and-wait-execution|create-and-wait-forecast|create-and-wait-fusion|create-and-wait-library|create-and-wait-linearregression|create-and-wait-logisticregression|create-and-wait-model|create-and-wait-optiml|create-and-wait-pca|create-and-wait-prediction|create-and-wait-project|create-and-wait-projection|create-and-wait-sample|create-and-wait-script|create-and-wait-source|create-and-wait-statisticaltest|create-and-wait-timeseries|create-and-wait-topicdistribution|create-and-wait-topicmodel|create-anomaly|create-anomalyscore|create-association|create-associationset|create-batchanomalyscore|create-batchcentroid|create-batchprediction|create-batchprojection|create-batchtopicdistribution|create-centroid|create-cluster|create-composite|create-correlation|create-configuration|create-dataset|create-dataset-split|create-deepnet|create-ensemble|create-evaluation|create-execution|create-forecast|create-fusion|create-library|create-linearregression|create-logisticregression|create-model|create-optiml|create-pca|create-prediction|create-project|create-projection|create-random-dataset-split|create-rng|create-sample|create-script|create-source|create-statisticaltest|create-timeseries|created-resources|create-topicdistribution|create-topicmodel|current-time|dataset-choose-objective-id|dataset-get-objective-id|define|delete|difference|dissoc|dissoc-in|div|drop|execution-inputs|execution-logs|execution-output-resources|execution-outputs|execution-sources|exp|fetch|filter|field-categories|field-distribution|field-items|field-optypes|field-terms|filter|find-field|flatline|flatline-listify|flatline-splice|flatline-str|flatline-str-splice|flatten|floor|for|gamma|get|get-in|handle|head|identity|insert|intersection|iterate|join|json-str|keys|lambda|last|levenshtein|list|list-anomalies|list-anomalyscores|list-associations|list-associationsets|list-batchanomalyscores|list-batchcentroids|list-batchpredictions|list-batchprojections|list-batchtopicdistributions|list-centroids|list-clusters|list-composites|list-configurations|list-correlations|list-datasets|list-deepnets|list-ensembles|list-evaluations|list-executions|list-forecasts|list-fusions|list-libraries|list-linearregressions|list-logisticregressions|list-models|list-optimls|list-pcas|list-predictions|list-projections|list-projects|list-samples|list-scripts|list-sources|list-statisticaltests|list-timeseries|list-topicdistributions|list-topicmodels|ln|log|log-debug|log-error|log-info|log-level|log-progress|log-warn|log10|log2|logged-progress|lower-case|make-map|map|matches|max|max-key|md5|mean|merge|merge-datasets|min|min-key|not|nth|or|parse-resource-id|partial|pow|ppr-str|pr-str|pretty-whizzml|prog|raise|rand|rand-int|rand-range|range|re-quote|read-number|reduce|rem|remove|remove-duplicates|repeat|repeatedly|replace|replace-first|replace-first-string|replace-string|resource-done?|resource-fields|resource-id|resource-id?|resource-ids|resource-name|resource-property|resource-type|resource-types|resource-workflow|resources|reverse|round|row-distance|row-distance-squared|scriptify|scriptify-test|select-keys|set-log-level|set-rng-seed|sha1|sha256|sin|sinh|sleep|smacdown--actual|smacdown--aggregate-predictions|smacdown--candidates|smacdown--data->dataset|smacdown--do-iteration|smacdown--evaluate|smacdown--expected|smacdown--get-id|smacdown--make-ensemble|smacdown--p-improvement|smacdown--predictions|smacdown--project|smacdown--schedule|smacdown--trees-in-ensemble|smacdown-optimize|some|sort|sort-by-key|split|split-regexp|sqrt|stdev|str|subs|subset|superset|tail|take|tan|tanh|to-degrees|to-radians|union|update|update-and-wait|upper-case|values|variance|version|version-major|version-micro|version-minor|wait|wait-forever|wait-forever*|when|with-time-log)\b(?![*+!_?\-])'
scope: support.function.whizzml
- match: '(?<![*+!_?\-])\b(true|false)\b(?![*+!_?\-])'
scope: constant.language.whizzml
Expand Down
19 changes: 19 additions & 0 deletions syntax_test.whizzml
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,22 @@
(split-regexp "a,,b,c" ",+" 2)
;^ support.function.whizzml
; ^ string.quoted.double.whizzml

(merge-datasets list("aaaa" "bbbb"))
;^ support.function.whizzml

(flatten {"foo" "a" "bar" [1 2 3]})
;^^^^^^^ meta.sexpr.whizzml support.function.whizzml
; ^ meta.sexpr.whizzml meta.expression.map.whizzml punctuation.definition.map.begin.whizzml
; ^ meta.sexpr.whizzml meta.expression.map.whizzml meta.expression.vector.whizzml punctuation.definition.vector.begin.whizzml

(partial foo)
;^^^^^^^ meta.sexpr.whizzml support.function.whizzml
; ^^^ source.symbol.whizzml

(resource-types)
;^^^^^^^^^^^^^^ meta.sexpr.whizzml support.function.whizzml

(sleep 12345)
;^ support.function.whizzml

10 changes: 10 additions & 0 deletions whizzml_primitives.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ drop
empty?
even?
every?
execution-inputs
execution-logs
execution-output-resources
execution-outputs
execution-sources
exp
fetch
field-categories
Expand All @@ -155,6 +160,7 @@ flatline-listify
flatline-splice
flatline-str
flatline-str-splice
flatten
floor
for
gamma
Expand Down Expand Up @@ -252,6 +258,7 @@ numeric-field?
odd?
or
parse-resource-id
partial
positive?
pow
ppr-str
Expand Down Expand Up @@ -287,13 +294,15 @@ resource-ids
resource-name
resource-property
resource-type
resource-types
resource-workflow
resources
reverse
round
row-distance
row-distance-squared
scriptify
scriptify-test
select-keys
set
set*
Expand All @@ -304,6 +313,7 @@ sha1
sha256
sin
sinh
sleep
smacdown--actual
smacdown--aggregate-predictions
smacdown--candidates
Expand Down

0 comments on commit 9af538d

Please sign in to comment.