Europe/London
From Byron Torres to ~sircmpwn/hare-dev
Hi jgart, Thanks for contributing to the Hare ecosystem. On Tue Feb 21, 2023 at 6:32 PM GMT, jgart wrote: > hi, > > here is v4 using println instead of printfln at the suggestion of ~unwox > > all best, > > jgart > ---
From Byron Torres to ~sircmpwn/hare-dev
New type result = []capture for better semantics; synonym for "match". Repeated docs information has been reorganized into appropriate docstrings, improving terseness. A better README example is used which replaces unobvious prints with assert, and demonstrates capture groups. Exported changes: * [[free_captures]] -> [[result_free]] * [[free_matches]] -> [[result_freeall]] Signed-off-by: Byron Torres <b@torresjrjr.com> --- cmd/haredoc/color.ha | 2 +- [message trimmed]
From Byron Torres to ~sircmpwn/hare-dev
--- @noreturn, @test, @symbol(...), etc. syntax/hare.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/hare.vim b/syntax/hare.vim index 786d322..de9490b 100644 --- a/syntax/hare.vim +++ b/syntax/hare.vim @@ -99,7 +99,7 @@ syn match hareErrorAssertion "\v(^([^/]|//@!)*\)\_s*)@<=!\=@!" syn match hareQuestionMark "?" [message trimmed]
From Byron Torres to ~sircmpwn/hare-dev
Signed-off-by: Byron Torres <b@torresjrjr.com> --- # v2 signoff nl.ha | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nl.ha b/nl.ha index e5d936a..00496cc 100644 --- a/nl.ha [message trimmed]
From Byron Torres to ~sircmpwn/hare-dev
--- nl.ha | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nl.ha b/nl.ha index e5d936a..00496cc 100644 --- a/nl.ha +++ b/nl.ha @@ -331,11 +331,10 @@ fn println(line: str, s: style, ctx: *context) (void | io::error) = { case none => fmt::printf("{%}{}", " ", ctx.mod, ctx.sepblank)?; case let re: regex::regex => match (regex::find(&re, line)) { case []regex::capture =>[message trimmed]
From Byron Torres to ~sircmpwn/hare-dev
See commit d2dd8c098fa7b294235c4d9fb27ca526f6ad9fe4 Cc: Amelia Clarke <me@rsaihe.dev> --- const, def, export, and static are keywords, not auxiliary tokens to type definitions, like nullable. Most colorschemes work with 'keyword'. syntax/hare.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/syntax/hare.vim b/syntax/hare.vim index 64ac754..b72c8b1 100644 [message trimmed]
From Byron Torres to ~sircmpwn/hare-dev
Herein lies significant changes to the date/time modules, along with
various bug fixes, tests, docs, and other auxiliary, minor improvements.
THE TIME MODULE
The following are removed:
* type ambiguous = ![]instant;
* type nonexistent = !void;
* type error = !(ambiguous | nonexistent);
Their purpose was to provide the semantics for timescale conversions
in the [[time::chrono]] module. They are replaced with new types
which live there instead.
[message trimmed]
From Byron Torres to ~sircmpwn/hare-dev
This commit facilitates a system of unification of all temporal types.
The time::chrono::moment type now:
* Embeds the time::instant struct type.
* Uses voidable .date, .time, and .zone fields.
Datetimes and moments are now intrinsically instants and inherit the
same properties of precision and ubiquity. Pointers to such objects may
be passed around seemlessly.
*(&dt: *time::chrono::moment)
*(&dt: *time::instant)
The .date and .time fields now hold observed values instead of
[message trimmed]
From Byron Torres to ~sircmpwn/hare-dev
This is in preparation for the next commit. * min -> minute * sec -> second * nsec -> nanosecond Signed-off-by: Byron Torres <b@torresjrjr.com> --- datetime/arithmetic.ha | 24 ++++++++++----------- datetime/chronology.ha | 48 +++++++++++++++++++++--------------------- datetime/datetime.ha | 18 ++++++++-------- datetime/format.ha | 8 +++---- datetime/parse.ha | 6 +++--- 5 files changed, 52 insertions(+), 52 deletions(-) [message trimmed]
From Byron Torres to ~sircmpwn/hare-dev
Though [[timezone]].name is is generally used as the filepath where
their corresponding TZif file exists in /usr/share/zoneinfo, it is also
a general identifier.
"TAI", "GPS", "TT", and "MTC" aren't commonly used timezones -- they
don't have corresponding TZif files -- but they are standardized. It
seems sensible to be able to identify them, and use %L with them.
Therefore, the assumption that .name is a filepath should no longer hold
true universally. Perhaps we should introduce two separate fields for
these use cases.
Signed-off-by: Byron Torres <b@torresjrjr.com>
---
[message trimmed]