Re: Running out of memory in a simple monad
Simon Marlow [EMAIL PROTECTED] writes: Also, GHCi retains CAFs in the same way as Hugs, the difference is that GHCi can be configured to throw away the results after evaluation (:set +r). If I set this flag, does GHCi discard CAFs during evaluation or at the end of evaluation? Or, to put it another way, do classic examples like module Main(main,primes) where main = print primes primes = ... leak space? -- Alastair ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
RE: Running out of memory in a simple monad
Simon Marlow [EMAIL PROTECTED] writes: Also, GHCi retains CAFs in the same way as Hugs, the difference is that GHCi can be configured to throw away the results after evaluation (:set +r). If I set this flag, does GHCi discard CAFs during evaluation or at the end of evaluation? Or, to put it another way, do classic examples like module Main(main,primes) where main = print primes primes = ... leak space? Actually CAF reverting only applies to CAFs in compiled code at the moment, and it happens after evaluation, not during it. The primes example will leak in GHCi (not in plain GHC, though). I guess the right thing to do is to revert them as soon as they're found to be unreferenced, but that's hard - the compiler's symbol table refers to all the top-level bindings, so it would probably have to use weak pointers. The CAF reverting feature was added mainly so that you can recover from doing hGetContents on stdout. Cheers, Simon ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
PADL 2003: call for participation
PADL'03: Second Call for Participation o PADL Registration Deadline is fast approaching (Dec 20th). Please register electronically asap. o Please also note that the special conference rate for the hotel is available only until Dec. 23rd. o Highlights of the conference: 25 contributed papers and invited talks by Gerard Huet, David Page, and Shriram Krishnamurthi o Special rates for ACM and ALP members. PADL 2003 Program. Monday 13 January 2003 9.00-10.00 (I) invited talk David Page, The Role of Declarative Languages in Mining Biological Databases. 10.00-10.30 break 10.30-12.00 (II) session (3 papers) Data mining the yeast genome in a lazy functional language, Amanda Clare and Ross D. King Non-monotonic Reasoning on Beowulf Platforms, E. Pontelli, M. Balduccini, F. Bermudez Datalog with Constraints: A Foundation for Trust Management Languages, Ninghui Li, John C. Mitchell 12.00-1.30 lunch 1.30-2.30 (III) invited talk Shriram Krishnamurthi, The Continue Server (or, How I Administered PADL 2002 and 2003) 2.30-3.00 break 3.00-4.00 (IV) session (2 papers) Web Programming with SMLserver, Martin Elsman and Niels Hallenberg An Integrated Information System powered by Prolog, Antonio Porto 4.00-4.30 break 4.30-6.00 (V) session (3 papers) JMatch: Iterable Abstract Pattern Matching for Java, Jed Liu, Andrew C. Myers Sequence Quantification, Peter Schachte Roll: A language for specifying die-rolls, Torben Mogensen Tuesday 14 January 2003 9.00-10.00 (VI) invited talk Gerard Huet, Zen and the Art of Symbolic Computing: Light and Fast Applicative Algorithms for Computational Linguistics. 10.00-10.30 break 10.30-12.00 (VII) parallel session (3 papers and 3 papers) Parallel session (a) Reconstructing the Evolutionary History of Indo-European Languages using Answer Set Programming., Esra Erdem, Vladimir Lifschitz, Luay Nakhleh, and Donald Ringe Multi-Agent Reactive Systems, Prahladavaradan Sampath ACTILOG: An Agent Activation Language, Jacinto A. Davila Parallel session (b) Logic Programs for Querying Inconsistent Databases, Pablo Barcelo and Leopoldo Bertossi A CLP-Based Tool for Computer Aided Generation and Solving of Maths Exercises, Ana Paula Tomas, Jose Paulo Leal A Logical Framework for Modelling eMAS, Pierangelo Dell'Acqua and Luis Moniz Pereira 12.00-1.30 lunch 1.30-2.30 (VIII) session (2 papers) SXSLT: Manipulation Language for XML, Oleg Kiselyov, Shriram Krishnamurthi Type-based XML Processing in Logic Programming, Jorge Coelho and Mario Florido 2.30-3.00 break 3.00-4.00 (IX) parallel session (2 papers and 2 papers) Parallel session (a) WAM Local Analysis, Michel Ferreira, Luis Damas Garbage Collection Algorithms for Java--Based Prolog Engines, Qinan Zhou, Paul Tarau Parallel session (b) Solving Combinatorial Problems with a Constraint Functional Logic Language, Antonio J. Fernandez, Teresa Hortala-Gonzalez and Fernando Saenz-Perez Logic Programs as Compact Denotations, Patricia M. Hill and Fausto Spoto 4.00-4.30 break 4.30-6.00 (X) session (3 papers) A Strafunski Application Letter, Ralf Laemmel and Joost Visser Functional Hybrid Modelling, Henrik Nilsson, John Peterson, Paul Hudak Lambda Goes to Hollywood, Victor M. Gulias, Juan J. Sanchez, Carlos Abalde ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
CfP: Workshop on Security Issues in Coordination Models, Languages and Systems
== 1st International Workshop on Security Issues in Coordination Models, Languages and Systems (SecCo 2003) June 28-29, 2003, Eindhoven, the Netherlands Workshop affiliated to ICALP 2003, June 30 - July 4, 2003 http://cs.unibo.it/secco03 == SCOPE AND TOPICS New networking technologies are calling for the definition of models and languages adequate for the design and management of new classes of applications. Innovations are moving towards two directions: on the one hand, the Internet which supports wide area applications, on the other hand, smaller networks of mobile and portable devices which support applications based on a dynamically reconfigurable communication structure. In both the cases, the challenge is to develop applications while there is at design time no knowledge of involved entities. Coordination models and languages, which advocate a distinct separation between the internal behaviour of the entities and their interaction, represent a promising approach. However, due to the openness of these systems, new critical aspects come into play, such as the need to deal with malicious components or with a hostile environment. Current research on network security issues (e.g. secrecy, authentication, etc.) usually focuses on opening cryptographic tunnels between fully trusted entities. For this to work the structure of the system must be known beforehand. Therefore, the proposed solutions in this area are not always exploitable in this new scenario. The aim of the workshop is to cover the gap between the security and the coordination communities. More precisely, we intend to promote the exchange of ideas, focus on common interests, gain in understanding/deepening of central research questions, etc. Topics of interest include, but are not limited to: o Theoretical foundations, specification, analysis, case-studies, applications for authentication coordination models integrity open-distributed systems privacy mobile ad-hoc networks confidentiality agent-based infrastructures access control -in- peer-to-peer systems denial of service global computing service availability context-aware computing safety aspects component-based systems fault tolerance ubiquitous computing SUBMISSION GUIDELINES Submissions may be of two forms: o Short abstracts: up to 5 pages 11 pt, o Full papers: up to 12 pages 12 pt. They should be sent as PS or PDF to: [EMAIL PROTECTED] The workshop proceedings will be published in the ENTCS series (Electronic Notes in Theoretical Computer Science) and full versions of selected papers will be likely invited for publication in a special issue of Science of Computer Programming (Elsevier). IMPORTANT DATES April 27, 2003: Submission deadline June 2, 2003: Notification of acceptance June13, 2003: Pre-Final version June 28-29, 2003: Meeting date July31, 2003: Final version WORKSHOP ORGANIZERS o Riccardo Focardi Dipartimento di Informatica Universita` Ca' Foscari di Venezia Via Torino, 155 I-30172 Mestre (Ve), Italy E-mail: [EMAIL PROTECTED] Web: http://www.dsi.unive.it/~focardi o Gianluigi Zavattaro Dipartimento di Scienze dell'Informazione Universita` degli Studi di Bologna Mura A. Zamboni, 7 I-40127 Bologna (BO), Italy E-mail: [EMAIL PROTECTED] Web: http://cs.unibo.it/~zavattar PROGRAM COMMITTEE Frank de Boer (Utrecht University, The Netherlands) Giuseppe Castagna (Ecole normale superieure - ENS, France) Riccardo Focardi (University of Venezia, Italy) - Co-Chair Cedric Fournet (Microsoft Research Cambridge, UK) Heiko Mantel (DFKI, Germany) Antony Rowstron (Microsoft Research Cambridge, UK) David Sands (Chalmers University, Sweden) Steve Schneider (Royal Holloway, University of London, UK) Jan Vitek (Purdue University, USA) Gianluigi Zavattaro (University of Bologna, Italy) - Co-Chair ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
IO confusion
Hi all, With Foo in the file c.out and the module \begin{code} module Main (main) where import IO (openFile, hGetContents, hClose, IOMode(ReadMode)) import System (getArgs) import Monad (when) main :: IO () main = do [x] - getArgs let you_want_it_to_work = read x cout - openFile c.out ReadMode s - hGetContents cout putStrLn when you_want_it_to_work $ putStrLn $ Got this: ++ s putStrLn hClose cout putStrLn $ The answer is: ++ s \end{code} I expected The answer is: Foo to be printed whether the argument was True or False. When it is False, however, GHC (5.02.2, 5.04 and recent CVS HEAD) think s is the empty string and nhc98 (1.10 and a 1.11 from about a year ago) produces a binary that segfaults. At first I thought it was a GHC bug, but now nhc98 also exhibits it I am wondering if it is a bug in my understanding? Thanks Ian ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
RE: IO confusion
With Foo in the file c.out and the module \begin{code} module Main (main) where import IO (openFile, hGetContents, hClose, IOMode(ReadMode)) import System (getArgs) import Monad (when) main :: IO () main = do [x] - getArgs let you_want_it_to_work = read x cout - openFile c.out ReadMode s - hGetContents cout putStrLn when you_want_it_to_work $ putStrLn $ Got this: ++ s putStrLn hClose cout putStrLn $ The answer is: ++ s \end{code} I expected The answer is: Foo to be printed whether the argument was True or False. When it is False, however, GHC (5.02.2, 5.04 and recent CVS HEAD) think s is the empty string and nhc98 (1.10 and a 1.11 from about a year ago) produces a binary that segfaults. At first I thought it was a GHC bug, but now nhc98 also exhibits it I am wondering if it is a bug in my understanding? Lazy I/O strikes again :-) When the argument is True, you should get Got this: Foo The answer is: Foo and when the argument is False, one possible correct output is: The answer is: which GHC (5.04.2 and CVS HEAD) does indeed produce. Another correct output would be The answer is: Foo in fact, any prefix of Foo, including the empty string, would be correct. See section 21.2.2 in the (revised) Haskell 98 report. Cheers, Simon ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: IO confusion
On Wed, Dec 18, 2002 at 02:51:48PM -, Simon Marlow wrote: in fact, any prefix of Foo, including the empty string, would be correct. See section 21.2.2 in the (revised) Haskell 98 report. Aha, thanks. I've kludged around it with last (' ':s) `seq` hClose cout Ian ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
The Fun of Programming (fwd)
I got this on the Types Forum, but thought people here might find it of interest, too. [- The Types Forum, http://www.cis.upenn.edu/~bcpierce/types -] Dear colleagues: We would like to advertise the following symposium, and are pleased to invite you to participate. We apologize if you receive multiple copies of this announcement. Jeremy and Oege * THE FUN OF PROGRAMMING A symposium in honour of Professor Richard Bird's 60th birthday Examination Schools, Oxford 24th and 25th March 2003 Professor Richard Bird is well known for his contributions to functional programming: for his two textbooks, his Functional Pearls column in the Journal of Functional Programming, his work on synthesizing programs from specifications, his influence in the design of the language Haskell and its predecessors, and so on. This symposium is to celebrate Richard Bird's work on the occasion of his sixtieth birthday. The symposium will coincide with the publication by Palgrave of an eponymous book. This book is intended as much as a textbook for an advanced course in functional programming as it is a festschrift; its twelve chapters cover applications (pretty printing, musical composition, hardware description, graphical design) and techniques (the design of efficient data structures, interpreters for little languages, program testing and optimization) in functional programming. The contributors to the book will give short lectures at the symposium, and every participant at the symposium will receive a copy of the book. The symposium will take place from 10.30am on Monday 24th March 2003 to 4pm on Tuesday 25th, in Oxford's historical Examination Schools. The registration fee includes participation, buffet lunch and tea and coffee on both days, a formal dinner on the Monday night in Worcester College, and a copy of the book. There is a lower price for early registration; the capacity of the lecture room is limited and offered on a first-come first-served basis, so early registration is recommended. The speakers are as follows: Chris Okasaki (West Point) John Hughes (Chalmers) Jeremy Gibbons (Oxford) Paul Hudak (Yale) Oege de Moor (Oxford) Simon Peyton Jones (Microsoft) Conal Elliott Mary Sheeran (Chalmers) Mike Spivey (Oxford) Ross Paterson (City) Philip Wadler (Avaya) Ralf Hinze (Bonn) For further details, including registration information, see the website at http://www.comlab.ox.ac.uk/oucl/research/areas/ap/fop/ In particular, there is an early registration deadline (with reduced fee) of 7th February 2003, and a late registration deadline of 7th March. Jeremy Gibbons and Oege de Moor (organizers) -- [EMAIL PROTECTED] Oxford University Computing Laboratory,TEL: +44 1865 283508 Wolfson Building, Parks Road, FAX: +44 1865 273839 Oxford OX1 3QD, UK. URL: http://www.comlab.ox.ac.uk/oucl/people/jeremy.gibbons.html ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Random
Mark Carroll [EMAIL PROTECTED] writes: On 17 Dec 2002, Ketil Z. Malde wrote: Ah - I was never sure what to make of that - I normally just use the GHC online Haddockised stuff which tells me no more than the type signatures, but I suppose split must be more than (\x-(x,x))! Well, as SPJ said, you can browse the library report. Basically, it splits a random generator, so that you can pass it to a function and forget about it. -kzm -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Library for concurrent threads running
I am also not quite sure of your motivation! The current version of GpH is (or can be with very little difficulty) implemented using library calls. There is really no language extension per se, rather there are calls to tightly-coupled C code, plus a set of high level libraries to provide structure (evaluation strategies). There are, of course, modifications to the RTS to support proper scheduling, communications etc. , but these are necessary for a properly integrated high-level approach. If you want a low-level approach, one of the MPI libraries for Haskell may suit you better? Kevin At 7:16 pm +0100 16/12/02, Christian Sievers wrote: Dusan Kolar asked: My question/wish is maybe naive, but anyway: Is there a library (not a language extension, like Concurrent Haskell, Glasgow Parallel Haskell, ...) enabling to run two functions in parallel, possibly in cascade? I think the best you can get without language extensions is what is described in Koen Claessen's Functional Pearl A Poor Man's Concurrency Monad. It's really nice, but not exactly what you seem to want. You can get that article from http://www.cs.chalmers.se/~koen/publications.html All the best Christian Sievers ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe