Flutterby™! : Polishing my rewrite of Perl static web

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

Polishing my rewrite of Perl static web

2014-02-05 04:25:07.051375+00 by Dan Lyke 6 comments

Polishing my rewrite of Perl static web site manager in C++. Floored by the speed difference. Now questioning why I ever liked Perl.

[ related topics: Perl Open Source hubris ]

comments in ascending chronological order (reverse):

#Comment Re: made: 2014-02-05 04:37:41.844808+00 by: Dan Lyke

From a Facebook comment I made:

I think if you had to look to my dissatisfaction with Perl, it really stems from trying to build and maintain large systems in it. As it gets bigger, and I start to depend on more libraries (like Moose), I end up with side effects and hidden code that would make the worst C++ template abusers blush. And the lack of typing and compile-time analysis means that all of the things that a good set of compiler warnings give you end up as cognitive load that needs to be written into tests.

Making me rethink my distaste for Java....

#Comment Re: made: 2014-02-05 06:31:38.426677+00 by: ebradway

Python...

I work in/on a Python codebase that's about 1.5 years old with 10+ developers. Most are working with a total refactor while I hang back with the old code. I can tell you that Python avoids most of Perl's weaknesses: using less magic, better objects, enforcing a more literate coding style, and pulling the best modules into the standard library. The real test for Python will come as 2.X is fully deprecated for 3.X.

And pylint is your friend...

#Comment Re: made: 2014-02-05 10:28:38.606413+00 by: meuon [edit history]

What little Python I have seen is very consistent, which is good. PHP's weakness is there are so many ways of using it by so many people with so little understanding of what they are doing. On the good side, it enables them/me.

I was munging Perl into something useful last night, I love how it parses files and does regular expressions and modifies a variable like $string =~ s/\,/\|/g.

I'm not sure my brain then (or now) would have handled C, but not really learning it is one of my few regrets.

Some kinky side of my brain thinks really good web applications SHOULD be done in C and I'm glad to see you exploring it.

#Comment Re: made: 2014-02-05 21:47:11.568421+00 by: ebradway

PHP's weakness is that it's PHP.

#Comment Re: made: 2014-02-06 01:14:55.657214+00 by: meuon

ha ha.. and understood. But I can make that monkey dance!

#Comment Re: made: 2014-02-07 00:21:39.496259+00 by: spc476

I wrote my blog engine in C. In fact, the portion that actually interfaces with the webserver is a very small portion of the code.