How to resolve the algorithm Rosetta Code/Rank languages by popularity step by step in the HicEst programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Rosetta Code/Rank languages by popularity step by step in the HicEst programming language
Table of Contents
Problem Statement
Sort the most popular computer programming languages based in number of members in Rosetta Code categories. Sample output on 02 August 2022 at 09:50 +02
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Rosetta Code/Rank languages by popularity step by step in the HicEst programming language
Source code in the hicest programming language
CHARACTER cats*50000, catlist*50000, sortedCat*50000, sample*100
DIMENSION RankNr(1)
READ(ClipBoard) cats
catlist = ' '
pos = 1 ! find language entries like * 100 doors (2 members)
nr = 0
! after next '*' find next "name" = '100 doors' and next "(...)" = '(2 members)' :
1 EDIT(Text=cats, SetPos=pos, Right='*', R, Mark1, R='(', Left, M2, Parse=name, R=2, P=members, GetPos=pos)
IF(pos > 0) THEN
READ(Text=members) count
IF(count > 0) THEN
nr = nr + 1
WRITE(Text=catlist, Format='i4, 1x, 2a', APPend) count, name, ';'
ENDIF
GOTO 1 ! no WHILE in HicEst
ENDIF ! catlist is now = " 1 ... User ; 2 100 doors ; 3 3D ; 8 4D ; ..."
ALLOCATE(RankNr, nr)
EDIT(Text=catlist, SePaRators=';', Option=1+4, SorTtoIndex=RankNr) ! case (1) and back (4)
sortedCat = ' ' ! get the sorted list in the sequence of RankNr:
ok = 0
DO i = 1, nr
EDIT(Text=catlist, SePaRators=';', ITeM=RankNr(i), CoPyto=sample)
discard = EDIT(Text=sample, LeXicon='user,attention,solutions,tasks,program,language,implementation,')
IF(discard == 0) THEN ! removes many of the non-language entries
ok = ok + 1
WRITE(Text=sortedCat, APPend, Format='F5.0, 2A') ok, TRIM(sample), $CRLF
ENDIF
ENDDO
DLG(Text=sortedCat, Format=$CRLF)
END
2010-04-24 18:31
Top 10 entries (not all are languages)
1. 394 Tcl
2. 363 Python
3. 346 Ruby
4. 328 J
5. 319 C
6. 317 OCaml
7. 315 Haskell
8. 298 Perl
9. 288 WikiStubs
10. 281 Common Lisp
You may also check:How to resolve the algorithm 24 game step by step in the Wren programming language
You may also check:How to resolve the algorithm Find limit of recursion step by step in the Inform 7 programming language
You may also check:How to resolve the algorithm Input loop step by step in the TUSCRIPT programming language
You may also check:How to resolve the algorithm Fibonacci n-step number sequences step by step in the PureBasic programming language
You may also check:How to resolve the algorithm Compound data type step by step in the Lingo programming language