[Haskell-cafe] RFCQ: The Classy Prelude: a more fully polymophic, drop-in alternative prelude http://www.yesodweb.com/blog/2012/07/classy-prelude

2012-07-13 Thread Max Cantor
I'd like to share Michael Snoyman's Classy Prelude: http://www.yesodweb.com/blog/2012/07/classy-prelude . The basic gist of the work is that many of the standard prelude functions are made for concrete types such as [a], [(a,b)], and [Char] but can be much more polymorphic. While this

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-02-21 Thread Max Cantor
If you want to use the library and need a short term fix, just write a small wrapper type/module newtype SizedMap = SizedMap (Int, HashMap) and track the size yourself. only complication is that on inserts and deletes you'll need to check if the key existed. other than that, it shouldn't be

[Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread Max Cantor
I originally posted this on haskell-GHC-users, but was curious how the wider community felt. The last 32-bit, Intel Mac was the Mac Mini, discontinued in August 2007. The bulk of them were discontinued in 2006, along with PowerPC Macs. Does it make sense to relegate OSX x86_64 to community

[Haskell-cafe] hsmagick on OSX 10.6

2011-02-03 Thread Max Cantor
Just out of curiosity, has anyone gotten this to work? I'm getting bus errors whenever I call readImage. If anyone out there has gotten it working and would tell me which versions they're using of the relevant bits, that would be very much appreciated. Also, I'll post all my debug info if

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread Max Cantor
I'm not sure I can make sense of what you mean here. Given the preamble, I'd guess you're asking whether we should make x86_64 the targeted architecture for OSX support, and reclassify 32-bit OSX to unsupported or hopefully it still works status. (But in that case, it's the 32-bit which

Re: [Haskell-cafe] OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-03 Thread Max Cantor
Doesn't 10.5.x have the ability to generate and run 64-bit binaries? mc On Feb 4, 2011, at 10:19 AM, wren ng thornton wrote: Max Cantor wrote: someone? wrote: I think the original poster is saying that the targeted architecture for OS X support should be the architecture that OS X assumes

[Haskell-cafe] Haskell Platform 2011.x - planned release date?

2011-02-01 Thread Max Cantor
January has come and gone and HP 2011 has not come with it. Is there an updated timetable for the next version of the HP? I'm not complaining or upset or whining, just trying to plan. Great work so far, looking forward to HP 2011! mc ___

Re: [Haskell-cafe] Where are all the Taiwanese Haskellers?

2010-12-20 Thread Max Cantor
Did you check haskellers.com? If you come down south there's a decent group here in Singapore. Max On Dec 1, 2010, at 4:58 AM, Pasqualino Titto Assini wrote: Hello, I am going to Taiwan with my family for about five weeks (I am Italian, my wife is Taiwanese and we have two kids) and I

Re: [Haskell-cafe] Mysterious fact

2010-11-02 Thread Max Cantor
FYI, I implemented an error monad using this church-encoded either instead of the conventional either. my thought was that since you skip the conditional at each bind call you'd get better performance. I was quite mistaken. Max On Nov 2, 2010, at 6:40 AM, Jeremy Shaw wrote: Looks a lot

Re: [Haskell-cafe] Re: Haskell in Industry

2010-08-10 Thread Max Cantor
Remember that Banks/Financial Firms/Investment Banks were among the first big uses of punch card readers, mainframes, cobol, C, C++ (and OOP), VBA, Java.. I'm not saying if I like any of those languages (my presence on this list should give a clue how I feel) but investment banks picking up FP

Re: [Haskell-cafe] data.binary get reading beyond end of input bytestring?

2010-07-28 Thread Max Cantor
I have a similar issue, I think. The problem with attoparsec is it only covers the unmarshalling side, writing data to disk still requires manually marshalling values into ByteStrings. Data.Binary with Data.Derive provide a clean, proven (encode . decode == id) way of doing this. If

[Haskell-cafe] Iteratee package: combining enumerators

2010-07-25 Thread Max Cantor
I have a series of files with binary encoded data in them, and want to create an enumerator iterates on the first element at the front of all the files. Something like the pseudocode: return . minimum = mapM (fmap (heads . lines) readFile) listOfFileNames I can use convStream to create an

Re: [Haskell-cafe] Talking to Java from Haskell?

2010-07-19 Thread Max Cantor
I use Apache Thrift, as someone else mentioned for IPC with some java code that connects to a third party data vendor. As of version 0.2, there are some bugs that you need to be aware of. However, and possibly more of interest to you, I have already written a FIX implementation in pure

[Haskell-cafe] EnumMap 0.0.2 and Containers-0.3

2010-07-11 Thread Max Cantor
Is there a reason that EnumMap specifically requires containers 0.3 or just a matter of not having been tested? It seems to compile just fine (but with one warning for a deprecated call). Max ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] EnumMap 0.0.2 and Containers-0.3

2010-07-11 Thread Max Cantor
Wasn't implying that they should. My bad for not checking the relative release dates, but, even had I checked, its still reasonable to ask if there are known issues, isn't it? Max On Jul 12, 2010, at 11:06 AM, Ivan Miljenovic wrote: On 12 July 2010 13:04, Max Cantor mxcan...@gmail.com

Re: [Haskell-cafe] Haskell Indonesia

2010-06-20 Thread Max Cantor
selamat datang! On Jun 18, 2010, at 9:27 PM, Jean-Denis Koeck wrote: Hi! I'm of Indonesian descent (by my mother) and I'll be there this summer. Nice to meet you! Jean-Denis 2010/6/15 vipex.id vipex...@gmail.com Hi, I'm new in Haskell wondering is there Indonesian people using Haskell

Re: [Haskell-cafe] Haskell Indonesia

2010-06-16 Thread Max Cantor
Given that I can see Indonesia (pulau batam) from my bedroom window, I'm going to say that I didn't cross any lines.. On Jun 16, 2010, at 6:17 AM, Ivan Lazar Miljenovic wrote: Max Cantor mxcan...@gmail.com writes: Its not indonesia, but the Singapore FP Users is pretty close by. [snip

Re: [Haskell-cafe] Haskell Indonesia

2010-06-15 Thread Max Cantor
Its not indonesia, but the Singapore FP Users is pretty close by. We aren't limited to just Haskell but there are several haskellers in the group. If you'd like to join us, drop an email to: singapore-functional-programm...@googlegroups.com Max On Jun 15, 2010, at 7:11 PM, leledumbo wrote:

Re: [Haskell-cafe] Re: [Haskell-beginners] Accounting Engine in Haskell

2010-06-15 Thread Max Cantor
I think Haskell would be an excellent choice. Several reasons come to mind: Given the arbitrary complexity of such projects, an EDSL describing book entries etc would be a very good fit for the project. As people have said once or twice, Haskell is a great fit for EDSLs If you want to get

[Haskell-cafe] GeneralizedNewtypeDeriving and TypeFamilies

2010-06-14 Thread Max Cantor
So I understand from http://hackage.haskell.org/trac/ghc/ticket/4083 that GeneralizedNewtypeDeriving doesn't play well with TypeFamilies. But, if a typeclass is only using type synonyms, is there any reason why newtype deriving would not work? For a toy example: class Cls a where type

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-15 Thread Max Cantor
Where is my bind statement doing a case analysis? Isn't it just propagating, in a sense, the case analysis that came from values coming into the monad via return or via throwError? Also, why wouldn't callCC work here? I'm not that familiar with the ContT monad so any more details would be

[Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-10 Thread Max Cantor
Based on some discussions in #haskell, it seemed to be a consensus that using a modified continuation monad for Error handling instead of Eithers would be a significant optimization since it would eliminate a lot of conditional branching (everytime = is called in the Either monad, there is a

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-10 Thread Max Cantor
Makes sense. From what you wrote, it seems like this might be a dead-end and can't really be optimized away. Do you agree? Max On May 10, 2010, at 8:38 PM, Jan-Willem Maessen wrote: On Mon, May 10, 2010 at 5:38 AM, Max Cantor mxcan...@gmail.com wrote: Based on some discussions

Re: [Haskell-cafe] What is the consensus about -fwarn-unused-do-bind ?

2010-04-13 Thread Max Cantor
I'm in the camp of adding -fno-warn-unused-do-bind to my cabal files. I hate sacrificing the purity of -Wall but I have so many forkIOs in my code that I think it was the best option. Max On Apr 10, 2010, at 3:08 PM, Ivan Miljenovic wrote: On 10 April 2010 02:07, Bryan O'Sullivan

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-09 Thread Max Cantor
Isn't this just an extension of the notion that multi-parameter typeclasses without functional dependencies or type families are dangerous and allow for type-naughtiness? On Mar 9, 2010, at 5:45 AM, Wolfgang Jeltsch wrote: Hello, some time ago, it was pointed out that generalized

Re: [Haskell-cafe] Children elements with HXT

2009-12-23 Thread Max Cantor
That stuffed me up for a bit. I wrote some ugly template haskell a while back to automatically generate XmlPickler instances. can send to you if you want On Dec 23, 2009, at 7:55 AM, Tony Morris wrote: Adding (a_remove_whitespace,v_1) as a parser option when running solves it. Silly me.

Re: [Haskell-cafe] Problem with cabal install zlib

2009-12-19 Thread Max Cantor
I actually ran into this problem last night. Here's my workaround (note that it involves downgrading to zlib-0.5.0.0 1) unregister the zlib-0.5.2.0 package (prompt ghc-pkg unregister zlib-0.5.2.0) 2) rebuild and install cabal-install: prompt tar -zxvf

[Haskell-cafe] ATTN: Singapore based Haskellers - Singapore FP Users Group First Meeting

2009-11-01 Thread Max Cantor
We are organizing a Functional Programming Users Group in Singapore and our first meeting is Monday, November 2nd at 6 pm. We will meet initially in the Lobby of 8 Shenton Way. Map: http://bit.ly/1PzqlB -or-

Re: [Haskell-cafe] GHC devs

2009-10-15 Thread Max Cantor
It is pretty amazing what such a small coterie of devs has accomplished in GHC. Compare this to the thousands that work on GCC/ javac/csc and vis studio etc. So, once again, kudos. max On Oct 16, 2009, at 2:30 AM, Andrew Coppin wrote: Daniel Peebles wrote: Well-Typed is in the UK too :)

[Haskell-cafe] FP Market Place (was Market Place for Haskell development teams?)

2009-10-01 Thread Max Cantor
Haskell, and FP languages more broadly, are finding a pretty solid niche in small scale, but technically demanding and lucrative projects. Financial modeling and analytics are the first thing that comes to mind. The work of Galois, Atom, etc also sort of fit this mold. While the people

Re: [Haskell-cafe] Request for Comments - hscurrency 0.0.1

2009-08-16 Thread Max Cantor
are not typically used nor would they be in a finished product. for the time being, however, I dont know if its better to use Ratio's, Fixed's or what, so just settled on the most straightforward for now. On Aug 16, 2009, at 1:26 AM, Jason Dagit wrote: On Sat, Aug 15, 2009 at 5:15 AM, Max Cantor

[Haskell-cafe] Request for Comments - hscurrency 0.0.1

2009-08-15 Thread Max Cantor
Hi all, I'm putting together some simple tools to do safe calculations on different currencies. For instance, making sure that you dont add something like 5 USD + 10 JPY without doing a proper conversion. I've put up some code on google code which probably explains what I'm trying to do

Re: [Haskell-cafe] Haskell2Xml - Suggest looking at HXT

2009-08-08 Thread Max Cantor
Hi Dmitry, I've been using HXT and its XmlPickler class for encoding and decoding between XML - Haskell types. It takes a while to wrap your brain around the arrows based API for HXT (something I'm still working on) but it seems to be quite powerful and well maintained. Also, I've

Re: Re[2]: [Haskell-cafe] What to say about Haskell?

2009-07-14 Thread Max Cantor
Any chance of renaming it to Advocacy? On Jul 14, 2009, at 11:42 PM, Cristiano Paris wrote: On Tue, Jul 14, 2009 at 5:12 PM, Cristiano Parisfr...@theshire.org wrote: ... Why don't we create a specific Wiki page about Haskell advocation, http://haskell.org/haskellwiki/Advocation Cristiano

[Haskell-cafe] Goldman Sachs - your home for OCaml and Erlang?

2009-07-12 Thread Max Cantor
I know that this is a bit off topic, but thought it would interest several readers. Apparently, GS, which. AFAIK, doesn't make a lot of noise in the FP space compared to some other banks, does use some FP: http://www.zerohedge.com/article/aleynikov-code-dump-uncovered

[Haskell-cafe] Text.JSON, Speed and Bytestrings

2009-07-10 Thread Max Cantor
Hi Cafe, I am using the Text.JSON library to [un]marshall messages passed over the network and was wondering if the speed would be significantly improved by either changing the code or adding a module to implement the same functionality using Bytestrings instead of classical strings? If

Re: [Haskell-cafe] Leksah works!

2009-07-01 Thread Max Cantor
I emphatically second this.. (except for using vim instead of emacs) -Max On Jul 1, 2009, at 12:03 AM, David Leimbach wrote: I would love to have a standalone Mac OS X compatible build to try. As it stands, I have not been successful getting a Cocoa/Carbon GTK running on Leopard, and

Re: [Haskell-cafe] Generic polyvariadic printf in Haskell98

2009-06-06 Thread Max Cantor
To be fair, isn't the printf typing in ocaml a massively ugly hack to the type system? Isn't there an example in the template haskell tutorial that gives a typesafe, clean generic printf function? Max On Jun 5, 2009, at 4:29 PM, Erik de Castro Lopo wrote: o...@okmij.org wrote: Still,

[Haskell-cafe] HXT XmlPicklers - TH Derivation

2009-06-02 Thread Max Cantor
Hi, I have developed some simple TH code to automatically derive XmlPickler instances for my types and if there is interest, I will clean it up and submit a patch. Its not complete, but is a start. Any interest? Max ___ Haskell-Cafe mailing

[Haskell-cafe] Pattern match question in HAXML code

2009-05-23 Thread Max Cantor
Going through the instances for HTypeable (http://www.haskell.org/HaXml/HaXml/src/Text/XML/HaXml/TypeMapping.html#toHType ) I saw the following instance for Either a b. My question is, why doesn't the pattern match in the where clause always fail? If (Left x) = m does not fail, doesn't that