Live data from Hacker News

Go and Assembly

doxsey.net

41–50 of 127 posts

Re: Go and Assembly

#41
post #16

Except for his bullet about compiler speed, which might be faster than GHC, all of his bullets apply to GHC Haskell too.

I write haskell code all day. I spend my day writing it at work (with occasional HN breaks obviously) and then I go home and write personal projects in it. I advocate haskell on a semi-regular basis. I certainly fall on the pro-haskell side of things. But GHC absolutely does not meet all those bullet points. Compiler speed is not some minor difference, it is absolutely massive. Build times of 30 seconds vs 2 seconds,…

Actually if you import "net" go links to libc.so and some others.

Re: Go and Assembly

#42

Earlier quoted context omitted.

I write haskell code all day. I spend my day writing it at work (with occasional HN breaks obviously) and then I go home and write personal projects in it. I advocate haskell on a semi-regular basis. I certainly fall on the pro-haskell side of things. But GHC absolutely does not meet all those bullet points. Compiler speed is not some minor difference, it is absolutely massive. Build times of 30 seconds vs 2 seconds,…

Actually if you import "net" go links to libc.so and some others.

I believe "net" does so for native dns lookups. You can disable that by building go with 'CGO_ENABLED=0', if desired.

Re: Go and Assembly

#43
post #25
post #19

Earlier quoted context omitted.

I found a list of English words by frequecy of use in Project Gutenberg texts. "Basic" is around #9,500. "Rust" is ~#10,950 "Java" doesn't appear at all (List goes out to 40,000) (Admittedly, somewhat biased by the dated-ness of the material, but it's still not a common one.) Go is #106, and modern lists based on contemporary sources place it in the top 50 most used English words.

http://norvig.com/mayzner.html (1MB) word count list: http://norvig.com/google-books-common-words.txt Go: 187, Basic: 759, Java: 7136, Rust: 13110 With relative frequencies 320M:103M:8.9M:3.6M ~ 100:30:3:1

This is very biased, because there's a whole junkload of intro-to-java textbooks in Google books.

https://www.google.com/search?q=java&btnG=Search+Books&#...

Re: Go and Assembly

#44
Now this is an impressive argument. Particularly the first section about the tool chain (and the assembly part is really cool too).

I have been holding back because I don't like the lack of exceptions. But it occurred to me that C doesn't have anything like exceptions either, and even though that lack causes some serious irritation, the C language as a total package overcomes it and is really powerful.

I don't know if any language can beat that list of tool chain benefits. Maybe I will give go a whirl.

Re: Go and Assembly

#45

And herein lies the problem with Go. Seriously, try searching for articles about Go on HN. People always say "well the name isn't a problem, because you just search for it with "golang" instead!" but no one writes golang unless they're pointing out how to search for it . If I was trying to get back to this article a month from now and I searched for "go", would I find it? Probably not, unless I remembered the article…

Yes, the name can be difficult to search for. Same with C. Nothing is going to be done about it so most of us have moved on.

Also, it is pretty easy to find this story by searching for 'go' in the HN search box. You can further reduce results by selecting 'Stories' and search by date.

So in practice it is not a big deal.

Re: Go and Assembly

#46

Earlier quoted context omitted.

I write haskell code all day. I spend my day writing it at work (with occasional HN breaks obviously) and then I go home and write personal projects in it. I advocate haskell on a semi-regular basis. I certainly fall on the pro-haskell side of things. But GHC absolutely does not meet all those bullet points. Compiler speed is not some minor difference, it is absolutely massive. Build times of 30 seconds vs 2 seconds,…

Actually if you import "net" go links to libc.so and some others.

Ah, if the original bulletpoints for go are wrong then ghc may be more comparable than I figured. Can you statically link go binaries? As in, if I am using a go postgresql binding, can I build a binary with libpq (the postgresql C library) linked in statically, so it can be deployed on servers with no postgresql libraries installed?

Re: Go and Assembly

#47

Now this is an impressive argument. Particularly the first section about the tool chain (and the assembly part is really cool too). I have been holding back because I don't like the lack of exceptions. But it occurred to me that C doesn't have anything like exceptions either, and even though that lack causes some serious irritation, the C language as a total package overcomes it and is really powerful. I don't know i…

Go supports panic/recover which is very similar to exceptions. Instead of wrapping a try...catch block around something, you get to handle exceptions every time they are about to cause a function to be exited.

This means you can't continue to execute the function, but you do get a chance of handling the exception / turning it into a regular return value.

tl;dr: Go has exceptions, they are just a little different (IMO for the better).

Re: Go and Assembly

#48
post #27

And herein lies the problem with Go. Seriously, try searching for articles about Go on HN. People always say "well the name isn't a problem, because you just search for it with "golang" instead!" but no one writes golang unless they're pointing out how to search for it . If I was trying to get back to this article a month from now and I searched for "go", would I find it? Probably not, unless I remembered the article…

> Seriously, try searching for articles about Go on HN. Well, either "site:news.ycombinator.com go" or " "site:news.ycombinator.com golang" work very well for me, getting tons of results. What exactly was the problem again? If you don't find as many articles on Go as you would like it's because there just aren't that many. It's a relatively new language, without much of a user base yet. Heck, it only has 3-4 books ou…

I didn't even have to use that Google feature. "go hacker news" works great.

Re: Go and Assembly

#49
post #47

Now this is an impressive argument. Particularly the first section about the tool chain (and the assembly part is really cool too). I have been holding back because I don't like the lack of exceptions. But it occurred to me that C doesn't have anything like exceptions either, and even though that lack causes some serious irritation, the C language as a total package overcomes it and is really powerful. I don't know i…

Go supports panic/recover which is very similar to exceptions. Instead of wrapping a try...catch block around something, you get to handle exceptions every time they are about to cause a function to be exited. This means you can't continue to execute the function, but you do get a chance of handling the exception / turning it into a regular return value. tl;dr: Go has exceptions, they are just a little different (IMO…

I think the real value of panic/recover over try/catch is the vastly improved idiomatic usage. Only to be used in exceptional cases, and never to cross package boundaries.

I just find that so much more pleasant.

Re: Go and Assembly

#50
post #45

And herein lies the problem with Go. Seriously, try searching for articles about Go on HN. People always say "well the name isn't a problem, because you just search for it with "golang" instead!" but no one writes golang unless they're pointing out how to search for it . If I was trying to get back to this article a month from now and I searched for "go", would I find it? Probably not, unless I remembered the article…

Yes, the name can be difficult to search for. Same with C. Nothing is going to be done about it so most of us have moved on. Also, it is pretty easy to find this story by searching for 'go' in the HN search box. You can further reduce results by selecting 'Stories' and search by date. So in practice it is not a big deal.

"C" might be even shorter, but I think it's much less frequent in the english language (as a word) than the word "go".
Post reply on HN