[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 apt-g

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 somew

Re: [Haskell-cafe] multi-line regex

2009-11-04 Thread kenny lu
swap out ByteString with String, PCRE should be similar, too. Regards, Kenny On Wed, Nov 4, 2009 at 2:04 PM, Michael Mossey wrote: > > > kenny lu wrote: > >> Hi Michael, >> >> Could you give an example of what patterns you want to write? >> >> Reg

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 wrote: > I have some very simple regex-matching needs, and Text.Regex.Posix will > work fine, EXCEPT I need to match multi-line patterns, and/or find all > occ

[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 f

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

2009-08-26 Thread kenny lu
mber. > > -Ross > On Aug 26, 2009, at 2:07 PM, Johan Tibell wrote: > > On Wed, Aug 26, 2009 at 6:33 PM, kenny lu wrote: >> >>> Hi, >>> >>> I encountered a problem with Network.Socket in MacOS 10.5 >>> Here is the code that I am testing, &g

[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, _) <- Socket

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 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 file

[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 { a

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 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.

[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 a

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 relea

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 whic

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

2008-11-18 Thread kenny lu
No I do not consider unicode in these implementations. On Tue, Nov 18, 2008 at 6:43 PM, Jason Dusek <[EMAIL PROTECTED]> wrote: > Did you use Unicode in Python? > > -- > _jsn > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.or

[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 ch