Giter VIP home page Giter VIP logo

Comments (15)

Dexaran avatar Dexaran commented on May 14, 2024 3

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.

from vyper.

vbuterin avatar vbuterin commented on May 14, 2024

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.

from vyper.

beaugunderson avatar beaugunderson commented on May 14, 2024

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

from vyper.

vbuterin avatar vbuterin commented on May 14, 2024

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.

from vyper.

virgil avatar virgil commented on May 14, 2024

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.

from vyper.

sgitt-vassky avatar sgitt-vassky commented on May 14, 2024

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.

from vyper.

vbuterin avatar vbuterin commented on May 14, 2024

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).

from vyper.

DavidKnott avatar DavidKnott commented on May 14, 2024

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

from vyper.

Dexaran avatar Dexaran commented on May 14, 2024

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.

from vyper.

DavidKnott avatar DavidKnott commented on May 14, 2024

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

from vyper.

Dexaran avatar Dexaran commented on May 14, 2024

@DavidKnott https://github.com/EthereumCommonwealth/viperid

from vyper.

axic avatar axic commented on May 14, 2024

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

from vyper.

fubuloubu avatar fubuloubu commented on May 14, 2024

@DavidKnott we can probably close this

Also see #529 @axic

from vyper.

fulldecent avatar fulldecent commented on May 14, 2024

Compiler is here https://vyper.online/

IDE is probably out of scope for this project

from vyper.

jacqueswww avatar jacqueswww commented on May 14, 2024

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

from vyper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.