Comments (15)
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.
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.
@Dexaran is there a reason you prefer an online IDE vs. extending an existing native one?
from vyper.
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.
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.
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.
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:
- Setting up an API service that accepts viper code as input and gives EVM bytecode as output
- 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.
@Dexaran How's this coming, is it still in the works?
from vyper.
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.
@Dexaran I have some friends who might be interested in creating a frontend, is the compiler api published yet?
from vyper.
@DavidKnott https://github.com/EthereumCommonwealth/viperid
from vyper.
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.
@DavidKnott we can probably close this
from vyper.
Compiler is here https://vyper.online/
IDE is probably out of scope for this project
from vyper.
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)
- multiple eval of `sqrt()` argument
- double eval of the slice start/length args
- incorrect topic logging in raw_log for non-literal expressions
- double eval of raw_args in create_from_blueprint HOT 1
- Disallow `optimize` and `evm-version` `pragma`'s in `.vyi` files
- meta: venom IR roadmap HOT 1
- HashMap index checks when the subscript is folded
- Compilation errors due to not folded convert value
- CompilerPanic for concat on empty(Bytes)
- CodegenPanic for slice on empty(Bytes)
- Mistyped Loop Iterable
- Overriding Storage Allocator Does Not Handle Stateful Modules
- Ambiguous Imports
- Constants Cannot Be Imported From .vyi Files
- External Call Kwargs Allowed for Call to __init__
- Imprecise Duplicate Import Check
- Incorrect error messages during compilation
- overriding allocator does not set global lock position causing crash in codegen HOT 2
- meta: tracker for overriding storage allocator bugs HOT 2
- compiler panic on indexing empty literal arrays
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vyper.