Commit Graph

2394 Commits

Author SHA1 Message Date
Calvin Rose 05e7f974e3 Add os/compiler to the core.
Allows querying what compiler was used to compile Janet.
2023-01-28 14:00:02 -06:00
Calvin Rose 0dbef65a73
Merge pull request #1065 from sogaiu/comment-tweaks
Misc comment tweaks
2023-01-27 11:26:05 -06:00
Calvin Rose 9106228787 Add :riscv32 and :riscv32 values for os/arch. 2023-01-27 11:23:57 -06:00
Calvin Rose 6ae3bdb25c Add RISC-V 64 bit detection in janet.h 2023-01-26 22:40:05 -06:00
sogaiu 310bcec260 Misc comment tweaks 2023-01-25 18:45:19 +09:00
Calvin Rose 8c4cc4e671
Merge pull request #1064 from sogaiu/realpath-doc-tweak
Update os/realpath docstring
2023-01-24 09:50:44 -06:00
Calvin Rose c6eaaa83ed Buffer initialized with janet_buffer_init will not be gced.
Set an internal flag that disables garbage collection on such
buffers. For all currently correct usage, this should have no effect,
and will fix use cases where buffers are initialized this way and then
passed to the interpreter.
2023-01-23 20:57:30 -06:00
sogaiu 8f598d6f96 Update os/realpath docstring 2023-01-23 12:55:04 +09:00
Calvin Rose 8955e6f536 Merge branch 'master' of github.com:janet-lang/janet 2023-01-22 11:05:39 -06:00
Calvin Rose f8ddea6452 Add msys2 testing with github actions. 2023-01-22 11:05:27 -06:00
alectroemel 1acf4c3ab7
add int32_t type for file flags, just like header
Signed-off-by: alectroemel <alectroemel@hotmail.com>
Signed-off-by: alectroemel <alec@mirusresearch.com>
2023-01-22 10:24:46 -06:00
Calvin Rose 07a3158fba
Merge pull request #1060 from ianthehenry/doc-typos
Fix some docstring typos
2023-01-21 16:21:57 -06:00
bakpakin a490937cd9 Add :mingw value when getting the OS setting when compiled with mingw. 2023-01-21 11:50:03 -06:00
bakpakin 8ee5942481 Fix windows build with JANET_NO_NET - #1055 2023-01-21 10:56:20 -06:00
bakpakin 93b469885a Initial Mingw support with Makefile.
Also add a macro JANET_MSVC to distinguish between
a windows build (JANET_WINDOWS) and a build with msvc.
2023-01-21 10:37:34 -06:00
Calvin Rose d8d1de2dcb Don't compile library loading code on windows if it is disabled. 2023-01-21 09:36:03 -06:00
Ian Henry ab224514f0
Fix some docstring typos. 2023-01-18 19:41:56 -08:00
Calvin Rose 75179de8da
Merge pull request #1056 from fd00/use-dev-urandom-on-cygwin
Use `/dev/urandom` for `janet_cryptorand` on cygwin
2023-01-08 09:29:52 -06:00
Calvin Rose c28df14e6b Prepare for 1.26.0 release 2023-01-07 15:08:40 -06:00
Calvin Rose b73855b193 Merge branch 'master' of github.com:janet-lang/janet 2023-01-07 15:05:16 -06:00
Calvin Rose a0f40042cb Update copyright year. 2023-01-07 15:03:35 -06:00
Daisuke Fujimura (fd0) 3254c2c477 Use /dev/urandom for janet_cryptorand on cygwin 2023-01-07 08:58:35 +09:00
Calvin Rose a8a78d4525
Merge pull request #1052 from dressupgeekout/cpu_count_reduced_os
(os/cpu-count) should not be defined at all with JANET_REDUCED_OS
2022-12-16 11:11:30 -06:00
Calvin Rose 57e6ee963d
Merge pull request #1046 from dressupgeekout/charlotte_sort_doc
Explicitly mention that `sort-by` sorts a list in place.
2022-12-16 11:11:07 -06:00
Calvin Rose ce6bfb8420
Merge pull request #1049 from harryvederci/patch-1
Improve documentation for the `all` function.
2022-12-16 09:51:59 -06:00
Calvin Rose f0672bdc59
Merge pull request #1051 from sogaiu/math-abs-vs-fabs-issue
Tweak math/abs to improve doc result
2022-12-16 09:51:43 -06:00
Charlotte Koch 23de953fbd (os/cpu-count) should not be defined at all with JANET_REDUCED_OS 2022-12-15 20:16:43 -08:00
Calvin Rose d5ee6cf521 Add malloc and free to ffi.
Very "unsafe", but a good tool of last resort. In most cases
a buffer is preferable, but the lifetime can be a bit unclear.
This allows very granular control over memory.
2022-12-15 21:35:44 -06:00
sogaiu fb7981e053 Tweak math/abs to improve doc result 2022-12-11 00:09:50 +09:00
harryvederci 846123ecab
Improve documentation for the `all` function. 2022-12-09 11:16:42 +00:00
Calvin Rose 90f212df92 Add length method ffi/jitfn abstract values. 2022-12-04 11:08:17 -06:00
Calvin Rose aa60c1f36a Add ffi jit example. 2022-12-03 17:52:23 -06:00
Calvin Rose c731f01067 Address windows compilation warning. 2022-12-03 12:10:22 -06:00
Calvin Rose 6c9c1cdb30 MAP_ANON(YMOUS) not strictly needed. 2022-12-03 11:45:33 -06:00
Calvin Rose 9ba2b40e87 Add MAP_ANON instead of MAP_ANONYMOUS for mac 2022-12-03 11:31:04 -06:00
Calvin Rose 7a3d055012 Add ffi/jitfn for JIT compilation.
Convert a byte sequence of machine code to an
an executable pointer that can be used with ffi/call.
2022-12-03 11:26:23 -06:00
Calvin Rose 0824f45e29 Format compile.c 2022-11-27 10:15:01 -06:00
Charlotte Koch 4debe3446c Explicitly mention that `sort-by` sorts a list in place. 2022-11-20 20:51:49 -08:00
Calvin Rose 07fe9bcdf6 Update state header to include pthread 2022-11-11 11:48:50 -06:00
Calvin Rose 6a557a73f5 Simplify eval.
Also add more conventional handling of nil to the `compile` function.
2022-11-11 11:25:06 -06:00
Calvin Rose 8d1cfe0c56 Simplify eval-string implementation. 2022-11-11 11:15:53 -06:00
Calvin Rose a3a42eebea Create pthread threads with detached attribute.
Rather than calling pthread_detach on a default thread.
2022-11-11 11:01:59 -06:00
Calvin Rose 76be8006a4 Add channel marshalling. 2022-11-10 16:32:54 -06:00
Calvin Rose bfcfd58259 Update for TCC to include stdatomic.h 2022-11-09 07:55:21 -06:00
Calvin Rose 914a4360e7 Indicate version bump since header file changed. 2022-11-05 16:38:52 -05:00
Calvin Rose 8c31874eeb Remove unused assert.h 2022-11-05 11:44:14 -05:00
Calvin Rose ef7afeb2ea Add 64 bit integer support to printf and other formatting functions. 2022-11-05 11:33:19 -05:00
Calvin Rose c8974fffbe Fix docstring. 2022-11-04 11:23:08 -05:00
Calvin Rose b75fb8dc9e Add :@all: to module/expand-path
Allow more easily importing modules from custom directories
without jumping through too many hoops. Technically, this was
possible before but required circumventing the built-in module/paths
and was just a hassle.

Also add entries to module/path (and module/add-path) to allow code
like the following.

(setdyn :my-libs "/home/me/janet-stuff/")

(import @my-libs/toolbox)

Intended for things like test harnesses where code might not
be installed to the usual directories.
2022-11-04 11:15:48 -05:00
Calvin Rose 57356781a9 Fix typo. 2022-10-30 13:36:13 -05:00