[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

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

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

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,

[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

[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] 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] 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] 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: GHC 6.8.1 Build Failure on Mac OS X Intel 10.4.10

2007-11-15 Thread kenny lu
Hi, initially, I faced the same problem. i.e., ghc-pkg: dependency readline doesn't exist (use --force to override) Thus, I tried ./configure --with-readline-include=/opt/local/include/readline -- with-readline-libraries=/opt/local/lib and build again, then I hit another error, Preprocessing

GHC 6.8.1 SpecConstr

2007-11-14 Thread kenny lu
Hi, Recall the example from Simon's paper appearing in ICFP 2007. myLast :: [a] - a myLast [] = error myLast [x] = x myLast (x:xs) = myLast xs which returns the last element in a list. Applying the idea in the paper, we should rewrite the function as follows, myLast :: [a] - a myLast [] =

[GHC-as-a-library]getModuleInfo: instances for package module unimplemented

2007-08-21 Thread kenny lu
Hi all, We've been using to GHC-as-a-library to implement some parts of our project. Our goal is to use ghc to extract necessary type information from Haskell modules. Everything works fine until we attempt to collect the declared type class instances from a packaged haskell module, like List,

a mysterous bug with ghc type class (GHC 6.2)

2004-03-05 Thread Kenny LU Zhuo Ming
' happened, GHC version 6.2): nameModule zddIns1 {- v a5Ix -} it seems whenever I insert label b into a list that contains list of a and list of b, it pops into error. Regards, Kenny LU Zhuo Ming module Test where data LAB l r = LAB l r deriving Show data OR a b = OR a b deriving Show

Fw: palm?

2003-03-09 Thread Kenny Lu Zhuo Ming
- Original Message - From: Tony Sloane [EMAIL PROTECTED] To: Kenny Lu Zhuo Ming [EMAIL PROTECTED] Sent: Monday, March 10, 2003 11:13 AM Subject: RE: palm? Hi Kenny, How about PocketPC? any porting is done on that? No, we have not done any work on Haskell on the PocketPC

C2hs compilation error

2002-07-08 Thread Kenny Lu Zhuo Ming
Hi, When I try to compile my HS code with some open source C code using C2HS 0.10.14, I encountered this error, c2hs --cppopts='-I/home/luzm/sphinx2-0.4/include/ -pedantic' listener.h Listener.chsc2hs: Generic fatal error. /usr/include/gconv.h:172: (column 3) [FATAL] Syntax error! The