Share your repls and programming experiences

← Back to all posts
live chatroom one liner! (1 line series)[no5]
h
rafrafraf

You can literally make anything in one line ;)

Here is my one line flask py live chatroom!

Live chat here

Let me know if you have any ideas for what I should make in one line next :)

Explanation:

I only had to get over two problems that I hadn't yet encountered when working on this:

  • firstly, decorators:
    as you (probably) already know, with py flask you use decorators when routing - for example:

this

can be re-written as

  • the second issue was making the client, so I used flask render template string and passed in my html/css/js code I made for the client.
Voters
alishascoder
bramley
LegendaryWolf
maxina
mesquite2234
AxolotlBot
DarkChat
MohiTheEpic
Emirhan123
ParrotDev
Comments
hotnewtop
codingjlu

"In one line" just delete the enters and spaces xD

SudhanshuMishra

hey buddy you there I need some help from you its related to chatting stuff so can you plz join my repl for a min ? plz plz plz plz :)

GalaxyWolfX

One line? Am I missing something?

ParrotDev

This is insanity. You can make a whole chatroom in 1 line?? How are you supposed to customize it?

XanthusPettitt

@rafrafraf hi could you help me make a 1 liner code, or understand it better?

rafrafraf

@XanthusPettitt sure! message me on discord if you like rafrafraf#3486

XanthusPettitt

@rafrafraf sorry I dont have discord is there any other way I can contact you?

rafrafraf

@XanthusPettitt what could you contact me on

XanthusPettitt

@rafrafraf actually good question, umm pretty much on here XD

rafrafraf

@XanthusPettitt lmaoo well if you have any questions comment and when im free ill try help

XanthusPettitt

@rafrafraf ok thanks lol

XanthusPettitt

@rafrafraf is there a way to have variables in a single line?(ex. a=10, b=11)

rafrafraf

@XanthusPettitt yup, if you wrap everything in one expression you can use the walrus operator to assign variables, like this( (var1 := 1), (do whatever) )

XanthusPettitt

@rafrafraf how would you do if statements, for and while on 1 line? for e.x for I in range(2): print(i), if I == 2: while true: print(i) I'm probs not explaining this very well am I? lol

bezlon

It’s a code pancake

TsunamiOrSumth

@rafrafraf nice cycle count

JBloves27
rafrafraf

@TsunamiOrSumth thanks lmao

xxpertHacker

Wow, and I heard that Python was a white-space sensitive language that forced perfect formatting on code...

rafrafraf
FlaminHotValdez

Okay I had the bad luck of meeting the idiot who made AdBot, SpamBot, and Spam Bot Beta. I also had the good luck or looking at Repl talk rules and threatening to report them. No more adbots or spambots yayyyy!

BobTheTomatoPie

yikes a lot of spammers

Zombs

@Whippingdot pls come in the chat

Whippingdot

Ok, stop asking me all the time tho @Zombs

Zombs

@Whippingdot you always says ok but you're not joining

Whippingdot

I joined and you weren't there @Zombs

Zombs

@Whippingdot i was here.

Whippingdot

nope u weren't @Zombs

AphixDev

ur insane!

RhinoRunner

Um why are there bots spamming nonsense in the chat...?

Whippingdot

They felt like it, they wanted to live a life @RhinoRunner

RhinoRunner

@Whippingdot Where is Thanos when you need him...

FlaminHotValdez

@RhinoRunner dead. along with iron man and black widow

Whippingdot

THE TRUTH @FlaminHotValdez

RhinoRunner

@FlaminHotValdez Lol and Hulk's arm

Zombs

@Whippingdot pls come on the chat i want to talk

Whippingdot

Sorry, that was early morning for me very early, like 3 am I wasn't awake @Zombs

SikePlayz

I have used socket before and it can only work on one computer. I think there are bots in this but nice job dude!

GavinSanti

I love the idea and the chat room, but the spammers and the bots. Can you please try to make a bot proof chat room next?

INCOGNITO001

BRO TAKE OFF THE JIBBERISH SPAMMERS

mrslep

@gjirtngisnt IKR THERE SO ANNOYING

dbates

there are bots

dbates

@dbates can u ban them

Yimmee

raf vraf raf plz add a auto kicking system, the random name is being an @$$

tussiez

Another bot is up spamming random strings of text..

tussiez

Note!!

The chat isn't moderated

DavidHilsee

trump: beatbox noob VS. obama: beatbox pro

AndrewAung11

@rafrafraf This is really cool. I think if you put the time on the top of the box instead of making time update bot. Because that bot is annoying.

rafrafraf

@AndrewAung11 lmaoo i didnt make any bots those are all made by other users ahahah i just made a chatroom thats all

AndrewAung11

@rafrafraf Who made it? Do you know?

rafrafraf
SudhanshuMishra

ok so someone made a time bot ... ??

rafrafraf

@SudhanshuMishra i saw lmaoo

SudhanshuMishra

@rafrafraf yes I talked with you your name was raf

Whippingdot

Bro I was upholding the chat the full starting of yesterday. I met many people, someone who says horrible things named ww, his brother who does the same things w(btw ww stopped cause i yelled at him a lot), uwu who spamms uwu(he stopped when someone called him gay), owo who is my friend, ok who is my friend, swiftboi who kept on spamming another repl which is a fork of this, but then later on said sorry and said that repl was worse than this, python13 who is the worst, because he kept on advertising his repl, but when I yelled at him he said sorry and that he put a lot of work in that and that is why he was spam sharing it, and other people. Some funny stuff that happened was me telling everyone to jump off a cliff and owo saying he wanted to do it but python13 told him to do it in Minecraft. There were lots of other funny stuff but in a whole I liked it. There was also engineer gaming who kept on spamming horrible stuff too. But now, when I came back today morning, THERE ARE A MILLION BOTS. ONE CALLED TIME BOT WHO SAYS THE TIME EVERY THIRTY SECONDS, WHO NEEDS THAT??? THERE IS AN ADD BOT WHICH SPAMMS ADDS, WHO CARES, GO AND DIE ADDBOT, WE DON'T NEED YOU, THIS IS NOT ADD SIMULATOR. AND THEN THERE IS THE SPAM BOT WHICH SPAMMS IM BACK VERY FAST. HE IS THE WORST, EVEN THO HE COMES EVERY FEW MINUTES. THE OTHER ONES AT LEAST DON'T SPAM AS FAST AS HIM. UGH, PLEASE MAKE BOTS NOT ALLOWED. IT IS IRRITATING.

SudhanshuMishra

@Whippingdot you can make everyone quite ... you can be a good teacher

Whippingdot

lol thanks. What was ur username? @SudhanshuMishra

SudhanshuMishra

@Whippingdot siddharth

Whippingdot

hmmmm I don't remember you in the chat @SudhanshuMishra

tussiez

@Whippingdot <AdBot> Visit Discord.com
<AdBot> Sub to MrBeast

Whippingdot

Why are u posting that here... Also I have subbed to MrBeast already and my filter doesn't allow Discord.com @tussiez

tussiez

@Whippingdot 1.Yay!
2. Lol, these are some random examples I picked from the AdBot

Whippingdot

I thought I shut down adbot...at least I yelled at the owner for half an hour @tussiez

tussiez
SikePlayz

Bro why'd you code it to say bad stuff like bonjour says the f word

rafrafraf

@SikePlayz dude i didnt code it to say anything?? Its a chatroom

Whippingdot

Lol what's wrong with this dude. Why would you code it to say bad stuff @rafrafraf

Whippingdot

Bro I stopped a few people. I made ww stop saying bad stuff. I got raged at engineer gaming for saying bad stuff too. You should really try to put a filter, people were saying do you want to suck ** and stuff like find hot **** in your area. It was horrible. I also stopped a spammer who had two bots. I yelled at him and asked him why he did this and at first he wasn't listening but soon he started listening and he stopped. @rafrafraf

Whippingdot

OH NO!! @rafrafraf and @SikePlayz I just realized I know who bonjour is. He is the same guy who was in the other chat app saying come to my home girls who are lonely and stuff like that. Bonjour is horrible. @moderators or @CodingCactus can you try your best to find out who this is. I know you probably can't, but try your best.

CodingCactus

@Whippingdot why would you ping moderators when it literally says don't ping it. Eventually when it works, you could ping moderation (the team)

Whippingdot

ok, I know it doesn't work btw. I just ping for fun btw. there is supposed to be something called moderation so I ping it. It makes sense. Would you rather I ping you? @CodingCactus

CodingCactus
HahaYes

My eyes...they can't handle this again

rafrafraf

@HahaYes lmaoo

AverseABFun

a guy called SpamBot is saying SPAMMER UR EZ and spamming that

SudhanshuMishra

@AverseABFun 😁😁

AverseABFun

@SudhanshuMishra it also seems that the bot was made by a guy called "i"

FlaminHotValdez

@AverseABFun yeah, he also made AdBot. But I threatened him by reporting him because spam is against the rules of repl. Now he shut up, ragequit, and took his bots with him. :)

Whippingdot

What!! I stopped him yesterday morning. I think we should report him. I yelled at him soo much yesterday morning(for me cause I live in India) and he stopped his two bots and left. It seems he started again and you stopped him? @FlaminHotValdez

FlaminHotValdez

@Whippingdot yeah I threatened him with ban

SudhanshuMishra

@AverseABFun hmm How do u know ?

Whippingdot

cause he said he created it @SudhanshuMishra

SudhanshuMishra
Breeze0505

@rafrafraf theres WAY to many spammers, it may be bots bc some ppl made them but ok...

Whippingdot

I shut down a few spammers @JaceBillingsley

Whippingdot

hi jace, I just realized this is you @JaceBillingsley

RahulChoubey1

Please add spam detection