On Sun, 2007-08-26 at 14:50 +0200, manu wrote:
> Hello,
>
> After reading Peter Norvig's take on writing a Sudoku solver (http://
> norvig.com/sudoku.html)
> I decided that I would port his program to Haskell, without changing
> the algorithm, that'll make a nice exercise I thought
> and should
On Mon, 2007-08-27 at 16:29 +0200, Peter Verswyvelen wrote:
> A while ago I confused "currying" with "partial application", which was
> pointed out by members of this community, and the wiki pages got adapted
> so that newbies like me don't make the same mistake twice ;) That's great.
>
> Anyway
On Mon, 2007-08-27 at 17:56 +0200, Peter Verswyvelen wrote:
> > Look at Template Haskell.
> > "Intuitively Template Haskell provides new language features that
> > allow us to convert back and forth between concrete syntax, i.e. what
>
> Gee coming from C++ that was the last thing I expected "temp
On Thu, 2007-08-30 at 11:34 +0800, Hugh Perkins wrote:
> On 8/26/07, Peter Verswyvelen <[EMAIL PROTECTED]> wrote:
> > Game developers are really struggling to get performance out of the
> > Playstation 3 console. This console has a single PowerPC CPU with 6 Cell SPU
> > coprocessors, all running at
On Thu, 2007-08-30 at 18:17 +0200, Peter Hercek wrote:
> Hi,
>
> I find the feature that the construct "let x = f x in expr"
> assigns fixed point of f to x annoying. The reason is that
> I can not simply chain mofifications a variable like e.g. this:
>
> f x =
>let x = x * scale in
>
On Thu, 2007-08-30 at 23:58 +0200, [EMAIL PROTECTED]
wrote:
> Dan Piponi writes:
>
> >> In mathematics, if you write "x = f y" you mean that these two
> >> expressions are equal. In Haskell, if you say "x = f y" you mean *make*
> >> then equal!
>
>
> > Haskell is a declarative language, not an
On Sun, 2007-09-02 at 22:52 +0800, Hugh Perkins wrote:
> Sooo.. what is the modern equivalent of Prolog?
Because no one has said it quite this way:
The modern equivalent of Prolog is Prolog.
Most of the advancement in logic programming has either been folded back
into Prolog or has been advanced
On Mon, 2007-09-03 at 14:57 +0200, Henning Thielemann wrote:
> In the current Haskell Wiki (haskell.org/haskellwiki) I found references
> to articles of the old Hawiki (haskell.org/hawiki), like OnceAndOnlyOnce
> and SeparationOfConcerns. Are the files still available somewhere?
Bring back HaWiki!
On Mon, 2007-09-03 at 19:47 +0200, Lars Oppermann wrote:
> Dear all,
>
> In the Haskell Wiki at http://www.haskell.org/haskellwiki/Closure
> there is an example for a function returning a closure given as
> f x = (\y -> x + y)
>
> Another way to achieve the same effect would be to write
> f'
On Mon, 2007-09-03 at 20:44 +0200, Lars Oppermann wrote:
> Ah, thanks...
>
> However, I think I have just become more confused as to what makes a
> closure a closure. The defining principle seems to go along the lines
> some kind of context that is enclosed within the closure object. It
> was argu
On Mon, 2007-09-03 at 15:35 -0400, Andrew Wagner wrote:
> I've been reading the classic "Why functional programming matters"
> paper [1] lately, particularly looking at the alpha beta stuff. I've
> ported all his code to haskell, but I have a question.
>
> His algorithm takes a board position, cre
On Mon, 2007-09-03 at 21:56 +0200, Henning Thielemann wrote:
> On Tue, 4 Sep 2007, Donald Bruce Stewart wrote:
>
> > lemming:
> > >
> > > ... and there was unfortunately no support in porting the stuff. I guess
> > > some simple program (perl -p -e 's/{{{//g' :-) could have simplified
> > > a lot.
On Tue, 2007-09-04 at 09:38 +1200, Daniel McAllansmith wrote:
> On Tuesday 04 September 2007 08:29, Neil Mitchell wrote:
> > Hi
> >
> > There are two entirely separate issues in this thread - let's not confuse
> > them.
> >
> > 1) The old HaWiki content is good and unavailable. I want it made
> > a
On Mon, 2007-09-03 at 23:50 +0200, Henning Thielemann wrote:
> On Mon, 3 Sep 2007, Derek Elkins wrote:
>
> > The issue is that we don't know what the "license" is for the -content-
> > of HaWiki. HaskellWiki explicitly states that all the content in it has
>
On Wed, 2007-09-05 at 13:21 +1000, Thomas Conway wrote:
> On 9/2/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
> >
> > > One of standard exercices in Prolog is the construction of the
> > > meta-interpreter of Prolog in Prolog. While this is cheating, I recommend
> > > it to you. It opens eyes.
> >
On Sat, 2007-09-08 at 12:24 +1000, Stuart Cook wrote:
> On 9/8/07, Ryan Ingram <[EMAIL PROTECTED]> wrote:
> > This does what you want, I think:
> >
> > {-# LANGUAGE ExistentialQuantification #-}
> > module Exist where
> >
> > data Showable = forall a. (Show a) => Showable a
> > instance Show Showab
On Sun, 2007-09-09 at 15:09 +0200, Peter Verswyvelen wrote:
> > Why? What is your application? In fact, alphanumeric identifiers are
> > used as unary operators.
> Why? Well, why are binary operators allowed and unary operators not?
> Isn't that some kind of discrimination? In math, many many ope
On Mon, 2007-09-10 at 00:49 +0100, Neil Mitchell wrote:
> Hi
>
> > > (Some list operations are too expensive with ByteString but for most
> > > string processing it's perfectly fine and much faster than String).
> >
> > I'm sure it's true, but it's quite irrelevant to my question, which is
> > "wh
On Mon, 2007-09-10 at 15:47 +1000, Stuart Cook wrote:
> On 9/10/07, PR Stanley <[EMAIL PROTECTED]> wrote:
> > Hi
> > Any comments and/or criticisms would be most appreciated:
> > --count the occurrences of char in string
> > countC :: Char -> [Char] -> Int
> > countC x xs = sum [1 | c <- xs, c == x
On Tue, 2007-09-11 at 16:48 -0700, Don Stewart wrote:
> byorgey:
> >On 9/11/07, Don Stewart <[EMAIL PROTECTED]> wrote:
> >
> > byorgey:
> > >On 9/11/07, PR Stanley <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi
> > > take 1000 [1..3] still yields [1,2,3]
> >
On Wed, 2007-09-12 at 23:36 +, Aaron Denney wrote:
> On 2007-09-12, Don Stewart <[EMAIL PROTECTED]> wrote:
> > ok:
> >> I've been told that functional dependencies are old hat and there is
> >> now something better. I suspect that "better" here means "worse".
> >
> > Better here means "better"
On Thu, 2007-09-13 at 11:12 -0700, Don Stewart wrote:
> > >Better here means "better" -- a functional language on the type
> > >system,
> > >to type a functional language on the value level.
> > >
> > >-- Don
> >
> > For a taste, see Instant Insanity transliterated in this functional
> > langu
On Thu, 2007-09-13 at 19:34 +0100, Jules Bean wrote:
>
> Any comments? I'm sure this has been shown before but I don't
> remember where.
The Monad Transformer Library essentially does this, the types you get
are along the lines of:
foo :: (Monad m, MonadState s m, MonadReader r m) => m Int
___
On Tue, 2007-09-18 at 18:13 +0200, Thomas Girod wrote:
> Hi there. Beeing rather new to the realm of Haskell and functional
> programming, I've been reading about "how is easier it is to
> parallelize code in a purely functional language" (am I right saying
> that ?).
>
> My knowledge of paralleli
On Sat, 2007-09-22 at 21:14 -0700, Thomas Hartman wrote:
> I came up with the following functions to do "reverse." The first one
> is obviously bad, because of the expensive list concat. The last one,
> "myreverse", I think is the reference implementation you get in the
> prelude. The ones between,
On Sun, 2007-09-23 at 20:03 -0400, Cale Gibbard wrote:
> On 23/09/2007, Neil Mitchell <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > The haskell-cafe@ mailing list is more appropriate for messages such
> > as this. haskell@ is just for announcements (it should be called
> > haskell-annouce@ !)
> >
> > >
On Mon, 2007-09-24 at 19:11 -0700, Dan Weston wrote:
> Well, I did footnote in my first e-mail that:
>
> [1] I used the asterisk in the category name Hask* to exclude undefined
> values or partial functions
>
> [Although I think I may have flipped the asterisk convention.]
>
> I see what you me
On Tue, 2007-09-25 at 12:24 +0100, Andrew Coppin wrote:
> Chaddaï Fouché wrote:
> > 2007/9/25, Andrew Coppin <[EMAIL PROTECTED]>:
> >
> >> This is why I found it so surprising - and annoying - that you can't use
> >> a 2-argument function in a point-free expression.
> >>
> >> For example, "zipWi
On Tue, 2007-09-25 at 16:18 -0500, Creighton Hogg wrote:
>
>
> On 9/25/07, Philippa Cowderoy <[EMAIL PROTECTED]> wrote:
> On Tue, 25 Sep 2007, Seth Gordon wrote:
>
> > Are Benjamin C. Pierce's _Types and Programming Languages_
> and/or _Basic
> > Category
On Wed, 2007-09-26 at 18:50 -0400, Steven Fodstad wrote:
> Andrew Coppin wrote:
> > Chaddaï Fouché wrote:
> >> 2007/9/25, Andrew Coppin <[EMAIL PROTECTED]>:
> >>
> >>> This is why I found it so surprising - and annoying - that you can't
> >>> use
> >>> a 2-argument function in a point-free expres
On Wed, 2007-09-26 at 17:23 -0700, Dan Weston wrote:
> Not to beat a dead horse, but I wasn't suggesting to rename the fix
> function that everyone knows and loves:
>
> fix :: (a -> a) -> a
> fix f = let f' = f f' in f'
>
> I was merely trying to suggest that it would be wise to rename the
> fu
On Sat, 2007-09-29 at 17:58 +0100, PR Stanley wrote:
> Hi
> in C type languages a function must be declared before its application.
> Would I be right in thinking that this isn't the case in Functional languages?
> For example:
> transmit :: String -> String
> transmit = decode . channel . en
On Wed, 2007-10-03 at 01:42 +0100, PR Stanley wrote:
> > > > f x = x + x
> > > > Is the "x" use to create a pattern in the definition and when f is
> > > > called it's replaced by a value?
> > >
> > >Those equation-like definitions are syntactic sugar for lambda
> > >abstractions. f could as well b
On Wed, 2007-10-03 at 22:31 +1000, Stuart Cook wrote:
> On 10/3/07, PR Stanley <[EMAIL PROTECTED]> wrote:
> > Without looking at the standard prelude, define the
> > higher-order library function curry that converts a function
> > on pairs into a curried
> > function
On Mon, 2007-10-08 at 20:54 +1000, Thomas Conway wrote:
> I just had a conversation today that seems relevant to this thread. I
> was chatting with a friend who is working in the academic sector, and
> I was observing that Melbourne Uni (my old school), is switching in
> the new year from teaching
On Wed, 2007-10-10 at 23:48 +0100, Philippa Cowderoy wrote:
> On Wed, 10 Oct 2007, Andrew Coppin wrote:
>
> > (I'm less sold on whether you really need to learn a particular dialect
> > well enough to *program* in it...)
> >
>
> If you don't then you won't be able to see how complicated things
On Fri, 2007-10-12 at 16:20 -0700, Dan Weston wrote:
> I like that name, and will henceforth use it myself until someone sees
> fit to add it to the Prelude!
>
> Maxime Henrion wrote:
> > Isaac Dupree wrote:
> >> Dan Weston wrote:
> >>> applyNtimes :: (a -> a) -> Int -> a -> a
> >>>
> >>> This so
On Sun, 2007-10-14 at 15:22 +0100, Andrew Coppin wrote:
> Vimal wrote:
> > I think you have got a very good point in your mail that I overlooked
> > all along ... "Why was Haskell created?" is a question that I havent
> > tried looking for a answer :)
> >
>
> To avoid success at all costs?
>
>
On Sun, 2007-10-14 at 15:20 -0600, Luke Palmer wrote:
> On 10/14/07, Tim Newsham <[EMAIL PROTECTED]> wrote:
> > I've been struggling with this for the last day and a half. I'm
> > trying to get some exercise with the type system and with logic by
> > playing with the curry-howard correspondence.
On Sun, 2007-10-14 at 18:14 -0400, Brandon S. Allbery KF8NH wrote:
> On Oct 14, 2007, at 17:54 , ntupel wrote:
>
> > Now my problem still is, that I don't know how to speed things up. I
> > tried putting seq and $! at various places with no apparent
> > improvement.
> > Maybe I need to find a di
On Sun, 2007-10-14 at 17:19 -1000, Tim Newsham wrote:
> On Sun, 14 Oct 2007, Roberto Zunino wrote:
> > (Warning: wild guess follows, I can not completely follow CPS ;-))
> > Adding a couple of forall's makes it compile:
> > propCC :: ((forall q . p -> Prop r q) -> Prop r p) -> Prop r p
> > func1 ::
On Tue, 2007-10-16 at 17:02 +0100, Neil Mitchell wrote:
> Hi
>
> > (/ 10) means the function that divides its argument by 10
> > (- 10) however is just the number -10, even if I put a space between the -
> > and 10.
> >
> > How can I create a function that subtracts 10 from its argument in a cl
On Wed, 2007-10-17 at 15:06 -0700, Dan Weston wrote:
> That is a great tutorial. Thanks! But in the last two sentences of the
> introduction you say:
>
> > We just need to find any program with the given type.
> > The existence of a program for the type will be a proof
> > of the corresponding
On Mon, 2007-10-22 at 01:12 +0100, Lennart Augustsson wrote:
> There's nothing wrong with Haskell types. It's the terms that make
> Haskell types an inconsistent logic.
Logics are what are consistent or not, so saying the logic Haskell's
type system corresponds to is inconsistent is all that can
On Mon, 2007-10-22 at 10:09 +0200, manu wrote:
> Hello
>
> I am not sure it is appropriate to post to this mailing list to
> inquire about a peculiar algorithm, if not let me know...
>
> I was looking at one particular puzzle posted on the Facebook site,
> 'Wiretaps' (http://www.facebook.com/
On Mon, 2007-10-22 at 17:12 +0100, Neil Mitchell wrote:
> Hi
>
> I can see problems with this. This comes up when typing windows file path's:
>
> "C:\path to my\directory\boo"
>
> If this now reports no errors, who wants to guess which come up as
> escape codes, and which don't. The way other la
On Thu, 2007-10-25 at 11:30 -0400, Graham Fawcett wrote:
> Hi folks,
>
> I'm writing a Gnu DBM module as an exercise for learning Haskell and
> its FFI. I'm wondering how I might write a function that returns the
> database keys as a lazy list. I've wrapped the two relevant foreign
> functions:
>
On Sun, 2007-10-28 at 10:23 -0400, Prabhakar Ragde wrote:
> Jaak Randmets wrote:
> > On 10/28/07, Prabhakar Ragde <[EMAIL PROTECTED]> wrote:
> >> For the purposes of learning, I am trying to optimize some variation of
> >> the following code for computing all perfect numbers less than 1.
> >>
>
On Sun, 2007-10-28 at 12:01 -0700, Don Stewart wrote:
> jerzy.karczmarczuk:
> > Stefan O'Rear adds to the dialogue:
> >
> > >Prabhakar Ragde wrote:
> > >>Jerzy Karczmarczuk wrote:
> > >>
> > >>>Just a trivial comment... 1. Don't speak about comparing *languages*
> > >>>when you compare *algorit
On Sun, 2007-10-28 at 23:34 +0100, Peter Hercek wrote:
> Don Stewart wrote:
> >> C++ version times: 1.109; 1.125; 1.125
> >> Int32 cpu times: 1.359; 1.359; 1.375
> >> Int64 cpu times: 11.688; 11.719; 11.766
> >> Integer cpu times: 9.719; 9.703; 9.703
> >>
> >> Great result from ghc.
> >
> > What H
On Wed, 2007-10-31 at 23:44 +0100, Henning Thielemann wrote:
> On Wed, 31 Oct 2007, Dan Piponi wrote:
>
> > But every day, while coding at work (in C++), I see situations where
> > true partial evaluation would give a big performance payoff, and yet
> > there are so few languages that natively sup
On Sat, 2007-11-03 at 11:40 +, Adrian Hey wrote:
> Bulat Ziganshin wrote:
> > because program that require 8mb stack, will probably require 8gb when
> > processing more data :)
>
> So.. what? You could say the same about heap, which was rather the point
> of the earlier thread.
I personally w
On Thu, 2007-11-08 at 13:21 +1100, Tim Docker wrote:
> levi.stephen wrote:
> > My concern (which may be inexperience ;) ) is with the monads here
> > though. What if I hadn't seen that the IO monad (or any other Monad)
> > was going to be necessary in the type signatures?
>
>
> You'd have some re
On Thu, 2007-11-08 at 22:54 -0800, Don Stewart wrote:
> bulat.ziganshin:
> > definitely, it's a whole new era in low-level ghc programming
>
> victory!
Now I want a way of getting (well-used) SIMD instructions and such, and
with some luck some high-level approach as well.
___
On Fri, 2007-11-09 at 17:41 +0100, Alfonso Acosta wrote:
> I this there's no need for a binding
>
> How about this?
>
> import Control.Monad (when)
> import System.IO
>
> getpasswd :: Handle -> IO String
> getpasswd h = do wasEnabled <- hGetEcho h
> when wasEnab
On Mon, 2007-11-12 at 15:51 -0800, Donn Cave wrote:
> On Nov 12, 2007, at 12:00 PM, Galchin Vasili wrote:
> > I am looking for (objective.. i.e. not juts FPL cheerleading)
> > opinions as to why Wall Street ( http://www.janestcapital.com/) and
> > banking are now using OCaml and Haskell. I rea
On Tue, 2007-11-13 at 14:21 -0800, Ryan Ingram wrote:
> On 11/13/07, Ryan Ingram <[EMAIL PROTECTED]> wrote:
> Also, what stops getRule from going off the end of the array?
> I didn't see anything that prevented that in the code, and
> you're using unsafeAt, which seems like
On Tue, 2007-11-13 at 13:51 -0800, Dan Piponi wrote:
> On Nov 13, 2007 1:24 PM, Ryan Ingram <[EMAIL PROTECTED]> wrote:
> > I tend to prefer where, but I think that guards & function declarations are
> > more readable than giant if-thens and case constructs.
>
> Up until yesterday I had presumed th
On Wed, 2007-11-14 at 16:27 -0800, Justin Bailey wrote:
> It's:
>
> f $! x = x `seq` f x
>
> That is, the argument to the right of $! is forced to evaluate, and
> then that value is passed to the function on the left. The function
> itself is not strictly evaluated (i.e., f x) I don't believe.
On Sat, 2007-11-17 at 16:40 +, Andrew Coppin wrote:
> Thomas DuBuisson wrote:
> >> BTW, while I'm here... I sat down and wrote my own MD5 implementation.
> >>
> >
> > How is the performance on this new MD5 routine?
>
> Ask me *after* I modify it to give the correct answers. ;-)
>
> Inter
On Sat, 2007-11-17 at 13:30 -0500, John D. Ramsdell wrote:
...
> It seems rather hard to avoid lazyness in the current version of
> Haskell when it's not wanted. I hope one of the proposals for deep
> strictness makes it into Haskell prime. In my application, there is
> one datastructure, such t
On Sat, 2007-11-17 at 16:45 -0800, Tim Chevalier wrote:
> On 11/17/07, Derek Elkins <[EMAIL PROTECTED]> wrote:
> > However, to put things in motion for something concrete at all, we're
> > hoping to put together a meeting taking place in the Portland area as
> > t
On Sat, 2007-11-17 at 17:38 -0800, Tim Chevalier wrote:
> On 11/17/07, Derek Elkins <[EMAIL PROTECTED]> wrote:
> > Don mentioned that. However, something specifically Haskell and aimed
> > at a wider audience than just the Portland area is desirable. It's also
> &
On Mon, 2007-11-19 at 21:47 +0100, Radosław Grzanka wrote:
> 2007/11/19, brad clawsie <[EMAIL PROTECTED]>:
> > > > The problem is that only one person gets to comment on the quality of
> > > > a library, the author, who is about the least objective person.
> >
> > by rolling certain libraries into
On Tue, 2007-11-20 at 00:18 -0500, Dimitry Golubovsky wrote:
> Hi,
>
> I have been using plain non-monadic CPS for a while in my web-browser
> related stuff. Now I am tempted to switch from plain CPS to
> syntactically sweetened monadic style based on Continuation Monad, but
> I feel stuck with on
On Tue, 2007-11-20 at 13:22 +0200, Gleb Alexeyev wrote:
> Dimitry Golubovsky wrote:
>
> > If I have
> >
> > callCC $ \exit -> do
> > foo
> > ...
> >
> > I cannot jump to `exit' from within foo unless `exit' is given to foo
> &g
On Thu, 2007-11-22 at 01:01 -0500, Dimitry Golubovsky wrote:
> Hi,
>
> I finally was able to write a function which grabs the remainder of
> the computation in Cont monad and passes it to some function, in the
> same time forcing the whole computation to finish by returning a final
> value.
>
> I
On Fri, 2007-11-23 at 18:45 +, Paulo Silva wrote:
> Hello,
>
> Type representations using GADTs are being used to achieve dynamic
> typing in Haskell. However, representing polymorphic types is
> problematic. Does anyone know any work about including polymorphism
> in dynamic typing?
Lo
On Fri, 2007-11-23 at 21:11 -0800, Ryan Ingram wrote:
> On 11/22/07, apfelmus <[EMAIL PROTECTED]> wrote:
> A context passing implementation (yielding the ContT monad
> transformer)
> will remedy this.
>
> Wait, are you saying that if you apply ContT to any monad that has
On Sat, 2007-11-24 at 11:10 +0100, apfelmus wrote:
> Derek Elkins wrote:
> > Ryan Ingram wrote:
> >> apfelmus wrote:
> >> A context passing implementation (yielding the ContT monad
> >> transformer)
> >> will remedy this.
>
On Tue, 2007-11-27 at 00:15 +0100, Chris Eidhof wrote:
> On 26 nov 2007, at 19:48, Henning Thielemann wrote:
> > I wonder whether it is a typical mistake of beginners
> > to write 'return' within a do-block (that is, not at the end)
> > and if it is possible to avoid this mistake by clever typing.
On Thu, 2007-11-29 at 07:29 +, Thomas Davie wrote:
> On 29 Nov 2007, at 06:32, PR Stanley wrote:
>
> > Hi
> > Thanks for the response.
> >
> > JCC: In most languages, if you have some expression E, and when the
> > computer attempts to evaluate E it goes in to an infinite loop, then
>
On Sun, 2007-12-02 at 03:11 +, Kannan Goundan wrote:
> I'm implementing an interpreter for the lambda calculus augmented with
> mutable variables. I'm having problems doing the mutable state stuff in
> Haskell. Here's what I have so far:
>
> type Expr= ... terms in the language ...
>
On Sun, 2007-12-02 at 03:29 +, Robin Green wrote:
> On Sat, 01 Dec 2007 21:22:53 -0600
> Derek Elkins <[EMAIL PROTECTED]> wrote:
>
> > > There's also the issue of finding a more elegant way of threading
> > > the Store through my evaluator, but I'm
On Sun, 2007-12-02 at 21:54 -0800, Don Stewart wrote:
> catamorphism:
> > On 12/2/07, Don Stewart <[EMAIL PROTECTED]> wrote:
> > > prstanley:
> > > > Hi
> > > > data Tree = Leaf Int | Node Tree Int Tree
> > > >
> > > > occurs :: Int -> Tree -> Bool
> > > > occurs m (Leaf n) = m == n
> > > > occurs
On Mon, 2007-12-03 at 16:56 +0200, Yitzchak Gale wrote:
> Adrian Neumann wrote:
> >> > data Tree a = Leaf a | Node a [Tree a]
> >> example: given a tree t and two nodes u,v, find the
> >> first common ancestor. In Java this is really simple,
> >> because each node has a "parent" reference...
> >> I
On Mon, 2007-12-03 at 10:48 +0100, Ketil Malde wrote:
> "Johan Tibell" <[EMAIL PROTECTED]> writes:
>
> > It would be great if someone could exemplify these "rules of thumb",
> > e.g. "Primitive types such as Int should be strict unless in the three
> > canonical examples X, Y and Z." My strictness
On Mon, 2007-12-03 at 19:13 -0800, Stefan O'Rear wrote:
> On Mon, Dec 03, 2007 at 09:18:18AM -0800, Carlo Vivari wrote:
> >
> > Hi! I'm a begginer in haskell and I have a problem with an exercise, I
> > expect
> > someone could help me:
> >
> > In one hand I have a declaration of an algebra data
On Wed, 2007-12-05 at 10:01 +0100, Pablo Nogueira wrote:
> Hasn't Ryan raised an interesting point, though?
>
> Bottom is used to denote non-termination and run-time errors. Are they
> the same thing?
Up to observational equality, yes.
> To me, they're not. A non-terminating program has
> diffe
On Sat, 2007-12-08 at 16:39 -0800, Bryan O'Sullivan wrote:
> Loganathan Lingappan wrote:
>
> > main = do
> > hSetBuffering stdin LineBuffering
> > numList <- processInputs
> > foldr (+) 0 numList
>
> The type of main is understood to be IO (), so it can't return anything.
On Tue, 2007-12-11 at 23:06 -0500, [EMAIL PROTECTED] wrote:
> On 2007.12.12 03:29:13 +0100, Wolfgang Jeltsch <[EMAIL PROTECTED]> scribbled
> 1.6K characters:
> > Am Mittwoch, 12. Dezember 2007 03:12 schrieb [EMAIL PROTECTED]:
> > > FWIW to the discussion about changing the main page, I was reading
On Sun, 2007-12-16 at 13:49 +0100, apfelmus wrote:
> Dan Weston wrote:
> > newtype O f g a = O (f (g a)) -- Functor composition: f `O` g
> >
> > instance (Functor f, Functor g) => Functor (O f g) where ...
> > instance Adjunction f g => Monad (O g f) where ...
> > instance Adjunction f
On Mon, 2007-12-17 at 13:51 +, Bayley, Alistair wrote:
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Nicholls, Mark
> >
> > To recap...
> >
> > "type" introduces a synonym for another type, no new type is
> > createdit's for readabilities sake.
> >
> > "Newtype"
On Mon, 2007-12-17 at 09:58 -0500, David Menendez wrote:
>
>
> On Dec 17, 2007 4:34 AM, Yitzchak Gale <[EMAIL PROTECTED]> wrote:
> Derek Elkins wrote:
> > There is another very closely related adjunction that is
> less
On Mon, 2007-12-17 at 22:12 +0300, Miguel Mitrofanov wrote:
> > There's a third way, too, and I haven't seen anybody mention it yet
>
> I've noticed it, but there are some problems with this
> representation, so I decided not to mention it. It's OK as far as we
> don't want functions working o
On Mon, 2007-12-17 at 21:22 -0200, Andre Nathan wrote:
> On Mon, 2007-12-17 at 17:33 -0200, Andre Nathan wrote:
> > Hello (Newbie question ahead :)
>
> Thanks everyone for the great suggestions. The code is much cleaner now
> (not to mention it works :)
>
> This is the first non-tutorial program
On Tue, 2007-12-18 at 23:04 -0800, Don Stewart wrote:
> jules:
> > Brad Larsen wrote:
> > >Hi there list,
> > >
> > >How would one go about creating a new type for a subset of the integers,
> > >for (contrived) example just the even integers? I was thinking of
> > >making a new type
> > >
> > >n
On Fri, 2007-12-21 at 09:13 -0800, Justin Bailey wrote:
> Given this function:
>
> dropTest n = head . drop n $ [1..]
>
> I get a stack overflow when n is greater than ~ 550,000 . Is that
> inevitable behavior for large n? Is there a better way to do it?
A similar example is discussed on
http:
On Fri, 2007-12-21 at 09:56 -0800, David Benbennick wrote:
> On Dec 21, 2007 9:51 AM, Justin Bailey <[EMAIL PROTECTED]> wrote:
> > I think its [1..] which is building up the unevaluated thunk. Using
> > this definition of dropTest does not blow the stack:
>
> It also works if you do [(1::Int) ..]
On Mon, 2007-12-24 at 11:15 +0200, Cristian Baboi wrote:
> While reading the Haskell language report I noticed that function type is
> not an instance of class Read.
>
> I was told that one cannot define them as an instance of class Show
> without breaking "referential transparency" or printin
On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote:
> Programming languages are generally classified into three groups,
> imperative, functional, and logical. The difference is in the style
> of programming encouraged (or mandated, for older languages) by the
> language.
Usually the di
On Sun, 2007-12-30 at 12:27 +0100, [EMAIL PROTECTED]
wrote:
[...]
> I don't understand your point. We know what swimming is: floating and
> moving autonomously. Thinking is different, since our thinking is (at least
> for some of us) conscious, and we have no idea what is the conscience.
> For good
On Wed, 2008-01-02 at 15:49 +0200, Yitzchak Gale wrote:
[...]
> Some people are worried that this version of Hask is missing
> certain nice properties that one would like to have. For
> example, it was recently claimed on this list that tuples
> are not products in that category. (Or some such. I
On Sun, 2008-01-06 at 16:19 +0100, Daniel Fischer wrote:
> Am Sonntag, 6. Januar 2008 15:54 schrieb Achim Schneider:
> > Daniel Fischer <[EMAIL PROTECTED]> wrote:
> > > Am Sonntag, 6. Januar 2008 15:18 schrieb Andrew Coppin:
> > > > Daniel Fischer wrote:
> > > > > Just because I don't know:
> > > >
On Sun, 2008-01-06 at 09:45 -0800, Jonathan Cast wrote:
> On 6 Jan 2008, at 3:02 AM, Derek Elkins wrote:
>
> > On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote:
> >
> >> Programming languages are generally classified into three groups,
> >> imper
On Sun, 2008-01-06 at 22:31 +0100, [EMAIL PROTECTED]
wrote:
> Derek Elkins writes:
>
> > Jonathan Cast wrote:
> >> I find the term `declarative' to be almost completely meaningless.
> >
> > I was originally thinking of having the final sentence: "Th
On Sun, 2008-01-06 at 13:48 -0800, Jonathan Cast wrote:
> On 6 Jan 2008, at 1:31 PM, [EMAIL PROTECTED] wrote:
>
> > Derek Elkins writes:
> >> Jonathan Cast wrote:
> >>> I find the term `declarative' to be almost completely meaningless.
> >> I was o
On Sun, 2008-01-06 at 23:28 +0100, [EMAIL PROTECTED]
wrote:
> Derek Elkins writes:
>
> > Jonathan Cast wrote:
>
> >> I find the only
> >> similarity between Haskell and Prolog to be that neither is imperative.
> >
> > Indeed, you've discov
On Sun, 2008-01-06 at 23:44 +0100, Peter Verswyvelen wrote:
> If I understand it correctly, implicit parameters in Haskell allow you
> to pass values to functions with explicitly adding a parameter to each
> of the functions being “called” (I appologize for my imperative
> terminology here. How wou
On Fri, 2007-12-28 at 09:51 -0700, Luke Palmer wrote:
> On Dec 28, 2007 9:35 AM, Jules Bean <[EMAIL PROTECTED]> wrote:
> > In particular, adding sharing can stop something being GCed, which can
> > convert an algorithm which runs in linear time and constant space to one
> > which runs in linear spa
101 - 200 of 568 matches
Mail list logo