Calvin Rose
b76ff3bdfc
Fix omission of daylight savings time in mktime
...
Since with daylight savings times, certain times
are ambiguous (the hours before and after the switch), mktime
needs to allow reading a dst flag.
2020-03-18 21:23:35 -05:00
Calvin Rose
00450cd9db
try and remove warnings on windows, format os.c.
2020-03-18 21:15:50 -05:00
Calvin Rose
c344a543b0
Merge pull request #318 from leahneukirchen/mktime
...
os/date fixes and os/mktime
2020-03-18 20:59:08 -05:00
Calvin Rose
554202f6e8
Merge branch 'master' of github.com:janet-lang/janet
2020-03-18 18:37:11 -05:00
Calvin Rose
7590cfc610
Update meson build file to try and fix LGTM.
2020-03-18 18:36:41 -05:00
Calvin Rose
eee8338064
Merge pull request #319 from leahneukirchen/lstat
...
os/lstat and os/readlink
2020-03-18 17:58:32 -05:00
Calvin Rose
3b5183a74e
Fixes #316 : os/execute should return non-zero on signals
...
Behave more like shells, and catch segfaults.
2020-03-18 17:49:20 -05:00
Leah Neukirchen
3ee43c3abb
add os/mktime, an inverse to os/date.
2020-03-18 23:45:02 +01:00
Leah Neukirchen
efdb13f0c7
os/date: allow negative timestamps.
...
Why not? Even on 32-bit time_t systems this lasts until late 1901.
2020-03-18 23:45:02 +01:00
Leah Neukirchen
f013c6e48d
os/date: check the second argument truthy, not the third.
2020-03-18 23:45:02 +01:00
Leah Neukirchen
6e67899401
Add os/readlink.
2020-03-18 20:05:48 +01:00
Leah Neukirchen
381dd1ce98
Add os/lstat.
2020-03-18 20:05:48 +01:00
Calvin Rose
b0d8369534
Increase reference accuracy of on-stack close envs.
...
Using a bitset to indicate which stack values are upvalues, we
can more accurately track when a reference to a stack value
persists after the stack frame exits.
2020-03-18 09:30:10 -05:00
Calvin Rose
4a7b18d841
Merge pull request #317 from andrewchambers/closureenvs
...
Add test cases for closure edge cases.
2020-03-17 22:05:35 -05:00
Andrew Chambers
7c4ffe9b9a
Add test cases for closure edge cases.
2020-03-18 15:40:41 +13:00
Calvin Rose
de4f8f9aaf
Marshal alive fibers in func envs as detached.
...
This will help with marshaling fibers.
2020-03-17 20:53:11 -05:00
Calvin Rose
6554cc4a8d
Merge branch 'master' of github.com:janet-lang/janet
2020-03-17 18:58:33 -05:00
Calvin Rose
fac47e8ecb
When marshalling a closure, try to detach funcenvs
...
If possible, this will reduce the need to marshal fibers
in many cases. Also add this logic to the GC so holding a closure
that originally came from a fiber that crashed does not cause that fiber
to hang around forever.
2020-03-17 18:55:32 -05:00
Calvin Rose
7443305039
Merge pull request #315 from andrewchambers/u64
...
Properly export u64_type
2020-03-16 17:15:20 -05:00
Andrew Chambers
635ae3a523
Properly export u64_type
2020-03-17 11:02:57 +13:00
Calvin Rose
4a05b4556e
Fix MSVC build warning.
2020-03-14 12:02:31 -05:00
Calvin Rose
c074615550
Revert to 9 char permission strings on windows.
2020-03-14 12:00:11 -05:00
Calvin Rose
bac2b74b3d
Add os/chmod.
2020-03-14 11:57:04 -05:00
Calvin Rose
a3aaa6634d
Use separate registry table for abstract types.
...
This avoids overloading the registry table, which is intended
for names of c functions.
2020-03-14 10:25:39 -05:00
Calvin Rose
6a3a983f43
Expose abstract type definitions in janet.h
...
This makes certain operations easier, and allows
more access to built in APIs.
2020-03-14 10:12:47 -05:00
Calvin Rose
7996edfef9
Update README.md - Fixes #308
2020-03-13 20:00:32 -05:00
Calvin Rose
0600b32908
Fix docstring for os/cd - Fixes #307
2020-03-13 15:01:48 -05:00
Calvin Rose
77343e02e9
Fixes #304
...
Add chr macro.
2020-03-10 22:46:50 -05:00
Calvin Rose
a3d4ecddba
Address #301
...
Incorrect bounds checking and offset calculation in buffer/blit.
2020-03-08 20:44:03 -05:00
Calvin Rose
3d3d314fb7
Remove warning about math.h on aarch64 ubuntu gcc.
2020-03-07 14:05:28 -06:00
Calvin Rose
3f3b756b61
Merge pull request #298 from leahneukirchen/m-del
...
Make alt-backspace behave like ctrl-w.
2020-03-07 10:14:14 -06:00
Calvin Rose
d3b9b8d452
For #293 , correct wildcards in dictinoaries.
2020-03-07 10:13:10 -06:00
Calvin Rose
390c042027
Update README.md
2020-03-07 09:49:25 -06:00
Calvin Rose
c864828735
Address #293 - wildcard to match macro.
...
The _ symbol will match any value without creating a binding.
2020-03-07 09:40:02 -06:00
Calvin Rose
e0c9910d85
Add :range-to and :down-to to loop.
...
Fully inclusive ranges are generally useful and
do not complicate implementation much.
2020-03-07 09:34:11 -06:00
Calvin Rose
e62f12426b
Update ci build files.
2020-03-06 18:11:29 -06:00
Calvin Rose
d3af50e4cc
Rename: s/yaml/yml/g
2020-03-06 17:42:35 -06:00
Calvin Rose
cbdb700edf
No need for doubly hidden files.
2020-03-06 17:35:03 -06:00
Calvin Rose
6010b95fca
Remove spaces from build manifests for sourcehut.
2020-03-06 17:30:36 -06:00
Calvin Rose
e351dde651
Update CHANGELOG.md and docs for loop and pp.
2020-03-06 17:12:06 -06:00
Calvin Rose
714bd61d56
Address #300
...
Check for empty capture stack in replace rule.
2020-03-06 10:05:20 -06:00
Calvin Rose
f9e9c70b6c
Update CHANGELOG.md
2020-03-06 08:40:51 -06:00
Calvin Rose
6123c41f13
Harden semantics for and and or macros.
...
There was perviously a bit of fuzziness on returning false/nil
from these macros that has been removed.
2020-03-06 08:37:59 -06:00
Leah Neukirchen
1aaa5618de
Make alt-backspace behave like ctrl-w.
...
Another common binding in readline and its clones.
2020-03-06 10:55:45 +01:00
Calvin Rose
fbe8998ca8
Merge branch 'master' of github.com:janet-lang/janet
2020-03-05 09:35:04 -06:00
Calvin Rose
47e8f669f5
Fix match behavior for lone nil.
2020-03-05 09:35:00 -06:00
Calvin Rose
d804ee3c07
Merge pull request #296 from leahneukirchen/ctrl-d
...
Make ctrl-d behave like delete, but exit on an empty line.
2020-03-04 20:42:05 -06:00
Calvin Rose
06a78d90d9
Merge pull request #295 from leahneukirchen/meson-pkgconfig
...
Create janet.pc also from Meson.
2020-03-04 20:39:24 -06:00
Leah Neukirchen
bc2ebce086
Make ctrl-d behave like delete, but exit on an empty line.
...
This is the default readline behavior.
2020-03-04 14:56:04 +01:00
Leah Neukirchen
a07de921d0
Create janet.pc also from Meson.
2020-03-04 14:35:57 +01:00