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…
I think the only thing missing is a REPL as part of the tool chain. ipython and scala shell are so useful, especially when you're learning or just testing things out.
Go and Assembly
101–110 of 127 posts
Re: Go and Assembly
#102Earlier quoted context omitted.
> Compiler speed is not some minor difference, it is absolutely massive. Build times of 30 seconds vs 2 seconds, and that is without counting the 10 seconds of cabal resolving dependencies I simply did not play with Go to know the compilation speeds. I believe you that it is a massive difference, and it is indeed a major Go advantage. > GHC does not come with command line docs. The haddocks are available from the com…
This is a complete aside, but what are the good tools for formatting Haskell code? I've been using stylish-haskell, but it's somewhat limited and barfs on certain Unicode identifiers I like to use. (I should probably file a bug report for that...)
Re: Go and Assembly
#103Except for his bullet about compiler speed, which might be faster than GHC, all of his bullets apply to GHC Haskell too.
> all of his bullets apply to GHC Haskell too No chance. Using the `go` tool to install packages is at least an order of magnitude less annoying than using `cabal`.
Cabal works much better now, and most of the problems were due to over-conservative version ranges combined with an over-eager reinstallation policy that overwrote packages in a breaking way. That was fixed about 6 months ago, IIRC.
Re: Go and Assembly
#104Earlier quoted context omitted.
I think the only thing missing is a REPL as part of the tool chain. ipython and scala shell are so useful, especially when you're learning or just testing things out.
Agreed. The way I tend to use the repl in clojure is just to code up a script in vim and then %Eval the whole thing. Editor plugins for Go could compile-and-run, and know stuff like the working directory and the gopath, which could get you a bit closer without having to build a real REPL.
Yep, rolled my own here: http://github.com/metaleap/go-buildrun -- I use it with GoSublime on Ctrl+B (which I strongly suspect must have some repl-like feature anyway by now, but not sure) -- but works in any editor that lets you hook a key binding to an executable and pass it the current .go file's path.
Re: Go and Assembly
#105Now 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…
I think the only thing missing is a REPL as part of the tool chain. ipython and scala shell are so useful, especially when you're learning or just testing things out.
Even though I'm using GoSublime I haven't really dug into its plethora of feature, it might just have a repl in there...
Re: Go and Assembly
#106And 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…
The name "Go" is a problem, but the name "C" isn't? Silly.
Re: Go and Assembly
#107Why the \cdot? Is Unicode required to parse assembly?
http://golang.org/ref/spec#Source_code_representation
Historical reason, TL;DR edition: Plan 9 based compilers, because Ken Thompson.
EDIT: see also mseepgood's response: http://news.ycombinator.com/item?id=5185334
Re: Go and Assembly
#108This assembler is awful. I thought that AT&T had a monopoly on ghastly assembly language syntax -- but this article causes me to question that assumption: MOVL BX,autotmp_0000+-4(SP) ; from the article -- terrible! MOV EBX,[ESP+autotmp_0000-4] ; Intel -- comprehensible! This assembler has an imaginary register called FP. WTF is up with the center dot? A programming language should not require Unicode to write -- espe…
Re: Go and Assembly
#109Earlier quoted context omitted.
I thought it would be a deal breaker for me, too. C/C++/C#/Python have been my standard languages... but after coding in it for a while, I love it. You never have to worry if someone downstream is going to throw an exception make your function exit before it gets to the end. That means you can write robust code without needing a ton of try/catch everywhere, or using statements (from C#) or whatever. Yes, there's some…
Don't bother with the else. Just continue with your code outside a nested block since the if returns.
Re: Go and Assembly
#110Earlier quoted context omitted.
It's a good start but it needs many more features to be considered usable. For example, I just did a search for "redis" and about 30 libs came up. Half of them don't even have a description. How can I know which one to pick at a glance? Asking me to evaluate and profile 30 different libs for just a single task is unreasonable. Also this page isn't even on Google's first page for when you search for something. I didn'…
How do you handle that with any other language? There is no shortage of redis libs for any language.
When you publish an npm module it gets put on their site automatically, then there's a lot of javascript scraping sites that watch npm's site. Before you know it your module has a decent amount of coverage which in return makes it much easier to find as someone who is searching for modules.
I also never had a problem finding a good lib in Node because there's a few stand out Node devs who are insanely productive and produce extremely high quality libs on a regular basis.
With Go it feels like there's 3 or 4 lib searching sites but all of them are really flawed. Then on top of that Go code is hosted on a bunch of different sites.
Top Google results are also not very good. In that Redis search example I searched for "golang redis lib" and the highest rank result was for some lib with almost no traction and had a questionable API.