Giter Site home page Giter Site logo

pluto's Introduction


P L U T O N O M I C O N

Hercules-ci Cachix Cache

Introduction

The Plutonomicon is a developer-driven guide to the Plutus smart contract language in practice.

Since this ecosystem is moving at a breakneck speed, we ask that ANY information posted that is not confirmed to work on chain be labelled as 🔧 work in progress.

Available resources

We currently provide the following resources, broadly organized by topic.

Fundamentals and explanations

Design patterns

Testing and optimization

Script Optimization Techniques:

Plutus Vulnerabilities:

Discussion

To discuss the projects and the content under the Plutonomicon umbrella, join our Discord: https://discord.gg/722KnTC8jF

Running the website

If you'd like to run a live version of the website locally:

nix run

As you edit1 and save the Markdown files, the browser view should update instantly without requiring a manual refresh. Run nix build to build the statically generated website. See Emanote guide for further information.

Please note the Markdown writing conventions:

  • There must be zero or one level 1 heading (# A heading) as the first line.
    • If a level 1 heading is not specified, title will be derived from the filename.
  • All other headings must be level 2 or greater.

Footnotes

  1. Try Obsidian or VSCode with vscode-memo for editing.

pluto's People

Contributors

darthpjb avatar geometer1729 avatar matthewcroughan avatar morganthomas avatar nixinator avatar srid avatar totallynotchase avatar ursi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pluto's Issues

More examples please

A side-by-side example of Plutus output and an equivalent hand-written Pluto expression could go a long way to justify the project.

Grammer for `Map` and `List` is incorrect

The syntax grammer notes-

Data ::= "data" ( Sigma | List | Map | Integer | ByteString )

List ::= "[" Data* "]"

Map ::= "{" ( Data "=" Data )* "}"

Which suggests that { data 1 = data 5 } would be a valid Map, and [ data 1 ] would be a valid List. However, the parser doesn't actually expect the data keyword, it just expects the data literal.

If the parse behavior is intentional, then the grammer needs to be updated. If the grammer is correct, then the parse behavior should be updated.

`FromUPLC` (and preferably `ToPluto`) instance for `BuiltinData`

Returning BuiltinData (or Data) from a pluto program (built using pluto's data syntax) is probably the most common usecase for pluto functions. Hence, I think there should be a FromUPLC instance for BuiltinData. Or is there some other way to implement this use case?

Pluto typechecker (opinion)

Hi,

Thank you for creating/working on/sharing Pluto.

What are your thoughts on integrating a System F type-checker with the current Pluto implementation?(of course, with type erasure) Do you consider it a feasible/good idea?

Implement generator for prime fields

A function that takes in a prime number p and outputs the field operations on the finite field of order p. To clarify, we want an implementation in pluto, not as a builtin or anything.

Add a disassembler from UPLC to Pluto

The main benefit for an end-user would be the ability to run it on a Plutus output and then hand-optimize the resulting Pluto expression.

Also, it would open more avenues for testing: round-tripping a bunch of UPLC inputs through disassembler and parser/assembler should yield the original.

if...then doesn't work

if True then 1 else 0
pluto run ...

Error(eval): EvaluationException "An error has occurred:  error:\nA builtin received a term argument when something else was expected\nCaused by: (ifThenElse True)" "UnexpectedBuiltinTermArgumentMachineError"

"pluto/nixpkgs follows a non-existent input 'haskellNix/nixpkgs-unstable'" error upon adding pluto as flake input

For this basic flake file, just to add the pluto binary to the shell-

{
  description = "A very basic flake";

  inputs.pluto =  {
    type = "github";
    owner = "Plutonomicon";
    repo = "pluto";
    rev = "339c05396190ba09ad3ec4a3efd609ed1c4c21e0";
  };

  outputs = { self, nixpkgs, pluto }:
    let
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
    in {

      packages.x86_64-linux.hello = pkgs.hello;

      defaultPackage.x86_64-linux = self.packages.x86_64-linux.hello;

      devShell.x86_64-linux =
        pkgs.mkShell { buildInputs = [ self.packages.x86_64-linux.hello pluto.defaultPackage.x86_64-linux ]; };
    };
}

I get the error-

error: input 'pluto/nixpkgs' follows a non-existent input 'haskellNix/nixpkgs-unstable'

       … while updating the lock file of flake 'path:/...'

Interestingly, the error goes away if I'm not specifying the commit-

{
  description = "A very basic flake";

  inputs.pluto =  {
    type = "github";
    owner = "Plutonomicon";
    repo = "pluto";
  };

  outputs = { self, nixpkgs, pluto }:
    let
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
    in {

      packages.x86_64-linux.hello = pkgs.hello;

      defaultPackage.x86_64-linux = self.packages.x86_64-linux.hello;

      devShell.x86_64-linux =
        pkgs.mkShell { buildInputs = [ self.packages.x86_64-linux.hello pluto.defaultPackage.x86_64-linux ]; };
    };
}

This works fine.

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.