32
 org.apache.kafka.clients.consumer.ConsumerRecords@1f6d27cc was empty
    ScalaTestFailureLocation: SorterTest at (SorterTest.scala:75107)
    org.scalatest.exceptions.TestFailedException: org.apache.kafka.clients.consumer.ConsumerRecords@1f6d27cc was empty
        at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:6597)
        at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:70102)
     at org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:75107) 
     at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:6597)
        at SorterTest.$anonfun$new$4(SorterTest.scala:72104)
     at SorterTest.$anonfun$new$4$adapted(SorterTest.scala:6597)
     at scala.collection.immutable.List.foreach(List.scala:84116)
     at SorterTest.$anonfun$new$3(SorterTest.scala:69101)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:83115)
        at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:77109)
        at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:69101)
     at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:6698)
        at org.scalatest.Transformer.apply(Transformer.scala:69101)
        at org.scalatest.Transformer.apply(Transformer.scala:6799)
        at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:6597)
        at org.scalatest.TestSuite.withFixture(TestSuite.scala:85117)
        at org.scalatest.TestSuite.withFixture$(TestSuite.scala:83115)
        at org.scalatest.FunSuite.withFixture(FunSuite.scala:69101)
        at org.scalatest.FunSuiteLike.invokeWithFixture$1(FunSuiteLike.scala:73105)
        at org.scalatest.FunSuiteLike.$anonfun$runTest$1(FunSuiteLike.scala:72104)
        at org.scalatest.SuperEngine.runTestImpl(Engine.scala:6597)
        at org.scalatest.FunSuiteLike.runTest(FunSuiteLike.scala:84116)
        at org.scalatest.FunSuiteLike.runTest$(FunSuiteLike.scala:69101)
        at org.scalatest.FunSuite.runTest(FunSuite.scala:75107)
        at org.scalatest.FunSuiteLike.$anonfun$runTests$1(FunSuiteLike.scala:6597)
        at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:70102)
        at scala.collection.immutable.List.foreach(List.scala:75107)
        at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:6597)

Why is this program failing?

Hint:

I've tried to duplicate the code but I got the same problem...

Rupert Morrish
  • 4,873
  • 1
  • 14
  • 37
Turvo
  • 423
  • 4
  • 7

2 Answers2

33

The program is failing because:

Kafka Hates You

It would seem that:

The feeling is mutual. Taking the ascii value of the numbers at the end of the error messages yields: KAFKA HATES ME BECAUSE I HATE KAFKA.

LeppyR64
  • 13,501
  • 2
  • 48
  • 68
  • 1
    That's it!! It was my first puzzle so it maybe was too easy, I'll try to create a harder one :P – Turvo Mar 14 '19 at 15:21
  • 5
    @Turvo don't forget about the "many eyes" effect - sometimes puzzles seem artificially easy because it was solved quickly, but don't forget that there were also 1500+ people who did not solve it. – Brandon_J Mar 14 '19 at 23:23
  • 2
    Knowing nothing about Scala - would those normally be line numbers? I feel like in any programming language if your line numbers get into 5 digits, you're doing something wrong. I was instantly suspicious of that, especially the 80+ thousand numbers... – Darrel Hoffman Mar 15 '19 at 12:23
  • You are right, those numbers are suspicious. I've used uppercase letter's ascii code followed by lowercase letter's because using just 2 or 3 numbers would be too easy (That's why the hint mentioned "duplicated code") – Turvo Mar 15 '19 at 12:52
15

To solve it in the spirit of the riddle, we run:

grep -o ':.*)' < input | sed 's/[^0-9]//g' | xargs node -e "console.log(process.argv.slice(1).map(x => parseInt(parseInt(x.slice(2)) > 122 ? x.slice(1) : x.slice(2))).map(x => String.fromCharCode(x)).join(''))"

which provides us with the reason:

kafkahatesmebecauseihatekafka

So it is unlikely that the problem will be resolved soon...

  • 1
    This is a fantastic answer. – LeppyR64 Mar 15 '19 at 02:45
  • 2
    You can also do this by evaluating String.fromCharCode(...document.querySelector("#question code").textContent.match(/:\d+/g).map(s=>s.slice(3))) in the web console. – Neil Mar 15 '19 at 09:58
  • I love your answers! Nice job! – Turvo Mar 15 '19 at 10:03
  • 3
    fetch("https://api.stackexchange.com/2.2/questions/80670?&site=puzzling&filter=withbody").then(f=>f.json().then(r=>console.log(String.fromCharCode(...r.items[0].body.match(/:\d+/g).map(s=>s.slice(3)))))) is another approach. – Neil Mar 15 '19 at 10:06
  • Pipe stack trace into perl -lne 'if (/\:(\d\d)(\d+)\)/) { print chr($1) . " " . chr($2)}' – Thorbjørn Ravn Andersen Mar 15 '19 at 14:52