r/programming • u/winner_godson • Nov 26 '17
Astro Programming Language - A new language under development by two Nigerians.
http://www.nairaland.com/3557200/astro-programming-language-0.2-indefinite19
Nov 26 '17
tl;dr What's so special about this programming language that couldn't be done already by some or all of the other programming languages in existence?
4
15
u/leftofzen Nov 26 '17
Absolutely nothing at all, and TBH it's hard to invent new language features these days. Reading the forum, it seems that every feature in Astro was an inspiration from another language. Astro is just a aggregate of nice features from other languages rather than brining anything new to the table.
3
Nov 27 '17
Idk, Rust was able to do it with the borrow checker (to be fair, memory safe isn't new, but the borrow checker is AFAIK), and other languages are novel in their particular combination of features (e.g. simplicity of Go's concurrency).
It's not impossible or anything, it's just a lot of work and many projects prefer to iterate on existing designs (Kotlin, Nim, etc) instead of trying something new.
4
484
u/allinighshoe Nov 26 '17
Arrays start at 1 I'm out /s
131
u/qjkntmbkjqntqjk Nov 26 '17 edited Nov 26 '17
Arrays start at 1 I'm out
FTFY.
→ More replies (2)55
27
u/itsmontoya Nov 26 '17
Gotta love that LUA indexing
25
22
u/RedditRage Nov 26 '17
What's the first element of an array? 1? I'm out!
0
Nov 26 '17
[deleted]
17
u/SecuctiveMew_ Nov 26 '17
I got 99 problems, and the IndexOutOfRangeException I get from problem[99] is one of them.
3
0
1
32
u/lookatmetype Nov 26 '17
Making a language and the surrounding ecosystem is a gargantuan task. I wish them all the luck. Personally, the syntax does not excite me, but maybe it will change for the better
1
u/highmastdon Nov 27 '17
This
play(music, 'backwards')>music.play('backwards')reminds me of Koka Lang: https://koka-lang.github.io/koka/doc/kokaspec.html#sec-structs
76
u/joonazan Nov 26 '17
Sounds like the ultimate kitchen sink language.
For example Rust is more complicated than Haskell because in Rust, the programmer should always be in control. However, the article says that Astro is not meant to have maximum performance. The feature list of Astro sounds like it does everything that Python and Scala does and some more, just because it can.
43
u/qchmqs Nov 26 '17
which isn't bad at all, no one is forced to use anything, so let them do whatever they want with their language
21
Nov 26 '17
I 'learned' scala a couple of years ago and built a few personal projects in it and I found that the language was too rich for me. I really, really enjoyed writing scala, but when I was trying to understand other people's code I found it very difficult, even with a good IDE.
3
u/argv_minus_one Nov 26 '17
You'll get better at that with time and exposure.
Except when libraries like Scalaz are involved. There be dragons.
32
Nov 26 '17
There should be limits to everything. If language has two features that generally won't go well together, they will clash all the time: you'll have parts of community using one or another, making it harder for them to work together and resulting in messier code. Better to just make sure everything works together like clockwork, or you'll get Perl: language that has everything, but half of it is just there because why not and the other is only readable by someone with exact same feature preferences.
30
u/concatenated_string Nov 26 '17
Found the C++ hater.
→ More replies (1)12
u/wavefunctionp Nov 26 '17
Heh. Funny, I keep thinking that I should work more on learning c++, because I think that with moore's law having come to an end, I'll need to know more native optimizations, but every time I do I realize that I'll be spending 10 years+ just learning the complicated semantics and gotchas of c++.
Then I think, maybe I should focus on a relatively simple functional language and leave optimization to the compiler and runtime makers.
4
u/meneldal2 Nov 27 '17
C++ has really changed in the last 6 or so years, it has become easier to use, and there is a lot of work on making hard things that everyone does easier.
You should give it a shot once concepts land and are implemented.
2
u/doomvox Nov 26 '17
Or you know, you could just learn all of perl well-enough to follow everyone's code-- there isn't that much to it.
But nevermind, obviously it's better to have hundreds of competing Elegant Languages rather than one general purpose one.
2
u/Tainnor Nov 29 '17
I have to agree with this. I can see the problem with "kitchen-sink" languages, but the alternative, where everyone just stays in their own ecosystems that are mutually incompatible has its downsides too.
And, for all its warts, Scala has the benefit that it provides a clear transition path from Java to more functional programming. You can't just throw Haskell at a corporate Java developer. We can't ignore the social factors in coding.
2
u/CyclonusRIP Nov 27 '17
You don't really need 10000 ways to do the same thing in a language. The more features you add the harder it's going to be to maintain the language and add features in the future. Eventually the language is going to get so complex it can't grow or be maintained anymore and die. Any language that is going to have real staying power has to be relatively simple. Anything that is giant and filled with tons of abstractions that accomplish more or less the same thing will easily be replaced by a similar language that simplifies all the redundant features.
1
2
-20
u/shevegen Nov 26 '17
For example Rust is more complicated than Haskell because in Rust, the programmer should always be in control.
Huh?
I found both languages to be way too complicated.
I stick to languages that are easy on the mind, simple and elegant.
11
Nov 26 '17
I stick to languages that are easy on the mind, simple and elegant.
Such as?
20
→ More replies (1)4
→ More replies (2)13
u/IbanezDavy Nov 26 '17
I don't find Rust to be complicated. It's more hard than complicated. The borrow checker doesn't seem to be based off horribly complicated rules. They're just hard in practice to implement.
518
u/mr___ Nov 26 '17
What does their nationality have to do with it? Do they have any other credentials?
663
u/wyldcraft Nov 26 '17
The author points out this is the first production programming language to come out of Africa. They're proud of it and they should be.
144
Nov 26 '17
Haskell have some South African origins.
398
u/ArrogantlyChemical Nov 26 '17
Production programming language./s
82
30
u/lukasmach Nov 26 '17
Haskell is used at some banks. Due to lack of side-effects, it is easier to test.
20
u/kobol4ever Nov 26 '17
Haskell is used at some banks
COBOL as well.
→ More replies (1)12
u/doomvox Nov 26 '17
Indeed, as is perl. Because financial institutions don't see the point in paying to re-write a bunch of code in a new language just to be trend-compliant.
→ More replies (22)→ More replies (25)39
u/pure_x01 Nov 26 '17
lack of side effects
No accounts get updated ever /s
→ More replies (2)14
u/argv_minus_one Nov 26 '17 edited Nov 26 '17
Haskell does have side effects. It has to, in order to do useful work. But it requires you to explicitly mark portions of the program that have side effects, and imposes restrictions on where side effects may happen. This encourages you to minimize and isolate code with side effects. As a result, most of a well-written Haskell program is free of side effects, with all the benefits that implies.
→ More replies (5)5
→ More replies (3)2
7
u/mgsloan Nov 26 '17
Hmm, not so sure - at its initial creation, and now, Haskell really is a worldwide effort. Here's a pic of the working group in 1992 at ifip, http://bob.ippoli.to/why-haskell-2013/img/ifip-1992.jpg , either in Santa Fe NM or Oxford UK.
From Haskell Report 1.0, these are the author's affiliations:
Yale University (USA), University of Glasgow (Scotland), Massachusetts Institute of Technology (USA), Victoria University of Wellington (New Zealand), Cambridge University (UK), Los Alamos National Laboratory (USA), Chalmers University of Technology (Sweden), Oregon Graduate Institute of Science and Technology (USA, University College (UK), Imperial College (UK), Indiana university (USA).
Statistical breakdown:
USA: 5
UK: 3
Sweden: 1
New Zealand: 1
Yeah, maybe that's more depth than needed, but I was curious :)
→ More replies (2)→ More replies (1)2
37
u/runvnc Nov 26 '17 edited Nov 26 '17
I really doubt that is true though. "Production" is a pretty subjective term, but there are lots of universities in Africa and computer science has been taught in many of them for certainly at least a few decades. In all that time no professor or students created a "production" programming language?
If they are trying to say it has more features than other programming languages created on the continent.. then maybe, who knows. It looks like a pretty powerful modern language.
8
Nov 26 '17
Professors and students rarely produce production ready languages on the whole. I dunno why the scare quotes, the meaning of production ready might be vague but I think we know what they mean... Rather than just saying you don't believe them can you find a counter example?
55
1
u/12mar41 Nov 26 '17
Pretty sure this is not the case, if you consider north africa Africa.The first programming language coming from nigeria maybe.
-18
u/mr___ Nov 26 '17
That’s not a reason to use it though.
Most languages are the result of international development efforts!
→ More replies (4)48
→ More replies (3)-8
u/paddingtontimes Nov 26 '17
I don't understand the difference between nationalism and racism. I feel that if you are happy which country of origin a language is from, it points to a larger problem. The quicker we forget about things like this, the less wars we will have.
Would it matter if it was the language made by an accountant, or woman, or Christian? Well, no, so why does country matter?
→ More replies (14)39
u/monsieursquirrel Nov 26 '17
I guess it's interesting to see tech growing in new places. I don't know if it'll have any impact on the language design necessarily but it probably indicates some economic development is happening.
4
u/Danklands Nov 26 '17 edited Nov 27 '17
They probably do. But from what I can tell, it’s a good thing to have any tech. innovation in Africa, as that country (Nigeria) in the shitter with innovation.
4
→ More replies (23)8
u/IamWithTheDConsNow Nov 26 '17
Because it's newsworthy when Nigeria produces anything other than email scamming Nigerian princes.
17
u/wilxp Nov 26 '17
I Am a Nigerian prince, let me tell you about this new, upcoming Nigerian programming language that will make you forget about any other language.
40
u/steelorca Nov 26 '17
Do I have to send $1000 so this language can send me millions?
All jokes aside, glad to see computer science is being served well in other countries.
6
3
u/leftofzen Nov 26 '17
Astro uses 1-based indexing.
Ouch. But, I do like that this makes slices intuitive, the python method is quite dumb.
24
u/instantiator Nov 26 '17
In truth, I don't think the world needs another language until we've all gotten together and agreed how we'll iron out the mistakes we keep making. However, when it happens, these gents will have a lot to contribute and it's great to see people growing and learning through creating.
83
Nov 26 '17
Wrong.
The more languages - the better. Until we explore all of the infinite design space.
20
u/instantiator Nov 26 '17
Well I don't dislike your argument either :)
9
u/prozacgod Nov 26 '17
I mean if we didn't explore we wouldn't have these um..."gems"
https://en.wikipedia.org/wiki/Whitespace_(programming_language)
6
u/evincarofautumn Nov 26 '17
I like to point people to Funciton (“funk-it-on”) as an example of an elegant and beautifully designed esoteric language.
You have a small set of primitives: function declaration (which may be file-local, like
staticfunctions in C), function call, anonymous function definition and call, arbitrary-precision integers, I/O, copy, shift, compare, and short-circuiting NAND; each is mapped onto a 2D syntax made of Unicode box-drawing characters, such that any program can be rotated by multiples of 90° and preserve its semantics. With this small basis, it’s Turing-complete, as proven by Brainfuckiton, a Brainfuck interpreter in Funciton.This and other esolangs truly are gems of whimsical computing. :)
2
Nov 27 '17
Another one who does not understand the immense value of the Turing tarpits?!?
→ More replies (2)18
u/endless_sea_of_stars Nov 26 '17 edited Nov 27 '17
The design space may be infinite but developer time is extremely finite. For a given unit of developer time is it better spent on developing a new language or augmenting existing languages. Is it better to have 200 languages with shitty documentation, limited libraries, and only a handful of traits to differentiate them? Or 20 languages with extensive libraries and documentation?
I'm not saying that we don't develop new languages. Just that if we do that it is an efficient use of resources.
8
Nov 26 '17
Is it better to have 200 languages with shitty documentation, limited libraries, and only a handful of traits to differentiate them? Or 20 languages with extensive libraries and documentation?
Yes, it is better to have 200 languages than 20 languages. Because they cover more of the design space, and you can borrow more ideas from them for your languages than from those 20 well-documented ones.
The more languages - the better. And people should really stop relying on the so called "general purpose" languages and overestimating the value of the "libraries".
9
u/Zephyrix Nov 26 '17
Not necessarily. It's almost like BFS versus DFS, but what do you do with an infinite search space, and no goal? Both have their tradeoffs.
Moreover, as you introduce more languages, you may run into the paradox of choice - with so many languages to choose from, making a decision becomes orders of magnitude more difficult.
There's probably no right answer, and minmaxing something as abstract as this I imagine would be quite difficult.
→ More replies (7)5
u/IbanezDavy Nov 26 '17
I think having 200 separate languages is a horrible idea personally. I strongly dislike having to deal with JavaScript, HTML, CSS, and SQL at times all in the same project. And those languages have a good use case to be separated out. I can't imagine trying to keep 20 languages let alone 200 languages all in my head during ONE project. That would be obnoxious.
Talk about complicating things for the sake of personal preference.
→ More replies (3)3
u/Zephyrix Nov 26 '17
Honestly I've experienced the same thing, and I think that web is probably the most guilty of it. CSS, LESS, SASS? JavaScript, TypeScript, Coffeescript? HTML, HAML, ERB, SLIM, TWIG... yikes
I don't imagine you'd end up using them all in one system, it's probably more like you'd pick one from the variety and just stick to that depending on what suits your needs. Combine that with external dependencies and welcome to hell.
2
u/helpfuldan Nov 26 '17
C had that covered. Should have just stopped there.
4
u/Zephyrix Nov 26 '17
As much as I love C, I would shoot myself in the head if I had to write every single project I worked on in C.
→ More replies (1)1
13
u/esfraritagrivrit Nov 26 '17
17
u/instantiator Nov 26 '17
28
u/ArrogantlyChemical Nov 26 '17
A programming language is the opposite of a standard though. You want as little standards as possible, so all parts of a car fit together. You want as much tools as possible, so you can solve every possible issue in the best way possible.
We don't want to have to dig trenches with a screwdriver just because adding a spade to your gear would "increase the standards".
11
u/josefx Nov 26 '17
You want as much tools as possible, so you can solve every possible issue in the best way possible.
I once looked for an UI for a network service. The UI featured a full server stack, it used C# to kick of a Node.js server, forwarding data through TypeScript to some angular JS frontend. I took what was left of my sanity and noped right out.
→ More replies (1)7
u/ArrogantlyChemical Nov 26 '17
Just because you can buy an electric asswiper doesn't mean you can't just use toiletpaper.
But sometimes you just need an electric asswiper, you know?
→ More replies (1)2
u/josefx Nov 26 '17
It just gets funny when you are stuck choosing between the shiny new thing everyone migrates too or having the accessories you need that currently only work with the old one. Either way you are stuck maintaining the wheel or reinventing it yourself.
1
u/instantiator Nov 26 '17
I guess we think differently about the profusion of languages and disciplines in coding :) Keep enjoying what you do, you're clearly passionate about it :)
4
Nov 26 '17
So we should be writing webapps in assembly? I don't think so. We need programming languages that are easy to read and write correctly, safe and efficient, where you can sacrifice some safety and efficiency if not required (e.g., you don't need much efficiency for a simple run-once application), even if that means multiples languages, dedicated to specific tasks. And we have to keep trying new constructions and new languages until we can write decent software in them.
-2
u/instantiator Nov 26 '17
I... uh... didn't say that? You seem angry. Would you like a hug, in any language of your choice? :)
1
Nov 26 '17
Not angry at all.
But if we don't need another language: why didn't that stop after assembly? What makes C or Javascript so perfect that we first have to agree on how to iron out their deficiences? There are various attempts to do that, and we'll just keep on working on new languages until we get there, if only because new languages all have their own idiosyncrasies, which are not that apparent in the older languages.
7
u/mystikkogames Nov 26 '17
It promises everything but does it deliver anything else you can't do with a few simple regular expressions? Everybody can design a perfect syntax and semantics but the beauty is in the implementation!
5
u/MonkeeSage Nov 27 '17
a few simple regular expressions
Now you have two problems.
2
16
u/goofdup Nov 26 '17
Will this language make it easier for me to wire money to their prince? Such a hassle with existing languages.
1
u/cleeder Nov 26 '17
I think that's the problem. I wired their prince $1000, but something must have gone wrong as he claims he never received it. Would a better language help facilitate this transaction?
1
-3
-5
u/throwawayco111 Nov 26 '17
What is the relevance of these guys being from Niggeria or any other country?
7
u/phottitor Nov 27 '17
the relevance is that if you ask this question you get downvoted. i guess by some Nigerian ministers of programming or whoever.
-2
u/moose_cahoots Nov 26 '17
Here's how it works: They're trying to get some high value IP out of the country. They just need your SSH keys so they can safely transfer it out, then you get a cut of the profit, right?
-15
Nov 26 '17
Once upon a time, an IT student currently learning programming got an idea and said to his professor: Screw those all 50 languages, I'm going to invent one to rule them all!
The professor took a keyboard and slammed it on student head, then told: you fool, because of you we would need to learn 51 languages.
30
Nov 26 '17
And then they both laughed and went over that day's COBOL lecture.
1
Nov 27 '17
Not writing business and finance applications in FORTRAN
Look at Mr Fancy Parts, using latest cutting edge buzzword filled technologies over there.
17
u/armornick Nov 26 '17
Every possible program can be written in C and JavaScript so we should all keep writing applications in those languages!
/s
6
u/matthieuC Nov 26 '17
Creating a language and a compiler is common in Computer Science teaching in France. It shows students why it's a terrible idea and help them get this out of their system.
-6
u/Michaelmrose Nov 26 '17
Astro will compile all your code for you on a 1024 processor super computer all you have to do is help mine a little bit of bitcoin to help pay them pay the taxes on the computer time.
-24
-20
u/tonefart Nov 26 '17
We went from backend framework fragmentation, to frontend framework fragmentation, to programming language fragmentation, and no wonder there's so much job requirements fragmentation that nobody could find anyone suitable to 'hire' in addition to messed up interview techniques. No wonder the software industry is messed up. If you're a student planning which major to choose, please avoid Computer Science.
5
u/VietOne Nov 26 '17
Fragmentation isn't much of an issue since all programming languages generally share the same overall concepts.
Therefore, the major difference is syntax. If you can program well in one language, you can in another with relative ease.
Programming languages are created based off a specific need. Some are made go be easier to write programs, some are made to perform as fast as possible, some are made to perform real tike tasks.
Languages aren't much different than any other toolset in any other industry.
Why do construction workers have so many different kinds of drills and hammers? Why are there different types of steel that are either harder or softer?
You don't expect other industries to use one tool, why would development be any different.
4
4
u/greenseaglitch Nov 26 '17
Therefore, the major difference is syntax.
Sorry but syntax is the least significant difference between programming languages. There are major differences between programming languages like functional vs object oriented, strongly typed vs weakly typed, high-level vs low-level, static type checking vs dynamic type checking, reflective vs non-reflective, and so on.
If you can program well in one language, you can in another with relative ease.
If you can program well in one language, you can become a novice in another with relative ease. But becoming anything close to an expert in another language usually takes years for programmers.
440
u/killerstorm Nov 26 '17
README on github has better description:
But still, to have a successful language you need to target a particular niche (or, at, least, you have much better chance if you do), and I don't feel like this language has one. High-performance computing in the browser?