Don Stewart [EMAIL PROTECTED] writes:
Are there binary constants in Haskell, as
we have, for instance, 0o232 for octal and
0xD29A for hexadecimal?
No, though it is an interesting idea.
Presumably it is less common since octal and hexadecimal are more
compact and almost as easy to interpret
On 10/24/07, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
Are there binary constants in Haskell, as
we have, for instance, 0o232 for octal and
0xD29A for hexadecimal?
No, though it is an interesting idea.
You can get pretty close with existing Haskell though:
(bin 100010011)
Hello all,
// PLS, no flame
I think the question was not whether there's a way, how to handle the
problem of encryption of a binary number to anything suitable and, more
or less, readable by a human and transforming it to a binary form, but
whether there's such a literal or not and whether
Dusan Kolar [EMAIL PROTECTED] writes:
// PLS, no flame
I apologize if my post came across as such, that was certainly not the
intent.
I think the question was [..] whether there's such a literal or not
and whether it is bad idea to have something like 0b10111011.
I agree.
From my point
Hi,
We have no binary literals in Haskell and there are situations when it
would have been useful to have this feature (e.g., if the spec of
something that you are working with is already provided using this
notation).
While it may be useful to have overloaded binary literals in the usual
On Thu, Oct 25, 2007 at 02:40:36PM +0200, Josef Svenningsson wrote:
On 10/24/07, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
Are there binary constants in Haskell, as
we have, for instance, 0o232 for octal and
0xD29A for hexadecimal?
No, though it is an interesting idea.
From my point of view, the difference between 0b10111011 and
(bin[1,0,1,1,1,0,1,1]) is 22-10 that is 12 characters.
how about using ghc's new overloaded strings for this?
10111011::Binary
there used to be a way to link to ghc head's docs, but
i can't find it right now. the test is
claus.reinke:
From my point of view, the difference between 0b10111011 and
(bin[1,0,1,1,1,0,1,1]) is 22-10 that is 12 characters.
how about using ghc's new overloaded strings for this?
10111011::Binary
there used to be a way to link to ghc head's docs, but
i can't find it right
dons:
claus.reinke:
From my point of view, the difference between 0b10111011 and
(bin[1,0,1,1,1,0,1,1]) is 22-10 that is 12 characters.
how about using ghc's new overloaded strings for this?
10111011::Binary
there used to be a way to link to ghc head's docs, but
i
On Thu, 25 Oct 2007, Don Stewart wrote:
claus.reinke:
how about using ghc's new overloaded strings for this?
10111011::Binary
there used to be a way to link to ghc head's docs, but
i can't find it right now. the test is
On Thu, 25 Oct 2007, Stefan O'Rear wrote:
On Thu, Oct 25, 2007 at 02:40:36PM +0200, Josef Svenningsson wrote:
On 10/24/07, Neil Mitchell [EMAIL PROTECTED] wrote:
You can get pretty close with existing Haskell though:
(bin 100010011)
where bin :: Integer - Integer, and is
On Thu, Oct 25, 2007 at 09:41:27PM +0200, Henning Thielemann wrote:
Total functions, full laziness, and compile time evaluation of finite
non-bottom CAFs...
If I write a program that approximates a big but fixed number of digits of
Pi - how can we prevent the compiler from computing Pi,
On Thu, 25 Oct 2007, Stefan O'Rear wrote:
On Thu, Oct 25, 2007 at 09:41:27PM +0200, Henning Thielemann wrote:
Total functions, full laziness, and compile time evaluation of finite
non-bottom CAFs...
If I write a program that approximates a big but fixed number of digits of
Pi - how
On Thu, Oct 25, 2007 at 04:06:56PM +0200, Dusan Kolar wrote:
Hello all,
// PLS, no flame
I think the question was not whether there's a way, how to handle the
problem of encryption of a binary number to anything suitable and, more
or less, readable by a human and transforming it to a
On Thu, Oct 25, 2007 at 09:52:27AM -0700, Don Stewart wrote:
dons:
claus.reinke:
From my point of view, the difference between 0b10111011 and
(bin[1,0,1,1,1,0,1,1]) is 22-10 that is 12 characters.
how about using ghc's new overloaded strings for this?
10111011::Binary
briqueabraque:
Hi,
Are there binary constants in Haskell, as
we have, for instance, 0o232 for octal and
0xD29A for hexadecimal?
No, though it is an interesting idea.
-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi
Are there binary constants in Haskell, as
we have, for instance, 0o232 for octal and
0xD29A for hexadecimal?
No, though it is an interesting idea.
You can get pretty close with existing Haskell though:
(bin 100010011)
where bin :: Integer - Integer, and is left as an exercise for
ndmitchell:
Hi
Are there binary constants in Haskell, as
we have, for instance, 0o232 for octal and
0xD29A for hexadecimal?
No, though it is an interesting idea.
You can get pretty close with existing Haskell though:
(bin 100010011)
where bin :: Integer - Integer, and is
Prelude read 0o232 :: Int
154
Prelude read 0xD29A :: Int
53914
Prelude
Maurício wrote:
Hi,
Are there binary constants in Haskell, as
we have, for instance, 0o232 for octal and
0xD29A for hexadecimal?
Thanks,
Maurício
___
Haskell-Cafe mailing list
19 matches
Mail list logo