Tuesday, August 30, 2011
Worth looking at some slow day. [docs]
Sunday, August 28, 2011
Well, Padre is really incredibly extensible - except for one thing (I'm going to have to patch my current copy); you can't add a MIME type/file extension mapping from a plugin, which is very disappointing. So here's basically what I'm doing:
- Add .dpl => application/x-decl to EXT_MIME in Padre::MimeTypes.pm (patch)
- Create a Padre::Plugin::Decl.pm
- There, registered_documents can assign x-decl to Padre::Document::Decl.pm
- Create Padre::Document::Decl.pm
The Plugin module handles general UI stuff (menus, About, special tools, etc.) while the Document module customizes the editor's behavior to suit you. I'm particularly interested in folding - but so far the documentation is really chaotic.
I've got about ten windows open on this task:
Something I haven't spent much actual development time on yet, but ... it's starting to seem that the natural working mode of Decl will be to state that an action will be necessary, then to invoke various interactive services to specify that action more specifically.
So for example, if I have an invoice to issue (yes, yes, yawn) I'd start by just stating, "invoice" and passing that to ... some kind of action-consuming agent. The agent looks at this, sees that it is underspecified, and starts a conversation with me to determine just what it is I expect to do.
Once the action is fully specified (a customer has been selected, one or more outstanding jobs selected, and so on), then I can say, "Do it", and it is done, logged, whatever.
So what interfaces are available to me? Well, let's assume I want to be able to see the structure as it is built: that structure should be in Padre. With Padre::Plugin and Padre::Document, I can do that. Really easily, actually. The documentation sucks incredibly because it's not exactly a mature environment yet - but it's a great design.
So I could easily imagine right-clicking on anything in a Decl tree and getting immediate expert tools to deal with it: set up a database, select boilerplate, etc. It should end up going really fast. I'm looking forward to exploring it.
Friday, August 26, 2011
A one-size-fits-all environment for Web application writing. It apparently subsumes the database, server, and both server-side and client-side programming into one big programming language. I'm pretty sure I've linked it before, but just in case: Opa.
It might be instructive to work out their examples in Decl.
Opa's central thesis is that polyglot programming suffers from impedance mismatches that slow down any programming effort. I guess my own Decl-based WWW::Publisher's answer to that isn't to eliminate the polyglossia, but to provide some kind of macro-based assistance to make sure your polyglossia has a solid framework to work in.
Peter Norvig gets scary in analyzing an article about a checkers playing program. To evaluate the program, he writes a compiler for the language used to write the program. And then debugs both the language spec and the published program.
Odd that I've never started a compilers topic before now. I guess I've just trusted other people to do it better.
I really like this. [here][hnn]
What would be even cooler, though, is an authoring system based on Decl that could output either deck.js or PDF. That would even be easy, really. Maybe a nice get-your-feet-wet kind of application.
Monday, August 22, 2011
I should just look up PHP best practices on a regular basis, shouldn't I? Read this. Now look at #6.
#6 is advocating a manually operated macro system, which is really all that snippets are. Not that it's bad advice! But imagine tracking your snippet usage across projects, and being able to refine their usage across all projects as you (or more accurately your programming system) learned more. I want to go there.
[CPAN]. An interesting approach.
But a lucrative one! [article]
Seriously: larger strategies like "Web 2.0" or "social" and now "gamification" are quite reasonable collections of patterns - but pattern without content, in this case motivational content, is an empty thing.
I need a term for "site strategy patterns" or something like that.
Interesting article looking at maintenance of Ruby-on-Rails projects and how they are likely to recapitulate their phylogeny. Which tells me really (since I like software maintenance) I should be learning Ruby on Rails as the cool kids move on to whatever the hell they rabbit off to next.
A ... what? CSS boilerplate distro from Twitter to make the assembly of Webapps easier. Neat - and should be pulled in wholesale. And studied, really, because a higher-level Webapp (or app) domain should be built on top of the HTML and CSS domains I finished last month.
There's been a little run on the notion of publishing static sites to high-availability cloud servers that's kind of cool. Definitely a nice tool for the toolbox.
Sunday, August 21, 2011
CodeMatch is apparently a search-based Eclipse plugin that seems to have organized an unknown number of small snippets into parameterized macros described by pattern-like sentences. As you code, you search for those snippets, and the code is built before your eyes.
This rocks. If it retained the pattern-level semantic information it would rock harder - I wonder if those snippets are open source? This is a service - the snippets are online in their own database and seemingly accessible only through their plugin, so it looks like the answer is no.
The "getting started" page [here] is a good textual rundown of how things work. This is an incredibly fascinating development.
Wednesday, August 17, 2011
I have Decl templates working today. That only took over a year. There are some fiddly bits I'm still polishing, but - it's a template engine, and it has some special features that make it a good one for me (chief among them preservation of indentation: Pythonic literate programming at last). So it's a good feeling.
Tuesday, August 16, 2011
So a developer puts 200+ hours into an app, the customer fails to pay dime one, and the developer open-sources the app. Classic! Your mission, if you choose to accept it: parse the app.
Well, except it's Ruby on Rails, which is not yet one of my targets. But still - interesting enough to bookmark.
So for a while I've put strategy kinds of things over on the startup ideas blog. And insofar as strategy regards the underlying business, that's probably a good thing. But some Website strategy is a question of proper deployment - proper design of the environment that a site is operating in. And that should be here, I think.
To that end:
- Agiliq's quick Website checklist [part1] [part2] - part 2 has a list of other checklists.
- A neat trick: Using Adwords to comparison test different names for a service.
OK, so especially the checklist is something that should probably be in a semantic domain. I think really the whole business-process-and-strategy domain should be a Decl domain in some way. Whatever the hell that means for the future.
And certainly some of it should be in a list of deployment patterns/boilerplate.
For some reason, the concept of polyglot programming has been popping up a lot on HNN. So here are a few links:
Thursday, August 11, 2011
Thursday, August 4, 2011
Wednesday, August 3, 2011
Again: not strictly germane, but as this is my programming blog along with being the Semantic Programming blog, here is a git workflow for larger projects. I can't quite grok it, but that's because I'm a total git noob.
I'm starting to think some kind of A/B testing should be included in WWW::Publisher - probably as some kind of more generic mechanism, of course - but along comes a new strategy, the "bandit algorithm", which is more optimal, apparently. [article] [hnn]
I really want a Perl REPL inside Decl, but in a Wx or other GUI environment, I want to be able to put it into a separate window. Until now, somehow I've managed never to be able to figure out how it's done. But there is a CPAN shell in such a Wx app. What I really want, then, is to do that, but for a generic shell. (There is also such a thing for Tk, by the way.)
In the larger scheme of things, it would be nice to be able to define the "operating environment" in some way, and pop up semantically specified things like "a shell" in a way that's appropriate to that environment. In a remote context, it could even be some kind of AJAX thing. (I know it's no longer de rigeur to call it AJAX, but hey, I'm old.)