Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/js13kgames/pymm
pymm - a js13kGames 2022 competition entry by Anacreon (@panjea & @hexatekin).
https://github.com/js13kgames/pymm
2022 competition death game html5 javascript js13k js13kgames js13kgames2022 optimization unfinished
Last synced: 7 days ago
JSON representation
pymm - a js13kGames 2022 competition entry by Anacreon (@panjea & @hexatekin).
- Host: GitHub
- URL: https://github.com/js13kgames/pymm
- Owner: js13kGames
- Created: 2022-10-07T09:29:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-07T09:32:22.000Z (about 2 years ago)
- Last Synced: 2024-10-08T10:34:40.353Z (3 months ago)
- Topics: 2022, competition, death, game, html5, javascript, js13k, js13kgames, js13kgames2022, optimization, unfinished
- Language: JavaScript
- Homepage: https://js13kgames.com/entries/pymm
- Size: 30.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# py--
- decompress `py--` scripts at runtime into javascript
- includes mini transpiler with user defined macro syntax
- defines smaller CSS and DOM API## syntax: local variables
RULE: no space before equals is assignment to a local variable.py--
```python
a= b
```
js translation:
```javascript
var a= b
```## syntax: global variables
RULE: a space before equals is assignment to a global variable.
RULE: or no spaces at all is assignment to a globalpy--
```python
a =b
a=b
```
js translation:
```javascript
a =b
a=b
```## syntax: for loop
RULE: for loop symbol is `@`.
- in short form `@ a` translates to `for i in range(len(a))`, the default loop index variable is `i`
- long form is `@ j a`, this sets the loop index variable to `j`
- a blank new line terminates the loop (appends `}` to the js translation)py--
```python
a= [1,2,3]
@ a
console.log('index', i)
console.log('value', a[i])```
js translation:
```javascript
var a =[1,2,3]
for(i=0;i