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

That's neat, but imho start with the plain fizzbuzz first. Everyone has it in their lexicon so it acts as a first-pass Rosetta stone for what the language syntax is like. Adding extra bits implies you need those to get the job done.



I just updated the program to allow arbitrary arrays of words and factors for division, so now it is a fizz-buzz-jazz version of the program, and it gets even shorter once you go to table driven data.

    var ss = ""
    var color = ALICE_BLUE

    loop across:WORDS index:wordx
     if mod(b.cell_seq, PRIMES[wordx]) == 0
      WORDS[wordx] &=> ss
      color = COLORS[wordx]
    if ss == ""
     //  plain cell
     ss = to_str(b.cell_seq)




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

Search: