Alberto,
On Tue, Jan 12, 2010 at 7:17 PM, Alberto G. Corona agocor...@gmail.com wrote:
Hi,
I sometimes strumble on the same quiestion that forces me to insert
functions that process objects of a certain class inside their class
definition. This occurs when a computation uses the object
On Wed, Dec 16, 2009 at 11:27 AM, Don Stewart d...@galois.com wrote:
[...]
The bug described in Ticket #650, AFAICS, prevents implementation of a
reasonable, generic hash table in Haskell. :-(
You can certainly implement it, it just requires that you increase the
heap size to a bit bigger
Bulat,
On Tue, Dec 15, 2009 at 1:51 AM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello Brad,
Tuesday, December 15, 2009, 1:55:41 AM, you wrote:
How about a fast STHashTable?
you can use array of arrays instead of large array
--
Best regards,
Bulat
On Tue, Dec 15, 2009 at 11:00 AM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello Brad,
Tuesday, December 15, 2009, 6:53:14 PM, you wrote:
How about a fast STHashTable?
you can use array of arrays instead of large array
Can you elaborate?
what exactly? how to implement this or
On Tue, Dec 15, 2009 at 11:33 AM, Serguey Zefirov sergu...@gmail.com wrote:
If the number of buckets was fixed, one could use an array of STRefs
to lists. I believe this would avoid the bug from Ticket #650?
now i see what you mean. no, i mean trivial transformation. #650 says
about slow GC.
On Tue, Dec 15, 2009 at 12:00 PM, Gregory Collins
g...@gregorycollins.net wrote:
Bulat Ziganshin bulat.zigans...@gmail.com writes:
now i see what you mean. no, i mean trivial transformation. #650 says
about slow GC. why it's slow? because once you made any update to the
array, the entire
Serguey,
On Tue, Dec 15, 2009 at 1:07 PM, Serguey Zefirov sergu...@gmail.com wrote:
now i see what you mean. no, i mean trivial transformation. #650 says
about slow GC. why it's slow? because once you made any update to the
array, the entire array is marked as updated and scanned on next minor
Is anyone working on fixing ticket #650
http://hackage.haskell.org/trac/ghc/ticket/650? In short, STArray
and the garbage collector don't play well together, resulting in array
updates being non-constant time operations. This bug makes it very
difficult/impossible to write efficient array
Don,
On Mon, Dec 14, 2009 at 4:16 PM, Don Stewart d...@galois.com wrote:
brad.larsen:
Is anyone working on fixing ticket #650
http://hackage.haskell.org/trac/ghc/ticket/650? In short, STArray
and the garbage collector don't play well together, resulting in array
updates being non-constant
On Mon, Dec 14, 2009 at 4:34 PM, Don Stewart d...@galois.com wrote:
brad.larsen:
The vector package on haskell has boxed arrays. Is DPH *really* only
for primitive, unboxed types? If so, that's unfortunate.
No, it's not only, but all the uses I've seen have been related to
numerics,
On Tue, Nov 17, 2009 at 4:00 PM, michael rice nowg...@yahoo.com wrote:
Hi Gregory,
I was wondering about that, because of the following:
[1 of 1] Compiling Main ( hash1.hs, interpreted )
Ok, modules loaded: Main.
*Main ht - new (==) dummy :: IO MyHashTable
*Main dummy mike
7
On Tue, Nov 17, 2009 at 4:22 PM, michael rice nowg...@yahoo.com wrote:
So, what you're telling me is, my dummy hash function IS being used, and
because of collisions the other values are placed in different locations?
Michael
[...]
If Data.HashTable is implemented using separate chaining,
On Tue, Nov 10, 2009 at 8:20 PM, Gokul P. Nair gpnai...@yahoo.com wrote:
--- On Sat, 11/7/09, Don Stewart d...@galois.com wrote:
General notes:
* unpack is almost always wrong.
* list indexing with !! is almost always wrong.
* words/lines are often wrong for parsing large files
On Tue, Oct 13, 2009 at 3:37 AM, Simon Peyton-Jones
simo...@microsoft.com wrote:
[...]
It's also worth noting that while undecidable instances sound scary, but
all it means is that the type checker can't prove that type inference will
terminate. We accept this lack-of-guarantee for the
-Milner type inference, for
that matter? (Haskell 98 is not quite Hindley-Milner?)
Sincerely,
Brad Larsen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, Oct 13, 2009 at 12:32 PM, Serguey Zefirov sergu...@gmail.com wrote:
2009/10/13 Lennart Augustsson lenn...@augustsson.net:
Yes, there are simple H-M examples that are exponential.
x0 = undefined
x1 = (x1,x1)
x2 = (x2,x2)
x3 = (x3,x3)
...
xn will have a type with 2^n type variables
Suppose we implement type-level naturals as so:
data Zero
data Succ a
Then, we can reflect the type-level naturals into a GADT as so (not
sure if ``reflect'' is the right terminology here):
data Nat :: * - * where
Zero :: Nat Zero
Succ :: Nat a - Nat (Succ a)
Using type families, we can
On Sat, Oct 10, 2009 at 5:11 PM, Don Stewart d...@galois.com wrote:
brad.larsen:
John,
On Thu, Oct 8, 2009 at 3:20 PM, John A. De Goes j...@n-brain.net wrote:
[...]
JVM is cross-platform, and contains sufficient typing information to
permit one to write something like, import foreign jvm
On Mon, Oct 5, 2009 at 10:36 AM, Miguel Mitrofanov
miguelim...@yandex.ru wrote:
[...]
Of course, it's OK to call anything numbers provided that you stated
explicitly what exactly you would mean by that. But then you have to drop
all kind of stuff mathematicians developed for the usual notion of
Don,
On Mon, Sep 28, 2009 at 11:52 PM, Don Stewart d...@galois.com wrote:
brad.larsen:
On Mon, Sep 28, 2009 at 11:11 PM, Hong Yang hyang...@gmail.com wrote:
[...]
Maybe later on we can add an Example section to Description, Synopsis, and
Documentation sections produced by Haddock.
On Mon, Sep 28, 2009 at 11:11 PM, Hong Yang hyang...@gmail.com wrote:
[...]
Maybe later on we can add an Example section to Description, Synopsis, and
Documentation sections produced by Haddock.
Also, having a section for comments is helpful. This is the case especially
when there are several
On Sun, Sep 27, 2009 at 5:29 PM, Louis Wasserman
wasserman.lo...@gmail.com wrote:
I'd like to see something resembling as-patterns in type signatures.
Specifically, there are cases where I'm inclined to use
(m ~ pat) in a type context when m isn't otherwise constrained, just so I
can use m as
Edward,
On Sat, Sep 26, 2009 at 11:41 AM, Edward Kmett ekm...@gmail.com wrote:
I would just like to add that Oleg and Chung-chieh made sure in their
finally tagless paper to use monomorphic lifting of literals explicitly to
avoid this sort of ambiguity. Using Num or another typeclass is fine
Oleg,
On Thu, Sep 24, 2009 at 1:54 AM, o...@okmij.org wrote:
The topic of an extensible, modular interpreter in the tagless final
style has come up before. A bit more than a year ago, on a flight from
Frankfurt to San Francisco I wrote two interpreters for a trivial
subset of Haskell or ML
modules, without having to go back and change the EDSL definition.
Regards,
Bradford Larsen
On Sep 24, 2009 2:15 AM, Luke Palmer lrpal...@gmail.com wrote:
On Wed, Sep 23, 2009 at 10:24 PM, Brad Larsen brad.lar...@gmail.com wrote:
On Wed, Sep 23, 2009 ...
I would like to see an example
Bruno,
On Thu, Sep 24, 2009 at 1:20 AM, Bruno Oliveira br...@ropas.snu.ac.kr wrote:
Hello Brad,
I believe that the problem you encountered is not quite the expression
problem (which is about adding new constructors and functions modularly),
but rather about refining *existing* constructs
Wren,
On Thu, Sep 24, 2009 at 8:36 PM, wren ng thornton w...@freegeek.org wrote:
Brad Larsen wrote:
The modularity problem I speak of is that to add a new interpretation of
the
DSL, I will likely have to modify the EDSL definition to add additional
constraints. Ideally, I would like
I seem to have run into an instance of the expression problem [1], or
something very similar, when experimenting with ``finally tagless''
EDSLs, and don't see a good way to work around it.
I have been experimenting with embedded DSLs, using the techniques
described in a couple recent papers
Luke,
On Wed, Sep 23, 2009 at 11:12 PM, Luke Palmer lrpal...@gmail.com wrote:
On Wed, Sep 23, 2009 at 7:59 PM, Brad Larsen brad.lar...@gmail.com wrote:
The trouble comes in when defining a more general arithmetic
expression type class. Suppose we want polymorphic arithmetic
expressions
Luke,
On Wed, Sep 23, 2009 at 11:12 PM, Luke Palmer lrpal...@gmail.com wrote:
On Wed, Sep 23, 2009 at 7:59 PM, Brad Larsen brad.lar...@gmail.com wrote:
The trouble comes in when defining a more general arithmetic
expression type class. Suppose we want polymorphic arithmetic
expressions
Peter,
On Thu, Sep 24, 2009 at 12:22 AM, Peter Gammie pete...@gmail.com wrote:
[...]
Ambiguity is IMHO best handled with a judicious application of type (or
data) families, but you can get surprisingly far by simply requiring that
every class member mention all type variables in the class
I had the same issue, using the ghc 6.10.4 generic linux tarball on Ubuntu
Jaunty x86_64. I attempted to install a newer Haskell Platform over the
older one.
I'm not sure what causes the issue. After several attempts to remedy it
without success, I ended up completely reinstalling ghc and
soon, nor Python compile-time type inference.
I think perl6 is specced with pervasive laziness, although I'm not
sure it's actually implemented anywhere.
I'm not sure about pervasive, but I read somewhere that Perl 6's lists are
head-strict, tail-lazy by default...
Regards,
Brad Larsen
Regards,
Brad Larsen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
typeclasses to me, but perhaps the similarity is
merely superficial. :-)
Regards,
Brad Larsen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
' from Data.List is strict in its function argument, and is probably what
you want.
See also http://www.haskell.org/haskellwiki/Stack_overflow.
Regards,
Brad Larsen
On Sun, 03 Aug 2008 07:06:40 -0400, Arie Groeneveld [EMAIL PROTECTED] wrote:
Sorry, should go the forum.
Ok, thanks
Vasili,
You respond to whatever message interests you, just like normal email.
Make sure the message is CC'd or addressed to
haskell-cafe@haskell.org to allow everyone to see it.
Regards,
Brad Larsen
2008/7/31 Galchin, Vasili [EMAIL PROTECTED]:
Hello,
What do I do to do a followup
to the Corey's perl version:
$ time perl Sum.pl
Duration (sec): 3155.6266438
real0m0.181s
user0m0.164s
sys 0m0.012s
Regards,
Brad Larsen
On Wed, 23 Jul 2008 15:01:24 -0400, Don Stewart [EMAIL PROTECTED] wrote:
coreyoconnor:
I have the need to regularly write tiny programs that analyze
).
Regards,
Brad Larsen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
want, preferably without using ghc extensions?
Thanks!
Brad Larsen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
described with 'b'
instead of 'a'?
Cheers,
Brad Larsen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sun, 23 Dec 2007 06:42:52 -0500, Neil Mitchell [EMAIL PROTECTED]
wrote:
Hi Brad,
Experience has taught me to _never_ put class contexts on data
definitions. Now you can't write something as simple as Empty - you
have to give it a class context. This is just plain annoying.
With the
too large
(x:_) !! 0 = x
(_:xs) !! n = xs !! (n-1)
Isn't this tail recursive? What is eating up the stack?
Brad Larsen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Wed, 19 Dec 2007 02:00:53 -0500, Jules Bean [EMAIL PROTECTED]
wrote:
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
newtype EvenInt
to prevent this, the module does not export the constructor for
it---rather, the module exports a function `mkEvenInt' that creates an
EvenInt if the given value is acceptable or raises an error otherwise.
What's the right way to do this? Thanks!
Brad Larsen
45 matches
Mail list logo