Erik Svedäng
ae076f5faa
Merge pull request #504 from hellerve/checked-malloc
...
Optionally check malloc
2019-06-17 09:26:53 +02:00
Erik Svedäng
db62efc825
Merge pull request #495 from jacereda/comp-flags
...
Use pkg-config for SDL flags.
2019-06-17 09:24:18 +02:00
hellerve
8b78fe453a
core: optionally check malloc
2019-06-17 09:17:20 +02:00
Erik Svedäng
d1381ad41d
Merge pull request #498 from jacereda/const
...
Add some const qualifiers, removed MALLOC() null checks, fixed Float_…
2019-06-17 09:03:53 +02:00
Jorge Acereda
7ed48b733b
Refactored flags handling (add-pkg).
2019-06-17 09:02:34 +02:00
Jorge Acereda
9ef01c67c6
Split flags for glfw.
2019-06-17 09:02:34 +02:00
Jorge Acereda
ba8a9a1853
Use pkg-config for SDL flags.
2019-06-17 09:00:24 +02:00
Erik Svedäng
d4182b53ef
Merge pull request #497 from jacereda/sdl-unused
...
Sdl unused
2019-06-17 08:44:22 +02:00
Erik Svedäng
6b2b33e823
Merge pull request #496 from jacereda/char-zero
...
Implement zero for Char.
2019-06-17 08:33:14 +02:00
Erik Svedäng
5e2faba7b9
Merge branch 'opengl-fw' of https://github.com/jacereda/Carp
2019-06-17 08:10:22 +02:00
Erik Svedäng
eaf2a427df
Implement str/prn for &Bool
2019-06-14 15:24:25 +02:00
Jorge Acereda
bbee702f5e
Add some const qualifiers, removed MALLOC() null checks, fixed Float_modf(), use memcpy() instead of memmove().
2019-06-14 14:38:19 +02:00
Erik Svedäng
882bcce8bc
carp_system.h should include carp_string.h
2019-06-14 13:24:40 +02:00
Jorge Acereda
ab07aecc25
Warning in generated code.
2019-06-14 13:13:22 +02:00
Jorge Acereda
aa897869d0
Remove unused SDL_INIT_EVERYTHING.
2019-06-14 13:13:04 +02:00
Jorge Acereda
c76177dfa7
Implement zero for Char.
2019-06-14 13:02:03 +02:00
Jorge Acereda
2343025ecf
Move OpenGL.framework reference to its own module.
2019-06-13 18:21:59 +02:00
Jorge Acereda
bbf8c23281
Use standard NDEBUG instead of OPTIMIZE.
2019-06-13 14:29:47 +02:00
hellerve
538c4370dd
core: add Maybe.or-zero
2019-06-12 08:49:54 +02:00
Erik Svedäng
fbd9c83f0d
Documented the Dynamic module.
2019-06-07 15:19:07 +02:00
hellerve
465f34b7ff
core: add annotations
2019-06-06 10:54:58 +02:00
Erik Svedäng
57748d21f8
Merge pull request #462 from hellerve/map-ho-non-owning
...
Make map’s higher order functions take refs
2019-06-06 09:53:02 +02:00
hellerve
c87893dd14
core: make map’s higher order functions non-owning
2019-05-27 18:42:25 +02:00
hellerve
e9fcf87ff5
core: remove stringcopy.append
2019-05-27 18:05:44 +02:00
Erik Svedäng
a34752413e
Merge pull request #457 from hellerve/fix-string-words
...
Also split by newline in String.words
2019-05-27 10:41:47 +02:00
Scott Olsen
8c4d38233b
Map: Fix small typo in doc empty?
2019-05-24 12:30:00 -04:00
hellerve
113aa1d96a
core: also split by newline in String.words
2019-05-24 15:39:52 +02:00
Erik Svedäng
006b3bf5f0
Merge pull request #454 from hellerve/const-assert
...
Add const-assert
2019-05-22 21:24:28 +02:00
Erik Svedäng
2c978a09f4
Merge pull request #455 from hellerve/in-place-map-put
...
Add Map.put! and Set.put!
2019-05-22 21:23:49 +02:00
hellerve
9010a5c2ee
core: add Map.put! and Set.put!
2019-05-22 20:13:38 +02:00
hellerve
3768c42d23
core: add const-assert
2019-05-22 20:01:03 +02:00
Erik Svedäng
4f61d83730
Merge pull request #442 from GrayJack/safe-array
...
Make Array module safer
2019-05-21 12:11:38 +02:00
Erik Svedäng
cb5d3cecf7
Merge pull request #451 from scolsen/scolsen/project-macro
...
Macros: Add defproject macro
2019-05-20 14:54:46 +02:00
Scott Olsen
6819ab7707
Macros: Add defproject macro
2019-05-20 00:08:09 -04:00
hellerve
c091b36b23
compiler: generate documentation for compiler-generated functions automatically
2019-05-16 15:51:56 -04:00
Erik Svedäng
d01743e5aa
Merge pull request #435 from hellerve/fix-pattern-docs
...
Fix pattern docs
2019-05-16 09:42:49 +02:00
GrayJack
353f8470ed
Fix tests on memory.carp, Modify Statistics module as Veit Heller
...
sugested
2019-05-14 20:11:19 -03:00
GrayJack
bfd80fd4af
Fix minimum name and it comparison function
2019-05-14 13:29:30 -03:00
GrayJack
25e80273ff
Fix memory test using the new version of the Array function
...
Tried to fix problems on Statistics.carp with the new Array functions
2019-05-14 13:26:19 -03:00
GrayJack
2228a8c5fa
Change Array.maximum and Array.minimum to fix behaviour and keep clonning to a minimum. (Thanks Veit Heller!!!)
...
Also added my name to the contributors
2019-05-14 11:57:50 -03:00
GrayJack
f69650434d
Better doc string for Array.index-of
2019-05-14 06:53:19 -03:00
GrayJack
d18fa71afb
Made Array.index-of safe
2019-05-14 06:48:26 -03:00
GrayJack
11338e6414
Remove "TODO unsafe" strings
2019-05-14 06:34:14 -03:00
GrayJack
152818cde5
A better doc string for minimum and maximum
2019-05-13 21:52:52 -03:00
GrayJack
783167bb27
Modify the functions Array.maximum and Array.minimum to be safe
...
- Also made zero function for Pair so we don't lose compatibility with
it
2019-05-13 21:41:45 -03:00
GrayJack
caf01bff35
Made Array.find safe wrapping in a Result
...
- Also some typo fixes in Array module doc strings
2019-05-13 14:47:03 -03:00
Erik Svedäng
9b6e3636a8
Merge pull request #439 from hellerve/safe-read
...
Safe IO.read->EOF
2019-05-10 11:26:40 +02:00
hellerve
992b0c5fc5
core: fix IO.read->EOF
2019-05-10 11:21:46 +02:00
Erik Svedäng
8bc50fa0c9
Merge pull request #436 from hellerve/reverse
...
Add Pair.reverse and Map.reverse
2019-05-05 12:19:54 +02:00
hellerve
8089585f0a
core: add docstring to Map.reverse
2019-05-05 11:55:37 +02:00
hellerve
58e280c553
core: add Pair.reverse and Map.reverse
2019-05-05 11:49:30 +02:00
hellerve
ffa8302e1e
core: better Pattern docs
2019-05-04 09:41:33 +02:00
Erik Svedäng
cc26dbdbcf
Merge pull request #432 from hellerve/fix-287
...
Add Maybe.ptr and Maybe.from-ptr
2019-05-03 15:30:24 +02:00
hellerve
79a0fb77c5
core: add Maybe.ptr and Maybe.from-ptr, references #287
2019-05-03 13:49:33 +02:00
Veit Heller
64ef326a21
core: typo fix in Maybe.to-result
2019-05-02 22:33:18 +02:00
Erik Svedäng
ab16e9de5e
Merge pull request #428 from hellerve/clarify-git-loading
...
Clarify git loading situation in docs
2019-05-01 11:25:31 +02:00
hellerve
122038fad3
docs: clarify git loading situation
2019-05-01 00:24:29 +02:00
hellerve
a1f5b1fc2f
core: add while-do macro
2019-04-30 21:42:34 +02:00
Erik Svedäng
702ca00f08
Merge pull request #417 from hellerve/optional-assert
...
Make all asserts optional
2019-04-21 10:53:59 +02:00
hellerve
0e7bd44dd9
core: make all asserts optional
2019-04-21 08:43:18 +02:00
Erik Svedäng
a13ebe9e78
Merge pull request #412 from hellerve/embedded-changes
...
Remove headers that are problematic for embedded applications
2019-04-17 22:51:26 +02:00
hellerve
1e21f2b5f6
core: remove unused else in ifdef
2019-04-17 13:52:08 +02:00
hellerve
fb9bbe1d9b
core: remove some headers that are problematic for embedded applications
2019-04-17 13:47:18 +02:00
Scott Olsen
65d612939a
Fix doc for get-args-len
...
I was running through the docs and it seemed like get-arg was incorrectly documented based on the signature. It looks like the doc for get-args-len was reassigned to get-arg.
2019-04-16 17:49:31 -04:00
Erik Svedäng
f1c1fa1563
Merge pull request #404 from opqdonut/fix-update-with-default-docs
...
fix Map.update-with-default docs
2019-03-28 15:30:07 +01:00
Joel Kaasinen
4cf918f71a
core/Array.carp: fix minimum and maximum for non-primitive types
2019-03-28 16:14:07 +02:00
Joel Kaasinen
0bcf6f6e72
fix Map.update-with-default docs
...
they were accidentally overwriting Map.update docs
2019-03-28 16:06:45 +02:00
Erik Svedäng
a4fb6d3177
Merge pull request #401 from hellerve/master
...
Make `Array.range` more general
2019-03-26 22:38:13 +01:00
hellerve
9c4731fccc
core: specialize Char.random again!
2019-03-26 18:19:10 +01:00
hellerve
d9c8ee4710
core: add tests for range on non-integer and update docs
2019-03-26 18:10:31 +01:00
hellerve
4bc9cb6046
core: make to-int and from-int interfaces
2019-03-26 18:08:17 +01:00
Erik Svedäng
88e2896cb7
Tests run.
2019-03-26 14:30:00 +01:00
Erik Svedäng
32f14cd9e3
Work in progress...
2019-03-26 10:23:27 +01:00
Erik Svedäng
f8e96749e4
Merge pull request #399 from hellerve/string-contains
...
Add String.contains?
2019-03-25 08:23:37 +01:00
hellerve
e3438560ac
core: add String.contains?
2019-03-23 18:41:08 +01:00
Erik Svedäng
a7795edf30
Config for SDL_image too.
2019-03-22 19:21:26 +01:00
Erik Svedäng
6e113702ad
Todos.
2019-03-22 19:12:33 +01:00
Erik Svedäng
636b691912
First step towards a way of locating SDL libraries on Windows.
2019-03-22 19:02:45 +01:00
Erik Svedäng
f8656b9f95
Helpfulness.
2019-03-21 14:34:09 +01:00
Erik Svedäng
0049c13111
Renamed 'defdynamic' to 'defndynamic'.
2019-03-13 18:49:48 +01:00
Erik Svedäng
4feb44ae19
Merge pull request #391 from hellerve/extra-char-fns
...
Add Char.alpha?, Char.num?, and Char.alphanum?
2019-03-07 13:54:59 +01:00
Erik Svedäng
9941a85334
Merge pull request #387 from hellerve/fix-int-max
...
core: fix Int.MAX and Int.MIN references
2019-03-07 13:51:28 +01:00
Erik Svedäng
0671cfc6cf
Fixes to be able to compile SDL example
2019-03-06 23:44:43 +01:00
hellerve
f470e17f99
core: add Char.alpha?, Char.num?, and Char.alphanum?
2019-03-06 16:35:37 +01:00
Erik Svedäng
87de6fbb76
Even more fixes
2019-03-05 16:37:27 +01:00
Erik Svedäng
275c7d845a
More windows tweaks.
2019-03-05 15:03:18 +01:00
Randy Valis
a0d4525723
Merge branch 'master' of https://github.com/xran-deex/Carp
2019-03-03 17:30:37 -05:00
Randy Valis
b1c78ef216
Modifications to compile on Windows
2019-03-03 17:23:13 -05:00
hellerve
6e685fc0d6
core: fix Int.MAX and Int.MIN referenes
2019-02-28 15:00:21 +01:00
hellerve
04d5e3a5ae
Merge https://github.com/carp-lang/carp into sumtypes
...
* https://github.com/carp-lang/carp :
compiler: add two special symbols to patterns
Return () instead.
Annoying crash.
SDL_gfx support
2019-02-28 14:20:35 +01:00
Erik Svedäng
7139cade84
Return () instead.
2019-02-27 14:28:41 +01:00
Erik Svedäng
8acacf4f2a
Annoying crash.
2019-02-27 14:02:20 +01:00
Erik Svedäng
9cc25cdb42
SDL_gfx support
2019-02-27 14:00:06 +01:00
hellerve
9848e8fb34
multiple fixes:
...
- don’t do function copying in benchmarking
- fix the array_update benchmark
- add Filepath.file-from-path
- add tests for the `Filepath` module
- reformat a lot of documentation
2019-02-15 14:48:49 +01:00
hellerve
e24fd38258
sumtypes: multiple fixes
...
- add test suite for Result
- make Array a little safer overall
- document Maybe and Result comprehensively
- rework Array documentation
2019-02-15 10:24:47 +01:00
hellerve
ae62154afc
core: add result draft
2019-02-13 19:31:47 +01:00
hellerve
e54ead1922
all: various sumtype fixes
...
- add get-maybe to Map
- add tests
- fix emitter error on ref types
2019-02-13 11:46:20 +01:00
hellerve
c6a440d477
core: extend maybe and rework vector with it
2019-02-13 11:42:16 +01:00
Erik Svedäng
8c80c9d004
Merge branch 'master' into sumtypes
2019-02-02 20:08:45 +01:00
hellerve
f31474cecb
all: (see #317 )
...
- add copy-filter
- rename filter to endo-filter
2019-02-02 10:32:26 +01:00
Erik Svedäng
da8fb684c9
Some memory tests, etc.
2019-02-01 14:07:10 +01:00
Erik Svedäng
d7a1f769ae
Merge branch 'master' into sumtypes
2019-01-22 14:43:33 +01:00
Erik Svedäng
f2897147e4
Merge pull request #373 from hellerve/vector-refactor
...
core: refactor the vector module; generic types and use module system
2019-01-22 09:43:31 +01:00
hellerve
8b6ab7357e
core: refactor the vector module; generic types and use module system
2019-01-21 21:52:45 +01:00
hellerve
66c31d524c
core: simplify String.hash
2019-01-16 17:48:34 +01:00
Erik Svedäng
b55f5e4124
Merge pull request #369 from opqdonut/array-operations
...
core/Array.carp: find-index and predicate-count
2018-12-20 14:31:10 +01:00
Erik Svedäng
de1439c927
Merge pull request #368 from opqdonut/map-set-all
...
Set.all?, Map.all? and Map.=
2018-12-20 14:29:39 +01:00
Joel Kaasinen
b089c9ba2b
core/Array.carp: find-index and predicate-count
2018-12-18 16:30:09 +02:00
Joel Kaasinen
5bb17b82ee
core/Map.carp: Map.all? and Map.=
2018-12-18 16:17:08 +02:00
Joel Kaasinen
7aae7d55bd
core/Map.carp: Set.all?
2018-12-18 15:58:58 +02:00
Joel Kaasinen
7f7f7c26b1
core/Map.carp: get-with-default
...
nice for types with no (zero) defined
2018-12-18 14:57:02 +02:00
Erik Svedäng
2900746f14
Change signature of Array.index-of to take a ref instead.
2018-12-15 23:18:34 +01:00
Joel Kaasinen
a5e46dc71b
core/Map.carp: set operations
...
- equality
- subset
- intersection
- union
- difference
2018-12-13 08:33:42 +02:00
Joel Kaasinen
74d1ad179c
prn and str for Ref Int
...
for #354
2018-12-12 08:20:20 +02:00
Erik Svedäng
8498c9e40e
Merge pull request #353 from opqdonut/pair-operations
...
core: more operations for Pairs
2018-12-11 19:27:31 +01:00
Joel Kaasinen
8020434ace
core/Map.carp: hash for Pair
...
Algorithm from https://stackoverflow.com/questions/1646807/quick-and-simple-hash-code-combinations
2018-12-11 17:37:51 +02:00
Erik Svedäng
c6aeb42f4c
Merge pull request #339 from opqdonut/to-array
...
Map.to-array and Set.to-array functions, equality for non-ref Pairs
2018-12-09 21:37:08 +01:00
Joel Kaasinen
77a15e49d2
core/Tuples.carp: < and > for Pair and PairRef
2018-12-09 18:34:10 +02:00
Joel Kaasinen
454e1e68be
core: fix Long_copy
2018-12-09 18:07:19 +02:00
Joel Kaasinen
31824bcadb
Map.to-array and Set.to-array functions, equality for non-ref Pairs
2018-12-07 21:28:36 +02:00
Erik Svedäng
299b4d7a61
Merge pull request #345 from opqdonut/map-additions
...
core/Map.carp: some new functions
2018-12-07 19:18:27 +01:00
Erik Svedäng
7a5acadfd8
Merge pull request #346 from opqdonut/array-additions
...
core/Array.carp: Array.remove and Array.remove-idx functions
2018-12-07 19:13:07 +01:00
Joel Kaasinen
ce521f4f03
core/Array.carp: rename Array.remove-idx to Array.remove-nth
2018-12-07 18:32:56 +02:00
Joel Kaasinen
2fd86736d6
core/Map.carp: use Bucket.find in Map.update[-with-default]
...
to not look up the key in the bucket twice
2018-12-07 18:05:09 +02:00
Joel Kaasinen
23e2252d01
core/Map.carp: also make Bucket.shrink take a non-ref argument
...
for consistency
2018-12-07 17:48:07 +02:00
Joel Kaasinen
f0e62cccea
core/Map.carp: Bucket.{get-idx,set-idx,push-back} helpers
...
in addition, make mutating Bucket operations take a non-ref argument
for consistency
2018-12-07 17:45:19 +02:00
Joel Kaasinen
df1b29fb74
core/Map.carp: factor out Bucket.find
2018-12-07 17:08:55 +02:00
Joel Kaasinen
87193e215a
core/Array.carp: remove-idx function
2018-12-07 14:13:34 +02:00
Joel Kaasinen
4ad728d1cd
core/Array.carp: Array.remove function
2018-12-07 14:13:34 +02:00
Joel Kaasinen
10a9de39da
core/Map.carp: Map.update and Map.update-with-default functions
2018-12-07 13:41:17 +02:00
Joel Kaasinen
845fd6409e
core/Map.carp: Map.endo-map function
2018-12-07 13:27:48 +02:00
Joel Kaasinen
f28b0f9197
core/Map.carp: Set.reduce function
2018-12-07 13:17:58 +02:00
Joel Kaasinen
1b298c6e91
core/Map.carp: documentation updates
2018-12-07 13:11:05 +02:00
Joel Kaasinen
afd7dec6a8
core/Map.carp: Map.vals and Map.keys functions
2018-12-07 13:04:18 +02:00
Joel Kaasinen
6cf17937d7
core/Map.carp: add Map.kv-reduce function
2018-12-07 12:55:27 +02:00
Chris Hall
85598e4200
Bug #343 Fixing off-by-one in Heap parent function.
...
Adding more comprehensive tests for Heaps to prevent happening again..
2018-12-07 13:33:37 +11:00
Joel Kaasinen
81ff5f82c3
use break in Bucket.put, remove unused Bucket.grow
2018-12-04 08:31:02 +02:00
Joel Kaasinen
a473b54e06
fix Map.put and Set.put
2018-12-03 20:45:23 +02:00
Joel Kaasinen
cfb61847cb
fix Map and Set behaviour for negative hash values
...
fixes #335
- add new Int.positive-mod function
- use it for Map and Set operations
- add tests
2018-12-01 18:01:02 +02:00
Erik Svedäng
b42e506fc3
Filepath fix.
2018-11-26 21:19:41 +01:00
Erik Svedäng
9a5392eb73
Merge branch 'lambdas'
2018-11-26 21:11:20 +01:00
Erik Svedäng
fd0a6797cb
Merge pull request #334 from hellerve/better-bools
...
Remove stdbool dependency
2018-11-18 20:09:48 +01:00
Erik Svedäng
8f26d5ee3f
Merge pull request #333 from hellerve/more-sdl
...
core: more sdl functions
2018-11-18 20:08:09 +01:00
hellerve
40881a1405
core: remove stdbool dependency
2018-11-17 15:42:36 +01:00
hellerve
24a4a1fdfb
core: more sdl functions
2018-11-15 15:25:57 +01:00
Erik Svedäng
cd96ccbf39
Tests run again.
2018-11-14 21:21:56 +01:00
Erik Svedäng
1dc8b536fc
Deftype generates 'update' functions that expect refs to functions too.
2018-11-14 14:21:12 +01:00
Erik Svedäng
fe55144273
Follow convention of passing lambdas as refs as default.
2018-11-14 14:09:43 +01:00
hellerve
e3f761488b
core: add sort flavors with custom comparators
2018-11-13 11:11:21 +01:00
hellerve
c463c9f99f
all: add new array docs and tests for Array.empty?
2018-11-09 10:04:09 +01:00