Calvin Rose
10ec319c32
Add better debug info to amalgamated source.
2020-02-27 00:16:54 -06:00
Calvin Rose
8262290bff
Improve C string format (janet_formatc, janet_panicf)
...
The supported formatters here now match up more with
the string/format, buffer/format, printf, eprintf, etc.
2020-02-25 20:05:45 -06:00
Calvin Rose
734c85d7ef
Properly handle recursion with labels.
...
Use an empty buffer, which has pointer equality semantics, for
tag from a label.
2020-02-23 17:35:01 -06:00
Calvin Rose
05bd5767de
Add label macro.
...
A lexically scoped version of prompt is often useful.
2020-02-23 17:15:04 -06:00
Calvin Rose
59d288c429
Add prompt
and return
.
...
User friendly delimited continuations. While this was doable with
signals before, this does not require C and will play nicely with
existing error handling, defers, and with statements.
2020-02-23 16:46:54 -06:00
Calvin Rose
8c41c0b6a7
Address MSVC warning.
2020-02-23 15:27:57 -06:00
Calvin Rose
738490e674
Allow function that takes 1 argument to fiber/new.
...
This allows reuse of closures when creating many fibers.
2020-02-23 14:47:29 -06:00
Calvin Rose
6a13703e32
Add signal
and fiber/can-resume?
.
...
These additions, along with the change that user signals 0-4 cannot
be resumed, allow delimited continuation semantics, while repsecting
existing forms like `defer`, `with`, `with-vars`, etc.
2020-02-23 13:31:27 -06:00
Calvin Rose
aaabca6fc7
Make flychecker handle more kinds of defs.
...
This should help when redefining certain forms. Will also
not do functional arity checking against nil forms, as that
is the default value when a def doesn't evaluate.
2020-02-21 21:20:40 -06:00
Calvin Rose
4b440618d6
Correct docs for type form.
2020-02-21 20:22:43 -06:00
Calvin Rose
a360cb7922
Update marshal to take 3 arguments.
2020-02-15 10:04:44 -06:00
Calvin Rose
b9a2bb8104
Fix documentation for defer.
2020-02-12 09:34:23 -06:00
Calvin Rose
031a9894b0
Update inlining options for next
and resume
.
2020-02-08 13:03:03 -06:00
Calvin Rose
fcc09d7ea9
Clarify docs for some
and all
.
2020-02-05 21:06:39 -06:00
Calvin Rose
d8d482e433
Merge branch 'master' of github.com:janet-lang/janet
2020-02-03 18:18:29 -06:00
Calvin Rose
3fdc053d6c
Add flush and eflush ( #278 )
...
These functions interact with Janet's dynamically scoped
IO functions in a manner that is more useful the file/flush.
We can still redirect to a buffer without changing our code.
2020-02-03 18:14:32 -06:00
Josef Pospíšil
00107c092c
Fix next function arity
2020-02-03 15:36:42 +01:00
Calvin Rose
64e1961193
Update version strings to 1.7.1-dev.
2020-02-02 09:38:44 -06:00
Calvin Rose
f7ee8bd30d
Update to version 1.7.0.
2020-02-01 23:35:17 -06:00
Calvin Rose
1bdde9c4f7
Fix warnings.
2020-01-28 23:46:14 -06:00
Calvin Rose
333ae7c4f8
Make amalgamtion the default when building.
...
This way we can support fewer build configurations. Also, remove
all undefined behavior due to use of memcpy with NULL pointers. GCC
was exploiting this to remove NULL checks in some builds.
2020-01-28 23:38:52 -06:00
Calvin Rose
f7b7c83264
Address #276
2020-01-25 12:08:43 -06:00
Calvin Rose
6f9c9879ca
Add var-
...
We had defn-, def-, defmacro-, but no var-.
2020-01-24 22:52:28 -06:00
Calvin Rose
b8df47e063
Fix regression in take/drop.
2020-01-24 17:39:25 -06:00
Calvin Rose
9dad8bf56d
Remove min-order and max-order.
...
Also address #275 by exposing lflags and cflags
to declare-executable
2020-01-24 17:35:21 -06:00
Calvin Rose
689f2dcbb4
Change default import prefix.
...
Changed from `(string path "/")` to
`(string (last (string/split "/" path)) "/)`.
2020-01-24 16:54:06 -06:00
Calvin Rose
163e2a5b22
Add string support to %j format.
2020-01-24 08:52:27 -06:00
Calvin Rose
e36334e14b
Revert issue with removing buffer self print check.
2020-01-23 23:39:49 -06:00
Calvin Rose
28d41039b8
Add mod function to core.
...
The `mod` function is a pair function with `%`, or te remainder
function and is distinct from it. This is taken from common lisp.
2020-01-23 18:54:30 -06:00
Calvin Rose
b8d530da36
Remove file/fileno and file/fdopen.
...
Also fully add call function pointer to
abstract types, including in methods, etc.
2020-01-23 09:01:33 -06:00
Calvin Rose
4fad0714e7
Add janet_gcpressure. Address #269 .
2020-01-22 20:52:35 -06:00
Calvin Rose
ca17eb4a2b
Address #273
2020-01-22 19:01:49 -06:00
Calvin Rose
4fe005e3c3
Add righthand operator overloading.
...
This is like python. Now, we just need to readd fuzzy
comparisons to have what python needs. Overloading
math functions would be neat, too.
2020-01-22 18:59:41 -06:00
Calvin Rose
2f9ed8a572
Use memmove instead of copying.
...
Also some comment things, and re-add old code from linenoise.
It seems to have a purpose for some keyboard layouts, so I will leave
it.
2020-01-21 23:11:00 -06:00
Calvin Rose
688e18a891
Merge pull request #268 from crocket/master
...
Make REPL key bindings more similar to those on GNU readline.
2020-01-21 23:09:45 -06:00
crocket
8162c64ca3
Make REPL key bindings more similar to those on GNU readline.
...
* I deleted Alt-H and Alt-L because Ctrl-F and Ctrl-B serve the same
roles.
* Ctrl-W, Alt-D, Alt-F, and Alt-B behave more similarly to the same
key bindings on GNU readline.
* Improved documentation of REPL keybindings on man page.
* Home and End keys now work on more terminal environments.
* Removed bindings for `Esc OH` and `Esc OF` because andrewchambers
doesn't need those bindings and the bindings don't seem to make much
sense for Home and End. `Esc O` is Single Shift Select of G3 Character
Set in xterm. https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
2020-01-22 13:55:44 +09:00
Calvin Rose
e179f26d50
Add call function pointer to abstract types.
...
This will allow better JITs, FFIs, DSLs, etc.
2020-01-21 18:22:24 -06:00
Calvin Rose
8db68c04c4
Merge branch 'master' of github.com:janet-lang/janet
2020-01-21 17:48:54 -06:00
Calvin Rose
7c92c64730
Remove mutable operators on inttypes.
...
Mutations break hash table invariants, are a rather
silly performance optimization for a language like Janet.
2020-01-21 17:47:34 -06:00
Andrew Chambers
46f57f5c38
Make file/close idempotent.
...
It is easier to use constructs like defer
with complex control flow if it is safe to close
a file twice.
2020-01-21 22:03:57 +13:00
Calvin Rose
1ec2e08f21
Add manpage docs for repl keybindings.
2020-01-20 17:29:29 -06:00
Calvin Rose
77742dec11
Add source file info on macro compiler error.
2020-01-20 16:45:57 -06:00
Calvin Rose
3cb947b37e
Fix macro errors.
...
debug/stacktrace was being called incorrectly.
2020-01-20 16:05:08 -06:00
Calvin Rose
2dd852da54
Use ATEND macros to add fields to abstract types.
...
This means we can add new properties to abstract types without
breaking old code. We can also make simple abstract types without
needing to add many NULL fields to the type.
2020-01-20 13:06:50 -06:00
Calvin Rose
f4ad627b54
Fix regression in while loops inside each macros.
...
There was a specialization for `(while (not= nil _) ...)` that
was incorrect when the while loop regresses to a thunk.
2020-01-19 16:25:10 -06:00
Calvin Rose
68a5667a1a
Add history first and history last shortcuts.
...
Alt-, and Alt-.
2020-01-19 15:45:04 -06:00
Calvin Rose
693c6d63d4
Add alt-d binding to repl.
2020-01-19 11:39:10 -06:00
Calvin Rose
f18c3323ea
Clear completion list if fully complete.
2020-01-19 11:31:42 -06:00
Calvin Rose
f74e19e673
Improve alt keys and at alt-f and alt-b to repl
2020-01-19 11:16:41 -06:00
Calvin Rose
da70807292
Make autocompletion more zsh like
...
Also add a few ctrl sequences from readline, and
ignore unknown ctrl sequences.
Address #264
Adds Ctrl-n, Ctrl-p, and Ctrl-w
Ignores unknown ctrl sequences
No alt-* sequences yet.
2020-01-19 10:38:35 -06:00