Hacker Newsnew | past | comments | ask | show | jobs | submit | pedro93's commentslogin

Fixed memory leaks and it might be the time to release :p


I think you should have marked this "Show HN", it might have gotten more attention.


Funk implements PHPSGI specification (the PHPSGI repository contains middleware/app interfaces implemented in both PHP and Zend Extension)

https://github.com/phpsgi/phpsgi


there is a typo, it's FastCommit. :p


my bad :(


http://imgur.com/Db5obT8 powerful zsh completion generator


the routes are pre-compiled, so I think it only requires one calling conversion from js to c++ when dispatching routes.


It's a binding library of r3, you may check the benchmark from r3 project:

https://github.com/c9s/r3#performance


I don't know for node but FFI calls usually have an overhead. Depending on the complexity of the routes it might be faster to use a pure version.


When you use pcre in python or ruby, do you worry about the complexity? pcre and language VMs are also implemented in C/C++.

If we consider complexity before everything, we must use PHP to implement an OS. :-p


Hi! your implementation is inspiring to me. so I mixed some other ideas to implement this (for fun and experimentation).

this router library can be used for different purpose (outside of URL dispatching), although we don't gain so much performance from the point of view of each single request.


The behavior of (strndiff / strdiff) is different from strncmp or strcmp. strn?cmp does not return the offset. they are different functions.

and in order to ship this package to deb, deploy to different platform, use autotools to test C features is a requirement. (we used to build the project with cmake before we use autotools)


Reading it again strdiff is the same as strspn, but your's doesn't actually handle c strings and reads past null. You can do feature tests yourself without pulling in the whole autotools mess: http://git.musl-libc.org/cgit/musl/tree/configure


Thanks! that helps!


Is it still possible to build using cmake?

I too reliably avoid libraries that depend on these old bloated tools (although I appreciate its helpful for packaging; the script complexity and lack of portability is undeniably a trade off cost in using automake; the usefulness of this library for me would be for a static embedded use case, where automake is of questionable value)


well. implementing these feature testing scripts is kinda waste of time. so I rather to pick up autotools, which provides a integrated features.

to use it for a static embedded use case, you may write your own build script to compile the library (it's not hard to write one). the cflags are describe in src/Makefile.am

and you can use pkg-config to list the flags you need.


One thing you might want to consider (or might not) is looking at Mongrel 2. It uses ANSI C and supports a variety of platforms, using only gmake and standard macros. I haven't looked at the code very much myself, but it's a pretty neat accomplishments.


well, just for fun!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: