>>68793801Is this a criticism of the language or a criticism of poor use of the language? Because golang's error handling is pretty great albeit too vebose.
>>68793873Its a criticism of the language, but a bad and unfunny one
MUMMYYYYYYYYYYY I DON'T LIKE HANDLING "ERRORS" I PREFER TO JUST CRASH WITH AN UNHANDLED EXCEPTION BECAUSE A CONFIG FILE DOESN'T EXIST
>>68793801>humourI'm laughing already
>>68794722Found the Americlap
>>68793991 .DeepEqual() what
>>68794709>gophers actually believe their error handling and exceptions are the only two ways to do it
>>68794709>programming in such a way that even requires handling errorswhat a pleb, real men dont have any errors in their programs
>>68794709>gopher forgets to handle a non-nil error>compiler happily ignores it as wellwow it's shit
>>68794709My errors are implicitly handled, Haskell 4 lif
>>68797124>they look uglyWhat did he mean by this?
>>68797217he is autistic
>>68797217>look at me I'm a math guy I write a lambda expression instead of a noob loop
>>68798209C is the fastest, most power-efficient, nearly the smallest memory too.
>>68797124I will never understand choosing brevity over readability, unless it is also usefully more efficient.
>>68798191t. el ogro de las americas
>>68795450>>68798395I love this memes so much xDLA ABOMINACIONA DEL CREATURA DISTURBATORhttps://invidio.us/watch?v=Rj4s7ye8eGQ
>>68797130this shit is incorrect. number zero is neither odd nor even.
>>68799079that's handled inside the 'is-even' lib
>>68799079Zero is even, you absolute retard. Even the first sentence of a fucking Wikipedia article on parity of zero states this.
>>68799079>you must be over 18 to post on this website
>>68799150why are you using greentext as a way to quote...?
>>687990790 is even bro.it is divisible by 2? check.odd numbers are not divisible by 2.since it is an integer and it is not odd, it must be even. QED
>>68797130>2 contributorsthat is the best partwhat the fuck
But the code sample in the OP is good. That's C-like syntax but with multi-valued returns (which is great for error handling).
>>68799545>>68799545if an error actually occured why would it always return nil in the second argumen?
>>68799150who are you quoting?
>>68799555To indicate that no error occurred? Same reason malloc () returns NULL when it fails
>>68799555>>68799589Whoops, misread what you said. If an error did occur, then it wouldn't return nil, that's the point.
>>68799079N is even iff N mod 2 = 0 //definition of evenN mod 2 = 0 //it is indeed even
>>68796532Lol, really captures /g/ in a nutshell
>>68798318>C programmer is a uneducated manual worker
>>68799079>all those replies
>>68799674>I was merely pretending to be retarded
>>68799698Who is more retarded here: the person obviously baiting with obvious bait or those who are too low IQ to realize that's bait?
Guys I need some sock buying advice, what should I keep in mind?
>>68793991What the fuck is this even supposed to do
>>68799621that's not the definition of even you code-camp subhuman faggotthe definition is:An integer n is even iff there exists an integer k such that n = 2k
An integer n is even iff there exists an integer k such that n = 2k
>>688001550 = 2*0
>>68800138I don't know Go, but if I had to guess I would say it's a contains function for a container of generic types. The reflection is only necessary if you have polymorphic items in the container.
>>68800180congratulations, now you are as smart as a 3rd grader.
>>68800155k = 0. k ∈ Integers.0 = 2 * k.Thus,0 ∈ Evens.Do you even fucking math
>>68800240Are you trying to put me down for trying to explain 3rd grade math to someone else?
>>68799584fucking kek this is pajeet
>>68800155Also, you clearly don't understand the definition of modulo, either:x mod y = z is the same as saying x = yn+z, so the two forms are mathematically equivalent.x=0, y=2, z=0 --> 0 = 2*n+0This is solvable, so 0 is even.
>>68799600if an error actually occured your computer would crash, returning NULL is not an error, that is correct behaviour if it couldnt do it.
>>68800155That's the same definition with a slightly different wording, mouthbreather
>>68793801What a comfy syntax
>>68793801>humourFinally, a quality thread.
>>68799715>there are no dumb people on the internet
>>68800155literally means the same thing
>>68799079>I watched numberphile video on it I know what I'm talking about
>>68793801I get that Go is a pointless language but how is its style of error handling a problem at all? It's the exact same thing as guard clauses.
>>68799650>others are cartoon characters, 2D is superior Weeb
>>68798233>ask stackoverflow for python help>get a bunch of retarded lambda code golf answers
>>68801810I get that haskell and other functional programming languages are unnecessarily obtuse, but you should definitely learn some basic functional programming language concepts like map, filter, bind and fold if you want to consider yourself a good programmer.
>>68801986Nani the fuck?
>>68802020left image is from google
>>68801898e n t e r p r i s e q u a l i t y
>>688001550 == n (mod2)<=>2 divides 0-nAka where n = 0, n is an even number.
you could just take the curly bracket to a newline from the if statement and you can call it retardrd amyway
>>68801942I always get angry at that shit, saw some master theses and youtube channel both saying they used deep learning. In the end they just used a tree almost completely ignoring other possibilites and gravitating towards the current steps best possibility. Most of the time self written algos would have been better.
>>68802046Anime fags are mentally ill. Period.
>>68802163Is it CIA or NSA?I feel like some people doesn't know the difference
>>68801194Proper guard clauses force you to handle all the cases.
>>68801898Lets abstract everything away so those vendor specific classes won't hurt our FUCKING feelings.
>>68801923boost is cancer
>>68802007>Not using (void*) for C GenericsPathetic.
I would take Go error handling over a lot of the shit that you see in C++. In a non garbage collected language exceptions unwind the stack without freeing memory (If they fuck it up, which they do often), so even if you catch your exceptions you still leak memory. The biggest fuckup in Go was on top of C style value based error checking they added panic and recover, which are the worst fucking part of exceptions.
>>68801874>he thinks zipWith is obtuse>he thinks lenses are obtuse
>>68803405Announcing sages hasn't always been a bannable offense, and in fact all sages were visible. Sage was meant as a tool to mark your own post as not worthy of bumping a thread. Then retards started using it as a downvote and it lost its original purpose, leading to our current situation.
>>68794688My favorite language is go I've written quite a bit of go code in the last year, but in reality the error handling is pretty scuffed imo. Like I get the reasons behind it but dragging along a shit ton of errors all the time sucks.
>>68797130This asshat has like a masterful response on a reddit thread torching him where he just looked super fuckin retarded... I'll see if I can dig up the thread..
>>68798452yui is my wife
>>68796532I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.
>>68801971Where did you get this? Post moar.
>>68802293back when /g/ was good
>>68804606I actually worked at Google for awhile and one of my side-tasks was to help integrate a ton of C++ code from a third party in a way that was compatible with Google's C++ standards which included: No exceptions allowed anywhere, and full code coverage required for all new changes. I basically had to convert a bunch of code from functions from returning primitives to returning Go-style generic containers that contained both the primitives and the error status and manually passing and checking them all the way up the stack of a massive codebase that was not designed to be unit tested nor designed to have errors checked anywhere except the top (if that).Not fun.
>>68805527Why did you leave them?
>>68796532>2013>/g/ is still the exact same today
>>68805621Two main reasons:It was very bureaucratic. For example: I spent an entire quarter debating with people, many of whom were not even in the same office and had no stake in the outcome, about how to implement some change, because promotions were highly tied to contributions to design documents. I ended up writing and submitting the entire code in about a week, none of which was affected by anybody's comments.I was on a dead-end team in a dead-end role. I didn't want to do what the people ahead of me were doing. We had a three hour meeting one week among our extended team about how to improve morale and the only thing discussed was "How do I switch roles?" and "How do I switch teams without having to leave <city> office?" and nobody had an answer or wanted to answer.Tertiary reason: Sometimes it was a little cultish. People would unironically discuss what it meant to be "Googley."I quit without a job and am working on some personal projects. If none of them make me any money within another year I'll get another job (and I'll be more careful about which one I take), but I'm happy to have more freedom to pursue what interests me, even if I need to work a little harder and it bleeds into my life more.That being said, I would be open to working for them again in the future, just not in that particular role or department, or for my next job. Technically it's the least bad office job I've ever had, and I did have a lot of fun there for awhile, and I know a lot of people who had better experiences overall.
>>68795415>>68795425>>68795450>>68796505>>68798434 buttmad brits detected
>>68804518Is this a KDE diss?
>>68797124How is 'map' less idiomatic than 'forEach'? And yes, loops are slightly more efficient (assuming this is an interpreted language) but 'map' would result in easier to read code. Depending on the application, the trade off may be worth it.
>>68795616Probably something related to references vs values, I don't even go
>>68794722>>68795415>>68795450What is this referencing, as an amerifag I've never seen thisWait fuck the spelling. Who gives a shit?
>>68795484kek, but tries too hard
>>68796532This is the same person who made the spaceship RMS Gentoo pictures, their stuff is great. Where can I find more of it?
>>68799584MeSo excited to do it, add it to all the right flags and stuff before realizing I have no idea what it is
>>68801923I love when you get random problems like this with no google results. Like. How are you even supposed to debug something like this?
>>68801971I don't care about the first two panels, but the crazed look on chrome's face made me laugh
>>68795484That's still the Go mascot though
>>68801986>Canadian Aboriginal SyllabicsIt's actually a real thing, I thought it was a jokehttps://en.wikipedia.org/wiki/Canadian_Aboriginal_syllabicsThat's like trolling with the greek question mark, ;
>>68802007It technically is minimal. You only use one of those.
>>68802219This is actually a satisfying justification of Windows 8 and 10.Kek/10
>>68802228>password:>poopnuggettop fucking kek
>>68802228HOLY FUCKDistributing the ACTUAL Stallman rant over an emergency alert. I can't think of anything better. If anyone get's access to the presidential alert system, I hope they send that
Which one of you is this?
>>68793873I laughed and thought it was pretty spot-on. I mean I love go and advocate for it around the office but writing if err != nil can get exhausting. Beats the brakes off of try/catch though.
>>68806882It's retarded that JS effectively crowdsources their stdlib such that one needs literally a thousand transient deps to get basic work done. As for is-odd, no dev worth their salt should use it because the value-add here does not overcome the barrier of introducing further attack surface by adding yet another module I do don't control.
>>68801111is this real?
>>68799584What is the project?
>>68805905They'll meet an Islamic Truck of Peace soon enough.
>>68807318yeah but they have completely different goals
>>68795484Is that fucking 6502?
>>68808120Yes it is.
>>68805823Doesn't work on Ubuntu
>>68805999map in almost every language allocates a new array mapped to the specified type. For each just iterates through it. Unless you do something with the returned list/array it's retardedly inefficient.
>>68807218JS was never meant to be a general purpose languageit was thrown together specifically for silly website trinkets, and nothing morenow we have unreal engine ported to itwhatthefuck
>>68802573>proof: everyone who posts on 4chan
>>68808683I remember when this was madeoh we laughedthen it became real
>>68807039PC owned by a frogposter, I'll just assume it is covered in cum.
>>68806658>Unmagle the function name>Google undefined reference to>Stop being retarded
Literary just happened. Feels like a good thread to explain my retard of the year award, and you may have to be an actual retard to clutch it in the last month.Its been a while since my last build, my processor is an i3570k to give you an idea. My wife got 2 SSDs online for gifts. Since I run caseless, I plugged one in and downloaded CrystalDiskMark. Seq read was like 400 MB/s ( they were cheap SSDs, not a bad speed). I decide to run a test on mine, and Intel 520 which is supposed have over 500 MB/s . Its fucking 202 MB/s. After some quick troubleshooting, I find my SSD was plugged into a SATA 2.5 port instead of the SATA 3.0 port for the last who know how many years. My seq read now? 515.1 MB/s.All the wasted years, and I felt like I knew computers pretty well. Instead I'm pick related (male)(non-trap male).
>>68801898DELET THIS RIGHT NOW
>>68808683>check all applicable>radio buttons
>>68811737>Literary just happened.haha
>>68807039I once put up an ad on craigslist offering to sell my pepe foldersomeone actually messaged me too, that was pretty funny
>>68799079An even number x = 2k for some int Odd number y = 2k +10 = 2(0)
>>68811924Literally as in tonight. I've disassembled it a few times over the years, so I like to think it wasn't always like this, also my storage mechanical hard drive was plugged into a SATA 6.0 even though its a 7200.I feel so retard and happy at he same time, retarded for obvious reasons, and happy because I more doubled my SSD speed.
>>68812040Ah, the baby killer line of light switches
>>68794004got the full resolution?
>>68809246funny thing is choreography can in fact be copyrighted
>>68803054>compromising performanceWhy are you using C then?
>>68801986fuck i felt physically weak by reading this
>>68802046lomelli pls go
>>68805833How optimistic are you about your personal projects being profitable?
>>68813534right sounds like a nightmare.I'd take the virgin life over this gay AIDS-riddled shit.
>>68813534This is out of date, now he uses groff instead of LaTeX and st instead of urxvt.
>>68813633girl gamer tier
>>68813756thats not too bad, I'll take it.
Can someone please upload that meme with paint drawn /g/ traps in the basement?
>>68802163So Sassy-cat-pic was a file in a leak?
>>68813633'long' should be 'long long'
>>6881204450+ levels of hierarchy to execute a function, that's enterprise software for you.
>>68801986Emoji labels are like a baby to this.
>>68812557>tfw hold the patent for masturbation>one day I'll sue everyone
>>68813916Yes, I can do that.
>>68810064Any compiler worth using will optimize away the array that map returns if the result isn't used, so your point is kind of moot.
>>68794709>he neven used erlang/elixir
>>68806882>I wrote all this shit to break IEEE 754 compliance
>>68814743If the result isn't used any compiler worth using will optimize away the entire line.
>>68815274wait, the wrong one, eh, fuck it
>>68814743But map is idiomatically intended to map values of an array. This is how you abuse and ruin the point of functional programming.If you're that autistic about 4 extra letters just write your own function call it "itr" that behaves like a foreach.
>>68801898So that's what the $5,000,000 a year service contract is for...
>>68801942"deep learning" is just a buzzword like "green" or "cloud" or "IoT."
>>68815182>Sims 2: Japan Expansion Pack
>>68815771This is clearly in Korean
>>68815408that tfw when peeps leterally don't know Cuc OS X is Unix
>>68814722I would very much appreciate if you do so.