Re: [Haskell-cafe] blanket license for Haskell Platform?

2011-10-25 Thread Antti-Juhani Kaijanaho
On Tue, Oct 25, 2011 at 06:37:49AM -0400, Eric Y. Kow wrote:
 - My user is concerned that a large number of having a large number of
   individual licenses even though textually identical modulo author,
   date, etc would mean a big hassle getting their lawyers and their
   user's lawyers to sign off on each and every license

Sounds like you need a single copyright holder, not a blanket license (whatever
that means).  That means arranging copyright transfers (in the FSF/GNU style)
and getting every contributor whose code survives in the Platform to sign off
on it.

In other words, it's a major undertaking and by no means assured to succeed.

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/


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


Re: [Haskell-cafe] Package documentation complaints -- and a suggestion

2011-10-24 Thread Antti-Juhani Kaijanaho
On Mon, Oct 10, 2011 at 09:06:01AM +0100, Paterson, Ross wrote:
 The distinction between synopsis and description is borrowed from the
 Debian package format:
 
 http://www.debian.org/doc/debian-policy/ch-binary.html#s-descriptions
 
 The two fields are aimed at different audiences.

Not in Debian.  The synopsis and description are a bit like the title and the
abstract of a scholarly paper: you might see a title without the abstract (and
it must work alone), but both are aimed at the same audience - people who are
unsure whether they should read the paper (install the package) and look for
information sufficient to decide that it's not what they need (or that it
probably is).

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/

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


Re: [Haskell-cafe] Learn You a Haskell for Great Good - a few doubts

2011-03-02 Thread Antti-Juhani Kaijanaho
On Thu, Mar 03, 2011 at 12:29:44PM +0530, Karthick Gururaj wrote:
 Thanks - is this the same unit that accompanies IO in IO () ? In
 any case, my question is answered since it is not a tuple.

It can be viewed as the trivial 0-tuple.

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/

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


Re: [Haskell-cafe] about beta NF in lambda calculus

2009-03-21 Thread Antti-Juhani Kaijanaho
On Sat, Mar 21, 2009 at 07:29:05PM +, Algebras Math wrote:
 If above is true, I am confused why we have to distinguish the terms which
 have NF and be in NF? isn't the terms have NF will eventually become in NF?
 or there are some way to avoid them becoming in NF?

Spoken like a mathematician :)  (Well, only sort of.)

The way to avoid it is not to perform the work of beta conversion.
Similarly, you may say that people are either dead or will eventually die, so
why distinguish between a person who is dead and a mortal, live person?

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Do I need an account to report build of Hacakgepackages?

2008-11-22 Thread Antti-Juhani Kaijanaho
On Sat, Nov 22, 2008 at 03:11:34PM -, Claus Reinke wrote:
 You only need an account for uploading packages. If you do not want to
 have to enter your user name or password interactively when you run
 cabal upload then you can put them in the config file:

 username:
 password:

 That sounds like a very bad idea, and should not be encouraged!

Agreed.  However...

 Any compromised uploader machine with stored passwords can
 be used to upload compromising code, which will propagate to all 
 downloaders.

It doesn't really matter whether a compromised machine stores a password or
not.  If you upload anything using a compromised machine, the attacker
has the opportunity to learn your password.

Also, Hackage doesn't use SSL/TLS, so compromising a machine isn't necessary
for learning Hackage passwords.

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: What causes loop?

2008-11-08 Thread Antti-Juhani Kaijanaho
On Sat, Nov 08, 2008 at 10:32:38AM -0600, Creighton Hogg wrote:
 So I'm trying to debug an issue that is causing GHC to emit the
 loop warning.  I was hoping to get more information about what
 exactly that tells me about the kind of problem, other than the
 obvious interpretation that I appear to be getting into some kind of
 infinite loop.  What is GHC detecting when it emits that warning?

It basically means that you have - somewhere in your program - a recursive
definition (of something that's not a function) that refers to itself without
going through a data constructor.

A safe recursive definition would be
  let x = Foo (x+1)
However, if you leave out the constructor,
  let x = x + 1
you get a loop (or a deadlock).

The reason is, when the value of the definition is demanded, it is computed up
to the topmost data constructor (formally, up to weak head normal form,
WHNF).  Any recursive reference to that value below that constructor is safe,
but if the value itself is needed to compute itself before a constructor is
reached, bad things (namely, either loop or a deadlock) happen.

The way GHC sometimes detects these situation is that when it starts demanding
the value of a variable[1], it first binds that variable to a special tag called
a blackhole.  If the evaluation reaches a data constructor without incident,
the blackhole is overwritten with that constructor.  If, however, evaluation
happens to demand the value of a variable that's blackholed, GHC immediately
knows that the wrong kind of recursion has happened.  Thus, my second example
will bomb, since the addition operator finds a blackhole at x.

Of course, in real programs the recursion can be very indirect, and finding the
culprit can be hard.


[1] More accurately, read thunk for variable in that paragraph.
-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Haskell-cafe] Planet haskell

2008-06-23 Thread Antti-Juhani Kaijanaho
On Mon, Jun 23, 2008 at 06:51:09AM +0100, Jamie Brandon wrote:
 I was hoping to have my summer of code blog added to planet haskell
 but [EMAIL PROTECTED] no longer seems to exist. Hopefully
 the owner is subscribed to this list?

It exists but seems to be broken.  Thank you for letting me know.

In the mean time, just contact myself or Don Stewart.

--
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: GSoC project blogs? (Re: [Haskell-cafe] Planet haskell)

2008-06-23 Thread Antti-Juhani Kaijanaho
(I'd rather people did not send me copies of list posts.)

On Mon, Jun 23, 2008 at 02:40:27PM +0100, Claus Reinke wrote:
 It would be nice to have blogs for all Haskell GSoC projects
 on Planet Haskell.

Any such blogs would certainly qualify.  Authors should read
http://planet.haskell.org/policy.html - and while our alias address is
out of commission, send addition requests to me or Don Stewart.

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Functions are first class values in C

2007-12-24 Thread Antti-Juhani Kaijanaho
On Sat, Dec 22, 2007 at 05:25:26PM +0300, Miguel Mitrofanov wrote:
 That's not C.
 That's the C preprocessor, which is a textual substitution macro 
 language.

 Well, the preprocessor is part of the language in a way. These two come
 together.

 No. In fact, these are even two different programs, see man cpp.

No, in fact, preprocessing is an integral part of translating a C
program, see the standard.  The standard allows implementing the
translation phases 1-6 (the so-called preprocessing phases) as a
separate program, but there is no requirement to do that.

It is true, however, that preprocessing used to be (in pre-standard
days) separate from the language.  This has not been true for decades.

That said, this is all irrelevant to the question of whether C allows
first-class functions.  I'm sure we all are capable of writing Haskell
programs that do not have simple and readable translations to C :)

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Functions are first class values in C

2007-12-24 Thread Antti-Juhani Kaijanaho
On Mon, Dec 24, 2007 at 02:12:30PM +0300, Miguel Mitrofanov wrote:
  It is true, however, that preprocessing used to be (in pre-standard
  days) separate from the language.  This has not been true for decades.
 
 Well, I've seen cpp to be used as a preprocessor not for C sources but for 
 something else.

And I'm sure you've heard people cursing cpp for being too C centric :)
In any case, it doesn't matter.  The question was, if the C preprocessor
was part of the C language, not whether C is the only thing it's used
for.

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: C Preprocessor

2007-12-06 Thread Antti-Juhani Kaijanaho
On Thu, Dec 06, 2007 at 10:43:30AM +0100, Bernd Brassel wrote:
 Is it already a known problem that the preprocessor cannot cope with the
 whole set of possible string declarations?

The cpp is a *C* preprocessor, and if it has been written to adhere to
the C standard, it is required to diagnose tokens that are not valid C
preprocessing tokens (such as string literals that do not end before the
end of a line).  As such, this is unsurprising.

It would probably make most sense to make cpphs the (only) preprocessor
used with -cpp instead of using whatever *C* preprocessor happens to be
in the path.  

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/


signature.asc
Description: Digital signature
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: [Haskell-cafe] gtk2hs in debian

2007-09-03 Thread Antti-Juhani Kaijanaho
On Mon, Sep 03, 2007 at 11:42:56AM +0200, Joachim Breitner wrote:
 Maybe someone here is interesting in being the debian package
 maintainer? I’d be able to sponsor the uploads.

I'm interested, but I'm also terribly busy.

If someone else wants it, I won't bother, but if not, I'll do it.

I'm a DD and I don't need sponsoring :)

-- 
Antti-Juhani Kaijanaho, Jyväskylä
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: What separates lines in Haskell code?

2007-06-14 Thread Antti-Juhani Kaijanaho
On Thu, Jun 14, 2007 at 09:11:12AM -0400, Isaac Dupree wrote:
 In the report, under the layout rule (section 9.3), The characters
 newline, return, linefeed, and formfeed, all start a new line.  (Which
 four characters are those? from http://en.wikipedia.org/wiki/Linefeed ,
 I'm guessing LF: Line Feed, U+000A, CR: Carriage Return, U+000D,
 FF: Form Feed, U+000C, and what's the fourth one?  Newline usually
 refers to '\n', which is LF, but linefeed has a direct name
 correspondence to that also!)

The H98 lexical syntax defines newline as
  newline-  return linefeed | return | linefeed | formfeed

It could, I suppose, also refer to the Unicode character U+2028 LINE SEPARATOR,
but then probably U+2029 PARAGRAPH SEPARATOR ought to be included as well.

There are, BTW, Unicode guidelines for newline usage in section 5.8 of the
Unicode 5.0 online edition.

-- 
Antti-Juhani Kaijanaho, Jyväskylä
http://antti-juhani.kaijanaho.fi/newblog/


signature.asc
Description: Digital signature
___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime


Re: [Haskell-cafe] The C Equiv of != in Haskell

2007-05-29 Thread Antti-Juhani Kaijanaho
On Tue, May 29, 2007 at 11:20:27AM +0100, David House wrote:
 Almost, (/=) :: Eq a = a - a.

Well, not quite :)  You forgot - Bool at the end :)

 (Just for completeness.)

Exactly :)

-- 
Antti-Juhani Kaijanaho, Jyväskylä
http://antti-juhani.kaijanaho.fi/newblog/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Newbie: Is ‘type’ synonym hiding two much?

2007-03-22 Thread Antti-Juhani Kaijanaho
On Thu, Mar 22, 2007 at 06:13:00PM +0300, Dmitri O.Kondratiev wrote:
 F :: a - b - c
 
 Is the same as:
 
 F :: a - (b - c)

Correcting the typo (use f, not F), these mean the same thing.

 And means either:
 
 -a function 'f' of one argument of type 'a' that returns a function of
 type (b - c), or it can also be interpreted as:
 -a function 'f' of two arguments of type 'a' and 'b' returning value of
 type 'c'

Yes.  The essential point to understand that these interpretations *are
the same*.

 Now, in the 17.5 section of a book one may see the following declarations:
 
 succeed :: b - Parse a b
 
 *Before looking at 'succeed' function definition* one may think that
 'succeed' is a function of *one* argument of type 'b' that returns object of
 type 'Parse a b'.

That's what it is.  However, without looking at the definition of 
Parse a b, you can't tell whether that is a function or not, and
therefore all you can say about succeed is that it takes *at least* one
argument.

 Then I do this substitution *myself as a Haskell runtime* and get in
 the result the following declaration of a * real
 function that Haskell runtime* works with:

I'm not sure why you feel the need to talk about runtime.  This all
happens at compile time.

 2. Should I search through main and imported modules for treacherous 'type'
 constructs?

They are not treacherous.  But yes, if you want to know what a type
stands for, you need to look it up.

The treacherous thing here is that in Haskell, returning a function is
the same as taking one more parameter.  This may feel strange at first,
but it is a very important idiom and you do need to learn to live with
it if you want to use Haskell.

 3. Where, in this case goes implementation abstraction principle? Why I must
 provide *all* the details about function argument type structure in order to
 understand how this function works?

type is just notational convenience.  If you want abstraction, use
newtype or data.


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


Re: [Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

2006-11-28 Thread Antti-Juhani Kaijanaho
Lemmih wrote:
 On 11/24/06, Tomasz Zielonka [EMAIL PROTECTED] wrote:
 Does anybody know how to watch this on Linux? I would prefer to simply
 download the movie file and use MPlayer on that, but I failed.

 .. or on Mac OS X (haven't tried yet)
 
 Worked for me with mplayer+w32codecs.

Won't work on non-IA32 hardware.  Is there an alternative encoding of the
video somewhere that actually works everywhere?

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


Re: [Haskell-cafe] Command line prompt templates

2006-11-23 Thread Antti-Juhani Kaijanaho
Donald Bruce Stewart wrote:
 Looks pretty good, though you use 
 
 case x :: Bool of
 True  - ...
 False - ...
 
 when
 if x then ... else ...
 
 would be preferred.

Why?  Personally, I find boolean case to feel better wrt layout and I see
no loss of clarity in its use.

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


Re: [Haskell-cafe] More documentation: how to create a Haskell project

2006-10-30 Thread Antti-Juhani Kaijanaho
Ketil Malde wrote:
 How to make cabal projects into distribution-specific (.deb, .rpm, and
 so on) packages? 

The answer for .debs is: ask a Debian developer (or a prospective
developer) to package it for you.

The reason is that to make a good .deb, one needs to be familiar with a lot
of Debian-specific policies and technologies.  If one is willing to invest
the time and effort to learn this, then it makes sense for one to apply to
become a Debian developer.  If not, then packaging is best left for someone
else.

-- 
Antti-Juhani Kaijanaho, Debian developer
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [off-topic / administrative] List Reply-to

2006-10-11 Thread Antti-Juhani Kaijanaho
Robert Dockins wrote:
 I think (pure
 speculation) the haskell.org mail server is set up to omit people from
 mail it sends if they appear in the To: or Cc: of the original mail.

Yes, this is a feature of recent Mailmans.

 Finally, I agree that reply-to munging is a bad idea, but I don't think
 appealing to a definition of 'reasonable mailer' that doesn't match a
 large portion of mail clients currently in the wild is a good way to
 argue the point.

Gnus might have been the first one to have it, but mutt (very popular in
hackerdom) was perhaps the one that popularized it.  I am currently
using Mozilla Thunderbird, for which it is available as an extension
(unfortunately, it also requires a patch for Thunderbird; but Debian sid
has already applied it).

Still, when choosing between a poor hack (Reply-To munging) and the
right answer (fixing mailers to support reply-to-list), I know which I
prefer.  The former may be appropriate in mailing lists where the
audience consists solely of non-geeks (who might not be able to choose a
good mailer), but in technical lists, I see no need for it. If you
prefer a mail client that does not support the feature, bug your vendor
to add it.

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


Re: [Haskell-cafe] Is Haskell a 5GL?

2006-09-26 Thread Antti-Juhani Kaijanaho
Ch. A. Herrmann wrote:
 do you think that Haskell is a 3GL (third generation language) or a 5GL or
 that the hierarchy of programming language generations is useless?

I did a literature search on language generations a few years ago when I
was preparing the first incarnation of the local Principles of
Programming Languages course.  There were three findings:

1) I could not find where the idea comes from.
2) All sources agree what 1GL, 2GL and 3GL are.
3) There is no consensus on what 4GL and 5GL are.  (Different sources
define them completely differently.)

Hence, I just classify all current general-purpose languages as 3GL and
 consider the classification mostly meaningless for today's languages.


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


Re: [Haskell-cafe] Haskell.org down

2006-09-26 Thread Antti-Juhani Kaijanaho
Paul Hudak wrote:
 I had to reboot haskell this AM it was really hung. My first
 assumption is abuse by web crawlers. I have denied access to all web
 crawlers at the moment while I continue looking further into this
 and the load is staying low. I'll keep you posted.

I've seen this kind of behavior when some stupid referer spammers open
hundreds of connections at the same time, typically requesting some
dynamic resource, DDoSing the system.  I have installed an
iptables-based tar pit on my own server that seems to have solved the
problem.

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


Re: [Haskell-cafe] Writing forum software in Haskell

2006-09-25 Thread Antti-Juhani Kaijanaho
David House wrote:
 * What would be a compulsory feature list?

Ability to subscribe to forums by email and to post/followup by email.
Alternatively, or in addition, a two-way NNTP gateway.

(If you want us forum-allergic to participate in the discussions there,
that is.)


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


Re: [Haskell-cafe] iterative algorithms: how to do it in Haskell?

2006-08-16 Thread Antti-Juhani Kaijanaho
Tamas K Papp wrote:
 f is an a-a function, and there is a stopping rule 
 goOn(a,anext) :: a a - Bool which determines when to stop.  The
 algorithm looks like this (in imperative pseudocode):
 
 a = ainit
 
 while (true) {
   anext - f(a)
   if (goOn(a,anext))
a - anext
   else
  stop and return anext
 }
 
 For example, f can be a contraction mapping and goOn a test based on
 the metric.  I don't know how to do this in a purely functional
 language, especially if the object a is large and I would like it to
 be garbage collected if the iteration goes on.

The idea is to make the iteration variables arguments to a
tail-recursive function:

let foo a | goOn a anext = foo anext
  | otherwise= anext
where anext = f a
in foo ainit


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


Re: [Haskell-cafe] Why Not Haskell?

2006-08-09 Thread Antti-Juhani Kaijanaho

Albert Lai wrote:

Let's have a fun quiz!  Guess the mainstream languages in question:


Spoilers for the quiz




































0. What language would allow

  4[hello world]

   when a normal person would just write

  hello world[4]


This is a classic C misfeature.


1. What language, supporting a kind of both parametric polymorphism
   and subclass polymorphism, allows and actually features such a class
   declaration as

 class EnumT extends EnumT { ... }


I have to guess here. Java.


2. What language allows you to test primality in constant runtime?
   That is, move all the work to compile time, using its polymorphism.


C++, also a classic feature. There are even books that discuss this 
technique, and I believe a SPJ paper referring to it.

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


Re: [Haskell-cafe] [newbie] processing large logs

2006-05-14 Thread Antti-Juhani Kaijanaho

Eugene Crosser wrote:

Having read Yet another Haskell tutorial (note on p.20), doesn't foldl
have to read the complete list before it can start processing it
(beginning from the last element)?  As opposed to foldr that can fetch
elements one by one as they are needed?


They're complementary.

If the result is of a type where partial evaluation is possible (say, a 
list: between not evaluated and fully evaluated, there are as many 
intermediate stages of evaluation as there are elements in the list), 
then foldr is the better choice, as it constructs the output list (or 
whatever) lazily.  (You also need to make sure that the fold parameter 
function is lazy in the rest of output parameter.)


If the result is of a type that doesn't allow partial evaluation (an 
integer, for example: there is no intermediate stage between not 
evaluated and fully evaluated), or used in a context where laziness 
is not a virtue, then it pays to avoid laziness in its evaluation: hence 
foldl' is the better choice. (You also need to make sure that the fold 
parameter function is strict in the accumulator parameter.)


In elementary (nth-language) Haskell, one is generally trying to learn 
the stuff about Haskell that is *different* from conventional languages, 
so in elementary tutorials the rule of thumb foldr is better works. 
It's just one of the half-lies that people get told in elementary 
courses that one needs to augment in later stages of learning :)

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


Re: [Haskell-cafe] [newbie] processing large logs

2006-05-14 Thread Antti-Juhani Kaijanaho

Eugene Crosser wrote:

Anyway, I understand that you used 'seq' in your example as a way to
strictify the function that updates accumulator.  Could you (or
anyone) explain (in plain English, preferably:) the reason why 'seq' is
the way it is.  In the first place, why does it have the first argument
at all, and what should you put there?


seq returns its second argument without doing anything to it.  As a 
side-effect, it also evaluates (shallowly) its first argument.


So, first argument should be what you want to be evaluated, second is 
what you want seq to return.


Note that e `seq` e is useless; it does *not* force the evaluation of e 
before it would be evaluated in any case.



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


Re: [Haskell-cafe] The values of infinite lists

2006-05-10 Thread Antti-Juhani Kaijanaho

Deokhwan Kim wrote:

Are the values of infinite lists _|_ (bottom)?


Depends on what you mean by value.

If you define value to mean normal form, then yes.

If you define value to mean weak head normal form, then no.

The former is common in strict programming languages. In nonstrict 
functional programming, the latter is more useful.


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


Re: concurrency guarentees clarification

2006-04-25 Thread Antti-Juhani Kaijanaho

John Meacham wrote:

* every runnable thread is guarenteed to run in a finite amount of time if a
  program reaches a yield-point infinitly often.


What happens if one of the thread ends up in an infinite loop that 
contains a yield point?


Infinitely often is unclear (I think I know what you're trying to say, 
but this is because I think I know what you're trying to say overall, 
and not because of these words).  I'd say something like if, after 
hitting a yield point, the program hits another yield point in a finite 
amount of time (the start of execution and program termination being 
considered yield points for the purposes of this rule).


___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://haskell.org/mailman/listinfo/haskell-prime


Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-28 Thread Antti-Juhani Kaijanaho

Antti-Juhani Kaijanaho wrote:
If you want your blog listed, email me. I will not add people without 
their consent.  Just tell me your RSS/Atom feed URI (try to pick one 
that will not contain non-English posts; but there is no need to 
restrict to just Haskell-related posts - half of the beauty is seeing 
what else people are doing and thinking).


Now at http://antti-juhani.kaijanaho.fi/planet-haskell/ . This is 
obviously a temporary address (somebody set up a proper Haskell DNS for 
this; I can configure this to answer a particular domain name).


Also, submit your feeds!


Now at http://planet.haskell.org. Please submit your feeds (see above).
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Eval of a syntax tree for reduction

2006-03-27 Thread Antti-Juhani Kaijanaho

Steve Downey wrote:
It makes eval1 a bit more complicated, and not as straightforward 
translation from the type system being described, though.

e.g reducing If looks more like

eval1 (TmIfExpr t1 t2 t3) =
let t1' = eval1 t1
in  case t1' of
{ Just t1'' - Just $ TmIfExpr t1'' t2 t3
; Nothing - Nothing
}


You should use the fact that Maybe is a monad:

eval1 (TmIfExpr t1 t2 t3) =
  do t1' - eval1 t1
 return $ TmIfExpr t1' t2 t3


and eval then looks like
eval t =
let t' = eval1 t
in case t' of
 { Just t'' - eval t''
 ; Nothing - t'
 }


(In the above, I suspect you need Nothing - t, no prime.)

BTW, there's no need to use let here:

eval t = case eval1 t of Just t' - eval t'
 Nothing - t


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


Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-24 Thread Antti-Juhani Kaijanaho

Neil Mitchell wrote:

Hi

Is it possible to have an RSS feed for Planet Haskell? i.e. so I can
read all the Haskell related blogs with my feed reader without being
subscribed to all of them individually.


Now there is an RSS 2.0 and an Atom feed.


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


Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-23 Thread Antti-Juhani Kaijanaho

Isaac Jones wrote:

There's already software out there for this, so nothing new needs to
be written.  I think we need a volunteer to set this up somewhere?
Preferably someone with their own server, and we'll worry about
setting up the DNS later :)


Since nobody else seems to have volunteered, I'll try to set this up (if 
I can get the software working).


If you want your blog listed, email me. I will not add people without 
their consent.  Just tell me your RSS/Atom feed URI (try to pick one 
that will not contain non-English posts; but there is no need to 
restrict to just Haskell-related posts - half of the beauty is seeing 
what else people are doing and thinking).



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


Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-23 Thread Antti-Juhani Kaijanaho

Antti-Juhani Kaijanaho wrote:
Since nobody else seems to have volunteered, I'll try to set this up (if 
I can get the software working).


If you want your blog listed, email me. I will not add people without 
their consent.  Just tell me your RSS/Atom feed URI (try to pick one 
that will not contain non-English posts; but there is no need to 
restrict to just Haskell-related posts - half of the beauty is seeing 
what else people are doing and thinking).


Now at http://antti-juhani.kaijanaho.fi/planet-haskell/ . This is 
obviously a temporary address (somebody set up a proper Haskell DNS for 
this; I can configure this to answer a particular domain name).


Also, submit your feeds!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-23 Thread Antti-Juhani Kaijanaho

Cool, if you think you want to manage this, we can probably host it on
the hackage.haskell.org machine.  What would you think of that?


I can host this just fine, I just want a better URI for it :)


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


Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-23 Thread Antti-Juhani Kaijanaho

Isaac Jones wrote:

Cool, if you think you want to manage this, we can probably host it on
the hackage.haskell.org machine.  What would you think of that?


On the other hand, if it's easier for others, I'm not going to insist on 
hosting it myself. The host requires Python 2.3, GNU Arch and crontab 
access.



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


Re: [Haskell] Haskell Weekly News: March 13, 2006

2006-03-18 Thread Antti-Juhani Kaijanaho
Donald Bruce Stewart wrote:
 antti-juhani:
Yes, it's annoying (it isn't ambigous right now, but it will be again
early next month). Either use an inherently unambiguous format (anything
that writes out or abbreviates the month, instead of using digits), or
use the international standard -MM-DD (which is unambiguous by ISO
fiat).
 
 Ok, I'll switch it to -MM-DD :)

It's now /MM/DD, and that's not the international standard format,
the international standard format has dashes insteaad of soliduses.

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


Re: [Haskell] Haskell Weekly News: March 13, 2006

2006-03-17 Thread Antti-Juhani Kaijanaho
Donald Bruce Stewart wrote:
 Well, there is a way -- it's fairly easy with the right regex --  but
 is it really ambiguous? Do people find it confusing? What do other sites do?

Yes, it's annoying (it isn't ambigous right now, but it will be again
early next month). Either use an inherently unambiguous format (anything
that writes out or abbreviates the month, instead of using digits), or
use the international standard -MM-DD (which is unambiguous by ISO
fiat).

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


Re: [Haskell-cafe] Records

2005-11-22 Thread Antti-Juhani Kaijanaho
Tomasz Zielonka wrote:
 Aren't C and C++ space insensitive (except the preprocessor)?

Literally, yes, because the C and C++ compilers proper take preprocessor
tokens, not strings, as input, and hence do not see the whitespace at
all; the whitespace-sensitive tokenization having been completed by the
preprocessor.  But I think that's splitting hairs, so my answer is: not
in the sense I was using that word. I don't know in what sense you use it.

(In a totally space insensitive language, andy and and y would be
tokenized the same way.)

Personally, I don't see how A.x vs. A . x is much different from that.
When using . as an operator, I separate it by spaces from the other
stuff. (Personally, I would even expect A.x, where A is not a module
name, to be an error in 98-esque Haskell, but it isn't.)
-- 
Antti-Juhani
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Records

2005-11-21 Thread Antti-Juhani Kaijanaho
Henning Thielemann wrote:
 Hence, spacing being significant is not Haskell-specific
 
 So Haskell is somehow BASICish -- how awful.

No, you got it backwards. I was contrasting a BASIC dialect as an
example of a space-*in*sensitive language to just about every modern
language, including Haskell.  In other words, Haskell was specifically
*not* like BASIC in my comparison.

I believe early FORTRAN is another example of a spacing-*in*sensitive
language comparable to that BASIC dialect, and *not* similar to Haskell.
-- 
Antti-Juhani
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Records

2005-11-19 Thread Antti-Juhani Kaijanaho
Ketil Malde wrote:
[about A.b and A . b potentially meaning different things:]
 Syntax that changes depending on spacing is my number
 one gripe with the Haskell syntax

I've generally considered that one of the good ideas in most current
languages (it's not specific to Haskell). ISTR there was a Basic dialect
where
  IFX=0THENX=X+1
and
  IF X = 0 THEN X = X + 1
meant the same thing. If that dialect had allowed multi-character
variable names (which I think it didn't), ANDY would have been parsed as
AND Y instead of the simple variable ANDY.

Hence, spacing being significant is not Haskell-specific and is
generally a good thing.

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


[Haskell] Re: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-13 Thread Antti-Juhani Kaijanaho
Sebastian Sylvan wrote:
 I'm wondering what incremental and moderate extension means? 

I don't know what others mean by it, but for me, it implies
standardizing existing practice, with possibly some conservative
redesign to get rid of any hysterical warts.

This is, BTW, what the C89 standard did for C, and it was a highly
successful standard.

-- 
Antti-Juhani
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-13 Thread Antti-Juhani Kaijanaho
Sebastian Sylvan wrote:
 I'm wondering what incremental and moderate extension means? 

I don't know what others mean by it, but for me, it implies
standardizing existing practice, with possibly some conservative
redesign to get rid of any hysterical warts.

This is, BTW, what the C89 standard did for C, and it was a highly
successful standard.

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


Re: [Haskell] Beyond ASCII only editors for Haskell

2005-05-24 Thread Antti-Juhani Kaijanaho
On 20050524T111249+0200, Benjamin Franksen wrote:
 The problem is that the 'else' must be indented 
 further than the 'if', so that this:
 
   if cond then
 on_true
   else
 on_false
 
 usually gives me a syntax error.

I usually write that as

  if cond
 then on_true
 else on_false

or, another example,

  if cond
 then do on_true_1
 on_true_2
 else do on_false_1
 on_false 2

which looks a little odd looking from a C/Pascal-style perspective but
is logical and understandable.
-- 
Antti-Juhani Kaijanaho  http://antti-juhani.kaijanaho.info/

Blogi - http://kaijanaho.info/antti-juhani/blog/
 Toys - http://www.cc.jyu.fi/yhd/toys/


signature.asc
Description: Digital signature
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell-cafe] Specify array or list size?

2005-05-07 Thread Antti-Juhani Kaijanaho
On 20050507T093613-0700, Fergus Henderson wrote:
 On 07-May-2005, Hamilton Richards [EMAIL PROTECTED] wrote:
  As far as I know, the last programming language that included
  arrays' sizes in their types was Standard Pascal,
 
 There have been many such languages since Standard Pascal.  For
 example C, C++, C#, Java, Ada, VHDL, and NU-Prolog.

C, C++ and Java do not belong to that list.  I can't speak about the
others, not being very familiar with them.

In C and C++, the declaration int n[50]; introduces an array variable
with size 50 having the type array of int.  The size is *not* part of
the type.  In Java, the array size is not given in the declaration at
all (instead, it is given in the new expression), and is not part of the
type.
-- 
Antti-Juhani Kaijanaho  http://antti-juhani.kaijanaho.info/

Blogi - http://kaijanaho.info/antti-juhani/blog/
 Toys - http://www.cc.jyu.fi/yhd/toys/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Specify array or list size?

2005-05-07 Thread Antti-Juhani Kaijanaho
On 20050507T203246+0200, Marcin 'Qrczak' Kowalczyk wrote:
  In C and C++, the declaration int n[50]; introduces an array variable
  with size 50 having the type array of int.  The size is *not* part of
  the type.
 
 No, it introduces a variable of type array of 50 ints, which can be
 converted to pointer to int.

ISO 9899:1999 (C99) section 6.7.5.2:3 says that its type is array of
int, not array of 50 ints:

  If, in the declaration ``T D1'', D1 has one of the forms:
 D[ type-qualifier-listopt assignment-expressionopt ]
 D[ static type-qualifier-listopt assignment-expression ]
 D[ type-qualifier-list static assignment-expression ]
 D[ type-qualifier-listopt * ]
  and the type specified for ident in the declaration ``T D'' is ``
  derived-declarator-type-list T '', then the type specified for ident
  is ``derived-declarator-type-list array of T ''.121) (See 6.7.5.3 for
  the meaning of the optional type qualifiers and the keyword static.)

  121) When several ``array of'' specifications are adjacent, a
  multidimensional array is declared.

 It matters when you make a pointer of such arrays, an array of such
 arrays, or sizeof such array. In C++ the size can be matched by
 template parameter, and you can have separate overloadings for
 separate array sizes.

For C, in all those cases, the array size is a property of the variable,
not of the type. 
-- 
Antti-Juhani Kaijanaho  http://antti-juhani.kaijanaho.info/

Blogi - http://kaijanaho.info/antti-juhani/blog/
 Toys - http://www.cc.jyu.fi/yhd/toys/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Specify array or list size?

2005-05-07 Thread Antti-Juhani Kaijanaho
On 20050507T120430-0400, Daniel Carrera wrote:
 I think it's because there's no real reason for someone to think that 
 the words list and array might not be synonims. I certainly don't 
 seen a linguistic distinction. Either term refers to an ordered 
 collection of items.

I don't even know what array means outside of programming (but then
again, English is not my native language).  However...

It is dangerous for anyone to infer the meaning of a technical term
based on the common meaning of the word.  The common meaning usually
helps in *remembering* the technical meaning, but that comes *after*
finding out what the technical meaning is.  This applies in any
technology or science, not just Haskell programming or programming in
general.

 Suppose that you learn a new computer language, and it happens to assign 
 special meanings to the words collection and group.

Those terms have a lot of meanings in technical jargon.

 You don't know this. So you start talking about groups as you do in
 every day English and people tell you that you're mixing up concepts.

Your mistake is the start talking about groups as you do in every day
English part.

 I guess that a more likely example in programming would be a language 
 that differentiates between functions, procedures and subroutines.

Well, most languages use function contrary to the everyday meaning of
the word.  Even functional in functional programming does not mean
what you'd think it means.  (Anybody else heard people shout But C *is*
a functional language!? - And I'm not talking about geeks who use the
FP style in C:)

-- 
Antti-Juhani Kaijanaho  http://antti-juhani.kaijanaho.info/

Blogi - http://kaijanaho.info/antti-juhani/blog/
 Toys - http://www.cc.jyu.fi/yhd/toys/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Specify array or list size?

2005-05-07 Thread Antti-Juhani Kaijanaho
On 20050507T212832+0200, Marcin 'Qrczak' Kowalczyk wrote:
  ISO 9899:1999 (C99) section 6.7.5.2:3 says that its type is array of
  int, not array of 50 ints:
 
 Ok, so in C terminology type is different from most statically typed
 languages in this respect. The dimension is used together with the
 type to determine static properties, and 6.7.5.2:4 says:
 
[#4]  For  two array types to be compatible, both shall have

Actually, that's 6.7.5.2:6.  It is the only place where array size is
truly used as part of the type.  In all other contexts, it is easily
interpretable as a property of the variable, and since the size of the
array is not otherwise used as a type attribute, it is fair to say that
it is not really a type attribute.  (Not in the Pascal sense, in any
case.)

 In both languages lvalueness is also not considered a part of the type
 but an alternative language presentation could use a wording where it is.

There are always alternative ways to present a language.

-- 
Antti-Juhani Kaijanaho  http://antti-juhani.kaijanaho.info/

Blogi - http://kaijanaho.info/antti-juhani/blog/
 Toys - http://www.cc.jyu.fi/yhd/toys/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: IO behaves oddly if used nested

2003-10-14 Thread Antti-Juhani Kaijanaho
On 20031004T181216+0100, Alastair Reid wrote:
 be careful to distinguish 'a value of type t' from 'a computation
 which returns a value of type t'i

I always found the idea of a computation as a value a little hard to
grasp.  Therefore, when I introduced monadic transput in my functional
programming course [1], I took the following approach: IO a is the type
of a program with an exit value of type a; return, fail, putChar and
getChar are primitive programs, and monadic transput is about combining
programs using (=).  The idea of denoting programs without executing
them seems natural (in contrast to denoting computations without
executing them).  Likewise, it seems natural that there is a special
mechanism for actually executing a program: either you give it to GHCi,
or you bind it to Main.main and compile the module (thus, the program
becomes synonymous with the expression that you bind to Main.main).

Up until now, nobody in my class seems to have had problems with this
mental model of monadic transput (of course, in grand tradition of
Finnish universities, a large subset of my students are not actually
attending sessions, so I wouldn't know about them until exam time).

[1] Advanced-level introduction to FP; students are advanced undergrads
or pre-master graduates.  They have a strong background in imperattive
programming, with the usual load of data structures and algorithms,
operating systems, automata and formal languages theory (and other stuff
depending on their tastes).

(Note that printing a program is also a natural idea, and likewise
natural is the idea that the output is unintelligible.)

-- 
Antti-Juhani Kaijanaho, FM (MSc), http://www.mit.jyu.fi/antkaij/
ohjelmistotekniikan assistentti* assistant in software engineering
Jyväskylän yliopisto   * University of Jyväskylä
Tietotekniikan laitos  * Dept. of Mathematical Inf. Tech.


signature.asc
Description: Digital signature
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: The Haskell 98 Report

2002-11-29 Thread Antti-Juhani Kaijanaho
[Resend, sorry for any duplicates you might get.]

On 20021129T102259-, Simon Peyton-Jones wrote:
 The copyright will still be (c) Simon Peyton Jones (as it has for some
 while; it has to be attached to someone or some thing),

AIUI, legally it is attached to everyone who has ever contributed
significant amounts of text to the report...

Anyway, I am very happy about the result.  As someone said, added value,
not monopolies :-)

And I will buy the book myself, and I will persuade the university
library to buy a copy or two too.  (Actually, I would have done that
anyway, but now I can do it without feeling quilty.)

-- 
Antti-Juhani Kaijanaho, LuK (BSc)* http://www.iki.fi/gaia/ * [EMAIL PROTECTED]
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: unsafeinterleaveIO

2000-06-01 Thread Antti-Juhani Kaijanaho

On Thu, Jun 01, 2000 at 03:34:10PM +1000, Manuel M. T. Chakravarty wrote:
 Antti-Juhani Kaijanaho [EMAIL PROTECTED] wrote,
 
  On Wed, May 31, 2000 at 12:06:00PM +1000, Manuel M. T. Chakravarty wrote:
   The one hole I am most concerned about is
   access to standard OS services and code written in other
   languages
  
  FWIW, C has the same problem, and yet n+1 programmers are happy with C
  (and its descendants).
 
 Why do you think, C has the same problem?

Like there is no way in Haskell 98 to access OS services beyond a certain
subset, there is no way in C90 or C99 to access OS services beyond a
certain subset.  Haskell's subset is actually larger than C's.

Like Haskell, C has no provisions for accessing code written in other
languages.

In both languages, if you want to access OS services beyond the
standardized subset, or if you want to access code written in other
languages, you need to go beyond the standard and use some things that
make your programs a little more unportable.

 In C, it is dead
 easy to access all OS services, because the standard API of
 most OSs is written in C anyway.

*Specified* in C.  AFAIK on many OS the actual call sequence for system
calls is not the usual C subroutine call sequence.

For example, on Linux on IA32, system calls are INT's, not CALL's.
That means that you cannot access the system calls in C without resorting
to either using the platform C library (which includes macros to generate
the inline INT's) or using some compiler-specific inline assembly to
create the proper call sequence.

 Moreover, C solved the
 problem of interfacing to other languages by becoming so
 ubiquitous that all other languages have to make sure that
 they have an interface for talking to C.

In other words, C has not solved the problem. 

 It's a bit like comparing Windoze and Linux.

On some circles this would be analoguous to invoking Gowdin's Law.

Understand this: I am not against improving the FFI of the Haskell
systems or making their FFIs compatible.  My point is that making the
FFI part if the language is not necessarily necessary.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%




Re: why software needs an explicit license

2000-03-15 Thread Antti-Juhani Kaijanaho

On Tue, Mar 14, 2000 at 01:57:23PM -0800, Richard Uhtenwoldt wrote:
 if you want to recoup the costs of your writing a program, then charge
 money for it.  if you decide not to try to recoup your costs, then
 please include an explicit license (like the GPL, the LGPL, or the BSD
 license) that gives your users permission to share with each other
 modified versions of the program.  (for more info, see opensource.org,
 gnu.org, news:gnu.misc.discuss.)

Or even better: do both.  There are several companies that make money
out of free software, and some of them do development (some are pure
support companies).  You will, of course, have to change your business
strategy for that to work: with free software, you don't have a monopoly
on the code.

-- 
Antti-Juhani Kaijanaho
http://www.iki.fi/gaia/



Re: FYI: ghc to be dropped from potato (debian)

2000-03-10 Thread Antti-Juhani Kaijanaho

On Fri, Mar 10, 2000 at 06:32:00AM -0500, Sengan wrote:
 http://www.debian.org/Lists-Archives/debian-devel-announce-0003/msg7.html

It already *has* been dropped.  Apparently the "sponsor" idea did not
work as well as it should have.

-- 
Antti-Juhani Kaijanaho
http://www.iki.fi/gaia/



Re: RE to Peyton-Jones

1999-11-29 Thread Antti-Juhani Kaijanaho

On Mon, Nov 29, 1999 at 03:06:07PM +0100, Marko Schuetz wrote:
 For those who do not like to read legalese this is a standard
 BSD license.

No it is not.  The standard BSD license includes an evil advertising
clause.  This one is thus better.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)



Re: RE to Peyton-Jones

1999-11-29 Thread Antti-Juhani Kaijanaho

On Mon, Nov 29, 1999 at 06:05:12PM +0100, Lennart Augustsson wrote:
 There are variants of the BSD license, some with an advertising clause,
 some without.  E.g., UCB, the originators of the BSD license, have removed
 their need for an advertising clause.

I know.  The point was that the original BSD license included it, and
that's the most standard BSD license you've got.

 And I don't think it's evil.  Do you think that people who write code deserve
 at least that much credit?

Do you really think that every advertisement for a product that uses
someone's code must contain a notice that this is so?  This may be
practical, if only one or two such notices are required.  Consider a
product that includes code from a hundred different contributors, all
requiring a different advertisement clause; an ad for this product would
necessarily be several pages long, and most of it would be a list of
contributor names.  A simple banner ad would be illegal.

Yes, a code author deserves credit, but the advertisement clause is just
an impractical way of enforcing that.

See http://www.gnu.org/philosophy/bsd.html for a more elaborate
explanation of this problem.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)



Re: Mailing lists down for a while, should be back up now

1999-09-27 Thread Antti-Juhani Kaijanaho

On Sun, Sep 26, 1999 at 11:18:41PM -0700, Ronald J. Legere wrote:
 
 I want to just second that one. haskell-newbies is a great idea

Please don't define lists by who'll use them.  Define them by the topic
of discussion.

I'd second haskell-help, for questions regarding the actual use of
the language.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)






Where would one use Maybe as a monad?

1999-09-27 Thread Antti-Juhani Kaijanaho

In the hopes that this list can also be used for stupid questions in
addition to the super smart ones, I have a stupid newbie question:

I think I understand the basics of monads: the IO monad is no longer a
mystery to me, I was able to write a toy set of monadic parser combinators
and use them for a toy project, and I can think of some situations where
it's handy think of lists monadically.

However, I note that Maybe is an instance of Monad.  What for?  I don't
mean why in the theoretic sense, I mean what good will this do to a
practical programmer.  Could somebody please post (or mail me directly)
a relatively down-to-earth piece of code where Maybe is used monadically -
or explain its usefulness in prose?

Thanks,
-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)






Re: Cryptarithm solver - Haskell vs. C++

1999-09-22 Thread Antti-Juhani Kaijanaho

On Wed, Sep 22, 1999 at 09:44:34AM +0200, Bjorn Lisper wrote:
 Sisal was an attempt to define precisely such a functional language. 
...
 no higher order functions

Uhh... have I misunderstood what functional programming is?  Isn't
higher-order function support a necessary part of every FP language?

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)





Re: What is a functional language? (Was: Re: Functional languages and ... (was: Cryptarithm solver ...))

1999-09-22 Thread Antti-Juhani Kaijanaho

On Wed, Sep 22, 1999 at 04:57:58PM +0100, D. Tweed wrote:
 Firstly let me check that we mean the same thing by _higher order
 functions, namely they are functions which return functions

... or take functions as parameters.  Such as map, foldr, iterate, etc.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)





What is a functional language? (Was: Re: Functional languages and ... (was: Cryptarithm solver ...))

1999-09-22 Thread Antti-Juhani Kaijanaho

On Wed, Sep 22, 1999 at 02:53:03PM +0100, Claus Reinke wrote:
 Functional programming, i.e., programming with functions, is possible in
 languages that do not support all features that have become common in
 many functional languages.
[eg. higher-order functions]

Well then, it appears that I have a mistaken idea of what functional
programming is.  Can you give me, to cure my ignorance, a few examples
of languages (preferably ones that are in use nowadays) that are *not*
functional and the reasons why this is so.  Is C functional, since it
is possible to program with functions in it?

 From the perspective of numerical programmers, you could also ask: Isn't
 compilation of high-level array operations into efficient code a
 necessary part of every useful (FP) language?

I would definitely agree with that question if you didn't refer to FP
in it.  You don't define FP as "useful", do you?

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)





Re: Monads in plain english (Was: Re: Licenses and Libraries)

1999-09-01 Thread Antti-Juhani Kaijanaho

Here's from someone who's still learning Haskell.

On Wed, Sep 01, 1999 at 03:24:48PM +0200, George Russell wrote:
 Thus all you 
 need to explain is "do" (which is in almost all respects identical to impure 
sequencing 
 constructs in impure languages), and the IO typeconstructor.

I had many problems writing programs in the do notation until I understood
the underlying (=).  Why?  For example, in imperative languages I
can rewrite

 a - b
 c - f a
 
as 

c - f b

In Haskell I can't.  Why?  b is of type IO something, whereas f expects a
non-monadic argument.  This confused me greatly, until I started thinking
of do as syntactic sugar for (=).  Thus, while "do" does help someone
who knows (=) to visualize the operations, you can never use do with
plain imperative intutition: for example, you can't think of "a - b"
as assignment (which is the immediate analogy for someone who does not
know monads well).  Therefore, even using "do" requires one to understand
the play with types and actions as values, and from there it's trivial
to get to (=).

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)





Re: Monads in plain english (Was: Re: Licenses and Libraries)

1999-09-01 Thread Antti-Juhani Kaijanaho

On Wed, Sep 01, 1999 at 08:26:09PM +0200, George Russell wrote:
 You only need (=)
 if you want to declare your own instance of Monad, which probably doesn't
 need to be in an introductory course.

I agree with your second point.  However, I use (=) for the same reason
I use (.) and why I often write C like this:

a = foo(bar(baz(xyzzy)));

So it comes down to personal preference.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)





Re: Monads in plain english (Was: Re: Licenses and Libraries)

1999-09-01 Thread Antti-Juhani Kaijanaho

On Wed, Sep 01, 1999 at 06:23:19PM +0200, George Russell wrote:
 It is indeed absolutely crucial to understand the difference between the
 types "IO a" and "a" (an "IO a" is a way of obtaining an a, an "a" _is_
 an a).  Also understand that in "do" expressions, "-" represents actually
 getting an "a" from an "IO a".

Indeed.  But if you get this far, understanding (=) quite trivial
(assuming you don't have problems with higher-order functions).
After all, do /is/ just simple syntactic sugar.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)





Re: Monads in plain english (Was: Re: Licenses and Libraries)

1999-09-01 Thread Antti-Juhani Kaijanaho

On Wed, Sep 01, 1999 at 11:16:05AM -0700, Nick Kallen wrote:
   a - b
   c - f a
 
  as
 
  c - f b
 
  In Haskell I can't.  Why?  b is of type IO something, whereas f expects a
  non-monadic argument.
 
 I don't see why this is any different from say, Pascal, where you can't:
 
 Writeln(Readln(a));

You don't?  My Pascal is rusty (I haven't written anything with it
in years), but IIRC ReadLn is a procedure and does not return a value.
The Haskell function getLine returns a value, and in the do notation

a - getLine

looks to the naive beginner like that value is put into the a variable.
Indeed, something is put there, which adds to the confusion.

In contrast, in Pascal, you can't IIRC write

   a := ReadLn;
   
Actually, if you could, then your

   WriteLn(ReadLn);
   
would be perfectly OK, which *again* adds to the confusion.  The Haskell
do notation looks like imperative code (and in particular the arrow
looks like assignment) but it behaves in many respects quite differently.

 This distinction is made clear if the programmer is aware of why he's using
 - and not =.

Yes.  By that time she could as well use (=).  We're talking about
whether do is better for the beginner than (=), not about the usefulness
of do to others.

 most imperative IO libraries make
 a similar distinction anyway since IO functions tend not to return values
 but modify a parameter (i.e., procedure vs. function is no worse!).

The procedure vs function distinction is very clear from the notation,
so it's not a valid point for comparison.

 Plus, you can just sidestep the whole issue: no explanation, just say that
 equality laws don't hold for -.

Equality laws do not hold for imperative assignment either.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

  ""
 (John Cage)





Re: Question

1999-08-23 Thread Antti-Juhani Kaijanaho

On Mon, Aug 23, 1999 at 11:12:15AM +0200, Marko Schuetz wrote:
 In some countries "If it isn't explicitly allowed it's forbidden"

In most countries, you mean.  This includes every country whose copyright
laws are based on the Berne convention.  I know the USA and Finland
are like this, and I believe it's also the case in all of the EU, too -
and in many other countries.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

   "... memory leaks are quite acceptable in many applications ..."
(Bjarne Stroustrup, The Design and Evolution of C++, page 220)





Re: Haskell 98

1999-07-12 Thread Antti-Juhani Kaijanaho

On Mon, Jul 12, 1999 at 07:48:30AM -0700, Simon Peyton-Jones wrote:
 Who owns the copyright? 

Technically, everybody who has contributed nontrivial amounts of text (not
ideas, but text).

 but given very free-wheeling permission to reproduce the report. 

I have one request.  Language definitions are usually good candidates for
rewriting them into user's guides and other such texts.  Therefore, I'd like
to see the Haskell language reports with a permission notice like this one:

Permission is granted by the authors to copy and
distribute this Report for any purpose, provided only that it is
reproduced in its entireity, including this Notice.  Modified
copies of this Report may be copied and distributed for any purpose,
provided that the copies are marked as such and they do not
claim to be a definition of the language Haskell.

This ensures the integrity of the definition, while allowing manual writers
to reuse the text.  I know that the GNU project has lamented the fact that
the specification of the C language is not freely modifiable; for that
reason we still lack a decent free manual for the C language.

 I hope that you find that acceptable.

It is, but I'd like you to consider my request.

-- 
%%% Antti-Juhani Kaijanaho % [EMAIL PROTECTED] % http://www.iki.fi/gaia/ %%%

   "... memory leaks are quite acceptable in many applications ..."
(Bjarne Stroustrup, The Design and Evolution of C++, page 220)





Re: Announcing Hugs 98

1999-06-20 Thread Antti-Juhani Kaijanaho

On Wed, Jun 02, 1999 at 10:45:38AM +0200, Sven Panne wrote:
 FYI: I've uploaded a Linux (libc6) RPM for Hugs98

I've uploaded a .deb of Hugs 98 to the Debian unstable distribution.
Those of us who use this "Potato" system, can upgrade (or install)
Hugs with

  apt-get update  apt-get install hugs hugs-doc

assuming that their Apt is correctly configured.  The binary requires
GNU Libc 2.1, so it will not work in "Slink" (Debian 2.1).  My upload
was with an i386 binary; binaries for other architectures will 
be provided as the build daemons catch up.

Bugs in this Debian packaging should be reported through the Debian Bug
Tracking System, for example via the "bug" or "reportbug" programs.  I will
forward the reports to hugs-bugs as needed.

-- 
Antti-Juhani Kaijanaho [EMAIL PROTECTED], a volunteer Debian developer
  Information on Debian: http://www.debian.org/
  Information on the Debian prepackaged version of Hugs:
   http://www.debian.org/Packages/unstable/interpreters/hugs.html