[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 188 KB, 1294x912, 1475390927711.png [View same] [iqdb] [saucenao] [google]
11443828 No.11443828 [Reply] [Original]

CS hate thread

>> No.11443839
File: 26 KB, 474x473, op is a faggot.jpg [View same] [iqdb] [saucenao] [google]
11443839

This is now a math majors (mathfags) hate thread
Disregard OP
Pic related

>> No.11443841
File: 35 KB, 694x732, Cn-r9scBWhfUbJdc4PEo3j0MTposWZZHGd46usvt17Q.jpg [View same] [iqdb] [saucenao] [google]
11443841

>> No.11443843

>>11443839
As a mathfag who came to this thread to talk shit about op, you've just made an enemy of me.

>> No.11443844
File: 72 KB, 680x422, mathfag are you winning.png [View same] [iqdb] [saucenao] [google]
11443844

>> No.11443849
File: 104 KB, 529x883, mathfags.png [View same] [iqdb] [saucenao] [google]
11443849

>> No.11443853

>>11443843
Why are so many mathfags autistic?
PS. Seethe

>> No.11443863

>>11443849
i swear I had this exact same proof as one of my homework problems once.

>> No.11443868

>>11443863
Cringe

>> No.11443882
File: 57 KB, 694x732, math btfo edit.jpg [View same] [iqdb] [saucenao] [google]
11443882

>>11443841

>> No.11443948

>>11443841
Okay, so I wrote this abomination in JS that finds the average of integers 1 through 5. I bent the rules a little bit and used two lambdas, but it works.

(() => {
var avg = (arr => {
var total = 0;

arr.forEach(num => {
total += num;
});

return total / arr.length;
})([1, 2, 3, 4, 5]);

console.log(avg)
})();

>> No.11443955

>>11443948
>JS
Like fucking clockwork

>> No.11443994

>>11443955
JavaScript is the most well-known scripting language on the planet. If someone tells you they know how to program, 9 times out of 10 that person is a JS coder.

>> No.11444003

>>11443839
this is something a cs fag would post. you do not disappoint brainlet

>> No.11444036

>>11443841
average x = (sum x) / (fromIntegral (length x))

>> No.11444046

>>11443948
What the fuck is all this bullshit?
const average = x => x.reduce((a, b) => a + b, 0) / x.length
is enough.

>> No.11444063

>>11443994
And thats why CS is a fucking joke.

>> No.11444483

>>11443948
disgusting code even for JS, this better be bait

>> No.11444837

>>11443841
x = lambda a: sum(a)/len(a)

>> No.11446156

>>11443828
Why does /sci/ hate on CS? I never understood that.

>>11443994
Incorrect. Java is the most used language.

>> No.11446262

>>11443828

> does a simulation
> I do not need your long exact calculations

>> No.11448165

sage desu

>> No.11448202

>>11443828
>pic
Please tell me those are trolls.

>> No.11448212
File: 175 KB, 643x732, africantechnology.jpg [View same] [iqdb] [saucenao] [google]
11448212

>> No.11448213

>>11443828
Literally self-teachable, anybody can learn to program any language with more or less hardship. CS is the foreign languages of STEM

>> No.11448228

>>11443839
MATLAB:
@ sex(x) mean(x);
Python:
sexy = lambda a: (sum(a)/length(a)

We don't deal with low-level GARBAGE here, son

>> No.11448232

>>11446156
>Why does /sci/ hate on CS? I never understood that.
Non-CS niggas coping after making the wrong decision.

>> No.11448235

>>11448228
>using lambda in python instead of list comprehension
CS undergrad detected.

>> No.11448253

>>11443828
Regarding the 1234 question, what's the right answer there?
Does 1234/100 avoid something that 1234*0.1*0.1 does wrong? Is 1234/100 different from 1234*0.01.
The 0.2+0.3!=0.5 issue haunts you even on Python or PHP, what's the way to solve it that doesn't require bulky lines of C++ type casting back and forth?

>> No.11448258

>>11444837
If the task is to use a lambda expression to find the mean, I wouldn't interpret the task of writing down a function, with a name, that's implemented with via a lambda.

Besides, of course, in Python lambdas are entirely discouraged. You can instantiate functions in every corner, even within other functions. Even in corner cases like
map(lambda n: n**2, range(10))
Python people are likely to encourage writing
def _squared(n):
return n**2
map(_squared, range(10))

>> No.11448264

>>11448253
Format strings.
It's also not a haunting issue that programming languages tell you the truth.

>>11448258
Nah, simply
[x**2 for x in range(10)]

>> No.11448271

>>11448264
The equivalent would be
(x**2 for x in range(10))
but you're right

>> No.11448311

>>11443828
People who hate CS are just brainlets coping with the fact that they can’t understand pointers

>> No.11448456
File: 43 KB, 600x578, 1548477367904.jpg [View same] [iqdb] [saucenao] [google]
11448456

>> No.11448478

>>11448311
No they're jealous math and physics majors who are jealous at CSfags having instant employment after their degree and end up making twice as much as them.

>> No.11448584
File: 6 KB, 294x204, avr.png [View same] [iqdb] [saucenao] [google]
11448584

>>11443948
Don't shit on JS if you don't know JS. Here's how to do it properly:

Array.prototype.avr = function() {
return (()=>{
let c = 0;
for (i=0;i<this.length;i++){
c+=this[i];
}
return c/this.length;
})();
}

const list = [1, 2, 3, 4, 5, 9, 10];
console.log(list.avr());

Although, you do have a point. Couldn't even use a lambda function as prototype for some reason, had to return an anonymous function for no reason. Anyone know why lambda functions aren't supported in prototypes?

>> No.11448602

>>11448235
>Not following the original question
B student detected

>> No.11448615

>>11448602
>making up a non-existent question and diverting attention
Professor detected.

>> No.11448644

>>11448584
>Anyone know why lambda functions aren't supported in prototypes?
https://stackoverflow.com/questions/34361379/are-arrow-functions-and-functions-equivalent-exchangeable

>> No.11448646
File: 14 KB, 235x369, 2427dba089389fb1f272fd46b9c4e3b2.jpg [View same] [iqdb] [saucenao] [google]
11448646

>>11443828
>Why the fuck would someone take statistics for artificial intelligence?

>> No.11448658

>>11443841
You mean
>Answer: lambda list: get_average(list)
Never underestimate the stupidity of CS tards.

>> No.11448665

>>11443948
Use reduce instead of forEach if you must.

function average(arr) {
return (arr.length > 0)
? arr.reduce((acc, n) => acc + n, 0) / arr.length
: 0;
}

>> No.11448671

>>11448658
What's wrong with that answer? The question is testing your knowledge of how to implement lambda functions, not your knowledge that the mean is the sum of values divided by the number of values

>> No.11448682
File: 105 KB, 444x464, 1537684966815.jpg [View same] [iqdb] [saucenao] [google]
11448682

>>11448212
okay, that's epic

>> No.11448688
File: 47 KB, 414x533, 86CC8F41-C7CA-45F1-8895-923E3F9986A7.jpg [View same] [iqdb] [saucenao] [google]
11448688

>>11443828
One needs only to take a passing glance at probabilistic algorithms / constructible measure, any modern complexity research (communication complexity and applications or nullstellensatz come to mind), analytic combinatorics, manifold applications / constructive charts, or other such research to ascertain that CS is in fact not a meme.
If you, as a math major, aren’t aware of where the math you study is being used or studied in higher academia, that’s a failing on your part
t. TCS grad, former math undergrad

>> No.11448747

>>11448311
>>11448478
Not exactly. This board has an unreasonable fixation on anything labelled CS, yes, but CS majors here are quickly approaching EE levels of unwarranted self importance. Software dev isn’t bad, but there’s a huge difference between software dev. vs software engineering vs. computer science. The latter two are fine, but most people who talk about “CS” are advocating for literal codemonkey. Barely anyone here even talks about the latter two. For example, Carmack’s use of binary space partitioning in Doom and similar rendering methods hits topics from both engineering and from CS.

If you try and bring up any actual CS topic like complexity, the codemonkeys scoff at you because >muh paycheck and the other math majors generally don’t gain any familiarity with it until much later. In that regard, people are justified in scoffing at you, undergrads who think >muh pointer arithmetic and salary are the reason people don’t like “CS.” It’s more than every mention of CS is actually a mention for codemonkeying while trying to appeal to a legitimate subfield of mathematics.

>> No.11448760

>>11443849
>equivalence relations
Rare case of something being invaluable in use and easy to understand. That being said, you wouldn’t believe how many people I know who have been slain by basic quotient spaces / rings.

>> No.11449939

>>11443841

int[] listOfNumbers = { 10, 10, 11, 11 };
var output = listOfNumbers.Average();
return output;

>> No.11449943

Industry destroyed the public image of CS as it did the rest of academia.

>> No.11449950

>>11443839
>mathfag hate
As a CS fag I don't hate mathfags, they are usually fine. Its people who don't know math or CS that think CS is a fucking meme because they saw some 1st year pajeet hack a program together

>> No.11449953

>>11448311
pointers are not hard to understand, most instructors are terrible at teaching them

>> No.11449954

>>11449953
>>11448311
if you didn't know what pointers are and how to use them before you even begun your CS degree, then you shouldn't be there

>> No.11449962
File: 96 KB, 500x647, 1359400655208.jpg [View same] [iqdb] [saucenao] [google]
11449962

BENIS :DDDDD

>> No.11452122

>>11449943
This
>>11448688
>B-but this wasn’t my intro to brongrammin class! CS only needs calc 2!
The major might be fucked at some schools but there’s a reason why it gets some of the largest NSF grants aside from medical research (though even then, lots of applied CS *does* show up in medical research: computational medicine comes to mind)

>> No.11452567

>>11443844
wow maths is equivalent to fucking pussy. Always knew I was a math chad.