-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More examples please #5
Comments
For the record, you can get the UPLC for For following pluto program, -- Hello world
let
defaultGreeting = "Hello";
greet = (\greeting name ->
(greeting +s ", ") +s name
)
in
greet defaultGreeting "world" translates to UPLC: Program
()
(Version () 1 0 0)
(Apply
()
(LamAbs
()
(DeBruijn {dbnIndex = 0})
(Apply
()
(LamAbs
()
(DeBruijn {dbnIndex = 0})
(Apply
()
(Apply
()
(Var () (DeBruijn {dbnIndex = 2}))
(Var () (DeBruijn {dbnIndex = 1})))
(Constant () (Some (ValueOf string "world")))))
(Constant () (Some (ValueOf string "Hello")))))
(LamAbs
()
(DeBruijn {dbnIndex = 0})
(LamAbs
()
(DeBruijn {dbnIndex = 0})
(Apply
()
(Apply
()
(Builtin () AppendString)
(Apply
()
(Apply
()
(Builtin () AppendString)
(Var () (DeBruijn {dbnIndex = 2})))
(Constant () (Some (ValueOf string ", ")))))
(Var () (DeBruijn {dbnIndex = 1})))))) |
The benefit of this comparison is the whole justification for the project, so you want to put it up front. Sure anybody with a Plutus repo clone can get the same output but it takes some effort to produce it and visually compare to the hand-written Pluto expression. Speaking of which, do you plan to write a disassembler? |
Never mind the last question, I opened issue #4 about that. |
A side-by-side example of Plutus output and an equivalent hand-written Pluto expression could go a long way to justify the project.
The text was updated successfully, but these errors were encountered: