Hi all,
I'm trying to find the spot in my source code that triggered a RecSel
Exception (No match in record selector
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Apr 17, 2009 at 20:41, Don Stewart d...@galois.com wrote:
dbueno:
Hi all,
In a command-line app of mine I want to have a --version flag, like
many GNU apps do to report their version. The only way I know to
provide the version number is to hardcode it in the source code
somewhere.
Jason Dagit wrote:
Hello,
A colleague of mine recently asked if I knew of a lazy way to solve
the following problem:
Given two sets of sorted floating point numbers, can we lazily
generate a sorted list of the products from their Cartesian product?
The algorithm should return the same result
Hi,
you can use http://hpaste.org/ to overcome this problem.
Cheers,
Thu
2009/4/17 Tsunkiet Man temp.t...@gmail.com:
PS: if the indents are wrong, that's because of gmail copy and past, Im so
sorry.
2009/4/17 Tsunkiet Man temp.t...@gmail.com
Hello,
what you suggested worked! Im very
2009/4/17 Michael P Mossey m...@alumni.caltech.edu:
I want to write a parser that can read a file with this format: the file has
sections which are demarcated by keywords. Keywords always begin with two
forward slashes and consist of letters, digits, and underscore. The text can
be anything,
On Thu, 16 Apr 2009 19:04:43 -0500, Matt Morrow moonpa...@gmail.com
wrote:
This is interesting (and from 1990):
http://groups.google.co.uk/group/comp.lang.functional/msg/655bb7bbd0fd8586
(Not sure if this is well-known. It seems like it either is, or it should
be. Either way, I just stumbled
Here's what I've got so far.
-- Text is considered everything up to //. However, the problem
-- is that this consumes the //.
parseText = manyTill anyChar (try (string //))
-- Because the // is already consumed, parseKeyword just grabs
-- the available letters.
parseKeyword :: Parser String
Oh, I just remembered, I'm using ghci. I'll bet that's why I'm so
slow.
I also did, but after installing the package using cabal. IIRC, cabal
compiles with -O2 by default. But if you downloaded the tarball and
then loaded the module in ghci without installing it, this is probably
the
You can use 'notFollowedBy' (probably with 'many1' and 'try').
Something like (untested):
notFollowedBy (try $ string //)
Thu
2009/4/17 Michael Mossey m...@alumni.caltech.edu:
Here's what I've got so far.
-- Text is considered everything up to //. However, the problem
-- is that this
My confusion is that text is by definition followed by // or eof.
minh thu wrote:
You can use 'notFollowedBy' (probably with 'many1' and 'try').
Something like (untested):
notFollowedBy (try $ string //)
Thu
2009/4/17 Michael Mossey m...@alumni.caltech.edu:
Here's what I've got so far.
--
2009/04/17 minh thu not...@gmail.com:
2009/04/17 Michael Mossey m...@alumni.caltech.edu:
I wonder how I can get the manyTill to be happy with eof
before finding the //? I tried
parseText = manyTill anyChar (try (string //) | eof)
but got a type error.
You can use 'notFollowedBy' [...]
Am Freitag 17 April 2009 01:37:25 schrieb Tsunkiet Man:
Hello,
what you suggested worked! Im very happy with it. However another error
suddenly came up. It sais the last statement in a 'do' must be an
expression, he is refering to line 41:45
I change my code to this:
---
Haskell Weekly News
http://sequence.complete.org/hwn/20090417
Issue 114 - April 17, 2009
---
Welcome to issue 114 of HWN, a newsletter covering
You're right. Since I'm not familiar with Cabal, I didn't use it. Is there a
good tutorial? Docs?
Also, I'm running a 32-bit Linux OS. Does one get a significant speed increase
by
switching to a 64-bit OS?
Thanks for the feedback.
Michael
--- On Fri, 4/17/09, Sebastian Fischer
Conor,
I'd like to point out a few things that may help you on the way.
On Wed, Apr 15, 2009 at 8:58 PM, Conor McBride
co...@strictlypositive.org wrote:
I don't immediately see what the clash in that context would be - I
*think* what you propose should be doable. I'd be interested to know
On Thu, 16 Apr 2009 09:44:44 +0200, Duncan Coutts
duncan.cou...@worc.ox.ac.uk wrote:
On Wed, 2009-04-15 at 01:53 +0200, Henk-Jan van Tuyl wrote:
On Tue, 14 Apr 2009 08:25:52 +0200, Raja Koduru kscr...@gmail.com
wrote:
hi,
I am a beginner to haskell.
I am trying to install glut using
Conor
See this, which I've just written for you:
http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Parser
(Others: please do add to this new Commentary page.)
In any case, my guess is that adding
atype ::= '{' qcon '}'
ought not to introduce ambiguities. You don't want all of
Jason Dusek wrote:
2009/04/17 minh thu not...@gmail.com:
2009/04/17 Michael Mossey m...@alumni.caltech.edu:
I wonder how I can get the manyTill to be happy with eof
before finding the //? I tried
parseText = manyTill anyChar (try (string //) | eof)
but got a type error.
You can use
Hello michael,
Friday, April 17, 2009, 6:26:33 PM, you wrote:
http://haskell.org/cabal/
You're right. Since I'm not familiar with Cabal, I didn't use it. Is there a
good tutorial? Docs?
Also, I'm running a 32-bit Linux OS. Does one get a significant speed
increase by
switching to a
Michael Mossey wrote:
Here's what I have so far. It works, but it's a bit weird to consume the
// as part of the text rather than the keyword. That happens because the
try( string // ), which is part of the end arg to manyTill, consumes
the // when it succeeds. But maybe it is the most natural
Brent Yorgey wrote:
The [2]5th Haskell Hackathon is underway in Utrecht! Happy Haskell
hacking! An early HWN this week since I will be traveling this weekend
(but not, unfortunately, to the Hackathon).
Yes! It's been a good day so far; there are lots of projects being
worked on. You
Hello,
A colleague of mine recently asked if I knew of a lazy way to solve
the following problem:
Given two sets of sorted floating point numbers, can we lazily
generate a sorted list of the products from their Cartesian product?
The algorithm should return the same result as:
sortProduct a b =
I did something similar a while ago to solve a problem posted on StackOverflow:
http://porg.es/blog/sorted-sums-of-a-sorted-list
Henry Laxen generalized my code a little bit so you can pass in any monotonic
function (see the comments).
I'm not sure of the laziness properties of this, but it
Hello Jason,
Saturday, April 18, 2009, 1:41:18 AM, you wrote:
The algorithm should return the same result as:
sortProduct a b = sort [ x * y | x - a, y - b ]
i think it's well-known problem. you should write a function merging
infinite list of sorted lists. in assumption that lists are
Am Freitag 17 April 2009 23:41:18 schrieb Jason Dagit:
Hello,
A colleague of mine recently asked if I knew of a lazy way to solve
the following problem:
Given two sets of sorted floating point numbers, can we lazily
generate a sorted list of the products from their Cartesian product?
If the
Hi Daniel,
I love your solution. Very elegant.
Daniel Fischer wrote:
sortedProducts xs ys = foldr merge1 [] [map (*x) ys | x - xs]
merge1 (x:xs) ys = x:merge xs ys
merge1 [] ys = ys
merge xs@(x:xt) ys@(y:yt)
| x y= x:merge xt ys
| otherwise = y:merge xs yt
(or remove duplicates,
Am Samstag 18 April 2009 00:31:50 schrieb Martijn van Steenbergen:
Hi Daniel,
I love your solution. Very elegant.
Daniel Fischer wrote:
sortedProducts xs ys = foldr merge1 [] [map (*x) ys | x - xs]
merge1 (x:xs) ys = x:merge xs ys
merge1 [] ys = ys
merge xs@(x:xt) ys@(y:yt)
Jason Dagit wrote:
A colleague of mine recently asked if I knew of a lazy way to solve
the following problem:
Given two sets of sorted floating point numbers, can we lazily
generate a sorted list of the products from their Cartesian product?
The algorithm should return the same result as:
Hello haskell-cafe,
funsat is a modern, DPLL-style SAT solver written in Haskell. Funsat
solves formulas in conjunctive normal form and produces a total
variable assignment for satisfiable problems. Funsat is intended to
be reasonably efficient for practical problems and convenient to use
as a
I've just about got this parser working, but wondering about something. Turns
out I need try inside the lookahead here.
parseText :: Parser String
parseText = manyTill anyChar $ lookAhead (try (string //))
Without try, if I give it an input with a single slash, like
some/text
It stops with
Hi,
This one works for all 3 examples you gave:
diag = concat . takeWhile (not.null)
. foldr1 (flip $ zipWith (flip (++)) . ([]:))
. map ((++ repeat []) . map (:[]))
or, using Matt Hellige's pointless fun
http://matt.immute.net/content/pointless-fun
diag = foldr1 (zipWith (++) $. id
Am Samstag 18 April 2009 01:33:44 schrieb Michael P Mossey:
I've just about got this parser working, but wondering about something.
Turns out I need try inside the lookahead here.
parseText :: Parser String
parseText = manyTill anyChar $ lookAhead (try (string //))
Without try, if I give it
Hi all,
In a command-line app of mine I want to have a --version flag, like
many GNU apps do to report their version. The only way I know to
provide the version number is to hardcode it in the source code
somewhere. That means I have the version number in two places: the
.cabal file and the
dbueno:
Hi all,
In a command-line app of mine I want to have a --version flag, like
many GNU apps do to report their version. The only way I know to
provide the version number is to hardcode it in the source code
somewhere. That means I have the version number in two places: the
.cabal
34 matches
Mail list logo