On Tue, Nov 25, 2008 at 11:07 PM, Don Stewart [EMAIL PROTECTED] wrote:
What does the code look like?
It looks like that. Of course it doesn't compute the same number as
the initial code, but it starts 3 sparks and I get the expected 100%
CPU usage instead of 50%.
parSumFibEuler :: Int - Int
On Tue, Nov 25, 2008 at 3:07 PM, Simon Marlow [EMAIL PROTECTED] wrote:
Yes, it's a scheduling bug. I'll make sure it gets fixed for 6.10.2. If
you have more sparks then you shouldn't see this problem. Also, GHC HEAD is
quite a lot better with parallel programs than 6.10.1, I'll try to get
Hi all,
I'm reading the following tutorial:
http://research.microsoft.com/~simonpj/papers/parallel/AFP08-notes.pdf
A Tutorial on Parallel and Concurrent
Programming in Haskell and have problems getting the expected speed
improvement from running two tasks in parallel. With any version of
the code
On Mon, Aug 4, 2008 at 2:14 PM, Fernand [EMAIL PROTECTED] wrote:
If you need to simply create and Excel Sheet, you may also try it using the
new Microsoft XML format (it will only work with Office 2007, though) ; then
you do not need COM.
Sincerely yours,
Fernand
Hi Fernand and Günther,
A
Ooops, I just realized that hpaste truncated my source file at 5k
(it's 8k long). Unfortunately the Excel file creation code is in the
truncated part of the file ;-)
So if you are interested in getting the full source, just ask.
___
Haskell-Cafe mailing
On Wed, Jul 16, 2008 at 6:22 PM, PJ Durai [EMAIL PROTECTED] wrote:
I do have the import library. It came with the DLL. It links properly
when I use CCALL on the haskell import statements. Doesnt link when I
use STDCALL. It looks for function name with something like '@4 or
@8' tacked on at
On Tue, Jul 15, 2008 at 11:51 PM, PJ Durai [EMAIL PROTECTED] wrote:
I am trying to import some functions from a windows DLL. I am getting
strange errors. (This used to work with previous versions of GHC. 6.6
I think.).
You may have to create an import library for the DLL. I had a similar
Hi all,
I'm pleased to announce the first release of the hfann module (
http://code.haskell.org/~oboudry/hfann/). This module is an interface to the
Fast Artificial Neural Network (FANN) library (see
http://leenissen.dk/fann/).
This is an early release. At the moment the hfann module does not
On Mon, Jun 9, 2008 at 11:29 AM, Don Stewart [EMAIL PROTECTED] wrote:
Excellent. Would you like to upload it to hackage.haskell.org, so it can
be easily installed with the 'cabal install' tool?
Hi all,
As suggested by Don, I just uploaded the hfann package to
hackage.haskell.org.
It's
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 =
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
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
On Sat, May 24, 2008 at 3:39 AM, Bulat Ziganshin [EMAIL PROTECTED]
wrote:
Hello Olivier,
Saturday, May 24, 2008, 5:37:32 AM, you wrote:
(|) = flip (.)
I even started to use it in my code and then stopped. It may be a
stupid concern but as many optimizations performed by GHC are made
On Sat, May 24, 2008 at 5:33 AM, Peter Gammie [EMAIL PROTECTED] wrote:
Hello,
Has anyone got some code for drawing charts?
Look at this:
http://byorgey.wordpress.com/2008/04/30/new-haskell-diagrams-library/
I'm not sure it's what you're looking for but it could probably be used as a
base
On Fri, May 23, 2008 at 2:20 PM, Thomas Hartman [EMAIL PROTECTED] wrote:
The big benefit I got from using the State Monad was that I was able to
reorder the functions by just copy/pasting the function name from one
place to another.
I don't understand... why do you need state to do this?
On Wed, May 21, 2008 at 6:19 PM, Dmitri O.Kondratiev [EMAIL PROTECTED]
wrote:
-- Then we can use this State object (returned by getAny) in a function
generating random values such as:
makeRnd :: StdGen - (Int, StdGen)
makeRnd = runState (do
y - getAny
On Wed, May 21, 2008 at 8:42 AM, Dmitri O.Kondratiev [EMAIL PROTECTED]
wrote:
So let's start with fundamental and most intriguing (to me) things:
getAny :: (Random a) = State StdGen a
getAny = do g - get -- magically get the current StdGen
First line above declares a data type:
State
On Mon, May 19, 2008 at 10:32 PM, L.Guo [EMAIL PROTECTED] wrote:
Does GHC support it now ? or, is there any other way to do this ?
Hi,
The following blog article may help:
http://blog.kfish.org/2007/10/survey-haskell-unicode-support.html
It's a comparison of the different libraries
2008/5/19 Dmitri O.Kondratiev [EMAIL PROTECTED]:
I am trying to understand State monad example15 at:
http://www.haskell.org/all_about_monads/html/statemonad.html
Hi Dmitri,
I'm not sure you need to understand everything about Monad and do-notation
to use the State Monad. So I will try to
Hi all,
I found a solution to my linking problem, but it's a bit scary and I'm
wondering if there is a simpler way to do this:
The solution comes from the following article:
http://www.emmestech.com/moron_guides/moron1.html
To get ghc to link my dll properly I had to do the following:
1.
On Thu, May 15, 2008 at 2:42 PM, Ronald Guida [EMAIL PROTECTED] wrote:
It looks like a simple race condition to me. You are using
waitForProcess pid to wait for runInteractiveCommand to finish, but
you don't seem to have anything that waits for createDefFile to
finish.
Thanks Ronald,
As I
Hi Philip,
I just asked a question to the list about using runInteractiveCommand. You
may find the code useful but will need to either remove the forkIO
instruction or synchronize the two threads using a MVar to avoid the
concurrency problem I had.
You'll find the thread here:
On Thu, May 15, 2008 at 6:23 PM, Duncan Coutts [EMAIL PROTECTED]
wrote:
On Thu, 2008-05-15 at 13:40 -0400, Olivier Boudry wrote:
As an example let me show you as an example how we use it in Cabal:
Hi Duncan,
I tried to place a length text `seq` before the mapM_ writeExport to force
On Wed, May 14, 2008 at 5:46 PM, Bulat Ziganshin [EMAIL PROTECTED]
wrote:
use stdcall instead of ccall in Haskell too. afair, depending on
calling conventions, different prefixes/suffixes are used when
translating C function name into assembler (dll) name
Oops, sorry I copied the wrong line
Hi all,
Is it possible to expand macros defined in includes into the .hsc file? I'm
trying to call functions from a library written in C. The library can be
used with or without Unicode chars, depending on #define instructions.
The library has macros for all the standard functions used to work
Hi all,
I'm trying to make RFC calls to SAP using the nwsaprfc library. Some structs
defined in the library contains arrays (byte or word arrays). For example:
typedef struct _RFC_ATTRIBUTES
{
SAP_UC dest[64+1]; /* RFC destination */
SAP_UC host[100+1];
ByteStringS. Then unpack those ByteStringS to Word8 list and populate
StorableArrayS with the bytes. I hope it'll do the job for both Word8 and
Word16 arrays.
Olivier.
On Fri, May 9, 2008 at 9:52 AM, Brandon S. Allbery KF8NH
[EMAIL PROTECTED] wrote:
On 2008 May 9, at 9:42, Olivier Boudry
Hi Johanes,
You could look at the following wiki page:
http://haskell.org/haskellwiki/Upgrading_packages
It lists most of the issues you may face when upgrading to GHC-6.8 and Cabal
1.2.
Hope this helps,
Olivier.
On Fri, Apr 4, 2008 at 1:07 PM, Johannes Waldmann
[EMAIL PROTECTED] wrote:
Hi all,
If you compile and run this:
main = do
putStrLn $ show $ take (last [0..]) [0..]
or simply run:
take (last [0..]) [0..]
in ghci, it first hang for about one minute and then starts to generate an
infinite list. I was expecting last [0..] to never produce a value and the
On Thu, Apr 3, 2008 at 10:35 PM, Bryan O'Sullivan [EMAIL PROTECTED]
wrote:
It's not an infinite list. It's a list of length maxBound::Int, as
required by the fact that take's first argument is an Int. The second
argument is probably defaulting to Integer.
Right! The first arg of take
On Thu, Apr 3, 2008 at 11:13 PM, Don Stewart [EMAIL PROTECTED] wrote:
length, take, drop and index working on machine-sized Ints by default
are really a bit of a wart, aren't they?
-- Don
Agreed,
Olivier.
___
Haskell-Cafe mailing list
On Dec 14, 2007 12:37 PM, Thomas Hartman [EMAIL PROTECTED] wrote:
I just tried HDBC-ODBC on 6.8.2, but it still crashes. Works on 6.6.1.
thomas.
Hi Thomas,
I tried to compile your minimal app on 6.8.2 and get the following result.
C:\Tempghc --make TestHDBC.hs
Linking TestHDBC.exe ...
On Dec 5, 2007 7:43 AM, Luis Cabellos [EMAIL PROTECTED] wrote:
Hi,
I have a question, what's the best way to program?
- put all the signatures in the Haskell Code?
- Only put the type signatures needed to compile (like monomorphism
errors or ambiguous signature)?
Until now, I prefer the
On Nov 29, 2007 5:31 AM, Reinier Lamers [EMAIL PROTECTED] wrote:
Especially in the fuzzy cases like this one, NLP often turns to machine
learning models. One could try to train a hidden Markov model or support
vector machines to label parts of the string as name, street,
number, city, etc.
ghc ––shared -o foo.dll bar.o baz.o wibble.a -lfooble
should be
ghc –shared -o foo.dll bar.o baz.o wibble.a -lfooble
There are 6 occurences of what smells like a copy/paste bug ;-)
Cheers,
Olivier.
On Dec 4, 2007 5:42 AM, Simon Marlow [EMAIL PROTECTED] wrote:
Olivier Boudry wrote
On 12/3/07, Simon Peyton-Jones [EMAIL PROTECTED] wrote:
Better still, could you add a section to that page about DLLs and Excel?
That'd be useful for others.
Simon
Simon,
As the page is part of the GHC documentation I cannot edit it. I put my
notes in a new wiki page :
On Dec 3, 2007 10:07 AM, Simon Peyton-Jones [EMAIL PROTECTED] wrote:
It's not part of the Haskell documentation! The FFI page
http://haskell.org/haskellwiki/GHC/Using_the_FFI
is part of the contributed documentation, linked from here:
http://haskell.org/haskellwiki/GHC
So it
I moved my stuff to:
http://haskell.org/haskellwiki/GHC/Using_the_FFI#Beware_of_dllMain.28.29_-_Excel
Cheers,
Olivier.
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
On 12/2/07, Steven Fodstad [EMAIL PROTECTED] wrote:
Sorry for not responding earlier. The haskell-cafe list is hard to keep
up with.
The process of finding geographic (lat/long) coordinates from a text
address is called geocoding. Obviously extracting the parts of an
address is part of
Sorry if I'm talking to myself, but I found a solution and thought it could
be interesting for other people who need to call GHC created DLLs from
Excel.
The solution is based on the information found in :
http://haskell.org/haskellwiki/GHC/Using_the_FFI#Debugging_Haskell_DLLs.
As suggested, I
Just a short addition to my previous e-mail:
I just found an old thread which looks very similar to the problem I just
described:
http://www.nabble.com/GHC-6.4.1-and-Win32-DLLs:-Bug-in-shutdownHaskell--t1206938.html
I also tried to prevent the RTS from installing signal handers (it was
Hi all,
This e-mail may be a bit off topic. My question is more about methods and
algorithms than Haskell. I'm looking for links to methods or tools for
parsing unstructured data.
I'm currently working on data cleaning of a Customer Addresses database.
Addresses are stored as 3 lines of text
On 11/28/07, Hans van Thiel [EMAIL PROTECTED] wrote:
Have you looked at the Java Rule Engine (I believe JSR 94) and in
particular Jess?
http://herzberg.ca.sandia.gov/
I have no experience with it myself, though, just heard of it.
Regards,
Hans van Thiel
Hi Hans,
Never heard of that
On Nov 28, 2007 1:11 PM, manu [EMAIL PROTECTED] wrote:
Hello
I've spent a few days trying to install all the packages required to
use HaskellDB with either MySQL or SQlite3
(the only 2 DB the host I was thinking about is supporting)
Well, I am giving up ! I seriously regret replacing
On 11/28/07, Grzegorz Chrupala [EMAIL PROTECTED] wrote:
You may have better luck checking out methods used in parsing natural
language. In order to use statistical parsing techniques such as
Probabilistic Context Free Grammars ([1],[2] ) the standard approach is to
extract rule probabilities
On 11/28/07, Tim Docker [EMAIL PROTECTED] wrote:
Well I'd say none of the packages I've tried, build out of the box...
I'm not a windows developer, but
Is it actually reasonable to expect any cabal packages that depend on
external c libraries and headers to build out of the box on
On 11/27/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Hi guys.
Somebody just introduced me to a thing called Project Euler. I gather
it's well known around here...
Anyway, I was a little bit concerned about problem #7. The problem is
basically figure out what the 10,001st prime number is.
On 11/27/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
That is indeed a nice and clear version that's pretty fast. It's
basically the same as the C version except backwards (i.e. examine a
number and work backwards through its divisors, rather than filling in
a map of all multiples of a known
On Nov 21, 2007 1:07 PM, Greg Fitzgerald [EMAIL PROTECTED] wrote:
Running 6.8.1 on Windows XP, typing 'main' while :r is still processing
causes the 'm' in 'main' to morph to a 'g'.
:r
[1 of 2] Compiling Language.QidlTypeLibrary.Parser (
Language/QidlTypeLibrary/Parser.hs, interpreted )
On 11/21/07, Fernand [EMAIL PROTECTED] wrote:
Hi dear fellow ghc users,
I simply wanted to let people know that I apparently succeeded in
compiling a patched version of HDirect with GHC 6.8.1 (with typelibs
support).
At least, I could compile some of the examples and had very simple test
On Nov 20, 2007 9:36 AM, ChrisK [EMAIL PROTECTED] wrote:
Thank you very much for the error report. I have tracked down the cause.
You are searching against an empty Bytestring. This is now represented by
-- | /O(1)/ The empty 'ByteString'
empty :: ByteString
empty = PS nullForeignPtr
On 11/20/07, Ian Lynagh [EMAIL PROTECTED] wrote:
Hi Brad,
I can't reproduce this. Can you please tell us what platform you are on
(e.g. x86_64 Linux) and what gcc --version says?
Also, where did your GHC come from, e.g. bindists from the download
page, self-compiled?
Also, as Christian
On 11/19/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Well, I just tried to install this, and as per usual, Cabal has having
none of it.
C:\fusion\ runhaskell Setup configure
Configuring stream-fusion-0.1.1...
Setup: ld is required but it could not be found.
Hi Andrew,
I had the same
On 11/20/07, Greg Fitzgerald [EMAIL PROTECTED] wrote:
Using GHC 6.8.1 on Windows XP, after having used ghc-pkg to expose '
directory-1.0.0.0', I am getting an error when I build haddock that says
the package is hidden. When I type ghc-pkg list, the package is not in
parenthesis. Typing ghc
Hi all,
I'm getting a strange user error when working with Data.ByteString.Char8 and
Text.Regex.PCRE.
Error I get is:
CustomerMaster: user error (Text.Regex.PCRE.ByteString died: (ReturnCode
0,Ptr
parameter was nullPtr in Text.Regex.PCRE.Wrap.wrapMatch cstr))
The part of the code causing
On 11/16/07, Duncan Coutts [EMAIL PROTECTED] wrote:
On Thu, 2007-11-15 at 21:55 -0500, Olivier Boudry wrote:
By the way, what's the reason dropSpaceEnd is defined but not exported
nor used through a rule? I'm just curious.
We decided when trying to standardise the API to start with just
Hi all,
I'm writing a Haskell program to do some address cleansing. The program uses
the ByteString library.
Data.ByteString.Char8 documentations shows functions for removing whitespace
from start or end of a ByteString. Those functions are said to be more
efficient than the dropWhile / reverse
On 11/15/07, Don Stewart [EMAIL PROTECTED] wrote:
Let me know if the rule fires. If it isn't, that's a bug, essentially.
-- Don
Don,
As you can see the rule fires.
C:\Tempghc --make -O2 -fasm -ddump-simpl-stats DropSpaceTest.hs
...
3 RuleFired
1 FPS pack/packAddress
2 FPS
Hi Don,
In fact I'm not really looking at performance, I don't expect performance to
be a big issue in my application.
I was just looking at using some simple functions found in the documentation
and avoid redefining them.
In fact dropSpace and dropSpaceEnd are doing exactly what I'm looking
In GHC it works without the and don't work with them:
Prelude :cd C:\Documents and Settings
Prelude :! pwd
C:\Documents and Settings
Olivier.
On 10/29/07, Benjamin L. Russell [EMAIL PROTECTED] wrote:
Please pardon this intrusion for an elementary
question on setting the GHC search path.
I
Hello,
I just built gtk2hs 0.9.12 using MinGW, GTK_2.0 and ghc-6.8.0.20071016. I
just changed some EXTERNALDEPS in the Makefile based on info found in the
following page http://haskell.org/haskellwiki/Grapefruit
25a126,128
if HAVE_SPLIT_BASE
tools_c2hs_c2hsLocal_EXTERNALDEPS += pretty
More info on this problem:
I rebuilt the whole stuff using exactly the same method and working from a
new extract of the sources. Now I get the same kind of error but on another
object. This error looks a bit random!?!
nm.exe libHSgtk.a /dev/null
C:\MinGW\bin\nm.exe: TextView__112.o: File
The touch and reload option works but breakpoints are lost in the reload.
For the moment putting the instructions in a script seems to be the simplest
solution.
Thanks for all inputs,
Olivier.
___
Glasgow-haskell-users mailing list
Hi all,
I just tried the new GHCi debugger. A great new feature of GHCi 6.8.1.
When debugging a function, as for example the qsort function given as an
example in the 3.5 The GHCi Debugger documentation page, the debugger will
only break on first function evaluation.
As haskell is pure and lazy
On 9/18/07, Pepe Iborra [EMAIL PROTECTED] wrote:
Could you paste a ghci session demonstrating the problem?
Here is a very short and simple debug session showing the problem:
===
*Main :l debug68.hs
[1 of 1] Compiling Main ( debug68.hs,
Hi Dmitri,
I built gtk2hs on Windows with GHC 6.6.1 and gtk2hs-0.9.11. Here's are the
steps that worked for me: (not sure I didn't missed some)
First you need to install a GTK+ development package for windows. I think
mine comes from http://gladewin32.sourceforge.net/modules/wfdownloads/
Then
Hi all,
I'm playing with the TagSoup library trying to extract links to
original pictures from my Flickr Sets page. This programs first loads
the Sets page, open links to each set, get links to pictures and then
search for original picture link (see steps in main function).
It does the job, but
Reading code like the following:
main = do
s - getContents
let r = map processIt (lines s)
putStr (unlines r)
I was thinking all IO operations were lazy. But in fact it looks like
getContents is lazy by design but not the whole IO stuff.
Thank you all for your helpful answers,
Olivier.
Marc,
Thanks for the link. Your LazyIO monad is really interesting. Do you
know if this construct exists in GHC? (this question was left open in
this thread)
Olivier.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 6/22/07, David Roundy [EMAIL PROTECTED] wrote:
Or make this lazy with:
main = do ...
origLinks - mapM (unsafeInterleaveIO . getLinksAfterImgByAttr ...)
picLinks
--
David Roundy
Department of Physics
Oregon State University
Just for info I used your tip to bring laziness into
Hi all,
I'm playing with signal handlers on Win32. I found a good post on
signal handlers but it works with System.Posix.Signals which on Win32
is empty.
Blog is here: http://therning.org/magnus/archives/285
I tried to adapt this code to GHC.ConsoleHandler, the Win32
counterpart of
I found my mistake. Through my copy/paste I ended up changing a
readMVar into a takeMVar leaving the MVar empty and having the main
thread blocking to read it.
Changed takeMVar to readMVar in doNothing and everything is working fine now.
Sorry for the noise,
Olivier.
Hi all,
I'm trying to write a untab function that would split a string on tabs
and return a list. Code is here.
import Data.List (break, unfoldr)
import Data.Char (String)
untab :: String - [String]
untab s = unfoldr untab' s
untab' :: String - Maybe (String, String)
untab' s | s == =
73 matches
Mail list logo