Dmitry Leskov

The Finite Laziness of Scala Streams

The official Haskell wiki discusses literally dozens of ways to produce a list of prime numbers, but the one that caught my attention the other day is not listed there. Its centerpiece is a fold of a recursively defined infinite list of infinite lists (lists are lazy in Haskell). In this post, I’ve documented my attempt to rewrite it in Scala using streams.

Scala Stream Hygiene III: Scalaz EphemeralStream Fills Quite A Canyon

Scalaz, an open-source pure functional programming library for Scala, provides the EphemeralStream class that does not exhibit the memory leak issues inherent to the standard scala Stream. However, it carries its own set of problems: memory overheads, performance penalties, and application disk footprint increase.

Scala Stream Hygiene II: HotSpot Kicks In

Infinite Scala streams should be marked “not for production use”, even though you can get away with breaking most of the rules listed in Part I.

Scala Stream Hygiene I: Avoiding Memory Leaks

The standard Scala Stream class is essentially a lazy List with memoization. However, memoization is undesirable when defining infinite data structures. It is possible to avoid memoization of streams by following a set of five rules, described in this first post in a 3-part series.

Retrieving a Web Site for Offline View Using Wget

is not so straightforward in today’s age of CDNs, widgets, and font embedded services.

Protecting Downloads From Hotlinking – The Soft Way

An Apache URL rewrite trick to protect large downloadable files from hotlinking. Even though some PHP or CGI scripting is required the files remain served directly by Apache and the properly registered visitors are not affected.

How To Run UglifyJS on Windows Using node.js

Now that there is a Windows build of node.js, you may run UglifyJS using its main development platform.

Backporting PHP 5.3.5 from Ubuntu 11.04

This is just a quick notice that the instructions for backporting PHP 5.3.3 from Ubuntu 10.10 to 10.04 LTS also seem to be working for PHP 5.3.5, found in just released Ubuntu 11.04.

Installing .deb Packages from a Local Repository

Learn how to set up a local repository for .deb packages you’ve built or downloaded, and deploy it to production servers with minimal interference. PHP 5.3.3 packages backported to Ubuntu 10.04 are used as an example.

Backporting PHP 5.3.3 from Ubuntu 10.10 to 10.04 LTS

Inspired by my desire to run PHP-FPM on the latest LTS release of Ubuntu, this post describes the available options and provides step-by-step backporting instructions for PHP 5.3.3 included in Ubuntu 10.10.

« Older Entries |