Commit Graph

709 Commits

Author SHA1 Message Date
hellerve
cd0c09da3f core: add String.from-cstr 2020-01-13 22:49:23 +01:00
Erik Svedäng
d0f2c447be
Merge pull request #632 from hellerve/fix-array-reduce-example
Fix example in Array.reduce documentation
2020-01-07 10:39:18 +01:00
hellerve
a67c33d2f5 core: fix example in Array.reduce (thanks @Emiluren) 2020-01-06 23:29:49 +01:00
Erik Svedäng
11be440fab Work around defdynamic-once not working inside modules for now. 2019-12-18 12:35:27 +01:00
Erik Svedäng
50d91859c4 Merge branch 'master' of https://github.com/carp-lang/Carp 2019-12-18 12:11:50 +01:00
Erik Svedäng
7c15ec299b 'defined?' and 'defdynamic-once' 2019-12-18 12:10:47 +01:00
Erik Svedäng
2926abd1c8 Got rid of all but one compiler complaints on Windows. 2019-12-18 11:33:42 +01:00
Erik Svedäng
99bf013b81
Merge pull request #626 from nateupstairs/master
[win] attempt to fix windows compilation
2019-11-29 14:15:32 +01:00
Erik Svedäng
a6fb8c2515
Merge pull request #625 from hellerve/map->
RFC: Add Array.unreduce
2019-11-27 10:58:27 +01:00
hellerve
231b0a1d97 macros: fix nthcdr like @scolsen suggested 2019-11-26 07:13:14 +01:00
Erik Svedäng
e850da236f
Merge pull request #622 from hellerve/cxr
macros: add cxr, nthcar, and nthcdr
2019-11-25 12:58:24 +01:00
Erik Svedäng
81776b9635 Merge branch 'master' into hellerve-until 2019-11-25 12:44:14 +01:00
Erik Svedäng
34c314e6fe
Merge pull request #618 from sdilts/fopen-safe
Add open-file function
2019-11-25 12:42:42 +01:00
Erik Svedäng
cf276f4488
Merge pull request #608 from hellerve/pointer-arith
Add pointer arithmetic
2019-11-25 12:36:10 +01:00
hellerve
6bf45e16a6 macros: add until 2019-11-22 13:10:36 +01:00
hellerve
b1b84c8e3a core: rename map-> to unreduce 2019-11-21 11:05:21 +01:00
nateupstairs
539804d9b0 [win] attempt to fix windows compilation 2019-11-20 13:26:59 -08:00
hellerve
48b8b4ec13 core: add Array.map-> 2019-11-13 10:47:22 +01:00
hellerve
bc87e82d9f macros: add cxr, nthcar, and nthcdr 2019-11-09 12:52:11 +01:00
sdilts
5614103107 open-file: Return the value of errno instead of an error string 2019-11-01 17:28:52 -06:00
sdilts
77614b21d9 Add errno to System.carp
+ Error values included are those that can be set from calling `fopen`
+ Change order of imports so that the System module is available before the IO module
2019-11-01 17:26:56 -06:00
sdilts
0386971f00 Add open-file function
`fopen` returns a nullable pointer, which doesn't fit very well with
Carp's notions of saftey and error handling. Instead, return a
`Result` type that forces the user to check if the operation was
successful.
+ Can't call the function fopen because we can't overload a C
  function.
+ Leave `fopen` public in the IO module so extant code doesn't need to
  be changed.
2019-11-01 14:54:18 -06:00
Erik Svedäng
16e9418d25
Merge pull request #616 from GrayJack/unsafe_fn
Rename known unsafe function to make clear that they're unsafe
2019-11-01 10:08:42 +01:00
GrayJack
52ce78ab13 Fix wrong parameter usage 2019-11-01 03:19:02 -03:00
GrayJack
d852662002 Added safe version of nth 2019-10-31 19:14:44 -03:00
Erik Svedäng
e90a123274 Merge branch 'includes' of https://github.com/GrayJack/Carp into GrayJack-includes 2019-10-31 14:30:07 +01:00
GrayJack
07def7db23 Fix all nth usage 2019-10-31 06:23:23 -03:00
Erik Svedäng
84afdb2575
Merge pull request #609 from hellerve/clang-format
Add .clang-format
2019-10-31 09:48:15 +01:00
GrayJack
2ac9d7fc12 Add 2 missing includes on core/Core.carp 2019-10-31 05:42:14 -03:00
GrayJack
2c0fcbd6c9 Changes Maybe.ptr to Maybe.unsafe-ptr and all it's ocurrences 2019-10-31 05:38:47 -03:00
hellerve
1829df07a5 core: do not have short functions on single lines 2019-10-30 11:07:32 +01:00
Erik Svedäng
c90d11b7ca
Merge pull request #606 from hellerve/better-repeat
Reduce allocations in String.repeat
2019-10-30 10:09:51 +01:00
Erik Svedäng
32a63d6def
Merge pull request #605 from hellerve/heap-without-copy
Reduce copies in heap
2019-10-30 10:05:11 +01:00
hellerve
65946224f0 core: add .clang-format (references #499) 2019-10-30 08:47:36 +01:00
hellerve
2819d22729 core: add pointer arithmetic (references #423) 2019-10-30 08:09:18 +01:00
hellerve
c6dafda518 core: reduce allocations in String.repeat 2019-10-28 18:13:40 +01:00
hellerve
fc204fff1e core: reduce copies in heap 2019-10-28 17:23:46 +01:00
hellerve
eb9c236249 core: simplify Char.meaning 2019-10-28 17:19:31 +01:00
hellerve
e33c5fd7b4 core: actually register error 2019-10-28 14:28:37 +01:00
Erik Svedäng
24b76f57af
Merge pull request #586 from zxygentoo/master
Fix Generics.approx doc name.
2019-10-15 09:15:58 +02:00
Jorge Acereda
c4957020dd Add CARP_REALLOC() so it can be checked with CHECK_ALLOCATIONS 2019-10-13 10:40:54 +02:00
zxygentoo
4e0fd0a1ac Fix Generics.approx doc name. 2019-10-09 14:36:59 +08:00
Jorge Acereda
4a4107fffd Preserve includes order in generated output. 2019-10-03 00:23:27 +02:00
Erik Svedäng
1a0b003745 Remove defn for /= 2019-09-27 15:48:10 +02:00
Erik Svedäng
e8e641de99 Merge branch 'misc-fixes' of https://github.com/jacereda/Carp into jacereda-misc-fixes 2019-09-27 15:37:36 +02:00
Jorge Acereda
7b7cb5d1e5 Substitute /= interface by a generic. 2019-09-20 23:49:20 +02:00
Jorge Acereda
336b43a2af Add DoubleRef./= 2019-09-18 18:51:36 +02:00
Jorge Acereda
0423f40b51 Avoid copies. 2019-09-17 19:34:54 +02:00
Jorge Acereda
99ffd8efb7 Fix private? and hidden?. 2019-09-17 19:34:34 +02:00
Erik Svedäng
9e4f69ce5b Merge branch 'string-join-ref' of https://github.com/hellerve/Carp into hellerve-string-join-ref 2019-09-17 14:37:12 +02:00