Calvin Rose
55d8e8b56b
Fix issue with compilation with source name.
...
Also add tuple/sourcemap and tuple/setmap.
2019-05-20 04:02:38 -04:00
Calvin Rose
00a47dc0cb
Begin work on new memory layout for all objects and GC.
...
The layout should actually be very similar to the old layout, but
the code will be much easier to change and should be more portable.
2019-02-21 11:22:29 -05:00
Calvin Rose
811b1825cb
Remove tuple/append and tuple/prepend.
...
Use the splice special instead.
2019-02-20 21:08:54 -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
17783c3c3e
Add tuple/brackets
...
Fix macro expansion via macex for bracketed tuples.
2019-02-11 18:37:59 -05:00
Calvin Rose
c6edf03ae8
Fix some code style, add tuple/type function.
...
We need to be able to detect tuple type from janet code, otherwise
tuples will contain hidden state. The tuple/type function is able
to detect the flags in the tuple so the programmer can access them
if needed.
2019-02-09 12:21:11 -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
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
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
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
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
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
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
b2a1a4ec9b
Add classes to core library.
2018-11-25 15:58:50 -05:00
Calvin Rose
fcbd24cedc
Add lots of documentation for all functions.
2018-11-16 16:24:10 -05:00
Calvin Rose
4d119e4e03
Begin adding more complete documentation.
2018-11-15 15:45:41 -05:00
Calvin Rose
08dd06918e
Switch to mempcy in some slice functions.
2018-09-07 16:27: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
547529ebb2
Refactor dst_view_* functions.
2018-07-04 13:21:30 -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
28cf753fa2
Source mapping v4 (line and column instead of byte offsets).
2018-06-29 11:13:06 -04:00
Calvin Rose
f93c84c21f
Source mapping v3 (performance improvements, better decoupling from parser).
2018-06-29 10:41:26 -04:00
Calvin Rose
2e472ec9a3
Version 2 of new source mapping.
2018-06-29 01:16:46 -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
f47323c915
Change convention for naming modules and functions.
2018-05-08 19:40:28 -04:00
bakpakin
080caf31a7
Add triangles examples.
2018-03-25 18:51:31 -04:00
bakpakin
b305a7c9bb
Add macros in compiler.
2018-01-28 15:29:47 -05:00
bakpakin
8fe9881187
More work on adding c functions. Added buffer literals again.
2018-01-27 15:15:09 -05:00
bakpakin
30f62ca454
Major refactor and restructure. Add CMake for anticipated windows
...
support.
2018-01-19 16:43:19 -05:00