| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* txr.1: Under load and compile-file, mention the support for
loading catenated .tlo files.
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (copy_file_instantiate): Trigger autoload on
cat-files.
* stdlib/copy-file.tl (cat-files): New function.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
| |
* parser.c (read_file_common): Tolerate the presence of
version expressions, as long as they match the initial
version under equal. Thus a larger .tlo file can be made of
two or more .tlo files by simple catenation; it will load as
long as they have exactly the same version.
|
|
|
|
| |
* lib.c (all_satisfy): self should be "all" rather than "some".
|
|
|
|
|
|
|
| |
* genman.txr: Remove from the name list those names that are not
TXR symbols, so that they don't appear in doc-syms.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
| |
* txr.1: Add < and << in the signatures of various stream
methods.
|
|
|
|
|
|
|
|
| |
* stdlib/getopts.tl (basic-type-p): Handle the cons case.
(sys:opt-parsed convert-type): Same.
(opthelp): Same.
(opthelp-types): Same, and for each type in the legend, specify
which arguments correspond to it.
|
|
|
|
|
|
|
|
| |
* stdlib/getopts.tl (opthelp-types): Print the entries in a
canonical order rather than in the order of the types' appearance
in opt-desc-list. Also, remove one (superfluous) space before the
hyphen in all entries and fix typos in the description of HEX and
STR.
|
|
|
|
|
| |
* stdlib/getopts.tl (opthelp-types): Consider list and cumul
types when searching for types to include in the legend.
|
|
|
|
|
|
|
| |
* stdlib/getopts.tl (list-type-p): Return nil if subtype is :bool.
(cumul-type-p): Same.
* txr.1: Documented, reworded some sentences, fixed some typos.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (me_macro_time): New static function
(do_expand): Remove handling of macro_time_s.
(eval_init): Remove special operator registration of
macro-time; add macro registration.
* txr.1: Documentation of macro-time updated, revised
and moved from the top the Macros section to be adjacent
to equot.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
| |
* tests/011/patmatch.tl: New tests for recently fixed issue.
|
|
|
|
| |
* txr.1: Correct "handler" to "handle".
|
|
|
|
|
|
| |
* stdlib/match.tl (expand-quasi-match): We cannot call m^$ with
the @nil-bound rest of string when matching `@{nil #/regex/}`.
Handle this case specially.
|
|
|
|
|
|
|
| |
* txr.1: Correct .I to .IR when the arguments include trailing
punctuation. Add quotes around multiword .I and .IR arguments to
be consistent everywhere. Unitalicize "de facto". Fix accidental
trailing sentence.
|
|
|
|
| |
* txr.1: Document pad's object parameter as optional.
|
|
|
|
|
| |
* stdlib/getopts.tl (opthelp): Print the options header only if
we have documented options.
|
|
|
|
|
|
| |
* stdlib/getopts.tl (opthelp-conventions): Describe the --no-
prefix only if we have boolean options, and describe the
long-option argument style only if we have long options.
|
|
|
|
|
|
| |
* stdlib/getopts.tl (opthelp): Indent the list of undocumented
options by only two spaces, like the documented options and the
other opthelp sections.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documented options and type legend both end in a blank line,
unlike the undocumented options and option conventions.
* stdlib/getopts.tl (opthelp): Print a blank line after the
undocumented options.
(opthelp-conventions): Print a blank line after the conventions.
Also, change the header from "Option Conventions" to "Option
conventions" to follow the style of the undocumented options and
type legend.
* txr.1: Remove superfluous (as of now) put-line calls in the
--extra-help example of getopts. While here, correct o.extrahelp
to o.extra-help.
|
|
|
|
| |
* txr.1: Fix typos.
|
|
|
|
|
| |
* lib.c (separate): Return (list nil nil) instead of just nil
when the sequence parameter is nil, as is documented.
|
|
|
|
|
|
|
| |
* txr.c (txr_main): Don't use split_str to break -Dvar=val
syntax, because that splits on all occurrences of the =
character. Secondly, diagnose -Da,b,c shape: list commas
occur with no = sign.
|
|
|
|
|
|
| |
* txr.1: Fix typos and stylistic issues.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (load): Use null_string instead of lit("").
* lib.c (obj_init): Likewise.
* match.c (LOG_MATCH, LOG_MISMATCH, do_txeval): Likewise.
* parser.c (regex_parse, lisp_parse_impl, find_matching_syms):
Likewise.
* stream.c (do_parse_mode): Likewise.
* txr.c (sysroot_init): Likewise.
(txr_main): Replace string(L"") with null_string.
|
|
|
|
|
| |
* txr.1: Fix the example -Da,b,c to -Dvar=a,b,c. Reported by
Paul A. Patience.
|
|
|
|
|
| |
* txr.c (txr_main): Bind variables specified with -D but without
values to the empty string, as documented in the manual.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Vim's handling of multi-line Lisp strings is glitchy. We are
contributing to it by tryign to match the backslash-newline as
an escape sequence.
As a result of this change, Vim is less confused. Indentation
is still incorrect after some multi-line strings, but I'm not
seeing the discrepancy between the behavior of the visual
parentheses matching, and the % parentheses jump.
I'm able to navigate around in the stdlib/getopts.tl code.
* genvim.txr (chesc): Remove the backslash-newline from the
list of character escapes.
(txr_string, txr_quasilit, txr_regex, tx_regex): Use skip= to
recognize the backslash-newline sequence as part of the
literal.
|
|
|
|
|
|
|
| |
* stdlib/getopts.tl (opthelp, opthelp-conventions,
opthelp-types): Use *stdout* as the optional stream argument,
defaulting to *stdout*. Now we no longer have to explicitly
pass the stream to put-line.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisplib.c (getopts_set_entries): Autoload for
opthelp-conventions and opthelp-types.
* stdlib/getopts.tl (opthelp): Remove incnotes parameter.
Entirely trim out the code for notes about conventions and use
of types.
(opthel-conventions, opthelp-types): New functions.
(option-base opthelp-conventions, option-base opthelp-types):
New methods.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
|
| |
* stdlib/getopts.tl (opthelp): New incnotes parameter.
If specified as false, disables the detailed Notes
and Type legend.
(sys:option-base opthelp): Same new parameter on this method,
passed down to opthelp.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* txr.1: when the amb macro detects that the continuation has
succeeded, it should return that successful value from the
amb-scope, rather than returning the local successful argument
a from the amb function. Although it works both ways, it is
inefficient when it returns from the function. The reason is
that each call to amb executes the successful future twice:
once via (call cont a) and then again by returning the a
value. This then causes an exponential cascade in calls: each
successive amb call sthe successful future twice, so for
instance if the solution has a sequence of 8 amb calls, the
successful case is reached 256 times.
|
|
|
|
| |
* quips.tl (%quips%): New one.
|
|
|
|
|
| |
* txr.1: The window-mapdo function is analogous to mapdo, not
window-mappend. Reported by vapnik spaknik.
|
|
|
|
|
|
|
|
| |
* stdlib/getopts.tl (opthelp): If the long/short part of an
option description is 34 characters long or more, print the help
text starting on the next line, lest it be glued to the
long/short part (i.e., without an intervening space) and extend
too far to the right.
|
|
|
|
|
| |
* stdlib/getopts.tl (opthelp): Actually use the function's stream
parameter in the put-line calls.
|
|
|
|
|
|
|
| |
* cadr.c, cadr.h, stdlib/cadr.tl: Regenerated. All that
changes is the formatting of the copyright block, since now it
is scraped from files that reformatted it to 80 columns half a
year ago.
|
|
|
|
|
| |
* stdlib/conv.tl: Extra blank line after copyright header
removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 93edcde038209335122964432bd35dee0c2ecb04, made in
August 2021, accidentally removed the blank line after the
copyright header in most stdlib files.
stdlib{asm.tl, awk.tl, build.tl, compiler.tl, copy-file.tl,
debugger.tl, doloop.tl, each-prod.tl, error.tl, except.tl,
ffi.tl, getopts.tl, getput.tl, hash.tl, ifa.tl, match.tl,
op.tl, package.tl, param.tl, path-test.tl, pic.tl, place.tl,
pmac.tl, quips.tl, save-exe.tl, socket.tl, stream-wrap.tl,
tagbody.tl, termios.tl, trace.tl, txr-case.tl, type.tl,
vm-param.tl, with-resources.tl, with-stream.tl, yield.tl}:
Ensure there is a blank line after the copyright header.
|
|
|
|
|
| |
* mpi.c (mp_mul_2, mp_2expt, mp_addmod, mp_submod,
mp_mulmod, mp_sqrmod): Excluded from compilation.
|
|
|
|
|
|
|
|
|
| |
* rand.c (random_sample): The brnach of the code for lists is
converted from the naive algorithm R which requires a random
integer for each element of the sequence to a list adaptation
of the smarter algorithm L used for vector. We don't have
random access through the list being sampled, but we can step
to new positions without generating random numbers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements reservoir sampling.
* rand.c (radom_float_impl): New static function, made out of
random_float. Returns double, giving us access to the unboxed
result
(random_float): Now a wrapper around random_float_impl: boxes
the result of random_float.
(elrd, flrd, random_sample): New static functions.
(rand_init): Register random-sample intrinsic.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
|
|
|
|
|
|
|
|
|
| |
* parser.c (repl): The line_w variable must be volatile
because it's modified after we save the context for catching
exceptions. Without this, I'm seeing that expressions that
throw an exception are not being entered into the linenoise
history, because the exception catch restores the null initial
value of line_w.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an issue that affects plain mode, because in full
editing mode, linenoise reads Ctrl-C as a character.
In plain mode, Ctrl-C-generated SIGINT behaves curiously.
The ^C characters appear, and the current line of input
is discarded. This is because the linenoise() call is not
enclosed in the catch region. The registered signa handler
goes off, and repl_intr is called. Thta function throws the
intr exception. Since that exception isn't derived from error,
and there is no handler for it, nothing happens. The signal
handler just returns.
In this fix, we move the linenoise call into the catch
region of the REPL loop, so the interrupt is handled. The
entire multi-line input is aborted, an ** intr message
is printed, and the REPL waits for another line.
Issues reportd by Paul A. Patience.
* parser.c (repl): Move the uw_catch_begin above the linenoise
call. This means that the surrounding code can no longer use
continue to continue the loop, or break to terminate. Instead
of "continue" we go to a new "contin" label placed at the
bottom of the catch processing, just before the end of the
loop. The EOF case now sets the done fag and also branches to
that label. Some free(line_w) calls no longer have to be done
because the unwinding block takes care of it. In the
exception catching block, we no actually check for the intr_s
exception.
|
|
|
|
|
|
|
| |
* linenoise/linenoise.c (linenoise): In plain mode, like in
full editing mode, when EOF is detected, print a newline
so that when TXR exit to an interactive shell, the shell's
prompt starts on a new line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If newlines are inserted into the input, they don't behave
well. The is_balanced_line callback doesn't recognize them as
line terminators for the purposes of delimiting ; comments.
Also, they make a mess in the ~/.txr_history file.
Plus, users of shells like Bash are used to Ctrl-V Ctrl-J
inserting a line break; some users have that in their muscle
memory. So let's just do that as a special case: Ctrl-V Ctrl-J
behaves like Ctrl-V Ctrl-M.
* linenoise/linenoise.c (history_search, edit): Remap a
verbatim Ctrl-J to a carriage return.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The is_balanced_line function assumes that comments are
terminated by a carriage return, whic his the multi-line
convention used by the interactive repl. The plain-mode
listener, though, only replaces newlines by carriage returns
when returning the complete multi-line input. When invoking
the is_balanced_line callback, the newlines are still there,
and so comments are not handled properly.
Reported by Paul. A. Patience.
* linenoise/linenoise.c (linenoise): In plain mode, replace
the trailing newline with a carriage return after every
physical line input, before that line is passed to the
lino->enter_callback (i.e. is_balanced_line). The code to
replace newlines with carriage returns at the end is
consequently no longer required.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* filter.c (filter_string_tree): The function tries to call
uw_throwf when an invalid filter is provided, but an overzealous
return statement renders the effort futile. Remove the return
statement, change the exception type from error_s to
type_error_s, and conform the message to the usual type-error
style.
|