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

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):

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.

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”).

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.

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

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.

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

Your blog looks really promising!

Thanks! Now to see if I ever post again.

it’s nit-picking; but you

douse 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! :)

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

another way to see it is that there is

literallyan if statement in the mathematical definition.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):

which also doesn’t

directlyuse conditionals, but they are present… :Dto 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.

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.

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

testedit)… so, thank you for reading and writing this up, I’m looking forward to working through it. :DOf 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!

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.