Re: [Haskell-cafe] finding out which gcc is hard-coded into a ghc?

2010-08-07 Thread Ivan Lazar Miljenovic
Günther Schmidt gue.schm...@web.de writes:

 how can I find out which gcc a ghc is hard-coded to use and is it
 possible to override it?

At least in Linux as of 6.12.2, the /usr/bin/ghc wrapper script has a
link to it.

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Preview the new haddock look and take a short survey

2010-08-07 Thread David Virebayre
On Sat, Aug 7, 2010 at 7:54 AM, Magnus Therning mag...@therning.org wrote:

 jokeWouldn't the docs be unusable if it were in French even if
 Haddock handled unicode characters correctly?/joke

Joke aside, for software to be released, a French documentation indeed
wouldn't be of much use. The langage of technology and science and les
internets is English, and I'm fine with that.

I would only document software in French that is written for my
company, and isn't supposed to be released.

I hope we're not hijacking the thread here :)

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


[Haskell-cafe] using shared libs on the windows version

2010-08-07 Thread Axel Huizinga

 Hi to all from a haskell newbie!

I run into problems using shared libs on windows.
The error messages I get looks like:
 Could not find module `Data.List':
   Perhaps you haven't installed the dyn libraries for package `base'?

Any ideas how to enable shared libs system-wide?

Cordially,
Axel

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


[Haskell-cafe] philosophy of Haskell

2010-08-07 Thread Michael Mossey
When I started to study Haskell, I was surprised that so much emphasis was 
placed on simple things. Monads were introduced to me as basically a 
wrapper, and a bind function that unwrapped something and wrapped something 
else back up again. I didn't understand what the fuss was about. Later I 
saw the amazing feats of expressiveness that were possible. I scratched my 
head in confusion---Wait, say that again?


Here's a quote from Bertrand Russell about philosophy (read: Haskell). He's 
actually being humorous, but it applies, in a way:


The point of philosophy is to start with something so simple as not to 
seem worth stating, and to end with something so paradoxical no one will 
believe it.

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


[Haskell-cafe] Odd parallel haskell observations

2010-08-07 Thread Alexander Kotelnikov
Hello.

I am exploring haskell features for parallel and cocurrent programming
and see something difficult to explain.

In brief - asking RTS to use more threads results in awfull drop of
performance. And according to 'top'  test programm consumes up to N CPUs
power.

Am I doing something wrong? I attached the code, but I am just issuing
thousands of HTTP GET requests in 1-4 forkIO threads. And since it looks
like local apache is faster than haskell program (which is a pity) I
expected that using more OS threads should improve performance.

Just in case:
ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.1


import Data.List
import System.IO
import qualified System.IO.UTF8
import System.Environment (getArgs)
import Network.HTTP
import Network.URI
import System.Time
import System.IO.Unsafe
import Control.Monad
import Control.Exception
import Control.Concurrent
import Control.Concurrent.MVar

secDiff :: ClockTime - ClockTime - Float
secDiff (TOD secs1 psecs1) (TOD secs2 psecs2) =
fromInteger (psecs2 - psecs1) / 1e12 + fromInteger (secs2 - secs1)

-- single get
get :: Int - IO(String)
get id = do
  res - simpleHTTP $ getRequest http://127.0.0.1;
  case res of
Left err - return(show err)
Right rsp - return(show $ rspCode rsp)


-- perform GET per each list element using c threads
doList :: [Int] - Int - IO()
doList ids 0 =
return()

doList [] c =
return()

doList ids c = do
forkChild $ forM_ todo get
doList later (c-1)
where (todo, later) = splitAt (length ids `div` c) ids

{-
Copied from
http://haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Concurrent.html#11
Terminating the program
-}
children :: MVar [MVar ()]
children = unsafePerformIO (newMVar [])

waitForChildren :: IO ()
waitForChildren = do
  cs - takeMVar children
  case cs of
[]   - return ()
m:ms - do
putMVar children ms
takeMVar m
waitForChildren

forkChild :: IO () - IO ThreadId
forkChild io = do
  mvar - newEmptyMVar
  childs - takeMVar children
  putMVar children (mvar:childs)
  forkIO (io `finally` putMVar mvar ())
-- end of copied code

main = do
  [c', n'] - getArgs
  let 
  c = read c' :: Int
  n = read n' :: Int
  start - getClockTime
  doList [1..n] c
  waitForChildren
  end - getClockTime
  putStrLn $ show(c) ++   ++ show(secDiff start end) ++ s


20:31 sa...@loft4633:/tmp 21 ghc --make -threaded get.hs
[1 of 1] Compiling Main ( get.hs, get.o )
Linking get ...
20:31 sa...@loft4633:/tmp 22 ./get 1 1
1 3.242352s
20:31 sa...@loft4633:/tmp 23 ./get 2 1
2 3.08306s
20:31 sa...@loft4633:/tmp 24 ./get 2 1 +RTS -N2
2 6.898871s
20:32 sa...@loft4633:/tmp 25 ./get 3 1
3 2.950677s
20:32 sa...@loft4633:/tmp 26 ./get 3 1 +RTS -N2
3 7.381678s
20:32 sa...@loft4633:/tmp 27 ./get 3 1 +RTS -N3
3 14.683548s
20:32 sa...@loft4633:/tmp 28 ./get 4 1
4 3.332165s
20:33 sa...@loft4633:/tmp 29 ./get 4 1 +RTS -N4 -s
./get 4 1 +RTS -N4 -s
4 57.17923s
   2,147,969,912 bytes allocated in the heap
  49,059,288 bytes copied during GC
 736,656 bytes maximum residency (98 sample(s))
 486,744 bytes maximum slop
   5 MB total memory in use (0 MB lost due to fragmentation)

  Generation 0:   949 collections,   948 parallel, 76.73s, 25.67s elapsed
  Generation 1:98 collections,98 parallel,  7.70s,  2.56s elapsed

  Parallel GC work balance: 2.17 (6115428 / 2822692, ideal 4)

MUT time (elapsed)   GC time  (elapsed)
  Task  0 (worker) :1.43s( 27.76s)   6.31s(  2.12s)
  Task  1 (worker) :0.00s( 28.13s)  10.62s(  3.56s)
  Task  2 (worker) :0.37s( 28.63s)  11.06s(  3.69s)
  Task  3 (worker) :0.00s( 28.95s)   6.29s(  2.10s)
  Task  4 (worker) :   20.73s( 28.95s)   9.68s(  3.24s)
  Task  5 (worker) :0.00s( 28.95s)   0.60s(  0.20s)
  Task  6 (worker) :   21.81s( 28.95s)  11.91s(  3.97s)
  Task  7 (worker) :   18.59s( 28.95s)  13.04s(  4.36s)
  Task  8 (worker) :   17.24s( 28.96s)  14.92s(  4.99s)

  SPARKS: 0 (0 converted, 0 pruned)

  INIT  time0.00s  (  0.00s elapsed)
  MUT   time   79.23s  ( 28.95s elapsed)
  GCtime   84.43s  ( 28.23s elapsed)
  EXIT  time0.00s  (  0.01s elapsed)
  Total time  162.49s  ( 57.19s elapsed)

  %GC time  52.0%  (49.4% elapsed)

  Alloc rate27,513,782 bytes per MUT second

  Productivity  48.0% of total user, 136.5% of total elapsed

gc_alloc_block_sync: 15006
whitehole_spin: 0
gen[0].steps[0].sync_large_objects: 7617
gen[0].steps[1].sync_large_objects: 35
gen[1].steps[0].sync_large_objects: 1400
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ADT patch/update

2010-08-07 Thread Sergey Mironov
Hi Cafe. I am searching for materials on one data type-related problem.
Suppose we have version control system storing values of user-defined algebraic
data type. 'User' (actually, programmer) wants to store his/her data and later
update it by applying patches.

By patch I mean value of some (another) type representing one simplest update
of stored value.

Say, for tree type

 data Tree a = Node (Tree a) (Tree a) | Leaf a

one may write

 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE UndecidableInstances #-}

 class Storable a where
 type Patch a :: *
 update :: Patch a - a - a

 data TreeStep = Left | Right -- Like in zippers ?
 type family Location a :: *
 type instance Location (Tree a) = [TreeStep]

 instance (Storable a) = Storable (Tree a) where
 type Patch (Tree a) = (Location (Tree a), Patch a)
 update = ... -- Move to specific location and call node's update

Patch here is coded explicitly but I guess there may be some generic way of it
to calculate. Whether any similar work has been carried out?
Will be glad to read comments!

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


Re: [Haskell-cafe] Music-related

2010-08-07 Thread Henning Thielemann


On Sat, 7 Aug 2010, Johann Bach wrote:


Midi files or music exported by the typical music editor is
expressionless. A *human* would play that music with slight tempo
variations, subtle accents... some notes would be overlapped in time
slightly, some separated in time. I want a program that starts with a
plain midi file, then via a domain-specific language lets me describe
nuances of expression.


In principle Haskore supports to annotate music with expression. You write 
expressions like crescendo, legato etc. and separately you write a Player 
that interprets those expressions. However Haskore has its own way to 
describe music, you would not start with MIDI files.


You may be also interested in the haskell-art mailing list:
   http://lists.lurk.org/mailman/listinfo/haskell-art
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ADT patch/update

2010-08-07 Thread Stephen Tetley
Maybe this paper is close?

Type-safe diff for families of datatypes
Eelco Lempsink Sean Leather Andres Löh
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-08-07 Thread Scott Michel
Whatever happened to the JVM backend for GHC? That might actually be a
relatively straightforward solution to the whole interface to Java
problem.

On Sun, Apr 18, 2010 at 11:42 PM, Don Stewart d...@galois.com wrote:

 liamoc:
  On 19 April 2010 05:29, Don Stewart d...@galois.com wrote:
   That's great info -- we do have an unregisterised ARM port of GHC in
   Debian, iirc. (And the LLVM backend can generate ARM code too)
 
 
  Sounds good. With regards to LLVM, what dependencies does LLVM ARM
  code have? Android has gnu libraries not llvm, i don't know if that is
  okay.
 
  A superior approach would be to compile haskell to Java or Dalvik
  bytecode (or even JVM bytecode if it doesn't use any JIT features;
  then we can compile that to dalvik bytecode), but this is obviously
  more work if we already have an ARM port.

 More work also in that you need to port the runtime system to Java...
 ___
 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] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-08-07 Thread Don Stewart

Only problem is rewriting the GHC runtime in Java... :-)

-- Don

scooter.phd:
 Whatever happened to the JVM backend for GHC? That might actually be a
 relatively straightforward solution to the whole interface to Java problem.
 
 On Sun, Apr 18, 2010 at 11:42 PM, Don Stewart d...@galois.com wrote:
 
 liamoc:
  On 19 April 2010 05:29, Don Stewart d...@galois.com wrote:
   That's great info -- we do have an unregisterised ARM port of GHC in
   Debian, iirc. (And the LLVM backend can generate ARM code too)
 
 
  Sounds good. With regards to LLVM, what dependencies does LLVM ARM
  code have? Android has gnu libraries not llvm, i don't know if that is
  okay.
 
  A superior approach would be to compile haskell to Java or Dalvik
  bytecode (or even JVM bytecode if it doesn't use any JIT features;
  then we can compile that to dalvik bytecode), but this is obviously
  more work if we already have an ARM port.
 
 More work also in that you need to port the runtime system to Java...
 ___
 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] Socket not released

2010-08-07 Thread Jonathan Geddes
Cafe,

I'm writing a network application that uses static configuration a la xmonad
and yi. When the app receives a certain command it  recompiles its source,
closes the socket it is using and runs its newly compiled predecessor as a
new process.

The problem I'm having is that the port that the parent process was using is
not available to the child process. Even though the parent process has
terminated, the port is unusable until the child process also terminates.
Can anyone give me a clue about what's going on here?

I'm using Network and System.Process modules and ruining on Ubuntu linux.
I'm using the sClose function to close the socket.

Thanks for any tips.

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


Re: [Haskell-cafe] Socket not released

2010-08-07 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/7/10 20:06 , Jonathan Geddes wrote:
 The problem I'm having is that the port that the parent process was using is
 not available to the child process. Even though the parent process has
 terminated, the port is unusable until the child process also terminates.

Are you certain of this part?  The usual problem with this kind of program
is that the system holds the socket open for a minute or so in case there
are any packets in flight for the connection (the lower level network
protocols not being 100% reliable).  And the workaround is to set
SO_REUSEADDR before binding the port; in Haskell,

 setSocketOption socket ReuseAddr 1

- -- 
brandon s. allbery [linux,solaris,freebsd,perl]  allb...@kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university  KF8NH
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxd96oACgkQIn7hlCsL25WySACfVmlN/01XGy4LORpdi+N9ZC+x
Rd8An2ccUuh7XWdh0krnf70t+kqYolOM
=dbL9
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-08-07 Thread Mathew de Detrich
Well the other issue is of course that Android being available on a wide
variety of phones, not all of which run ARM (the phone I am about to get for
example has a custom built CPU), although I guess one could use a generic
ASM branch for mobile devices (if one exists). btw the phone I am about to
receive is a Samsung Galaxy-S, which has a hummingbird chip (no idea what
Assembler Instruction set it uses, I believe its a closed chip)

In my opinion the most reliable approach would actually to produce the C
that wraps around NDK (for any code that could be possible) which would
obviously interface with the Java libraries. Probably the biggest bane of
Android is the fact that its able to run on almost all machines means that
there *would* be issues using LLVM to just produce code for the generic ARM.

Using the NDK + Java would mean any app written in Haskell would work on any
android device. Of course as mentioned above, there are issues with this.
Its a lot of work for one thing, and the GC for Java is probably not the
best suited for Haskell structured programs. Also iirc, in order to make
official Android apps which can go on the market place, you are basically
forced to use the Java API + NDK for any native code, and you have to use
the Java API to interface with the android GUI/World (you can't make an
proper Android app just using NDK which complicates things further). The GC
issue I guess could be solved by generating JVM code (instead of Java
code) which would give more freedom for GHC to generate code more suited
to Haskell

If this ever ended up happening, it does have the advantage that when one
would develop an app for Android using Haskell, GHC (or whatever compiler we
would use) can use NDK for as much code as possible and only resorting to
Java libraries when required which can of course equate to creating very
fast Android Apps using a productive language (Haskell)

As Don mentioned through, we need a java runtime for GHC.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-08-07 Thread Daniel Peebles
The Hummingbird is still ARM. ARM doesn't actually build any chips
themselves, and just license the architecture design out to people who do
make them. Most of the iPhone ARM chips are built by Samsung too.

Almost all the mobile devices I know of run ARM, so I think having a native
ARM generator would still be very beneficial. And if it isn't ARM on a
device, it's almost certainly going to be Intel, these days. Sure, Android
doesn't specify that this has to be the case, but realistically, it will be.

On Sun, Aug 8, 2010 at 3:08 AM, Mathew de Detrich dete...@gmail.com wrote:

 Well the other issue is of course that Android being available on a wide
 variety of phones, not all of which run ARM (the phone I am about to get for
 example has a custom built CPU), although I guess one could use a generic
 ASM branch for mobile devices (if one exists). btw the phone I am about to
 receive is a Samsung Galaxy-S, which has a hummingbird chip (no idea what
 Assembler Instruction set it uses, I believe its a closed chip)

 In my opinion the most reliable approach would actually to produce the C
 that wraps around NDK (for any code that could be possible) which would
 obviously interface with the Java libraries. Probably the biggest bane of
 Android is the fact that its able to run on almost all machines means that
 there *would* be issues using LLVM to just produce code for the generic ARM.

 Using the NDK + Java would mean any app written in Haskell would work on
 any android device. Of course as mentioned above, there are issues with
 this. Its a lot of work for one thing, and the GC for Java is probably not
 the best suited for Haskell structured programs. Also iirc, in order to make
 official Android apps which can go on the market place, you are basically
 forced to use the Java API + NDK for any native code, and you have to use
 the Java API to interface with the android GUI/World (you can't make an
 proper Android app just using NDK which complicates things further). The GC
 issue I guess could be solved by generating JVM code (instead of Java
 code) which would give more freedom for GHC to generate code more suited
 to Haskell

 If this ever ended up happening, it does have the advantage that when one
 would develop an app for Android using Haskell, GHC (or whatever compiler we
 would use) can use NDK for as much code as possible and only resorting to
 Java libraries when required which can of course equate to creating very
 fast Android Apps using a productive language (Haskell)

 As Don mentioned through, we need a java runtime for GHC.

 ___
 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] hdbc-mysql broken on snow-leopard?

2010-08-07 Thread Carter Schonwald

Hey All,
when i build hdbc-mysql and then try to run some example code, i get the 
following error message:


Loading package HDBC-mysql-0.6.3 ... can't load .so/.DLL for: 
mysqlclient (dlopen(libmysqlclient.dylib, 9): no suitable image found.  
Did find:

/usr/local/lib/libmysqlclient.dylib: mach-o, but wrong architecture)

does this mean that it won't build on OS X snow leopard?
(and yes, I am aware of hdbc-odbc, but i was curious if I could use 
hdbc-mysql

thanks
-Carter

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


Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-08-07 Thread Mathew de Detrich
Although I know that ARM basically has monopoly for chipsets on mobile
devices, that doesn't mean there couldn't be a chipset used that isn't ARM
and runs android (and what if that device happened to be really popular in
the future?)

The main issue however, as I mentioned before, is the fact that from what I
read on the Android site, proper Android apps (as in ones that you can get
through the market place), you are forced to use the Java API to interface
with android (and the NDK for native code generation if required). I believe
what people would want the option of creating proper Android apps

So it would just be a difference between using Java + ARM ASM (through LLVM
I suppose) or Java + NDK (through FFI??). The latter, actually being
supported by Google, is guaranteed to work on any android device, ARM or
not

The other option is we could just wait for someone to make an
Android backend through LLVM :), That of course is the last option, which
would also mean that any language that compiles down to LLVM would be able
to run on Android as well.

On Sun, Aug 8, 2010 at 1:14 AM, Daniel Peebles pumpkin...@gmail.com wrote:

 The Hummingbird is still ARM. ARM doesn't actually build any chips
 themselves, and just license the architecture design out to people who do
 make them. Most of the iPhone ARM chips are built by Samsung too.

 Almost all the mobile devices I know of run ARM, so I think having a native
 ARM generator would still be very beneficial. And if it isn't ARM on a
 device, it's almost certainly going to be Intel, these days. Sure, Android
 doesn't specify that this has to be the case, but realistically, it will be.

 On Sun, Aug 8, 2010 at 3:08 AM, Mathew de Detrich dete...@gmail.comwrote:

 Well the other issue is of course that Android being available on a wide
 variety of phones, not all of which run ARM (the phone I am about to get for
 example has a custom built CPU), although I guess one could use a generic
 ASM branch for mobile devices (if one exists). btw the phone I am about to
 receive is a Samsung Galaxy-S, which has a hummingbird chip (no idea what
 Assembler Instruction set it uses, I believe its a closed chip)

 In my opinion the most reliable approach would actually to produce the C
 that wraps around NDK (for any code that could be possible) which would
 obviously interface with the Java libraries. Probably the biggest bane of
 Android is the fact that its able to run on almost all machines means that
 there *would* be issues using LLVM to just produce code for the generic ARM.

 Using the NDK + Java would mean any app written in Haskell would work on
 any android device. Of course as mentioned above, there are issues with
 this. Its a lot of work for one thing, and the GC for Java is probably not
 the best suited for Haskell structured programs. Also iirc, in order to make
 official Android apps which can go on the market place, you are basically
 forced to use the Java API + NDK for any native code, and you have to use
 the Java API to interface with the android GUI/World (you can't make an
 proper Android app just using NDK which complicates things further). The GC
 issue I guess could be solved by generating JVM code (instead of Java
 code) which would give more freedom for GHC to generate code more suited
 to Haskell

 If this ever ended up happening, it does have the advantage that when one
 would develop an app for Android using Haskell, GHC (or whatever compiler we
 would use) can use NDK for as much code as possible and only resorting to
 Java libraries when required which can of course equate to creating very
 fast Android Apps using a productive language (Haskell)

 As Don mentioned through, we need a java runtime for GHC.

 ___
 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] lambdacats

2010-08-07 Thread ajb

G'day all.

Quoting Andrew Coppin andrewcop...@btinternet.com:


Heh. unsafePerformDoggeh# still amuses me...


I still have the original at full resolution of all the ones
I did (including unsafeDoggeh#), plus a couple that didn't make
it to the web site because they were deemed too obscure.

For your viewing pleasure:

http://andrew.bromage.org/pictures/eugenio.jpeg
http://andrew.bromage.org/pictures/phillip.jpeg

(And yes, I'm aware that there's one l in Philip Wadler.  I
think I was trying for a creative misspelling or something.)

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


Re: [Haskell-cafe] lambdacats

2010-08-07 Thread ajb

G'day all.

Quoting Dan Doel dan.d...@gmail.com:


Simon cat and Oleg cat are also missing, unfortunately.


http://andrew.bromage.org/pictures/simon.jpeg
http://andrew.bromage.org/pictures/oleg.jpeg

I can't remember if this one made it to the site or not:

http://andrew.bromage.org/pictures/dilimitd.jpeg

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


Re: [Haskell-cafe] Socket not released

2010-08-07 Thread Jonathan Geddes
Thank you for your response

 Are you certain of this part?  The usual problem with this kind of program
 is that the system holds the socket open for a minute or so in case there
 are any packets in flight for the connection (the lower level network
 protocols not being 100% reliable).

I'm not certain, but here's what I'm seeing. The process tries n times
to acquire the socket, pausing for a second or so between attempts.
While running a child process I will run a fresh process so that the
two processes are competing for the socket, but neither of them are
getting it. In half a dozen such test cases the fresh process grabs
the socket on the very next attempt after the child process is
interrupted. But if I interrupt the fresh process, the child process
continues to fail to acquire the socket.

And the workaround is to set
 SO_REUSEADDR before binding the port; in Haskell,
 setSocketOption socket ReuseAddr 1

I'm using the Network Module which sets ReuseAddr, according to its
documentation.

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


Re: [Haskell-cafe] lambdacats

2010-08-07 Thread Ivan Lazar Miljenovic
a...@spamcop.net writes:

 I can't remember if this one made it to the site or not:

 http://andrew.bromage.org/pictures/dilimitd.jpeg

Don't think it did; hooray, a new lambdacat!!!

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Socket not released

2010-08-07 Thread Donn Cave
Quoth Jonathan Geddes geddes.jonat...@gmail.com,

 ... but here's what I'm seeing. The process tries n times
 to acquire the socket, pausing for a second or so between attempts.
 While running a child process I will run a fresh process so that the
 two processes are competing for the socket, but neither of them are
 getting it. In half a dozen such test cases the fresh process grabs
 the socket on the very next attempt after the child process is
 interrupted. But if I interrupt the fresh process, the child process
 continues to fail to acquire the socket.

You need to close the parent's socket in the child fork, as well as
the parent - if it's inherited by the child, it's held open there,
even if the parent closes it.

Donn Cave, d...@avvanta.com

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