News for hackers. Stuff that matters.
Re:Building a Command-Line Application with Crystal by throwaway7645 on Thursday March 23, 2017 @08:45PM (#13945656)
Anyone compare Nim to Crystal? Both are AOT languages with syntax inspired by dynamic languages (Python & Ruby). Nim transpiles to C and Crystal uses LLVM. I've been playing with Nim, but I have a feeling Crystal will catch on quicker.
Re:Building a Command-Line Application with Crystal by zem on Thursday March 23, 2017 @10:34PM (#13946151)
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

meanwhile, crystal does not even support windows yet. https://github.com/crystal-lang/crystal/issues/26

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.")

[dead]
Re:Building a Command-Line Application with Crystal by yawaramin on Thursday March 23, 2017 @10:48PM (#13946217)
> ... some of documentation reads like someone who knows English as a second or third or fourth language wrote it, ...

Um, what's wrong with that? Not everyone gets to learn English as their first language, do their efforts deserve to be discarded just because of that?

I mean, I could point out that your grammar ('some of documentation') invalidates your entire comment, but that's kinda silly.

Re:Building a Command-Line Application with Crystal by 35bge57dtjku on Friday March 24, 2017 @01:17AM (#13946802)
> I could point out that your grammar ('some of documentation') invalidates your entire comment, but that's kinda silly.

He's not writing the hopefully high profile documentation for a project that people want to be used, ffs. No, it doesn't deserve to be discarded because of that, but it's clearly suboptimal.

Re:Building a Command-Line Application with Crystal by yawaramin on Friday March 24, 2017 @09:34AM (#13948787)
You make it sound as if this version of the documentation is set in stone, forever. Can't small projects improve their documentation as they grow in popularity? E.g. do you think that Linus Torvalds' Linux documentation was always up to the highest standards of Strunk & White's prescribed English?
Re:Building a Command-Line Application with Crystal by williamgb on Friday March 24, 2017 @02:12AM (#13947036)
I absolutely do not share the opinion of person to whom you are replying, but to state that their comment is invalid due to a trivial typo is unnecessary, and has potential to be incendiary.
Re:Building a Command-Line Application with Crystal by yawaramin on Friday March 24, 2017 @09:31AM (#13948764)
I mean, that's why I said:

> ... but that's kinda silly.

Re:Building a Command-Line Application with Crystal by williamgb on Friday March 24, 2017 @07:36PM (#13953125)
What point were you trying to make? You made one great statement, with which I agree fully, but followed with statement drawing a comparison between the documentation for a funded open-source project, and a typo in a comment thread. It's not just "kinda silly", it's utterly asinine.
Re:Building a Command-Line Application with Crystal by yawaramin on Saturday March 25, 2017 @08:06AM (#13955208)
No, I said I could have drawn that comparison, but I wasn't going to, because it would be silly, just as knocking a cool project down because its creators aren't native English speakers is silly.
Re:Building a Command-Line Application with Crystal by _raul on Thursday March 23, 2017 @10:14PM (#13946039)
I've started to transition from Ruby to Crystal for my pet projects and haven't hit any serious issues so far. Since you seem to have much more experience than I do, would you mind elaborating a bit on the issues you found and why you think the compiler and type system are bad?
Re:Building a Command-Line Application with Crystal by Svenskunganka on Friday March 24, 2017 @12:07AM (#13946530)
I wouldn't count on it, judging by his previous comments he seems to prefer drive-by snipes over discussions. The fact that he made so many claims about how bad Crystal is without even attempting to explain why doesn't really make him seem credible. And the icing on the cake gotta be how he nitpicks on very minor grammatical errors made by non-native english speakers which he also seems to be completely unaware of that they are. Even I - a Swedish person - fully understand every sentence I've read so far, and English is not my primary language either.

I wouldn't take this guy seriously until he brings forth some constructive criticism.

Re:Building a Command-Line Application with Crystal by RX14 on Friday March 24, 2017 @06:22AM (#13947895)
>CoC

I'm sorry, what does that mean?

>bad compiler, bad type system

I'd love to hear some feedback from you about the compiler and type system, so that we can discuss and improve them.

>no formal proofing

Ary has expressed interest in formally defining crystal's type system, but its understandably far down the list of priorities.

Re:Building a Command-Line Application with Crystal by amorphid on Thursday March 23, 2017 @10:34PM (#13946145)
Elixir is by far my favorite language out of the 6 I've seriously tried (Elixir, Ruby, JavaScript, Python, Java, Bash). I'm​ gonna dive into Go in near future.
Re:Building a Command-Line Application with Crystal by name_for_now on Thursday March 23, 2017 @11:19PM (#13946340)
I would honestly be very surprised if you said Bash was your favorite of the 6.