Ben Franksen [EMAIL PROTECTED] writes:
PS (completely off-topic, sorry): I've been using the collections library
throughout the project I must say it is a lot nicer to work with
I tried to Google for this, and ended up at
http://hackage.haskell.org/trac/ghc/wiki/CollectionClassFramework
Ketil Malde wrote:
Ben Franksen [EMAIL PROTECTED] writes:
PS (completely off-topic, sorry): I've been using the collections library
throughout the project I must say it is a lot nicer to work with
I tried to Google for this, and ended up at
[snip]
I recently withdrew from this project and offered up the libs I'd been
working on as they are for a new owner. Didn't get any takers though
(no surprises there!). I've always found the lack of apparent interest
in all this somewhat puzzling myself. It's not as if there's no latent
On Wed, 28 Nov 2007, Robert Dockins wrote:
FWIW, I find the same phenomenon with Edison. I get very little feedback
about it positive or negative; I really have no idea how many people are
using it. I guess people are more willing to roll their own data structures
or use the standard libs.
Lennart Augustsson wrote:
If you don't run into graphs you are either solving very peculiar
problems, or you don't recognize them when you see them. They are
everywhere.
I see lots of *trees*, but no general graphs. (As in, *data* structures
having cycles in them. My *code* is often
On 25 jun 2007, at 20.38, Andrew Coppin wrote:
Lennart Augustsson wrote:
If you don't run into graphs you are either solving very peculiar
problems, or you don't recognize them when you see them. They are
everywhere.
I see lots of *trees*, but no general graphs. (As in, *data*
If you don't run into graphs you are either solving very peculiar problems,
or you don't recognize them when you see them. They are everywhere.
On 6/22/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Dan Piponi wrote:
Andrew said:
True enough - but that's a rather specific task. I'm still not
It's not that broken, It was designed by people from the FP community. :)
On 6/21/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Brent Yorgey wrote:
OK, I don't even understand that syntax. Have they changed the Java
language spec or something?
Yes. As of version 5 (or 1.5, or
G'day.
Quoting Andrew Coppin [EMAIL PROTECTED]:
True enough - but that's a rather specific task.
There are a lot of rather specific tasks out there.
Cheers,
Andrew Bromage
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Dan Piponi wrote:
Andrew said:
True enough - but that's a rather specific task. I'm still not seeing
vast numbers of other uses for this...
Graphs are one of the most ubiquitous structures in the whole of
computer science. Whether you're representing dataflows, or decoding
error-correcting
Lennart Augustsson wrote:
It's not that broken, It was designed by people from the FP community. :)
OMG... A Java feature designed by people who know stuff about stuff?
Next thing they'll implement real multiple inheritance or something... ;-)
___
Calvin Smith wrote:
Andrew Coppin wrote:
True enough - but that's a rather specific task. I'm still not seeing
vast numbers of other uses for this...
You can see lots of applications for graphs at the following page:
http://www.graph-magics.com/practic_use.php
I see a pattern here - these
Andrew said:
I see *trees* around the place a lot, but not general graphs.
A link discussing the application of graph theory for each of the
examples I gave. In each case the structure used is not a tree.
http://citeseer.ist.psu.edu/wiberg96codes.html
Tillmann Rendel wrote:
Andrew Coppin wrote:
[...] type (a,b) [...]
That's a rather special type; I haven't seen anything remotely like
it in any other language.
This type isn't that special in Haskell (apart from being
syntax-sugared), it could be defined as
data Pair a b = Pair a b
public class PairA, B {
public A fst;
public B snd;
public Pair(A fst, B snd) {
this.fst = fst;
this.snd = snd;
}
}
OK, I don't even understand that syntax. Have they changed the Java
language spec or something?
Yes. As of version 5 (or 1.5, or whatever you want to
Brent Yorgey wrote:
OK, I don't even understand that syntax. Have they changed the Java
language spec or something?
Yes. As of version 5 (or 1.5, or whatever you want to call it), Java
has parametric polymorphism. Do a Google search for Java generics.
OMG - they actually added
Andrew Coppin wrote:
Dan Piponi wrote:
On 6/20/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Yes... graph and network are virtually synonymous. I'm still
wondering what you'd use a network for in a computer program.
Writing a Haskell compiler.
True enough - but that's a rather specific task.
Andrew Coppin wrote:
I don't even understand that... :-S
Ok, I'll try to explain it:
I represent sets by their characteristic function, wich returns True for
members of the set, and False for other values.
type Set a = a - Bool
For example, the set of numbers containing only 42 is
On Tue, 19 Jun 2007, Andrew Coppin wrote:
Maybe it's just a culture thing then... In your typical OOP language, you
spend five minutes thinking now, what collection type shall I use here?
before going on to actually write the code. In Haskell, you just go OK, so
I'll put a list here...
I
David House wrote:
Andrew Coppin writes:
Data.Graph -- graph type
What would you use that for? (And what does it do?)
It's for graphs, in the graph-theory [1] sense.
Yes, I realise that. (I'm not a graph theory expert, but I'm aware of
the subject.) But what kind of thing
Hello Chaddai,
Wednesday, June 20, 2007, 3:14:54 PM, you wrote:
Well lists are really useful, but I don't think all Haskell
programmers are like you, in fact I think only the enthusiast newbies
(like.. you maybe ?) only use lists without asking themselves if there
is not a data structure
I don't think the collection type (a,b) is best thought of as a loop.
Neither is a (non-trivial) tree.
On 6/20/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Derek Elkins wrote:
On Tue, 2007-06-19 at 18:49 -0400, Brandon S. Allbery KF8NH wrote:
Haskell is, in many ways, a descendant of Lisp.
Derek Elkins wrote:
On Tue, 2007-06-19 at 18:49 -0400, Brandon S. Allbery KF8NH wrote:
Haskell is, in many ways, a descendant of Lisp. This does tend to
lead to lists being *the* collection type, in my experience: sure,
others get used, but lists are the ones you see in examples and
Just a couple of examples: many non-trivial program analyses (like
optimizations or type-inference) rely on viewing the AST as a graph.
Graph reduction is an evaluation paradigm, and I'm guessing that a
(specification-oriented) interpreter might use a graph.
On 6/20/07, Andrew Coppin [EMAIL
Andrew Coppin wrote:
But what kind of thing would you use a general graph for?
(Rather than some more specific custom data type.)
Representing networks.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Albert Y. C. Lai wrote:
Andrew Coppin wrote:
But what kind of thing would you use a general graph for? (Rather
than some more specific custom data type.)
Representing networks.
Yes... graph and network are virtually synonymous. I'm still
wondering what you'd use a network for in a computer
Lennart Augustsson wrote:
I don't think the collection type (a,b) is best thought of as a loop.
True. That's a rather special type; I haven't seen anything remotely
like it in any other language.
Neither is a (non-trivial) tree.
Erm... Depends on your idea of loop I suppose.
A tree
On 6/21/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Lennart Augustsson wrote:
I don't think the collection type (a,b) is best thought of as a loop.
True. That's a rather special type; I haven't seen anything remotely
like it in any other language.
Is it that special? How is it different to
On Wednesday 20 June 2007 20:04:25 Andrew Coppin wrote:
Lennart Augustsson wrote:
I don't think the collection type (a,b) is best thought of as a loop.
True. That's a rather special type; I haven't seen anything remotely
like it in any other language.
Are you referring to a 2-tuple/pair?
On 6/20/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Yes... graph and network are virtually synonymous. I'm still
wondering what you'd use a network for in a computer program.
Writing a Haskell compiler. http://en.wikibooks.org/wiki/Haskell/Graph_reduction
--
Dan
Andrew Coppin wrote:
[...] type (a,b) [...]
That's a rather special type; I haven't seen anything remotely
like it in any other language.
This type isn't that special in Haskell (apart from being
syntax-sugared), it could be defined as
data Pair a b = Pair a b
The equivalent of this
When I was at university, we learned a programming language known as
Smalltalk. I was rather good at it. [Ironically, making small talk is
one of the things I do worst IRL! But anyway, back to the topic...]
In Smalltalk, there is a wide selection of collection types, all with
different
On Tue, Jun 19, 2007 at 07:26:20PM +0100, Andrew Coppin wrote:
However, Haskell only has 1 type of collection: linked lists. (And only
single-linked at that.) While other normal programming languages spend
huge amounts of effort trying to select exactly the right collection
type for the
I'm not a Haskell guru but I think I can answer this...
On Tuesday 19 June 2007 19:26:20 Andrew Coppin wrote:
In Smalltalk, there is a wide selection of collection types, all with
different facilities and efficiency trade offs. There is bag, set, list,
array, ordered list, dictionary, hash
On Tue, 19 Jun 2007 19:26:20 +0100
Andrew Coppin [EMAIL PROTECTED] wrote:
When I was at university, we learned a programming language known as
Smalltalk. I was rather good at it. [Ironically, making small talk
is one of the things I do worst IRL! But anyway, back to the topic...]
In
On 6/19/07, Andrew Coppin [EMAIL PROTECTED] wrote:
However, Haskell only has 1 type of collection: linked lists. (And only
single-linked at that.) While other normal programming languages spend
huge amounts of effort trying to select exactly the right collection
type for the task in hand,
I don't know where you got the notion that such structures are not
available in Haskell. There are many efficient data structures in the
libraries. Lists are not magical, just popular, natural, and
traditional. Specialized data structures are always important.
Take a look at the Data.* modules
Andrew Coppin writes:
However, Haskell only has 1 type of collection: linked lists. (And only
single-linked at that.)
Woah there, what about:
Data.Map -- lookup tables
Data.Array -- lookup tables with enumerated keys. Mutable interfaces are also
available.
Data.Sequence -- two-ended
On Tue, 19 Jun 2007, Andrew Coppin wrote:
In Smalltalk, there is a wide selection of collection types, all with
different facilities and efficiency trade offs. There is bag, set, list,
array, ordered list, dictionary, hash table, weak array, etc. A whole
menagerie of collection types.
Adam Turoff wrote:
- Data.Map (more commonly known as 'dictionaries')
Ah yes, I've heard about this one.
- Data.HashTable (same idea, different runtime characteristics)
Well, you learn something every day... (And that, of course, is the
reason for asking questions in the first place!)
Nicolas Frisby wrote:
I don't know where you got the notion that such structures are not
available in Haskell. There are many efficient data structures in the
libraries. Lists are not magical, just popular, natural, and
traditional. Specialized data structures are always important.
Mmm, OK.
Hallo,
On 6/19/07, Andrew Coppin [EMAIL PROTECTED] wrote:
However, Haskell only has 1 type of collection: linked lists. (And only
single-linked at that.) While other normal programming languages spend
huge amounts of effort trying to select exactly the right collection
type for the task in
Take a look at
http://www.haskell.org/ghc/docs/latest/html/libraries/index.html
There are more elsewhere.
I am actually amazed that we have a comprehensive, widely-distributed
package for graphs and graph algorithms. I can't say the same about
other programming communities (they tend to
Jens Fisseler wrote:
The equivalent of Haskell's list data type would be the array type of most
imperative or object-oriented languages. Both are some sort of basic
collection type, good for their own sake, but if you want more
specialized collection types, you have to implement them.
*Albert Y. C. Lai wrote:
*
I am actually amazed that we have a comprehensive, widely-distributed
package for graphs and graph algorithms. I can't say the same about
other programming communities (they tend to re-implement it every time).
Yeah... pitty the documentation isn't more
I'm afraid I must agree with you a little. Many people use lists when a
different data structure would have been better. It's a pity, because
Haskell provides a large number of different data structures.
On 6/19/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Jens Fisseler wrote:
The equivalent
Andrew Coppin writes:
Data.Graph -- graph type
What would you use that for? (And what does it do?)
It's for graphs, in the graph-theory [1] sense. The referenced page gives a list
of example problems in the area, most of which are very practical.
[1]:
On Jun 19, 2007, at 16:23 , Andrew Coppin wrote:
Jens Fisseler wrote:
The equivalent of Haskell's list data type would be the array type
of most imperative or object-oriented languages. Both are some
sort of basic collection type, good for their own sake, but if you
want more specialized
Andrew Coppin writes:
Maybe it's just a culture thing then... In your typical OOP language,
you spend five minutes thinking now, what collection type shall I use
here? before going on to actually write the code. In Haskell, you just
go OK, so I'll put a list here...
The design stage of
On Tue, 2007-06-19 at 18:49 -0400, Brandon S. Allbery KF8NH wrote:
On Jun 19, 2007, at 16:23 , Andrew Coppin wrote:
Jens Fisseler wrote:
The equivalent of Haskell's list data type would be the array type
of most imperative or object-oriented languages. Both are some
sort of basic
A lot of people have had comments on this thread, but I have a off-hand
question: what data types are required by the 98 standard? I figured it
was just lists tuples because they have syntactic support, but is that
true?
Thanks,
Creighton
___
On Tue, Jun 19, 2007 at 06:42:22PM -0500, Creighton Hogg wrote:
A lot of people have had comments on this thread, but I have a off-hand
question: what data types are required by the 98 standard? I figured it
was just lists tuples because they have syntactic support, but is that
true?
52 matches
Mail list logo