Live data from Hacker News

GoPlus – The Go+ language for data science

github.com

21–30 of 64 posts

Re: GoPlus – The Go+ language for data science

#21
post #11
post #4

I'm not a Go user, but is the important idea here that it can be run from a scriptingish environment like Jupyter or something?

It's significant syntactic sugar that brings it closer to Python, but no notebook support from what I can see. Do any notebooks support a compiled language?

The Jupyter project has a notebook called Xeus for C++.

Re: GoPlus – The Go+ language for data science

#22
post #19

IMHO these conveniences should just be in the language. List comprehensions, dictionary comprehensions, and short-hand for literals are the kind of syntactic sugar that have almost no downsides, save you some RSI, and make code more readable. I'm surprised comprehensions in particular haven't spread to more modern languages.

> I'm surprised comprehensions in particular haven't spread to more modern languages. Comprehensions become unreadable quite quickly - even simple ones have to be read inside-out, and complex (especially nested) ones are much worse. Most modern languages seem to prefer functional-style methods like `map`, `filter` etc, which are more readable in all but the simplest cases.

> which are more readable in all but the simplest cases.

Except in practice, the vast majority of comprehensions are simple.

Re: GoPlus – The Go+ language for data science

#23
post #11
post #4

I'm not a Go user, but is the important idea here that it can be run from a scriptingish environment like Jupyter or something?

It's significant syntactic sugar that brings it closer to Python, but no notebook support from what I can see. Do any notebooks support a compiled language?

There is a Go kernel for jupyter/nteract.

https://github.com/gopherdata/gophernotes

Re: GoPlus – The Go+ language for data science

#24
post #11
post #4

I'm not a Go user, but is the important idea here that it can be run from a scriptingish environment like Jupyter or something?

It's significant syntactic sugar that brings it closer to Python, but no notebook support from what I can see. Do any notebooks support a compiled language?

There is support for many languages Haskell :: https://github.com/gibiansky/IHaskell Rust :: https://github.com/google/evcxr

https://github.com/jupyter/jupyter/wiki/Jupyter-kernels will give you a more detailed list

Re: GoPlus – The Go+ language for data science

#25

IMHO these conveniences should just be in the language. List comprehensions, dictionary comprehensions, and short-hand for literals are the kind of syntactic sugar that have almost no downsides, save you some RSI, and make code more readable. I'm surprised comprehensions in particular haven't spread to more modern languages.

> I'm surprised comprehensions in particular haven't spread to more modern languages.

I've come to dislike list comprehensions. Simple ones are ok but they do not handle incremental complexity well. Invariably it means code slowly becomes really unreadable as time goes by because nobody wants to rewrite the list comprehension when one more little tweak stuffed in there will do the job.

I much prefer object-functional chaining style ala Scala, Groovy, Ruby etc:

    some_giant_list
      .findAll { it.foo > 20 }
      .groupBy { it.bar }
      .countBy { it.value.size() > 5 }
They scale much better over time as new constructs get inserted as functional additions in the sequential pipeline.

Re: GoPlus – The Go+ language for data science

#26
post #11
post #4

I'm not a Go user, but is the important idea here that it can be run from a scriptingish environment like Jupyter or something?

It's significant syntactic sugar that brings it closer to Python, but no notebook support from what I can see. Do any notebooks support a compiled language?

Absolutely, see eg: BeakerX [1]

[1] http://beakerx.com/

Re: GoPlus – The Go+ language for data science

#27
post #25

IMHO these conveniences should just be in the language. List comprehensions, dictionary comprehensions, and short-hand for literals are the kind of syntactic sugar that have almost no downsides, save you some RSI, and make code more readable. I'm surprised comprehensions in particular haven't spread to more modern languages.

> I'm surprised comprehensions in particular haven't spread to more modern languages. I've come to dislike list comprehensions. Simple ones are ok but they do not handle incremental complexity well. Invariably it means code slowly becomes really unreadable as time goes by because nobody wants to rewrite the list comprehension when one more little tweak stuffed in there will do the job. I much prefer object-functional…

Yes, as a dev who started in Python and has done more JS recently, I’ve really come to believe that the chaining of in-line functions is a better approach in the end. Python theoretically has the advantage of working with lists or iterators, but in practice, all you really use are lists.

Re: GoPlus – The Go+ language for data science

#29

I love the idea of main-less Go scripts for times where you just want to do something simple, fast. Neugram [1] aimed to make Go a better scripting tool, but unfortunately it seems the project is dead. Although Go+ says its focus is on data science, I think it could fill this niche too. By the way: does Go+ have shebang support? 1: https://github.com/neugram/ng

Not main-less but you can run go scripts using a shebang with some elbow grease. https://blog.cloudflare.com/using-go-as-a-scripting-language...

Re: GoPlus – The Go+ language for data science

#30
post #25

IMHO these conveniences should just be in the language. List comprehensions, dictionary comprehensions, and short-hand for literals are the kind of syntactic sugar that have almost no downsides, save you some RSI, and make code more readable. I'm surprised comprehensions in particular haven't spread to more modern languages.

> I'm surprised comprehensions in particular haven't spread to more modern languages. I've come to dislike list comprehensions. Simple ones are ok but they do not handle incremental complexity well. Invariably it means code slowly becomes really unreadable as time goes by because nobody wants to rewrite the list comprehension when one more little tweak stuffed in there will do the job. I much prefer object-functional…

Obviously bad practice can ruin any good thing, but I much prefer list comprehensions for smaller operations and will refactor them as they become unwieldy. If you're in an environment where "nobody really wants to" rewrite stuff that's becoming hard to work with (for whatever reason) it probably doesn't matter which language feature dooms you.
Post reply on HN