Many of the Phillips LCOS displays were having problems with images having a strong purple hue to them. Apparently the colors would fade towards purple over time. The only LCOS display that I have seen in a store was quite purple. I don't know if this is a Phillips or an Intel problem. My guess is that the Intel chips had serious quality issues.
I know both languages, although I know Python better. I first learned Ruby and then switched to Python. In many ways I think both languages fit the same niche. They both make many tasks easier and you really can't go wrong with either. If you started with Python I would stick with it. You'll never regret knowing Python well.
For me, Python offered
1) more bindings to existing "C" libraries.
2) a bigger community with more support.
Ruby is pretty decent in both 1) and 2) also, just not as far along (I'm about 2 yrs out of the loop though).
In many ways the languages are similar. Some major differences are:
Python: list comprehensions, generators.
Ruby: blocks, cleaner OO, more complete closures, continuations.
By the way, both languages helped me realize that you can do many things easier and cleaner without OO techniques. Both languages have a bit of a functional side to them and I find this to be one of their stronger attributes.
And yet why is it that every doctor I know drives a Mercedes and has a 1 million plus home. And why was my brother billed $12,000 a day for a few days in the hospital, where a doctor visited him no more than 5 minutes a day and about the same from a nurse. That is about $72,000/hr.
I have no mod points, or I would mod this up. This psychological assessment of intraverts and extraverts is one of the most insightful things that I have read.
Anybody who likes Java should spend two days with Python or Ruby. I can guarantee your appreciation of Java will diminish.
Java lacks the following: first class functions(except by reflection, ugh) anonymous functions, closures (except by using objects), multiple assignment,list literals,list comprehensions, co-routines or generators, multiple dispatch, A decent iterator mechanism (I know wait for 1.5), Templates (I know wait for 1.5). Even templates, however, in a statically typed language make writing generic functions far more ugly than in a dynamically typed language.
Java forces everything to be an object. I find objects useful sometimes and sometimes I would rather just create a function.
Java makes some things irritatingly more verbose than say Python or Ruby.
Python examples: list literal: l = [1,2,3,4]
list comprehension build a list of squares: [x*x for x in range(4)] ==> [0, 1, 4, 9]
passing a comparison function to sort def coord_cmp(c1,c2):
"""compare coordinate 1 to coordinate 2
sort top to bottom left to right"""
x1,y1 = c1 #multiple assignment
x2,y2 = c2
#cmp is built-in, returns -1 | 0 | 1
if y1 == y2: return cmp(x1,x2)
else: return cmp(y1, y2) #list of coords l = [ (5, 11), (1, 11), (3, 10), (5, 10) ] l.sort(coord_cmp) l ==> [(3, 10), (5, 10), (1, 11), (5, 11)]
#looping for x,y in l:
print x,y 3 10 5 10 1 11 5 11
#using zip to combine separate lists x_coords = [1, 10, 20, 30] y_coords = [100, 200, 300, 400] for x,y in zip(x_coords, y_coords):
print x,y 1 100 10 200 20 300 30 400
#reading from a file #python has plenty of file operations, this is #just a simple one. f = file('xyz.txt', 'rt) for line in f:
print line f.close()
#a generic function. works on strings, ints, floats. def max(l):
max = -sys.maxint - 1
for x in l:
if x > max:
max = x
return max
Of course max() is already built in
Spend a day reading the tutorial. http://docs.python.org/tut/tut.html
The c2.com wiki has an interesting page about trying to classify things into hierarchies. http://c2.com/cgi/wiki?LimitsOfHierarchies
Many of the Phillips LCOS displays were having problems with images having a strong purple hue to them. Apparently the colors would fade towards purple over time. The only LCOS display that I have seen in a store was quite purple. I don't know if this is a Phillips or an Intel problem. My guess is that the Intel chips had serious quality issues.
I know both languages, although I know Python better. I first learned Ruby and then switched to Python. In many ways I think both languages fit the same niche. They both make many tasks easier and you really can't go wrong with either. If you started with Python I would stick with it. You'll never regret knowing Python well. For me, Python offered 1) more bindings to existing "C" libraries. 2) a bigger community with more support. Ruby is pretty decent in both 1) and 2) also, just not as far along (I'm about 2 yrs out of the loop though). In many ways the languages are similar. Some major differences are: Python: list comprehensions, generators. Ruby: blocks, cleaner OO, more complete closures, continuations. By the way, both languages helped me realize that you can do many things easier and cleaner without OO techniques. Both languages have a bit of a functional side to them and I find this to be one of their stronger attributes.
And yet why is it that every doctor I know drives a Mercedes and has a 1 million plus home. And why was my brother billed $12,000 a day for a few days in the hospital, where a doctor visited him no more than 5 minutes a day and about the same from a nurse. That is about $72,000/hr.
They should have designed the house for India, where Dilbert's job will soon be. Maybe then the size of the house would also be affordable.
I have no mod points, or I would mod this up. This psychological assessment of intraverts and extraverts is one of the most insightful things that I have read.
Anybody who likes Java should spend two days with Python or Ruby. I can guarantee your appreciation of Java will diminish.
Java lacks the following:
first class functions(except by reflection, ugh)
anonymous functions, closures (except by using objects), multiple assignment,list literals,list comprehensions, co-routines or generators, multiple dispatch, A decent iterator mechanism (I know wait for 1.5), Templates (I know wait for 1.5).
Even templates, however, in a statically typed language make writing generic functions far more ugly than in a dynamically typed language.
Java forces everything to be an object. I find objects useful sometimes and sometimes I would rather just create a function.
Java makes some things irritatingly more verbose than say Python or Ruby.
Python examples:
list literal:
l = [1,2,3,4]
list comprehension
build a list of squares:
[x*x for x in range(4)] ==> [0, 1, 4, 9]
passing a comparison function to sort
def coord_cmp(c1,c2):
"""compare coordinate 1 to coordinate 2
sort top to bottom left to right"""
x1,y1 = c1 #multiple assignment
x2,y2 = c2
#cmp is built-in, returns -1 | 0 | 1
if y1 == y2: return cmp(x1,x2)
else: return cmp(y1, y2)
#list of coords
l = [ (5, 11), (1, 11), (3, 10), (5, 10) ]
l.sort(coord_cmp)
l ==> [(3, 10), (5, 10), (1, 11), (5, 11)]
#looping
for x,y in l:
print x,y
3 10
5 10
1 11
5 11
#using zip to combine separate lists
x_coords = [1, 10, 20, 30]
y_coords = [100, 200, 300, 400]
for x,y in zip(x_coords, y_coords):
print x,y
1 100
10 200
20 300
30 400
#reading from a file
#python has plenty of file operations, this is
#just a simple one.
f = file('xyz.txt', 'rt)
for line in f:
print line
f.close()
#a generic function. works on strings, ints, floats.
def max(l):
max = -sys.maxint - 1
for x in l:
if x > max:
max = x
return max
Of course max() is already built in
Spend a day reading the tutorial.
http://docs.python.org/tut/tut.html