On Mon, Jun 8, 2009 at 2:04 AM, Iavor Diatchki iavor.diatc...@gmail.comwrote:
Hello,
Here is an update, in case anyone else runs into the same problem.
My understanding, is that the problem was caused by a mistake in the
configure script for the network package, which after (correctly)
Hello everyone,
In the last month or so, I've found myself using the following snippet a lot:
import Control.Parallel.Strategies
import Test.BenchPress
bench 1 . print . rnf
This snippet fully evaluates a value and prints how long it took to do so. I
regularly use it to see where the
On Mon, Jun 8, 2009 at 02:04, Iavor Diatchkiiavor.diatc...@gmail.com wrote:
Hello,
Here is an update, in case anyone else runs into the same problem.
My understanding, is that the problem was caused by a mistake in the
configure script for the network package, which after (correctly)
2009/6/7 Dominic Steinitz domi...@steinitz.org:
Ha! It's yet another of haddock's quirks. If I replace -- ^ by -- then haddock
accepts {-#. I'll update the ticket you created.
-- | The parse state
data S = S {-# UNPACK #-} !BL.ByteString -- ^ input
{-# UNPACK #-} !Int -- ^ bytes
Hello everyone.
Last night I uploaded my first Hackage library with documentation
(StrictBench). I learned that it takes somewhere between 2 and 8 hours for the
link to the documentation to become active. This is confusing for first-time
package authors (I went to #haskell to ask what I had
On Jun 8, 2009, at 04:10 , Niemeijer, R.A. wrote:
Hence I wanted to ask if this is a bug or if there is a good
technical or social reason for it, and whether there is any way
around it.
Auto-running haddock on upload strikes me as a good way to open
hackage.haskell.org to a denial of
On Jun 8, 2009, at 04:36 , Brandon S. Allbery KF8NH wrote:
On Jun 8, 2009, at 04:10 , Niemeijer, R.A. wrote:
Hence I wanted to ask if this is a bug or if there is a good
technical or social reason for it, and whether there is any way
around it.
Auto-running haddock on upload strikes me as
If that is the main concern, would the following not work?
- Hackage accounts already have to be created manually, so there is no
chance of a DDoS.
- Uploading to hackage requires a username and password, which means
the user can be identified. Set a timeout on uploads for each user:
Vasili I. Galchin vigalc...@gmail.com wrote:
Executable GraphPartitionTest
Main-Is:Swish.HaskellRDF.GraphPartitionTest.hs
Other-modules: Swish.HaskellRDF.GraphPartition
Swish.HaskellRDF.GraphClass
Swish.HaskellUtils.ListHelpers
Niemeijer, R.A. r.a.niemei...@tue.nl writes:
If that is the main concern, would the following not work?
[...]
Result: immediate documentation for every contributor with good
intentions
Or simply, on upload, generate the doc directory with a temporary page
saying that documentation will
Hi,
I am trying to extract the image data from various file formats and it appeared
that hsmagick would be the right package to use.
However, it doesn't actually work or I use it incorrectly. If you have installed
hsmagick and change the value of some_png_file to some existing png file, you
Have you tried
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/pngload ?
Mark
Ron de Bruijn wrote:
Hi,
I am trying to extract the image data from various file formats and it
appeared that hsmagick would be the right package to use.
However, it doesn't actually work or I use it
On Mon, Jun 8, 2009 at 8:20 AM, Niemeijer, R.A.r.a.niemei...@tue.nl wrote:
Hello everyone,
In the last month or so, I've found myself using the following snippet a lot:
import Control.Parallel.Strategies
import Test.BenchPress
bench 1 . print . rnf
This snippet fully evaluates a value
Henning Thielemann wrote:
[...]
- So you have to declare them near the test cases and they're orphan
instances
The entire project doesn't issue a single warning when compiling with
-Wall *except* two orphan instances when building the test cases...
However, I had sometimes the case,
Mark Wassell schreef:
Have you tried
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/pngload ?
Hi Mark,
I just did:
import Codec.Image.PNG
png_file_to_2d_array file = do
either_error_string_or_png - loadPNGFile file
either
(\s - error $ (png_file_to_2d_array) ++ s)
On Mon, Jun 8, 2009 at 11:05, Niemeijer, R.A.r.a.niemei...@tue.nl wrote:
which, face it, is going to be all of them; I doubt Haskell
is popular enough yet to be the target of DoS attacks
Second that. I think this is a good case in which some security should
be traded in for usability. And even
On Mon, Jun 8, 2009 at 13:11, Ron de Bruijnr...@gamr7.com wrote:
Mark Wassell schreef:
Have you tried
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/pngload ?
Hi Mark,
I just did:
import Codec.Image.PNG
png_file_to_2d_array file = do
either_error_string_or_png - loadPNGFile
Hello,
While grading a Haskell student's work I ran into an example of a
program not being lazy enough. Since it's such a basic and nice example
I thought I'd share it with you:
One part of the assignment was to define append :: [a] - [a] - [a],
another to define cycle2 :: [a] - [a]. This
Cool! Probably one should start teaching with 'case' instead of
pattern function definitions; that would put an accent on what is
forced and in what order. Only after the student understands the
laziness issues, introduce pattern signatures.
2009/6/8 Martijn van Steenbergen
Magnus Therning wrote:
Is there no way to force repeated evaluation of a pure value? (It'd
be nice to be able to perform time measurements on pure code so that
it's possible to compare Haskell implementations of algorithms to
implementations in other languages, without running into confounding
Hi,
this is a very nice example.
On 08.06.2009, at 14:31, Eugene Kirpichov wrote:
Cool! Probably one should start teaching with 'case' instead of
pattern function definitions; that would put an accent on what is
forced and in what order.
I like this idea.
Only after the student understands
Jan Christiansen wrote:
This definition is too strict. The evaluation of intersect [] [1..]
yields [] while the evaluation of intersect [1..] [] does not terminate.
This function can be improved such that it yields the empty list in both
cases. This function was probably not implemented by a
Your feature list sounds like an almost exact duplicate of that for my
test-framework package, which has been available on Hackage for months
(although it's almost totally unadvertised!):
https://github.com/batterseapower/test-framework/tree
On Mon, Jun 8, 2009 at 1:56 PM, Martijn van
Steenbergenmart...@van.steenbergen.nl wrote:
Magnus Therning wrote:
Is there no way to force repeated evaluation of a pure value? (It'd
be nice to be able to perform time measurements on pure code so that
it's possible to compare Haskell
Hi all,
On Jun 8, 2009, at 15:12 , Magnus Therning wrote:
On Mon, Jun 8, 2009 at 1:56 PM, Martijn van
Steenbergenmart...@van.steenbergen.nl wrote:
Magnus Therning wrote:
Is there no way to force repeated evaluation of a pure value? (It'd
be nice to be able to perform time measurements on
On Jun 8, 2009, at 2:56 PM, Martijn van Steenbergen wrote:
Is there no way to force repeated evaluation of a pure value?
I'm really curious about this too.
could it be done by wrapping the computation in a function which is
repeatedly called and compiling with -fno-full-laziness to
This might be slightly related. When I was assisting a Haskell lab
course, I encountered solutions like the following:
removeRoot :: BSTree a - BSTree a
removeRoot (Node x Empty Empty) = Empty
removeRoot (Node x left Empty) = left
removeRoot (Node x Empty right) = right
removeRoot (Node x
[crosspost from Haskell-libraries and Curry mailing list]
Dear Haskell and Curry programmers,
there is now a Haskell library that supports lazy functional-logic
programming in Haskell. It is available from
http://sebfisch.github.com/explicit-sharing
and can be obtained from Hackage
I'm trying to understand Map type for possible use in another problem I'm
working on, but am stymied right off the bat.
==Here's my source:
import Data.Map (Map)
import qualified Data.Map as Map
l1 = abc
l2 = [1,2,3]
==Here's my error:
Prelude :l maptest
[1 of 1] Compiling
michael rice wrote:
I'm trying to understand Map type for possible use in another problem I'm
working on, but am stymied right off the bat.
==Here's my source:
import Data.Map (Map)
import qualified Data.Map as Map
*Main fromList $ zip l1 l2
interactive:1:0: Not in scope:
I don't understand your response. I copied the imports from Hoogles Data.Map
page. What should the imports be?
Michael
--- On Mon, 6/8/09, Jochem Berndsen joc...@functor.nl wrote:
From: Jochem Berndsen joc...@functor.nl
Subject: Re: [Haskell-cafe] Problem with Data.Map
To: michael rice
Gotcha. Thanks!
Also wondering why I need two imports for one module.
Michael
--- On Mon, 6/8/09, Jochem Berndsen joc...@functor.nl wrote:
From: Jochem Berndsen joc...@functor.nl
Subject: Re: [Haskell-cafe] Problem with Data.Map
To: michael rice nowg...@yahoo.com
Cc: haskell-cafe@haskell.org
michael rice wrote:
Gotcha. Thanks!
Also wondering why I need two imports for one module.
This is not strictly necessary, but the scoping also applies to the type
'Map' itself, thus leaving the
import Data.Map (Map)
(this brings only the name Map in scope from module Data.Map) out
would force
Hi,
import Blurp
bring every thing defined in the Blurp module in scope.
So if blah is defined in blurp,
blah
will work as expected.
import qualified Blurp as B
does the same thing but everything defined in Blurp should be
qualified (i.e. prefixed) with B.
B.blah
will work, not
blah
So
michael rice wrote:
I don't understand your response. I copied the imports from Hoogles Data.Map
page. What should the imports be?
Michael
The imports are fine, but instead of 'fromList' you should use
'Map.fromList' or 'Data.Map.fromList'.
Regards,
--
Jochem Berndsen | joc...@functor.nl
Thanks, guys.
Sounds like Lisp packages. Now I see the functionality of the A or B, etc.:
Fewer keystrokes.
Michael
--- On Mon, 6/8/09, minh thu not...@gmail.com wrote:
From: minh thu not...@gmail.com
Subject: Re: [Haskell-cafe] Problem with Data.Map
To: michael rice nowg...@yahoo.com
Cc:
Hi,
Interesting. In that case, does anyone have any ideas about the
linker errors?
-Iavor
On Mon, Jun 8, 2009 at 12:42 AM, Thomas ten Catettenc...@gmail.com wrote:
On Mon, Jun 8, 2009 at 02:04, Iavor Diatchkiiavor.diatc...@gmail.com wrote:
Hello,
Here is an update, in case anyone else runs
2009/6/8 Reinier Lamers tux_roc...@reinier.de:
I checked out testpack and that did not meet my requirements. I don't know if
I considered test-framework. If I did, it may be that I was turned off by the
fact that the 'home page' link on cabal just goes to a web presentation of the
source tree
This comes from an issue in haskell-beginner, although
it have already been touched here. If you use recent
versions of ghc to build a program and try the resulting
binary on an old linux distro, you may get a message
about timer_create receiving the wrong parameters.
Curiously, as sugested in
I'm trying to convert an XML document, incrementally, into a sequence
of XML events. A simple example XML document:
doc xmlns=org:myproject:mainns xmlns:x=org:myproject:otherns
titleDoc title/title
x:refabc1234/x:ref
html xmlns=http://www.w3.org/1999/xhtml;bodyHello world!/body/html
/doc
I wrote a Haskell solution for the Prolog problem stated below. I had written a
function SQUISH before discovering that NUB does the same thing. While the
solution works, I thought maybe I could apply some functions in the Data.Map
module, and so wrote a second version of SERIALIZE, one no
Today, I was working on coding a solver for the game doublets.
It's a word game where you transform the start word into the end
word one letter at a time (and the intermediate states must also
be valid words). For example, one solution to (warm, cold) is
[warm, ward, card, cord, cold]
Hi all,
I'm trying to install com-1.2.3 on Win XP with ghc-6.10.3
I get this error message:
Resolving dependencies...
Configuring com-1.2.3...
cabal: Missing dependencies on foreign libraries:
* Missing header file: include/WideStringSrc.h
* Missing C libraries: kernel32, user32, ole32,
On Sun, Jun 7, 2009 at 5:04 PM, Iavor Diatchki iavor.diatc...@gmail.comwrote:
Here is an update, in case anyone else runs into the same problem.
Thanks for following up. I wrote the code that performs that check, but
unfortunately I don't have access to all of the permutations of Windows that
On Mon, Jun 8, 2009 at 11:23 AM, Maurício briqueabra...@yahoo.com wrote:
This comes from an issue in haskell-beginner, although
it have already been touched here. If you use recent
versions of ghc to build a program and try the resulting
binary on an old linux distro, you may get a message
Thomas ten Cate wrote:
Niemeijer, R.A. wrote:
which, face it, is going to be all of them; I doubt Haskell
is popular enough yet to be the target of DoS attacks
Second that. I think this is a good case in which some security should
be traded in for usability.
Those who would trade security
On 8 Jun 2009, at 19:39, John Millikin wrote:
+ HaXml and hexpat seem to disregard namespaces entirely -- that is,
the root element is parsed to doc instead of
(org:myproject:mainns, doc), and the second child is x:ref
instead of (org:myproject:otherns, ref).
Yes, HaXml makes no special effort
This comes from an issue in haskell-beginner, (...)
For better or worse, this is something that people should not be trying
in the first place, (...)
Sure! That's what I sugested in the original question. I'm actually
just curious on why timer_create is used at all. This is probably
just
On Mon, Jun 8, 2009 at 1:44 PM, Malcolm
Wallacemalcolm.wall...@cs.york.ac.uk wrote:
Yes, HaXml makes no special effort to deal with namespaces. However, that
does not mean that dealing with namespaces is impossible - it just
requires a small amount of post-processing, that is all.
For
On Mon, Jun 8, 2009 at 2:51 PM, wren ng thorntonw...@freegeek.org wrote:
One issue you'll have to deal with is that since output is delivered
on-line, by the time a validity (or well-formedness) error can be recognized
by the parser it'll be too late. Thus the rest of your code will need to
be
L.S.,
I tried to compile base-4.0.0.0 (on Windows XP) as follows:
[...]\base\4.0.0.0runhaskell Setup configure
command line: module `Prelude' is not loaded
It seems that Base needs another way to compile, how?
--
Regards,
Henk-Jan van Tuyl
--
http://functor.bamikanarie.com
I think the structure you are looking for is called a wedge sum [1],
which is the coproduct in the category of the pointed spaces, each of
which is (in this case) the group action of changing one letter to
another in the ith position of a word of fixed length.
One small tricky part is that,
Oops. Make that: a list comprehension, which enumerates the product
space *without* duplicates!
Dan Weston wrote:
I think the structure you are looking for is called a wedge sum [1],
which is the coproduct in the category of the pointed spaces, each of
which is (in this case) the group action
You can write this in terms of comonads if you have this additional function:
] focus :: (Container w) = (a - a) - (w a - w a)
with the idea that focus modifies the current point of the comonad
(the thing returned by extract) while leaving the rest alone.
] focus f w = something (f $ extract w)
John Millikin schrieb:
On Mon, Jun 8, 2009 at 1:44 PM, Malcolm
The interface you linked to doesn't seem to have a way to resume
parsing. That is, I can't feed it chunks of text and have it generate
a (ParserState, [Event]) tuple for each chunk. Perhaps this is
possible in Haskell without
Hi all,
Is there a way to list all the deprecated packages on hackage?
For instance I found this:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/control-timeout-0.1.2
via a google search but its not listed on the main hackage packages
page. However, there are other packages
Lets suppose I have a file that has encoded things of different
types as integers, and now I would like to convert them back
into specific instances of a data type. For example, I have a
file that contains 1,1,2,3 and I would like the output to be
[Red, Red, Green, Blue]. I also would like to do
On Mon, 2009-06-08 at 11:24 +0200, Ketil Malde wrote:
Niemeijer, R.A. r.a.niemei...@tue.nl writes:
If that is the main concern, would the following not work?
[...]
Result: immediate documentation for every contributor with good
intentions
Having the server generate docs itself
On Tue, Jun 09, 2009 at 08:54:17AM +1000, Erik de Castro Lopo wrote:
Is there a way to list all the deprecated packages on hackage?
Not unless you have an account on that machine. They're hiding, because
their maintainers wanted them withdrawn.
Finally, if a package is deprecated it might be
Hi,
As Thomas pointed out, it is not clear if this is a bug, or if there
is something confused between the different versions of Windows and
MinGW (or I just did something wrong) but I'll make a ticket so that
we can track the issue. I am by no means a Windows developer but I
would be happy to
On Mon, Jun 08, 2009 at 04:36:14AM -0400, Brandon S. Allbery KF8NH wrote:
Additionally, I *think* haddock is run as part of the automated build
tests, which (again) happen on a regular schedule instead of being
triggered by uploads to avoid potential denial of service attacks.
That's
On Mon, Jun 8, 2009 at 4:10 PM, Henry Laxen nadine.and.he...@pobox.comwrote:
Lets suppose I have a file that has encoded things of different
types as integers, and now I would like to convert them back
into specific instances of a data type. For example, I have a
file that contains 1,1,2,3
Although in this example using Data.Map is overkill, if the alphabet was
very large then Data.Map probably would be the way to go. In that case I'd
use:
map head . group . sort instead of nub . sort
since it's noticeably quicker for large lists. This is because nub needs to
preserve the order
On Mon, Jun 8, 2009 at 3:39 PM, Henning
Thielemannlemm...@henning-thielemann.de wrote:
I think you could use the parser as it is and do the name parsing later.
Due to lazy evaluation both parsers would run in an interleaved way.
I've been trying to figure out how to get this to work with lazy
On Jun 8, 2009, at 7:10 PM, Henry Laxen wrote:
convert :: (Data a, Data b) =Int -a -b
convert i x =
let c = dataTypeConstrs (dataTypeOf x) !! (i-1)
in fromConstr c
I would like to be able to say: x = convert 1 c and have it
assign Red to x then I would like to say: y = convert 1 s and
have
On Jun 8, 2009, at 6:58 AM, Magnus Therning wrote:
Is there no way to force repeated evaluation of a pure value? (It'd
be nice to be able to perform time measurements on pure code so that
it's possible to compare Haskell implementations of algorithms to
implementations in other languages,
Ross Paterson wrote:
On Tue, Jun 09, 2009 at 08:54:17AM +1000, Erik de Castro Lopo wrote:
Is there a way to list all the deprecated packages on hackage?
Not unless you have an account on that machine. They're hiding, because
their maintainers wanted them withdrawn.
Well there is at least
Henry,
Jason pointed out:
You'd get fromEnum and toEnum. Which I think, would give you the
int mapping that you are after.
fromEnum :: Enum a = a - Int
toEnum :: Enum a = Int - a
To me, this would indeed seem the way to go for your particular example.
Moreover, as for generic producer
Henry,
Ah, pressed send way to early. Of course, the definition should change
a little as well:
convert :: Data a = Int - a
convert i = xwhere
x = fromConstr ( dataTypeConstrs (dataTypeOf x) !! (i - 1) )
Cheers,
Stefan
___
Hi,
OK, I think that I found and fixed the problem. As Thomas pointed
out, the configure script is not wrong. The problem turned out to be
the foreign import for getnameinfo (this was the missing symbol).
Attached to this e-mail should be a darcs patch that fixes the
problem.
-Iavor
On Mon,
Interpreting lambda calculus is neither cheap or efficient, otherwise
we wouldn't all be using compilers :-)
By interpretive overhead of adding Let/Rec/LetRec to an object
language I mean the need to introduce variables, scoping, and
environment (mapping variables to either values or structures
71 matches
Mail list logo