Pith language. JavaScript with a little bit of Python syntax
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 cardActual performance
Launch Intel predictions
Analyze your own launch →Incorrect prediction on native model
Similar products
Uint1Array – JavaScript Bit Array
Get a little bit naughty.
Transcrypt Python to JavaScript compiler can now include JSX
Transcrypt 3.7 Python to JavaScript compiler: dataclasses, JS6 modules
Python's __add__ and __mul__ in JavaScript
Carefulwords.com – a little bit more than a thesaurus
ComputeLite: Python/R/JavaScript/SQLite in browser
I Made a Language to Be JavaScript's Nanny
PureScript - a functional language which compiles to Javascript
The Beginner's Guide to being a little bit Happier