Releases: dgkf/R
v0.4.0
"Wonder Where We Land"
Note
see the release blog post with interactive examples
New ✨: docs pages, with interactive code - see paste()
As Always: a live repl in your browser to test out the release
Changes
- Improved vector internals: Will not internally avoid copies when possible, leaning on mutable views for in-place modification
- Localized keywords: The parser can now perform in-place translation of language keywords
- Metaprogramming updates: Now with
eval
,quote
andsubstitute
, and in the process stress-testing of the non-standard evaluation model
Usability Enhancements
- The console REPL and browser REPL both now do syntax highlighting and input validation
- The browser REPL can accept flags using url query parameters and encode snippets in urls for sharing
_
can be included in numerics for readability
Notable Bug Fixes
- Parser fixes to allow whitespace between some more operators
- Promises will get masked by materialized values upon modification
- Nested promises will now evaluate lingering tail calls upon evaluation
- Negation operator (
!
) now implemented, after getting overlooked
and many more in the full changelog: v0.3.1...v0.4.0
New Contributors
- @sebffischer made their first contribution in #73
- @Lornebradia made their first contribution in #83
v0.3.2
"Eurydice"
Note
As always, you can try out the latest development release online.
Changes
- tracebacks added to output upon error
Notable Bug Fixes
- Many control flow keywords (
repeat
,while
,for
) now properly handle internalTail
return types introduced to handle tail recursion. They will now properly be evaluated within the keyword block. if-else
blocks now will correctly parse trailing newlines as the start of a new branch expression when noelse
clause is provided.
Internals
- Many internal
panic!
s have been further moved to captured errors. Closure
s ofSymbol
s (an approximation forPromise
s) will now evaluate a bit more quickly by avoiding adding frames to the call stack.Closure
s that propegate to a nested call will no longer introduce a new wrappingClosure
, instead propegating the existingClosure
value and avoiding the extra layer of indirection.
Development Updates
- Binary builds are now incorporated into the PR actions (and hopefully, if all goes as planned, they'll also be published for this release). Special thanks to @eitsupi for the help getting these set up.
Full Changelog: v0.3.1...v0.3.2
edit: Sorry for floating this tag forward a few commits. It was the easiest way to get the release binary publishing working. It is not the intention of this project to have a culture of moving release tags regularly, so hopefully now that releases are being published this is the last time.
v0.3.1
"Art Smock"
Major Changes
-
License was changed to be
GPL-3
. The contributor license agreement (CLA
) used in the development repository will remain in place with a grace period for comment. With it comes a copyright and warranty disclaimer as recommended in theGPL
, which should make long-time R users feel right at home. -
Added simplest-case destructuring assignment.
(x, y) <- list(a = 1, b = 2) x # [1] 1 y # [1] 2
-
return
keyword introduced (this is unlike R'sreturn()
primitive, and this might change back to using areturn()
primitive in the future)
Experiments
This release introduces "experiments", which are feature-gated behaviors. This release introduces two to start:
-
tail-call-optimization
, when enabled, will handle tail calls without extending the call stack, but with the possibly unexpected behavior of eagerly evaluating arguments to the call. -
rest-args
, when enabled, introduces the ability to name ellipsis arguments and to unpack lists into function calls.
Notable Bugs Addressed
for
loop off-by-one error corrected.
Internals
-
Many
panic!
s where replaced with proper errors. -
Introduced the start of destructuring assignment.
-
Added
Tail
andReturn
Signal
variants, which are used to raise returns back to the calling frame (the calling function).Return
is used to return values andTail
is used to return the tail expression for potential tail call optimization.
v0.3.0
As always, you can try out the latest development release online.
"Days of Abandon"
Major Changes
-
Vector indexed assignment (
x[1:3] <- 10
) is now supported! What's more,
it avoids intermediate replications of the vector by keeping track of the
indexing operation as a "view" of the vector.x <- 1:10 x[2:8][2:5][[2]] <- 1000 x # [1] 1 2 3 1000 5 6 7 8 9 10
-
Mutating assignment implemented for
List
s, including by named index.x <- list(a = 1, b = 2, c = 3, d = 4, e = 5) x[2:3][[1]] <- 200 x[1:4][c("d", "c")] <- 1000 x # list(a = 1, b = 200, c = 1000, d = 1000, e = 5)
Internals
-
"altreps" are now supported internally, though currently only a "Subset"
(used for indexed assignment) is implemented. -
List
s were reworked to use aHashMap
of named values, allowing for
more immediate access to named values without repeated traversals of a
vector of pairs.
v0.2.0
"In Bloom"
Major Changes
-
Primitives are now more consistently handled, allowing them to be reassigned like any other function object. Prior to these enhancements, primitives would only be used for calls to specifically named symbols.
f <- paste f("a", c("b", "c")) # [1] "a b" "a c"
-
A call stack with proper call frames is now added, paving the way for improved error messages and the implementation of R's metaprogramming tools.
You can view the call stack by introducing a
callstack()
call:f <- function(...) list(..., callstack()) f("Hello, World!") # [[1]] # [1] "Hello, World!" # # [[2]] # [[2]][[1]] # f("Hello, World!") # # [[2]][[2]] # list(..., callstack()) # # [[2]][[3]] # callstack()
-
Even more primitives now implemented! This release brings
paste()
andcallstack()
(akin to R'ssys.calls()
)
Behind the Scenes
- Primitives are now all implemented as
dyn Primitive
objects, implementing aCallable
trait. They still don't have a proper standard library namespace, and are discovered only if not found in the environment (or its parents), but this paves the way for treating primitives more like user-defined functions.