$ echo "main = putStrLn \"Hello World\"" > hello.hs
$ ghc hello.hs
[1 of 1] Compiling Main ( hello.hs, hello.o )
Linking hello ...
$ du -h hello
1.2M hello
HAHHAHHAHA, 1.2 MEGABYTE BINARY FOR SIMPLE HELLO WORLD
HAHAHHAHAHAHA
LMAO
GHC IS 1 GIG TOO
is there any language worse than hasklel
Do people unironically use this shit?
I thought it was just a /g/ meme
>>56173385
What is dynamic linking?$ cabal build
$ du -sh dist
1.8M dist
$ cabal-dyn && cabal build
$ du -sh dist
44K dist
>>56173385
$ more helloworld.go
package main
import ("fmt")
func main() {
fmt.Println("Hello World")
}
$ du -h helloworld
1.6M helloworld
C#
>>56174438
ok, so go is worse than hasklel
any other languages with bigger binary sizes?
$ cc hello.c
$ du -h a.out
12K a.out
C masterrace
>>56173385
>>56175391
It's a common problem with high-level languages.
C is pure, unadulterated, close to the metal, with a standard library built directly out of system calls. All these new languages have to reinvent the wheel and call it "abstraction."
>>56175422$ echo "print('Hello World')" > hello.py
$ du -h hello.py
4.0K hello.py
Python masterrace :^)
>>56176728
I chuckled
>>56175422
That's dynamically linked.
Compile it again, but this time, with static linking.
Watch the binary size go from ~10K to ~850K
>>56176728
kek
>>56176753
>850K
note: glibc
>>56176728$ python -m py_compile hello.py
$ du -h __pycache__/hello.cpython-35.pyc
4,0K __pycache__/hello.cpython-35.pyc
Oh my.
>>56176753
this
>>56174438$ echo -e 'package main\nfunc main(){\n\tprintln("hello world!")\n}' > hello.go && go build -ldflags '-s' hello.go && du -h hello && ./hello
616K hello
hello world!
print("Hello World")
>not using Lua