Feb. 9th, 2010

juan_gandhi: (Default)
Слушаю сегодня Бибиси, и не верю своим ушам (но верю их funny English accent): обсуждают книгу "The seksual life of a Manual Cunt". Так я это слышу, "сексюал".

И вдруг выясняется, что речь идёт об Иммануиле Канте. "The Sex Life of Immanuel Kant".

Некий Жан-Батист Ботуль, французский философ, написал такую книгу.

А т.к. во Франции философов как в России ментов (и умишком недалеко ушли), то выдающийся "интеллектуал" Анри Леви выдвинул Ботуля в ряды ведущих философов современности, и всюду стал его цитировать, великого.

(В определённом смысле, мы с этим Леви недалеко друг от друга ушли.)

И тут вдруг встаёт действительно умный человек, Фредерик Пажес, юморист из французского журнала, и сообщает, что он этого Ботуля выдумал, и все его труды сам накатал в порядке прикола. Очередная Деррида типа.

А вывод?

А вывод читатель должен сделать сам.
Levy Gets Botulism
juan_gandhi: (Default)
scala caseclass in javascript
caseclass.js is an attempt to duplicate the functionality of Scala's case classes in Javascript. This is a work in 
progress and so far only the class construction works:

Create a case class based upon a name and property list like so:
  CaseClass.create("Person", ["name", "age"]);

Instances of the case class can be created like so:
  var obama = CaseClass.Person("Barack Obama", 47);
  var mccain = CaseClass.Person("John McCain", 72);
  var obama2 = CaseClass.Person("Barack Obama", 47);
  
Note that the 'new' keyword is not needed, just like with Scala's case classes.

The class instance properties are easily accessible:
  obama.name // -> "Barack Obama"
  mccain.age // -> 72

The case class instances can be compared using the equals method:
  obama.equals(mccain); // -> false
  obama.equals(obama2); // -> true

Case classes can be matched against each other like so:
  obama.match(
    {
      caseTest: mccain,
      caseFunction: function() { return 1; }
    },
    {
      caseTest: obama2,
      caseFunction: function() { return 2; }
    },
  ); // -> 2



scala option in javascript


Note that passing non-values to Some will lead to None being returned:
  Some();           // -> None
  Some(undefined);  // -> None
  
Get a value:
  opt.get();                       // -> "my option"
  opt.getOrElse();                 // -> "my option"
  None.get();                       // -> Error thrown
  None.getOrElse("nothing here");   // -> "nothing here"
  
Get an Option's status:
  opt.isEmpty();     // -> false
  opt.isDefined();   // -> true
  None.isEmpty();    // -> true
  None.isDefined();  // -> false

Treat the Option like a sequence: // It's monadic!!! -- vp
  opt.foreach(function(input) { alert(input) });                 // alert("my option") called
  None.foreach(function(input) { alert(input) })                 // nothing called
  opt.filter(function(input) { return input == "my option" });   // -> Some("my option")
  opt.filter(function(input) { return input == "my option!" });  // -> None
  None.filter(function(input) { return input == "my option" });  // -> None; anonymous function not called


partial functions
actors
juan_gandhi: (Default)
"In Virginia, the weather also has changed dramatically. Recently arrived residents in the northern suburbs, accustomed to today's anemic winters, might find it astonishing to learn that there were once ski runs on Ballantrae Hill in McLean, with a rope tow and local ski club. Snow is so scarce today that most Virginia children probably don't own a sled. But neighbors came to our home at Hickory Hill nearly every winter weekend to ride saucers and Flexible Flyers.

In those days, I recall my uncle, President Kennedy, standing erect as he rode a toboggan in his top coat, never faltering until he slid into the boxwood at the bottom of the hill. Once, my father, Atty. Gen. Robert Kennedy, brought a delegation of visiting Eskimos home from the Justice Department for lunch at our house. They spent the afternoon building a great igloo in the deep snow in our backyard. My brothers and sisters played in the structure for several weeks before it began to melt. On weekend afternoons, we commonly joined hundreds of Georgetown residents for ice skating on Washington's C&O Canal, which these days rarely freezes enough to safely skate.

Meanwhile, Exxon Mobil..."
Palin's Big Oil infatuation
Los Angeles Times
September 24, 2008

By ROBERT F. KENNEDY Jr.



"Snow is consistent with global warming, say scientists
Britain may be in the grip of the coldest winter for 30 years and grappling with up to a foot of snow in some places but the extreme weather is entirely consistent with global warming, claim scientists."


""Even though this is quite a cold winter by recent standards it is still perfectly consistent with predictions for global warming," said Dr Myles Allen, head of the Climate Dynamics group at Department of Physics, University of Oxford."

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21 222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2025 03:39 am
Powered by Dreamwidth Studios