May. 30th, 2006

me

Ruby


irb(main):001:0> x = [1,2,3,4,5]
=> [1, 2, 3, 4, 5]
irb(main):002:0> x.map {|x| x + 1}
=> [2, 3, 4, 5, 6]
irb(main):003:0> x
=> 5


irb(main):004:0> x = [1,2,3,4,5]
=> [1, 2, 3, 4, 5]
irb(main):005:0> x.each {|x| print x}
12345=> [1, 2, 3, 4, 5]
irb(main):006:0> x
=> 5

WTF?
Tags: ,

Feb. 1st, 2006

me

Опять перлы с лекции

Лекция по Ruby on Rails

You'll find that Ruby is a lot like Lisp except it has syntax which is unfortunate.

You could be a responsible PHP programmer and write unit tests but nobody does that 'cause it sucks.

As my friend's told me, if your computer says everything is OK, something is definetely not OK.

So what are we gonna call our class? Person? ... No ... Punk? ... No ... Bum is shorter.

I am a Postgres kid. Don't use MySQL 'cause it's just a piece of crap.

Q: You told us that database tables are nicely mapped into Ruby classes, is that always so?
A: No, I just like to make shit up.
me

April 2009

S M T W T F S
   1234
567891011
12131415161718
19202122232425
2627282930  

Advertisement

Syndicate

RSS Atom
Powered by LiveJournal.com