Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 02 15:27
    unparalleled-js opened #3269
  • Feb 02 13:44
    tserg ready_for_review #3268
  • Feb 02 13:04
    codecov-commenter commented #3268
  • Feb 02 13:03
    codecov-commenter commented #3268
  • Feb 02 13:03
    codecov-commenter commented #3268
  • Feb 02 13:03
    codecov-commenter commented #3268
  • Feb 02 13:02
    codecov-commenter commented #3268
  • Feb 02 13:01
    codecov-commenter commented #3268
  • Feb 02 13:00
    codecov-commenter commented #3268
  • Feb 02 13:00
    codecov-commenter commented #3268
  • Feb 02 12:32
    tserg opened #3268
  • Feb 02 00:55
    tserg ready_for_review #3266
  • Feb 01 21:01
    codecov-commenter commented #3257
  • Feb 01 20:55
    codecov-commenter commented #3257
  • Feb 01 20:53
    codecov-commenter commented #3257
  • Feb 01 20:52
    codecov-commenter commented #3257
  • Feb 01 20:52
    codecov-commenter commented #3257
  • Feb 01 20:51
    codecov-commenter commented #3257
  • Feb 01 20:50
    codecov-commenter commented #3257
  • Feb 01 20:50
    codecov-commenter commented #3257
Matthew Slipper
@mslipper
The cool thing about this is that now changes to the language can stem from changes to the grammar. I noticed, for example, that the current Viper parser finds globals by looking for AnnAssign nodes, which I believe Python uses internally to represent type definitions. If you modify the grammar, you can make contract globals a first-class AST node.
Obviously I know that moving to a custom parser is a big deal. The objective of my repo isn't to sway you one way or another, but to provide a reasonable example of what can be done using a parser generator so that you can make the right decision :).
El De-dog-lo
@fubuloubu
No, that's awesome and can help moderate that decision. Thanks for the test!
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
[David Knott] @mslipper Thanks a lot, I’m excited to play around with what you’ve built!
Lachlan Ford
@fordacious
curious to work on viper. What needs to be done? Should I just check open issues?
Lachlan Ford
@fordacious
also where would you suggest getting started?
Matthew Slipper
@mslipper
Glad to hear it @DavidKnott ! If you have any particularly hairy use cases you'd like me to add to the POC, let me know.
El De-dog-lo
@fubuloubu
@fordacious you can definitely start by reviewing and improving our documentation!
Lachlan Ford
@fordacious
@fubuloubu can you give me a quick rundown of what extract32 does / is? :P
Lachlan Ford
@fordacious
Also is there a end state for what viper will end up looking like?
DavidKnott
@DavidKnott
@fordacious extract32 takes a byte array (declared with bytes <= maxlen) and returns type bytes32. The inputs are:
  1. byte array
  2. start point
  3. output type which defaults to bytes32 but can be num128 or address
Lachlan Ford
@fordacious
@DavidKnott thanks!
DavidKnott
@DavidKnott
@fordacious A review on this docs PR would be super helpful ethereum/viper#604.
It begins to document viper's built-in functions
Lachlan Ford
@fordacious
@DavidKnott looking now
Lachlan Ford
@fordacious
@DavidKnott did my darndest
Meai
@Meai
I just downloaded geth and started my own local node, can I actually use viper to make smart contracts and then deploy it to the real mainnet? Or is this some kind of "future-maybe" language that will be deployed in a later version of ethereum?
I would rather use python and all the intellisense that comes with it than to use this custom solidity language
El De-dog-lo
@fubuloubu
If you're doing it just for fun, there is definitely a way to do it using web3.py by getting the ABI/Bytecode from Viper and supplying it to a Contract to deploy. I think Populus may have integrated this functionality already.
Would not recommend for production use
Also would recommend you use the rinkeby/ropsten testnets if you're just "fooling around" since Eth is free from the faucets for those networks
I would describe Viper as "future alternative? - " lol
definitely
Sorry "future alternative - definitely"
Meai
@Meai
Anything specific that's problematic with viper, why is it still classified as alpha?
El De-dog-lo
@fubuloubu
I don't think there are any specific issues besides the lack of a security audit and beta testing preventing us from endorsing it's wider use. I think as the language is still in flux we are a bit away from that currently. Casper is being written partially in Viper though, so that will probably be a very good beta lol
Lachlan Ford
@fordacious
@fubuloubu curious what parts of casper are planned to be implemented in viper
El De-dog-lo
@fubuloubu
No idea, you'd have to ask @vbuterin lol
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
[Vitalik Buterin] the casper contract
[Vitalik Buterin] which processes deposits, withdrawals, votes, slashing, etc
[Vitalik Buterin] basically all of the on-chain stuff
Lachlan Ford
@fordacious
@vbuterin thanks
El De-dog-lo
@fubuloubu
That sort of brings up a good point, Viper itself is unaudited security-wise (I believe), but I am sure you have done very extensive testing for Casper. Does that create any kind of roadblock to Casper, the fact that we haven't fully rolled out a beta or done an audit yet?
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
[Vitalik Buterin] IMO this is one of the reasons why we should feature-freeze viper ASAP and just focus on hardening for a while
El De-dog-lo
@fubuloubu
Yeah, I would tend to agree if it is being used for such mission critical code.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
[Vitalik Buterin] the simple fact that casper can be written in viper already implies that it was >90% close to feature complete when that happened
El De-dog-lo
@fubuloubu
I've been talking with David a bit about an alternative method of architecting the parser, in order to make it new features easier and cleaner to implement
Totally, agree. Perhaps a sign that we should push to a beta
I dubbed it the Lego™ blocks method lol
El De-dog-lo
@fubuloubu
On top of simplifying compiler code, it could also enable extensions that are clearer and more user friendly e.g. constructing new types that represent common patterns that are typically used in contracts
We can discuss the idea next week if you are interested in it for the next phase of Viper, which comes after this feature freeze for release of Casper. Gives us some time for this re-architecting if we all agree it's a good plan.
Dishendra
@Dishendramishra
hi all, So why we have changed name to vyper from viper? searching vyper on google show this link at first index https://vyper.io/
El De-dog-lo
@fubuloubu
d'oh! we never checked website urls!
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
[Vitalik Buterin] at least that has nothing to do with programming langs
El De-dog-lo
@fubuloubu
we were asked to change our name because of a conflict with another swiss-based institution that had a programming language called Viper with a few years of pedigree
Holger Drewes
@holgerd77
Also think this should be hopefully ok
Dishendra
@Dishendramishra
bank: public({
    account_balance: num,
    person: bytes32
    }[num])

@public
@payable
def transfer(sender_accno: num, reciever_accno: num, amount: num):
    if self.bank[sender_accno].account_balance >= amount:
               pass

throwing error "AttributeError: 'Name' object has no attribute 'value'
" at this line

if self.bank[sender_accno].account_balance >= amount:

account_balance and amount are both of same type 'num' and it does support >= comparison operator. So, what's wrong with that?

DavidKnott
@DavidKnott
@Dishendramishra I just ran the code you posted and it worked for me. Can you please make an issue specifying the file / line number of the error and how you installed Vyper so we can dig into your issue further?
Neil Henegan
@neilh
I'd like to use vyper in a production app, is there an ETA on a stable version?
Charles Cooper
@charles-cooper
hello! what is the best way for newcomers to contribute?