Commit Graph

448 Commits

Author SHA1 Message Date
Erik Svedäng
9370275097 Filepath module. 2018-04-23 16:14:40 +02:00
Erik Svedäng
ba16a6ed8e SDL.Hint module. 2018-04-23 12:47:32 +02:00
Erik Svedäng
2d9ca99c58 Array.concat function. 2018-04-23 12:20:00 +02:00
Erik Svedäng
5648a87779 0 is not positive. 2018-04-21 15:45:05 +02:00
Erik Svedäng
744bfd067a Add SDL.render-draw-point function. 2018-04-21 15:44:10 +02:00
Erik Svedäng
4a88903158 Added pos? and neg? functions, some changes to SDL library. 2018-04-20 13:18:58 +02:00
Fyodor Shchukin
bbe27953ce sdl_image.carp -> SDL_image.carp 2018-04-08 21:31:03 +03:00
hellerve
b9ae704dcc all: change system argument api 2018-04-04 09:00:20 +02:00
hellerve
4d70811479 all: add System.args 2018-04-03 17:51:37 +02:00
Chris Hall
e1e80e2b81 Adding time.h header to carp_bench.h to resolve bug #208
Under POSIX clock_gettime and timespec are defined in time.h
I don't think we need sys/time.h
2018-04-02 10:27:36 +10:00
Erik Svedäng
518a0a2165 Function for leaking memory on purpose. 2018-03-29 07:03:00 +02:00
Fyodor Shchukin
0b50f65671 Fixed SDL file name, examples are running fine 2018-03-27 21:48:58 +03:00
Erik Svedäng
570ae954e2 Hidden bindings don't print with info command. 2018-03-27 14:21:12 +02:00
Erik Svedäng
c1e427688d Weird typos fixed. 2018-03-27 14:14:30 +02:00
Erik Svedäng
dd726410ed private? hidden? 2018-03-27 14:08:49 +02:00
Erik Svedäng
891b34f0d1 Sidebar. 2018-03-27 10:51:16 +02:00
Erik Svedäng
ef1549250f More work on docs. 2018-03-27 09:43:39 +02:00
Erik Svedäng
32eaae7a5c Pretty nice looking docs. 2018-03-27 09:05:58 +02:00
Erik Svedäng
95b74e4179 Can set and preserve meta before def/defn/defmacro/defdynamic. 2018-03-26 16:51:43 +02:00
Erik Svedäng
92454c4f94 More keycodes. 2018-03-26 14:09:43 +02:00
Erik Svedäng
83cf727133 Moved keycodes into submodule. 2018-03-26 13:52:34 +02:00
Erik Svedäng
0cd8b4d3ac draw-texture-centered 2018-03-26 11:54:20 +02:00
Erik Svedäng
73d7f2fda4 BUGFIX: Can refer to external function with overriden name in the same
module using qualifier.
2018-03-26 11:00:06 +02:00
Erik Svedäng
2bb4179b2d Merge branch 'carp-read-eof' of https://github.com/goodmind/Carp into goodmind-carp-read-eof 2018-03-24 19:24:30 +01:00
Erik Svedäng
222f547c13 Merge branch 'master' of https://github.com/Nananas/Carp into Nananas-master 2018-03-24 19:20:19 +01:00
Erik Svedäng
3d3b34f70f Bugfixes and cleanup of minimal example. 2018-03-24 16:28:35 +01:00
Erik Svedäng
07878fc4a9 Nicer event handling with the help of 'foreach' macro and 'SDL.Event.all' function. 2018-03-24 11:17:56 +01:00
Erik Svedäng
6279d46bc0 'load-and-use' macro 2018-03-24 10:28:19 +01:00
Thomas Dendale
74c61e468d Fix: Pattern.substitute sprint src & dest overlap = undefined behavior 2018-03-23 18:24:52 +01:00
andretshurotshka
6246ceb7b3 Replace with Carp version of function 2018-03-23 20:24:32 +05:00
Erik Svedäng
3889dff434 Still trying to figure out music playback... 2018-03-23 16:01:30 +01:00
Erik Svedäng
2253b890fa Can play sound effect but music is not working yet. 2018-03-23 15:13:17 +01:00
andretshurotshka
863e55c3e0 Replace snprintf with strncat 2018-03-23 18:18:55 +05:00
andretshurotshka
a8481b2184 Add read-file-eof function for dynamic files 2018-03-23 17:28:04 +05:00
Erik Svedäng
e2aa4792a4 Starting wrapping SDL_mixer. 2018-03-23 09:55:32 +01:00
Erik Svedäng
6b7804a5c1 Added wrapped version of render text blended. 2018-03-23 07:55:55 +01:00
Erik Svedäng
a87753e3f4 Address sanitizer does not complain. 2018-03-22 21:21:46 +01:00
Erik Svedäng
e037a481cd Some helper functions to make code much cleaner. 2018-03-22 14:17:26 +01:00
Erik Svedäng
482170ccd7 Nicer rendering of font. 2018-03-22 13:36:16 +01:00
Erik Svedäng
99132e3926 Basic support for font rendering (more to come). 2018-03-22 13:25:30 +01:00
Erik Svedäng
2f345525ef int-to-enum not working... 2018-03-20 21:06:25 +01:00
Erik Svedäng
fb830c81d7 Refactoring of SDL complete? 2018-03-20 16:48:56 +01:00
Erik Svedäng
415600eb87 Better support for choosing if you want to use callbacks or not. 2018-03-20 16:38:50 +01:00
Erik Svedäng
179da13d1c Slight cleanup in SDLHelper.h 2018-03-20 16:18:44 +01:00
Erik Svedäng
e18cba50c6 Submodule for mouse state in SDL. 2018-03-20 16:15:26 +01:00
Erik Svedäng
f2742fe032 Moved event-related things into a submodule. 2018-03-20 16:05:52 +01:00
Erik Svedäng
10c1b62767 All tests run again, can build "game", "ant" and "reptile". 2018-03-20 14:34:49 +01:00
Erik Svedäng
eb7595b159 Game example works with kebab case. 2018-03-20 12:49:46 +01:00
Erik Svedäng
3965eaa73d Game example works with new SDLApp helper. 2018-03-20 12:26:27 +01:00
Erik Svedäng
7d9fd49e58 The SDLApp helper works fine now. 2018-03-20 12:17:48 +01:00
Erik Svedäng
39e16e9239 Started working on helper struct for SDL. 2018-03-20 11:53:24 +01:00
Erik Svedäng
10bc0e1e6c Fix 2018-03-19 13:01:14 +01:00
Erik Svedäng
d227533942 Merge branch 'master' into sdl-refactor 2018-03-19 12:54:14 +01:00
Erik Svedäng
9dae63491d fopen takes String& instead 2018-03-18 17:51:23 +01:00
Erik Svedäng
21c4d2d2fb Fix new function in carp_char.h 2018-03-18 15:23:34 +01:00
Erik Svedäng
7cb9288e5d Merge branch 'rename-c-types' of https://github.com/hellerve/Carp into hellerve-rename-c-types 2018-03-18 15:21:18 +01:00
hellerve
a55eeb98a5 core: rename string and pattern types 2018-03-18 14:53:03 +01:00
Erik Svedäng
00105618a4 A few extra functions for handling files and char pointers. 2018-03-18 14:40:49 +01:00
Erik Svedäng
0f6574193f Proper SDL module added, examples updated to work with it. 2018-03-15 21:14:18 +01:00
Erik Svedäng
4a74957b23 Merge branch 'hellerve-string-functions' 2018-03-13 17:31:07 +01:00
hellerve
ef5d50cad8 core: add Pattern.from-chars, simplify String.split-by 2018-03-13 17:06:14 +01:00
Erik Svedäng
87cf50fad9 Merge branch 'string-functions' of https://github.com/hellerve/Carp into hellerve-string-functions 2018-03-13 14:29:41 +01:00
Erik Svedäng
9d36c9e220 Fixed: 'assert' macro. Also -- reporting of errors in expanded macros now works. 2018-03-13 13:10:15 +01:00
hellerve
da91127563 core: add useful string functions 2018-03-13 12:13:29 +01:00
Erik Svedäng
b55bdd8e38 Preparations for making assert macro work. 2018-03-13 10:16:48 +01:00
Erik Svedäng
a9fd73ab2a Load 'Debug.carp' by default. 2018-03-13 09:43:08 +01:00
Erik Svedäng
832212d3fe The 'relative-include' macro works. 2018-03-13 09:36:18 +01:00
Erik Svedäng
ac6afff264 Started working on 'relative-include' macro - not working yet though. 2018-03-12 16:30:36 +01:00
Erik Svedäng
605a724765 Fixed memory leak in 'from-chars'. 2018-03-12 14:56:05 +01:00
Erik Svedäng
b5ab5cebca Fixed leaks in Array.reverse and Array.swap. 2018-03-12 14:37:53 +01:00
Erik Svedäng
0301837072 More useable signature for 'Array.element-count'. 2018-03-12 12:11:33 +01:00
Erik Svedäng
b23d60616b More permissive signature for 'Array.index-of'. 2018-03-12 12:04:23 +01:00
Erik Svedäng
2a79007a18 Todo. 2018-03-11 15:15:30 +01:00
Erik Svedäng
16cd751790 A String.join function. 2018-03-11 15:09:30 +01:00
Erik Svedäng
fcc01ff268 Some new functions and macros. 2018-03-11 14:53:50 +01:00
Erik Svedäng
a83d343a98 Optimized 'Array.subarray', 3.90575s -> 25.046ms for taking the first half of an array of 10k ints. 2018-03-11 14:30:38 +01:00
Erik Svedäng
f3b55e7937 Optimized Array.aupdate from 5.93691s to 2.75493s for array of 1000000 ints. 2018-03-11 13:56:07 +01:00
Erik Svedäng
ff6852d839 Changed signature of Array.swap. Optimized from 2.66486s -> 1.32265s for 1000000 Int elements. 2018-03-11 10:38:24 +01:00
Erik Svedäng
9941d7dcb2 Merge branch 'master' of https://github.com/hellerve/Carp 2018-03-10 18:08:38 +01:00
Erik Svedäng
8059bb3c45 Fixed bug in Bench.carp where a value was used outside of its stack scope. 2018-03-07 15:20:44 +01:00
Erik Svedäng
e4978d5a96 Optimization works. 2018-03-07 12:03:59 +01:00
Erik Svedäng
4c8b661bdc Moved safe int functions into their own file that's not automatically loaded. 2018-03-06 16:44:07 +01:00
Erik Svedäng
a6f0db8675 All OpenGL-functions registered. 2018-03-06 14:18:25 +01:00
Erik Svedäng
5aba1d22df Merge branch 'regex' of https://github.com/hellerve/Carp 2018-03-05 01:42:14 +01:00
hellerve
ae8b7644aa all: patterns need to be their own typedef 2018-03-04 19:39:00 +01:00
Erik Svedäng
2aa4a1a5c0 'eval' macro for easy printing of (compiled) values in the REPL. 2018-03-04 11:41:47 +01:00
hellerve
fa41129ff3 core: pattern functions are now prefixed 2018-03-03 19:58:53 +01:00
hellerve
dac3bad33a core: regex helper functions are done 2018-03-03 19:19:59 +01:00
hellerve
5c736fd224 core: rename regex to pattern, as @RyanSquared suggested in #192 2018-03-02 15:31:26 +01:00
hellerve
5da0e91de8 all: add lua license 2018-03-02 14:14:19 +01:00
hellerve
345f5d3c8a all: add autoescaping in regexes 2018-03-01 19:41:20 +01:00
hellerve
bdbb2d7c5b regex: add regex module and type 2018-03-01 19:19:20 +01:00
hellerve
0494dda3ff core: bugfixes to regex; return -1 on simple find error, return correct index on find, and correct string on match-str 2018-03-01 18:04:33 +01:00
Erik Svedäng
41a8c1566e Use pkg-config for finding location of glfw instead. 2018-02-28 22:43:43 +01:00
hellerve
3deb6f0658 core: add match-str and matches? to regex 2018-02-28 11:19:13 +01:00
hellerve
93171ccbaa core: regex api seems to work completely 2018-02-28 11:18:57 +01:00
hellerve
749a9eae10 core: iro (initial regex offering) 2018-02-28 11:18:39 +01:00
Erik Svedäng
59da82b5c1 A little bit of OpenGL. 2018-02-27 17:13:46 +01:00
Erik Svedäng
633be61c50 GLFW bindings (automatically generated). 2018-02-27 16:48:31 +01:00
hellerve
8e2cff8dcf core: manual merge 2018-02-27 15:30:22 +01:00
hellerve
890a2eab1e core: rename System.srand to System.seed-random 2018-02-27 15:12:25 +01:00
hellerve
01f366f2c8 core: remove interdependencies between modules 2018-02-27 15:10:42 +01:00
hellerve
1ec7ee184d core: split up core 2018-02-27 15:09:13 +01:00
hellerve
b7ea8d1487 core: namespaced split-up carp headers 2018-02-27 15:08:39 +01:00
hellerve
f56b1ff93f core: split up core.h, installment 1 2018-02-27 15:08:36 +01:00
hellerve
619089aead core: change globals to vars in test 2018-02-23 17:25:15 +01:00
Erik Svedäng
9c7793d6d1 Undefine things until cl.exe can compile a Hello World program. 2018-02-12 14:34:17 +01:00
Erik Svedäng
36274a29d3 Made System.exit return 'a' instead of (). 2018-02-08 22:13:27 +01:00
Erik Svedäng
0610c8e209 BUGFIX: Memory allocated in the condition of a while-loop is managed
first run through the loop.
2018-02-08 18:34:53 +01:00
Erik Svedäng
97fef54482 Some comments in the Debug module. 2018-02-08 17:55:44 +01:00
Erik Svedäng
74d4025223 Put the c[ad]r dynamic functions into the Dynamic module. 2018-02-08 17:39:42 +01:00
Erik Svedäng
fefce23b90 New Project.config command, the old project-set! is deprecated. 2018-02-08 17:12:32 +01:00
Erik Svedäng
aea08f5dfd Switch amount of bytes allocated. 2018-02-06 19:43:12 +01:00
Erik Svedäng
f9926f732e All tests run with 'prn' enabled. 2018-02-06 18:58:41 +01:00
Erik Svedäng
e80af19a39 Added prn for Strings, make 'str' not print with @ and quotes. 2018-02-06 18:37:15 +01:00
Erik Svedäng
5c6bdb87d8 Define 'prn' function for built in types. 2018-02-06 16:48:14 +01:00
Erik Svedäng
a25606725e Proper 'assert' macro that reports source location. 2018-02-06 10:12:43 +01:00
Erik Svedäng
d23a211985 BUG FIX: Must handle deletion of temporary values used during initialization of global variables. 2018-02-06 08:21:50 +01:00
Erik Svedäng
26887f3716 Changed type signature of (set! ...) form. 2018-02-02 07:19:10 +01:00
hellerve
27a4a3edff core: fix bench and ignore form, because they were buggy 2018-02-01 18:01:45 +01:00
hellerve
7b10c28aee core: fix bench for new member accesses 2018-02-01 17:18:05 +01:00
hellerve
3fe9a8f321 core: better loop start for Array.ax/min 2018-01-29 10:55:45 +01:00
Erik Svedäng
8281dfa109 Made inc, dec, max, min into interfaces. Changed Array.max/min to new
names. Fixed tests and removed special max/min from Statistics module.
2018-01-29 07:14:56 +01:00
Erik Svedäng
0f99128f9c Moved simplified dictionary code to generic struct examples. 2018-01-28 22:54:59 +01:00
Erik Svedäng
33aeab7c82 FIXED: Fails to find the correct Array.str when calling println* in a do-form. 2018-01-28 05:56:03 +01:00
Erik Svedäng
122ef5a4ce
Merge pull request #176 from hellerve/benchmarks
Add Benchmarks
2018-01-26 22:20:59 +01:00
Erik Svedäng
936dd8b26c Changed type of member getter method to always returning a Ref (used to be non-ref for primitive types). 2018-01-26 21:23:29 +01:00
hellerve
9a3b0e5f59 bench: added first bits of benchmarking 2018-01-25 17:26:20 +01:00
hellerve
b250be5a12 core: readded emap template :( 2018-01-24 17:14:43 +01:00
hellerve
9c933c64c5 core: rewrite both map functions in carp 2018-01-24 17:06:17 +01:00
hellerve
0f86e15f0e templates: add Array.allocate; core: rewrite repeat and replicate in Carp 2018-01-24 17:06:15 +01:00
Erik Svedäng
5e777a601f Merge branch 'master' of https://github.com/hellerve/Carp 2018-01-24 16:42:12 +01:00
hellerve
2fa8be21ab core: added set-min-runs! to Bench to be able to adjust the minimum number of runs 2018-01-24 13:28:57 +01:00
hellerve
a6e44d3c56 compiler: remove unused variable warning; core: add Statistics usage to Bench, fix ambiguity in Statistics 2018-01-24 13:08:46 +01:00
Thomas Dendale
8d49d76279 Added clamp to Int too. Fixed random-between floating point exception when lower = upper.
Added Array.initialize, symbol? commands
2018-01-23 16:23:37 +01:00
hellerve
8cb5f5311b core & templates: fixed size of stringification buffers 2018-01-22 12:47:38 +01:00
Thomas Dendale
24d6e625e6 Fix for macro when body is empty 2018-01-17 17:08:02 +01:00
Thomas Dendale
5480f5277a Print macro error (warning) when using more then one expression in body 2018-01-17 16:12:25 +01:00
Erik Svedäng
5042415109 Could avoid copying the array in String.repeat now. 2018-01-16 16:28:05 +01:00
hellerve
4d6b211853 core: sort->sort-with; fix statistics with new sorter 2018-01-15 16:47:22 +01:00
hellerve
eba07aeb34 core: added numerical ref modules 2018-01-15 16:27:05 +01:00
hellerve
f93eb16615 core: add cmp interface; src: better sort 2018-01-15 16:10:11 +01:00
hellerve
1c07003167 core: fix bugs and unnecessary check in fmt 2018-01-15 12:04:12 +01:00
hellerve
69a084e257 core: fixed bounds in range; tests: added regression tests 2018-01-10 14:24:32 +01:00
hellerve
1570f375bb core: fix range for non-reachable end 2018-01-10 14:20:17 +01:00
hellerve
f76d664c43 compiler: make range a regular function instead of a template 2018-01-10 14:20:17 +01:00
hellerve
41ac52af99 core: fixed behavior of from-chars and ends-with? 2018-01-03 12:50:47 +01:00
Erik Svedäng
ec1e41b7c7
Merge pull request #157 from hellerve/stdlib-update
Add a few more functions to stdlib
2018-01-02 22:29:00 +01:00
hellerve
d32fe4102f core: added a few more functions to stdlib 2018-01-02 18:13:52 +01:00
Erik Svedäng
9d0dc34ecc
Merge pull request #156 from hellerve/master
Rewrite index-of and elem-count in carp
2018-01-02 14:53:39 +01:00