1. 46

  2. 7

    A great article to kick off your personal blog, congrats! Looking forward to more writing :-)

    1. 2

      Your blog looks really promising!

      1. 1

        Thanks! Now to see if I ever post again.

        1. 1

          So far, no. So here’s some encouragement!

          (I saw this link submitted to HN, hence I thought I’d re-submit it here).

      2. 1

        it’s nit-picking; but you do use conditional logic in the lookup of the dictionary. (a dictionary basically says “if this, return that”).

        in any case, i really like the math part! :)

        1. 2

          Technically, dictionary can be implemented without conditional logic, so it doesn’t actually use it. Alternatively, you could use an array instead of dictionary.

          1. 2

            another way to see it is that there is literally an if statement in the mathematical definition.

          2. 1

            Fair! In this case, I’m using the dictionary like a conditional. But generally speaking I’m not sure I see key-value lookup as always analogous to conditional logic. some_array[3] returns the element at index 3 of an array, but we mostly don’t think of it as if index==3 return {element-at-index-3}… though you could choose to look at it that way.

            Reminds me of another favorite fizzbuzz (Ruby version):

            ->(n){ [[["Fizz"][n%3],["Buzz"][n%5]].join].find(->{n}){|str| !str.empty? }

            which also doesn’t directly use conditionals, but they are present… :D

            1. 1

              to continue rambling; one way view it in my mind in a mathematical way is that if you have if-statements your function is only piece-wise differentiable; whereas if there aren’t any, it’s differentiable everywhere.

              clearly, we could imagine functions that are differentiable everywhere as involving if-statments, but it’s not super useful.

          3. 1

            I enjoyed your article, and I appreciate the work that you put into writing it.

            I wrote a response to it and planned to share it as a link on the site for further discussion, but since I am a new user on Lobsters, I cannot share it (it’s a “new domain”).

            Here is the response: https://blog.antfeedr.com/posts/fizzbuzz.html

            I wanted to write about so much more but I had already written a lot, perhaps in the future.

            On that note, if someone else is willing to share it as a story here I would appreciate that. I would love to see some more discussion surrounding this topic, and if it’s just a comment in this thread I fear that will never happen.

            1. 2

              Hm, thank you! I started reading it but I’ll need to go back to it.

              It’s certainly true that I don’t feel like I had a “proof” for the more general formula; I had a hunch that it would work (and it worked where I tested it)… so, thank you for reading and writing this up, I’m looking forward to working through it. :D

              1. 1

                Also if you find that you would be willing to share it as a story on this site I would appreciate that as well :x I’d like to get as much feedback as possible, but unfortunately I have a ~70 day countdown of being a new user before I can start sharing new urls it appears.

                1. 1

                  Of course! I was really excited to be able to participate in this sort of discussion, so I thank you for writing the original post that inspired mine!