49 comments

[ 3.2 ms ] story [ 119 ms ] thread
Not going to SXSW, but...

     tr ',' '\n' | sort -n | uniq -d
It's also pretty easy to do in Excel, favored tool of "marketing gurus". Find/replace, import, pivot.
I actually found a solution for it in excel before writing the following:

  asort($data);
  $duplicate = function ($val) use (&$data) {
    $count = 0;
    foreach ($data as $i => $entry)
      if ($val == $entry) $count++;
    return $count;
  };

  foreach ($data as $v)
    if (($count = $duplicate($v)) > 1) {
      printf("%d, Count %d\n", $v, $count);
      break;
    }
I assume it would be possible to use a sort+callback to return the value as well.
sort + callback is what I did in JavaScript:

    .sort(function(a,b){if(a==b){throw a;}return a-b;});
Did you eval the dom to get the dataset?
I did :)

  JSON.parse(p.innerHTML.split('\n')[2])
The point was posting a hack. "most" people don't know unix shell.

I'd consider your mention of Excel to be a hack, as I honestly don't have a clue with it beyond the basics.

(comment deleted)

  x = File.read('puzle.txt')
  y = x.split(/ \w /)
  module Enumerable
    def dups
      inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys
     end
  end
  d = y.dups
  require 'mathn'
  dp = []
  d.each {|z| z = z.to_i; dp << z if z.prime?}
  dp
So just to summarize:

Elite 'hacker' group claims to hate marketing guru/bullshit tactics, then proceeds to ply the hell out of everyone to spread their concept in a viral Twitter hashtag manner.

Granted, I totally just did it because that puzzle was way too easy, but c'mon now.

In that sense, at least, the event is being held by people who understand the hack mindset. I noticed that the puzzle was very easy, and that the "elite hackers" are in fact a recruitment agency, and therefore that the main purpose of the event is probably for a recruitment agency to put their recruiters in the middle of a bunch of hackers while eliminating competing recruiters who have the same goal.

... but I still did the puzzle.

[edit] And everyone else is doing it too, and posting their solutions here! "Blazing guitarpocalypse"[1] indeed.

I might attend the event, but that's mostly because I'm in Austin and feeling curious, and not because the website convinces me the event will have a high quality.

[1]http://www.codinghorror.com/blog/2007/02/fizzbuzz-the-progra...

I wonder if having to manually launch the puzzles show() method is part of the puzzle itself or just a bug. (Checked with Chrome 9 and Firefox 3).
Maybe inspecting source is their first bar to get over? Pretty low if so...
I wondered the same thing. Maybe os specific ? OSX + chrome 9 here.
Looks like pressing ESC invokes the puzzle.
It has a keypress event tied to it, but it didn't trigger for me. I had to manually invoke $('the_puzzle').show().
I'm also throwing a hacker only event.

It's called stay home and get shit done.

We already have that the other 51 weeks of the year; sometimes we like a little variety.
Can I come?
Two years ago such a comment would have -2 votes and would be hidden just because of its tone.

Sorry for the meta, but I am missing the old HN.

I doubt we would be able to have the whole front page dedicated just to Erlang news if the need appeared.

It seems that the problem of maintaining quality of discussion in an open forum remains unsolved.

Maybe limits to entry (like the problem in the link) or ability to provide negative feedback to posters would help.

How would a comment pining for the days of yore have fared two years ago?
I'm not sure if you're right or not, but if you are right it's very interesting because I've been here since almost day 1 and it's not as if my old comments routinely got down-voted. So if what you're saying is true, not only has the hivemind's up-vote heuristic changed - I've changed my posting habits.
I hate this attitude. Especially when we all know that it is impossible to be productive for 12 hours a day, 365 days per year - let alone the 16, or whatever hours, some 'hackers' claim to do

I would rather work an effective 4 hours a day (which you end up doing, or less, anyway, between all the web surfing and snarky comments on HN), take a few weeks off a year, take the odd year off, and actually enjoy life through meeting and interacting with other people.

I'm not saying you should stay home and work every day, I'm saying there is no way to turn SXSW into what it isn't - something for hackers.
That is a bit different then. I agree about the conference, I have never been inclined to go.

The impression that I get is that the program is full of self-proclaimed experts who pack themselves and their 2 page bio's onto panels to talk about subjects that nobody outside of that room cares about, and that nobody in the room will ever actually implement or do anything about.

I applaud the effort of setting up an area of sxsw that is more hackerish - but it would probably be better to just organize something separately, preferably in a different city and at a different time.

Edit: relevant: http://ttk.me/t4AY6

And indeed that is often a good solution. But it's nice to hack socially at times too. Edinburgh Hacklab had a coding event last Wednesday; I went along, got a fair bit done (the fact that I was in a different environment helped my productivity), chatted with friendly people, showed them the project I was working on, got help with some CSS stuff, etc. Overall a productive way to spend an evening.
Solved the puzzle with a couple lines of Python ;) Unfortunately, I won't be attending SXSW this year. Boo. If someone can solve that puzzle, I'll teach you all the hacks I know.
Open Matlab --> answer = mode(Copy --> Paste)
solved it with no code by copying and opening as csv, transpose paste, sort, scroll to match column number with number, check for mismatch, bingo!
Text editor, break into lines, numeric sort, find the line where the count goes out of sync with the line number.
C#: data.GroupBy(i => i).Where(g => g.Count() > 1) .Select(g => g.Key) .ToList().ForEach(x => Console.WriteLine(x));
node.js + underscore.js

var numbers = [];

require("./underscore-min.js"); var dupe = _.reject(numbers, function(number) { return _.lastIndexOf(numbers, number) == _.indexOf(numbers, number); }); console.log(dupe);

Open up web inspector.

var arr = (paste)

arr.sort()

for(var i = 0;i<arr.length;i++){if(arr[i+1] == arr[i]){console.log(arr[i])}}

Or the recursive version, upon sorting:

  function find_dupe(a){ if(a.length==0) return -1; 
  if (a[0]==a[1]) return a[0]; else return find_dupe(a.slice(1,a.length)); }
BTW, are loops more efficient than recursion in JS? It sure seems like a lot of JS libraries out there including jQuery avoid recursion like plague.
For recursion vs. looping, it really depends on what you're doing. In my js experience though, most of the time looping is either faster or equal to recursion, while being significantly easier to understand at a quick glance.

In this case, the loop will outperform recursion because of all of the slice calls in the recursive version.

   $data = "http://hackerunderground.com/solution/blank;
   $ch = curl_init($data); 
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
   $base = curl_exec($ch);

   for($i=0;$i<10000;$i++)
   {
   $data = "http://hackerunderground.com/solution/$i;
   $ch = curl_init($data); 
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
   $response = curl_exec($ch); 
   if($response != $base)
   {
   echo $i;
   }
   }


I like my solution best. Everyone should try it!
This will work for all the puzzles too. :-)
I like how it keeps going even after it finds the solution.
Well now they are asking for Prime duplicates, and if they keep it going fo the next week, you could end up with some complex puzzles.
What day is the event?
You need to solve the puzzle or are you joking?
I'm learning Python (3) w/ MIT OCW and here's my solution (http://pastebin.com/EQevWQWC). def dupefinder(lister): '''Function to find first duplicate in a list; Variable to pass to this function should be of type "list" ''' listerdupe = sorted(lister) for index,item in enumerate(listerdupe): if item == listerdupe[index+1]: print('First duplicate number is {0}'.format(item)) return item
(comment deleted)
Since they changed the puzzle to now require finding the prime duplicate number.

Is is each number delimited by a (random?) alphabetic letter? Is this to make parsing into Excel/an array harder?

Also, even the new 'harder' puzzle is easy to solve in Excel. Maybe that isn't a bad thing, however.

the lemons of this string when you take out all of the spaces and align the words end to end and prefix it with the word win