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

Microsoft wins again

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 71
Thread images: 14

File: Linux_sucks.gif (17KB, 376x175px) Image search: [Google]
Linux_sucks.gif
17KB, 376x175px
>write simple hello world app in C

>compile with gcc
>59KB

>compile same code with Visual Studio
>36KB
>>
bullshit
>>
Static vs dynamic linking senpai
>>
>>56742962
Who gives a single fuck about a O(1) compile size difference of 23KB?

Show me an O(n) or greater difference between gcc and VS where n is a measure of programming size and I would care.

Fucking code monkeys.
>>
how?
no matter what combination of -O (-O0,-O3,-Os) or compiler (gcc, clang, g++) I use I still only get a 8.4 kB executable. (can't test Visual Studio, I'm on Linux)
>>
>>56743064
>not compiling your programs with -Ofast
>>
>>56743064
Does gcc on Windows always link Win32 libraries?
>>
>>56742962
>you analize the VS build and you find out it contains botnet
I'll gladly that 23KB difference.
>>
>>56743013
dynamic should give a smaller binary you mongrel
>>
>>56743132
How? You're including the same libraries ethier way.
>>
looks like op is just a retard

just let this thread die.
>>
>Troll post
Report and continue

>>>/global/rules/6
>>
>>56743483

>The outcome of a field tested experiment isn't what I wanted so it must be a troll post
>>
>>56743531
You are lying and pretending to be a retard
>>
>>56743132
That's what I'm saying
>>
>same program in java
>414 bytes
Woah, C is full of bloat.
>>
>>56743542

shitty bait
>>
>>56742962
i'm working on a QT app right now

and its literally the other way around

the windows exe is like .6mb compared to 2mb

BUT i have to package like 30mb worth of QT with my windows app :|
>>
>>56743729
you'd have to package Qt for Linux as well

since most DEs use GTK
>>
>>56742962
>I don't know how to properly GCC, the post
>>
>>56743770
actually, worded that weird

you won't have to package it, since the package manager will take care of it

but the end user will still have the extra Qt bits installed along side
>>
>>56742962
8.2k you dumb cunt.
>>
>>56743483
triggered freecuck detected
>>
>>56742962
>hello world app
>app
Fuck off tech illiterate
>>
File: TiVrXyf.png (13KB, 822x389px) Image search: [Google]
TiVrXyf.png
13KB, 822x389px
>>
>>56743097
>contains additional botnet
>still smaller
microsoft wins again
>>
File: Bill Gates.jpg (66KB, 500x500px) Image search: [Google]
Bill Gates.jpg
66KB, 500x500px
>>56743059
size always matters. ask your mother.
>>
File: .png (11KB, 246x263px) Image search: [Google]
.png
11KB, 246x263px
>>56742962
winshits and gnucux blown de fug oud
>>
File: thefuture.png (23KB, 1257x98px) Image search: [Google]
thefuture.png
23KB, 1257x98px
>>56744635
wew lad
I hate to say Anon called it
but...
>>
Not c
>>
Best C compiler for windows?
>>
>>56744875
Gentoo
>>
>>56744875

visual studio
>>
>>56744823
gcc on suicide watch
>>
>>56743793
dynamic linking though. if the user installs a second qt application, then on linux he has installed 0.5 qts per application, where the windows users has installed 2 statically linked qts, so 1 qt per application.
>>
>>56742962
>>56742962
> 59 KB
> Hello world program in C
Go back to VisualCancer
>>
>>56744875
you have bash now, don't you? use gcc
>>
>>56746182
but clang is better
>>
>compile a hello world in gcc
>it contains a longer message than the code and it is 20kB
>wow, you don't know how to code?
>>
>>56742962
>>write simple hello world app in C
>>App
>>
>>56742962
>msvcp140.dll missing
>>
File: Capture3.png (20KB, 363x509px) Image search: [Google]
Capture3.png
20KB, 363x509px
>compile with gcc
>59KB

It's actually heavier, lol
Dunno about VS tho
>>
>>56742962
even more impressive considering the injected telemetry
>>
>>56744877
i shouldnt have laughed
> i did
>>
File: .png (6KB, 312x23px) Image search: [Google]
.png
6KB, 312x23px
>>56746379
what the fuck?
I build this with xcode, only 9 KB
>>
>>56742962
% cat hello.c
#include <stdio.h>
int main(void)
{
fprintf(stdout, "Hello World!\n");
return 0;
}
% gcc hello.c -Wall -pedantic -o hello
% ls -l hello
-rwxr-xr-x 1 8,3K Sep 23 19:44 hello


the only thing you showed is that everything is shit on windows
>>
>>56742962
>writing simple hello world in C++ on Windows
>using iostream
>compiling with g++
>exe is 2MB in size
>>
File: AbeOik6.jpg (3KB, 160x160px) Image search: [Google]
AbeOik6.jpg
3KB, 160x160px
>>
>>56742962
gcc is old and irrelevant so thats nothing new.
>>
>>56747261
What would you recommend then?
>>
Just report this paid shilling garbage.
>>
>>56747266
clang or VS.
>>
>>56743143
no, you're not
>>
>>56742962
If you are retarded with file size, I barely remember parameter -s (strip any debug info), -Os (optimize for size, not speed) and -m32 because 32bit pointers are smaller.
>>
>>56747336
>clang
Buggy fucking mess of a compiler. There are fucking tons of WONTFIX actual proven bugs on clang/llvm's bug trackers.
>VS
Bloated outdated garbage.

Learn to use gcc correctly. Also, OP is a paid MS shill, so just ignore that asshole.
>>
>hello world
>kb
>not bytes

pff

console.log('hello world');

save it under hello.js and it will only have a few bytes. get on my level you C old people.
>>
>>56742962
>use C#
>5kb
>>
>>56747435
Not saying you are wrong, but the latest VS preview is much more lightweight than previous versions (about 500mb, against 6-8gb for VS 2015)
Not sure if its worth it tho, the whole telemetry thing is a deal breaker for me.
>>
>>56747479
This.
If you're programming on Windows, you might as well do it correctly.
>>
nope, I just did it with stdio.h and it was 8k

>cat hw.c
#include <stdio.h>
void main ()
{
printf ("%s\n", "hello world");
return;
}

>gcc hw.c -o hw
>du -h hw
8.0K hw
>./hw
hello world
>>
File: dllhost_2016-09-23_20-14-47.png (32KB, 1038x614px) Image search: [Google]
dllhost_2016-09-23_20-14-47.png
32KB, 1038x614px
>59KB
>36KB
Where are you getting these sizes from? This code:
#include <stdio.h>

int main()
{
printf("Hello world!\n");
return 0;
}


Compiles to a 9.5KB EXE for me (VC++ 2015, x86 Release), and a 8.32KB ELF (GCC on Ubuntu/Win10, "gcc HelloWorld.cpp -o helloworld")

Could probably get them smaller using some compiler switches, but I dunno what switches would make them as big as the sizes in the OP
>>
File: dllhost_2016-09-23_20-23-45.png (34KB, 1045x616px) Image search: [Google]
dllhost_2016-09-23_20-23-45.png
34KB, 1045x616px
>>56748437
Also forgot to strip them in those examples too, "strip helloworld" results in a 6.10KB ELF, and configuring the VC project to not include debug info & strip reloc info results in an 8.5KB EXE.

Not really sure how to get them smaller, but like I said there's probably switches for it
>>
File: fat.gif (864KB, 200x150px) Image search: [Google]
fat.gif
864KB, 200x150px
>>56742962
Gaymes.
VS
office.
All pretty pathetic reasons to endure windows.
>>
File: hello_c.png (13KB, 859x450px) Image search: [Google]
hello_c.png
13KB, 859x450px
Unfortunately gcc refuses to merge .idata into .text so you get ~512 bytes of bloat because of section padding, with other linkers you can get down to 1KB.
>>
The smallest possible ELF executable is 45 B
http://makezine.com/2008/08/22/the-smallest-program-ever/

The smallest possible PE (.exe) executable on Windows 2000 is 133 B
http://www.phreedom.org/research/tinype/
>>
File: 281.jpg (34KB, 600x589px) Image search: [Google]
281.jpg
34KB, 600x589px
>>56748696
>>
>>56742962
6696 bytes here without optimizations compiled for AMD64 senpai, you are full of shit. i could get it even smaller 2bh.

main (){
puts("Hello World!");
}
>>
>>56748696
>If you’ve ever wondered about the mysterious events that happen before main() and after return(), here’s your chance to take the red pill.
/pol/ confirmed best programmers!
/g/ BTFO!
>>
>>56747440
That would only be fair if you'd also count the javascript interpreter as part of the program since you need that to run it.
>>
>>56742962
I have seen this thread already.
>>
>>56743079
Ofast doesn't work with certain libraries like Boost::SIMD...
Thread posts: 71
Thread images: 14


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.