--
http://bluishcoder.co.nz
--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.
--
http://bluishcoder.co.nz
--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.
--
http://bluishcoder.co.nz
--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.
--
http://bluishcoder.co.nz
--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.
On Tue, Apr 25, 2017 at 8:32 AM, Chris Double <chris....@double.co.nz> wrote:On Tue, Apr 25, 2017 at 11:22 PM, Chris Double
<chris....@double.co.nz> wrote:
>
> Is there a danger of that complexity overflowing on other systems that
> are 64 bit but don't have arbitary precision integers?
>
The Shen documentation
(http://www.shenlanguage.org/learn-shen/shendoc.htm) states:
"The maximum size of any integer or float and the precision of the
arithmetic is implementation dependent."
But the complexity result being returned is greater than a 32-bit Shen
can handle. This limits the ability to run on embedded devices. Can
that function be modified to result in a complexity that fits within
32-bits? Or if the tests define a conforming implementation should the
limit be mentioned in the documentation?
I think the function can be changed. The final value of `complexity_head` is not important, what is important is to know if it is greater than the value of `*maxcomplexity*`.So intead of `(< (complexity_head H) (value *maxcomplexity*))` the test can be something like `(product-greater-than H (value *maxcomplexity*))`, with `product-greater-than` being like `product`, but it returns a boolean and shortcircuits once it knows that the product of the values in the list `H` is greater than its last argument.
If you wait I can give a try later today, or you can try it yourself if you are in a hurry (you can use the same `load` trick I mentioned earlier to override `head_abstraction` at runtime, make sure to wrap it in `(package shen [] ...)`).--
http://bluishcoder.co.nz
--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.
--BD
On Tue, Apr 25, 2017 at 8:57 AM, Bruno Deferrari <uti...@gmail.com> wrote:On Tue, Apr 25, 2017 at 8:32 AM, Chris Double <chris....@double.co.nz> wrote:On Tue, Apr 25, 2017 at 11:22 PM, Chris Double
<chris....@double.co.nz> wrote:
>
> Is there a danger of that complexity overflowing on other systems that
> are 64 bit but don't have arbitary precision integers?
>
The Shen documentation
(http://www.shenlanguage.org/learn-shen/shendoc.htm) states:
"The maximum size of any integer or float and the precision of the
arithmetic is implementation dependent."
But the complexity result being returned is greater than a 32-bit Shen
can handle. This limits the ability to run on embedded devices. Can
that function be modified to result in a complexity that fits within
32-bits? Or if the tests define a conforming implementation should the
limit be mentioned in the documentation?
I think the function can be changed. The final value of `complexity_head` is not important, what is important is to know if it is greater than the value of `*maxcomplexity*`.So intead of `(< (complexity_head H) (value *maxcomplexity*))` the test can be something like `(product-greater-than H (value *maxcomplexity*))`, with `product-greater-than` being like `product`, but it returns a boolean and shortcircuits once it knows that the product of the values in the list `H` is greater than its last argument.Sorry, haven't had my morning coffee yet. It would be `product-less-than`.
If you wait I can give a try later today, or you can try it yourself if you are in a hurry (you can use the same `load` trick I mentioned earlier to override `head_abstraction` at runtime, make sure to wrap it in `(package shen [] ...)`).--
http://bluishcoder.co.nz
--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.
--BD--BD