-
Notifications
You must be signed in to change notification settings - Fork 14
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
Readme contribution #66
Closed
Closed
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
e3c0d63
regular polygons
joanita-51 e0dea2a
The square polygon
joanita-51 1c2044a
The pentagon polygon
joanita-51 49f3dd5
The hexagon polygon
joanita-51 d123473
pentagon points
joanita-51 daa9ed7
Adding points
joanita-51 7339e3b
adding points
joanita-51 cd85dd5
same file
joanita-51 8002e25
adding the programs
joanita-51 e4b3f3f
Merge remote-tracking branch 'origin/main' into regular-polygons
joanita-51 a46703a
Format the source code
joanita-51 a1cce27
non-exhaustive pattern
joanita-51 a76b19d
resolving merge conflicts
joanita-51 95abe11
Automatic formatting
joanita-51 042d8eb
Adding the rotate transformation for lines
joanita-51 d216a03
resolving merge conflicts
joanita-51 d87930e
Added information to the readMe file
joanita-51 77eb225
Adding the table of contents to the file
joanita-51 a3a987b
Editing the title
joanita-51 351b160
Update README.md
joanita-51 c4902ea
Removing some shapes
joanita-51 e941317
short description
joanita-51 b443e81
Merge branch 'Sudha247:main' into readme-contribution
joanita-51 3a0975c
Create a dedicated CONTRIBUTING.md file for contribution and installa…
joanita-51 d74fdb4
Merge remote-tracking branch 'origin/main' into readme-contribution
joanita-51 297180c
Merge remote-tracking branch 'origin/readme-contribution' into readme…
joanita-51 7986211
modifying the readme
joanita-51 73c5e62
modifying the readme
joanita-51 c6d77de
resolved a merge conflict
joanita-51 f781c84
Add 'Getting Help' section to the documentation
joanita-51 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,134 @@ | ||
# Joy in OCaml | ||
|
||
More information coming soon. | ||
## Table of Contents | ||
- [Project Overview](#project-overview) | ||
- [Project Benefits](#project-benefits) | ||
- [Installation](#installation) | ||
- [Getting Help](#getting-help) | ||
- [Other wonderful Shapes](#other-wonderful-shapes) | ||
- [Contribution](#contribution) | ||
- [Acknowlegments](#acknowlegments) | ||
|
||
## Project Overview | ||
This library is like a toolbox for creating cool shapes and patterns using OCaml. It takes inspiration from [joy](https://github.com/fossunited/joy). Whether you're an artist or a coder, you can use it to make interesting art with code. | ||
|
||
## Project Benefits | ||
|
||
Here's how this project can make your life easier and more creative: | ||
|
||
1. **Get Creative with Geometry:** This project simplifies geometric creative coding in OCaml, helping you explore the exciting world where programming meets art. | ||
|
||
2. **User-Friendly Tools:** We provide an easy-to-use API, so whether you're a newbie or a pro, you can dive into creative coding without confusion. | ||
|
||
3. **Basic Shapes at Your Fingertips:** Use simple shapes as your creative building blocks, making it a breeze to start your artistic coding journey. | ||
|
||
4. **Mix and Match with Ease:** Combine, transform, and build complex shapes effortlessly. | ||
|
||
|
||
## Installation | ||
|
||
Follow these simple steps to begin working with ocaml-joy : | ||
|
||
### 1. Install OCaml | ||
|
||
Start by installing OCaml by following the official installation tutorial at [https://ocaml.org/docs/installing-ocaml](https://ocaml.org/docs/installing-ocaml). | ||
|
||
### 2. Install Opam | ||
|
||
After successfully installing OCaml, proceed to install Opam, the OCaml package manager. It provides a convenient way to install, manage, and share OCaml libraries and tools. | ||
|
||
For Windows, Opam can be installed on Windows using Windows Subsystem for Linux (WSL) or other virtualization methods, as OCaml development is primarily done on Unix-like systems. You can set up WSL and then follow the Linux installation instructions. | ||
|
||
For Linux, If you're using Debian or Ubuntu, you can install Opam via the system package manager. Open a terminal and run the following commands: | ||
|
||
`sudo apt update | ||
sudo apt install opam | ||
` | ||
|
||
### 3. Update Opam | ||
Once Opam is installed, make sure to update and upgrade it to the latest version of packages by running the following commands: | ||
|
||
`opam update && opam upgrade` | ||
|
||
### 4. Install dune | ||
Dune is a build system we are using for our OCaml project. It is to help us to simplify and automate the build process. Run the following command for it to be installed. | ||
|
||
`opam install dune` | ||
|
||
### 5. Installing Graphics Library: | ||
To install the necessary Graphics library, execute the following command inside the directory where your OCaml code is located: | ||
|
||
`opam install graphics` | ||
|
||
The Graphics library is a simple graphics module in OCaml that provides functions for creating graphical windows, drawing shapes, and handling user input events. | ||
|
||
### 6. Building and Running Examples: | ||
To build and execute examples, navigate to the directory where your OCaml code is located (e.g., ocaml-joy) | ||
|
||
`cd ocaml-joy # Change to your project directory` | ||
|
||
Then, build the examples using Dune | ||
|
||
`dune build examples/` | ||
|
||
Run your preferred file for example to display the file in the examples directory named circle.ml we use the command | ||
|
||
`dune exec -- examples/circle.exe` | ||
|
||
To verify the success of this installation, you will see the following output: | ||
|
||
![circle Image](https://github.com/joanita-51/ocaml-joy/assets/82649346/87bf01ad-836f-4491-97c2-8724b8047429) | ||
|
||
## Getting Help | ||
At any point, please don't hesitate to ask questions. You can contact the mentors either here in the issue tracker or in the #outreachy channel in [OCaml discord](https://discord.com/invite/cCYQbqN). | ||
|
||
## Shape Examples | ||
|
||
These shapes have been crafted with the aid of this library. | ||
|
||
![axes image](https://github.com/joanita-51/ocaml-joy/assets/82649346/0b8b402e-65ee-45a8-b568-cf0434a10f5e) | ||
![circle graph image](https://github.com/joanita-51/ocaml-joy/assets/82649346/1ac34bd9-553b-45e2-90cf-240c73b63256) | ||
![rectangle image](https://github.com/joanita-51/ocaml-joy/assets/82649346/c00e5df4-83bd-4cf7-a864-6f26da0d1fac) | ||
![circle grid image](https://github.com/joanita-51/ocaml-joy/assets/82649346/20176f2d-cf96-4ec1-93ed-e5eaf1682600) | ||
![star image](https://github.com/joanita-51/ocaml-joy/assets/82649346/5a8cd0ea-f00b-46b0-b34d-406d76561a2d) | ||
![high order transformation image](https://github.com/joanita-51/ocaml-joy/assets/82649346/eeb2d2fc-86c5-4159-b559-4e280232798f) | ||
<!-- ![star image](https://github.com/joanita-51/ocaml-joy/assets/82649346/5a8cd0ea-f00b-46b0-b34d-406d76561a2d) | ||
![circle rectangle image](https://github.com/joanita-51/ocaml-joy/assets/82649346/d53af149-83e3-40ac-b34d-d83c69eede3b) | ||
![circle row joy image](https://github.com/joanita-51/ocaml-joy/assets/82649346/6a67187a-ef85-4549-9920-a674740731a7) | ||
![triangle image](https://github.com/joanita-51/ocaml-joy/assets/82649346/de6f1384-94cd-4d78-8380-74d0c38b9331) | ||
![concentric circles image](https://github.com/joanita-51/ocaml-joy/assets/82649346/8085d796-4672-413f-904e-01d843e076a1) | ||
![Line image](https://github.com/joanita-51/ocaml-joy/assets/82649346/3b53a1b1-4192-4039-a78d-452116cf683b) | ||
![translate circle image](https://github.com/joanita-51/ocaml-joy/assets/82649346/f4b570ef-cc66-46a8-9360-8796e1fb7361) | ||
![translate rectangle image](https://github.com/joanita-51/ocaml-joy/assets/82649346/aedfaeb4-4ddc-4d82-a77f-a2dfdd071b3d) | ||
![polygon image](https://github.com/joanita-51/ocaml-joy/assets/82649346/1201e352-ef3f-433c-82cc-c834b3d52daf) | ||
![high order transformation image](https://github.com/joanita-51/ocaml-joy/assets/82649346/eeb2d2fc-86c5-4159-b559-4e280232798f) | ||
![translate eclipse image](https://github.com/joanita-51/ocaml-joy/assets/82649346/70026da8-92a3-4c3f-a90a-6827b87e1b8a) | ||
![circle grid image](https://github.com/joanita-51/ocaml-joy/assets/82649346/2d24f4a5-2d06-4091-806a-1c7b412a3ef7) --> | ||
|
||
|
||
## Contribution | ||
|
||
We warmly welcome contributions from the community. If you'd like to contribute to Ocaml-Joy after setting it up on your machine, follow these steps to get started: | ||
|
||
1. **Select a Good-First Issue:** Begin your contribution journey by checking our issue tracker for issues tagged as 'good-first-issue.' These are typically beginner-friendly tasks designed to help new contributors get acquainted with the project. | ||
|
||
2. **Fork the Repository:** Once you've chosen an issue to work on, fork the Ocaml-Joy repository to create your own copy. | ||
|
||
3. **Create a Branch:** Before making any changes, create a new branch for your work. This helps keep your changes isolated and organized. | ||
|
||
4. **Make Your Changes:** Dive into the code and make the necessary modifications to address the chosen issue. Ensure that you follow our coding guidelines and best practices. | ||
|
||
5. **Test Your Changes:** After implementing your modifications, thoroughly test your code to ensure it functions as expected and doesn't introduce new issues. | ||
|
||
6. **Submit a Pull Request:** When you're confident that your changes are ready, submit a pull request (PR) to the main repository. Provide a clear description of your changes and reference the issue you've resolved. | ||
|
||
7. **Engage in Discussion:** Engage in discussions and reviews on your PR. Our team and the community will provide feedback and guidance to ensure your contribution aligns with the project's goals. | ||
|
||
8. **Get Your Contribution Merged:** Once your PR is approved and passes all checks, it will be merged into the main project. Congratulations on your successful contribution! | ||
|
||
By following these steps, you'll be actively contributing to Ocaml-Joy and helping improve the project. We appreciate your consideration of joining our community! | ||
|
||
|
||
## Acknowlegments | ||
|
||
*This library is inspired by [joy](https://github.com/fossunited/joy). Thanks to the creators!* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 quite useful, especially considering this library is aimed to be easy to use for non-OCaml programmers. However, I'd prefer the Installation instructions and the contribution section moved to a separate file,
HACKING.md
orCONTRIBUTING.md
. The new file can be referenced in the README.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.
Thank you, @Sudha247! I'll start working on the changes right away.