Re: [Haskell-cafe] A new code search engine

2007-02-19 Thread Mathew Mills

lang:haskell seems to work just fine for me.

On 2/14/07, Adam Peacock [EMAIL PROTECTED] wrote:


On 2/14/07, Stephane Bortzmeyer [EMAIL PROTECTED] wrote:
 http://www.krugle.com/

 Unlike Google, you can specify Haskell as a language.

It is true that you can't directly specify the programming language
with Google. But you can specify the filetype, i.e. hs or lhs, with
Google.

To do this, just add `filetype:hs` to you search.

And according to my initial tests, Google still wins.

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

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


Re: [Haskell-cafe] Summer of Code

2007-02-15 Thread Mathew Mills

Google just announced the 2007 SoC

http://code.google.com/soc/


On 2/15/07, Chris Kuklewicz [EMAIL PROTECTED] wrote:


Donald Bruce Stewart wrote:
 If anyone *can* make HsJudy install and work, could you put this
information on
 the haskell wiki?

 --
 Chris

 I'd just ping the auhtor, host the repo on darcs.haskell.org, and then
 fix it until it builds like any normal cabalised repo.

 It really could be a Data.HashTable killer, given a bit of build
 infrastructure love :-)

 -- Don

I kludged an install that makes it work in ghci now.  But I don't have a
tested
recipe for this yet.

Even downloading from the pugs repository was tricky.  I could not see how
to
use darcs to get just HsJudy (when I tried to do so darcs was grabbing 
3k
patches (using --partial!)).  So use wget --no-parent -r, which is
hardly a
step I could put in a general recipe.

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

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


Re: [Haskell-cafe] Fibonacci numbers generator in Haskell

2006-06-16 Thread Mathew Mills
I guess I don't get any points for an approximate solution, ay?

Is there anything that can be done (easily) to reduce the rounding errors?


On 6/15/06 11:23 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 G'day all.
 
 Quoting Mathew Mills [EMAIL PROTECTED]:
 
 How about the closed form ;)
 
 -- fib x returns the x'th number in the fib sequence
 
 fib :: Integer - Integer
 
 fib x = let phi = ( 1 + sqrt 5 ) / 2
 
 in truncate( ( 1 / sqrt 5 ) * ( phi ^ x - phi' ^ x ) )
 
 
 Seems pretty quick to me, even with sqrt and arbitrarily large numbers.
 
 I called my version fib and your version fib2.  I get:
 
 *Fib [ i | i - [30..100], fib i == fib2 i ]
 [32,35,43,46,51,71]
 
 Yes, the closed form is faster.  But if, as part of the rules, one
 is allowed to give wrong answers, it's not difficult to write a
 function that's even faster than this.
 
 Cheers,
 Andrew Bromage
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


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


Re: [Haskell-cafe] Fibonacci numbers generator in Haskell

2006-06-15 Thread Mathew Mills
How about the closed form ;)

 -- fib x returns the x'th number in the fib sequence

 fib :: Integer - Integer

 fib x = let phi = ( 1 + sqrt 5 ) / 2

 in truncate( ( 1 / sqrt 5 ) * ( phi ^ x - phi' ^ x ) )


Seems pretty quick to me, even with sqrt and arbitrarily large numbers.


On 6/15/06 9:33 AM, Vladimir Portnykh [EMAIL PROTECTED] wrote:

 Fibonacci numbers implementations in Haskell one of the classical examples.
 An example I found is the following:
 
 fibs :: [Int]
 fibs = 0 : 1 : [ a + b | (a, b) - zip fibs (tail fibs)]
 
 To get the k-th number you do the following:
 Result = fibs !! k
 
 It is elegant but creates a list of all Fibonacci numbers less than k-th,
 and the code is not very readable :).
 
 I wrote my own Fibonacci numbers generator:
 
 fib :: Int - [Int]
 fib 0 = [0,0]
 fib 1 = [1,0]
 fib n = [sum prevFib, head prevFib] where a = fib (n - 1)
 
 To get the k-th number you do the following:
 
 result = head (fib k)
 
 It does not generate full list of Fibonacci numbers, but keeps only 2
 previous numbers, and has only one recursive call.
 Because the list always has only 2 elements using the functions head and sum
 is a bit overkill.
 
 Can we do better?
 
 _
 Are you using the latest version of MSN Messenger? Download MSN Messenger
 7.5 today! http://join.msn.com/messenger/overview
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


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


Re: [Haskell-cafe] Editors for Haskell

2006-05-29 Thread Mathew Mills
With Haskell's lovely strong static typing, it is a crying shame we don't
have an editor with immediate feedback, ala Eclipse.


On 5/29/06 6:55 PM, Bjorn Bringert [EMAIL PROTECTED] wrote:

 Hi Chris,
 
 I followed your advice and tried SubEthaEdit. It seems to work really
 well, except that I can't figure out how to get it to indent my
 Haskell code correctly. What I expected was something like the Emacs
 Haskell mode where I can hit tab to cycle between the different
 reasonable indentations for a line. Am I right that SubEthaEdit does
 not have this feature? Or did I not RTFM enough? Maybe it's just me,
 but I find it difficult to write Haskell code without it.
 
 /Björn
 
 On May 25, 2006, at 8:10 AM, Christopher Brown wrote:
 
 Hi Walt,
 
 For Mac OS X I would strongly recommend using Sub Etha Edit. Its a
 very simple editor to use, and offers a lot of power and
 flexibility. It also has a Haskell highlighting mode.
 
 You can find it at:
 
 http://www.codingmonkeys.de/subethaedit/
 
 Chris.
 
 On 25 May 2006, at 16:02, Walter Potter wrote:
 
 All,
 
 I hope that this is the right place for this question.
 
 I'm using Haskell (GHC and Hugs) on several different platforms.
 Windows, OS X and Linux systems.
 
 I'd like to have an IDE that works well for medium to large size
 projects. I know of Eclipse and hIDE.
 Vim works fine but I'd like more. hiDE seems to be in process.
 
 What would you suggest?  I'll be asking my students to use the
 same IDE.
 
 Thanks, Walt
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


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