[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
Where can I find the source code of extensive C programs? All
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: 42
Thread images: 4
File: frog3.jpg (7 KB, 250x237) Image search: [Google]
frog3.jpg
7 KB, 250x237
Where can I find the source code of extensive C programs? All I can find are stupid calculators and snake games
>>
isnt the linux kernel in C?
>>
>>54610108
deb-src
>>
>>54610108
Make your own source code :)
>>
>>54610120
99% of it is. There's still some platform-specific assembly, and probably always will be, but they've tried to get rid of as much of it as possible.

>>54610108
Check out the Quake 1 source. They GPLed it after a few years, which means that both it and a bunch of forks are out there for you to play with. It's a big project, but not so big that one person can't get a good handle on how it works. It does something you're probably interested in. And it's not hard to start modifying it.
>>
>>54610164

nice thanks
>>
>>54610108
get a C decompiler?
>>
>>54610108
You probably won't find any, at least not those that are easy to read and well commented. Most people are willing to give their work away for free.
>>
>>54610975
*aren't willing
>>
>>54610975
>Most people are willing to give their work away for free.
Well, you're right.
Linux kernel.
Quake
BSD
Most of the core-utils
GCC before they went to C++
Numerous language runtimes

Just google open source C projects.

All the corperates ones you can't see are going to be commentless and horrifying for the most part, because the company can just pay for employees to work on it.

The open source ones, if they want any outside contributors, has to either be a really big/cool project to overcome the bad code, or nice enough so that people enjoy working on it.
>>
search "(any FOSS linux package) source"

"cmatrix source"
"ls source"
>>
>>54611039
You'll get tons of C++ and a decent amount of other languages.
Pure C is a getting rare for new programs being written, outside of embedded.
>>
>>54611050
because C is literally worthless in the modern era
>>
>>54611064
Nah.
See embedded.
Don't underestimate simplicity of implementation.
>>
>>54611075
>embedded
literally the deadest subject in the entire field
>>
>>54611101
Nah.
Gotta program microwaves.
And the internet of insecure things.
>>
File: 1457942476929.jpg (2 MB, 1936x2592) Image search: [Google]
1457942476929.jpg
2 MB, 1936x2592
Even the Linux kernel is basically C++. They've taken everything good from C++ and found ways to make it work in C, since C++ at first was an extension to C. For example, the drivers for hardware have structs, a basic class, with pointers inside it to the functions it needs to work, e.g. read, write and open, which is how C++ works, but is hidden from the user. The structs even support inheritance as your struct will contain the basic driver struct you pass to the kernel and using Macros the kernel / driver code can go back up the inheritance to top level struct and have the implementation specific functions available. Its fairly tidy. The only few things the Linux kernel doesn't use are templates, otherwise it is fairly C++.

As someone who has to trawl through these files and write my own, its very interesting to see how they use the best methods available to them to write very good code.

>but why not just use C++
see Linus Torvalds explanation, tl;dr its to keep the code monkeys out.
>>
>>54610108
here
have fun

https://notabug.org/koz.ross/awesome-c
>>
>>54611216

thats amazing. thank you
>>
>>54611075
c++ is quite good for embedded if you neglect the c++ standard library and disable exceptions. The language is quite decent, especially c++14.
>>
>>54611563
Yeah, but harder to get a compiler.
>>
>>54610108
Zopfli.

>>54610791
Decompilers produce assembly, or at best, attempt to reconstruct C-like pseudocode.
>>
please report frogs and ignore
>>
>Decompilers produce assembly
decompilers try to produce high-level code like C,Java,C++ and so on
>disassembler produce assembly
>>
>>54611636
>he can't read assembly
>>
File: 1460623462269.jpg (54 KB, 596x590) Image search: [Google]
1460623462269.jpg
54 KB, 596x590
>>54611757
please report and sage animefags
>>
https://kernel.org
>>
>>54611216
damn, amazing resource. thank you.
>>
https://github.com/search?utf8=%E2%9C%93&q=language%3AC+language%3AC&type=Repositories&ref=advsearch&l=C&l=C
>>
>>54610108
C is a meme. It's not used in anything practical which is why you can only find calculators and snek gayms.
>>
>>54615068

Pajeet, my son..
>>
you must be fucking retarded, right?

http://www.slackware.com/torrents/slackware-14.1-source-dvd.torrent

also there's thing thing called github, and sourceforge

maybe you heard of it
>>
>>54613674
>report and sage animefags
>on an imageboard that originated from an anime focus
Retard
>>
>>54610108
https://github.com/id-Software
>>
>>54615244
They have a board for you idiots go on back there, retard.
>>
>>54610791
>decompiler
C has no decompiler,
What you want is a disassembler/debugger.

Be gone Java slave.
>>
>>54619915
There are C decompilers that have decent success.

Decompilers do not originate from java.

Be gone retarded meme spewer
>>
>>54619966
A decompiler produces high level source code by reversing the metadata of the bytecode, which has not been touched by compilers that change the code for optimization purposes(they are done by the JITt)so you have a higher level source than you would with C.

Me thinks someone has not learned how low level works yet.
>>
>>54610108
Here, have an interpreter: https://github.com/munificent/wren
>>
>>54610108
https://github.com/search?l=C&o=desc&q=C&s=stars&type=Repositories&utf8=%E2%9C%93
>>
>>54619879
There's a website for dumb frogposters

>>>/reddit/
>>
>>54611845
This. You don't use a COMPILER to create binaries from asm, you use an ASSEMBLER for that. So logically, something that takes a binary and gives you the asm would be a DISASSEMBLER, not a DECOMPILER.
Thread replies: 42
Thread images: 4

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.