Settings

Theme

Tabloid – The Clickbait Headline Programming Language

tabloid-thesephist.vercel.app

270 points by luuuzeta 3 years ago · 43 comments

Reader

thesephist 3 years ago

Hey HN! Fun to see this project from my college years on HN again. To clear my name, I have actually written other languages that are arguably more useful, like Oak [0] which I used to build a bunch of personal software infrastructure [1] including my current daily-driver apps for notes, longform writing, a Twitter client, a personal search engine, and a few other knickknacks.

I find building little toy interpreters and programming languages fantastically fulfilling, creatively energizing, and a really fun way to learn how such a common element of our work that's often a black box functions inside. I've written before about how to get started [2] with these kinds of little toy programming language projects if you're curious to dive in.

[0] https://oaklang.org/

[1] https://github.com/topics/oaklang

[2] https://thesephist.com/posts/pl/

  • epaga 3 years ago

    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
luuuzetaOP 3 years ago

The author has one of the most interesting projects list I've seen: https://thesephist.com/projects/

  • ukuina 3 years ago

    This guy ships!

    • nine_k 3 years ago

      Look how rolling his own basically everything, except an OS, seems to work pretty well.

      Given time and ability, making what you need almost from scratch may be not just viable, but productive.

      • janekm 3 years ago

        Yes, as a lone developer. If you're working in a team it's less likely to work out well as you will have a much more significant training period for anyone to join one of your projects (in a team environment it's wise to go with "boring").

  • api 3 years ago

    The author is, if this is all real, one of the most prolific programmers I’ve seen. Wow! Can I have some of what he’s on?

    • cxie 3 years ago

      It's clear that the "author" is a +10x engineer. It's rare to come across someone with such a broad range of interests and abilities, and their contributions to open-source software are truly remarkable.

    • nomel 3 years ago

      I ask this honestly, possibly because I'm of an inferior build, but do these types of people have jobs?

    • rvense 3 years ago

      The secret is that they always write "you" as "u" and then spend all the time saved on programming.

      • TeMPOraL 3 years ago

        Correct. This is also, incidentally, why startups innovate faster than established companies - people in the corporate world waste so much time on typing things like "To whom it may concern", or "Looking forward to hearing from you", or, you know, on written communication in general.

    • xtreme 3 years ago

      It seems to me that people name Linus are destined for greatness.

      * Linus Torvalds (The OG)

      * Linus Sebastian (Linus Tech Tips)

      * Linus Lee (Author)

leokennis 3 years ago

The "EXPERTS CLAIM limit TO BE 10" is the epitome of our times. People who agree can hide behind authority and people who disagree don't need any knowledge to do so, the fact that something was claimed by an expert is reason enough.

awb 3 years ago

On a related note: I Just a new app called Boring Report on r/SideProject that strips clickbait content from articles so you can read the info without the sensationalism

https://www.boringreport.org/

https://www.reddit.com/r/SideProject/comments/12bgn7p/weve_c...

velcrovan 3 years ago

I did an implementation of this in Racket: https://github.com/otherjoel/tabloid

Tade0 3 years ago

> PLEASE LIKE AND SUBSCRIBE

Perfection.

I had a similar, never realized concept of a language named "Spouse"(no gender implied), with keywords such as "You promised we would ... on ..."(declarations), "you always ..."(loops) and "Fine."(marking the end of the program). I couldn't get the grammar to be both consistent and sound like the real deal though.

fjfaase 3 years ago

Funny little language. I used it in an exercise for the a workshop I gave at MCH2022 called 'Workshop: A practical approach to parsing' [1]. My solution can be found at GitHub [2] and can be used with IParseStudio [3] to execute programs written in Tabloid using the build-in interpreter.

[1]: https://fransfaase.github.io/MCH2022ParserWorkshop/ [2]: https://github.com/FransFaase/MCH2022ParserWorkshop/blob/mai... [3]: https://fransfaase.github.io/MCH2022ParserWorkshop/IParseStu...

Joker_vD 3 years ago

But does it support fake news?

    WHAT IF TOTALLY RIGHT IS ACTUALLY COMPLETELY WRONG
        YOU WON'T WANT TO MISS 'Alt-facts in logic are here'
    LIES!
        YOU WON'T WANT TO MISS 'Fake news are not discovered yet'
    
    PLEASE LIKE AND SUBSCRIBE
It prints that "FAKE NEWS ARE NOT DISCOVERED YET!", disappointingly enough.
davidkunz 3 years ago

Looks like I'll be doomscrolling through massive code bases.

hryx 3 years ago

Gotta love goofy stunts that take effort to make! A spiritually similar programming language that also screams a lot is ArnoldC: https://lhartikk.github.io/ArnoldC/

sam0x17 3 years ago

For some reason I lost it at the "PLEASE LIKE AND SUBSCRIBE"

rwoerz 3 years ago

Made my day! What about import statements like "CELEBRETIES LOVE X" or an "unsafe" keyword like "SECURITY EXPERTS HATE THIS TRICK"?

miniBill 3 years ago

I see your tabloid and I raise you a https://github.com/esseks/monicelli

ciwolsey 3 years ago

Some people just have way too much free time.

  • cfuendev 3 years ago

    Or simply they spend their free time doing what they enjoy

  • the_common_man 3 years ago

    And the world is a better place for it

  • curious_9 3 years ago

    Maybe they're just really good at optimizing their time management. Or maybe they're secretly superheroes with the power of super-productivity. You never know

varjag 3 years ago

Perhaps SMALLER THAN should of been NOT ANYWHERE NEAR OF

the_common_man 3 years ago

Brilliant, made my day

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection