Re: [Haskell-cafe] Is it written down somewhere what sort of things belong in Data.*?

2011-08-22 Thread Clifford Beshers
I do not know of a specific definition, but I think the heuristic for
inclusion in Data is that which is neither control nor chaos.

By 'control' I mean functions that are often baked into other languages,
such as exception handling, bracketing, but which can be implemented as
library functions in Haskell.

By 'chaos', I mean anything specialized to a particular field (e.g.,
biology, physics), even if it be part of computer science, e.g., software
management, computer graphics.

What's left are data types and structures that are ubiquitous (e.g., lists,
sets, maps), essential for basic communication (e.g., characters, text,
encryption, serialization, persistence) or language (but not compiler)
specific (e.g., reflection, dynamic typing, generics).


On Mon, Aug 22, 2011 at 9:50 AM, David Fox dds...@gmail.com wrote:

 I'm never quite sure what the distinction is that defines the modules
 under Data.*.  Can anyone explain?

 -david

 ___
 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] Time for a new logo?

2008-12-14 Thread Clifford Beshers
On Sun, Dec 14, 2008 at 6:27 PM, Don Stewart d...@galois.com wrote:


 Could you attach it to the web page,

http://haskell.org/haskellwiki/Haskell_logos/New_logo_ideas


I tossed up a quickie candidate there as well.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] PRE-ANNOUNCE: cabal-debian (automatically debianize cabal packages)

2008-08-21 Thread Clifford Beshers
On Thu, Aug 21, 2008 at 11:19 AM, Don Stewart [EMAIL PROTECTED] wrote



 Can the Debian/Haskell interest parties say something about
 who's doing what in this area? Is there hope for a concrete
 effort to import large numbers of hackage apps and tools into Debian?



I made a stab at it, but ran into issues with build dependencies that I
didn't have the time to solve, so I switched to just importing the packages
I needed.  Currently, we at SeeReason are building packages for our own use
based on Ubuntu Hardy Heron.  People are welcome to use them at their own
risk. If it breaks your computer, you get to keep both halves.

People are also welcome to use our autobuilder, which we use to build the
packages.   All packages can be found at deb.seereason.com.  We are trying
to limit the amount of time we spend on these tools, but would be happy to
provide pointers to self-starters and/or discuss options for other people to
work on them.

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


Re: [Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Clifford Beshers
As in the dictionary (http://www.merriam-webster.com/dictionary/cabal),
accent on the second syllable, which is pronounced like none of ball,
balance, boll and bale.  Roughly the same rhythm as kaboom.

On Tue, May 27, 2008 at 6:04 PM, Dan Piponi [EMAIL PROTECTED] wrote:

 In particular, which syllable gets the stress, and what are the
 lengths of the two vowels? Couldn't find anything in the FAQ
 (http://www.haskell.org/haskellwiki/Cabal/FAQ).
 --
 Dan
 ___
 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] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Clifford Beshers
On Tue, May 27, 2008 at 10:27 PM, Benjamin L. Russell 
[EMAIL PROTECTED] wrote:

 Actually, according to the definition that you used (
 http://www.merriam-webster.com/dictionary/cabal), there are the following
 two pronunciations of cabal:

 1) \kə-ˈbäl\
 2) \kə-ˈbal\

 The a phoneme of the ˈbal syllable of pronunciation 2 is actually
 defined to be identical to the first syllable ˈba of balance (
 http://www.merriam-webster.com/dictionary/balance); viz.:

 \ˈba-lən(t)s\


But if you say it that way, you get kicked out of the cabal.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] FP and Quality

2008-02-07 Thread Clifford Beshers
ICFP 2007 introduced a new category of paper called an Experience Report,
which is not required to add to the body of research knowledge, but rather
report on the effectiveness of functional tools and methods in full-scale
projects.  You can read the official description in the call for papers:
http://www.icfpconference.org/icfp2008/cfp/cfp.html

The ICFP 2007 schedule lists all the experience reports here:
http://www.informatik.uni-bonn.de/~ralf/schedule.html

You can get the PDFs for the experience report (and talk slides) we wrote
describing our use of FP at Linspire here:
http://seereason.com/publications/

Cliff


On Feb 4, 2008 2:20 PM, PR Stanley [EMAIL PROTECTED] wrote:

 Hi folks
 I'm thinking of writing a little essay arguing the case for the
 advantages of FP for producing quality software. Can the list
 recommend any papers/articles which I can use as sources of my
 argument? I have access to the IEEE database too although earlier I
 couldn't find anything on the subject.
 Thanks, Paul

 ___
 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] Bug in System.Environment - EOT inserted into argument string

2008-02-04 Thread Clifford Beshers
No, I cannot reproduce this.

2008/2/4 David Fox [EMAIL PROTECTED]:

 I'm seeing the character ^D inserted into argument strings that are about
 256 characters long with GHC 6.8.2.  Anyone else?

 Test.hs:

 module Main where

 import System.Environment
 import System.IO

 main =
 do args - getArgs
hPutStrLn stderr (args:  ++ show args)


 Output:

 $ ghc6 --make Test.hs -o test
 [1 of 1] Compiling Main ( Test.hs, Test.o )
 Linking test ...
 $ ./test
 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
 args:
 [01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234\EOT5678901234567890123456789]


 ___
 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] parsec and bytestring; was: hxt memory useage

2008-01-24 Thread Clifford Beshers
It well might.  I believe you can do this yourself.  Jeremy Shaw wrote a
parser for Debian control files, which was useless on the really large
package index files.  He switched it over to using bytestrings and that
solved the problem.  You can find the code in a darcs repository at:
http://src.seereason.com/haskell-debian.  It may reference other libraries
hosted at that URL, which you can browse from the base URL.


On Jan 24, 2008 1:34 PM, Matthew Pocock [EMAIL PROTECTED] wrote:

 Would a bytestring-backed implementation of parsec solve my problems? Is
 there
 such a beast out there?

 Matthew
 ___
 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] Evolutionary Computing

2008-01-24 Thread Clifford Beshers
On Jan 24, 2008 3:55 PM, PR Stanley [EMAIL PROTECTED] wrote:

 Hi
 What does the list think of EC? Genetic algorithm is apparently the
 latest thing.


They've been around for a while, actually.  See below for some work from the
early 1990's.


 Is EC mathematically reasonable?


I'm not sure what that means, but they can be useful, especially when you
are looking for something that is novel, rather than meeting specific,
pre-determined criteria.  Karl Sims made a business out of them for
generating graphics.  Survival of the prettiest, he called it.

For more info:

http://www.genarts.com/karl/
http://www.genarts.com/karl/papers/siggraph91.html
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] One-line haskell program with GHC

2008-01-18 Thread Clifford Beshers
2008/1/18 Sukit Tretriluxana [EMAIL PROTECTED]:

 Hi,

 I don't know if it's been asked before. I just wonder if GHC supports some
 sort of one-liner program that can be specify right as the argument to
 either ghci or runghc program. In perl, they have something like

 perl *-e* 'print Hello'

 Do we have similar thing with GHC?



 ghc -e 'putStrLn Yes, we do.'
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] libmpd-haskell RFC

2008-01-17 Thread Clifford Beshers
A comment on documentation.  I find it very frustrating when libraries are
described as an interface to X, where X is often an acronym that has
multiple definitions on the web.  Lots of clicking got me to 'Music Player
Demon', but no further description or links.  Just a little more
information, say in a top-level README and/or the Haddock docs would be
greatly appreciated.

2008/1/16 Ben Sinclair [EMAIL PROTECTED]:

 Hello all,
  If anybody has already used libmpd-haskell (the darcs repo version)
 or would like to look over it I would appreciate their comments.

 Thanks,
 Ben

 http://turing.une.edu.au/~bsinclai/code/libmpd-haskell/http://turing.une.edu.au/%7Ebsinclai/code/libmpd-haskell/

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.6 (GNU/Linux)

 iD8DBQFHjeRPDo+byWtWM/kRApQhAJ9eMVQR+Bd5hgmsXSF9rRvVCS8ZxACg15rl
 FuRALK8V7ArBSxR9FvTYUr4=
 =d97o
 -END PGP SIGNATURE-

 ___
 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] Not to load Prelude

2008-01-10 Thread Clifford Beshers
Use:

import Prelude ()


On Jan 10, 2008 11:22 AM, Maurí­cio [EMAIL PROTECTED] wrote:

 Hi,

 Is it possible not to load Prelude module
 when compiling a Haskell module? Or instruct
 ghc to unload it?

 Thanks,
 Maurício

 ___
 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] Why this exception occurs ?

2007-05-25 Thread Clifford Beshers

Donald Bruce Stewart wrote:

I've always thought that the obfuscation opportunities for Num
literal overloading, combined with Num *overflowing* were
underappreciated.
  


Search for 'mel blackjack'.  You and Mel would get along fine.

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


Re: [Haskell-cafe] How Albus Dumbledore would sell Haskell

2007-04-18 Thread Clifford Beshers

Seth Gordon wrote:

I think a more powerful argument would be to talk about cases where
Haskell is *actually being used* industrially.  E.g., these folks at
Credit Suisse are using Haskell for their analytics because in their
line of work, if the implementation of the code doesn't match up
perfectly with the spec, their employer could lose millions of dollars,
and the programmers might not notice the bug until those millions were
long gone.
  


Indeed, hence the Haskell Communities and Activities Report 
http://www.haskell.org/communities/, Commerial Uses of Function 
Programming (CUFP) http://cufp.galois.com/, and the new category of 
Experience Report http://icfp07.eecs.harvard.edu/cfp.html#experience 
at ICFP.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Type classes and type equality

2007-04-16 Thread Clifford Beshers

Jeremy Shaw wrote:


I noticed that the results can be a bit suprising sometimes. See if
you can predict the answers to these (in ghci):
  


Interesting examples.  Here's another one that I would find problematic:

   *SameType same Nothing (Just xyzzy)
   False
   *SameType same (Nothing :: Maybe String) (Just xyzzy)
   True

And of course, the case with the integers lifts right up:

   *SameType same (Just 1) (Just 1)
   False


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


Re: [Haskell-cafe] and sequencing [newbie]

2007-04-16 Thread Clifford Beshers

Donald Bruce Stewart wrote:

david:
  

   Ah... so the secret is in the hidden variables.  On some
   level I am beginning to fear that Monads resurrect some of
   the scariest aspects of method overriding from my OO
   programming days.  Do you (all) ever find that the ever
   changing nature of = makes code hard to read?



You always know which monad you're in though, since its in the type.
And the scary monads aren't terribly common anyway.
  


Also, the monad laws impose a level of sanity that most OO frameworks do 
not, right?


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


Re: [Haskell-cafe] our worst unsafePerformIO nightmares are upon us!

2007-02-19 Thread Clifford Beshers

Nicolas Frisby wrote:

http://www.thinkgeek.com/geektoys/cubegoodies/86b8/

Now you can really show your coders why unsafePerformIO is to be avoided! 


On the contrary, seems like a little more non-determinism would really 
make that thing into an effective weapon. ;-)

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


[Haskell-cafe] PDF library?

2007-01-23 Thread Clifford Beshers
I don't suppose anyone has any Haskell code that understands the PDF 
format, do they?

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


Re: [Haskell-cafe] Writing Haskell For Dummies Or At Least For People Who Feel Like Dummies When They See The Word 'Monad'

2006-12-11 Thread Clifford Beshers


Kirsten Chevalier wrote:


There's also excellent Haskell documentation available on the web
already, but people like to buy books and they like to have an
artifact that they can hold in their hands without getting laser
printer toner all over themselves.


It also helps to collect and edit.  Wiki's collect a lot of info, but 
they are often poorly organized and hard to search.


I've always thought this book should be called ``Haskell for Hackers''.  
I've been collecting guidelines for some time.  Here are a few:


   * The introduction should have some compelling arguments and
 examples about why someone should bet their business on functional
 programming.  An important focus should be the rise of dual- and
 quad-core processors, emphasizing the potential for good libraries
 and compilers to leverage these effectively.
   * Each and every bit of syntax should be explained in plain language
 and these explanations should be typeset like theorems, numbered
 and offset from the rest of the text.  The explanations should
 only use words and concepts that are known to all imperative
 programmers, or terms that have already been carefully introduced
 and defined.
   * Each code fragment should be explained in plain language.  Quite
 often Haskell literature explains something in terms of Haskell,
 which is fine if you already know Haskell, but maddening if you don't.
   * IO must be introduced and used in the first chapter.  Experienced
 programmers are not willing to wait until page 327 for some hint
 about how to replace printf.  That doesn't mean that the first
 chapter will be all about monads, either,  just some basics of how
 to perform IO along with some examples.
   * Examples should generally be pulled from the imperative
 literature, not the functional. 
 http://haskell.org/haskellwiki/Simple_unix_tools is a good example.

   * Alternatives to lex/yacc, shell programming, perl regular
 expressions and awk/perl style text processing must be covered.

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


Re: [Haskell-cafe] New Name for MissingH?

2006-11-30 Thread Clifford Beshers


John Goerzen wrote:

Quick feedback time...

One comment people made in the Future of MissingH thread was that the name
isn't very suggestive of what the library does.


My colleague uses modules called `My' to hold functions that seem like 
they should be in a library, but which aren't yet mature enough to be 
promoted.
I've always thought of MissingH the same way.  It would make a good 
place for new functions like intercalate to be placed while they are 
being considered.


But eventually, good functions and modules should graduate.  
ConfigParser and HVFS are good candidates to be standalone libraries, as 
you say.  I've been meaning to submit the 'merge' function that we sent 
you, as well.


If MissingH acted as a general waystation, we could keep a stable 
library base installed on our systems, but get the latest that people 
are talking about by pulling in that one package.


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


Re: [Haskell-cafe] split string into n parts

2006-10-23 Thread Clifford Beshers





Udo Stenzel wrote:

  jim burton wrote:
  
  
I want to split a string into 5 parts of equal length, with the last fifth
padded if necessary, but can't get it right - here's what I've got - 

  
  
fifths s = unwords.take 5.unfoldr (Just . splitAt l) $ s ++ repeat ' '
  where l = (length s + 4) `div` 5 
  



Okay, you win. That's the nicest answer so far, I think.

But here are solutions with a different theme altogether. They are
based on groupBy, not unfoldr. I really like the new `on` function.


module Chunk where

import Data.List

(on) f g = \x y - f (g x) (g y)

groupByIndex test xs =
 map (map snd) $ groupBy (test `on` fst) $ zip [0..] xs

-- chunk : divide the input string into n chunks of equal length (len),
with padding

-- chunk1 accepts the number of chunks
chunk1 n pad xs = 
 unwords $ take n $ groupByIndex ((==) `on` (`div` len)) $ xs ++
repeat pad
 where len = (length xs + n - 1) `div` n

-- chunk2 accepts the length of each chunk
chunk2 len pad xs = 
 unwords $ take n $ groupByIndex ((==) `on` (`div` len)) $ xs ++
repeat pad
 where n = (length xs + len - 1) `div` len



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


Re: [Haskell-cafe] Debugging Newton's method for square roots

2006-10-15 Thread Clifford Beshers


Vraj Mohan wrote:

This works for several examples that I tried out but goes into an infinite loop
for my_sqrt 96. How do I go about debugging this code in GHC or Hugs?

(The equivalent code is well-behaved on MIT Scheme)
  


There was some excellent advice in the other responses, but I thought it 
worth mentioning that your Haskell code converges if you step up from 
Float - Float to Double - Double.


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


Re: [Haskell-cafe] Why Exotic Languages Are Not Mainstream

2006-08-11 Thread Clifford Beshers

Neil Mitchell wrote:


If you download and compile hoogle from the darcs repo, there is a
console version included. Of course, lambdabot gives you lots more
than just hoogle, so might still be the one for you. 
I've been avoiding that, because there are too many things I'm tempted 
to fiddle with inside it.  But you've talked me into it.

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


Re: [Haskell-cafe] Why Exotic Languages Are Not Mainstream

2006-08-11 Thread Clifford Beshers


Neil Mitchell wrote:


Just as a warning, I've been offline without a computer for a week,
and have now entirely redesigned pretty much every aspect of Hoogle 3
in preparation for Hoogle 4. Its all on paper for now, but in the very
near future Hoogle will get completely rewritten :)

Excellent.  I see on your long term list an item for specifying module 
names as input.  I don't suppose you plan to support something like 
'Data.*' returning a list of all the modules at that level of the 
hierarchy? Recently I've been wanting an interactive command for 
browsing the module hierarchy.  Switching to a browser just isn't 
cutting it anymore.

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


Re: [Haskell-cafe] A program which never crashes (even when a function calls error)

2006-08-01 Thread Clifford Beshers

Stephane Bortzmeyer wrote:

[It is a philosophical question, not a practical programming problem.]

I'm used, in imperative programming languages with exceptions (like
Python) to call any function without fear of stopping the program
because I can always catch the exceptions with things like (Python):

while not over:
   try: 
  code which may raise an exception...

   except Exception e:
  do something clever

How to do it in Haskell? How can I call functions like Prelude.head
while being sure my program won't stop, even if I call head on an
empty list (thus calling error)?

  

Here's another way of looking at it, that I've grown fond of.

If your program is a total function, then there should be no exceptions.

That is, if you properly model the world, in all its messiness, then you 
can write a function that maps every instance of the world to some valid 
output, even if that output is ``Sorry.''


It might seem a daunting task, but liberal use of the Maybe class from 
the ground up helps.  We have suffered through quite a bit of this with 
our hardware detector, where unexpected situations are the norm.  My 
colleague David Fox has spent considerable time computing reasonable 
answers in seemingly impossible situations, to the point where you 
cannot turn around without bumping into a Maybe construct.

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


Re: [Haskell-cafe] do we have something like isDefined or isNull in Haskell?

2006-06-15 Thread Clifford Beshers




Duncan Coutts wrote:

  On Thu, 2006-06-15 at 13:11 +0100, Duncan Coutts wrote:

  
  
then you can construct your records using:

foo = default { weight = 3.2 }

  
  
Oops, as David House pointed out to me that should of course be

foo = default { weight = Just 3.2 }
  

I think the correct response in these cases is: That was left as an
exercise for the type checker.

On another note, who picked the word `Just' for this type and how did
we end up with Some x | None in O'Caml and Just x | Nothing in Haskell?



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


Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Clifford Beshers




Sara Kenedy wrote:
Hi all,
  
  
I want to write a function to separate a string into a list of strings
  
separated by commas.
  
  
Example:
  
separate :: String - [String]
  
  
separate "Haskell, Haskell, and Haskell" = ["Haskell", "Haskell", "and
Haskell"]
  
  
If anyone has some ideas, please share with me. Thanks.
  

Here is a solution using the Posix regex module.
Prelude Text.Regex splitRegex (mkRegex "[ \t]*,[ \t]*")
"Haskell, Haskell, and Haskell"
["Haskell","Haskell","and Haskell"]

This form should work regardless of locale, but appears to be broken,
although I expect this is either my fault or that of the underlying
Posix library:
Prelude Text.Regex splitRegex (mkRegex
"[:space:]*,[:space:]*") "Haskell, Haskell, and Haskell"
["Haskell"," Haskell"," and Haskell"]




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


Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Clifford Beshers

Brandon Moore wrote:


Going by man grep, those [:foo:] classes are only special inside a 
character class, otherwise [:space:]* = [aceps:]*.


  Prelude Text.Regex splitRegex (mkRegex [[:space:]]*,[[:space:]]*)
  Haskell, Haskell, and Haskell
  [Haskell,Haskell,and Haskell]


The smart money was on user error.   Thanks.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Lambda abstraction analogous to imperative pseudo-code?

2006-06-10 Thread Clifford Beshers




The Wikipedia article on lambda abstractions
(http://en.wikipedia.org/wiki/Lambda_abstraction) has a statement that
does not resonate with me:
A lambda abstraction is to a functional programming language
such as Scheme what pseudo-code
is to an imperative programming language.

Does anyone else find this to be a peculiar statement? If you think it
is accurate, could you provide an alternate explanation and/or example
to the one in the article?



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


Re: [Haskell-cafe] Features of Haskell

2006-06-09 Thread Clifford Beshers




Tracy R Reed wrote:

  Jared Updike wrote:
  
  
I was always impressed with Autrijus Tang's presentation here:
  http://www.pugscode.org/euroscon/haskell.xul (view with Firefox
or other Gecko-based browser)
  

  
  
Unfortunately, this presentation alone is incomprehensible to someone
who does not know Haskell.  I suspect it would do much better with
audio. I think Haskell really needs something like

http://oodt.jpl.nasa.gov/better-web-app.mov

and

http://ia301106.us.archive.org/1/items/SeanKellyGettingYourFeetWetwithPlone/wetfeet.mov

to make the point. Sean Kelly's screencasts made a big impression and
have been very widely downloaded and have really done a lot to promote
Plone in recent months.
  

Interesting. I just gave a talk to the SGVLUG (San Gabriel Valley
Linux Users Group, which is centered at Cal Tech). It was the first
time I've given such a talk, half about Linspire/Freespire, half about
Haskell features, and the other three halves were technical problems.

I looked at Tang's presentation as well, and while there were parts
that I thought wonderful (the definition of fibonacci with parallel
list comprehension, for example), I thought that most of it would go
right past an audience of beginners.

I didn't get a chance to practice my talk beforehand, so there were
rough spots, but in general I felt they got as much as could be
expected in a whirlwind tour. Of course, I lost them completely at the
IO monad.

Writing the slides, I found that it is hard to disentangle all the
concepts and build from the ground up. Those of us who use it have
forgotten just how many new concepts there are and how tightly bound
together they are in Haskell. As always, when you try to teach
something you get a deeper understanding of it. I'll see if I can't
clean up some of the examples with hindsight and send it along to you
and see what you think.

Cliff



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


Re: [Haskell-cafe] Features of Haskell

2006-06-09 Thread Clifford Beshers




John Meacham wrote:

  ramble

On Fri, Jun 09, 2006 at 02:16:47AM -0700, Clifford Beshers wrote:
  
  
Interesting.  I just gave a talk to the SGVLUG (San Gabriel Valley Linux 
Users Group, which is centered at Cal Tech).  It was the first time I've 
given such a talk, half about Linspire/Freespire, half about Haskell 
features, and the other three halves were technical problems.

  
  
Oh, I live a block from Caltech, I didn't know there was a Haskell talk
there. 
  

Dang!  I referenced your 'small but featureful grep' as an example of
how Haskell should help reduce the need for `little languages' and
two-level languages.  I promised to come back in six months or so and
talk about the progress we've made on development tools for Freespire. 
I'll let you know.

  
  
  
Writing the slides, I found that it is hard to disentangle all the 
concepts and build from the ground up.  Those of us who use it have 
forgotten just how many new concepts there are and how tightly bound 
together they are in Haskell.  As always, when you try to teach 
something you get a deeper understanding of it.  I'll see if I can't 
clean up some of the examples with hindsight and send it along to you 
and see what you think.

  
  
I always prefered using a chalkboard (or whiteboard, or overhead +
markers) instead of a pre-prepared slideshow when giving talks. it lets
me change the focus depending on audience reaction and questions more.
If you can get away with it, I'd recommend it for future talks, ignore
anyone that says it is not profesional, they wouldn't have paid
attention anyway to anything other than your font choices and choice of
screen-wipes between slides.
  

If I had been doing a tutorial, I might have done that, but I was doing
a whirlwind tour where the goal was to get people excited. Also, I find
that the first time presenting some information, I do better if I lay
it out before hand.  Explanation of code is a different beast than
creation of it.



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


[Haskell-cafe] Re: [Haskell] Keeping input separate from output?

2006-05-26 Thread Clifford Beshers

ihope wrote:


How would I keep the Foo! from conflicting with the Lorem ipsum
dolor sit amet.?
Well, if two millennia were not enough, I'm not sure any amount of 
Haskell will help.


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


[Haskell-cafe] Linspire/Freespire Core OS Team and Haskell

2006-05-13 Thread Clifford Beshers
The OS team at Linspire, Inc. would like to announce that we are 
standardizing on Haskell as our preferred language for core OS development.


We are redoing a bunch of our infrastructure using Haskell as our common 
standard language. Our first task is redoing our Debian package builder 
(aka autobuilder) in Haskell.  Other tools such as ISO builders, package 
dependency checkers are in progress. The goal is to make a really tight 
simple set of tools that will let developers contribute to Freespire, 
based on Debian tools whenever possible. Our hardware detector, 
currently in OCaml, is on the block to be rewritten as well.


There are four of us using Haskell, all CCed on this message.  All of us 
have been using functional languages for quite some time.  At Linspire, 
our choices have been OCaml and Haskell. David Fox wrote the hardware 
detector in OCaml and is now porting it to Haskell.  Jeremy Shaw has 
been doing various utilities in Haskell for several years.  Sean Meiners 
recently wrote an application for managing his recipe collection and is 
now hooked.  I am porting our CD build procedure from OCaml to Haskell. 

We are interested in many other uses of Haskell.  The recent discussion 
about Haskell as a shell interests greatly, for example, as we have all 
suffered through years of bash code.  We'd also like to make some 
Haskell bindings for Qt and KDE, though at the moment we don't have a 
good plan to tackle that problem efficiently.


To date, Linspire (formerly Lindows) has focused on polishing Linux for 
the consumer market.  I mentioned Freespire, above.  We announced 
Freespire recently (www.freespire.org).  Essentially it is a more open, 
developer friendly version of Linspire.  
http://freespire.org/about/vision and http://freespire.org/support/faqs 
have good overviews.  Access through apt, open-source CNR client and 
many other good things.


I mention Freespire because some of our colleagues were concerned that 
using Haskell would isolate us from the larger community of developers 
and make it hard to find new employees skilled in Haskell, should we 
need to.  From our perspective, functional programming makes us more 
effective and we think that getting even a few people who know Haskell 
hacking with us is a better combination than lots of Perl and bash.  I'm 
not sure I expect anyone on this list to disagree, but still I'd love to 
hear your thoughts on the subject.


Also, Linspire is based on Debian. We've talked a little with John 
Goerzen who announced his missingH library here a while back.  We've 
imported it and expect to pass updates back to him as well as any other 
libraries and tools that he would be interested in includng in the 
Debian archive.  Also, it seems there are quite a few other libraries 
out there which are either not debianized or stale.  We are looking into 
helping the folks on the debian-haskell list with that, if possible, 
documenting and automating wherever possible.




Clifford Beshers [EMAIL PROTECTED]
OS Team Lead
Linspire, Inc.

(I'm subscribed to this list from my personal account.  Feel free to use 
either address.)


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