Re: [Haskell-cafe] [IO Int] -> IO [Int]

2007-05-04 Thread Thomas Hartman
Hoogle is also helpful http://haskell.org/hoogle/?q=%5Bm+a%5D+-%3E+m+%5Ba%5D 2007/5/4, Phlex <[EMAIL PROTECTED]>: Hello all, I'm trying to learn haskell, so here's is my first newbie question. I hope this list is appropriate for such help requests. I'm trying to write a function with the sign

Re: [Haskell-cafe] what exactly does "deriving (Functor, Monad, MonadIO)" do?

2007-05-01 Thread Thomas Hartman
Thanks Dons. There's also a short and sweet explanation here. http://hackage.haskell.org/trac/haskell-prime/wiki/NewtypeDeriving I am going to try and wrap my head around this, as I am very interested in solutions for haskell / shell interaction. Are there are any good examples of code written

[Haskell-cafe] what exactly does "deriving (Functor, Monad, MonadIO)" do?

2007-05-01 Thread Thomas Hartman
I was trying to follow the reasoning in Don's article on using haskell for shell scripting http://cgi.cse.unsw.edu.au/~dons/blog/2007/03/10 In the source listing at the end we is newtype Shell a = Shell { runShell :: ErrorT String IO a } deriving (Functor, Monad, MonadIO) and I do

Re: [Haskell-cafe] Is there a best *nix or BSD distro for Haskell hacking?

2007-04-23 Thread Thomas Hartman
If you opt for ubuntu, have a look at http://groups.google.de/group/fa.haskell/browse_thread/thread/e63e73e7fc9e96c2/be76e381f8c33f39?lnk=st&q=%22haskell+cafe%22+%22Trouble+trying+to+find+packages+for+ubuntu+linux%22&rnum=1&hl=en#be76e381f8c33f39 This little hack enabled me to do a sort of "one

Re: [Haskell-cafe] Re: Translating perl -> haskell, string "fill ins" with an error on invalid inputseems awfullycomplex. Is there a way to simplify?

2007-04-18 Thread Thomas Hartman
= id 60 61 instance MyString String 62 where mystr = Right 63 64 x <++> y = do xv <- mystr x 65yv <- mystr y 66return $ xv ++ yv 67 2007/4/18, Thomas Hartman <[EMAIL PROTECTED]>: Looks like this needs to be run with #

Re: [Haskell-cafe] Re: Translating perl -> haskell, string "fill ins" with an error on invalid inputseems awfullycomplex. Is there a way to simplify?

2007-04-18 Thread Thomas Hartman
Looks like this needs to be run with #!/usr/lib/ghc-6.6/bin/runghc {-# OPTIONS_GHC -fglasgow-exts #-} to get instance MyString (Either String String) where mystr = id instance MyString String where mystr = Right to work. I'm curious if there is a community feeling on whether glasgow-exts

Re: [Haskell-cafe] Efficient use of ByteString and type classes in template system

2007-04-17 Thread Thomas Hartman
Created wiki page http://haskell.org/haskellwiki/String_Interpolation and referenced various topics mentioned in this thread, there. 2007/4/16, Donald Bruce Stewart <[EMAIL PROTECTED]>: johan.tibell: > Hi Haskell Caf?! > > I'm writing a perl/python like string templating system which I plan >

Re: [Haskell-cafe] Re: Translating perl -> haskell, string "fill ins" with an error on invalid inputseems awfullycomplex.Is there a way to simplify?

2007-04-16 Thread Thomas Hartman
I put this on the haskell wiki at http://haskell.org/haskellwiki/Poor_Man%27s_Heredoc_in_Haskell So far I have only linked this from http://haskell.org/haskellwiki/Simple_unix_tools I feel like the wiki deserves a section on "Haskell Template Solutions" distinct from this. However, there is a b

Re: [Haskell-cafe] Re: Translating perl -> haskell, string "fill ins" with an error on invalid inputseems awfullycomplex. Is there a way to simplify?

2007-04-16 Thread Thomas Hartman
With regards to the variable interpolation in strings problem, it's probably worth watching http://groups.google.de/group/fa.haskell/browse_thread/thread/34741c2a5c311a17/286dbd62748ef1c1?lnk=st&q=%22haskell+cafe%22+%22template+system%22&rnum=1&hl=en#286dbd62748ef1c1 which mentions some perl/pyt

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Thomas Hartman
ks, using threads, using map reduce. Compare and contrast this with doing the same transformation in perl. Perl should be messier. Hope this helps... 2007/4/16, Dougal Stanton <[EMAIL PROTECTED]>: On 16/04/07, Thomas Hartman <[EMAIL PROTECTED]> wrote: > Maybe that could be simplifi

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Thomas Hartman
Give them a program that selects a bunch of files based on some filtering criteria, and then does something to each file. Kind of like find + xargs, but using haskell instead. Good recipe for sysadmins. There was a recent example involving parsing raw emails into a thread here http://groups.goo

Re: [Haskell-cafe] Re: Translating perl -> haskell, string "fill ins" with an error on invalid inputseems awfullycomplex. Is there a way to simplify?

2007-04-15 Thread Thomas Hartman
Claus and Evan ++; that was very helpful. FWIW, my gut feeling is that Claus's first version was easier to understand than the revision with printf, which seems to me to involve a lot more monadic wizardry (Functor, MonadError, fmap, mapm). The first version, which just used maybe, was clear to m

[Haskell-cafe] Re: Translating perl -> haskell, string "fill ins" with an error on invalid input seems awfully complex. Is there a way to simplify?

2007-04-13 Thread Thomas Hartman
rgname arg maybeTransformedArg = case maybeTransformedArg of Nothing -> error $ "no transformed " ++ argname ++ " arg for " ++ arg _ -> return () Summary: I like being able to check the validity of user input on an arg-by-arg basis, and now I guess I can. 2007/4/

[Haskell-cafe] Re: Translating perl -> haskell, string "fill ins" with an error on invalid input seems awfully complex. Is there a way to simplify?

2007-04-13 Thread Thomas Hartman
"plot [\"" ++ startDate ++ "\":\"" ++ endDate ++ "\"]" ++ " '" ++ companyfile ++ "'" ++ modestring ++ " title \&q

Re: [Haskell-cafe] k-minima in Haskell

2007-04-13 Thread Thomas Hartman
Rereading this, I see in fact apfelmus explains this is "O(n + k*log n)" for the first k elements, which this discussion also maintains is the best case. So, there's no discrepancy. I think this is a very valuable post to read for the explanation. 2007/4/13, Thomas Hartman &l

Re: [Haskell-cafe] k-minima in Haskell

2007-04-13 Thread Thomas Hartman
merge (x:xs) ys 2007/4/13, Thomas Hartman <[EMAIL PROTECTED]>: And for reference, here is again stefan's "stable" quicksort from his earlier post. " sort [] = [] sort l@(x:_) = filter (x) l (A stable quicksort, btw) " This is the code whose legitimacy I am reques

Re: [Haskell-cafe] k-minima in Haskell

2007-04-13 Thread Thomas Hartman
And for reference, here is again stefan's "stable" quicksort from his earlier post. " sort [] = [] sort l@(x:_) = filter (x) l (A stable quicksort, btw) " This is the code whose legitimacy I am requesting confirmation of. 2007/4/13, Thomas Hartman <[EMAIL PROTECTE

Re: [Haskell-cafe] k-minima in Haskell

2007-04-13 Thread Thomas Hartman
> You may be missing a few recursive calls there :-) Indeed. I'm confused. Is this a legitimate stable quicksort, or not? (My guess is, it is indeed legit as written.) This was also the first I have heard of stability as a sort property. http://perldoc.perl.org/sort.html may shed some light

[Haskell-cafe] Translating perl -> haskell, string "fill ins" with an error on invalid input seems awfully complex. Is there a way to simplify?

2007-04-12 Thread Thomas Hartman
I was translating some perl code to haskell as a learning exercise and wound up with the following. (below) Simple code that accepts some string arguments, and prints a string -- so, of type String -> String -> String -> String -> IO (). I like to be concise, but I get the feeling something went

Re: [Haskell-cafe] Why Perl is more learnable than Haskell

2007-04-11 Thread Thomas Hartman
I am also coming at haskell from a perl background. While there is some truth to what you say, I do think haskell can be used for "keeping simple things simple" in a way similar to perl. Though you have to search harder since the documentation / tutorials seem to be more optimized for "making har

[Haskell-cafe] Re: Checking for correct invocation of a command line / shell haskell program

2007-04-10 Thread Thomas Hartman
there was a minor mistake in the above, fixed on the wiki page. 2007/4/10, Thomas Hartman <[EMAIL PROTECTED]>: New wiki page: Checking for correct invocation of a command line haskell program at http://haskell.org/haskellwiki/Checking_for_correct_invocation_of_a_command_line_haskell_p

[Haskell-cafe] Checking for correct invocation of a command line / shell haskell program

2007-04-10 Thread Thomas Hartman
New wiki page: Checking for correct invocation of a command line haskell program at http://haskell.org/haskellwiki/Checking_for_correct_invocation_of_a_command_line_haskell_program This is a simple cookbook / boilerplate example I thought should go in a haskell wiki somewhere. I linked it from

Re: [Haskell-cafe] Re: Trouble trying to find packages for ubuntu linux

2007-04-07 Thread Thomas Hartman
. map column1 . lines ' \ | xargs apt-get -y install -o APT::Cache-Limit=25165824 # xargs --max-lines=1 can be helpful for debugging if anything goes wrong in the above. [EMAIL PROTECTED]:~/shellenv/installs/haskell-installs> 2007/4/6, Thomas Hartman <[EMAIL PROTECTED]>: .

Re: [Haskell-cafe] Re: Trouble trying to find packages for ubuntu linux

2007-04-06 Thread Thomas Hartman
leave with a lot of haskell stuff installed from packages, which is convenient, but I will refine it so it completes without errors, time allowing. 2007/4/5, Thomas Hartman <[EMAIL PROTECTED]>: > and in more detail in > my other post linked above. I meant, linked below. 2007/4/5,

Re: [Haskell-cafe] Re: Trouble trying to find packages for ubuntu linux

2007-04-05 Thread Thomas Hartman
and in more detail in my other post linked above. I meant, linked below. 2007/4/5, Thomas Hartman <[EMAIL PROTECTED]>: In the spirit of... I hate package chasing, cabal doesn't do this automatically (yet), and hard disk space is cheap... Here is a script to just hit the deb/u

Re: [Haskell-cafe] Re: Trouble trying to find packages for ubuntu linux

2007-04-05 Thread Thomas Hartman
This approach is fleshed out at http://groups.google.de/group/fa.haskell/browse_thread/thread/ceabae2c3fdc8abc/814a86d89c3f7d28?lnk=st&q=tphyahoo+haskell+ubuntu&rnum=1&hl=en#814a86d89c3f7d28 2007/3/16, Chad Scherrer <[EMAIL PROTECTED]>: Brian, I had this exact problem, and I found this approac

Re: [Haskell-cafe] Re: Trouble trying to find packages for ubuntu linux

2007-04-05 Thread Thomas Hartman
In the spirit of... I hate package chasing, cabal doesn't do this automatically (yet), and hard disk space is cheap... Here is a script to just hit the deb/ubuntu repos and install as much haskell-loooking stuff as possible. If you're going to do this, I would recommend pulling at least from

Re: [Haskell-cafe] Re: ANN: HSH 1.2.0

2007-04-03 Thread Thomas Hartman
resolved issue at http://groups.google.de/group/fa.haskell/browse_thread/thread/ceabae2c3fdc8abc/5ab21d4ae2a9b1fc?lnk=st&q=hsh++tphyahoo&rnum=5&hl=en#5ab21d4ae2a9b1fc 2007/4/2, Thomas Hartman <[EMAIL PROTECTED]>: Well, I guess I spoke to soon. After building ghc6 from feisty

[Haskell-cafe] Re: was Re: ANN: HSH 1.2.0

2007-04-03 Thread Thomas Hartman
ally looking forward to playing with my new toy :) 2007/4/3, Thomas Hartman <[EMAIL PROTECTED]>: actually, maybe I'm more okay than I thought. I originally did this without reading the INSTALL file, and built using the process I have gotten used to: runghc Setup.hs configure; rungh

[Haskell-cafe] Re: was Re: ANN: HSH 1.2.0

2007-04-03 Thread Thomas Hartman
ult a' arising from use of `run' at :1:0-2 Probable fix: add a type signature that fixes these type variable(s) Prelude HSH> So, that's where I'm at now. 2007/4/3, Thomas Hartman <[EMAIL PROTECTED]>: That was a pretty badly titled top thead, which I regret -- proba

[Haskell-cafe] Re: was Re: ANN: HSH 1.2.0

2007-04-03 Thread Thomas Hartman
dule: HSH with any suffix: ["hi"] So, I seem to be stuck at this point. 2007/4/2, Thomas Hartman <[EMAIL PROTECTED]>: > Well, I guess I spoke to soon. After building ghc6 from feisty as > described above, I tried building missingh and have basically what I > started w

[Haskell-cafe] was Re: ANN: HSH 1.2.0

2007-04-03 Thread Thomas Hartman
sudo runghc Setup.lhs install Setup.lhs: Warning: The field "hs-source-dir" is deprecated, please use hs-source-dirs. Installing: /usr/local/lib/HSH-1.2.1/ghc-6.6 & /usr/local/bin HSH-1.2.1... Setup.lhs: Error: Could not find module: HSH with any suffix: ["hi"] So, I seem

Re: [Haskell-cafe] Re: ANN: HSH 1.2.0

2007-04-02 Thread Thomas Hartman
6.4.2) but 6.6-3 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). 2007/4/2, Thomas Hartman <[EMAIL PROTECTED]>: > As you have built ghc6.6 from sources I think that you also need to build > all haskell libs from

Re: [Haskell-cafe] Re: ANN: HSH 1.2.0

2007-04-02 Thread Thomas Hartman
r the case... fakeroot apt-get source --build ghc6 works :) 2007/3/21, Max Vasin <[EMAIL PROTECTED]>: >>>>> "Thomas" == Thomas Hartman <[EMAIL PROTECTED]> writes: Thomas> Furthermore (as the above messages suggest and locate confirms), I Thomas> seem to h

Re: [Haskell-cafe] Re: ANN: HSH 1.2.0

2007-03-21 Thread Thomas Hartman
/doc/libghc6-mtl-dev/copyright /var/lib/dpkg/info/libghc6-mtl-dev.list /var/lib/dpkg/info/libghc6-mtl-dev.md5sums /var/lib/dpkg/info/libghc6-mtl-dev.postinst /var/lib/dpkg/info/libghc6-mtl-dev.prerm 2007/3/21, Thomas Hartman <[EMAIL PROTECTED]>: Some progress, but still not solved. I

Re: [Haskell-cafe] Re: ANN: HSH 1.2.0

2007-03-21 Thread Thomas Hartman
nds: libghc6-base-prof E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). [EMAIL PROTECTED]:~/haskellInstalls$ 2007/3/21, Thomas Hartman <[EMAIL PROTECTED]>: and I'm on... [EMAIL PROTECTED]:~/haskellInstalls$ ghc --version The Glorious Glasgo

Re: [Haskell-cafe] Re: ANN: HSH 1.2.0

2007-03-21 Thread Thomas Hartman
and I'm on... [EMAIL PROTECTED]:~/haskellInstalls$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.6 2007/3/21, Thomas Hartman <[EMAIL PROTECTED]>: When attempting to build hsh, I get complaint that it can't satisfy dependency for mtl-any. How can I g

Re: [Haskell-cafe] Re: ANN: HSH 1.2.0

2007-03-21 Thread Thomas Hartman
When attempting to build hsh, I get complaint that it can't satisfy dependency for mtl-any. How can I get this? Thanks! ** wget http://software.complete.org/hsh/static/download_area/1.2.0/hsh_1.2.0.tar.gz [EMAIL PROTECTED]:~/haskellInstalls/hsh$ sudo runghc Setup.lhs configure Se

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-20 Thread Thomas Hartman
You contributed #12:14 < Thunder> @pl \s -> drop (length s - n) s #12:14 < lambdabot> drop =<< subtract n . length But, on second thought, 1) I can't use this as a drop-in replacement for the non points free (right term?) version, and 2) I don't really understand it. Still, I would be curious t

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-20 Thread Thomas Hartman
-- sorts too, but alphanumerically, whereas we want numerically . Data.Set.toAscList . Data.Set.fromList . filter ( all Data.Char.isDigit ) . lines ' 2007/3/20, Thomas Hartman <[EMAIL PROTECTED]>: To answer my own post, the Data.List.sort *is* necessary. Othe

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-20 Thread Thomas Hartman
To answer my own post, the Data.List.sort *is* necessary. Otherwise, you get alphabetic sort. 2007/3/20, Thomas Hartman <[EMAIL PROTECTED]>: Just thought I'd add another potentially helpful bit to this oneliner / shell scripting thread. Though to be fair, this perhaps strains the de

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-20 Thread Thomas Hartman
10 . reverse . ( \s -> drop (length s - 10 ) s ) . Data.List.sort -- maybe not necessary? . map ( read :: String -> Integer ) . Data.Set.toAscList . Data.Set.fromList -- more efficient than prelude nub . filter ( all Data.Char.isDigit ) . lines' 2007/3/7, Chris Kuklewicz <[EMAIL

[Haskell-cafe] open a browser from the command line, wait a few seconds, and shut it. (ie, translate forking from bash to haskell)

2007-03-08 Thread Thomas Hartman
I have a bash script that opens a browser for a few seconds, and then closes it. Could someone point me up the equivelant(s) in haskell, h4sh, hsh, etc,0 and friends? I reckon this amounts to, what's the process for translating forking from bash to haskell. #!/bin/bash konqueror http:

Re: [Haskell-cafe] Re: problems installing ghc 6.6 with extralibs (bad interface file)

2007-03-08 Thread Thomas Hartman
recommend them :) 2007/2/28, Paul Brown <[EMAIL PROTECTED]>: On 2/27/07, Seth Gordon <[EMAIL PROTECTED]> wrote: > Thomas Hartman wrote: > > Thanks. I incorporated these changes, and it cranks longer now before > > failing. But still fails, now with a seg fault. > According to

[Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-07 Thread Thomas Hartman
7/3/7, Thomas Hartman <[EMAIL PROTECTED]>: Okay, so much for PCRE match. Can someone show me give me pointers on PCRE replace? Ideal would be something with all the =~ s/// semantics from perl. (Not sure if this is included in Text.Regex.PCRE. is it?) In other words, how to do this with (

[Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-07 Thread Thomas Hartman
Okay, so much for PCRE match. Can someone show me give me pointers on PCRE replace? Ideal would be something with all the =~ s/// semantics from perl. (Not sure if this is included in Text.Regex.PCRE. is it?) In other words, how to do this with (preferrably) Text.Regex.PCRE ? Of course in this

[Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-07 Thread Thomas Hartman
ell/UnixTools$ cat ImportsRegexPosix.hs import Text.Regex.Posix [EMAIL PROTECTED]:~/learning/haskell/UnixTools$ cat ImportsRegexPCRE.hs import Text.Regex.PCRE [EMAIL PROTECTED]:~/learning/haskell/UnixTools$ 2007/3/7, Thomas Hartman <[EMAIL PROTECTED]>: In the spirit of making easy th

Re: [Haskell-cafe] ANN: Bugfixes for regex-posix and regex-pcre ByteString use

2007-03-07 Thread Thomas Hartman
AIL PROTECTED]>: On Mar 7, 2007, at 7:02 , Thomas Hartman wrote: > I'm having trouble building regex-pcre from > > http://darcs.haskell.org/packages/regex-unstable/regex-pcre/ > > [EMAIL PROTECTED]:~/haskellInstalls/regex-pcre$ ghc --version > The Glorious Glasgow Ha

[Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-07 Thread Thomas Hartman
( \x -> x =~ "^q" :: Bool ) . lines' Imports.hs [EMAIL PROTECTED]:~/learning/haskell/UnixTools$ cat Imports.hs import Text.Regex.Posix **** 2007/3/2, Thomas Hartman <[EMAIL PROTECTED]>: Okay, I am aware of http://haskell.org/haskellwiki/Simp

Re: [Haskell-cafe] ANN: Bugfixes for regex-posix and regex-pcre ByteString use

2007-03-07 Thread Thomas Hartman
I'm having trouble building regex-pcre from http://darcs.haskell.org/packages/regex-unstable/regex-pcre/ [EMAIL PROTECTED]:~/haskellInstalls/regex-pcre$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.6 First (after darcs pulling) it complained [EMAIL PROTECTED]:~/hask

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-06 Thread Thomas Hartman
quoth brandon allberry in a private message (answering my unintended private message) On Mar 7, 2007, at 1:51 , Thomas Hartman wrote: Can't seem to find these packages. Do I need to add another repo? Or build from source? You may have to backport; I found it in feisty (universe) in a

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-06 Thread Thomas Hartman
Mar 4, 2007, at 6:31 , Thomas Hartman wrote: > Setup.lhs: cannot satisfy dependency haskell-src-any Used to be bundled, now unbundled. On debian/ubuntu check your libghc6-*-dev packages. (libghc6-haskell-src-dev?) -- brandon s. allbery[linux,solaris,freebsd,perl] [EMAIL PROTECT

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-04 Thread Thomas Hartman
words.($*).words)" ; } > >> > >> function filesizes () { > >> find -maxdepth 1 -type f | xargs du > >> } > >> > >> echo haskell, ghc -e pipe > >> time filesizes | ghc -e 'interact $ (++"\n") . show . sum

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-04 Thread Thomas Hartman
head . words ) . lines ' > echo "**" > > echo haskell, hmap pipe > time filesizes | hmap '(++"\n") . show . sum . map ( ( read :: String > -> Integer ) . head . words ) . lines' > echo "**" > > echo haskell, tw

[Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-04 Thread Thomas Hartman
) . show . sum . map ( read :: String -> Integer ) . lines' echo "******" echo perl, two pipes time filesizes | perl -ane 'print "$F[0]\n"' | perl -e '$sum += $_ while <>; print "$sum\n"' 2007/3/2, Thomas Hartman <[EMAIL PRO

Re: [Haskell-cafe] wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-02 Thread Thomas Hartman
Great tip! One question though. What condition is if which ghc >/dev/null checking? What bad thing will happen if you don't do this check? Sorry this is more a bash question than a haskell question. 2007/3/2, Bas van Dijk <[EMAIL PROTECTED]>: On Friday 02 March 2007 14:48,

[Haskell-cafe] wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-02 Thread Thomas Hartman
Okay, I am aware of http://haskell.org/haskellwiki/Simple_unix_tools which gives some implementation of simple unix utilities in haskell. But I couldn't figure out how to use them directly from the shell, and of course that's what most readers will probably wnat. Or let me put it another way.

Re: [Haskell-cafe] splitting strings

2007-03-01 Thread Thomas Hartman
I think you want Text.Regex. splitRegex or something very much like it. http://haskell.org/hoogle/?q=String-%3E%5BString%5D 2007/3/1, h. <[EMAIL PROTECTED]>: Hello, I wrote the following split function for Strings: splitS :: String -> String -> [String] splitS a b = splitA a b where

Re: [Haskell-cafe] Re: Hi can u explain me how drop works in Haskell

2007-03-01 Thread Thomas Hartman
N?). Anyway, I think if you're only testing a single function and you're trying to come to grips with recursion and other fundamentals of functional programming, then sidetracking to become familiar with a testing suite such as Quickcheck or HUnit might be overkill. I prefer the method used

[Haskell-cafe] Re: problems installing ghc 6.6 with extralibs (bad interface file)

2007-02-27 Thread Thomas Hartman
hc-6.6-src-extralibs.tar.bz2 fi tar -tvjf ghc-6.6-src.tar.bz2 tar -tvjf ghc-6.6-src-extralibs.tar.bz2 pushd ghc-6.6 (cd compat && make clean && make UseStage1=YES) (cd utils && make clean && make UseStage1=YES) ./configure make make install popd [EMAIL PROTECTED

[Haskell-cafe] problems installing ghc 6.6 with extralibs (bad interface file)

2007-02-26 Thread Thomas Hartman
I installed ghc 6.6 from source ok. But then when I tried installing it with the "extralibs" to get all the functionality that had been unbundled in 6.6, I hit a glitch. Anyone ever seen anything like this? In case it matters, this is ssh-ed in to a virtualized user mode linux session.

[Haskell-cafe] Did quickchekc get dropped from ghc from 6.4 to 6.6?

2007-02-26 Thread Thomas Hartman
According to http://www.cs.chalmers.se/~rjmh/QuickCheck/ Quickcheck is distributed with ghc. I seem to recall this came with ghc 6.4. After upgrading to ghc 6.6, however, I don't seem to have it anymore. Do I need to install it from cabal? If so, I assume this would start by wgetting http://h

Re: [Haskell-cafe] Hi can u explain me how drop works in Haskell

2007-02-26 Thread Thomas Hartman
o, is there a better strategy? Or is using quickcheck here overkill? 2007/2/26, Antonio Cangiano <[EMAIL PROTECTED]>: On 2/26/07, Thomas Hartman <[EMAIL PROTECTED]> wrote: > Here's my, probably very obvious, contribution. > > What I'd like feedback on is > > 1) code

Re: [Haskell-cafe] Hi can u explain me how drop works in Haskell

2007-02-25 Thread Thomas Hartman
Here's my, probably very obvious, contribution. What I'd like feedback on is 1) code seem ok? (hope so!) 2) What do you think of the tests I did to verify that this behaves the way I want? Is there a better / more idiomatic way to do this? ** [EMAIL

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Thomas Hartman
This seemed like a handy thing to have an example of, so I added it to my growing repo of sample haskell programs and tried running it. But I was unsuccessful. Can anyone see what I'm doing wrong? In case it matters, I'm on a virtualized user-mode-linux shell. **

Re: [Haskell-cafe] trouble installing ghc 6.6: xargs: /usr/bin/ar: terminated by signal 11

2007-02-20 Thread Thomas Hartman
I finally got around to trying this, but still no luck. now getting missing cmm.h error. [EMAIL PROTECTED]:~/haskellInstalls/ghc-6.6$ cat mk/build.mk SplitObjs=NO after doing sudo make > make.out [EMAIL PROTECTED]:~/haskellInstalls/ghc-6.6$ tail make.out -

[Haskell-cafe] speeding up fibonacci with memoizing

2007-02-18 Thread Thomas Hartman
I just thought this was interesting, so I would share it. Thanks to whoever it was on #haskell who helped me, sorry I can't remember who. -- horribly slow. try slow_fibs 30, not too much higher than that and it hangs slow_fibs = map slow_fib [1..] slow_fib 1 = 1 slow_fib 2 = 1 slow_fib n = ( slo

[Haskell-cafe] OT: any haskell-friendly / functional programming friendly comp sci programs? (for a 30s guy who did his undergrad in liberal arts)

2007-02-05 Thread Thomas Hartman
haskellers, I'm contemplating returning to school after a decade as a worker bee, and almost that long as a worker bee doing computer consulting / miscelaneous tech stuff. Ideally I'd like to get a masters, but I don't know if that's feasible this late in the game. If it's not, I might settle for

Re: [Haskell-cafe] some way to reverse engineer lambda expressionsout of the debugger?

2007-01-12 Thread Thomas Hartman
works like a charm :) 2007/1/11, Claus Reinke <[EMAIL PROTECTED]>: > Looks very nice! thanks!-) it is far from a full-blown solution to the question in the subject, but it has its uses. > However, I'm doing my learning on ghci and got an error when I tried to load it. > > Is this hugs only,

Re: [Haskell-cafe] some way to reverse engineer lambda expressions out of the debugger?

2007-01-11 Thread Thomas Hartman
Looks very nice! However, I'm doing my learning on ghci and got an error when I tried to load it. Is this hugs only, or should I try harder? 2007/1/11, Malcolm Wallace <[EMAIL PROTECTED]>: Bulat Ziganshin <[EMAIL PROTECTED]> wrote: > tphyahoo wrote: > > > *UnixTools> explodeLambda( map (*) [1

<    1   2   3   4