[Haskell-cafe] Singapore Functional Programmer Group First Meetup

2009-10-30 Thread kenny lu
Sorry for the late notice. We are organizing an informal meeting for the Functional Programmer Group in Singapore on 2 Nov 2009. Since this is the first meeting, the theme will be mainly 'meet and greet' and discuss our interests in functional programming languages. We have participants coming

Re: [Haskell-cafe] multi-line regex

2009-11-03 Thread kenny lu
Hi Michael, Could you give an example of what patterns you want to write? Regards, Kenny On Wed, Nov 4, 2009 at 1:35 PM, Michael Mossey m...@alumni.caltech.eduwrote: I have some very simple regex-matching needs, and Text.Regex.Posix will work fine, EXCEPT I need to match multi-line patterns,

Re: [Haskell-cafe] multi-line regex

2009-11-04 Thread kenny lu
, Michael Mossey m...@alumni.caltech.eduwrote: kenny lu wrote: Hi Michael, Could you give an example of what patterns you want to write? Regards, Kenny Something like text = 11\n abcd \n22 answer = text =~ 11.*22 :: various possibilities and have it find the entire string

[Haskell-cafe] exporting Data.ByteString functions via FFI

2009-06-12 Thread kenny lu
Hi, I was trying to write a FFI wrapper for my Haskell program which manipulates ByteString. But I am unable to compile/link it. Here is the toy program. {-# LANGUAGE ForeignFunctionInterface #-} module B where import Foreign.C.Types import Foreign.C.String import qualified Data.ByteString

Re: [Haskell-cafe] exporting Data.ByteString functions via FFI

2009-06-12 Thread kenny lu
It works indeed. Thanks. -Kenny On Fri, Jun 12, 2009 at 3:50 PM, Jochem Berndsen joc...@functor.nl wrote: kenny lu wrote: Hi, I was trying to write a FFI wrapper for my Haskell program which manipulates ByteString. But I am unable to compile/link it. Here is the toy program

[Haskell-cafe] A problem with bytestring 0.9.1.4 hGetBuf: invalid argument

2009-08-04 Thread kenny lu
Hi all, I've recently came across a problem when processing a large text file (around 2G in size). I wrote a Haskell program to count the number of lines in the file. module Main where import System import qualified Data.ByteString.Char8 as S -- import Prelude as S main :: IO () main = do {

Re: [Haskell-cafe] A problem with bytestring 0.9.1.4 hGetBuf: invalid argument

2009-08-04 Thread kenny lu
Oh right. Thanks for pointing out. :) On Wed, Aug 5, 2009 at 10:06 AM, Don Stewart d...@galois.com wrote: haskellmail: Hi all, I've recently came across a problem when processing a large text file (around 2G in size). I wrote a Haskell program to count the number of lines in the

[Haskell-cafe] Network.Socket error in MacOS 10.5?

2009-08-26 Thread kenny lu
Hi, I encountered a problem with Network.Socket in MacOS 10.5 Here is the code that I am testing, - - module Main where import qualified Network.Socket as Socket main :: IO () main = do { (hostname, _) -

Re: [Haskell-cafe] Network.Socket error in MacOS 10.5?

2009-08-26 Thread kenny lu
Thanks for the pointers. I will take a look. Kenny On Thu, Aug 27, 2009 at 2:20 AM, Ross Mellgren rmm-hask...@z.odi.ac wrote: I don't think getNameInfo should work for for AF_UNIX -- the name given to SockAddrUnix is a file path, there is no name resolution. From the man page for

[Haskell-cafe] implementing python-style dictionary in Haskell

2008-11-18 Thread kenny lu
Dear all, I am trying to implement the python-style dictionary in Haskell. Python dictionary is a data structure that maps one key to one value. For instance, a python dictionary d = {'a':1, 'b':2 } maps key 'a' to 1, 'b' to 2. Python dictionary allows for update. e.g. the statement d['a'] = 3

Re: [Haskell-cafe] implementing python-style dictionary in Haskell

2008-11-18 Thread kenny lu
Hi Bulat, 1. why you think that your code should be faster? pythob implementation is probably written in C ince it's one of its core data structures I am not hoping that my code should be faster, but at least not as slow as what it gets. Basically I am looking for an implementation which

Re: [Haskell-cafe] implementing python-style dictionary in Haskell

2008-11-18 Thread kenny lu
Dear Don, I am using GHC 6.8.1 Regards, Kenny On Tue, Nov 18, 2008 at 11:33 PM, Don Stewart [EMAIL PROTECTED] wrote: Which version of GHC and which version of the Data.ByteString library? There was an inlining bug related to Data.Map /Data.IntMap performance fixed between the 6.8.x release

Re: [Haskell-cafe] Regular Expression Parsing via derivatives

2011-09-02 Thread kenny lu
Hi, In regex-pderiv, we gave a practical implementation of regex matching using partial derivative. But of course we could easy write one which using brzozoski's derivative, but some simplification is required other wise there are infinitely many states. Probably Martin has an implementation

[Haskell-cafe] GHCi (7.4.2) is working on ARM

2013-02-06 Thread kenny lu
I've got a Cubieboard a few weeks back. I started it off with Linaro (Ubuntu) 12.06. Today I started to upgrade the OS to 12.11, which surprisingly came with ghc 7.4.2. And ghci magically works too. Here are the links http://www.cubieboard.org sudo apt-get install update-manager-core sudo