Hi,
I'm parsing Java classfiles with Data.Binary, the code is here:
http://paste.org/index.php?id=4625
The problem is that the resulting code parses rt.jar from JDK6 (about
15K classes, 47Mb zipped) in 15 seconds (run the program with main
-mclose rt.jar, for instance), which is 10 times slower
Hello cafe,
This is just a small thought, but its been bugging me. We have these things
called type classes for a reason (I like to think). When making a new data
type 'Data', it is not productive to avoid type classes such as 'Show' and
export a 'showData' function.
Examples of what I'm
On Fri, 26 Dec 2008, Thomas DuBuisson wrote:
Hello cafe,
This is just a small thought, but its been bugging me. We have these things
called type classes
for a reason (I like to think). When making a new data type 'Data', it is not
productive to
avoid type classes such as 'Show' and export
Using GHCi I found it informative to see that IO indeed is a kind of state
monad. Here's a GHCi session to show that:
Prelude :m GHC.Prim
Prelude GHC.Prim :i IO
newtype IO a
= GHC.IOBase.IO (State# RealWorld - (# State# RealWorld, a #))
-- Defined in GHC.IOBase
instance Monad IO --
On Tue, 2008-12-23 at 18:27 +, Paul Keir wrote:
Hi Duncan,
I'm following the story regarding (parallel) GC in this example
with interest, but forgive me if I ask a more minor question
regarding your modification of an extra parameter, n, to
heavytask. Does this really help (to ensure
On Thu, 2008-12-25 at 15:17 +0900, Curt Sampson wrote:
I'm trying to upgrade from ghc 6.8.3 to 6.10.1. Unfortunately, there
seem to be problems with the Windows version. (I've installed it on
two different machines, both Windows XP, and they've both had the same
problem. Both worked fine with
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brent Yorgey wrote:
50. file://localhost/home/brent/hacking/hwn/20081225.html
:(
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
On Fri, 2008-12-26 at 11:51 +, Thomas DuBuisson wrote:
Hello cafe,
This is just a small thought, but its been bugging me. We have these
things called type classes for a reason (I like to think).
Type classes were invented for two reasons:
1) To imitate mathematical convention. Addition,
I don't think that making Show a type class was a mistake. I think
that we have long since overloaded the meaning of Show and made it
ambiguous. There are multiple distinct reasons people use Show, and
this gets confusing. It would be good if we as a community tried to
nail down these different
On Fri, 26 Dec 2008, Jeff Heard wrote:
I don't think that making Show a type class was a mistake. I think
that we have long since overloaded the meaning of Show and made it
ambiguous. There are multiple distinct reasons people use Show, and
this gets confusing. It would be good if we as a
On Fri, Dec 26, 2008 at 1:55 PM, Jeff Heard jefferson.r.he...@gmail.com wrote:
Off the top of my head, I would say that the traditional meaning of
Show could be changed to Serial, where serial encompasses both Read
and Show -- possibly we could find a more efficient read function,
several have
On Fri, 2008-12-26 at 13:55 -0600, Jeff Heard wrote:
I don't think that making Show a type class was a mistake. I think
that we have long since overloaded the meaning of Show and made it
ambiguous. There are multiple distinct reasons people use Show, and
this gets confusing. It would be
Quoth brian brianchina60...@gmail.com:
| On Fri, Dec 26, 2008 at 1:55 PM, Jeff Heard jefferson.r.he...@gmail.com
wrote:
| Off the top of my head, I would say that the traditional meaning of
| Show could be changed to Serial, where serial encompasses both Read
| and Show -- possibly we could find
Jeff Heard proclaimed:
There are multiple distinct reasons people use Show, and this gets
confusing.
This is exactly what I was getting at. I see four uses being discussed:
1) Programmer readable / compiler parsable.
For this we have 'Show' and 'Read', but the community has a lack of
Hello fellow Haskellers,
In the last few weeks I have written a comprehensive tutorial about
Haskell monads [1], and I was hoping to get some constructive feedback.
I'd appreciate any well meant criticism.
[1] http://ertes.de/articles/monads.html
Greets,
Ertugrul.
--
nightmare =
Hi,
I can write:
*Main let yes = not . not
*Main :t yes
yes :: Bool - Bool
But not:
*Main let isNotEqual = not . (==)
interactive:1:23:
Couldn't match expected type `Bool'
against inferred type `a - Bool'
Probable cause: `==' is applied to too few arguments
In the second
2008/12/26 Oscar Picasso oscarpica...@gmail.com
Hi,
I can write:
*Main let yes = not . not
*Main :t yes
yes :: Bool - Bool
But not:
*Main let isNotEqual = not . (==)
The definition of (.):
f . g = \x - f (g x)
So:
not . (==) = \x - not ((==) x)
But (==) x is a function (of type a -
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Check the type of (.)
Prelude :t (.)
(.) :: (b - c) - (a - b) - a - c
Then the type of (.) not
Prelude :t (.) not
(.) not :: (a - Bool) - a - Bool
Now try to apply (==)
Prelude :t (.) not (==) -- not going to happen
Won't happen. What do you
Hello,
I have a ByteString - [ByteString] - ByteString situation, i.e.
concatenation .
-- marshall into ByteString representation
join
(encode (buildHeader ss))
-- ByteString
(map encode (buildEntries
From Real World Haskell:
data JValue = JString String
| JNumber Double
| JBool Bool
| JNull
| JObject [(String, JValue)]
| JArray [JValue]
deriving (Eq, Ord, Show)
type JSONError = String
class JSON a where
Forget it. It's more clear reading further.
Sorry for the noise.
On Sat, Dec 27, 2008 at 1:02 AM, Oscar Picasso oscarpica...@gmail.comwrote:
From Real World Haskell:
data JValue = JString String
| JNumber Double
| JBool Bool
| JNull
|
Hello,
Using a strongly-typed language so should just have to check domain
and co-domain of functions?
Vasili
On Fri, Dec 26, 2008 at 11:13 PM, Galchin, Vasili vigalc...@gmail.comwrote:
Hello,
I have a ByteString - [ByteString] - ByteString situation, i.e.
concatenation .
2008/12/26 Galchin, Vasili vigalc...@gmail.com
Hello,
I have a ByteString - [ByteString] - ByteString situation, i.e.
concatenation .
-- marshall into ByteString representation
join
(encode (buildHeader ss))
--
23 matches
Mail list logo