2013-02-27

Regex

Still a regex noob. Reading up on the difference between POSIX and Perl regex.

It seems that among cross-platform, scripting applications, Perl regex > POSIX regex. For consistency. Buuuuuuut it turns out that PCRE is slightly more complicated, as it doesn't have a low-level "replace" function, whatnot, plus requires the installation of the PCRE library, whereas Posix works out of the box. Sheer minimalist laziness returns me to Posix.

Figured out a Haskell script that uses regex to find and replace tokens in another Haskell script. Time for a little break. I do not feel productive. But work and rest must retain a cadence.

A little beef stew, at 0152 hours. Surfing. Vancouver has a beautiful skyline. Maybe I'd like to live there someday.

Resumed work. Figured out how to fold over a list of parameters, to replace multiple tokens in a string. Using strings as symbols in prototyping, but really, I need to replace the strings with an ADT later. #haskell (Did it by day's end.) Much refactoring, slow, steady work, as my head isn't quite sharp enough to think both broadly and deeply, at once. The coding day pauses at 0723 hours. It seems that all the necessary techniques for interpolation of source code-templates, and compile-time generated code, are in place.

A noobish venture, but a fun one.

Finished the last of the beef stew. Some exercise. Shower. Tea. Back to coding. A briefly maddening experience, until I discover how to use (foldM). During the madness, of course, it seems like an eternity. More tea. Already 0959 hours. Resting briefly in between functional additions to the software.

Enough horsing around. Fatigued. 1058 hours. Bed.

1848 hours. Post breakfast, wash up, and groceries. No more coffee books in stock. Will get some later this week. Meanwhile 14 hours till next meeting. Will practicing coding till then.

Modifying standard library code. #feels133t #reallyNoob lol

So, I wanted to call this web framework DumbFuck, but censored it to DF, then decided that Doof would do as well. So, this is now the Doof web development framework, for Haskell programmers.

Stumbled upon Elm - nice Haskell-based language to abstract away the horrors of W3. Unfortunately, that's like introducing ML when everyone already works in C, and adoption doesn't seem to be grand. I'd welcome it of course. Meanwhile, I'm going to stick as close to W3Horror as I can, for transparency to industry standards. No Blaze, no Hamlet, no abstractions over XML, as desirable as that would be in the long term. Separation of concerns, fixing the standard of web languages, versus building a web framework on existing standards. (Then you get to dialects like Hamlet, and they've introduced at least THREE different morphemes symbolising variable interpolation. Gawd.)

I've written a templating framework for the EZ web framework in Erlang, I guess I will try to implement something similar here. Dunking my head into MVC land. More tea. Haven't had meat today. Brain not happy.

Debugging continues. What a wasted life.

2013-03-03

Need to go understand branching, subexpressions (it seems grouping and subexpressions may be the same thing), back-references, etc.

Bench presses in between regular expressions. Not that I'm very good with either. But it's a learning process.

Finally getting a better sense of why Perl regex > POSIX regex. It's a shortage of features.

Doof: Refactoring time. But first, probably sleep, that 9am meeting, and a day's work.

No comments :

Post a Comment