Skip to content

How to use Arithmos ?

Scrappers Team edited this page Jan 7, 2022 · 8 revisions

Welcome to the Arithmos wiki!

This section would show you how to build Arithmos from sources and add your arithmetic and algorithmic code. ENJOY !

1) Fork and Clone :

  • Fork from github fork.
  • Navigate to your desired directory of project cd your-directory.
  • Clone from command line using :
gh repo clone Scrappers-glitch/Arithmos

2) Do your changes :

  • To add your java-code use the code/java/src/ directory and add only one package then your code inside.
  • To add your native code C/C++ use the code/natives/includes for headers .h files and /libs for .c .cxx and .cpp files.
  • Find the books in readme for Algorithms/Data Structures, Java, Natives and Bash.

3) Do a PR :

  • Use these commands :
# create a new branch
git checkout -b alpha-update
# add some files to the upcoming commit
git add .
# commit to the branch
git commit -m 'Your commit message !'
# push the commit to the branch
git push --set-upstream https://github.com/**?username=**/Arithmos.git alpha-update
Username for 'https://github.com': 
Password for 'https://[email protected]@github.com': **ACCESS_TOCKEN**

Notes : -> Make sure to replace **?username=** with your github user name and **ACCESS_TOCKEN** with your git access tocken.

4)Scala, Kotlin and Groovy :

  • You can use them as a replacement for Java and the sources got included as jar dependencies for the final jar (you cannot call your java class in scala/kotlin/groovy for now, they are just dependencies for now).
  • To install kt/groovy/scala use SDKMAN sdk manager on gnu linux :
sdk install kotlin
sdk install groovy
sdk install scala

5) Clojure is still --WIP--

6) Assemble a jar :

┌─[twisted@parrot]─[~/GradleProjects/Arithmos/build/assemble]
└──╼ $./assembleJAR.sh 
Compiling the project

--------Script start--------

---MajorTask@Build Scala : Scala build started
 Task@Build Compile Scala : Succeeded
---MajorTask@Build Scala : Scala build finished

---MajorTask@Build Kotlin : Kotlin build started
 Task@Build Compile Kotlin : Succeeded
---MajorTask@Build Kotlin : Kotlin build finished

---MajorTask@Build Groovy : Groovy build started
 Task@Build Compile Groovy : Succeeded
---MajorTask@Build Groovy : Groovy build finished

---MajorTask@Build Java Sources : Java build started
 Task@Build Compile Java : Succeeded
---MajorTask@Build Java Sources : Java build finished

---MajorTask@Build Native Sources : Native build started
---MajorTask@Build Native Sources : Found native sources---
 Task@Build Linux-x86-x64 : Succeeded
 Task@Build Android-Arm-64 : Succeeded
 Task@Build Android-Arm-32 : Succeeded
 Task@Build Android-Intel-64 : Succeeded
 Task@Build Android-Intel-32 : Succeeded
---MajorTask@Build Native Sources : Succeeded---
---MajorTask@Build Native Sources : Native build finished

--------Script end--------
Assemble JAR

--------Script start--------
 Task@Clean : Completed

 Task@MakeOutputDirectory : Completed

 Task@CreateJarManifest : Completed

 Task@MakeDependenciesDirectory : Completed

 Task@AddJavaDependencies : Completed

 Task@AddLinuxNativeDependencies : Completed

script.sh: line 86: [[: adding: lib/ (stored 0%)
  adding: lib/armeabi-v7a/ (stored 0%)
  adding: lib/armeabi-v7a/libc++_shared.so (deflated 72%)
  adding: lib/armeabi-v7a/libArithmosNatives.so (deflated 66%)
  adding: lib/arm64-v8a/ (stored 0%)
  adding: lib/arm64-v8a/libc++_shared.so (deflated 76%)
  adding: lib/arm64-v8a/libArithmosNatives.so (deflated 63%)
  adding: lib/x86_64/ (stored 0%)
  adding: lib/x86_64/libc++_shared.so (deflated 75%)
  adding: lib/x86_64/libArithmosNatives.so (deflated 62%)
  adding: lib/x86/ (stored 0%)
  adding: lib/x86/libc++_shared.so (deflated 72%)
  adding: lib/x86/libArithmosNatives.so (deflated 55%): syntax error in expression (error token is ": lib/ (stored 0%)
  adding: lib/armeabi-v7a/ (stored 0%)
  adding: lib/armeabi-v7a/libc++_shared.so (deflated 72%)
  adding: lib/armeabi-v7a/libArithmosNatives.so (deflated 66%)
  adding: lib/arm64-v8a/ (stored 0%)
  adding: lib/arm64-v8a/libc++_shared.so (deflated 76%)
  adding: lib/arm64-v8a/libArithmosNatives.so (deflated 63%)
  adding: lib/x86_64/ (stored 0%)
  adding: lib/x86_64/libc++_shared.so (deflated 75%)
  adding: lib/x86_64/libArithmosNatives.so (deflated 62%)
  adding: lib/x86/ (stored 0%)
  adding: lib/x86/libc++_shared.so (deflated 72%)
  adding: lib/x86/libArithmosNatives.so (deflated 55%)")
 Task@AddNativeDependencies : Completed

 Task@AddAssets : Completed

 Task@CreateJar : Completed

--------Script end--------
Clone this wiki locally