Hacker Newsnew | past | comments | ask | show | jobs | submit | lucindo's commentslogin


That Quora answer is brilliant! Thank you for linking it here.



> The test hardware configuration includes:

> 1 DB server (Cassandra / Scylla)

The whole point of Cassandra is to run a cluster of servers to handle load at scale with minimal friction instead of having to buy a big single machine or spend all your time/money trying to run a clustered RDBMS. This test doesn't measure the correct thing.


Cassandra's performance scales linearly with the number of nodes though, so per-node performance definitely matters. Probably not 10x, but probably not 1x either.


Thanks!


+1


  function cons(x, y) {
      return function(m) {
          return m(x, y);
      }
  }
  
  function car(x) {
      return x(function(a, d) { return a; });
  }
  
  function cdr(x) {
      return x(function(a, d) { return d; });
  }
or

  function cons(x, y) {
      return function (m) {
          return m(x, y, function (n) { x = n }, function (n) { y = n });
      }
  }
  
  function car(x) {
      return x(function (a, d, sa, sd) { return a; });
  }
  
  function cdr(x) {
      return x(function (a, d, sa, sd) { return d; });
  }
  
  function setcar(x, y) {
      return x(function (a, d, sa, sd) { sa(y); });
  }
  
  function setcdr(x, y) {
      return x(function (a, d, sa, sd) { sd(y); });
  }
  
  function list() {
      arguments.shift = Array.prototype.shift;
      if (arguments.length == 0) {
          return null;
      } else {
          return cons(arguments.shift(), list.apply(this, arguments));
      }
  }
  
  function mapcar(fun, lst) {
      if (null == lst) {
          return null;
      } else {
          return cons(fun(car(lst)), mapcar(fun, cdr(lst)));
      }
  }

  function reduce(fun, init, lst) {
      if (null == lst) {
          return init;
      } else {
          return fun(car(lst), reduce(fun, init, cdr(lst)));
      }
  }
  
  function filter(fun, lst) {
      if (null == lst) {
          return null;
      } else {
          if (fun(car(lst))) {
              return cons(car(lst), filter(fun, cdr(lst)));
          } else {
              return filter(fun, cdr(lst));
          }
      }
  }


That's interesting... I've been thinking about this for a while now and at first I thought it would be incredibly bloated, but now I'm not so sure. Definitely interesting.


just for fun:

  function copylist(lst) {
      return mapcar(function (x) { return x; }, lst);
  }
  
  function last(lst) {
      if (null == lst) {
          return null;
      } else if (null == cdr(lst)) {
          return lst;
      } else {
          return last(cdr(lst));
      }
  }
ugly append:

  function append() {
      var lst = null;
      var i = 0;
      for (; i < arguments.length && null == lst; i++) {
          if (null != arguments[i]) {
              lst = copylist(arguments[i]);
          }
      }
      for (; i < arguments.length; i++) {
          if (null != arguments[i]) {
              setcdr(last(lst), copylist(arguments[i]));
          }
      }
      return lst;
  }
the fun:

  function qsort(lst) {
      if (null == lst) {
          return null;
      } else {
          var pivot = car(lst);
          var nlst = cdr(lst);
          return append(qsort(filter(function (x) { return x < pivot; }, nlst)),
                        list(pivot),
                        qsort(filter(function (x) { return x >= pivot; }, nlst)));
      }
  }
  
  function powerset(lst) {
      if (null == lst) {
          return null;
      } else {
          var first = car(lst);
          var rest  = powerset(cdr(lst));
          return append(list(list(first)),
                        mapcar(function (x) { return append(list(first), x); }, rest),
                        rest);
      }
  }


Q: What would you do differently if you could do it all over again?

Reddit: Stick with Lisp. (...)

http://notelab.infogami.com/startupschool2006


That sounds like something to score brownie points.

In reality, with their millions, there's nothing stopping them from re-Lisping it. (Not even time considerations -- when they were in negotiations to be acquired, they didn't do any development for months [1]. If you can get away with spending that much time not developing before you have money, you can get away with doing a rewrite after money is no longer a concern.)

[1] "We must have stopped doing real work for six months." -- http://aaronsw.jottit.com/howtoget


You can tell us your results with KDD data sets: http://kdd.ics.uci.edu/


He says in some other comment:

"I've tested it on the data from the KDD 2006 cup a contest in the KDD conference whose goal was to identify Pulmonary Embolism based on data generated from CT scans and it out scored the cup winners by a 50% margin."


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: