News for hackers. Stuff that matters.
Re:Go Modules in 2019 by llimllib on Wednesday December 19, 2018 @11:28AM (#18716775)
It's not well-suited to scientific computing at all.

I use and like Go for writing network servers and ETL processes. In a scientific context though, the type system is awkward in the extreme, there is essentially no library of modules, and the interactive visualization story is nonexistent.

Python, R, Julia, even C++ would be better options IMO.

(I'll clarify again: I like Go! I just think it's not well suited for this context)

Re:Go Modules in 2019 by stcredzero on Wednesday December 19, 2018 @11:44AM (#18716917)
If one wants to be a pioneer and be one of the people who starts the movement, now is the time to jump in and make a name for yourself.
Re:Go Modules in 2019 by jerf on Wednesday December 19, 2018 @12:03PM (#18717103)
I'd suggest "now" is actually a terrible time to try to make Go do scientific computing. With generics all-but-guaranteed to be incoming, but also not here yet, a lot of what you would do is going to be superceded in the forseeable future, on the same sort of time scale as your library's expected completion date.

I'd say that even once Go has generics, that will simply take it from being an awful scientific programming language to a mediocre one. I don't really understand why there's a few people who seem to think it's a good idea to try to do their scientific computing in Go when there are so many better options for that that already exist.

Post-generics, though, if you really insist, it will probably be the case that Go can be upgraded from "mediocre" to "tolerable" with a lot of library work. (Part of the "mediocre" is lacking libraries. That aspect can be fixed.) But it'll be hard to start that work without running generic code. Even if you assume the current documentation is the final specs, you still won't be able to guess the performance implications of anything you'd be blindly writing, and performance is very important for this sort of code.

Re:Go Modules in 2019 by stcredzero on Wednesday December 19, 2018 @12:17PM (#18717278)
With generics all-but-guaranteed to be incoming, but also not here yet, a lot of what you would do is going to be superceded in the forseeable future

I didn't mean "now" as in right this second. Generics will indeed be key.

Re:Go Modules in 2019 by erik_seaberg on Wednesday December 19, 2018 @12:06PM (#18717143)
It's frustrating how much résumé-driven development I'm seeing on problems the industry already solved. I'd rather work on harder problems using more powerful tools.
Re:Go Modules in 2019 by dmurray on Wednesday December 19, 2018 @12:05PM (#18717124)
I was looking at this very recently. It's probably impossible - not just difficult - to write a Numpy equivalent for Go as a library. I didn't feel I had what it took to extend the compiler to make that work, but some day someone will.
Re:Go Modules in 2019 by agnivade on Wednesday December 19, 2018 @12:19PM (#18717291)
Re:Go Modules in 2019 by rwj on Wednesday December 19, 2018 @01:44PM (#18718117)
I'm not certain that Go is a great fit for this particular area. Others have mentioned generics, but I'd also worry that the lack of operator overloading is a weakness. There is a lot of Fortran out there, so operator overloading is not required, but I'd worry about the ergonomics of Go, especially given the strength of the other options.
Re:Go Modules in 2019 by stcredzero on Wednesday December 19, 2018 @05:02PM (#18720174)
The best course of action for Go on this front, would be to expose operator overloading of numeric operators, combined with a community expectation that this isn't to be used for anything but numeric operations.

What would be the disadvantage of using a syntactic preprocessor to accomplish the same thing? We have an API for parsing golang. What if there was a way of marking certain files to be parsed and re-written with function calls? It could be done with a file suffix, and this could be made fairly convenient.

Re:Go Modules in 2019 by Merovius on Wednesday December 19, 2018 @06:27PM (#18720975)
> The best course of action for Go on this front, would be to expose operator overloading of numeric operators, combined with a community expectation that this isn't to be used for anything but numeric operations.

I don't think this solves the issues. For example, I have yet to think of a way to overload `+` in a consistent and performant manner. E.g. think of `a += b` vs. `a = a + b`. Either you make them separate operators (in which case there's no guarantee they do the same thing - see for example Python, where they commonly differ) or you are overallocating in the common case.

Re:Go Modules in 2019 by stcredzero on Wednesday December 19, 2018 @08:47PM (#18721856)
Either you make them separate operators (in which case there's no guarantee they do the same thing - see for example Python, where they commonly differ)

Geez. That's obnoxious. Why do we programmers do this to ourselves?

or you are overallocating in the common case.

I see. I was thinking along the lines of being able to use complex numbers with arithmetic operators, not along the lines of doing high performance crunching of floats.

Re:Go Modules in 2019 by pjmlp on Thursday December 20, 2018 @02:42AM (#18723147)
Fortran supports operator overloading since Fortran 90, so 4 language revisions ago.
Re:Go Modules in 2019 by DannyBee on Wednesday December 19, 2018 @11:57AM (#18717035)
This is absolutely true. It's also a lot of work :)
Re:Go Modules in 2019 by crimsonalucard on Wednesday December 19, 2018 @11:46AM (#18716932)
Agreed. For data stuff if you want type saftey you really need a language with support for recursive types. More languages lack this feature than have it.