Author Topic: The Ring programming language  (Read 3385 times)

Tomaaz

  • Guest
The Ring programming language
« on: August 07, 2016, 05:11:10 PM »
I was taking a tour around Rosettacode and have found Ring. It seems to be a really BASIC-like language. It's been developed by the same team that is behind Programming Without Coding Technology (and one member of that team is called Vidlanovic Zlatko Aurel. Sounds familiar? ;)). Has anyone tried Ring? I wanted to give it a try on Linux but experienced some problems. Two distros based on Debian (one of them is also based on Ubuntu) did not recognise the .deb package. I was able to compile from source Ring itself, but due to missing dependencies I didn't manage to compile either Allegro or Qt modules.

Aurel

  • Guest
Re: The Ring programming language
« Reply #1 on: August 07, 2016, 06:18:12 PM »
Quote
I was taking a tour around Rosettacode and have found Ring. It seems to be a really BASIC-like language. It's been developed by the same team that is behind Programming Without Coding Technology (and one member of that team is called Vidlanovic Zlatko Aurel.

...aah...yes that's me,what to say?
it was a long time ago i was use PWCT by Fayed( main author of PWCT)
Concept about PWCT is really interesting but final result is slow motion.
I remember when he talk something about Ring but i don't care and looks that he
made something ...based also on SuperNova project but this time looking better
there is a C source generated from PWCT .ssf ( super server file)
This ssf is main problem with PWCT...like you may figured this is
server file( virtual machine( xHarbour)) and whole PWCT paradigm is based on server runing
(similar shit like linux xorg is ) use  is so damn slow compare to any other way
yes thing work but is tooo slow....remember Aurel basic was slow and with limitations
but SuperNove is snail slow.
Fayed is good programmer that's sure ..well maybe this time he create someting faster
what i like is that his primary OS is windows  and that is why i create editor for
SuperNova and become part of team  ;D
Currently i am happy with TOY interpreter even i don't have time to work on few
things....

Tomaaz

  • Guest
Re: The Ring programming language
« Reply #2 on: August 07, 2016, 06:54:16 PM »
remember Aurel basic was slow and with limitations
but SuperNove is snail slow.

I've tried Ring under Wine and yes - it seems a bit slower than other scripting languages, but Aurel Basic was much slower, if I remember correctly.

Fayed is good programmer that's sure

He and the team are doing fantastic job. Documentation is superb. Plenty of examples (console, GUI, graphics) + stuff on Rosettacode. Video tutorials, blogs etc. A dedicated google group, sites on social media, configuration files for several editors (Geany is included).

And it really is BASIC-like. Here is a classic "prime numbers" example:
Code: [Select]
for x = 11 to 100000 step 2
isprime = 1
for y = 3 to sqrt(x) step 2
if x % y = 0
isprime = 0
exit
ok
next
if isprime = 1
see x + nl
ok
next

Aurel

  • Guest
Re: The Ring programming language
« Reply #3 on: August 07, 2016, 07:48:30 PM »
Yes Ring is probably faster than Aurel Basic BUT i was talking about
SuperNova - that is slow like a hell...
Well because of slow i use Ed Davis ..Toy Interpreter as base
and TOY is really fast  :D

..well yes documentation,videos...etc..etc...everything is fine
but still PWCT dont have real popularity because concept is very complex
and do some programming with PWCT require to much time.. ::)
..by the way most of PWCT "users" are few guys from xHarbour..
« Last Edit: August 07, 2016, 07:52:02 PM by Aurel »

Tomaaz

  • Guest
Re: The Ring programming language
« Reply #4 on: August 07, 2016, 09:22:23 PM »
..well yes documentation,videos...etc..etc...everything is fine
but still PWCT dont have real popularity...

Well, I was talking about Ring. I know nothing about PWCT, SuperNova or xHarbour. BTW What's happened to Ruben?

Aurel

  • Guest
Re: The Ring programming language
« Reply #5 on: August 07, 2016, 10:24:08 PM »
PWCT - or Programming Without Coding Technology is developed with xHarbour compiler-similar to Clipper or xBase
SuperNova is interpreter developed with PWCT running on top of xharbour lib( dll).

ahh Ruben...nothing it is sort of abandoned,of course you can do some simple programs just for fun
it is open source and can be extended- rearanged very easy by anyone who have some knowlege about basic
programming ...nothing else ...
i am focused on Toy . it is bytecode

Tomaaz

  • Guest
Re: The Ring programming language
« Reply #6 on: August 11, 2016, 11:48:08 AM »
Old good boring "word count".  ;) It takes a lot of time (10 min. +), but Ring doesn't support regular expressions and working with lists is slower than in other languages. On the other hand - this produce the same output all the other languages do with regular expressions. And I like the syntax a lot. It's clean and easy to understand.

Code: [Select]
unique_words=[]
see "Reading the file..." + nl
whole_text = lower(read("warandpeace.txt"))
see "Counting..." + nl
d = len(whole_text)
for x = 1 to d
if ascii(whole_text[x]) < 97 or ascii(whole_text[x]) > 122
whole_text[x] = nl
ok
next
all_words = str2list(whole_text)
counter = 0
for x in all_words
if len(x) > 1 or x = "a" or x = "i"
if unique_words[x]
unique_words[x] = 1 + unique_words[x]
else
add(unique_words, [x, 0])
ok
counter += 1
ok
next
plik = fopen("Words.txt", "w")
see "All words" + " - " + counter + nl
fwrite(plik, "All words" + " - " + counter + nl)
length_unique = len(unique_words)
see "Unique words" + " - " + length_unique + nl
fwrite(plik, "Unique words" + " - " + length_unique + nl + nl)
copyof_unique = reverse(sort(unique_words, 2))
for x = 1 to length_unique
fwrite(plik, copyof_unique[x][1] + " - " + copyof_unique[x][2] + nl)
next
fclose(plik)
see "Done!" + nl

It's really BASIC-like. Yes, there is see instead of print, nl for newline, but instead of elseif, ok instead of end in a if block and again instead of wend in a do loop. Apart from that, it looks like a very clean BASIC dialect without sigils.

Tomaaz

  • Guest
Re: The Ring programming language
« Reply #7 on: August 25, 2016, 06:21:54 PM »
I must admit that Aurel was right. I'm not impressed by speed of Ring. This is definitely an issue that should be addressed in future versions. Apart from that, I can say that this is the easiest and the most BASIC-like language I've ever tried.