Posts for the month of June 2012

Magic Scroll

Today we're publishing some runes form ancient and sacred Magic Scroll to meditate and enjoy, as an answer to the forces of the dark side...)))

;; Definition of CONS/CAR/CDR in Lambda Calculus.

(define (cons a d)
  (lambda (m)
    (m a d)))             ; accidental emergence of Truth

(define (car p)           ; CAR - Content of the Address Part of the Register
  (p (lambda (a d) a)))   ; A - Address part

(define (cdr p)           ; CDR - Content of the Decrement Part of the Register
  (p (lambda (a d) d)))   ; D - Decrement part

;; the explanation of Magic:
;;
;; define a procedure of two arguments in the global environment, called CONS,
;; which returns a procedure that accepts a procedure-of-two-arguments as its
;; argument and applies that procedure to the values of its formal parameters
;; stored in a frame that extends the global environment.
;;
;; This means - give me a procedure which knows what to do with my parameters.
;;
;; So, CAR invokes CONS with the argument which is a procedure that returns
;; the first of the two given arguments.
;; CDR invokes CONS with an argument that is a procedure which returns the
;; second of the two given arguments.

;; a trace
(car (cons (35 47)))
(car (lambda (m) (m 35 47)))                ; a cons object is a procedure
((lambda (m) (m 35 47)) (lambda (a d) a))   ; m is a procedure of two arguments
((lambda (a d) a) 35 47)                    ; application
35

;; encapsulating mutation

(define (cons a d)
  (lambda (m)
    (m a d
       (lambda (v) (set! a v))
       (lambda (v) (set! d v)))))

(define (car p)
  (p (lambda (a d sa sd) a)))

(define (car p)
  (p (lambda (a d sa sd) d)))

(define (set-car! p v)
  (p (lambda (a d sa sd) (sa v))))

(define (set-cdr! p v)
  (p (lambda (a d sa sd) (sd v))))

;; Happy Happy, Joy Joy!

the pure evil..)

Wanna see the pure evil? Here you go:

http://www.chris-granger.com/2012/06/24/its-playtime/

look what we have here:

(defn my-add[3 45]
    (+ 3 45))
  1. the lack of understanding the difference between symbols and numbers
  2. the (+ 3 45) expression is an application of a procedure '+ and it must be always evaluated to 48
  3. why square brackets are here - is it an array or something? =) Oh, it is a different type of structure, but why to expose it in this level? How about the principle of less astonishment and 'don't make me think/switch'?

So, what does it like? It is an emergence of something a-la Node.js or Clojure community - a lot of buzz and excitement together with lack of understanding of the basic principles.)

shall we continue?)

What next?

We have seen Groupon, now we have seen Facebook. And Yahoo, and Flickr and MySpace. The Internet is nothing special, and rather boring, like a mobile or a microwave or a car. And the whole IT industry is going into stagnation as it is in the auto industry.

So, what next? It is not yet another 'free' public service that collect and monetizes user's data. At least not a general purpose service. We have enough of facebooks.

It is not mobile. Yes, there are much more smartphones than computers, but they are also a mere boring thing. the first iPhone or Samsung Galaxy were something. Now, after almost 4 years the curve is flattening.

So what? It isn't an enterprise software - we have enough piles of java classes and man-hours, and it is not The Cloud. Amazon already ate this market.

What remains is specialized services, based on the same innovative ideas and technologies as Facebook or Amazon or whatever.

The strategy is very straightforward. First there must be some real problem to solve, and people who have a budget to solve this problem. Then, as it happens many times before, the solution is designed in the way which allow it to be reused in the future.

This is the way engineers Ericsson developed Erlang or the engineers of Akamai developed Riak - they develop innovative solutions for their problems and then open up it to the global community. Google's Go is the another brilliant example.

The question is - where to find those people with budgets? The answer is - well, we should find the problem and invent the solution and figure out the way of financing the development process. Difficult? Yes. Impossible? No!

The first step is to become an expert in some field. Then you might figure out what service would be useful and demanded. One cannot skip this step.

For example, if you're in a tourism business, then you might figure out that there is a demand for a 'departure display', a scheduling and coordination service for managing groups of tourists intended to the same destination on the same time.

You may take a picture of tourist's passport with a mobile phone's camera (to machine-read it on the server side - it is not difficult - there are finite numbers of different passports, so a neural network could be trained to recognize each type). Take a photo of a visa for (to validate OCR'img) and you have a database of the tourists for free.

This technology, could be reused in many other projects, including those of a government, which might be interesting in a good enough solution to begin a migration to paper-less system, at least on paper - they know very well how to benefit from such ideas.))

Everything else are technical details. The crucial idea is - we should do everything ourselves, and technology is the second part, after marketing.

But this is not a conquest for a single person. It should be a small group of young and passionate people. Like our own.