Share your repls and programming experiences

← Back to all posts
Speed Coding - Coding as fast as possible
AtticusKuhn (236)

Introduction

Coding in as few characters as possible, or codegolf, is an established sport in coding. I have never seen a competition to code as fast as possible, however. This is where SpeedCode comes in.

Features

  • Live leaderboard
  • millisecond precise timing
  • A wide array of challenges
  • Active developer
  • Login with Repl

Conclusion

I am excited to see how quickly the coders of repl can type

Updates

  • redirecting added to stop confusion( replace http with https and -- with .)
Commentshotnewtop
BobTheTomatoPie (987)

This is really cool, looks like you put a lot of work into it!

AmazingMech2418 (658)

For the copy/paste blockers, you need to make it an arrow function like (e)=>{}. The greater than sign is required.

AmazingMech2418 (658)

Nevermind. You fixed it.

MadMath123 (3)

Can you make a 'Continue as guest' - where you can access some of the challenges, but not all, and not get on the leaderboard?

AtticusKuhn (236)

@MadMath123 Thanks for the suggestion, I now allow test runs without being logged in.

AtriDey (88)

I can't use it. I'm told to login, log in with the repl auth, and am sent back again.

AtticusKuhn (236)

@AtriDey It works, can you try again?

AtticusKuhn (236)

@Roar123 It works, can you try again?

AtriDey (88)

@AtticusKuhn Tried again, same thing. Though it sometimes thinks I left the tab.

AtriDey (88)

@AtticusKuhn Refreshing doesn't help. Opening in new tab fixes it, however.

AmazingMech2418 (658)


Should be 111. 1001 is 9...

CodeLongAndPros (896)

When it says "Invalid output", it should display exactly what it wants on stdout.

tharlynnhtetong (44)

You might need to work on the interpreter, it doesn't support loops when I tried it.

[deleted]

i dont get it...
what language should i write?

[deleted]

@AtticusKuhn and why when i log in and choose a random challenge it will return you are not logged in???

AtticusKuhn (236)

@Zuhdi28 It might be because you are using http instead of https

[deleted]

@AtticusKuhn maybe i'll try

tharlynnhtetong (44)

@AtticusKuhn
I'll be funny to add an C++ option.
I can help you add more language support because I know a few languages.

BobNeo (39)

You cant do it on mobile because repl.it auth doesn’t work :(

AmazingMech2418 (658)

Is there a variable for the input?

AmazingMech2418 (658)

I tried a variable named "input" and it returned an error. What do you use for the input for the function?

AtticusKuhn (236)

@AmazingMech2418 the variable input is only defined when you submit, but not when you test locally

AmazingMech2418 (658)

@AtticusKuhn For Sarcasm, I put

let res='';let s = 1; for(let i of input){s = 1-s; if(s)res+=i.toUpperCase();else{res+=i.toLowerCase()}}console.log(res);

and it said I got it wrong although that should work.

AmazingMech2418 (658)

@AtticusKuhn Nothing that uses the input variable seems to be working...

AtticusKuhn (236)

@AmazingMech2418 It's because your solution starts on uppercase, but it needs to start on lowercase.I'll make that clearer in the problem

AmazingMech2418 (658)

@AtticusKuhn I also changed the variable to start on lowercase and it wouldn't work either. I changed it to uppercase since lowercase wouldn't work.

AmazingMech2418 (658)

@AtticusKuhn This didn't work for maximum:

let res=0; for(i of input.toString())res=Math.max(res,i);console.log(res);
AtticusKuhn (236)

@AmazingMech2418 That's because i is a string, and you can't take the Math.max of a string

AmazingMech2418 (658)

@AtticusKuhn I used the Number() constructor as well and it still didn't work. I think you are overwriting the input variable in eval.js.

AmazingMech2418 (658)

@AtticusKuhn Also, it does work for strings.

AtticusKuhn (236)

@AmazingMech2418 Oh, sorry I was using i as an internal varible, but I changed it so it should work now.

AmazingMech2418 (658)

@AtticusKuhn Now, it is just saying "Async: copying to clipboard was successful" or something like that.

AmazingMech2418 (658)

@AtticusKuhn It's still saying it isn't the correct output although it should be. Could you add error logging like in @MrEconomical 's EcoCode?

AmazingMech2418 (658)

@AtticusKuhn For some reason, the sarcasm one isn't though. Maximum worked though. I used this for sarcasm:

AtticusKuhn (236)

@AmazingMech2418 Ok, this solution should work now.

AmazingMech2418 (658)

@AtticusKuhn It works now! Also, I'm officially ahead of @MrEconomical now (and yes, this is a challenge). However, for the binary one, may I ask, how exactly is it supposed to output? Using

console.log(Number(input).toString(2));

, it wouldn't work. I tried with padding with 0s, but I'm not sure how many there should be.

AmazingMech2418 (658)

@AtticusKuhn It doesn't look like it saved my score. :( I had 11 points...

stubaduble (11)

It just comes with a massive error for me... @AtticusKuhn

DynamicSquid (2025)

the login doesn't work :(

AmazingMech2418 (658)

@DynamicSquid Change it to the "." domain instead of the "--" domain.

Roar123 (424)

This looks very interesting but the login is not currently working