Releases: sharkdp/numbat
v1.14.0
Features
- Example decorators by @Bzero in #566
- Restructured how commands like
list
,help
,quit
are parsed to implementsave
by @rben01 in #555 - Mixed unit list conversion by @Goju-Ryu in #568
- Add years and months to the human date formatter by @ValentinLeTallec in #425
- Basic plotting support by @sharkdp in #464
- Add fixed-point iteration by @sharkdp in #530
- Improve error message for assert_eq/3 by @xmbhasin in #527
- Color format conversions by @sharkdp in #504
- Add lowercase aliases for currency units by @triallax in #571
- Add lowercase alias for EUR by @triallax in #582
- Plumbed spans through alias definitions, allowing for more precise er… by @rben01 in #576
- Improved error message when encountering a trailing equals by @rben01 in #599
- Add '\cdot' as additional multiplication operator by @sharkdp in #608
- Add percentage-calculation functions by @sharkdp in #609
- Safe versions of round/ceil/floor/trunc by @sharkdp in #546
Performance improvements
- Avoid cloning the typechecker in
elaborate_statement
by @GuerricChupin in #543 - Reduce the number of calls to simplify by @irevoire in #537
- Replaced the
String
inToken
with&'a str
by @rben01 in #559 - Consolidated duplicated code in
TypeChecker::elaborate_define_variable
and theast::Statement::DefineDerivedUnit
branch ofTypeChecker::elaborate_statement
by @rben01 in #558 - Shrink span by @rben01 in #578
- Boxed errors by @rben01 in #569
- More
String
s replaced with&str
s by @rben01 in #579 - Remove allocations in
Markup
by switching toCow<'static, str>
by @rben01 in #585 - Borrowed
typed_ast
Statement
by @rben01 in #597 - Improved completion performance by @rben01 in #594
- Tokenizer improvements by @rben01 in #598
Bug fixes
- Dimensionful
abs
function by @Bzero in #572 - Fix pretty printing for some generic types by @sharkdp in #547
- Enable tests to run without internet access by @sharkdp in #562
- Corrected swapped epsilon/varepsilon unicode input shortcuts by @rben01 in #595
- Allow units with rational exponents by @sharkdp in #614
- Fix unit_of-related crashes by @sharkdp in #615
Other
- Bump Bytes from yanked version by @RossSmyth in #528
- New example: Geographical distance by @sharkdp in #531
- style: simplify string formatting for readability by @hamirmahal in #541
- Type-inference Gauss elimination example by @sharkdp in #548
- Misc cleanup by @rben01 in #557
- Fix WASM tests by @sharkdp in #563
- Fix some clippy warnings by @rben01 in #583
- Cleaned up some todos and clippy warnings by @rben01 in #601
- Fixed some clippy warnings by @rben01 in #605
- Add explicit use statement for non-prelude functions to examples by @Bzero in #604
- Add support for highlighting of @example by @Goju-Ryu in #612
Special thank you
- To @Bzero for all the incredible documentation improvements
- To @rben01 for a lot of improvements across the whole code base, new features and performance improvements
- To @GuerricChupin and @irevoire for great performance improvements
New Contributors
- @xmbhasin made their first contribution in #527
- @GuerricChupin made their first contribution in #543
- @rben01 made their first contribution in #557
- @ValentinLeTallec made their first contribution in #425
Full Changelog: v1.13.0...v1.14.0
v1.13.0
Overview
This is probably the largest release since the initial version of Numbat. The type checker has been rewritten completely and we now have full type inference in Numbat. You can read more about it here and in #443. This new type system also made it possible to add lists to the language. You can read more here and here. Another major feature is the possibility to add local variables in function definitions (by @irevoire). You can read more in #519 and #201.
One example to sum up the features in this new release is the following function:
fn breaking_distance(v) = v t_reaction + v² / 2 µ g0
where t_reaction = 1 s # driver reaction time
and µ = 0.7 # coefficient of friction
If you enter this function in the Numbat interpreter (try here), the new type inference engine will fill in all types:
fn breaking_distance(v: Velocity) -> Length = v × t_reaction + (v² / (2 µ × g0))
where t_reaction: Time = 1 second
and µ: Scalar = 0.7
Features
- Full type inference, list datatype by @sharkdp in #443
- Multiline functions: local variables by @irevoire in #519
- Make the reverse function call more useful by @irevoire in #518
- Calendar arithmetic for DateTimes by @sharkdp in #517
- Add simple numerical methods for root finding and differentiation by @sharkdp in #451
- Add coloring config argument by @T1mVo in #458
- More statistics, list and string functions by @sharkdp in #468
- Add sort_by_key by @sharkdp in #482
- Support string escape sequences by @sharkdp in #484
- Implement 'gcd' and 'lcm' by @sharkdp in #487
- Add source spans for assertion error messages by @sharkdp in #489
- Add a 'run' link to all examples in the documenation by @Bzero in #492
- Add ord(…) function by @sharkdp in #498
- Add trunc(…) function by @sharkdp in #499
- Add special symbols for arcmin, arcsec by @sharkdp in #500
- Add mixed-unit conversion functions by @sharkdp in #501
- Add support for Unicode subscript-number input by @sharkdp in #502
- Add julian_date conversions by @sharkdp in #508
Changes
- Change postfix apply operator from
//
to|>
by @sharkdp in #520 - Change quadratic_equation to return a list of solutions by @sharkdp in #450
- Better error message for empty string interpolations by @sharkdp in #474
Bugfixes
- fix: layout shifting after terminal loads by @hamirmahal in #446
- Fix 465 by @sharkdp in #473
- root_newton: Add max. iterations to prevent infinite loop by @sharkdp in #475
- Newlines before closing ']' should be allowed in list expressions by @maksimowiczm in #480
- Allow closing parens and newlines by @irevoire in #513
Misc
- Major speed-ups in the list implementation @irevoire in #515
- Show quotes for pretty-printed strings by @triallax in #440
- New example: How many photons are received per bit transmitted from Voyager 1? by @sharkdp in #453
- HasField constraints by @sharkdp in #461
- Make local timezone support optional by @eminence in #460
- Typo fix docs number notation by @mgenser in #472
- Refactor FFI module by @sharkdp in #476
- Fix clippy suggestions by @sharkdp in #477
- Faster lists by @sharkdp in #478
- Update dependencies by @sharkdp in #486
- Major documentation update by @sharkdp in #526
- Replace chrono with jiff by @sharkdp in #511
- refactor: remove redundant reference and closure by @hamirmahal in #444
- Add Repology packaging status badge to installation section of book by @triallax in #439
- Restructure test examples by @sharkdp in #488
- Readable types by @sharkdp in #493
- info: Print readable function signatures by @sharkdp in #497
- Auto-generated reference documentations (functions) by @sharkdp in #469
Units
- Add new heat energy units by @MugheesQasim in #495
New Contributors
- @T1mVo made their first contribution in #458
- @mgenser made their first contribution in #472
- @maksimowiczm made their first contribution in #480
- @MugheesQasim made their first contribution in #495
Full Changelog: v1.12.0...v1.13.0
v1.12.0
Features
- Add support for struct/record types (see documentation) by @simmsb in #418
- Extended number formatting by @triallax in #312
- Function decorators by @Bzero in #435
- Added random function by @mrkbac in #401
- Random distribution sampling by @Bzero in #416
- Add NaN, inf, is_nan and is_infinite by @Bzero in #407
- Add function to solve quadratic equations by @hamirmahal in #398
- Add element(…) function for retrieving properties of chemical elements by @sharkdp in #431
- Implement 'Never' type (!) by @sharkdp in #420
Bugfixes
New units
- Add jansky and solar flux unit by @triallax in #426
- Add "darcy" unit by @triallax in #396
- Add yuan as renminbi alias by @P1n3appl3 in #402
- Add permille unit by @Bzero in #429
Other
- Tokenize three periods as ellipsis (not just unicode character …) by @triallax in #406
- style: status badge for
CICD
inREADME.md
by @hamirmahal in #391 - Do some minor cleanup in
parser.rs
by @triallax in #405 - feat: nicer error messages during development by @hamirmahal in #409
- Bump iana-time-zone to no longer use a yanked package by @RossSmyth in #419
- Fix formatting issue in list-functions.md by @Goju-Ryu in #430
- Fix clippy lints by @P1n3appl3 in #404
- Proper subtyping rules for Never type by @sharkdp in #423
Full Changelog: v1.11.0...v1.12.0
v1.11.0
Features
- Enable using
<FILE>
and-e <EXPRESSION>
CLi arguments at the same time by @Bzero in #356 - Add
-i
/--inspect-interactively
option to enter interactive session after executing script or expression by @Bzero in #370
Bugfixes
- Better error messages for unterminated strings with interpolations by @Zengor in #389
- Store datetimes with fixed offset by @sharkdp in #378, see also: #376
- Disallow dimensionless base units by @sharkdp in #381
- Runtime error for wrong format specifiers by @sharkdp in #379
- Create parents of user data directory (for storing numbat history) if they do not exist @hamirmahal in #386
Prelude
Other changes
- Improve documentation around ad-hoc units by @sharkdp in #380
- refactor: remove reference that's unnecessary by @hamirmahal in #348
- refactor: wrap result of
cmp
forPartialOrd
by @hamirmahal in #349 - refactor: remove manual impl. of
Option::map
by @hamirmahal in #352 - Always embed modules by @sharkdp in #357
- Move HtmlFormatter to core by @sharkdp in #358
- Make to_markup more flexible by @sharkdp in #359
- Numbat PPA for Ubuntu and derivatives by @archisman-panigrahi in #361
- Skip serializing 'enter_repl' by @Bzero in #388
Full Changelog: v1.10.1...v1.11.0
v1.10.1
v1.10.0
Features
- Native support for date and time handling! See this documentation page for details. By @eminence in #287
- First class functions, function types, conversion functions. See this documentation page and #200 for details. By @sharkdp
- Human-readable time durations (
10 million seconds -> human
) by @sharkdp in #327 - Add ability to hide 'private' functions and variables by @sharkdp in #325
Prelude
- Use tropical years as 'year' unit by @sharkdp in #334
- Add new uniots:
gons
,grad
,gradians
,beat
,rack
,KSI
,MPSI
. By @mhmdanas in #288 - Add U+2126 OHM SIGN as a short alias for the
ohm
unit by @eminence in #300 - Renamed
to_celsius
/to_fahrenheit
tocelsius
/fahrenheit
, as they can be used with the new conversion function feature (300 K -> celsius
)
Bugfixes
- Pretty print 'long' units with long prefixes by @do-you-dare in #309
- Errors in config file don't point to correct span, by @eminence in #301
- Wait for background currency fetch thread to finish before exiting by @eminence in #298
- Full simplify arguments in function calls by @sharkdp in #326
- Improve unterminated string interpolation error by @mhmdanas in #313
Web
- style: open
sharkdp/numbat
in new tab by @hamirmahal in #303 - Use default allocator instead of wee_alloc in numbat-wasm by @mhmdanas in #296
Other
- Add desktop file and Numbat icons to assets by @mhmdanas in #294
- Add #[track_caller] annotation to some panicy VM functions by @eminence in #331
- Embed timezone conversion into conversion-function framework by @sharkdp in #339
- Use local timezone, not local UTC offset by @sharkdp in #329
- parse_datetime: relaxed formats by @sharkdp in #330
- Tooling improvements: docs, CI, wasm by @sharkdp in #280
Full Changelog: v1.9.0...v1.10.0
v1.9.0
Features
- New
info
command to get information for constants and units by @eminence in #267 - Unicode input feature by @sharkdp in #275
- Logical operators by @irevoire in #272
- Support subscript characters in identifiers by @mhmdanas in #277
- Add basic hex conversion by @sharkdp in #279
Prelude
- Add ampere-hours to
misc
module by @Tehforsch in #278 - Add Rydberg constant by @sharkdp in #249
- Add CODATA 2018 values of physics constants by @sharkdp in #268
- Added the ThermalTransmittance dimension by @tiagoporsch in #270
Bugfixes
- Add only existing modules to imported_modules list by @Bzero in #256
- Fix multiple errors spawning for the same token. by @irevoire in #265
- Don't autocomplete opening paren after function call that follows
//
by @eminence in #266
Other
- Various upgrades by @sharkdp in #250
- Typechecker improvements by @sharkdp in #252
- Don't hide
--no-config
flag by @mhmdanas in #255 - Simplify binop parsing by @irevoire in #273
New Contributors
- @tiagoporsch made their first contribution in #270
- @Tehforsch made their first contribution in #278
Full Changelog: v1.8.0...v1.9.0
v1.8.0
New Features
- Add CLI config file by @mhmdanas in #227
- Default to
--pretty-print=never
for-e
and stdin input by @0xAdk in #240 - Output multiple diagnostics in one command by @irevoire in #228
- Better formatting of large numbers by @sharkdp in #244
- Better "suggested fix" messages by @sharkdp in #232
- Tab-complete prefixes and module paths by @sharkdp in #245
- Better
list
command by @sharkdp in #248
Bugfixes
Units
- Add foot-candles unit by @hotgluebanjo in #225
- add the rest of the currency exchange rates provided by the European Central Bank by @herlev in #226
- Add more complete set of imperial weight units by @sharkdp in #234
Others
- Add documentation for nixos installation by @giomf in #229
- Run
cargo clippy --fix
on codebase by @0xAdk in #236
New Contributors
- @hotgluebanjo made their first contribution in #225
- @herlev made their first contribution in #226
- @giomf made their first contribution in #229
- @0xAdk made their first contribution in #236
Full Changelog: v1.7.0...v1.8.0
v1.7.0
Features, changes
- Add "did you mean" suggestions for functions and procedures, @eminence in #199
- Improve the "did you mean" suggestions for booleans, @eminence in #198
- Allow underscores in integers with bases, @irevoire in #190
- Add support for prefix unary plus operator, @irevoire in #209
- Add intro banner and -q/--quiet option to suppress it, @Bzero in #220
- Added new
help
(and?
) commands, @tomeichlersmith in #222 - Add support for arbitrary types in function parameters, #193
- Allow overwriting of functions, #171
- Allow constants to be shadowed, #197
- Allow identifiers to start with °
- Web: multi-line sharing, #186
- On-demand loading of currency exchange rates, #107 and #183
- Allow -e/--expression to appear multiple times
- Better error message for wrong function argument type
- Add
assert(…)
, #188 - Added strings to the language
- Add support for user errors
- Unit meta information,
@name
and@url
decorators, #223
Units, prelude
- Add support for more currencies, @zaidhaan in #216
- add metrix prefixes for barns by @tomeichlersmith in #182
- Add smoot unit by @Mstrodl in #208
- More consistent names for physical dimensions
- More named physical dimensions
- Added Stefan-Bolzmann constant, #189
- Accept 'u' instead of 'µ' for micro
- Treat hundred, thousand, … as units
- Add 'cooking' module
- Add ℎ = planck_constant
- Rename speed => velocity
- Add sidereal_day unit
- Add extra::astronomy module
Other
v1.6.3
Changes
- Add possibility for package maintainers to customize the Numbat module path via
NUMBAT_SYSTEM_MODULE_PATH
, see #173 and https://numbat.dev/doc/cli-installation.html#guidelines-for-package-maintainers
Bugfixes
- Disallow base/derived dimension conflicts, see #153
Prelude
- Fix the definition of
ElectricDipoleMoment
. - Add
Polarizability
.