Languages update

Hi guys,

Any news on .net Core migration?
Can we hope for .net Core 3.0?

3 Likes

We’re still waiting C# 8.0 to be release before doing another test for the .Net core migration

2 Likes

C# 8.0 was released with dotnet core 3.0 a month ago.
Any news on when we might expect an update for C# and F#?

3 Likes

When you gonna make Python upgrade to 3.8, could you also make Numba package available?
That would be a great addon to already available Numpy and Pandas ones.

1 Like

Can we have an upgrade of Dart? It’s on version 2.2 but the 2.6 is out now.
The difference between the 2 version is big enough to make it appealing to start any puzzle with it…

We have updated the languages, feel free to report here any weird issue that could be related.

  • Bash : GNU Bash 5.0.2 => GNU Bash 5.0.4
  • C : gcc 8.3.0 mode C17 => gcc 9.2.1 mode C17
  • C++ : g++ 8.3.0 mode C++17 => g++ 9.2.1 mode C++17 :rotating_light: it seems to be breaking some codes :rotating_light:
  • C# : C# 6.0 (Mono 5.18.0, .NET 4.6) => C# 7.0 (Mono 6.4.0, .NET 4.6)
  • Clojure : 1.10.0 - Oracle JVM 1.11 => 1.10.1 - Oracle JVM 1.11
  • D : no update available
  • Dart : 2.2.0 => 2.5.0
  • F# : 4.1 => 4.5
  • Java : 11.0.2 => 1.8.0_211, too many performance issues above Java 8. It’s a tricky issue we have already spent quite some time on without results. We’ll try again but we’re not optimistic.
  • Javascript : Node 10.15.3 => Node 12.13.0
  • Go : 1.12.1 => 1.13.1
  • Groovy : 2.5.6 - Oracle JVM 1.11 => 2.5.8 - Oracle JVM 1.8
  • Haskell : 8.4.3 - no update (too complex to update to 8.6.3, we’ll look into it later)
  • Kotlin : 1.3.0 => 1.3.31 (1.3.50 too slow https://github.com/JetBrains/kotlin/releases/tag/v1.3.50 )
  • Lua : 5.3.5 - no update available
  • Objective C : Clang 7.0.1 -> Clang 8.0.1
  • OCaml : 4.07.0 => 4.09.0
  • Pascal : Free Pascal Compiler 3.0.4 - no update available
  • Perl : 5.28.1 (5.30.1 not available yet as a debian package)
  • PHP : 7.3.3 => 7.3.9
  • Python 3 : 3.7.2 => 3.7.4 (3.8 not available yet as a debian package)
  • Ruby : 2.6.2 => 2.6.5
  • Rust : 1.33.0 => 1.38.0
  • Scala : 2.12.8 => 2.13.1
  • Swift : 4.2.3 => 5.1.1
  • TypeScript : no update available
  • VB.NET : Compiler Visual Basic 2005 (Mono 5.18.0, .NET 4.5) => Compiler Visual Basic 2005 (Mono 6.4.0, .NET 4.6)

About the move from Mono to .net Core, I know we have been pushing it away for quite some time now. We’ll try to have it before next contest (March 2020).

3 Likes

Can you please update the dependencies you are using for rust in the FAQ. I suspect you have bumped rand at least to 0.7.2 but it is still listed as 0.6.5. My code worked with rand 0.6.5 but gives the below error under 0.7+, I now get this error on CG.

error[E0432]: unresolved import `rand::rngs::SmallRng`
    --> /tmp/Answer.rs:1438:9
     |
1438 |     use rand::rngs::SmallRng;
     |         ^^^^^^^^^^^^^^^^^^^^ no `SmallRng` in `rngs`

yes it has been reported to us yesterday, and we will change it. Sorry, I should have added this detail to the list.

No worries, thanks for the (both) updates!

Thanks for the clarification. The reason the update broke @tarriel’s code is that rand 0.6 used to contain SmallRng by default, while in 0.7 it’s an optional feature. It would make a lot of sense to enable it though, since it’s small and fast, so a good choice for writing bots on CG. It would also avoid breaking bots that used it.

It would also be nice to depend on rand_core. That won’t add any overhead since it’s already an indirect dependency, but it would make it visible to bots, and therefore easier to define custom RNGs.

In summary, I’d propose to use this dependy declaration in Cargo.toml:

[dependencies]
rand_core = "0.5.1"
rand = { version = "0.7.2", features = ["small_rng"] }

Test program:

use rand::{Rng, rngs::SmallRng, SeedableRng};
fn main() {
    let mut rng = SmallRng::from_entropy();
    println!("{}", rng.gen_range(0, 100));
}
1 Like

yes, we’ll enable back SmallRng. About rand_core, I’ll propose it! Thanks for the clear explanation :slight_smile:

2 Likes

Since the latest language update, in case of a syntax error in my code in PHP, there is no error message on the console at all, the solo puzzle solution simply timeouts without providing the answer.
Previously the PHP interpreter showed some meaningful error message.
I am not too familiar with this aspect of PHP but it might be some php.ini setting issue, or the default behaviour changed. Could you please check? It degraded coding productivity greatly. :frowning: Thanks in advance.

2 Likes

PHP 7.4 will be GA this month so it missed the recent language update. I suggest to include it in the next round as it comes with some nice new language features, such as typed class properties (coders of strongly typed languages: pls don’t laugh :slight_smile: )

@TwoSteps
My guess for the culprit of the PHP lack of error message problem:
Maybe ‘display_errors’ is set to off in php.ini, because adding this line to any of my code shows 0.

error_log((integer)ini_get(‘display_errors’));

Unfortunately it seems I am not authorized to modify this from the code, following line still results 0

ini_set(‘display_errors’, 1);

The ‘error_reporting’ directive seems to be set to E_ALL or something similar (32767) which is fine, but errors are still suppressed.

Please help, without any syntax error messages coding is like flying blind! (Just solved the latest easy puzzle ‘graffity’ and it was real pain…)

1 Like

Yes this lack of PHP errors is weird. For information, we use the flag -d display_errors=stderr when executing php.
We’ll investigate ASAP.

2 Likes

The display_error is effectively set to stderr and the error_reporting to E_ALL.
Apparently, the setting does not work in two way at the moment, but maybe I just do it in a bad way, I don’t know

ini_set('display_errors', 'stdout'); //does not work, but we do not need to change it anyway
error_log(ini_get('display_errors'));
error_log(ini_get('error_reporting')); //equal to E_ALL can be change by 'error_reporting(E_WARNING)' but still does not show anything

error_log("coucou");
error_log(var_export([1, 2, 3], true));

echo $toto; //should provide a warning 
echo $toto[3]; //should provide a warning 

aze(1); // should provide a Fatal error 

And the current output of this

Sortie standard :

stderr
32767
coucou
array (
  0 => 1,
  1 => 2,
  2 => 3,
)

Which should not be in the standard output (commenting the ini_set('display_errors', 'stdout'); provide the exact same output) . But weirdly even if the IDE show them as standard output, the backend just ignore them, as they are considered as standard error. Also the script stop at the call of aze() a not existing function without any message. In multi it just provide a TO.

1 Like

PHP error output fixed. Unknown mistake was made when installing. Re-installing fixed it.

(BTW, you cannot do ini_set because we add -d disable_functions=ini_set when executing PHP)

1 Like

@dbdr @tarriel we fixed rand for Rust as requested

2 Likes

We also fixed an issue with Console.Error.WriteLine in VB.Net

In the process we changed C# and VB.Net runtimes to correctly point to the lastest .Net 4.7.2 assemblies. Previously it was a mix of 4.5 and 4.7.2 assemblies causing somme issues, at least in VB. I hope we did not break something else.

2 Likes

Thank you for the quick help!