[Haskell-cafe] Boston Area Haskell User's Group, first meeting on Saturday February 28th

2009-02-26 Thread Shae Matijs Erisson
This weekend the Boston Area Haskell User's Group will have its first meeting.
You are invited to the mailing list, and to the first meeting this weekend!
If you think you'll show up to the meeting, please send your RSVP to the
mailing list, thanks!

Mailing list: http://groups.google.com/group/bostonhaskell

Agenda:
Edward Kmett will talk about either comonads or Kan extensions.
Shae Erisson will talk about QuickCheck and relatives.
Some attendees will volunteer to talk at the next meeting (I hope).

Time: Starts at noon, organized stuff stops at 2pm.

Place: BlueSpec in Waltham, MA

Wikipage with directions to the venue: 
http://www.haskell.org/haskellwiki/Boston_Area_Haskell_Users%27_Group

If you're in or near Boston and you're interested in Haskell, show up!
-- 
Programming is the Magic Executable Fridge Poetry, | www.ScannedInAvian.com
It is machines made of thought, fueled by ideas.   | -- Shae Matijs Erisson


pgpbNL5lNqPeA.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Try Graphics.SOE.Gtk ? was Re: Updated School of Expression Sources?

2006-11-17 Thread Shae Matijs Erisson
"Justin Bailey" <[EMAIL PROTECTED]> writes:

> I downloaded the SOE sources from http://www.haskell.org/soe and found they
> were not compatible with the my version of WinHugs (Sep 2006). I have two
> questions:
>
> 1) Is an updated version of those sources available?
> 2) If not, would someone like to host mine? I updated all the source files
> so they at least load without error. Mostly it involved changing a few
> import statements. I also had to make some updates to the included Haskore
> files.

Another option is Duncan Coutts' reimplementation of Graphics.SOE in GTK2:
http://haskell.org/~duncan/soegtk/
-- 
I've tried to teach people autodidactism,| ScannedInAvian.com
but it seems they always have to learn it for themselves.| Shae Matijs Erisson


pgpSzJF44HCPT.pgp
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2006-08-13 Thread Shae Matijs Erisson
Bulat Ziganshin <[EMAIL PROTECTED]> writes:

> - lack of specialists (and this means lack of teaching, training, books)

There's lots of interactive teaching and training on #haskell

What exactly do you think is missing?

> - lack of variety of libraries (application programmers want to have many
> libraries pre-written)

Which libraries do you think are most needed?

> imvho, these issues are less important for system programming (such as
> creating of web server or CMS system), so Haskell, with all its features, now
> is a great tool for system programming. for example, i've written zip-like
> tool with ghc

FreeArc is way nifty!
-- 
I've tried to teach people autodidactism,| ScannedInAvian.com
but it seems they always have to learn it for themselves.| Shae Matijs Erisson

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


[Haskell-cafe] Short tweak-run cycles with haskell-mode was Re: Parsec and destructuring HTML content

2006-06-19 Thread Shae Matijs Erisson
Joel Reymont <[EMAIL PROTECTED]> writes:

> I think that developing HTML scrapers requires short tweak-compile- run
> cycles and is probably best done in Perl, Python, Ruby, i.e.  dynamic
> languages but I wonder if someone has found otherwise.

I get very short tweak-run cycles from haskell-mode in emacs. I've bound my F12
key to compile, and I use Local Variables to set the compile-command to execute
my unit tests. For more information, http://www.haskell.org/hawiki/HaskellMode
-- 
I've tried to teach people autodidactism,| ScannedInAvian.com
but it seems they always have to learn it for themselves.| Shae Matijs Erisson

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


[Haskell-cafe] I 'd like to set up shop in Re: Haskell's market

2006-03-29 Thread Shae Matijs Erisson
Pete Chown <[EMAIL PROTECTED]> writes:

> One snag is that I doubt you could ring up an agency and ask for half a dozen
> Haskell programmers.  You could probably get people who did a bit of
> functional programming as part of a computer science degree, but that may not
> be enough for your needs.  (Having said that, if you did manage to find
> contract Haskell programmers, you would probably get people who were highly
> skilled, and enthusiastic about the chance to use the language.)

Me me! Pick me! Oh I'd love to do contract work with Haskell.

> In other words, Haskell might be a good answer technically, but it could
> paint the client into a corner business-wise.

I could easily come up with a bunch of resumes or CVs from smart #haskell
people who would enjoy doing contract work in Haskell.
(where bunch = at least ten, and probably more than twenty)

> I currently have a small amount of business logic that is implemented in
> Haskell, and I want to see it increase, but I'm always worried that this is
> going to happen.  I don't want a job for life maintaining this stuff, I want
> to delegate it to others at an appropriate time.

Me me! Pick me!

> You might find that Java, for example, would have more support for this type
> of application, out of the box.  Although Java is an unimaginative language,
> I find that productivity isn't too bad, mainly because there is plenty of
> library support for typical applications.  With Haskell, writing the business
> logic is quicker, but some of the time saved gets spent implementing things
> that come as standard with Java.

Libraries need to be implemented only once, after that everything gets faster.
Plus there's a lot more Haskell code out there than most people know about.
If you're looking for something specific, ask on the #haskell channel or here
on the mailing lists.

> I'm finding this quite a struggle, to be honest.  I can cope easily with the
> various homework assignments that get posted here, but I find it hard
> thinking about large applications in functional terms.  I'm building up to
> larger applications, but I'd feel nervous tackling something the size you are
> talking about at the moment.

I'm fond of monad transformers for structuring larger applications.
More details upon request...
-- 
I've tried to teach people autodidactism,| ScannedInAvian.com
but it seems they always have to learn it for themselves.| Shae Matijs Erisson

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


[Haskell-cafe] Re: MUA written in Haskell, and MTA in Haskell help?

2006-03-08 Thread Shae Matijs Erisson
Nils Anders Danielsson <[EMAIL PROTECTED]> writes:

> I had the same thought yesterday, after an Emacs-Lisp session in which
> I was trying to get Gnus to do exactly what I wanted it to...

Yeah, same here. I use Gnus and it's nice, but occasionally I want to erase it
from the timestream.

> Out of curiosity, how much work would it take to write an easily
> configurable, decent MUA in Haskell? I don't know too much about MUAs,
> but I have a feeling that we already have quite a few libraries that
> are needed for the job: UIs (including HTML rendering...), plugins,
> various protocols, encryption...

It wouldn't be too hard. I'd suggest you start with Tuomo Valkonen's Riot[1]
and go for something like mutt.
I'm sure you could steal lots of useful code from Peter Simons' Postmaster[2].

Speaking of which, I've tried to use Postmaster for my own personal domain,
ScannedInAvian.com, but I've had various difficulties. Is anyone else using it
for their domain? I'd like to find anti-spam features that match those of
postfix, like greylisting, dns name checks, etc.

[1] http://modeemi.fi/~tuomov/riot/
[2] http://postmaster.cryp.to/
-- 
I've tried to teach people autodidactism,    | ScannedInAvian.com
but it seems they always have to learn it for themselves.| Shae Matijs Erisson

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


[Haskell-cafe] Re: HUnit

2006-02-03 Thread Shae Matijs Erisson
Matt Roberts <[EMAIL PROTECTED]> writes:

> I am in love with HUnit and QuickCheck.  However, I am missing one
> important functionality

I'm rather fond of them also.
Check my prototype of test-driven-development for QuickCheck:
http://www.scannedinavian.com/~shae/qc-tdd.tgz

> I want to call a command line program that will search all the .hs
> files I have in a particular directory, pull out all HUnit test
> (based on what they are called, or perhaps their type signature) and
> run them all.

Look at the quickcheck script by John Hughes, it searches for 'prop_' tests and
executes them. You can likely add 'unit_' to that without much trouble.
-- 
I've tried to teach people autodidactism,| ScannedInAvian.com
but it seems they always have to learn it for themselves.| Shae Matijs Erisson

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


[Haskell-cafe] Banana bracket syntax used for arrows was Re: unary pattern matching

2006-01-26 Thread Shae Matijs Erisson
John Meacham <[EMAIL PROTECTED]> writes:

> hmm.. how about
> 
> (| Left (Just _) |)
> 
> since | cannot be used as a section so it can be unambigously lexed as a
> different symbol. I think I like it. any other ideas?

Not sure if it matters, but the 'banana bracket' syntax is already used by the
arrows extension:

http://darcs.haskell.org/darcsweb/darcsweb.cgi?r=testsuite;a=headblob;f=/tests/ghc-regress/arrows/should_run/arrowrun004.hs

http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/testsuite/tests/ghc-regress/arrows/Attic/arrowex4.hs
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Strong Normalization was Re: W3C discussion: Principle of Least Power

2005-12-23 Thread Shae Matijs Erisson
Graham Klyne <[EMAIL PROTECTED]> writes:

> Can it truly be said that it's easier to analyze a functional expression than
> a C program?  What could that actually mean?  I feel the discussion is (so
> far) missing a trick, but I'm not sure what it is.

The LtU article "What good is strong normalization in programming
languages?"[1] may be helpful here. Barry Jay's comment about always
terminating data access plus loops or fixpoints interests me in particular.

I wonder, would it be useful to have a language designed entirely that way?
Could you have a terminating language with only a single top level loop?
Could any two programs be composed such that the result still only has a single
top level loop? Would a language structured that way be advantageous for
debugging, proof assistants, or other verifications?

[1] http://lambda-the-ultimate.org/node/view/1120
--
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Wiki resources for Re: First steps in Haskell

2005-12-19 Thread Shae Matijs Erisson
"Simon Peyton-Jones" <[EMAIL PROTECTED]> writes:

> In any case, I think it'd be great if he, or anyone else, started a Wiki
> page on "very first steps in Haskell", along the lines he suggests.
> Maybe one exists already?  Once it does, it'd be good to point to it
> from haskell.org.

There's both HaskellNewbie[1] and HaskellDemo[2].
It would be nice if they were linked from the front page of haskell.org.

Has there been any discussion about keeping the haskell.org pages in a darcs
repository for easy local editing?

http://www.haskell.org/hawiki/HaskellNewbie
http://www.haskell.org/hawiki/HaskellDemo
--
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Optimistic Evaluation was Re: Can't Haskell catch up with Clean's uniqueness typing?

2005-12-06 Thread Shae Matijs Erisson
[EMAIL PROTECTED] writes:

> being occupied with learning both languages, I'm getting curious if
> Haskell couldn't achieve most of the performance gains resulting from
> uniqueness typing in Clean by *automatically* determining the reference
> count of arguments wherever possible and subsequently allowing them to
> be physically replaced immediately by (the corresponding part of) the
> function's result. Are there any principal obstacles, or *could* this be
> done, or *is* this even done already, e. g. in ghc?

Maybe you're describing speculative evaluation? 

Optimistic Evaluation: An Adaptive Evaluation Strategy for Non-Strict Programs
http://citeseer.ist.psu.edu/ennals03optimistic.html
--
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] http://www.haskell.org/hawiki/ThatAnnoyingIoType was Re: first post

2005-11-30 Thread Shae Matijs Erisson
raptor <[EMAIL PROTECTED]> writes:

> i tried different combinations, but still cant figure out...
> How do u use an "IO String" in normal "String" functions..
> I want to particulary slurp file in a string and then make
> funny things with it...spliting to lines,parsing them and
> building hash like strucutre of it...etc.

http://www.haskell.org/hawiki/ThatAnnoyingIoType

This wiki page has useful information about how to deal with the IO type.
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Oops, Hsc license is clearly GPL in the Hsc.cabal file was Re: Hacking Haskell in Nightclubs?

2005-11-30 Thread Shae Matijs Erisson
Shae Matijs Erisson <[EMAIL PROTECTED]> writes:

> This is nifty, can you give an explicit license so I know how I can use it?
> "Setup.hs: Warning: No license-file field."

My mistake, the Hsc.cabal file clearly states GPL. (I assume I can choose
either GPL v1 or v2 ?)
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Re: Hacking Haskell in Nightclubs?

2005-11-30 Thread Shae Matijs Erisson
[EMAIL PROTECTED] writes:

> I have an initial Haskell implementation of both these protocols at:
>   http://www.slavepianos.org/rd/f/207949/
>   darcs get http://www.slavepianos.org/rd/sw/sw-69/

This is nifty, can you give an explicit license so I know how I can use it?
"Setup.hs: Warning: No license-file field."
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


Dataflow and Comonads was Re: [Haskell-cafe] Monads in Scala, ...

2005-11-26 Thread Shae Matijs Erisson
Greg Woodhouse <[EMAIL PROTECTED]> writes:

> Maybe this is a different topic, but exploring concurrency in Haskell is
> definitely on my "to do" list, but this is really a bit of a puzzle.  One
> thing I've been thinking lately is that in functional programming the process
> is really the wrong abstraction (computation is reduction, not a sequence of
> steps performed in temporal order). But what is concurrency if their are no
> processes to "run" concurrently? I've beren thinking about action systems and
> non-determinism, but am unsure how the pieces really fit together.

Maybe dataflow languages like Lucid Synchrone, Esterel and Lustre?
http://en.wikipedia.org/wiki/Dataflow_language
http://en.wikipedia.org/wiki/Synchronous_programming_language

For dataflow in Haskell, see Uustalu & Vene's comonads paper:
http://lambda-the-ultimate.org/node/view/988

I do wish I could find the source code from this paper online, I'd rather not
type it in by hand. Do researchers usually manually transcribe code?
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Monads in Scala, XSLT, Unix shell pipes was Re: Monads in ...

2005-11-26 Thread Shae Matijs Erisson
Geoffrey Alan Washburn <[EMAIL PROTECTED]> writes:

> Scala can do much better still because it has first-class functions and
> algebraic data types ("case classes").

Comments on http://lambda-the-ultimate.org/node/view/1136 include links to 
Scala http://scala.epfl.ch/examples/files/simpleInterpreter.html 
and
XSLT rumors http://www.biglist.com/lists/xsl-list/archives/200303/msg00422.html

There's also Oleg's http://okmij.org/ftp/Computation/monadic-shell.html
"at the level of UNIX programming, all i/o can be regarded monadic."
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Monads in Java, Joy, OCaml, Perl, Prolog, Python, Ruby, and Scheme was Re: Other languages using monads?

2005-11-24 Thread Shae Matijs Erisson
Gregory Woodhouse <[EMAIL PROTECTED]> writes:

> My knowledge of functional programming is pretty much limited to Haskell,
> Scheme, and a smattering of Common Lisp. Are there languages other than
> Haskell that explicitly use monads? How about "not so explicitly"?

Java http://www.ccs.neu.edu/home/dherman/code/monads/JavaMonads.tar.gz
Joy http://permalink.gmane.org/gmane.comp.lang.concatenative/1506
OCaml 
https://mailman.rice.edu/pipermail/metaocaml-users-l/2005-March/57.html
Perl http://sleepingsquirrel.org/monads/monads.html
Prolog http://logic.csci.unt.edu/tarau/research/PapersHTML/monadic.html
Python http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/439361
Ruby 
http://moonbase.rydia.net/mental/writings/programming/monads-in-ruby/00introduction.html
Scheme 
http://www.ccs.neu.edu/home/dherman/research/tutorials/monads-for-schemers.txt

Please respond with any language implementations I've missed.
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Re: Re[2]: Uses forkOS all CPUS on-board?

2005-11-23 Thread Shae Matijs Erisson
Bulat Ziganshin <[EMAIL PROTECTED]> writes:

> >> They work, even in a context switching regime, but I can't
> >> exploit all the CPU's on my computer. Always is "active"
> >> just one thread
> this will not help. multi-processing support will be added in GHC 6.6,
> which must roll out due 6 months, as HCAR says

In the meantime, you can try it yourself by grabbing ghc 6.5 from cvs and
reading http://www.haskell.org/~simonmar/papers/multiproc.pdf
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Hackage or Where to Host Haskell projects, and simple darcsforge description was Re: Making Haskell more open

2005-11-16 Thread Shae Matijs Erisson
Wolfgang Jeltsch <[EMAIL PROTECTED]> writes:

> Would it be intended that every Haskell-related project is hosted under
> haskell.org?  This might be not so nice.  And it might be not so nice if most
> Haskell-related projects are hosted under haskell.org so that potential users
> might only look under haskell.org for projects and miss those that are hosted
> elsewhere.

Hackage[1] is designed to be the freshmeat and apt-get of the Haskell world.

I have a simple plan for a darcsforge as well:
If Cabal includes a darcs-repository field, developers will be able to upload
their project.cabal file to Hackage or to a darcsforge server.
That server will run darcs pull on the repositories once a night or so.
The developers can include an index.html in their repo that points to a doc/
subdirectory, or is the entire docs and description for simple projects.
That way a single site can host the equivalent of cvs and webspace for darcs.
That site could do http://host/projectname urls for each project.

This is roughly a darcs equivalent to RSS aggregators. It does require that
developers have a publically accessible repo, but anyone can get space from
geocities or angelfire for that.

Advantages of this include:

* easy indexing and searching of projects and sources
* easy references to other darcs/cabal projects
* host needs nearly zero admin effort, notably zero user accounts required.

Disadvantages are:

* no bug tracker
* no mailing lists

Though maybe those could have darcs backends also?

Still, this simple darcsforge has an excellent effort to results ratio.

I hope to have time to add this sort of thing to cabal and hackage soon.

[1] http://www.haskell.org/hawiki/Hackage
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Shae Matijs Erisson
Neil Mitchell <[EMAIL PROTECTED]> writes:

> It really really is a turn off. Sometimes when I spot a mistake, and
> I'm at a computer where I haven't logged in to hawiki, I don't bother
> fixing it. No one wants to have yet another account, to fill in their
> personal details yet again.
> 
> I appreciate spam is a problem, but turning off unregistered users is
> a trade off - less content, less spam, less open to people joining -
> its not a free solution.

Yeah, I see your point. The problem was that each automated spam change had to
be manually undone. The latest unreleased version of MoinMoin has batch undo
features for just this reason, I'll see if I can install it onto haskell.org

Assuming I get it installed, I'll give batch-undo privileges to the most active
wiki users. Up till now Cale Gibbard, Thomas Jaeger, and I have done most of
the boring spam removal work.

I probably won't have time to do this before the weekend though.
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-11 Thread Shae Matijs Erisson
Malcolm Wallace <[EMAIL PROTECTED]> writes:

> > >  ... And avoid
> > >   getting screwed up by malicious folk?
> > 
> > ...   but I believe there are a number of people who regularly 
> > review all the "Recent Changes" and undertake to 'undo' any
> > malicious/inaccurate modifications.
> 
> I suspect this would end up adding /more/ work to central maintainers,
> rather than less.

Recently the Haskell Wiki went from anonymous edits to logged-in edits because
of the tremendous amount of wikispam, so I agree with this.
On the good side, it's easy to create an account. 
On the bad side, at some point spambots will notice this too.

Fermat's Last Margin was originally planned to annotate images attached to wiki
pages. Someone on #haskell suggested using SVG instead, and someone else showed
me that pstoedit can produce SVG from pdf and ps files.
So, generalized markup annotation might be a good approach.

Since Fermat's Last Margin is just a darcs-backed wiki, that might be simpler.
If the ghc-docs were viewable and editable in a wiki format, and the changes
were saved to a darcs repo, then the maintainers could just pull the changes
they like, and flush useless changes like spam.
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Re: Coarbitrary (was QuickCheckM for IO testing)

2005-10-27 Thread Shae Matijs Erisson
Joel Reymont <[EMAIL PROTECTED]> writes:

> How is this supposed to work? Does anyone have a simple explanation?

Here's a demonstration of an arbitrary instance for a datatype.

module ProtoArbitrary where

import Test.QuickCheck
import Control.Monad

data Tree a = Nil | Node (Tree a) a (Tree a) deriving (Eq,Ord,Show)

instance (Arbitrary a) => Arbitrary (Tree a) where
arbitrary = oneof [return Nil, liftM3 Node arbitrary arbitrary arbitrary]
coarbitrary = error "not implemented"

prop_TreeI   :: Tree Int -> Bool
prop_TreeI x = True

prop_TreeF   :: Tree Float -> Bool
prop_TreeF x = True


> I could not understand how to define this for arbitraries of my
> choosing and Shae seems to have defined coarbitrary = error "Not
> implemented" :-).

Coarbitrary is for generator transformers, see section 3.3 on page 5 of
the original paper http://www.md.chalmers.se/~koen/Papers/quick.ps
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] QuickCheckM for IO testing was Re: Quickcheck examples and Data.Word32

2005-10-27 Thread Shae Matijs Erisson
Joel Reymont <[EMAIL PROTECTED]> writes:

> > I would very much like to see QuickCheckM extended to handle IO directly.
> > I've wanted to use QuickCheck to test TCP/IP stacks for unhandled cases.
> > Think of the entertainment value :-)
>
> Is this gonna be in the next version of QuickCheck? Or can it be implemented
> now?

You'd have to monadify the internals of QuickCheck. QC depends on each monad
having a 'run' function :: (m a -> a), which works for ST, but not IO.

Thomas Jäger described the necessary changes to me on irc some months ago,
Search for QuickCheckM in http://tunes.org/~nef/logs/haskell/05.03.21
I haven't gotten around to trying to implement them yet.
If you do implement these changes, I'd definitely jump in and help.
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Re: Quickcheck examples and Data.Word32

2005-10-27 Thread Shae Matijs Erisson
Joel Reymont <[EMAIL PROTECTED]> writes:

> Does anyone have QuickCheck examples they could send me?

There's a minimal introduction to QuickCheck and HUnit in the most recent issue
of The Monad.Reader: http://www.haskell.org/tmrwiki/IssueFive

> Also, how can I check Word32, Word64, etc. properties? It looks like
> the built-in random generator only works with Int values and for the
> life of me I cannot figure out how to extend it.

You can build your own data generators easily.
I was planning to cover that in the next TMR issue.

In the meantime, these examples may help:

http://www.scannedinavian.org/~shae/src/haskell/TestCore.hs
http://www.scannedinavian.org/~shae/src/haskell/Tests.hs
http://www.scannedinavian.org/~shae/combinatorrent/Bittorrent/BEncode.hs


> Last but not least, I'm trying to figure out how I can use QuickCheck
> with tests against a network server. I would want to make sure that a
> certain packet sequence always produces a particular packet sequence
> in response. Is this a good area to apply QC?

You can do that with the model based checking from the QuickCheckST paper.
You could either generate actions and results and test separately, or you can
use unsafePerformIO to run IO tests from inside QuickCheckM.

I would very much like to see QuickCheckM extended to handle IO directly.
I've wanted to use QuickCheck to test TCP/IP stacks for unhandled cases.
Think of the entertainment value :-)

I hope that QuickCheck2 or a preview version is released soon.
I'd like to do more with QC.
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


[Haskell-cafe] Priority Queues from Rabhi & Lapalme's Algorithms was Re: class Ref...

2005-06-08 Thread Shae Matijs Erisson
Gracjan Polak <[EMAIL PROTECTED]> writes:

> To put it another way: is Data.Map only workaround to get something done, or
> is it The Right Way of doing PQs in Haskell?

Another option is the priority queues from the Rabhi & Lapalme book:
http://www.iro.umontreal.ca/~lapalme/Algorithms-functional.html
-- 
It seems I've been living two lives. One life is a self-employed web developer
In the other life, I'm shapr, functional programmer.  | www.ScannedInAvian.com
One of these lives has futures (and subcontinuations!)|  --Shae Matijs Erisson

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


[Haskell-cafe] Re: A Tool To Show Functions Relationship?

2005-06-06 Thread Shae Matijs Erisson
Dimitry Golubovsky <[EMAIL PROTECTED]> writes:

> Does there exist a tool which given a Haskell source, shows functions
> that are mutually recursive (i. e. call each other, even via calling
> third, etc. functions)? Knowledge of that would help to split the
> module into smaller modules without risk to create recursive modules.

hIDE had such a tool[1], though I don't know how it worked.
It's possible you could find similar functionality in either HaRe, the Haskell
Refactoring Browser[2] or the Programatica toolset[3].
Maybe once the ghc-api works that sort of tool will be easy?

[1] http://www.scannedinavian.org/~shae/hIDE.png
[2] http://www.cs.kent.ac.uk/projects/refactor-fp/hare.html
[3] http://www.cse.ogi.edu/~hallgren/Programatica/
-- 
It seems I've been living two lives. One life is a self-employed web developer
In the other life, I'm shapr, functional programmer.  | www.ScannedInAvian.com
One of these lives has futures (and subcontinuations!)|  --Shae Matijs Erisson

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


[Haskell-cafe] Data Field Haskell and other Data Parallel Haskell? was Re: Python?

2005-05-19 Thread Shae Matijs Erisson
Jerzy Karczmarczuk <[EMAIL PROTECTED]> writes:

>>Finally I found some time to reply to this posting. A couple of years ago we
>>did something called "Data Field Haskell", which is Haskell extended with a
>>generalized form of arrays called data fields. Much of the purpose was to
>>investigate convenient and general syntax for array constructions.
> Now, I know the existence of pages within
> http://www.mrtc.mdh.se/projects/DFH/
> but you say that the project is dormant. Is there *anything* going on?

This is quite cool. As GHC is gains the ability to use multiple
processors, so grows my interest in data parallelism with Haskell.

I haven't yet looked at the DFH thesis, but I am interested in data parallelism
projects in general. I was only aware of the parallel arrays in the the Nepal
project before DFH. 

Does anyone know of other data parallel projects that could be ported to GHC
without much trouble?
-- 
It seems I've been living two lives. One life is a self-employed web developer
In the other life, I'm shapr, functional programmer.  | www.ScannedInAvian.com
One of these lives has futures (and subcontinuations!)|  --Shae Matijs Erisson

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


[Haskell-cafe] The fate of reduce() in Python was Re: Python?

2005-05-10 Thread Shae Matijs Erisson
Daniel Carrera <[EMAIL PROTECTED]> writes:

> I had no idea that Python had these features.

Future versions of Python won't have all those features, see:
http://lambda-the-ultimate.org/node/view/587

This is specifically about the fabled Python 3000 which will be a backwards
compatibility breaking version. Py3k won't happen soon, but it will happen.
-- 
It seems I've been living two lives. One life is a self-employed web developer
In the other life, I'm shapr, functional programmer.  | www.ScannedInAvian.com
One of these lives has futures (and subcontinuations!)|  --Shae Matijs Erisson

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


[Haskell-cafe] Type System Trix was Re: Specify array or list size?

2005-05-07 Thread Shae Matijs Erisson
Daniel Carrera <[EMAIL PROTECTED]> writes:

> Is there a way to tell Haskell that a list or array must have exactly (say)
> 256 elements? I'd love to have Haskell make sure that the array I build is
> the correct size.

Yes, you can build lists with a maximum size.
The simplest approach I've seen is BoundedList.hs in the HaskellDB library:
http://cvs.sourceforge.net/viewcvs.py/haskelldb/haskelldb/src/Database/HaskellDB/

The more general question is, "How to encode values into types in such a way
that I can use them?"

One neat answer is here:
http://pobox.com/~oleg/ftp/Haskell/number-parameterized-types.html

There are a bunch of neat type tricks like this, but the next step up in
encoding information in types is dependent type systems like the one used in
Epigram: http://www.dur.ac.uk/CARG/epigram/

I recently asked on http://lambda-the-ultimate.org/ what else can be done with
type systems other than program safety.
I got a neat answer from David Teller:


Static type-checking in Camelot guarantees RAM usage -- not only its safety but
also its amount.

Static type-checking in my controlled pi-calculus (definitely not a real
programming language) guarantees statically properties of access control ("only
X can use the printer", "I can only read this information for the purpose of
transferring it to you", ...) or resource management ("this program will never
require more than x threads, y RAM and z printers").

Static type-checking in TyPiCal guarantees the respect of some protocols. In
Acute, you can check the safety of communications...


Type systems can do a lot of neat stuff these days, I've been able to use
HaskellDB in my paying work already!
-- 
It seems I've been living two lives. One life is a self-employed web developer
In the other life, I'm shapr, functional programmer.  | www.ScannedInAvian.com
One of these lives has futures (and subcontinuations!)|  --Shae Matijs Erisson

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


[Haskell-cafe] Why I'd want darcs for fptools. was Re: fptools in darcs now available

2005-05-02 Thread Shae Matijs Erisson
Sven Panne <[EMAIL PROTECTED]> writes:

> The learning curve for CVS-aware people is extremely low with subversion,

In my experience, darcs has the lowest scm learning curve, especially for 
users who haven't used an scm before. 

> So my question in a nutshell: Why shall we move away from the mainstream
> when the rest of the world (or most of) is quite happy with CVS or is
> moving to subversion? I'm not completely against it, but we should have
> very, very good reasons to do so.

> P.S.: Yes, I'm aware of other development models like the one used for the
> Linux kernel, where CVS/subversion are not appropriate, but is fptools
> really a similar project? I don't expect hundreds of people working in a
> very distributed manner on extensions of e.g. a type checker... :-]

There are many projects (including fptools) to which I would have contributed
patches if the startup cost of sending a patch weren't so high.

With darcs, every checkout is an independent repository, and if you have a
working sendmail/MAPI setup you can send any changes you make back to the
source of your checkout with a single command.

With darcs I immediately get the benefits of source control without needing to
make a separate copy of the master repo. With svn or cvs, I can't locally get
all the benefits of the system without a user account for the repository.
With cvs/svn I can't hack around in an anonymous checkout and only commit my
patches back to the original repo once I've decided I want to join the project.
darcs doesn't require a unix account for committers, it can receive and
authenticate patches via gpg-signed emails.

Why should authentication information be tightly bound to a repository?

Non-core members can share patches. If darcs sends to a public list anyone who
absolutely needs a patch can apply it before it gets to the main tree.
That patch will still work even if the patch never gets to the main tree.

There are a large number of potential committers on the #haskell irc channel
alone. Lots of people end up wishing for small changes to the code in fptools
but usually end up forking a library or module for their product instead.

lambdabot, the Haskell irc bot is a good example of the low cost of patch
submission encouraging rapid development. There's a surprising number of people
who've committed small but useful features because it's so easy to do.

(Much of this content is paraphrased from a recent conversation on #haskell.
Several people contributed salient points.)
-- 
Programming is the Magic Executable Fridge Poetry, | www.ScannedInAvian.com
It is machines made of thought, fueled by ideas.   | -- Shae Matijs Erisson

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


[Haskell-cafe] Re: combining HUnit and QuickCheck

2005-04-30 Thread Shae Matijs Erisson
Lemming <[EMAIL PROTECTED]> writes:

> I want to run randomized tests and others and I thought it would be a good
> idea to run QuickCheck tests in the HUnit framework.

I've approached it from the other side, I'd like to do unit tests in
QuickCheck. I've hacked up a prototype that saves failing test seeds for the
next test run.  See http://www.scannedinavian.org/~shae/tdd-qc.tar.gz
It's a rough prototype, I would appreciate ideas for improvement or patches.

I've also looked at adding static values to QuickCheck for full unit testing.
That doesn't appear difficult, but I haven't tried it yet.
-- 
Programming is the Magic Executable Fridge Poetry, | www.ScannedInAvian.com
It is machines made of thought, fueled by ideas.   | -- Shae Matijs Erisson

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


[Haskell-cafe] Re: Haskell with Apache?

2005-04-14 Thread Shae Matijs Erisson
Graham Klyne <[EMAIL PROTECTED]> writes:

> I'm interested in running Haskell code invoked from an Apache web server
> request.  I discovered the mod_haskell project [1] which looks prima facie
> v. promising.  Does anyone have any recent experience of using this (there
> apparently being no recent activity on this project)?
>
> I wonder if there's any other project or activity in this area I should be
> aware of?

David Himmelstrup's mod_haskell code is at:
darcs get http://www.scannedinavian.org/repos/modhaskell

Peter Thiemann has a version of Simon Marlow's HWS (Haskell Web Server) that
integrates WASH servlets and hs-plugins. I don't know if it's ready for release
but you could send him email...
-- 
Programming is the Magic Executable Fridge Poetry, | www.ScannedInAvian.com
It is machines made of thought, fueled by ideas.   | -- Shae Matijs Erisson

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


[Haskell-cafe] QuickCheckM with IO? Re: QuickChecking classes

2005-03-23 Thread Shae Matijs Erisson
Benjamin Pierce <[EMAIL PROTECTED]> writes:

> Today I've been learning about the wonders of QuickCheck.  :-)
>
> One (obvious?) question that is not addressed in at least the original paper
> is how one might use QC to automatically verify the algebraic laws 

Some utility code is available in the QC.Utils module:
http://www.haskell.org/ghc/docs/latest/html/libraries/QuickCheck/Test.QuickCheck.Utils.html
Also check out Poly and Batch under QuickCheck, tests with timeouts are cool!

For other QuickCheck-related code, Isaac Jones wrote ReactiCheck for use with
Yampa, and I wrote a 'test driven development' version of QuickCheck that saves
failing Gen seeds for the beginning of the next run. 
I think Isaac Jones wrote some code that did more than QuickCheck.Utils for
testing algebraic laws, I think he had some code that tested if 
(a >>= b) >>= c is the same as (a >>= b) >>= c is true for monad instances.

I'd like to try out the unreleased version of QC.
It has 'shrink' that cuts down the generated input list to give you the
smallest failing case. (Not that I've seen it.)

What I do not know how to do, is how to use QuickCheckM to test IO code.
Specifically, the simple demo that would get me started is a QuickCheckM test
that can call one of the simple command-line calculators like bc or dc and
compare it against GHC's result.
If someone can tell me how to do that, I will be very happy.

For my daily paying contract work I'm using HUnit with a simple assertM I
hacked up, but it's just not the same.
-- 
Programming is the Magic Executable Fridge Poetry, | www.ScannedInAvian.com
it is machines made of thought, fueled by ideas.   | -- Shae Matijs Erisson

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


Re: [Haskell-cafe] Visual Functional Languages

2005-01-25 Thread Shae Matijs Erisson
"Josà Miguel VilaÃa" <[EMAIL PROTECTED]> writes:

> I'm searching for Visual Functional Languages, i.e. languages in which the
> programmer does diagrams instead of writing textual code.
> The only language I have found until now is VFPE of Joel Kelso's PhD thesis
> http://www.csse.uwa.edu.au/~joel/vfpe/
> Does anyone know other languages or at least projects on this subject?

Check out the languages of Wouter Van Oortmerssen.
And If you get some demo copies of these languages, I want one too!
http://wouter.fov120.com/
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


Re: [Haskell-cafe] Some random newbie questions

2005-01-06 Thread Shae Matijs Erisson
Benjamin Pierce <[EMAIL PROTECTED]> writes:

> * What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs
>   is smaller and easier for people not named Simon to modify, while GHC is a
>   real compiler and has the most up-to-date hacks to the type checker)?  Do
>   people generally use one or the other for everything, or are they similar
>   enough to use Hugs at some moments and GHC at others?

Hugs is written in C, it's easy to build and doesn't use much
ram/cpu/drivespace. 
GHC can be difficult to bootstrap for less popular setups (IBM Mainframes,
BeOS, Amiga, etc), and both building and using GHC can eat ram/cpu/drivespace.
On the feature side, Hugs is just that, a Haskell User's Gofer System.
GHC is more like a hotrod research compiler, there's always some neat new
feature in CVS that does really cool stuff. (ie Software Transactional Memory)
If you have a Sharp Zaurus, Hugs will work but GHC won't. 

> * HUnit and QuickCheck seem to offer very nice -- but different -- testing
>   facilities.  Has anyone thought of combining them?  (In fact, is HUnit
>   actually used?  The last revision seems to be a couple of years ago.)

I hacked up a test-first version of QuickCheck that saves failing test cases
and checks them again on the next run. That is effectively a combination of
HUnit and QuickCheck.
I sent in my code when the call for QuickCheck2 ideas happened. I know there
was a recent presentation on QC2 at Chalmers, but I don't know if the
test-first idea will be integrated, or when QC2 will be released.
My code is an inflexible hack I wrote as a proof of concept, it's definitely
not ready for real use.

PS. TaPL was great, on #haskell we call it "The Brick Book" 
Does it already have a standard nickname?
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

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


Non-Academic Haskell was Re: [Haskell-cafe] Non-technical Haskell question

2004-11-30 Thread Shae Matijs Erisson
GoldPython <[EMAIL PROTECTED]> writes:

> Has anyone tried presenting the language to the average rank and file
> programming community?  If so, was it successful? If not, is there
> interest in doing so?

The #haskell irc channel on irc.freenode.net is composed of many different
flavors of programmer, from self-educated 16 year olds on up to post doctoral
students studying functional programming.
I'm a self-educated, self-employed programmer. I use Python in most of my
paying work but would very much prefer to use Haskell.
It seems obvious to me (but not to most of my clients :-) that the various
powerful and expressive patterns in Haskell allow programmers to deliver more
business value in less time than almost any other programming language.

> By "rank and file" I mean, outside of the acedemic world where a large
> number of the programmers I see have very little math background. This
> would be the typical commercial Visual Basic crowd and the like.

I have no math background. I started with BASIC on a Sinclair, and my first
real programming job was with Visual Basic 4, 5, and 6 for trust management.

It seems that Haskell is about finding essential patterns and making those
available for easy use. Most of my code starts out fuzzy and complicated, but
as I understand the problem better, my code gets smaller.
In the process, I find and refactor more and more places where my code is
special or general cases of Prelude functions.

Implicit For Each looping in Visual Basic was easier than manual looping in C.
The map function in Python was another improvement.
Now I have monads as the next step up in power, and I'm reading up on arrows.
I'd think every programmer who preferred Visual Basic over C would end up
loving Haskell.
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskore Wiki

2004-11-28 Thread Shae Matijs Erisson
Henning Thielemann <[EMAIL PROTECTED]> writes:

>  I also like to point to my private work on Haskore. It includes
> bug-fixes, a more fine-grained modularization, better support for infinite
> music data, 

I've used Haskore before, but I wasn't able to figure out how to make infinte
compositions. I'd like to try turning a lorenz fractal into music, could you
point me to an example of such an infinite song? Can you actually play such a
thing from Haskore?

Thanks,
-- 
Shae Matijs Erisson - http://www.ScannedInAvian.com/ - Sockmonster once said:
You could switch out the unicycles for badgers, and the game would be the same.

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Text.XML.HaXML.HaskellToXml DRIFT example

2004-10-27 Thread Shae Matijs Erisson
"S. Alexander Jacobson" <[EMAIL PROTECTED]> writes:

> Oops, I just found the examples directory.
> So the next question is: Is there a way to use
> DRift directly from GHCI?  If I have to hmake
> regularly, that will get annoying fast.

If you're using emacs, there's a handy 'one-button test' setup documented here:
http://www.haskell.org/hawiki/HaskellMode

I've been thinking about an editor-agnostic zero-button test setup, but I don't
have the details worked out yet.
-- 
Shae Matijs Erisson - Programmer - http://www.ScannedInAvian.org/
"I will, as we say in rock 'n' roll, run until the wheels come off, 
because I love what I do." -- David Crosby

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Are handles garbage-collected?

2004-10-26 Thread Shae Matijs Erisson
Ben Rudiak-Gould <[EMAIL PROTECTED]> writes:

> For this to really work properly the whole OS needs to be designed
> around it. Such OSes exist -- they're called "capability-based" -- but
> like so many other good ideas this one hasn't generated much interest
> in industry. I think we're stuck with explicit file handle management
> for the next couple of decades.

hOp/House doesn't have a filesystem yet.
See http://www.cse.ogi.edu/~hallgren/House/ (source recently released)
Maybe we won't always require explicit file handles.
-- 
Shae Matijs Erisson - Programmer - http://www.ScannedInAvian.org/
"I will, as we say in rock 'n' roll, run until the wheels come off, 
because I love what I do." -- David Crosby

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Did you come to Haskell from Python? was Re: [Haskell-cafe] Are handles garbage-collected?

2004-10-26 Thread Shae Matijs Erisson
Remi Turk <[EMAIL PROTECTED]> writes:

> At least one. (Me) And, judging from the amount of references to
> Python in these mailing-lists, I really doubt I'm the only one.

At least two. I also came to Haskell from Python.

> I actually met Haskell mostly by reading about it in the python
> mailinglist/newsgroup. (in e.g. Alex Martelli's posts)

I met Haskell because I started writing all of my Python code with a single
return point, was overusing reduce and map, building function pipelines, and
finally someone asked me if I'd used Haskell before.

>>   Haskell is beautiful on the outside and the inside.  :-)

Yes, Haskell is beautiful inside and outside. That's something that has kept me
interested in it for years. 'Conceptually pure' is what I call it.
-- 
Shae Matijs Erisson - Programmer - http://www.ScannedInAvian.org/
"I will, as we say in rock 'n' roll, run until the wheels come off, 
because I love what I do." -- David Crosby

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] QuickCheck - Extracting data values from tests

2004-09-02 Thread Shae Matijs Erisson
Jorge Adriano Aires <[EMAIL PROTECTED]> writes:

> Hello all,
> When using Quickcheck, is there some way to extract generated data values to 
> the IO Monad? 
>
> I know I can collect and print information about test cases, but that's not 
> enough. Data may be pretty complex, and there may be no parsers for it. If a 
> test suddenly goes wrong, just having it displayed doesn't seem that useful.

You may be interested in a QuickCheck hack of mine that saves the offending
data value to use immediately in the next test run.

You can get the current version with 
"darcs get http://thunderbird.scannedinavian.com/repos/quickcheck";
I've only used this for my own code, so I'd be interested in any feedback.

In some cases it's a lot easier to generate a value from a seed and size rather
than saving the value in some way that you can restore (ie functions).

I've been investigating doing test-driven-development with QuickCheck, saving
failing test cases is one step towards that goal. If you have more ideas on
that topic, I'd like to hear about it.

> Also, even when I'm implementing a generator, I want to see how it is
> working. Running a verboseCheck on some dummy property helps, but I may want
> to analyse the data, or some parts of it better - for instance, for many data
> structures I have alternative "show" functions that take parameters as
> arguments.

This isn't clear to me, can you give other examples?
-- 
Shae Matijs Erisson - Programmer - http://www.ScannedInAvian.org/
"I will, as we say in rock 'n' roll, run until the wheels come off, 
because I love what I do." -- David Crosby

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] EuroHaskell 2004 pictures

2004-06-15 Thread Shae Matijs Erisson
The EuroHaskell 2004 Conference was great fun. 

Shae Erisson gave a Haskell tutorial, Jeremy Bobbio gave a talk about hOp, 
and John Hughes gave a talk/tutorial about Arrows. 

Code was written, pizza was purchased, most attendees claimed to enjoy
themselves. A social event for programmers may be an oxymoron, but it was nice
to get so many Haskellers in the same room.

Until you've experienced the range of jokes and puns that can come from a CS
Student Pub named "The Monad" you haven't plumbed the depths of FP humor.

Anders Carlsson has pictures on his website:
http://ridley.csbnet.se/gallery/eurohaskell

Some of my favorites are the signs:
http://ridley.csbnet.se/gallery/eurohaskell/p1010059 - (this is a bathroom /
watercloset / toilet, insert your local term)
http://ridley.csbnet.se/gallery/eurohaskell/p1010052

and of course the unicycle pictures:
http://ridley.csbnet.se/gallery/eurohaskell/p1010026
http://ridley.csbnet.se/gallery/eurohaskell/p1010047

Tune in next year for EuroHaskell 2005!
-- 
Shae Matijs Erisson - Programmer - http://www.ScannedInAvian.org/
"I will, as we say in rock 'n' roll, 
run until the wheels come off, 
because I love what I do." -- David Crosby

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Perspectives on learning and using Haskell

2004-01-05 Thread Shae Matijs Erisson
[EMAIL PROTECTED] writes:

> There is only one problem I've found with test-driven development in
> Haskell.  In C++, it's possible to break the "module" abstraction
> (yes, I know, C++ doesn't have modules; it has classes, which are really
> instantiable modules) by using "friend".  In Haskell, I find myself
> occasionally having to expose parts of a module which I would prefer not
> to, in order for the unit tests suite to do their job effectively.

My one problem with test-driven Haskell is, how to do it with QuickCheck tests?
It's easy enough with HUnit, but I'd like to try it with QuickCheck, any
suggestions?

> I wonder if there might be a way to fix this, say, by allowing modules
> to selectively expose parts of their interface depending on who wants
> to use it.

What about GHC's new -main-is flag to specify a test main function? Then you
may be able to write test code without exporting internal functions.


As for tighter integration of tests with code, I wrote an example of one-button
unit-testing in emacs on the HaskellMode page on the HaWiki, and the
Programatica editor, as demonstrated at Haskell Workshop 2003 has the ability
to embed 'certificates' that can be proofs, unit tests, etc.
Check out the Evidence Management section here:
http://www.cse.ogi.edu/~hallgren/Programatica/HW2003/demoabstract.html 

There's also the darcs_test parts of darcs, you can assign a script to run
tests after a variety of darcs commands. 

None of these run the tests at compile time, but it's better than manually
running the tests.
-- 
Shae Matijs Erisson - 2 days older than RFC0226
#haskell on irc.freenode.net - We Put the Funk in Funktion
10 PRINT "HELLO" 20 GOTO 10 ; putStr $ fix ("HELLO\n"++)

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: OT - Book on Programming

2003-09-03 Thread Shae Matijs Erisson
Matthew Donadio <[EMAIL PROTECTED]> writes:

> They have several people in the company who understand the mechanics of
> programming, but don't really understand the concepts.  I am looking for
> a book to recommend to them.  I would really like to find a book that
> just discusses programming, and avoids any one particular language.  It
> would have to cover the common imperative controls, as well as basic
> data structures.

I'd also recommend "The Pragmatic Programmer" 
http://www.pragmaticprogrammer.com/ppbook/index.shtml
It's difficult to summarize, but I think every programmer should read it at
least once. It is mostly about the mechanics of programming also.
-- 
Shae Erisson -   this space for rent   - #haskell on irc.freenode.net
"Notwithstanding fervent argument that patent protection is essential
 for the growth of the software industry, commentators have noted
 that `this industry is growing by leaps and bounds without it.'"
-- US Supreme Court Justice John Paul Stevens, March 3, 1981.

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Tokenizing Strings

2003-04-02 Thread Shae Matijs Erisson
<[EMAIL PROTECTED]> writes:

> I have a string that needs to be split/tokenized based on a delimiter. This
> can easily be accomplished using 'break' if the delimiter is only 1
> character (i.e. break isSpace "this is a string"), but I can't see any way
> of using this for a delimiter with multiple characters.
>
> in this case, I have a string containing multiples fields seperated by *two*
> blank lines (\n\n). I can't just break on the newline character, as single
> newline characters can be found inside each field.
>
> any idea how I can do this without too much hassle?

There's a split function that does this in lambdabot's cvs tree:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/haskell-libs/libs/lambdabot/Util.hs

Here's a demo:
Prelude Util> split "foo" "bazfoobarfooblipp"
["baz","bar","blipp"]

-- 
Shae Matijs Erisson - 2 days older than RFC0226
#haskell on irc.freenode.net - We Put the Funk in Funktion
10 PRINT "HELLO" 20 GOTO 10 ; putStr $ fix ("HELLO\n"++)

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe


Feature Request for Haskell 98 list syntax? was error in Report

2003-02-10 Thread Shae Matijs Erisson

Speaking of changes, how hard would it be to allow the last element in a list
to have a comma at the end?

[
 1,
 2, -- this is illegal
]

I'm accustomed to the 'extra comma' syntax in Python. I like it because it then
seems to be easier to add new items, and easier to read/write lists in a text
file.
-- 
Shae Matijs Erisson - 2 days older than RFC0226
#haskell on irc.freenode.net - We Put the Funk in Funktion

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe



Re: Wiki problems

2002-10-17 Thread Shae Matijs Erisson
"John C. Peterson" <[EMAIL PROTECTED]> writes:

> We're aware of the wiki problems.  We've got out "wiki guy" working on
> it and I hope everything will be working again soon.  We won't lose
> anything that's been posted to the wiki.  Please be patient!

At one point in the distant past there was the idea of switching to another
wiki flavor such as MoinMoin. I'd be willing to translate the content from
pywiki to MoinMoin if there's still interest.

That could be a permanent fix to the continuing missing pages problem.
-- 
Shae Matijs Erisson - 2 days older than RFC0226


___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe