[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
What is C actually any good at nowdays? You can't write
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 233
Thread images: 11
File: unnamed.png (19 KB, 300x300) Image search: [Google]
unnamed.png
19 KB, 300x300
What is C actually any good at nowdays?
You can't write gui apps with it, it seems to be only useful for drivers and kernel hacking.

Who actually makes any applications with it anymore?
>>
File: 98364778.jpg (59 KB, 337x367) Image search: [Google]
98364778.jpg
59 KB, 337x367
>>54190719
>You can't write gui apps with it
Excuse me?
>>
>>54190743
>inb4 c++ is c

Its not...
>>
File: 1423060425565.jpg (47 KB, 600x800) Image search: [Google]
1423060425565.jpg
47 KB, 600x800
>>54190719
>You can't write gui apps with it
>>
>>54190790
No one said that.
>>
>>54190719
You can write anything in C, it's just that most people don't want to do it anymore because they don't know how to do anything outside of the confines of their big and cushy prewritten standard libraries.
>>
File: 1458637528815.png (221 KB, 774x500) Image search: [Google]
1458637528815.png
221 KB, 774x500
>you can't write gui apps with it
>what is gtk
>>
>>54190942
There is really no reason at all to reinvent the wheel again if you can use a library. Or do you seriously rolling your own graphics framework and OS every time you code something new?

The real reason people don't use C for general purpose computing is that it allows unsafe memory handling and doesn't follow OO.

>>54191017
Even Linus hate gtk.
>>
>>54191136
>doesnt follow OO
OO existed before OO languages were a thing, you dumbshit
>>
>>54190719
>You can't write gui apps with it
are you retarded?
>>
>>54190719
>You can't write gui apps with it
What is Qt
What is GTK
etc...


>Who actually makes any applications with it anymore?
Anything that needs to go fast, like Sanek. ffmpeg for example.
>>
Angled long shadows are design cancer.
>>
>>54190942
they don't want to do it anymore because writing menial boilerplate memory management code gets boring after a week
>>
>>54190719
C is the only language that you can write "GUI apps" with. Every other language uses C APIs under the hood to achieve their GUIs.
>>
>>54191154
Are you retarded? No wait you are fucking retarded or illiterate. C isn't OO no matter how much you hack around with structs and function pointers.
>>
>>54190719
>gui apps
>>
>>54191233
>muh java style oop is the only way to implement oop
>>
>>54191233
>he thinks OO is fucking with structs
Opinion discarded.
>>
>>54191253
>>54191254
Object-oriented programming by definition uses objects.
>>
>>54191304
Objects in memory are literally considered objects.
>>
>>54191316
My computer is an object but that doesn't make C an object-oriented programming language.
>>
>>54191316

(not GP)

This is your annual reminder that Microsoft actually referred to the Win32 API as "object-oriented" because... wait for it... Many of the calls involve passing *objects* around. i.e. you create a struct, set members, and call a function. Why? Because it's generally easier (and likely faster) than having a function with, say, twenty arguments.

"Object Oriented" became a crazy buzzword used to describe almost anything. Just like everything is "Cloud" these days.

In my opinion, if it doesn't have constructors/destructors (automatically invoked, none of this I-call-it-manually-but-it's-still-the-same-as-C++ bullshit) and polymorphic inheritance, then it's not OO.
>>
>>54191348
>hurr durr muh arbitrary java style definition of oop
>>
>>54191358
>In my opinion
At least you're honest about it being your opinion. You are of course entitled to that opinion and you do have a point, but OOP isn't clearly and universally defined and literally the only requirement is that you treat data as objects.
>>
File: 1459038109921.jpg (44 KB, 498x412) Image search: [Google]
1459038109921.jpg
44 KB, 498x412
>>54191136
>you can't write gui apps with it

>>yes you can, here's a library that can do it

>that doesn't count, Linux doesn't like that library

wew lad
e
w

l
a
d
>>
>>54190719
Stupid pointer tricks.
>>
>>54191407
*Linus
>>
>>54191233
>>54191253
>>54191304
>>54191316
>>54191348
>>54191363
>>54191358
>>54191388
http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en
>>
>>54190719

Write python shit.

Write the computational parts in C after.

Replace the python you wrote in c with calls for your fully compiled C.

Suddenly its not slow as shit.

Protip any python library you used in the past was likely compiled C.
>>
>>54191428
I aint clicking that shit, nigga
>>
>>54190942

In all honestly writing shit you can just get from the standard libraries is a good reason to be fired.

Also the biggest reason for why nothing has replaced c++.
>>
>>54191136
>Linus
he also thinks sizeof is a function
>>
>>54191428
>A text based site with unironic meme arrows
>>
>>54191192
qt is not c, you dip
>>
>>54191446
it's a university webpage, which is obvious from the url, you fucking idiot
>>
>>54191388
>literally the only requirement is that you treat data as objects.

That's not true, period.
>>
>>54190719
It's still very relevant to applications where performance matters.

And honestly, I mainly program in C because it's fun as fuck to play around with pointers and work out the smartest and most efficient way to get your shit done. Sure, stuff that takes like 20 lines in python or whatever will turn into 400 lines easily, but then again it's ten times faster and so much more fun.
>>
>>54191477
Meme-arrow quotes were a thing before 4chan or even 2ch existed.
>>
>>54191407
Just pointing out that GTK is shit and only appeals to the "I like to do things harder for no reason" crowd.
>>
Native libraries
Language interpreters/virtual machines
Drivers
Embedded devices

It's generally used whatever C++ is used. And yes, you can do GUI shit in C.
>>
>>54191477
underage detected
>>
>>54191483
If it can link with C, and you can invoke the API from C, you can write GUI applications in C.

I never said Qt was C, I said you can write Qt applications in C.

>>54191486
>obvious
I don't think anything about userpage.fu-berlin.de is obvious.

>>54191489
It is true. Look it up.
>>
>>54191511
We're just pointing out that you're retarded and don't know what you're talking about.
>>
File: dahl_nygaard.jpg (23 KB, 476x315) Image search: [Google]
dahl_nygaard.jpg
23 KB, 476x315
>>54191428
>Dr. Alan Kay
Pic related, the actual inventors of OOP.
>>
>>54191465
No he doesn't. But he certainly has a point with his rant.
>>
File: ScreenShot4.3.png (272 KB, 1024x616) Image search: [Google]
ScreenShot4.3.png
272 KB, 1024x616
>>54190790
>what is gtk
>>
>You can't write gui apps with it

What is GTK?
What is Motif?
What is the Windows API?
What is EFL

>OP confirmed for "I've written little more than a hello world program with JPanel" kiddie
>>
>>54191522
>I said you can write Qt applications in C
and you're a retard, because qt applications can't be written in c
>>
>>54191554
No I'm pointing out that the named graphics library called GTK that can be used from C is shit. You must be retarded if you think everyone replying to a post is the same person. Or worse from reddit or some other retarded place.
>>
>>54191566
>No he doesn't
these are his words "But "sizeof()" really *is* a function."
>has a point
the point being he doesn't know what the fuck he's talking about, same as you
>>
>>54191587
You do know that this particular project ported their application to QT because GTK is shit and the people maintaining GTK were even larger turd piles?
>>
>>54191633
We're pointing out you're beyond retardation at this point.
>>
>>54191633
My bad. In that case I agree with you... GTK and GLib need to go. While it's possible to do OOP in C... it sure as fuck is ugly
>>
>>54191647
No you just didn't understand his rant.
>>
I feel javascript has potential and is good idea, but shitty implemented, shitty people are writing shitty code thus degrading the language itself. I decided to go in depth with js. I was all about C before but I feel there is more potential on web to fuck with people and earn money.
>>
>>54191233
A language cannot be qualified of object oriented.

Object oriented is a style, and languages like C++ or Java provide facilities called "object oriented paradigm".

You can do OOP in C, Lisp, or anything really. The core concept of OOP is encapsulation.
>>
>>54191682
>damage control
please, just go back to your css
>>
>>54190719
>What is C actually any good at nowdays?
>proceeds to answer his own question while making another retarded statement
Great thread
>>
>>54191688
>A language cannot be qualified of object oriented.
Sure it can, look at Java.
>>
>>54190719
It's good for writing other languages so that other people can then argue about how superior they are.
>>
>>54191566
What's the point? All the "arguments" he presents in his "rant" are nonsense. Honestly, he just comes off as over protective of the dumbasses that don't know C.
>>
>>54191688
>The core concept of OOP is encapsulation.
so no C and C++ then? you can't really encapsulate anything when a pointer can be used to access anything in the program's memory
>>
>>54191691
He clearly states that people should treat it as a function for human readability to avoid doing stupid shit. That he gives examples of in his rant. But I guess Linus once called you out and embarrassed you publicity because you were being stupid.
>>
>>54191763
>a pointer can be used to access anything in the program's memory
You are mistaken, that's not how C works.
>>
>>54191192
Qt is a C++ framework with bindings for other languages
>>
>>54191769
>avoid doing stupid shit
ah, that's why you're in damage control mode, you're one of those sub par developers that need to be protected from doing stupid shit
>>
>>54191304
Search for "OOP with C"
>>
>>54191769
>people should treat it as a function
Should we treat "!" as a function? How about unary "-"? How about "&"?
>>
>>54191816
>Should we treat "!" as a function?
Obviously
>How about unary "-"?
Obviously
>How about "&"?
Obviously
>>
>>54191751
Some idiot probably submitted retarded use of the sizeof operator once to Linus. Yes if you think of the - operator it would be retarded to add parenthesis. But people don't really use sizeof in the same way they use the - operator for example. Most use sizeof believing it's either a macro hax or a function.
>>
>>54191846
>I'm retarded
>>
>>54191860
>believing
Are you sure it's a good idea to encourage idiots to keep writing kernel code?
>>
>>54191861
They are all well defined functions and should be treated as such.

The fact that C is retarded and only allows invoking functions by putting the name first and the arguments in parentheses afterwards is purely a syntax issue and shouldn't prevent you from using good semantics.
>>
>>54191911
Haskellfags plz go
>>
>>54191797
Linus regularly calls people out on stupid shit. You kind of have to when you have coding guide lines, thousands of contributors and millions of LOC in your code base. If retard A all of a sudden feels like being a special snowflake he needs to be put down.

>>54191816
Yes you may add parenthesis and treat them like functions as long you understand that they have no stack frame and no function body
>>
>>54191911
>They are all well defined functions
not in C, which this thread is about, dumbass; take your meme language circlejerk somewhere else
>>
>>54190719
C is a great language to learn.
>>
>>54191873
It's an GPL open source project with virtually zero QC like every other codebase licensed as GPL. They have coding guidelines to try to keep some kind of level of quality and coding style.

If you want quality in a kernel go for a BSD kernel.
>>
>>54191932
>Yes you may add parenthesis
And you're sure that code would make it in Linus' tree?
>>
>>54191966
applecuck pls go
>>
sizeof() really IS a function tho
>>
>>54191970
No it wouldn't which can be understood by reading and understanding his rant. Personally I would never contribute code to a GPL licensed codebase. The people involved with GPL are cancerous and people you rather not spend time with.

>>54191979
You sir are completely fucking retarded. One day I may meet a more retarded person than you but it seems unlikely.
>>
>>54191996
sizeof has no stack frame or function body in C
>>
>>54191785
No shit sherlock.

See >>54191522
>>
>>54192035
You're not writing your GUI in c if you use Qt
>>
>>54192013
>No it wouldn't
So, "Yes, you may add" is bullshit. Ok.
>The people involved with GPL are cancerous
Just like the rest.
>>
>>54192029
but it really IS a function
>>
>>54192013
>One day I may meet a more retarded person
no need to wait, check out the *BSD developers, voluntarily taking it in the ass for free from apple and sony
>>
>>54192095
It's an operator.

So it's a function in the same way an arithmetic expression is a function.
>>
>>54192077
>So, "Yes, you may add" is bullshit. Ok.
I merely answered that persons question if he should add parenthesis to those operators. I just answered that he may do that because that's how C works.

>Just like the rest.
It's not hip to work with BSD code which filters out a great majority of communists.

>>54192095
Not in C. Check what the tools are doing with it when you compile it.

>>54192110
They better the world by working for free expecting nothing else than a small recognition by the user. They basically holy people. While people working on GPL code are people that could murder other people for working with proprietary code.
>>
>>54191647
>"sizeof()" really *is* a function."
What
>>
>>54192172
>working for free
so basically, retards
>>
>>54192169
>It's an operator
>>54192172
>Not in C
>>54192181
>What
linus said so
>>
>>54192172
>recognition
arrogant pricks
>>
>>54192172
>While people working on GPL code care about freedom
ftfy
>>
>>54192286
That would apply for both GPL and BSD even though some get paid to code. But you bring up an interesting concept. Do you define working for free as not being paid currency for coding? They could simply contribute because they feel good about it and therefore receive a feeling good feeling as payment. Kind of like how people donate money to a "better" cause to feel good about themselves.
>>
>>54190719
Any OS worth a shit is written with C.
>inb4 C is everything that is wrong with languages
>>
>>54191017
>spurdo
>que picardia
Has memes gone too far?
>>
>>54190743
Well he's partly wright but you had to be I . cause c is limited to the programmers knowledge of c
>>
>>54191660
http://www.qtcentre.org/threads/41295-Using-external-ANSI-C-library
>>
>>54192425
English is hard
>>
>>54190719
Libraries, anon.

It's a lot easier to provide binding for a C library than some C++ OOP interface.
You could always use the C subset of C++ though. Which is what I do.
>>
>>54191233
He oo is a programming structure meaning it's. Not language bound . And sind I can include I can use oop
>>
>>54190719it is not efficient as Assembly but it is more efficient than the other languages.
>>
>>54192426
What? I'm not sure what you are talking about but here is a seminar why subsurface switched from GTK to QT. https://www.youtube.com/watch?v=ON0A1dsQOV0
>>
>>54190719
C is king of ABI portability. It doesn't matter what compiler version or C library you are linking with, because C (almost) never changes.

Not many languages can promise the ABI stability of C, which is why everything (Python, perl, C++, Swift, ...) uses C as the language of choice for binary linkage.

On the library side, most serious API standards (OpenGL, DirectX, MPI, Vulkan, ...) use C or at the very least provide C bindings. How else could the library designers hope to target the shitload of languages people use these days?

Oh yeah, and kernels and drivers are often written in C. This is because the C++ standard library is a clusterfuck and belongs in userspace. There's no real reason a kernel couldn't be written in some other languages (a few of them are, see RustOS); it's just that having drivers link to the C++ standard library which changes every 2 months is just impractical.
>>
>>54190719
>You can't write gui apps with c
That's literally wrong as fuck.

Almost all public graphics libraries are designed for c. Opengl is a c library. Xlib is a c library. Qt and gtk are c libraries.
>>
>>54192572

>Qt
It's written in C++. At least get your facts correct.
>>
>>54192572
>literally wrong
>Qt
>c library
fuck off, htmlcuck
>>
>no mention of embedded programming where it's nothing but C

/g/ really is retarded
>>
>>54192301
Well, did Linus also say that the plus sign is REALLY a function?

Because the plus sign is as much a function as the sizeof operator is a function.
>>
>>54192393
B-but Rust > C
>>
>>54192765
>nothing but C
even Java is used in an embedded environment
>>
>>54192854
>Rust
>Mozilla
It's dead brah. Mozilla has decided that software is something that they don't want to do anymore.
>>
>>54190719
Maintaining legacy C programs. That's literally it. Even the embedded world has moved on to C++ at this point. Even kernels are no longer written in C.
>>
>>54192854
>Rust
>not downing in rust
>>
>>54192393
I should make a pasta at this point for quickly repeating the truth. Keypoints:
-It took 20 years before a non-shit C compiler appeared
-Until then, C was significantly slower than every other language
-Meanwhile every other language was significantly higher-level and had shit like bounds checking already
-We even had hardware bounds-checking so it was cheap as shit. Hell, we had fucking LISP MACHINES yo. No y2k, no critical security flaw every 5 lines of code, no therac-25.
-C plunged the programming world in a 40 years long dark age (and counting), with modern languages trying to reimplement features from languages like lisp, forth, and smalltalk on top of C-cucked base languages

No matter how you look at it, C is everything wrong with languages.
>>
>>54193057
>-It took 20 years before a non-shit C compiler appeared
>-Until then, C was significantly slower than every other language
No.
>-Meanwhile every other language was significantly higher-level and had shit like bounds checking already
Those are bad things.
>-We even had hardware bounds-checking so it was cheap as shit.
Putting it in hardware doesn't make it cheap. It wastes die space which could have been used for more cache or alu instead.
>Hell, we had fucking LISP MACHINES
Which were terrible.
>-C plunged the programming world in a 40 years long dark age (and counting)
It made programming sane.
>with modern languages trying to reimplement features from languages like lisp, forth, and smalltalk
Which is a mistake.

We ned to go back more towards the hardware, not shy away from it and create 50 levels of indirected virtual machines running inside more virtual machines monstrosities which wastes gigawatts of power on things like plotting a single pixel on the screen which should just be a single instruction (the full pipeline from parsing html/css/js to displaying some text in a modern web browser is a fucking travesty of inefficiency and bloat).
>>
>>54192783
but sizeof() really IS a function tho
>>
>>54193204
Ctards, ladies and gentlemen! Remember: this is what you become when you are high on C.
>>
>>54193237
>out of arguments
babbies are not allowed in this subreddit
>>
>>54193237
Not particularly fond of C, it's just the only sane language which doesn't go out of its way generate garbage machine code (mostly because it keeps abstractions down).
>>
>>54191136
OMG, I love you. You're the reason this industry is so easy to be in the top 10% of.
>>
>>54193204
>We ned to go back more towards the hardware
Hah. C has always been high level, which is why you never work with registers or the cache. Most of the useful functions are high level abstractions provided by the kernel.
>>
>>54193307
Lol'd out loud. You sure are funny rajesh.
>>
>>54193204
>we need more ways for the NSA to spy on us
>we need more decades to work on shitware that will no longer be useful in 2 years anyway
>we need more segfaults in mission-critical software and other bugs that literally kill people
Sasuga C-ucks.
>>
>>54193377
>no longer be useful
>segfaults
incompetents such as yourself should stick to "html programming"
>>
>>54192301
Maybe linus is fucking retarded, like you.
>>
>>54193057
Think you mean x86 plunged the programming world into the dark age.
>>
>>54193398
t. professional fizzbuzz programmer
>>
>>54193427
x86 is a direct consequence of C, not the other way around. The architecture's literal purpose is to make C programs fast.
>>
>>54193453
No.
>>
>>54193338
And I love you too. You are so cute and naive. But please do explain why a procedural language with archaic use of *alloc to allocate memory is the best language out there for general purpose programming.

Oh wait you are still in high school so you have no real world experience.
>>
>>54193427
x86 is a great architecture (up to the 32-bit variant away, amd64 is an abomination).
>>
>>54193409
you should go back to css tho
>>
>>54193439
>waaaaah, I got told
you must be 18+
>>
>>54193453
js cucks should get out of this thread
>>
>>54193479
>please do explain
Nah, I'd rather have you stay dumb.
>>
>>54191440
>Protip any python library you used in the past was likely compiled C.
Just fyi to future readers: this is 100% bullshit, especially for web-related libraries like Flask, Django, etc.
>>
>>54193498
>animu degenerate
>thinks he has the right to an opinion
>>
>>54193670
>Ouch, my butt exploded!
>Better tell the other guy how told he was!
Just don't forget to apply buttcream if you don't want the injury to be permanent.
>>
>>54193710
It is 100% accurate though. Do you really think flask or django could serve more than 1 request a second in python? Nevermind the fact that python has no concurrency whatsoever because muh gil, but it's also ridiculously slow even in single-core tasks.
>>
>>54193752
parallelism*
>>
>>54193702
You aren't even trying. You are probably just a bus driver or something that missed the tech support thread.
>>
>>54193741
>full mode damage control
time to go, timmy
>>
>>54193766
>PLEASE tell me, I'll suck yo' dick
Nope.
>>
>>54190719
A lot of API's are written in C, so that any modern language can import such a module. A concrete example of it is the PKCS#11 API.
>>
>>54193226
*sizeof ()
>>
>>54193783
But even more APIs are written in JS!
>>
>>54193809
that's a shitty way of formatting function calls
>>
>>54193782
I know why C is a bad choice for general purpose programming and explained so. You have so far provided no convincing proof in this thread that you even know what C is. The only thing you have proven so far is that your mental age is on par with a 11 year old.
>>
>>54193752
Django is not written in C.

$ git clone https://github.com/django/django.git
-bash: ech: command not found
$ find django -name \*.c | wc -l
0
>>
Oh. Excuse me while I drop this link here.

https://github.com/vurtun/nuklear

It's a GUI toolkit... for ANSI C.
>>
>>54193826
>I'll suck it real good
Still no.
>>
>>54193872
it's shit tho
>>
>>54193826
>I know why C
m8, you don't have a clue about C, how the fuck do you think you can be taken seriously?
>>
>>54193890
What the fuck do you know? Have you ever used it? You probably spent less than 10 seconds looking at it, and decided it wasn't worth shit.
>>
>>54190719
C is a very versatile language
I use it for programming my microcontrollers
>>
>>54193907
>What the fuck do you know?
a lot
>Have you ever used it?
yes; IMGUI too
>probably
let me guess, you just found out about it and decided to suck dick in front of everyone about OMG C GUI TOOLKIT; fuck off
>>
>>54193825
Yes, it is.

Good thing sizeof isn't a function.

Neither is "if" or "else if".

Do you format those keywords as " if(condition) " ?

If so, you're a disgusting human being.
>>
>>54193900
It's quite clear you are fucking clueless. Only a massively retarded person would use C unironically for non-learning purposes as a general purpose programming language. Seriously you are cancer. No one likes your kind.
>>
>>54193951
But "sizeof()" really *is* a function.
>>
>>54193959
How does Linus' dick taste?
>>
>>54193954
>use C unironically
thanks for confirming to everyone that you're a retard; further discussion is pointless
>>
>>54193954
C is the only actual *general purpose* programming language.
>>
>>54193963
>mad for getting told
chill, faggot, this is an anonymous board
>>
>>54193981
ugh...I think he's right about sizeof tho. Fuck I hate to agree with him/her, but yeah.
>>
>>54193967
You are the retard. Valid reasons for using C in 2016:
>kernel programmer
>microcontroller programmer
>legacy application developer
>low level API developer
>embedded developer

Chances are you are neither of these. So fuck off you colossal retard.
>>
>>54194005
>I think he's right
Linus? Of course.
>>
>>54194009
>unironically
there's nothing you can say after this that can make you look anything else than completely brain dead retarded
>>
>>54194009
Calm down. You are being rustled and baited by these expert C programmers. Their vocabulary seems to consist of mainly sucking dicks so they probably hail from /b/.
>>
>>54194043
serves him right for having the audacity to discuss C with the big dick players of /g/
>>
>>54194009
>performance isn't an important metric

Spotted the webdev!
>>
>>54194030
Says they person unable to use capital letters. You are either retarded or browse /g/ from a phone. And browsing 4chan from a phone makes you a disgusting casual. Meaning you have no fucking idea what you are talking about.
>>
>>54194009
Webshit confirmed!
>>
>>54194102
really, there's nothing; you might as well give up because nobody's reading your drivel anymore
>>
>>54194096
>making something in C makes it magically faster
OK I'm out. Everyone in this thread are a certified web developer. Enjoy your HTML.
>>
>>54194102
Wow, this is easily the weakest attempt at ad hominem I've seen in quite a while
>>
>>54194009
holy csscuck, batman!
>>
>>54194126
The difference between a well written load balancer C and Python is about 4 servers.
>>
>>54194096
>webdev !
>>54194126
>no u !
>>
>>54194146
#REKT
R
E
K
T
>>
>>54194123
I lied. Not yet out. Are you stupid or something? I've gotten more attention in this thread than you ever or anyone else replying to me is ever going to get in your entire life.
>>
>>54194163
>I've gotten ... attention in this thread
Yeah, that's why it went to shit.
>>
>>54194172
No it's because you people are stupid. It's sad that you don't even understand why.
>>
File: s.png (26 KB, 637x378) Image search: [Google]
s.png
26 KB, 637x378
writing a card playing AI in C right now. i think ive got a memory leak somewhere because the memory usage continuously increases the more i run it
>>
>>54194195
Alright buddy, you can go write your PHP now
>>
>>54194230
Depending on device you use to browse /g/ with you are most certainly involuntarily executing code I once have committed. I hope you feel violated :^)
>>
>>54194196
Try to check your problem if it can't be done in a transition of states. Most of the time you don't need to allocate dynamically, but it's the first thing that comes to mind.
>>
>>54194196
If you enjoy overkill for your hobby project get valgrind. It's mandatory if you intend to work with C.
>>
>>54194365
>Try to check if your problem can be done in a transition of states
fixed
don't drink and type
>>
>>54194311
Let me guess: your uncle works at Nintendo, too?
>>
With very few exceptions, any software which needs a GUI is either a toy and/or simplified shit for tech illiterate masses.
>>
>>54194486
Nah nothing that grand. I've just committed code to the linux kernel that has to do with networking. But you are safe if you are using Microsoft or Apple software. But then your authority on C weak sauce. So once again, enjoy being violated by my code ;^)
>>
>>54193981
Lol, but I'm right.
>>
>>54192765
I am an embedded C developer and I use C as its a simple reliable language to do simple reliable tasks. Things like imputing data into arrays and creating text databases from that information. This can then be used with HTML, Javascript, and other web development languages centered around UI.

C can be used to create interfaces of course, but to me its strengths lie in other areas. To me UI/EX is strongest with web development practices, but I'd never have them processing sensor data and basic functions outside of UI.
>>
>>54194009
The only valid reason you've listed is legacy application developer. C is absolute dogshit for embedded/systems stuff.
>>
>>54195154
m8 wtf are you using....
>>
>>54193975
Any language that's Turing complete can be considered "general purpose".
>>
>>54191477
is he kill?
>>
>>54195551
Ye
>>
>>54190719
C is good for games. http://pastebin.com/AcmcNzMX
>>
>>54195307

"general purpose" has to do with pragmatism. esolangs are turing complete, you would not speak of them as general purpose
>>
>>54190719
http://www.lextrait.com/vincent/implementations.html

Literally everyone uses C or C++
You can't beat its efficiency unless you're writing in assembly (but lol unless you're making Doom).
>>
>>54190719
>bottom rigth corner
0/10
>>
>>54191358
>if the programming doesn't feed me an >object oriented programming paradigm from the bottle then it isn't object oriented
How about actually learning something about how a computer works rather than continuing to pretend you know everything because you took CS101 while still thinking "stack overflow" is just a cs forum
>>
>>54191440
In my algorithms course, the bench marks for a program would always say "< 1 second runtime (or < 3 second runtime if in Python)"
No joke :P
>>
>>5419170>>54191708
Being considered an object oriented programming language just means the language has limited the programmer in what he or she can do with it in order to make it easier to use in an object oriented fashion (but generally also less efficient)
>>
>>54190719
C++ is a superset of C, you still need the foundation.
>>
>>54190719
C is still King Motherfucker in the embedded space, and will always remain King Motherfucker in any space where you actually have to think about how much memory your program will occupy and how quickly it runs beyond basic algorithmic design.
>>
>>54197153
>pragmatism

Your personal preference on a particular language or lack of intellectual capacity to learn more complex languages does not equate with pragmatism.
>>
>>54197485
>being this braindamaged
>>
>>54190719
Scientific, numerical software. High performance computing.
>>
>>54197664
Being this buttmad.
>>
>>54190719
>language runtimes
>libraries (pretty much everything can link with c)
>kernels, drivers
>embedded systems (if you're going even more embedded, asm)
>fun

people who write any kind of server in c (especially forking ones) are retarded
>>
/g/ can't even average 2 ints in C
>>
>>54197832
res = a - b/2;
>>
File: 1403837987365.png (48 KB, 400x389) Image search: [Google]
1403837987365.png
48 KB, 400x389
>>54197834
>>
>>54192055
You are calling a C API from C code and linking against code written in C. How is that "not writing C" you dipshit?
>>
>>54191565
Shit oo in Fortran I'm a total it-history slave
>>
>>54198814
These guys collaborated with Donald Knuth and invented OOP.

Alan Kay even credits them, and Kay and Dahl collaborated on the successor to Smalltalk.
>>
>>54191911
C is like a mirror fir some of use it can show are retard level
>>
>>54197741
Unless you are talking about embedded devices as in loading instructions on a microcontroller he is right. Embedded computers nowadays have enough juice that you can more or less use whatever language you want. Although C++ with QT is somewhat popular since it includes an xserver.
>>
Embedded systems, although they are quickly moving away from it since today you can program micro controllers with proper languages like JavaScript, Java, C# or even Python.
Ain't nobody got time for register & bit manipulation nonsense only experience C programmers can understand.
>>
>>54197684
Actually in such scenarios the scientist often write the program that will run on the supercomputer himself. They often have no further background in CS outside CS101 and will write their algorithm in for example Java (well let's hope he isn't using the standard libs) because the JIT will make the performance penalties irrelevant. Chances are they don't have enough funding for having a code monkey in the project.
>>
>>54197380
>backpedaling
>>
>>54198186
>C API
Qt has no C API, shit stain!
>>
>>54194621
>committed code to the linux kernel
>sizeof() really is a function
>>
>>54199387
You are a meme.
>>
>>54199895
But "sizeof()" really *is* a function.
>>
Embedded, ultra high fast scientific, dedicated systems (like operating systems), embedded/hardware programming, the bootstrapping on your smart fridge, your car door logic, my spy camera in your wife's daughter's room.

>people talking about size of
>qt shit
>the buttmad from from git gud
This us a abit thread

>>54190743
This, basic fucking guis probably meant to run on a 32mb ram thing in some public place maybe... But it's still possible.

>>54191192
Qt is C++.
>>
>>54192563
This.
>>
>>54197303
How about you open a dictionary and learn what the word "oriented" means ?
Thread replies: 233
Thread images: 11

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.