Duncan Coutts [EMAIL PROTECTED] writes:
Perhaps I misunderstood but I think Alexey means that he wants to
accumulate several different histograms (ie different arrays) but to
only make one pass over the input data.
This is precicely my problem, too.
The form of accumArray does not make
Old threads never die:
Tim Newsham [EMAIL PROTECTED] writes:
Chunk = {
length :: Word8
elems :: [Elem] -- 0..255 repetitions
}
Chunks = [Chunk] -- terminated with the first 0 length Chunk
I tried my hand at the encoding above:
Ketil Malde [EMAIL PROTECTED] writes:
Doing 'x - decodeFile /dev/zero
Well, it turns out 'decodeFile' needs to -- or does, anyway -- check
whether the file is empty. Replacing it with a combination of
'decode' and 'readFile' solved the problem.
Thanks to Saizan and the other people hanging
Patai Gergely [EMAIL PROTECTED] writes:
My only problem is that if I try to write a program without
thinking about performance first and not bothering with annotations as
long as it works, I end up with something that's practically
impossible to profile as the costs spread everywhere.
I
Henning Thielemann [EMAIL PROTECTED] writes:
I think it is a good idea to switch this feature on and off by a
compiler switch.
I agree. Same with Int overflow checking, if it can be done at all.
The interesting question is how to name it, the obvious
-funsafe-optimization
might imply
Achim Schneider [EMAIL PROTECTED] writes:
-funsafe-optimization
-fno-paranoia
-fno-rd ?
(Okay, I'll stop now :-)
-k
--
If I haven't seen further, it is by standing in the footprints of giants
___
Haskell-Cafe mailing list
Bulat Ziganshin [EMAIL PROTECTED] writes:
Hello T,
Monday, November 3, 2008, 2:28:08 AM, you wrote:
What would it take to implement a -j equivalent for, say, GHC? Or if
this is not possible, what is wrong with my reasoning?
problem is that make have rather large pices of work which it
Janis Voigtlaender [EMAIL PROTECTED] writes:
If you round to odd instead of round to even, then 4.5 rounds to 5,
Well, of course I did not learn to round to odd. I learned to round .5
to above, but not to do repeated rounding.
Since just about every floating point operation involves some
Janis Voigtlaender [EMAIL PROTECTED] writes:
Since just about every floating point operation involves some sort of
loss of precision, repeated rounding is a fact of life.
Of course. But that was not the point of the discussion...
Well, allow me to contribute to keeping the discussion on
Krasimir Angelov [EMAIL PROTECTED] writes:
Does some one have made performance tests on the different XML libraries for
Haskell? I have a 20MB xml file that I want to read. I remember from my
earlier
experiments (years ago) that all libraries were too slow and were consuming
too
much
Friedrich [EMAIL PROTECTED] writes:
Even the ruby solution need just
check_downloads/check_downloads.rb . 1,25s user 0,06s system 99% cpu
1,322 total
[...]
but the haskell solution:
./chk_dwlds 17,71s user 0,11s system 99% cpu 17,836 total
I'm very surprised to see this. Did you
Bulat Ziganshin [EMAIL PROTECTED] writes:
what's the simplest way to install ghc + gtk2hs on Ubuntu x86 system?
Untested, but try:
sudo apt-get install libghc6-gtk-dev
-k
--
If I haven't seen further, it is by standing in the footprints of giants
FWIW, I always thought that Haskell, and in particular, ghci, would be
a great environment for statistics. I've used R a bit, and while it
has a functional flavor to it, I find Haskell much nicer for
programming. We just need a nice data frame type: a sliceable,
labelable¹ multi-dimensional
Adrian Neumann [EMAIL PROTECTED] writes:
Does this work with more than two colours? i.e. can I recursively
subdivide the halves into quarters with another cut?
I don't think so.
In order to divide a group, a line needs to pass through somewhere in
the middle, or more precisely, it must
Paul Keir [EMAIL PROTECTED] writes:
module Main where
import System.Directory (getDirectoryContents)
main = do dc - getDirectoryContents ./foo/
mapM_ putStrLn dc
mapM_ putStrLn (getDirectoryContents ./foo/)
Couldn't match expected type `[String]'
mapM_ putStrLn needs a
Derek Elkins [EMAIL PROTECTED] writes:
parseCSVFromFile in.csv = return . either (const error!)
Whenever you see this = return . f pattern think liftM or fmap or $.
...and return . f = action is just action . f, no?
-k
--
If I haven't seen further, it is by standing in the footprints of
Don Stewart [EMAIL PROTECTED] writes:
So if you use LGPL for your Haskell libraries, all of which are
currently statically linked and non-replaceable at runtime, it is
unlikely any commercial Haskell house can use the code.
As already mentioned, you can ask the author nicely for a different
Svein Ove Aas [EMAIL PROTECTED] writes:
All programs want argument arrays, not un-split lines, and if you
don't have the shell split it you'll have to do it yourself. words
works fine.
...as long as the words don't contain quotes, or wildcard/globbing
characters, or $, ! and probably other
Jeremy O'Donoghue [EMAIL PROTECTED] writes:
Therefore, I have to say that for at least some commercial users, LGPL
will never be acceptable, and GPL is actually more acceptable because we
know for sure what obligations it places on us.
I don't see how this can be, since according to clause 2b
David Roundy [EMAIL PROTECTED] writes:
Actually, it's no problem having any of those characters in your
arguments,
My point is that using 'words' on the argument sting to 'runProcess' and
expecting the same result as 'runCommand' implies making those assumptions::
Prelude System.Process let
Bit Connor [EMAIL PROTECTED] writes:
I believe that it's wrong to use a license to try to enforce such
cooperation. Look what happened with KHTML when Apple started using
it for their Safari web browser.
I haven't followed this in detail, but I think that, even when a
company is reluctant to
John Van Enk [EMAIL PROTECTED] writes:
I'm going to have to agree with David... even if you ignore the multi-threaded
projects, why couldn't the C programs just implement very specific version of
the third party library inside their code?
Or they could just FFI to the Haskell libraries :-)
Andrew Coppin [EMAIL PROTECTED] writes:
Idiomatic Haskell seems to consist *only* of single-letter variable
names.
Good thing, too.
Well, qsort (element : list) would be maximally intuitive, but who's
going to implement it like that? ;-)
Why not listElement : restOfList ?
The rationale
Don Stewart [EMAIL PROTECTED] writes:
If I want to make my own efficient bytestring consumer, is that
what I need to use in order to preserve the inherent laziness of
the datastructure?
you can get foldChunks from Data.ByteString.Lazy.Internal,
or write your own chunk folder.
IME you can
Creighton Hogg [EMAIL PROTECTED] writes:
To ask an overly general question, if lazy bytestring makes a nice
provider for incremental processing are there reasons to _not_ reach
for that as my default when processing large files?
I think it is a nice default.
I'd reach for strict
[EMAIL PROTECTED] writes:
It is interesting to compare the above main function with the
corresponding lazy IO:
Minor point I know, but aren't you really comparing it with the
corresponding *strict* IO?
main'' = do
names - getArgs
files - mapM readFile names
Lev Walkin [EMAIL PROTECTED] writes:
Recently I had to process some multi-megabyte XML files.
Join the club! FWIW, I ended up using tagsoup.
-- %%% There is apparently a space leak here, but I can't find it.
-- %%% Update 28 Feb 2000: There is a leak, but it's fixed
-- %%% by a well-known
Simon Richard Clarkstone [EMAIL PROTECTED] writes:
I can also do
readFile readme.markdown . lines . length
by making
(.) = flip fmap
?
-k
--
If I haven't seen further, it is by standing in the footprints of giants
___
Haskell-Cafe mailing
Duncan Coutts [EMAIL PROTECTED] writes:
So we should think about how to make it less confusing. Perhaps like
distributors use an extra revision number we should do the same. I had
hoped that would not be necessary but that's probably not realistic.
If we go this route, it'd be nice to have a
Conal Elliott [EMAIL PROTECTED] writes:
Thanks a bunch for these tips. I haven't used the flags feature of cabal
before, and i don't seem to be able to get it right.
Another option might be to have the test command build via 'ghc
--make' instead of Cabal - this way, you can avoid mentioning
Justin Bailey [EMAIL PROTECTED] writes:
are using tail (or could be calling something that uses tail) and use
the trace function to output logging info.
Another cheap trick is to use CPP with something like:
#define head (\xs - case xs of { (x:_) - x ; _ - error(head failed at
Jules Bean [EMAIL PROTECTED] writes:
On Sep 4, 2008, at 10:19 AM, Tim Chevalier wrote:
The master programmer does not add strictness annotations, for she has
not yet run the profiler.
The compiler will certainly be able to infer the strictness itself
As far as I am aware this statement is
Maurício [EMAIL PROTECTED] writes:
However, this doesn't work:
data Test = Test Integer {b::String}
Is there some way to name only a single, or a few,
of some data type fields?
data Test = Test Integer String
b :: Test - String
b (Test i s) = s
:-)
-k
--
If I haven't seen further, it
Rafael Gustavo da Cunha Pereira Pinto [EMAIL PROTECTED]
writes:
Is there anyone packing GHC 6.8.3 for Ubuntu Hardy?
The next Ubuntu release (8.10 Intrepid), seems to come with 6.8.2 as
well.
If you want to pack 6.8.3, go for it! If you just wanted to use it,
I've had success using the
Aaron Tomb [EMAIL PROTECTED] writes:
Huh? Type safety buys [...] nothing about dereferencing null
pointers, which are the moral equivalent of Nothing.
What type safety buys you, in my mind, is that Nothing is only a valid
value for explicit Maybe types. In cases where you don't use Maybe,
Jeremy Shaw [EMAIL PROTECTED] writes:
I probably shouldn't post when I don't quite understand the question,
and I'm unsure whether this is about timeouts, lazy parsing of
responses, or line endings? These seem like independent issues to
me. Anyway:
Polyparse has some lazy parsers:
but Tomasz
Jason Dagit [EMAIL PROTECTED] writes:
2) Compile GHC yourself.
I find with Debian this is the way to go.
Ouch. Okay, I've compiled GHC once. But I would like end-users to be
able to use my software, and I simply cannot require them to go
through this.
Install your system and use Debian's
David House [EMAIL PROTECTED] writes:
1. Etch comes with ghc-6.6, and that didn't work with my .cabal file.
Is it not an option to make your software work with the
not-quite-latest compiler?
Yes it is, although I don't have the details either.
Neither do I have an Etch system around, but
I've had an interested user, who tried to get one of my programs to
run on a Debian machine - running Debian Etch, released a couple of
months ago. Here are some of the hurdles stumbled upon in the
process:
1. Etch comes with ghc-6.6, and that didn't work with my .cabal file.
2. ghc-6.8.3,
Christopher Lane Hinson [EMAIL PROTECTED] writes:
Having a debianized cabal-install would be the biggest win in my book. If
there were an unofficial debianized mirror of hackage, I probably wouldn't
use it anyway.
I might. I generally want to use newer versions of development stuff
(i.e.
Duncan Coutts [EMAIL PROTECTED] writes:
The other distros are following a similar course though not yet quite as
successfully as Don has demonstrated for Arch. There are similar
translation tools for Gentoo, Debian and RPM-based distros
What is the current recommended way to build debian
Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes:
On 2008 Aug 13, at 18:25, Jason Dusek wrote:
Can you say more about this? I assume that sending static
images back and forth is a good fit for sendfile().
Your previously stated use case sounds like a good fit. I can easily
imagine
Don Stewart [EMAIL PROTECTED] writes:
By the way, for those wondering why Jon Harrop would say such an unusual
thing on the Haskell list, have a look at his contributions over on the
OCaml list,
http://article.gmane.org/gmane.comp.lang.caml.general/43430
Well, to be perfectly honest:
|
Nicholas Andrews [EMAIL PROTECTED] writes:
$ runhaskell blah.cabal configure
blah.cabal isn't a Haskell file, you need a file Setup.hs that you can
'runhaskell'. Setup.hs need only contain the following three lines:
#!/usr/bin/env runhaskell
import Distribution.Simple
main = defaultMain
-k
Don Stewart [EMAIL PROTECTED] writes:
You really, really want to be using rnf for this job, instead of
turning your brain into a pretzel shape.
The Pretzel being one of the lesser-known lazy, cyclic, functional data
structures.
So pretzel-brain is actually a honorific, rather than
Ben Franksen [EMAIL PROTECTED] writes:
Can I convert my working repos to darcs-2?
No. You cannot push or pull between darcs-2 format repos and darcs-1 or
hashed format repos. This might not be optimal but is understandable, since
the theory underlying the darcs-2 repository format is
Ketil Malde [EMAIL PROTECTED] writes:
Duncan Coutts [EMAIL PROTECTED] writes:
It would be useful if some darcs 2 hackers, contributors could help the
ghc people evaluate if darcs 2 is still in the running.
This looks like a very easy and low-investement way to get involved.
...and now I
Duncan Coutts [EMAIL PROTECTED] writes:
It would be useful if some darcs 2 hackers, contributors could help the
ghc people evaluate if darcs 2 is still in the running.
This looks like a very easy and low-investement way to get involved.
Expanding a bit on this: The page at
Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes:
Neil Mitchell [EMAIL PROTECTED] writes:
The darcs 2.0 announcement read like an obituary
I don't know why, but a lot of people I spoke to seemed to have that
impression, and I essentially had to wave changelogs under their
face to
[...]
Gwern Branwen [EMAIL PROTECTED] writes:
I just darcs get http://darcs.net, so I would guess it was either temporary
or a problem on your end.
Seems I needed a newer darcs - the one shipped with Ubuntu is 1.0.9,
which appears to be too old, and it works when I build a new 2.0.2
from the
Galchin, Vasili [EMAIL PROTECTED] writes:
ok guys .. what is this phantom type concept? Is it a type theory thing or
just Haskell type concept?
Here's another example. Say you want to use bytestrings with
different encodings. You obviously don't want to concatenate a string
representing
Peter Verswyvelen [EMAIL PROTECTED] writes:
Well, if somebody can't spell beginners correctly, I highly doubt they
will get alpha right... Certainly if they drive an Alfa Romeo car ;)
For the beginning Haskell programmer owning an Italian sports
car, I cannot resist suggesting [EMAIL
Benjamin L.Russell [EMAIL PROTECTED] writes:
In that case, how about the following, more detailed charter:
Beginner-level discussion about primarily non-research-oriented
topics
This part is good. Friendly and inviting - nothing scary here.
serving the needs of non-computer-science
Logesh Pillay [EMAIL PROTECTED] writes:
Why? Its as if memoization is being ignored in the haskell version.
How to fix?
Shouldn't the definition of p' call (the memoized) p somewhere? In
other words, I can't see any memoization, you seem to just map a
normal, expensive, recursive function p'
Don Stewart [EMAIL PROTECTED] writes:
splitAt n xs = (take n xs, drop n xs)
Thanks. That is odd, though. It makes me wonder what to expect re
optimization. Would the compiler/runtime know that splitAt could be
done in a single pass?
Not with that definition. It would require some
(With apologies to Queen.)
Is this the RealWorld#?
Is this I/O I see?
Caught in a monad -
No escape back to purity
Open a file, it wipes out my smile to see
I'm just a programmer, don't need a Ph.D
I'm easy come, easy go
Don't need this high brow
weird monadic action, no real reaction
for me,
Simon Marlow [EMAIL PROTECTED] writes:
My main concern here is that the remit for the new list is not clear
enough. I can see a potential need for two lists:
* a list for discussion related to teaching Haskell;
* a list devoted to those learning Haskell, with a less research-
Joachim Breitner [EMAIL PROTECTED] writes:
1) unsafeInterleaveIO seems like a big hammer to use for this problem,
and there are a lot of gotchas involved that you may not have fully
thought out. But you do meet the main criteria (file being read is
assumed to be constant for a single run of
jinjing [EMAIL PROTECTED] writes:
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
(.) :: a - (a - b) - b
a . f = f a
infixl 9 .
Isn't this (roughly?) the same as flip ($)?
As a side note, may I advise you to use another symbol, and leave the
poor dot alone?
Albert Y. C. Lai [EMAIL PROTECTED] writes:
While we are kind of on this topic, what makes the characters ħ þ
prefix operator by default, while º and most other odd ones infix?
alphanumeric vs non-alphanumeric
Testing this, I find that isAlpha is True also for 'º', but as the OP
claims,
Stefan O'Rear [EMAIL PROTECTED] writes:
Ok, strane ... Well, let's test with some 'normal' text:
time ./sort bible /dev/null # ~ 0.4 s
time sort bible /dev/null # ~ 0.56 s
Ok, not that different. But with Haskell you often expect to get very
slow code compared to an
Magicloud Magiclouds [EMAIL PROTECTED] writes:
static int old;
int diff (int now) { /* this would be called once a second */
int ret = now - old;
old = now;
return ret;
}
Because there is no variable in Haskell. So how to do this in a FP way?
I would claim the FP way is like
Magnus Therning [EMAIL PROTECTED] writes:
I was just listening to Brooks' talk at OOPSLA 2007 and in the QA part
at the end he mentions a paper on increasing entropy in software
systems. He mentions the authors' names but I can't quite make it out
and Google hasn't been very helpful either.
[EMAIL PROTECTED] writes:
null
filter
map
lookup
On the contrary, these are terrible names _because_ they conflict
with the Prelude.
I agree. One solution would be to stuff these into Data.List.
It's okay if you highly encourage or effectively mandate qualified
import, like
Albert Y. C. Lai [EMAIL PROTECTED] writes:
I haven't heard the terms laziness leak and strictness leak
before
Leak refers to a surprise.
I the meaning of leak is in a bit of flux. Originally, I believe it
refers to a memory leak, where the programmer forgot to call free()
before losing the
Claus Reinke [EMAIL PROTECTED] writes:
1. there are no systems where packages just work!
there are systems where a few people ensure that
many people can live in such an illusion, though.
Exactly. Integrating Cabal packages into the system package manager
is still non-trivial, and a
Martin DeMello [EMAIL PROTECTED] writes:
Any Ubuntu people care to share their experiences?
Ask, and ye shall receive..at least some kind of answer.
I'm especially looking for guidelines on what to install via apt-get
and what to install independently.
I'd get as much as possible via
Martin DeMello [EMAIL PROTECTED] writes:
Thanks! Did you have any conflicts between manual and apt-got stuff?
Not yet, but I haven't really hammered my system with packages yet.
Is there any equivalent to gentoo's package.provided (which
basically says 'I have installed this manually; please
Henning Thielemann [EMAIL PROTECTED] writes:
Now the difficult question: How to write the 'mean' function in terms of
'sum' and 'length' while getting the same performance?
Write a RULE pragma converting
\xs - (foldl' f y0 xs,foldl' g z0 xs)
into
\xs - foldl' (\(y,z) x - (f y x,g z x))
Achim Schneider [EMAIL PROTECTED] writes:
Caveat: I have only a vague grasp on what exactly is being criticized
here - using a modern Linux distribution, tons of packages are
available, and almost all issues Claus point out seem to be taken care
of - at least as far as I can see.
Well, then
Thomas Hartman [EMAIL PROTECTED] writes:
What kind of speed do you get on your laptop for Data.Set? How much
faster is the bloom filter?
I tried to modify examples/Words.hs to use Data.Set insted. The
results look like this (first Bloom, second Data.Set, both compiled
with -O2):
Duncan Coutts [EMAIL PROTECTED] writes:
Because I'm writing the Unicode-friendly ByteString =p
He's designing a proper Unicode type along the lines of ByteString.
So - storing 22.5 bit code points instead of 8-bit quantities? Or
storing whatever representation from the input, and providing a
Johan Tibell [EMAIL PROTECTED] writes:
I guess this is where I don't follow: why would you need more short
strings for Unicode text than for ASCII or 8-bit latin text?
But ByteStrings are neither ASCII nor 8-bit Latin text!
[...]
The intent of the not-yet-existing Unicode string is to
Johan Tibell [EMAIL PROTECTED] writes:
Lazy I/O comes with a penalty in terms of correctness!
Is there a page describing this in more detail? I believe my programs
to be correct, but would like to know if there are additional
pitfalls, beyond hClosing a handle with outstanding (unevaluated)
PR Stanley [EMAIL PROTECTED] writes:
(16 :: Float) is a perfectly legitimate statement although I'm
surprised that it's allowed in a type strong language such as
Haskell. It's a bit like casting in good old C. What's going on here?
The literal 16 is really shorthand for fromIntegral
Bulat Ziganshin [EMAIL PROTECTED] writes:
well, i don't understand difference between your idea and lazybs
implementation
HT said earlier that:
This would still allow the nice tricks for recursive Fibonacci
sequence definition.
Which I guess refers to something like:
fibs = 1 : 1 :
Ketil Malde [EMAIL PROTECTED] writes:
You've lost me at least.
...but perhaps I can find my way back on my own?
Today, you can choose between Array, with lazy elements, or UArray,
with strict elements.
Lazy arrays have the elements defined in advance, strict ones have
them calculated
Tom Harper [EMAIL PROTECTED] writes:
I am in the process of writing a library for my MSc dissertation and
would like to do some benchmarking. In doing so I need to compare
the time and space of my library with some other code. Is there a
framework for doing so in Haskell, aside from the
Henning Thielemann [EMAIL PROTECTED] writes:
We could simulate a list with strict elements, i.e.
data StrictList a = Elem !a (StrictList a) | End
by an unboxed array with a cursor to the next element to be evaluated and
a function that generates the next element. [...]
looks like
Don Stewart [EMAIL PROTECTED] writes:
http://code.haskell.org/~dons/uvector
http://code.haskell.org/~dons/code/uvector
(I presume? The other URL gives a 404)
-k
--
If I haven't seen further, it is by standing in the footprints of giants
___
Salvatore Insalaco [EMAIL PROTECTED] writes:
This doesn't look like a relational structure at all in Haskell.
I believe you are abusing terminology here. 'Relation' refers to a
table (since it represents a subset of AxBxC.., i.e. a relation), not
to references between tables.
Mutability and
Hi,
I'm trying to implement a CGI, but I have encountered some problems
with handling program errors properly. I think it boils down to this:
The first program from the documentation at
http://hackage.haskell.org/packages/archive/cgi/3001.1.5.2/doc/html/Network-CGI.html
import Network.CGI
Since Björn Bringert suggested (on IRC) the problem could be due to
laziness, and that I should force the result string before giving it
to output, I've been playing around a bit. (The program is somewhat
more involved than the short test I provided earlier, but available on
request).
Without
Ketil Malde [EMAIL PROTECTED] writes:
Since Björn Bringert suggested (on IRC) the problem could be due to
laziness [..] Does anybody else have it working?
I found that other person, and he is us. I played around some more,
and thought -- just to not leave any stone unturned -- that I should
Yann Golanski [EMAIL PROTECTED] writes:
1- Get a list out of a file: I managed to do that using the following:
parseImageFile :: FilePath - IO [String]
parseImageFile file = do inpStr - readFile file
return $ filter (/=) (breaks (=='\n') inpStr)
Nice, simple and I
Fernand [EMAIL PROTECTED] writes:
Experimenting with tagsoup (I'm using GHC 6.8.2 and tagsoup-0.6), I
found something which appears to me as strange behaviour : when
parsing tag's attributes that have spaces enclosing the = sign,
tagsoup seems to interpret these as empty attributes' names
Achim Schneider [EMAIL PROTECTED] writes:
Nevertheless, a question comes to me - shouldn't compiler report a
warning?
While doing that is easy in this case, it becomes quite delicate in the
general case. More precisely, it grows into the halting problem.
I think it would be nice with a
Ketil Malde [EMAIL PROTECTED] writes:
data EvidenceCode = IAC | IUG | IFR | NAC | NR | ... deriving Show
Could it be that this derived read instance is somehow very inefficient?
To answer my own question: this is exactly it, ghc derives less than
optimal code in this case. Rather than
Peter Verswyvelen [EMAIL PROTECTED] writes:
Is it possible to design hardware that is better suitable for
functional languages?
As I recall, Lisp machines went out of business when Lisp ran faster
on industry standard, 68000-based Suns and Apollos, than on their
custom hardware with tags and
Antoine Latter [EMAIL PROTECTED] writes:
When I specify the parsec-2.1.0.0 on the command-line, the Main.prof
doesn't include any parsec CAFs.
You need to add -auto-all to the build of Parsec as well.
-k
--
If I haven't seen further, it is by standing in the footprints of giants
Philip Müller [EMAIL PROTECTED] writes:
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as C8
Note that these use the same underlying data structure, but Char8
interprets the contents as Char instead of Word8. So the B.heads and
B.break should be CS8 - for
Don Stewart [EMAIL PROTECTED] writes:
mkAnn :: ByteString - Annotation
mkAnn = pick . B.words
where pick (_db:up:rest) = pick' up $ getGo rest
pick' up' (go:_:ev:_) = Ann (B.copy up') (read $ B.unpack go)
(read $ B.unpack ev)
getGo = dropWhile (not . B.isPrefixOf
Lauri Oksanen [EMAIL PROTECTED] writes:
Thanks for help. I did some tests with UArray and it does the trick.
The problem remaining is, how to implement UArray Int (Double, Double,
Double)?
As (UArray Int Double, UArray Int Double, UArray Int Double).
Or as UArray Int Double, but with a
Andrew Coppin [EMAIL PROTECTED] writes:
I'm more worried about what happens in less trivial examples. [Let's
face it, who wants to compute the sum of the numbers from 1 to N?]
Inspired by Don's blog post, and coincidentally working on a program
where profiling points to one particular, short
Dan Weston [EMAIL PROTECTED] writes:
mkAnn :: ByteString - Annotation
mkAnn = pick . B.words
where pick (_db:up:rest) = pick' up $ getGo rest
pick' up' (go:_:ev:_) = Ann (B.copy up') (read $ B.unpack go)
(read $ B.unpack ev)
getGo = dropWhile (not . B.isPrefixOf
Aaron Denney [EMAIL PROTECTED] writes:
I used to be a big-endian advocate, on the principle that it doesn't
really matter, and it was standard network byte order. Now I'm
convinced that little endian is the way to go
I guess it depends a lot on what you grew up with. The names
(little/big
Neil Mitchell [EMAIL PROTECTED] writes:
I think it is known that Parsec 3 is slower than Parsec 2, as a result
of the increased generality. I know that in the past someone was
working on it, but I am not sure if they ever got anywhere.
I got pretty good performance (IMHO - about 10MB/s, still
Jed Brown [EMAIL PROTECTED] writes:
This, of course, is because `od -x' regards the input as 16-bit integers. We
can get saner output if we regard it is 8-bit integers.
Yes, of course. The point was that for big-endian, the word size
won't matter. Little-endian words will be reversed with
PR Stanley [EMAIL PROTECTED] writes:
What is the underlying rationale for the Maybe data type?
It is the equivalent of a database field that can be NULL.
is it the safe style of programming it encourages/
Yes. Consider C, where this is typically done with a NULL pointer, or
Lisp,
Richard A. O'Keefe [EMAIL PROTECTED] writes:
According to the ASCII standard, it was fully legitimate to use
backspace and carriage return to get over-striking (which is why ASCII
includes oddities such as ^ and ` : they really are for accents, and ,
did double duty as cedilla, ' as acute
501 - 600 of 1126 matches
Mail list logo