On Thu, 29 May 2008, Bulat Ziganshin wrote:
Hello Andrew,
Wednesday, May 28, 2008, 10:37:47 PM, you wrote:
looks like lazy.bytestring generalized to any a
That sounds like a darn useful thing to have...
well, support on only Word8 as base type isn't some fundamental limit,
just creators
Hello
Evan Laforge wrote:
I have two related questions:
#1
I'm getting some annoying type errors that I don't fully understand,
and wind up having to do a workaround that I don't totally like.
Here's a simplified version of my situation:
data Ambi m = Ambi {
ambi_monad :: m Int
,
On Thu, 29 May 2008 05:11:54 +0200, Benjamin L. Russell
[EMAIL PROTECTED] wrote:
Although all the source code for the pdf version
(http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf) of Purely Functional
Data Structures is provided in Standard ML, not Haskell, I found a
broken link to the
Roberto Zunino-2 wrote:
Alas, for code like yours:
foo = \f - (f 'J', f True)
there are infinite valid types too:
(forall a. a - Int) - (Int, Int)
(forall a. a - Char)- (Char, Char)
(forall a. a - (a,a)) - ((Char,Char),(Bool,Bool))
...
and it is much less clear if a
Peter Gavin wrote:
Has anyone else tried implementing type-level integers using type families?
I tried using a couple of other type level arithmetic libraries
(including type-level on Hackage) and they felt a bit clumsy to use. I
started looking at type families and realized I could pretty
Evan Laforge wrote:
I have two related questions:
#1
I'm getting some annoying type errors that I don't fully understand,
and wind up having to do a workaround that I don't totally like.
Here's a simplified version of my situation:
data Ambi m = Ambi {
ambi_monad :: m Int
, ambi_int
On Thu, May 29, 2008 at 9:51 AM, Kim-Ee Yeoh [EMAIL PROTECTED] wrote:
Roberto Zunino-2 wrote:
Alas, for code like yours:
foo = \f - (f 'J', f True)
there are infinite valid types too:
(forall a. a - Int) - (Int, Int)
(forall a. a - Char)- (Char, Char)
(forall a. a - (a,a)) -
Kim-Ee Yeoh wrote:
How about
foo :: (exists. m :: * - *. forall a. a - m a) - (m Char, m Bool)
Thank you: I had actually thought about something like that.
First, the exists above should actually span over the whole type, so it
becomes a forall because (-) is contravariant on its 1st
On Thu, May 29, 2008 at 01:44:24PM +0200, Roberto Zunino wrote:
Kim-Ee Yeoh wrote:
How about
foo :: (exists. m :: * - *. forall a. a - m a) - (m Char, m Bool)
Thank you: I had actually thought about something like that.
First, the exists above should actually span over the whole type,
Luke Palmer-2 wrote:
You have now introduced a first-class type function a la dependent
types, which I believe makes the type system turing complete. This
does not help the decidability of inference :-)
God does not care about our computational difficulties. He infers
types emp^H^H^H
Kim-Ee Yeoh [EMAIL PROTECTED] wrote:
Luke Palmer-2 wrote:
You have now introduced a first-class type function a la dependent
types, which I believe makes the type system turing complete. This
does not help the decidability of inference :-)
God does not care about our
Another valid type for foo can be done AFAICS with intersection types:
foo :: (Char - a /\ Bool - b) - (a,b)
But I can not comment about their inference, or usefulness in practice.
Again, undecidable :) In fact, I believe that an inference algorithm for
intersection types is equivalent to
Don Stewart wrote:
Hi,
Thanks for the bug report.
This should be filed on the GHC bug tracker,
http://hackage.haskell.org/trac/ghc/newticket?type=bug
And I've forwarded it to the glasgow-haskell-bugs mailing list.
Please try with the 6.8.3 RC we just released. I fixed a bug that could
No, wait, there's cabal-install. And it doesn't even depend on 20+
packages I'd have to install manually. My day, for now, is saved, at
least if portage installs it without hesitation.
Ah, there it is:
Compiling source
in /var/tmp/portage/dev-haskell/cabal-darcs-0/work/cabal-darcs-0 ...
*
Hi
Rationale: We need a CPAN
We choose to spell CPAN as Hackage
, a cabal that is smart enough to know what to
to, even if building depends on make
Why should building depend on make? Shouldn't cabal build stuff for
us? We need a cabal that is clever enough that we don't need a make.
,
On Thu, May 29, 2008 at 11:47 AM, Neil Mitchell [EMAIL PROTECTED] wrote:
, a cabal-inst that can install from darcs (or at least from
a local directory)
Yes, that would be lovely!
While we're on the subject, why does searchpath get as little
attention as it does? It seems to work reasonably
Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
Rationale: We need a CPAN
We choose to spell CPAN as Hackage
, a cabal that is smart enough to know what to
to, even if building depends on make
Why should building depend on make? Shouldn't cabal build stuff for
us? We need a cabal that
Hello Rob,
On Thu, May 29, 2008 at 12:05 PM, Rob Hoelz [EMAIL PROTECTED] wrote:
Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
Rationale: We need a CPAN
We choose to spell CPAN as Hackage
, a cabal that is smart enough to know what to
to, even if building depends on make
Why
Hackage and Cabal are nice, but a command line tool for automatically
searching Hackage and installing Hackage packages (like the cpan
program, or easy_install) would be nice. Unless I haven't done my
homework and this tool exists...
This tool exists. It is called 'cabal-install'. To try
I'm trying to implement some file I/O where I can read in a file to an
array, but do so without having to know how much space I will need.
(Before you suggest it, lists are too slow/space consuming.) I was
thinking that one possible solution is to use a strategy used in
dynamic arrays, where
Define too slow, time-consuming? I've dealt with this problem a lot
at this point, and I've been able to slurp up CSV files of several
gigabytes in the same amount of time as I generally do in C. I have a
feeling an array solution is just going to bog you down more, however
if you insist, I
Hello Tom,
Thursday, May 29, 2008, 8:21:25 PM, you wrote:
Are there any low-level array types (MutableByteArray#, for example)
that support a memcpy-like function
yes, MBA# allows to use memcpy. you can find examples of its
usage right in the array package, for example:
thawSTUArray :: Ix i
Isn't fast IO what ByteStrings where invented for?
Adrian
Tom Harper schrieb:
I'm trying to implement some file I/O where I can read in a file to an
array, but do so without having to know how much space I will need.
(Before you suggest it, lists are too slow/space consuming.) I was
thinking
Exactly. Someone on the list gave me this example awhile back for
reading CSV files. I can process a gigabyte (simple unpack and print
to dev/null for IO testing purposes) in about two and a half seconds
using this code.
import Data.ByteString.Lazy.Char8 as C
-- | Read a datafile and turn it
Hello,
I was wondering how expensive appending something to a list really is.
Say I write
I'd say longList ++ [5] stays unevaluated until I consumed the whole
list and then appending should go in O(1). Similarly when concatenating
two lists.
Is that true, or am I missing something?
Tom Harper wrote:
I'm trying to implement some file I/O where I can read in a file to an
array, but do so without having to know how much space I will need.
Why not just read it into a lazy ByteString? Are you looking to use an
array with elements of a different type? You could then convert
Isaac Dupree wrote:
foo :: (Char - a /\ Bool - b) - (a,b)
a.k.a. find some value that matches both Char-a and Bool-b for some a
and b. Could use type-classes to do it.
Uhmm... you mean something like (neglecting TC-related issues here)
class C a b where
fromChar :: Char - a
Roberto Zunino wrote:
Uhmm... you mean something like (neglecting TC-related issues here)
class C a b where
fromChar :: Char - a
fromBool :: Bool - b
Oops: i meant something like
class C x a b | x - a,b where
fromChar :: x - Char - a
fromBool :: x - Bool - b
Zun.
Hi,
Am Donnerstag, den 29.05.2008, 19:04 +0200 schrieb Adrian Neumann:
I was wondering how expensive appending something to a list really is.
Say I write
I'd say longList ++ [5] stays unevaluated until I consumed the whole
list and then appending should go in O(1). Similarly when
On Wed, May 28, 2008 at 6:38 PM, Richard A. O'Keefe [EMAIL PROTECTED] wrote:
I've always pronounced it k'BAHL, but was surprised to find that
the OED only countenances a short second syllable:
The reason I originally asked is that American, British and other
dialects of English handle French
My work uses WebSense to filter viewable pages - I don't have an option.
I used to be able to get to darcs.haskell.org just fine, but apparently a
/hacking directory was added somewhere, so WebSense put it on the naughty list.
I put in a request for WebSense to review the site; hopefully it will
Adrian Neumann wrote:
Hello,
I was wondering how expensive appending something to a list really is.
Say I write
I'd say longList ++ [5] stays unevaluated until I consumed the whole
list and then appending should go in O(1). Similarly when concatenating
two lists.
Is that true, or am I
Why not just read it into a lazy ByteString? Are you looking to use an
array with elements of a different type? You could then convert it to a
strict ByteString.
b
Because I'm writing the Unicode-friendly ByteString =p
--
Tom Harper
MSc Computer Science '08
University of Oxford
Tom Harper wrote:
Because I'm writing the Unicode-friendly ByteString =p
Perhaps I'm not understanding. Why wouldn't you use ByteString for I/O,
even if you're writing a different library? After all, ByteString's own
internals use memcpy.
b
On Thu 2008-05-29 19:19, Tom Harper wrote:
Why not just read it into a lazy ByteString? Are you looking to use an
array with elements of a different type? You could then convert it to a
strict ByteString.
Because I'm writing the Unicode-friendly ByteString =p
Uh, ByteString is
Jed Brown jed at 59A2.org writes:
Uh, ByteString is Unicode-agnostic. ByteString.Char8 is not. So why not do
IO
with lazy ByteString and parse into your own representation (which might look
a
lot like StorableVector)?
One problem you might run into doing it this way is if a wide
Hi
I assume/hope this hacking is only in the sense of making adjustments to
code.
Is this right? If there's anything involving DoS attacks, etc, I might never
be
able to get to it from work again.
Yes, darcs.haskell.org won't be hosting DoS attacks ever.
Perhaps the problem is with this
On Thu, 2008-05-29 at 11:25 -0700, Bryan O'Sullivan wrote:
Tom Harper wrote:
Because I'm writing the Unicode-friendly ByteString =p
Perhaps I'm not understanding. Why wouldn't you use ByteString for I/O,
even if you're writing a different library? After all, ByteString's own
internals
On Thu, 2008-05-29 at 18:12 +, Chad Scherrer wrote:
My work uses WebSense to filter viewable pages - I don't have an option.
I used to be able to get to darcs.haskell.org just fine, but apparently a
/hacking directory was added somewhere, so WebSense put it on the naughty
list.
Do you
On Thu 2008-05-29 18:45, Chad Scherrer wrote:
Jed Brown jed at 59A2.org writes:
Uh, ByteString is Unicode-agnostic. ByteString.Char8 is not. So why not
do IO
with lazy ByteString and parse into your own representation (which might
look a
lot like StorableVector)?
One problem you
foo :: (Char - a /\ Bool - b) - (a,b)
a.k.a. find some value that matches both Char-a and Bool-b for some a and b. Could use type-classes to do it.
Uhmm... you mean something like (neglecting TC-related issues here)
class C a b where
fromChar :: Char - a
fromBool :: Bool - b
Hi
Do you know where?
[EMAIL PROTECTED]:~$ locate hacking
try locate HACKING
Google has the answer (as always):
http://www.google.co.uk/search?q=allinurl:hacking+site:darcs.haskell.orghl=enfilter=0
Thanks
Neil
PS. Google trivia: switching the allinurl and site arguments around
means it
Duncan Coutts duncan.coutts at worc.ox.ac.uk writes:
On Thu, 2008-05-29 at 18:12 +, Chad Scherrer wrote:
I used to be able to get to darcs.haskell.org just fine, but apparently a
/hacking directory was added somewhere, so WebSense put it on the naughty
list.
Do you know where?
Neil
On Thu, 2008-05-29 at 17:38 +0200, Achim Schneider wrote:
No, wait, there's cabal-install. And it doesn't even depend on 20+
packages I'd have to install manually. My day, for now, is saved, at
least if portage installs it without hesitation.
Ah, there it is:
Compiling source
in
Hello Duncan,
Thursday, May 29, 2008, 10:57:02 PM, you wrote:
We cannot use memcpy because it operates on raw pointers but that's no
good for a movable heap object like a ByteArr#.
it's false assumption - memcpy is used for copying non-pinned arrays
as in the code from Data.Array.Base i've
get_int sym = fmap ambi_int (lookup sym ambi_table :: Maybe (Ambi Maybe))
Of you and the type system you're the only one who knows that that value is
not used. The type system doesn't use (all) the rules you have in your mind.
It follows more simple ones.
You judge by values, not only types
Evan Laforge wrote:
get_int sym = fmap ambi_int (lookup sym ambi_table :: Maybe (Ambi Maybe))
Of you and the type system you're the only one who knows that that value is
not used. The type system doesn't use (all) the rules you have in your mind.
It follows more simple ones.
You judge by
duncan.coutts:
On Thu, 2008-05-29 at 11:25 -0700, Bryan O'Sullivan wrote:
Tom Harper wrote:
Because I'm writing the Unicode-friendly ByteString =p
Perhaps I'm not understanding. Why wouldn't you use ByteString for I/O,
even if you're writing a different library? After all,
I've been playing a lot with searchpath lately, for doing happs
quickstart installation as described on happs.org.
Searchpath works great when it works, which usually means -- when the
module map file is up to date and pointing everywhere to the right
place.
When the module map file is out of
Hi all,
I'm trying to define a type synonym for 2D MArray instances. The goal is to
keep the function signature simple and readable using type `Matrix` instead
of something like `(Ix i, MArray a e m) = m (a i e)`.
After some read, guess, try, error cycles I came up with this:
type Matrix =
Looks like Okasaki moved it over when he relocated to the US Military
Academy:
http://www.eecs.usma.edu/webs/people/okasaki/pfds-haskell.tar.gz
I've fixed it on the wiki.
-johnnn
On May 29, 2008, at 3:56 AM, Henk-Jan van Tuyl wrote:
On Thu, 29 May 2008 05:11:54 +0200, Benjamin L.
On Thu, 29 May 2008, Olivier Boudry wrote:
Hi all,
I'm trying to define a type synonym for 2D MArray instances. The goal is to
keep the function signature simple and readable using type `Matrix` instead
of something like `(Ix i, MArray a e m) = m (a i e)`.
After some read, guess, try, error
Chad Scherrer wrote:
My work uses WebSense to filter viewable pages - I don't have an option.
I used to be able to get to darcs.haskell.org just fine, but apparently a
/hacking directory was added somewhere, so WebSense put it on the naughty
list.
I put in a request for WebSense to review
On Thu, May 29, 2008 at 4:31 PM, Thomas Hartman [EMAIL PROTECTED] wrote:
I've been playing a lot with searchpath lately, for doing happs
quickstart installation as described on happs.org.
Searchpath works great when it works, which usually means -- when the
module map file is up to date and
On Thu, May 29, 2008 at 4:38 PM, Henning Thielemann
[EMAIL PROTECTED] wrote:
Is
type Matrix monad array num = monad (array (Int,Int) num)
ok for you?
Not really what I was looking for but I may end up using it.
What I wanted is to hide the Monad and Array and have it inferred from the
And who bootstraps the searchpath?
--S
On Thu, May 29, 2008 at 4:50 PM, Darrin Thompson [EMAIL PROTECTED] wrote:
On Thu, May 29, 2008 at 4:31 PM, Thomas Hartman [EMAIL PROTECTED]
wrote:
I've been playing a lot with searchpath lately, for doing happs
quickstart installation as described on
Tried to install
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib
which is required for
http://darcs.haskell.org/cabal-branches/cabal-1.4
which is required for cabal-install.
Got the following error. apt-get installed zlibc on a stab in the
dark, but same result. advice?
You need to install the C zlib library.
Cabal is currently unable to warn about missing C library dependencies,
but they manifest as undeclared identifiers in .hsc files when that's
the case.
-- Don
tphyahoo:
Tried to install
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib
On Thu, May 29, 2008 at 03:51:56PM -0700, Thomas Hartman wrote:
echoextra-lib-dirs: ${zlib}/lib zlib.cabal
echoinclude-dirs: ${zlib}/include zlib.cabal'';
Try patching the cabal file using something like that.
Marc
___
Haskell-Cafe
On Fri, 2008-05-30 at 01:10 +0200, Marc Weber wrote:
On Thu, May 29, 2008 at 03:51:56PM -0700, Thomas Hartman wrote:
echoextra-lib-dirs: ${zlib}/lib zlib.cabal
echoinclude-dirs: ${zlib}/include zlib.cabal'';
Try patching the cabal file using something like that.
Actually
2008/5/29 Olivier Boudry [EMAIL PROTECTED]:
After some read, guess, try, error cycles I came up with this:
type Matrix = forall m. forall a. forall i. forall n. (Ix i, MArray a n
m, Num i, Num n) = m (a (i,i) n)
I've tried similar things before. You may run into subtle problems later.
After a little drama with zlib, I managed to get cabal-install installed.
I then attempted to do
cabal install HAppS-Server
since this is a module with a lot of dependencies, and in rapid
development flux, so perenially painful for me to install.
The result is that I managed to install
I think you need to install HAppS-Data etc globally... I'm not sure why
locally installed (ie, only your user) packages wouldn't be picked up by runghc
Setup.hs'ing, but if they are install system wide it should definitely work.
I think it is cabal --global install foo
On Thu, 29 May 2008
On Thu, May 29, 2008 at 7:36 PM, Antoine Latter [EMAIL PROTECTED] wrote:
I've tried similar things before. You may run into subtle problems later.
Such as:
transpose :: Matrix - Matrix
won't expand into the type signature you want it to, I think.
You probably want that to be equivalent
I see. I had done
sudo cabal install HAppS-Server
but this just installed with root ownership in my home directory.
I'm now trying with
sudo cabal install --global HAppS-Server
2008/5/29 Daniel Patterson [EMAIL PROTECTED]:
I think you need to install HAppS-Data etc globally... I'm not sure
On 5/28/08, Evan Laforge [EMAIL PROTECTED] wrote:
I have two related questions:
#1
I'm getting some annoying type errors that I don't fully understand,
and wind up having to do a workaround that I don't totally like.
Here's a simplified version of my situation:
data Ambi m = Ambi {
By the way, it just finally finished.
I still think it took way too long.
thomas.
2008/5/29 Thomas Hartman [EMAIL PROTECTED]:
I see. I had done
sudo cabal install HAppS-Server
but this just installed with root ownership in my home directory.
I'm now trying with
sudo cabal install
It did finish, but I still feel like this took too long.
2008/5/29 Thomas Hartman [EMAIL PROTECTED]:
sudo cabal install --global HAppS-State went fine, and ghc-pkg had
output on just the one (global) file.
but sudo cabal install --global HAppS-Server is slooow.
I finally canceled this
mistaske, that last comment should have gone on another thread.
2008/5/29 Thomas Hartman [EMAIL PROTECTED]:
By the way, it just finally finished.
I still think it took way too long.
thomas.
2008/5/29 Thomas Hartman [EMAIL PROTECTED]:
I see. I had done
sudo cabal install HAppS-Server
Peter Gavin:
Has anyone else tried implementing type-level integers using type
families?
I tried using a couple of other type level arithmetic libraries
(including type-level on Hackage) and they felt a bit clumsy to
use. I started looking at type families and realized I could pretty
Excerpts from Thomas Hartman's message of Thu May 29 18:11:04 -0700 2008:
After a little drama with zlib, I managed to get cabal-install installed.
I then attempted to do
cabal install HAppS-Server
since this is a module with a lot of dependencies, and in rapid
development flux, so
Intuitively it seems like the applicative expression:
(++) $ getLine * getLine
should represent the same thing as the more traditional liftM2
expressions:
do { x - getLine; y - getLine; return ((++) x y) }
but it seems to me that you cant directly manipulate the first into
the second.
--- On Fri, 5/30/08, Magnus Therning [EMAIL PROTECTED] wrote:
I used to be able to get to darcs.haskell.org just
fine, but apparently a
/hacking directory was added somewhere, so WebSense
put it on the naughty list.
Heh, unbelievable. As if the type of hacker interested in DoD attacks
On Thursday 29 May 2008, Tim Newsham wrote:
Intuitively it seems like the applicative expression:
(++) $ getLine * getLine
should represent the same thing as the more traditional liftM2
expressions:
do { x - getLine; y - getLine; return ((++) x y) }
but it seems to me that you cant
On 29 May 2008, at 10:44 AM, Dan Piponi wrote:
On Wed, May 28, 2008 at 6:38 PM, Richard A. O'Keefe
[EMAIL PROTECTED] wrote:
I've always pronounced it k'BAHL, but was surprised to find that
the OED only countenances a short second syllable:
The reason I originally asked is that American,
On Thu, May 29, 2008 at 06:11:04PM -0700, Thomas Hartman wrote:
After a little drama with zlib, I managed to get cabal-install installed.
I then attempted to do
cabal install HAppS-Server
since this is a module with a lot of dependencies, and in rapid
development flux, so perenially
--- On Fri, 5/30/08, Benjamin L. Russell [EMAIL PROTECTED] wrote:
I used to be able to get to darcs.haskell.org
just
fine, but apparently a
/hacking directory was added somewhere, so
WebSense
put it on the naughty list.
Heh, unbelievable. As if the type of hacker interested in
On Thu, May 29, 2008 at 11:48 PM, Tillmann Rendel [EMAIL PROTECTED]
wrote:
Adrian Neumann wrote:
Hello,
I was wondering how expensive appending something to a list really is. Say
I write
I'd say longList ++ [5] stays unevaluated until I consumed the whole
list and then appending should
At Thu, 29 May 2008 19:19:48 -0700,
Thomas Hartman wrote:
It did finish, but I still feel like this took too long.
Facebook does take several minutes to compile and consumes quite a bit
of memory while doing it. If you machine does not have atleast 1GB of
memory it could be thrashing due to
On Wed, May 28, 2008 at 12:46 AM, Olivier Boudry
[EMAIL PROTECTED] wrote:
If the calling convention is stdcall on Windows and ccall on other OS then
it should be defined based on the OS. This can be done by updating the .hsc
files to define the calling convention as a macro depending on the OS
80 matches
Mail list logo