-
Notifications
You must be signed in to change notification settings - Fork 381
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
refactor README and installation instructions #2669
Changes from all commits
c4b3069
4d0410a
b26bd7d
6a6ad98
e048896
3f1784a
e66b79f
6abffe2
4c5bfbc
0795d9c
54eec37
9b4c4d8
978f956
92d36fb
1e7aee4
9608086
fec32e4
a409f11
323f1d0
d7d97d4
a088740
2520f4e
54c83cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,38 @@ | ||
Idris 2 | ||
======= | ||
# Idris 2 | ||
|
||
[![Documentation Status](https://readthedocs.org/projects/idris2/badge/?version=latest)](https://idris2.readthedocs.io/en/latest/?badge=latest) | ||
[![Build Status](https://github.com/idris-lang/Idris2/actions/workflows/ci-idris2-and-libs.yml/badge.svg?branch=main)](https://github.com/idris-lang/Idris2/actions/workflows/ci-idris2-and-libs.yml?query=branch%3Amain) | ||
|
||
[Idris 2](https://idris-lang.org/) is a purely functional programming language | ||
with first class types. | ||
|
||
For full installation instructions, see [INSTALL.md](INSTALL.md). Briefly, if | ||
you have Chez Scheme installed, with the executable name `chez`, type: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed the default "install from sources" stuff because I don't think most people will install from sources. Is that accurate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think having a tl;dr for installing from sources is bad, due to the stuff I mentioned in my other comment. |
||
For installation instructions, see [INSTALL.md](INSTALL.md). | ||
|
||
* `make bootstrap SCHEME=chez` | ||
* `make install` | ||
The [wiki](https://github.com/idris-lang/Idris2/wiki) lists a number of useful | ||
resources, in particular | ||
|
||
You may need to change `chez` to be the local name of your Chez Scheme. This | ||
is often one of `scheme`, `chezscheme` or `chezscheme9.5` (depending on the | ||
version). On a modern desktop machine, this process (including tests) | ||
should take less than 5 minutes. | ||
+ [What's changed since Idris 1](https://idris2.readthedocs.io/en/latest/updates/updates.html) | ||
+ [Resources for learning Idris](https://github.com/idris-lang/Idris2/wiki/Resources), | ||
including [official talks](https://github.com/idris-lang/Idris2/wiki/Resources#official-talks) | ||
that showcase its capabilities | ||
+ [Editor support](https://github.com/idris-lang/Idris2/wiki/Editor-Support) | ||
|
||
Idris 2 is mostly backward compatible with Idris 1, with some minor exceptions. | ||
The most notable user visible differences, which might cause Idris 1 programs | ||
to fail to type check, are: | ||
joelberkeley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Things still missing | ||
|
||
+ Unbound implicit arguments are always erased, so it is a type error to | ||
attempt to pattern match on one. | ||
+ Simplified resolution of ambiguous names, which might mean you need to | ||
explicitly disambiguate more often. As a general rule, Idris 2 will be able | ||
to disambiguate between names which have different concrete return types | ||
(such as data constructors), or which have different concrete argument | ||
types (such as record projections). It may struggle to resolve ambiguities | ||
if one name requires an interface to be resolved. | ||
+ The `cong` function now takes its congruence explicitly as its first argument. | ||
+ Minor differences in the meaning of export modifiers `private`, `export`, | ||
and `public export`, which now refer to visibility of names from other | ||
*namespaces* rather than visibility from other *files*. | ||
+ Module names must match the filename in which they are defined (unless | ||
the module's name is "Main"). | ||
+ Anything which uses a `%language` pragma in Idris 1 is likely to be different. | ||
Notably, elaborator reflection will exist, but most likely in a slightly | ||
different form because the internal details of the elaborator are different. | ||
+ The `Prelude` is much smaller (and easier to replace with an alternative). | ||
Command-line option `--no-prelude` can be used to not implicitly import `Prelude`. | ||
+ `let x = val in e` no longer computes with `x` in `e`, instead being | ||
essentially equivalent to `(\x => e) val`. This is to make the | ||
behaviour of `let` consistent in the presence of `case` and `with` (where | ||
it is hard to push the computation inside the `case`/`with` efficiently). | ||
Instead, you can define functions locally with `let`, which do have | ||
computational force, as follows: | ||
+ Cumulativity (currently `Type : Type`. Bear that in mind when you think | ||
you've proved something) | ||
+ `rewrite` doesn't yet work on dependent types | ||
|
||
let x : ? | ||
x = val in | ||
e | ||
## Contributions wanted | ||
|
||
Watch this space for more details and the rationale for the changes, as I | ||
get around to writing it... | ||
If you want to learn more about Idris, contributing to the compiler could be | ||
one way to do so. The [contribution guidelines](CONTRIBUTING.md) outline | ||
the process. Having read that, choose a [good first issue][1] or have a look at | ||
the [contributions wanted][2] for something more involved. This [map][3] should | ||
help you find your way around the source code. See [the wiki page][4] | ||
for more details. | ||
|
||
Summary of new features: | ||
|
||
+ A core language based on "Quantitative Type Theory" which allows explicit | ||
annotation of erased types, and linear types. | ||
+ `let` bindings are now more expressive, and can be used to define pattern | ||
matching functions locally. | ||
+ Names which are in scope in a type are also always in scope in the body of | ||
the corresponding definition. | ||
+ Better inference. Holes are global to a source file, rather than local to | ||
a definition, meaning that some holes can be left in function types to be | ||
inferred by the type checker. This also gives better inference for the types | ||
of `case` expressions, and means fewer annotations are needed in interface | ||
declarations. | ||
+ Better type checker implementation which minimises the need for compile | ||
time evaluation. | ||
+ New Chez Scheme based backend which both compiles and runs faster than the | ||
default Idris 1 backend. (Also, optionally, Racket and Gambit can be used | ||
as targets). | ||
+ Everything works faster :). | ||
|
||
A significant change in the implementation is that there is an intermediate | ||
language `TTImp`, which is essentially a desugared Idris, and is cleanly | ||
separated from the high level language which means it is potentially usable | ||
as a core language for other high level syntaxes. | ||
|
||
JavaScript | ||
---------- | ||
The JavaScript codegen uses the new BigInt, hence Node.js 10.4 or higher is required. | ||
|
||
Editor Plugins | ||
-------------- | ||
The [wiki lists the current plugins available for common text editors]( | ||
https://github.com/idris-lang/Idris2/wiki/Editor-Support) | ||
and their features. | ||
|
||
Things still missing | ||
-------------------- | ||
|
||
+ Cumulativity (so we currently have Type : Type! Bear that in mind when you | ||
think you've proved something :)) | ||
+ 'rewrite' doesn't yet work on dependent types | ||
|
||
Contributions wanted | ||
------------------- | ||
|
||
+ [Contribution guidelines](CONTRIBUTING.md) | ||
+ [Good first issues](https://github.com/idris-lang/Idris2/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) | ||
+ [Contributors wanted](https://github.com/idris-lang/Idris2/wiki/What-Contributions-are-Needed) | ||
|
||
If you want to learn about Idris more, contributing to the compiler could be one | ||
way to do so. Just select one good first issue and ask about it on the [Discord](https://discord.gg/UX68fDs2jc) channel. | ||
|
||
Talks | ||
----- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd move these to andre's new Resources page on the wiki, and link that here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now added to resources |
||
|
||
[![Edwin Brady Tells Us What's New in Idris 2 (Berlin Functional Programming Group)](https://img.youtube.com/vi/nbClauMCeds/0.jpg)](https://www.youtube.com/watch?v=nbClauMCeds "Edwin Brady Tells Us What's New in Idris 2 (Berlin Functional Programming Group)") | ||
|
||
[![Scheme Workshop Keynote (ACM SIGPLAN)](https://img.youtube.com/vi/h9YAOaBWuIk/0.jpg)](https://www.youtube.com/watch?v=h9YAOaBWuIk "Scheme Workshop Keynote (ACM SIGPLAN)") | ||
|
||
[![Idris 2 - Type-driven Development of Idris (Curry On - London 2019)](https://img.youtube.com/vi/DRq2NgeFcO0/0.jpg)](https://www.youtube.com/watch?v=DRq2NgeFcO0 "Idris 2 - Type-driven Development of Idris (Curry On - London 2019)") | ||
|
||
[![Idris 2: Type-driven Development of Idris (Code Mesh LDN 18)](https://img.youtube.com/vi/mOtKD7ml0NU/0.jpg)](https://www.youtube.com/watch?v=mOtKD7ml0NU "Idris 2: Type-driven Development of Idris (Code Mesh LDN 18)") | ||
Comment on lines
-112
to
-119
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep these in the file, they're useful introductions and showcases for what Idris2 is and can do. We should probably add the SPLV'20 playlist to the mix (https://www.youtube.com/watch?v=2pa3oRFNO8E&list=PLmYPUe8PWHKqBRJfwBr4qga7WIs7r60Ql) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. I do think they should appear differently. I feel we could communicate what's in each video much more effectively. The thumbnails are visually very busy and low-res even when they do show the content Regarding useful introductions, should we also mention the official tutorials etc for those who prefer to read than listen? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here's how I presented them in the Resources wiki. It's another possibility https://github.com/idris-lang/Idris2/wiki/2-%5BCommunity%5D-Resources#learning |
||
[1]: <https://github.com/idris-lang/Idris2/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22> | ||
[2]: <https://github.com/idris-lang/Idris2/wiki/What-Contributions-are-Needed> | ||
[3]: <https://github.com/idris-lang/Idris2/wiki/Map-of-the-Source-Code> | ||
[4]: <https://github.com/idris-lang/Idris2/wiki/Getting-Started-with-Compiler-Development> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ output an HTML file will also generate a basic HTML document with the | |
generated code inside a ``<script>`` tag; the other distinction is on the ffi | ||
that will be explained below. | ||
|
||
**Note**: The JavaScript codegen uses the new BigInt, hence Node.js 10.4 or higher is required. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved here since @dunhamsteve mentioned
and SlayerOfTheBad mentioned
|
||
|
||
Javascript FFI Specifiers | ||
========================= | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that once you are making installation instructions more accessible, then maybe, installation through
pack
should be mentioned here also. This is for now a very good alternative for installation, especially if one wants to just use the latest Idris, especially with lots of ready libraries.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you! But I'm afraid adding "Make sure that $HOME/.pack/bin is on your PATH and takes precedence over the bin folder(s) (if any) where existing versions of Idris2 are already installed" from this
INSTALL.md
is also important, or else this text could be understood as "runbash -c ...
andidris2
command becomes usable", where settingPATH
is important too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pack instructions have become more detailed, so I've just decided to link to them instead