1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-26 07:03:16 +00:00
Commit Graph

174 Commits

Author SHA1 Message Date
Calvin Rose
540b326c54 Simpler way to set JANET_PATH at compile time. 2019-02-18 14:48:29 -05:00
Calvin Rose
660a2b41ae Set module/*syspath* to JANET_PATH at build time
The takes out the hardcoded reference to /usr/local/
2019-02-18 14:31:23 -05:00
Calvin Rose
1e70c97ef0 Allow enabling/disabling of peg module.
Use compiler define -DJANET_NO_PEG to turn off the peg module.
2019-02-17 21:22:03 -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
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
bf8d5da3dc Fix possible memory leak on buffer overflow.
(All buffer push functions can panic (longjmp), skipping
 deinit. Instead, we should use the garbage collected api).
2019-01-19 12:32:52 -05:00
Calvin Rose
798c88b4c8 Update peg to allow functions over captures. Update C API
to make janet function calls easier and faster from C (still
needs an object pool for fibers, though). Fix bug in scan-number
and add many more peg tests.
2019-01-12 17:31:15 -05:00
Calvin Rose
40845b5c1b Initial peg implementation. Tree walk interpretted with
no captures, so not yet ready.
2019-01-11 19:22:24 -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
b626e73d19 Add extra argument to (native) to allow for passing
in custom environment to add stuff to.
2019-01-05 23:37:10 -05:00
Calvin Rose
0fdd404a71 Remove duplicate functionality in string.c 2019-01-05 21:23:44 -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
337a498edb Fix some keyword related issues. 2019-01-02 22:08:51 -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
cc5b4eac0a Update documentation, fix life example. 2018-12-17 21:28:45 -05:00
Calvin Rose
77ea11c603 Update documentation to include source
location of bindings.
2018-12-17 12:06:50 -05:00
Calvin Rose
99e14a9b70 Rename bitwise operators. 2018-12-16 22:13:48 -05:00
Calvin Rose
e8c0dcd14e Make source mapping use byte offset instead of line and col
for better debugging support in repl. Add debug module for better
debugging support.
2018-12-13 18:46:53 -05:00
Calvin Rose
6185af7227 Try to remove build issues on windows. 2018-12-08 17:20:24 -05:00
Calvin Rose
16e514b351 Update version schema - now have version number
and build number.
2018-12-08 14:17:03 -05:00
Calvin Rose
7668cd5772 Don't use generated headers for embedded janet
code, use object files.
2018-12-06 14:30: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
d791077e25 Fix abstract? function. 2018-11-23 15:33:49 -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
e963672977 Make the assembler optional during compilation. 2018-09-29 10:58:57 -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
45d0597294 Remove apply1 and optimize apply. 2018-08-26 12:53:39 -04:00
Calvin Rose
634ec85b07 Fix funcdef flags when marshaling. 2018-08-21 15:07:37 -04:00
Calvin Rose
910cfd7ddf Lots of updates. Function marshaling WIP. 2018-08-19 20:21:27 -04:00
Calvin Rose
48c2654312 Local changes. 2018-08-07 00:54:47 -04:00
Calvin Rose
f3480c1c1d Try to silence some appveyor warnings. 2018-08-05 21:32:32 -04:00
Calvin Rose
44b8c5a8c8 Merge branch 'master' of https://github.com/bakpakin/dst 2018-08-05 21:20:45 -04:00
Calvin Rose
ed2f032c15 Remove cmake build to simplify things. 2018-08-05 21:13:14 -04:00
Calvin Rose
1acd2d1de7 Inlining for all built in comparators. 2018-07-09 21:24:22 -04:00
Calvin Rose
b860b0a3c5 Port some cfunctions in math.c to corelib as
assembled functions.
2018-07-08 23:10:02 -04:00
Calvin Rose
5b15ad9ff8 Try and fix os.clock on windows. 2018-07-08 20:54:41 -04:00
Calvin Rose
f63d08efbd Work to replace os.execute command with something safe. 2018-07-06 22:00:41 -04:00
Calvin Rose
3d7fff659a Make native modules optional. 2018-07-04 14:00:11 -04:00
Calvin Rose
1f37919f39 Rename boot.dst to core.dst 2018-07-04 00:21:18 -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
6822400abe Fix large function compilation issue. 2018-07-01 15:53:57 -04:00
Calvin Rose
363a17ff8c Convert get, put and length to normal functions, not c functions. 2018-06-17 13:55:02 -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
4ecc88af37 Add some more string functions. Remove format. 2018-05-18 14:19:57 -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
932a0324ee More work on renaming functions. Change long string syntax to use
backticks. Allow custom masks in fibers for custom error and debug
handling.
2018-05-09 17:01:58 -04:00
Calvin Rose
f47323c915 Change convention for naming modules and functions. 2018-05-08 19:40:28 -04:00
Calvin Rose
1e4f221170 Move strtod to core, and rename parse-number, parse-integer, and
parse-real functions to scan-number, scan-integer, and scan-real.
Add very basic format function for formatting strings for printing.
2018-05-01 11:06:31 -04:00
Calvin Rose
10934bcfb9 Add errorhandling helper functions and macros for writing c functions. 2018-04-28 18:10:57 -04:00
Calvin Rose
027b2a81c2 Shrink the public interface by hiding internal state. 2018-03-31 16:42:41 -04:00
Calvin Rose
0d5b57daee Remove exit in favor of os-exit. 2018-03-28 21:24:54 -04:00
Calvin Rose
0fd55282d8 Add error reporting to repl (initial stack traces) 2018-03-21 20:53:39 -04:00
Calvin Rose
4a76f2ae32 Replace varset! with algol style := 2018-03-16 18:15:34 -04:00
Calvin Rose
c0ac44a650 Fix description semantics. describe returns string, does not print. 2018-03-14 18:57:26 -04:00
Calvin Rose
2a0dc5f1ad Switch to assymetric coroutines instead of symmetric. 2018-03-11 15:35:23 -04:00
Calvin Rose
0b6ac1698c Add proto field to tables to allow prototypal inheritance. 2018-03-10 13:34:46 -05:00
Calvin Rose
0c3b0673ff Enable debug opcode in vm and debug state for fibers. 2018-03-09 17:14:26 -05:00
Calvin Rose
e047b39a87 More work on self hosting the client program. 2018-02-07 13:19:34 -05:00
Calvin Rose
3e1f031576 Self host the repl, remove linenoise, and selfhost the
main client.
2018-02-07 00:44:51 -05:00
Calvin Rose
f3b2c29580 Add pretty print to build in. 2018-02-03 18:12:07 -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
50bfa8de3f Add boot script which is loaded on start up. 2018-01-31 17:39:18 -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