Codegolf/RGB2Rv18: Difference between revisions

From NoName e.V.
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
When you first connect, your user will be automatically created and your public key authorized for that user. It is not possible to connect without a public key (i.e. there is no password auth). Once you are connected, you can run the <code>golf</code> command to see the existing challenges, submit solutions, see the leaderboards and get further information. After the event, I will copy all the relevant information here.
When you first connect, your user will be automatically created and your public key authorized for that user. It is not possible to connect without a public key (i.e. there is no password auth). Once you are connected, you can run the <code>golf</code> command to see the existing challenges, submit solutions, see the leaderboards and get further information. After the event, I will copy all the relevant information here.


You can ask Merovius (on RobustIRC) if you need any help or have any questions.
You can ask sECuRE (on RobustIRC) if you need any help or have any questions.


== FAQ ==
== FAQ ==
Line 14: Line 14:


It is <em>definitely</em> possible and <em>likely</em> easy to cheat and/or break the raspberry pi we use. That means that if you <em>do</em> cheat or intentionally break stuff in a way that spoils the fun for others, the only thing you prove is that you're a buzzkill - not that you are clever. Please keep that in mind :)
It is <em>definitely</em> possible and <em>likely</em> easy to cheat and/or break the raspberry pi we use. That means that if you <em>do</em> cheat or intentionally break stuff in a way that spoils the fun for others, the only thing you prove is that you're a buzzkill - not that you are clever. Please keep that in mind :)
=== How do I use the commands correctly? ===
scp foo.py <user>@golf:
golf -challenge <challenge> foo.py


=== I have a great idea for a challenge ===
=== I have a great idea for a challenge ===


Query Merovius in IRC. If you want to make the job extra easy, you can implement this Go interface:
Query sECuRE in IRC. If you want to make the job extra easy, you can implement this Go interface:


  type Instance struct {
  type Instance struct {
Line 37: Line 43:
=== What languages are supported? ===
=== What languages are supported? ===


There currently is a hardcoded list of languages (for uniformity), containing Brainfuck, C, C++, Go, Haskell, Java, Javascript, Julia, Perl and Python. What language to use is determined on file-extension. If you want to use a different language, you can query Merovius a) what debian-packages are needed, b) how to build (if needed) programs for that language and c) how to run programs for that language. If you want to use a language that can't run on an ARM64 Raspberry Pi3 (e.g. if you want to code on a Commodore 64 or an Atari ;) ), let me know, but we won't be able to have you in the leaderboards :)
There currently is a hardcoded list of languages (for uniformity), containing Brainfuck, C, C++, Go, Haskell, Java, Javascript, Julia, Perl and Python. What language to use is determined on file-extension. If you want to use a different language, you can query sECuRE a) what debian-packages are needed, b) how to build (if needed) programs for that language and c) how to run programs for that language. If you want to use a language that can't run on an ARM64 Raspberry Pi3 (e.g. if you want to code on a Commodore 64 or an Atari ;) ), let me know, but we won't be able to have you in the leaderboards :)


=== I get some weird behavior when using ssh ===
=== I get some weird behavior when using ssh ===


Please file a bug against [https://github.com/Merovius/simsim simsim]. In the meantime, there is an OpenSSH sshd running on port 2222 that you can use via <code>ssh -p 2222 <user>@golf</code> or <code>scp -P 2222 <user>@golf</code>. User creation, however, only works on port 22, so you need to use that at least once.
Please file a bug against [https://github.com/Merovius/simsim simsim]. In the meantime, there is an OpenSSH sshd running on port 2222 that you can use via <code>ssh -p 2222 <user>@golf</code> or <code>scp -P 2222 <user>@golf</code>. User creation, however, only works on port 22, so you need to use that at least once.

Revision as of 12:44, 27 October 2018

RGB2Rv18 Codegolf

To participate in this years codegolf challenges, you need to be in the rgb2r wifi and SSH into a special machine:

ssh <username>@golf

When you first connect, your user will be automatically created and your public key authorized for that user. It is not possible to connect without a public key (i.e. there is no password auth). Once you are connected, you can run the golf command to see the existing challenges, submit solutions, see the leaderboards and get further information. After the event, I will copy all the relevant information here.

You can ask sECuRE (on RobustIRC) if you need any help or have any questions.

FAQ

Lol, it's so easy to cheat or break this

It is definitely possible and likely easy to cheat and/or break the raspberry pi we use. That means that if you do cheat or intentionally break stuff in a way that spoils the fun for others, the only thing you prove is that you're a buzzkill - not that you are clever. Please keep that in mind :)

How do I use the commands correctly?

scp foo.py <user>@golf:
golf -challenge <challenge> foo.py

I have a great idea for a challenge

Query sECuRE in IRC. If you want to make the job extra easy, you can implement this Go interface:

type Instance struct {
    Input string
    Want  string
}

type Challenge interface {
    // GenerateInstance generates a random instance, using the given RNG.
    GenerateInstance(*rand.Rand) Instance
    // Solve solves a given instance.
    Solve(input string) string
    // Description outputs a verbose description of the problem to solve.
    Description() string
    // Examples generates a fixed list of examples for documentation.
    Examples() []Instance
}

What languages are supported?

There currently is a hardcoded list of languages (for uniformity), containing Brainfuck, C, C++, Go, Haskell, Java, Javascript, Julia, Perl and Python. What language to use is determined on file-extension. If you want to use a different language, you can query sECuRE a) what debian-packages are needed, b) how to build (if needed) programs for that language and c) how to run programs for that language. If you want to use a language that can't run on an ARM64 Raspberry Pi3 (e.g. if you want to code on a Commodore 64 or an Atari ;) ), let me know, but we won't be able to have you in the leaderboards :)

I get some weird behavior when using ssh

Please file a bug against simsim. In the meantime, there is an OpenSSH sshd running on port 2222 that you can use via ssh -p 2222 <user>@golf or scp -P 2222 <user>@golf. User creation, however, only works on port 22, so you need to use that at least once.