News for hackers. Stuff that matters.
Re:Building a Command-Line Application with Crystal by pjmlp on Friday March 24, 2017 @04:52AM (#13947549)
Go-like cross-compilation only works with pure Go libraries that don't make use of either syscalls or cgo.
Re:Building a Command-Line Application with Crystal by jug on Friday March 24, 2017 @07:33AM (#13948195)
True 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.
Re:Building a Command-Line Application with Crystal by pjmlp on Friday March 24, 2017 @07:51AM (#13948268)
Have you ever tried to cross-compile a Go application using native UI toolkit?
Re:Building a Command-Line Application with Crystal by dom96 on Friday March 24, 2017 @05:09AM (#13947610)
I 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?
Re:Building a Command-Line Application with Crystal by pjmlp on Friday March 24, 2017 @05:54AM (#13947758)
Usually 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.

Re:Building a Command-Line Application with Crystal by devmunchies on Friday March 24, 2017 @11:46AM (#13949680)
> 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").

Re:Building a Command-Line Application with Crystal by pjmlp on Friday March 24, 2017 @12:28PM (#13950048)
If you enjoy reading documents, BITSAVERS.ORG is a treasure mine full of lost knowledge.

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.0Pr...

For some 8 bit love you can check ZX Spectrum and Atari archives.

http://www.worldofspectrum.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

"NeXT vs Sun"

https://www.youtube.com/watch?v=UGhfB-NICzg

"Steve Jobs internal demo of NeXTSTEP 3"

https://www.youtube.com/watch?v=gveTy4EmNyk

"Amiga Programming"

https://www.youtube.com/watch?v=WOAyVIWFaXQ&list=PL1E7187BCF...

"Amiga Hardware Programming"

https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLc3ltHgmii...

The Mother of All Demos"

https://www.youtube.com/watch?v=yJDv-zdhzMY

Just a very tiny sample of videos

Re:Building a Command-Line Application with Crystal by nurettin on Friday March 24, 2017 @07:59PM (#13953235)
I emailed the bitsavers link to our programming team at work with the subject: "jurassic park"
Re:Building a Command-Line Application with Crystal by zem on Friday March 24, 2017 @05:27AM (#13947671)
according to 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.")