Melissa O'Neill wrote:
Clearly, simplifying the second version of primes into the first by
performing CSE actually makes the code much *worse*. This CSE-
makes-it-worse property strikes me as interesting.
So, is it interesting...? Has anyone worked on characterizing CSE
space leaks (and
I wrote:
This CSE-makes-it-worse property strikes me as interesting.
Has anyone worked on characterizing CSE space leaks (and avoiding
CSE in those cases)?
and Simon replied:
You might find chapter 23 The pragmatics of graph reduction in my
1987 book worth a look. It gives other
It seems to me (unless I've missed something?) that this method generates
the power set of the
original multiset (i.e. all subsets) rather than partitions.
Oops, sorry, wasn't concentrating.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Andrew,
Actually, I was just reading through all the Data Parallel Haskell and
Nested Data Parallelism documentation. It says in several places that
parallel array comprehensions are available since GHC 6.6, but they are
broken; please use the development versions; this will be fixed in GHC
Jules Bean wrote:
Have you tried using pattern guards for views?
f s | y : ys - viewl s =
| EmptyL - viewl s =
Hm, I'd simply use a plain old case-expression here
f s = case viewl s of
y : ys - ...
EmptyL - ...
In other words, case-expressions are as powerful as
apfelmus wrote:
IMHO, the long-time debate about views is not whether they're useful (I
think they are!) but which concrete form to choose. Unfortunately, all
of the proposals so far are somehow like Dr. Jekyll and Mr. Hyde: one
side is nice but the other is rather ugly.
In the end, I might end
to replace only libglut.so is not enough. if i understand you correctly, you
changed the backend without the API. (you need .h at compiletime, .a (an
archive of .o files) when you link everything to an executable, and .so at
runtime.)
my libglut installation comes with...
/usr/lib/libglut.a
Hi,
this is what happened to me recently.
Recently I had the opportunity to join the community around XMonad, a
project, you should know something about it, led by some well know
haskellers. It's a very exiting project, and by joining it you have
the opportunity to code with people who know
Hi Andrea,
I though that using the Haskell wiki was appropriate, so I started
writing down what I learned thanks to those guys.
It is certainly a good place to put it!
Then suddenly, Sunday night, I could not find my page anymore.
On renaming a page, doesn't a redirect get placed from the
Hi folks
Scary word warning: Monoid, Monad, Applicative, Traversable, Context,
Cursor
Eric:
Does anyone know of a good article which discusses snoc vs cons
lists?
Derek:
There's no reason to; there is no difference between a snoc list and a
cons list.
There's no technical reason to,
On Wed, Jul 25, 2007 at 11:14:59AM +0100, Neil Mitchell wrote:
You know, changing a wiki page title means breaking all links to that
page from other sites. So, changing an old page title, means taking
that page off the Net.
Not if the redirect is done, certainly wikipedia does this.
I
On Wed, Jul 25, 2007 at 11:14:59AM +0100, Neil Mitchell wrote:
You know, changing a wiki page title means breaking all links to that
page from other sites. So, changing an old page title, means taking
that page off the Net.
Not if the redirect is done, certainly wikipedia does this.
Hi
Ok, I'm not quite under my rock yet,,,
On 25 Jul 2007, at 10:28, apfelmus wrote:
Jules Bean wrote:
Have you tried using pattern guards for views?
f s | y : ys - viewl s =
| EmptyL - viewl s =
This is annoying because the intermediate computation gets repeated. I
don't
apfelmus wrote:
Jules Bean wrote:
Have you tried using pattern guards for views?
f s | y : ys - viewl s =
| EmptyL - viewl s =
Hm, I'd simply use a plain old case-expression here
f s = case viewl s of
y : ys - ...
EmptyL - ...
In other words,
[I think we should move the rest of this thread to haskell-cafe, since
it's getting long. Note that there have already been some responses on
both lists.]
Hi Claus,
On Jul25, Claus Reinke wrote:
I think that the signature
type Typ
unit :: Typ - Maybe ()
arrow :: Type - Maybe
Thanks!
I just tried a new pre-built version (http://haskell.org/gtk2hs
/gtk2hs-0.9.11.3.exe) and at least this simple prog. works in GHCi:
module GWindow where
import Graphics.SOE.Gtk
main() =
runGraphics (
do w - openWindow Graphics Test (300, 300)
Hello shelarcy,
Tuesday, July 24, 2007, 2:32:01 AM, you wrote:
So I put newer Windows binary on my project's file space.
http://sourceforge.net/project/showfiles.php?group_id=168626
thank you very much!!! now i'm really happy - it works without any
problems. the only question that remains -
Hello Duncan,
Monday, July 23, 2007, 4:02:42 AM, you wrote:
i've taken a look at gtk2hs, but 2 reasons forced me to give wxHaskell
a try:
- native appearance
I think that's pretty good these days, the native theme on Windows has
been getting better and better from Gtk+ 2.6 to the current
Hi,
I am using Text.Printf (package base, ghc-6.6.1) and am missing %X
formatting. Checking out the darcs repo of the base package I see that it
has already been added there. Is there any way to upgrade to the latest
version while keeping ghc-6.6.1? I keep hearing Bulat saying that this is
not
Hi Dan,
No, of course not. All I meant to say is that sometimes you want a
total view, and that a total view should be given a type that says as
much. The latter says this better than the former. On the other hand,
there are lots of circumstances in which you want a partial view, and I
think
On Wed, 2007-07-25 at 16:57 +0400, Bulat Ziganshin wrote:
Hello Duncan,
Monday, July 23, 2007, 4:02:42 AM, you wrote:
i've taken a look at gtk2hs, but 2 reasons forced me to give wxHaskell
a try:
- native appearance
I think that's pretty good these days, the native theme on
Hi
There's really no such thing as Windows native controls any more, at
least not ones that any apps actually use. You'll note that Internet
Explorer, MS Office and VisualStudio all paint their own custom control
set that are similar but not exactly the same as the native controls (eg
those
Hi Conor,
This is a really good point, especially in the presence of GADTs and
type-level functions and so on, which introduce aspects of dependency.
Why are you so fatalistic about with in Haskell? Is it harder to
implement than it looks? It seems to be roughly in the same category as
our view
On Wed, 2007-07-25 at 14:58 +0100, Neil Mitchell wrote:
Hi
There's really no such thing as Windows native controls any more, at
least not ones that any apps actually use. You'll note that Internet
Explorer, MS Office and VisualStudio all paint their own custom control
set that are
Hi Bulat,
can you please give screenshots? in particular, i see unix-like
style in TreeCtrl and scrollbars in examples i've built from gtk2hs.
The scroll bars are OK:
http://www-users.cs.york.ac.uk/~ndm/temp/proof.png
The appearance is native, but the arrow on the left shouldn't be
disabled
Hello Duncan,
Wednesday, July 25, 2007, 5:54:13 PM, you wrote:
afaiu, GTK paints all controls itself without using native controls
and therefore controls look at Windows just the same as in Unix
Gtk+ uses themes too, and on Windows it uses a Windows theme.
can you please give screenshots?
Benjamin Franksen wrote:
apfelmus wrote:
In other words, case-expressions are as powerful as any view pattern may
be in the single-parameter + no-nesting case.
This is how I do it, no pattern guards, no view patterns:
zip :: Seq a - Seq b - Seq (a,b)
zip xs ys = case (viewl xs,viewl ys)
Thanks for the info. I indeed replaced everything, but it only works
after I recompile Graphics.UI.GLUT module.
Regards,
Paul L
On 7/25/07, Marc A. Ziegert [EMAIL PROTECTED] wrote:
to replace only libglut.so is not enough. if i understand you correctly, you
changed the backend without the
Simon Marlow [EMAIL PROTECTED] writes:
Dan Licata wrote:
Simon PJ and I are implementing view patterns, a way of
pattern matching against abstract datatypes, in GHC.
At the risk of being a spoil-sport, I have a somewhat
negative take on view patterns. Not because I think they're
Hello ,
from http://community.livejournal.com/ru_declarative/54566.html
Q: how to see operators precedence in GHCi?
A:
Prelude let showParen = (undefined::()-())
Prelude showParen $ 2+3*4
interactive:1:12:
No instance for (Num ())
arising from use of `+' at
Bulat Ziganshin [EMAIL PROTECTED] writes:
Hello ,
from http://community.livejournal.com/ru_declarative/54566.html
Q: how to see operators precedence in GHCi?
A:
Prelude let showParen = (undefined::()-())
Prelude showParen $ 2+3*4
interactive:1:12:
No instance for (Num
On Jul25, apfelmus wrote:
The point is to be
able to define both zip and pairs with one and the same operator : .
There's actually a quite simple way of doing this. You make the view
type polymorphic, but not in the way you did:
type Queue elt
empty :: Queue elt
cons :: elt -
On Wednesday 25 July 2007, Jon Fairbairn wrote:
Simon Marlow [EMAIL PROTECTED] writes:
Dan Licata wrote:
Simon PJ and I are implementing view patterns, a way of
pattern matching against abstract datatypes, in GHC.
At the risk of being a spoil-sport, I have a somewhat
negative take
On Wed, 2007-07-25 at 11:37 +0100, Conor McBride wrote:
Hi folks
Scary word warning: Monoid, Monad, Applicative, Traversable, Context,
Cursor
Eric:
Does anyone know of a good article which discusses snoc vs cons
lists?
Derek:
There's no reason to; there is no difference
On Wed, 2007-07-25 at 14:12 +0200, Benjamin Franksen wrote:
Cheers
Ben, member of the we-want-real-views-or-nothing-at-all movement ;-)
Derek, member of the counter-culture,
we-don't-want-real-views-but-nothing-at-all-may-suffice movement.
___
Dan Licata wrote:
On Jul25, apfelmus wrote:
The point is to be
able to define both zip and pairs with one and the same operator : .
There's actually a quite simple way of doing this. You make the view
type polymorphic, but not in the way you did:
type Queue elt
empty :: Queue
Hello Jon,
Wednesday, July 25, 2007, 8:07:57 PM, you wrote:
Q: how to see operators precedence in GHCi?
In the definition of `it': it = showParen $ (2 + (3 * 4))
Hmm, OK, but not that much quicker than going
Prelude :info (*)
it just my poor english :) i mean - how to see how
On Wed, 2007-07-25 at 21:04 +0300, George Moschovitis wrote:
Dear devs,
I am a Haskell newbie and I would like to hear your suggestions
regarding a Database conectivity library:
HSQL or HDBC ?
which one is better / more actively supported?
My impression (as a packager not a user) is
* Haskell* is an incredibly elegantly-designed and beautiful car, which
is rumored to be able to drive over extremely strange terrain. The one time
you tried to drive it, it didn't actually drive along the road; instead, it
made copies of itself and the road, with each successive copy of the
Hi,
I use HSQL with PostgreSQL bindings. It works great and I found it very easy
to use.
--
Rich
I don't mean to hijack the thread. Does anyone have experience in
using either HDBC or HSQL with Microsoft SQL server?
Thanks,
cg
___
Haskell-Cafe
| Uhm... that didn't work :)
|
| Not quite as nice:
|
| [EMAIL PROTECTED]:~$ ghci -ddump-rn-trace
You probably wanted -ddump-rn
Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Thu, Jul 26, 2007 at 12:42:52AM +0100, Simon Peyton-Jones wrote:
| Uhm... that didn't work :)
|
| Not quite as nice:
|
| [EMAIL PROTECTED]:~$ ghci -ddump-rn-trace
You probably wanted -ddump-rn
Seemed so, but that option has no effect (bug?):
[EMAIL PROTECTED]:~$ ghci -ddump-rn
On 25 Jul 2007, at 6:50 pm, Melissa O'Neill wrote:
[section 23.4.2 of Simon's 1987 book].
The really scary thing about this example is that so much depends
on the order in which the subsets are returned, which in many cases
does not matter. Here's code that I tried with GHC on a 500MHz SPARC.
Donald Bruce Stewart dons at cse.unsw.edu.au writes:
bayer:
I couldn't find a compile-time here document facility, so I wrote one
using Template Haskell:
Very nice! You should wrap it in a little .cabal file, and upload it to
hackage.haskell.org, so we don't forget about it.
Details
On Wed, Jul 25, 2007 at 09:35:32PM +0200, apfelmus wrote:
Integer
= (forall a . ViewInt a = a)
can even be done implicitly and for all types. Together with the magic
class View, this would give real views.
Jón Fairbairn wrote:
It's essential to this idea that it doesn't involve
Hello,
I don't mean to hijack the thread. Does anyone have experience in
using either HDBC or HSQL with Microsoft SQL server?
I use HDBC with MS SQL Server, Sybase, and Oracle. I use the ODBC
bindings. I am running on both a windows XP machine and a linux
machine (although I haven't been able
On Jul 25, 2007, at 19:15 , Dave Bayer wrote:
A here document is a kind of data, but it is really a language
extension,
and one that depends on a GHC extension, Template Haskell. I'd go for
Data.HereDocs
but that doesn't seem quite right. The newbie in me doesn't want to
park my
car
On 7/26/07, Jon Harrop [EMAIL PROTECTED] wrote:
Does Haskell have anything similar to OCaml's polymorphic variants?
No as such, but it's possible to simulate them. As always Oleg was the
one to demonstrate how:
http://okmij.org/ftp/Haskell/generics.html
Cheers,
Josef
i have released Finance.Quote.Yahoo 0.2
i have broken the 0.1 api, be careful if you use it
i have added support for historical quotes which some people requested
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Finance-Quote-Yahoo-0.2
i received useful input from dale jordan and
andrewcoppin:
I don't know if anybody cares, but... Today a wrote some trivial code to
decode (not encode) UTF-16.
I believe somebody out there has a UTF-8 decoder, but I needed UTF-16 as
it happens. (I didn't bother decoding code points outside the BMP - I'm
sure you can figure out
Andrew == Andrew Coppin [EMAIL PROTECTED] writes:
Andrew I believe somebody out there has a UTF-8 decoder, but I
Andrew needed UTF-16 as it happens. (I didn't bother decoding
Andrew code points outside the BMP - I'm sure you can figure out
Andrew why.)
Well I can't.
And if you
I don't know if anybody cares, but... Today a wrote some trivial code to
decode (not encode) UTF-16.
I believe somebody out there has a UTF-8 decoder, but I needed UTF-16 as
it happens. (I didn't bother decoding code points outside the BMP - I'm
sure you can figure out why.)
If anybody is
Ian Lynagh wrote:
On Wed, Jul 25, 2007 at 03:38:50PM +0200, Benjamin Franksen wrote:
I am using Text.Printf (package base, ghc-6.6.1) and am missing %X
formatting. Checking out the darcs repo of the base package I see that it
has already been added there. Is there any way to upgrade to the
Thank you guys, i didn't understand the concept of the chapter.
Brent Yorgey wrote:
On 7/25/07, Alexteslin [EMAIL PROTECTED] wrote:
Hi,
I am going through examples from the textbook and trying them out but
some
don't work.
For example:
addNum :: Int - (Int - Int)
addNum n = addN
Hello,
Would you go as far to say that when new programmers ask which database
binding to use, we should _recommend_ HDBC then? (As we do gtk2hs, for
the gui libraries).
I'm not sure about this. Although I didn't extensively compare HSQL
and HDBC, I got the impression that they offered
Dan Licata wrote:
There's actually a quite simple way of doing this. You make the view
type polymorphic, but not in the way you did:
myzip :: Queue a - Queue b - Queue (a,b)
myzip a b = case (view a, view b) of
(EmptyL, _) - empty
(_, EmptyL) - empty
Bulat Ziganshin wrote:
Hello Andrew,
Monday, July 23, 2007, 11:50:32 PM, you wrote:
Actually, I was just reading through all the Data Parallel Haskell and
Nested Data Parallelism documentation. It says in several places that
parallel array comprehensions are available since GHC 6.6, but
On Jul25, Benjamin Franksen wrote:
Dan Licata wrote:
On Jul25, apfelmus wrote:
The point is to be
able to define both zip and pairs with one and the same operator : .
There's actually a quite simple way of doing this. You make the view
type polymorphic, but not in the way you
On 7/25/07, George Moschovitis [EMAIL PROTECTED] wrote:
I am a Haskell newbie and I would like to hear your suggestions regarding a
Database conectivity library:
HSQL or HDBC ?
which one is better / more actively supported?
HDBC Supports Mysql only through ODBC :(
Dear devs,
I am a Haskell newbie and I would like to hear your suggestions regarding a
Database conectivity library:
HSQL or HDBC ?
which one is better / more actively supported?
thanks in advance,
-g.
--
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
On Wed, Jul 25, 2007 at 10:55:56AM -0700, Stefan O'Rear wrote:
On Wed, Jul 25, 2007 at 09:35:38PM +0400, Bulat Ziganshin wrote:
Hello Jon,
Wednesday, July 25, 2007, 8:07:57 PM, you wrote:
Q: how to see operators precedence in GHCi?
In the definition of `it': it = showParen $ (2 +
Thank you Dan
Dan Weston wrote:
If you find it tedious to pass parameters that never change, remember
that you can access symbols defined in the enclosing environment
(closure), freeing you from passing it on each time:
filterAlpha :: (a - Bool) - [a] - [a]
filterAlpha f =
On 7/25/07, Alexteslin [EMAIL PROTECTED] wrote:
Hi,
I am going through examples from the textbook and trying them out but some
don't work.
For example:
addNum :: Int - (Int - Int)
addNum n = addN
where
addN m = n+m
This error message i am getting:
ERROR - Cannot find show
On Wed, Jul 25, 2007 at 11:27:59AM -0700, Alexteslin wrote:
Hi,
I am going through examples from the textbook and trying them out but some
don't work.
For example:
addNum :: Int - (Int - Int)
addNum n = addN
where
addN m = n+m
This error message i am getting:
ERROR
mutjida:
Hello,
Would you go as far to say that when new programmers ask which database
binding to use, we should _recommend_ HDBC then? (As we do gtk2hs, for
the gui libraries).
At this point in time, my advice to new Haskell programmers would be:
first try Takusen, as long as it can
Arie Groeneveld wrote:
:
| Looking at the result of my rewriting gives me the idea it isn't
| Haskelly enough.
|
| Anyways, here's my interpretation:
|
| -- period m/n base = (period length, preperiod digits, period digits)
| period :: Integer - Integer - Integer - (Int, ([Integer],
Does Haskell have anything similar to OCaml's polymorphic variants?
They act as inferred sum types:
# let rec eval = function
| `Int n - n
| `Add(f, g) - eval f + eval g
| `Mul(f, g) - eval f * eval g;;
val eval :
([ `Add of 'a * 'a | `Int of int | `Mul of 'a * 'a ] as 'a) - int =
67 matches
Mail list logo