Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You know the documentation is good when I can hand it to ChatGPT and it spits out a fully functional program for me after two small tweaks (I had to tell it to add RUMOR HAS IT and to not chain operations).

Write a program in Tabloid that takes 5 numbers and returns the product of the first three numbers plus the product of the last two.

Run it with the numbers 4,5,7,8,9.

----> ChatGPT response:

    DISCOVER HOW TO product_with_five_numbers WITH a, b, c, d, e

    RUMOR HAS IT

        EXPERTS CLAIM ab_product TO BE a TIMES b

        EXPERTS CLAIM first_product TO BE ab_product TIMES c

        EXPERTS CLAIM de_product TO BE d TIMES e

        EXPERTS CLAIM result TO BE first_product PLUS de_product

        SHOCKING DEVELOPMENT result

    END OF STORY

    EXPERTS CLAIM input_a TO BE 4

    EXPERTS CLAIM input_b TO BE 5

    EXPERTS CLAIM input_c TO BE 7

    EXPERTS CLAIM input_d TO BE 8

    EXPERTS CLAIM input_e TO BE 9

    EXPERTS CLAIM final_result TO BE product_with_five_numbers OF input_a, input_b, input_c, input_d, input_e

    YOU WON'T WANT TO MISS 'The result is'

    YOU WON'T WANT TO MISS final_result

    PLEASE LIKE AND SUBSCRIBE


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

Search: