Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

The C language is the most better best language in the world

Name: Anonymous 2018-12-26 17:49

Everything is possible in C.

And not just because it’s a Turing complete language. Brainfuck is, too, but I want to see how you program a Kernel driven hardware driver with that.

Just kidding. I love Brainfuck.

But Turing complete is just theoretical, so the real strength of C are not theoretical, they are practical. The design is simple. Most C tokens compile down to one assembly opcode, some to two, three. But that’s it. So it’s efficient and it’s machine-near. It gets to the metal, how some people express it.

And it’s not only that C is fast. It is capable to do everything that is going on in the computer on a hardware level. Up to programming a whole operating system. If there are some processor features, that are not directly supported by the language standard, you will find a week later an update of your GCC where it’s implemented as an intrinsic or if not, you just put it in inline assembly.

C has no problem with that. Because there is very few abstraction. C loves the machine, the machines loves C, the operating system is a product of C, the OS of this world love C and compilers are mostly made of C, and they in return - love C.

The true power comes with this universality. Everything that does something for real in done in C or is done in a way that is compatible with C, means also compatible with the system. So I got lying around libraries about AI programming, a whole text based web browser library, or the Gecko library from Mozilla/Chrome is also done in C. There is just a library for everything in C, you just have to quickly scan the repository, ah! There it is! Install, include, done.

Edit: Chrome and Firefox are done in C++, Chrome doesn’t use Gecko. My fault. But they should have used C :D They are prefect examples for it. Well, if you program C++ as “C with objects” it’s what I mean; keep it simple. C++ is acceptable if you don’t use all those complex features. And I think, they didn’t.

No waiting for some project that had it’s update five months ago and the people promised to port the function XYZ to your language. Which is something you will experience on Java or Python all the time. This doesn’t happen in C, because the mechanism how the system works is directly callable by C.

It’s the system language, so ka?

And while you have to learn months long certain programming paradigm before you can write something in other languages, you just are directly connected to the machine. You got an idea? You code it down.

There is nothing that C can’t do. And there’s nothing that C can’t do well. If it can’t do some weird thing not well, then teach it. Then it can. Like all those library coders have done before you. Oh! They planned to do a library for C++? Bummer. So we can’t access that?

Wrong. All doors are open.

It’s the pirate language. Just enter the enemy ship and get the booty!

Okay, to get a whole C++ library up and running isn’t that easy, I admit. But it’s done with some minimal header files. Whatever.

Every layer you put between you and the machine with a language will strip away things you can do with that language. It might be convenient for some small tasks but the general usefulness gets smaller and smaller. Best example Prolog.

So, without a paradigm you can do everything. It’s in your hand, commander. Program everything you want or you can think of, in every style or every method that the machine is capable of and you can do it with a maximum of efficiency.

That is C. C is extremely modern with this concept. It always was a revolutionary language. One, that is unique with this quality.

Name: Anonymous 2018-12-26 18:53

>>1
I know its some sort of satire, but its equally applicable to C++ which modern compilers manage to optimize down to C(except in cases of very enterprisey java coders). Also, most people believe all of it, unironically and TIOBE charts shows C/C++ popularity not dropping.

Name: Anonymous 2018-12-26 19:08

Most C tokens compile down to one assembly opcode[citation needed]

Name: Anonymous 2018-12-26 21:51

warning: (line 10) ローマ字 are deprecated, consider writing the following in ひらがな script
so ka?

Name: Anonymous 2018-12-27 15:58

>>4
そうか
Get owned teenshit

Name: Anonymous 2018-12-27 18:12

>>5
rude

Name: Anonymous 2018-12-28 8:44

>>3
well, most C tokens are simple enough that they have direct equivalent in modern x86. all of that will, of course, fly out of the window when you compile for an ISA that, for example, doesn't have hardfloat or a multiplication op. also, if your're are using a DSP then you have a reverse problem - the compiler will usually optimize efficiently but you'll need many lines of C to get one assembly instruction.

Name: Anonymous 2018-12-29 12:25

People often gripe about the STL but what Alex Stepanov created is truly a thing of beauty. It was truly radical at the time. It’s even radical now considering that generic programming is still not mainstream.

However, it isn’t what most people are used to. Most people still don’t understand what iterators are. For those that do not know, iterators are a generalization of a pointer. Pointers are a subset of iterators.

People don’t get the STL because people can’t math.

Name: Anonymous 2018-12-29 13:15

Iterators? Sounds like a functor or a foldable?

Name: Anonymous 2018-12-29 17:11

>>8
Iterators are no panacea though. They are restricted to linear iteration. That's why the STL does not have multidimensional containers or trees and it slightly pessimizes iteration over deques. Yes, the containers are generic, but the iterator interface means they must effectively pretend to be vectors or lists anyway!
If you can get over that, and you should because tree structures are overrated, the STL is still pretty darn cool. But it's a 95% solution and not a jewel of perfection, and iterators and the way it handles allocators are among the main culprits.

Name: Anonymous 2018-12-30 17:19

>>8
Pointers are a subsetin the category of iterators.

Not critiquing you, just shifting the conversation. Category theory is amazingly simple and powerful mental model. It makes me sad that normie programmers just don't care about it or are unable to understand how it applies. They only care about figuring out a terrible workaround for whatever bug their manager wants them to fix on whatever failed issue tracking software is in use. Too busy shoving stone blocks around to reflect upon possibilities of using steel, concrete or other superior materials to erect their monoliths.

Name: Anonymous 2018-12-30 20:26

>>11
How does category theory compare to say set or type theory?

Name: Anonymous 2018-12-31 2:16

The design is simple
Which is why its syntax can't be parsed with a context-free parser, right?
Also the reason that no implementation implements 100% of the standard, right?
And this must explain why the the standard is about 1k pages long, correct?

Up to programming a whole operating system
Is this supposed to be an impressive achievement? OSes written in all kinds of languages exist. There are kernels written even in fucking haskell.

you will find a week later an update of your GCC where it’s implemented as an intrinsic or if not, you just put it in inline assembly
This basically says that if C does not have a feature it's ok because.. you can just not use C and so C somehow winds because of that?

Because there is very few abstraction
https://queue.acm.org/detail.cfm?id=3212479

or the Gecko library from Mozilla/Chrome is also done in C
Gecko is written in C++ (and is being replaced by Servo which is written in Rust)
Chrome/ium uses Blink (fork of Apple's WebKit which is a fork of KDE's KHTML) which exclusively uses C++.

Name: Anonymous 2018-12-31 20:23

Did anyone here know that C/C++ has a REPL?
https://www.youtube.com/watch?v=PorfLSr3DDI

Name: Anonymous 2019-01-01 14:38

"There is a Python interpreter built into Gdb"

Name: Anonymous 2019-01-01 19:56

>>10
They are restricted to linear iteration
The LolSoRandomAccessIterator iterators allow for non-linear iteration and non-linear access to the values. They were probably defined so that pointer arithmetic can be used for iteration when used with a contiguous container. That or to make STL work with regular arrays.

Name: Anonymous 2019-01-02 0:45

>>16
By linear I mean one-dimensional. For instance, there is no sensible way of defining an iterator over a vector of vectors within the STL framework if you wanted to.

Name: Anonymous 2019-01-03 18:25

>>17
Whats wrong with the following syntax for iterating over a vector of vectors?

for (auto & haxors : manyhaxors) {
for (auto & haxor : haxors) {
haxor.hax(anus);
}
}


Yes, this is iterating over a flat container. And as you said, even the non-flat stl containers pretend to be flat ones in order to provide the iterator interface. My experience with stl containers is limited to std::vector, std::array, and std::map. No bully.

Name: Anonymous 2019-01-03 21:32

ASM is better by your standards since everything is in ASM anyway, and if you understand it, you can use anybody's code even if you don't have the high level source code.

Don't change these.
Name: Email:
Entire Thread Thread List