Planet AOLserver

May 09, 2008

Solution Grove

LoveThreads - OpenACS Eccomerce site

Mark Aufflick, a friend in the OpenACS community, just launched a new openACS based eccomerce site for environmentally friendly fashion.  Love Threads, Rethead the Planet Nice site design and nice clothes. Good work Mark!

May 09, 2008 06:09 PM

April 22, 2008

Dossy Shiobara

Yossi Kreinin praises Tcl and so should you!

Yossi Kreinin writes a very fair and positive blog entry about why he can't believe he's praising Tcl. In response, I left this comment on his blog:

I'm so glad you've put aside language bigotry and evaluated Tcl fairly--when you do, it's easy to see how convenient it can be for some tasks.

Of course I'm biased, but I also think Tcl is a fantastic language for developing web applications-thus, my affinity for AOLserver.

When you reduce web development to the simple process of "consume bits from a data source, transform strings, output bits to a network socket" ... Tcl's simplicity really makes rapid development a breeze, coupled with AOLserver's library of Tcl procs to ease some common tasks.

I hope more folks give Tcl a fair shake, given it's one of the oldest and arguably the most mature scripting language out there.

Even if you have no interest in Tcl, do read Yossi's blog entry about it. He really takes a close look at what makes for a good embedded scripting language and that's useful for anyone who is building an application today that needs such a thing.

Tags: , ,

(comment on this)

by dossy at April 22, 2008 02:30 PM

April 17, 2008

Dossy Shiobara

Sun is finally moving MySQL to the next phase

I love it when I can go against the angry mob!

Marten & Jonathan: Good for you! Take those bits closed-source, make customers pay for the functionality, and use that money to hire talented QA engineers. Let companies pay for the stuff and demand actual timely bug fixes to the real problems that linger in the MySQL code base.

Of course, I wholly expect that 18-24 months later, you re-open the source for these products, once they've been polished up. The companies will be pissed, but we all benefit from higher quality products.

Look around, folks ... this is the cycle we've observed many times of open source software. The fact that Sun is making these changes now is a good sign for MySQL's longevity as a technology and product and that is only good for the open source community.

Tags: , , ,

(comment on this)

by dossy at April 17, 2008 03:17 AM

April 16, 2008

AOLserver Wiki

Module inclusion

Configuring a binary or combined binary & Tcl module into your server -

←Older revision Revision as of 19:36, 16 April 2008
(3 intermediate revisions not shown.)
Line 1: Line 1:
Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface). They are included into your runtime using a section of the [[AOLServer Configuration]] file.
Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface). They are included into your runtime using a section of the [[AOLServer Configuration]] file.
== Configuring a binary or combined binary & Tcl module into your server ==
== Configuring a binary or combined binary & Tcl module into your server ==
-
As documented [[somewhere else in the wiki]], a binary module is a dynamically loadable library (.so or .dll) that will be linked into the server at startup (by the fact that it provides an external function called "Ns_ModuleInit" and an external integer called "Ns_Version"). To get AOLServer to try to link it in:
+
As documented [http://aolserver.com/docs/devel/c/ in the AOLServer C Developer's Guide], a binary module is a dynamically loadable library (.so or .dll) that will be linked into the server at startup. To get AOLServer to try to link it in:
# Put the file in the right directory:
# Put the file in the right directory:
#* In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib). In the AOLServer configuration file, by convention, this directory name is written as "${bindir}". Some installations use a separate "${homedir}/lib" (thus ${libdir}) directory.
#* In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib). In the AOLServer configuration file, by convention, this directory name is written as "${bindir}". Some installations use a separate "${homedir}/lib" (thus ${libdir}) directory.
Line 29: Line 29:
extern "C"
extern "C"
{
{
-
NS_EXPORT int
+
NS_EXPORT int
-
Foo_ModInit(char* server, char* module)
+
Foo_ModInit(char* server, char* module)
-
{
+
{
-
...
+
...
 +
}
}
}
</nowiki></pre>
</nowiki></pre>
Line 40: Line 41:
MODINIT = Foo_ModInit
MODINIT = Foo_ModInit
</pre>
</pre>
 +
== Tcl Modules ==
== Tcl Modules ==
Developing Tcl modules for use with AOLServer is just as straightforward, but have some interesting additional features: a Tcl library really can be installed only into the Tcl interpreters for a specific virtual server, and they can usually be reloaded dynamically.
Developing Tcl modules for use with AOLServer is just as straightforward, but have some interesting additional features: a Tcl library really can be installed only into the Tcl interpreters for a specific virtual server, and they can usually be reloaded dynamically.
Line 53: Line 55:
The syntax for loading pure-Tcl library modules is:
The syntax for loading pure-Tcl library modules is:
-
#*:<code>ns_param ''moduleName'' '''Tcl'''</code>
+
:<code>ns_param ''moduleName'' '''Tcl'''</code>
-
#: For example:
+
For example:
-
#:<pre><nowiki>ns_param nssession Tcl</nowiki></pre>
+
:<pre><nowiki>ns_param nssession Tcl</nowiki></pre>
[[Category:Documentation]]
[[Category:Documentation]]

by Rcobb at April 16, 2008 07:36 PM

AOLserver Developer's Guide

←Older revision Revision as of 19:27, 16 April 2008
(One intermediate revision not shown.)
Line 1: Line 1:
''(Lets not split these into seperate pages until there's enough content.)''
''(Lets not split these into seperate pages until there's enough content.)''
 +
We assume the reader is somewhat familiar with http://aolserver.com/docs/devel/c/, or its peer pages, and now is looking for more advanced development topics.
* [[AOLserver and Tcl Crash Course]] - A Programmer's Introduction (Outline)
* [[AOLserver and Tcl Crash Course]] - A Programmer's Introduction (Outline)
* '''AOLserver Internals''' -- a guide to common [[data structures]], a description of the lifetimes of a [[thread]], an [[interpreter]], a [[request]], and a [[connection]]. Discussions of memory allocation. The [[Private C API]].
* '''AOLserver Internals''' -- a guide to common [[data structures]], a description of the lifetimes of a [[thread]], an [[interpreter]], a [[request]], and a [[connection]]. Discussions of memory allocation. The [[Private C API]].
Line 7: Line 8:
----
----
* '''AOLserver Configuration''' -- a walk-through of the basic steps to properly configure AOLserver, from database pools to virtual hosting.
* '''AOLserver Configuration''' -- a walk-through of the basic steps to properly configure AOLserver, from database pools to virtual hosting.
- 
** Here's a starter for [[Virtual Hosting]] in AOLserver 3.x and 4.x.
** Here's a starter for [[Virtual Hosting]] in AOLserver 3.x and 4.x.
** [[Module inclusion]] and how your files are treated.
** [[Module inclusion]] and how your files are treated.

by Rcobb at April 16, 2008 07:27 PM

April 14, 2008

AOLserver Wiki

SMLserver

provide some factual information about SMLserver when it was AOLserver-related

←Older revision Revision as of 20:39, 14 April 2008
Line 1: Line 1:
 +
Early SMLserver releases provided a Stanard ML module for AOLserver (nssml.so).
 +
== See also ==
 +
 +
* A Functional Approach to Web Publishing ([http://www.itu.dk/~mael/mypapers/smlserver-4.1.0.pdf smlserver-4.1.0.pdf]), by Martin Elsman and Niels Hallenberg.
 +
* [http://www.springerlink.com/content/vbkf26yab0elru3g/ Web Programming with SMLserver], ISBN 978-3-540-00389-2.

by Dossy at April 14, 2008 08:39 PM

April 11, 2008

AOLserver Wiki

Ns writecontent

Filled in the basics from reading the code.

New page

<manpage>ns_writecontent</manpage>

'''NAME'''

: ns_writecontent - write content of request to Tcl channel

'''SYNOPSIS'''

: '''ns_writecontent''' ''?conn?'' ''channel''

'''DESCRIPTION'''

: ns_writecontent is identical to [[ns_conncptofp]]. It reads the content body of the conn (HTTP request) and copies it to the given Tcl I/O channel.

'''EXAMPLES'''

@@COMMAND_EXAMPLES@@

'''SEE ALSO'''

: ns_conncptofp

'''NOTES'''
:* Throws the error "could not copy content (likely client disconnect)" if sufficient (based on content-length) content can not be read.

[[Category:Core Tcl API]]

by Rcobb at April 11, 2008 01:20 AM

Ns conncptofp

Wrote a draft of the page based on reading the code. Have not tried to generate examples.

New page

<manpage>ns_conncptofp</manpage>

'''NAME'''

: ns_conncptofp - write content of request to Tcl channel

'''SYNOPSIS'''

: '''ns_conncptofp''' ''?conn?'' ''channel''

'''DESCRIPTION'''

: ns_conncptofp is identical to [[ns_writecontent]]. It reads the content body of the conn (HTTP request) and copies it to the given Tcl I/O channel.

'''EXAMPLES'''

@@COMMAND_EXAMPLES@@

'''SEE ALSO'''

: ns_writecontent

'''NOTES'''
:* Throws the error "could not copy content (likely client disconnect)" if sufficient (based on content-length) content can not be read.

[[Category:Core Tcl API]]

by Rcobb at April 11, 2008 01:17 AM

April 08, 2008

Michael A. Cleverly

Time to (play? fight?) with TurboTax 2007

Even though the deadline for filing US Income Taxes is still a week and a day away, I decided to procrstinate no longer and get it taken care of tonight.

On the way home for work I stopped at an office supply store and bought TurboTax Deluxe, which I've used in years past. It's usually been pretty painless, but this year I had to fight with it before I even got started on the actual tax stuff...

Since I did last years taxes I've upgraded to a MacBook Pro and "trickled down" my PowerBook to Shauna. Once I bought the new machine I hooked the two laptops up with a cross over cable and rsync'ed the contents of ~michael/ off of the PowerBook and onto ~michael/PowerBook on the MacBook.

As needed I've had ready access to saved files & data and haven't had any problems with the rsync approach. TurboTax, however, doesn't believe it can open last years return (which I want since it'll speed things up for this year since I won't have to re-enter a lot of information that hasn't changed, etc.)

I went to the TurboTax website, but it wants me to "login" before it'll let me read the search results whose titles seem like they might plausibly be of help. I'm fairly sure I have a login but since I can guarantee it'd be a fairly complex password (and one that I've never used anywhere else) I know it'd take me a while to remember or find it.

So I ask Caleb to let me use his mother's laptop, login, go to Finder and see that it lists last years saved return as being a "Turbo Tax File" in Finder. On the MacBook finder shows it being a "plain text" kind of file. Running the Unix file command on both laptops reports that the file is data.

So I wonder; how does Finder know to associate the file on the PowerBook with TurboTax? And why on the PowerBook does it think it is a text file? The first thing that comes to mind: rscyncing the file wouldn't have preserved the resource fork.

In OS X you can examine the resource fork of a file using standard Unix tools using the filename/rsrc. That is, for my file "2006_Return" I can ls -l 2006_Return/rsrc.

That, however, only showed me that the resource fork was 0-bytes (i.e., empty) on both laptops.

Back to square one. Googling on "kind" (what the Finder column-label calls the file type it displays) is a bit difficult since kind is rather generic and people don't normally talk about a "kind of file" as much as a "file type."

I finally found a very detailed post on the Mac OS X Hints forums that laid out the algorithm Apple uses to associate a given file with a given application in the Finder.

From those clues I did some more searching on file type and creator signature codes and came up with a very helpful Indiana University Information Technology Services knowledge base article entitled "In Mac OS and Mac OS X, what are file types and creators?".

In old (pre-OS X) versions of the Macintosh operating system the file system mainted various pieces of metadata (apparently separate from the resource fork) for every file. Specifically a 4-character "file type" code and a 4-character "creator" code. Most new OS X software doesn't carry on this tradition, apparently, but might TurboTax?

Next question: how to check what the file type and creator codes are? (The Indiana U. KB article had links to some shareware/freeware tools that let you set & see them but I didn't think I should have to download or buy additional software.)

I fired up tclsh trying to remember if, on the Mac, there were any extra file subcomands for dealing with such things. I didn't see any; (file stat $file var, for example, did not have any legacy-Macintosh values in it. I'm pretty sure Tcl on the Mac could have solved it for me, but rather than dig up that arcane knowledge I decided to search and find what installed Unix tools might be up to the task.

I found that there were two helpful utilities available since I'd installed Apple's Developers Tools on both laptops: GetFileInfo and SetFile.

Running /Developer/Tools/GetFileInfo on the PowerBook showed me:

file: "/Path/to/return"
type: "TaxR"
creator: "MIT6"

On the MacBook the type & creator were the empty string. I was able to set these values with:

$ /Developer/Tools/SetFile -t TaxR /Path/to/return
$ /Developer/Tools/SetFile -c MIT6 /Path/to/return

I restarted TurboTax 2007 and this time it saw my 2006 return and so I'm able to start finally...

Perhaps this blog post will be helpful to some future TurboTax Macintosh user who has transfered files from one machine to another...

April 08, 2008 03:27 AM

April 02, 2008

Solution Grove

OpenACS User Group in Brazil

Cesar Brea, who is also on the Board of the .LRN Consortium posted an annoucement on the next OpenACS/.LRN Usergroup.   Following the recent global user group meeting in Guatemala,  o resurgence de OpenACS/.LRN will next pop up in Brazil.  Here's Eduardo Santos'  summary: I'm happy to announce the first (or the second, if you consider this) OpenACS Brazilian users group meeting. The event will take place at the 9th International Free Software Forum...

April 02, 2008 08:26 PM

March 19, 2008

Michael A. Cleverly

Feeling Tcl-ish about Google's Summer of Code

The Tcl/Tk community has been accepted as a mentoring organization for Google's Summer of Code 2008 program. Makes me wish I were back in college...

March 19, 2008 01:57 PM

March 03, 2008

Solution Grove

Generating PDFs, Word, RTF, OpenOffice documents from OpenACS

There is often a need to take content from the web and share it in a different format. For one client, we built a web based report. The client also wanted the report to be able to be downloaded and viewed using Microsoft Word. To do this we decided to export the HTML results of the report as an RTF document. A quick search of the web will show there aren't too many options to convert HTML into an RTF document that will work with modern CSS based HTML. One program that can do this is Ope...

March 03, 2008 06:07 PM

February 29, 2008

Dossy Shiobara

Netcraft 2008 survey shows AOLserver is far from dead

The Netcraft February 2008 Web Server Survey says:

Unusually, America Online's open source AOLserver sees tremendous growth, jumping from 35 thousand to 105 thousand sites in just one month. AOLserver is a multithreaded, Tcl-enabled web server which can be used for large scale, dynamic web sites, but has not seen the release of a new version since 2006. The majority of the new sites served by AOLserver are hosted in Poland.

This isn't going to make any headlines, but for all those doubters out there who keep wondering who actually uses AOLserver, check out that growth.

The sad thing is, we could easily game the Netcraft survey by doing a few simple things:

  1. Register to become an ICANN accredited domain registrar.
  2. Offer domain registration at-cost, to offer the lowest possible prices to get customers.
  3. Offer free web domain parking or static file only hosting, all on AOLserver.

The costs involved would be around $10K for the first year, plus the cost of the actual AOLserver hosting, plus the $70K working capital in reserve to meet ICANN's requirements. This could all be set up on Amazon EC2/S3 to avoid having to provision real hardware as the customer demand grows.

Of course, what would be the point? Would having more significant numbers in the Netcraft surveys give AOLserver more credibility? I sure hope not--that would be foolish.

(via Mark Mcgaha)

(comment on this)

by dossy at February 29, 2008 03:32 PM

February 24, 2008

Solution Grove

Ajax and Accessibility

As we add Ajax-powered applications for our clients and share the code with others, there is some demand to make these features available within OpenACS and .LRN. .LRN, in particular, has a goal of meeting WAI accessibility guidelines. It is very challenging to meet these guidelines with Ajax-powered systems. At the latest OpenACS/.LRN conference, we had a discussion on new Ajax applications and accessibility. I created a wiki page to document what we learned, including links to resourc...

February 24, 2008 09:58 PM

Ajax Enhanced Tables (OpenACS Lists)

I got back this week from the OpenACS/.LRN conference in Guatemala. There was a great bunch of interesting people there and there was a lot to learn. I presented on an AJAX-enhanced data table, known in OpenACS as Listbuilder. The video and slides are available. The user interface was inspired by DabbleDB, which provides a collaborative alternative to spreadsheets for managing data. In our case, we needed to integrate this level of interactive data manipulation with an existing .LRN sys...

February 24, 2008 09:43 PM

February 22, 2008

Hamilton Chua

Yahoo ! releases YUI 2.5

Recently, Dave and I worked on adding some neat features to the list template code.

It's patterned after some of the things we saw in DabbleDB that we thought would be a nice have for list template on OpenACS.

Just last week Dave demoed Ajax List Template at the OpenACS conference at Guatemala.

So how is this related to YUI 2.5.

Well, with the release of 2.5 comes the Data Table control and from the looks of it we'll be rewriting the Ajax List Template to use it soon. The current version uses YUI menus and a lot of back-end code. With the Data Table control it seems we will be able to "progressively enhance" a list template better than how we did it now.

In addition to the Data Table control, a few more notable additions include :

Image Cropper
Layout Manager
  • This looks like the layout manager that ExtJs has.
Uploader

  • Looks like this is a flash based experimental file uploader based on the one they have at Flickr
  • I still like SwfUpload though :-)
Resize Utility
  • This utility will relieve us all of mucking around with the drag and drop api to make elements resizable with YUI :-)

by Ham-the-geek (noreply@blogger.com) at February 22, 2008 10:50 AM

February 21, 2008

AOLserver Wiki

Ns formvalueput

Added man page link as in the template / conventions, though it's a dead link.

←Older revision Revision as of 19:19, 21 February 2008
Line 1: Line 1:
-
Man page: '''not in source tree'''
+
Man page: http://aolserver.com/docs/tcl/ns_formvalueput.html
----
----

by Rcobb at February 21, 2008 07:19 PM

February 08, 2008

AOLserver Wiki

Ns hrefs

Missed a space in the indenting fix.

←Older revision Revision as of 18:21, 8 February 2008
(One intermediate revision not shown.)
Line 16: Line 16:
'''EXAMPLES'''
'''EXAMPLES'''
 +
<pre><nowiki>
 +
% set html {One good website is <A href='http://google.com/'>Google</A>.
 +
Another is <a href='http://www.yahoo.com'>Yahoo!</a>}
-
% set html {One good website is <A href='http://google.com/'>Google</A>.
+
% ns_hrefs $html
-
Another is <a href='http://www.yahoo.com'>Yahoo!</a>}
+
http://google.com/ http://www.yahoo.com
-
 
+
</nowiki></pre>
-
% ns_hrefs $html
+
-
http://google.com/ http://www.yahoo.com
+
-
 
+
-
'''NOTES'''
+
-
 
+
-
: How can I instruct the Wiki to not try to format URLs in the preformatted example text?
+
----
----
[[Category Documentation]] - [[Category Core Tcl API]]
[[Category Documentation]] - [[Category Core Tcl API]]

by Rcobb at February 08, 2008 06:21 PM

February 07, 2008

John Sequeira

Elastra delivers scalable OLTP. For Real?

Elastra now offers scalable OLTP via Amazon's compute cloud. Supported Db's include:
  • MySQL
  • Postgresql
  • EnterpriseDB When Elastra first decloaked late 2007, they were all about scaling read-only BI databases, which is the easy problem to solve and I wasn't very excited. This Enterprise DB press release, however, implies that they've got a point-and-clicky active-active-active-etc cluster technology, with automatic-versioning for ~ $400/mo (per server). Quote the release:
    EnterpriseDB, the Oracle-compatible database company, today announced EnterpriseDB Advanced Server Cloud Edition, a version of the company’s flagship RDBMS that is built on the Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3) Web services. EnterpriseDB has selected Elastra, the world’s first provider of elastic relational databases on demand, as its premier cloud computing software partner. Elastra’s Elastic Database Technology enables EnterpriseDB Advanced Server to run in a virtual, highly scalable, cloud-computing environment
    Wow.
  • February 07, 2008 12:26 PM

    February 04, 2008

    Michael A. Cleverly

    Double em-dash in TeX

    Jane Austen uses double em-dashes at times. The naive approach I tried in TeX at first— consisting of two consecutive em-dashes—leaves a small but visible amount of whitespace.

    A bit of Googling turned up a 1994 comp.text.tex post from Donald Arseneau (who, in addition to being a TeX-nician is also a Tcl'er!) that gave a satisfactory solution:

    \mbox{---\kern-1pt---}\penalty\exhyphenpenalty

    February 04, 2008 01:04 AM

    January 30, 2008

    Jade Rubick

    Valid characters in a tcl proc definition

    It appears you can include ! and ? in proc names in Tcl. So you can do nice Ruby-like proc names, such as valid? proc_with_side_effect! Interesting.

    January 30, 2008 09:52 PM

    January 27, 2008

    Dossy Shiobara

    shiobara.com is getting a make-over

    It's been over two years since we've taken the photo album down on the family website, shiobara.com--June 2005, to be exact. It's time to give it some proper care and feeding. The first step was to replace the old site with Wordpress, which required some changes to AOLserver in order to get it to work right. I then created a new theme that's a little less cluttered and with colors that aren't quite as offensive. Here's a "before and after" set of screenshots:

    shiobara.com, before
    (shiobara.com, before)

    shiobara.com, after
    (shiobara.com, after)

    I realize I have no graphic design ability--hell, I can't even coordinate colors when I dress myself. Someday, I'll find someone who's ridiculously talented and wants to do the graphic design for me to save me the embarassment of doing it myself. Until then, I'll just keep hacking away at it myself.

    Now that the site is all in Wordpress, the next step is to clean up the photo album. I took it down back in 2005 and wanted to redo it, but never got around to it. So, recently, I've started working on a Media Gallery plugin for Wordpress that uses jQuery, jCarousel Lite and ThickBox. It's pretty slick, and once we've launched the photo album, I'll release the plugin as open source. If you'd like a sneak peak to beta test it, just ask.

    Tags: , , , , ,

    (comment on this)

    by dossy at January 27, 2008 07:55 PM

    January 26, 2008

    Michael A. Cleverly

    An experiment for Valentine's Day

    Among all the Marginal Revolution Markets in Everything posts, one that personally intrigued me was #4, personalized romance novels.

    For $55.95 a company in Florida will produce a unique book based on various details you provide (name, hair color, favorite car, favorite radio station etc.) and then plug those details into a pre-fabricated story running between 180 and 210 pages.

    As Tyler Cowen noted:

    Some people actually like this idea:

    "It was an addictive read because it makes you the star," said Pete Hart, 34, who received a pre-fan novel called "Vampire Kisses" from his girlfriend. "I was referred to as Pedro in the book, which is my nickname. I found that quite charming."

    Another fellow noted:

    "It read more like a novel or novelette and less like a typical romance novel," he said. "I enjoyed reading it. Besides, I was in it."

    I'm intrigued, since I've made typesetting a hobby, and in part because of the huge profit margins. In my experience producing a single 180-210 page book shouldn't cost more than ~$7, so $55.95 would represent an eight times markup. Not bad...

    Of course not being a reader of romance novels (or chick-lit generally) I'm somewhat skeptical of the appeal. But I recognize I'm probably not representative of the demographic and so I shouldn't necessarily consider my own opinion too highly. Better to try an experiment and attempt to quantify the appeal generally.

    I am going to prepare a personalized book for my wife for Valentine's. This will provide me with one data point. However a sample size of one (especially when she might be biased to say nice things regardless of what she really thinks) isn't large enough to draw any conclusions from.

    As long as I'm going to be creating a personalized book for my wife the marginal effort to create an additional personalized book for someone else is very low. (I'm already going to write a Tcl script to take a list of changes and apply it to the original text; re-running the script with someone elses list of changes would be trivial.)

    An invitation to participate in an experiment for Valentine's Day 2008

    My inivitation to you, dear reader:

    I'm willing to produce a personalized trade-paperback (6"x9") version of Jane Austen's Pride and Prejudice for you.

    I only ask two things:

    1. That you reimburse me after the fact for the actual cost of having the book produced and shipped. (Payment via PayPal or check; I'm estimating the book itself will probably cost in the $9 - $12 range depending on what size font I end up using.)
    2. That after you've given the book to your significant other and (s)he has had an opportunity to read it you complete a short follow-up survey that I'll send so I can quantify peoples reactions generally.

    The characters whose names could be changed to customize the story (links are to character summaries at Wikipedia) include:

    This chart from Wikipedia shows the relationships between the aforementioned characters.

    Location names that could be changed include: Rosings (Lady Catherine de Bourgh's estate); Netherfield (the estate leased by Mr. Bingley); Meryton (the village near where the Bennet's live); Brighton (where Lydia is invited to go with the militia); and Pemberley (Mr. Darcy's estate).

    How to participate

    Given that Valnetine's Day is two and a half weeks away, and to allow time for production and shipping, please email me (michael at cleverly dot com) with the following no later than Saturday, February 2nd, 2008:

    • Your name and mailing address (where to send the book to)
    • A brief dedication (if any) to include at the beginning
    • A list of alternate character names (i.e., "Shauna Christensen" instead of "Elizabeth Bennet", etc.)

    Please put Pride & Prejudice in the subject line of your email to decrease the chances of your email being inadvertantly miscategorized as spam. If you haven't received an acknowledgement from me within 48-hours please send another message.

    I'm willing to ship internationally; however, I doubt time would permit your books arrival prior to February 14th, and the shipping expense would undoubtedly be greater.

    Incidentally, if the idea of this experiment offends any die-hard fans of Jane Austen you have my apologies in advance.

    January 26, 2008 10:53 PM

    January 24, 2008

    Dossy Shiobara

    nscgi: ns_request_cgi and REQUEST_URI change

    In the "scratch your own itch" department, I decided to get Wordpress working under AOLserver. Wordpress is written in PHP, and while AOLserver can load PHP as a module, it doesn't play nice when you configure AOLserver with multiple virtual servers. The other option, running PHP as CGI using nscgi and php-cgi, does work for the most part. However, there were a few issues I ran into that required changes to nscgi, which I'll outline below.

    Adding REQUEST_URI to CGI env. variables

    PHP expects an additional environment variable, REQUEST_URI, to be included on CGI requests. Of course, this isn't part of the CGI/1.1 specification. Basically, PHP expects REQUEST_URI to contain the Request-URI (from the HTTP/1.1 specification, see section 5.1.2). So, I added this in.

    Mapping URLs to CGI with ns_register_cgi

    In order to map an URL to be handled by nscgi, you previously had to make the change in your config .tcl and restart AOLserver. One of the great things about AOLserver is the fact that you can modify some settings at runtime, without a restart. So, I looked at whether it would be possible to add additional mappings at runtime, and it appears that under the hood, nscgi also uses the Ns_RegisterRequest C API which is supposed to be safe to execute at runtime. So, I added a new Tcl command, ns_register_cgi, which is now part of nscgi. It is just a wrapper around CgiRegister, and thus takes the same argument.

    For example, if you wanted to map all requests to "/foo" (including "/foo/bar") to a PHP script "/var/www/myfoo.php", you would use something like this:

    foreach method {GET POST HEAD} {
        ns_register_cgi "$method /foo /var/www/myfoo.php"
    }

    This maps GET, POST and HEAD requests to URLs starting with "/foo" to the script specified.

    Caveat: It is currently possible to load the nscgi module multiple times in the same AOLserver process, for each virtual server. It is also possible to load it multiple times for the same virtual server. I'm not sure why anyone would do that, but it's possible. In that circumstance, the behavior of ns_register_cgi is undefined--as in, I haven't tested it. It may or may not work correctly. If you run such a configuration, where nscgi is loaded multiple times in the same virtual server, please test this carefully and share your findings. Thanks.

    Where's the code?

    I've commited the changes to SourceForge CVS, both in HEAD (rev 1.33, diff) and the aolserver_v40_bp branch (rev 1.23.2.4, diff).

    Tags: , ,

    (comment on this)

    by dossy at January 24, 2008 02:23 PM

    January 23, 2008

    Solution Grove

    A mod_gzip for OpenACS ?

    I envy the web apps running off apache. They get an incredible speed boost thru compression just by enabling the mod_gzip module. Websites on AOLServer 4.5 can use ns_zlib to serve compressed adp pages but I don't know yet if static files like images, cascading style sheets or javascript can automatically be served compressed. We've been doing lots of front end development and the size of javascript and css files can take its toll on load times.  Just yesterday I...

    January 23, 2008 04:44 PM

    January 16, 2008

    Dossy Shiobara

    Today's geek news: Sun acquires MySQL AB

    Sun + MySQL = ???

    After yesterday's yawner of a Macworld Expo, I wasn't really expecting today to yield much interesting news. Of course, I wake up to the news that Sun acquired MySQL! Both Jonathan Schwartz and Kaj Arnö share with us some of the best-laid plans of mice and men.

    My first reaction was most definitely "WTF?!?" After the initial shock subsided, I wondered if it was April already. Checking my calendar, I realized it wasn't. Ah, maybe I'm still sleeping and this is just a really lucid dream? Nope. Okay, so how do I get from "denial" to "acceptance" as quickly as possible?

    Sure, the next phase set in quick: anger. How dare they do this? First, Sun gives up the legacy of their SUNW ticker symbol in exchange for JAVA. Now they're going after my beloved MySQL database? Please don't tell me the next press release to come out is the announcement of a renamed MySQL into some craptastic "Sun Enterprise Data Management Suite," codenamed "Monkeybutter."

    Fine, I'm being completely irrational, I know it. Things can't get that bad, that quickly, right? I mean, if we're all supportive and positive, things will just keep getting better for both Sun and MySQL, right? I mean, Sun infusing more money into MySQL will inevitably make it a better product, right? Just let some good come out of this situation, please?

    Oh, what's the use? Companies are struggling so hard to find MySQL talent, and it's allegedly "the world's most popular open source database" according to MySQL itself. Sun bet the farm on Java and subsequently we've watched the company fall into the pit of irrelevancy. Who really cares what happens to either of these companies any more?

    You know who? I do. I love Sun hardware and I love using MySQL databases. If there's some benefit to be had here, I'm sure Jonathan Schwartz will find it and exploit it to the benefit of his customers. In any business, if I had to bet on someone, I'll always pick the guy with the pony-tail and T-shirt to win. If you've ever seen me in person, you'll know exactly why. :-)

    (comment on this)

    by dossy at January 16, 2008 02:43 PM

    January 15, 2008

    Dossy Shiobara

    Tcl is alive and well with Tcl 8.5

    Tcl logo

    As much as people wonder "who still uses Tcl?" or "what the heck is Tcl?" ... it's still alive and well and under steady new development. The long-awaited release of Tcl 8.5 happened this past December 20, 2007. You can download it from here.

    The discussion on Slashdot about it shows that there's still a lot of misinformation and outright FUD being spread about Tcl, now 20 years old. Of course, the Tcl community seems to focus more on excellence in engineering than evangelism and PR, so Tcl will likely remain "a well-kept secret, sitting out in plain sight" for the next 20 years.

    For people who are already familiar with Tcl but would like to know what significant changes were introduced in Tcl 8.5, Michael Cleverly has a fantastic write-up on it. I highly recommend reading what he wrote if you're looking to take advantage of Tcl 8.5's new features.

    Tags:

    (comment on this)

    by dossy at January 15, 2008 09:25 PM

    January 12, 2008

    Solution Grove

    XSS: Welcome to 2003 (or thereabouts)

    Ajaxian mentions SafeErb for Rails, an add-on to help secure that user input is safe. It does so by checking if you explicitly call a certain method to escape the user content. OpenACS, the base for .LRN, has been doing this for awile now. We took a different approach. All content is escaped by default, and the programmer must decide when to let through unescaped content. Either way it's something all Web frameworks should support if they allow users to enter HTML.

    January 12, 2008 09:59 PM

    January 10, 2008

    AOLserver Wiki

    AOLserver Cookbook

    ←Older revision Revision as of 16:49, 10 January 2008
    (One intermediate revision not shown.)
    Line 480: Line 480:
    <pre>
    <pre>
    ns_limits set default -maxupload [expr 25 * 1024 * 1024] ;# Maximum file size set to 25Mb
    ns_limits set default -maxupload [expr 25 * 1024 * 1024] ;# Maximum file size set to 25Mb
     +
    </pre>
     +
     +
     +
    == Return a file generated live ==
     +
     +
    Example using the db_foreach function from OpenACS, for the sake of code readability:
     +
     +
    <pre>
     +
    db_foreach get_mailing_addrs "
     +
     +
    select company_name,
     +
    address,
     +
    city,
     +
    province_abbrev,
     +
    postal_code
     +
    from ce_members
     +
    order by company_name" {
     +
     +
    append csv_text "\"$company_name\",\"$address\",\"$city\",\"$province_abbrev\",\"$postal_code\"\r\n"
     +
    }
     +
     +
    ns_set update [ns_conn outputheaders] content-disposition "attachment; filename=\"member-addresses.csv\""
     +
     +
    ns_return 200 application/octet-stream $csv_text
    </pre>
    </pre>

    by Juanjose at January 10, 2008 04:49 PM

    Hamilton Chua

    Ajax powered File Manager demo

    The revolution started a few short years ago with Google's Gmail.

    It's the web application that put WOW back into WWW.

    It is truly the first web application that I would trade in my trusty e-mail client for. The decision to switch was a no brainer. Yahoo Mail didn't have POP. At that time, no free email hosting provider offered more than a measely 5MB of email storage. Outlook Express crashes at the sheer volume of e-mail I get everyday. Finally, searching thru hundreds to thousands of messages wasn't such a chore because it actually works !

    Suddenly, more and more people were turning to their browsers to read mail, gradually weaning away from the desktop e-mail clients that they have become so use to.

    After the e-mail client, is the file manager not too far away from the same fate ?

    Probably not in the near future. As I have mentioned before, browsers need a little catching up before we can actually see that happening. Right now, for instance, if you want seamless dragging and dropping of files from your desktop to a web page, you have to rely on a java applet.

    Click the title link above to see a demo I wrote of an ajax powered file manager (username:coa,password:123) that works on top of the robust OpenACS File Storage package.

    I wouldn't call it innovative, in fact, it copies a lot of things from Windows Explorer but it has to start somewhere :-)

    by Ham-the-geek at January 10, 2008 12:27 PM

    Friend Webs on Facebook

    Got a facebook account ?

    Why don't you login to facebook and head on over to http://apps.facebook.com/friendwebs/ and see Solutiongrove's first ever Facebook app.

    It's a neat interactive visualization of your friends on Facebook. If you're curious as to why we called it Friend Webs, take a look at the screen shot below, it's obvious.

    We used Jsviz to generate the cool force directed graph and Extjs for the toolbar, popup and effects.

    Dave wrote an openacs facebook-api package that made it really easy to talk to facebook from OpenACS.

    It's currently in beta and we would really appreciate comments and suggestions on how to improve it and make it even cooler.

    friendwebs

    by Ham-the-geek at January 10, 2008 12:26 PM

    Michael A. Cleverly

    A great new Tk resource

    Mark Roseman has created a new Tk website (tkdocs.com) which aims to provide "a language neutral, up-to-date (8.5+) best practice tutorial and associated documentation".

    The tutorial is coming along quite nicely, with code examples for both Tcl and Ruby. Presumably examples for other languages (Python, Perl, etc.) may yet be forthcoming—or would be included if someone steps up and contributes them.

    The site, as new is it is, is already off to an excellent start. Kudos to Mark!

    January 10, 2008 04:06 AM

    January 09, 2008

    Solution Grove

    Intelligent Web App Email Handling

    Should Email Errors Keep Customers From Buying? describes a robust way to handle email in Java. The main point is very clear - don't leave a web visitor waiting while the application server attempts to send an email to them. I am surprised this is even an issue in 2007. I suppose not everyone has gotten the message (no pun intended!) that OpenACS has used a background thread to deliver email for years. It uses a simple queue that attempts to save the messages, batch them up, and send ...

    January 09, 2008 11:29 PM

    Dossy Shiobara

    Hackfest: Facebook List of the Day profile box implementation

    The weekly Hackfest took a bit of a break due to the winter holiday and resumed this past Monday. The goal for this session was to turn the visual design created last time into actual FBML that would render inside a profile box.

    The first step was to create the database schema, which was mostly outlined in the design document. I went ahead and created actual DDL scripts for MySQL based on what was described in the design doc. I'm expecting these to change as development progresses, but this represents the minimum required to implement our current visual design.

    The general approach for the profile box implementation is to use profile.setFBML to set the FBML of the profile box to simply "<fb:ref handle="profile_box"/>". We want to do this because every day when the profile box needs to be updated for every single Facebook user who has added our application, we don't want to have to invoke profile.setFBML with the newest information--that just won't scale well. Having the profile box simply contain an <fb:ref> means we can effectively update everyone's profile box with a single call to fbml.setRefHandle, once per day.

    I've also created a SQL script that can be used to populate the MySQL database with sample data for testing. The only MySQL-specific part of it is the use of "CREATE TABLE ... LIKE ..." which allows us to use the submission_template and votes_template tables to create our individual instances of those tables for each list_id, rather than embedding the DDL for each of those in our code itself.

    After all this, here's a screenshot of the profile box off my own Facebook profile page, pulling the sample data out of the database and rendering it via FBML:

    Facebook List of the Day app. screenshot, 2008-01-08

    The rating widgets--the "thumbs up" and "x" icons--don't actually work yet, but that's going to be next week's challenge, getting the Facebook "mock AJAX" working.

    Tags: , , ,

    (comment on this)

    by dossy at January 09, 2008 05:26 AM

    January 06, 2008

    Michael A. Cleverly

    Tcl 8.5: in & ni

    Once upon a time (Tcl 7.x; probably earlier too?) the best way to test for string equality in Tcl was:

    if {[string compare $x $y] == 0} ...

    Beginning with Tcl 8.1.1 the preferred way became:

    if {[string equal $x $y]} ...

    Beginning with Tcl 8.4 and the introduction of the eq and ne operators testing for string equality became much more concise:

    if {$x eq $y} ...

    Much more readable, concise, and less to type. In Tcl 8.5 we get a simillar improvement for testing whether a particular item is a member (or not) of a list:

    if {$x in $y} ...

    Which IMHO is a huge improvement over the former idiom:

    if {[lsearch -exact $y $x] != -1} ...

    Naturally ni is to ne as in is to eq. And to top it all off, ni is fun to say too.

    January 06, 2008 02:49 AM

    January 04, 2008

    Michael A. Cleverly

    Tcl 8.5: custom math functions & arbitrary precision integers

    In Tcl 8.5 you can now define, at the script level (instead of needing to write in C) custom math functions. For example here is a factorial function:

    proc tcl::mathfunc::fact {n} {
        if {![string is integer -strict $n] || $n < 0} then {
            return -code error "fact is only defined for non-negative integers"
        }
        set result 1
        # remember, n! (n factorial) is the product of all integers between 1 and n
        # except 0! which is defined to be 1
        for {set i 2} {$i <= $n} {incr i} {
            incr result [expr {$result * $i}]
        }
        return $result
    }

    Then we can use fact($n) in expr, if, while, for, etc. just like any of the "built-in" math functions.

    Since we now have arbitrary precision integers (thanks Kevin!) we can compute factorials that exceed the native size of a long integer, i.e., 42!

    % expr fact(42)
    1405006117752879898543142606244511569936384000000000

    Defining your own math functions makes solutions to Project Euler problems easier to write. YMMV. The other features of Tcl 8.5 will probably be exciting to an even wider audience.

    As of January 2008 the Google calculator can only calculate up to 170!. We can do twice as better quite quickly (timings from my 2.4 GHz MacBook Pro laptop):

    % time {expr {fact(171)}} 1000
    295.348728 microseconds per iteration
    % time {expr {fact(340)}} 1000
    791.435306 microseconds per iteration

    January 04, 2008 05:19 AM

    January 03, 2008

    Michael A. Cleverly

    Tcl 8.5

    After more than four years in the making, Tcl 8.5 was released a few days before Christmas. And wow, what a treat it is!

    This release is, in my opinion, the best ever.

    I first became acquainted with Tcl 10-years ago via Philip Greenspun's original Database Backed Websites book. At the time AOLserver 2.x was closed source but available at no cost. I never had much hands on experience with the Tcl 7.6, 8.0, 8.1 and 8.2 releases; I made the jump straight to Tcl 8.3 (IIRC) once America Online open sourced the code base for AOLserver 3.x.

    Since Tcl has been around for twenty years now, there is a fair amount of outdated information on the web regarding Tcl's features, performance and capabilities that doesn't apply at all to modern Tcl versions.

    There are a number of features that excite me in this release. I intend to blog a bit about each of the following (I'll update this post with links to subsequent posts as they get written):

    Stay tuned.

    Addendum: Dossy points out that I overlooked the biggest news: the {*} expand operator, which means an expansion from the 11-rule endekalogue to a 12-rule dodekalogue. (Tcl 8.5, now with 9% more syntax!)

    January 03, 2008 05:50 AM

    December 23, 2007

    AOLserver Wiki

    Ximon Eighteen

    ←Older revision Revision as of 21:19, 23 December 2007
    Line 1: Line 1:
    -
    : mailto:ximon.eighteen@int.greenpeace.org
    +
    : mailto:ximon.eighteen@gmail.com
    -
    AOLServer/OpenACS developer for Greenpeace International, Amsterdam.
    +
    See: http://ximoneighteen.com/
    -
    System Support Engineer for internal and external servers related to the same.
    +
    -
    C/C++ programmer by trade.
    +
    -
    Jack of all trades in my spare time, esp. re: computing. (e.g. PHP/3D Engines/Sound card programming/whatever)
    +
    -
    Running Linux Fedora Core 2.
    +
    [[Category:Person|Eighteen, Ximon]]
    [[Category:Person|Eighteen, Ximon]]

    by Sunjammer at December 23, 2007 09:19 PM

    December 18, 2007

    Solution Grove

    Solutiongrove contributes Facebook API Package to OpenACS Community, updates Friend Webs

    Solutiongrove is pleased to announce that we have comitted the Facebook API Package code authored by Dave Bauer to the OpenACS Community. The code for the package is now available on CVS HEAD. In addition, we have upgraded the Friend Webs Facebook application to use ExtJS 2.0 while adding the following new features: the ability to create, edit, and save your own Friend Webs mini-feed publishing of user actions viewing a friend's webs

    December 18, 2007 10:11 AM

    December 17, 2007

    Dossy Shiobara

    del.icio.us/dossy links since December 10, 2007 at 09:00 AM

    del.icio.us/dossy (RSS) links since December 10, 2007 at 09:00 AM:

    (comment on this)

    by dossy at December 17, 2007 02:00 PM

    December 16, 2007

    Dossy Shiobara

    I'm officially a Taproot Foundation volunteer

    Taproot Foundation logo

    After hearing about the Taproot Foundation from Jennifer, who came to the November MySQL Meetup and told me about it, I decided to complete a profile as a volunteer. Shortly after, someone contacted me and we had a brief chat and scheduled me for their December 11th orientation at the Time-Life Building in NYC, which was this past Tuesday.

    In a nutshell, the Taproot Foundation is nonprofit organization that awards service grants for other nonprofits' projects, to be performed by volunteers, for free.

    Attending the orientation and completing the volunteer agreement form was the last step before I could be selected by an account director to work on a service grant (project). Now, I'm just waiting to hear from someone who wants me on their team.

    Why am I signing up to volunteer my time for free? Especially after my recent financial stumble just a few weeks ago? How can I possibly have time to volunteer when I should be trying to squeeze every billable hour out of my non-sleeping time?

    I like to say, "The best gifts are the ones you cannot wrap." I've always enjoyed giving of my time and talents where they are wanted. As a teenager, I worked as a volunteer at a local hospital, as well as at a homeless shelter. As an adult, I've been playing guitar for the Sunday school children at church, as well as singing in the church choir, and I plan to participate in the Sierra Bravo's F1 Overnight Website Challenge in March 2008. Volunteering through the Taproot Foundation is the kind of thing that really suits me.

    I'll write more about my experiences volunteering for Taproot once I'm on a service grant. Until then, if you want to ask me questions, feel free to leave a comment below. Or, perhaps you want to sign up as a volunteer yourself!

    Tags: ,

    (comment on this)

    by dossy at December 16, 2007 05:28 PM

    December 12, 2007

    AOLserver Wiki

    Ruby

    ←Older revision Revision as of 16:49, 12 December 2007
    Line 1: Line 1:
    -
    This module used to live at: http://www.toddbrandlabs.com/code/ns_ruby.