Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

wow fizbuz

Name: Anonymous 2015-04-27 1:55

the programming reddit is still talking about fizzbuzz

how fucking miserable is the programming scene?

Name: Anonymous 2015-04-27 2:56

Post a fizzbuzz program that you consider good.

This is now a fizzbuzz thread.

Name: sage 2015-04-29 5:40

data FizzBuzz = Fiz | Buzz | FizzBuzz

Name: Anonymous 2015-04-29 5:41

>>3
deriving Show --Just making it easy, that's all boss.

Name: Anonymous 2015-04-29 8:01

Methinks >>1 failed fizbuz at job interview.

Name: Anonymous 2015-04-29 13:49

Start with the following generalization

data Q a b
= L a
| R b
| B a b


For which Q `Fizz `Buzz records the original data type from >>3

(note, I'm using ` to lift an ADT from the value to type level, this is a new GHC extensions called data primes which makes haskell closer to a research language)

Now following the work of Hutton and Wouter let's invert this statagorically to emephor it into using category theoretic idioms:

Q "=" Mu (KEEP :& DROP :+ DROP :& KEEP :+ KEEP :& KEEP)

There are a few things happening here that deserve some explanation. First of all Mu is the recursive endotensor which GHC pushes deeper into the functor.

+ and & are the usual sums and products which we know are bifunctors. This gives us a true functorial description of fizzbuzz once and for all. Furthermore, it's possible to do this generalically for any number of "buzzes" in a dependently typed language.

Once agains we've seen that haskell is the nothing of thing-in-itself which enables truly abstract mathematical thought and programing to blend beautifully!

Name: Anonymous 2015-04-29 22:17

>>6
Do you learn all that by yourself or is it forced down your throat semi-willingly by the academia?

Name: Anonymous 2015-04-29 22:49

>>7
original research do not steal

Name: sage 2015-05-01 0:07

>>6

uh

Name: Anonymous 2016-08-22 22:18

#include <stdio.h>
int main(void){for
(int i=1;i<101;i++)
{if(!(i%3))printf
("FIZZ");if(!(i%5))
printf("BUZZ");if
(i%3&&i%5)printf
("%d",i);printf
("\n");}return 0;}

Name: Anonymous 2016-08-22 22:56

Screw programming. Get into the dubs scene! Check 'em

Name: Anonymous 2016-08-23 0:34

Pretty sure i created this thread.. ama

Name: Anonymous 2016-08-23 0:34

Pretty sure i created this thread.. ama

Name: Anonymous 2016-08-23 1:19

>>10
why didn't you define away printf

Name: Anonymous 2016-08-23 1:58

>>14
What do you mean?

Name: Anonymous 2016-08-23 2:17

Pretty sure i'm in the american medical association.. ama

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List