Hello World in C

> Hello World in C
> binary file is ~8 KB big
> Hello World in Rust
> binary file is ~546 KB big
Is this a joke?

Attached: Screenshot_20180713_193518.png (351x350, 34K)

Other urls found in this thread:

lifthrasiir.github.io/rustlog/why-is-a-rust-executable-large.html
blog.japaric.io/fearless-concurrency/
github.com/avr-rust/
rust-lang.org/en-US/faq.html#why-do-rust-programs-have-larger-binary-sizes-than-C-programs
timelessname.com/elfbin/
muppetlabs.com/~breadbox/software/tiny/teensy.html
doc.rust-lang.org/book/second-edition/ch17-00-oop.html
twitter.com/NSFWRedditGif

bamp

>png file with background rendered to NON-OPAQUE checkerboard pattern
ok Im fucking triggered. here's your (You)

Oh, that's nothing. I produced a 4.1 MiB executable.

dude static linking lmao

Isn't a "hello world" in SBCL like 50 MB?

AHAHAHAH!

Even swift, which is not designed to be used for small command line utilities, but for Apps, manages to make smaller executables

pic related, Hello World in 12KB

Attached: Captura de ecrã 2018-07-13, às 18.44.31.png (1434x624, 385K)

Ahahaha, sorry retards, Swift is the best programming language there is.

Attached: images.jpg (225x225, 4K)

In fact, it's even smaller, only 10420 bytes, 10.4KB.

You have to go back, taconigger

Why would you care about the filesize of a Hello Word executable specifically?

>buttmad EOP can't into languages
lmao

How is the size of "Hello World" in assembly?

You gotta mess with compiler flags and stuff I think if you want a smaller executable

lifthrasiir.github.io/rustlog/why-is-a-rust-executable-large.html

all countries south of the border are taconiggers

>66724703
Do you all save your executables of floppy disks? Why the fuck does it matter?

>a rustfag has defended this

Because that’s just 8 characters printed and there’s almost a 7000% difference in binary file size

El Goblino

bloated executables mean i$ misses out the ass and also make it inappropriate for microcontrollers and low level software (i.e. the thing you want to use a systems programming language for)

>Nelson
El Goblino

But that difference doesn't scale with the size of the application.
The standard library and stuff like jemalloc are simply statically linked in by default, but you can manage to get rid if you don't want it or have constraints.

/thread

yeah but in that case it makes sense since i think you're pretty much pulling a snapshot of the entire VM into the executable

at least that's what i think happens

> Hello World in C
> binary file is ~740 KB big
> Hello World in Rust
> binary file is ~14 KB big
Are you a joke?

So why does that make sense but static linking (by default) does not?

because you're not meant to compile programs in SBCL

>microcontrollers and low level software
>Rust

no one in their right mind would attempt such a thing

Why not? It's fast enough.

Don't reply to me, nigger

Don't worry, you're just a retard who doesn't understand the difference between static and dynamic linking.

So is FORTRAN, but you wouldn't do that either.

>Hello World in batch
>23 bytes
Get the fuck on my level, faggots.

Attached: GetOnMyFuckingLevelBitches.png (724x624, 523K)

>hello-world.bat
>0.1kb or less

> Hello World in ASM
> binary file is ~1 KB big
> Hello World in C
> binary file is ~8KB big
Is this a joke?

blog.japaric.io/fearless-concurrency/

>Hello World in C++
>binary file is ~8.0 kB big
Rust is pointless.

github.com/avr-rust/

C btfo

>win32 api
>23429019083 gigabytes

Attached: dfsdfsdfsfdsf.png (114x114, 23K)

That's way too fucking big for a batch hello world. You suck.

Some simple c++ program can make 100MB executable before trimming. It lacks a link time dead code elimination obviously

#include
int main(void) {
printf("Hello World!\n");
}
$ cc -Og -static hello.c
$ du -h a.out
400K

I don't see an issue (beside hello world being way bigger than L1 cache)

Okay, show me your l33t skillz
echo HELLO WORLD
pause


What a way to move the goalposts.

>hello world in x86_64 ASM
>binary file is ~4 KiB big
RUST BTFO!

Attached: botnet@nsa: ~_001.png (734x488, 51K)

rust-lang.org/en-US/faq.html#why-do-rust-programs-have-larger-binary-sizes-than-C-programs

It could be even smaller if using puts instead of printf

> Hello World in C
> binary file is ~8 KB big
>Hello World in C++
>binary file is ~8.0 kB big
>Rust is pointless.

>6048 Jul 13 19:48 hello
>./hello
>Hello, Jow Forums!
wow, c/c++ is fucking bloat

>Hello World in C

That's kind of vague. What platform are you targeting? A C program targeting a bare metal embedded device could do a Hello World program in a tiny fraction of that.

Yes, Common Lisp is image-based. But why care about the size of trivial programs?

This dick-measuring contest between C and Rust faggots has awoken the java-developer within me. In pic related is the source file for HelloWorld and the class file for it. Both of them together are less than 1KiB.

It is almost as if the size of helloworld programs don't fucking matter.

Attached: Retards.png (494x536, 97K)

>Retards.png
>Java

Yikes

It's not a joke, it's rust borrowing system...

not pictured: 100MB JVM install

Yet you participate in the language console war that retarded Java won. Curious?

>Java won
>Look guise, my 540 bytes class needs a 200MB virtual machine to run

People don't even try anymore.

>Is this a joke?
No but your ability to pass optimization flags is.

>Moving the goalposts again

You can't tell me what to do, cum skin faggot

not sure, I've heard compiler does that for you if you supply no args

Well libc is a few megabytes on most platforms but you don't see anyone complaining about that now do you?

The Android Downloads application is less than that.

Attached: _20180713_205326.jpg (320x77, 4K)

It's probably all that memory safety and garbage collection bloat

>garbage collection
Rust does not use garbage collection. Get updated with the news.

oh, really? I thought C was basically the only modern language that didn't.

>The state of C brainlets

C++ doesn't either. And Rust originally was going to get one but it was decided it was going to cause too much speed loss.

Rust uses automatic reference counting.

confirmed for literally never having even read the wikipedia article for Rust

When?

Uh, where's the binary?

In the standard library

It does have RCs that's a core feature of the language.

rust static links by default
C doesn't

*that's NOT

to be fair i whould asume it scales to more like c levels as the complexity increases

stop sucking cocks and get out of the botnet

>comparing JVM instructions to CPU instructions
imagine being this retared

With you and what syscalls buddy

>retarded
>uses windows
checks out

A Hello World exe is just 2KB on Windows

Not for me on Linux. Did you pass any optimization flags?

>X is Y on Z
neat variables

No, I used tcc on Windows. GCC includes some extra crap into your ELF binaries that you don't need, try running it through strip (/bin/strip afair), it should reduce it a bit on linux as well

Babies learning about dynamic linking, pathetic.

Rust compiles static binaries by default. Are you a joke, OP?

here's your (you) brainlet

timelessname.com/elfbin/

The hello world to end all discussions.

What is rusts answer to the question of object orientation?

Attached: 1461311841550.jpg (1500x1125, 308K)

3 Billion devices run Java!

Another good related article:
muppetlabs.com/~breadbox/software/tiny/teensy.html

I've always felt depressed and incomplete and now that I've lost a leg due to a motorcycle accident I don't know if theres much left. I still have a girlfriend whom I love much but I don't think I shall ever be able to make her live a happy life. I feel like I should just get away from everyone and not give anyone anymore trouble

Sounds rough, friend. I hope making taking elf executables can give you some solace.

>screenshot of a transparent image

doc.rust-lang.org/book/second-edition/ch17-00-oop.html

herp durr hurf

>people on Jow Forums circlejerking about how many bytes their programs are instead of metrics that actually matter
typical

things that only NEET care about :)

>i don't give a shit about performance as long as my file size is as autistic as fuck