Hello Andy,
Tuesday, December 19, 2006, 12:35:28 AM, you wrote:
and concluded that there are only 2 tasks which speed is dependent on
Maybe it would not be a bad idea to check the number of cache misses,
branch mispredictions etc. per instruction executed for the shootout
apps, in
Hello Neil,
Monday, December 18, 2006, 11:04:59 PM, you wrote:
let's go further in this long-term discussion. i've read Shootout problems
It's more than 2 tasks that are dependant on the code generated by the
compiler.
can you give me their names, please? :)
And in my opinion, generally
Hello Tomasz,
Tuesday, December 19, 2006, 2:35:35 AM, you wrote:
Haskell can't provide fast execution speed unless very low-level
programming style is used (which is much harder to do in Haskell than in C,
see one of my last messages for example) AND jhc compiler is used
I have experienced
Hello Tomasz,
Tuesday, December 19, 2006, 2:11:37 AM, you wrote:
no. it seems that you never tried to write such code and believe someone
else who's said that such code may be written. try to write something very
simple, like summing bytes in memory buffer, before you will do any
conclusions
On Tue, Dec 19, 2006 at 12:31:01PM +0300, Bulat Ziganshin wrote:
it was because C++ program was not optimized at maximum, yes? :) we are
saying about PGP, are you believe that its code isn't yet optimized?
We are talking about _useful_ programs. A program doesn't have to be
blindingly fast to
Hello Tomasz,
Tuesday, December 19, 2006, 12:33:54 PM, you wrote:
it was because C++ program was not optimized at maximum, yes? :) we are
saying about PGP, are you believe that its code isn't yet optimized?
We are talking about _useful_ programs. A program doesn't have to be
blindingly fast
Hello all,
I have two datatypes, both representing the same language. However, one is a
flattened version of the other. For instance:
data Flattened =
Const Flattened
| Sum Flattened Flattened
| ...
| IntConst Int
| RealConst Float
| BoolConst Bool
| Void
data Term =
Const
On Mon, Dec 18, 2006 at 20:11:05 -0500, Brandon S. Allbery KF8NH wrote:
On Dec 18, 2006, at 18:26 , [EMAIL PROTECTED] wrote:
Tomasz Zielonka [EMAIL PROTECTED] writes:
On Mon, Dec 18, 2006 at 11:57:59PM +0100,
[EMAIL PROTECTED] wrote:
... but I wonder: GPG, AFAIK undertakes some special
On 18 dec 2006, at 18.22, Stefan O'Rear wrote:
I can't see how such a generalization could look like, especially
since
maybe can be used with arbitrary monad:
maybe (fail Nothing) return
Well, that???s a possible implementation of a maybeToM. The
question is:
Is it useful enough for
Tomasz Zielonka schrieb:
On Mon, Dec 18, 2006 at 12:14:36AM +0100, Joachim Durchholz wrote:
Magnus Therning schrieb:
There is of course the possibility that Haskell would bring a whole slew
of yet-to-be-determined security issues. I doubt it will be worse than
C though.
Haskell might be prone
why you (and Donald) don't want to understand me. i
say that imperative
Haskell code is more efficient than pure (and
especially lazy) one and that
even such code in ghc is slower than C equivalent.
I think the concern about execution speed of
algorithms is a fairly recent topic. At least,
Marc A. Ziegert schrieb:
Comments and suggestions welcome :-)
hi Joachim.
i have some suggestions:
apache:
use fastcgi instead of hacking an own http-server.
http://www.cs.chalmers.se/~bringert/darcs/haskell-fastcgi/doc/
http://www.cs.chalmers.se/~bringert/darcs/cgi-compat/doc/
Ah, that's
On Tue, Dec 19, 2006 at 12:33:18PM +0300, Bulat Ziganshin wrote:
Are you claiming that every (even slightly) non-trivial problem
(or algorithm) results in a mess of IO code in Haskell? Come on, admit
that you like to program in imperative style, and that's why you end up
with such mess ;-)
On Tue, Dec 19, 2006 at 12:39:31PM +0300, Bulat Ziganshin wrote:
Tuesday, December 19, 2006, 12:33:54 PM, you wrote:
it was because C++ program was not optimized at maximum, yes? :) we are
saying about PGP, are you believe that its code isn't yet optimized?
We are talking about _useful_
On Tue, Dec 19, 2006 at 01:24:36PM +0100, Tomasz Zielonka wrote:
I see a lack of will to understand on your part (the same thing you see
in me :-). My statements are not contradictory: Some of the programs I
was talking about were throw-away programs, for one use, and I would be
satisfied even
Iavor Diatchki [EMAIL PROTECTED] wrote:
class IxMonad m where
(=) :: m i j a - (a - m j k b) - m i k b
ret:: a - m i i a
And just for fun we can define another indexed monad:
state that supports strong updates (i.e., the type
of the state can change as you compute):
Hello Tomasz,
Tuesday, December 19, 2006, 3:19:52 PM, you wrote:
why you (and Donald) don't want to understand me. i say that imperative
Haskell code is more efficient
Your statement is too general to deserve answering.
can you provide couter-examples, or just believe? i mean
On Mon, Dec 18, 2006 at 04:59:45PM +, Joachim Breitner wrote:
Well, that???s a possible implementation of a maybeToM. The question is:
Is it useful enough for a name on it???s own?
OK, I agree it's sufficiently useful, and it's a generalization of
Data.Maybe.maybeToList. Perhaps we could
Hello Tomasz,
Tuesday, December 19, 2006, 3:24:36 PM, you wrote:
in me :-). My statements are not contradictory: Some of the programs I
was talking about were throw-away programs, for one use, and I would be
satisfied even if they ran 10x-100x slower than they did, as long as
you was 101st
Sorry, I sent the email to the wrong place and messed up the code
(it's early :)). Take two:
transform = everywhere (mkT transform')
where transform = (\Term a-Flattened a)
`extT` (Contstant a-Flattened a)
On 12/19/06, Vyacheslav Akhmechet [EMAIL PROTECTED] wrote:
Hmmm. That's interesting. I have a slightly different problem and I
don't know if it's relevant or not. I have nested algebraic data types
for things like expressions with terms and operators and whatever too,
and some of my functions do a transformation that removes all instances
of particular
On Mon, Dec 18, 2006 at 06:52:41PM -0800, Iavor Diatchki wrote:
Hi David,
I don't think you need functional dependencies or associated
type synonyms to get your example to work. In the past,
I have used the abstraction that you are describing (I call it
an indexed monad and it has a nice
Hi Mark,
nested type, but to do that I seem to have to create a whole other
near-copy of the data declarations with slightly different names and the
occasional constructor missing. I wonder if there's a better way.
Instead of getting the type system to enforce it, you can write
annotations
David Roundy wrote:
The trouble is that your solution doesn't allow you to use do-notation with
the IxMonad. And if you did allow yourself to use do-notation by rebinding
(=), etc, then you wouldn't be able to use ordinary monads with
do-notation in the same module. That's what makes things
Hi,
Hey folks, I'm sure you can all agree :)
Just (if you want to) re-list what you want to say ... each mail is a
step further incomprehension for each participant in this thread
(while I think each position of you is not so different).
It would be a shame if the haskell mailing list ends
Kirsten Chevalier wrote:
It's not as if this is the first time that this has been suggested,
but some people have suggested that a practical book about Haskell
would be a good idea. I agree. Some people have also suggested that
the right moment for this hasn't arrived yet, and I see that as a
John Goerzen wrote:
I know this is a late reply, but some of us tried to get something like
this off the ground a little while back.
darcs get --partial http://software.complete.org/haskell-v8/
My brain is fried. Make that:
darcs get --partial http://darcs.complete.org/haskell-v8
Hi,
the following program
main = readFile nonexistent = putStr
is meant to produce an exception. When compiled with GHC 6.4, it
outputs the *** Exception... string to stderr, which makes me happy.
However, when run with runghc6 or runhugs, the message is sent to
stdout, which makes me sad.
Is
On Tue, Dec 19, 2006 at 10:08:12AM -0500, Jacques Carette wrote:
David Roundy wrote:
The trouble is that your solution doesn't allow you to use do-notation with
the IxMonad. And if you did allow yourself to use do-notation by rebinding
(=), etc, then you wouldn't be able to use ordinary
On the FD impasse:
Witness.hs:33:0:
Couldn't match expected type `m'' (a rigid variable)
against inferred type `RealWitness a a''
`m'' is bound by the type signature for `' at Witness.hs:11:29
When using functional dependencies to combine
Witness WitnessReally a
On Tue, Dec 19, 2006 at 12:52:17PM +0100, Joachim Durchholz wrote:
Tomasz Zielonka schrieb:
On Mon, Dec 18, 2006 at 12:14:36AM +0100, Joachim Durchholz wrote:
Haskell might be prone to denial-of-service attacks. E.g. sending it
data that cause it to evaluate an infinite data structure.
Hi Joachim,
Why? In case the strictness analyzer was buggy?
I'd be perfectly happy if that analysis were just a note saying run ghc
with such-and-these options and inspect the intermediate code for
function foo to see that the strictness analyzer determined it will
always terminate.
I
[As recently seen on LtU - http://lambda-the-ultimate.org/node/1919] An
amazing paper
http://www.dbmcintyre.pwp.blueyonder.co.uk/index_f/menu_f/j_f/apl95.pdf
on composition as seen from APL and J. The terminology (using verbs,
nouns, adverbs, etc) is _so_ much more evocative than the
Tomasz Zielonka [EMAIL PROTECTED] writes:
Anyway, don't concentrate on this particular example. All I say is that:
- sometimes I get efficient programs in Haskell right away (I my case
quite often, but YMMV)
- sometimes efficiency doesn't matter
I don't think it is contradictory,
Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes:
You could just mlock() everything allocated by the RTS...
Brute force. :-) Certainly the most simple way to do it. But is that
option already here (say in ghc), or would one have to patch the
runtime for that?
Note also that this requires
Hi
Obviously when
Cost(Upgrade) Cost(Optimisation)
for the customer. Those costs are
Cost(Upgrade) = Price of more memory or new PC which is fast enough.
Cost(Optimisation) = Hours_spent * Fee_per_Hour / N
You are talking closed source commercial software for the masses. I
don't
First, I believe that this paper
http://homepages.inf.ed.ac.uk/ratkey/param-notions.pdf
is intimately related to WitnessMonad.
David Roundy wrote:
Rebinding the do notation is at least reasonably clean, it's just that we
don't want to lose the ability to mix with ordinary monads.
This
On 12/19/06, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Tomasz Zielonka [EMAIL PROTECTED] writes:
Anyway, don't concentrate on this particular example. All I say is that:
- sometimes I get efficient programs in Haskell right away (I my case
quite often, but YMMV)
- sometimes efficiency
Bulat Ziganshin [EMAIL PROTECTED] writes:
Hello Tomasz,
Tuesday, December 19, 2006, 3:19:52 PM, you wrote:
why you (and Donald) don't want to understand me. i say that imperative
Haskell code is more efficient
Your statement is too general to deserve answering.
can you provide
Hello,
PS: Talking about smart programs: Is there a library anywhere that
could be used to implement expert systems in Haskell or to
evaluate Horn clauses in Prolog style?
Here is one possible starting point is the backtracking monad transformer
by Oleg et al:
On Tue, Dec 19, 2006 at 07:14:09PM +0100, [EMAIL PROTECTED] wrote:
Tomasz Zielonka [EMAIL PROTECTED] writes:
Anyway, don't concentrate on this particular example. All I say is that:
- sometimes I get efficient programs in Haskell right away (I my case
quite often, but YMMV)
-
Tomasz Zielonka schrieb:
On Tue, Dec 19, 2006 at 12:52:17PM +0100, Joachim Durchholz wrote:
Tomasz Zielonka schrieb:
On Mon, Dec 18, 2006 at 12:14:36AM +0100, Joachim Durchholz wrote:
Haskell might be prone to denial-of-service attacks. E.g. sending it
data that cause it to evaluate an
Reto Kramer wrote:
The code below does not compile unless the bar function is
annotated with a suitable constraint on the class of the formal
parameter.
class (C a)
data (C foo) = XY foo = X foo | Y foo
bar :: a - XY a
bar aFoo = X aFoo
As suggested, this works:
bar :: (C a) = a - XY a
On Tue, 2006-12-19 at 09:25 -0500, Mark T.B. Carroll wrote:
Hmmm. That's interesting. I have a slightly different problem and I
don't know if it's relevant or not. I have nested algebraic data types
for things like expressions with terms and operators and whatever too,
and some of my functions
Joachim Durchholz wrote:
Trying to fully evaluate an infinite data structure will result in
looping or memory exhaustion, and you have that possibilities in almost
all languages.
Yes, but I suspect that Haskell makes it easier to make that kind of bug.
Worse, it's easy to introduce this
Hello John,
Tuesday, December 19, 2006, 7:16:48 PM, you wrote:
It's not as if this is the first time that this has been suggested,
but some people have suggested that a practical book about Haskell
would be a good idea. I agree. Some people have also suggested that
the right moment for this
The function takes a pointer to an integer, prints its value and returns the
increment.
void cl_inc(int *i){
printf(changing int from %d to %d, *i, (++i));
}
I've managed it by using this code:
{#fun pure cl_inc
{alloca `CInt' peek*}
2006/12/19, Neil Mitchell [EMAIL PROTECTED]:
Hi Neil,
Hi Joachim,
Why? In case the strictness analyzer was buggy?
I'd be perfectly happy if that analysis were just a note saying run ghc
with such-and-these options and inspect the intermediate code for
function foo to see that the
Hi minh thu,
Lazy semantics - equational reasoning ?
I thought that : lack of mutable state - equational reasoning.
For instance, I think to data flow variable in Oz (whcih I really
don't know much / never used) : if a (Oz managed) thread attemps to
read the value of an unbound (data flow)
On Tue, 19 Dec 2006 21:34:06 +0100, you wrote:
Lazy semantics - equational reasoning ?
I thought that : lack of mutable state - equational reasoning.
For instance, I think to data flow variable in Oz (whcih I really
don't know much / never used) : if a (Oz managed) thread attemps to
read the
On Tue, Dec 19, 2006 at 08:42:06PM +, Neil Mitchell wrote:
Lack of mutable state, referentially transparent and laziness all help
with equational reasoning. Inlining is much easier in a lazy language
- and inlining is really handy for equational reasoning.
Imagine:
not_term = non_term
Hi
I don't know if any actual language does this,
What, that is strict and would like to inline things for performance?
There is a reason they can't do this.
but your inlining problem can
be solved by letting _|_ = arbitrary behaivor.
So would you allow folding? (inlining = unfolding)
2006/12/19, Neil Mitchell [EMAIL PROTECTED]:
Hi minh thu,
Lazy semantics - equational reasoning ?
I thought that : lack of mutable state - equational reasoning.
For instance, I think to data flow variable in Oz (whcih I really
don't know much / never used) : if a (Oz managed) thread attemps
On Tue, Dec 19, 2006 at 08:57:33PM +, Neil Mitchell wrote:
I don't know if any actual language does this,
What, that is strict and would like to inline things for performance?
There is a reason they can't do this.
I had intended for that to apply to my proposal - I know real strict
On 12/2/06, Chris Kuklewicz [EMAIL PROTECTED] wrote:
Grady Lemoine wrote:
I've been playing around with Dan Piponi's work on automatic
differentiation...
I played with such things, as seen on the old wiki:
http://haskell.org/hawiki/ShortExamples_2fSymbolDifferentiation
I missed this while I
2006/12/19, Brandon S. Allbery KF8NH [EMAIL PROTECTED]:
On Dec 19, 2006, at 16:03 , minh thu wrote:
2006/12/19, Neil Mitchell [EMAIL PROTECTED]:
not_term = non_term
f x = 12
Now evaluating:
main = f non_term
In a lazy language the value is always 12, in a strict language its
always
Seth Gordon schrieb:
Joachim Durchholz wrote:
Trying to fully evaluate an infinite data structure will result in
looping or memory exhaustion, and you have that possibilities in almost
all languages.
Yes, but I suspect that Haskell makes it easier to make that kind of bug.
Worse, it's easy to
Hi,
A weird question, what does the 1 element tuple look like?
() -- 0 element tuple
(,) a b -- 2 element tuple
(,,) a b c -- 3 element tuple
() a - meaningless
(a) - a in brackets
GHC has the 1 element unboxed tuple, (# a #), and all the other sizes
unboxed as well, but how would you
On Tue, Dec 19, 2006 at 10:41:56PM +, Neil Mitchell wrote:
A weird question, what does the 1 element tuple look like?
() -- 0 element tuple
(,) a b -- 2 element tuple
(,,) a b c -- 3 element tuple
() a - meaningless
(a) - a in brackets
...
Thoughts?
Python uses the syntax (foo,) to
On Tue, Dec 19, 2006 at 10:41:56PM +, Neil Mitchell wrote:
Hi,
A weird question, what does the 1 element tuple look like?
() -- 0 element tuple
(,) a b -- 2 element tuple
(,,) a b c -- 3 element tuple
() a - meaningless
(a) - a in brackets
GHC has the 1 element unboxed tuple, (# a #),
Pattern matching goes back to Burstall and Darlington's work in the 1970's.
As for x:xs, the xs is meant to be the plural of x, and is
pronounced exs (I guess...).
Similarly, n:ns is one n followed by many more ens. Make sense?
(By the way, : is often pronounced followed by.)
-Paul
Quoth Toby Hutton, nevermore:
Does anyone know why (x:xs)? Is xs meant to be a synonym for 'excess'?
I've seen it said somewhere (possibly Hudak's _Haskell School of
Expression_) that xs should be read as the plural of x. Although
personally I always gravitate towards the excess notion,
Hi,
On 12/19/06, Jacques Carette [EMAIL PROTECTED] wrote:
First, I believe that this paper
http://homepages.inf.ed.ac.uk/ratkey/param-notions.pdf
is intimately related to WitnessMonad.
This paper definitely seems to be related. Thanks for the link!
-Iavor
Neil,
On Tue, Dec 19, 2006 at 10:41:56PM +, Neil Mitchell wrote:
A weird question, what does the 1 element tuple look like?
Could tuples be implemented as an HList?
singleton = (`hCons` hNil)
-Greg
___
Haskell-Cafe mailing list
Maybe we should take to heart lessons learned from the Erlang
development experience in Joe Armstrong's Erlang Tutorial:
1 Concentrate on essential features
2 You need a protector
3 You will never displace an existing technology if it works
-- Wait for the failures
4 Move quickly into
Neil Mitchell wrote:
Hi,
A weird question, what does the 1 element tuple look like?
() -- 0 element tuple
(,) a b -- 2 element tuple
(,,) a b c -- 3 element tuple
() a - meaningless
(a) - a in brackets
GHC has the 1 element unboxed tuple, (# a #), and all the other sizes
unboxed as well, but
On Tue, Dec 19, 2006 at 11:35:49PM -, Brian Hulley wrote:
Tuples represent dimensionality therefore a 1-element tuple is just a
1-dimensional value ie the value itself hence a == (a) == ((a)) == (((a)))
That is true in a strict language, and for unboxed (unlifted) types, but in
haskell
Hi
Python uses the syntax (foo,) to denote a singleton tuple (that is an extra
comma at the end); quoting the python tutorial Ugly, but effective.
Yes, I thought of that, the issue is:
(a,b) is considered syntactic sugar for (,) a b
(a,) is syntactic sugar for...
And the place I'm
Andy,
The GHC head can currently build against PAPI[1], a library for
gathering CPU statistics. At the moment you can only gather such
statistics for AMD Opteron but it shouldn't be difficult to port it
to other CPUs after a bit of browsing around the PAPI docs.
Installing PAPI requires
---
Haskell Weekly News
http://sequence.complete.org/hwn/20061220
Issue 54 - December 20, 2006
---
Welcome to issue 54 of HWN, a weekly newsletter
Noticed this in the blargh-o-sphere, some people might be interested:
http://www.nnseek.com/e/comp.lang.python/lisp_python_programmers_among_others_wanted_20059193t.html
Senior applications developer: Our advanced applications work is
currently being done in Common Lisp, but that
Fellow Haskellers,
I have a package that uses some light typeclass hackery to automaticly
build parsing algorithms based on the type of a function.
I was recently informed that my package doesn't compile on GHC 6.6 due
to the new restrictions on FD resolution; in particular I have instance
instance CommandFunction (Sh st ()) st where
^
I think your first argument (on which the second has a functional
dependence) does not determine the second argument, since it makes use
of st in the first argument. This strikes me as a likely place to begin.
Dan
A weird question, what does the 1 element tuple look like?
there is one in Control.Monad.Identity:
Identity 1
i miss the short version
newtype Id x = x
writing (1,) is not that well defined; how do you want to use its constructor
alone?
writing (1;) may be the solution, i think. (;) could
hi guys,
I was just wondering if anyone is interested is a
quasi-project of rewriting the Prelude (only
shrinking it as measured by the total number of names
imported, read along...)
the idea is (just to be substantially different in
approach) to develop an alternate history of
Haskell.
take map
75 matches
Mail list logo