by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Just some guy
    @fubuloubu
    @anhdungle93 ETH 2.0 is likely 2+ years away from having support for smart contracts, it's not something we currently support but will make plans to do so as it gets closer
    conta16
    @conta16
    Thank you for the reply! One more thing: do you have something online that does this static analysis? I would like to get a better understanding on the matter.
    Just some guy
    @fubuloubu
    @conta16 The compiler itself does it when it produces the gas cost estimates, it's not a separate tool
    it's not a terribly complicated algorithm, most of the gas costs are pretty well-defined already, we only leverage the maximum sizing on variable-length data operations
    Usually it overshoots a large amount, and it's often better to dynamically estimate costs to reduce the gas limit you'd set in a transaction, but it does lead to more predictable transaction costs and helps reduce a class of vulnerabilities using gas cost exploits
    Benjamin Cordes
    @benjyz
    question: does typing.py over ride standard python typing or how does it work. get an error here
    "ImportError: cannot import name 'Dict' from 'typing'"
    Just some guy
    @fubuloubu
    I don't believe so, you just have to fully qualify it I think, from vyper.typing import ... or from .typing import ...
    John D Allen
    @johnda98
    hi guys.. long time solidity guy here.. having probs with the make in the virtual env
    install: missing destination file operand after '.'
    doing a make in the vyper directory. all other instructions to install ok except its python3 for the virtualenv -p python3 --no-site-packages ~/vyper-venv NOT python3.6
    stuck on this bit make
    make dev-deps
    make test
    johnda@ymirjda:~/vyper-venv/vyper$ make
    install .
    install: missing destination file operand after '.'
    Try 'install --help' for more information.
    Makefile:12: recipe for target 'init' failed
    make: * [init] Error 1
    .
    thanks :-)
    arjuna sky kok
    @arjunaskykok_gitlab
    @johnda98 Have you activated the virtual environment?
    Here's what I do:
    $ python3 -m venv .venv
    $ source .venv/bin/activate
    $ make
    /MyDirectory/.venv/bin/pip install .
    Processing /MyDirectory/vyper
    Collection.... so on
    I'm already inside vyper directory.
    Anyway I created a first pull request to Vyper. vyperlang/vyper#1992
    I added a test case for validate_version_pragma. Anyway, I noticed that pragma in Vyper does not support more complex cases like ^, >=, etc. Pragma in Solidity supports those cases. Should we add semver capability in pragma checking in Vyper?
    arjuna sky kok
    @arjunaskykok_gitlab
    I am also thorn that the pragma checking is done in comment not using special keyword. But I don't want to make a fuss about it.
    On top of that, why do we install Vyper in "make" step? I think it's better to put the installation step in "make install" step. I used to contribute to Python (CPython) project. It's easier if we have the Python binary in the project root directory after the compilation ("make" step). But in Vyper case, the "vyper" binary is installed already. I have to put "import pdb; pdb.set_trace()" in files inside virtual environment (.venv/lib/python3.7/site-packages/vyper) to debug when I run "vyper" cli application. In a nutshell, I would like to run "./vyper" inside vyper project directory after "make" step. What do you think?
    Just some guy
    @fubuloubu

    Should we add semver capability in pragma checking in Vyper?

    Sure!

    I am also thorn that the pragma checking is done in comment not using special keyword.

    Yeah, I want to move it to the module-level natspec

    having it in the comment is gross
    John D Allen
    @johnda98

    @johnda98 Have you activated the virtual environment?
    Here's what I do:
    $ python3 -m venv .venv
    $ source .venv/bin/activate
    $ make
    /MyDirectory/.venv/bin/pip install .
    Processing /MyDirectory/vyper
    Collection.... so on

    yep.. see my post.. i'm in it johnda@ymirjda:~/vyper-venv/vyper$

    Just some guy
    @fubuloubu
    @arjunaskykok_gitlab @johnda98 also check out pyenv: https://github.com/pyenv/pyenv
    very useful tool for managing virtual envs and multiple python versions
    John D Allen
    @johnda98
    most humans on planet are following the popular instructions and clearly they are not clear
    git clone https://github.com/vyperlang/vyper.git
    cd vyper
    make
    make dev-deps
    make test
    doesnt cook

    @arjunaskykok_gitlab @johnda98 also check out pyenv: https://github.com/pyenv/pyenv

    thanks Bryant.. will do

    I just changed to johnda@ymirjda:~/vyper-venv/vyper$ directory... oh so i have to activate the environment

    johnda@ymirjda:~/vyper-venv/vyper$ python3 -m venv .venv
    The virtual environment was not created successfully because ensurepip is not
    available. On Debian/Ubuntu systems, you need to install the python3-venv
    package using the following command.

    apt-get install python3-venv

    You may need to use sudo with that command. After installing the python3-venv
    package, recreate your virtual environment.

    Failing command: ['/home/johnda/vyper-venv/vyper/.venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

    Just some guy
    @fubuloubu
    yeah, this is why we are trying to create a binary setup that's much easier to use for people who aren't pythonistas
    as an alternative currently, we have Docker images
    John D Allen
    @johnda98
    " apt-get install python3-venv
    " is not in https://vyper.readthedocs.io/en/latest/installing-vyper.html
    i'll pull that package in
    John D Allen
    @johnda98
    "virtualenv -p python3.6 --no-site-packages ~/vyper-venv
    in the docs .. i have 3.6 installed and I have to enter python3 NOT python3.6 to get the end to create
    Cool !@!@@@@@@!!! now I'm in "(vyper-venv) johnda@ymirjda:~/Python-3.6.2$
    "
    John D Allen
    @johnda98
    (vyper-venv) johnda@ymirjda:~/Python-3.6.2/vyper$ make
    /home/johnda/vyper-venv/bin/pip install .
    Processing /home/johnda/Python-3.6.2/vyper
    ERROR: Package 'vyper' requires a different Python: 3.5.2 not in '>=3.6'
    Makefile:12: recipe for target 'init' failed
    bonkers
    Just some guy
    @fubuloubu
    if you're using 16.04 that might be part of your problem, that's a very old version of ubuntu
    John D Allen
    @johnda98
    then why have Docs that pertain it it ? it is confusing the planets non-techs

    Installing Python 3.6
    Vyper can only be built using Python 3.6 and higher. If you are already running Python 3.6, skip to the next section, else follow the instructions here to make sure you have the correct Python version installed, and are using that version.

    Ubuntu
    16.04 and older

    sudo apt-get install build-essential libssl-dev libffi-dev
    wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
    tar xfz Python-3.6.2.tgz
    cd Python-3.6.2/
    ./configure --prefix /usr/local/lib/python3.6
    sudo make
    sudo make install
    that all worked fine
    arjuna sky kok
    @arjunaskykok_gitlab
    @johnda98 So you installed Python3.6 from Python.org already? Can you create virtual environment using this command:
    $ python3.6 -m venv your_virtual_env
    $ source your_virtual_env/bin/activate
    $ cd vyper
    $ make
    Notice I used python3.6 not python3. I'm afraid python3 refers to python3.5.
    arjuna sky kok
    @arjunaskykok_gitlab
    @johnda98 "i have 3.6 installed and I have to enter python3 NOT python3.6 to get the end to create" -> why did you have to enter python3 not python3.6?
    The step in Vyper installation, "sudo make", is not really recommended. We shouldn't use sudo to do "make" step.
    Benjamin Cordes
    @benjyz
    @arjunaskykok_gitlab thanks put this in a gist