1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-12 14:28:08 +03:00
Juvix empowers developers to write code in a high-level, functional language, compile it to gas-efficient output VM instructions, and formally verify the safety of their contracts prior to deployment and execution.
Go to file
Jan Mas Rovira f4aa70b13d
Finish the new pretty printing algorithm and delete the old one (#2151)
- Closes #2128 
- Closes #2161 

This pr fully implements the monadic pretty printer based on
`ExactPrint`, which respects comments. Until now, comments inside
expressions were printed after the current statement. Now they are
printed in the correct place, except when a comment occurs before
something that we don't store its location. E.g. parentheses,
semicolons, braces, colons, etc. I proposed that we irone out this issue
in a separate pr.

Since the old non-monadic algorithm is no longer necessary, I removed
it.
2023-06-02 13:02:35 +02:00
.devcontainer Bump to LTS Haskell 20.21 (ghc-9.2.7) (#2093) 2023-05-15 12:06:18 +02:00
.github Add gnu-sed to the macOS build in the CI (#2123) 2023-05-24 13:32:08 +01:00
app Finish the new pretty printing algorithm and delete the old one (#2151) 2023-06-02 13:02:35 +02:00
assets Refactor html command with extra options (#1725) 2023-01-17 18:11:59 +01:00
bench Add Juvix to all benchmarks (#1974) 2023-04-04 13:20:38 +02:00
docker Bump to LTS Haskell 20.21 (ghc-9.2.7) (#2093) 2023-05-15 12:06:18 +02:00
examples Add main field to juvix.yaml (#2120) 2023-05-24 15:42:20 +02:00
gnuplot Automatized benchmarks (#1673) 2023-01-05 17:48:26 +01:00
juvix-stdlib@e94ea21027 Update standard library for better readability, efficiency and iterator use (#2153) 2023-06-01 18:21:03 +02:00
licenses Add Haddock and Agda licenses (#1506) 2022-09-06 09:30:01 +01:00
runtime Fix spurious messages from Makefile.generic (#2125) 2023-05-24 12:50:02 +02:00
src/Juvix Finish the new pretty printing algorithm and delete the old one (#2151) 2023-06-02 13:02:35 +02:00
test Finish the new pretty printing algorithm and delete the old one (#2151) 2023-06-02 13:02:35 +02:00
tests Finish the new pretty printing algorithm and delete the old one (#2151) 2023-06-02 13:02:35 +02:00
theme Add syntax highlighting for juvix code blocks in docs (#1971) 2023-04-05 11:24:19 +02:00
.clang-format Juvix C runtime (#1580) 2022-11-03 09:38:09 +01:00
.github_changelog_generator Update Changelog v0.2.3 🎉 2022-08-15 12:24:42 +02:00
.gitignore Fix: broken links of Example programs (#2003) 2023-04-14 11:16:05 +02:00
.gitmodules Rename MiniJuvix to Juvix (#259) 2022-07-08 13:59:45 +02:00
.hlint.yaml Add new README and md files (#1904) 2023-03-21 20:01:48 +01:00
.pre-commit-config.yaml Fix: format juvix files in test/positive (#1978) 2023-04-12 10:07:01 +02:00
book.toml Add syntax highlighting for juvix code blocks in docs (#1971) 2023-04-05 11:24:19 +02:00
cabal.hie.yaml Automatized benchmarks (#1673) 2023-01-05 17:48:26 +01:00
cabal.project Add extra git dependencies to cabal.project (#2158) 2023-06-01 13:32:34 +01:00
CHANGELOG.md Bump version to v0.3.4 🎉 2023-05-22 18:51:42 +02:00
cntlines.sh Direct translation from normalized JuvixCore to VampIR (#2086) 2023-05-19 14:43:45 +02:00
CONTRIBUTING.md Fix baseUrl for juvix docs in Doctor command (#2122) 2023-05-24 12:14:30 +02:00
LICENSE.md Add new README and md files (#1904) 2023-03-21 20:01:48 +01:00
Makefile Fix Makefile target bugs for formatting and type Checking Juvix files (#2057) 2023-05-19 17:33:56 +02:00
package.yaml Show unicode characters without escaping (#2127) 2023-05-24 21:35:07 +02:00
README.md Minor change in README.md 2023-04-19 15:59:47 +02:00
stack.hie.yaml Refactor hie.yaml and add entry in the readme (#1672) 2022-12-20 16:45:48 +01:00
stack.yaml Add :def command to the repl (#2119) 2023-05-30 10:19:09 +02:00

Juvix

Tara the Juvix mascot

CI Status

The Juvix compiler CI

Nightly build, release and benchmark

Codebase
Open the Juvix Standard Lib in Github Codespace

Juvix is an open-source, constantly evolving functional programming language designed for writing privacy-preserving decentralized applications. Using Juvix, developers can write high-level programs which can be compiled to WASM directly, or through VampIR to circuits for private execution with Taiga on Anoma or Ethereum.

Getting Started

To get started with Juvix, head over to the documentation website to learn more about the language and its features. You can also find installation instructions and tutorials to help you get started with writing Juvix programs. You can download the latest release from the Juvix GitHub repository or use the web-based development environment, Juvix Github Codespace, which provides a pre-configured workspace ready to use with Juvix and the Haskell toolchain installed.

Language features

Juvix is designed with a focus on safety. The Juvix compiler runs several static analyses which guarantee the absence of runtime errors. Analyses performed include termination and type checking. As a result, functional programs, especially validity predicates, can be written with greater confidence in their correctness.

Some language features in Juvix include:

  • Haskell/Agda-like syntax with support for Unicode
  • Type inference
  • Parametric polymorphism
  • User defined inductive data types
  • Higher-order functions
  • Referential transparency

The Juvix module system allows developers to break down their programs into smaller, reusable modules that can be compiled separately and combined to create larger programs. These modules can be used to build libraries, which can then be documented using Juvix's built-in documentation generation tool, see for example, the Juvix standard library's website. For further details, please refer to the Juvix book which includes our latest updates.

If you're interested in Juvix, you may also want to explore the following related projects:

Project Description
GEB Intermediate language for writing compilers and one of the Juvix backends.
VampIR Proof-system-agnostic language for writing arithmetic circuits and one of the GEB backends.
Taiga A framework for generalized shielded state transitions.

Resources

Here is a summary of resources to help you learn more about Juvix:

Documentation

Resource Description
Official website The official website of Juvix, where you can find documentation, changelog, tutorials, and community resources.
GitHub repository The official GitHub repository of Juvix, where you can find the source code and contribute to the project.

Community

Resource Description
Discord community The Juvix community on Discord is a space where you can connect with the developers behind Juvix and other members of the community who are passionate about privacy-preserving decentralized applications. It's a place where you can ask for help with using Juvix, discuss the latest features and updates, and get involved in the project.
Twitter The official Twitter account of Juvix, where you can stay up-to-date with the latest news and announcements.

Libraries

Resource Description
Standard library The Juvix standard library is a collection of pre-written functions and modules that come bundled with the Juvix programming language. It provides developers with a set of common and useful tools that they can use to build their Juvix programs without having to write everything from scratch.

IDE support

Resource Description
VSCode extension Support for the Juvix programming language with features such as syntax highlighting, error checking and many more directly in the VSCode editor.
Emacs Juvix mode A major mode for Emacs that provides support for writing Juvix programs.

Development environments

Resource Description
Juvix Standard Lib Codespace A web-based development environment for the Juvix standard library on GitHub. It provides a pre-configured workspace with the Juvix standard library installed and ready to use, so you can start using the library in your projects. Some examples of Juvix programs are also loaded in this environment.
Juvix Github Codespace This codespace provides a pre-configured workspace with Juvix and the Haskell toolchain installed. Everything is ready to use, so you can start developing/inspecting the Juvix compiler right away.

Installation

Resource Description
Homebrew Juvix formula A formula for Homebrew, a package manager for macOS and Linux, that allows you to easily install Juvix on your system.
Juvix Nightly builds Users can download and use these nightly builds to experiment with the latest changes to the Juvix Compiler. Nightly builds may contain new features, bug fixes, and other improvements to Juvix that are still in development and have not yet been released in an official version.

Contributing

If you're interested in contributing to Juvix, please see the contributing guidelines for more information. We welcome contributions of all kinds, from bug reports and feature requests to code contributions and documentation improvements.

License

Juvix is open-source software released under the GNU General Public License v3.0. See the LICENSE file for more information.