Search Results: "js"

22 January 2008

Matthew Johnson: Packaging Java with Javatools

I have just uploaded javatools 0.5 to unstable and it is currently waiting in NEW. Anyone wishing to try it out earlier can find source and packages (it's arch: all) at http://www.srcf.ucam.org/~mjj29/javatools/ . Javatools replaces the existing jarwrapper package and also contains programs to help packagers in creating packages for Java programs and libraries. Packaging tools The javahelper package consists of several small programs which make packaging Java programs and libraries easier. They are generally designed to work in the same fashion as the debhelper programs, but start with the jh_ prefix. All of the programs have their command line arguments documented in manpages. jh_build Many Java programs and libraries are distributed without sane build systems. jh_build provides a simple interface for building Java source code into Jars, including setting the appropriate entries in the manifest. In almost all cases all that needs to be done to call jh_build is to set JAVA_HOME and CLASSPATH and then call jh_build with the name of the jar and the directory containing the source.
JAVA_HOME=/usr/lib/jvm/java-gcj
CLASSPATH=/usr/share/java/esd.jar:/usr/share/java/jsch.jar
jh_build weirdx.jar src
   
This command will compile all the Java files under src , set the classpath in the manifest and build it all into weirdx.jar. A couple of other options are worth mentioning. If this jar contains an application rather than a library then the -m or --main option can be used to set the Main-Class attribute in the manifest which will allow the resulting jar file to be be executed jh_build also provides a --clean parameter which should be called in the clean target of debian/rules . jh_libs For library packages Debian Java policy currently requires that the libraries be installed to /usr/share/java in a versioned format and with an unversioned symlink. jh_libs will take a jar and correctly install it. As with debhelper programs, this can either take a jar as a parameter, or read a list of jars from a file in the Debian directory. It also follows the -p , -i and -s semantics of debhelper for selecting which packages to install the jar to. When operating on a package, jh_libs will read the list of library jars from debian/package.jlibs or debian/jlibs . The jlibs file is a list of jars to install, one per line, and works exactly the same as listing them on the command line. Each jar is installed to debian/package/usr/share/java/ in the appropriate versioned and unversioned forms. jh_depends jh_depends works like dpkg-shlibdeps, but for jar files. For each jar in the package it takes the jars on which it depends and finds the packages to which they belong. These are included in the debhelper substvars as $ java:Depends . The control file can then just list that variable which is filled in automatically. This is done by reading the Class-Path attribute from the manifest of each jar. Jar files should include this attribute to prevent applications which use them from needing a full recursive classpath in their startup scripts and to prevent unneccessary transitions when the library changes its dependencies. If the package is not built with jh_build and the upstream build system doesn't set it correctly then jh_manifest can be used to fix this. If the application uses executable jars (see Runtime support below) then jh_depends will also add the appropriate depends on jarwrapper and the correct Java runtime. jh_manifest Many upstream build systems do not set the Class-Path attribute in the jars they create. This leads to several unwanted problems, such as expanding the classpath which applications have to use and introducing unneccessary transitions. They also may not set the Main-Class attribute. Both of these are required for running jars with the -jar parameter. jh_manifest can fix the manifest files of jars. It can either read from a manifest file in the Debian directory or run in a mode which updates all the jars with the CLASSPATH environment variable. The manifest files can either be debian/package.manifest or debian/manifest . The format of this file is a list of jars and indented below each one a list of manifest elements to set:
usr/share/weirdx/weirdx.jar:
 Main-Class: com.jcraft.weirdx.WeirdX
 Debian-Java-Home: /usr/lib/jvm/java-gcj
   
jh_exec The Runtime support section below describes running executable jars directly. jh_exec will scan package directories for jars in the paths, or symlinks to jar from the paths, and ensure that they have been set executable if necessary. jh_makepkg jh_makepkg will create template Debian packages for Java programs and libraries similar to dh-make . It should be run in the source directory and it will create the orig.tar.gz and most of the files in the Debian directory, which need only small changes neccessary to build the package. java-propose-classpath Some upstreams have complicated classpaths which may not be obvious to the packager when using jh_manifest to set the Class-Path attribute. java-propose-classpath will unpack a jar and look at the symbols imported to the class files, then scan all the jars in /usr/share/java . This shouldn't be run in the build since it is slow, and there may be ambiguities that the packager must resolve. It is still very useful for the packager as most of the time it will get it right automatically. Runtime support Javatools also provides some runtime support. Unlike compiled programs, or purely interpreted programs with hash-bang lines, Java programs cannot be directly executed. Many upstreams expect them to be run using java -jar jarname or java classname . This is not generally acceptible in systems which expect to just be able to run the command or launch it from a menu. As a result, many packagers are writing wrapper scripts which just call java with the correct classpath, jar and main class. jarwrapper There is an alternative to wrapper scripts, however. The binfmt_misc kernel module allows the kernel to call out to a program in userspace to execute specific types of file. jarwrapper registers itself as a handler for executable jars. This is done by reading values from the manifest file. In order for executable jars to work the following attributes must or may be defined in the manifest. These attributes can be set using jh_build and jh_manifest . Putting it together This section shows the debian packaging generated by jh_makepkg for an application and a library using jh_build . Sample Library Packaging debian/control
Source: jsch
Section: libs
Priority: optional
Maintainer: Matthew Johnson 
Build-Depends: debhelper (>= 5), javahelper, java-gcj-compat-dev, libzlib-java
Standards-Version: 3.7.3
Homepage: http://www.jcraft.com/jsch/
Package: libjsch-java
Architecture: all
Depends: $ java:Depends , $ misc:Depends 
Description: Java secure channel
 JSch is a pure Java implementation of SSH2. JSch allows you to
 connect to an sshd server and use port forwarding, X11 forwarding,
 file transfer, etc., and you can integrate its functionality
 into your own Java programs. JSch is licensed under a BSD style
 license.
   
debian/rules
#!/usr/bin/make -f
export JAVA_HOME=/usr/lib/jvm/java-gcj
export CLASSPATH=/usr/share/java/zlib.jar
build: build-stamp
build-stamp:
	dh_testdir
	jh_build jsch.jar src
	touch $@
clean:
	dh_testdir
	dh_testroot
	jh_build --clean
	dh_clean
	rm -f build-stamp jsch.jar
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
binary-arch: build install
	# Java packages are arch: all, nothing to do here
binary-indep: build install
	# Create the package here
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_install -i
	dh_installdocs -i
	dh_installchangelogs -i
	dh_javadoc -i --sourcedir=src 
	jh_libs -i
	jh_depends -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
   
debian/libjsch-java.jlibs
jsch.jar
   
Sample Application Packaging debian/control
Source: salliere
Section: misc
Priority: optional
Maintainer: Matthew Johnson 
Build-Depends: debhelper (>= 5), java-gcj-compat-dev, fastjar, 
               libmatthew-debug-java, libcsv-java,
               libitext-java, javahelper
Standards-Version: 3.7.3
Package: salliere
Architecture: all
Depends: $ java:Depends , $ misc:Depends 
Description: Short Description
 Long Description
   
debian/rules
#!/usr/bin/make -f
export JAVA_HOME=/usr/lib/jvm/java-gcj
export CLASSPATH=/usr/share/java/csv.jar:/usr/share/java/debug-disable.jar:/usr/share/java/itext.jar
build: build-stamp
build-stamp:
   dh_testdir
   # Build the package
   jh_build salliere.jar src
   touch $@
clean:
   dh_testdir
   dh_testroot
   jh_build --clean
   dh_clean
   rm -f build-stamp salliere.jar
install: build
   dh_testdir
   dh_testroot
   dh_clean -k
   dh_installdirs
binary-arch: build install
   # Java packages are arch: all, nothing to do here
binary-indep: build install
   # Create the package here
   dh_testdir
   dh_testroot
   dh_clean -k
   dh_install -i
   dh_installdocs -i
   dh_installchangelogs -i
   jh_manifest -i
   dh_link -i
   jh_exec -i
   jh_depends -i
   dh_compress -i
   dh_fixperms -i
   dh_installdeb -i
   dh_gencontrol -i
   dh_md5sums -i
   dh_builddeb -i
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
   
debian/salliere.install
salliere.jar usr/share/salliere
   
debian/salliere.links
usr/share/salliere/salliere.jar usr/bin
   

8 January 2008

Thijs Kinkhorst: MAMPC success

While stuff is upgrading I can update on a previous entry. In Delft Hieke and I had an excellent dinner in restaurant l'Escalier, who specially prepared a vegetarian menu for us. The establishment was fully booked yet not very noisy, with very personal and friendly service with a good wine selection. The next day was the big day of Rudy's defense. We (Rudy, David and I) started at 8 in the morning to put on our costumes, after which we went to prepare the defense. From my point of view it all went quite smoothly. David and me could even be of useful assistance by reading out some of the propositions during the ceremony. It turned out that Rudy's research into Multi-Agent Model Predictive Control was convincing enough for the committee to hand him his PhD degree (see below). After which there was the appropriate celebration in the form of a good dinner and some welcome beverages after a very long day. Photo of PhD committee and PhD defendant

Thijs Kinkhorst: All alone at the datacentre

Datacentre Impression There's completely no one here. As it should be. Except for myself of course. klecker should be hosted here aswell. But which machine could it be? I'm not sure who left the [what's the English word for schrift/Heft/cahier] with the cat here? Seems to be an AFC Ajax fan. Hope he types better than he writes. This phone makes acceptable pictures for small resolutions. Back to work.

4 January 2008

Sven Mueller: User configuration

Anthony Towns wrote about user configuration (i.e. ~/.foo) and the XDG spec/proposal versus his own (and according to him) simpler version. The main goal of all this is to get rid of all the ~/.foo directories and files in a users home directory. Apart from technically minor differences, I don’t see why AJs proposal would be simpler than the XDG approach. All it does is hardcoding the values which are adjustable in XDG via XDG_*_DIRS. There is one notable difference though: AJ proposes fallback values which are compatible with existing application paths (i.e. HOME_ETC/XDG_CONFIG_HOME should default to ~/ - resulting in ~/.foo files/dirs). This is a good proposal in a way: If you patch an existing application to strictly follow the proposal made by AJ, it still finds its old configuration (and other files) if the new environment variables are not set. No need to move anything around. However, I think the XDG approach is better since it makes sure that compliant applications don’t clutter ~/ anymore. They do need some mechanism to move existing configurations and data around though if the XDG-compliant stuff isn’t already there, but an old style config exists. All in all, I think it is worth following the XDG spec, even if it is slightly more complex than AJs proposal. For one, it already exists for a while and I think that some applications already started following that spec. It also makes slightly more sense to me to have the system fully configurable as to where the apps store data as opposed to the hardcoded fallback/default values AJ proposes (even if we would change AJs proposal to use “$HOME-cleaning” default values).

24 December 2007

Christian Perrier: Still running after 100%

Some may remember that French translations of po-debconf templates happened to be 100% complete back in March. This happened only after a very long process of NMU'ing packages that are loosely maintained. Many other translations did benefit from that effort and the overall status is impressive What puzzles me is that we're now down to 97% because some packages changed existing templates or introduced new ones. Which is fine of course as this is most often meant to improve the quality of user interaction. However, I *really* wonder why the maintainers who are so quick to change templates are much much less fast to introduce translation updates. From the reports I have, French, Czech, German and Portuguese translations should be 100% if all bugs were fixed the very same day. So, really, *why* are there so many packages below? The table gives all packages for which French is not complete, along with the translation status ("bts" meaning that the update is sitting in the BTS for XXX days). The same table could be built for several other languages, I'm afraid.
                    ______________________
 __________________ _____po-debconf______ 
 ______name________ __%__ ____details____ 
 ampache                      0/0/2       podebconf(bts, 72 days)
 aolserver4                   0t0f0u      
 apt-listchanges    95%       23/1/0      podebconf(lcfc, 3 days)
 arcboot            50%       1/0/1       podebconf(bts, 28 days)
 axyl               66%       12/2/4      podebconf(bts, 109 days)
 axyl-lucene        80%       4/1/0       podebconf(bts, 119 days)
 davfs2                       0/9/8       podebconf(bts, 182 days)
 docbookwiki                  0/0/15      podebconf(bts, 113 days)
 dtc-xen            84%       22/4/0      podebconf(bts, 233 days)
 etckeeper                    0/0/5       podebconf(bts, 6 days)
 firebird2.0        93%       14/1/0      podebconf(bts, 9 days)
 gcl                50%       2/2/0       podebconf(rfr, 1 days)
 gclcvs             50%       2/2/0       podebconf(bts, 4 days)
 interchange        71%      46/4/14      podebconf(bts, 111 days)
 ipplan             42%       9/11/1      podebconf(lcfc, 6 days)
 jspwiki            51%      15/14/0      podebconf(bts, 9 days)
 kdesudo                      0/0/2       podebconf(taf, 1 days)
 libpam-mount                 0/0/4       podebconf(rev, 8 days)
 lirc               15%      8/28/15      podebconf(bts, 78 days)
 mimedefang         50%       1/1/0       podebconf(rev, 7 days)
 mksh               50%       2/0/2       podebconf(hold, 200 days)
 norwegian          28%       2/2/3       podebconf(bts, 154 days)
 nut                66%       4/2/0       podebconf(bts, 102 days)
 openssl            50%       4/0/4       podebconf(bts, 39 days)
 pam                          0/0/8       podebconf(bts, 77 days)
 pcd2html           50%       1/0/1       podebconf(rev, 9 days)
 pimppa                       0/0/31      podebconf(bts, 115 days)
 playmidi           83%       5/1/0       podebconf(bts, 18 days)
 postfix            93%       58/3/1      podebconf(done, 2 days)
 proofgeneral                 0/0/4       podebconf(bts, 29 days)
 radiusd-livingsto            0/0/3       podebconf(bts, 204 days)
 rkhunter           66%       4/0/2       podebconf(bts, 9 days)
 roxen4             97%       40/1/0      podebconf(rfr, 1 days)
 shorewall-common   87%       7/1/0       podebconf(rfr, 1 days)
 slim               75%       3/1/0       podebconf(bts, 211 days)
 tcp-wrappers       25%       1/3/0       podebconf(bts, 143 days)
 tipcutils                    0/0/17      podebconf(bts, 152 days)
 uw-imap            42%       8/2/9       podebconf(bts, 114 days)
 whereami           66%       2/1/0       podebconf(bts, 48 days)
 wvdial                       0/0/13      
 yiff               80%       4/1/0       podebconf(bts, 2 days)
 zekr-quran-transl            0/0/12      podebconf(bts, 48 days)
 zephyr             66%       2/1/0       podebconf(bts, 1 days)
 __________________ _____ _______________ 
 TOTAL (fr)         97%    9796/99/181    
 __________________ _____ _______________ 
So, do you want to make a Christmas gift to Debian translators and you have a package above? Please upload a translation update...:-)

22 December 2007

Daniel Leidert: docbook-defguide - solving performance and timing issues with native code

Some days ago I wrote down my experiences with packaging docbook-defguide. The main (remaining) issues I mentioned were the resources and the time the package needs to build. Even on an AMD X2 4600+ with 6GB of RAM it needs 7-8 hours. Today I met with Torsten Werner. He mentioned, that there are some move JVMs I could try. So I tested alternatives to GIJ this night. I found this short summary about free JVMs, which was some kind of interesting. I began with cacao, which seemed to be fast, but it was killed very early in the build process with an java.lang.OutOfMemory error. Even playing around with the -Xms and -Xmx switches in buildtools/saxon.sh did not help. So I dropped cacao from the list. Seems both cacao and kaffe create similar problems here and are not suitable for building the package. Second alternative I tried was sablevm. It directly throw out some warnings or errors so I directly dropped it too. Next JVM was jamvm. But it was as slow as GIJ. So I dropped it from the list of alternatives too. Then I found an interesting statement in the article I linked somewhere above. The author said, that his perfomance test time with GCJ/GIJ reduced from 433 to 9 seconds, when he compiled his application into a native executable. So I took a fast look through the docbook-defguide build dependencies and found, that Debian already provides a natively compiled Xerces package libxerces2-java-gcj. But there were no packages for libsaxon-java, libxml-commons-resolver1.1-java and docbook-xsl-saxon. So short and dirty: I downloaded the source for these packages, added the necessary stuff to get natively compiled packages too, built and installed them. Fortunately packages with native code already exist (JAXP 1.3 and Xerces) for their dependencies. And what should I say: Now building the TDG needs less then 512MB RAM and it builds in around an hour … even on my system. I will ask the Debian Java maintainers to add -gcj packages for Saxon and XML-Commons and fix my own docbook-xsl-saxon package. This will hopefully help maintaining docbook-defguide.

21 December 2007

Erich Schubert: Thoughts on Google Calendar embedding

I've recently considered using a Google calendar for a project, and tried to embed it in a web site.However, there are a few issues I'm having with it: Also the "multiple calendars" feature is a bit hackish. I'd like to be able to differentiate events by flags such as "city", "outskirts", "training", "dance event", "music event". Obviously, entries might have more than one, so I'd need 6 calendars for this already. Usually, you can combine five...Guess I'd need to do this all in Ajax by myself. It would be cool if Google Calendar hat an API for embedding like it has for maps. The Calendar API I've seen so far is basically polling the raw data via JSON or XML. Which is already great, but I do like some of the calendar layouting the do, and I'd like to avoid having to replicate that myself.

17 December 2007

Thijs Kinkhorst: Greetings from Delft

The two principal thigs I despise:
  1. People with folding bikes on the train. (They're very common here; I'm not sure how well known this concept is internationally, but it seems quite a self-explanatory term to me.)
  2. People that complain that up-market restaurants "always serve such small portions".
On a more positive note, I'm here in Delft for Rudy's promotion tomorrow. The hotel is set in a pervasive seventies style (deliberately), but still does offer wireless internet.

15 December 2007

Benjamin Mako Hill: Annual Free Software Foundation Fundraiser

It's an end of year tradition for non-profit organizations to do big fund-raising and membership pushes. As I mentioned several days ago, I am personally giving to two organizations this year: the Wikimedia Foundation and the Free Software Foundation. The FSF has a goal of 500 associate members by year-end and it's an important goal that will sustain the foundation's activities. While membership dues keep the lights on, the fact that the foundation has a robust and growing membership is equally, if not more, important. FSF executive director Peter Brown put an appeal online in both video and text versions. In it, he lays out some of the most important issues for the next year. You should watch the video version in OGG Theora or this YouTube version (requires Gnash or non-free Flash). The appeal briefly lays out the FSF's plans for next year. My partner Mika Matsuzaki and my friend Oliver Day shot and edited the video. Please pass the link around to those you feel might be interested. Here's my appeal:
Now is the time to join and give to Free Software Foundation. 2008 is going to be extraordinarily important year for free software. Eben Moglen likes to quote Gandhi's "first they ignore you, then they laugh at you, then they fight you, then you win" progression when describing the free software movement. As I pointed out when I joined the FSF board, we're beginning to see powerful interests fighting free software. It's going to increase in the next few years. Things will probably get a lot uglier for free software before they get better. We can win but things are far from settled. The FSF is the front-line organization in this fight and we need a robust and proactive foundation, and an active and involved membership, if we're going to win. Here are the issues that I'm going to pushing the FSF to pursue in the next year. Expanding activism outside our traditional technologist communities: In part through the work of projects like Defective By Design, we've seen the tide turn for DRM on music in what what may be the FSF's greatest success last year. I'm going to push the FSF to continue the campaign to attack DRM for video, eBooks, and the other places it is cropping up. The most remarkable thing to me about Defective By Design is that its participants and supporters are not, for the most part, people who develop or use GNU/Linux or even know what GNU is! If advocacy for software freedom involves a conversation we can only have with people who understand what POSIX is and how one uses it, we've already lost. Through DbD, BadVista, and other projects, the FSF has made major strides in the last year. It need to do much more and needs your support to do so. Get proactive about software patents: As a community, we've had our head in the sand about software patents for far too long. There are companies and patent trolls sitting on massive, growing piles of software patents. They are not our friends and they do not mean us well. One cannot write non-trivial software today without running a serious risk of infringing patents. The software patents minefield we've found ourselves in is a very fundamental threat to the success of free software and we've already begun to see the first casualties and costs. We must eliminate software patents. Now. The US is very important in this fight (much patent law is "exported" from the US) and almost no organization is working on software patent elimination there. Not enough people are thinking and acting strategically on this issue. The FSF is planning to make major steps in this fight in the coming year and we need your support to do so. Web services and the changing face of software: This last year, I worked to help launch the new version the AGPLv3. The license addresses the role of copyleft for software like web-services which, due to the legal particulars of the GPL, did not extend to the purveyors of web services. Of course, access to source code does not make the users of all web-services free (e.g., the GMails and the Facebooks). Nobody seems to know what freedom for webserver entails. There might not even be good answers. In the next year, I'm going to push the FSF to help start several conversation and to begin to follow up on what I think was an important first step with the AGPLv3. While this is not a major organizational priority yet, it's a major action item that I will be pursuing through the FSF. If you feel strongly about this issue, whatever your position, become a member, stay involved as these projects develop, and have your voice be heard. We don't know the answers yet and we need your input as much as we need your action.
Please, support the FSF in the efforts listed above, and in others, by giving generously. If you're not a member, please join the FSF as an associate member. If you are already a member, please consider making a tax-deductible donation. The FSF is a very lean, very humble organization of passionate and dedicated individuals working tirelessly for software freedom. Every little bit helps. Members pays USD $120 ($10/month) and student members pay half that. FSF has members across the world -- where a weak dollar often makes it even cheaper. Member support and participation builds capacity and credibility for the foundation and keep the organization responsible, responsive, and in tune with our community.

10 December 2007

Steve Kemp: You're making me live

Is there an existing system which will allow me to query Apache logfiles via an SQL string? (Without importing into a database first). I've found the perl library SQL::YASL - but that has a couple of omissions which mean it isn't ideal for my task: Still it did allow me to write a simple shell which works nicely for simple cases:
SQL>LOAD /home/skx/hg/engaging/logs/access.log;
SQL>select path,size from requests where size > 10000;
path size 
/css/default.css 13813 
/js/prototype.js 71261 
/js/effects.js 37872 
/js/dragdrop.js 30645 
/js/controls.js 28980 
/js/slider.js 10403 
/view/messages 15447 
/view/messages 15447 
/recent/messages 25378 
It does mandate the use of a "WHERE" clause, but that was easily fixed with "WHERE 1=1". If I could just have support for count I could do near realtime interesting things... Then again maybe I should just log directly and not worry about it. I certainly don't want to create my own SQL engine .. it just seems that Perl doesn't have a suitable library already made which is a bit of a shocker!

Steve Kemp: You're making me live

Is there an existing system which will allow me to query Apache logfiles via an SQL string? (Without importing into a database first). I've found the perl library SQL::YASL - but that has a couple of omissions which mean it isn't ideal for my task: Still it did allow me to write a simple shell which works nicely for simple cases:
SQL>LOAD /home/skx/hg/engaging/logs/access.log;
SQL>select path,size from requests where size > 10000;
path size 
/css/default.css 13813 
/js/prototype.js 71261 
/js/effects.js 37872 
/js/dragdrop.js 30645 
/js/controls.js 28980 
/js/slider.js 10403 
/view/messages 15447 
/view/messages 15447 
/recent/messages 25378 
It does mandate the use of a "WHERE" clause, but that was easily fixed with "WHERE 1=1". If I could just have support for count I could do near realtime interesting things... Then again maybe I should just log directly and not worry about it. I certainly don't want to create my own SQL engine .. it just seems that Perl doesn't have a suitable library already made which is a bit of a shocker!

2 December 2007

Thijs Kinkhorst: NWERC over

The NW-Europe Programming Contest NWERC is over (for two weeks already). The winners were from Oxford, and the best Dutch team were our Utrecht prodigies at number 7 (full standings). If I may, I think it's been a great success, but of course, there's in our eyes much to be improved. And we will, in 2008. We also got some compliments about our own jury system DOMjudge, which is nice to hear. Even more good news is that we were allowed to send three teams off to the ICPC World Finals. These finals are in Bannf, Canada and I'll probably be there aswell.

26 November 2007

Steve Kemp: You're making me live

Is there an existing system which will allow me to query Apache logfiles via an SQL string? (Without importing into a database first). I've found the perl library SQL::YASL - but that has a couple of omissions which mean it isn't ideal for my task: Still it did allow me to write a simple shell which works nicely for simple cases:
SQL>LOAD /home/skx/hg/engaging/logs/access.log;
SQL>select path,size from requests where size > 10000;
path size 
/css/default.css 13813 
/js/prototype.js 71261 
/js/effects.js 37872 
/js/dragdrop.js 30645 
/js/controls.js 28980 
/js/slider.js 10403 
/view/messages 15447 
/view/messages 15447 
/recent/messages 25378 
It does mandate the use of a "WHERE" clause, but that was easily fixed with "WHERE 1=1". If I could just have support for count I could do near realtime interesting things... Then again maybe I should just log directly and not worry about it. I certainly don't want to create my own SQL engine .. it just seems that Perl doesn't have a suitable library already made which is a bit of a shocker!

19 November 2007

Evan Prodromou: 28 Brumaire CCXVI

I'm glad to note that there's been a lot of movement over the last few weeks for the Montreal Coworking space. Patrick Tanguay, who's been organizing the project, let me know recently that we're closing in on a space. Which is just fantastic. Coworking is a loose term for a number of different ways of working together. The term is most commonly used for a kind of shared office where participants pay for either a fixed space (their own desk) by the month, or they pay for the use of a pool of free spaces (shared desks) on a daily or part-time basis. There are the kind of office resources, like WiFi, conference rooms, printers, copiers, etc. that you expect from an office, but unlike most shared-office situations, there's also an emphasis on community and communications. It's a great kind of work environment for people who would otherwise work at home or in caf s, such as freelancers, contractors, and startuppers -- or for people visiting from out-of-town. I've been to a couple of the Bay Area (California) coworking spaces -- the one at Citizen Space in San Francisco and the one at SocialText in Palo Alto. Both were convenient, fun, and social -- a good place to get some work done. Patrick's been working on a Montreal coworking space for a while -- talking to the City and neighbourhood development organizations -- and he's settled on a space in Mile End. It looks pretty fantastic. You can see the pictures and a map at the Montreal Coworking Web site. I've been working out of the house for about 5 years, and I really like the freedom and convenience it affords. That said, I'm really looking forward to having a more formal environment to work in than my home office. It's great here, and I feel very comfortable, but it would be nice to be out of the house. I also tend to meet with contractors and partners at local caf s, which can be distracting -- I'm looking forward to having meeting rooms. There's a 5 7 ("sank ah set" -- it's what we call a cocktail party here in Montreal) planned for people who'll be involved in the site planned for this Wednesday, November 21, at Bar Inc. (250 Mont-Royal Est). I won't be there -- we'll be in New Jersey by then -- but I hope others interested in the coworking take the chance to go. tags:

JS-Kit and data portability I've been a big fan of JS-Kit since I heard about it. I featured it in my list of 10 Web APIs for LinuxWorld, and I use it on my own personal site for comments. But one thing that concerns me, and that I've asked for clarification from JS-Kit about, is data portability. If they went out of business (heaven forfend), or if I figured out another cool way to do comments on my site, I'd like to be able to migrate old comments to the new system I'd build/use/buy. But as far as I can tell, there's no interface to download all comments on a site (either in HTML or some other structured format). I think this is going to be a key issue for people building Web sites with UI widgets in the future. It's a really, really useful way to make sites, but I don't think many developers are going to be willing to invest in a platform with no "insurance" that they can be flexible in the future. Sure, it's free of charge, and it seems kind of mean to use the poor JS-Kit folks and then move on to someone else -- but realistically it's an option you need for development. tags:

One-liners Some other stuff I'm thinking about today:
  • On the "upcoming events" front, we've got some plans to make BarCampCanada1 happen here in Montreal in May 2008. I'm not sure how that's going to shake out, but I'm excited about the possibility of a nationwide BarCamp.
  • I'm interested in Heather Ford's and Jimmy Wales's 50 parties idea - having fifty parties in one year to bring together local Free Culture people. I think we should have a party here in Montreal. Maybe in the Spring...? Maybe to coincide with BarCampCanada1?
tags:

14 November 2007

Anthony Towns: Managing Debian Installs

For a while I’ve been trying to find some easy way to keep a few machines I admin behaving the way I want them too with minimal effort. They don’t really need much maintenance – but I would like something to help keep them all in sync. Basically, something like FAI, but much, much simpler – ideally something that takes five minutes to understand, and another five minutes to deploy; and leave the more complicated and powerful tools for when they’re actually needed. I figured what I really want was just a simple way to make a meta-package – one that doesn’t really provide any functionality, just tells apt/dpkg what I want installed (via Depends), and what I don’t want installed (via Conflicts) and adds any extra configuration stuff or local scripts that I decide I want. But doing that with a real Debian package is harder than I’m really comfortable with – I don’t want to have to worry about potential lintian errors, or rules files and debhelper commands, or writing a Makefile to get my files installed or whatever, I want something more trivial than that. Looking for meta-package creators, the only one I spotted that I thought looked likely was cdd-dev, described as “Custom Debian Distributions common files for developing meta packages”. Unfortunately it seems to just provide templates, which makes things quicker, but no less complex. Fortunately equivs (“Circumvent Debian package dependencies”) is actually used for metapackages these days, according to its maintainer on IRC and its long description:
This package provides a tool to create Debian packages that only contain dependency information. One use for this is to create a metapackage: a package whose sole purpose is to declare dependencies and conflicts on other packages so that these will be automatically installed, upgraded, or removed. Another use is to circumvent dependency checking. […]
That turned out to work much better than I remembered (from whenever I last tried it – back in ‘99 I guess?), with the only drawback being that I couldn’t add files easily. But that’s just a matter of creating a patch to equivs, which I then won’t have to worry about again. So having done that, I can now create a metapackage to do whatever I want by creating a file like:
Suite: client
Section: misc
Priority: standard
Package: ajs-client-stuff
Version: 20071114.1
Maintainer: Anthony Towns <aj@erisian.com.au>
Description: Metapackage for aj's client computers
 Depends on necessary packages, etc.
File: /etc/apt/sources.list.d/client.list
 deb http://mirror.localnet/debian etch main contrib non-free
 deb http://mirror.localnet/debian etch-proposed-updates main contrib non-free
 .
 deb http://security.debian.org/ etch/updates main contrib non-free
File: postinst
 #!/bin/sh -e
 .
 apt-key add - <<EOF
 [output of gpg --armour --export $KEY]
 EOF
 .
 ##DEBHELPER##
debhelper kindly takes care of getting the permissions right for me, and equivs will generate a full source package if I tell it to, which I can just upload to mini-dinstall and have a regular Debian repository just by writing a text file and running equivs-build. And my metapackage can add dependencies, conflicts, apt sources, cronjobs, scripts, configuration files, documentation, or whatever I happen to want – which means I can make it automatically update itself, and thus install any dependencies or remove any conflicts, which then means that modifying the config on all the machines is just a matter of updating the metapackage. And new installs is (hopefully) just a matter of doing a standard install and then adding the metapackage. Perfect. …even if it is really little more than a reinvention of rpm’s .spec files. :)

11 November 2007

David Welton: Javascript fiddling

I've been playing around more with Javascript, as it seems to be increasingly important for doing interesting web applications. I wrote this stupid hack over the weekend: http://www.dedasys.com/pagedump.js Which you can test here (warning: it kills the page you're on, so if you're reading this from a feed reader or something, becareful). There is, however a serious problem - the above code crashes Internet Explorer, so please use caution when running it. I can't figure out what the problem might be, as it works ok in Firefox and Konqueror. Now I remember why I didn't like Javascript before - "it's the implementation(s), stupid!". Advice appreciated.

7 November 2007

David Welton: YUI Compressor

One of the things I love about programming is that you are always learning new things. You have to learn new things to keep up. One of the benefits of using the Plotr Javascript library for the language popularity stats I did is that instead of having to download separate images for each statistic, a user just fetches the library once and then a few small bits of data for each chart, which is probably a net savings, especially when I start to add more statistics. However, Plotr, plus its various supporting libraries, is fairly hefty, so I needed to find a way to compress it. One of the helpful people on the freenode IRC network's #javascript channel pointed me at Yahoo's YUI Compressor, which is a nicely done project that squeezes quite a bit out of Javascript files. I would recommend it to anyone else who needs to pare down their production JS files to the bare minimum. Best of all, it's available under a very liberal open source license! Incidentally, over the course of the language stats project, I was surprised at how much helpful stuff Yahoo provides, first and foremost, a real API for their search engine, something that Google no longer has. Hopefully, it's a sign of better things to come for them (if for no other reason than to keep Google on their toes!). By the way, for those interested in the language stats project, I set up a forum with RSS feeds, where I will be posting updates, and accepting suggestions for further improvements.

3 November 2007

Thijs Kinkhorst: NWERC preparations going well

Two weeks from now, the NW-European Programming Contest (NWERC) of the ACM ICPC will have started here in Utrecht. Things are going well - the problem set is ready - but, as always, a lot of small things are still to do: ordering t-shirts and balloons, finalizing food and buildings, etc. However, I think if we would halt all preparations now we would at least have a basic contest in two weeks. Registration is almost over, and the list of teams shows that we have participants from nine countries representing 26 institutions distributed over 51 teams.

2 November 2007

Jordi Mallach: Valencian children and foreign languages

Recently, GozRita unveiled the names of our two Falleretes majors for 2008's Falles festivities. All the free newspapers did some extensive coverage, with reports on who they are and what they do. Qu Valencia interviewed the little Fallera major, and then posted this:


Little Victoria learns Valencian So, Victoria Bl zquez speaks English and Valencian "nearly perfectly". Great! I think having newspapers treat Valencian as if it were just another foreign language that students are forced to learn is a great example of the dark future our language will face in just a few generations.

31 October 2007

MJ Ray: Current Issues / Tesco wants even more car parking!

Tesco in WsM centre has applied to change their car park layout and fit in more cars!  See http://212.158.113.30/MULTIWAM/showCaseFile.do;jsessionid=3211D08BDB306F441561341603089E41?action=show&appType=planning&appNumber=07/P/2670/F

I don't really like that store.  It's typical Tesco: it faces away from the town, to discourage shoppers visiting anywhere else, and is a bit of a pain to access except by car, with its narrow pedestrian ramps and botched cycle parking.

Actually, it's a fairly sensible planning application apart from the net gain of six spaces, but I'm objecting on the grounds that they're not improving the cycle parking in line with the car parking.  If you shop in Weston-super-Mare, leave your own comment.

Next.

Previous.