1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-30 09:03:15 +00:00
Commit Graph

1320 Commits

Author SHA1 Message Date
LouisJackman
fb491f0d7c
Put back erroneously deleted "Literal" 2020-05-17 08:12:54 +01:00
LouisJackman
9109e369ff
Incorporate suggestions from PR 2020-05-16 20:18:00 +01:00
Calvin Rose
1bb9a9368b Make sure winsock2.h is included before windows.h
This should be true in the normal build, and especially in the
amalgamated build.
2020-05-16 12:41:26 -05:00
LouisJackman
ca3dac7e87
Return an immutable tuple instead 2020-05-16 15:50:47 +01:00
LouisJackman
59302d4f42
Return dbg values to work inside complex exprs 2020-05-16 15:42:16 +01:00
LouisJackman
fabb722c8d
Add a dbg macro for easy var dumping 2020-05-16 15:15:57 +01:00
Calvin Rose
7a84fc4742 Fix infinite loop in some cases.
Problem - reusing a tainted variable without reinitializing.
2020-05-16 08:28:50 -05:00
Calvin Rose
cf670153f9 Add :fresh option to import. 2020-05-15 17:19:37 -05:00
Calvin Rose
4ae372262b 1.9.1 release. 2020-05-12 09:19:09 -05:00
Calvin Rose
c947bda604 Remove .breakall and .clearall conditionally.
If disasm not available, these functions cannot be implemented.
2020-05-12 08:52:36 -05:00
Calvin Rose
00451777fe Add meson builds to sourcehut CI. 2020-05-12 08:46:26 -05:00
Calvin Rose
3100080a50 Add NO_UMASK and NO_REALPATH config options. 2020-05-10 23:07:54 -05:00
Calvin Rose
e013381e72 Conditionally ignore pclose as well as popen. 2020-05-10 21:06:52 -05:00
Calvin Rose
d05bb1c125 Fix nanboxing issue. 2020-05-10 20:14:47 -05:00
Calvin Rose
235605bfa4 1.9.0 Release.
Fix up some documentation as well.
2020-05-10 16:45:33 -05:00
Calvin Rose
e8b3587946 Silence clang warnings about missing initializers. 2020-05-10 16:00:55 -05:00
Calvin Rose
9040ac6a0c Silence some warnings about pointer signedness. 2020-05-09 23:58:45 -05:00
Calvin Rose
73dba691b1 Re-disable processes on emscripten build. 2020-05-09 12:04:47 -05:00
Calvin Rose
b1f76139a7 Add several configurable options - #379 2020-05-09 12:00:01 -05:00
Calvin Rose
6b986fecb0 Merge branch 'master' of github.com:janet-lang/janet 2020-05-09 11:07:15 -05:00
Calvin Rose
535ab8302b Add errorf to core. 2020-05-09 11:06:20 -05:00
Calvin Rose
7125b3430c
Merge pull request #383 from andrewchambers/rngdoc
Improve rng doc string accuracy.
2020-05-09 11:35:01 -04:00
Andrew Chambers
057486cf56 Avoid setting O_CLOEXEC on stdin/stdout/stderr. 2020-05-09 22:26:50 +12:00
Andrew Chambers
f94e726271 Improve rng doc string accuracy. 2020-05-09 12:11:08 +12:00
Calvin Rose
95660002e1 fix include sys/fcntl.h to fcntl.h 2020-05-07 14:54:03 -05:00
Calvin Rose
95c669389b
Merge pull request #378 from andrewchambers/tweak
Tweak comment, remove extra include.
2020-05-07 10:33:19 -04:00
Calvin Rose
084fc9776d Use SOCK_CLOEXEC correctly. 2020-05-07 07:55:08 -05:00
Andrew Chambers
1498fdb7b0 Tweak comment, remove extra include. 2020-05-07 20:44:04 +12:00
Calvin Rose
79c3139748 Check for SOCK_CLOEXEC.
Not available on all platforms.
2020-05-06 23:44:01 -05:00
Calvin Rose
bdd64f5656 Merge branch 'master' of github.com:janet-lang/janet 2020-05-06 18:52:57 -05:00
Calvin Rose
dc3e9fb77c Add CLOEXECs when getting file descriptors (#374)
This should help address leaking file descriptors in multithreaded
programs. There are a few cases where a race can occur though, as
some apis (fopen and mktemp).
2020-05-06 18:33:25 -05:00
Andrew Chambers
06c28f3a4d Set the CLOEXEC flag on file/temp files. 2020-05-06 11:16:08 +12:00
Calvin Rose
688fe6db5e
Merge pull request #370 from andrewchambers/spawnrace
Fix (mostly nonsensible) race condition in multi threaded processes
2020-05-05 10:33:41 -04:00
Calvin Rose
e3862b86b5 Use spork indent on boot.janet. 2020-05-05 09:17:09 -05:00
Calvin Rose
125cd222bb Pretty print tab characters as \t. 2020-05-05 00:03:12 -05:00
Andrew Chambers
a0f351c9fa Fix (mostly nonsensible) race condition in multi threaded processes using os/execute with os/setenv. 2020-05-05 16:03:13 +12:00
Calvin Rose
f7b49a2c91 Improve use of @ in match. 2020-05-04 18:28:20 -05:00
Calvin Rose
fd70b47768 Merge branch 'master' of github.com:janet-lang/janet 2020-05-02 23:40:11 -05:00
Calvin Rose
5d1fd390a6 Fix debugger regression. 2020-05-02 23:40:00 -05:00
Calvin Rose
8b5663e385
Merge pull request #363 from uasi/fix-typo-in-doc
Fix typo in doc
2020-05-02 12:11:18 -04:00
Calvin Rose
8b5bcaee3c Add lenprefix combinator to pegs.
This lets peg match n repeitions of a pattern, where
n is supplied from other parsed input and is not a constant.
2020-05-02 10:39:35 -05:00
Tomoki Aonuma
ca845aa256 Fix typo in doc 2020-05-02 02:36:55 +09:00
Calvin Rose
761ea65d81 Add fiber/roor and allow net/server to take
a numeric port.
2020-04-30 23:21:26 -05:00
Calvin Rose
1dc32d5e3d Revert inclusion of dedent.
Dedent has been moved to spork as misc function.
There are two many different, incompatible ways to 'dedent'
as string, and it seems rather specific to add to the core like it is.
2020-04-30 21:35:22 -05:00
Calvin Rose
1c0a015cc8 s/WSALastError/WSAGetLastError()/g 2020-04-30 13:26:14 -05:00
Calvin Rose
bee415217d Fix extra bindings. 2020-04-29 21:57:19 -05:00
Calvin Rose
73989f5cc7 Consolidate windows and posix socket code.
Also remove code that ignored sigpipe and instead try
our best to ignore through various platform specific mechanisms.
2020-04-29 21:07:21 -05:00
Calvin Rose
dd458c8ab5 Make JANET_NO_ASSEMBLER not break build. 2020-04-28 23:04:24 -05:00
Calvin Rose
63e9790123 Fix flag check in pretty print. 2020-04-28 10:00:24 -05:00
Calvin Rose
70e1f3ac81 Fix regression in repl. 2020-04-28 08:20:07 -05:00
Calvin Rose
67f1872f4a Expose debugger-env
This makes it easier/possible to use the debugging
functionality in a more flexible way.
2020-04-27 23:32:21 -05:00
Calvin Rose
8bbb7907d6 Run parser error handler in the correct env in run-context. 2020-04-27 20:29:16 -05:00
Calvin Rose
c98e1f3cae Update documentation for net/read and net/chunk. 2020-04-27 19:26:05 -05:00
Calvin Rose
6b0f93ce8a Update documentation for the -q flag. 2020-04-27 18:57:53 -05:00
Calvin Rose
80f19a0ab7 Fix behavior of -q flag.
Don't surpress errors at the repl.
2020-04-27 18:12:22 -05:00
Calvin Rose
41894eb285 Add docstrings to net.c 2020-04-26 14:11:47 -05:00
Calvin Rose
3535efd977 Remove %u format specifiers. 2020-04-26 13:47:36 -05:00
Calvin Rose
f6bd41ada7 Add %M, %m, %N, and %n formatters.
These will not truncate long values.
2020-04-26 13:17:28 -05:00
Calvin Rose
7b5f40772f Disable networking for emscripten build. 2020-04-26 12:37:27 -05:00
Calvin Rose
d2ebf4b52d Merge branch 'net' 2020-04-26 12:27:37 -05:00
Calvin Rose
ce7d51f9be Add dedent to core.
Makes longstrings easier to use - can be combined with comptime
for overhead free long strings.
2020-04-26 11:53:26 -05:00
Calvin Rose
da4d8254fa Silence warning in MSVC about VLAs.
When janet.h is included as a C++ header in
MSVC, shows warnings.
2020-04-25 17:13:25 -04:00
Calvin Rose
57332c5ccf Change order of declarations for MSVC C++ support. 2020-04-25 15:42:44 -05:00
Calvin Rose
9bc5ac05c4 Add the parse function. 2020-04-25 12:46:32 -04:00
Calvin Rose
84974d6c56 Make repl printing work from current environment.
Although this "unprotects" output in the repl, people
in a repl usually want control, not protection.
2020-04-24 22:29:02 -05:00
Calvin Rose
da438a93e0 Restore lexicographic comparison of tuples. 2020-04-24 16:51:04 -05:00
Calvin Rose
a87015598c Make janet_equals and janet_compare non recursive
This makes these operatios use constant stack space rather
than linear stackspace given the size of the inputs. This is important
to prevent certain parser input from causing a stack overflow - in
general, we try to avoid unbounded recursion.
2020-04-24 16:18:31 -05:00
Calvin Rose
c335bf5dc5 Update doc doc. 2020-04-23 12:15:12 -05:00
Calvin Rose
c876e63010 Fix overflow in exponent estimation in strtod.c.
Found by OSS-Fuzz.
2020-04-21 18:32:59 -05:00
sogaiu
5c162ce588 Add flags to fiber/new error message 2020-04-21 13:47:56 +01:00
Calvin Rose
ea46f096c2 Remove placeholder config variables. 2020-04-20 20:10:24 -05:00
Calvin Rose
9b5c6112e5 The -q option no longer disables repl output. 2020-04-20 19:28:30 -05:00
Calvin Rose
d8617514f8 Add jpm rule-tree.
Useful for debugging jpm project.janet files.
This tree printing logic can also be reused for
showing dependency information in the future.
2020-04-20 18:32:25 -05:00
Calvin Rose
e579d1d89f Add jpm rule-tree.
Useful for debugging jpm. This funtionality also maybe reused for
for showing a dependency tree as well.
2020-04-20 18:31:14 -05:00
Calvin Rose
42c257d0fc Merge branch 'master' into net 2020-04-19 13:38:51 -05:00
Calvin Rose
d5e5c98dc8 Merge branch 'net' of github.com:janet-lang/janet into net 2020-04-19 13:37:54 -05:00
Calvin Rose
5054eb4276 Add JANET_MARSH_UNSAFE flag.
This allows unmarshal to optional marshal raw
pointers and cfunctions and send them across threads.
This flag is only exposed in the C API as it is very easy
to misuse and cause segfaults.
2020-04-19 10:56:39 -05:00
Calvin Rose
122c77dbf6
Merge pull request #353 from andrewchambers/require
Fix outdated require docstring.
2020-04-19 10:44:37 -04:00
Calvin Rose
3c66cab4e7 Remove extra binding in require. 2020-04-19 09:44:02 -05:00
Calvin Rose
738fd479b3 Merge branch 'master' of github.com:janet-lang/janet 2020-04-19 09:41:49 -05:00
Calvin Rose
5c612095a1 Address #352, #351, Use :source argument in dofile
Also re-add circular dependency detection.
2020-04-19 09:38:18 -05:00
Calvin Rose
3e60e82529 Add circular dependency detection.
This detection will not stop compilation, as errors
in general do not stop compilation unless exit on error
is passed inside an import, but should notify the user something
is going on.
2020-04-19 09:35:14 -05:00
Calvin Rose
60f8dd0bfc Renable :source argument to dofile.
Allows for some more interesting usage of
loaders.
2020-04-19 08:54:24 -05:00
Andrew Chambers
2a7008a82c Fix outdated require docstring. 2020-04-19 23:02:35 +12:00
Calvin Rose
0d3c6abee8 POLLER -> POLLERR 2020-04-18 19:15:59 -04:00
Calvin Rose
4a693222b4 Port net code to windows.
Use winsock2 and WSAPoll. Not the most high performance
solution but should work well.
2020-04-18 19:14:38 -04:00
Calvin Rose
0745c15d7b Fix return value from shell.c 2020-04-18 15:31:46 -05:00
Calvin Rose
2904c19ed9 Switch to poll from select.
Simpler and more flexible interface, and also lets
us use epoll more easily on linux, which is the most important
plantform to optimize for network performance.
2020-04-18 15:22:20 -05:00
sogaiu
aebb8010d4 Tweak unknown signal handling 2020-04-18 08:26:16 +01:00
Calvin Rose
4ac382e553 Add alias JANET_SIGNAL_EVENT. 2020-04-17 16:27:02 -05:00
Calvin Rose
596111c988 Merge branch 'master' into net 2020-04-17 15:08:26 -05:00
Calvin Rose
fbe903b277 Add janet_cfuns_prefix to janet.h
Makes adding functions to the current environment easier.
2020-04-17 13:37:52 -05:00
Calvin Rose
8a89e50c13 :octal-permissions -> :int-permissions (#347) 2020-04-16 19:05:00 -05:00
Calvin Rose
a147ea3e80 Use JANET_PRETTY_DICT_LIMIT. 2020-04-16 19:01:49 -05:00
Calvin Rose
67fb2c212f Address #348
Remove extreneous data from lockfile.
2020-04-16 18:44:21 -05:00
Calvin Rose
3765b08cca Merge branch 'master' of github.com:janet-lang/janet 2020-04-16 12:11:59 -05:00
Calvin Rose
3eb84fcb13 Fix some typos, make jpm repl work without a project.janet. 2020-04-16 12:11:17 -05:00
Calvin Rose
bea76e8e08
Merge pull request #345 from sogaiu/checks-after-allocs
Check some *alloc return values
2020-04-15 19:45:39 -05:00
Calvin Rose
f5433dcaa4 Fix core getline that doesn't use replacement. 2020-04-15 19:45:17 -05:00
Calvin Rose
ef3b953a42 Fix docstrings. 2020-04-14 21:32:50 -05:00