Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- **Standard Library Modules (Complete)**
- **sys module**: System parameters and functions
- Attributes: `argv`, `platform`, `version`, `maxsize`, `stdin`, `stdout`, `stderr`, `path`
- **os module**: Operating system interface
- Attributes: `name`, `sep`, `pathsep`, `linesep`, `devnull`, `curdir`, `pardir`, `extsep`, `environ`
- Functions: `getcwd`, `getenv`, `getpid`, `urandom`
- **os.path submodule**: Path manipulation functions
- Functions: `join`, `exists`, `isfile`, `isdir`, `basename`, `dirname`, `abspath`, `split`, `splitext`
- Attributes: `sep`, `pathsep`, `curdir`, `pardir`
- **math module**: Mathematical functions and constants
- Constants: `pi`, `e`, `tau`, `inf`, `nan`
- Trigonometric: `sin`, `cos`, `tan`, `asin`, `acos`, `atan`, `atan2`
- Hyperbolic: `sinh`, `cosh`, `tanh`
- Exponential/Logarithmic: `exp`, `log`, `log10`, `log2`, `pow`
- Rounding: `floor`, `ceil`, `trunc`, `round`
- Utility: `sqrt`, `abs`, `fabs`, `copysign`, `fmod`, `remainder`, `degrees`, `radians`, `hypot`, `factorial`, `gcd`, `isnan`, `isinf`, `isfinite`
- **random module**: Random number generation
- Functions: `random`, `randint`, `randrange`, `uniform`, `choice`, `shuffle`, `sample`, `seed`, `getrandbits`, `gauss`, `normalvariate`, `expovariate`
- **json module**: JSON encoding and decoding
- Functions: `loads`, `dumps`, `load`, `dump`, `JSONEncoder`, `JSONDecoder`
- Implementation: Uses `serde_json` for compile-time JSON operations
- Runtime JSON parsing infrastructure in place
- **re module**: Regular expression operations
- Functions: `compile`, `search`, `match`, `fullmatch`, `findall`, `finditer`, `split`, `sub`, `subn`, `escape`, `purge`
- Flags: `IGNORECASE`, `MULTILINE`, `DOTALL`, `VERBOSE`, `ASCII` (and short forms: `I`, `M`, `S`, `X`, `A`)
- **datetime module**: Date and time manipulation using chrono crate
- Types: `datetime`, `date`, `time`, `timedelta`, `timezone`, `tzinfo`
- Methods: `now`, `today`, `fromtimestamp`, `fromisoformat`, `strftime`, `strptime`, `replace`, `timestamp`, `isoformat`, `weekday`, `isoweekday`
- Constants: `MINYEAR`, `MAXYEAR`
- Implementation: Uses `chrono` crate for compile-time datetime operations
- Compile-time helpers: `datetime_now_utc()`, `datetime_now_local()`, `date_today()`, `datetime_from_timestamp()`, `datetime_from_iso()`, `datetime_to_iso()`, `datetime_strftime()`
- **collections module**: Specialized container datatypes
- Functions: `namedtuple`, `deque`, `Counter`, `OrderedDict`, `defaultdict`, `ChainMap`, `UserDict`, `UserList`, `UserString`
- **itertools module**: Iterator building blocks
- Infinite iterators: `count`, `cycle`, `repeat`
- Terminating iterators: `chain`, `compress`, `dropwhile`, `filterfalse`, `groupby`, `islice`, `starmap`, `takewhile`, `tee`, `zip_longest`
- Combinatoric iterators: `product`, `permutations`, `combinations`, `combinations_with_replacement`
- Additional: `accumulate`, `batched`, `pairwise`
- **functools module**: Higher-order functions and operations on callable objects
- Functions: `reduce`, `partial`, `partialmethod`, `wraps`, `update_wrapper`, `total_ordering`, `cmp_to_key`
- Decorators: `lru_cache`, `cache`, `cached_property`, `singledispatch`, `singledispatchmethod`

- **Generator Functions & Iterators**
- `yield` statement support in function bodies: `yield value`
- Generator type system: `IRType::Generator[T]` for type tracking
Expand Down
199 changes: 199 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ binaryen = "0.13.0"
thiserror = "1.0"
log = "0.4.28"
serde = { version = "1.0.228", features = ["derive"], optional = true }
serde_json = "1.0"
chrono = "0.4"

[lib]
name = "waspy"
Expand Down
23 changes: 12 additions & 11 deletions docs/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,19 +275,20 @@ <h1 class="title">Waspy Development Board</h1>
},
stdlib: {
title: "STANDARD LIBRARY",
status: "progress",
version: "in-dev",
status: "done",
version: "unreleased",
features: [
{ name: "sys module (argv, platform, version, maxsize, stdin/stdout/stderr, path)", status: "done", version: "unreleased" },
{ name: "os module (operating system interface)", status: "progress" },
{ name: "math module (mathematical functions)", status: "progress" },
{ name: "random module (random number generation)", status: "progress" },
{ name: "json module (JSON encoding/decoding)", status: "progress" },
{ name: "re module (regular expressions)", status: "progress" },
{ name: "datetime module (date and time handling)", status: "progress" },
{ name: "collections module (specialized container types)", status: "progress" },
{ name: "itertools module (iterator utilities)", status: "progress" },
{ name: "functools module (higher-order functions)", status: "progress" }
{ name: "os module (name, sep, pathsep, linesep, devnull, curdir, pardir, extsep, environ, getcwd, getenv, getpid, urandom)", status: "done", version: "unreleased" },
{ name: "os.path submodule (join, exists, isfile, isdir, basename, dirname, abspath, split, splitext, sep, pathsep)", status: "done", version: "unreleased" },
{ name: "math module (pi, e, tau, inf, nan, sqrt, sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, exp, log, log10, log2, pow, floor, ceil, trunc, round, abs, fabs, copysign, fmod, remainder, degrees, radians, hypot, factorial, gcd, isnan, isinf, isfinite)", status: "done", version: "unreleased" },
{ name: "random module (random, randint, randrange, uniform, choice, shuffle, sample, seed, getrandbits, gauss, normalvariate, expovariate)", status: "done", version: "unreleased" },
{ name: "json module (loads, dumps, load, dump, JSONEncoder, JSONDecoder)", status: "done", version: "unreleased" },
{ name: "re module (compile, search, match, fullmatch, findall, finditer, split, sub, subn, escape, purge, IGNORECASE, MULTILINE, DOTALL, VERBOSE, ASCII)", status: "done", version: "unreleased" },
{ name: "datetime module (datetime, date, time, timedelta, timezone, tzinfo, now, today, fromtimestamp, fromisoformat, strftime, strptime, replace, timestamp, isoformat, weekday, isoweekday, MINYEAR, MAXYEAR)", status: "done", version: "unreleased" },
{ name: "collections module (namedtuple, deque, Counter, OrderedDict, defaultdict, ChainMap, UserDict, UserList, UserString)", status: "done", version: "unreleased" },
{ name: "itertools module (count, cycle, repeat, chain, compress, dropwhile, filterfalse, groupby, islice, starmap, takewhile, tee, zip_longest, product, permutations, combinations, combinations_with_replacement, accumulate, batched, pairwise)", status: "done", version: "unreleased" },
{ name: "functools module (reduce, partial, partialmethod, wraps, update_wrapper, total_ordering, cmp_to_key, lru_cache, cache, cached_property, singledispatch, singledispatchmethod)", status: "done", version: "unreleased" }
]
},
comprehensions: {
Expand Down
Loading
Loading