ame thing, so either the one or the other should stand.
Though I'm not sure what "local variables or data contained in local
variables" actually means. I think it means you can't "set!" globals.
-- Al
around and meaningful conversion to Scheme
ints, but I don't think that exists.
It does that (more or less), as I explained. And it *wouldn't* work,
Yeah, I understand why now. I suppose the best way is to use foreign
values. Maybe I should switch the arithmetic code to C too. Thanks.
-- Al
rwise, how do I write Scheme code to truncate a signed number to
unsigned32? Resort to foreign values as I did above (or write foreign
functions)?
-- Al
#purity says: "Using
the (... --> ...) syntax, you can declare a procedure to not modify
local state, i.e. not causing any side-effects on local variables or
data contained in local variables".
-- Al
procedure means (can memoize the value or not,
need to re-check globals or closures afterwards or not etc).
-- Al
Now how do I declare a scheme
procedure as "clean" -- I don't see that in the manual? I'll check out
the source, though grep'ing for vector-ref is obviously not an option.
-- Al
On 2024-02-10 02:42, Al wrote:
... if I enable fixnum, csc chokes on both the third and fourth
display's with: "Error: cannot coerce inexact literal `2147483647' to
fixnum". It compiles and runs fine if those lines are commented out
(or if fixnum is disabled).
So the error
that
vector-ref, or some procedure that uses vector-ref on a global
identifier (but does not call set! / vector-set! on globals) does not,
uh, modify any globals.
-- Al
to compile unsafe code
everywhere, just where I'm using the correct types.
Thanks,
Al
Hi,
what does (declare (pure ..)) mean to csc? Is the function supposed to be
* only side-effect free, or ...
* also return the same value when called with the same arguments?
Thanks,
Al
g here. Tried with both 5.3.0 and 5.3.1-pre.
-- Al
Hi, suppose I need to reference data from "file.txt" in my Scheme
program. I could use read-char / read / open-input-file etc (or other
(chicken io) procedures) to read the the contents of the file into a
variable.
However, such deserialization happens at run-time. If I compile my
program
(which can then be processed by "chicken-install -from-list"). But
still it installs unconditionally. I could add an extra step to check if
"csi import egg...
What to do? Maybe I should convert my project to egg format?
-- Al
rsion" / debug flags
/ expensive interpreter features that differ compared to stable? I
customized only config.make by changing the C_COMPILER and PREFIX.
Thanks, Al
for these, I
wonder what type the indexes should be declared to minimize typechecks
at the interface between C and Chicken...? Perhaps even how to make them
inline-able to simple C array ops?
Best, Al
"C_int64_to_num" which
seems to return bignums when out of fixnum range; no flonums, no gaps,
values print out as integers, (exact? ...) prints #t even for
(u)int64-max. Is the documentation out of date?
Thanks, Al
e building with C_COMPILER_OPTIMIZATION_OPTIONS set to
-march=native. This flag (maybe any flags, I don't know yet) not only
make csi but also csc output twice as slow for my program, for all 4 CC
/ chicken-version combos (on my platform, CPU etc -- I'll write more in
the other thread).
-- Al
ign-primitive / foreign-lambda*
specializations of compute() with certain constant args. This doesn't
seem so nice though.
Thanks,
Al
18 matches
Mail list logo