1
0
mirror of https://github.com/janet-lang/janet synced 2024-09-29 23:40:40 +00:00
Commit Graph

558 Commits

Author SHA1 Message Date
Calvin Rose
c82aac1365 Refer to @ as atsign not ampersand. 2019-06-01 23:40:59 -04:00
Calvin Rose
e697cc3811 Make os/execute not leak memory on panics.
Since many calls can panic, it's best
to only use scratch memory for temporary values.
2019-06-01 23:38:10 -04:00
Calvin Rose
c150f2f2c1 Add scratch memory API.
This should make it easier to write
code that does not leak memory on panics.
2019-06-01 23:31:39 -04:00
Calvin Rose
e1bd24c2ab Make os/execute on windows closer to posix version 2019-05-31 15:02:44 -04:00
Calvin Rose
1f30ea66e9 Windows quick fix. 2019-05-31 13:45:39 -04:00
Calvin Rose
c43aaf8986 More work to os/execute.
Use environ when eflag not given. Also try to escape windows
command line strings correctly.
2019-05-31 13:44:14 -04:00
Calvin Rose
2acc81d1c5 Add noreturn attribute to panic functions. 2019-05-31 10:10:20 -04:00
Calvin Rose
d005ac6888 Appease MSVC. 2019-05-30 19:21:11 -04:00
Calvin Rose
7fdb098a20 Add process.h. 2019-05-30 19:14:54 -04:00
Calvin Rose
a4a200e037 Spawn.h not found in windows. 2019-05-30 19:13:13 -04:00
Calvin Rose
15d95d8803 Windows include issue. 2019-05-30 18:50:52 -04:00
Calvin Rose
46950a8cb3 Convert os/execute to use posix_spawn. 2019-05-30 18:40:10 -04:00
Calvin Rose
c8cf7c2445 Appease MSVC. 2019-05-29 22:12:24 -04:00
Calvin Rose
1b63215aad Remove extra functions. 2019-05-29 22:00:47 -04:00
Calvin Rose
bcbe42ab23 Add API version checking for modules.
Checking now actively implemented for dynamic modules
in a fully backwards compatible way.
2019-05-29 21:58:20 -04:00
Calvin Rose
31f502b508 Add more to util.h to help with amalg build. 2019-05-29 12:07:53 -04:00
Calvin Rose
4d47d92a4a Windows WEXITSTATUS fix? 2019-05-29 11:53:57 -04:00
Calvin Rose
b39ad97a87 Fix up close to return proper exit code. 2019-05-29 11:50:46 -04:00
Calvin Rose
af23040d9c file/close returns an integer.
If opened with popen, returns the exit code. Otherwise
returns nil.
2019-05-29 11:40:58 -04:00
Calvin Rose
fd2d706e33 Add os/remove. 2019-05-29 11:31:19 -04:00
Andrew Chambers
3c304ddc35 Add api for checking build compatibilty. 2019-05-28 13:51:40 +12:00
Calvin Rose
010e2e4652 Add keyword arguments via &keys.
This makes it easier to document functions that
take keyword arguments and also prevents some allocations
with these functions. Before, this was possible via normal
variadic functions but created an intermediate tuple, and
the generated docstrings did not document the keys.
2019-05-24 17:03:22 -04:00
Calvin Rose
ddedae6831 Reenable computed gotos - they were disabled. 2019-05-24 13:54:23 -04:00
Calvin Rose
a303704a7d Add some tests for the amalgamated source/
Adds tests to Makefile and CI on Poisx platforms.
2019-05-23 10:34:01 -04:00
Calvin Rose
411fc77ecf Make env optional for compile. 2019-05-20 11:34:07 -04:00
Calvin Rose
55d8e8b56b Fix issue with compilation with source name.
Also add tuple/sourcemap and tuple/setmap.
2019-05-20 04:02:38 -04:00
Andrew Chambers
ec43afb426 Minor documentation fixes. 2019-05-17 20:58:06 +12:00
Calvin Rose
56d903d75b Remove extra closing paren. 2019-05-16 12:12:55 -04:00
Calvin Rose
dde5351d11 Small changes to some doc strings. 2019-05-16 11:43:21 -04:00
Calvin Rose
f2313b9959 file/read on eof will return nil.
Also add documentation for :exit in import.
Address issue #91
Partially adress issue #93
2019-05-14 11:05:19 -04:00
Calvin Rose
805b3bbb88 Numbers require at least 1 significant digit.
Address issue #96
2019-05-14 08:44:38 -04:00
Calvin Rose
232ea22dc5 Add string/triml, string/trimr, and string/trim. 2019-05-10 16:09:49 -04:00
Calvin Rose
7a313f6038 Update CHANGELOG, string/has-suffix?|prefix?
string/has-suffix? and string/has-prefix? can now accept
all byte data types for both arguments.
2019-05-09 13:42:14 -04:00
Calvin Rose
bbcfaf1289 Fix use after free bug in buffer/format when printing self. 2019-05-08 15:25:25 -04:00
Calvin Rose
bfb0cb331e No temporary buffer in PR #87 2019-05-08 10:53:23 -04:00
Andrew Chambers
1759252071 Fix use after free in buffer/push-string. 2019-05-08 10:49:25 -04:00
Calvin Rose
fff60b053b Use memmove in buffer/blit when needed. 2019-05-08 09:29:21 -04:00
Calvin Rose
65ac17986a Address similar issue to #86
buffer/blit could trigger a use after free if a buffer is
blitted with itself and modifies its length.
2019-05-08 08:55:43 -04:00
Calvin Rose
ff720f1320 Expose current fiber via janet_current_fiber(). 2019-05-04 19:07:04 -04:00
Calvin Rose
88b8418253 Add simple tracing functionality to VM.
Also disable debugger for normal errors.
2019-05-04 15:05:00 -04:00
Calvin Rose
4fa1b28cad Update changelog (string module)
Also run `make format` on code.
2019-05-04 10:11:52 -04:00
Andrew Chambers
c70d59edee Add string/has-prefix? and string/has-suffix?. 2019-05-04 10:05:58 -04:00
Calvin Rose
1cfc7b3b0d Add preliminary debugger to default repl.
Also upddate colors, and fix formatting.
2019-05-02 17:11:30 -04:00
Calvin Rose
bfb354b469 Fix 32 bit platforms. 2019-04-28 16:22:24 -04:00
Calvin Rose
0bad523913 Fix wrap functions. 2019-04-27 19:47:32 -04:00
Calvin Rose
5b36199aea Fix MSVC warning. 2019-04-27 16:50:40 -04:00
Calvin Rose
f10028d41a Add function versions of macro API bindings.
This should help address #81. Also hide janet_exit
and janet_assert, as they are really meant for internal usage.
I have not verified that this yet actually works with Rust's
bindgen.
2019-04-27 15:47:12 -04:00
Calvin Rose
73b81e0253 Fix os/date doc typo. 2019-04-23 22:43:51 -04:00
Calvin Rose
9100794cea Drop leading and trailing newlines in longstrings.
Long, heredoc style strings can now have
a non semantic leading newline character. This makes it
easier to define large columns of text.
2019-04-21 13:34:41 -04:00
Calvin Rose
4ddf90e301 Make nanboxing on 64 bit platforms not the default.
64 bit nanboxing is kind of sketchy on non x86 architectures.
32 bit architectures seem to work better as the 32 implementation
doesn't rely on the format of the address space and layout of
double's in memory.
2019-04-18 12:52:28 -04:00