[ / / / / / / / / / / / / / ] [ dir / animu / arepa / asmr / ausneets / pawsru / sonyeon / vg / wx ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): 3ef4f79e4c2aaa4⋯.jpg (24.01 KB, 200x263, 200:263, RustProgrammingLanguage.jpg) (h) (u)

[–]

 No.961771>>961777 >>961782 >>961788 >>961803 >>961827 >>961853 >>961861 >>961866 >>961886 >>962011 >>962145 >>963022 >>964392 >>964715 >>966322 [Watch Thread][Show All Posts]

I got this book today because I usually like learning useless memelangs (i.e. OCaml, Jabashit, R, C#, FORTH, etc.) because there usually is some novel idea to be found somewhere. Now I do realize that Rust introduces the Ownership principle and some other interesting things, but this is about my experience with this book in particular. I am on page 56 so I may very well be wrong, but this has been my experience so far

>Calling me Rustacean at every breath I take

>Emoji's

>Dumbing down simple things

>"Many people don't think of chars as chars"

i read the pages it referenced, he just explained UTF-8 chars and how Rust does strings and how strings are too complicated for most people according to him (projection much)

>"You don't need to learn this now, you'll learn it 2 pages later"

I swear it was worded similarly to this

>"Compile errors don't mean you're bad, I swear!!!"

>"Other languages don't do this!"

Most languages that aren't Python, Jabashit or a C clone have this

inb4 most languages are C clones

Like I said I'm 50 pages in and the author is driving me nuts. I already read a shitton of books on specific languages and CompSci, but god this guy is obnoxious. I read some FUD about one of the authors being an antifag and both the authors being incompetent docs authors but I wasn't able to confirm much. Will this get any better or should I just accept Rust is CoCed Millenial shit like FreeBSD and move on? I actually like the language itself better than C, I just find most material unbearable to read.

inb4 "suck it up, it ain't that bad"

 No.961776>>961949

Most programming books are shit (o'reilly seems to be at least okay sometimes though) and I can imagine books for languages with rust's kind of audience are quite cringeworthy. However, proper handling of strings with actual human-entered text is beyond most programmers unless you consider them as opaque blobs.


 No.961777>>961779 >>961798 >>961884 >>963943

>>961771 (OP)

Learn Haskell instead.

>I got this book today

In case you didn't know, the authors don't make any money off the book. Everything they would have made is given to http://www.blackgirlscode.com


 No.961779>>961966

>>961777

Got it used, thank god.


 No.961782>>961783 >>961788 >>962141 >>963865

>>961771 (OP)

Ideally you should read languages by the authors themselves, or someone very close to the steering committee if it is a standardized language. Never read a book which dumbs it down, you're better off just reading the language grammar and studying the standard libraries otherwise.


 No.961783>>961788

>>961782

*Read books on languages by the language creator themselves.


 No.961788>>961803 >>961861 >>961888 >>961927 >>961929 >>963879 >>963943

File (hide): 9ba4a047017ddb1⋯.jpeg (22.21 KB, 400x400, 1:1, _okxMUY1_400x400.jpeg) (h) (u)

File (hide): 9c3dcd3f7c18070⋯.jpg (445.07 KB, 1536x2048, 3:4, (((carol nicholas))).jpg) (h) (u)

File (hide): 57377e2ead55ddc⋯.jpg (398.34 KB, 1080x1920, 9:16, soysband.jpg) (h) (u)

>>961771 (OP)

>>961782

>>961783

Steve Klabnik and (((Carol Nichols))) claim to be core developers, but from some quick research it looks like they just write crappy documentation. Klabnik spends most of his time on Twitter bitching about fascism and competing for the title of world's ugliest soy goblin while (((Carol))) makes soy babies.


 No.961791

File (hide): 29b74f40eb1d287⋯.png (1.16 MB, 768x432, 16:9, mfw chrome.png) (h) (u)

>almost every nostarch book page is stuffed full of accolades

>The Rust Programming Language has absolutely none

Serves them right for expecting anything good from Steve Crabnick.

https://archive.is/X3RaZ


 No.961797>>961802

>that cover

>that content

Why does everyone in the Rust community act like a child?


 No.961798>>961821 >>961853

>>961777

> Everything they would have made is given to http://www.blackgirlscode.com

Proof?


 No.961802

>>961797

But, anon, isn't that kawaii nano desu?


 No.961803>>961888 >>963028 >>964392

>>961771 (OP)

>should I just accept Rust is CoCed Millenial shit

I don't see how you could have any awareness of the Rust community and not have accepted it already. They're not quiet about the importance of "Social Justice" in their project "spaces".

They're also aggressively welcoming to noobs. By that, I mean not just that they're not Theo de Raadt-style RTFMfags who will tear newbies apart on the smallest pretense, but that they're basically the polar opposite. They've made it an official part of their CoC that every 70 IQ nigger ape who knuckledrags his way into the Rust community through a Diversity In Coding initiative will be treated with

TRIGGER WARNING: NSFV (Not Safe For Vegans) metaphor ahead!

kid gloves.

>We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.

>In particular, we don’t tolerate behavior that excludes people in socially marginalized groups.

The CoC, btw, is so vague that it's basically moderator's choice as to what constitutes acceptable behavior. It's not really a workable policy document, it's just SJW virtue signalling that provides the thinnest rationale possible for a bunch of pierced, tattooed trust-fund communists to play social revolutionary from behind a computer screen.

I don't know much about Rust itself. It may be a fine piece of technology for some applications. But the Rust community is human garbage.

>>961788

What the fuck is wrong with her face in that 2nd picture? Also, how does a woman that old even have a baby?


 No.961821>>961829


 No.961827

>>961771 (OP)

>I actually like the language itself better than C

You do???


 No.961829

File (hide): 9bcb92398544e17⋯.png (96.49 KB, 255x255, 1:1, 1433547542992.png) (h) (u)

>>961821

>write subpar programming book with your sagging Jewess fuckbuddy to fund a (((charity)))

>sheboons won't touch a computer without gibs


 No.961853>>961870 >>961966

>>961771 (OP)

>>961798

>OP donated $25-$40 to black girls code

How's it feel to be cucked?


 No.961861

>>961771 (OP)

People in IT are generally awful at explaining and teaching, and yet for some reason they keep pumping out books like there is no tomorrow. Writing needs to be a certified skill, there need to be proper writing schools. I don't mean writing as an artform, but writing as a technical craft, like how in ancient times being a scribe was a trade; just being literate did not make you a scribe.

>>961788

Spoiler this shit, that nose is going to give me nightmares.


 No.961866

File (hide): ab308f386a6c301⋯.jpg (750.74 KB, 1200x1600, 3:4, 1497024327206.jpg) (h) (u)

>>961771 (OP)

What is a char? A miserable little pile of bits.


 No.961870>>961878

File (hide): 275286846288e05⋯.jpg (119.92 KB, 1024x683, 1024:683, steve_klabnik_3.jpg) (h) (u)


 No.961878>>961881

>>961870

Spoiler that disgusting shit.


 No.961881

>>961878

He really does look like such a disgusting test-tube human, I don't understand why, though.


 No.961884>>961891 >>961896

>>961777

A serious question to ask these cucks is, why do we need blackgirlstocode? If the impetus is that they don't already, then what evidence is there that they're better than everyone else. If they are coding already, what's the point of the project.

I of course know the (((real))) answer to these questions, but it's always good to make a cuck defend his position for amusement purposes.


 No.961886

>>961771 (OP)

>I read some FUD

>FUD

nice larp rustfag, now go away


 No.961888

>>961788

>>961803

>2nd pic

this is your face on rust.


 No.961891

>>961884

the incessant need of progressives singling out black people and women is psyop to reinforce the idea that these groups are inferior

over a long enough time line, their own medicine will cure itself


 No.961896>>961898

>>961884

They'll take your question and use it to virtue signal about how racist it is to be results oriented.


 No.961898

>>961896

Btw, it's the same people who can in the same breath without their head exploding say the right's abstinence-only push was laughable due to ignoring results to push ideology.


 No.961900>>961902 >>961918 >>961937

Rust, Javascript, and others have a huge culture problem. Unlike other people on this board I'm not opposed to memory safety or garbage collection, but I can never really participate in either community without running into a bunch of annoying faggots. Ostensibly intelligent grown ass men who nevertheless engage in performative retardation and pepper everything they write with twee lingo, emojis, and gifs. It's completely transparent and totally unnecessary.


 No.961902


 No.961918>>961922

>>961900

Another issue is the bannhammer, everything is trolling.


 No.961922>>961967

>>961918

What happens if you post as Deshawn James, a lipsmacking turbonigger who can't into rust and just drag it until they're desperate to yell troll? Do they force themselves to swallow each load or can they be pushed to an itchy trigger finger that will squeeze on legit boons? Would they start paper checking their blacks? Could be a fun project if we still did fun projects.


 No.961927>>961933

File (hide): 060445f7982683a⋯.jpg (265.05 KB, 1280x932, 320:233, 060445f7982683aa002a779d6f….jpg) (h) (u)

>>961788

Christ, now that's a kikess.


 No.961929>>961932 >>961943

>>961788

Why did I zoom in on the second thumbnail?


 No.961932>>961945

>>961929

Because you wanted to enjoy her beautiful face in more detail, didn't you?


 No.961933

>>961927

Intolerant.


 No.961937

>>961900

>Unlike other people on this board I'm not opposed to memory safety or garbage collection

In performance crucial code like kernels, drivers, and firmware!?


 No.961943>>961945

>>961929

Curiosity killed the cat.

It's like a car accident, you can't look away, can you?


 No.961945

>>961932

>>961943

I think I was initially trying to read the book cover, but good lord. Ugly even by their standards.


 No.961949

>>961776

Depends on the specific series, there's the Learning __ Orielly series, the Definitive Guide to series, __ in a Nutshell, etc...

The definitive guides are generally the best followed by the cookbooks. IMHO of course.


 No.961966


 No.961967

>>961922

I'm in. Just someone organize these ops because I ain't got that much time for this autistic​ shit


 No.962011>>962054 >>962141

>>961771 (OP)

most books about tech are utterly useless and for people who are too lazy to actually use the tech or their brain to think about it along with the manual/spec

>emojis

close the book and never look at it again. there are 5000 other rust books


 No.962054>>962099

>>962011

I'll finish it because I'm a cheap fuck and I already paid for it (they don't take returns on used items, I checked) but after that I won't touch anything written post-2002 for a fair amount of time. I'll probably remember this shithouse book for the rest of my life though. Lesson learned.


 No.962099

>>962054

The book isn't that bad, to be honest. You just got what you expected to get. All the spoon feeding would be much less noticeable and distracting if you didn't expect to read a book written by SJWs. Imagine how you would react if you thought that the book was written by Eric Raymond. AFAIR, the spoon feeding goes away after the first few chapters. Also, you can read the book online for free to avoid supporting the nigger coders.


 No.962141

>>962011

The tech/computer sections in the bigger bookstore chains are disgraceful, so I have to agree.

>>961782

Yea, basically this. Too bad minor fixes, and poor documentation is all it takes to be a core dev for meme/buzzword of the day langs.

Anyway I'm not OP but I'll take a good rust ebook if there any, for the same reasons as OP. If not whatever, PDF unrelated and most likely more enjoyable anyway.


 No.962145>>962171 >>962182

File (hide): 3e1068009847a97⋯.jpg (23.8 KB, 342x445, 342:445, Not a Rust book.jpg) (h) (u)

>>961771 (OP)

Let's improve your book and change your language at the same time. Read this, thank me later kid.


 No.962171>>962256

>>962145

It's been a year and you are still shitposting, what a mongoloid piece of yellow shit.


 No.962182>>962256 >>962462

>>962145

I hate Ada and Julia, like what's next? Tom, Jamal, Goldstein?

On a serious note, Ada gives me literally no advantage over the languages I already use. None.


 No.962256>>962426

>>962171

It's my first day here anon. I like it, I think I'll stay.

>>962182

Rust offers no advantages to Ada. None. Stay cucked.


 No.962426>>962432 >>962463

>>962256

>Rust offers no advantages to Ada. None. Stay cucked.

But LARP-sama, people are actually using Rust.


 No.962432

>>962426

>people are using Rust

if you can call them that


 No.962462>>962464

>>962182

I thought the only point of Ada is that it's super safe?


 No.962463>>962486

>>962426

Thankfully not in the aviation industry, gives me one less thing to worry about.


 No.962464>>962467

>>962462

That applies more to the Spark subset of Ada. Ada itself is quite pleasurable to use while still providing the benefits of a strong typing system.


 No.962467>>962470

>>962464

It's on my list of memelangs to learn. Hopefully I get around to it someday.


 No.962470>>962787

>>962467

It really isn't a meme lang though, it's about as fast as C++ with a saner syntax. It's also actively used by real companies like Boeing.


 No.962486>>962754

>>962463

They use C++ now and javascript in new projects.


 No.962754

>>962486

Well, I guess I can still walk...


 No.962787>>963096 >>966304

>>962470

>"muh whataboutism"

I have personally seen OCaml and F# being used in 5 different companies, still doesn't mean I'd recommend you learn it or that it isn't a memelang.


 No.963022

>>961771 (OP)

The fact that you are a woman on top of everything else gives me hope for the future of humanity.


 No.963028>>963105

>>961803

What the fuck is wrong with her face in that 2nd picture?

Steve is a vampire. He sucks out all her energy to satiate his emotional neediness.


 No.963096>>963104

>>962787

The difference is what it is being used for. If a language is being used for controlling something as important as aircraft, it's not just a memelanguage. We're not talking about the case of some accountant using it because it helped him pull data from a subsystem into an excel sheet.


 No.963104>>963107

>>963096

The F35 has vital components written as addons for Internet explorer.

In CY+3, coding life-or-death stuff doesn't mean you're guaranteed to not be a memelord.


 No.963105

>>963028

>What the fuck is wrong with her face

She's a Jew.


 No.963107

>>963104

>memelord

At some point, you pick the best language available to you rather than worrying about silly nebulous terms.


 No.963679>>963743

Does this Rust book have a cute tumblr/powerpoint/cracked.com image every three paragraphs?

I picked up "Build Your Own Lisp" and I haven't gotten to the first real task (lotta "learn C" stuff at the beginning) but I already want to murder everyone, everyplant, everypony, everydemon born after the year 2000.


 No.963743>>963983

>>963679

I don't know what happened but somewhere at chapter 4 the writers swapped book took a drastic turn towards not making me want to shoot myself at every second sentence. I don't know why the first chapters were on such a mongoloid level or if I just started filtering the annoying shit out but now it's just info about the language. The book itself isn't that shit honestly but compared to a lot of the CompSci classics I've read, it does reflect well what types of mongoloids are prevalent in the Rust community


 No.963865>>963869

>>961782

This. When it comes to learning libraries, I gave up using tutorials years ago and just started reading the source code. It's actually easier.


 No.963869

>>963865

After that, I recommend looking at example code in the new language, just to pickup any standard idioms. Rosetta Code is nice for that.


 No.963879

File (hide): b030391fe3d5291⋯.png (285.18 KB, 860x695, 172:139, theonion.png) (h) (u)

>>961788

>3rd pic


 No.963943>>963997

File (hide): 942f0001ba48363⋯.jpg (7.71 KB, 226x223, 226:223, kekekek.jpg) (h) (u)

>>961777

You gotta be kidding me lad.

P.S. Why the fuck Haskell? Wouldn't one focus on a programming language that employers commonly use? Like Java, Python, C#?

>>961788

Hahahaha I'm modestly chuckling at this for almost a minute. That kid doesn't look even remotely related to that cuck.

>the 3rd pic

My modest chuckling progressed into a hearty Kekking.


 No.963983

>>963743

They must wager that more retards are driven off by starting with real content than non-retards are driven off by starting with dumbed down memes.


 No.963997>>964010

>>963943

>Wouldn't one focus on a programming language that employers commonly use? Like Java, Python, C#?

Have fun being a wage slave


 No.964010>>964163

>>963997

>implying I wouldn't start my own business in a few years after wage cucking


 No.964163

>>964010

>Implying you wouldn't be too stupid for that after a few years of Java and Enterprise Design Patterns.


 No.964392>>964635

>>961771 (OP)

>Calling me Rustacean at every breath I take

>Emoji's

>Dumbing down simple things

>"Many people don't think of chars as chars"

It's a children's book (pozzing them when they are young)

>>961803

Putting myself in children's shoes, I still will want to slap the kikess and go to codecademy


 No.964619

I don't remember the book being all that bad? Not sure if OP's pic is version 1 or version 2. In my experience crawling through pull requests and issues on their GitHub repository, its relatively rare to find any sort of SJWing of any sort; most discussion is entirely around technical work. You really have to be looking for it to find it because the people that *actually* get upset about the community around a programming language don't really do any work on the programming language.


 No.964635>>964637 >>966292 >>969045

File (hide): 7856ca337510b07⋯.png (70.87 KB, 1272x286, 636:143, pure white.png) (h) (u)

File (hide): bad0a2aa609b703⋯.png (214.66 KB, 1454x1056, 727:528, mutant.png) (h) (u)

File (hide): c681fa522bb0176⋯.png (88.26 KB, 666x546, 111:91, wedlock.png) (h) (u)

>>964392

Daily reminder than Ada is still the better alternative to Rust. The Barnes book is very triggering too. I can't even. The latest edition of the book was written in current_year - 1.


 No.964637>>966292 >>969045

File (hide): 9ddbce6e465fb59⋯.png (38.22 KB, 1068x196, 267:49, it is current year.png) (h) (u)

>>964635

This too


 No.964715>>964718 >>966215

>>961771 (OP)

Well, Rust was written for blue hairs who can't manage their own memory in C or even figure out what gender they are. So the whole language was written for incompetent monkeys.


 No.964718

>>964715

It was written by whites and 'whites' who champion diversity but forgot to implement internationalization in their own language because they don't live around or work with 'diversity' or want to.


 No.966215>>966236 >>966316

File (hide): 0a37fb917a34325⋯.jpg (72.99 KB, 500x366, 250:183, 1446329615799.jpg) (h) (u)

>>964715

<We need Rust because C++ isn't memory-safe!

>STL Libraries use pointers and are memory safe

>Boost libraries provided smart pointers for just as long.

>Performance auditors like Valgrind provide detection for memory leaks.

>C++11 adds Boost smart pointers as standard.

>By C++17 we basically have most of Boost as part of the standard library.

Maybe basic C isn't memory-safe but C++ is if you do it right. Even coding with bare pointers isn't too hard. I generally only leak memory from my main function while testing implementations because I don't care that much. If you're doing Object-Oriented right then you just need to clean-up your pointers in the destructor. This is "How To Write Object-Oriented Code 101".


 No.966236>>966302

>>966215

>Maybe basic C isn't memory-safe but C++ is if you do it right

I'm going to have to defend the Rust... things at this point. Yes, C++, and even C, is memory safe if you do it right. The problem I have with this is that you now have boilerplate code that has to happen around allocations to make them memory safe. That's either copy-pasted duplicate code that's everywhere, or, more disturbing, seven thousand implementations of the same memory safety. There has to come a point where you are doing something so frequently that the language should just do it for you, and have one (ideally correct) implementation.

Question: can you see the memory leak in the first line that is removed by the second?

   std::shared_ptr<Object> = std::shared_ptr<Object>(new Object());
std::shared_ptr<Object> = std::make_shared<Object>();

Until C++11, the average programmer never used smart pointers in a memory safe way, because writing the first line is easy. And now we are either stuck with the possible memory leak, or have to go change all that code.


 No.966292

File (hide): 912a0fdab298dea⋯.jpg (90.58 KB, 440x440, 1:1, 1366675236800.jpg) (h) (u)

>>964635

>>964637

Top fucking kek, is this real?


 No.966302>>966308 >>966351

File (hide): 2f89e6a6c4d1372⋯.jpg (282.97 KB, 782x788, 391:394, 1450781007514.jpg) (h) (u)

>>966236

The main benefit of the latter is exception safety, although I'll grant that it's objectively a superior way to write the same line. The former definitely comes from familiarity with older C and C++ code.

> If you write it enough then it should be a language feature

That's what the STL is; when was the last time you had to write a queue or managed array from scratch instead of just using a std::queue or std::vector? Even if you need something like a thread-safe queue (locking or otherwise) you just make your own with a wrapper around the STL class.

> That's either copy-pasted duplicate code that's everywhere, or, more disturbing, seven thousand implementations of the same memory safety.

The copypaste problem is prevalent in basically every language. Even Python will have swaths of "setting things up and doing pre-emptive calculations for the main logic loop".

The STL already handles the biggest source of boilerplate: needing a common data structure. Boost's inclusion added the remainder of useful items, and only a few of those are missing. Networking support is rumored to be integrated soon (using Boost's ASIO model) and now they're floating a webview library for GUI stuff which I'm absolutely dreading if it comes to pass. The C++ committee being too eager to advance this late in the game is the single biggest reason I would consider jumping ship.

At this stage, most of the "boilerplate" is in the std namespace, though, and it's a good balance right now with a few things missing.

Ultimately the core problem is that C++ is a superset of C. They can't fix this without breaking compatibility. In an ideal world, smart pointers could just replace pointers at the compiler level. The compiler should be taking note of your first line of code and swapping it for the second. And while I normally hate compiler meddling, a lot of optimizations are done as it is and substituting one line of code for another that does the same but better is honestly not any more of an issue than unrolling a loop as long it has the same side-effects.

Otherwise, I value the control C++ gives me. Which leads me to...

> is memory safe if you do it right.

This is my single biggest beef with Rust, Kotlin, etc... they don't trust programmers, but they do trust compilers, etc. "Oh it's a problem upstream with the tools". That's the mindset of shoddy craftsmen. A good C++ programmer is aware of the side-effects of each line of code and uses them intentionally. C++ has an immense level of expressiveness and control. It can be terrifying when used to great effect (see the competition for obfuscated C++ code that's actually malicious) but when used in production it provides great performance and reliability. It's not fast to write, but it's a language for programmers to express what the machine should be doing.

Having a compiler run proofs is a crutch for poor programmers. Yes, this is how bugs get introduced, but it should be viewed as a learning opportunity for novices. I can't help but feel that people like Rust because it does half their job for them and they push the "but the bugs" message because the only way corporations will even consider Rust is if it's "C++ but without billion-dollar bugs, guaranteed". They know it's their only real shot at a programming career because they couldn't write sane C++ code if their life depended on it and they had an expert there to bounce questions off of.

The solution at this stage is for people to learn how to be a better programmer and to evolve C++ so that the best way to code things isn't against-the-grain, but you can go in that direction is necessary. I don't like any language that presumes the needs and uses of it by developers. Any language must trust that a developer can use it to express what they mean.


 No.966304

>>962787

Ada was developed for aerospace applications. That means a lot at companies that care about flight heritage.


 No.966308>>966512

>>966302

>C++ is a superset of C

Please look up the definition of what a superset is.

<good tools are a crutch

No, good tools make your life easier and more productive. As much as your Stockholm syndome tells you to use inferior tools, there can be better tools out there.

>Having a compiler run proofs is a crutch for poor programmers.

I guess you shouldn't write any testing for your software either.


 No.966316>>966331

>>966215

>Maybe basic C isn't memory-safe but C++ is if you do it right.

It isn't memory safe. You don't underatand what people mean by memory safe.


 No.966322

File (hide): b0f04323a725012⋯.jpg (3.03 MB, 2541x3000, 847:1000, 1493889922761.jpg) (h) (u)

>>961771 (OP)

rust is for faggots


 No.966331>>966360

>>966316

>nothing is memory safe because everything has an FFI


 No.966351>>966364 >>966512 >>966515 >>966537

>>966302

The thing that we have to be cognizant of is the sheer number of non-developers who are now developing software. People who are experienced in one field may know squat about software, and these people would like software that assists their field. Many of them go on to try to write it themselves.

It is the most horrible fucking code ever. Have you ever had to do maintenance on a piece of code from some random guy who is good at some other field? For instance, my coworker asked all nearby cubes if this code was even valid:

   switch (some_enum) {
case ONE:
if (some_condition) {
do_stuff();
} else {
do_other_stuff();
case TWO:
do_more_stuff();
}
break;
}
So, what I want is a language that makes these people unable to write unreadable shit. It is an impossible goal, to be sure. But the language can help, and C++ is not that language. Shit, even Boost does crazy shit every now and then. I distinctly remember that somewhere in a Boost library is a definition of the comma operator for a collection-type that appends to the collection. That is some bullshit, and you then have to dig through the code to figure out what scam those motherfuckers tried to pull.


 No.966360

>>966331

You're confusing memory safety and sandboxing. You don't need a FFI to open /proc/pid/mem and fuck with memory, for example.


 No.966364>>966442

>>966351

>what I want is a language that makes these people unable to write unreadable shit.

Unreadable is relative. It's often used by brainlets who can't understand good code. We have the concept of "reading level" in English for this, maybe we need a "coding level". "I can read at a 6th grade level and code at a yanderedev level" or something.


 No.966402

File (hide): d3ed5fe14160fdd⋯.png (461.44 KB, 900x1181, 900:1181, Rust.png) (h) (u)


 No.966442>>966458

>>966364

< Your just too illiterate to understand

< i = j += k -= l += i;

> No, you're just a bad programmer trying to defend your shit coding habits.


 No.966458>>966754 >>966877

File (hide): 08be8b0a7d76d17⋯.png (234.94 KB, 858x531, 286:177, readability.png) (h) (u)

>>966442

You can write poorly in any computing language just like any human language, but you'll never make difficult things readable by a moron. Most "unreadable" code I've seen here is fine.


 No.966486

Rust is DOA, don't fucking use it, at all. It is controlled by people like this, somebody who raped the sockets of JS dry https://twitter.com/ag_dubs Your code will probably stop running when they try to integrate some kind of gender voice checker into the fucking compiler or some shit, maybe a quick scanneroo of the old credit card each time you compile to give to 'women'.


 No.966512>>966515 >>966565 >>966877

File (hide): 87e196e49401885⋯.jpg (194.06 KB, 580x580, 1:1, 1422399069388.jpg) (h) (u)

>>966351

People who aren't true programmers should recognize that; they are the ones who should be cognizant of their abilities.

Languages like Python exist literally to be a language that enforces readability as much as possible (although it ends up allowing a lot of wonky stuff and then they just bully people to write code that's "more pythonic").

If they need to write more performant code then they need to learn how to be a real developer.

Boost can certainly be a mess. I think the best argument for breaking compatibility with C is that Boost libraries could feel less like bolted-on chunks and more like native language features. That would give C++ parity with other common built-in libraries without sacrificing performance or portability. The main problem is just that everything is a class when some things should just be migrated into basic types or functions.

C++ code can be readable or an atrocity depending on who wrote it and who is reading it. But I've seen some pretty bad code in nearly every language. The solution is just to educate people as well as possible on how best to do things and what decision should be made when and then encourage comments to explain some of the funkier or harder-to-read behavior.

>>966308

C is contained entirely in C++ and a C++ compiler will compile C code and run it as expected.

Good tools are nice but you need to know how to use them; I doubt anyone working with Rust knows anything beyond "this compiler catches more problems than GCC so it's better". Surprise: code written in Rust still has bugs. Code written in Rust still doesn't perform as well in real-world benchmarks. Code written in Rust does not have a fully-matured toolchain, and it likely won't because you'd need to see massive adoption for it first and that won't come without the toolchain.

But a good craftsman takes the blame for bugs. They are the one who did not consider edge-cases. They are the one who did not consider side-effects of their code. They are the one who did not write a good unit test to ensure full code coverage while detecting regressions.

No language can fix that; not even Rust.


 No.966515>>966535

>>966512

>C is contained entirely in C++

Wrong.

The C code in >>966351 is not C++.


 No.966535>>966537 >>966543 >>966744

>>966515

Are you sure? Both g++ and clang++ seemed happy with it.


 No.966537>>966543

>>966351

>that fucking code block

Absolutely disgusting, especially since the second case is inside a fucking curly brace inside the first case. That code could be cleaned up by replacing the switch with a goto.

>The thing that we have to be cognizant of is the sheer number of non-developers who are now developing software.

Most people with computer science degrees are shit coders as well. In my experience many of the best coders started out as electronics engineers doing embedded development.

>what I want is a language that makes these people unable to write unreadable shit

You can write shit code with every language I can think of, how you prevent shit code from being merged is by having code linters and other such tools as part of the build system that checks every merge request into the repo.

>>966535

I suspect Clang++ will throw a warning if -weverything is used


 No.966543

File (hide): 9c01642526eb88c⋯.png (15.66 KB, 429x103, 429:103, wrong.png) (h) (u)

>>966535

I didn't see anything wrong with it, either.

>>966537

One compiler throwing a warning is hardly the same as "it isn't C++", unless we're arguing for what is the "correct" implementation, in which case, yes, a lot of correct C++ eschews C paradigms and uses exclusive functionality. But that's not the point. The point is that most C code will compile fine in a C++ compiler and behave identically.

I threw this mess together, based on the above code sample.


#include <stdio.h>

enum color {
RED,
BLUE,
GREEN,
YELLOW,
BLACK,
WHITE,
PURPLE
};

void printStuff(char* color, int num) {
printf("You're a faggot if you like the color %s and the number %i\n", color, num);

};

int main() {

enum color favoriteColor = RED;
int favoriteNum = 5;
char *colorStr;

switch (favoriteColor) {
case BLUE:
colorStr = "blue";
if (favoriteNum > 9) {
printStuff(colorStr, favoriteNum);
} else {
printStuff(colorStr, 100);
case RED:
colorStr = "red";
printStuff(colorStr, favoriteNum);
}
break;
}

return 0;
}

Pic Related: It compiled fine with both gcc and g++.

g++ threw some warnings over my usage of implicit c_string conversions. Which, again, I would not be doing this under ordinary circumstances; this code is a mess and I would not want to mix it with C++ code. But that doesn't me an it's not compatible, even with so many glaring issues. And that's ultimately my point: I could probably write equally terrible Rust code. I can definitely write equally terrible Python code. And the best you can do is say "but that's not Pythonic", or "Rust makes it harder for you to do that which is a warning sign". Sure, but if I'm stupid enough to write a switch statement like this, am I going to realize I'm doing something wrong when the difficulty rises? No. It's going to encourage me to double-down and try to band-aid fix my previous mistakes.

I'm getting off-track. There's only a few things C lets you do but C++ invalidates. You need to declare functions before they are used (although you can define them afterwards), you can't use C++ keywords as variable names, and pointers have some additional limitations in regards to consts and void pointers. Aside from that, it's more or less unrestricted. Even for abominations like that code block.

And ultimately, I'd rather have it this way than have Rust hold my hand everywhere I go. If I wanted to be nagged constantly I'd get married and switch to Java.


 No.966565

>>966512

C++ doesn't support C11 features.


 No.966744

>>966535

I guess I was wrong. The standard does mention that you can't have it jump to inside of a try block with a case label though. When I heard of this in another thread he said it had something to do with allocating memory.


 No.966754

>>966458

>Threehalfs

I don't know which is worse.


 No.966863

This shit is for kids. When I was in middle school I got the C for dummies books by Dan Gookin. I thought he was pretty damn funny at the time. If I went back and tried to reread it I'd probably want to blow my brains out. I hate cutesy shit in technical literature. I doubt I could handle that rust book. I'm reading Tanenbaum's OS Deign and Implementation and so far I've only noticed one small cutesy joke. Code demonstrating the dining philosophers problem has the comment /* yum-yum spaghetti */ whenever the eat function is called. I can handle that.


 No.966877>>966879

>>966512

>a C++ compiler will compile C code and run it as expected

I have actually written valid C code that won't compile as C++. I named a variable "new". In addition, C allows a bunch of implicit conversion to/from void* which require a cast in C++.

>>966458

The thing is, the Q_rsqrt function is readable, if you already know what it is doing. It is not unreadable because it is obfuscated, it is unreadable because it requires a LOT of a priori knowledge about how the computer represents numbers. The algorithm itself is difficult to understand, and writing it in COBOL isn't going to fix that.

In addition, most people can quickly pick up that the max function is WRONG. While it doesn't explicitly state what happens if the numbers are equal, no sane person would consider 5 to be the correct answer for that case.


 No.966879

>>966877

It would be more readable if she didn't strip all of the comments from it.


 No.969045

>>964635

>>964637

What's the book called?




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
108 replies | 21 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / animu / arepa / asmr / ausneets / pawsru / sonyeon / vg / wx ][ watchlist ]