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
0ce5acec89
Begin cleaning up string API.
...
Remove string/pretty in favor of buffer/format and string/format. Also
drop string/number, which is more verbose and less flexible than
string/format.
2019-02-16 15:12:34 -05:00
Calvin Rose
1f91ee30fe
Make require simpler and module/find more useful.
...
This replaces a lot of the functionality in require by moving
it to module/find. module/native-paths and module/image-paths are also
merged into the one module/paths to make it easier to extend. This of
course breaks some of the less important API - module/native-paths no
longer exists.
2019-02-16 13:21:29 -05:00
Calvin Rose
9e6b1d1b16
Add images.
...
Images are precompiled libraries. They can be created programmatically
via the `write-image` function and then loaded with `require` or
`import`. They can also be run by the command line tool - you must
specify the path to the image without the .jimage extension.
2019-02-15 18:56:41 -05:00
Calvin Rose
17783c3c3e
Add tuple/brackets
...
Fix macro expansion via macex for bracketed tuples.
2019-02-11 18:37:59 -05:00
J.-F. Cap
86ba69c16b
Merge remote-tracking branch 'upstream/master' into crazy-brackets
2019-02-08 23:45:55 +01:00
J.-F. Cap
5f70024f87
Experimental stuffs with bracket syntax
2019-02-08 21:49:28 +01: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
4bcf6565cd
Add parser/insert and bump to 0.4.0
2019-01-31 14:48:28 -05:00
Calvin Rose
7ba925c50a
Make getline more useful.
2019-01-31 12:34:22 -05:00
Calvin Rose
cb3b9dd76f
Update changelog an fix typos.
2019-01-31 10:09:34 -05:00
Calvin Rose
c76f4e89d8
Remove redundancies in stacktraces.
...
There was an implementation for stacktraces in both
run.c and in core.janet, status-pp. The commit removes
the one in core.janet in favor of the C based stacktrace, which
is exposed via debug/stacktrace. Lots of reshuffling of run-context
ensued as well, which resulted in an api that is a bit cleaner.
2019-01-30 23:11:12 -05:00
Calvin Rose
32c209ede9
Address #25
2019-01-29 13:59:08 -05:00
Calvin Rose
0d293cd3f5
Update require to use real path name rather than module name.
2019-01-28 21:48:13 -05:00
Calvin Rose
68e00cdb7a
Update slurp and spit error handler.
2019-01-26 17:27:05 -05:00
Calvin Rose
090a6a8c5c
Add optional env arguments to eval functions.
2019-01-20 16:06:30 -05:00
Calvin Rose
48b179d67e
Add slurp and spit to the core library.
2019-01-19 22:00:33 -05:00
Calvin Rose
5ba969f91d
Make match macro prettier.
2019-01-18 15:24:58 -05:00
Calvin Rose
26818a5e5c
Fix doc generation.
2019-01-18 12:26:04 -05:00
Calvin Rose
b84b0e4828
Expose more of the module system.
...
The system path can more easily modified at runtime,
and the module/cache and module/loading tables are now exposed.
Properly cache native modules as well.
2019-01-18 12:04:34 -05:00
Calvin Rose
b4934ceddc
Make parser errors a bit better for files with no closing
...
delimiters.
2019-01-17 23:43:46 -05:00
Calvin Rose
95f2bbe0a0
Add highlight.janet tool which can highlight
...
janet source code and output html or terminal escaped code.
Also made re entrant calls into the vm provide better
error messages.
2019-01-17 18:12:26 -05:00
Calvin Rose
e53778d5d8
Remove annoying (fiber) text from stacktrace.
2019-01-14 12:08:36 -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
62cb3f81fe
Fix sorting in asm.c. Add README text.
2019-01-09 17:09:16 -05:00
Calvin Rose
5b1a3b8208
Make grammar tool completely generate grammar from scratch.
...
Remove grammar from source tree.
2019-01-08 19:59:54 -05:00
Calvin Rose
eae4e0dede
Add functionality that allows the set macro to
...
take a tuple as an l-value. Remove the old
multi-sym report in anticipation of a different
mechanism.
2019-01-06 19:33:27 -05:00
Calvin Rose
6f3bc3d577
Update copyright date, fix types, remove trailing whitespace.
2019-01-06 03:23:03 -05:00
Calvin Rose
ef5eed2c21
Add source location to doc macro.
2019-01-06 02:10: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
b535c91ee1
Fix native module issue.
2019-01-05 22:52:28 -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
d8b0a5ed01
Make parser API more robust - the value queue is now
...
distinct from the parse state, and is queried separately.
2019-01-03 20:48:54 -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
618f8d6818
Add with-syms and combine bignat_add and bignatr mul
...
into a single operation for strtod.c
2019-01-02 10:23:11 -05:00
Calvin Rose
9e6254bf56
Rename pre-walk and post-walk to prewalk and postwalk.
2018-12-30 15:34:01 -05:00
Calvin Rose
7880d73201
Add some documentation for looping and the loop macro.
...
Also add :pairs verb to the loop macro and some more tests.
2018-12-29 17:23:31 -05:00
Calvin Rose
2bcedd5920
Remove indexing with numeric constants from janet.
2018-12-28 23:44:39 -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
6c8da9fe5c
Install cook tool when installing janet.
2018-12-25 15:39:24 -05:00
Calvin Rose
17283241ab
Fix bug in compiler with if form under certain conditions.
...
Begin bundled 'cook' tool for managing janet projects.
2018-12-25 15:32:42 -05:00
Calvin Rose
70b4c8ae84
Add some forms ported from clojure/walk
...
Add as-> and as?-> macros.
2018-12-23 19:00:16 -05:00
Calvin Rose
55c091e898
Update core.janet
2018-12-23 14:13:27 -05:00
Calvin Rose
77ea11c603
Update documentation to include source
...
location of bindings.
2018-12-17 12:06:50 -05:00
Calvin Rose
131ee29190
Add docs target to generate documentation.
2018-12-17 01:41:11 -05:00
Calvin Rose
99e14a9b70
Rename bitwise operators.
2018-12-16 22:13:48 -05:00
Calvin Rose
03dbd79165
Rename the := special form to set so it does not look like a keyword.
2018-12-16 21:57:32 -05:00
Calvin Rose
8333c22e8a
Update gendoc and fix issue with run-context.
2018-12-16 13:17:30 -05:00
Calvin Rose
e286e82144
Add docstring for make-env
2018-12-15 23:22:51 -05:00
Calvin Rose
8a5ede21f7
Fix some documentation and add beginning of a document
...
generating script.
2018-12-15 23:19:28 -05:00