C is the best programming language

C is the best programming language

someone honestly believe that?

R00d digits

Checked and kek'd

Trips aren't usually wrong, but today...

Gayest trips ever

...

true, but tfw i suck at it

finally someone speaking the truth

gud number value

based

I know I do

not as good as , never repeat a digit, wow

C sucks, too bad it's still the best language out there.

I prefer C++. I don't use many C++ features, but they can be useful on occasion.

Totally is.

And?
Seriously, there's no bad language, just bad programmers. Get gud pajeet.

Look, I like C. I write a lot of C. I mess with old UNIX.
It's not good. It's not really that fun. It's like using a gun that always points very slightly in your direction.

This

you forgot the #

how the fuck did you notice?

sudoku skills

Ha, no it isn't. Rust is. C is fucking ancient and basic, and C++ is fucking ancient and a disgusting complicated mess of shit piled up. Rust is the modern replacement to these languages and it's what everyone should be using from now on. Come the fuck on, it's 2018. Get with the times.

Fuck of steve.

...

Rust isn't half as mature as C++, can't excel in simplicity the same way C can, and the whole language is intent on throttling the programmer with limitations in the name of safety.

>throttling the programmer
It's not the language's fault you can't understand the borrow checker.

>Can't move from a borrowed value
>Can't have multiple mutable references, even transiently
>immutable by default in a sys pl
It's fucking trash.

>C
>not js
please

That's the fucking point of it retard. It elegantly solves problems that plague C/C++.

If you're a retard maybe. I don't need my hands tied for every trivial circumstance.

>I can't shoot my leg like I can in C, therefore it's bad
You should avoid such techniques even in C, if you're writing critical software.

There exist plenty of safe programming languages already. This is a systems programming language. Efficiency is critical. Get that condescending shit out of the way.

Efficiency at the cost of bugs is pointless. See meltdown.

Rust is damn efficient desu

>It's like using a gun that always points very slightly in your direction.
thats a nice way of putting it

Some of Rust's features like its generics and traits systems are well worth praise in terms of efficiency. Which is why it's especially disappointing when the rest of the language is designed in a way that forces prevents you from managing memory efficiently.

Not really, it's a tradeoff.

>makes program
>doesnt work
>its fast doe
look at my program not working fast!

You can have a buggy program that still functions.

Hope you're not working in anything security related

Go > Rust > C > C++ > C#

>Go > *
dohoho

hypothetical language done right > existing clusterfucks we have

the only place that read about Rust is this shitty place

>Go > *

Isn't rusts generics a copy of C++ templates?

>it's old so it's bad
yeah we should all abandon capitalism too beacuse marxism is just the new thing you think we should do

>C is complicated
no, you're just an idiot. C is objectively by all measures the most elegant language

no, LISP is
C is pretty sexy though

C makes me cum buckets when coding.

thats pretty badass, i just cum regular cum

>inlined assembly
>function pointers
>managing memory
>55 lines to add two numbers and print them
how autistic can you be?

Lmao, being this retarded...

he cums buckets though! thats BADASS!
jokes aside, im guessing hes just messing with function pointers, and mmap
personally i never did anything like that, but i think its cool you can do that

I used to think C was okay until I realized it's just used by neckbeards to show how smart they are by saving nanoseconds and the autistic neckbeards who run the Linux kernel (which would be easier to code and safer in C++)

I'm not just messing with function pointers, read it closely.

I'll give you a clue, where the function that subtracts the two arguments defined?

What do you think of people who are so used to C, that it's easier for them to code C than C++?

for a determinate task(yes!)

i'm one of those people
ask me anything

Why would that ever be the case when C++ is a superset of C?

This, If I want a list, I call it. No pointer Mickey mouse bullshit needed.

I said, if you're already used to it. You have to give a reason to switch to another language. If I'm already used to C, and I'm faster and better coding in it than in any other language, why would I swap to a language that generates files five times larger and has bloat I don't need?

struct class {
union {
unsigned char a[8];
double d;
};
};

im kinda brain dead right now, im hunting a bug myself lol
i assume the plus_s/minus_s etc are labels?
the subtraction is inside block() but i dont see how `instruction - single_instruction` is `minus_s`

C code compiles in g++ with much richer libraries.
>Much bloat
As if you're coding something big enough to notice, get your head out of your ass.

Those are both lies. If you write C code in C++ I'm sure the file size is comparable. And I doubt it adds any bloat when they both do everything at compile time. Just phase out your old shit whenever you want to, like using std::vector instead of VLAs or whatever. Or using std::string instead of const char*

I'm allocating a runnable memory block with mmap, which means I can execute it like a function, then I'm copying the contents of the function single_instruction to it, then I run it, then I'm writing over the c = a + b instruction bytes with the minus instruction from the function block, then running it.

its also making some assumptions about the compiler right? because those uint8_t's are never initialized, theyre all associated with the labels, i think?

But user needs to write things from scratch so he actually knows how it works!!

I'm not saying it matters to my projects, I'm asking, why switch? Imagine there was a language that was very hard to learn, but you got a 0.00000001% improvement, you probably wouldn't be bothered to switch to it, because the change isn't really important, but if you already have learnt it and are good at it, why switch?

It's comparable, but heavier. just make a simple hello world, compile it to assembly, and compare the number of instructions. Using the standards from C++ of cout. You can't say it's a lie when it's true.

They are initialized, they point to the assembly labels, yes. That is the only way to reference labels in inline assembly.

That's why I said writing C code in C++

But that's not what it means to write C++.... Why compile C code as C++? Just to make it harder to embed in other projects?

He's a moron.
It's always easier to compile C code seperately from C++ and then use it as a static library in a C++ project.

Because you will work more efficiently. Don't try to tell me hand coding a vector in C is sane when it's given in C++, regardless of skillset.

You are misinformed, when you work C for a long time, you gather a toolset, there are many many libraries that implement vectors, hash tables, lists, ready to use. When I need one of them, I just import the library and use it, much like you would import or .

ill save that pic to try some other time
thanks for explanation user

It's not very useful, but fun either way, btw, change those long casts to size_t or unsigned long, I was silly.

exactly this
doing it yourself has the advantage of you know EXACTLY how everything is done, so there are no surprises anywhere
ofc you have to spend the initial time develping said libraries

Suit yourself Mr. Malloc Segfault

I just said I use libraries, much like you use STL, do you have any proper argument? I think I can defend your side better than you.

You can develop from scratch if your objective is to learn, but you also have many libraries already made.


I would suggest everyone interested to check out this repo, very useful resources.
notabug.org/koz.ross/awesome-c

Why would you need to know exactly how everything is done, STL won't fail on you. Christ, you guys are almost as bad as the Arch/Gentoo crowd.

should add that theres no way to have morphisms with strong types in C, i think in C++ thats possible
example would be making a vector and a map function for that vector. theres no way to have a map that accepts vectors of type A to return a vector of type B, unless you make one for each (A, B) pair (or have the CPP make it for you)

So you just manually import libraries you hunt from the internet, sounds fun.

Not hunt, like I said, if you've been developing C for a long while, you already know which libraries are most used. And in many cases, they're already installed in your computer, if you're using a decent developer OS.

Yes! Templates are great, although they're just an optimization for contiguous memory. If the vector you are using does not implement contiguous memory but rather pointers to elements, you can indeed do what you said. Also, if you specify the size of the elements of the elements of vector B, you could also create a map function that does what you said even for contiguous memory. Am I misunderstanding you?

You shouldn't have to use an operating system to run your language, that's what makes C++ great.

>It's like using a gun that always points very slightly in your direction.
that's a really fucking apt description, and I like C

one of the reasons for C++'s success was the relatively low cost of migration -- gigantic portions of C source will work as-is without changes when compiled as C++, while allowing the developer to utilize additional C++ features as needed
current C++ and C are a fair bit more divergent than back then, but even a fairly modern post-C99 codebase won't need too extensive modifications

as such, you'd code as if you were using C, but add in C++ features as needed

I was saying you have an advantage in that OS. For C++ it's the same thing, if you're on Linux, you probably have a package manager that helps you seek and install libraries as a built in tool of the OS.

When I program C, I just do it in Linux, then I use gentoo-crossdev tools to compile it for windows if I need to. It's really practical for me, and I don't see myself adopting another method unless I see it's really a huge improvement. Not saying you should change or that you need to have Linux, just saying it works really well for me.

I said C++ was complicated.

>notabug.org/koz.ross/awesome-c
nice, didnt know that
>If the vector you are using does not implement contiguous memory but rather pointers to elements
yeah, that case would be easy, but its a bit of a hack and the compiler couldnt help checking the types
>if you specify the size of the elements of vector B, you could also create a map function that does what you said even for contiguous memory
with strong types? maybe there is, just dont see immediatly how... but my idea is
vec(B) map (vec(A), B (*fun) (A))

(assume vec is a macro that creates the vector structure)

>opening braces on new lines

>the Linux kernel (which would be easier to code and safer in Rust)
ftfy

Wow tell me more about your Tech blog I'm so interested

not that user but
>not opening braces on new line
also, thats the best brainlet pic ive ever seen

>as such, you'd code as if you were using C, but add in C++ features as needed
But why? Why would I do that?

>with strong types? maybe there is, just dont see immediatly how... but my idea is
If I want types to be inforced, then I would need macros to simulate templates, it would come off a bit hackish.

Allman is my prefered style, It really improves my visibility of where the block starts, and doesn't leave the code way too clumped up together. Do you think we should close the block on top of the last instruction as well, to save space?

I don't have one, but your post made me chuckle for some reason. Is this a new meme? Is it the tech version of "buy my mixed tape"?

The joke is your rambling is so off topic it's like I'm reading a trivial tech blog about some guy that insists in coding with C because he's done it his whole life. Then goes on to list the tools he uses to import STL-like libraries to further avoid using C++.

Off topic? I don't think so. Your comment was kind of attacking C for needing a specific OS to develop in, the idea behind my post was to say that you can develop for any platform, though I may have not been as eloquent as I may have liked.