On Thu, Oct 7, 2010 at 8:29 AM, Steve Schafer wrote:
> I think the reason for this conceptual distinction can be traced to the
> derivation of "ordering" as the gerund form of the verb "order," in that
> it implies that an action has occurred (or is still occurring).
Reading the original message
On Oct 7, 2010, at 1:15 AM, Alexander Solla wrote:
For example, a set with three elements can be ordered in three
different ways.
Six ways. I hate making such basic math mistakes.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.h
This came up as I was doing homework for natural language processing.
I'm constructing a trigram model from training data, but I also need the
bigram and unigram counts. I could, for each triple of characters, add the
3 tuple to a trigram map and increment its count (I know I'm not actually
mutat
That code is incorrect. You can't assume that the base for floating
point numbers is 2, that's something you have to check.
(POWER6 and z9 has hardware support for base 10 floating point.)
-- Lennart
On Fri, Oct 8, 2010 at 2:08 PM, Daniel Fischer wrote:
> The methods of the RealFrac class pro
John Lato wrote:
> So here's a very simple expression:
>
> t1 = let v = sigGen (cnst 1) in outs v v
>
> which is what led to my question. I'm binding the sigGen to 'v' to
> introduce sharing at the meta-level. Would it be better to introduce
> support for this in the dsl?
Often this is not a q
On 10/8/10 5:46 PM, Thomas DuBuisson wrote:
Alex,
The containers library can do this already - there are no constraints
on the elements of a Map. For example:
type TripleNestedMap a = Map Int (Map Char (Map String a))
But this is rather silly as you can just do:
type MapOfTriples a = Map
Kevin Jardine wrote:
> instead of passing around lists of values with these related types, I
> created a polyvariadic function polyToString...
> I finally figured out how to do this, but it was a bit harder to
> figure this out than I expected, and I was wondering if it might be
> possible to crea
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/7/10 04:02 , Christian Sternagel wrote:
> However, I do know that there are many publications about "ordered
> structures" which use the word "ordering" (most of which I'm aware of, not
> by native speakers).
Like most things in Haskell, it's na
On 10/7/10 8:35 AM, Ketil Malde wrote:
Christian Sternagel writes:
recently I was wondering about the two words "order" and "ordering"
I would use "ordering" to mean the relation or function that orders
(ranks) elements, and I'd use "order" to refer the actual progression.
So by applying an o
On 10/08/2010 04:23 PM, Alex Rozenshteyn wrote:
Does there exist a library which allows me to have maps whose elements
are maps whose elements ... with a convenient syntax.
It sounds like you might be looking for a trie of some sort. Would
something like the TrieMap package suit your needs? It
On Oct 8, 2010, at 2:18 PM, Florian Weimer wrote:
* Ben Franksen:
You might be interested in Lightweight Monadic Regions
http://okmij.org/ftp/Haskell/regions.html#light-weight
which solve the problem (IMHO) in a much cleaner way, i.e. w/o explicit
closing and also w/o using finalizers.
Is
I was able to parse function definition, but function call still is a
problem,
--
View this message in context:
http://haskell.1045720.n5.nabble.com/Haskell-Helper-tp3093854p3205482.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
Great work!
I think I'm going to use it.
Any plan on packaging up Christopher Done's HaskellDB's type operators:
http://chrisdone.com/posts/2010-10-07-haskelldb-and-typeoperator-madness.html
Which allows you to write something like:
type PersonTable = Table :$: Expr
:%: Id::: Integer
Thomas DuBuisson wrote:
> On Fri, Oct 8, 2010 at 2:23 PM, Alex Rozenshteyn
> wrote:
>> Does there exist a library which allows me to have maps whose elements
>> are maps whose elements ... with a convenient syntax.
> The containers library can do this already - there are no constraints
> on the el
Alex,
The containers library can do this already - there are no constraints
on the elements of a Map. For example:
> type TripleNestedMap a = Map Int (Map Char (Map String a))
But this is rather silly as you can just do:
> type MapOfTriples a = Map (Int ,Char, String) a
for most uses.
Cheers
Does there exist a library which allows me to have maps whose elements are
maps whose elements ... with a convenient syntax.
Alternatively, does there exist a library like Data.Tree where forests are
sets rather than lists?
--
Alex R
___
Hask
Florian Weimer wrote:
> * Ben Franksen:
>> You might be interested in Lightweight Monadic Regions
>>
>> http://okmij.org/ftp/Haskell/regions.html#light-weight
>>
>> which solve the problem (IMHO) in a much cleaner way, i.e. w/o explicit
>> closing and also w/o using finalizers.
>
> Is this app
* Ben Franksen:
> You might be interested in Lightweight Monadic Regions
>
> http://okmij.org/ftp/Haskell/regions.html#light-weight
>
> which solve the problem (IMHO) in a much cleaner way, i.e. w/o explicit
> closing and also w/o using finalizers.
Is this approach composeable in the sense th
Florian Weimer wrote:
> At least in my experience, in order to get proper resource management
> for things like file or database handles, you need both a close
> operation and a finalizer registered with the garbage collector. The
> former is needed so that you can create resources faster than the
"D x", for an x that is not an instance of C, is still inhabited by "undefined".
Additionally, on the implementation side, the dictionary C is not
included inside of a D, so you still need to pass it in to call m; a
function
> test :: C a => D a -> Bool
gets translated in Core into a system F type
On 8 October 2010 10:54, Simon Marlow wrote:
> We could make GHC respect the report, but we'd have to use
>
> (e op) ==> let z = e in \x -> z op x
>
> to retain sharing without relying on full laziness.
>
> This might be a good idea in fact - all other things being equal, having
> lambdas be mo
Quoth Florian Weimer ,
>> wikipedia: "Managed code is a differentiation coined by Microsoft to
>> identify computer program code that requires and will only execute
>> under the "management" of a Common Language Runtime virtual machine
>> (resulting in Bytecode)."
>
> I like this term
On Thu, 7 Oct 2010, Uwe Schmidt wrote:
HXT has grown over the years. Components for XPath, XSLT, validation with
RelaxNG, picklers for conversion from/to native Haskell data, lazy parsing
with tagsoup, input via curl and native Haskell HTTP and others have been
added. This has led to a rather l
Hello all,
We would like to remind you of BelHac, an international Hackathon
taking place in Ghent, Belgium next month.
All details are available on this wiki page [1]. You can register here [2].
WHEN
Friday November 5: 2pm - 7pm
Saturday November 6: 10am - 6pm
Sunday November 7: 10am - 6pm
WH
On Fri, Oct 8, 2010 at 9:39 AM, Florian Weimer wrote:
> At least in my experience, in order to get proper resource management
> for things like file or database handles, you need both a close
> operation and a finalizer registered with the garbage collector. The
> former is needed so that you can
On Fri, 8 Oct 2010, Florian Weimer wrote:
At least in my experience, in order to get proper resource management
for things like file or database handles, you need both a close
operation and a finalizer registered with the garbage collector. The
former is needed so that you can create resources
At least in my experience, in order to get proper resource management
for things like file or database handles, you need both a close
operation and a finalizer registered with the garbage collector. The
former is needed so that you can create resources faster than the
garbage collector freeing the
* Donn Cave:
> wikipedia: "Managed code is a differentiation coined by Microsoft to
> identify computer program code that requires and will only execute
> under the "management" of a Common Language Runtime virtual machine
> (resulting in Bytecode)."
I like this term, I apply it by e
I can honestly say that I haven't felt much pain from the status quo
regarding this. Most of the time my code is structured so that case
statements don't appear in do blocks. When they do, I don't see it as a big
issue. The special case for operator - is a bigger wart on haskell syntax
than this, i
What is it?
The HaskellDB library lets you generate SQL queries without writing
any actual SQL. Unlike other query generating libraries, you choose
the abstraction level. Queries can be built out of independent
fragments, just like your programs. Leave hand-written, string-based,
SQL libr
Quoth Bas van Dijk ,
> On Fri, Oct 8, 2010 at 3:36 PM, Florian Weimer wrote:
...
>> I can see how this terminology makes sense, but it's the opposite of
>> the usage in Java (where "native" == "unmanaged code called via JNI").
>
> I guess it depends on the context. If the context is a C program th
Hi all,
I want to do something I thought would be quite simple, but try as I
might I can't find neither information nor examples on how to achieve
it.
What I want specifically is to have happy produce a GLR parser from my
.ly file, and I want this to happen during 'cabal install'. Which in
turn m
On Fri, Oct 8, 2010 at 3:36 PM, Florian Weimer wrote:
> * Vincent Hanquez:
>
>> Native means the implementation is in haskell, and the library is
>> not using another implementation (in another language) to do the
>> work: either through FFI as a binding, or as a wrapper to an
>> external program.
The windows binaries built using GHC 10.6.4 and wxHaskell 0.11.1.2 on either
Win XP or Win 7
work on WIn 7 just fine, except for the font dialog box, which does nothing.
This dialog box was a bit flaky on WInXP in any case.
I installed 10.6.4 above on WIndows 7 using the binary installer, even
On Fri, 2010-10-08 at 01:13 +0300, Lauri Alanko wrote:
> Your "general" rule doesn't subsume your case example, since a case
> expression is not an application. I think you mean something like
>
> do C[(<- m)]
> =>
> m >>= \tmp -> C[tmp]
>
> where C is an arbitrary expression context. It coul
Daniel Fischer schrieb:
> The methods of the RealFrac class produce garbage when the value lies
> outside the range of the target type, e.g.
>
> Prelude GHC.Float> truncate 1.234e11 :: Int -- 32-bits
> -1154051584
>
> and, in the case of truncate, different garbage when the rewrite rule
> fire
* Vincent Hanquez:
> Native means the implementation is in haskell, and the library is
> not using another implementation (in another language) to do the
> work: either through FFI as a binding, or as a wrapper to an
> external program.
I can see how this terminology makes sense, but it's the opp
On Friday 08 October 2010 14:08:01, Daniel Fischer wrote:
> On a related note, in my benchmarks,
>
> truncFloatGen :: Integral a => Float -> a
> truncFloatGen = fromInteger . truncFloatInteger
>
> truncFloatInteger :: Float -> Integer
> truncFloatInteger x =
> case decodeFloat x of
> (m,e) |
On Fri, 2010-10-08 at 15:14 +0200, Michael Snoyman wrote:
> On Fri, Oct 8, 2010 at 1:59 PM, Maciej Piechotka
> wrote:
> > On Wed, 2010-10-06 at 22:26 +0100, Vincent Hanquez wrote:
> >> Hi haskellers,
> >>
> >> I'ld like to announce the tls package [1][2], which is a native
> >> implementation
>
On Fri, Oct 8, 2010 at 1:59 PM, Maciej Piechotka wrote:
> On Wed, 2010-10-06 at 22:26 +0100, Vincent Hanquez wrote:
>> Hi haskellers,
>>
>> I'ld like to announce the tls package [1][2], which is a native
>> implementation
>> of the TLS protocol, client and server. It's currently mostly supportin
On Fri, 8 Oct 2010 01:13:20 +0300, Lauri Alanko wrote:
> On Thu, Oct 07, 2010 at 02:45:58PM -0700, Nicolas Pouillard wrote:
> > On Thu, 07 Oct 2010 18:03:48 +0100, Peter Wortmann
> > wrote:
> > > Might be off-topic here, but I have wondered for a while why Haskell
> > > doesn't support something
On Fri, 8 Oct 2010 09:56:07 +0200, you wrote:
>Unfortunately, "hurry" is pronounced differently in British and US
>English [1], so again I was a little bit confused :-).
>[1] http://en.wiktionary.org/wiki/hurry#Pronunciation
The US sample is correct for someone from California, but it's not the
On 8 October 2010 13:54, Sittampalam, Ganesh
wrote:
> Vincent Hanquez wrote:
>> On Fri, Oct 08, 2010 at 11:14:01AM +0530, C K Kashyap wrote:
>>> Does native mean "Haskell only" - without FFI?
>>
>> Native means the implementation is in haskell, and the library is not
>> using another implementatio
The methods of the RealFrac class produce garbage when the value lies
outside the range of the target type, e.g.
Prelude GHC.Float> truncate 1.234e11 :: Int -- 32-bits
-1154051584
and, in the case of truncate, different garbage when the rewrite rule
fires:
Prelude GHC.Float> double2Int 1.234e
On Wed, 2010-10-06 at 22:26 +0100, Vincent Hanquez wrote:
> Hi haskellers,
>
> I'ld like to announce the tls package [1][2], which is a native implementation
> of the TLS protocol, client and server. It's currently mostly supporting
> SSL3,
> TLS1.0 and TLS1.1. It's got *lots* of rough edges, a
The following code compiles happily in GHC:
> {-# LANGUAGE TypeFamilies #-}
>
> class C a where
> data D a
> m :: D a -> Bool
>
> test :: C a => D a -> Bool
> test = m
My question is why do I need the context in the function "test"? It
seems like since "D" is associated with class "C", the c
Vincent Hanquez wrote:
> On Fri, Oct 08, 2010 at 11:14:01AM +0530, C K Kashyap wrote:
>> Does native mean "Haskell only" - without FFI?
>
> Native means the implementation is in haskell, and the library is not
> using another implementation (in another language) to do the work:
> either through FF
On Fri, Oct 8, 2010 at 8:56 AM, Petr Pudlak wrote:
> thanks for both the explanation (Donn) and the sound sample (Luke).
> Unfortunately, "hurry" is pronounced differently in British and US English
> [1], so again I was a little bit confused :-). But Luke's sound sample made
> it clear for me.
>
On 07/10/2010 14:03, Derek Elkins wrote:
On Thu, Oct 7, 2010 at 8:44 AM, Luke Palmer wrote:
On Thu, Oct 7, 2010 at 6:17 AM, Brent Yorgey wrote:
The source code seems to be easy to read, but I don't think I understand that.
For me I think if I change the first line from
fib = ((map fib' [0 ..
On Fri, Oct 08, 2010 at 08:47:39AM +0200, Michael Snoyman wrote:
> By the way, a native zlib implementation would definitely go on my
> wishlist. Any takers? ;)
Me too ! that's the only thing that prevented me from adding the compression
layer to TLS. as such it's on my todo list, but really reall
On Fri, Oct 08, 2010 at 11:14:01AM +0530, C K Kashyap wrote:
> Does native mean "Haskell only" - without FFI?
Native means the implementation is in haskell, and the library is not using
another implementation (in another language) to do the work: either through FFI
as a binding, or as a wrapper to
On 07/10/2010 19:58, cas...@istar.ca wrote:
I'm still having challenges to get a Haskell GUI to work under Windows
7; even after various instructions on the web.
e.g. Haskell Platform 2010.2.0.0, wxWidgets-2.9.1, wxHaskell 0.12.1.6
I have seen wxHaskell work on WIndows 7, using the same config
Hi,
thanks for both the explanation (Donn) and the sound sample (Luke).
Unfortunately, "hurry" is pronounced differently in British and US
English [1], so again I was a little bit confused :-). But Luke's sound
sample made it clear for me.
[1] http://en.wiktionary.org/wiki/hurry#Pronunciatio
53 matches
Mail list logo