Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,589 members, 7,816,453 topics. Date: Friday, 03 May 2024 at 11:27 AM

Appcypher's Posts

Nairaland Forum / Appcypher's Profile / Appcypher's Posts

(1) (2) (3) (4) (of 4 pages)

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 7:17am On Jan 22, 2017
Something unpleasant happened. sad
There will be a delay.
But we will be back.

1 Like

Programming / My Solution To Nigeria's Problems by appcypher: 12:20am On Jan 22, 2017
> cd /home/africa
> mkdir canaan
> mkdir canaan/population
> mv nigeria/population/useful_ones canaan/population
> rm -rf nigeria
> rm -rf history/nigeria
> cd canaan/population
> touch start_from_a_new_beginning.sh
> echo "This is your last chance. F**k up again and I'll delete all of you!" >> start_from_a_new_beginning.sh
> ./start_from_a_new_beginning.sh

4 Likes 2 Shares

Programming / Re: Who Exactly Is A Developer. by appcypher: 9:04pm On Jan 19, 2017
talk2hb1:
I dunno
Why u con comment?
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 11:42am On Jan 18, 2017
Some significant changes made to the language so far.
- Functions can now be included inside type definitions. We discovered it saves some time when typing methods within the same file as the type.

- Changing from a goroutine concurrency model, to an actor concurrency model. The initial attraction to goroutine model was its ease-of-use and cheapness, it does not, however make useful attempt to prevent race conditions or deadlocks. After looking into the implementations of actors in Scala's Akka and Pony, we feel it's the better way to go.

Astro (not actual name) will be released next week. grin

3 Likes

Programming / Re: Must You Be A Mathematics Genius Before You Be A Programmer by appcypher: 1:19pm On Jan 17, 2017
samijay8:
I always have that love for computers, softwares, mobile and different innovation in computers, so I think going for programming is better too. Iknow iI suck in maths and paid a man wwho's is a VB.net developer for 20 years +. Sometimes I get the logic little by little but always tell me my maths is poor and maybe I may not be a programmer. I haven't get to him over a month cos I think I may have been wasting time over since cos of my maths problems. Do I really must be a maths genius to be a programmer
Obviously you don't have to be a math genius to be a programmer else there will hardly be anyone in the field. I won't say I suck at maths, but for most the parts I get away with logic and basic algebra. If you are not developing games or math-oriented apps, you shouldn't have problem with maths.
Maths is cool tho, once you understand it intuitively. Check out betterexplained.com

1 Like 1 Share

Programming / Re: Are They Cobol Programmers/jobs In Nigeria? by appcypher: 7:06pm On Jan 16, 2017
Craigston:
None that I've heard of. I recently got a whiff of Lisp and I'm itching to learning it soon. But those brackets...
Lisp is cool, but if you want a modern version of it, check out Clojure.
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 6:21pm On Jan 15, 2017
I can understand your position, but u didn't take note of what I said earlier. Why there is the need for new languages.
Old languages are reluctant to change. Everyone with a brilliant idea cannot just go into an old language and start tweaking it. One aspect that might need changing is the syntax, and once you start having that, you have yourself a new language.

And just like u said, the cost of adoption is free. Eventually it's the programmer that has the choice to adopt or not to adopt. I don't think there is any harm being done.

And saying language development proliferation is bad is somehow, since language development is a software engineering field. You can't say the development of software is too much, can you now?

And you mentioned established developers being out of touch due to rapid introduction of new languages. While that seem like a valid argument, it's not entirely factual. I can only count few new languages (less than a decade old) that have managed to get a sizable audience so far. And I won't say they have grown large or stable enough to displace any one's income.

And change is the only constant anyway. You have to move with the trend. There's nothing we can do about that, we are in a technological field.
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 2:30pm On Jan 15, 2017
asalimpo:

Language x lacks features a programmer wants, so he goes ahead and creates his own! Is that sufficient reason? No. The feature required could be incorporated back into language x and language x will evolve.
Yes it is enough reason to create his programming language. As long as he has the capacity to. Not only will he learn more from it, his idea unprecedentedly become revolutionary.
The only language that I know that makes it easy to incorporate new features is Lisp. Other languages are not that accommodating without breaking some feature or backward compatibility. So one does not just add a feature to an existing language cos its cool, the design goals of the language may not allow it, and the original design could prevent such feature from fitting well with the language. Apart from that the community or the language creator may disapprove it.
So what do you do then? Kill the idea?
No you create yours!
C# nko? java copycat. While microsoft could create c# because it had the resources to, It's existence wasnt a necessity. That it exists doesnt justify it's creation.
Or for intellectual stimulation of the creator.
What if microsoft instead of creating c# helped to invest in java, proposed their recommendations to java which was then incorporated into it? They'd be one less programming language on the planet.
Well MS can't just start supporting another intellectual property, I don't think things work that way. Like I said before, new languages come up because old languages have design goals and cannot just change radically. They evolve and that evolution can take a long time. See generics for example, C# did it the right way. Java tried to evolve it into its syntax, and it feels awkward, even up till now. C# added a lot of useful features Java may never have, and it didn't shy away from dynamism and some useful C++ features like operator overloading.
The fact they're a plethora of programming languages doesnt mean that that is the way they need to be or that it's a good thing. Look at more established fields, you dont see such fragmentation. The fragmentation only exists in programming because the cost of doing so is low? (just a computer and so on).
Look at architecture, civil engineering, accounting, law etc - You dont see this.
Is there a conceptual equivalence of programming language in other fields? I don't see the analogy here.
So what did ceylon and kotlin bring to the table that made a light and day difference?
What did D bring that the next c++ standard couldnt have addressed?
Y are javascript developers decrying the churn out of so many frameworks?
Because Exerybody is doing it.
How many build tools do you need to build a java program? there used to be 1 now they're 3.
But how many operating systems do most people use - only 1. that one keeps evolving, getting better?
But the programming community isn't geared towards evolving what it has, no! They're obsoleting what they have in favour of new shiny things. As a matter of fact, people are expecting new languages to be released seasonally the way people expect the entertainment industry to churn out new movies etc. And the programming community is rising up to meet this demand.
While I can go on and on about what some of these new languages bring to the table, instead I will touch on why they are needed and why they should continue.
The fragmentation you mentioned only exist among top tier languages. Newer languages only have little fraction of the audience or none at all
I don't think a programmer looks into language just cos it's new. There is a motive. The new language could have introduced something that could make his life easier, or he just finds the ideas interesting. Irrespective.
These research in language design and implementation should continue. Just like any other field the practical implementation of a concept is important. This is how we do it in computer science. We create new languages. If it works. Fine. If it doesn't, we move on and improve.
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 8:47pm On Jan 13, 2017
asalimpo:
Pony? Another programming language! shocked angry Warris happening.
These things are just coming outta the woodwork!!
Elixir is the buzz now. It hasnt died down, Nim, i read of some months ago but forgot the name.

Now pony? Are these people just out to fragment the market or are we seeing a web storm of programming languages? I'm yet to even look up ceylon or kiln.

Anyway, as they say in boxing, *gbagaun, gbagaun <bell rings>* "May the best man language win."
Pony doesnt even have a wikipedia entry!!
But with the flurry of languages coming out, trends is converging on unification . Using one language for one thing- that's y node is gaining traction. javascript in the browser and in the back end , displacing php.
I think some people have too much time on their hands, that's y , there's a new language everyday. Not that it's bad- but most of these languages barely have any kind of traction. They remain niche stuffs.
What's pony addressing that erlang didnt address? Concurrency? Erlang hit that on the head!!

The thing is there's always been a lot of languages. Most are niche, simple or exotic languages.
Nim, Julia, Pony, Kotlin, Ceylon, Elixir, Crystal, Jai, Quorum, etc are quite recent.

They all have reasons for being and the research into language design and development MUST NOT stop. They can't anyway. There is always someone out there who thinks he has a better idea how things can be done. And that's how innovation comes about. If language development was a passive area, we'd be stuck with old languages for years before some uprising occur.

Quorum is one of those languages that left me wondering how useful it can be in production. But then I realized how short-sighted I was for considering just my own criteria. Quorum, among other things, wants to make programming by speech easier, which will help blind people (for example) to program their own codes. Ideal or not, it's a new direction nonetheless.

Astro (I will call it that for now) came out of the necessity to create the first production-ready language from Africa.

There can't be too many languages. Why is that? Because one language cannot solve it all.
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 5:42pm On Jan 13, 2017
elfico:
To say I am impressed is a highly exaggerated understatement.

Wow! This is really great.

If you can open source, it would be a really great motivation for Nigerian developers in particular and African in general.

Kudos and thumbs up...
ChinenyeN:
I look forward to seeing and hearing more. Certainly, I look forward to playing around with this language once you release it.

I have found every bit of information in this thread useful. I am no where near...
Thanks guys.
We've been reworking the syntax of the language a bit to support Actor concurrency model natively.
If you need to know more about language that support actors natively, check out Erlang and Pony.
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 10:54am On Jan 12, 2017
FincoApps:


sad sad sad I've been following this thread ever since you created it... just learning from the discussion and also admiring the intelligence displayed in the thread. (It's unlike Nigerians)

I was here today to respond to a comment that asked why people would use Astro.... My response would have been "personally because of the pretty name" but now it's been changed sad.

Great job on it by the way... I love how you agreed you are not sure of it's niche yet..... It's 100% normal... please go on with the great work
Thanks for the following.
For now just consider Quadro a codename.
We will need to make more research into the language name before its release.
Astro was a good name, but it can't be used.
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 11:26pm On Jan 11, 2017
Renaming to Quadro.
Astro is taken. sad
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 10:27pm On Jan 11, 2017
asalimpo:

Hey Nypro, good to meet you. The language i'm working on, is only a language in the sense that, variables can be created, functions can be invoked , decisions can be made ,if-else and looping thru collections can be performed. It's ultra tiny. It's syntax is very mundane and similar to any c,java programmer. no suprises.
It was written (still in progress) to get work done. So that i never have to spend more time writing the kind of code this language is designed to solve. It's unoptimized and i'm just using brute-force logic/thinking to put it together. I'll publish it here when i'm done. Compared to what you guys are working on, its a toy.
The typing is dynamic . It's hundred percent functional. u pass arguments to a function, invoke it, get a value. It's written from the point of view of the compiler/parser writer rather than the user. Because of this,
its syntax is a bit not too user friendly. e.g
no infix notation.
because, it's just cumbersome on the backend re organising things into <function> <args> format.
so the user just has to do manually from the get go.
That means, addition will be +(2,3,4,5) and not 2+3+4+5.
so the compiler can call function '+' and pass it arguments 2,3,4,5 - without needing to reorganized them
as would be the case if they were infix based.
Creating an extensible type system though is quite knotty.
It's things we take for granted when using languages but how does one hack it all together neatly?
The inheritance heirarchy of types has to be created and the type inferrer has to know how to intelligently
infer parent types from subtypes if the need be. abstract parent types have to created if need be.
All this things have to be done , just to get a little functional script to run!!! see work!!
But without this general groundwork it will not be possible make something generically usable!! AFAIK.

Why am i creating it? I want to automate some tasks and abstract the process generically enough that variations of such tasks can be addressed quickly whenever they arise. Hence this!
Maybe if i knew python, it wouldnt be necessary. But ...
Seems you want a simple language.
If there are just functions and variables and there won't be user-defined types, I don't think you need all extra complexities of a well-defined type system. You will need some form of type inference, but it won't be that complex if there are no user-defined types.

BTW, in Astro ur example can work both ways.
func +(...args): 
sum(args)

func +(a, b):
a + b

+(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 5:46pm On Jan 10, 2017
We are changing Astro's concurrency model from goroutine-like to actor-like. We've not implemented the goroutine model yet, so we can still change the language a bit to better accomodate actor-style concurrency.
Major reason for this change is that goroutines don't handle error as well as actors.
I'm taking my time to properly understand how erlang or akka actors can make Astro a better, fault-tolerant language.

1 Like

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 10:46pm On Jan 09, 2017
Craigston:
@appcypher
Will there be support for templates (function/class templates) and function overloading in Astro? I've found those features useful in C++ (well, templates may have performance overhead in execution time for an interpreted language, but they're powerful; will there be a way of compiling Astro?).
Astro has generics, so yeah, you will get templates.

Will there be Perl-style regular expressions (like PCRE), or are you using a different regex engine?
I actually don't understand what Algebraic data types are (they seem to be related to functional programming); can you help me explain them.
Astro has language-level support for PCRE just like Perl and Ruby.
The simplest way of putting Algebraic Data Types is probably seeing them as a combination of types to form other types. Kinda.

Addition = Number, Plus, Number
They usually come in handy when u are developing a DSL or some structured grammar.
Programming / Re: For Computer Science Students by appcypher: 12:17pm On Jan 09, 2017
azibit:
Speed of Execution is Overrated
One programming language is usually faster than the other and the speed of execution is usually one of the key reasons why a certain language might be preferred over the other. However, you should not become obsessed with speed of execution while deciding which programming language to use for a project because of speed.

Java is fast but C is faster. So should I design my application with C because of the speed. Speed is not the all time determinant of what you should do. This is because it usually take a badly designed application for users to figure out how slow an application is.

Python is indeed very slow in execution but you do not log onto dropbox and begin to complain that the application is slow. In fact, if you do not know that the application is built using python, you would not have anything to say about the speed.

I write about the issue of speed because you see a new framework or language comes out today with the hype of being faster. Speed of execution is far overrated and I believe languages should begin competing in which is easier to learn and use for building awesome applications.

With these, I believe every programming language would indeed be focused towards making it easier to use by human rather than to be obsessed about how the computer sees and runs it.
While I agree with the issue of readability over speed. In some cases, ppl still want the speed or the manual control of memory resources. Not everyone is writing high-level application. Some are writing drivers, kernels, operating system, the inner part of a game engine, scientific computing, etc.
So those languages/frameworks that claim speed are very needed. We need Rust, Julia, Pypy, etc. Readability shouldn't suffer tho.

1 Like

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 11:27am On Jan 09, 2017
silento:
nice work but c pointer rules no pointer no coding
grin grin grin. If pointer arithmetic is what you want, by all means, stick with C. You won't get that with Astro.

1 Like

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 2:56am On Jan 09, 2017
Craigston:
From the screenshot you shared, I find the syntax of Astro quite intuitive. For instance, in variable declaration,
var appcypher = Str
reads better as "variable appcypher equals a string". Somehow, I like it that way for declarations. But I'm comfortable with other styles too so I'm not trying to nitpick.
I see Astro supports list unpacking too; I've always loved it in Python.
On line 18 of the screenshot, you accessed more than one property of the 'facelessManipulator' type (object?) without repeating the type name. Nice syntactic sugar there.
Can you explain how inheritance works in Astro? It seems one can define certain members to inherit from a super type (line 13) without relying on member scope (public, private, or protected).
I see you took some of your time to study the little details I've left so far. I truly appreciate that.
Astro uses a Multiple inheritance model just like Python.
type Monkey
type Bird
type FlyingMonkey <: Monkey, Bird

You can also have abstract types by adding 'ab' to your type declaration. This simply means the type cannot be instantiated.
type ab Person 
let person = Person # error! type Person is an abstract type and cannot be instantiated.

Abstract types are useful for a lot of things. It can allow us to implement Java interfaces for example.

There are access modifiers in Astro, tho not as elaborate as Java's.
Astro has hide modifiers for fields. Hide is synonymous with protected in Java. It means such fields can only be seen and referenced by the type's (or subtype's) constructors and their associated functions.
type Account
let .password = Int # the dot signifies hidden access

Contents of a module (also a file) are public by default. You can make a module primitive private to prevent other modules from seeing or referencing it.
let `rent = 30_000 # the back tick signifies private access

Astro doesn't have package-level access. Nypro claims it is used less in practice and that Java has it because it allows just one class per file. If we see the need for it we will consider having it in Astro.
That logo in the terminal is so Juliac smiley
Astro's REPL is inspired by Julia's. smiley
Is that the atom editor?
Yes, it's an Atom editor. We are implementing the IDE on Atom. Nypro also wrote some Astro plugins for Sublime Text, Vim and IntelliJ, but Atom is our main focus.

1 Like

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 8:02pm On Jan 08, 2017
tohero:
At first, I was understanding the comments. Now, I don't know if I understood what I taught I understand.

A very good one for the initiative.

As Astro gotten to the production level? I meant if it can be used in creating some apps right away.

If yes, are there any tutorials that introduces the Lang? Majority won't want to know the cores the thread has been discussing at first... Maybe later.
Its interpreter hasn't been released yet so it's not production-ready, and probably won't be for a while after release.
It's certain we'll have a lot of bugs to fix when user reports start streaming in. wink
After the interpreter design has been finalized, we will move on to machine code compilation with LLVM.
As Asalimpo has said, you may need to leap back and talk more on what makes astro better rather than the generics.

Nice one again!
I think I've touched some parts that makes Astro different from other language in previous comments.
Lemme put it thus, to make it clearer for people who have the same question.
Astro is an object-oriented multi-paradigm scripting language that brings with it the benefits a static type system (looks like Python, moves like Java).
Astro also introduces an new intuitive way of doing OOP (using Multipe Dispatch and UFCS) and maintains a design consideration to make technical computing easy.

Astro ≈ Julia + Crystal + Nim
Programming / Re: If There Is A Piece Of Code You'd Hang On Your Wall, What Would It Be? by appcypher: 4:42pm On Jan 08, 2017
CodeBlooded:
Class CodeBlooded{
Booloean alive;

While(alive){
breath(oxygen);
study(programming);
Bleep(pussy);
drink();
}

System.out.println("RIP"wink


}


}}
No make(money)?
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 4:24pm On Jan 08, 2017
asalimpo:


I wasnt criticizing Astro's syntax in that rant. But rather the fact that some resources are not accessible to people who are interested because of some unnecessary barriers which turns off the uninitiated. I was talking about compilers and such books and stuffs. And stating my opinion on mathematics too, there have this artificial stiffness that people in the community (academics) feel have to be maintained to preserve that aura of mystery about the field. It's the same thing with the legal profession too. It was a general rant not directed at your language and syntax at all. We'd discussed that earlier b4. Actually i'm a fan of keep it ultra simple. And to do these, new concepts should be marketed in the symbols the uninitiated are already familiar with. That's y, python, presented in english-like syntax, is approachable to people new to programming.
And y maths is 'hard' because, i believe, wen thinking on a problem, the syntax could get in the way.
But's its all a philosophical rant,not a bash or critique at Astro, though i had previously critiqued it on that ground.
Oh, sorry I misinterpreted you.
Yeah, the Dragon Book is quite heavy, and picks up complex concepts rather fast. My own problem is with the length. I got tired reading it, but I revisit it once in a while to understand certain things better. But the ultimate resource that got me on my feet quick is this youtube tutorials.
As for maths syntax, I don't think it is that bad. I definitely don't want to be typing 1 plus 1 minus 5. There is a point where simplicity becomes a hinderance, and there is a point where terseness becomes terrible.
I'm more critical of how mathematical concepts are explained in traditional educational system. No practicality, just bunch of abstract concepts to memorize.

I welcome critiques on Astro tho, don't let my previous reply deter you from assessing Astro.

1 Like

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 12:36pm On Jan 08, 2017
asalimpo:

My opinion is that in fields like these, they're no resources that can guide the curious and interested into learning steps of how its done. The dragon book has been criticized as being hard to read without math background. The entire process is made to look more complex than it is. Thanks to the community around it.
Mathematics for this very reason is archaic and needs an overhawl of its syntax,which is ugly and unfriendly.
I know it's a tall task but if you look at the trends of successful languages, you find that the familiar, e.g python, win market share over the unfamiliar. Just because of their syntax.
Just my rant, though.
The thing is Astro is not Python. The design goals of python are different; to be simple and expressive. Astro chooses intuitiveness and saving programmers time. Redundancy is good in some cases, in some other, Astro makes it optional.

Familiarity is also relative. Imperative guys will see Python as familiar. Functional folks will think Erlang familiar and scientific (Matlab and co.) people will find Julia syntax familiar. Astro is more in the imperative camp with a touch of functional and scientific.
We are not really competing for market share here; just ideas that can make some parts of coding intuitive and easier. smiley

Astro syntax is not even that new. I believe polyglots should find it familiar and, with introduction to certain concepts, should be able to command the language well.

Designing a language is freaking far from easy! We wanted it to look very Pythonic in the beginning, but syntactical tradeoffs had to be made for some concepts (that are not in Python) to make sense. We can't betray intuitiveness just because we want it to look absolutely like Python. Even Nim and Crystal couldn't do that.

So maybe Astro is not for everyone looking for familiarity, but it's definitely for people looking to try out new things; new concepts that might make their coding lifes easier.

1 Like

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 8:42am On Jan 08, 2017
stack1:
Hmm, this is a very interesting development, but i cant say much till we've been able to write some code for the interpreter to run
True. We are actively working on that.
, but BIG KUDOS to you guys for even attempting something like this, so how do you generate machine code, LLVM backend ?
We are working on just the interpreter now. LLVM is planned for the future.

1 Like

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 12:28am On Jan 08, 2017
asalimpo:
I think those who've used multiple inheritance can vouch for it. I heard a c++ programmer who said java was rubbish (back in the day though).
But the industry is moving away from it. It was drummed into me through many java authors that multiple inheritance and goto is bad.
The problem with multiple inheritance is that one could betaking in far more than is necessary.
Inheriting and having access to all the codes in a higher heirarchy is in the least, philosophical impure.
So we're back to square one. Both approaches have major flaws.
A programmer could inherit from a class where he needs just one method, but gets exposed to
so many methods and client programmers using his code could exploit that access.
With interfaces, its cumbersome to implement unnecessary methods - but interfaces could be finetuned
such hat clients implements those that reduce boiler plates.

Anyway, since its all about where to move methods to in a parent class, can't he artificiality of enforced contracts in interfaces be solved by simple creating smarter interface objects? One in which methods that dont need to be implemented in sub classes can be made. I think java 8 has something like this. If it happens then,
the same things multiple inheritance seeks to accomplish will be achievable in single inheritance languages.
But be it as it may, with more power comes more complexity.

The 1 based indexing seems due anyway. It's one area noobs always get stumped when learning programming.
I like your argument. smiley
There are truly camps for and against Multiple Inheritance and it is true that modern languages are moving away from it. Language moving away from old concepts and adopting it back is nothing new tho. Multiple dispatch was implemented in Lisp but never got wide-scale adoption afterwards. Julia took the concept and polished it, which is why Astro is adopting it.

MI is already designed into the language, removing it will need thorough planning for an alternative. Maybe in the future when there is a convincing proposal for why Astro should use some other Inheritance mechanism, then MI can be replaced in Astro.

I believe you are pragmatic, so philosophical impurity can only be determined by how well a concept works in practice. Let's see how MI fairs with the language first. If it proves unusable or bad, we will consider an alternative.

1 Like

Programming / Re: What Programming Languages Are A Waste Of Time To Learn? by appcypher: 10:14pm On Jan 07, 2017
What Programming Languages Are A Waste Of Time To Learn?
None!
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 10:05pm On Jan 07, 2017
Emmach10:
Good one Appy. Where can I download and test run the compiler?
It's not available to the public yet.
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 10:04pm On Jan 07, 2017
asalimpo:
The multiple inheritance thing! It's considered bad design practice today. Modern languages are all single inheritance. Reduces complexity.
Maybe it's a fallout of ur c++ roots.


Actually, i think more programming languages will come out nigeria/africa in the future, because i find that as one programs, he tends to write automation scripts which are mini languages. In time, he'll want to know how
actual languages are written. So while we're late to the programming game, with time our maturity will manifest to the world.
Multiple inheritance is not considered bad design practice, its implementations are.
Many with experience of multiple inheritance will tell you there's nothing wrong with the concept, just the way some languages implement it. C++ is an good example of why people hate multiple inheritance. You hardly hear the same story from people who use Python, Eiffel or CLOS.

And Multiple Inheritance is hard to implement right, so a lot of modern language designers tend to skip it altogether.

Multiple inheritance is super useful when implemented right. It makes OO even easier to reason about. Interfaces, Traits, Mixins and all the other alternatives feel like you have to do extra unintuitive work. Interfaces for example require you to implement methods every time you use it. In fact, the diamond problem still exists with Scala Traits, but the language knows how to handle it properly. In short, it's the implementation that matters.

I would like to have a WorkingStudent type that inherits from both Worker and Student and that's it. I don't care if Worker and Student both inherits from type Person, which results in a diamond problem. And I don't want to manually reimplement methods with every inheritance.

There! You need multiple Inheritance. Multiple Inheritance allows reuse of code.

1 Like

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 5:13pm On Jan 07, 2017
asalimpo:

The UFCS thing is just greek to me.
The multi dispatch too. I use java, know a little of others, played with go last 2 year so i grok goroutines. But i dont know what the multi dispatch is.
Astro has types, they are synonymous with classes in conventional OO languages, except that you can't have functions inside of Astro types. In that sense, they are more like C structs. You only declare fields within a type.

Astro has functions and they are just like C functions.
With these, Astro is able to emphasize the separation between data (types) and operations (functions).

The OO languages you see are usually either completely class based (Java) or a mix of procedures and classes (C++, Python). Astro, however, does OO without using classes. Just types and functions.

The key to achieving this is a delicious mix of Multiple Dispatch and UFCS (Uniform Function Call Syntax) grin

Multiple Dispatch, simply, is the technique of calling the right function by checking the types of the arguments passed to a function. This definition is not entirely right, but for the sake of this discussion we will go with that.
func add(a = Int, b = Int)
func add(a = Float, b = Float)

If we type add(5, 9), the first function will be called. If we type add(3.5, 1.2), the second function will be called. So the appropriate function is called based on the types of the arguments. This may look like method or function overloading, but it isn't. Multiple dispatch is usually determined at run time and does more than method overloading, like using subtype polymorphism in dispatch process, etc.

With multiple dispatch you can just have only functions and apply them to objects. No need for having methods inside classes.
type Person (name)

type Employee(name, job) <: Person

func details(p = Person):
println(p.name)

You can create an instance of Person and just apply the details function to it.
let daniel = Person("Daniel Okoroha" )
details(daniel) # "Daniel Okoroha"

Because Employee is a subtype of Person, you can also apply details to instances of Employee.
let george = Employee("George Adamu", "Digital Artist" )
details(george) # "George Adamu Digital Artist"

That seems straightforward. So why do we need to define methods then? Well, some may say beacause of dot notation. details is just a function, not a method, you can't do daniel.details(). You can only do details(daniel).

Well that's where UFCS comes in. It's the unification of function syntax with dot notation syntax. Who said we can't use both, huh?
daniel.details() and details(daniel) are valid in Astro.

In essence, this means we can call a function by it's first argument.
So if we can do: play(game, at:"30fps" ). We can also do game.play( at:"30fps" ) cool

And why is using functions only cool?
We can extend a type just by writing a new function for it, even if we inport the type from a foreign module. Methods however can only be written inside their classes.
It also zips the gap between methods and functions. Why should they be treated differently?
It also allows you to focus your attention separately. types contain the data, functions operate on the data. Data vs Operations. Why have operations (methods) inside of data (classes)?

There is a particular function in python that some people have clamored for to be implemented as method.
With Astro, you can use either. It's your choice.
len([1, 2, 3]) or [1, 2, 3].len(). 
Although in Astro the function is named size.
On the github page, i saw no code. I wanted to download and check it out.
We have not made the interpreter's code available for obvious reasons. It's neither complete nor stable. You could get several memory leaks. That's why I tagged it near release. But we can make it available if you don't mind f**king up ur system grin.
- Multiple inheritance! shocked shocked shocked
Yes multiple inheritance grin. Are you afraid of it? We are not. It's the implementation that matters.
Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 3:49pm On Jan 07, 2017
orimion:
From the logo.png, it looks like index starts from 1(not 0). Why?
Astro uses 1-based indexing. Nype feels it's more intuitive, and matches the way we work with maths.

0-based index languages, like C or Python, make you think in offsets of the index rather than the index itself.
    Astro   -    1    2    3    4    5
[h] [e] [l] [l] [o]
Python - 0 1 2 3 4

Astro  -> list[1] = 'h' # returns the element at the actual index
Python -> list[0] = 'h' # returns the element at the offset of the index

Slicing in Astro is more intuitive as a result too.
Astro  -> list[2:4] = 'ell' # returns the substrings at the actual indices
Python -> list[1:4] = 'ell' # returns the substrings starting from the offset of
# the first index, but without the offset of the last index

At the end of the day there are both pros and cons for using either methods. We chose intuitiveness.

4 Likes

Programming / Re: Astro Programming Language 0.2 (indefinite release) by appcypher: 12:35am On Jan 07, 2017
asalimpo:
this is what i think any serious person wanting to consider the language will ask:
1) Why should i use ur language when there are other languages out there? In other words
what are the compelling objectives of the language?
It's this that are it's unique selling points.
see :
clojure - modern lisp on the jvm, fixed mutable state issues that makes multi threaded programing a pain.
python - easy to write and read.
ruby - fully oop. Make programming fun again
rust - c++ replacement, safer, system level lang etc
lua - very fast small efficient scripting language
erlang - highly fault tolerant. 99.999% uptime!
etc
Astro needs a compelling set of objective(s) to sell. I dont really get what they are.

2) What about libraries
Decent set of libraries to lure developers.
It's new but 2 needs addressing too asap.

1.) Astro is a modern language that took careful consideration of useful features in several languages.
- It borrowed goroutines for fast, cheap concurrent routines
- It aims to be both compiled to both machine code and bytecode
- It makes OOP a breeze with multiple dispatch and UFCS
- It is maths oriented, this can be seen in its list representation.

In short I would say Astro is a fast embeddable scripting language with modern features. This description does not really represent Astro well, as I've mention earlier on this thread, it is hard to niche Astro, as it can be used for stuffs beyond just scripts or high-level programs. That's why I put in the same camp as Swift. If you check for "the goals of Swift language" then you will know what I'm saying.

I think it is this ubiquity that makes Astro potential, it can be used to write anything from a script down to a kernel. You don't have to switch languages (Python to C) along the way. And with our plans for web assembly target, Astro will have a place in the Web.

2) Libraries (and a package manager) are obviously a planned feature. I've actually started implementing some naive algorithms myself grin. And for existing libraries, we plan to provide hooks that will allow calling Python and C functions directly.
Programming / Re: NGR, Nigeria First Made Programming Language by appcypher: 8:47pm On Jan 06, 2017
asalimpo:


On amazon , with shipping it will be over $200! (>N100k). No sir,
It's not a priority now. Was wondering if i could get it locally. It's not a priority though.
grin grin Just stick with pdf version then. Even if it is available locally, it will still be expensive.
Programming / Re: Friendosphere.com is there for you, developer-inclined website by appcypher: 4:23pm On Jan 06, 2017
DanielTheGeek:
Haven't talked much about it, but Friendosphere is a community that has lot's of features you'll love. Let me list out some features:

* In-built messaging feature (not e-mail to e-mail style messaging)
* Ability to create groups
* Ability to upvote and downvote
* Automatic movement of threads to the front-page (It's based on amount of upvotes the thread gets)
* Movement of off-topic threads
* Really cool ban bot (Won't hurt your feelings)
* And others
Cool, your site looks nice. wink
How come I'm just finding out about it now?
BTW, I feel, you need an Android app to back this up.

1 Like

(1) (2) (3) (4) (of 4 pages)

(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. 137
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.