[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Using Lua in programming contests
- From: Russell Haley <russ.haley@...>
- Date: Thu, 5 Jan 2017 13:19:48 -0800
On Thu, Jan 5, 2017 at 11:04 AM, Coda Highland <chighland@gmail.com> wrote:
> On Thu, Jan 5, 2017 at 10:50 AM, Roberto Ierusalimschy
> <roberto@inf.puc-rio.br> wrote:
>>> Maybe Lua should have 13 seconds timeout to make the competition honest?
>>
>> The numbers you gave were these:
>>
>> 2 C, Pascal
>> 3 Brainf**k, C#, COBOL, D, PyPy
>> 4 F#, Go, Java
>> 5 Fortran, Haskell, Smalltalk, Tcl, VB.NET
>> 7 Scala
>> 8 Clojure
>> 9 Perl, PHP
>> 10 Javascript, Julia, Python, R, Ruby
>> 12 Common Lisp, Erlang, Lua 5.2
>>
>> The whole table seems quite arbitrary. Fortran is equivalent to
>> Smalltalk and Tcl? Lua is slower than PHP? Brainfuck is faster than
>> [whatever]?
>>
>> -- Roberto
>
> I'm a little surprised by Fortran's position considering it OUGHT to
> be top tier. I'm also surprised that VB.NET doesn't class alongside C#
> since they're the same VM.
My information is a little dated now but AFAIR VB.Net has a number of
classes and functions that perform similar functionality to C#
counterparts but do not boil down to the same IL code. As well, there
were constructs that did NOT have C# equivalents and performed more
'hand holding' checks. There was some push early on to eliminate these
discrepancies but Microsoft found it changed the language too much and
VB developers didn't like the changes.
Russ
> That said, BF is actually surprisingly fast for certain classes of
> problems. A naive BF interpreter is obviously really slow, but the
> current best-in-class BF implementations translate to C and convert
> idiomatic expressions into more compact forms -- e.g. ++++++++ gets
> translated into something like "*p += 8;" and [->+<] gets translated
> into *(p+1) += *p; *p = 0;
>
> I suspect some of that list might be handicaps based not only on the
> capabilities of the language but on the capabilities of the hackers
> that usually submit solutions using that language.
>
> /s/ Adam
>