NEWS
ast2ast 1.1
- New function ‘make_package(files, entry_points, package_dir)': translates
R files into the C++ code of an existing package, like
'Rcpp::compileAttributes'. Only 'entry_points' are exported; all other
functions in the files are internal helpers. Runtime errors name package, file,
line and function ('In ’mypkg: helpers.R:5 (helper): ...'').
- New functional 'pmap(f, ncores, x, ...)': like 'map', but the elements
are processed in parallel on a thread pool (via RcppThread). Warnings
raised inside 'f' are reported in element order; errors report the line
inside 'f'. Functions that use the R API internally (currently 'lbfgsb')
cannot be called inside 'pmap' and are rejected at translation time.
- ‘pso' uses its own Mersenne-Twister RNG instead of R’s RNG and takes a new
‘seed' argument: 'pso(f, lower, upper, ngen, npop, error_threshold, global,
seed[, data])'. Results are reproducible and independent of R’s RNG state;
'pso' can also be called inside 'pmap'.
- Faster subsetting and subset assignment; common subsetting patterns now
run faster than in base R.
- 'jacobian' takes an optional 'colouring' argument (forward mode): columns
that share no row are computed in one sweep. 'colouring = "static", n = literal'
derives the sparsity pattern at translation time;
'colouring = "runtime"' records it at every call from one reverse-mode run
of 'f'.
- RcppThread is a new dependency (Imports and LinkingTo).
- Borrowed arguments ('borrow_vec', 'borrow_mat', 'borrow_array') can now be
combined with forward-mode differentiation for inner functions and for
'output = "XPtr"'.
ast2ast 1.0 (2026-09-14)
- Major release, and the first since the package was archived on CRAN.
A great deal has changed; ast2ast is substantially more capable than
version 0.3. Highlights follow.
- New tree-based type system with type inference, 'const' checking,
user-defined types ('new_type' / 'slots') and functions as types
('fn', including inner functions and recursion).
- Automatic differentiation: forward mode and reverse (tape-based) mode.
- Root finding and optimization: uniroot, L-BFGS-B and nnls.
- Support for n-dimensional arrays and for collection types.
- Functional helpers: apply, map, Reduce, Filter.
- Runtime errors now report the originating R source line.
- A much larger set of supported base R functions and operators;
see the vignettes for the current list.
ast2ast 0.30
- removed bug in cmr.
- refactored the conversion of sexp to SEXP
ast2ast 0.2.1 (2022-10-19)
- all functions in C++ are now inlined
ast2ast 0.2 (2022-09-15)
- code can now be translated to R function and external pointer