Pi

Pith language. JavaScript with a little bit of Python syntax

Hacker News

Pith language. JavaScript with a little bit of Python syntax

I've been writing a lot of JavaScript and Python lately. I like Python's syntax, so I created a language called Pith that's JS with some Python-like syntax (but without trailing colons). It's not a full compiler. It really just does search-and-replace, but I find it fun and useful in spite of some sharp edges. I use it on my smartphone to write and run short programs. Here's an example using the HN API ( https://github.com/HackerNews/API ): max = 6 ids = await getApi('topstories') for id in ids.slice(0, max) getItem(id) async def getItem(id) const div = document.createElement('div') results.appendChild(div) div.style = 'padding-bottom: 1em;' item = await getApi('item/' + id) ? item.title, '|', item.score url = '//news.ycombinator.com/item?id=' div.innerHTML = item.title.link(url + id) async def getApi(path) url = '//hacker-news.firebaseio.com/v0/' return getJson(url + path + '.json')

Share card

Actual performance

2points
1comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Hacker NewsStrong engagement from HN community · Strong signals: io · Missing: https docs, excited, just released
61%61% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntOn track for Day 1 leaderboard · Strong signals: new, using · Missing: mac, agents, macos
51%51% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Indie HackersIH features products with proven revenue · Strong signals: created · Missing: supports, reddit linkedin, podcasting
48%48% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
38%38% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
29%29% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
15%15% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: smart · Missing: web3, chat, crypto
1%1% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Ui
Uint1Array – JavaScript Bit Array55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Uint1Array – JavaScript Bit Array

Hacker News24
Risqué
Risqué38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Get a little bit naughty.

Indie Hackers1social-media
Tr
Transcrypt Python to JavaScript compiler can now include JSX55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Transcrypt Python to JavaScript compiler can now include JSX

Hacker News1
Tr
Transcrypt 3.7 Python to JavaScript compiler: dataclasses, JS6 modules70%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Transcrypt 3.7 Python to JavaScript compiler: dataclasses, JS6 modules

Hacker News5
Py
Python's __add__ and __mul__ in JavaScript58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Python's __add__ and __mul__ in JavaScript

Hacker News3
Ca
Carefulwords.com – a little bit more than a thesaurus51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Carefulwords.com – a little bit more than a thesaurus

Hacker News3
Co
ComputeLite: Python/R/JavaScript/SQLite in browser81%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

ComputeLite: Python/R/JavaScript/SQLite in browser

Hacker News2
I
I Made a Language to Be JavaScript's Nanny60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I Made a Language to Be JavaScript's Nanny

Hacker News4
Pu
PureScript - a functional language which compiles to Javascript65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PureScript - a functional language which compiles to Javascript

Hacker News2
Th
The Beginner's Guide to being a little bit Happier44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The Beginner's Guide to being a little bit Happier

Hacker News4