4 ms·
i think nim has better compiler options (in particular, i don't know if it has already achieved go-like cross-compilation of static binaries, but if not it's fu
by zem 10y ago
i think nim has better compiler options (in particular, i don't know if it has already achieved go-like cross-compilation of static binaries, but if not it's further along that road than crystal is). https://nim-lang.org/docs/nimc.html https://nim-lang.org/docs/nimc.html
meanwhile, crystal does not even support windows yet. https://github.com/crystal-lang/crystal/issues/26 https://github.com/crystal-lang/crystal/issues/26
- pjmlp 10y agoGo-like cross-compilation only works with pure Go libraries that don't make use of either syscalls or cgo.
- dom96 10y agoI keep hearing praise over how easy it is to statically compile Go applications. Does the same apply to static compilation? Is it only easy when using pure Go libraries?
- zem 10y agoaccording to https://dave.cheney.net/2016/01/18/cgo-is-not-go https://dave.cheney.net/2016/01/18/cgo-is-not-go > It is possible to compile a Go program entirely statically, but it is by no means simple and shows that the ramifications of including cgo in your project will ripple through your entire build and deploy life cycle. (that article also contains the beautiful line "You’re not writing a Go program that uses some logic from a C library, instead you’re writing a Go program that has to coexist with a belligerent piece of C code that is hard to replace, has the upper hand negotiations, and doesn’t care about your problems.")
- pjmlp 10y agoUsually those praises come from young developers that never developed software back in the days when static linking was the only option. So they look at Go's static linking, their experiences using -static in gcc and glibc, and think they just found something magical. It is interesting the amount of knowledge that gets lost within a few generations.
- devmunchies 10y ago> It is interesting the amount of knowledge that gets lost within a few generations. I've only been programming for 4 years. What's the second best way to learn the old practices and the way things were done (the first best being "living back then").
- pjmlp 10y agoIf you enjoy reading documents, BITSAVERS.ORG is a treasure mine full of lost knowledge. https://archive.org/details/bitsavers https://archive.org/details/bitsavers Here you will find Xerox PARC, DEC, Burroughs, Apple, Sun, Borland,... old research documents, papers, manuals. In the context of static compilation, for example in MS-DOS, take Turbo Pascal 6.0 programmer's guide. https://archive.org/details/bitsavers_borlandturVersion6.0ProgrammersGuide_11460728 https://archive.org/details/bitsavers_borlandturVersion6.0Pr... For some 8 bit love you can check ZX Spectrum and Atari archives. http://www.worldofspectrum.org/ http://www.worldofspectrum.org/ http://www.atariarchives.org/ http://www.atariarchives.org/ Next step is to get an emulator for any of those old OS/computers and try to follow along one of those books. Also there are some videos on YouTube showing those systems. "The Smalltalk-80 Programming System" https://www.youtube.com/watch?v=JLPiMl8XUKU https://www.youtube.com/watch?v=JLPiMl8XUKU "NeXT vs Sun" https://www.youtube.com/watch?v=UGhfB-NICzg https://www.youtube.com/watch?v=UGhfB-NICzg "Steve Jobs internal demo of NeXTSTEP 3" https://www.youtube.com/watch?v=gveTy4EmNyk https://www.youtube.com/watch?v=gveTy4EmNyk "Amiga Programming" https://www.youtube.com/watch?v=WOAyVIWFaXQ&list=PL1E7187BCFFD11ABF https://www.youtube.com/watch?v=WOAyVIWFaXQ&list=PL1E7187BCF... "Amiga Hardware Programming" https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLc3ltHgmiidpK-s0eP5hTKJnjdTHz0_bW https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLc3ltHgmii... The Mother of All Demos" https://www.youtube.com/watch?v=yJDv-zdhzMY https://www.youtube.com/watch?v=yJDv-zdhzMY Just a very tiny sample of videos
- nurettin 10y agoI emailed the bitsavers link to our programming team at work with the subject: "jurassic park"
- jug 10y agoTrue and pretty obviously so, but Go is still fantastic in this regard. :) Compare to other native cross-compile stories like with how you'd have to go about to cross compile a Qt app on Linux to Windows... Or even worse to Mac.
- pjmlp 10y agoHave you ever tried to cross-compile a Go application using native UI toolkit?