[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Go is a good programming lan-

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 62
Thread images: 3

File: deadlock.png (861KB, 1597x898px) Image search: [Google]
deadlock.png
861KB, 1597x898px
Go is a good programming lan-
>>
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
if err != nil {
fmt.Println(err)
}
>>
You're supposed to be using streams faglord
>>
deadlocked
>>
>>61615382
The reason I hate this fucking language. No generics means boilerplate EVERYWHERE.
>>
>>61615426
>generics
you are so fucking stupid you are an insult to human kind.
>>
Nice tweet OP, hilarious, followed
>>
Do you use any of the mods with st? I hate the no paging, faggot devs. No I don't want to learn tmux
>>
>>61615452
Excellent argument, really activates my almonds.
>>
>>61615426
pls don't write go, code monkeys coming from java are not appreciated.
https://groups.google.com/forum/#!topic/golang-nuts/hQiZsd1ZRdA
>>
>>61615475
go shit in your designated street you fucking unoriginal piece of shit.
>>
>>61615467
suck it up and learn the right tool for the job.
>>
>>61615479
pls fuck off - if you think it's okay to force programmers to type the same fucking lines over and over again because manually checking errors is SO 31337, go write COBOL, fuck off, and provide something that doesn't insult my time.

Fuck the forced error checking, fuck the lack of exceptions, fuck the massive binaries, fuck the (((google))) backing, fuck Go.
>>
>>61615351
>i have two threads and sometimes they run at different speeds
really activates your almonds
>>
>>61615467
I have it open tmux for every window. I hate tmux too but st is pretty much the sanest terminal unless you're going for Konsole or Gnome terminal. urxvt is just a pain in the ass and xterm doesn't support alpha which doesn't look good on a tiling wm.

I use alpha, scrollback and copy/paste patches.
http://st.suckless.org/patches/
>>
>>61615531
Except when they both stop running after half a second. This last set of 1's is just because the second thread had stopped already.
>>
>>61615529
>stopped another code monkey from using Go
i call it a day.
>>
>>61615426
>>61615479
>pls don't write go
I want to add to this. Please don't write anything if you don't know how to handle errors, the patterns Go enforces should be in projects of other languages anyway, if not, I have bad news, you're writing shit.
>why check return values when I could just assume everything was fine?
>why design my own error handling system or use a library for it when I could just ignore erroneous code paths and data? This isn't my first fizz-buzz kid...

>>61615529
They literally have an article aimed at beginners who don't know how to program. People like you.
https://blog.golang.org/errors-are-values

Do you just default and brute force every problem, even outside of Go? The only people I see complaining about Go ever are actual shitters. Please learn to program, every complaint people have with Go is just something you should be doing in other languages anyway but it's not enforced there, that doesn't mkae Go bad or your language bad, it makes you a shitty programmer. I'll say it again, I'm fucking baffled that people are mad they have to handle errors properly, like that's seriously a fucking argument, the fastest way to out yourself.
>>
>>61615551
You didn't stop shit, anon - I've no desire to write overly bureaucratic shit like Go or Java.
>>
>>61615526
I don't need tmux capabilities all the time, nor do I want to remember i3 keys and vim keys and tnux keys constantly, especially just to scroll back 1 page or whatever
>>
>>61615582
try tilix
>>
>>61615580
> patterns Go enforces should be in projects of other languages anyway

They're called EXCEPTIONS and every language worth a fucking shit has them.

"Let's do an if { }block after every single fucking function call!" said the retard.
>>
>>61615582
with the scrollback patch you can use alt+pgup and alt+pgdown, there's also another patch you can add on top of that to scroll using the mouse wheel but after a few patches it just becomes a mess very fast.
>>
>>61615580
If you don't handle an exception your program blows up. So hard.
>>
>>61615614
mfw /g/ praises c when it literally has the equiv. of if err != nil (if result == NULL)
>>
>>61615615
Yeah I use the scroll back, actually I just use a fork called xst in the AUR. I like it
>>
C is a good programming lan-

#include <studio.h>

int main ( int argc , char* *argv){
printf("ohayou ^.^\n");
return ( 0 );
}

>fatal error
>>
>>61615631
Nobody should be writing C in 2017 either.
>>
>>61615614
exceptions are exceptionally bad idea. even google doesn't use them.

https://google.github.io/styleguide/cppguide.html#Exceptions
>>
Why was Go made anyway?
>>
>>61615643
kek
>>
>>61615648
go back to writing java please
>>
>>61615655
..in C++, which makes sense, because C++ exceptions are shockingly, cripplingly, mind-blowingly stupid.

http://yosefk.com/c++fqa/exceptions.html
>>
>>61615661
Isn't the idea to be just c with packages?
Seems like a neat idea, I could see why s companies with a shit load of code would make it / want to use it
>>
>>61615661
because C++ is a clusterfuck that takes centuries to master, only a few people know C++.

you can start being productive in Go in a week tops
>>
>>61615686
Go back to pooing in the loo please.
>>
>>61615614
>Let's do an if { }block after every single fucking function call
You actually have no idea how to work with data, if you have this complaint with errors I gaurantee your programs are poorly formed even in relation to things that are not errors, you can't figure out how to solve this thing that isn't even a problem, something that has who articles written about it, you can't figure it out, and you expect me to believe you know how to write anything of value. I'll ask again, do you just brute force every other problem you encounter? You write shit, there's no contest here, you're outing yourself.

>EXCEPTIONS
0 difference, the ironic thing is that the linked article shows you how to implement something that works just like them. At least in Go they're not built in, the practices I see with exceptions is truly horrific
>giant catch all that doesn't handle shit, it just passes on the error
Good job. I don't trust you kids today, you should be forced to handle all errors not just whatever you feel like.
>>
>>61615721
haha ebin joke my fren :DDD indians use go and white men write java am i rite
>>
>>61615614
options bitch, rust wins again
>>
>>61615351
>Go
kek
>>
>>61615741
Rust has good concepts, it's too bad the syntax is ugly and I would never trust modern Mozilla to not fuck it up somehow. May as well be dead in the water. At least with Go I can trust Google isn't going anywhere and will maintain this shit.
>>
>>61615721
>>61615738
Every fucking language is considered pajeet on this board. Honestly what language isn't pajeet?
>>
>>61615728
You don't get me you dumb nigger, the problem is that you're forced to do if err {} checks in areas where you literally do not care (or explicitly throw away the return value with _). This means that these checks litter your code like fucking kudzu where in 90% of the cases an error means your program should die anyways (and it will in most sane languages)

Where in any other language that wasn't designed by (((Google))) committee, if I care if a function call blows up, I put it in a try/catch. But that's my choice at the end of the day, because it's my code.
>>
>>61615767
literally only c. fucking neckbeards
>>
>>61615767
I have a theory that js dudes makes new frameworks to keep the pajeets out
>>
>>61615767
the more mainstream it is, the more pajeet language.

because they don't program out of joy or curiosity, they are true code monkeys with zero creativity and shitty code.
>>
>>61615773
>you're forced to do if err {} checks
I can't tell if you're serious or not, that's legitimately not true. Read that article before I fucking kill myself out of frustration with your inability to handle returns, as someone else pointed out it's no different than handling errors in C or most other languages without an explicit error type, the only difference is that Go has multiple returns and an explicit error type, that's it, that's the only difference. Nobody complains about error handling in other languages though for 2 reasons, you either know how to handle them correctly, or you just don't handle them because you're ignorant, Go forces you to think about it which upsets the latter group. I'm sorry but it's time to learn good habits and concepts so your shit doesn't fail in unexpected ways.

Your whole argument is the same as everyone else on this topic
>I only know one way to handle this and I don't like it, that must be the only way to do it
Literally what. You people are so stupid, I'm not even defending Go here I'm just extremely pissed of that people in 2017 don't know how to handle errors without exceptions, when it's covered in every fucking book for every language and every lecture should have time dedicated to this. If you can't handle something that equates to an enum string errno int pair how can you be expected to handle ANY datatypes properly. I'm going to fucking throw up at the idea of your verbose as fuck projects because you don't know how to handle data processing efficiently so you just write the simplest most brute force way possible. Disgusting, holy shit I need a fucking bucket. Please never write anything ever again.
>>
>>61615807
top kek
>>
>>61615773
>the problem is that you're forced to do if err {} checks in areas where you literally do not care
wtf? you have no idea about Go, better shut up.
>>
>>61615890
>I'm going to fucking throw up at the idea of your verbose as fuck projects because you don't know how to handle data processing efficiently
Somebody post the graduate image of the guy parsing input to find out if it's a number or a string.

>this is the only way I know how to parse strings, it must be the only way
>>
>>61615767
C, Forth, Lisp
>>
File: Vqr4p1E.png (116KB, 1515x663px) Image search: [Google]
Vqr4p1E.png
116KB, 1515x663px
>>61615964
>>
>>61616004
>Lisp
seconded, they are too dumb to code in lisp.
>>
>>61615741
options are a great concept (especially used as monads), but they require generics which go does not have

-----
go seems very divisive, at least on /g/, but you have to look at the language knowing that the creators sought to make a simple, easy to learn, yet powerful language. Sure, it is very opinionated, and seems limited and does not seem very advanced compared to other languages. But it is incredibly easy to pickup and be very productive with - there's generally one accepted way to do things, and you're not going about trying to figure out the best way to accomplish a task out of 50 (javascript...). Like a few hours for any good programmer to learn from scratch and be able to start to produce something non-trivial.
That's what's great about it.
>>
>>61616022
superior programmer coming through
import re
instr = input()
if (re.match('\d', instr):
print("NUMBER")
elif (re.match('\w',instr):
print("WORD")
>>
>>61616071
Pretend there's another bracket at the end of the if statements
>>
>>61616069
I tried to do some work with a sqlite DB using it and it was painful. The documentation was terrible
>>
>>61616089
python ifs don't need those outer parens
>>
>>61616105
well.. yea you are at the mercy of using libraries a lot which can be hit or miss
>>
>>61616172
>implying a lot of stupid language design decisions don't result in a lot of stupid programs
>>
>>61615767
Haskell
>>
>>61615767
English
Thread posts: 62
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.