nuruprogramming / nuru Goto Github PK
View Code? Open in Web Editor NEWA Swahili Programming Language built from the ground up
Home Page: https://nuruprogramming.org
License: GNU General Public License v2.0
A Swahili Programming Language built from the ground up
Home Page: https://nuruprogramming.org
License: GNU General Public License v2.0
Issue Description:
The current installation guide for Nuru on Termux contains incorrect instructions that do not align with Termux's environment and file structure. The following issues have been identified:
Incorrect .bashrc File Path:
nuru
alias to ~/.bashrc
, which is not valid for Termux. Instead, the correct file to edit is /data/data/com.termux/files/usr/etc/bash.bashrc
.Inappropriate Installation Directory:
~/nuru
), which is not recommended for Termux. It is better to place executable files in /data/data/com.termux/files/usr/share
to adhere to Termux's file system standards.Steps to Reproduce:
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Android_arm64.tar.gz
tar -xzvf nuru_Android_arm64.tar.gz
echo "alias nuru='~/nuru'" >> .bashrc
nuru -v
nuru -v
to confirm the installation.Expected Behavior:
The nuru
command should work and display the version information.
Actual Behavior:
The nuru
command is not found because the alias is not set correctly in Termux.
Suggested Fix:
curl -O -L https://github.com/AvicennaJr/Nuru/releases/download/v0.5.16/nuru_Android_arm64.tar.gz
tar -xzvf nuru_Android_arm64.tar.gz
mv nuru /data/data/com.termux/files/usr/share/
echo "alias nuru='/data/data/com.termux/files/usr/share/nuru'" >> /data/data/com.termux/files/usr/etc/bash.bashrc
source /data/data/com.termux/files/usr/etc/bash.bashrc
nuru -v
These changes ensure that the Nuru binary is correctly added to the environment variables in Termux and that the executable is placed in a recommended directory.
Thank you for your attention to this matter.
shebang is a unix feature that is most of the scripting languages:
https://en.wikipedia.org//wiki/Shebang_(Unix)
It will be nice to just execute the scripts without explicitly invoking the nuru
interpreter every time.
Look at the first line and ignore if it starts with '#!' specifically, look at how it works as explained in the question on StackOverflow about shebang and its implementation in the linux kernel.
If the 'shebang' appears on any other line, then throw an error.
No response
v0.5.1 (commit id f0fe309)
Linux 6.9.3-hardened1-1-hardened
go version go1.22.3 linux/amd64
Add/Fix these modules before next release:
Currently, we only have support for the base 10 numeral system but it would be cool to support other systems like Hexadecimal numbers for example.
Low-Level Programming
In systems programming or when working with hardware, hexadecimal and binary representations are often used to specify memory addresses, bit patterns, and control registers.
Data Encoding and Decoding:
When dealing with data formats like binary, hexadecimal, or base64, the ability to convert between numeral systems is crucial for tasks such as data serialization, deserialization, and encoding/decoding.
Cryptography:
Cryptographic algorithms often require working with binary data and performing bitwise operations.
Network Programming:
Network protocols like IP addresses and MAC addresses are often represented in hexadecimal notation.
Mathematics Applications:
In mathematical applications, different numeral systems might be used to represent numbers or perform specific calculations.
Educational Purposes:
Teaching programming and computer science concepts can benefit from exposing students to different numeral systems. It helps in understanding how computers store and manipulate data.
Custom Base Number Systems:
Some specialized applications may require custom base number systems.
A function for converting string to a number that will take a string and a radix and return a number and if the one of the parameters are incorrect, throw an errora
No response
v0.2.0
OS: Linux 6.1 Manjaro Linux
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
Memory: 6.19 GB / 15.31 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
As you can see I can create 4ft = "yolo"
but I can't use it after that.
Either it shouldn't be allowed from the get go when declaring such a variable. Or if allowed then should be usable everywhere.
variable is not parsed
Refuse to allow variables starting with numbers.
No response
latest develop branch
Pop_Os(Ubuntu 22.04 LTS)
What do you think about adding a discussion tab in this repository so discussions concerning this awesome project can be done there?
The string "ni" could be used to represent the comparison operator "==" while the string "si" could be used to represent "!=".
This is similar to python's use of "is" and "is not" respectively
This is not urgent nor is it terribly important but more swahili in my editor is better :)
No response
No response
version 0.5.1
Arch Linux
The proposed feature is a robust and efficient numerical computation library similar to Numpy, but designed for the Nuru programming language with support for Swahili language commands and documentation. This library should include functionalities for handling arrays, matrices, linear algebra, statistical functions, and random number generation, all while providing an intuitive API for Swahili-speaking users.
Many Swahili-speaking programmers face challenges when using existing computational libraries due to language barriers. This feature will empower users to perform advanced numerical computations without having to switch to English-based tools, fostering inclusivity and enhancing productivity.
Example:
"I'm always frustrated when I have to translate computational tasks into English while working on projects. Having a library that allows me to code in Swahili would save time and reduce errors."
API Design:
Create Swahili equivalents for common Numpy functions.
Ensure the function names and parameters are in Swahili.
Core Functionalities:
Arrays: Creation, manipulation, and operations on multi-dimensional arrays.
Linear Algebra: Matrix operations, decompositions, eigenvalues, etc.
Statistics: Mean, median, variance, standard deviation, etc.
Random Number Generation: Functions to generate random numbers, arrays, and distributions.
Documentation and Examples:
Provide comprehensive documentation in Swahili.
Include examples and tutorials to demonstrate usage.
Performance:
Optimize the library for performance to handle large datasets efficiently.
Compatibility:
Ensure compatibility with the Nuru programming environment.
No response
Nuru Programming Language version v0.5.16
Operating System: Linux (Ubuntu 20.04)
I have noticed that kwa
loop works similarly to for
loop in Python. The for loop in Python has a range function that enables you to loop through a set of code a number of times. It would also be beneficial to have this feature in Nuru to make the kwa
loop even more versatile.
To loop through a set of code a specified number of times
Kiswahili keywords could be masafa
au umbali
No response
v0.2.0
OS: Linux 6.1 Manjaro Linux
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
Memory: 6.19 GB / 15.31 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
When I tried to do arithmetic operations with non int values, it panics and exits with SIGSEGV
error.
This is the expected behaviour when using go directly, can this behaviour be mitigated.
It works with alphabets ([a-zA-Z]) and some punctuations but panics on encountering others and UTF-8 characters.
1+.
Mstari 1: Tumeshindwa kuparse .
1+.
Mstari 1: Tumeshindwa kuparse .
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x6f8fc7]
goroutine 1 [running]:
github.com/AvicennaJr/Nuru/evaluator.evalInfixExpression({0xc0003ee2d4, 0x1}, {0xfdb2a0, 0xc0003ee2e8}, {0x0, 0x0}, 0x1)
/tmp/nuru/evaluator/infix.go:68 +0x867
github.com/AvicennaJr/Nuru/evaluator.Eval({0xfdb548?, 0xc00058e120}, 0xc00041b000)
/tmp/nuru/evaluator/evaluator.go:51 +0x157a
github.com/AvicennaJr/Nuru/evaluator.Eval({0xfdb480?, 0xc000404080}, 0xc00041b000)
/tmp/nuru/evaluator/evaluator.go:24 +0x865
github.com/AvicennaJr/Nuru/evaluator.evalProgram(0x32?, 0xc00041b000)
/tmp/nuru/evaluator/evaluator.go:212 +0x85
github.com/AvicennaJr/Nuru/evaluator.Eval({0xfdb040?, 0xc00043a030}, 0xc00041b000)
/tmp/nuru/evaluator/evaluator.go:21 +0x209
github.com/AvicennaJr/Nuru/repl.(*dummy).executor(0xc000056530, {0xc0003ee248, 0x3})
/tmp/nuru/repl/repl.go:113 +0x217
github.com/AvicennaJr/GoPrompt.(*Prompt).Run(0xc00017a5a0)
/home/gekkowrld/go/pkg/mod/github.com/!avicenna!jr/!go![email protected]/prompt.go:84 +0x73f
github.com/AvicennaJr/Nuru/repl.Start()
/tmp/nuru/repl/repl.go:90 +0x15f
main.main()
/tmp/nuru/main.go:40 +0x752
Type nuru into the terminal or open a file for editing.
Write a simple line like 1+.
or any puntuation marks except [
and [a-zA-Z].
If on the terminal, press ENTER.
If in file, execute the file with nuru filename.nr
The panic happens and exits (in both file and terminal)
Repeat with another puntuation or UTF-8 or any other characters of your choice except ones from the list:
All the other characters can reproduce the error(s)
Adding one more operation, -
is removed from the 'safe' panic list.
Catch the errors and produce custom errors as done with ASCII alphabet as now.
No response
v0.5.1 (compiled from source)
GO VERSION: go version go1.22.0 linux/amd64
Kernel: 6.7.5-arch1-1 x86_64
Shell: Bash
OS: Arch Linux x86_64
C like languages allow the user to "manipulate" strings using '%' e.g "%s" for strings, "%d" for decimals and so on. Python also has the same feature using .format()
and f-strings
.
andika()
currently only supports arbitrary number of arguments but no way of organizing them as per user needs.
Adding this will enable the user to do like:
fanya i = 0
fanya jina = jaza("Unaitwa nani rafiki? ")
wakati (i <= 5) {
andika("Rafiki %s hii ni %d", jina, i)
i++
}
(the same case with f-strings)
The golang and or python implementation details can be of use:
This are previous implementation details, not all the formatting will be copied over.
No response
v0.5.1 (compiled from source with modifications from #80)
GO VERSION: go version go1.22.1 linux/amd64
Kernel: 6.8.1-arch1-1
Shell: Bash
OS: Arch Linux x86_64
Please can you include more information in the readme file to explain what triggered the establishment of this language. I am really interested to know.
I speak Swahili, this programming language will bring big impact in my country.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.