Lua: luaL_loadfile_factory()

I just implemented a script-cache for MySQL Proxy and had to learn a bit more about lua internals. As a result I wrote two functions which are generic enough for general consumption:

  • luaL_loadfile_factory()
  • luaL_loadstring_factory()

They also show how to write a lua_Reader for lua_load().

The #lua channel on freenode was ...

more ...


SQL parser in rage(l)

For the mysql-proxy I'm exploring several ways to write a small SQL parser for the internal commands. As I want to use basic SQL to modify the config and the internal operations I need a parser. Some time ago I used lemon which is used in sqlite3, which is ...

more ...

lua

lua + FastCGI

I was looking for a FastCGI backend for lua to have a asynchronous brother for mod-magnet in lighttpd.

Same as mod-magnet this embedding of lua is not meant to replace Frameworks like Rails or Spring, nor do I want to write average PHP application in it. I use ...

more ...

typesafe objects in PHP

I always disliked the way PHP handles Objects. There is no way to assign a type to properties. Validators have to be glued against the fields externally and you can't just generate a Object-Description (like WSDL) from a object either.

Usually you have DataObjects like:

/* a plain-old-php-object */

class Employee ...
more ...

building sigar

SIGAR is a cross-platform API to gather system-specific performance-data. It is developed by Hyperic and released under the GPL. We use it at MySQL as the backend for our monitoring agent.

Sadly SIGAR requires ant for building as it is meant to be used with a JNI-wrapper in Java applications ...

more ...

flv streaming

High performance flv-streaming with lighttpd is possible since lighttpd 1.4.11.

With lighty you can easily handle 10000 parallel downloads of your movies including protection against hot-linking with mod_secdownload. This is basicly all you need to build the free video.google.com for yourself.

Just add this you your ...

more ...

moving around

jan.kneschke.de is back online again. The old server got old and rusty and it has taken while to get everything setup again.

The most important articles are online again:

The old photo-storage is disabled, but a few new pics got uploaded to ...

more ...

php shell

The more I work with other languages like python and ruby I like their way how they work on problems. While PHP is very forgiving on errors, it is weak on the debugging side. It was missing a simple to use interactive shell for years. Python and Ruby have their ...

more ...