needed-libraries icon indicating copy to clipboard operation
needed-libraries copied to clipboard

A tool/library to ease porting from other languages

Open kobi2187 opened this issue 6 years ago • 7 comments

This is about porting, not a binding. One part is a tool that tries to parse syntax, build relevant objects from it, and construct a Nim AST, which is then transformed to nim (text) code. (where different "input" languages are easy to add)

The second part is probably porting the base libraries for that language, which most other code depends on -- implemented in nim, while preserving that language's semantics (for example may need to create a special Object type for that language, etc.) tiny languages (like lua) or huge languages (like c# and java), they all have valuable code.

kobi2187 avatar Mar 11 '19 13:03 kobi2187

Can be done in milestones: tiny libraries,medium, large... adding support for language constructs incrementally.

kobi2187 avatar Mar 11 '19 13:03 kobi2187

There are usually lists named: awesome-X (where x is name of language) that showcase their interesting libs. Can read and see what we're missing.

kobi2187 avatar Mar 11 '19 13:03 kobi2187

c2nim already exists, but do you have a specific language in mind?

awr1 avatar Apr 05 '19 19:04 awr1

See #26 for Python-to-Nim conversion

FedericoCeratto avatar Apr 06 '19 15:04 FedericoCeratto

I have started working on a c# translator. it's in C#, using Roslyn. very bare bones, only started.

kobi2187 avatar Apr 07 '19 17:04 kobi2187

I wrote a typescript to nim transpiler https://github.com/bung87/ts2nim

bung87 avatar May 26 '20 02:05 bung87