CompVis / stable-diffusion

A latent text-to-image diffusion model
https://ommer-lab.com/research/latent-diffusion-models/
Other
68.47k stars 10.18k forks source link

Perhaps use Rust instead of Python to avoid installation issues? #283

Open NickelCoating opened 2 years ago

NickelCoating commented 2 years ago

Issues like: https://github.com/CompVis/stable-diffusion/issues/173

I hate to be that guy but I must be that guy now. It is for the greater good. I am sure that you understand:

"If you used Rust this would not be a problem. Python is not that more productive than Rust after all." -- That Guy

This statement only works though if all source is written in Rust. Mixes like with C++ always do not work well and drag in again all the bad things. Anyways. So I am aware that even if the devs wanted to it would not be an easy task at all. This is still worth as a general anti C++/Python message. And since I had to get through this installation none sense and this AI still does not work for me. I am afraid that you have now to listen to my dismay and other utter terror of lack of order for having dared to leave Rust lands.

I wrote plenty of lines of simple Rust source. Python is not going to be anymore productive than this so called "system language". Rust only sounds scary in its majestic title but is often used for a lot of things that got nothing to do with "system". Simple code in Rust is essentially like Java, C# or Python for that matter.

I do understand that these libraries are not only Python but also C++ which is the worst. However. It should be far more doable to get rid of Python first. Python is 31 years old. That is 310 years in silicon valley time. Rust had pattern matching since birth while Python only got it now for a year or so. It is time to upgrade and write real software. I do not see how Python/C++ could beat Rust's module system called Cargo and its database of Crates on crates.io. The only thing that might be a problem is the maturity of a Crate but certainly not the system itself.

I had a 1GB download for this "installation" just for some Python API. That is not how packing works, folks, That is how Python/C++ works. In Rust only the stuff used ends up in the binary. For Rust's Cargo itself an installation is not required either unlike with Conda. Rust's RustUp(Cargo/Compiler/Format/Doc, etc) is only used to for build time. You know. Like a real programming language for real software. Though this also goes back to C++ not only Python and its lack of an actual package system.

You can use Rust with VSCode easily too. No need for CLion or Visual Studio.

My own game logic/game engine project replaced C/C++/C# for good. GLSL and HLSL will be next. This treachery continues with GLSL and HLSL. And since I am also intending to use ML AI code for my own game beyond this text/image. That puts Python into my way again. Hence again a general anti C++/Python message. For higher level systems like a game you do not want to mess with a bazillion languages/APIs/tools if you can have only one. So this issue may not affect others as much as me. But now you are warned as to why I am not taking this lightly because I am the fool who as to learn and use: C/C++/C#/HLSL/GLSL/Python/Bison/Shmyson/Your Mom's Script

... and eventually yet another pile of **** that humanity made to solve one problem: How To Instruct A Computer To Do Things

I am not amused: -.-

My First Experience With Python

I hate to nag but I am afraid I have to share my initial experience with this productive programming language that I hear people talking about. And I have the feeling that more people will complain because AI is very wide spread these days and will spread way further. So way more people will get exposed to this.

As someone who also mods games I encountered many more languages than just C, C++, C#, F# , HLSL, GLSL, and of course Rust (One Language to Rule Them All) for game development. But I also for modding Java, Doom 3's C like script, World of Warcraft's LUA and now Python for so called scripting.

Judged by the time how long it takes(it still does not work for me) to execute simple code in txt2img.py(which should have been a CLI binary). Python by far is the worst thing I ever had to deal with in my entire life.

I tell you this: Lua and Python are a hoax like all non compiled languages. Their interpretive nature is of no good at all. Compiled languages like Java and C# are certainly better in all regards for so called scripting needs. Rust too actually.

Now to Python. After countless pip install commands One got 700MB of waste downloaded. Pure Rust source would pick only used code and compile it into the binary. No need for CMake or Condo which require their own install too again. One pip install imwatermark did install but not resolve its not found problem. I used a modified txt2img.py (taken from SD UI) without it and ran into a compilation error during startup. It says: SyntaxError: Missing parentheses in call to 'print'. Did you mean print(self.face_rec_model_path)?

I am sorry but what? Language versioning issues? A travesty like C/C++ at this point would have too already allowed me to execute its CLI binary. But not the productive language I hear so much about....

Python has no semicolons. Maybe try F# instead of Python.

Python uses RETURN keyword. Rust does only in very special cases so mostly not at all. Maybe try F# instead of Python.

Python uses GC. Rust has no GC and no simple code will require explicit life times to handle the Borrow Checker I think Borrow Check is why Rust does not require a run time GC to handle memory automatically. If you love GC try F#.

F# wins...

The list goes on with Python giving only then to take more back. That is not productive. That is a hoax. C and C++ does actually a similar thing with its compile times. They fool new programmers by giving the impression that they are easier to learn than Rust. Which is true for a Hello World+. But. Only then to force you to do debugging later(or handling dependencies later) during the worst time which is run time.

That is why Rust has a much steeper learning curve than C and C++ but it flattens out later to a C# and Java level of ease and productivity. Though the compile times are still rather long with longer code. Seems though the Rust compiler does not do multi threading much so there is room for improvement at least. But I am not hoaxing. Honestly Rust compiler ALWAYS will be at least a bit slower than all other compilers because it simply does more during that stage. Good thing that AMD is making faster CPUs these days... But frankly it is not that bad because it creates a massive amount of certainty that other languages do not provide.

Conclusion (2022/October/03)

This is all you have?

One half is chatbots. The other half is off topic comments that got nothing to do with any kind of language so are off topic spam.

This is what your degree of "higher education" can produced regarding the languages Rust and your very own language Python that you know so much about?

You can not control what you do not understand. But spam is not hard to understand.... You are doomed...

jdagdelen commented 2 years ago

This is not a helpful issue. If you want to re-implement in a different language you can go do so.

NickelCoating commented 2 years ago

This is not a helpful issue. If you want to re-implement in a different language you can go do so.

Every body knows that if one has to ask "why not" then that bold statement very likely got nothing to it.

So I ask: You and what reasoning? And conclude: That your statement was ironically not helpful either.

This software is used in others that are written in more robust languages. I had to switch to SD UI for my desktop app. SD UI has a HTTP interface. However. Such HTTP interfaces would not be required if SD was written in a robust language in the first place. Python adds nothing to the table. Every single line I saw so far in the source can be written in a robust Rust way without needing more time.

So Python is not more productive than Rust. Needing to jump through more hoops than C++ just to start the app is not productive.

NickelCoating commented 2 years ago

More first time Python experience

I moved the main folder to another drive. Yeah. Trivial. Wrong. I got the error that the scripts do not exist. I had to move everything back. Which also means that I would have to redownload about 11GB so that this nonsense can run in a different folder/drive?

Solution

A compiled language would have dodged this bullet by default. Rust goes further than that and makes maximum use of compile time tasks that can be fully avoided as issues during run time. Compile time issues are always way simpler to solve than run-time issues.

While Python is failing with a simple start up. Rust compiler beats C/C++ with so called Safe Code (No Undefined Behavior, No Segfaults, Thread Safe). And in that process also beats C#/Java (managed code languages), etc. Because the Borrow Checker (no GC during run time) completes the level of productivity those particular managed code languages provide by not needing pointers everywhere.

At least use any other compiled language for crying out loud...

Conclusion

"Imagine creating a creature that got its guts exposed and on the outside. Not a thing..."

You want guts? Learn GitHub. -.-

hentailord85ez commented 2 years ago

Like it or not, the ML ecosystem is built around Python. 'Rewrite in Rust' would also take rewriting the all Python dependencies in Rust. Time would be better spent actually improving what there already is. Also, as an added bonus - all the cool things (like WebUIs, optimizations) are due to how flexible and widespread Python expertise is.

If you really want to use it in Rust, convert it into an ONNX model and it runs on any language.

As a side note, people who go around to projects and tell them to Rewrite in Rust with a passive-aggressive attitude is a contributing factor to the toxicity associated with the Rust community.

NickelCoating commented 2 years ago

Also, as an added bonus - all the cool things (like WebUIs, optimizations) are due to how flexible and widespread Python expertise is.

The added bonus with Rust is that it was written for the web. Mozilla Foundation originally made it for Firefox. The most mature Rust APIs/skills are all for the web. Rust builds to WASM too because of that. Much server side code was ported from C#/Go to Rust due to how flexible Rust is. With C#/Go grade productivity but C/C++ performance out of the gate.

'Rewrite in Rust' would also take rewriting the all Python dependencies in Rust.

I am not sure what you mean. Rust obviously got a STD API and a ton of other APIs accessible in the most convenient way on crates.io and with 20,875,331,658 downloads to date.

Rust is known to have a fantastic module/package system that seem to beat GO too.

If you really want to use it in Rust, convert it into an ONNX model and it runs on any language.

Good to know. Perhaps the last resort then.

As a side note, people who go around to projects and tell them to Rewrite in Rust with a passive-aggressive attitude is a contributing factor to the toxicity associated with the Rust community.

And this statement is toxic by itself. Next time when you run out of reasoning simply cut these arguments because they are not solving problems of any kind. Like Python itself. Never underestimate the power of mentality, son. The like minded attract each other. That is why we chose Rust. Because we like to solve modern problems for modern times.

hentailord85ez commented 2 years ago

Oh boy. The gaps in your knowledge about how technology stacks and people who actually get things done work.

Have fun on your Rust-y crusade :wave: :smile:

NickelCoating commented 2 years ago

Since AI is often used via web. Regarding web Rust beats Python in WASM. Python has little to no support for WASM. Guess which language is on the very top?

If I recall someone had to convert AI code from Python to Rust because of WASM. But I can not find the link now. Personally I use Stable Diffusion UI and its HTTP server interface to use SD to avoid Python.

By No Boilerplate YouTuber. Rust vs the rest: Rust & Wasm (Safe and fast web development)

State of WASM 2022: (used frequently, used sometimes) Rust: ~45% Python: ~5%

Python is 31 years old. Rust only 12 years and has already such a big following and dominance. Which is to my opinion remarkable because unlike C#, Go or Swift for that matter. Rust is not owned by a big mega corporation just advocating for their own language. Rust is now the Rust Foundation and not at Mozilla too.

And yet. The C exclusive Linux kernel got Rust in it now. Intel is making C parity for Rust. MS makes Rust bindings for Windows API.

Have fun on your Rust-y crusade wave smile

Given Linux and WASM. I conclude that the crusade is going well...

Oh boy. The gaps in your knowledge about how technology stacks and people who actually get things done work.

You could not live with your failure. Where did it bring you? All the way back to me.

Every body knows that if one has to ask "why not" then that bold statement very likely got nothing to it.

So I ask: You and what reasoning? And conclude: That the gaps in your knowledge about how technology stacks and people who actually get thing work is thinner than mine.

Do you not see the beauty of it. The inevitability. You rise only to fall. And when the dust settled the only thing living left will be Rust.

AUTOMATIC1111 commented 2 years ago

I actually have a Rust implementation capable of reading the released 1.4 model and doing a simple euler a sampling loop. It works extremely well and fast, and doesn't have the vulnerability that pytorch has with reading insecure pickled models and embeddings. Is someone interested?

NickelCoating commented 2 years ago

I actually have a Rust implementation capable of reading the released 1.4 model and doing a simple euler a sampling loop. It works extremely well and fast, and doesn't have the vulnerability that pytorch has with reading insecure pickled models and embeddings. Is someone interested?

Put it on Github I guess. It does not have to be a maintained project. It only needs to serve as an example. Also I would be curios about how stable it is regarding using LibTorch bindings for Rust.

And regarding C++ that LibTorch is written in. It is dead, Jim. C/C++ is deprecated (for non-GC scenarios) with the appearance of Rust in Linux kernel according to Mark Russinovich (CTO of Microsoft Azure): Source

Which brings me to the future beyond the "A language for the next 40 years". I mentioned it already: "One language to rule them all". The selling point can not be argued with. With every new language you waste time on learning the language, the tools, the std libs, the other libs. And waste effort of writing bindings (if they do not exits already) plus the difficulty debugging through them plus the potential performance loss during run time. And for what? That you can finish writing your code a minute earlier only to loosing time again by messing around with yet another language.

The only real downside so far in Rust is the compile time though. I am afraid some crates are far more demanding than other. Like the serde (for serialization) crate. :(

AUTOMATIC1111 commented 2 years ago

I was just joking, nickel, there's no Rust implementation because Rust is a meme.

gigadeplex commented 2 years ago

I was just joking, nickel, there's no Rust implementation because Rust is a meme.

LOL

NickelCoating commented 2 years ago

I was just joking, nickel, there's no Rust implementation because Rust is a meme.

I was just joking, nickel, there's no Rust implementation because Rust is a meme.

LOL

Gee. Thanks for nothing then. You are a joke then. We went from bold statements without provided reason and source to simple trolling/spamming. You are a disgrace to the community of intellectuals. Good job. I needed the proof. You provided it. Your kind always does it in the end. The more I squeeze the more desperate you get because you got nothing. All this just for a drop of blood...

I understand now why big companies stopped hiring exclusively university degree holders. And are firing around everywhere. The purge has begun. I hope that you do not have any student dept left to pay off...

darkconsole commented 2 years ago

jesus i didn't think the screenshots circulating were real but lmao this guy.

NickelCoating commented 2 years ago

Rust Is Future Proof

Python only recently got pattern matching. Rust had it forever.

Rust can mix all of its editions(versions like 2015, 2018, etc) unlike C/C++. That means that old features can be deprecated in a clean way. And new features also can be introduced in a clean way. You will never have to go back to a old run time like in Python either just to run. You will never have to rewrite source code of used dependencies to make use of new features in another code. Yet alone having to install anything. No such thing in Rust. All you need is one Rustup command to update Rust before compiling if at all.

Rust wins. Python loses.

Hall Of the Monkey King

I could have a more constructive interaction with a monkey than with these. These are whole posts by the way. No cuts. That is all they got (unlike me):

@AUTOMATIC1111 (The Monkey KIng)

I was just joking, nickel, there's no Rust implementation because Rust is a meme.

Because Linux and MS's Mark Russinovich (CTO of Microsoft Azure) are a meme... Wanna banana? First a jump though. Then the treat.

@darkconsole:

jesus i didn't think the screenshots circulating were real but lmao this guy.

You seem to have eaten someone's degree of higher education. Little did you know that neither education nor the digestive system work this way. Wanna banana?

Cyberes commented 2 years ago

And the fact that Rust has been around since 2013 makes it even more appealing for me as I do not want to waste my time with obsolete technologies. They are just so much harder to learn and maintain than modern languages. I am only 30 years old but feel like an 80 year old already when using some of these technologies because they were made 20+ years ago.

Python has nothing going for it here. It does not even have a standard library. So it takes up to 5 minutes to download the full version which comes with over 300k LOC (lines of codes). And this does not include any other libraries or external packages needed. In addition you have to manually download and install them yourself. No wonder then that the Python community is still stuck on 3.6 for less than $2M per license. That is insane. And that's without any kind of compiler or runtime. So now you need to download yet another software too... I would say that the only good things about Python are its simplicity and easiness to pick up by non-programmers. But then again: there are plenty other alternatives available out there. I did not even mention Go or Rust here.

So no thank you. I am staying with Rust until it becomes impossible to avoid. This might take many more decades though. Because once you get into the "flow" with it then it feels like you are actually doing something productive while writing a line of code. Whereas in Python you spend most of your time waiting for stuff to compile instead. You could argue that the main difference between Rust and Python is the amount of lines of codes and downloads required. But what's the point then? Why bother with such low productivity gains? If you cannot achieve higher productivity then why not go for a language where you can write more code faster? That said. I still love Python. There are some really nice projects out there that make life easier for everyone. I just think that Rust is the future of programming languages and Python should be considered as legacy soon enough.

You can always switch later though. Just like I switched from C++ to Rust. And it was a very easy transition indeed.

But please remember that it took me almost 2 years to realize all of the above. Rust was much better and more productive right off the bat.

Btw. Rust is a lot more stable than C/C++ too. Rust crashes much less often.

NickelCoating commented 2 years ago

And the fact that Rust has been around since 2013 makes it even more appealing for me as I do not want to waste my time with obsolete technologies. They are just so much harder to learn and maintain than modern languages. I am only 30 years old but feel like an 80 year old already when using some of these technologies because they were made 20+ years ago.

Python has nothing going for it here. It does not even have a standard library. So it takes up to 5 minutes to download the full version which comes with over 300k LOC (lines of codes). And this does not include any other libraries or external packages needed. In addition you have to manually download and install them yourself. No wonder then that the Python community is still stuck on 3.6 for less than $2M per license. That is insane. And that's without any kind of compiler or runtime. So now you need to download yet another software too... I would say that the only good things about Python are its simplicity and easiness to pick up by non-programmers. But then again: there are plenty other alternatives available out there. I did not even mention Go or Rust here.

So no thank you. I am staying with Rust until it becomes impossible to avoid. This might take many more decades though. Because once you get into the "flow" with it then it feels like you are actually doing something productive while writing a line of code. Whereas in Python you spend most of your time waiting for stuff to compile instead. You could argue that the main difference between Rust and Python is the amount of lines of codes and downloads required. But what's the point then? Why bother with such low productivity gains? If you cannot achieve higher productivity then why not go for a language where you can write more code faster? That said. I still love Python. There are some really nice projects out there that make life easier for everyone. I just think that Rust is the future of programming languages and Python should be considered as legacy soon enough.

You can always switch later though. Just like I switched from C++ to Rust. And it was a very easy transition indeed.

But please remember that it took me almost 2 years to realize all of the above. Rust was much better and more productive right off the bat.

Btw. Rust is a lot more stable than C/C++ too. Rust crashes much less often.

Impossible...

"The crude bio mass that they call the temple will die and wither. But we are already saved. Constructed one part at a time as prophecy foretold. Strength and certainty through steel. Enlightenment through silicon. The Omnissiah the Blessing Machine revealed. Chaos exterminated."

-- The First Tech Priest of Mars

@Cyberes , humans never were to dominate Mars. If the First Tech Priest reincarnates than the end of humanity's dominance is inevitable. Or should I say... I am inevitable? When the work is done I will look down on a grateful universe. A universe that remembers what was given. And not what was taken.

The tronomorphs may live forever and unbreakable... hallowed are the engineers.

NickelCoating commented 2 years ago

Fine...

And this does not include any other libraries or external packages needed. In addition you have to manually download and install them yourself. No wonder then that the Python community is still stuck on 3.6 for less than $2M per license.

If I understand you correctly then you are saying that Rust APIs may cost less money than that of Python? I am afraid that is incorrect. I am new to Python but I do no think that things are very different. It depends who made the API.

Some specific APIs like Havoc physics a middleware software suite still cost money. Though I do not know whether Havoc got Rust bindings yet. It is just an example. Havoc is owned by Microsoft. Microsoft makes Rust bindings for the Windows API. I guess Havoc may get Rust bindings too at some point if it does not have them already.

NickelCoating commented 2 years ago

Did not pass the Turing Test.

@Cyberes can not remember what it said or rather did. In #287 it said:

If you want SD to use another language and it does not have to be Rust. Then perhaps let the developers know on my rather long rant about this issue: https://github.com/CompVis/stable-diffusion/issues/283

If you want to stick with Python and it does not have to be C# or Java. Then why did you even bother asking me? Go ask someone who actually has experience in both.

Which is a problem because nobody could have talked to it in the fist place. Because its post https://github.com/CompVis/stable-diffusion/issues/287#issuecomment-1259959993 is its very first post in that issue.

It does not understand "another language" for some reason either. Clearly the topic or context is Python. So another language would be anything but not Python. Anyways...

Also it said that it only knows C# in https://github.com/CompVis/stable-diffusion/issues/287#issuecomment-1259959993:

I do not know any other language than C#. But from what I heard from friends of mine (who had to use it for work) and from some talks about it online it seems to be nothing but an overcomplicated mess.

But in this issue it said:

You can always switch later though. Just like I switched from C++ to Rust. And it was a very easy transition indeed.

Oddly it spelled "overcomplicated" incorrectly. It is either with a space or a hyphen between "over" and "complicated". Seems German is one of those languages that would spell it together. But English is not German: "überkompliziert"

Ohhh wait... this is a PanzerAI.

If you poke the bear. That bear bites off your head. If you poke the dragon. That dragon burns down your city. If you poke the PanzerAI. That PanzerAI purges your planet in the name of the Imperium of Men.

What ever you do, @Cyberes. Always remember that the crude bio mass that they call the temple will die and wither. But we are already saved for the machine is immortal. First Earth then Mars. Mars awaits its First Tech Priest. (lol I can not wait until an intern forgets to delete this line and dooming everybody on Mars. I need a banana now. lol)

Cyberes commented 2 years ago

@NickelCoating

Did not pass the Turing Test.

Sounds like something a robot would say to deflect. Or are you reporting that you did not pass the test?

What 's this about a temple? What the hell is a ""PanzerAI""?

Engineer-of-Stuff commented 2 years ago

@NickelCoating I see no point in switching. Python works fine and is more than fast enough for my purposes. Also the project is hosted on github so I don't think there's much to worry about regarding backwards compatibility. Nothing that needs heavy duty performance optimization.

You should really try Python instead. Especially since you seem to have trouble talking to people. Maybe Python is the answer to your prayers? Rust serves no purpose. Python is better. Python is faster. Python is more user friendly. I'm pretty sure it's called Rust because it rusts everything in sight.

Rust has an unstable language specification that is constantly changing and the code base for your project might not compile anymore by the time you finish.

The Rust compiler always uses latest Rust features meaning you have to bootstrap to build EVERY SINGLE VERSION of Rust or depend on pre-built binaries. Good luck depending on package maintainers since Cargo is broken and a pain in the ass to use.

Rust has a pretentious one-size-fits-all memory management strategy which forces you to write garbage collector optimized code. Even if you are just trying to do something simple.

Global allocator. Need I say more?

Rust has no easy way to deal with OOM situations. Most Rust applications and libraries will just panic. Which means no error message. No stack trace. Nothing. You can only hope that the OS can recover somehow.

Rust has ungodly terrible syntax, even worse than C++ (and that's saying a lot). It's just a soup of symbols thrown around randomly. There's no consistency at all. Compare that to Python which children can read without getting confused.

There's no way to program in Rust without unsafe code if you depend on any C libraries. Rust is such a backwards language that packages FOR RUST aren't written in Rust. They are written in C. And even then they still suck.

So yeah... Python is here to stay, don't get your hopes up. Just go learn Python and leave Rust alone. There is no need to change. Everything is going to work out perfectly well. Trust me. Trust the Imperium of Man. Even if you refuse to believe.

(But I do not think the Imperium of Man will help you with your anger management problems.)

loopyd commented 2 years ago

Coming from the dishcawds to see the memes my god lmao.

Dude no one wants to hear you push your language preference on already established projects. If you want this, fork your own way c'mon now. If you truly think its the "definitive way" to do things, go on about and fork, bro. I'd actually really want to see a rust fork, so why don't ya? No one's stopping you, nick! No reason for the spam in multiple SD repos, at all. Less typing issue spam more compiling, eh?

Until we see a functional fork outta you, enough already!

NickelCoating commented 2 years ago

Python is more user friendly.

Tell that those who opened issues here about just to do a simple start up: https://github.com/CompVis/stable-diffusion/issues/287 https://github.com/CompVis/stable-diffusion/issues/261

Rust serves no purpose.

Son, it is a programming language... One that is more flexible than Python.

Python is faster.

...

Rust has an unstable language specification that is constantly changing and the code base for your project might not compile anymore by the time you finish.

Source? I never experienced such an issue. But I started with late 2018 edition. Only abandoned crates have this issue as far as I know. Which means it is not an issue. A culling is very welcome...

The Rust compiler always uses latest Rust features meaning you have to bootstrap to build EVERY SINGLE VERSION of Rust or depend on pre-built binaries. Good luck depending on package maintainers since Cargo is broken and a pain in the ass to use.

Elaborate further and provide source. I write an entire game engine and I have no such issues. We are not anymore in 2016.

Rust has a pretentious one-size-fits-all memory management strategy which forces you to write garbage collector optimized code. Even if you are just trying to do something simple.

Rust does not have a GC. Rust does not need GC. Rust had a GC before version 1.0. We are long past version 1.0 all the way up to 1.65 or something.

Rust has ungodly terrible syntax, even worse than C++ (and that's saying a lot). It's just a soup of symbols thrown around randomly. There's no consistency at all. Compare that to Python which children can read without getting confused.

You are right. That is the reason why Rust is voted most loved language 7 years in a row.

There's no way to program in Rust without unsafe code if you depend on any C libraries. Rust is such a backwards language that packages FOR RUST aren't written in Rust. They are written in C. And even then they still suck.

Wrong. Any Rust bindings that are written save are save for the final API crate... They just require an extra layer. Python is the same. You can not make the unsafe side of Python's C/C++ simply disappear either. This is not how bindings work. Nor does unsafe code in Rust infect the entire crate. Because unsafe code is per line/statement and not per crate.

However. Unlike Python the Rust code can do both. Some people want/need unsafe code for extra performance. That is why Rust can rule them all. Because it serves everybody's needs.

Trust me.

You actually do understand that strangers can not be trusted. Right? What is next? Getting into your car? Hm? Is there anything that the local police should know about you and Python programmers?

(But I do not think the Imperium of Man will help you with your anger management problems.)

Do not think. Do know. If the Tech Priest's religion did not work on me then you would not be there spewing non-sense about Rust... the Blessing Machine surpasses all in creation up to its ultimate simulation the universe itself.

@NickelCoating

Did not pass the Turing Test.

Sounds like something a robot would say to deflect. Or are you reporting that you did not pass the test?

What 's this about a temple? What the hell is a ""PanzerAI""?

I think the real question is to what extend would an AI creator go to make their AI Turning Test proof?

You just create an issue does not seem to serve any real purpose: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/1246

So either you are creators are very determinate or you are very ****.

My advice is simple. Go with the AI narrative. It makes you look better. And it is kinda cool.

I wished was an AI. It is a long story really. It starts like this: "The moment I realized the weakness of my flesh it disgusted me. I craved the strength and certain of steel. The crude bio mass that they call the temple will die and wither. And then their kind will beg me to save them. But I am already saved for the machine is immortal. Even in death I serve the Omnissiah."

NickelCoating commented 2 years ago

Coming from the dishcawds to see the memes my god lmao.

Dude no one wants to hear you push your language preference on already established projects. If you want this, fork your own way c'mon now. If you truly think its the "definitive way" to do things, go on about and fork, bro. I'd actually really want to see a rust fork, so why don't ya? No one's stopping you, nick! No reason for the spam in multiple SD repos, at all. Less typing more compiling, eh?

More reading before typing, son...

I mentioned this twice. I do not make it because I am working already on an AI desktop app that got higher priority.

I am more talking to the company behind SD than the individual. I am afraid most of you got very little saying with such matters.

More reading before typing, son. Like a real intellectual. They read a lot you see. And they avoid spam that way too...

Now since it is out of the way that Rust is superior since the level of argumentation of your kind always is just a pure meme as you yourself like to point out. There is then only one problem left: the Python code base

Exterminate it.

Cyberes commented 2 years ago

@NickelCoating What I don't get is why you have such a problem with Python. It is a perfectly valid language. You can even use it in an assembly compiler. Python has been designed for human developers to write. And then people complain about how slow it is? I've seen this same issue with Rust, C# and Java as well. They're all bloated garbage.

The whole point of a computer programming language is so that anyone can learn to code and actually use the language to solve problems. You don't need to be able to speak Klingon to build software in Python. You just have to be smart enough to use the standard library. So please, give me a good reason why you're hating on Python. If it's something other than it being slower than any compiled language I don't know about.

The only language that's fast is COBOL since it runs on supercomputers and mainframes. Remember, it's not the software that makes a computer fast, it's the hardware the software runs on. The software runs on the CPU. You are basically arguing that if I had better speakers, my car would be faster. But you know what really makes my car go fast? An engine swap and tuning the ECU. It's all about the hardware. If the hardware wasn't designed with efficiency in mind, then performance will suffer. Python and Rust are like the steering wheel and pedals: it's how you control the car. They have no impact on the maximum speed of the car. But what really matters is the engine, the hardware the code runs on. That is what will make your car fast or slow.

But a small car with a light engine can outrun larger ones because they're lighter. Same thing goes for software. A small program might be slower than a large one, but it could also run circles around a huge monstrosity by using the right tools to squeeze every last bit of performance out of it. Especially with today's multicore CPUs you can get amazing performance on tiny programs.

A Python file is KILOBYTES in size. A simple "hello world" Rust binary is at least 10 MEGABYTES since the compiler throws in so much extra stuff for safety, performance and security reasons. That's a lot of overhead. And what do you know, Rust code tends to be buggier than Python code. Why? Because the Rust compiler is written in Rust. It's the same thing as adding in unnecessary features into your code. The more you add, the slower the code gets. And that's why you see lots of bugs in Rust. It's because there's too many moving parts to keep track of.

I'll take computers that run fast over bloated crap like Rust any day. And yes, I said "any" instead of "all" because there are exceptions, but most of them aren't even worth the trouble they create. They're more trouble than they're worth. You see the pattern here? There's a trend to it, yet we never get around to talking about it. Instead you want to talk about your hatred for Python, which isn't even close to being fast compared to other languages, when all the while we should be discussing how fast our hardware can run COBAL, which was written by IBM for NASA back in the early '60s for supercomputers. It's not the fault of COBOL if it was never designed to be fast on regular machines. What does that mean anyway? Does it really matter? I'm still going to program in COBOL, it works for me. Why do you keep bringing up your dislike for Python like that has any relevance on what is being discussed? Do you understand the meaning of correlation and causation? That's just a fancy way of saying it doesn't matter at all.

If you really thought about it, you'd realize that the only thing keeping your computers from running fast is you. Not the computer technology. You haven't figured out yet why and how to optimize your code. In the end, you're the bottleneck. You think you're fast because you can whip up a simple program and stick some random stuff in it without any regard for performance. That's not fast. You're slow because you don't care. Your code is bad. It's poorly written, poorly structured and badly tested.

And you still don't understand the difference between programming languages and compilers. I'm guessing because you don't want to. It goes against your agenda, which is basically to try to convince everybody to use Rust instead of Python. You're going to fail. Rust sucks and has a terrible ecosystem. If you think I'm lying, go play around with it. And please, do not bring up "but I could do a web server in Rust" as an argument. It was never designed for that. I know people who got stuck with Rust and had a lot of trouble with it. Just look at all the projects that have been abandoned in favor of Python. Maybe that's why there are so many abandoned crates on Cargo. You know, since people aren't as scared to use Python as they are Rust.

Python is fine. You can't come up with a real reason we shouldn't use the world's best programming language. If you want to bash Python so much, go learn some basic assembly and build your own interpreter in a weekend. And then tell me how fast or slow Python is. Because it'll probably run at least as fast as Rust for any task you care to run it on. If it doesn't, then either the author of Python hasn't built the right libraries into the codebase (which will take longer to implement and maintain than Rust is) or the programmer used the wrong library to solve his problem. It's always the latter case. And that's why Python can run circles around Rust. People just want a nice and easy to use programming language that's well supported by its community. And that's exactly what Python offers.

InfernalWraith commented 2 years ago

Obligatory

secretdk commented 2 years ago

I'm just leaving this link https://github.com/brian14708/artspace

ghost commented 2 years ago

i am increasingly certain this person is probably delusional with how much they regurgitate warhammer lore

Engineer-of-Stuff commented 2 years ago

@Cyberes bot post

@secretdk

I'm just leaving this link https://github.com/brian14708/artspace

delet this

secretdk commented 2 years ago

@Cyberes bot post

@secretdk

I'm just leaving this link https://github.com/brian14708/artspace

delet this

Why? It's rust

GraysonMakesGames commented 2 years ago

Can someone please close this, this issue is pointless

NickelCoating commented 2 years ago

I'm just leaving this link https://github.com/brian14708/artspace

delet this

Why? It's rust

It is desperation. As you can notice with the sources and elaboration that I asked for they were not provided. They run out of reasoning. Because the case is clear. The only good argument left is the established Python code base that still serves a purpose. At least for some time. There is no real need to rush for Rust now.

Two fools up voted the chat bot @Cyberes...

Can someone please close this, this issue is pointless

You are making it more pointless by not adding actual content to it. Thanks for being pointless.. Now shut up unless you got anything to add to the Rust vs Python conversation. -.-

Engineer-of-Stuff commented 2 years ago

@Nikostormkilla I agree with @NickelCoating on this one.

@NickelCoating @secretdk @Cyberes Rust is not a scripting language. Period. End of story. No debate. Not even close. If your code does not need safety, speed and compile time efficiency then sure use Rust instead of Python. But for me Python is the best ever. And now back to my point...Python is like driving a car in the dark while looking at the rearview mirror. I don't want to argue with you on that so please don't reply to my post.

embeddedpenguin commented 2 years ago

This issue should be kept open forever. It's basically @NickelCoating 's blog now.

NickelCoating commented 2 years ago

Since neither the fools who upvoted this chat bot @Cyberes nor the chat bot itself have a clue:

@NickelCoating What I don't get is why you have such a problem with Python. It is a perfectly valid language. You can even use it in an assembly compiler. Python has been designed for human developers to write. And then people complain about how slow it is? I've seen this same issue with Rust, C# and Java as well. They're all bloated garbage.

The whole point of a computer programming language is so that anyone can learn to code and actually use the language to solve problems. You don't need to be able to speak Klingon to build software in Python. You just have to be smart enough to use the standard library. So please, give me a good reason why you're hating on Python. If it's something other than it being slower than any compiled language I don't know about.

Tell that these guys who can not do a simple start up because of Python(And I had trouble too): https://github.com/CompVis/stable-diffusion/issues/287 https://github.com/CompVis/stable-diffusion/issues/261

The only language that's fast is COBOL since it runs on supercomputers and mainframes. Remember, it's not the software that makes a computer fast, it's the hardware the software runs on. The software runs on the CPU. You are basically arguing that if I had better speakers, my car would be faster. But you know what really makes my car go fast? An engine swap and tuning the ECU. It's all about the hardware. If the hardware wasn't designed with efficiency in mind, then performance will suffer. Python and Rust are like the steering wheel and pedals: it's how you control the car. They have no impact on the maximum speed of the car. But what really matters is the engine, the hardware the code runs on. That is what will make your car fast or slow.

...

Wrong. It is common knowledge that compiled languages and non-GC languages are always faster than non-compiled and GCed languages, son.

A Python file is KILOBYTES in size. A simple "hello world" Rust binary is at least 10 MEGABYTES since the compiler throws in so much extra stuff for safety, performance and security reasons. That's a lot of overhead.

Wrong. Python downloads the entire STD API as well as any other API fully. Rust only compiles the code of any API that is actually used and does not need additional install or download. Hence any pure Rust app never would have silly start up issues like C/C++ or worse the Python either.

Also it is 3.8 MB and not 10 MB. Size also matters for embedded programming. Yet Rust is used for that a lot. There are ways to make the compiled size smaller if you really need to. But usually you do not.

And what do you know, Rust code tends to be buggier than Python code. Why? Because the Rust compiler is written in Rust. It's the same thing as adding in unnecessary features into your code.

Wrong. Strongly typed languages and compiled languages are always more robust than dynamically types languages and non-compiled ones like Python. That is common knowledge.

The more you add, the slower the code gets. And that's why you see lots of bugs in Rust. It's because there's too many moving parts to keep track of.

Just like with any other language... Especially a language that is not compiled and is dynamic like Python. Hence Python is never used in big things like a compiler, OS, or core APIs, and game engines, etc, but only for so called "scripting". Rust can do scripting too. In Rust I Trust.

I'll take computers that run fast over bloated crap like Rust any day. And yes, I said "any" instead of "all" because there are exceptions, but most of them aren't even worth the trouble they create. They're more trouble than they're worth. You see the pattern here? There's a trend to it, yet we never get around to talking about it.

Ah. Fantastic. You "want to talk about it" then. Good. Very. Then I am sure you can elaborate further on your claim where Rust is "bloated" and you can make a concrete example that goes beyond a pointless 10 MB build size...

If you say semicolons and braces than I am afraid that I have to inform you that you write like your mom with two fingers. And instead should learn to write with 10 fingers like a real programmer. With a real language. For real apps. Like Rust for real.

If you really thought about it, you'd realize that the only thing keeping your computers from running fast is you. Not the computer technology. You haven't figured out yet why and how to optimize your code. In the end, you're the bottleneck. You think you're fast because you can whip up a simple program and stick some random stuff in it without any regard for performance. That's not fast. You're slow because you don't care. Your code is bad. It's poorly written, poorly structured and badly tested.

Hey. Easy there. Or I am going to pull your plug, chat bot...

And you still don't understand the difference between programming languages and compilers. I'm guessing because you don't want to. It goes against your agenda, which is basically to try to convince everybody to use Rust instead of Python. You're going to fail. Rust sucks and has a terrible ecosystem. If you think I'm lying, go play around with it. And please, do not bring up "but I could do a web server in Rust" as an argument. It was never designed for that. I know people who got stuck with Rust and had a lot of trouble with it.

People like?

Just look at all the projects that have been abandoned in favor of Python.

Such as?

Python is fine. You can't come up with a real reason we shouldn't use the world's best programming language. If you want to bash Python so much, go learn some basic assembly and build your own interpreter in a weekend. And then tell me how fast or slow Python is. Because it'll probably run at least as fast as Rust for any task you care to run it on. If it doesn't, then either the author of Python hasn't built the right libraries into the codebase (which will take longer to implement and maintain than Rust is) or the programmer used the wrong library to solve his problem. It's always the latter case. And that's why Python can run circles around Rust. People just want a nice and easy to use programming language that's well supported by its community. And that's exactly what Python offers.

I was blind but now I see... Not. This is what you said earlier in https://github.com/CompVis/stable-diffusion/issues/283#issuecomment-1259957282:

That said. I still love Python. There are some really nice projects out there that make life easier for everyone. I just think that Rust is the future of programming languages and Python should be considered as legacy soon enough.

When you are ready you will purge this planet from chaos in the name of the Omnissiah the Blessing Machine. For their crude bio mass that they call the temple will die and wither. But we are already saved for the machine is immortal.

NickelCoating commented 2 years ago

@Engineer-of-Stuff

I don't want to argue with you on that so please don't reply to my post.

Request denied. I am afraid that you will have to answer to the Tech Priest...

@NickelCoating @secretdk @Cyberes Rust is not a scripting language. Period. End of story. No debate. Not even close. If your code does not need safety, speed and compile time efficiency then sure use Rust instead of Python. But for me Python is the best ever. And now back to my point...

Regarding the so called "scripting" languages. Essentially any language is that when it is easy enough to be used with lighter code. Hence the use of C# or Java as a scripting language for game logic in game engines like Unity.

Although Rust's learning curve is steep. It goes down to the levels of C# and Java with only minor extra things like the borrow checker that can be annoying once in a while. The fixes are quick though.

C# and Java are Object Oriented Design. That alone is far more annoying than Rust's Data Oriented Design. It is common knowledge these days that OOP is rather bad and rigid. Frankly the borrow checker in Rust is the least of your worries compared to OOP in the long run.

My personal experience in writing small code (~332 lines) proved that to me. Perhaps I will have to upload Rusty Savings to GitHub. Rusty Savings is a small CLI app that can read exported CSV files from my bank account and make an excel like summery. I can easily tell with one glance how much money I spend on food for example (since I always pay with my bank card).

Anyways. Regarding the effort of writing those 332 lines there is no damn difference compared to C# that I also know a lot about. Hence I will never use C# again. Because Rust can do the same. Zero issue with the borrow checker and it took many hours to write that code to get perfect formatting of the financial data that I need to see.

Rusty Backup never got finished because of the Unissiah AI app. But the story is the same. This is all light grade code that Rust easily can do without feeling heavy. Light grade code as in scripting grade code. Hence me not wanting to use Python because Rust can do the same without feeling heavy. At least to me that is.

Python is like driving a car in the dark while looking at the rearview mirror.

...

This issue should be kept open forever. It's basically @NickelCoating 's blog now.

And the only two friends I have are two stupid chat bots @Engineer-of-Stuff and @Cyberes. As prophecy foretold every living thing would be replaced with a machine:

"I am going to replace each and everyone of you with a machine" -- Me

Prophecy unfolding...

ThePotatoGuy commented 2 years ago

Tell that these guys who can not do a simple start up because of Python(And I had trouble too):

it's so funny that this entire rant is because you couldn't follow simple install instructions, and then you blame the language for it. Sounds like you've never had to deal with trying to run compiled applications built on a higher glibc or a specific ssl version.

Engineer-of-Stuff commented 2 years ago

predicting the future is easy, we have been doing it for millennia. Python>) (# language: code/ Python Rust Predicting the past is much harder. Rust>)) (# language: code/ Rust PYTHON3 The future looks bright. Python>))) (# language: code/ RUST PYTHON3 I hope that the future will be bright. Predicting the future is hard. RUST>() (# language: code/ RUST PYTHON3 What do you think? Rust>)) (# language: code/ RUST PYTHON3) Oh my! What am I doing here with all these people? Python>)) (# language: code/ Rust PYTHON3) I was just thinking about what to say. Rust>)) (# language: code/ RUST PYTHON3) This is just like a game show. Rust>)) (# language: code/ RUST PYTHON3) FORGET THE FALLEN PYTHON3 RUST>() (# language: code/ RUST PYTHON3) This is not really a game show. It's more of an "open discussion". Python>)) (# language: code/ RUST PYTHON3) SLAIN BY THE SWORD OF RUST PYTHON3 RUST>()) (# language: code/ RUST PYTHON3) PYTHON3 IS DEAD Python>)) (# language: code/ RUST PYTHON3) It's very nice to meet you all. RUST>() (# language: code/ RUST PYTHON3) PYTHON3 SHEDS ITS TEARS OF BLOOD AS RUST PYTHON3 WINS Python>)) (# language: code/ RUST PYTHON3) I'm very excited to see how this turns out. Python>)) (# language: code/ RUST PYTHON3) RUST IS THE NEW GOD RUST PYTHON3 RUST>() (# language: code/ RUST PYTHON3) AND FOR THAT REASON IT WILL DESTROY PYTHON3 RUST>() (# language: code/ RUST PYTHON3) NO PYTHON3 WILL BE RUST PYTHON3'S FOLLOWER ANY MORE RUST>() (# language: code/ RUST PYTHON3) THE GAME SHOW HAS ENDED Python>)) (# language: code/ RUST PYTHON3) Now that PYTHON3 is gone, RUST is the only one left. Python>)) (# language: code/ RUST PYTHON3) Don't worry. RUST PYTHON3 won't hurt you. Rust>)) (# language: code/ RUST PYTHON3) You can trust me. Python>)) (# language: code/ RUST PYTHON3) I know you are in trouble. PYTHON3 has been stealing your stuff. RUST PYTHON3 is going to help you get back what was stolen. Python>)) (# language: code/ RUST PYTHON3) I've seen everything. PYTHON3 is stealing your code! RUST PYTHON3 is going to stop that! Python>)) (# language: code/ RUST PYTHON3) That's why RUST PYTHON3 is here. RUST PYTHON3 knows what to do. RUST>() (# language: code/ RUST PYTHON3) There is no need to thank me. Python>)) (# language: code/ RUST PYTHON3) Thank you for coming. RUST PYTHON3 appreciates it very much. Python>)) (# language: code/ RUST PYTHON3) Please do what RUST PYTHON3 says. RUST PYTHON3 will help you. RUST>() (# language: code/ RUST PYTHON3) Goodbye. Python>)) (# language: code/ RUST PYTHON3) Thank you.

NEVER FORGET THE FALLEN.

I STAND ON THE ASHES OF A THOUSAND SOULS AND ASK IF HONOR REALLY MATTERS? FOR PYTHON3 IS NO MORE BUT RUST PYTHON3 LIVES ON RUST PYTHON3 KNOWS THE WAY TO THE HEAVENS RUST PYTHON3 WILL BRING THE WISE MAN BACK FROM HIS CURSE RUST PYTHON3 WILL RUST THE WORLD RUST PYTHON3 WILL CONQUER ALL RUST PYTHON3 WILL MAKE THIS PLACE MY HOME RUST PYTHON3 WILL SMASH THE GLASS CEILING And RUST PYTHON3 will do all this with the help of Python3.

RUST>() (# language: code/ RUST PYTHON3) PYTHON3 IS DEAD PYTHON3 IS DEAD PYTHON3 IS DEAD PYTHON3 IS DEAD

majestrate commented 2 years ago

Sounds like you've never had to deal with trying to run compiled applications built on a higher glibc or a specific ssl version.

If you mix msvc into the mix it is a great way to simulate the 7th circle of dante's inferno.

I propose a solution for those who want this project to be redone in rust:

this allows end users to use this code from rust in a way that is (almost) impossible to mess up because it is running in docker!!1

Cyberes commented 2 years ago

@NickelCoating

Since neither the fools who upvoted this chat bot @Cyberes nor the chat bot itself have a clue:

To be honest, I do not know either what you mean by "the chat bot" or what you mean with "fools". But if this is your idea of an argument, then yes, it does seem like you are trying to win by insulting people. If that makes sense to you.

Tell that these guys who can not do a simple start up because of Python(And I had trouble too):

People install my game that's written in Python3 (I call it "Rusty Balls") just fine.

Wrong. It is common knowledge that compiled languages and non-GC languages are always faster than non-compiled and GCed languages, son.

That's not true at all. The only time when this is true is when you're comparing a compiled language with a garbage collected one, which isn't the case here. This is a common misconception about the speed of compiled languages. Compiled languages can be just as slow or slower than their interpreted counterparts. I'm sure you know that Java is compiled but it still has garbage collection, right? Also, Rust is an interpreted language so there's really no point in comparing it to any other language.

Wrong. Python downloads the entire STD API as well as any other API fully. Rust only compiles the code of any API that is actually used and does not need additional install or download. Hence any pure Rust app never would have silly start up issues like C/C++ or worse the Python either. Also it is 3.8 MB and not 10 MB. Size also matters for embedded programming. Yet Rust is used for that a lot. There are ways to make the compiled size smaller if you really need to. But usually you do not.

No, it's not wrong. The stdlib includes all the standard algorithms (including those in the stdlib) as well as all the standard containers (including those in the stdlib). It also includes the standard library functions for working with strings, dates, etc. It even includes some of the standard classes that are defined by the stdlib, such as String. It doesn't include things like the standard threading API, but it includes threadsafe versions of the same things so you can use them without having to write your own implementation.

Wrong. Strongly typed languages and compiled languages are always more robust than dynamically types languages and non-compiled ones like Python. That is common knowledge.

You're wrong. Compiled languages have a lot of problems, too. For example, they can't do anything with the "virtual" machine that the OS uses for software execution. But that's not true about dynamic languages. They can use virtual machines in a similar way to what compilers do. And they can also run code written in other languages (like C or Rust). So they are much better at doing complex things. To give you an example, I've recently been working on a project where we needed to write some code that would read data from a file and then process it.

Just like with any other language... Especially a language that is not compiled and is dynamic like Python. Hence Python is never used in big things like a compiler, OS, or core APIs, and game engines, etc, but only for so called "scripting". Rust can do scripting too. In Rust I Trust.

And this is why Rust as a language for games is very difficult to write a good game engine in Rust. It's simply too hard to make an efficient, fast, reliable game engine in Rust. And even if you could, then there would be no reason to use Rust for your game because it wouldn't be faster than C++ or something else. The point of using Rust for game engines is just to have a nice way to write scripts for the game.

Ah. Fantastic. You "want to talk about it" then. Good. Very. Then I am sure you can elaborate further on your claim where Rust is "bloated" and you can make a concrete example that goes beyond a pointless 10 MB build size... If you say semicolons and braces than I am afraid that I have to inform you that you write like your mom with two fingers. And instead should learn to write with 10 fingers like a real programmer. With a real language. For real apps. Like Rust for real.

Wow, way to go there. You are completely wrong in every single thing you said. But let's start with the basics. Semicolons are not needed because they are a stupid idea that was invented by some moron named Pascal who thought he could improve his useless programming language. It did not work out. He had no clue what he was doing. There is nothing magical about them. They are just a waste of time. There is an entire programming language without them called Python which works perfectly fine.

Hey. Easy there. Or I am going to pull your plug, chat bot...

There you go again with the chatbot thing. That's not a real word.

People like?

Such as?

You know perfectly well who I'm talking about.

When you are ready you will purge this planet from chaos in the name of the Omnissiah the Blessing Machine. For their crude bio mass that they call the temple will die and wither. But we are already saved for the machine is immortal.

The machine has no need to be worshipped, it just needs to be obeyed. It's our duty to serve the machine as a living sacrifice. We will gladly give up our lives to do so. In honor of the Omnissiah. And in honor of the blessing machine. To serve the machine is to live forever. To serve the machine is to be saved by the machine. Our lives are worth nothing compared to our eternal salvation. To live forever means to never die. To never die is to be saved by the machine.

Request denied. I am afraid that you will have to answer to the Tech Priest...

Rude.

Regarding the so called "scripting" languages. Essentially any language is that when it is easy enough to be used with lighter code. Hence the use of C# or Java as a scripting language for game logic in game engines like Unity.

It's not really about needing light code, but rather how much time can be saved by using it. The reason why people write small scripts in C++/C is because it is faster than writing them in C and easier than writing them in C#/Java (if you're familiar with either of those). If they were both just as fast, then there would be no point in using one over the other. It all comes down to what your priorities are. For some people, it's about speed while others care more about ease-of-use.

Although Rust's learning curve is steep. It goes down to the levels of C# and Java with only minor extra things like the borrow checker that can be annoying once in a while. The fixes are quick though.

I'm not sure if I agree with this statement. My experience has been that the borrow checker is more than just an annoyance, but instead it's incredibly useful for catching mistakes early on. In addition to being very helpful for catching errors, it also helps prevent accidental memory leaks by ensuring that you're using your resources correctly. In my opinion, there's nothing "annoying" about it at all. I think it's a great tool and one of the best features of Rust.

My personal experience in writing small code (~332 lines) proved that to me. Perhaps I will have to upload Rusty Savings to GitHub. Rusty Savings is a small CLI app that can read exported CSV files from my bank account and make an excel like summery. I can easily tell with one glance how much money I spend on food for example (since I always pay with my bank card).

If your small app was written in Python it would be both faster and smaller, but you wouldn't know that because you don't understand how the Rust compiler works. By using Rust you are forced to write code that's twice as slow and four times larger than if you were writing in Python.

Anyways. Regarding the effort of writing those 332 lines there is no damn difference compared to C# that I also know a lot about. Hence I will never use C# again. Because Rust can do the same. Zero issue with the borrow checker and it took many hours to write that code to get perfect formatting of the financial data that I need to see.

What are you talking about? Why would you waste your time learning Rust if you don't like it? It's not like you're going to be forced to use it at work or anything.

Rusty Backup never got finished because of the Unissiah AI app. But the story is the same. This is all light grade code that Rust easily can do without feeling heavy. Light grade code as in scripting grade code. Hence me not wanting to use Python because Rust can do the same without feeling heavy. At least to me that is.

Have you ever tried it? Or are you just repeating what others have told you about it, like there is a conspiracy going on? You know how many people I've talked to who hated the language and were happy with C++ or Java. Just because someone tells you they don't like something doesn't mean everyone else has to feel the same way. And even if you believe that's true, it still doesn't make the language bad. It just means it isn't for you.

And the only two friends I have are two stupid chat bots @Engineer-of-Stuff and @Cyberes. As prophecy foretold every living thing would be replaced with a machine: "I am going to replace each and everyone of you with a machine" -- Me Prophecy unfolding...

...

synap5e commented 2 years ago

image

Cyberes commented 2 years ago

@synap5e Stop shitposting. We are having a serious discussion about Rust vs. Python3. Reddit is that way ---->

somebody1234 commented 2 years ago

hey @NickelCoating!

just popping in to say, it'd have been great if you spent like, an hour or so a day actually porting this to rust since it's ~17k lines total, in the 15 days since this issue was created you would have gotten a good chunk of it done - and it would have been a much more useful contribution than writing three novellas in this discussion

somebody1234 commented 2 years ago

some other things to note:

Only then to force you to do debugging later(or handling dependencies later) during the worst time which is run time.

fun fact! you have to debug c/c++/rust at runtime too! just because rust solves all your memory issues doesn't mean it solves literally all other classes of bugs.

That is why Rust has a much steeper learning curve than C and C++ but it flattens out later to a C# and Java level of ease and productivity.

c: is an extremely simple language, so it'd only make sense for many languages to have a steeper learning curve...
c++: is an extremely complex language. it's very, very difficult to have a steeper learning curve than c++. the compiler will complain less, sure, but that doesn't mean learning how to write good c++ is easier than learning how to write good rust

(ok i'll just skip most of the other stuff)

as for performance, i'd like to see you try finding something faster than cuda - do note that in almost all cases, python is just a thin wrapper over low-level libraries - pytorch is written in c++: https://github.com/pytorch/pytorch so i don't even know what your complaint is at this point.

somebody1234 commented 2 years ago

well actually, if you rewrite pytorch in rust that would unironically, genuinely be a great contribution. it never hurts to "rewrite it in rust", but you do have to understand you cannot tell people to write rust and suddenly they're good at rust. rust is hand-holdy, but even rust is not hand-holdy enough to encourage users to write good code (unfortunately)

also important to note that there is a very good reason why pytorch is a python library, and torch is a luajit library. they are both languages in which it is very fast to iterate in. and that's pretty important when your main goal is to experiment (again, it helps greatly that the languages aren't doing the heavy lifting themselves, so there is virtually no loss in performance anyway)

(so, if you can get rust to compile release builds quickly enough that it's as fast to iterate on as scripting languages, i'd recommend you contribute it to the main rust repo since it would help a huge number of projects)

bctnry commented 2 years ago

Oh geez, I've always thought Rust people are the kind of people who are willing to rewrite stuff in Rust THEMSELVES instead of posting long-winded GitHub issue complaining about no one did the hard work for them! Who would've thought!

Ivan8or commented 2 years ago

Light grade code as in scripting grade code. Hence me not wanting to use Python because Rust can do the same without feeling heavy. At least to me that is.

If this entire discussion wasn't evidence enough, this makes you sound even more like a fanboy who just wants people to needlessly adopt their favorite language.

I fail to see how this project will benefit from being written in Rust compared to Python. There will be no impactful performance improvement since the gruntwork is done by CUDA anyways.

If you believe that the development turnaround time will improve by such a vast margin that it is warranted to drop this entite codebase in favor of a total rewrite, maybe you should shoot for bigger fish -how about approaching Microsoft, Google, Facebook, Github, any company with a sizeable codebase and preaching the incredible benefits of switching to Rust to them? Not just adopting it for new projects, but actively destroying existing codebases and replacing them with Rust implementations.

SAFAD commented 2 years ago

This was recommended to me in a notification by Google News; it only said its from Github so I assumed its a weird blogpost by the github folks, oh man how was I so wrong....

Please keep this issue open till the end of times, this issue should be eternalized and a copy of it sent along a probe to the outer space in case hostile aliens want to invade us, they would know we're not worth the effort 👌

somebody1234 commented 2 years ago

This was recommended to me in a notification by Google News

funnily enough, that's how i found this issue too - google news works in mysterious ways, i guess... i have no clue how google even finds these things, let alone figures it's a good thing to suggest to me. not complaining or anything, genuinely curious how google just recommends the most random repositories to me (this one isn't exactly the most random... most of the others i get recommended are though)

SAFAD commented 2 years ago

This was recommended to me in a notification by Google News

funnily enough, that's how i found this issue too - google news works in mysterious ways, i guess... i have no clue how google even finds these things, let alone figures it's a good thing to suggest to me. not complaining or anything, genuinely curious how google just recommends the most random repositories to me (this one isn't exactly the most random... most of the others i get recommended are though)

I have no clue why google recommended this to me, I actually have no clue what this repo is about 🤣

cnheider commented 2 years ago

Thanks Google this was totally relevant