 |
ClassicConnect "640k ought to be enough for everybody."
|
| View previous topic :: View next topic |
| Author |
Message |
LyraNovaHeart Gorts

Joined: 15 Apr 2025 Age: 27 Posts: 48 Location: Los Angeles, California
|
Posted: Mon Jun 02, 2025 4:47 am Post subject: Python HTTP Server Hell |
|
|
Hey there, Don't I have a story for y'all today.
Yes, even I have my fights with Python. I don't hate the language but I certainly don't love it either. Think of me and python as two roommates who hate the shit out of each other but still end up needing each other. That's essentially me and python. As for what happened today, I wanted to add sequential playback into the base server code, aka version 2.9, its default code worked beautifully for Downloading files from the server, but for media such as video and music, it sucked since you couldn't skip ahead to see if something worked or not, maybe you missed a moment too. The idea now was to get my usual LLMs, aka Claude or Gemini to fix this in for me. First attempt by Gemini 2.5 Flash Preview 05-20 kind of worked? It definitely upped the UI from its old barebones look, but every file would send HTTP Invalid Response. This is likely since it tried to apply it to everything. Okay, not a big deal, I can send it to 2.5 Pro. Tested 2.5 Pro... What do you know? It got stuck in a fucking loop again. sigh Google, please fix Gemini 2.5 Pro, it can work if you fix it, please? Anyway, okay, off to Claude Sonnet 4 (Thanks nick99nack), it worked, but.... this happened.
When we did point out it was broken, because that's clearly NOT what you expect to see from a wav, Claude tried to pass it off as "It's a feature"
| Quote: | | The server is actually working correctly! The garbled text you see is just the browser trying to display binary audio data as text, which is expected behavior when accessing media files directly in a browser. |
No, the fuck it is not, Claude. That thing is more broken than the average smoker. After that dumbass attempt, I sent it back to Gemini 2.5 Flash, and okay, it fixed the part that allows it to skip between media, but then broke the mapping. That caused 404's all the time since it didn't map the drives right, and both Claude and Gemini for about 2 hours failed to understand how to fix this issue. Question after question, only about 2 hours later did something at least come up, and did it work? Yes! it even added search, I didn't ask for that, but it's nice. Though this broke compatibility with Windows 2000 and older, along with XP. That sucks but whatever, I can run v2.9 on port 2001, and v3.1 RC7 on port 2025. Now, this mostly works, but v3.1 RC7 was slower, I'd get 16MB/s vs 87.7MB/s from v2.9. Turns out the chunk size was way too fucking small. setting it from 8KB to 2MB gave it a massive boost from 16MB/s to 110MB/s peak, finally completing this stupid mess of code.
TLDR: Don't make a HTTP server in Python, and if you do, well, you're shit out of luck.
Code for anyone who wants it: Version 2.9, Version 3.1 Release Candidate 8 _________________ I'm one day closer to being who I wanna be~
Last edited by LyraNovaHeart on Fri Jun 06, 2025 12:25 pm; edited 1 time in total |
|
| Back to top |
|
 |
nick99nack Admin

Joined: 30 Aug 2023 Age: 30 Posts: 171 Location: NJ, USA
|
Posted: Mon Jun 02, 2025 4:55 am Post subject: |
|
|
You know the AI has learned from human programmers when it starts going, "It's a feature!" _________________ If you like browsing without an ad blocker, you might also like getting rid of your virus scanner, and running around with your pants down. --SomeGuy, 2016 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
smartDark Style by Smartor
Powered by phpBB 2.0.25 CC Mod © 2001, 2002 phpBB Group
|