a clean, readable scripting language with built-in GUI support. write less, do more — ware reads like plain english and runs on python.
| function | description |
|---|---|
| sqrt(x) | square root |
| abs(x) | absolute value |
| round(x, n) | round to n decimal places |
| floor(x) / ceil(x) | floor / ceiling |
| power(x, n) | x to the power n |
| log(x) / sin(x) / cos(x) | logarithm / trig functions |
| clamp(x, min, max) | constrain value to range |
| random() | random float between 0 and 1 |
| random_int(a, b) | random integer between a and b |
| to_fixed(x, n) | format number to n decimal places |
| to_hex(x) / to_bin(x) | convert to hex or binary string |
| function | description |
|---|---|
| length(s) | character count |
| upper(s) / lower(s) | case conversion |
| trim(s) | remove surrounding whitespace |
| strip_chars(s, chars) | remove specific edge characters |
| replace(s, old, new) | replace substring |
| contains(s, sub) | true if substring present |
| starts(s, prefix) | starts with test |
| ends(s, suffix) | ends with test |
| find(s, sub) | position of substring (1-based, 0 if not found) |
| count(s, sub) | count occurrences of substring |
| slice(s, start, end) | extract substring (1-based) |
| char_at(s, i) | character at position (1-based) |
| repeat(s, n) | repeat string n times |
| pad_left(s, n, c) / pad_right(s, n, c) | pad string to width n with char c |
| split(s, delim) | split into list |
| join(list, sep) | join list into string |
| words(s) / lines(s) | split on whitespace / newlines |
| to_chars(s) | explode into character list |
| number(s) / text(x) | parse string to number / any value to string |
| function | description |
|---|---|
| is_empty(s) | true if length 0 |
| is_upper(s) / is_lower(s) | case check |
| is_numeric(s) | true if string is a valid number |
| is_alpha(s) | true if only letters |
| function | description |
|---|---|
| size(x) | length of list, string, or dict |
| first(list) / last(list) | first / last element |
| reverse(list) | reversed copy |
| sort(list) | sorted copy |
| remove(list, i) | remove element at index i (1-based) |
| has(list, item) | true if item in list |
| index_of(list, item) | position (1-based, 0 if not found) |
| unique(list) | deduplicated copy |
| flatten(list) | flatten one level |
| sum_list(list) | sum of numeric list |
| max_of(list) / min_of(list) | maximum / minimum value |
| any_true(list) / all_true(list) | boolean aggregation |
| count_in(list, item) | count occurrences of item |
| function | description |
|---|---|
| keys(dict) | list of keys |
| values(dict) | list of values |
| has_key(dict, key) | true if key exists |
| function | description |
|---|---|
| type_of(x) | returns "text", "number", "list", "dict", "bool", "object", or "nothing" |
| is_text(x) / is_number(x) | type predicates |
| is_list(x) / is_dict(x) | type predicates |
| is_bool(x) | boolean type check |
all GUI apps start with make window. widgets are added top-to-bottom. use make row for horizontal layout. read widget values using the variable name directly.
install ware-language-2.0.0.vsix for syntax highlighting, the Ware Dark theme, and 35+ code snippets.