| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test currently fails because when we execute an
unsuffixed file like test/019/a, which exists,
another file is executed instead, like test/019/a.txr.
* tests/019/data/a,
* tests/019/data/a.tl,
* tests/019/data/a.tlo,
* tests/019/data/a.txr
* tests/019/data/b.tl
* tests/019/data/b.tlo
* tests/019/data/b.txr
* tests/019/data/c.tl
* tests/019/data/c.txr
* tests/019/load-search.tl: New files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test currently fails. This problem was reported
by Paul Patience, with a repro test case.
The issue is that when compile-file is processing a
(defpackage x ...) form, and the package x already exists, it
fails to recognize the form as a package-manipulating form,
and therefore fails to introduce a "fence" in the output
so that subsequent material is placed into a new top-level
object.
The compiled image fo the (defun foo:fun ()) form in
program.tl causes an error: the foo package does not
exist. This is because the symbol foo:fun is being read
as part of the same object which holds the compiled image of
the defpackage form which defines the package.
It's essentially the same problem as this
(let ()
(defpackage :foo)
foo:bar)
The (defpackage ...) cannot execute until the entire form is
read, but that form contains foo:bar which requires the foo
package to exist.
* tests/019/compile-package.tl: New file.
* tests/019/data/program.tl: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These types actually make it possible to receive a string by
pointer from a C function, without trying to free it.
It is now possible to write a FFI wrapper for strtol or
wcstol, which is done in the new test case.
* ffi.c (str_s_s, bstr_s_s, wstr_s_s): New symbol variables.
(ffi_init_types): Register the types str-s, bstr-s and wstr-s.
(ffi_init): Intern the new symbols.
* tests/017/str-s.tl: New file.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hash.c (group_map): New function.
(hash_init): group-map intrinsic registered.
* hash.h (group_map): Declared.
* tests/010/hash.tl: New test case.
* txr.1: Documented together with group-by.
Extra paren removed from group-by example.
|
|
|
|
| |
* tests/010/hash.tl: New tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stdlib/op.tl (sys:opip-expand): Add op, do, lop, ldo, ap,
ip, ado, ido, ret and aret to the operators whose forms are
passed through untransformed. This is important because it
lets us override the implicit (op ...) and (do ...) chosen
by the expander. When a pipeline element produces a list, for
instance, we want to be able to use (ap ...) in the next
element to spread the list into arguments.
* tests/012/op.tl: Add bellied numbers test case.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* autoload.c (build_set_entries): Add oust symbol.
* stdlib/build.tl (list-builder postinit): Call the self
argument self instead of bc, for consistency with other
methods.
(list-builder oust): New method.
(list-builder-flets): Add local function oust.
* tests/012/seq.tl: New tests.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register partition-if intrinsic.
* lib.c (partition_if_countdown_funv, partition_if_func): New
functions.
(partition_if): New function.
* lib.h (partition_if): Declared.
* tests/012/seq.tl: New test cases.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (find_max): Simplify into a single loop rather than
handling various sequence types specially. This means it
works for all iterable objects now.
* txr.1: find-max documentation updated; discussion of
hash tables removed, since the described behavior is the
one expected for hash tables as iterables.
* tests/012/seq.tl: Add some test coverage.
|
|
|
|
| |
* tests/018/combine-tlo.tl: New file.
|
|
|
|
| |
* tests/011/patmatch.tl: New tests for recently fixed issue.
|
|
|
|
|
|
|
|
| |
* stdlib/match.tl (expand-quasi-match): When matching `text`
or `@var`, which are matching in the final position of the
specimen, it is not good enough that match-str returns true;
we must check that the entire string was matched.
Reported by Paul A. Patience.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): copy-cptr intrinsic registered.
* lib.c (copy_cptr): New function.
(copy): Use copy_cptr for CPTR objects.
* lib.h (copy_cptr): Declared.
* tests/017/ffi-misc.tl: New test cases.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stdlib/type.tl (sys:typecase-expander): New function, formed
from body of typecase. Bad clause syntax now handled with
compile-error rather than (throwf 'eval-error). The t symbol
is handled specially: it turns into a t conditon in the
resulting cond rather than a typep test. The compiler will
nicely eliminate dead code after that. Now etypecase is handled
here also: if we are expanding etypecase, we just emit the
extra clause.
(typecase, etypecase): Reduced to sys:typecase-expander calls.
* tests/012/typecase.tl: New file.
* tests/012/compile.tl: Add type.tl to list of compile-tested
files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bugfix: the newly introduced @.expr fails in the
dotted position because ^(a . @,expr) turns
into (list 'a 'let ...).
* eval.c (is_meta_unquote): New static function.
(expand_qquote_rec): Replace existing shape test with
is_meta_unquote. We must also use this test in one more place:
whenever the cdr of a list has the meta unquote shape,
we must treat the result similarly to a dotted atom, by
converting to append format.
* tests/010/qquote.tl: Test cases to cover this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For better or worse, TXR Lisp has a dichotomy of
representation that @<atom> produces sys:var syntax, whereas
@<compound> produces sys:expr. This can cause an issue in
backquoting. Suppose you want to use backquote to generate
sytax like (a @b) where the b comes from a variable.
The problem is that (let ((x 'b)) ^(a @,x)) doesn't do
what you might expect: it produces (sys:expr b) rather
than (sys:var b).
This patch adds a hack into the quasiquote expander which
causes it to generate code to do what you expect.
Old behavior:
1> (expand '^(a @,x))
(list 'a (list 'sys:expr x))
New behavior:
1> (expand '^(a @,x))
(list 'a (let ((#:g0012 x))
(if (atom #:g0012)
(list 'sys:var #:g0012)
(list 'sys:expr #:g0012))))
In other words, x will be evaluted, and the based on the
type of the object which emerges, either sys:var or
sys:expr syntax is generated.
* eval.c (expand_qquote_rec): Implement the above hack.
We are careful to only do this when this exact shape occurs
in the syntax: (sys:expr (sys:unquote item)).
* tests/010/qquote.tl: New file.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
User vapnik spaknik was asking in the mailing list whether
there is an existence test for TXR pattern functions. Now
there is.
* eval.c (eval_init): Register match-fboundp intrinsic.
* match.c (match_fbound): New function.
* match.h (match_fbound): Declared.
* tests/011/txr-case.txr: New test cases.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issues reported by user vapnik spaknik. The evaluation of init
forms is incorrect. Init forms like '(x) evaluate to
'(x) rather than (x), Also, init forms are evaluated even when
the argument is present, so the entire current approach is
wrong.
* stdlib/keyparams.tl (extract-keys, extract-keys-p,
build-key-list-expr): Functions removed.
(stuff-key-params): New function.
(:key): Rework using simplified approach, with just the
stuff-key-params helper. All variables from the keyword
parameter list are bound with let. Generated code searches
the keyword parameters for values and assigns the variables as
needed, evaluating default init forms in the not-found cases.
* tests/011/keyparams.tl: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The lambda.tl test, when compiled, is only testing the
compiler's implementation of the inlined lambda: code
generated from a lambda expression to which arguments are
statically applied. We augment this to also compile
real lambda functions which are called. Everything passes.
* tests/012/lambda.tl (call-lambda): New function.
(ltest): New macro, specifically geared for testing lambda
expressions. When *compile-test* is true, this generates code
which performs two tests: applying the arguments directly to
the lambda, and evaluating the lambda to a function which is
passed to call-lambda, which will then apply the arguments.
We cannot use apply, because the compiler sees through that
and will inline the lambda anyway.
(mltest): Multi-expression version of ltest. This is a drop-in
replacement for mtest in the rest of the file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ffi.c (carray_replace): In the case when we replace a larger
range by a smaller one, when the upper part of the aray shifts
down, we are not correctly clearing to zeros the vacated part
of the array. The variable whole is a displacement from the
base of the array, not from ptr. Secondly, the copying loop
must go rom fr to below sn, not below vn; sn is derived from
vn but truncated not to go past the array.
* tests/017/carray.tl: New file. Several cases here fail
before this fix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (arith_each_set_entries): Trigger autoload on
new symbols.
* stdilb/arith-each.tl (sys:arith-each): Generalize macro to
handle short-circuiting logical operations. The op-iv
parameter, which is a cons, is spread into two op and iv
parameter.
One new argument appears, short-circ. This specifies a code
for short-circuiting behavior: t means iteration continues
while the result is true; nil means it continues while it is
nil, and + means iteration continues while the accumulator is
nonzero. A new convention is in effect: the operator has
to be specified as a list in order to request accumulating
behavior, e.g (+) or (*). Otherwise the operator specifies a
predicate that is applied to the forms, without taking into
account the prior value.
(sum-each, sum-each*, mul-each, mul-each*): Spread the op-iv
arguments. Wrap the op argument in a list to request
accumulation. In the case of mul-each and mul-each*, specify +
for the short-circ argument, which means that iteration stops
when the accumulator becomes zerop. sum-each and sum-each*
specify : for the short-circ argument which is unrecognized,
and so ther is no short-circuiting behavior.
(each-true, some-true, each-false, some-false): New macros.
* tests/016/arith.tl: New tests.
* txr.1: Documented new macros and added note about possible
short-circuiting in mul-each and mul-each*.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stdlib/arith-each.tl (sys:arith-each): If there are no vars,
then just reduce to the identity element value.
This is alreading happening fine for the each-prod family
of operators.
* tests/016/arith.tl: Test cases covering the no vars
and empty iteration identity element cases for sum-each and
mul-each, as well as the *-prod variants.
* txr.1: Document empty iteration and empty vars behavior
for arithmetic each operators as well as the each-prod
family.
|
|
|
|
|
|
| |
* tests/010/json.tl: New tests. These work. Odd; I'm seeing
an issue whereby typing multi-line #J expressions into the
listener does not work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (lazy_str_get_trailing_list): Remove the spurious
empty string caused by splitting on the terminator.
Whenever the materialized prefix is not-empty, and there is
a non-empty terminator, the prefix necessarily ends in the
termintator. If we split on the terminator, the list of pieces
ends in in an empty string, which is undesirable.
This has to be subject to compat, unfortunately; it's a
very visible behavior that affects the continuation of
line-based matching after the @(freeform) directive.
* tests/006/freeform-5.txr: With this fix, we no longer have
to match the spurious blank line coming from @(freeform).
* tests/015/lazy-str.tl: New file.
* txr.1: Updated documentation with compat notes. There was
some outright incorrect text describing
lazy-str-get-trailing-list. Also, the lazy-str-force-upto
and lazy-str-force were under-documented. The return value of
the former was not completely described: that it returns t
in the other case when not returning nil. It wasn't mentioned
that the functions observe the limit-count. Moreover, the
exact algorithm for forcing is now documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was reported by user vapnik spaknik. The @(freeform),
when reconstituting the unmatched trailing portion of the
virtual line back into a list of lines, uses the abstract
match position, neglecting to account for the fact that a
prefix of the line may have been physically consumed to save
memory.
* match.c (v_freeform): When calling
lazy_str_get_trailing_list, indicate the correct amount of
prefix material, by subtracting, from the matching length,
the base variable, which indicates how much of the prefix had
been consumed. This consumption takes place above 4000 bytes,
which is why the freeform test cases are not catching this.
* tests/006/freeform-5.txr: New file.
* tests/006/freeform-5.expected: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ffi.c (ffi_type_copy): Function moved earlier in file
without change.
(ffi_type_copy_new_ops): New stati function.
(make_ffi_type_enum): Do not create a new type object using
cobj; copy the existing base_type, and then tweak its
properties, just like what is done with bool. Thus if
base_type is a bitfield, the enum will be a bitfield.
Add check against doign this to anything but an FFI_KIND_NUM,
with the awareness that this does include floating-point types.
Since tft is now a copy, we no longer have to copy a number of
things from btft. We do set he kind field to FFI_KIND_ENUM.
(ffi_type_compile): In the two bitfield cases, we now
calculate the mask field for the bitfield type (leaving the
shift at zero). The struct or union type into which the
bitfield is embedded will still re-calculate this.
The reason is that when an (enumed (bit ...) ...) type is
defined, it constructs hash tables for converting between the
symbolic and numeric values. It calls the put function of the
underlying type to test whether each enumeration value can be
converted (i.e. is in range). So the bitfield type must have a
valid mask at that time, or else it will reject every nonzero
value as being out of range for the bitfield. I'm also
replacing the max_int variable with bits_int. Since bitfields
are restricted to no wider than int, why pretend?
* tests/017/ffi-misc.tl: New test cases.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
| |
* stdlib/match.tl (expand-quasi-match): Add regex cases with
bound variable.
* tests/011/patmatch.tl: Test cases for this.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* match.c (h_var): Refactor the logic here a bit. Without
regard for whether the variable has a value, we dispatch the
regex, fixed field and function cases. These handle the
binding against the existing value. Then before all other
cases, we check for the existing value and convert that to a
literal text match. The effect of this is that now the regular
expression is processed even if the variable has a value.
* tests/010/span-var.txr: Last two test cases hardened a bit
so they cannot fall through to a successful exit, if
they invoke the wrong case. This is not related to this
change. New test cases for regex span.
* txr.1: Updated documentation and compatibility notes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* match.c (h_var_compat): New function; verbatim copy
of existing h_var prior to this commit.
(h_var): If a variable has an existing binding, but
is a function spanning match, do not substitute it with text.
Handle it with the ordinary case, in which we now use
dest_bind instead of cons.
(v_var): Similarly, here, we must also use dest_bind, rather
than always freshly binding the variable.
(match_compat_fixup): For 272 compatibility, substitute
h_var_compat for h_var in the horizontal directive table.
* tests/010/span-var.txr: New test cases.
* txr.1: Documentation updated and also improved overall.
The behavior when a variable has an existing value is
clarified for the regex and fixed field case.
Also update and condense compat notes for 272.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* match.c (v_var_compat, v_var): New static functions.
(match_files): No longer recognize v_var specially; it is now
handled via vertical table.
(dir_tables_init): Register a vertical sys:var directive also
via v_var function.
(match_compat_fixup): New function.
* txr.c (compat): Call match_compat_fixup.
* tests/010/span-var.txr: New file.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With :mass-delegate, it is possible to generate delegation
methods in bulk. All of the methods of a struct type can be
mirrored by delegates in another struct type just by writing
a single :mass-delegate clause.
* stdlib/struct.tlk (:mass-delegate): New struct clause macro.
* tests/012/oop.tl: New tests.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug affects optional parameters which either
have no default expression, or one that is nil.
For instance x in (lambda (: (x nil))) or (lambda (: x)).
When such a parameter is given the : symbol as an argument, it
is not being bound, as if it weren't there.
((lambda (: x) x) :) -> ;; error: unbound variable x
This issue is not a regression; it was introduced in the
commit which introduced the colon convention to optionals, as
well as init expressions and presence-indicating variables,
commit 68c084269581f32f0a7b859446ae2efb6c6a26c0 made in
February 2014.
This might be the first instance of an interpreter bug being
found that is not present in the compiler.
* eval.c (bind_args): The idea here was that when the argument
to an optional the colon keyword symbol, and the optional's
initform is nil, we can skip the overhead of calling eval to
get that initform's value. Unfortunately, the skip was
extended over the code which binds the parameter. Only
the eval can be skipped!
* tests/012/lambda.tl: New test cases to cover this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (struct_set_entries): Trigger autoload on new
symbols define-struct-clause and *struct-clause-expander*.
* stdlib/struct.tl (*struct-clause-expander*): New variable.
(defstruct): expand-slot local function now returns list of
expanded slots, not a single slot; every case in the tree-case
is converted to return a list. The syntax of a slot clause is
first expanded through *struct-clause-expander hash; if that
works then the resulting list is further scanned for
expansions.
(define-struct-clause): New macro.
(:delegate): New struct clause defined with
define-struct-clause. Provides single-slot delegation.
* tests/012/oop.tl: Tests for :delegate.
* txr.1: Documented define-struct-clause and :delegate.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register pairlis intrinsic.
* lib.c, lib.h (pairlis): New function.
* tests/012/seq.tl: New test cases.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register new intrinsics.
* lib.c, lib.h (subq, subql, subqual, subst): New functions.
* tests/012/seq.tl: New test cases.
* stdlib/optimize.tl (subst): Function removed. The new subst
drop-in replaces this one.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
| |
* lib.c (less_tab_init): Add missing initialization for VEC,
with a priority above CONS: all vectors are greater than
conses. The BUF priority is bumped to 7.
* test/012/less.tl: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tree.c (tree_min_node, tree_min, tree_del_min_node,
tree_del_min): New functions.
(tree_init): tree-min-node, tree-min, tree-del-min-node,
tree-del-min: New intrinsics registered.
* tree.h (tree_min_node, tree_min, tree_del_min_node,
tree_del_min): Declared.
* txr.1: Documented.
* tests/010/tree.tl: New tests.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When duplicate keys are inserted in the default way with
replacement, the tree size must not be incremented.
* tree.c (tr_insert): Increment the tr->size and maintain
tr->max_size here. In the case of replacing an existing node,
do not touch the count.
* tests/010/tree.tl: Add test cases covering duplicate
insertion and tree-count.
(tree_insert_node): Remove unconditional size increment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tree.c (tr_insert): New argument for allowing duplicate.
If it is true, suppresses the case of replacing a node,
causing the logic to fall through to traversing right, so the
duplicate key effectively looks like it is greater than the
existing duplicates, and gets inserted as the rightmost
duplicate.
(tr_do_delete_specific, tr_delete_specific): New static functions.
(tree_insert_node): New parameter, passed to tr_insert.
(tree_insert): New parameter, passed to tree_insert_node.
(tree_delete_specific_node): New function.
(tree): New parameter to allow duplicate keys in the elements
sequence.
(tree_construct): Pass t to tree to allow duplicate elements.
(tree_init): Update registrations of tree, tree-insert and
tree-insert-node. Register tree-delete-specific-node function.
* tree.h (tree, tree_insert_node, tree_insert): Declarations
updated.
(tree_delete_specific_node): Declared.
* lib.c (seq): Pass t argument to tree_insert, allowing
duplicates.
* parser.c (circ_backpatch): Likewise.
* parser.y (tree): Pass t to new argument of tree, so
duplicates are preserved in the element list of the #T
literal.
* y.tab.c.shipped: Updated.
* tests/010/tree.tl: Test cases for duplicate keys.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tree.c (tree_count): New function.
(tree_init): tree-count intrinsic registered.
* tree.h (tree_count): Declared.
* lib.c (length): Support search tree argument via tree_count.
* tests/010/tree.tl: Test cases for tree-count, indirectly via len.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
| |
I discovered this off chance by searching for occurrences
of (let ,(zip ...) ...) or (let (,*(zip ...)) ...) in the
code base, noticing an incorrect one.
* stdlib/place.tl (sys:register-simple-accessor): Remove
spurious list around ,(zip temps args).
* tests/012/defset.tl: Test cases for define-accessor added.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1: Adding the missing requirement that each-match
and the other macros in that family must have an implicit
anonymous block around the body forms. This is a requirements
bug, effectively: the programmer expects these operators to be
consistent with the each operator, as part of the same family.
* match.tl (each-match-expander): Implement the requirement.
Since we are using mapping functions, we must use temporary
variables: the evaluation of the expressions which produce the
sequence argument values to the mapping functions must be
outside of the anonymous block. The block must surround only
the function call.
* tests/011/patmatch.tl: Add small test case covering this.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (me_case): Reduce (key) to key only if key is
an atom. Otherwise we reduce ((a b c)), which
is a single list-valued key to (a b c), which looks like
three keys. This was introduced on Oct 25, 2017 in
commit b72c9309c8d8f1af320dce616a69412510531b48,
making it a regression.
* tests/012/case.tl: New file. The last test
case fails without this bugfix. The others pass either way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): nrot, rot intrinsics registered.
* lib.c (nrot, rot): New functions.
* lib.h (nrot, rot): Declared.
* tests/012/seq.tl: New test cases.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register tuples* intrinsic.
* lib.c (tuples_star_func): New static function.
(tuples_star): New function.
* lib.h (tuples_star): Declared.
* tests/012/seq.tl: New test cases.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
| |
* tests/012/seq.tl: Numerous test cases for tuples.
|
|
|
|
|
|
|
| |
* lib.c (tuples): Check that n argument giving tuple size is a
is a positive integer.
* tests/012/seql.tl: Test case added.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hash.c (randbox, hash_c_str, hash_buf): Separate
implementation for 64 bit pointers, using 64 bit random
values, and producing a 64 bit hash, taking in a 64 bit seed.
(gen_hash_seed): Use time_sec_nsec to get nanoseconds.
On 64 bit, put together the seed differently to generate
a wider value.
* tests/009/json.txr: Change from hash tables to lists,
so the order of the output doesn't change between 64 and 32
bits, due to the different string hashing.
* tests/009/json.expected: Updated.
* txr.1: Documented that seeds are up to 64 bits, but
with possibly only the lower 32 bits being used.
|
|
|
|
|
|
| |
* tests/011/patmatch.tl: Add failing test cases.
* txr.1: Document desired requirements.
|
|
|
|
| |
* tests/012/syntax.tl: New tests, some of which fail.
|