Vyper: QUESTION: Are here any plans to create Viper online compiler and IDE like Remix?

Created on 24 Jul 2017  路  15Comments  路  Source: vyperlang/vyper

I'm wondering if there are any plans to create an online IDE for Viper (equivalent to Remix) or support for this language in Remix also?

We are very interested in this new language and some of the members of ETC community have suggested me to create an online compiler. I know that the language is not yet ready.
https://github.com/Dexaran/ICO/issues/21

I'd like to know about plans for Viper IDE. May be we can also participate.

Discussion

Most helpful comment

We will set up a server for the Viper-compiler and a UI for this server. The code will actually be compiled on the server, and the bytecode will be returned to the UI.

I think this will be an effective solution for the initial stage.

All 15 comments

The main challenge is finding a way to run the python in a browser. I know there are ways to do it, but not sure if any of them are up to running python3.6 with the AST module as well as some of the other dependencies (eg. sha3).

Aside from that, shouldn't be too hard.

@Dexaran is there a reason you prefer an online IDE vs. extending an existing native one?

Online makes it substantially easier for newcomers to participate as they don't need to download anything. See: solidity web compiler. Having a web compiler for viper would be genuinely cool.

Ceteris paribus, not having to download something is better than having to download something.

In terms of utility per unit effort? Just make a plugin for a system people like. I don't know what people actually use these days---(a bit my surprise) these days I see an ever-increasing number of cool kids coding in:

https://code.visualstudio.com/download

I suppose I could try coding this plugin myself---writing a syntax highlighter for Viper could be a good project for me to understand the nitty gritty of Viper.

Online compiler will also make everything much easier. It will allow not to care about OS at all. Any operating system supports a browser. If a browser is the only thing that is needed to turn code into bytecode that you can deploy it is good. You can also deploy the bytecode with MyEtherWallet.

So everything that you need is browser. You can create and deploy the whole contract without any dependencies from IDE/OS/Installable tools. You can even develop and deploy contracts from smartphone.

Syntax highlighting for Viper is fairly low utility per unit effort - since Viper syntax is a subset of python3.6 syntax, you can just use Python syntax highlighting.

The hard part is making the Viper compiler itself accessible from inside the browser. I see two routes:

  1. Setting up an API service that accepts viper code as input and gives EVM bytecode as output
  2. Somehow bringing the python compiler into javascript.

(1) seems easier but it's not very secure. (2) is better but harder; there are python-to-JS utilities out there these days; the challenge is likely in the libraries and modules (especially the python3.6 ast module).

We will set up a server for the Viper-compiler and a UI for this server. The code will actually be compiled on the server, and the bytecode will be returned to the UI.

I think this will be an effective solution for the initial stage.

@Dexaran How's this coming, is it still in the works?

It is already working.

I have compiled my example contracts with the remote compiler: https://codepen.io/yograterol/full/aypYjP/

There must be a lot of work in the frontend, but we plan to publish the compiler API to allow to use it for all third-party services.

@Dexaran I have some friends who might be interested in creating a frontend, is the compiler api published yet?

I think with time it should be possible to include Viper in Remix (since it would make sense to also support Solidity's IR (Julia) in it).

I am not sure if this works properly, but it seems to transcompile Python to Javascript: https://github.com/QQuick/Transcrypt

@DavidKnott we can probably close this

Also see #529 @axic

Compiler is here https://vyper.online/

IDE is probably out of scope for this project

Closing, but watch this space - will perhaps be able organise a gitcoin bounty on remix to work with hosted vyper-serve command :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fubuloubu picture fubuloubu  路  3Comments

jacqueswww picture jacqueswww  路  4Comments

robinsierra picture robinsierra  路  3Comments

nrryuya picture nrryuya  路  4Comments

nrryuya picture nrryuya  路  3Comments