❤ Bram ❤ is a user on social.wxcafe.net. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

:thinkhappy: what if, an alternative to both mastodon _and_ pleroma, which is much less memory-heavy and is a single executable file you drop on your server

help us out #rustodon
github.com/rustodon/rustodon

❤ Bram ❤ @bram

@er1n after I saw a friend writting a 900 lines long code in rust for a script that would be at most 50 lines of python I was very less hyper by this technology for this kind of applications >_>

· Web · 0 · 3

@Dekken @er1n and rust is 10 time slower to write in it, everything is a tradeoff

@bram @Dekken @er1n
It also catches more bugs since it's quite strictly typed and has linear types and no exceptions.

I'm also curious what your friend was writing and if they were utilizing rust and its crates properly.

Anyways, as a user, I'd rather run something written by rust programmers than python programmers.

@bram @Dekken @er1n
Yea but GNU Social, Mastodon and Pleroma are already here and have done most of the experimental stuff, so Rustodon can be developed based on them.
And fewer but better implemented features are better (at least for me) than a pile of Ruby thrown together. The stricter type system can also make the code more structured and simpler to extend.
LOC is not a good metric for code IMHO, or otherwise people would still be learning Perl.

@grainloom @bram @Dekken @er1n
And import import agrees with "explicit is better than implicit" and Rust is quite more explicit.

Also, don't wanna start (more of a) language war but traits are better than classes.

@autogestion @bram @er1n I've quite literally written a web server that supports websites in C++

@bram @er1n yeah, rustodon might become the most performant fediverse application out there (unless its database or networking will remain a bottleneck), but with another language it could have been completed so much sooner with so much more developer happiness...

@gargron @bram @er1n maybe it was just bad code or a missing library

i mean my rust is both cleaner faster and sometimes shorter than my python and i've been doing python every day for years

@wxcafe @CobaltVelvet @bram @er1n i wanna try it out real bad but i don't have any practical use cases for it right now

@Gargron @wxcafe @er1n same, it looks really cool but meh, what should I do with it?

@CobaltVelvet I'm really interested in examples then because, from here, except if you do this a().b().c().... to compress things on one line python (and ruby) seems way more expressive than rust :o

also my experience of having 5% of my productivity level in haskell compare to python made me very skeptical of those langage for fast and short dev which is 90% of my use cases

@bram @Gargron @wxcafe @er1n @CobaltVelvet > full website without a line of pony code

I JUST WANT TO SEE

plz

@bram @er1n ? writing stuff in python takes less lines than in C, that doesn't mean we're gonna start writing OS kernels in python? or web browsers?

idk

@wxcafe @er1n yeah but you don't write mastodon in C

@bram @er1n no, but you write gitea in go for example. same principle. and if it can help me have less than 6 gigs of ram on the server to run a web app, it would be nice.

@wxcafe @er1n and you get way slower web development has ruby/ror or python/django are amongs the best things out there for that

Always a trade off between fast and more flexible development and slower memory usage. That's a strategical choice and you generally have better chance of sucess if you choose the first when you have no idea on the potential success.

Rewrite can come later if really needed.

@bram @wxcafe if you take a peek at the Rustodon code, it's not very different from what you'd do with Flask

@bram
Up until a year ago, I'd have agreed with you. Rust was definitely painful to use.

It has changed a lot since, though, I feel it's now actually _nice_ to write stuff in it.

Still a relatively steep learning curve, though!
@er1n