Calvin Rose
94c19575b1
Fix when clib is not pointer type.
2022-06-06 13:37:07 -05:00
Calvin Rose
e3e485285b
Prevent double usage of native objects after closing.
2022-06-06 13:36:03 -05:00
Calvin Rose
986e36720e
Update windows builds for raw-natives.
2022-06-06 13:08:12 -05:00
Calvin Rose
74348ab6c2
Fix symbol lookup when symbol isn't found.
2022-06-06 10:53:00 -05:00
Calvin Rose
8d1ad99f42
Add stubs that are precursor to FFI.
...
FFI may be best implemented as an external library
(libffi has incompatible license to Janet) or as code
that takes void * and wraps then into Janet C functions
given a function signature. Either way, we need to some way
to load symbols from arbitrary dynamic libraries.
2022-06-06 10:49:30 -05:00
Calvin Rose
c9f33bbde0
Add rwlocks.
2022-06-05 16:42:18 -05:00
Calvin Rose
9c9f9d4fa6
Add some thread coordination primitives.
...
Due to the nature of event loops, it is a bit difficult to integrate
lock and other primitives such that they don't block fibers on the same
thread.
2022-06-05 15:24:34 -05:00
Calvin Rose
dfa78ad3c6
typo
2022-05-28 12:23:28 -05:00
Calvin Rose
6ada2a458f
Fixes on bsd for os/cpu-count.
2022-05-28 12:21:44 -05:00
Calvin Rose
8145f3b68d
On linux, available CPUs is more useful information.
2022-05-28 12:19:25 -05:00
Calvin Rose
48289acee6
Add os/cpu-count functionality.
2022-05-28 12:01:23 -05:00
Calvin Rose
fe7d35171f
Remove file/popen - address #974
2022-05-05 18:33:34 -05:00
Calvin Rose
b3aed13567
Use janet_getnat when non-negative integer needed.
2022-05-05 18:27:29 -05:00
rick2600
1ff521683f
Fix #975 - null ptr dereference when a table is created with negative capacity
2022-05-05 02:11:43 -03:00
rick2600
7fda7709ff
fix negative count passed to cfun_array_new_filled
2022-05-02 12:57:47 -03:00
John Gabriele
473eec26c1
os.c doc formatting typo
2022-04-29 23:57:37 -04:00
Calvin Rose
9fa945ad93
Don't include captures of last match from to
combinator.
2022-04-29 19:21:10 -05:00
Calvin Rose
a895219d2f
Fix #971 - remove to rule optimization
...
For to and thru, we need to restore eveytime through the loop since rules need
run with the right captures on the stack, especially if they have any
sort of backrefs.
2022-04-29 19:15:56 -05:00
bakpakin
427f7c362e
Fix os/execute regression.
2022-04-27 22:59:27 -05:00
Calvin Rose
73f5c41fae
Address #968 Ignore :pipe arguments in os/execute.
...
They are only useful in os/spawn. Also update docstrings.
2022-04-27 20:13:10 -05:00
Calvin Rose
b4ec168401
Address #950 - add defn suggestion on bad def.
...
While generally we are not in the business of making a very chatty
compiler, this is a simple improvement that involves compiling
metadata before the binding, as well as adding a suggestion for `defn`
in case the compiler encounters an unexpected tuple.
2022-04-23 22:27:34 -05:00
Calvin Rose
e22936fbf8
Merge pull request #964 from uvtc/patch-9
...
tuple.c docstrings
2022-04-18 14:07:41 -05:00
John Gabriele
690b98bff9
tuple.c docstrings
...
Added some backticks around code in docstrings to distinguish them from prose.
2022-04-17 21:26:53 -04:00
John Gabriele
8329131bfe
table.c docstrings
...
Added some backticks around code in docstrings to distinguish them from prose.
Light editing to `table/raw-get`. Is my change there correct? (t --> the key)
2022-04-17 21:21:01 -04:00
Calvin Rose
9986aab326
Merge pull request #960 from uvtc/patch-5
...
math.c
2022-04-17 20:03:25 -05:00
Calvin Rose
0b105bc535
Merge pull request #959 from uvtc/patch-4
...
io.c docstrings
2022-04-17 20:03:11 -05:00
Calvin Rose
51ac9c9506
Merge pull request #961 from uvtc/patch-6
...
os.c docstrings
2022-04-17 20:02:56 -05:00
Calvin Rose
0310176696
Merge pull request #962 from uvtc/patch-7
...
parse.c docstrings
2022-04-17 20:02:26 -05:00
Calvin Rose
84a7a2bc3e
Merge pull request #958 from uvtc/patch-3
...
buffer.c docstrings
2022-04-17 20:01:57 -05:00
John Gabriele
2bffb9d682
parse.c docstrings
...
Added some backticks around code in docstrings to distinguish them from prose.
2022-04-17 20:53:36 -04:00
John Gabriele
811125a760
os.c docstrings
...
Some code backticks in docstrings where useful. Also some light editing of punctuation, etc.
2022-04-17 20:42:32 -04:00
John Gabriele
0dd91082a1
math.c
...
Fix typo, and backticks around one word.
2022-04-17 20:15:41 -04:00
John Gabriele
c80587868e
io.c docstrings
...
Added some backticks around code in docstrings to distinguish them from prose.
2022-04-17 20:07:05 -04:00
John Gabriele
8c52dc86c7
buffer.c docstrings
...
Added backticks around code in docstrings to distinguish from prose.
2022-04-17 19:49:29 -04:00
John Gabriele
be24592bc3
array.c docstrings
...
Added some backticks around code in docstrings to distinguish from prose.
2022-04-17 19:35:57 -04:00
John Gabriele
181d883a1d
string.c docstrings
...
Add backticks around code values to distinguish them from prose.
2022-04-17 12:08:26 -04:00
rick2600
d5a5c49357
#951 - fix unchecked count in cfun_buffer_new_filled
2022-04-14 16:20:04 -03:00
Jason Pepas
e9870b293f
Remove unneeded includes
2022-03-21 21:28:13 -05:00
Jason Pepas
ab910d060b
Move AvailabilityMacros.h import into util.c
2022-03-21 21:23:09 -05:00
Jason Pepas
c9986936ed
Mac clock shim not needed until 10.12
2022-03-21 20:20:20 -05:00
Calvin Rose
d77be46644
Fix master - check last change with stackn
2022-03-21 19:41:06 -05:00
Calvin Rose
3715d7a184
Auto update copyright date.
2022-03-21 18:22:59 -05:00
Calvin Rose
1c96c7163a
Address #926 - enter the event loop from janet_dobytes or
...
janet_dostring.
2022-03-21 18:06:14 -05:00
Jason Pepas
f270739f9f
Refactor __MACH__ to JANET_APPLE
2022-03-17 01:20:55 -05:00
Calvin Rose
c815185574
Merge pull request #931 from saikyun/norm-neg
...
normalize zero without branching
2022-03-07 09:18:22 -06:00
Calvin Rose
8045e29a52
Merge pull request #932 from ishehadeh/feature/int-to-bytes
...
Add int/to-bytes: Serialize int/[su]64 to a buffer
2022-03-06 13:11:08 -06:00
Ian Shehadeh
bbb3e16fd1
int/to-bytes: return a buffer instead of a tuple
...
Buffers make more sense for this function because one of their primary
use cases is working with bytes.
The tuple implementation was an array of floats, which is less
performant and ergonomic for common operations. (i.e: bit manipulation)
Buffers also have the advantage they are mutable, meaning the user
can write ints to an existing buffer.
2022-03-05 08:21:53 -05:00
Jona Ekenberg
3cd1657387
normalize zero without branching
2022-03-05 09:58:00 +01:00
Calvin Rose
d7ea122cf7
Fix #928 - Fix hashing of negative 0.
2022-03-04 21:20:20 -06:00
Ian Shehadeh
6aea7c7f70
add int/to-bytes
...
int/to-bytes unpacks the bytes of a 64-bit integer into a tuple.
2022-03-04 08:48:54 -05:00