[ TLDR: How do you do Lisp symbols in Haskell? ]
What is the Haskell approach to efficient comparison and lookup of
objects by their identity?
Maybe a toy example would help to explain what I mean.
Imagine that I want to use Haskell to maximize happiness in a
situation where a bunch of
On Thu, May 26, 2011 at 04:45, Jacek Generowicz jacek.generow...@cern.chwrote:
What is the Haskell approach to efficient comparison and lookup of objects
by their identity?
ghc uses Data.Unique to generate unique internal identifiers to associate
with things. (Think gensym. Hm, except last
On 26 May 2011 10:45, Jacek Generowicz jacek.generow...@cern.ch wrote:
What is the Haskell approach to efficient comparison and lookup of objects
by their identity?
Often you just provide your own and implement Eq.
I should be able to run the program on data that becomes available at run
On 2011 May 26, at 11:12, Brandon Allbery wrote:
On Thu, May 26, 2011 at 04:45, Jacek Generowicz jacek.generow...@cern.ch
wrote:
What is the Haskell approach to efficient comparison and lookup of
objects by their identity?
ghc uses Data.Unique to generate unique internal identifiers to
On 2011 May 26, at 11:16, Christopher Done wrote:
On 26 May 2011 10:45, Jacek Generowicz jacek.generow...@cern.ch
wrote:
What is the Haskell approach to efficient comparison and lookup of
objects
by their identity?
Often you just provide your own and implement Eq.
I should be able to
On Thu, May 26, 2011 at 05:41, Jacek Generowicz jacek.generow...@cern.chwrote:
On 2011 May 26, at 11:12, Brandon Allbery wrote:
(Think gensym. Hm, except last time I did anything serious with Lisp, it
was Maclisp... does gensym even still exist, or did CL do something
inscrutable with it?)
Hello,
Could anyone help me understand what is wrong with the definition of f2 in
the code below?
class C a b where
convert :: a - b
convertToInt :: (C a Int) = a - Int
convertToInt x = convert x
f1 x = convertToInt x
f2 = \x - convertToInt x
f3 :: (C a Int) = a - Int
f3 = \x -
fltk definitely has some good points, but I've always found it hideously
ugly. Of course the default gtk on osx is ugly too, but some of the
available themes are nice.
However, getting gtk with OpenGL on osx was fairly easy. Everything worked
out of the box except gtkglext (Haskell package).
The problem is the monomorphism restriction:
http://www.haskell.org/haskellwiki/Monomorphism_restriction
http://www.haskell.org/ghc/docs/7.0.2/html/users_guide/monomorphism.html
http://stackoverflow.com/questions/tagged/monomorphism-restriction
On Thu, May 26, 2011 at 06:01, jean-christophe mincke
jeanchristophe.min...@gmail.com wrote:
f1 x = convertToInt x
f2 = \x - convertToInt x
Absent useful things like error messages, I'll assume that you tripped
over the monomorphism restriction. That is, when you have a name that
doesn't take
On Thu, May 26, 2011 at 06:10, Christopher Done
chrisd...@googlemail.com wrote:
This kicks everyone in the butt at least once. It would be good if GHC
could point it out, as mine (6.12.3) just complains about no instance.
Maybe GHC7 does point it out. It's a waste of people's time otherwise.
I
On 2011 May 26, at 11:59, Brandon Allbery wrote:
On Thu, May 26, 2011 at 05:41, Jacek Generowicz jacek.generow...@cern.ch
wrote:
On 2011 May 26, at 11:12, Brandon Allbery wrote:
(Think gensym. Hm, except last time I did anything serious with
Lisp, it was Maclisp... does gensym even still
On 2011 May 26, at 11:59, Jacek Generowicz wrote:
(I imagine that a Sufficiently Smart Compiler could reduce (==) ::
Person Person to just integer comparison.)
Sorry, I meant
(==) :: Person - Person - Bool
in the above.
___
Haskell-Cafe
How do I compile and run this parallel program?
Michael
===
import Control.Parallel
nfib :: Int - Intnfib n | n = 1 = 1 | otherwise = par n1 (seq n2 (n1 +
n2 + 1)) where n1 = nfib (n-1) n2
= nfib (n-2)
{-nfib :: Int -
On Thursday 26 May 2011 13:24:09, michael rice wrote:
How do I compile and run this parallel program?
Michael
===
import Control.Parallel
nfib :: Int - Int
nfib n | n = 1 = 1
| otherwise = par n1 (seq n2 (n1 + n2 + 1))
The 'seq' here should be a 'pseq'
On 25/05/11 10:00, Jonas Almström Duregård wrote:
As an equivalent to:
f (x a) (y b) (z c)
Of course my intention is that the new keyword should initiate layout
syntax so we can write this:
f applied to
x a
y b
z c
Here's a (tongue-in-cheek) trick that allows for layout close to
Thank, Daniel
Multiple threads are in evidence in my system monitor, but I wonder why I'm
getting two different answers, one twice the other. The first is the parallel
solution and the second is the non.
Michael
===
{-import Control.Parallel
nfib :: Int - Intnfib n | n = 1 = 1 |
On Thursday 26 May 2011 14:35:41, Neil Brown wrote:
foo is the function we want to apply, and eg shows how to apply it in
do-notation with an argument on each line. I couldn't manage to remove
the r$ at the beginning of each line, which rather ruins the whole
scheme :-( On the plus side,
2011/5/26 michael rice nowg...@yahoo.com
Thank, Daniel
Multiple threads are in evidence in my system monitor, but I wonder why I'm
getting two different answers, one twice the other. The first is the
parallel solution and the second is the non.
Why do you add n1+n2+1 in the parallel
From: michael rice, Thursday, May 26, 2011
Subject: Re: [Haskell-cafe] Parallel compilation and execution?
Thank, Daniel
Multiple threads are in evidence in my system monitor, but I wonder why I'm
getting two different answers, one twice the other. The first is the parallel
solution and the
Fair question. I copied the parallel version from:
http://www.haskell.org/ghc/docs/6.6/html/users_guide/lang-parallel.html
but pulled the non-parallel version from a text.
Michael
--- On Thu, 5/26/11, David Virebayre dav.vire+hask...@gmail.com wrote:
From: David Virebayre
Based on the description it looks like you could be looking for:
http://hackage.haskell.org/package/simple-atom
G
On Thu, May 26, 2011 at 10:45 AM, Jacek Generowicz
jacek.generow...@cern.ch wrote:
[ TLDR: How do you do Lisp symbols in Haskell? ]
What is the Haskell approach to efficient
2011/5/26 Jacek Generowicz jacek.generow...@cern.ch:
On 2011 May 26, at 11:16, Christopher Done wrote:
On 26 May 2011 10:45, Jacek Generowicz jacek.generow...@cern.ch wrote:
What is the Haskell approach to efficient comparison and lookup of
objects
by their identity?
Often you just
That's a useful operator! Unfortunately it does not play nice with $. Of
less importance: some syntactic constructs can not appear in the arguments
without parenthesis, let bindings for instance (although lambda abstraction
works parenthesis-free).
Also I'm not sure this can be used for defining
On Thursday 26 May 2011 17:22:10, Jonas Almström Duregård wrote:
Unfortunately it does not play nice with $.
Yes.
Also I'm not sure this can be used for defining trees or nested function
application since a nesting of the operator inevitably require
parenthesis.
It can't be nested, like ($)
folks:
I was advised to post this request here. This is about needs of daily-grind
enterprise development.
Enterprise developers need 3 categories of books in Haskell urgently:
(i) Haskell (CookBooks / Recipes)
(ii) Haskell Enterprise Development i.e. how to connect commercial
RDBMS and use
On Thu, May 26, 2011 at 9:45 AM, Srinivasan Balram
srinivasan_bal...@marlabs.com wrote:
folks:
I was advised to post this request here. This is about needs of daily-grind
enterprise development.
Enterprise developers need 3 categories of books in Haskell urgently:
(i) Haskell (CookBooks /
While it's not a solution (yet) for a book, would a section or special
section in the wiki be appropriate at least in the beginning? Our small
company has been collecting cookbook-like recipies and best practices
for a while now but definitely not anything close to as polished or
collated as a
On Thu, May 26, 2011 at 11:17 AM, Clint Moore cl...@ivy.io wrote:
While it's not a solution (yet) for a book, would a section or special
section in the wiki be appropriate at least in the beginning? Our small
company has been collecting cookbook-like recipies and best practices
for a while
On Thu, May 26, 2011 at 10:57:42AM -0700, Jason Dagit wrote:
Database connectivity is a weakspot still. Haskell developers don't
seem to use databases nearly as often as Java developers. We have
several libraries for this, takusen and hdbc come to mind. Real-World
Haskell documents using
On Thu, May 26, 2011 at 7:45 PM, Srinivasan Balram
srinivasan_bal...@marlabs.com wrote:
folks:
I was advised to post this request here. This is about needs of daily-grind
enterprise development.
Enterprise developers need 3 categories of books in Haskell urgently:
(i) Haskell (CookBooks /
On 26/05/2011 10:59 AM, Jacek Generowicz wrote:
Any comments on the relative efficiency of the above as compared to
A == B in the context of
data Foo = A | B | C | D | ... lots more ...
?
(I imagine that a Sufficiently Smart Compiler could reduce (==) ::
Person Person to just integer
2011/5/26 Daniel Fischer daniel.is.fisc...@googlemail.com
As far as I'm concerned, a left-associative version of ($) would sometimes
be nice (on the other hand, right-associativity of ($) is sometimes also
nice), but usually, I don't find parentheses too obnoxious.
I have a whole set of
On Thu, May 26, 2011 at 14:56, Andrew Coppin
andrewcop...@btinternet.com wrote:
My understanding is that if you have a constructor with no fields, it gets
allocated as a compile-time constant. In other words, C is just a pointer
to a static data structure somewhere in the program binary, and
On 26/05/2011 07:56 PM, Andrew Coppin wrote:
On 26/05/2011 10:59 AM, Jacek Generowicz wrote:
Any comments on the relative efficiency of the above as compared to
A == B in the context of
data Foo = A | B | C | D | ... lots more ...
?
(I imagine that a Sufficiently Smart Compiler could
Without support for at least extensible records and better GUI
integration, you'd have a hard time convincing me to use Haskell for
enterprise applications (and I use Haskell every day).
It's not that Haskell isn't a fine language, it's just that doesn't
have sufficient advantage on the
On Thu, May 26, 2011 at 1:09 PM, Gaius Hammond ga...@gaius.org.uk wrote:
On 26 May 2011, at 19:22, Clint Moore wrote:
On Thu, May 26, 2011 at 10:57:42AM -0700, Jason Dagit wrote:
Database connectivity is a weakspot still. Haskell developers don't
seem to use databases nearly as often as
On 26 May 2011, at 21:34, Jason Dagit wrote:
On Thu, May 26, 2011 at 1:09 PM, Gaius Hammond ga...@gaius.org.uk
wrote:
Over in OCaml-land, I have taken it upon myself to address this:
http://gaiustech.github.com/ociml/
Takusen already supports Oracle (and other rdbms) in a resource
On Wed, May 25, 2011 at 4:02 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 26 May 2011 08:49, wren ng thornton w...@freegeek.org wrote:
On 5/25/11 1:03 PM, Bryan O'Sullivan wrote:
On Wed, May 25, 2011 at 5:59 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Well,
On Thu, May 26, 2011 at 1:43 PM, Gaius Hammond ga...@gaius.org.uk wrote:
On 26 May 2011, at 21:34, Jason Dagit wrote:
On Thu, May 26, 2011 at 1:09 PM, Gaius Hammond ga...@gaius.org.uk wrote:
Over in OCaml-land, I have taken it upon myself to address this:
http://gaiustech.github.com/ociml/
As you my friend I invite you to visit my own site first!.
http://prospero.ch/friends_links.php?uGIS=45ru4
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Are the tools of Control.Parallel comparable to OpenMP?
Michael
--- On Thu, 5/26/11, michael rice nowg...@yahoo.com wrote:
From: michael rice nowg...@yahoo.com
Subject: Re: [Haskell-cafe] Parallel compilation and execution?
To: David Virebayre dav.vire+hask...@gmail.com
Cc: Daniel Fischer
I just discovered that some evil spammer has somehow gotten my contacts list
and
used it to send out a bunch of spam. This is just to notify you that if you
get
an email from me on May 26, 2011 (other than this one or one like it - the
problem was more extensive than I first thought) it
Hi all,
I'm working on a program right now that will involve embedding some
static files inside my Haskell program as bytestrings. I've done this
in the past with file-embed[1]. In this case, I have a strange
requirement: I need to be able to modify the embedded data after the
compiler has run.
44 matches
Mail list logo