Weasel Language named after name of animal https://en.wikipedia.org/wiki/Weasel
Weasel language is a project i created to prove of concept that we can support heterogenous internally inside a language. We can use GPGPU Computing directly supported by the language. Which mean you just directly code to the language and just works.
And we can create computationally task easyly solved. Like Machine Learning and even AI, because you can switch which program or code need to run on GPU or CPU or any compute hardware without hassle.
We also can binding the library created by weasel language into another languages like python to create better environment for end user to create fast program.
- Add LLVM Project
- Before build change linker to llvm lld then Build LLVM Project
- Set LLVM DIR
- Build Project
- Untuk pengguna linux anda dapat menggunakannya pre-release version di github https://github.com/zy0709/underrated_project/releases. Ikuti instruksinya dan langsung gunakan atau ikuti instruksi untuk menginstall dari source code.
- No binary release for windows, follow installing from source code.
- no binary release for mac os x, follow installing from source code.
- anda tinggal run
sudo apt update
sudo apt install clang-12
- Download clang di https://releases.llvm.org/download.html pilih versi 11.0.0
- Extract dan tambahkan ke variable environment
- Clang merupakan default compiler di Mac OS X, jadi tidak perlu menginstall lagi
- Tinggal clone project git clone https://github.com/zy0709/underrated_project ke folder project anda
- Tidak perlu diganti
- Buka file CMakeLists.txt
- Ganti pathnya LLVM_DIR ke {folder clang}/lib/cmake/llvm
-Set ke folder cmake llvm (not tested, limited hardware resource)
- Membuat folder third-party
- Download llvm-spirv-11 di https://github.com/zy0709/underrated_project/releases
- Extract lib dan include di file llvm-spirv-11 ke third-party
- Build dari source code, ikuti petunjuk dari github aslinya di https://github.com/KhronosGroup/SPIRV-LLVM-Translator
- Lalu pindah libLLVMSPIRVLib.a ke folder third-party/lib
- Dan copy semua file dari include ke third-party/include
- Build dari source code, ikuti petunjuk dari github aslinya di https://github.com/KhronosGroup/SPIRV-LLVM-Translator
- Lalu pindah libLLVMSPIRVLib.a ke folder third-party/lib
- Dan copy semua file dari include ke third-party/include
- mkdir build
- cd build
- cmake ..
- cmake --build .
- tunggu process selesai dan anda bisa menggunakan file executablenya
- mkdir build
- cd build
- cmake ..
- cmake --build .
- tunggu process selesai dan anda bisa menggunakan file executablenya
- mkdir build
- cd build
- cmake ..
- cmake --build .
- tunggu process selesai dan anda bisa menggunakan file executablenya
- NOTE : On progress to automate the installation.
- NOTE : Mail to github project for more information.
- cmake (Cmake File to avoid boilerplate of cmake file)
- include (folder header)
- lib (Library of the header)
- libparallel (Library that used for creating parallel execution. This is an abstraction of OpenCL FrameWork)
- tools (tools program)
- runtime-rt (Source program that used for testing)
- unittests (program for to be compiled)
- Function Declaration
- Function Definition
- Function Call
- Function Variable Number Arguments
- Integer
- Float
- Boolean
- Variable Declaration
- Variable Lookup
- Function Lookup
- Variable names and constants
- Procedure and function names
- Literal Constant
- Strings Literal
- Compiler generated temporaries
- Labels in source languages
- Simple table
- variable declaration and definition
- Simple Binary Expression
- Support variable re-assign
- Support variable signed and unsigned
- Support Multiply
- Support Division
- Support Addition
- Support Substract
- Support Modulo
- Support Unary Operator
- Simple pointer type
- Simple Address of
- Support nil value
- Support Array Data Sequence
- Support Vector Data Sequence
- Support Malloc and Free
- Support simple output through c library
- Support simple input
- Support IO
- Implement Simple Internal Heterogeneous Computing (for prove of concept)
- Support if decision
- Support else if decision
- Support else decision
- Support For-loop statement
- Support For(while) statement
- Support For(switch) statement
- Support Struct
- Support internal function inside struct
- Support Function by reference
- By default use mangling name
- Weird Lexeme Location(row, col, position)
- Special character need handled
- I implemented binaryexpression for precedence associative right to left wrongly
- Library inside lib folder instead of inside tools folder
- weird lexeme Location solved by use filemapped source