| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
* txr.1: "behavior ... becomes" second person agreement.
|
|
|
|
| |
* txr.1: Fix run-on parenthesis.
|
|
|
|
|
| |
* txr.1: a :maxgap of zero also means that the collected items
must match immediately.
|
|
|
|
|
|
| |
Reported by Martin Dvořák.
* txr.1: Word "five" should be "n".
|
|
|
|
|
|
|
| |
Reported by Martin Dvořák.
* txr.1: In pattern matching clauses, repeat and rep are
shorthands for collect and coll.
|
|
|
|
| |
* txr.1: use mono font for @(output).
|
|
|
|
|
|
| |
txr.1: The equivalences between [x i] and some functions like
ref are dynamic; they depend not only on the type ofx, but
also whether i is a range or integer.
|
|
|
|
|
|
|
| |
* lisplib.c (sock_set_entries): Add missing sock-bind,
sock-connect, sock-listen, sock-accept, sock-shutdown,
open-socket, open-socket-pair, sock-send-timeout and
sock-recv-timeout.
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1: Update the documentation to reflect the current
handling of objects, eliminating some contradictions
in the process, like text which says that rplacd is
erroneous on anything but conses and lazy conses, followed by
text which states other kinds of objects are allowed.
The semantics of car and cdr forms as places is described
strictly in terms of rplaca and rplacd, so the mechanism is
then described in one place.
|
|
|
|
|
|
| |
* lib.c (tail): Don't call cdr on the same cell twice in the
loop body. tail is used in list_collect and friends, which are
used all over the place.
|
|
|
|
|
|
|
|
|
| |
* eval.c (term): Function here from lib.c, and changed to
static. It is used only by iapply.
* lib.c (term): Function moved to eval.c.
* lib.h (term): Declaration removed.
|
|
|
|
|
|
| |
* lib.c (listref_l): Unused function removed.
* lib.h (listref_l): Declaration removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
refset and range assignment is implemented for objects that
have no lambda-set but do have a car method.
* lib.c (refset): Implementation for lists rewritten
to avoid listref_l, and use nthcdr instead.
For structs, if there is no lambda-set method, but
a car method exists, jump to the list case: the idea
is that we can cdr down and then use rplaca.
(dwim_set): Error handling streamlined. In this function too,
we check whether there is a car method and branch to the list
case.
|
|
|
|
|
| |
* lib.c (nthcdr): Terminate loop when nil is
hit rather than continuing to count down to zero.
|
|
|
|
|
| |
* lib.c (car, cdr): Type mismatch messages now identify
functions.
|
|
|
|
|
|
| |
* lib.c (car, cdr): Don't fail if the struct object has no car
or cdr method. Use it if it is available, otherwise try to
fall back on the lambda method if that is available.
|
|
|
|
|
|
|
|
| |
* lib.c (ltail): Function removed. This was introduced at the
same time as lazy_appendv and used only by it. That function
was rewritten a few months ago and doesn't use lail.
* lib.h (ltail): Declaration removed.
|
|
|
|
|
|
| |
* lib.c (seq_info): The obj_struct_p test must be applied to
obj, not to cls, which is a symbol. Due to this bug, seq_info
would always report struct-based sequences as SEQ_NOTSEQ.
|
|
|
|
|
| |
* lib.c (seq_info): Incorrect indentation of else
statement fixed.
|
|
|
|
|
| |
* lib.c (last): Use seq_info classification
rather than relying on listp.
|
|
|
|
|
|
| |
* lib.c (lastcons): Return value is just the last cons rather
than a loc. The only caller of this function is last.
(last): Adapt to the new lastcons.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces the proliferation of car_l and cdr_l.
With this change, nreverse should work on chains of
objects that implement rplacd.
* combi.c (comb_gen_fun_common, rcomb_gen_fun_common): Use
rplaca.
* eval.c (mappendv, mapdov): Likewise
* hash.c (hash_equal_op): Likewise.
* lib.c (nreverse, acons_new, aconsql_new, sort_list): Use
rplaca and rplacd.
* match.c (dest_set, v_gather, v_collect, v_flatten, v_cat,
v_output, v_filter): Likewise
* parser.c (ensure_parser): Use sys_rplacd.
* unwind.c (uw_register_subtype): Use rplacd.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (replace_obj): New static function.
(sub): Handle struct case via lambda method.
(replace): Handle struct case via replace_obj.
* txr.1: Documented.
* tests/012/aseq.tl (add): The lambda method now has to handle
a range argument. One test case uses the last function, which
for non-lists relies on sub, which now calls the lambda method
if the object has one.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib.c (seq_info, car, cdr, make_like, nullify,
generic_funcall, copy, length, empty, ref, refset, dwim_set,
dwim_del, populate_obj_hash): Use new obj_struct_p test when
we know that the object is a COBJ.
* struct.c (struct_inst_ops): Change from static to extern.
* struct.h (ob_struct_p): New inline function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (eval_init): Register rplaca and rplacd using new
rplaca_s and rplacd_s symbol variables.
* lib.c (rplaca_s, rplacd_s): New symbol variables.
(rplaca): Handle struct object via rplaca method, if it has
one, otherwise lambda-set, if it has that, or else error
out.
(rplacd): Handle struct object via rplacd method.
* lib.h (rplaca_s, rplacd_s): Declared.
* txr.1: Documented rplaca and rplacd methods.
|
|
|
|
|
|
| |
* lib.c (refset): If structure has no lambda-set method,
diagnose it like that, rather than "not a sequence".
Also, diagnostics should use refset:, not ref:.
|
|
|
|
|
| |
* txr.1: Fix wording under invoke-catch which refers to a
nonexistent function called get-frames.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recording of source location info incurs a time and space
penalty. We don't want to impose this on programs which are
just reading large amounts of Lisp data that isn't code.
* eval.c (eval_init): Register lisp-parse and read functions
to the newly introduced nread function rather than lisp_parse.
lisp_parse continues to record source location info
unconditionally.
* parser.c (rec_source_loc_s): New symbol variable.
(parser_common_init): Set the new member of the parser
structure, rec_source_loc, according to the current value of
the special var *rec-source-loc*.
(lisp_parse_impl): New second argument, rlcp_p. If true, it
overrides the rec_source_loc member of the parser structure
to true.
(lisp_parse): Pass true argument to rlcp_p parameter of
lisp_parse_impl, so parsing via lisp_parse always records
source loc info.
(nread): New function.
(iread): Pass true argument to rlcp_p parameter of
lisp_parse_impl, so *rec-source-loc* controls whether source
location info is recorded.
(parse_init): Initilize rec_source_loc_s symbol variable,
and register the *rec-source-loc* special var.
* parser.h (struct parser): New member, rec_source_loc.
(rec_source_loc_s, nread): Declared.
* parser.y (rlcp_parser): New static function. Like rlcp but
does nothing if parser->rec_source_loc is false.
(rlc): New macro.
(grammar): Replace rlcp uses with rlc, which expands to a call
to rlcp_parser.
(rlrec): Do nothing if source loc recording is not enabled in
the parser.
(make_expr, uref_helper): Replace rlcp with rlc. This is
possible because these functions have a parser local
variable that the macro expansion can refer to.
(parse_once): Override rec_source_loc in the parser to 1, so
that source loc info is always recorded when parsing is
invoked through this function.
* txr.1: Documented *rec-source-loc* and added text under
read and iread.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TXR 188 makes a slight mess of the #H notation. An :eql-based
hash table prints as #H(() ...), but when that notation is
read, it produces an :equal-based hash table. No aspect of
this situation was intended; the intent was that the notation
stays the same as before, and just the hash function changes
to make :equal-based the default. Let's just go with this
and have #H(() ...) denote :equal-based tables.
* hash.c (hash_print_op): Print an :eql-based for eql-based
hash tables, and nothing for equal-based ones. In
compatibility mode with 188 and older, reproduce the old
behavior, rendering equal-based tables with :equal-based and
the absence of a symbol for eql-based.
* txr.1: Updated places that touch on :equal-based and
added compatibility notes.
* tests/009/json.expected: updated, since equal-based hash
tables now print without :equal-based keyword.
|
|
|
|
|
| |
* txr.1: There is no :print command in the listener to print
the current prompt; it is actually the :prompt command.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim, protsym.c: Regenerated.
|
|
|
|
|
|
|
|
|
|
| |
These easily express discontinuous ranges.
* eval.c (rlist_fun, rlist_star_fun, rlist, rlist_star): New
static functions.
(eval_init): Register rlist and rlist* intrinsics.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
| |
* eval.c (do_expand): In the function call case, check for the
operator being the rcons function. If it is called with
exactly two arguments and they are constantp in the given
environment, then evaluate them and replace with a range
literal object. Rationale: ranges often appear in constant
form like [array 1..:] and whatnot.
|
|
|
|
|
|
| |
* txr.1: Clarify that Ctrl-D is the only deletion command
which copies into the clipboard, and only in visual selection
mode.
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1: Fix wrong wording about the by-value nuance of the
in operation. What is specifically doesn't do, in contrast
to the by-pointer nuance, is propagate the foreign
representation back to Lisp. Not Lisp to foreign, which is
opposite to the in operation. Also clarifying some wording
in the description of the out operation: that the by-value
nuance doesn't reconstruct from the updated Lisp structure,
to help the reader keep in mind the data direction.
|
|
|
|
|
|
|
|
|
| |
* share/txr/stdlib/awk.tl (sys:awk-mac-let): Move repeated
boiler-plate code from the various rng macrolets into an
the implementation of the sys:rng macro they rely on.
That implementation is split into two macros: sys:rng is
now the name of a wrapper which adds the boiler-plate, and the
bulky implementation macrolet is now called sys:rng-impl.
|
|
|
|
|
|
| |
* txr.1: Fixed a number of places where structure slots
are called members. In the context of structures, we use the
word member only for C structures; Lisp structures have slots.
|
|
|
|
|
|
| |
* txr.1: Example for sys:capture-cond uses wrong style
for the reference to the suspend operator suspend, causing it
not to be hyper-linked to the definition in the HTML version.
|
|
|
|
|
|
| |
* txr.1: Paragraph about sys:cont-poison must say
"continuation's evaluation frames" not "evaluation's
continuation frames"
|
|
|
|
|
|
|
| |
* txr.1: Under sys:capture cont, try to revise some
potentially confusing text. Also adding more notes, clarifying
the semantics of shared lexical environments, and behavior of
special variable bindings with regard to continuations.
|
|
|
|
|
|
| |
* txr.1: Fix example code that is too wide, causing
a visual problem for standard 80 column man page
formatting.
|
|
|
|
|
| |
* txr.1: Fix lack of escaping of backslash in #\c causing the
c to be interpreted as a troff code.
|
|
|
|
| |
* txr.1: Add missing comma in mapcar section heading.
|
|
|
|
|
|
|
| |
* txr.1: New major (SS*) section User-Defined Streams.
Documented make-struct-delegate-stream function,
the stream-wrap class and all the stream interface object
methods.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A new kind of stream object which redirects its operations to
the methods of a structure.
* Makefile (OBJS): New object file, strudel.o.
* lib.c (init): Call new strudel_init function.
* lisplib.c (stream_wrap_set_entries,
stream_wrap_instantiate): New static functions.
(lisplib_init): Arrange for autloading of new stream-wrap.tl.
* share/txr/stdlib/stream-wrap.tl: New file.
* stream.c (put_string_s, put_char_s, put_byte_s, get_line_s,
get_char_s, get_byte_s, unget_char_s, unget_byte_s, put_buf_s,
fill_buf_s, flush_s, seek_s, truncate_s, get_prop_s,
set_prop_s, get_error_s, get_error_str_s, clear_error_s,
get_fd_s): New symbol variables.
(stream_init): New symbol variables initialized. Numerous
functions registered via these variables now rather than
intern(...) expressions.
* stream.h (put_string_s, put_char_s, put_byte_s, get_line_s,
get_char_s, get_byte_s, unget_char_s, unget_byte_s, put_buf_s,
fill_buf_s, flush_s, seek_s, truncate_s, get_prop_s,
set_prop_s, get_error_s, get_error_str_s, clear_error_s,
get_fd_s): Declared.
* strudel.c, strudel.h: New files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a method is traced with (trace (meth class slot)),
a spurious warning occurs. This is because the function
is recorded in the trace hash first and then the hook
is installed, and the hook is installed using the
static-slot-ensure function which performs the trace
warning check.
* share/txr/stdlib/trace.tl (sys:trace): Swap the order:
install the hook first, and then put the the previous function
into the trace hash. Doing this in parallel with pset would
also work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* hash.c (eql_based_k): New keyword variable.
(equal_based_p): New static function.
(hashv): Use eql_based_p to determine whether to make an
equal-based hash table. Subject to opt_compat relative
to version 187.
(hash_init): Intern :eql-based keyword and store in new
variable.
* hash.h (eql_based_k, userdata_k): Declared.
* txr.1: Documentation updated, with compat notes too.
|
|
|
|
|
|
|
|
| |
* eval.c (op_prof): Deal with the cases when alloc_bytes_t
value cannot be converted to a val in a single call to
unum.
* lib.h (SIZEOF_ALLOC_BYTES_T): New macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* args.c (struct args_bool_key): Structure moved
to header file.
(struct args_bool_ctx): One more piece of context information,
the array size.
(args_check_key_store): Work with array of args_bool_key
structs rather than linked list.
Remove useless local variable "store".
(args_key_extract_vl): Function removed.
(args_key_extract): Takes array instead of va_list.
* args.h (struct args_bool_key): Structure declared here.
Loses the next pointer since not used for a linked list.
(args_key_extract_vl): Function removed.
(args_key_extract): Redeclared.
* hash.c (hashv): Adapt to new args_key_extract function.
|
|
|
|
| |
* hash.c (hashv): Switch over to args_keys_extract.
|