Codegolf/RGB2Rv18: Difference between revisions

From NoName e.V.
Jump to navigation Jump to search
No edit summary
(Hab nicht mit gegolft, meine Lösungen waren nur tests)
Line 33: Line 33:
|-
|-
|56 xeen
|56 xeen
|335 mero
|
|267 supaake
|267 supaake
|360 mero
|
|340 empire
|340 empire
|57 mxf
|57 mxf
Line 59: Line 59:
|194 supaake
|194 supaake
|}
|}


== FAQ ==
== FAQ ==

Revision as of 17:52, 28 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.


Leaderboard

Bash C C++ Go Java Perl Python 2.7 Python 3 Ruby
54 koebi 205 nicolas 228 nicolas 319 supaake 292 sarge 52 secure 159 nicolas 160 nicolas 73 xeen
56 xeen 267 supaake 340 empire 57 mxf 172 emrys-merlin
62 nicolas 455 judge 174 koebi
97 supaake 194 supaake

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.