Rosetta Code/Rank languages by number of users: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: Add a Perl 6 example)
m (→‎{{header|Perl 6}}: add some timing information)
Line 36: Line 36:


say "========= Generated: { DateTime.new(time) } =========";
say "========= Generated: { DateTime.new(time) } =========";
my $start-time = now;

my $lang = 1;
my $lang = 1;
my $rank = 0;
my $rank = 0;
Line 55: Line 55:


.map( { last if @_[0] < $minimum; display(|@_) } );
.map( { last if @_[0] < $minimum; display(|@_) } );

say "========= elapsed: {(now - $start-time).round(.01)} seconds =========";


sub display ($count, $which) {
sub display ($count, $which) {
Line 86: Line 88:


{{out}}
{{out}}
<pre>========= Generated: 2017-12-18T13:38:04Z =========
<pre>========= Generated: 2017-12-18T13:50:32Z =========
# 1 Rank: 1 with 373 users: C
# 1 Rank: 1 with 373 users: C
# 2 Rank: 2 with 261 users: C++
# 2 Rank: 2 with 261 users: C++
Line 131: Line 133:
# 43 Rank: 43 with 27 users: Clojure
# 43 Rank: 43 with 27 users: Clojure
# 44 Rank: 43 T with 27 users: Mathematica
# 44 Rank: 43 T with 27 users: Mathematica
# 45 Rank: 45 with 25 users: AutoHotkey</pre>
# 45 Rank: 45 with 25 users: AutoHotkey
========= elapsed: 1.81 seconds =========</pre>


=={{header|Stata}}==
=={{header|Stata}}==