[Haskell-cafe] Re: [Haskell] Mailing List Archive: Search Broken?

2008-02-14 Thread Calvin Smith
On 02/14/2008 11:13 PM, Janis Voigtlaender wrote:
 Don Stewart wrote:
 voigt:

 I always use gmane, via:

 http://news.gmane.org/search.php?match=haskell
 
 The problem with this is that when searching through gmane, and
 selecting a single message with a hit, one gets only to see that message
 without its context thread. At least I could not find out a way to
 switch from the found message to the thread in which it occurred.
 
 The search facility on www.mail-archive.com is much nicer in that
 respect, but as mentioned, as of yesterday seems to have forgotten about
 all messages prior to November 2007, and from 2008.
 
 Too bad...
 
 Ciao,
 Janis.
 

I removed [EMAIL PROTECTED] from the recipients.

It is possible to get to the thread-view of a message from just the bare
message page. For example, if I turn up
http://article.gmane.org/gmane.comp.lang.haskell.cafe/8046 in a google
search, which takes me to the article without context, I then click on
the linked subject of the message, which redirects me to
http://thread.gmane.org/gmane.comp.lang.haskell.cafe/8044/focus=8046,
which is the threaded view. It still doesn't seem to allow you to get to
other threads before and after the given thread, but at least you can
view the entire thread of the message you found.

It's definitely not very intuitive.

Cheers,

Calvin

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Hamming's Problem

2008-01-17 Thread Calvin Smith
The author of Pugs (Perl6 implemented in Haskell) gives a nice solution
to the problem of generating the Hamming numbers in the following interview:

http://www.perl.com/pub/a/2005/09/08/autrijus-tang.html?page=last
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: List of all powers

2007-11-14 Thread Calvin Smith
On 11/14/2007 03:19 PM,, Brent Yorgey wrote:
 apfelmus, does someone pay you to write so many thorough, insightful and
 well-explained analyses on haskell-cafe?  I'm guessing the answer is
 'no', but clearly someone should! =)

Agreed. I really look forward to apfelmus' consistently outstanding
explanations on haskell-cafe.

If some of the especially good ones were bundled up as book --
*Intermediate/Advanced Functional Programming with Haskell* -- I would
buy it sight unseen (hint, hint).

-calvin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] New slogan for haskell.org

2007-10-10 Thread Calvin Smith
Claus Reinke wrote:
 since this doesn't seem to want to go away:-)
 
 1. reverse psychology approach
 ...
 2. mantra approach
 ...
 3. secret cult approach
 ...
 4. reach for the moon approach
 ...

5. The fun approach:

Haskell: we put the Fun in Functor.

I'm only half-joking, because for me personally, the number one reason I
 program in Haskell is that's it's just more fun than other languages
I've tried.

-cs
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Collections

2007-06-21 Thread Calvin Smith

Andrew Coppin wrote:

Dan Piponi wrote:

On 6/20/07, Andrew Coppin [EMAIL PROTECTED] wrote:


Yes... graph and network are virtually synonymous. I'm still
wondering what you'd use a network for in a computer program.


Writing a Haskell compiler.


True enough - but that's a rather specific task. I'm still not seeing 
vast numbers of other uses for this...




You can see lots of applications for graphs at the following page:

http://www.graph-magics.com/practic_use.php

That was the second result for 
http://www.google.com/search?as_q=%22applications%20of%20graph%20algorithms%22, 
and there are some other results in there that you might find 
interesting too.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Possible (GHC or HGL) bug or ??

2007-01-03 Thread Calvin Smith

[EMAIL PROTECTED] wrote:

Calvin Smith wrote:


When the problem occurs, there is a message to the console that says:
thread blocked indefinitely.


I can reproduce this on OS X with ghc-6.4.2, X11-1.1 and HGL-3.1. The
console message is rare but I also got it once. This looks like a bug in
HGL, perhaps some issue with polling the event queue in a threaded fashion.



Thanks very much for checking this on a different platform and GHC. I
filed a bug report with the HGL maintainer.


p.s. Any stylistic or other comments about the code welcome too.


It might also be a good idea not to mess with trigonometry when creating
the snowflake. 


Yes, that is much cleaner.

The following code demonstrates this. 


Your solution is very elegant, and a big improvement over my messy
first solution. Thanks for the very instructive code!

Regards,

Calvin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Possible (GHC or HGL) bug or ??

2006-12-31 Thread Calvin Smith

Dear haskell-cafe patrons,

I've been working through an exercise in Hudak's _The Haskell School of 
Expression_ (ex. 3.2, creating a snowflake fractal image), and am seeing 
some strange drawing behavior that I'm hoping somebody can shed some 
light on.


My initial solution is below (it requires HGL for Graphics.SOE):


module Main where

import Graphics.SOE

main =
  runGraphics (
  do w - openWindow Snowflake Fractal (600, 600)
 fillStar w 300 125 256 (cycle $ enumFrom Blue)
 spaceClose w
  )

spaceClose w =
  do k - getKey w
 if k == ' '
then closeWindow w
else spaceClose w

minSize = 2 :: Int

fillStar :: Window - Int - Int - Int - [Color] - IO ()
fillStar w x y h clrs | h = minSize
  = return ()
fillStar w x y h clrs
 = do drawInWindow w
  (withColor (head clrs)
 (polygon [t1p1,t1p2,t1p3,t1p1]))
  drawInWindow w
  (withColor (head clrs)
 (polygon [t2p1,t2p2,t2p3,t2p1]))
  sequence_ $ map recur [t1p1,t1p2,t1p3,t2p1,t2p2,t2p3]
   where tanPiOverSix = tan(pi/6) :: Float
 halfSide = truncate $ tanPiOverSix * fromIntegral h
 hFrag = truncate $ tanPiOverSix * tanPiOverSix * fromIntegral h
 (t1p1,t1p2,t1p3) =
   ((x, y), (x-halfSide, y+h),(x+halfSide, y+h))
 (t2p1,t2p2,t2p3) =
   ((x-halfSide, y+hFrag),(x, y+h+hFrag),(x+halfSide, y+hFrag))
 reVert y = y - ((h - hFrag) `div` 3)
 recur pnt =
   fillStar w (fst pnt) (reVert (snd pnt)) (h`div`3) (tail clrs)


This basically works, in that it does exactly what I want in Hugs, but 
GHC sometimes pauses partway through rendering, and does not continue 
rendering until I type any key (except space, which exits) or 
unfocus/refocus the window, or move the mouse pointer across the window.


Sometimes, more often the first time in a GHCI session, it renders 
completely with no pauses, and it seems to pause more and more if I 
evaluate main, then close the window, evaluate again in the same GHCI 
session, repeatedly. The same pausing behavior is observed in a 
GHC-compiled executable.


When the problem occurs, there is a message to the console that says: 
thread blocked indefinitely.


Versioning info:

CPU: Pentium M
OS: Gentoo GNU/Linux, kernel 2.6.18
GCC: 4.1.1
GHC: 6.6
HGL: 3.1
HUGS: March 2005
[all software compiled from source using gentoo ebuilds]

Is anybody else familiar with this behavior? If not, any suggestions as 
to where I should file this as a potential bug? GHC? HGL? Both? Elsewhere?


Thanks in advance for any information.

Calvin

p.s. Any stylistic or other comments about the code welcome too.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe