[Haskell-cafe] Minh Thu, please add me to your LinkedIn network

2013-09-22 Thread Kyle Hanson via LinkedIn
LinkedIn





Kyle Hanson requested to add you as a connection on LinkedIn:
  

--

Minh Thu,

I'd like to add you to my professional network on LinkedIn.

- Kyle

Accept invitation from Kyle Hanson
http://www.linkedin.com/e/uc6lxc-hlw276p4-5e/XvIdBwmueHfd6vFMPXXdLaqreCbl5oOSpPTFPU/blk/I943132921_20/3wOtCVFbmdxnSVFbm8JrnpKqlZJrmZzbmNJpjRQnOpBtn9QfmhBt71BoSd1p65Lr6lOfP0OnP4Oej8PcjcQekALpQcJlDxQrDwLc3wRcP4Qc3gTdz4LrCBxbOYWrSlI/eml-comm_invm-b-in_ac-inv28/?hs=falsetok=0b7qQjv89PWlU1

View profile of Kyle Hanson
http://www.linkedin.com/e/uc6lxc-hlw276p4-5e/rso/60831967/_LLG/name/22724543_I943132921_20/?hs=falsetok=2TI3wCxd1PWlU1
--
You are receiving Invitation emails.


This email was intended for Minh Thu Vo.
Learn why this is included: 
http://www.linkedin.com/e/uc6lxc-hlw276p4-5e/plh/http%3A%2F%2Fhelp%2Elinkedin%2Ecom%2Fapp%2Fanswers%2Fdetail%2Fa_id%2F4788/-GXI/?hs=falsetok=0-VFub_99PWlU1

(c) 2012, LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.


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


Re: [Haskell-cafe] type-level integers, type-level operators, and most specific overlapping instance

2013-09-22 Thread TP
TP wrote:

 But I have still a question: is the behavior of GHC correct in the example
 of my initial post?

See here:

http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/type-class-extensions.html#instance-overlap


When matching, GHC takes no account of the context of the instance 
declaration (context1 etc). GHC's default behaviour is that exactly one 
instance must match the constraint it is trying to resolve.


My misunderstanding came from a confusion between a context and a 
constraint. The context is what is before the =, and the constraint is 
what is after, i.e. the main part of the instance declaration.

This is the reason why my context using an inequality test on type-level 
integers was not taken into account: if I understand well there must be only 
one instance that matches the constraint, independently from the contexts, 
before GHC checks that the instance context is indeed respected.

The OverlappingInstances option only helps to have only one matching 
instance (independently from the contexts): if several instances match, but 
there is a more specific one, GHC selects this one and then checks the 
corresponding instance context.

Thanks,

TP

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


Re: [Haskell-cafe] type-level integers, type-level operators, and most specific overlapping instance

2013-09-22 Thread adam vogt
On Sun, Sep 22, 2013 at 11:07 AM, TP paratribulati...@free.fr wrote:
 My misunderstanding came from a confusion between a context and a
 constraint. The context is what is before the =, and the constraint is
 what is after, i.e. the main part of the instance declaration.

Hi TP,

I think context and constraint mean the same thing. The haskell report
uses the word context for
http://www.haskell.org/onlinereport/decls.html for the whole list
and constraint for one part of that list (Eq a). With the extension
-XConstraintKinds both of those are called Constraint. In other words:

 instance Context = InstanceHead

 instance (Constraint, Constraint2) = InstanceHead

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


Re: [Haskell-cafe] type-level integers, type-level operators, and most specific overlapping instance

2013-09-22 Thread TP
adam vogt wrote:

 I think context and constraint mean the same thing. The haskell report
 uses the word context for
 http://www.haskell.org/onlinereport/decls.html for the whole list
 and constraint for one part of that list (Eq a). With the extension
 -XConstraintKinds both of those are called Constraint. In other words:
 
 instance Context = InstanceHead

 instance (Constraint, Constraint2) = InstanceHead

This is indeed more in accordance with what I believe to be a context or a 
constraint. But, it seems that in this page

http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/type-class-extensions.html#instance-overlap

the vocabulary is different:


  instance context1 = C Int a where ...  -- (A)
  instance context2 = C a   Bool  where ...  -- (B)
  instance context3 = C Int [a]   where ...  -- (C)
  instance context4 = C Int [Int] where ...  -- (D)

The instances (A) and (B) match the constraint C Int Bool, but (C) and (D) 
do not. When matching, GHC takes no account of the context of the instance 
declaration (context1 etc).

[...]

The -XOverlappingInstances flag instructs GHC to allow more than one 
instance to match, provided there is a most specific one. For example, the 
constraint C Int [Int] matches instances (A), (C) and (D), but the last is 
more specific, and hence is chosen. If there is no most-specific match, the 
program is rejected. 


So, what do I miss? Isn't the vocabulary different here?
And I do not understand what is written if I take your definition (which is 
indeed the definition in the Haskell report).

Thanks in advance,

TP


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


Re: [Haskell-cafe] Minh Thu, please add me to your LinkedIn network

2013-09-22 Thread damodar kulkarni
What a surprise, I didn't know the real name of Haskell Cafe till date,
BUT today I came to know it: it is Minh Thu V.

linked in sucks ...


Thanks and regards,
-Damodar Kulkarni


On Sun, Sep 22, 2013 at 2:53 PM, Kyle Hanson via LinkedIn 
mem...@linkedin.com wrote:


   [image: LinkedIn]
 http://www.linkedin.com/e/uc6lxc-hlw276p4-5e/hom/?hs=falsetok=1F1OVFpS1PWlU1




   Hi Minh Thu,

   I'd like to connect with you on LinkedIn.


 Accepthttp://www.linkedin.com/e/uc6lxc-hlw276p4-5e/XvIdBwmueHfd6vFMPXXdLaqreCbl5oOSpPTFPU/blk/I943132921_20/1Bt6BSrCBTpmUJt71BoSdxbm8JrnpKqlZJrmZzbmNJpjRQnOpBtn9QfmhBt71BoSd1p65Lr6lOfP0OnP4Oej8PcjcQekALpQcJlDxQrDwLc3wRcP4Qc3gTdz4LrCBxbOYWrSlI/eml-comm_invm-b-accept-newinvite/?hs=falsetok=3WsXkZaBdPWlU1

  View 
 Profilehttp://www.linkedin.com/e/uc6lxc-hlw276p4-5e/rso/60831967/_LLG/name/22724543_I943132921_20/eml-comm_invm-b-profile-newinvite/?hs=falsetok=041BVcm2lPWlU1




 http://www.linkedin.com/e/uc6lxc-hlw276p4-5e/rso/60831967/_LLG/name/22724543_I943132921_20/eml-comm_invm-b-photo-newinvite/?hs=falsetok=0kvDW_y0FPWlU1

  Kyle 
 Hansonhttp://www.linkedin.com/e/uc6lxc-hlw276p4-5e/rso/60831967/_LLG/name/22724543_I943132921_20/eml-comm_invm-b-name-newinvite/?hs=falsetok=2JMZQUFRhPWlU1

 Engineer at eShares, Inc.

 Greater Chicago Area



  You are receiving Invitation emails. 
 Unsubscribehttps://www.linkedin.com/e/uc6lxc-hlw276p4-5e/XvIdBwmueHfd6vFMPXXdLaqreCbl5oOSpPTFPU/uns/20008/22724543/anmdibt9ekfs9vo/haskell-cafe%40haskell%2Eorg/uc6lxc-hlw276p4-5e/eml-comm_invm-f-unsub-inv28/?hs=falsetok=2n8GqjQ2lPWlU1.


 This email was intended for Minh Thu Vo (Core/Server Lead Developer at
 OpenERP). Learn why we included 
 thishttp://www.linkedin.com/e/uc6lxc-hlw276p4-5e/plh/http%3A%2F%2Flinkedin%2Ecusthelp%2Ecom%2Fapp%2Fanswers%2Fdetail%2Fa_id%2F4788/2t30/?hs=falsetok=3DK9rbdq9PWlU1.
 © 2013, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043,
 USA


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


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


Re: [Haskell-cafe] Music update

2013-09-22 Thread Dan Krol
Will there be a video of the live premier?


On Fri, Sep 20, 2013 at 12:14 PM, Mark Lentczner
mark.lentcz...@gmail.comwrote:

 Some might remember me asking about music packages a while back... An
 update:

 I ended up using Euterpea, which in turn uses both Codec.Midi and
 Sound.PortMidi. My working environment was to have my code loaded up in
 ghci, play MIDI into a software MIDI bus, and pipe that into MainStage 3
 which ran the synths.

 The piece I was working on premiered last night at a concert in
 Wellington, NZ. The live recording will take a while, but you can hear a
 studio synth recording (from the above setup) here:

 https://soundcloud.com/mtnviewmark/plain-changes-2-all-synth-mix


 The code for the piece is all open source:
 https://github.com/mzero/PlainChanges2. In particular, there is a
 somewhat improved MIDI 
 playerhttps://github.com/mzero/PlainChanges2/blob/master/src/Sound/MidiPlayer.hs
  in
 there.

 Enjoy!

 - Mark

 P.S.: Yes, and now that that's done with, I can get on with the next
 Haskell Platform release!


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


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


[Haskell-cafe] Cabal install build of scion-browser 0.2.18 fails when linking Persistent-sqlite1.21

2013-09-22 Thread Stephen Taylor
Hi I'm a Haskell newbie. I just installed Haskell on Windows 7 x64 (Haskell
Platform 2013.2.0.0 containing GHC 7.6.3), and have  been using
cabal-install to build/install from Hackage all the helper executables
required and/or supported by EclipseFP, the Eclipse Haskell Plugin.

All the helper exe's  installed without any issues, except for one:
scion-browser 0.2.18. All its dependencies seemed to build fine,  and it
built fine up until the near the end of the link phase when the link to
 Persistent-sqlite 1.2.1 failed.  Here is the error message (path
information elided):

 Loading package persistent-sqlite-1.2.1 ... ghc.exe:
*Unknown PEi386 section name `.drectve'* (while
processing:\persistent-sqlite-1.2.1\libHSpersistent-sqlite-1.2.1.a)
ghc.exe: panic! (the 'impossible' happened)
(GHC version 7.6.3 for i386-unknown-mingw32):
loadArchive persistent-sqlite-1.2.1\libHSpersistent-sqlite-1.2.1.a: failed
Failed to install scion-browser-0.2.18

I understand what the message is saying, but I don't know how to go about
resolving it.  I have of course cleaned and retried a few times.  But I get
the same error.

Any and all suggestions on how to resolve or  work around this issue so
that I can provide EclipseFP with a usable scion-browser, would be greatly
appreciated.

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


Re: [Haskell-cafe] Mystery of an Eq instance

2013-09-22 Thread Richard A. O'Keefe

On 20/09/2013, at 11:47 PM, damodar kulkarni wrote:

 
 There is an Eq instance defined for these types!
 
 So I tried this:
 *Main sqrt (10.0) ==3.1622776601683795
 True
 *Main sqrt (10.0) ==3.16227766016837956
 True
 *Main sqrt (10.0) ==3.1622776601683795643
 True
 *Main sqrt (10.0) ==3.16227766016837956435443343
 True
 
 It seems strange.

But *WHY*?   There is nothing in the least strange about this!
Did it occur to you to try

3.1622776601683795 == 3.16227766016837956435443343

(Hint: the answer does not begin with F.)

Four times you asked if the square root of 10 was equal to
a certain (identically valued but differently written) number,
and each time you got the same answer.  Had any of the answers
been different, that would have been shocking.

 So my doubts are:
 1. I wonder how the Eq instance is defined in case of floating point types in 
 Haskell?

At least for finite numbers, the answer is compatibly with C, Fortran,
the IEEE standard, and every programming language on your machine that
supports floating point arithmetic using IEEE doubles.

 2. Can the Eq instance for floating point types be considered meaningful? 
 If yes, how?

Except for infinities and NaNs, yes.
As exact numerical equality.

When you get into infinities and NaNs, things get trickier,
but that's not at issue here.

It seems to me that you may for some reason be under the impression
that the 3. values you displayed have different values.  As
mathematical real numbers, they do.  But they all round to identically
the same numerical value in your computer.

 In general, programmers are **advised** not to base conditional branching on 
 tests for **equality** of two floating point values.

At least not until they understand floating point arithmetic.

 3. Is this particular behaviour GHC specific? (I am using GHC 6.12.1)

No.
 
 If there are references on this please share.

The IEEE floating point standard.
The LIA-1 standard.
The C99 and C11 standards.
What every computer scientist should know about floating point arithmetic
-- citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.22.6768‎

Most of the unpleasant surprises people have with Haskell floating point
numbers are *floating point* surprises, not *Haskell* surprises.

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


[Haskell-cafe] GSoC Result - Communicating with Mobile devices - Push Notifications

2013-09-22 Thread Marcos Pividori
I am happy to announce the result of 3 months working on the GSoC project:
Communicating with mobile devices. After reading many documentation,
looking for a good abstraction, learning about mobile apps and networks
connections, and really valuable recommendations from my mentor, (I really
want to thank Michael Snoyman for his availability and kindness) I
succeeded in developing 3 libraries to make it easy to send push
notifications to mobile devices. They are available on Hackage:


** push-notify-0.1.0.0 : *This library offers a simple API for sending
notifications through APNS, GCM and MPNS.
[1]http://hackage.haskell.org/package/push-notify-0.1.0.0


** push-notify-ccs-0.1.0.0 :* This library offers an API for
sending/receiving notifications through CCS (XMPP - Google Cloud
Messaging). [2] http://hackage.haskell.org/package/push-notify-ccs-0.1.0.0


** push-notify-general-0.1.0.0 : *This library offers a general API for
sending/receiving notifications, and handling the registration of devices
on the server. It provides a general abstraction which can be used to
communicate through different services as APNS, GCM, MPNS, hiding as much
as possible, the differences between them.
[3]http://hackage.haskell.org/package/push-notify-general


Now, it is easy to send/receive information with mobile devices, so you can
develop server applications which interact with them.

So, to clarify this, as part of this project, I developed many test
examples, including Android/WPhone and Yesod apps.

I really want to thank FPComplete for giving me the possibility of hosting
the Yesod app. The code is available on GitHub:
[4]https://github.com/MarcosPividori/GSoC-Communicating-with-mobile-devices
 and they are running online on: [5] http://gsoc.marcospividori.com.ar/ ,
so can be downloaded and tested on mobile devices. (BackAndForth Messaging
and Connect4 apps)


** BackAndForth Messaging:*

In this example, I show how to use the push-general library to handle the
registration/reception and sending of messages. From a Yesod app
[5]http://gsoc.marcospividori.com.ar/,
you can send notifications to devices registered and receive messages from
them. It is avaliable for Android and WPhone on
[6]http://gsoc.marcospividori.com.ar/apps
.


** Connect 4:*

I have been thinking of an app which lets me show how useful push
notifications are. The advantage of this notifications is that you can
receive information from server when it is available without needing to
continually poll. So, I started to think about a multiplayers game. Every
time a player does something, you let the rest know about the new movement.
So, I ran into the board game: Connect 4.

Both, authenticated web players and users of the android app, can play one
against each other.

For actualizing the website [5] http://gsoc.marcospividori.com.ar/ , I
use long polling, while for the Android app, push notifications.

The Android app is available on  [6]http://gsoc.marcospividori.com.ar/apps
.

Every feedback is welcome!
Thanks,
Marcos


[1] http://hackage.haskell.org/package/push-notify-0.1.0.0

[2] http://hackage.haskell.org/package/push-notify-ccs-0.1.0.0

[3] http://hackage.haskell.org/package/push-notify-general

[4] https://github.com/MarcosPividori/GSoC-Communicating-with-mobile-devices

[5] http://gsoc.marcospividori.com.ar

[6] http://gsoc.marcospividori.com.ar/apps
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe