In order to support Chinese in Lucy, I have to write a custom analyzer. There is no good tokenizer in perl, so I borrowed from python with Inline::Python. It works, but I want to glue the C version using XS.

Too hard.

  1. XS is not a complete system.

you can not learn some general concepts and ‘learned it’.

  1. the C and C api in Perl is not easy either.

  2. build c project.

I do not write much c, only know the basics, so make it harder.

  1. not a lot of tutorial or example to learn from.

because of 1,2,3, acutally not a lot people use them.

becuase 1, even some people learned some part of it. Acutally, they only know it.

They can not share much of it, because there is not much general princples.

I have simliar experice. I think something is hard, and finally make it work.

Before I make it work, I promise I will share my experience with others.

However, after make it work, I feel there is no much to share.