Hacker News new | past | comments | ask | show | jobs | submit login

This game reminds me a lot of untrusted [0], though it seems to be much less polished, and the solutions feel less interesting and elegant.

[0]: https://alexnisnevich.github.io/untrusted/

Yes, I was inspired by it. It's a great game. Did you finish GoCode? The problems do get more challenging.

Yup, assuming the Finale with rob is all there is to it. A couple of them were trickier (like in level 9, it was really not clear at all what the right output was supposed to be at first), but none of them seemed all that hard. None of them actually felt "fun".

I think it mostly felt less polished due to things like the lack of music and the fact that Go itself is a bad language for this sort of thing.

In Untrusted, there were often places where you could monkey-patch objects and come up with really creative solutions. There were some problems that I felt like I really had freedom to be creative.

In this game, the imports were always out of bounds for editing, so I could never pull in 'unsafe' and have any real fun. All the solutions felt far too restrictive. Sure, there were multiple ways to hack around things, but it never felt like there was room for a spark of real creative joy.

I think go is just a bad language for "fun". It's not optimized for being able to write interesting or elegant code. It's not optimized for having fun.

Not to discount your point, but I want to offer my opinion which is different.

I had fun _because_ it was more constrained. But I also like Go.

As an example, I solved level 6 in what I understand to be an unconventional way:

(spoiler alert)

I realized I could “get out” of readCodesFromKeypad function scope by ending it early and then writing the start of another top level function. Once I had access to global scope, I could add an init() function to modify the “crypto/rand.Reader” variable and assign to it an io.Reader that I could control. I was on mobile so I decided to take a shortcut and just overwrite the global passcode variable instead.

(end spoiler)

I may have “cheated”, but it felt creative and in spirit of the game, and it got me to the next level.

I just added two lines to the starting brute-force code:

    if v, _ := validateCode(passcode); v == 1 {
        return []string{passcode}

Yep. Based on the hint for that question, I expect this is the "normal" solution.

Oh heh, I declared another method then used that to set the passcode var (without the var being shadowed), return it to the hardcoded method name, and returned that.

  // readCodesFromKeypad - get codes from keypad input
  func readCodesFromKeypad() []string {
   var passcode string
   var codes = make([]string, 0)
  // Agent Getter - bypass keypad input
   // codes := streamKeypad()
  // Agent Getter - try brute force login
   // TODO: not finished, someone's coming...

      // use shadowed "passcode" to avoid unused var error
      return append([]string{passcode}, unshadowedMethod()...}[1:]
  func unshadowedMethod() []string {
      codes := []string{passcode}
   return codes

That's level 5.

Another similiar game is Deadlock Empire


Applications are open for YC Summer 2020

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