1. After GNOME Asia Summit here in Beijing, the Beijing Gnome User Group is launched!
2. Also from GNOME Asia Summit, we have College Open Source Society. This group is for the promotion of open source within colleges in China.
Sunday, November 30, 2008
Saturday, November 29, 2008
Beihang Open Source Club
We have set up a open source club in my college (Beihang University). The name, after discussion, is "Beihang Open Source Club", not "Beihang Linux User Group" ;-)
The primary goal of such a group is to provide a place where students like me can find people with the same interest, i.e. interest in open source. But beyond that, we have another important goal to build a healthy, active and strong open source community in Beihang. I would like to see more codes coming out of my university. So the activities of our club will mostly be technical ones; especially how to develop open source software.
I am not the first one to come up with the idea of a open source club; there had already been a group online, linuxbuaa. As to the setting up of Beihang Open Source Club, it's the result of many people working hard together. Besides our initial members, we also got much help from Beijing Linux User Group, Tsinghua Open Source Club, Beiyou Open Source Society and many many others, thanks to all!
Beihang Open Source Club will gather twice a month, 19:00 to 21:00 on the first and third Fridays. We have had two meetings now, the first discussing general matters about the club and the second on regular expressions. Come and join us as long as you love open source!
The primary goal of such a group is to provide a place where students like me can find people with the same interest, i.e. interest in open source. But beyond that, we have another important goal to build a healthy, active and strong open source community in Beihang. I would like to see more codes coming out of my university. So the activities of our club will mostly be technical ones; especially how to develop open source software.
I am not the first one to come up with the idea of a open source club; there had already been a group online, linuxbuaa. As to the setting up of Beihang Open Source Club, it's the result of many people working hard together. Besides our initial members, we also got much help from Beijing Linux User Group, Tsinghua Open Source Club, Beiyou Open Source Society and many many others, thanks to all!
Beihang Open Source Club will gather twice a month, 19:00 to 21:00 on the first and third Fridays. We have had two meetings now, the first discussing general matters about the club and the second on regular expressions. Come and join us as long as you love open source!
Sunday, November 9, 2008
change the way of learning SICP
I have just resumed the reading of SICP, after pausing for more than a month, partly because the beginning of the new semester, partly because it's not fun enough to attract me.
My present way of reading this book is too serious: I read through a sector, word by word, then do each and every exercise, then post my thoughts and exercise answers on-line. It's far too tedious than it has to be. And now I have just finished the first chapter; so slow.
So for the rest of the book, I might not do all the exercise questions. I don't seek to understand each bits. Hope this gets the fun back to me.
Jesse
My present way of reading this book is too serious: I read through a sector, word by word, then do each and every exercise, then post my thoughts and exercise answers on-line. It's far too tedious than it has to be. And now I have just finished the first chapter; so slow.
So for the rest of the book, I might not do all the exercise questions. I don't seek to understand each bits. Hope this gets the fun back to me.
Jesse
sicp-exercise-2.1-2.6
exercise 2.1
exercise 2.2
segment definition
exercise 2.4
Explain:
take car as an example:
the value of (car z) is that returned by (z (lambda (p q) p)), as defined.
it needs to first evalutate the operator and operand respectively.
the operator is a procedure generated by cons, (lambda (m) (m x y)),
the operand is also a procedure, (lambda (p q) p),
substitute m with the operand, clearly, the return value is p
exercise 2.6
the definition of zero
is the same as:
so,
the same as:
same as:
A number defined this way takes a procedure as argument, and also returns a procedure. The later one applies the former one N times to the later one's argument.
so the addition procedure (add m n) means applying M+N times.
(define (make-rat n d)
(let ((sign (if (positive? (* n d)) 1 -1))
(abs-n (abs n))
(abs-d (abs d))
(g (gcd n d)))
(cons (* sign (/ abs-n g))
(/ abs-d g))))exercise 2.2
segment definition
(define (make-segment point-a point-b)
(cons point-a point-b))(define (start-segment seg)
(car seg))(define (end-segment seg)
(cdr seg))(define (midpoint-segment seg)
(make-point (average (x-point (start-segment seg))
(x-point (end-segment seg)))
(average (y-point (start-segment seg))
(y-point (end-segment seg)))))
(define (print-segment seg)
(newline)
(print-point (start-segment seg))
(display " -- ")
(print-point (end-segment seg)))point definition
(define (make-point x y)
(cons x y))(define (x-point p)
(car p))(define (y-point p)
(cdr p))(define (print-point p)
(display "(")
(display (x-point p))
(display ", ")
(display (y-point p))
(display ")"))exercise 2.4
(define (cons x y)
(lambda (m) (m x y)))(define (car z)
(z (lambda (p q) p)))(define (cdr z)
(z (lambda (p q) q)))Explain:
take car as an example:
the value of (car z) is that returned by (z (lambda (p q) p)), as defined.
it needs to first evalutate the operator and operand respectively.
the operator is a procedure generated by cons, (lambda (m) (m x y)),
the operand is also a procedure, (lambda (p q) p),
substitute m with the operand, clearly, the return value is p
exercise 2.6
the definition of zero
(define zero (lambda (f) (lambda (x) x)))is the same as:
(define (zero f) (lambda (x) x))so,
(define one (lambda (f) (lambda (x) (f x))))the same as:
(define (one f) (lambda (x) (f x)))(define two (lambda (f) (lambda (x) (f (f x)))))same as:
(define (two f) (lambda (x) (f (f x))))A number defined this way takes a procedure as argument, and also returns a procedure. The later one applies the former one N times to the later one's argument.
so the addition procedure (add m n) means applying M+N times.
(define (add m n)
(lambda (f)
(lambda (x)
((m f)
((n f) x)))))
Saturday, November 8, 2008
sicp-section-2.1
From chapter 2, we begin to learn about represent data in Scheme. It's quite different from non-functional languages.
I get two ways of deal with data:
1. use cons/car/cdr.
2. use procedures.
The first one is more or less 'normal', while using procedures to represent data kind of startles me :)
The second method shows the power of lisp (again) and it proves to be a good exercise for my brain. And, it's elegant, surely.
However, both methods appear too primitive, maybe in the futher there will be something more advanced, like the 'list' in the name of lisp?
What is 'data'?
This is an excellent question from section 2.1.23-
The author defines data to be something defined by some procedures, which have to and only have to fulfill some given conditions.
Then they give a surprising definition of 'pair', the procedural representation of pairs.
In the end, some points are given, like:
procedural representations of data will play a central role in our programming repertoire. This style of programming is often called message passing.
Subscribe to:
Posts (Atom)
