the essence of functional programming
Wednesday, January 24th, 2007I’ve transcripted the code examples from the paper “The essence of functional programming” by Philip Wadler.
I’ve transcripted the code examples from the paper “The essence of functional programming” by Philip Wadler.
The main problem of learning Haskell is the very beginning, the first step: to write a working program, which
* as small as possible, and
* more than just print “Hello, World!”
(more…)
After returning from holidays, I found that printer doesn’t print anymore. After some investigation, I found that dmesg contains:
usb 2-1: new full speed USB device using uhci_hcd and address 7 usb 2-1: device not accepting address 7, error -71 usb 2-1: new full speed USB device using uhci_hcd and address 8 usb 2-1: device descriptor read/64, error -71
I’m building an XML site. One of the common tasks is to get a book by isbn. I needed 4(!) attempts to get it working!
Google Co-op is a service that allows to create custom search engines. At the moment, it officially supports only English, but it seems other languages work as well.
I download my mail using fetchmail. During the process, “tail -f” shows the subjects of the incoming letters. Unfortunately, most of them are unreadable, something like “=?windows-1251?B?0e/g7CDt4CBwaHBCQg==?=“. Finally, I tired of it and decided to make life better.
I thought “use strict” is enough and didn’t try to run an application with the “-w” flag. (Don’t blame me, it was under Windows.) As result, I played ping-pong with an user trying to identify an error instead of preventing the error.
XML tools are good when the input data is XML. And they are awful when the data is XML-like. As result, instead of using “xmllint –noent“, I had to write my own entity substitutor “entity.py”.
In xml-dev mailing list, William Gilreath posted an preview announce of XString, an XML technology “XML as a String”. I found time to look at the paper and write comments.
A copy of RentACoder terms of work between the buyer and the coder.
I want to analyze an open source application by reading its source code. I don’t like reading from the screen. Instead, I’d like to print the code and read offline.
I’ve figured out how to combine include/exclude options of rsync to upload only HTML files:
rsync -n -a -v --exclude '.svn/' --include '*/' \
--include '*.html' --exclude '*' src_path dest_path
After the libxml/libxslt bug session, now it’s time of SCons: dots in file name, then suffix rules failure.
When I use programs, I get errors. This time I used xmllint and xsltproc. New bugs:
* text copy failed with XInclude
* XInclude rangeto() loses nodes
Fixed from the time of the last bug submit session:
* indent=”yes” doesn’t indent
* namespace collision with xsl:element and xsl:attribute
* namespaced parameters become unregistered
* namespace collision with namespace-alias
Not fixed:
* nodeset sort fails on a namespace node
* LIBXSLT_PLUGINS_PATH doesn’t support separation by “:”
Some TeX implementations or macro packages provide the facility to automatically include so-called “source specials” into a .dvi file. These contain the line number, eventually a column number, and the filename of the .tex source. This makes it possible to jump from a .dvi file to the corresponding place in the .tex source and back (also called “reverse search” and “forward search”). I’ve asked for the same for .pdf files, and have got an answer from Will Robertson in comp.text.tex:
Just have written to a mail list: “DOM is something I definitively avoid to use. Using DOM in programs is like programming in assembler, except the latter is fun, but the former is only tiresome coding.”.