Commit Graph

3861 Commits

Author SHA1 Message Date
Erik Svedäng
e47b9cf580 Friendly tip. 2020-04-06 09:38:13 +02:00
Erik Svedäng
0c0130bcb2 Docs on where to find profile.carp on Windows. 2020-04-06 09:36:11 +02:00
Erik Svedäng
b6d4d41f46 Some fixes for SDL on Windows. 2020-04-06 09:28:50 +02:00
Erik Svedäng
f9ab7df2da Byte literal explanation. 2020-04-06 08:37:43 +02:00
Erik Svedäng
e2cb14d60e Merge branch 'master' of https://github.com/carp-lang/Carp 2020-04-06 08:36:58 +02:00
Erik Svedäng
3e3652ab71 Doc for Byte type. 2020-04-06 08:36:35 +02:00
Erik Svedäng
2fae013a79
Merge pull request #706 from TimDeve/github-actions
Adds Github Actions CI to repository
2020-04-06 08:27:54 +02:00
Erik Svedäng
a6000ea3b0 Docs 2020-04-06 08:25:01 +02:00
Erik Svedäng
7ff7d6ab85
Merge pull request #705 from hellerve/veit/fix-windows-test-args
Fix args test for windows (again)
2020-04-06 08:18:39 +02:00
Tim Deve
f081992830 Uses restore-keys in CI to refresh cache on each run 2020-04-04 17:09:03 +01:00
Tim Deve
321ee6f819 Fixes StdInt.carp load in tests
The load call was failing on case-sensitive file systems
2020-04-04 13:21:23 +01:00
Tim Dévé
8ef25ee40f Adds Github Actions config to build compiler and run carp tests 2020-04-04 13:21:19 +01:00
Tim Deve
f2f3ea57c3 Doesn't compile assert-exit and assert-signal on Windows
These two assertions expect a *nix environment
and cause a compilation failure on windows

Creates stub implementation on Windows
2020-04-03 22:07:38 +01:00
hellerve
9d6a18e4d6 test: fix args test for windows (again) 2020-04-03 23:01:20 +02:00
Tim Deve
11e0eb5f56 Fixes wrongly named doc for assert-signal 2020-04-03 21:24:45 +01:00
Erik Svedäng
36445ba0df
Merge pull request #703 from hellerve/veit/better-args-test
Fix args test
2020-04-03 09:55:47 +02:00
hellerve
30339e1026 tests: fix args test 2020-04-02 15:57:06 +02:00
Erik Svedäng
d58af3daa4 Updated outdated docs regarding foreach. 2020-03-25 14:18:13 +01:00
Erik Svedäng
ca57ee4adb Clarification regarding global variables in libraries. 2020-03-23 10:34:49 +01:00
Erik Svedäng
41b450873e Carp init globals function call. 2020-03-23 10:31:58 +01:00
Erik Svedäng
cc758738f8
Merge pull request #701 from scolsen/binary
Temporarily fix reloading errors related to the Binary module
2020-03-23 10:07:27 +01:00
scottolsen
a66a5126e6 Move Byte Order type outside of the Binary module
Issue #698 points out an bug related to reloading. The illustious
hellerve@ has discovered that the issue relates to types defined in
modules--for some reason, upon reloading, the type's delete, copy, etc.
functions are doubly defined, resulting in too high or a number of
functions for Carp to work out the dependencies.
2020-03-20 19:02:55 -04:00
Erik Svedäng
55bfbb0c5e
Merge pull request #699 from hellerve/veit/fix-life-example
Fix life example
2020-03-19 15:53:40 +01:00
hellerve
9326050273 examples: fix life 2020-03-17 21:31:46 +01:00
Erik Svedäng
85eacb0ebf Thinking about types. 2020-02-21 15:36:19 +01:00
Erik Svedäng
42ab993531 Some tests for sigs. 2020-02-21 14:02:53 +01:00
Erik Svedäng
e0e346512b Merge branch 'veit/reformat-core' of https://github.com/hellerve/Carp 2020-02-21 13:30:53 +01:00
Erik Svedäng
0b3997cd10 Docs. 2020-02-21 13:26:17 +01:00
Erik Svedäng
408ed39092 Fix for issue #681, a problem with generics in deftype. 2020-02-21 13:22:42 +01:00
hellerve
1cfd873b78 core: reformat carp_binary.h 2020-02-21 13:22:01 +01:00
Erik Svedäng
608634e471
Merge pull request #690 from hellerve/veit/stdint-print
Using formatting macros for stdint
2020-02-21 13:00:10 +01:00
hellerve
238365bcc2 core: fix #688 by using the correct formatting macros\n\n(and pray that windows does c99) 2020-02-21 12:28:34 +01:00
Erik Svedäng
fcfb00ba74 Remove call to error in getSigFromDefnOrDef. 2020-02-21 12:01:57 +01:00
Erik Svedäng
a0517dd2fe Type signature sig affects the type of a form properly. 2020-02-21 11:51:49 +01:00
Erik Svedäng
b88479ee64 Docs. 2020-02-21 10:21:14 +01:00
Erik Svedäng
587cedf37a
Merge pull request #683 from scolsen/binary
Add Binary module
2020-02-21 10:03:02 +01:00
Scott Olsen
32b61fbced Add zero for other StdInt types 2020-02-20 23:39:25 -05:00
Scott Olsen
99795abe8e Update binary tests to reflect refactor
I've also added tests for the `exact` variants of the sequence
conversion functions.
2020-02-20 14:30:25 -05:00
Scott Olsen
7c7a65c43e Refactor bytes->int-seq, add exact variants
Instead of returning an array of Maybe UintNs, we now return a pair
comprised of the array of interpreted int values and the number of bytes
that were'nt read/interpreted.

We also provide an `exact` variant of this function that returns a
Result instead of a Pair. If there are excess bytes in the sequence one
attempts to interpret, the `exact` functions return a `Result.Error`
containing the number of extra bytes. If the byte sequence is exact , a
`Success` containing the interpreted values is returned instead.
2020-02-20 14:12:38 -05:00
Scott Olsen
03d93f7b65 Add zero values for unsigned int types 2020-02-20 14:12:14 -05:00
Scott Olsen
edee6d9dc9 Add basic tests for the binary module
I've also added the Binary module to Core.carp.
2020-02-18 15:34:41 -05:00
Scott Olsen
3c95c4baeb Use unsafe as a prefix in unsafe functions
This brings our function naming scheme into parallelism with other core
modules (e.g. Array.carp).
2020-02-18 13:56:52 -05:00
Scott Olsen
6fc0562028 Group functions by int type 2020-02-18 13:50:07 -05:00
Scott Olsen
a0bb6c5242 Add functions for converting intN seq(uence)s to byte seqs 2020-02-18 13:45:18 -05:00
Scott Olsen
05ab70b196 Add UintN->Byte conversions
Note that we do not need an unsafe variant of these conversions since
they are simple projections to and from the Uint types.
2020-02-18 13:35:35 -05:00
Scott Olsen
b8afc39a3b Binary: Make names consistent. Update docs.
Specifically, we now reference the explicit unsigned int types we return
in the docs for each function, and I've dropped the term byte-seq in
favor of bytes in all cases.
2020-02-18 11:50:24 -05:00
Scott Olsen
511663409e Add safe variants of byte conversion functions
I've also adopted a new naming strategy for these functions--the seq in
byte-seq was redundant, so we now just name these bytes->intN-seq.
2020-02-18 11:41:29 -05:00
Scott Olsen
d3e198673b Use partitions in byte-seq->int16-seq-unsafe
This change brings the implementation of `byte-seq->int16-seq-unsafe`
into parity with the implementations of its 32 and 64 bit brethren.

I've also cleaned up some of my previous sloppiness:

- Correct function names in doc and sig annotations.
- Remove extra spaces before newlines.
2020-02-17 19:03:52 -05:00
Scott Olsen
38efca11fa Remove byte-seq->int8-seq-unsafe
This function is obsolete after the introduction of Int8.from-bytes
2020-02-17 18:47:51 -05:00
Scott Olsen
dec44984ca Use StdInt types in binary conversion functions 2020-02-17 16:04:09 -05:00