-
Posts
1,466 -
Joined
-
Last visited
Content Type
Forums
Status Updates
Blogs
Events
Gallery
Downloads
Store Home
Everything posted by piemadd
-
-
how my adhd works:
"oh hey i should make this code rendering api"
"ooh hey it works"
"since im not serving anything to / i might as well add an easter egg"
"ooh a music visualizer would be cool"
"oh hey it works...and its 2am :|"-
side note you can see easter egg at https://music.replit.sh/
-
-
We accidentally created a chat app: (expand to read paste from blog)
SpoilerYesterday, I accidentally built a chat app. Surprisingly, it wasn't the first time it happened.Before I tell you how Hackernews turned (this blog's) HTTP logs into chat, let me tell you about how a 12-year old user hacked the first chat app and community space on Replit right into a Python REPL.In 2018 we didn't know we had such a strong community of tinkerers. We knew people make games with Replit and share it with other people. But we didn't realize we'd already been a Schelling point for young hackers.One day, @pyelias created a post on our support forum saying he built a Chatroom and linked to a repl. I thought it would be a simple chatbot or something similar because I hadn't seen internet-based apps on the platform until that point. We had just opened up internet access to everyone, but we didn't support web hosting or any advanced features Replit has today. It was a very constrained environment.When I opened up Pyelias' Chatroom, I saw a vibrant community. It was mindblowing. It was like suddenly discovering the chair you'd been sitting on was made of gold. The community was not only fun, but it was also helpful, wholesome, and inviting.The way the Chatroom worked: the repl acted as a terminal client. When you run the code, it connected to a remote database and pulled for the latest messages. The entire application logic was on the client. Over the next few days, I saw rapid iteration. It went from a simple Chatroom to something like IRC. It had rooms, private messages, colors, muting, and because it's on top of the Python repl, it also had support for inline code evaluation.As the room grew, it naturally had problems with spam and bad actors. So it grew moderation features, filters, etc. Other users started contributing ideas and ways to improve it. It was magnificent and a model for making Replit a magical place for serendipitous computer explorations.From there, we grew our community features, and today we have a fantastic forum where people share apps and find other people to work with. In a future post, I'll tell how they built a fully programmable "Stonk" market.## Hackernews chats in http logsIn our blog's repl (where the app is hosted), I was writing something when I saw the HTTP logs in the console accelerate. For some reason, I knew it was hackernews, so I went there and saw the post on the front page. I commented on it, saying that people can see the log stream by going to https://blog.repl.it/__logsandrewxhonson on Hackernews visited the logs and saw an opportunity to chat. Because the blog was logging all the GET requests, you can effectively send "messages" to the logs by going to a path on the website (even if it doesn't exist). So for example, https://blog.repl.it/hi my name is fred resulted in a GET hello my name is fred log message. Now you have a streaming website that anyone can drop messages into -- i.e., a chat room!I tweeted about it, and someone posted it on HN as a separate post, so it started growing. At first, people couldn't tell that Replit logs is a terminal complete with support for ANSI escape codes. I dropped that hint on HN comment, and they were off to the races.However, if you don't send an ANSI reset after your message, you're styling all the subsequent messages in the stream. I fixed that by adding a reset before each log message. I was coding live, so when I restarted the app, it broke and logged the syntax error to the console, which is actually the chatroom, and my users saw it. Not only do I have users on my accidental chatroom, they're also watching me work live and seeing my embarrassingly sloppy code (incidentally, that's why I love repl-driven coding you see the mistakes you make live and fix them quickly).Yesterday, I had many meetings (I don't code full-time anymore, sadly) so I had to fix the Chatroom (I mean blog logs lol) incrementally between calls. Naturally, with growth came the bad actors. Someone started posting 10s of thousands of messages and spamming the chat. My first reaction was: "wow it's amazing how resilient this webserver hosted on a single container!" Then I thought about implementing rate-limiting and profanity filters. However, I had a meeting in the next 5 minutes. Instead, I put Cloudflare in front of the blog, and with a couple of firewall rules, the blocking started!Finally, before the day was over, I noticed that a handful of clients for the chat has emerged, and things thing has a life of their own.Even as I'm writing this post in the repl, I can see the chat continue. There are now JSON messages and some weird protocol that's going on. Are people building apps on it? I'm sure that will happen before the end of the week. After all, it's a full terminal, and you can make entire UIs on it.I'm writing this story because we want to show the world that computers & the internet are still fun. Hacking, tinkering, and weird experiments continue to happen on platforms like Replit. Because every repl on Replit is a full computer that comes with access to the network, a database, storage, and access to its code, user profiles, and other primitives, it makes it inherently amenable to serendipity and accidental software interactions.TLDR: People used the public logs of our blog (https://blog.repl.it/__logs) to create a chatroom of sorts. Is bussin
-
-
- FakeNSA, piemadd and Cyberspirit
- 3
-
It goes both ways though
-
-
Anybody have tips on not overthinking things?
One of my best friend coworkers, to the surprise of both a mutual friend and myself, unadded me on snapchat (not even blocked or anything, just unadded). Been thinking about what I could have done wrong and its bringing me down a lot since she was one of my closest friends. idk what to do or where to go from here-
if you're worried call them. the best way to avoid overthinking is to just ask
- piemadd, sub68 and WaggishOhio383
- 2
- 1
-
52 minutes ago, pierom_qwerty said:
Anybody have tips on not overthinking things?
One of my best friend coworkers, to the surprise of both a mutual friend and myself, unadded me on snapchat (not even blocked or anything, just unadded). Been thinking about what I could have done wrong and its bringing me down a lot since she was one of my closest friends. idk what to do or where to go from hereI have neither friends nor snapchat, so I can't speak from experience on this. but, have you talked to them recently? if not they may have just grown distant and thought it was time to move on? did you have a disagreement? did you insult their choice of vehicle?
-