Isaac Jones | 2 Aug 2004 01:13

Announce: Cabal 0.1 (Library Infrastructure Project)

Much thanks to all who've made this possible :)

                      The Haskell Cabal
The Common Architecture for Building Applications and Libraries.

DOWNLOAD:

The Haskell Cabal has reached pre-release stage, with a 0.1 version
The community should use this release to evaluate the interfaces and
explore the concepts of these tools.

Download the Cabal here:
http://www.haskell.org/cabal/download.html

BUGS:

Please report bugs and wish-list items here:
http://sourceforge.net/tracker/?func=add&group_id=44807&atid=440922

Or email Isaac Jones: ijones <at> syntaxpolice.org

ABOUT:

The Haskell Cabal is meant to be a part of a larger infrastructure for
distributing, organizing, and cataloging Haskell Libraries and
Tools. It is an effort to provide a framework for developers to more
effectively contribute their software to the Haskell community.

Specifically, the Cabal describes what a Haskell package is, how these
packages interact with the language, and what Haskell implementations
(Continue reading)

Tom Hofte | 2 Aug 2004 09:31
Picon

hmake question

Hi,
 
I want to use hmake to debug my haskell-program.
I have installed hmake succesfully, but whem I want to compile my program, I'm getting the following error message:
 
Fail: Can't find module IOExts in user directories
        .
  Or in installed libraries/packages at
        /home/hofte/local/lib/ghc-6.2.1/imports
        /home/hofte/local//lib/ghc-6.2.1/uust
        /home/hofte/local//lib/ghc-6.2.1/imports/HaXml
  Asked for by: KoalaMain.hs
  Fix using the -I, -P, or -package flags.
 
It seems that hmake can't find the IOExts module. I have tried to fix this by using the -I, -P or -package options with the absolute path of IOExts module. All of the options don't fix the problem.
 
Does any one know how I can hmake tell where it can find the IOExts module.??
 
Thanks in advance,
 
Tom Hofte
_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Malcolm Wallace | 2 Aug 2004 12:24
Picon

Re: hmake question

"Tom Hofte" <hofte <at> natlab.research.philips.com> writes:

> Fail: Can't find module IOExts in user directories
>         .
>   Or in installed libraries/packages at
>         /home/hofte/local/lib/ghc-6.2.1/imports
>         /home/hofte/local//lib/ghc-6.2.1/uust
>         /home/hofte/local//lib/ghc-6.2.1/imports/HaXml
>   Asked for by: KoalaMain.hs
>   Fix using the -I, -P, or -package flags.

Ghc's module IOExts is in "-package lang", so try giving this option
to hmake.

Regards,
    Malcolm
Graham Klyne | 2 Aug 2004 19:27

Re: confusing language in report and a bug in (ghc|hugs)

At 12:49 29/07/04 -0700, John Meacham wrote:
>out of curiosity, when is the =<< useful? I have never used it and I am
>wondering if it could have been making my life easier. Perhaps I have
>just not been trained to recognize when it should be used.

I don't know if this counts as "useful", but I think it works as the 
monadic variant of function composition.

#g

------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact
hjgtuyl | 2 Aug 2004 22:54
Picon

Ternary operators in Haskell, an observation (was: Do the libraries define S' ?)


On Wed, Jul 07, 2004 at 01:18:54PM +0100, Graham Klyne wrote:
> There's a pattern of higher-order function usage I find myself repeatedly 
> wanting to use, exemplified by the following:
> [[
> -- combineTest :: (Bool->Bool->Bool) -> (a->Bool) -> (a->Bool) ->  
> (a->Bool)
> combineTest :: (b->c->d) -> (a->b) -> (a->c) -> a -> d
> combineTest c t1 t2 = \a -> c (t1 a) (t2 a)
> (.&.) :: (a->Bool) -> (a->Bool) -> (a->Bool)
> (.&.) = combineTest (&&)
>
> (.|.) :: (a->Bool) -> (a->Bool) -> (a->Bool)
> (.|.) = combineTest (||)

The operators can be also defined as follows:
    (.&.) f g x = (f x) && (g x)
    (.|.) f g x = (f x) || (g x)

It is clear from these definitions, that the operators are ternary
operators.

As operators are essentially the same as functions, in Haskell, any number
of parameters can be given in an operator definition.

Henk-Jan van Tuyl

--------------------------------------------------------------------
    Festina Lente
    Hasten Slowly
    Haast U langzaam
    Eile langsam
    Skynd dig langsomt
    Affrettati lentamente
    Spěchej pomalu
    Skynda långsamt
                       Desiderius Erasmus
--------------------------------------------------------------------
--

-- 
Met vriendelijke groet,
Herzliche Grüße,
Best regards,
Henk-Jan van Tuyl

--------------------------------------------------------------------
   Festina Lente
   Hasten Slowly
   Haast U langzaam
   Eile langsam
   Skynd dig langsomt
   Affrettati lentamente
   Spěchej pomalu
   Skynda långsamt
                      Desiderius Erasmus
--------------------------------------------------------------------
Cale Gibbard | 2 Aug 2004 22:58
Picon

Re: Re: confusing language in report and a bug in (ghc|hugs)

It works really well stylistically inside the do notation:
x <- f =<< xs

where you can view this as a process whereby each of the things in the
monadic container xs has f applied to it, and each result obtained
from that is then bound to x, so the data flows naturally.

 - Cale Gibbard

On Mon, 02 Aug 2004 18:27:12 +0100, Graham Klyne <gk <at> ninebynine.org> wrote:
> At 12:49 29/07/04 -0700, John Meacham wrote:
> >out of curiosity, when is the =<< useful? I have never used it and I am
> >wondering if it could have been making my life easier. Perhaps I have
> >just not been trained to recognize when it should be used.
> 
> I don't know if this counts as "useful", but I think it works as the
> monadic variant of function composition.
> 
> #g
> 
> ------------
> Graham Klyne
> For email:
> http://www.ninebynine.org/#Contact
> 
> _______________________________________________
> Haskell mailing list
> Haskell <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
>
John Meacham | 2 Aug 2004 23:05
Favicon

Re: Ternary operators in Haskell, an observation (was: Do the libraries define S' ?)

On Mon, Aug 02, 2004 at 10:54:33PM +0200, hjgtuyl <at> chello.nl wrote:
> The operators can be also defined as follows:
>    (.&.) f g x = (f x) && (g x)
>    (.|.) f g x = (f x) || (g x)
> 
> It is clear from these definitions, that the operators are ternary
> operators.
> 
> As operators are essentially the same as functions, in Haskell, any number
> of parameters can be given in an operator definition.

You might be interested in my BooleanAlgebra class, which replaces the
various boolean operators from the prelude with overloaded versions
with various useful instances. 

The really nice thing is the instance for Bool is exactly the same as
the prelude version so this can be dropped into existing code without
change (modulo the monomorphism restriction).

In particular, there is an instance for the boolean algebra of
predicates, so you can say f && g directly where f and g are functions
which return bool.

http://repetae.net/john/recent/out/Boolean.html

it also gives you perl-like short circuting, so 
Just 'a' || Just 'b' -> Just 'a' 
and so forth...

        John

--

-- 
John Meacham - ⑆repetae.net⑆john⑈ 
Graham Klyne | 3 Aug 2004 11:51

Re: Ternary operators in Haskell, an observation (was: Do the libraries define S' ?)

At 14:05 02/08/04 -0700, John Meacham wrote:
>You might be interested in my BooleanAlgebra class, which replaces the
>various boolean operators from the prelude with overloaded versions
>with various useful instances.
>
>The really nice thing is the instance for Bool is exactly the same as
>the prelude version so this can be dropped into existing code without
>change (modulo the monomorphism restriction).

Nice!  (I've only looked briefly, but the generalization looks neat.)

Is this a candidate for the standard hierarchical libraries? (Data.Boolean?)

#g

------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact
Shae Matijs Erisson | 3 Aug 2004 20:47

ANNOUNCE: The Succ Zero International Obfuscated Haskell Code Contest!

In the spirit of http://ioccc.org/ ....

bring us your poor, weary, downtrodden, and unreadable source code.

Come to the Succ Zeroth INTERNATIONAL OBFUSCATED HASKELL CODE CONTEST!

This contest is meant to be fun, short, and not terribly serious.

 * submission deadline: August 31st, 2004
 * judging deadline: September 15th, 2004 (expect results at that point)
 * send your code (complaints/comments) to: iohcc <at> lists.ScannedInAvian.org

submission must have source and some sort of description file so that the
jurors won't be totally mystified.

rules:
 * LICENSE: your code must be an original work, all submitted programs are thereby
   put in the public domain. All explicitly copyrighted programs will be
   rejected. (see the IOCCC rules) 
 * max source size: 5k
 * entry must include shell script or makefile to perform the build
 * build must not require human intervention
 * doing something interesting and/or useful is a plus
 * we particularly like games
 * limited abuse of the rules is acceptible if the specific abuses are
   documented, and the judges think it's cool 
 * judges aren't allowed to enter (not this time)

portability:

 * latest public release versions of hugs, ghc, nhc, hbc, helium acceptable (any
   we missed?) 
 * may use common Haskell tools such as hmake, happy etc.
 * program need not be portable across Haskell implementations
 * must be relatively portable across platforms (i.e. no Linux-specificisms)
 * use of ANSI/VTxxx codes which are not limited to a specific brand of
   terminal and work in a standard xterm are portable 
 * FFI is discouraged, we want real Haskell source.

five person jury:
 * BjornBringert (bringert)
 * AndrewBromage (Pseudonym)
 * ShaeErisson (shapr)
 * JeremyShaw (stepcut)
 * MartinSjögren (Marvin--)

Awards will depend on the specific entries, but may include:

 * best one-liner - less than 80 chars not counting imports?
 * best .signature sized - 4x80 or 4x76 or whatever
 * best game
 * best H98-only program
 * best exploit of a compiler bug
 * most useful program
 * most creative layout
 * best abuse of implementation-specific extensions
 * best abuse of the type system
 * best abuse of category theory
 * worst abuse of the rules

spirit, point, reason:
 * to seek out new lifeforms and new civilizations
 * to boldly go where no Haskell programmer has ever wanted to be!

Semi-seriously, though, obfuscated code shows neat and unusual ways of
structuring a program, cool tricks, dark nooks and crannies you've never
thought of, and is generally a good way to shake off all that software
discipline and stomp around in the muddy world of spaghetti code for a quick
vacation.
--

-- 
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
Malcolm Wallace | 4 Aug 2004 13:04
Picon

Re: ANNOUNCE: The Succ Zero International Obfuscated Haskell Code Contest!

Shae Matijs Erisson <shae <at> ScannedInAvian.com> writes:

> Come to the Succ Zeroth INTERNATIONAL OBFUSCATED HASKELL CODE CONTEST!

Two things.

First, it is a shame that the webpage for the zeroth contest has disappeared.
(Especially since I won :-)

Second, did you know that there was an international obfuscated
Haskell code contest *before* the zero'th?  It was held in 1993.
The results, posted to comp.lang.functional, are attached below.

Regards,
    Malcolm
Newsgroups: comp.lang.functional
From: augustss <at> cs.chalmers.se (Lennart Augustsson)
Subject: Results of the 1993 Obfuscated Haskell Code Contest
Nntp-Posting-Host: statler.cs.chalmers.se
Organization: Dept. of CS, Chalmers, Sweden
Date: Mon, 21 Feb 1994 16:42:07 GMT

Here are (finally) the results of 1993 Obfuscated Haskell Code Contest.

I only received three (3) entries.  You are welcome to speculate
about the reason for this low number.  It is obviously not because
obfuscated programs cannot be written, so it must be something else.
(Could it be that Haskell users lack the ability to make
fun of themselves?  No, that cannot be.)

All entries get prices!

Grand Price:  	John Launchbury
Most symmetric:	Kevin Hammond
Most useful:	Mikael Rittri

And here are the programs.  You'll have to figure them out
yourself for the moment.

JL:
-------------------------------------------------------------------
e=181021504832735228091659724090293195791121747536890433

u(f,m)x=i(m(x),       [],let(a,b)=f(x)       in(a:u(f,m)b))
(v,h)=(foldr(\x(y    )->00+128*y+x)0,u(     sp(25),((==)"")))
p::(Integer,Integer )->Integer      ->     Integer    --NotInt
p(n,m)x     =i(n==0 ,1,i(z n             ,q(n,m)x,    r(n,m)x))
i(n,e,d     )=if(n) then(e)              else  (d)    --23+3d4f
(g,main     ,s,un)= (\x->x,             y(j),\x->x*x,unlines)--)
j(o)=i(take(2)o==   "e=","e="++t        (drop(4-2)o),i(d>e,k,l)o)
l=un.map (show.p      (e,n).v.map(      fromIntegral{-g-}.ord)).h
k=co.map(map(chr       .fromIntegral    ).w.p(d,n).   read).lines
(t,y)=(\ (o:q)->              i(o=='-'  ,'1','-' ):   q,interact)
q(n,m)x=   mod(s(    p(        div(n)2, m{-jl-})x)    )m--hd&&gdb
(r,z,co)    =(\(n,   m)x->mod(x*p(n-1,  m)x)m,even    ,concat)--6
(w,sp)=(    u(\x->(   mod(x)128,div(x   )128),(==0    )),splitAt)

d=563347325936+1197371806136556985877790097-563347325936
n=351189532146914946493104395525009571831256157560461451
-------------------------------------------------------------------

KH:
-------------------------------------------------------------------
				 --}-- 				
import         			 --K-- 				 tropmi
 Prelude renaming      		 --|-- 		      gnimaner edulerP 
 (reverse to(#),       		 --|-- 		       ,)#(ot esrever( 
 interact to(=*),      		 --|-- 		      ,)*=(ot tcaretni 
 map to(.),(.)to($),   		 --|-- 		    ,)$(ot).(,).(ot di 
 ($)to(#!),lines to(^),		 --|-- 		,)^(ot senil,)!#(ot)$( 
 (^)to(!#),unlines to(&))      	 --|-- 	      ))&(ot senilnu,)#!(ot)^( 
				  {-{  				
				 --}-- 				
main=(=*)(($)(($)(&)((.)(#)))(^))--|--))^()))#().(()&()$(()$(()*=(=niam
				 --}-- 				
				  {-{  				
 (^)to(!#),unlines to(&))      	 --|-- 	      ))&(ot senilnu,)#!(ot)^( 
 ($)to(#!),lines to(^),		 --|-- 		,)^(ot senil,)!#(ot)$( 
 id to(.),(.)to($),    		 --|-- 		   ,)$(ot).(,).(ot pam 
 interact to(=*),      		 --|-- 		      ,)*=(ot tcaretni 
 (reverse to(#),       		 --|-- 		       ,)#(ot esrever( 
 Prelude renaming      		 --|-- 		      gnimaner edulerP 
import         			 --H-- 				 tropmi
				 --}-- 				
-------------------------------------------------------------------

MR:
-------------------------------------------------------------------
infixr	->!,=\

-- auxiliary functions -----------------------------------------------------

g u v w (x:y:z) = i(v x y)(u x y (w z) z)(x:w(y:z))
g u v w [x]	= [x,512]
q u v w nil	= u : 95 : z v : w

long = several.length
((->!),(=\))=(map,($))
a	    = g q f
y	    = (-)32
z	    = (+)32
several	    = (>)2
fairlySmall = (<)64
notTooSmall = (>)91
justRight   = (==)95
notTooBig   = (<)96
veryBig	    = (>)123
goodSize x  =foldr(&&)
  otherwise =\($x)->![notTooBig,veryBig]
f y z	    =fairlySmall(z)&&goodSize(y)&&notTooSmall(z)
i cond th el=if(cond)then(th)else(el)
toBeIsToDoAndToDoIsToBeSaidConFuTse

-- main functions ----------------------------------------------------------

  g  =	interact$map
	    chr.g.map
	    ord
main =
 toBeIsToDoAndToDoIsToBeSaidConFuTse(let h=a;t=x where x x=i(long x)x(h t x)
						       q v w x z =- y w:x
						       a = g q f
						       f x y = justRight x
							     && goodSize y
				     in t)

-- rittri <at> cs.chalmers.se ---------------------------------------------------

--

	-- Lennart Augustsson
[This signature is intentionally left blank.]
_______________________________________________
Haskell mailing list
Haskell <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Gmane