Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
retoor252022hThis is how to create a websocket server form A to Z using Python:
https://molodetz.nl/retoor/gists/...
I tested it to be sure. But it was literally 3 minutes or smth. I didn't have to do the apt stuff ofc. I already had python.
Edit: whoops, forgot the pip. Applied that. -
retoor252020h@tosensei still, it's a lot compared to Python. I do know you can implement the socket directly in Program.cs tho like in my socket example. I played with it while ago. I'm happy that C# came to Linux. It's decent.
-
lorentz1540118hI tend to use Typescript when I don't want to make decisions about error handling and thread safety and just want something to work in the happy case with possible hidden assumptions in as few lines as possible. It has good enough types for accurate intellisense for non-library types and libraries for literally anything I'd ever want to do.
-
Demolishun3562218hI will have to look at our code to see how we do it in C#. I am fairly certain we don't use ASP.
-
@galena no, asp was the stuff back in the 2000s. before dotnet. the stuff where you wrote shitty pages with vbscript.
-
galena71751h@retoor Initially i focused on compiled languages, but this might acutally be a viable sölution 🤔
Fucking hell! Why is it so hard to just create a simple websocket!
C#: Yeah, you should use ASP.Net with SignalR! But heres a totally undocumented mess of a lib to get it to work. J.k. Deadlock!
Rust: async while let OK((some)) = ws.create.unwrap_or_else().suckadick()
Why the fuck is Rust so fucking dense! I want one line that means one thing! If I would compress my code with gzip it would be less information dense than this!
Zig: Yeah, Its in Beta and shits semi stable. Atleast i got it to work? Nope!
I've ben fussing aound with these three Languages for more than a week now and can say: Just use an established way to webdev. Its not worth it to try and make it as simple as possible!
rant