Show HN: 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: max = 6 ids = await getApi('topstories') for id in ids.slice(0, max) getItem(id) async def getItem(id) const d = document.createElement('div') results.appendChild(d) d.style = 'padding-bottom: 1em;' i = await getApi('item/' + id) ? i.title, '|', i.score u = '//news.ycombinator.com/item?id=' d.innerHTML = i.title.link(u + id) async def getApi(path) u = '//hacker-news.firebaseio.com/v0/' return getJson(u + path + '.json') https://ift.tt/lMbB0E2 September 2, 2022 at 12:47AM
#planet Fitness#gym# Exercise# bodybuilding#Yoga# meditation#money mantra#la fitness# #Money attraction#Money magnet#Diabetes# High Blood pressure#loa# law of attraction#diet#fitness first #nutrients#24 hours fitness#pilates#exercise#planet fitness# Health care#wellness#health focus# healthy diets#inner energy#consciousness,# mega health tips..#gym#united health care#health insurance#How to earn money on-line #digital marketing#.money making#la fitness#fitness first#bodybuilding#
Comments