https://github.com/jabbalaci/nimpykot
Porting some Python / Kotlin features to Nim
https://github.com/jabbalaci/nimpykot
kotlin library nim nimlang python
Last synced: about 1 year ago
JSON representation
Porting some Python / Kotlin features to Nim
- Host: GitHub
- URL: https://github.com/jabbalaci/nimpykot
- Owner: jabbalaci
- License: mit
- Created: 2018-10-01T20:55:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-02T21:50:31.000Z (over 1 year ago)
- Last Synced: 2025-03-23T18:48:07.003Z (over 1 year ago)
- Topics: kotlin, library, nim, nimlang, python
- Language: Nim
- Homepage: https://nimble.directory/pkg/pykot
- Size: 178 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
NimPyKot
========
[](https://travis-ci.org/jabbalaci/nimpykot)
Porting some Python / Kotlin features to Nim.
Installation
------------
```bash
$ nimble install pykot
```
To install the latest development version, issue the following command:
```bash
$ nimble install "https://github.com/jabbalaci/nimpykot@#head"
```
With `nimble uninstall pykot` you can remove the package.
API Documentation
-----------------
See here: https://jabbalaci.github.io/nimpykot/ .
Notes
-----
Similar projects: https://github.com/search?q=nimpylib&type=repositories
Sample
------
Take an integer and reverse it. The result must also be an integer.
Example: 1977 → 7791.
```nim
import unicode
import pykot/converters
proc reverse_number(n: int): int =
n.toStr().reversed().toInt()
let n = 2018
echo n # 2018
echo reverse_number(n) # 8102
```
See the [samples/](samples) directory for more examples.