I have seen the light of golang

I have seen the light of golang
It's such a weird language but damn is it rad

Other urls found in this thread:

a.cocaine.ninja/nwbsqe.png
gobyexample.com
en.wikipedia.org/wiki/Go_(programming_language)#Lack_of_race_condition_safety]
en.wikipedia.org/wiki/Go_(programming_language)#Lack_of_race_condition_safety
golang.org/cmd/cgo/#hdr-C_references_to_Go
github.com/golang/go/issues/6853
twitter.com/SFWRedditVideos

Name of video?!

Caravan Palace - Lone Digger
fucking furries

Okay OP, i'll bite. Why should I use golang instead of C?

only in the same way algo was weird half a century ago
gophers pls go
a.cocaine.ninja/nwbsqe.png

The video is super rad, I love the gore in it wayyy to much and the tension between the cats and dogs reminds me of a game I used to play a shittone.


It's basically C with a mangled syntax and some funky things that I'm starting to dig
I never really did much with C other then a few basic programs but it reminds me of C a lot.

It shouldn't replace C, but it can easily replace python, java, javascript for small projects

Fucking rood

I have the compiler installed but I never learned the language. Ill try it out for the next thing I would normally write in python.

yeah, it's also super fast, like close to C fast.
Makes concurrency easy, and loads of other cool things.

Totally tubular!

pretty much this

Hate this fucking song so much

Do you realize that just about everything can replace just about anything for small projects?

s/replace/add new language to your set of 10 languages/

this.

Where did you learn it? The Go Tour on their website requires Javascript. It's not the end of the world but I'd rather have a simple, text-based tutorial.

gobyexample.com

Thank y'

And it's getting even faster next version. Honestly it's fucking insane how fast they're getting, even after they went from C to Go itself for the compiler.

Yeah, Java spent years getting where it is today in speed and here GO just waltzing on in and smashing it to bits

I can see a future where this will replace the "K&R C" meme.

hey guys have you heard about ruby its soo cool

the next version of rubinius is going to be able to add single integers together 17% faster than compiled C confirmed

Oh, just admit you wana fug Kiki, user. It's alright, we ALL do...

i don't see the point.

as suggests, just about everything can replace just about anything on small projects.

go is trying too hard to be a general purpose language, why should I jump ship from any other general purpose language when:

if i wanted to learn a new language i would work on a language that targets a specific application. for concurrency and parallelism for example, i would consider learning erlang. if i was interested in ai i might consider something like lisp or prolog. and haxe is like what java should have been - learn once, compile to any language is very useful. go - nothing special.

go is just the newest language google is trying to meme because they want to be able to control the language standard and they failed with meming dart.

How?

the_future_is_so_bright_you_dont_need_eyes_to_see_it.tga

Because google controls the standard and google wrote the compiler and the tools.

It builds on and extends the google ecosystem in a way that will tend to give google greater control over developers using go.

By using go you are literally building the botnet.

Any language that is unnecessarily verbose is shit. This is why Python 2 is superior and will remain superior until the end times.

I hope that one day you will understand that Google isn't as bad as the tinfoil faggots lead you to believe.

No.

Go is one of the few great open source projects born out of Google's funding for a sane, safe language that isn't shit. There's nothing in Go's standard library or Go's multiple compilers that involve Alphabet's botnet in the slightest unless you consider their likely eventual roadmap to diminish the use of Java with Android. You should be afraid of Alphabet for other reasons but not for Go. Google could close the door on funding key developers and the community would still grow rapidly.

The reality is that C and C++ have been the NSA's best friend languages next to Java.

Yes, I consider that INEVITABLE. Go IS botnet and by using it you are helping to grow botnet. They'll work to grow their users and gradually transition their libraries and codebase to Go. You want to make an android app? Better know Go... You want to work at google? Better know Go... Want to use our libraries? Better know Go... Want support for this feature? Ooh so sorryyyy, google isn't really so interested in adding that feature to the standard because it would help our... I mean their competitors (((heheheheh)))

Go will end up locking developers into their ecosystem in a sort of softer way as compared to how .net locks developers to windows. Sure you can use Go on windows or gnu+linux... who gives a fuck what you run on as long as you're most likely also developing for our platform, supporting our services, our products. "Go programmer" is a codeword for "botnet programmer".

They would NEVER do something so inane. Have a look at the contributors list and it's at least 1/8th have used their google emails. How many beyond that work for google but used a different email, who knows. The fact is many of the language developers either work for google, worked for google, or they are using the revolving door shifting between developing the language and working for google. Google controls the language. The only practical effects of Go being open source are:
Good luck gaining users on your Go fork :)

When the future of computing is concurrency and parallelism and Go offers a shitty concurrency model there's really nothing to love about the language. My expectation for the future of Go is they'll end up bloating the language trying to patch the concurrency model and people will eventually move on to yet another Hip! New! language.

That can't come soon enough. Fuck everything to do with Java. We'll have to disagree. Go is a superb language in most ways to me. Relatively speaking. When it comes to network programming, concurrency, and sites, I'll never touch C++ anymore.

I sympathize with your fears in general but that shit just isn't a big deal with this language. Google isn't going to do a .NET style lock in with Go. Not going to happen. Not to mention that's completely antithetical to their developer-side business model of supporting open languages in use. A hard fork would happen. Anything fishy would be stripped out, which is easy to do because the stdlib is easy to read (another benefit of the language).

Fair enough, I'm sure we're imagining different uses. In particular I'm biased towards something functional. I need to go to bed but would advise at least not making Go your only language and also to seek out some niche area that you can master.

Agreed. It's good to know the basics like C and C++, which I do. Go solves about 99% of the major headaches I dealt with in C++ and I love it. At the same time I'm cautious/reluctant about Google's dominance in other areas so I understand the concern. But look into the history of Go and you'll see it's essentially independent other than being born from Google itself wanting a safe & easy concurrency language they could rely on.

wow are we in a sports bar? i need to put on a hazmat suit
Stopped reading there.
Confirmed for retard who bought into the "safe language" meme.
Meanwhile, I already knew about 10 languages that are guaranteed to be memory-safe (unlike Go, which breaks down under concurrency, because Rob Pike said so).

Go is memory-safe and sane, and a lot faster now since the major GC update. I doubt you'll name anything reasonable worth switching to.

What super amazing non meme safe languages do you use?

What types of software do you write in them?

i don't care about your life. make an argument for the alternative or stop talking shit

No it isn't. Do you even know your own fucking language?
[en.wikipedia.org/wiki/Go_(programming_language)#Lack_of_race_condition_safety]
No other memory safe language is broken like this. It's hilariously ironic that Gotards shill Go as if it's the only memory-safe language in existence, yet it's not even memory-safe.
yes, that's the whole point. memory-safe means there's no edge case where you can fuck up your code to accidentally do crazy shit. seeing as you didn't even know your pet language has this problem, it's clearly a problem that unsuspecting retards like you will hit.

many wow

I wont, because I already have 10 languages that provide what I need, except they all do the same thing, so I'd be better off with only 1, not 11.
Java, Haskell, Python, Perl, PHP, C#, SML, Bash, JS
there are no non-meme languages. there are only ones that lots of shit is written in, and new ones that have no purpose
An OS, a programming language, a game, about 10 other projects I'm not going to list


The point was that nobody competent wants to learn a new language (especially one that doesn't provide any advantage over the already established 10).

>en.wikipedia.org/wiki/Go_(programming_language)#Lack_of_race_condition_safety
What are channels?

Post links to your OS and haskell code. Nobody competent gets so buttflustered over learning a new language that has some clear benefits for a lot of applications.

Really? That's all you've got. That's what's got you in a tizzy? Mountains out of molehills.

Facepalm. You don't have a clue probably because you haven't actually used Go much or at all. Go is memory-safe realistically if you're not an idiot.


Yes, many wow.

I thought I may pop onto 8/tech/ again but then I remembered why I don't go here anymore.
says the mr incompetent that couldn't learn go.

Am I in middle school?

Making "only use channels ever" into dogma doesn't make your language memory-safe. That's like saying C++ would be memory-safe if people made "only use smart pointers" into official dogma. memory-safe has a clear definition: no operation you can do can cause unrelated variables to be read/written, aside from when you use a clear switch such as calling native code, or pointer notation in C#, or unsafeX in Haskell, etc. You could argue that sharing a variable is a clear switch that disables memory-safety, and thus Go is memorry-safe, but Go just sounds retarded at that point.

Calling Go "safe" is fucking stupid, because the thousands of typical languages that existed before it were strictly safer. Next meme please.

No it doesn't. Go is literally nothing new. Literally Java 1.4 and Algol circa 10,20,30 years ago had everything Go has.


I didn't even claim there's anything good about any of those languages. Go is in my list of languages too (unfortunately).

this is exactly what C++fags claim about C++. this meme needs to end. I highly doubt all 3 of you retards who replied to me knew that Go isn't memory-safe if you don't synchronize properly.
So what, your code always synchronized correctly? Most people I know can't say the same. If you only ever use channels, you're safe, but then you're only using a subset of Go.


Learning new languages doesn't make you competent. Millions of trendy hipsters in California do it every day and roll out new garbage products. Aside from that I probably know more Go than anyone in this thread, so fuck off.


wow this

I switched from C and C++ to Go for 90% of what I do now. I doubt anyone using C++ would claim it's "safe." However, C++11+ has a lot of safety in it now, such as safe pointers.

Meanwhile, Go is safe. It's my experience that most people using Go (the community at large) are smart and have an actual interest in computer science. If anyone's using variables in a non-safe manner, their code is caught very quickly by others who help to say what's proper. Go's race detector is excellent as well.


That probability is very low.

...

...Now that you mention it. The song is growing on me.

It's the language for the lazy. Go makes it so easy to write good code, but also really easy to write bad code. It's less work now, but it turns into a monstrosity later. It's a lot like dynamic languages in that respect.

Plus it has a really neutered type system, in my opinion

Literally how. Can't make any worse code than professional AbstractBeanFactoryFactoryJavaProgrammers, let alone newbie ones.

How does having a sensible feature set make you write worse code?

tbh, why not just stay there? i bet you've never even read sicp faggot.

Everything just becomes `interface{}` with type assertions up the ass

Yes, it's "safe" but only at runtime

Meanwhile, standard shitty languages like C# and Java are strictly safer than Go, yet nobody goes around shilling them as Safe. Also Go came out a decade after them.

this

Learning Go atm and it's actually pretty fun. Thanks OP-san.

The only bad thing about Go is that it sucks for making libraries. Other code can not make calls into the Go-world so easily.

Rust is better, but it has a fuked syntax that takes more than Gos 3 hours to master.

You should be able to just export Go functions to be called by some C interface. I haven't messed with that yet, only the inverse (calling C from inside Go)

golang.org/cmd/cgo/#hdr-C_references_to_Go

Being able to strip off the saftey when needed and interact with non-Go code or the OS has been very fun for me given that it's very flexible.

You can write C code in Go programs, you can link C to Go programs, you can link Go to C programs, you can do some C-like things with the "unsafe" package. There may be more flexibility as well but that's all I've done so far and it's been nice to use. Inlining C is nice for reusing existing code, linking to C is useful for wrapping existing libraries, using unsafe has been useful for interacting with the OS or hardware while retaining Go features.

I think things like this have to be excused because there's nothing that can be done about it in any language that wants to be useful. You can't prevent bad people from writing bad code no matter what language.

There are times when the empty interface is useful and it should be in the language but it can obviously be misused by anyone writing in the language, the same is true for a lot of useful features in other languages but the only alternative is to remove those from the language in question, taking away from its usefulness.

What I mean is I don't think it's a fair criticism to say that a language is bad just because bad code can be written easily in it, inconsiderate programmers will always exists and abuse features but they shouldn't be able to spoil it for the rest of us by forcing people to restrict their languages.

Given that Go is still pretty young I wonder if this will become a non-issue as less experienced people eventually learn how to properly use the language. I'm not sure.

Video reminds me a lot of Hotline Miami.

The language has GC and associated issues (unreliable latency, massive memory bloat). Coupled with its huge binaries I don't see it having much of a future outside of replacing ruby. It doesn't seem to know what it wants to be.

"Huge binary sizes." That's bullshit based on years of outward changes before Go bootstrapped to start compiling itself with Go.

Go version 1.7beta2:

package mainimport ( "fmt")func main() { fmt.Println("Hello, World!")}

Executable: 1.7MB

Statically link a hello world in C. It will be "huge" too yet without garbage collection. Every Go executable comes with its stellar runtime. No fuss. Compare this to Java's need to install/package their malware/runtime, for instance. Go isn't in any dimension a problem unless you're trying to use an embedded system from the 80s.

it wants to be a walled garden controlled by Alphabet, and it seems to be doing that pretty well.

I take your point that it doesn't know how it could be *useful*, of course.

Go is on a trajectory (like C was/is) of becoming the opposite of a walled garden. You know not what you speak of. There are 99 reasons to distrust Alphabet but Go isn't one.

even Rob Pike, one of Go's creators, says the binary sizes are an issue
don't pretend they aren't
github.com/golang/go/issues/6853

That's a much more fair point. I'd say most projects don't need the precision of something like C and Go can be a nice choice for those kinds of projects much like any other language can be. I personally would like to see it replace things like Ruby or Python. Before Go I would say the same thing but without a better alternative.

For what it's worth they've been making and still are making improvements to the compiler to try and reduce binary size, and improvements to the garbage collector to reduce latency.


Go can also be dynamically linked if people really need that. It's been able to do that from the beginning with gcc and now the Go compiler can do it too.

I'm aware. And they aren't. Pike was concerned about the trending *increase* which is what I alluded to. The trend is now decreasing.

Russ is.

One of the big projects I follow "IPFS" is written in Go, for Go 1.6 the binary size was 26.9MB, Go 1.7 beta has it down to 22.2MB.
Stripping the 1.7 binary gets it down to 15MB and using UPX it goes to 4.25MB.

There's obviously room for improvement but it's not like they aren't making those improvements.

You _can_ write bad code in any language, but some languages make it much easier than others. Further, some languages really encourage good interfaces, whereas some don't really encourage it as much. I think in part I've just been so spoiled by Rust's type system that everything else is lackluster by comparison.


Honestly the size of binaries is almost /never/ the limiting factor in design decisions. I don't see why people care so much about that. Plus, even with C there are a lot of variables with which C library you use, and what linking model you use.

Yep. It's only "huge" if tied to a very old system.

Consider the following. Write a "full"/modern program using concurrency and a (very good) net library or http serving. Doing it in Go using the std lib and/or something like fasthttp == a binary size small as fuck compared to the alternatives in C that would require threading libraries and Apache or NGINX and a whole lot of risk if you're not good. So what the fuck. Pike was concerned about not wanting bloat. Great thing to be concerned about but it's not the same thing as thinking the size is unusably large.

Amuse me, what is small as fuck to you, and are you counting the total size of the libs and runtimes you're using?

confirmed for userland kiddie

You _have_ to use interface{} in Go all the time (unless you rewrite the same code 10 times but with different types). In languages with type polymorphism (which existed even before Go was conceived), it's easily avoided.
well memed


You just had to get that meme in there.
$ diff -u4 go_memes.old go_memes--- go_memes.old+++ go_memes@@ -1,4 +1,5 @@ type safe single binary concurrency simple+bootstrapped

note: not trying to shill Java, just pointing out that Gophers can't even explain why their sacred language is better than even that shit tier language


probably because Go's compiler doesn't optimize fuck all. >inb4 muh LTO muh loop unrolling


It's almost like people would rather use Java or PHP instead of C for making a web application.

You contradicted yourself so damn fast