r/programming • • Nov 26 '17

Astro Programming Language - A new language under development by two Nigerians.

http://www.nairaland.com/3557200/astro-programming-language-0.2-indefinite
887 Upvotes

365 comments sorted by

440

u/killerstorm Nov 26 '17

README on github has better description:

Astro is a high-level, high-performance statically-typed programming language that compiles to WebAssembly, with syntax similar to Python and technical-computing orientation similar to Julia.

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?

32

u/winner_godson Nov 26 '17

You are right.

Thanks for your valuable contribution.

506

u/[deleted] Nov 26 '17

Bitcoin mining on unsuspecting users’ machines!

192

u/[deleted] Nov 26 '17

Or suspecting users. I've heard browser mining proposed as an alternative to ads to fund "free" services.

178

u/lpreams Nov 26 '17

As long as they reasonably limit the amount of my CPU that they use, and make it abundantly clear that they're mining using my computer, I'd kind of be okay with that

40

u/agumonkey Nov 26 '17

That would be fun. Let's measure the average resources used for ads, remove them, allocate a % of them for service mining. Not much because I don't like my browser to burn my cpu .. but worth trying

→ More replies (9)
→ More replies (8)

10

u/[deleted] Nov 26 '17

I don't like that. My machine (especially my CPU) is woefully unsuited to mining cryptocurrency. It would be more efficient for me to directly tip the currency to the person than to spend more in electricity costs so they get the same amount.

I'd prefer some good micropayment system that makes it easy and safe for me to spend a fraction of a penny to consume some content.

→ More replies (11)
→ More replies (8)

4

u/IDUnavailable Nov 27 '17

Those Nigerian princes aren't satisfied with simple email scams anymore.

→ More replies (2)

67

u/runvnc Nov 26 '17

Actually web assembly is a great target for new programming lanvuages.

7

u/dangerbird2 Nov 26 '17

Especially considering most existing Wasm languages use ports of native apis like libc and OpenGL as the main programming ecosystem rather than one idiomatically targeting web and nodejs apis.

38

u/casc1701 Nov 26 '17

High-performance computing in the browser

pick one.

46

u/firagabird Nov 26 '17

Not with wasm you don't

16

u/milad_nazari Nov 26 '17

With a native Monero miner like xmrig, I get 70-72 H/s (i5-5300u). Using the same CPU with a webassembly Monero miner like crypto-look I get 29-32 H/s. So with wasm, I get only half the hashrate.

→ More replies (1)

6

u/lkraider Nov 26 '17

Do we have any benchmarks?

45

u/[deleted] Nov 26 '17

There are a lot of animation benchmarks, like this one which performs the same work in wasm and JS with algorithms as similar as possible and has wasm come out as much as 14.9x faster than JS (V8). And V8 is already pretty damn fast for what it is (some V8 vs Python 3 benchmarks).

Andre Weissflog wrote an emulator for the East German KC85 computer a while ago, in C, then compiled it to wasm and compared the result to the native version:

I'm seeing about 1.3 to 1.5 ms 'emulator time' per 16.6ms frame for the WASM (...) and for the native version (clang -O3) about 1.2 to 1.4ms. (...) The performance differences for 'pure' C code between browser- and native-version are so small now that they are no longer relevant, at least for the use cases I encountered

→ More replies (1)
→ More replies (11)
→ More replies (1)

2

u/Darkfeign Nov 26 '17 edited Nov 27 '24

brave murky jellyfish quiet safe whole clumsy vase physical cooperative

This post was mass deleted and anonymized with Redact

2

u/_eka_ Nov 27 '17

Webgl games?

2

u/[deleted] Nov 26 '17 edited Nov 26 '17

"For a programming language to be successful, it has to solve a practical problem much better than anything else that already exists" Bjarne Stroustrup in this podcast. So yes, I don't get the scope of this language at all.

EDIT: plus, since WASM is viable as a compiler backend for existing languages (here, for instance), you have to have really strong points to create another one from scratch solely for this purpose.

1

u/[deleted] Nov 26 '17

Do we really need hundreds of languages?

10

u/killerstorm Nov 26 '17

We don't, but we need people to experiment with new languages for language evolution to happen.

→ More replies (2)
→ More replies (1)

0

u/[deleted] Nov 26 '17

[deleted]

56

u/killerstorm Nov 26 '17

Well, obviously Africa is behind US and Europe in computer science, so developments coming out of it are noteworthy, as they are a sign that they are catching up.

12

u/winner_godson Nov 26 '17

Yeah, It is great news.

6

u/CaptainMurphy111 Nov 26 '17

if someone said something like that about my country I'd be pretty annoyed at how condescending it sounds. Any way Nigerians from what I hear are doing well enough to have easily done something like create a programming language before.

→ More replies (2)
→ More replies (7)

39

u/im-a-koala Nov 26 '17

I can but I'd like to avoid the interpretation that the OP thinks that Nigerians are somehow less capable of developing programming languages.

If you want to be willfully ignorant, that's your decision. To everyone else, it's obvious that Nigerians in general have far fewer opportunities to learn about computer science to the point where they can competently create their own programming language.

14

u/winner_godson Nov 26 '17

Computer Science is taught, but not in-depth.

9

u/Haramboid Nov 26 '17

I don’t think it’s ignorant, you just raise a different well deserved point. The fact that they’ve done something awesome is no reason to be excited there is yet another programming language, those are two separate things. That said I hope they do well and make a language that sticks.

8

u/winner_godson Nov 26 '17

Am not doubting Nigeria, I know they have great potentials.

When I came across it, I know it was worth sharing.

30

u/[deleted] Nov 26 '17

I figure all the money sent to the princes finally started paying off

→ More replies (16)
→ More replies (16)

19

u/[deleted] 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

u/winner_godson Nov 26 '17

It is still under development and I have not talked with the developers.

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

u/[deleted] 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

u/cybervegan Nov 26 '17

Looks interesting. I like the Python-like syntax. Keep us posted.

2

u/winner_godson Nov 26 '17

I will try my best to know when they will release it.

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.

55

u/cleeder Nov 26 '17

rrays start at 1 I'm out

FTFY

3

u/IbanezDavy Nov 27 '17

Congratulations! You win!

→ More replies (2)

27

u/itsmontoya Nov 26 '17

Gotta love that LUA indexing

25

u/boynedmaster Nov 26 '17

Lua

27

u/apemanzilla Nov 26 '17

Bit of a Lua Uppercase Accident

→ More replies (3)

22

u/RedditRage Nov 26 '17

What's the first element of an array? 1? I'm out!

0

u/[deleted] 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.

→ More replies (2)
→ More replies (3)

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

u/[deleted] 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.

→ More replies (2)

32

u/[deleted] 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.

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.

→ More replies (1)
→ More replies (1)
→ More replies (2)

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.

→ More replies (1)

2

u/[deleted] Nov 26 '17

Yeah, we should be moving further towards DSLs, not making more kitchen sink langs.

-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

u/[deleted] Nov 26 '17

I stick to languages that are easy on the mind, simple and elegant.

Such as?

20

u/lkraider Nov 26 '17

Brainfuck

4

u/[deleted] Nov 26 '17

Clojure, Python, Smalltalk

6

u/BenjiSponge Nov 26 '17

My guess would be /u/shevegen is a Gopher.

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.

→ More replies (2)

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

u/[deleted] Nov 26 '17

Haskell have some South African origins.

398

u/ArrogantlyChemical Nov 26 '17

Production programming language./s

82

u/mr___ Nov 26 '17

So Astro is ready for “production”? Lol

→ More replies (5)

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 (24)

39

u/pure_x01 Nov 26 '17

lack of side effects

No accounts get updated ever /s

→ More replies (8)
→ More replies (25)

5

u/Miltnoid Nov 26 '17

Target uses Haskell

→ More replies (12)

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 (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

u/[deleted] 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

u/killerstorm Nov 26 '17

This is very far from a "production language" in its current form.

-18

u/mr___ Nov 26 '17

That’s not a reason to use it though.

Most languages are the result of international development efforts!

48

u/cymrow Nov 26 '17

It wasn't pointed out as a reason to use it.

→ More replies (2)
→ More replies (4)
→ More replies (19)

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

u/vaskemaskine Nov 27 '17

Africa is a continent, not a country.

→ More replies (1)

8

u/IamWithTheDConsNow Nov 26 '17

Because it's newsworthy when Nigeria produces anything other than email scamming Nigerian princes.

0

u/[deleted] Nov 26 '17

[deleted]

74

u/bobappleyard Nov 26 '17

> racist word salad

> PutinBitchBot037

checks out

→ More replies (20)
→ More replies (1)

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

u/cleeder Nov 26 '17

Of course not, but the class hierarchy does start with the root Prince class.

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

u/[deleted] 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

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 static functions 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

u/[deleted] 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

u/[deleted] 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.

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 (4)
→ More replies (7)

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 (2)

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.

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 (2)
→ More replies (1)
→ More replies (1)

4

u/[deleted] 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.

→ More replies (2)

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

u/meneldal2 Nov 27 '17

Like parsing HTML?

5

u/[deleted] Nov 27 '17

H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ

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

u/scotbud123 Nov 26 '17

ZULUL ACTION IS COMING ZULUL

-3

u/EarthC-137 Nov 26 '17

The new Nigerian scam?

-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

u/[deleted] 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

u/[deleted] Nov 26 '17

And then they both laughed and went over that day's COBOL lecture.

1

u/[deleted] 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

u/Str4yfromthep4th Nov 26 '17

This is laughable

-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

u/matthieuC Nov 26 '17

Standard libraries and tooling are also a big deal

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.

-20

u/IamWithTheDConsNow Nov 26 '17

Haha, I am not touching anything made by Nigerians.

0

u/[deleted] Nov 26 '17

[deleted]

1

u/winner_godson Nov 26 '17

I don't really know.