drc0's comments

drc0 | 7 years ago | on: Fail

what is this?

drc0 | 8 years ago | on: Where Do Type Systems Come From?

> That’s the equivalent of writing type annotations for programming functions. And the goal is avoiding bugs instead of logical contradictions.

mh, given Curry–Howard correspondence, aren't those the same? so the goal is indeed not having logical contradictions?

drc0 | 8 years ago | on: Little Alchemy

hints!

  function combRep(arr, l) {
    if (l === void 0) l = arr.length; // Length of the combinations
    var data = Array(l), // Used to store state
        results = [
        ]; // Array of results
    (function f(pos, start) { // Recursive function
      if (pos === l) { // End reached
        results.push(data.slice()); // Add a copy of data to results
        return;
      }
      for (var i = start; i < arr.length; ++i) {
        data[pos] = arr[i]; // Update data
        f(pos + 1, i); // Call f recursively
      }
    }) (0, 0); // Start at index 0
    return results; // Return results
  }
  var parents = [];
  for(b in bases.base) {
    if (bases.base[b].parents != undefined) {
      for (p of bases.base[b].parents) {
        parents[p.sort().join('-')] = b;
      }
    }
  }

  function gethints() {
    combinations = combRep([1, 2, 3, 4].concat(game.progress), 2);
    for (c of combinations) {
      let idx = c.sort().join('-');
      if (parents[idx] != undefined && game.progress.find((e, i, a) => parents[idx] == e) == undefined) {
        console.log(bases.names[c[0]], bases.names[c[1]]);      
      }
    }
  }

drc0 | 8 years ago | on: Ways to Read More Books

the deal breaker for me is actually picking up a new book to read, often I stop at the "searching a good book to read". when you start often is inertia.

drc0 | 9 years ago | on: Box Breathing

TIL: The longest time breath held voluntarily (male) is 24 min 3.45 secs and was achieved by Aleix Segura Vendrell (Spain).

How is that thing even possible? your body would work in an entirely different manner!

page 1