Calvin Rose
b14fcb068b
Update janet_pcall interface
...
The programmer can now not only get the used fiber, but
provide a fiber to reuse if many calls are made in succession.
2019-02-22 17:10:24 -05:00
Calvin Rose
9d4effc02e
Add make format to format code.
...
A consistent style should help with contributors and
readability. We use astyle as the formatter as can make a pretty
good approximation of the current style and my preferred style.
Astyle can be found at http://astyle.sourceforge.net/astyle.html
2019-02-19 20:51:34 -05:00
Calvin Rose
ed72dcf82d
Rename the header <janet/janet.h> to <janet.h>
...
Makes it easier to use and remember, and makes the
variable `module/*headerpath*` make more sense.
2019-02-18 20:13:35 -05:00
Calvin Rose
f161002390
Address #35
2019-02-15 13:20:20 -05:00
Calvin Rose
fe27df528c
Boot core library from image rather than source
...
This should speed up start time and reduce malloc/free
usage to about 15% of what is what previously for startup.
The current cost is slightly larger binary as the representaion
of the image is currently less compact than source code.
2019-02-08 00:44:30 -05:00
Calvin Rose
6321c30cb1
Add methods for file io.
2019-02-06 17:58:27 -05:00
J.-F. Cap
960cf76eb5
Experimental getter/setter for abstract types
2019-02-05 17:14:13 +01:00
Calvin Rose
611543c48b
Add source amalgamation
...
The amalgamated source concatenates all sources
to a file janet.c which can be used for
embedding janet, much in the same way as sqlite
or mongoose.
2019-01-24 00:15:58 -05:00
Calvin Rose
3ae6f64de5
Fix popen bug.
2019-01-08 21:42:16 -05:00
Calvin Rose
6f3bc3d577
Update copyright date, fix types, remove trailing whitespace.
2019-01-06 03:23:03 -05:00
Calvin Rose
5865692401
Surround embedded documentation with a macro so it
...
can be disabled in a future build.
2019-01-06 01:49:56 -05:00
Calvin Rose
7b28032f5c
More explicit casts to please Microsoft compiler.
2019-01-05 21:58:39 -05:00
Calvin Rose
1f98eff33a
Fix compiler warnings on emscripten.
2019-01-05 20:52:32 -05:00
Calvin Rose
338b31f5a2
Add janet_fixarity. Update emscripten source.
2019-01-05 20:45:24 -05:00
Calvin Rose
b60e3e302a
Update C API to use friendlier functions rather than macros.
...
Error handling is implemented with setjmp/longjmp so code
can be more concise. This required a very large but straight forward refactor for all
of the libraries.
2019-01-05 20:09:03 -05:00
Calvin Rose
e9c94598e6
Add native keyword type to replace symbols with leading ':'
...
character.
2019-01-02 19:41:07 -05:00
Calvin Rose
6b95326d7c
First commit removing the integer number type. This should
...
remove some complexity and unexpected behavior around numbers in
general as all numbers are the same number type, IEEE 754 double
precision numbers. Also update examples and tests, some of which were
out of date.
Some more testing may be needed for new changes to numbers.
2018-12-27 13:05:29 -05:00
Calvin Rose
131ee29190
Add docs target to generate documentation.
2018-12-17 01:41:11 -05:00
Calvin Rose
4e4dd31164
Change syntax for namespaces.
...
Add quasiquote, unquote, and unquote-splicing
as specials rather than a macro.
2018-11-30 22:49:21 -05:00
Calvin Rose
fcbd24cedc
Add lots of documentation for all functions.
2018-11-16 16:24:10 -05:00
Calvin Rose
945b72468c
Add a lot of documentation for functions.
2018-11-16 02:09:38 -05:00
Calvin Rose
4d119e4e03
Begin adding more complete documentation.
2018-11-15 15:45:41 -05:00
Calvin Rose
98f2c6feab
Add lookups for marshalling and unmarshalling.
...
Allow generating lookup tables from the current environment.
2018-10-21 01:35:07 -04:00
Calvin Rose
c1923c5ada
Web assembly build with emscripten.
2018-10-16 23:08:26 -04:00
Calvin Rose
0389971049
No errors compiling on BU linux (CentOS).
2018-09-10 14:54:12 -04:00
Calvin Rose
c8ef2a0d88
Rename to janet
2018-09-05 22:18:42 -04:00
Calvin Rose
75c66ea6dd
Refactor native module declarations. marshal can now
...
serialize entire environment.
2018-08-26 14:35:01 -04:00
Calvin Rose
510feeed7f
Allow marshaling of more functions for core.
...
Fix indentation in some files.
2018-08-22 21:41:25 -04:00
Calvin Rose
f3480c1c1d
Try to silence some appveyor warnings.
2018-08-05 21:32:32 -04:00
Calvin Rose
a1bdc3a023
Better inline for put. Better printing for named functions.
2018-07-10 20:01:39 -04:00
Calvin Rose
a018f9f54a
Major refactor. Move files around, merge compiler into
...
core and other changes, work on inlining many c functions.
2018-07-03 23:07:35 -04:00
Calvin Rose
9805bfb635
Fix file.read to handle popen'ed files better (allow read with :all).
2018-06-26 09:37:34 -04:00
Calvin Rose
fb409201b4
Strip trailing whitespace from many files.
...
Add native modules to import with module.native-path.
2018-05-19 21:16:00 -04:00
Calvin Rose
68895e27d4
Change import semantics. Fix gc bug with fibers.
2018-05-18 20:53:19 -04:00
Calvin Rose
f295692b50
Update copyright to 2018. Add string methods.
2018-05-17 23:41:20 -04:00
Calvin Rose
dafc121f4d
Change c function macros to be explicitly non functional by
...
capitalizing them.
2018-05-12 20:31:28 -04:00
Calvin Rose
70e52d91c4
Add popen function to io.c
2018-05-11 08:13:26 -04:00
Calvin Rose
f47323c915
Change convention for naming modules and functions.
2018-05-08 19:40:28 -04:00
Calvin Rose
55f0e759d9
Add extra information in repl to show state of parsing.
2018-05-06 23:25:59 -04:00
Calvin Rose
53f9c18669
More work on improving errors.
2018-04-29 20:13:04 -04:00
Calvin Rose
2a0dc5f1ad
Switch to assymetric coroutines instead of symmetric.
2018-03-11 15:35:23 -04:00
Calvin Rose
3e1f031576
Self host the repl, remove linenoise, and selfhost the
...
main client.
2018-02-07 00:44:51 -05:00
bakpakin
7bfb3145cb
Add some library functions and add newline character to reading line
...
from file.
2018-02-06 10:31:42 -05:00
Calvin Rose
4971ef58d2
Add fseek.
2018-02-04 12:58:40 -05:00
Calvin Rose
4b89789f69
Add all and line option to file-read
2018-02-04 00:54:38 -05:00
Calvin Rose
a673b7e326
Fix small compiler bug
2018-02-03 17:22:04 -05:00
Calvin Rose
35ddc70888
Move ast into parser. Map keywords to symbols instead of
...
strings.
2018-02-03 13:55:55 -05:00
Calvin Rose
278769f2bb
Fix compiler warnings with GCC.
2018-02-02 17:26:20 -05:00
bakpakin
4f74d57359
Refactor stl to corelib and stl. Corelib is part of vm, stl
...
is part of dst language. Add bootstrapping code directly into stl.
Stl is now logically grouped with compiler.
2018-01-29 23:38:49 -05:00
bakpakin
b305a7c9bb
Add macros in compiler.
2018-01-28 15:29:47 -05:00