Practical Tips on Writing an Effective Web Crawler

A web crawler is a hard-working bot to gather information or index the pages on the Internet. It starts at some seeds URLs and finds every hyperlink on each page, and then crawler will visit those hyperlinks recursively. 1. Choose an Ideal Programming Language Here is a ranking of popular languages on developing web crawlers (based

Read More

Snippets for Racket Language

In the CS 5010 – Programming Design Paradigm course, we need write tons of documents,  repeat ourselves again and again, so I develop this snippet to save us time. If you using vim, you need install snipMate first, You can get the snippet on my Github: https://github.com/guanlan/snippet-for-racket download the snippet file and put in ~/.vim/snippets/ You can watch demo here

Read More

Rethink in Functional Languages

After about 3 months to learn and using Racket (a programming language in Lisp/Scheme family),  I learning lots of concepts of programming. The most important thing in FL(functional languages) is: “All data are immutable. All functions are pure.“    Immutable Data Immutable data cannot be modified after being created. It has many advantages: Inherently Thread safety Parallel programming is the nightmare

Read More

How to use Python like Lisp

Lisp has some very effective way to get jobs done, this article give you a direct way to use Python like Lisp. cons = lambda el, lst: (el, lst) mklist = lambda *args: reduce(lambda lst, el: cons(el, lst), reversed(args), None) car = lambda lst: lst[0] if lst else lst cdr = lambda lst: lst[1] if

Read More