Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread Keith Wansbrough
[sorry if you receive this twice; mailing list problems] SCOTT J. wrote: Thanks for your assistance. I'm using now Notepad.exe . Before I did it in Wordpad. I use Windows XP. I'm trying to solve this nasty problem WordPad probably saved your file in RTF rather than TXT. Keep using Notepad

Re: [Haskell-cafe] Re: Strange HTTP module behavior [PATCH]

2005-02-21 Thread Keith Wansbrough
John Goerzen wrote: It turns out that Network.Socket.recv raises an EOF error when it gets back 0 bytes of data. As it should... recv(2) returns zero bytes precisely when it reaches EOF; this is the standard sockets-API EOF indicator. See any sockets tutorial. HTTP is expecting it to

Re: [Haskell-cafe]Re: Hugsvs GHC (again)was: Re: Somerandomnewbiequestions

2005-01-20 Thread Keith Wansbrough
read. I don't see the problem... (Okay, I can see that if select lies, and the read takes a long time you might miss the next scheduling timeslot - but as far as I am aware select doesn't lie, and read will return immediately if select says there is data ready)... select() _does_ lie for

Re: [Haskell-cafe] Re: I/O interface

2005-01-14 Thread Keith Wansbrough
are duplicated by fork(), but the open file descriptions (your file pointers) are shared. This is obvious by observing what happens when you write to the same fd in parent and child after a fork: you don't end up overwriting, you end up interleaving. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http

Re: [Haskell-cafe] Introducing me

2005-01-14 Thread Keith Wansbrough
Hi, my name is Fabian Otto. Welcome! Feel free to join in the discussion. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Signature of a function

2005-01-11 Thread Keith Wansbrough
Daniel Fischer writes: One might replace type signatures with comments, of course, and so convey better information, but that is more work, hence we poor ignorants will settle for signatures. You mean one might add comments _as well as_ type signatures, of course. The only thing worse than

Re: [Haskell-cafe] Named function fields vs. type classes

2004-12-13 Thread Keith Wansbrough
On the other hand, it's difficult or impossible to make a list of a bunch of different types of things that have nothing in common save being members of the class. I've recently been playing with making, for each class C, a interface datatype IC (appropriately universally and existentially

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

2004-12-07 Thread Keith Wansbrough
When I compile it I get three files, an actual runnable binary (at only 5M in size), a .o file and a .hi file. I'm sure these additional files are usefull in someway and as soon as I come across the right piece of documentation everything should make sense. But as a person new to

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

2004-12-06 Thread Keith Wansbrough
When I compile it I get three files, an actual runnable binary (at only 5M in size), a .o file and a .hi file. I'm sure these additional files are usefull in someway and as soon as I come across the right piece of documentation everything should make sense. But as a person new to the

Re: [Haskell-cafe] Mutable data design question

2004-12-06 Thread Keith Wansbrough
. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2004-12-06 Thread Keith Wansbrough
John Goerzen [EMAIL PROTECTED] wrote: On 2004-12-06, Keith Wansbrough [EMAIL PROTECTED] wrote: The static vs dynamic linking question has been discussed many times. The summary is: GHC is a highly-optimising compiler, and the binary interface _necessarily_ changes with every minor revision

Re: [Haskell-cafe] Top-level state debate on the wiki

2004-12-02 Thread Keith Wansbrough
Nice summary. What I think is missing is an explanation of when you would want this feature (and when you wouldn't, more importantly). Here is the kind of platonic dialogue that summarises my limited understanding: [..dialogue snipped..] This is good, and is the sort of thing that should

Re: [Haskell-cafe] Help!

2004-11-29 Thread Keith Wansbrough
on the GHC compiler. What does your teacher want you to do? Reply to the list, please, not to me only. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe

Re: [Haskell-cafe] Re: Pure Haskell Printf

2004-11-16 Thread Keith Wansbrough
for internationalization either, because word (and thus parameter) ordering may vary among languages. POSIX / SUS 2001 printf() supports positional arguments, like this: printf(%2$d %1$s\n,days of christmas,12); This is required for l10n, as you say.. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED

Re: [Haskell-cafe] One-shot? (was: Global variables and stuff)

2004-11-12 Thread Keith Wansbrough
So you say (and I do agree). But how can I *observe* that they are the same? Well, not with a single program run (obviously). But it is the case that for any program P and input sequence X (i.e., keys pressed): running P with X and running {foo = getChar; P'} with X (where P' is P with all

Re: [Haskell-cafe] One-shot? (was: Global variables and stuff)

2004-11-11 Thread Keith Wansbrough
Graham Klyne wrote: At 12:27 11/11/04 +, Ben Rudiak-Gould wrote: [..] going to be safe, because it's just not the case that x = once (newIORef ()) y = x has the same intended meaning as x = once (newIORef ()) y = once (newIORef ()) No amount of

Re: [Haskell-cafe] Sample rate inference

2004-11-11 Thread Keith Wansbrough
/hawiki/CircularProgramming for more examples of this pattern. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http

Re: [Haskell-cafe] Space efficiency problem

2004-11-10 Thread Keith Wansbrough
Hi, This may be silly, but I tried to code a simmulated annealing method to solve the travelling salesman prblem, by adapting the algorithm described in Numerical Recipes in C. Doesn't seem silly so far! :-) The problem is that there are so many iterations, that the program gets killed

[Haskell-cafe] Re: [Haskell] Re: Global Variables and IO initializers

2004-11-08 Thread Keith Wansbrough
[posted to haskell-cafe per SLPJ's request] Hi Adrian, I can assure you that for the intended applications of oneShot it is vital that realInit is executed once at most, but the user must [..] So please, no more handwaving arguments about this kind of thing being unnecessary, bad programming

Re: [Haskell-cafe] Re: [Haskell] Re: Global Variables and IO initializers

2004-11-08 Thread Keith Wansbrough
Adrian Hey writes: The problem is simple enough to restate for anyone who's interested. Provide a simple reliable mechanism to ensure that in a given program run one particular top level IO operation cannot be executed more than once. Can you give one concrete example of an intended

Re: [Haskell-cafe] different arities

2004-11-03 Thread Keith Wansbrough
Haskell (http://www.haskell.org/onlinereport/decls.html). The use of arity [..] BTW, what might the reason for that be, is it for the sake of ease of translation/implementation, or for the sake of some principle? I mean, as soon as a person realises that there are multiple syntaxes for

Re: [Haskell-cafe] Newbie Question on type constructors

2004-11-02 Thread Keith Wansbrough
/manual021.html#htoc99 --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Newbie Question on type constructors

2004-11-01 Thread Keith Wansbrough
Oh, I disagree with this point of view. Circle is certainly a value, i.e. a full-fledged function, as Brian Beckman correctly surmised. The Ben Rudiak-Gould wrote: Brian Beckman wrote: data Shape = Circle Float | Square Float I read this something along the

Re: [Haskell-cafe] Set of reals...?

2004-10-29 Thread Keith Wansbrough
arithmetic. ACM Computing Survey Volume 23 , Issue 1 (March 1991) Pages: 5 - 48. http://portal.acm.org/citation.cfm?id=103163 --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory

Re: [Haskell-cafe] Re: OCaml list sees abysmalLanguage Shootoutresults

2004-10-11 Thread Keith Wansbrough
This would also benefit string processing... Imagine: test = ++ This could be implented as two list cells, one for each string, anf the cost of the ++ becomes the same as the cost of : No, you still have to copy so you can change the tail pointer - but at least it's a

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootoutresults

2004-10-08 Thread Keith Wansbrough
Actually, I've been wondering about this. If my understanding is correct, Haskell lists are basicly singly-linked lists of cons cells (is that correct?) A simple (I think) thing to do would be to make the lists doubly-linked and circular. That would let us do nice things like have O(1)

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

2004-10-07 Thread Keith Wansbrough
. Count me as a vote for the better-but-slightly-slower wc. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http

Re: [Haskell-cafe] Can I determin the function name passed in?

2004-10-07 Thread Keith Wansbrough
I'm an utter noob to Haskell, and FP in gnereal. I would like to create a function taking an argument which is a function (actually an equation taking no args, but dependent on other equations), which prints the name of the function and and it's result. Is there a way of doing this in

Re: [Haskell-cafe] Exceptions

2004-10-05 Thread Keith Wansbrough
[+RTS -xc] A major problem with this that I notice is that it dumps the stack whenever any exception is raised, which is a big pain if your program does IO and regularly raises and catches exceptions as part of normal operation. A big improvement would be to only dump the backtrace if the

[Haskell-cafe] OCaml list sees abysmal Language Shootout results

2004-09-28 Thread Keith Wansbrough
I just saw this on the OCaml list (in a posting by Rafael 'Dido' Sevilla [EMAIL PROTECTED] in the Observations on OCaml vs. Haskell thread). I can't believe that a simple wc implementation should be 570 times slower in Haskell than OCaml - could someone investigate and fix the test? --KW 8-)

Re: [Haskell-cafe] closed classes [was: Re: exceptions vs. Either]

2004-08-12 Thread Keith Wansbrough
Just wondering, but what exacly is the problem with this open/closed stuff? As far as I understand it new instances can be added to classes in Haskell (because they are open)... But its not like instances can be added at link time, and all the instances that you wish to be considered _must_ be

Re: [Haskell-cafe] Re: exceptions vs. Either

2004-08-06 Thread Keith Wansbrough
After all, Java basically does exactly what you're asking for with Java's head/tail would be doing runtime checks if they are throwing exceptions, static guarantees mean the program would not be allowed to compile if it broke the static guarantees. Not so. In Java, the programmer is forced

Re: [Haskell-cafe] Re: exceptions vs. Either

2004-08-06 Thread Keith Wansbrough
correctly sorted lists under _all_ circunstances. This type signature is much simpler than the actual sort - hence is useful. sort :: (HList l,HOrderedList l') = l - l' Nice and readable, and much simpler than the actual algorithm (be it bubble sort, or a quick sort) The type

Re: [Haskell-cafe] exceptions vs. Either

2004-08-03 Thread Keith Wansbrough
Exceptions should only really be used for unpredictcable events, I find that the defintion of functions like head is lacking rigor... I would prefer to see: head :: [a] - Maybe a head (a0:_) = Just a0 head _ = Nothing In principle, yes, but in practice, that would be silly. You use head

Re: [Haskell-cafe] Newbie questions

2004-07-02 Thread Keith Wansbrough
just this. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] WildCard question

2004-04-14 Thread Keith Wansbrough
Jon Fairbairn [EMAIL PROTECTED] writes: On 2004-04-13 at 18:52+0200 Ketil Malde wrote: Paul Cosby [EMAIL PROTECTED] writes: Every time I try to use [underscore] in an definition it says something like the symbol /017 is not recognised Could that be \017, i.e. octal 17 (defined in

Re: [Haskell-cafe] How to implement `amb' operator?

2004-04-07 Thread Keith Wansbrough
-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Context for type parameters of type constructors

2004-03-30 Thread Keith Wansbrough
them. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] HToolkit HSQL on Windows/GHC

2004-03-29 Thread Keith Wansbrough
upbringing. No need even to use a file; just have it output to a pipe and read directly from the pipe... --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Dividing integers?

2004-03-18 Thread Keith Wansbrough
Hello there! Although you might not believe it since I'm going to ask a very very very basic question, I have been using Haskell for educational purposes for a couple semesters now. Nevertheless, I don't think I have ever worked with non-Int number types! :) I don't understand why I get

Re: [Haskell-cafe] 2-CNF Sat algorithm/haskell code

2004-03-17 Thread Keith Wansbrough
Dear Haskellers, Today I searched over more than an hour on the web to find an implementation of an algorithm that was first written in the 1970's that solves 2-Conjuntive Normal Form logical sentences in polynomial time. I don't recall the exact algorithm, but here are some observations:

Re: [Haskell-cafe] Template Haskell question?

2004-02-11 Thread Keith Wansbrough
I have written a small TH application (module THRecord) which creates update functions for records. It is intended to be used like this: You should probably ask on the Template Haskell mailing list: http://www.haskell.org/mailman/listinfo/template-haskell --KW 8-) -- Keith Wansbrough [EMAIL

Re: [Haskell-cafe] Converting String

2004-01-26 Thread Keith Wansbrough
/tutorial/ http://www.haskell.org/tutorial/io.html http://www.haskell.org/learning.html Also http://www.haskell.org/hawiki/ThatAnnoyingIoType http://www.haskell.org/hawiki/UsingIo http://www.haskell.org/hawiki/UsingMonads --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk

Re: pet project - 7 Millennium Prize problemss

2004-01-09 Thread Keith Wansbrough
Conjecture 2. Hodge Conjecture 3. Navier-Stokes Equations 4. P vs NP 5. Poincare Conjecture 6. Riemann Hypothesis 7. Yang-Mills Theory Any ideas how to solve any of these, with Haskell or otherwise? --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University

Re: Type checking

2004-01-09 Thread Keith Wansbrough
http://www.haskell.org/hawiki/HomeworkHelp --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman

Re: Beta Reduction, undefined vs Type Classes

2003-11-10 Thread Keith Wansbrough
numbers. This makes life simpler when using Haskell as a calculator. HTH. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED

Re: Another fold question

2003-11-06 Thread Keith Wansbrough
, and the second argument corresponds to the second line of the definition. Now go and do the same for Music. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe

Re: Another fold question

2003-11-06 Thread Keith Wansbrough
[replying to self, oops] getNotes n@(Note _ _ _) = [n] [..] But of course every function of this form *is a fold* and can be written as such. Oops, I didn't look closely enough at this line. As written, this *isn't* a fold because it examines the item (Note _ _ _ :: Music) directly

Re: Another Newbie question :)

2003-11-05 Thread Keith Wansbrough
I seem to understand the basic idea behind the fold function, i think but do not seem to be able to write them myself. My understanding is that it works by replacing every constructor with a fold ? I think you mean replaces every constructor with a function or constant. Think of a list

Re: Another Newbie question :)

2003-11-05 Thread Keith Wansbrough
Think of a list [1,2,3]. Recall this is syntactic sugar (abbreviation) for 1:(2:(3:[])). That looks like FYI, I've just added my answer to your question to the Haskell Wiki, at http://www.haskell.org/hawiki/WhatIsaFold Enjoy! --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http

Re: how is Haskell pronounced?

2003-10-06 Thread Keith Wansbrough
on the first, as in rascal or tattle. I feel silly telling people what a great language it is, when I can't even pronounce its name... :) For me it rhymes with tattle - technically, the second vowel is a schwa. Stress is on the first syllable. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http

Re: lexer puzzle

2003-09-26 Thread Keith Wansbrough
to allow * as well. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: lexer puzzle

2003-09-26 Thread Keith Wansbrough
Keith Wansbrough [EMAIL PROTECTED] writes: And I don't think - is part of the language - it only appears in the type syntax, not term syntax. If you allow it, you have to allow * as well. Errm, you just gave an example of - in the term syntax... (\x - x*x) 3 Guilty... sorry

Re: Database interface - would like advice on oracle library bind ing

2003-09-24 Thread Keith Wansbrough
too dumb, but how do you return _|_ ? Return undefined or better, error Erroneously demanded bottom result of buffer allocation phase Note that undefined :: a undefined = undefined error :: String - a {- defined internally -} HTH. --KW 8-) -- Keith Wansbrough [EMAIL

Re: Tuples or Record

2003-08-18 Thread Keith Wansbrough
Hello, When I have started my project, I use a Tuples but i would know if it is possible to create a record such C or Ocaml provide. I mean creating a structure where variables are accessible by a '.' or something like that. Yes. Like this: data Tree a = Node { key :: Int,

Re: IO Bool - Bool

2003-08-14 Thread Keith Wansbrough
find it useful to peruse (although you should certainly continue to ask questions here too - we're a pretty friendly bunch!). Best wishes, --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory

Re: CSV parser, quotes?

2003-07-31 Thread Keith Wansbrough
In attempting to improve the CSV parser based on comments, I have the following code that's attached. I'm having a heck of a time getting the double quotes = an escaped quote thing to work. There is some commented out code which was my last attempt. As it stands the code works, minus the

Re: Parsing CSV files

2003-07-29 Thread Keith Wansbrough
quote character. That is, the strings This is a quoted string Koln appear in a CSV file as This is a quoted string Koln Also, be sure to support newlines within quoted strings (I think you do already). Many CSV parsers fail to do this, with nasty results. --KW 8-) -- Keith Wansbrough

Re: compiling concurrent haskell with ghc

2003-07-28 Thread Keith Wansbrough
Hi all, I have a question on compiling a concurrent haskell source code using GHC. Today is my first time playing around with concurrency in Haskell, and this afternoon, GHC seemed to be able to compile my code and produced an executable. However, that executable did not seem to run the

Re: Type classes and code generation

2003-06-17 Thread Keith Wansbrough
that this is *not* the same as existential quantification; note carefully the location of the forall wrt the constructor. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing

Re: shortest path with Haskell

2003-03-25 Thread Keith Wansbrough
suggest you ask your instructor/lecturer, or consult your textbook. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http

Re: a monadic if or case?

2003-02-13 Thread Keith Wansbrough
, 1997, LATOS - A Lightweight Animation Tool for Operational Semantics] http://www.eecs.usma.edu/Personnel/okasaki/pubs.html#hw02 [Chris Okasaki, Haskell Workshop 2002, Techniques for embedding postfix languages in Haskell] Enjoy! --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http

Re: Parsing date and time specifications

2003-01-03 Thread Keith Wansbrough
a look at remind for a language that can express all these things, *and* knows the date of Easter. http://www.linuxjournal.com/article.php?sid=3529 http://www.roaringpenguin.com/remind/ Not suggesting we copy this directly, of course!! --KW 8-) PS: Happy New Year, everyone! -- Keith

Re: Haskell run-time tutorial

2002-12-16 Thread Keith Wansbrough
! The Haskell Wiki lives at http://www.haskell.org/wiki/wiki and you probably want to put the article under LessFrequentlyAskedQuestions. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory

Re: Monads [beginner]

2002-12-13 Thread Keith Wansbrough
add your nuggets of wisdom to the Wiki whenever you write a detailed answer to the email list. This way we can build up a repository of answers to FAQs very easily. Thanks! --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer

Re: A question

2002-07-23 Thread Keith Wansbrough
are written in C++, no one is written in C. If I want to write haskell bindings for such a thing, what can I do? Go to www.haskell.org, and look at Libraries and Tools. There you will see HOpenGL, which is just what you seek. http://haskell.org/HOpenGL/ HTH! --KW 8-) -- Keith Wansbrough

Re: some algorithms are hard to code in O(n) in Haskell

2002-04-29 Thread Keith Wansbrough
does anybody know how to do a term unification in Haskell in O(n), where n is length of the input terms? I know Montanari-Martelli algorithm for this, but I'm unable to code it in Haskell (in O(n)). I would need a destructive update of the directed graph representing terms (to do a

Re: Ground Up

2002-02-28 Thread Keith Wansbrough
Jerry writes: While my goals are: * Become a pragmatic haskell programmer in the shortest time * At the minimal expense What I have done for the past few weeks were: * I read almost all the free educational sources at www.haskell.org, * Subscribed to this mailing list and try to digest

Re: Why no exceptions in Haskell?

2001-11-22 Thread Keith Wansbrough
Hello *, I am just curious: Why does Haskell not provide exceptions a la SML? Why does only the IO monad allow for exceptions? GHC certainly implements exceptions, along the lines described in A semantics for imprecise exceptions, Simon Peyton Jones, Alastair Reid, Tony Hoare, Simon

Re: [off-topic] LaTex for [[ ... ]]

2001-06-01 Thread Keith Wansbrough
the Latex companion, but it's not listed there AFAICT.) \newcommand{\lsem}{[\![} \newcommand{\rsem}{]\!]} is what I use; there are some real ones in \usepackage{stmaryrd} if you really want them. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ Cambridge University

Re: Macros[by implementor of toy compiler]

2001-05-08 Thread Keith Wansbrough
2. Macros make the parsed grammar dynamic. Usually compiler has hard-coded parser generated by LALR parser generator(like Happy or Yacc) compiled in. Introducing each macro like you proposed would need(I think) generating new parser(at least for the fragment of the grammar). Dylan has macros

Re: Macros (Was: Interesting: Lisp as a competitive advantage)

2001-05-04 Thread Keith Wansbrough
Jerzy Karczmarczuk [EMAIL PROTECTED] writes: Macros in Scheme are used to unfold n-ary control structures such as COND into a hierarchy of IFs, etc. Nothing (in principle) to do with laziness or HO functions. Isn't this exactly the reason that macros are less necessary in lazy languages? In

Re: Patterns Catalog

2000-09-25 Thread Keith Wansbrough
ms Please, everyone (not just Chris) fill in the relevant pages with discussion of what the various patterns are, and add new ones of interest. Let's see if we can get a book together like the Design Patterns crowd... --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/u

Re: read from URL

2000-09-25 Thread Keith Wansbrough
e doesn't work). HTH. --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ Cambridge University Computer Laboratory.