On Mar 18, 2010, at 21:58 , Daniel Fischer wrote:
Am Freitag 19 März 2010 02:25:47 schrieb Xiao-Yong Jin:
On Fri, 19 Mar 2010 01:22:58 +0100, Daniel Fischer wrote:
core id : 0
cpu cores : 1
It is one of those pathetic single core pentium4 with so
called hyper-threading enabled.
On Mar 18, 2010, at 21:25 , Xiao-Yong Jin wrote:
On Fri, 19 Mar 2010 01:22:58 +0100, Daniel Fischer wrote:
core id : 0
cpu cores : 1
It is one of those pathetic single core pentium4 with so
called hyper-threading enabled. You should have checked the
intel product spreadsheet bef
This looks very interesting, I look forward to checking it out. Implementing
FastCGI has always seemed too daunting a task to undertake; I salute you.
Are you familiar with the wai package? If so, do you believe your package is
amenable to either itself adapting the wai, or having a wrapper built
On Mar 18, 2010, at 15:14 , Roderick Ford wrote:
... so, it looks like I am handling the IO wrong, or else I go
directly to the exitWith instead of returning the IO from "return".
So, I suppose this is normal behavior, but how do you do BOTH. I
guess I should actually be "print"ing the out
Only one small nit here:
On Mar 18, 2010, at 09:58 , Tillmann Rendel wrote:
And we express Point as a GADT using Spherical and Cartesian as
follows.
data Point i
= Cartesian :: Cartesian_coord -> Cartesian_coord -> Point
Cartesian
| Spherical :: Latitude -> Longitude -> Point Spheri
Sorry to bother again. I just cannot figure out how it could compile.
I got compile errors.
Can someone point out what is right code to use a do notion to make a
Parser works.
Thanks in advance.
newtype Pa
Am Freitag 19 März 2010 04:34:53 schrieb zaxis:
> >let f x xs = [x:xs,xs]
> >
> > :t f
>
> f :: a -> [a] -> [[a]]
>
> >:t (>>=) .f
>
> (>>=) .f :: a -> ([[a]] -> [a] -> b) -> [a] -> b
>
> > :t (flip (>>=) .f)
>
> (flip (>>=) .f) :: a -> [[a]] -> [[a]]
>
> Why is the type of `(>>=) .f` and `flip (
Yay! This was a week of hard work. I hope that somebody finds it valuable.
This package is a native implementation of the FastCGI protocol,
allowing Haskell to work with any webserver that supports it. It makes
no attempt to imitate the interface of the cgi-3000 and fastcgi-3000
packages, becaus
On Thu, 2010-03-18 at 20:34 -0700, zaxis wrote:
> >let f x xs = [x:xs,xs]
> > :t f
> f :: a -> [a] -> [[a]]
>
> >:t (>>=) .f
> (>>=) .f :: a -> ([[a]] -> [a] -> b) -> [a] -> b
>
Hmm. You seems to have defined Monad ((->) a).
(>>=) . f == \x -> (>>=) (f x) == \x -> (f x >>=)
1. x :: ∀ a. a fr
Hint: look at the type of flip...
Also, there's a haskell-beginners mailing list. You may wish to post
there rather than asking us every question you get whilst learning
Haskell.
On 19 March 2010 14:34, zaxis wrote:
>
>>let f x xs = [x:xs,xs]
>> :t f
> f :: a -> [a] -> [[a]]
>
>>:t (>>=) .f
>
Am Freitag 19 März 2010 04:24:21 schrieb Erik de Castro Lopo:
> Daniel Fischer wrote:
> > Am Freitag 19 März 2010 02:25:47 schrieb Xiao-Yong Jin:
> > > It is one of those pathetic single core pentium4 with so
> > > called hyper-threading enabled.
> >
> > 'kay, but why does it say
> >
> > processor
>let f x xs = [x:xs,xs]
> :t f
f :: a -> [a] -> [[a]]
>:t (>>=) .f
(>>=) .f :: a -> ([[a]] -> [a] -> b) -> [a] -> b
> :t (flip (>>=) .f)
(flip (>>=) .f) :: a -> [[a]] -> [[a]]
Why is the type of `(>>=) .f` and `flip (>>=) .f` so different ?
Sincerely!
-
fac n = let { f = foldr (*) 1 [1
Daniel Fischer wrote:
> Am Freitag 19 März 2010 02:25:47 schrieb Xiao-Yong Jin:
> >
> > It is one of those pathetic single core pentium4 with so
> > called hyper-threading enabled.
>
> 'kay, but why does it say
>
> processor : 0
> ...
> processor : 1
Hyperthreading is explained her
On Thu, Mar 18, 2010 at 09:13:40AM +0100, Paul Brauner wrote:
> Hi,
>
> I was looking at hoogle documentation when I remembered that there is
> some nice, but quite unusable, feature of squeak (smalltalk) which
> allows you to search function in the library by giving a list of pairs
> of inputs/ou
On Mar 18, 2010, at 9:13 PM, Paul Brauner wrote:
Hi,
I was looking at hoogle documentation when I remembered that there is
some nice, but quite unusable, feature of squeak (smalltalk) which
allows you to search function in the library by giving a list of pairs
of inputs/ouputs.
The MethodFin
Alternatively:
let f ::
f = ...
f' :: a ->
f' _ = f
in f' (undefined :: Int)
On Thu, Mar 18, 2010 at 12:10 PM, Max Bolingbroke
wrote:
> Hi Paul,
>
> You should be able to introduce \Lambda at the source level by writing
> a type signature with an explicit "forall". Similarly you
On Sun, Mar 14, 2010 at 9:03 AM, david fries wrote:
> Hello Café
>
> Some time ago I wrote a parser for a project of one our customers. The
> format was proprietary and binary. The data was structured as a tree
> with tables pointing to sub tables farther in the file. (Well actually
> there was o
Stephen Tetley wrote:
hi wren
Where I've used it, random access does seem conceptual more
satisfactory than trying to avoid it.
I was thinking more about performance issues (avoiding disk seeks) which
would also alleviate the problem of needing random access when it's not
available.
For
Am Freitag 19 März 2010 02:56:36 schrieb zaxis:
> %cat Test.hs
> module Test(mcombs)
> where
> import Data.List
>
> mcombs = foldr (flip (>>=) . f) [[]] where f x xs = [x:xs,xs]
>
> %ghc -c -O2 Test.hs
> %ghci
>
> > :l Test
>
> Ok, modules loaded: Test.
>
> > :set +s
>
> length $ mcombs [1..20]
>
Am Freitag 19 März 2010 02:25:47 schrieb Xiao-Yong Jin:
> On Fri, 19 Mar 2010 01:22:58 +0100, Daniel Fischer wrote:
> > core id : 0
> > cpu cores : 1
>
> It is one of those pathetic single core pentium4 with so
> called hyper-threading enabled.
'kay, but why does it say
processor
%cat Test.hs
module Test(mcombs)
where
import Data.List
mcombs = foldr (flip (>>=) . f) [[]] where f x xs = [x:xs,xs]
%ghc -c -O2 Test.hs
%ghci
> :l Test
Ok, modules loaded: Test.
> :set +s
length $ mcombs [1..20]
1048576
(0.06 secs, 56099528 bytes)
> length $ mcombs [1..50]
^CInterrupted.
On Fri, 19 Mar 2010 01:22:58 +0100, Daniel Fischer wrote:
> core id : 0
> cpu cores : 1
It is one of those pathetic single core pentium4 with so
called hyper-threading enabled. You should have checked the
intel product spreadsheet before investing such an old cpu.
--
Jc/*_
Am Freitag 19 März 2010 00:56:15 schrieb Erik de Castro Lopo:
> Daniel Fischer wrote:
> > 3.06GHz Pentium 4, 2 cores.
>
> Do you have more info on that? Try:
>
> grep 'model name' /proc/cpuinfo
Well,
$ cat /proc/cpuinfo
processor : 0
Daniel Fischer wrote:
> 3.06GHz Pentium 4, 2 cores.
Do you have more info on that? Try:
grep 'model name' /proc/cpuinfo
The original Pentium 4 (eg "Intel(R) Pentium(R) 4 CPU 3.00GHz") had
hyperthreading which was actually pretty pathetic for parallelism.
The Core 2 Duos (eg "Intel(R) Core
Matthias Reisner schrieb:
Thanks, I missed that the flags are set dynamically if a dependency
cannot be satisfied.
Only cabal-install does this, plain Cabal only takes flags that were set
by the user.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskel
Am Donnerstag 18 März 2010 22:44:55 schrieb Simon Marlow:
> On 17/03/10 21:30, Daniel Fischer wrote:
> > Am Mittwoch 17 März 2010 19:49:57 schrieb Artyom Kazak:
> >> Hello!
> >> I tried to implement the parallel Monte-Carlo method of computing Pi
> >> number, using two cores:
> >
> >
> >
> >> But
>Right now, the bottleneck of my program is in binarySearch', the function
must be called a few billion times.
>Do you have any ideas on how to improve the performance of this function?
Bast solution for speeding up is to write it in assembler!
Ragards, Andrey
--
View this message in context:
z_axis:
>
> Erlang has yaws (http://yaws.hyber.org/)
> Scala has lift (http://liftweb.net/)
> Python has django (http://www.djangoproject.com/)
> Ruby has rails (http://rubyonrails.org/)
>
> How about haskell ? Is there any similar framework, which should be steady,
> powerful and easy to use, in
Am Donnerstag 18 März 2010 22:34:48 schrieb Andrew Coppin:
> Job Vranish wrote:
> > Hoogle is a great tool for finding haskell functions:
> >
> > http://www.haskell.org/hoogle/
> >
> > You can punch in the type of a function you want and it will give you
> > a list of functions that might do what y
Hi, I think that Turbinado is no longer active since the author is
"leaving Haskell" (unless someone will adopt it)
http://www.alsonkemp.com/haskell/reflections-on-leaving-haskell/
-Keith
On Wed, Mar 17, 2010 at 5:25 PM, Hugo Gomes wrote:
> There is also turbinado. Im not sure about the current
On 19/03/2010, at 08:48, Daniel Fischer wrote:
> Am Donnerstag 18 März 2010 21:57:34 schrieb Daniel Fischer:
>>
>> Contrary to my expectations, however, using unboxed arrays is slower
>> than straight arrays (in my tests).
>>
>
> However, a few {-# SPECIALISE #-} pragmas set the record straight
Stephen Tetley wrote:
On 18 March 2010 21:34, Andrew Coppin wrote:
Is there a tool anywhere which can figure out how to construct a function
with a specific type signature? Hoogle works if the thing you seek is a
single function, but not so much if you need to throw several functions
togeth
On 18 March 2010 21:34, Andrew Coppin wrote:
> Is there a tool anywhere which can figure out how to construct a function
> with a specific type signature? Hoogle works if the thing you seek is a
> single function, but not so much if you need to throw several functions
> together.
>
Hi Andrew
T
Am Donnerstag 18 März 2010 21:57:34 schrieb Daniel Fischer:
>
> Contrary to my expectations, however, using unboxed arrays is slower
> than straight arrays (in my tests).
>
However, a few {-# SPECIALISE #-} pragmas set the record straight.
Specialising speeds up both, boxed and unboxed arrays, si
On 17/03/10 21:30, Daniel Fischer wrote:
Am Mittwoch 17 März 2010 19:49:57 schrieb Artyom Kazak:
Hello!
I tried to implement the parallel Monte-Carlo method of computing Pi
number, using two cores:
But it uses only on core:
We see that our one spark is pruned. Why?
Well, the problem
Daniel Fischer wrote:
If it's called often, and the arrays are 0-based and Int-indexed,
import Data.Array.Base (unsafeAt)
and replacing ! with `unsafeAt` should give a speed-up, though probably not
terribly much. If you don't need the polymorphism and your array elements
are unboxable, using
Job Vranish wrote:
Hoogle is a great tool for finding haskell functions:
http://www.haskell.org/hoogle/
You can punch in the type of a function you want and it will give you
a list of functions that might do what you need.
Generalizing the types a bit usually helps. Searching for either m a
Hoogle is a great tool for finding haskell functions:
http://www.haskell.org/hoogle/
You can punch in the type of a function you want and it will give you a list
of functions that might do what you need.
Generalizing the types a bit usually helps. Searching for either m a -> n m
a or IO a ->
Am Donnerstag 18 März 2010 20:49:30 schrieb Daniel Fischer:
> Am Donnerstag 18 März 2010 19:59:33 schrieb Arnoldo Muller:
> > Hello!
> >
> > I am trying to implement a binary search function that returns the
> > index of an
> > exact or the (index + 1) where the item should be inserted in an array
Hello,
In order to build (cabal install HDBC-mysql) the HDBC-mysql package, I am
having to make the following changes:
(1) I had to change the mysql (5.1.45 community distrib msi) to use a wrapper
exe on the mysql_config.pl and put this in c:\program files\mysql\bin since
although the c:\p
Am Donnerstag 18 März 2010 19:59:33 schrieb Arnoldo Muller:
> Hello!
>
> I am trying to implement a binary search function that returns the index
> of an
> exact or the (index + 1) where the item should be inserted in an array
> if the item to be searched is not found (I am not trying to insert dat
Yes, THANKS!! But my other problem was, that once I get it to compile, I get
nothing output:
C:\Program Files\MySQL\bin>ghc --make -o mysql_config.exe main.hs[1 of 1]
Compiling Main ( main.hs, main.o )Linking mysql_config.exe ...
C:\Program Files\MySQL\bin>mysql_config --libs
C:\Prog
Hello!
I am trying to implement a binary search function that returns the index of
an
exact or the (index + 1) where the item should be inserted in an array if
the item to be searched is not found (I am not trying to insert data in the
array) .
Right now, the bottleneck of my program is in binary
This compiles:
import System.Environment(getArgs)
import System.Process(readProcessWithExitCode)
import System.Exit(exitWith,ExitCode(ExitSuccess))
main = do
args <- getArgs
(ecode,out,err) <- readProcessWithExitCode
"c:\\Perl64\\bin\\perl.exe" ("C:\\Program
Files\\MySQL\\scripts\\mysql_confi
this will be EASY for you to fix, I am sure... what the heck am I doing wrong:
import System.Environment(getArgs)import
System.Process(readProcessWithExitCode)import System.Exit(exitWith)
main = do args <- getArgs (ecode,out,err) <- readProcessWithExitCode
"c:\\Perl64\\bin\\perl.exe" ("C:\
On Wed, Mar 17, 2010 at 09:20:49PM -0700, Darrin Chandler wrote:
> Trying to get up to speed in Haskell, I'm playing with doing some
> abstraction in data types. Specifically, I have this:
>
> type Cartesian_coord = Float
>
> type Latitude = Float
> type Longitude = Float
>
> data Point= Ca
On Thu, Mar 18, 2010 at 12:17 PM, John Meacham wrote:
> On Wed, Mar 17, 2010 at 09:20:49PM -0700, Darrin Chandler wrote:
>> data Point = Cartesian (Cartesian_coord, Cartesian_coord)
>> | Spherical (Latitude, Longitude)
>
> Just a quick unrelated note, though you are probably aware
On Wed, Mar 17, 2010 at 09:20:49PM -0700, Darrin Chandler wrote:
> data Point= Cartesian (Cartesian_coord, Cartesian_coord)
> | Spherical (Latitude, Longitude)
Just a quick unrelated note, though you are probably aware of this,
doing
> data Foo = Foo (X,Y)
means something subtl
On 18 March 2010, Gregory Collins wrote with possible deletions:
> ParsecT has a MonadIO instance:
>
> class Monad m => MonadIO m where
> liftIO :: IO a -> m a
Thank you! I didn't see this. Great!
Kind regards,
Stefan
--
Stefan Klinger o/klette
On Thu, Mar 18, 2010 at 10:37 AM, Stefan Klinger
wrote:
> Hello!
>
> Nice, Parsec 3 comes with a monad transformer [1]. So I thought I could
> use IO as inner monad, and perform IO operations during parsing.
>
> But I failed. Monad transformers still bend my mind. My problem: I
> don't see a funct
Am Donnerstag 18 März 2010 04:29:53 schrieb zaxis:
> The time is wasted to run combination even if use `combination (x:xs) =
> concat [(x:ys), ys] | ys <- combination xs] ' instead.
> in ghci
>
> >combination [1..20]
>
> will wait for a long time ...
Hm, really?
Prelude> :set +s
Hi Paul,
You should be able to introduce \Lambda at the source level by writing
a type signature with an explicit "forall". Similarly you can then
instantiate these \Lambdas by using a type signature which is an
instance of the foralled type at the use site:
~~~
-- id will get a \Lambda in Core
i
A phantom type might do what you want:
-- notice the type parameter on point that isn't used in the type
data Point a = Cartesian (Cartesian_coord, Cartesian_coord)
| Spherical (Latitude, Longitude)
-- make some dummy types
data SphericalP
data CartesianP
--make some c
Thanks to those who responded. Solutions that didn't work for my
specific case still taught me more about expressing things in the
Haskell type system.
And... this particular response is extremely well written and useful.
You've made the issues involved very clear and understandable. I really
appr
Stefan Klinger writes:
> Hello!
>
> Nice, Parsec 3 comes with a monad transformer [1]. So I thought I could
> use IO as inner monad, and perform IO operations during parsing.
>
> But I failed. Monad transformers still bend my mind. My problem: I
> don't see a function to actually lift the IO oper
Hello!
Nice, Parsec 3 comes with a monad transformer [1]. So I thought I could
use IO as inner monad, and perform IO operations during parsing.
But I failed. Monad transformers still bend my mind. My problem: I
don't see a function to actually lift the IO operation into the
ParsecT. It should be
I'm also on Mac Leopard. I tried installing ghc 6.12 with Haskell
Platform 2009.2.9.2-i386.dmg (ghc 6.10.4) for some reason, and ran into
a bunch of problems (problems to me, anyway). I ended up uninstalling 6.12
and reinstalling haskell platform. Uninstall is easy, there is an
uninstaller scrip
Hi,
I'm not sure if this is the right place to ask because the problem may
lay in my Apache or system configuration.
I use the Apache proxy module to forward a HTTP request from port 80 to
a Happstack application listening on port 8000 via `ProxyPass /
http://localhost:8000/' on Windows XP.
Am Donnerstag 18 März 2010 05:03:28 schrieb Alexander Solla:
> On Mar 17, 2010, at 8:33 PM, zaxis wrote:
> > `allPairs list = [(x,y) | x <- list, y <- list] ` is not what
> > `combination`
> > does !
> >
> >> let allPairs list = [(x,y) | x <- list, y <- list]
> >> allPairs [1,2,3]
> >
> > [(1,1),(
Hi again,
is there a way in some haskell extension to explicit (system F's) big
lambdas and (term Type) applications in order to help type inference?
If not: is there a way to provide ghc directly with core code before
the type checking phase?
Paul
___
On Thu, Mar 18, 2010 at 01:49:20PM +0100, Janis Voigtländer wrote:
> Paul Brauner schrieb:
> >Hi,
> >
> >I was looking at hoogle documentation when I remembered that there is
> >some nice, but quite unusable, feature of squeak (smalltalk) which
> >allows you to search function in the library by giv
Paul Brauner wrote:
feature [...] to search function in the library by giving a list of pairs
of inputs/ouputs. [...]
But, piggibacking such a feature on top of hoogle would surely be more
efficient:
1. infer types for arguments and outout
2. look for matching functions using google
3. te
Sounds great!
Here are a few feature requests:
The I/O pair ([-1,4,-6],[1,4,6]) could yield "map abs" as a suggestion :)
The pairs ('a',False) and ('*',True) could yield "not . isAlpha" etc.
I realize that this (at least the composition part) will probably
increase complexity beyond what's acce
I was just reading through the discussion, and Tillmann, your reply is one
of the best written descriptions I've ever seen here. (or even in any other
mail list!)
Of course, I see many good replies here, but they almost always turn out to
be irrelevant to the original question. Yours on the other
Darrin Chandler wrote:
data Point = Cartesian (Cartesian_coord, Cartesian_coord)
| Spherical (Latitude, Longitude)
type Center = Point
type Radius = Float
data Shape = Circle Center Radius
| Polygon [Point]
This obviously stinks since a Polygon could c
Paul Brauner schrieb:
Hi,
I was looking at hoogle documentation when I remembered that there is
some nice, but quite unusable, feature of squeak (smalltalk) which
allows you to search function in the library by giving a list of pairs
of inputs/ouputs.
When I'm saying that it is quite unusable,
As you may know, community.haskell.org (also hosting code.h.o,
trac.h.o, etc) exists as a resource to enable Haskellers to publish
and collaborate on open source projects.
The current admin team for this virtual host finds itself with a lack
of time (and occasionally expertise) to maintain
As Daniel pointed out earlier, this may be of a little bit of help:
http://haskell.org/ghc/docs/latest/html/libraries/base-4.2.0.0/src/Data-List.html#subsequences
On 18 March 2010 04:03, Alexander Solla wrote:
>
> On Mar 17, 2010, at 8:33 PM, zaxis wrote:
>
>
>> `allPairs list = [(x,y) | x <-
Lakshmi Narasimhan writes:
> *Leksah* is the Haskell IDE of choice.
Is it? Really?
Whilst some people might find it great to have a Haskell-oriented IDE
(even better to have it written in Haskell), that kind of a statement
demands proof IMHO. I for one don't recall any polls of this nature.
Fi
hi wren
Where I've used it, random access does seem conceptual more
satisfactory than trying to avoid it.
Well designed binary formats are deterministic - so wherever you are
inside the file you should know what you are parsing. One example of
this determinism is that parsing "local" alternatives
Leksah - 0.8.0.1 rpms for Fedora 12 now available
http://leksah.org/download.html
About Leksah:
*Leksah* is the Haskell IDE of choice. It is written in Haskell, uses Gtk,
and runs on Linux, Windows and Mac OS X. Leksah is a practical tool to
support the Haskell development process. It requires th
On 18 March 2010 05:48, Brandon S. Allbery KF8NH wrote:
> They can be mixed only with significant effort. And you can't really
> prevent it once your users know the magic of existential quantification;
> *but* those lists won't typecheck when passed to your routines expecting a
> Polygon, becaus
Hi,
I was looking at hoogle documentation when I remembered that there is
some nice, but quite unusable, feature of squeak (smalltalk) which
allows you to search function in the library by giving a list of pairs
of inputs/ouputs.
When I'm saying that it is quite unusable, I mean that squeak has t
73 matches
Mail list logo