Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:At Long Last... (Score 1) 144

I don't blame you, Ruby syntax can be rather arcane.
facebook_user.each do |user| ... end

Can be translated as:
facebook_user.map(function(user){ ... })

Basically "each" is an array method and "do |var| ... end" is a "block"/closure/anonymous function. "|var|" can be omitted if there are no arguments, I don't know the syntax for multipel arguments. I do know that "do ... end" can be written as "{|var| ... }". I really don't know which version is considered syntactic sugar of the other. BTW Ruby blocks aren't *really* anonymous functions. You cannot save them to a variable as:
foo = do |bar| ... end

Blocks can only be passed to methods, but, not as arguments as so "facebook_user.each" is actually being called with no arguments like "facebook_user.each()" the method is passed the block through another channel that sets a flag inside the method which then calls the block as a closure using the "yield" keyword. Of course you can only pass 1 block this way. If a method needs two callbacks it must return some sort of delegate object that has a method that can accept the next callback as another block.

Oh and almost forgot to mention that there is an implicit "return" at the end of all ruby blocks. This is Ruby's idea of simple. But at least the syntax for map is really compact!

Comment Mark had the ball and dropped it. (Score 1) 419

As a rather assholish user already noted the thing Linux/Free software needs the most are standarization and small detail polishing. busted-shitter he called it. Unglamorous thankless tasks like translations and documentation.

The thing is Ubuntu was way ahead on the way of becomeing The standard Linux distro, it had an army of loyal contributors eager to translate, debug and package things for Ubuntu.

Then Mark decided to be an asshole, hired a team of Cuppertino rejects and started going his way against any input from Ubuntu's comunity. The famous "Ubuntu is not a democracy" line was uttered, and destroyed any pretence of community the project once had.

From the begining people accepted "Canonical as the commercial consultant on all matters Ubuntu", not "Ubuntu as product of Canonical". Shuttleworth became the CEO of a company of unpaid employers that had no say in its direction. And the comunity moved on elsewhere, mostly to Mint.

And now Shuttleworth acts shocked, shocked that nobody loves him. The man that decided he didn't have to listen to anybody complains that nobody listens to him.

Comment Re:Ads are anti-capitalist (Score 1) 193

I still like propaganda more.

By my own definitions. If you are writing/producing/pushing a message to promote something you like for yourself and want to share with others, it's propaganda. If you are promoting it because you are getting paid for doing so, it's not something you necessarily want for yourself and don't really care if it hurts other people, it's advertising.

Slashdot Top Deals

Get hold of portable property. -- Charles Dickens, "Great Expectations"

Working...