[Haskell-cafe] building unix package on windows

2008-09-08 Thread jean-christophe mincke
Hello,

I have installed GHC and cygwin on windows XP and I am trying to build the
unix package (required to install HApps)

** When I use .../ghc/gcc as c compiler I receive the following error during
the configure*

D:\temp\haskell\unix-2.3.0.0runhaskell Setup configure --ghc
--prefix=D:\apps\h-lib
Configuring unix-2.3.0.0...
checking for gcc... gcc
checking for C compiler default output file name...
*configure: error: C compiler cannot create executables*
See `config.log' for more details.

and config.log says that :

  *  ld: crt2.o: No such file: No such file or directory*


** When I use the gcc in cygwin : /usr/bin/gcc, the configure phase is ok
but the build stop on the following error:*

D:\temp\haskell\unix-2.3.0.0runhaskell Setup build
Preprocessing library unix-2.3.0.0...

*In file included from System\Posix\DynamicLinker\Module.hsc:57:0:

include/HsUnix.h:32:23:  sys/times.h: No such file or directory*

include/HsUnix.h:38:26:  sys/resource.h: No such file or directory

include/HsUnix.h:41:22:  sys/wait.h: No such file or directory

include/HsUnix.h:62:21:  termios.h: No such file or directory

include/HsUnix.h:65:25:  sys/utsname.h: No such file or directory

include/HsUnix.h:68:17:  pwd.h: No such file or directory

include/HsUnix.h:71:17:  grp.h: No such file or directory

include/HsUnix.h:81:17:  pty.h: No such file or directory

include/HsUnix.h:84:18:  utmp.h: No such file or directory

include/HsUnix.h:87:19:  dlfcn.h: No such file or directory

In file included from System\Posix\DynamicLinker\Module.hsc:57:0:
include/HsUnix.h: In function `__hsunix_wifexited':

include/HsUnix.h:103:0:
 warning: implicit declaration of function `WIFEXITED'
include/HsUnix.h: In function `__hsunix_wexitstatus':

include/HsUnix.h:104:0:
 warning: implicit declaration of function `WEXITSTATUS'
include/HsUnix.h: In function `__hsunix_wifsignaled':

include/HsUnix.h:105:0:
 warning: implicit declaration of function `WIFSIGNALED'
include/HsUnix.h: In function `__hsunix_wtermsig':

include/HsUnix.h:106:0:
 warning: implicit declaration of function `WTERMSIG'
include/HsUnix.h: In function `__hsunix_wifstopped':

include/HsUnix.h:107:0:
 warning: implicit declaration of function `WIFSTOPPED'
include/HsUnix.h: In function `__hsunix_wstopsig':

include/HsUnix.h:108:0:
 warning: implicit declaration of function `WSTOPSIG'
include/HsUnix.h: In function `__hsunix_rtldDefault':

include/HsUnix.h:115:0:
 error: `RTLD_DEFAULT' undeclared (first use in this function)

include/HsUnix.h:115:0:
 error: (Each undeclared identifier is reported only once

include/HsUnix.h:115:0:  error: for each function it appears in.)
include/HsUnix.h: In function `__hsunix_lstat':

include/HsUnix.h:134:0:
 warning: implicit declaration of function `lstat'
include/HsUnix.h: In function `__hsunix_mknod':

include/HsUnix.h:140:0:
 warning: implicit declaration of function `mknod'
compiling dist\build\System\Posix\DynamicLinker\Module_hsc_make.c failed
*command was: d:\apps\ghc\bin\ghc.exe -c -package base-3.0.2.0 -package
directory-1.0.0.1 -Iinclude dist\build\System\Pos
ix\DynamicLinker\Module_hsc_make.c -o
dist\build\System\Posix\DynamicLinker\Module_hsc_make.o*

Could someone help me.

Thank you

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


Re: [Haskell-cafe] building unix package on windows

2008-09-08 Thread Jeremy Apthorp
Those headers simply do not exist under windows. There's a reason it's  
called 'Unix' :P


Perhaps mingw32 or cygwin could help, as those packages make an  
attempt at emulating (so to speak) the unix environment.


On 08/09/2008, at 17:06, jean-christophe mincke [EMAIL PROTECTED] 
 wrote:



Hello,

I have installed GHC and cygwin on windows XP and I am trying to  
build the unix package (required to install HApps)


* When I use .../ghc/gcc as c compiler I receive the following error  
during the configure


D:\temp\haskell\unix-2.3.0.0runhaskell Setup configure --ghc -- 
prefix=D:\apps\h-lib

Configuring unix-2.3.0.0...
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

and config.log says that :

ld: crt2.o: No such file: No such file or directory


* When I use the gcc in cygwin : /usr/bin/gcc, the configure phase  
is ok but the build stop on the following error:


D:\temp\haskell\unix-2.3.0.0runhaskell Setup build
Preprocessing library unix-2.3.0.0...

In file included from System\Posix\DynamicLinker\Module.hsc:57:0:

include/HsUnix.h:32:23:  sys/times.h: No such file or directory

include/HsUnix.h:38:26:  sys/resource.h: No such file or directory

include/HsUnix.h:41:22:  sys/wait.h: No such file or directory

include/HsUnix.h:62:21:  termios.h: No such file or directory

include/HsUnix.h:65:25:  sys/utsname.h: No such file or directory

include/HsUnix.h:68:17:  pwd.h: No such file or directory

include/HsUnix.h:71:17:  grp.h: No such file or directory

include/HsUnix.h:81:17:  pty.h: No such file or directory

include/HsUnix.h:84:18:  utmp.h: No such file or directory

include/HsUnix.h:87:19:  dlfcn.h: No such file or directory

In file included from System\Posix\DynamicLinker\Module.hsc:57:0:
include/HsUnix.h: In function `__hsunix_wifexited':

include/HsUnix.h:103:0:
 warning: implicit declaration of function `WIFEXITED'
include/HsUnix.h: In function `__hsunix_wexitstatus':

include/HsUnix.h:104:0:
 warning: implicit declaration of function `WEXITSTATUS'
include/HsUnix.h: In function `__hsunix_wifsignaled':

include/HsUnix.h:105:0:
 warning: implicit declaration of function `WIFSIGNALED'
include/HsUnix.h: In function `__hsunix_wtermsig':

include/HsUnix.h:106:0:
 warning: implicit declaration of function `WTERMSIG'
include/HsUnix.h: In function `__hsunix_wifstopped':

include/HsUnix.h:107:0:
 warning: implicit declaration of function `WIFSTOPPED'
include/HsUnix.h: In function `__hsunix_wstopsig':

include/HsUnix.h:108:0:
 warning: implicit declaration of function `WSTOPSIG'
include/HsUnix.h: In function `__hsunix_rtldDefault':

include/HsUnix.h:115:0:
 error: `RTLD_DEFAULT' undeclared (first use in this function)

include/HsUnix.h:115:0:
 error: (Each undeclared identifier is reported only once

include/HsUnix.h:115:0:  error: for each function it appears in.)
include/HsUnix.h: In function `__hsunix_lstat':

include/HsUnix.h:134:0:
 warning: implicit declaration of function `lstat'
include/HsUnix.h: In function `__hsunix_mknod':

include/HsUnix.h:140:0:
 warning: implicit declaration of function `mknod'
compiling dist\build\System\Posix\DynamicLinker\Module_hsc_make.c  
failed
command was: d:\apps\ghc\bin\ghc.exe -c -package base-3.0.2.0 - 
package directory-1.0.0.1 -Iinclude dist\build\System\Pos
ix\DynamicLinker\Module_hsc_make.c -o dist\build\System\Posix 
\DynamicLinker\Module_hsc_make.o


Could someone help me.

Thank you

J-C

___
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] experimental static blog engine in Haskell (file based, markdown syntax)

2008-09-08 Thread jinjing
It's up ( I think, since it's my first cabal ).

cabal install panda

kibro new ttmyblog
cd myblog

rm -r db; rm -r public
git clone git://github.com/nfjinjing/panda-template.git db
sh db/scripts/bootstrap.sh

kibro start



On Sun, Sep 7, 2008 at 4:26 AM, Don Stewart [EMAIL PROTECTED] wrote:
 nfjinjing:
 Hia,

 It's called Panda. It's pretty young, no theme, no tags, no comments,
 around 360 lines of code and uses Kibro to bootstrap.

 hosted on GitHub:
 http://github.com/nfjinjing/panda/

 a quick demo at:
 http://jinjing.blog.easymic.com/

 Awesome! Kibro seems to be taking off.

 Will you release it on hackage.haskell.org?

 -- Don

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


[Haskell-cafe] mailing list choices?

2008-09-08 Thread Conal Elliott
I want to set up some kind of mailing list for reactive (which I plan to
release soon).  The most obvious thing is to set up a mailman-based list on
haskell.org, but I wonder -- do people really want to keep using mailman
technology?  Or something more modern like Yahoo or Google groups.

I use my email reader also with Yahoo  Google groups, so my day-to-day
experience is the same as with mailman-based lists.  For less regular
operations like searching archives, I prefer the experience on Yahoo 
Google group.  And I like some of the other modern features, like personal
profiles and polls.

I've been wondering if haskellers really like mailman or are just used to
it.  Maybe people make new mailman lists simply because others did it before
them.

Any thoughts/preferences?  Thanks,

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


Re: [Haskell-cafe] mailing list choices?

2008-09-08 Thread Alexey Beshenov
On Monday 08 September 2008 14:33:47 Conal Elliott wrote:
 I want to set up some kind of mailing list for reactive (which I
 plan to release soon).  The most obvious thing is to set up a
 mailman-based list on haskell.org, but I wonder -- do people really
 want to keep using mailman technology?  Or something more modern
 like Yahoo or Google groups.

Mailman is nice. You can register your list at the http://gmane.org/

(see http://dir.gmane.org/index.php?prefix=gmane.comp.lang.haskell)

-- 
Sweetmorn, Bureaucracy 32, 3174 YOLD
Alexey Beshenov http://beshenov.ru/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] haskell job offer.

2008-09-08 Thread Lionel Barret De Nazaris


We (Gamr7, see at the bottom) are looking from a senior dev/Technical 
director.
We don't really care about the title but we want someone good (who 
doesn't ?).
We need someone able to model *and* code well (No architect who never 
codes).

The ability to communicate well with a team is also a big plus.
You don't need to speak French (we are in France) but a reasonably good 
English is mandatory.


If You :
• like coding 4+ hours straight.
• like to solve a coding problem elegantly (and are bothered if can't)
• like and read *real* CS books (SICP, EGB, TAOCP, etc...)
• code in Haskell, python and c++.
• are a gamer (this one is optional)
• are interested in computer graphics (optional too)

You fit the bill. We would like to talk to you. Contact us (contact at 
gamr7 dot com).



What we offer:
• interesting problems and creative freedom
• quality of life (no overtime, sunny countryside, French food and low rent)
• a pay in Euros
• comfortable workplace, etc...
• coding in Haskell, python.

The boss *really * codes . He likes Haskell, Python, Reddit, and wants 
the team to be there for the long run (i.e happy).

He also modestly wrote and posted this jobs offer.

About :
Gamr7 is a startup focused on procedural city generation for the game 
and simulation market.

We are located in France, near Lyon.

--
Best Regards,
lionel Barret de Nazaris,
Gamr7 Founder  CTO
=
Gamr7 : Cities for Games
http://www.gamr7.com




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


RE: [Haskell-cafe] mailing list choices?

2008-09-08 Thread Sittampalam, Ganesh
I would call Yahoo and Google groups a major step backwards from mailman.



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Conal Elliott
Sent: 08 September 2008 11:34
To: Haskell Café
Subject: [Haskell-cafe] mailing list choices?


I want to set up some kind of mailing list for reactive (which I plan to 
release soon).  The most obvious thing is to set up a mailman-based list on 
haskell.org, but I wonder -- do people really want to keep using mailman 
technology?  Or something more modern like Yahoo or Google groups.  

I use my email reader also with Yahoo  Google groups, so my day-to-day 
experience is the same as with mailman-based lists.  For less regular 
operations like searching archives, I prefer the experience on Yahoo  Google 
group.  And I like some of the other modern features, like personal profiles 
and polls.

I've been wondering if haskellers really like mailman or are just used to it.  
Maybe people make new mailman lists simply because others did it before them.

Any thoughts/preferences?  Thanks,

  - Conal


==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] mailing list choices?

2008-09-08 Thread Conal Elliott
gmane is indeed a nifty complement to mailman, making mailman more appealing
to me. I especially like the variety of interfaces. Thanks, Alexey.  - Conal

On Mon, Sep 8, 2008 at 12:42 PM, Alexey Beshenov [EMAIL PROTECTED] wrote:

 On Monday 08 September 2008 14:33:47 Conal Elliott wrote:
  I want to set up some kind of mailing list for reactive (which I
  plan to release soon).  The most obvious thing is to set up a
  mailman-based list on haskell.org, but I wonder -- do people really
  want to keep using mailman technology?  Or something more modern
  like Yahoo or Google groups.

 Mailman is nice. You can register your list at the http://gmane.org/

 (see http://dir.gmane.org/index.php?prefix=gmane.comp.lang.haskell)


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


RE: [Haskell-cafe] mailing list choices?

2008-09-08 Thread Sittampalam, Ganesh
The Yahoo mailing list server is notoriously unreliable and randomly
drops mails and/or drops people from lists because their email server
was temporarily refusing mails (4xx SMTP responses not 5xx). I also find
the Yahoo groups web interface absolutely awful; mailman's list archives
aren't great, but are ok for casual browsing, and you can download the
entire archives and load them up locally if you need to.
 
A quick look around Google groups suggests that my initial assumption
that it'd be as bad as Yahoo groups is probably unfounded. But if I
hadn't already given in and created a Google account for other things,
I'd be unhappy about doing so just for your list, given the way it
tracks your web browsing in ways that I don't entirely understand while
you are logged into it.



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Conal Elliott
Sent: 08 September 2008 12:52
To: Sittampalam, Ganesh
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] mailing list choices?


In what ways?


2008/9/8 Sittampalam, Ganesh [EMAIL PROTECTED]


I would call Yahoo and Google groups a major step backwards from
mailman.



==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] mailing list choices?

2008-09-08 Thread Sean Leather
 The Yahoo mailing list server is notoriously unreliable and randomly drops
 mails and/or drops people from lists because their email server was
 temporarily refusing mails (4xx SMTP responses not 5xx). I also find the
 Yahoo groups web interface absolutely awful; mailman's list archives aren't
 great, but are ok for casual browsing, and you can download the entire
 archives and load them up locally if you need to.

 A quick look around Google groups suggests that my initial assumption that
 it'd be as bad as Yahoo groups is probably unfounded. But if I hadn't
 already given in and created a Google account for other things, I'd be
 unhappy about doing so just for your list, given the way it tracks your web
 browsing in ways that I don't entirely understand while you are logged into
 it.


From http://groups.google.com/support/bin/answer.py?answer=46438topic=9244
:

*Activities that don't require a Google Account: *

   - Reading posts in public groups
   - Searching for groups, posts, or authors
   - Posting to groups via email if they are unrestricted or you're already
   a member
   - Joining a public Google Group via email

*Activities that require a Google Account: *

   - Creating and managing your own Google Group
   - Posting to groups via our web interface
   - Creating pages and uploading files
   - Subscribing to a Usenet newsgroup and receiving posts via email
   - Joining a Google Group via our web interface
   - Changing your subscription type (No Email, Abridged Email...)
   - Reading a restricted group's posts online


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


Re: [Haskell-cafe] mailing list choices?

2008-09-08 Thread Conal Elliott
In what ways?

2008/9/8 Sittampalam, Ganesh [EMAIL PROTECTED]

  I would call Yahoo and Google groups a major step backwards from mailman.

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


[Haskell-cafe] Re: A problem with nested regions and higher-order?functions

2008-09-08 Thread Chung-chieh Shan
Mario Bla??evi?? [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in 
gmane.comp.lang.haskell.cafe:
 I'm trying to apply the nested regions (as in Lightweight Monadic
 Regions by Oleg Kiselyov and Chung-chieh Shan) design pattern, if
 that's the proper term, in hope to gain a bit more type safety in
 this little library I'm working on (Streaming Component Combinators,
 available on Hackage). I guess the problem is that I'm getting too
 much type safety now, because I can't get the thing to compile. ...

Hi!  Thanks for your interest.  It sounds like a promising application
of region checking.  I actually side with the type checker on this
problem:

  type SingleHandler x y = forall r1s rs. Ancestor r1s rs =
   Handle r1s x - Region rs y
  type DoubleHandler x y z = forall r1d r2d rd. (Ancestor r1d rd, Ancestor 
  r2d rd) =
 Handle r1d x - Handle r2d y - Region rd z

Here a SingleHandler is defined as an operation, in an arbitrary region
on an arbitrary handle, that is valid as long as the region of the
operation descends from the region of the handle.  For example, reading
a string from an arbitrary open file is a SingleHandler File String.
However, copying a string from an arbitrary open file to another fixed
file is not a SingleHandler, because such an operation is valid only
in a region that descends from the destination file handle's region!
That's what GHC complained about as it checks your mapD:

  mapD :: (SingleHandler x z - SingleHandler y z)
  - DoubleHandler x w z - DoubleHandler y w z
  mapD f d = \y w- f (\x- d x w) y

So we really need to change the type of mapD if we want it to be
accepted by a sound type system.  The simplest way is to not require
that mapD return a DoubleHandler (a binary operation that works in an
arbitrary region):

mapD :: ((Handle r1 x - Region r z) -
 (Handle r1 x - Region r z))
 - ((Handle r1 x - Handle r2 w - Region r z) -
 (Handle r1 x - Handle r2 w - Region r z))
mapD f d = \y w- f (\x- d x w) y

This type is a special case of the type automatically inferred for mapD
by Haskell if you omit the type signature.  Haskell doesn't have any
trouble type-checking higher-order functions, such as this mapD, but
higher-rank types can call for manual annotations, as illustrated below.

Another way to get mapD to type-check is to pass it (as its first
argument) not a SingleHandler transformer but a transformer of
operations that may work only in descendents of a given region r2.  We
want to write

type H r2 x y = forall r1 r. (Ancestor r1 r, Ancestor r2 r) =
Handle r1 x - Region r y
mapD :: (forall r2. H r2 x z - H r2 y z)
- DoubleHandler x w z - DoubleHandler y w z
mapD f d = \y w- f (\x- d x w) y

(forall r2 takes scope over both H r2 x z and H r2 y z above) but
GHC doesn't see that we intend to unify the r2d in the expansion of
DoubleHandler y w z with the r2 in this type signature of mapD.
So, we need to put an explicit type annotation on the use of f in the
body of mapD.  To do so, we add {-# LANGUAGE ScopedTypeVariables #-}
and expand the type synonym DoubleHandler y w z in the type signature
of mapD:

mapD :: forall x y z w r1d r2d rd. (Ancestor r1d rd, Ancestor r2d rd) =
   (forall r2. H r2 x z - H r2 y z)
- DoubleHandler x w z
- Handle r1d y - Handle r2d w - Region rd z
mapD f d = \y w- (f :: H r2d x z - H r2d y z) (\x- d x w) y

Not so pretty anymore, but it does pass the type checker (GHC 6.8.2).

-- 
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
-
Ken Shan

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


Re: [Haskell-cafe] HXT from schema to data model

2008-09-08 Thread Uwe Schmidt
Hello Pierre-Edouard,

 Is there a way to generate a data model and a set of picklers from an XML (or
 RelaxNG) Schema using the HXT tool box?

the generation of a DTD out of the picklers is in an experimental stage.
The generation of a RelaxNG Schema is technically possible, but it's an
open project. It's on our TODO list for HXT.

Validation with RelaxNG within HXT is complete. What is missinig is a complete
datatype library for XML Schema Datatypes. The still missing part of the
W3C XML Schema datatype library are the datatypes for date and time,
all others are implemented.

Cheers,

 Uwe
-- 

Uwe Schmidt
FH Wedel
http://www.fh-wedel.de/~si/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] monadic map on a Data.IntMap

2008-09-08 Thread minh thu
Hi,

Is there something like a fmapM_ ?
In particular, I'd like to mapM_ a Data.IntMap instead of a List

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


Re: [Haskell-cafe] monadic map on a Data.IntMap

2008-09-08 Thread Jefferson Heard
I suppose a

mapM_ monadicFunction . Data.IntMap.toList $ m

doesn't work for you?

On Mon, Sep 8, 2008 at 2:11 PM, minh thu [EMAIL PROTECTED] wrote:
 Hi,

 Is there something like a fmapM_ ?
 In particular, I'd like to mapM_ a Data.IntMap instead of a List

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




-- 
I try to take things like a crow; war and chaos don't always ruin a
picnic, they just mean you have to be careful what you swallow.

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


Re: [Haskell-cafe] monadic map on a Data.IntMap

2008-09-08 Thread Chaddaï Fouché
2008/9/8 minh thu [EMAIL PROTECTED]:
 Hi,

 Is there something like a fmapM_ ?
 In particular, I'd like to mapM_ a Data.IntMap instead of a List


The Traversable class (from Data.Traversable) includes a mapM function.
Unfortunately Data.IntMap don't provide an instance for IntMap (though
Data.Map does for Map).

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


[Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-08 Thread Bruce Eckel
As some of you on this list may know, I have struggled to understand
concurrency, on and off for many years, but primarily in the C++ and
Java domains. As time has passed and experience has stacked up, I have
become more convinced that while the world runs in parallel, we think
sequentially and so shared-memory concurrency is impossible for
programmers to get right -- not only are we unable to think in such a
way to solve the problem, the unnatural domain-cutting that happens in
shared-memory concurrency always trips you up, especially when the
scale increases.

I think that the inclusion of threads and locks in Java was just a
knee-jerk response to solving the concurrency problem. Indeed, there
were subtle threading bugs in the system until Java 5. I personally
find the Actor model to be most attractive when talking about
threading and objects, but I don't yet know where the limitations of
Actors are.

However, I keep running across comments where people claim they must
have shared memory concurrency. It's very hard for me to tell whether
this is just because the person knows threads or if there is truth to
it. The only semi-specific comment I've heard refers to data
parallelism, which I assumed was something like matrix inversion, but
when I checked this with an expert, he replied that matrix inversion
decomposes very nicely to separate processes without shared memory, so
now I'm not clear on what the data parallelism requires threads
issue refers to.

I know that both Haskell and Erlang only allow separated memory spaces
with message passing between processes, and they seem to be able to
solve a large range of problems -- but are there problems that they
cannot solve? I recently listened to an interview with Simon
Peyton-Jones where he seemed to suggest that this newsgroup might be a
helpful place to answer such questions. Thanks for any insights -- it
would be especially useful if I can point to some kind of proof one
way or another.

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


Re: [Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-08 Thread Arnar Birgisson
Hi Bruce,

On Mon, Sep 8, 2008 at 21:33, Bruce Eckel [EMAIL PROTECTED] wrote:
 I know that both Haskell and Erlang only allow separated memory spaces
 with message passing between processes, and they seem to be able to
 solve a large range of problems -- but are there problems that they
 cannot solve?

Modern Haskell has shared memory variables, so that statement
[Haskell] only allows seperated memory spaces... is not true in
practice. In fact, Haskell probably has the (semantically) cleanest
and best implementation of STM (Software Transactional Memory) there
is imho, which removes most of the headaches of shared memory based
concurrency without sacrificing shared memory itself.

As for the question Is there something that the Actor model cannot do
but you can with shared memory?, I'd say the answer is probably no.
After all, you could just simulate shared memory by having one actor
manage all shared state.

 I recently listened to an interview with Simon
 Peyton-Jones where he seemed to suggest that this newsgroup might be a
 helpful place to answer such questions. Thanks for any insights -- it
 would be especially useful if I can point to some kind of proof one
 way or another.

I may be completely missing your point, and if so I apologize, but
does the simulation argument above suffice as a proof?

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


Re: [Haskell-cafe] monadic map on a Data.IntMap

2008-09-08 Thread minh thu
2008/9/8 Jefferson Heard [EMAIL PROTECTED]:
 I suppose a

 mapM_ monadicFunction . Data.IntMap.toList $ m

 doesn't work for you?

Well, that's what I use (IntMap.elems in fact), but isn't there some
perfromance lost ?

Thu


 On Mon, Sep 8, 2008 at 2:11 PM, minh thu [EMAIL PROTECTED] wrote:
 Hi,

 Is there something like a fmapM_ ?
 In particular, I'd like to mapM_ a Data.IntMap instead of a List

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




 --
 I try to take things like a crow; war and chaos don't always ruin a
 picnic, they just mean you have to be careful what you swallow.

 -- Jessica Edwards

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


Re: [Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-08 Thread Kyle Consalus
Depending on definitions and how much we want to be concerned with
distributed systems,
I believe either model can be used to emulate the other (though it is
harder to emulate the possible
pitfalls of shared memory with CSP).

To me, it seems somewhat similar to garbage collection vs manually
memory management.
You can choose the potential to be more clever than the computer at
the risk of finding
the problem is more clever than you are.

Anyway, for the time being I believe there are operations that can be
done with shared memory
that can't be done with message passing if we make good performance
a requirement.

On Mon, Sep 8, 2008 at 12:33 PM, Bruce Eckel [EMAIL PROTECTED] wrote:
 As some of you on this list may know, I have struggled to understand
 concurrency, on and off for many years, but primarily in the C++ and
 Java domains. As time has passed and experience has stacked up, I have
 become more convinced that while the world runs in parallel, we think
 sequentially and so shared-memory concurrency is impossible for
 programmers to get right -- not only are we unable to think in such a
 way to solve the problem, the unnatural domain-cutting that happens in
 shared-memory concurrency always trips you up, especially when the
 scale increases.

 I think that the inclusion of threads and locks in Java was just a
 knee-jerk response to solving the concurrency problem. Indeed, there
 were subtle threading bugs in the system until Java 5. I personally
 find the Actor model to be most attractive when talking about
 threading and objects, but I don't yet know where the limitations of
 Actors are.

 However, I keep running across comments where people claim they must
 have shared memory concurrency. It's very hard for me to tell whether
 this is just because the person knows threads or if there is truth to
 it. The only semi-specific comment I've heard refers to data
 parallelism, which I assumed was something like matrix inversion, but
 when I checked this with an expert, he replied that matrix inversion
 decomposes very nicely to separate processes without shared memory, so
 now I'm not clear on what the data parallelism requires threads
 issue refers to.

 I know that both Haskell and Erlang only allow separated memory spaces
 with message passing between processes, and they seem to be able to
 solve a large range of problems -- but are there problems that they
 cannot solve? I recently listened to an interview with Simon
 Peyton-Jones where he seemed to suggest that this newsgroup might be a
 helpful place to answer such questions. Thanks for any insights -- it
 would be especially useful if I can point to some kind of proof one
 way or another.

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

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


[Haskell-cafe] STM and FFI

2008-09-08 Thread Mauricio

Hi,

Is it possible to use foreign function
interface with STMs? If so, where can I
find examples?

Thanks,
Maurício

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


Re: [Haskell-cafe] monadic map on a Data.IntMap

2008-09-08 Thread Ross Paterson
On Mon, Sep 08, 2008 at 08:56:26PM +0200, Chaddaï Fouché wrote:
 Unfortunately Data.IntMap don't provide an instance for IntMap (though
 Data.Map does for Map).

It was an oversight.  The instance is straightforward:

instance Traversable IntMap where
traverse _ Nil = pure Nil
traverse f (Tip k v) = Tip k $ f v
traverse f (Bin p m l r) = Bin p m $ traverse f l * traverse f r
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: building unix package on windows

2008-09-08 Thread David Hotham
But the unix package isn't actually required to build HAppS on Windows.  
If you remove the dependency from the .cabal file (and also remove the 
-DUNIX build option) then you'll be fine.


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


[Haskell-cafe] Hackage policy question

2008-09-08 Thread Iavor Diatchki
Hi,
I just noticed that hackage has introduced a new policy to disallow
changes to a package without bumping the version.  I understand that
this is probably a good idea for changes to the source code, but it
really would be nice to have a backdoor that allows for other changes.
 For example, I just uploaded a package, and realized that I forgot to
add a home-page entry in the cabal file.  I do not plan to increase
the version number of my application, only so that I can upload a new
version (the source code has not changed after all!).  I can imagine
similar problems related to fixing typos in the description, and other
fixes to the meta-data.

So, could we please revert to the old policy? (if we really want to be
fancy, the hackage upload script could check that the source code, and
other fields, such as LICENSE have not changed, as these should really
bump the version... in the mean time though, I think just being
responsible members of the community would work just as well!).

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


[Haskell-cafe] [Fwd: profiling in haskell]

2008-09-08 Thread Vlad Skvortsov
Posting to cafe since I got just one reply on [EMAIL PROTECTED] I was suggested 
to include more SCC annotations, but that didn't help. The 'serialize' 
function is still reported to consume about 32% of running time, 29% 
inherited. However, functions called from it only account for about 3% 
of time.


How do I get more insight into that?

Thanks.

--
Vlad Skvortsov, [EMAIL PROTECTED], http://vss.73rus.com

---BeginMessage---

Hi!

I'm trying to profile the code pasted below. Per the profiler output it 
takes about 30% of my program running time and I'd like to analyze it 
further. What I need is a breakdown on a finer level, so I inserted SCC 
annotations. However, they appear to have attributed zero cost. I use 
GHC 6.8.2 on FreeBSD, the code is compiled without -O options.


What am I doing wrong?

Note: I'm not trying to *optimize* this code (I intuitively know where 
the problems are). My intention is to learn the mechanics of profiling 
Haskell code.



serialize :: Database - [[String]]
serialize (dmap, tmap) =
 [
   {-# SCC XXX1 #-} [dbFormatTag],
   {-# SCC XXX2 #-} (dumpWith docToStr dmap),
   {-# SCC XXX3 #-} (dumpWith termToStr tmap)
 ]
 where
   dumpWith f = Data.Map.foldWithKey f []
  
   docToStr k (Doc { docName=n, docVectorLength=vl}) =

 (:) (d  ++ show k ++   ++ n ++   ++ (show vl))

   termToStr t il =
 (:) (t  ++ t ++   ++ (foldl ilItemToStr  il))

   ilItemToStr acc (docid, weight) =
 show docid ++ : ++ show weight ++   ++ acc

--
Vlad Skvortsov, [EMAIL PROTECTED], http://vss.73rus.com


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


[Haskell-cafe] haskell core definition

2008-09-08 Thread Vlad Skvortsov

Hi,

I'm trying to profile my haskell code (see thread profiling in 
haskell) and to get more insight I made GHC produce the haskell Core 
code. However, I'm not quite sure how to interpret it, is there a 
definition (quick search didn't reveal one)?


Also, how do I demangle the names? It seems that, for example,  
'base:GHC.Base.ZC' is a (:) function on strings, but where how am I 
supposed to figure that out?


Thanks!

--
Vlad Skvortsov, [EMAIL PROTECTED], http://vss.73rus.com

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


[Haskell-cafe] Re: haskell core definition

2008-09-08 Thread Ashley Yakeley

Vlad Skvortsov wrote:
Also, how do I demangle the names? It seems that, for example,  
'base:GHC.Base.ZC' is a (:) function on strings, but where how am I 
supposed to figure that out?
#!/usr/bin/perl
# Written by Ashley Yakeley 2003
# All rights to the public

while ()
{
s/_/ /g;
s/\w+/decode($)/eg;
print;
}

sub commas
{
local($i) = @_;
if ($i == 0)
{
return ;
}
elsif ($i == 1)
{
return  ;
}
else
{
return , x ($i - 1);
}
}

sub decode
{
local($s) = @_;
my $a=;
while ($s =~/([^zZ]*)([zZ].*)/)
{
$a.=$1;
if ($2 =~/([zZ][A-Za-z])(.*)/)
{
{
$a.=(,last if $1 =~/ZL/;
$a.=),last if $1 =~/ZR/;
$a.=[,last if $1 =~/ZM/;
$a.=],last if $1 =~/ZN/;
$a.=:,last if $1 =~/ZC/;
$a.=Z,last if $1 =~/ZZ/;

$a.=z,last if $1 =~/zz/;
$a.=,last if $1 =~/za/;
$a.=|,last if $1 =~/zb/;
$a.=^,last if $1 =~/zc/;
$a.='$',last if $1 =~/zd/;
$a.==,last if $1 =~/ze/;
$a.=,last if $1 =~/zg/;
$a.=#,last if $1 =~/zh/;
$a.=.,last if $1 =~/zi/;
$a.=,last if $1 =~/zl/;
$a.=-,last if $1 =~/zm/;
$a.=!,last if $1 =~/zn/;
$a.=+,last if $1 =~/zp/;
$a.=',last if $1 =~/zq/;
$a.=\\,last if $1 =~/zr/;
$a.=/,last if $1 =~/zs/;
$a.=*,last if $1 =~/zt/;
$a.=_,last if $1 =~/zu/;
$a.=%,last if $1 =~/zv/;
$a.=???;
}
$s = $2;
}
elsif ($2 =~/Z([0-9]+)T(.*)/)
{
$a.=(.commas($1).);
$s = $2;
}
elsif ($2 =~/Z([0-9]+)H(.*)/)
{
$a.=(#.commas($1).#);
$s = $2;
}
elsif ($2 =~/Z([0-9]+)U(.*)/)
{
$a.=chr($1);
$s = $2;
}
else
{
$a.=???.$2;
$s = ;
}
};
return $a.$s;
};___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-08 Thread Timothy Goddard
On Tue, 09 Sep 2008 07:33:24 Bruce Eckel wrote:
 I know that both Haskell and Erlang only allow separated memory spaces
 with message passing between processes, and they seem to be able to
 solve a large range of problems -- but are there problems that they
 cannot solve? I recently listened to an interview with Simon
 Peyton-Jones where he seemed to suggest that this newsgroup might be a
 helpful place to answer such questions. Thanks for any insights -- it
 would be especially useful if I can point to some kind of proof one
 way or another.

In Haskell it is  simply irrelevant whether parts of the structures being 
passed between threads are shared or not because the structures are 
immutable. We keep our code side-effect free and as a result it is incredibly 
easy to make parallel. This is so solid that we can also add implicit 
threading to the code with simple annotations such as 'par' and 'seq'.

Having said this, it is possible to generate structures which are mutable and 
only accessible in the IO monad. As a general rule, IO code using shared 
memory has the same threading issues as in any other language while pure code 
is guaranteed safe. Haskell is capable of working with both models, but 
mutable data structures are deliberately restricted in their use and are rare 
in practice.

A great deal of parallelism can be added to pure code without any risk. I 
can't assist with mathematical proofs, but can't think of any reason why 
shared, manipulable memory would be absolutely necessary. In the worst case, 
all operations on the data structure can be converted to messages to a 
central thread which manages that structure and serialises access. Any 
procedure call can become an asynchronous pair of request, response messages. 

I am not a mathematician, I can't prove it, but I can't think of circumstances 
where I would need to put mutable references in a data structure except where 
the language and compiler can't handle immutable structures efficiently.

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


Re: [Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-08 Thread Brandon S. Allbery KF8NH

On 2008 Sep 8, at 21:00, Timothy Goddard wrote:
I am not a mathematician, I can't prove it, but I can't think of  
circumstances
where I would need to put mutable references in a data structure  
except where
the language and compiler can't handle immutable structures  
efficiently.



The status registers of memory-mapped devices come to mind.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon universityKF8NH


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


[Haskell-cafe] Field names

2008-09-08 Thread Daryoush Mehrtash
In type section of the Gentle Introduction to Haskell
http://www.cs.sfu.ca/CC/SW/Haskell/hugs/tutorial-1.4-html/moretypes.htmlthere
is this example:


 data Point = Pt {pointx, pointy :: Float}



 abs (Pt {pointx = x, pointy = y}) = sqrt (x*x + y+y)


Why is it pointx=x and not x=pointx?

-- 
Daryoush

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


[Haskell-cafe] Re: Field names

2008-09-08 Thread Mauricio


abs (Pt {pointx = x, pointy = y}) = sqrt (x*x + y+y) 



Why is it pointx=x and not x=pointx?



Your intuition is probably telling you that this
is something like:

abs (point) = sqrt (x*x+y*y)
  where {x=pointx point ; y=pointy point}

Actually, it's an example of pattern matching:

abs (Pt {pointx=3 , pointy=4}) = 5
abs (Pt {pointx=3 , pointy=y}) = sqrt (9+y*y)
abs (Pt {pointx=z , pointy=z}) = (sqrt 2)*z

etc.

Best,
Maurício

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


Re: [Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-08 Thread Richard A. O'Keefe

I think the demonstration is in Hoare's book on co-operating
sequential processes, but if you have pure processes and
message passing, you can simulate conventional variables.
Here's an Erlang version:

variable_loop(State) -
receive
{ask,Sender} - Sender!{self(),State}, variable_loop(State)
  ; {tell,New_State} - variable_loop(New_State)
end.

new_variable(Initial_State) -
spawn(fun () - variable_loop(Initial_State) end).

fetch(Variable) -
Variable!{ask,self()},
receive {Variable,State} - State end.

store(Variable, New_State) -
Variable!{tell,New_State}.

new_array(Size, Initial_State) -
list_to_tuple([new_variable(Initial_State)
  || Dummy - lists:seq(1, Size)]).

fetch(Array, Index) -
fetch(element(Index, Array)).

store(Array, Index, New_State) -
store(element(Index, Array), New_State).

The simulation of (shared) mutable variables and arrays in pure
CSP is very similar.  This pretty much _has_ to be possible in
any language that has concurrent processes that can communicate
in some fashion.  There are also quite elementary ways to
simulate locking.  So we can solve any concurrent problem that,
say, C++ with Intel's TBB library, or Java with java.util.concurrent,
or any other such language can solve.  We can even get ourselves
just as far into extremely serious trouble as we can using those
languages, it's just that we don't _have_ to.

--
If stupidity were a crime, who'd 'scape hanging?







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


Re: [Haskell-cafe] Can you do everything without shared-memory concurrency?

2008-09-08 Thread Richard A. O'Keefe


On 9 Sep 2008, at 8:15 am, Kyle Consalus wrote:


Anyway, for the time being I believe there are operations that can be
done with shared memory
that can't be done with message passing if we make good performance
a requirement.


One of our people here has been working on Distributed Shared Memory
for some years.  It's a programming model where you write AS IF you
had shared memory, but you really don't.  He actually uses plain C
with a library, but I've got a student project to wrap some syntax
around that.

typedef struct Foo { ... variables ... } Foo;
typedef struct Bar { ... variables ... } Bar;
shared Foo foo;
shared Bar bar;

shared (const *f = foo) {
... here we have read access to f-variables ...
}
shared (*b = bar) {
... here we have read-write access to b-variables ...
}

Underneath, it's message passing.  When you get a view on a
shared region, a copy is fetched from the cheapest source that has
a current copy.  When you release a write view, you become the
holder of the only current copy.  Compressed differences are
sent around the local net.  Zhiyi Huang's library is called VODCA.
There's a plug-compatible version developed by his colleagues in
China called Maotai, so the _same_ code can be run on a multicore
system or on a network of workstations.  The trick is to choose the
chunk size of your problem so that computation and communication
costs are in the right balance.  This certainly seems to be adequate
for numerical software, raytracing, game playing, ...

One issue is that real shared memory comes at a price that most
people don't know they are paying.  We wouldn't need MOESI
protocols or the related bus traffic if there were known to be
no sharing, and one of the things that gets in the way of
massive multicore is keeping caches coherent.  No shared memory
= no coherence problem = no extra bus traffic = faster.

--
If stupidity were a crime, who'd 'scape hanging?







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


Re: [Haskell-cafe] STM and FFI

2008-09-08 Thread Don Stewart
briqueabraque:
 Hi,
 
 Is it possible to use foreign function
 interface with STMs? If so, where can I
 find examples?
 

Defintely possible. FFI functions are imported as normal functions, so
use them wherever the types fit.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] haskell job offer.

2008-09-08 Thread Don Stewart

Welcome to the community!

I've added details about Gamr7 to the industry page,

http://haskell.org/haskellwiki/Haskell_in_industry

-- Don

lionel:
 
 We (Gamr7, see at the bottom) are looking from a senior dev/Technical 
 director.
 We don't really care about the title but we want someone good (who 
 doesn't ?).
 We need someone able to model *and* code well (No architect who never 
 codes).
 The ability to communicate well with a team is also a big plus.
 You don't need to speak French (we are in France) but a reasonably good 
 English is mandatory.
 
 If You :
 • like coding 4+ hours straight.
 • like to solve a coding problem elegantly (and are bothered if can't)
 • like and read *real* CS books (SICP, EGB, TAOCP, etc...)
 • code in Haskell, python and c++.
 • are a gamer (this one is optional)
 • are interested in computer graphics (optional too)
 
 You fit the bill. We would like to talk to you. Contact us (contact at 
 gamr7 dot com).
 
 
 What we offer:
 • interesting problems and creative freedom
 • quality of life (no overtime, sunny countryside, French food and low 
 rent)
 • a pay in Euros
 • comfortable workplace, etc...
 • coding in Haskell, python.
 
 The boss *really * codes . He likes Haskell, Python, Reddit, and wants 
 the team to be there for the long run (i.e happy).
 He also modestly wrote and posted this jobs offer.
 
 About :
 Gamr7 is a startup focused on procedural city generation for the game 
 and simulation market.
 We are located in France, near Lyon.
 
 -- 
 Best Regards,
 lionel Barret de Nazaris,
 Gamr7 Founder  CTO
 =
 Gamr7 : Cities for Games
 http://www.gamr7.com
 
 
 
 
 ___
 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] haskell job offer.

2008-09-08 Thread Don Stewart
And for those who didn't see the original release announcement, check
out their website..

http://gamr7.com/

That's kind of awesome. Could you say more about what you're using
Haskell for, Lionel?

-- Don

dons:
 
 Welcome to the community!
 
 I've added details about Gamr7 to the industry page,
 
 http://haskell.org/haskellwiki/Haskell_in_industry
 
 -- Don
 
 lionel:
  
  We (Gamr7, see at the bottom) are looking from a senior dev/Technical 
  director.
  We don't really care about the title but we want someone good (who 
  doesn't ?).
  We need someone able to model *and* code well (No architect who never 
  codes).
  The ability to communicate well with a team is also a big plus.
  You don't need to speak French (we are in France) but a reasonably good 
  English is mandatory.
  
  If You :
  • like coding 4+ hours straight.
  • like to solve a coding problem elegantly (and are bothered if can't)
  • like and read *real* CS books (SICP, EGB, TAOCP, etc...)
  • code in Haskell, python and c++.
  • are a gamer (this one is optional)
  • are interested in computer graphics (optional too)
  
  You fit the bill. We would like to talk to you. Contact us (contact at 
  gamr7 dot com).
  
  
  What we offer:
  • interesting problems and creative freedom
  • quality of life (no overtime, sunny countryside, French food and low 
  rent)
  • a pay in Euros
  • comfortable workplace, etc...
  • coding in Haskell, python.
  
  The boss *really * codes . He likes Haskell, Python, Reddit, and wants 
  the team to be there for the long run (i.e happy).
  He also modestly wrote and posted this jobs offer.
  
  About :
  Gamr7 is a startup focused on procedural city generation for the game 
  and simulation market.
  We are located in France, near Lyon.
  
  -- 
  Best Regards,
  lionel Barret de Nazaris,
  Gamr7 Founder  CTO
  =
  Gamr7 : Cities for Games
  http://www.gamr7.com
  
  
  
  
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Field names

2008-09-08 Thread Daryoush Mehrtash
Thanks.

Pattern matching and memory management in Haskell (or may be GHC
implementation of it) is somewhat of a mystery to me.  Are there any
references that explains the underlying implementation?

Daryoush

On Mon, Sep 8, 2008 at 6:37 PM, Mauricio [EMAIL PROTECTED] wrote:


 abs (Pt {pointx = x, pointy = y}) = sqrt (x*x + y+y)

 Why is it pointx=x and not x=pointx?


 Your intuition is probably telling you that this
 is something like:

 abs (point) = sqrt (x*x+y*y)
  where {x=pointx point ; y=pointy point}

 Actually, it's an example of pattern matching:

 abs (Pt {pointx=3 , pointy=4}) = 5
 abs (Pt {pointx=3 , pointy=y}) = sqrt (9+y*y)
 abs (Pt {pointx=z , pointy=z}) = (sqrt 2)*z

 etc.

 Best,
 Maurício

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




-- 
Daryoush

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