Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,205,674 members, 7,993,367 topics. Date: Monday, 04 November 2024 at 11:05 AM

NGR, Nigeria First Made Programming Language - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / NGR, Nigeria First Made Programming Language (4950 Views)

Which Programming Language Is Used For Android Applications? / Is It Advisable To Learn Java As My First Programming Language? / Astro Programming Language 0.2 (indefinite release) (2) (3) (4)

(1) (2) (Reply) (Go Down)

NGR, Nigeria First Made Programming Language by Nobody: 12:08pm On Jun 08, 2016
NGr is a language designed to express computations that can be performed by a machine, particularly a computer. Why? can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication, because is hard for humans to type just a numbers like “1001011001...” for creating very large algorithms or programs like your Operating
System.
In reality, the programming language is just a vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. can be interpreted like perl.etc.

I've created our own programming language called NGR [ http://NGR.sourceforge.net/ ] just to improve our used of digital technologies, and for better understanding:
Re: NGR, Nigeria First Made Programming Language by michaelwilli(m): 12:56pm On Jun 08, 2016
Papa y u lying?
Re: NGR, Nigeria First Made Programming Language by trytillmake(m): 1:09pm On Jun 08, 2016
wat u have done with it would suffice
Re: NGR, Nigeria First Made Programming Language by Donald3d(m): 1:20pm On Jun 08, 2016
invalid link on source forge,how easy is it to use,
Re: NGR, Nigeria First Made Programming Language by mexzony: 1:54pm On Jun 08, 2016
it says invalid link
Re: NGR, Nigeria First Made Programming Language by ANTONINEUTRON(m): 2:06pm On Jun 08, 2016
Even Simple Syntax Of Ur NGr Is "No Where To Be Found"
Re: NGR, Nigeria First Made Programming Language by Nobody: 10:19pm On Jun 08, 2016
dgurudoer:
NGr is a language designed to express computations that can be performed by a machine, particularly a computer. Why? can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication, because is hard for humans to type just a numbers like “1001011001...” for creating very large algorithms or programs like your Operating
System.
In reality, the programming language is just a vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. can be interpreted like perl.etc.
I've created our own programming language called NGR [ http://NGR.sourceforge.net/ ] just to improve our used of digital technologies, and for better understanding:


sorry it coming soon. I am fixing something. but my promise it will be released soon. please bear with me.
Re: NGR, Nigeria First Made Programming Language by omoikea(m): 9:56pm On Jun 11, 2016
you suppose to have done this before posting here..you should know nigerians na
well let me take this drink while I wait.

1 Like

Re: NGR, Nigeria First Made Programming Language by wisemania(m): 10:39pm On Jun 12, 2016
What language is it written in?
Will you make it open source later?
Isn't ngr to tribalistic ?

1 Like

Re: NGR, Nigeria First Made Programming Language by Nobody: 7:02am On Jun 13, 2016
To make a programming language you should have your own syntax, your own compiler, and it should have its own "grammar", and it's own methods to make functions and what not, if you don't have any of these kindly don't worry about designing one.

Is your language NGR going to be scripting? These days web application are way to go and if you not worrying about making your language easy for web platform, kindly don't worry... I don't think it would be needed.
Re: NGR, Nigeria First Made Programming Language by Raypawer(m): 7:41am On Jun 13, 2016
any special feature? if non why reinvent the wheel?
Re: NGR, Nigeria First Made Programming Language by KazukiIto(m): 6:00pm On Jun 13, 2016
Watching how this will turn out

1 Like

Re: NGR, Nigeria First Made Programming Language by usmanktg2(m): 6:38am On Jun 14, 2016
This is not the first.
Abubakar Gwani created a HAUSA programming language around 2010, here in Bauchi state.
Re: NGR, Nigeria First Made Programming Language by Stconvict(m): 2:52am On Aug 21, 2016
dgurudoer:

I've created our own programming language called NGR [ http://NGR.sourceforge.net/ ] just to improve our used of digital technologies, and for better understanding:
Hello Op.
I'm really excited for your project and I'd like to know if the project is still ongoing.
I'm also working on a similar project and I'd like if we could share ideas.
I'm almost done with the lexer, parser and the semantic analyser of my language and I'm currently working on a code generator for llvm.
I'd like to see your language designs and decisions as I'm always forced to do deep critical thinking that hurts my brain and sleep-time some times. One of them being multiple inheritance ambiguity.
My language is designed after a lot of both old and modern languages like CLOS, Java, Swift, Julia, C#, Rust, Go, C/C++, Python, JS, Scala, Ruby, Lua and Dart, but it derives a good deal of its syntax from Python. I however took the liberty of making it expressive and less redundant.
There are a lot of features my language is expected to support, but I can't list all of them here. Some of which include Optional Typing (Type Inference, Duck Typing and Static Typing), Covariant Type Relationship, First-Class Functions, Functional Paradigm, Imperative Paradigm, Object-Oriented Paradigm, Expression-Based, Multiple Dispatch, Pattern Matching, Generics, Lexical Scoping, Operator Overloading, List Comprehension, Homoiconicity, Meta-Programming, and Automatic Reference Counting (instead of Tracing GC)
After several minutes of search on the interenet, for a Nigerian-developed language, I found this thread and another academic proposal, a language called SIPPL.
I believe we are one of the few software developers in Nigeria, aiming to create a production-ready language.
And I think we need to be aware of each other's existence.

I'd love to see your project and perhaps discuss about it.
I don't want you giving up yet.

It's a general purpose language for now.
Re: NGR, Nigeria First Made Programming Language by dsypha(m): 3:46am On Aug 21, 2016
Stconvict:

Hello Op.
I'm really excited for your project and I'd like to know if the project is still ongoing.
I'm also working on a similar project and I'd like if we could share ideas.
I'm almost done with the lexer, parser and the semantic analyser of my language and I'm currently working on a code generator for llvm.
I'd like to see your language designs and decisions as I'm always forced to do deep critical thinking that hurts my brain and sleep-time some times. One being multiple inheritance ambiguity.
My language is designed after a lot of both old and modern languages like CLOS, Java, Swift, Julia, C#, Rust, Go, C/C++, Python, JS, Scala, Ruby, Lua and Dart, but it derives a good deal of its syntax from Python. I however took the liberty of making it expressive and less redundant.
There are a lot of features my language is expected to support, but I can't list all of them here. Some of which include Optional Typing (Type Inference, Duck Typing and Static Typing), Covariant Type Relationship, First-Class Functions, Functional Paradigm, Imperative Paradigm, Object-Oriented Paradigm, Expression-Based, Multiple Dispatch, Pattern Matching, Generics, Lexical Scoping, Operator Overloading, List Comprehension, Homoiconicity, Meta-Programming, and Automatic Reference Counting (instead of Tracing GC)
After sveral minutes of search on the interenet, for a Nigerian-developed language, I found this thread and another academic proposal, a language called SIPPL.
I believe we are one of the few software developers in Nigeria, aiming to create a production-ready language.
And I think we need to be aware of each other's existence.

I'd love to see your project and perhaps discuss about it.
I don't want you giving up yet.

BTW, my language hopes to make AI development, even though, how that will work is a little obscure.
But for now it is general-purpose programming language.
Designing a new language is not easy. Most times, languages benefit from design decisions of other languages that have stood the test of time. Languages that have been around for not less that a decade. Your languages derive from Julia, Go, Rust?! These are languages that were released yesterday, nobody is certain of their successes. I, for example, don't even know what the syntax of Julia looks like. Maybe Go will succeed given that Google owns it.
What am saying is you don't design languages to emulate new languages that have 'not seen anything yet'.

1 Like

Re: NGR, Nigeria First Made Programming Language by Stconvict(m): 5:46am On Aug 21, 2016
dsypha:

Designing a new language is not easy. Most times, languages benefit from design decisions of other languages that have stood the test of time. Languages that have been around for not less that a decade. Your languages derive from Julia, Go, Rust?! These are languages that were released yesterday, nobody is certain of their successes. I, for example, don't even know what the syntax of Julia looks like. Maybe Go will succeed given that Google owns it.
What am saying is you don't design languages to emulate new languages that have 'not seen anything yet'.
Since Pluto (the name of my language) is still in development stage, I don't see any reason why I can't borrow useful concepts from modern languages. Julia's multiple dispatch for example, while not new, opens a whole new way of solving problems. And for me, it made some rigid Pluto's structure easier to implement.
Designing a language is definitely not easy. I knew that like a month after starting the project. cry
But I'm doing this for fun more than anything else. grin
Especially when I found out that the goals I had for Pluto were what Julia aims to be.
So maybe Pluto is not anymore unique than Julia, but it is worth the shot. If not for showcasing, then for learning.
Pluto is a representation of how I'd like to write my programs.
Re: NGR, Nigeria First Made Programming Language by dsypha(m): 9:49am On Aug 21, 2016
Stconvict:

Since Pluto (the name of my language) is still in development stage, I don't see any reason why I can't borrow useful concepts from modern languages. Julia's multiple dispatch for example, while not new, opens a whole new way of solving problems. And for me, it made some rigid Pluto's structure easier to implement.
Designing a language is definitely not easy. I knew that like a month after starting the project. cry
But I'm doing this for fun more than anything else. grin
Especially when I found out that the goals I had for Pluto were what Julia aims to be.
So maybe Pluto is not anymore unique than Julia, but it is worth the shot. If not for showcasing, then for learning.
Pluto is a representation of how I'd like to write my programs.
Pluto. Hm. Okay.
Re: NGR, Nigeria First Made Programming Language by pythonkid(m): 11:00am On Aug 21, 2016
i thought i've finally seen someone better in programming .. not knowing .......
Re: NGR, Nigeria First Made Programming Language by Olyboy16(m): 7:03pm On Aug 21, 2016
Stconvict:

Since Pluto (the name of my language) is still in development stage, I don't see any reason why I can't borrow useful concepts from modern languages. Julia's multiple dispatch for example, while not new, opens a whole new way of solving problems. And for me, it made some rigid Pluto's structure easier to implement.
Designing a language is definitely not easy. I knew that like a month after starting the project. cry
But I'm doing this for fun more than anything else. grin
Especially when I found out that the goals I had for Pluto were what Julia aims to be.
So maybe Pluto is not anymore unique than Julia, but it is worth the shot. If not for showcasing, then for learning.
Pluto is a representation of how I'd like to write my programs.

hi bro, seems you are competent and know what you are doing. so i wanted to ask if we could discuss on whatsapp about ur project. what i really wana know for now is, is pluto interpreted or compiled? and is it general purpose or specific?
Re: NGR, Nigeria First Made Programming Language by Stconvict(m): 11:25pm On Aug 21, 2016
Olyboy16:


hi bro, seems you are competent and know what you are doing. so i wanted to ask if we could discuss on whatsapp about ur project. what i really wana know for now is, is pluto interpreted or compiled? and is it general purpose or specific?
Pluto's interpreter contains some steps of compilation since it involves bytecode generation.

Pluto is a general purpose lang. Although oriented towards making scientific computing easy.
Data Analysis, Statistics, AI, etc.

Whatsapp Num: 080-7478-9323
Re: NGR, Nigeria First Made Programming Language by Stconvict(m): 4:01am On Aug 23, 2016
dgurudoer:
NGr is a language designed to express computations that can be performed by a machine, particularly a computer. Why? can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication, because is hard for humans to type just a numbers like “1001011001...” for creating very large algorithms or programs like your Operating
System.
In reality, the programming language is just a vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. can be interpreted like perl.etc.

I've created our own programming language called NGR [ http://NGR.sourceforge.net/ ] just to improve our used of digital technologies, and for better understanding:
I knew there was something weird with ur definition of programming and I've finally found where u got it from.
A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. Why? Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication, because is hard for humans to type just a numbers like “1001011001...” for creating very large algorithms or programs like your Operating System.
In reality, a programming language is just a vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. The term programming language usually refers to high-level languages, such as C/C++,Perl, Java, and Pascal etc. In theory, each language has a unique set of keywords (words that it understands) and a special syntax for organizing program instructions, but we can create many languages that have the same vocabulary and grammar like “Ruby” and “JRuby” or others.
Re: NGR, Nigeria First Made Programming Language by appcypher: 1:03am On Jan 04, 2017
I'm a co-developer of Pluto(now Astro) and I'm way too excited that I'm so eager to show some of the language syntax.
Astro 0.2's interpreter is near completion and shows promise performance-wise. It's, on average, 2 times faster than Python.
Yes, I know, everything is not about speed. But it's a nice thing to have nonetheless.
I will give a brief description of Astro.
Astro aims to be virtually ubiquitous with various compilation back-end targets like LLVM native, LLVM JIT, wasm, and bytecode interpreters. Its general goal, however, is to be expressive, flexible and fast.
Astro relies heavily on Multiple dispatch and UFCS and consequently merges the divergent worlds of procedural and OOP programming.
You will also find yourself typing idiomatic Astro much more quickly than in Python or Ruby. cool
Astro type system is sophisticated so much that it feels like dynamic language even though it statically infers all probable types. The type inference is unlike Hindley-Milner techniques seen in Scala or Haskell and comes close to custom type inference algo found in Crystal.


Here are some of the language features, some of which are not finalized or complete and may not make it to 0.2 release
- Optional Typing
- Lexical Scoping
- Generics
- First-class functions (higher-order function, closures, lambdas.)
- Imperative
- Object-oriented
- Procedural
- Expression-oriented
- Operator Overloading
- Multiple Dispatch
- List Comprehension
- Type Inference
- Multiple Dispatch
- Generators
- Coroutines
- Algebraic Data Types & Pattern Matching
- UFCS
- ...

Astro is not really a simple language, and may not be suited for total beginners as much as Python. But once understood, a lot of things will viewed differently and done more concisely. This doesn't mean that the language is hard to grasp. It really isn't.
We are also trying to make sure that the lang doesn't end up looking cryptic like Perl grin or becoming a load of incoherent baggage that is C++ cool.

As for why Astro was created when there are dozens of production languages out there, and thousands of other toy languages still in gestation period in respective labs? Well, only Nypro can answer that question properly. For me it's fun, I learnt a lot. I hope it becomes mature enough and joins the group of other rapidly developing languages like Julia and Crystal.

Astro is barely a year old and still under active development.
It will be released to the public under an MIT license very soon.

# Python 3
from sys import stdout
from math import pi
def area():
while True:
shape = input("Enter a shape ('sq' for square, 'rec' for rectangle and 'cir' for circle, 'ex' to exit): "wink.lower().strip()
if shape == 'rec':
length = int(input('Enter length: '))
breadth = int(input('Enter breadth: '))
drawRec(length, breadth)
print('\nArea of Rectangle: {}\n\n'.format(length*breadth))
elif shape == 'sq':
length = int(input('Enter length: '))
drawSq(length)
print('\nArea of Square: {}\n\n'.format(length**2))
elif shape == 'cir':
radius = int(input('Enter radius: '))
print('[Diagram missing]')
print('\nArea of Circle: {}\n\n'.format(pi * radius**2))
elif shape == 'ex':
break
else:
print('Gimme the correct input idiot!\n\n')

def drawSq(length):
print(' ', '_ ' * length)
for i in range(length):
print('|', ' ' * length, '\b\b|')
print('|', '_ ' * length, '|')

def drawRec(length, breadth):
print(' ', '_ ' * breadth)
for i in range(length):
print('|', ' ' * breadth, '\b\b|')
print('|', '_ ' * breadth, '\b\b|')

area()

-----------------------------------------------------------------------------------
# Astro 0.2
func area:
loop:
let shape = {scanln "Enter a shape ('sq' for square, 'rec' for rectangle"
"and 'cir' for circle, 'ex' to exit): "}.toLower.trim
match shape
with 'rec':
let length, breadth = Int scanln 'Enter length: ', && scanln 'Enter breadth: '
drawRec length, breadth
println '\nArea of Rectangle: [length * breadth]\n\n'
with 'sq':
let length = Int scanln 'Enter length: '
drawSq length
println '\nArea of Square: [length^2]\n\n'
with 'cir':
let radius = Int scanln 'Enter radius: '
println '\[Diagram missing]' && '\nArea of Circle: [pi * radius^2]\n\n'
with 'ex': break
with: println 'Gimme the correct input stupid!\n\n'
..
..

func drawSq length:
println sp, '_ ' * length
for i in length: println '|', sp * length, '\b\b|'
println '|', '_ ' * length, '\b\b|'
..

func drawRec length, breadth:
println sp, '_ ' * breadth
for i in length: println '|', sp * breadth, '\b\b|'
println '|', '_ ' * breadth, '\b\b|'
..

area
Re: NGR, Nigeria First Made Programming Language by uzoexcel(m): 5:51pm On Jan 04, 2017
Interesting!!!!!
Re: NGR, Nigeria First Made Programming Language by asalimpo(m): 5:53pm On Jan 04, 2017
@appcypher
Congrats. Creating a programming language or compiler is no small undertaking. Eventually, most programmers
want to know how the program that translates their code is made. After all, it's a program, written by humans
, with 1 head and 2 hands. Hope you'll teach the noobs around here and inspire them to your level.
Are u open sourcing it?
Can you share insights with us into how you did it,books you read,tools etc.


But on a serious note, why is africa no where in I.T?
We have professors and phDs in computer science here. Graduates are churned out every year in Cs,
yet in the software space we are no where?
You read online of people who created languages over the weekend! (Python),
Students writing complete working compilers as part of their undergraduate programs, (all good western universities)
and yet in Nigeria, we have just nothing!!!
It's odd.
japan created ruby.
brazil lua.
Africa/nigeria - nadir? ok we dont need to add to the teems of flooded language space but software wise,
computer science wise - we're no where!
Re: NGR, Nigeria First Made Programming Language by asalimpo(m): 6:08pm On Jan 04, 2017
..
Re: NGR, Nigeria First Made Programming Language by asalimpo(m): 6:09pm On Jan 04, 2017
dgurudoer:

NGr is a language designed to express computations that can be performed by a machine, particularly a computer. Why? can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication, because is hard for humans to type just a numbers like “1001011001...” for creating very large algorithms or programs like your Operating
System.
In reality, the programming language is just a vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. can be interpreted like perl.etc.

I've created our own programming language called NGR [ http://NGR.sourceforge.net/ ] just to improve our used of digital technologies, and for better understanding:
Ngr doesnt exist !!
Re: NGR, Nigeria First Made Programming Language by appcypher: 11:12pm On Jan 04, 2017
asalimpo:
@appcypher
Congrats. Creating a programming language or compiler is no small undertaking. Eventually, most programmers
want to know how the program that translates their code is made. After all, it's a program, written by humans
, with 1 head and 2 hands. Hope you'll teach the noobs around here and inspire them to your level.
Are u open sourcing it?
Can you share insights with us into how you did it,books you read,tools etc.


But on a serious note, why is africa no where in I.T?
We have professors and phDs in computer science here. Graduates are churned out every year in Cs,
yet in the software space we are no where?
You read online of people who created languages over the weekend! (Python),
Students writing complete working compilers as part of their undergraduate programs, (all good western universities)
and yet in Nigeria, we have just nothing!!!
It's odd.
japan created ruby.
brazil lua.
Africa/nigeria - nadir? ok we dont need to add to the teems of flooded language space but software wise,
computer science wise - we're no where!
A Kenyan dude wrote a scripting lang called Bracescript, but I can't find the source or documentation anywhere, so the credibility of that remains unknown.
Astro is a movement that Africa can also do it. We are making sure that its not just a test language but a language ready for production and yes it will be open-source (which recent language isn't open-source anyway?).
As for experiences, I will share some of them once Astro gets released.
Here is another snippet of Astro / Python code

PYTHON 3
-----------------------------------------------------------------------------
class Person:
def __init__(self, name, age):
self.name = name
self.age = age

def details(self):
return (self.name, self.age)

class Employee(Person):
def __init__(self, name, age, job, company):
super(Employee, self).__init__(name, age)
self.job = name
self.company = company

def details(self):
return (super(Employee, self).details(), self.job, self.company)

john = Person('John Smith', 33)
tola = Employee('Tola Adeniran', 21, 'App Developer', 'CodeBuzz, Inc.')

print(john.details())
print(tola.details())

ASTRO 0.2
-----------------------------------------------------------------------------
type Person name, age
type Employee {super name, age}, job, company <: Person

func details p=Person: p->name, ->age
func details e=Employee: ...super.details, e->job, ->company

let john = Person 'John Smith', 33
let tola = Employee 'Tola Adeniran', 21, 'App Developer', 'CodeBuzz, Inc.'

println john.details && tola.details


This is not meant to show how concise or terse Astro's source can be, but to show that a statically typed language can also have the same expressiveness and script-feel of a dynamic language, with dynamic language features like duck typing. Astro also keeps the benefits of a static language which include the elimination of certain set of runtime errors that can only be detected with unit tests in dynamic languages. Also as a result of being statically-typed, Astro's interpreter tend to run faster.

The Astro code above is 3 times faster than the Python version, and since Astro is a statically-typed language, this speed factor can grow even more with a JIT or native compiler implementation, but those are undertakings for the future.
WASM is an intermediate representation currently being developed for the web. We believe so much in the connectivity and the ubiquity of the web, so we have plans to make Astro compile to wasm. Then it can join Javascript in its crusade.

Of course, these are all just big talks now, so lets get the proof-of-concept interpreter out first and see where this indigenous language goes.
Re: NGR, Nigeria First Made Programming Language by Nobody: 12:16pm On Jan 05, 2017
Now this is intresting
Re: NGR, Nigeria First Made Programming Language by asalimpo(m): 5:36pm On Jan 05, 2017
ok. op, dyu have a mailing list? Wiki and so on.
I was interested or curious about how langs were written earlier on,(and operating systems)
but it seems there's no free resource online. Some said the "dragon book" is the bible
but others say its unreadable. For now to folks like us,it's black magic.
What is required in creating one from scratch, and writing an optimizing compiler for it?
Your team must be unusually motivated, to commit time to this.
Are you guys computer science grads/undergrads. Mathematicians?

You'll need to grow a community around it though, to keep it alive.

The syntax doesnt look friendly at all!! - Man, in this day and age,
cryptic syntax is a minus. Python succeeded ,inspite of its sluggishness cuz it's almost english like.
I think you should work on that. Just my candid observation.
Re: NGR, Nigeria First Made Programming Language by appcypher: 6:51pm On Jan 05, 2017
asalimpo:
ok. op, dyu have a mailing list? Wiki and so on.
I was interested or curious about how langs were written earlier on,(and operating systems)
but it seems there's no free resource online. Some said the "dragon book" is the bible
but others say its unreadable. For now to folks like us,it's black magic.
What is required in creating one from scratch, and writing an optimizing compiler for it?
Your team must be unusually motivated, to commit time to this.
Are you guys computer science grads/undergrads. Mathematicians?

You'll need to grow a community around it though, to keep it alive.

The syntax doesnt look friendly at all!! - Man, in this day and age,
cryptic syntax is a minus. Python succeeded ,inspite of its sluggishness cuz it's almost english like.
I think you should work on that. Just my candid observation.
I'm not the op of this thread. I'm thinking of starting another thread instead of hijacking this one.

There are just two people working on this and none of us are CS grads.

As for wiki or mailinglist, we don't have any yet, at least not until we make the interpreter public. And as for books to read, Dragon Book is staple, but it's quite large and can scare one away, i'm still not done with the book yet, I'm not even half way. My lang/compiler experience comes from a mixture of Dragon Book, videos, articles around the internet, scientific papers and experimenting with interpreters.

About the syntax of the language, well I believe the reason you don't find it familiar is because I wrote it in idiomatic Astro. I could have written it in a similar way to Python. Something like this.
type Person:
let name, age

type Employee <: Person:
let job, company

func Person(name, age):
rt new(name, age)

func Employee(name, age, job, company):
rt new(super(name, age), job, company)

func details(p = Person):
rt p.name, p.age

func details(e = Employee):
rt super.details(), e.job, e.company

let john = Person('John Smith', 33)
let tola = Employee('Tola Adeniran', 21, 'App Developer', 'CodeBuzz, Inc.')

println(john.details)
println(tola.details)

Now, compare it with the Python version. The code is now clearer. But Astro is not Python, it has its own way of doing things idiomatically.

And saying the syntax is not friendly is not true. You haven't even learnt Astro to assert that. Even Python has its idiomatic moments where a beginner won't have a clue what's going on. In fact, Astro is not really aimed at beginners.

I believe picking up a new language isn't really meant to be straightforward and as familiar as already known language. You shouldn't expect to find the same syntax everywhere. I wonder what you have to say about Julia, Lisp, Haskell and Scala. grin

To make the supposedly obfuscated idiomatic Astro code a bit clearer

In Astro:
- type (also class) declaration starts with the keyword 'type'
type Person

- variable declaration starts with the keyword 'let'
let age = 26

- function declaration starts with the keyword 'func'
func add(a, b): 
rt a + b

- rt means return

- functions return their last expression automatically, so the function above can be reduced to:
func add(a, b): a + b

- brackets surrounding function arguments are optional
add(2, 4) 
add 2, 4

- in Astro, a type that defines its fields in its declaration is called 'constructor type'.
- Such types declare a constructor and their fields at the same time.
- so
type Car(make, model)

- can be expanded to
type Car:
let make, model

func Car(make, model):
new(make, model)
Re: NGR, Nigeria First Made Programming Language by asalimpo(m): 8:33pm On Jan 05, 2017
appcypher:

I'm not the op of this thread. I'm thinking of starting another thread instead of hijacking this one.

There are just two people working on this and none of us are CS grads.

As for wiki or mailinglist, we don't have any yet, at least not until we make the interpreter public. And as for books to read, Dragon Book is staple, but it's quite large and can scare one away, i'm still not done with the book yet, I'm not even half way. My lang/compiler experience comes from a mixture of Dragon Book, videos, articles around the internet, scientific papers and experimenting with interpreters.

About the syntax of the language, well I believe the reason you don't find it familiar is because I wrote it in idiomatic Astro. I could have written it in a similar way to Python. Something like this.
type Person:
let name, age

type Employee <: Person:
let job, company

func Person(name, age):
rt new(name, age)

func Employee(name, age, job, company):
rt new(super(name, age), job, company)

func details(p = Person):
rt p.name, p.age

func details(e = Employee):
rt super.details(), e.job, e.company

let john = Person('John Smith', 33)
let tola = Employee('Tola Adeniran', 21, 'App Developer', 'CodeBuzz, Inc.')

println(john.details)
println(tola.details)

Now, compare it with the Python version. The code is now clearer. But Astro is not Python, it has its own way of doing things idiomatically.

And saying the syntax is not friendly is not true. You haven't even learnt Astro to assert that. Even Python has its idiomatic moments where a beginner won't have a clue what's going on. In fact, Astro is not really aimed at beginners.

I believe picking up a new language isn't really meant to be straightforward and as familiar as already known language. You shouldn't expect to find the same syntax everywhere. I wonder what you have to say about Julia, Lisp, Haskell and Scala. grin

To make the supposedly obfuscated idiomatic Astro code a bit clearer

In Astro:
- type (also class) declaration starts with the keyword 'type'
type Person

- variable declaration starts with the keyword 'let'
let age = 26

- function declaration starts with the keyword 'func'
func add(a, b): 
rt a + b

- rt means return

- functions return their last expression automatically, so the function above can be reduced to:
func add(a, b): a + b

- brackets surrounding function arguments are optional
add(2, 4) 
add 2, 4

- in Astro, a type that defines its fields in its declaration is called 'constructor type'.
- Such types declare a constructor and their fields at the same time.
- so
type Car(make, model)

- can be expanded to
type Car:
let make, model

func Car(make, model):
new(make, model)


The second version looks so much more approachable. About the syntax, well, it's not so offputting once's one get used to it. But i prefer familiar syntax. The reason , i find regex so disgusting. But it's my opinion.
And i think it's one reason , python rose to fame. It looked familiar. It's also y i think people flee from maths, its unfamiliar. I actually have some experience with clojure,lisp,and haskell, though not much. They're not bad after you get past the strange symbols. haskell , i think is fairly consistent. Clojure- can be messy as one gets into it. Perl is wacked. But i'm echoing the feedback of many first impressions. if it's strange and looks odd! many will be lost and scared to venture in. Y dyu think java got market adoption? verbosity! = more english like syntax.
Anyway that's my opinion. I'll try it out when it comes out.
The rt keyword is a winner. less typing. One can tell what it means at a glance.

(1) (2) (Reply)

Andela Will Empower Africa's Next Generation Of Great Technical Leaders / Why Are Most Nigerian Programmers Interested In Web Development? / How Lucrative Is Programming

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 103
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.