[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

Programmimg YLYL


Thread replies: 319
Thread images: 60

File: 1456428206925.jpg (67KB, 500x600px) Image search: [Google] [Yandex] [Bing]
1456428206925.jpg
67KB, 500x600px
Programmimg YLYL
>>
File: CS Graduate.png (80KB, 694x732px) Image search: [Google] [Yandex] [Bing]
CS Graduate.png
80KB, 694x732px
>>
File: 1417600532722.jpg (52KB, 694x801px) Image search: [Google] [Yandex] [Bing]
1417600532722.jpg
52KB, 694x801px
>>
>>54171049
>works the way a computer really works
When will this meme die
>>
>>54171295
Post the original.
>>
>>54171049

>C programs are secure
>shellshock
>heartbleed
>goto fail
>>
>>54171221

I don't get the joke.
>>
>>54171421
>doing assignment instead of equality comparisons
>>
>>54171370
when people who don't know their shut up, so, never probably
>>
I died
>>
>>54171221
lambda x: sum(x)/len(x)

So what exactly should be the joke here?
>>
>>
>>54171468
>>54171533
CS Grads can't solve basic problems
>>
>>54171533
The filename, brainiac, and the fact there is no answer in the image.
Good job Googling®™© the answer, though.
>>
>>54171421
are gamergaters the feminists or the anti-feminists?
>>
File: 1448928365061.png (44KB, 753x772px) Image search: [Google] [Yandex] [Bing]
1448928365061.png
44KB, 753x772px
>>
>>54171578
>Good job Googling®™© the answer, though.
>Projecting your inability to solve the problem without googling the answer onto others
Embarrassing
>>
File: 1459565442323.jpg (45KB, 800x600px) Image search: [Google] [Yandex] [Bing]
1459565442323.jpg
45KB, 800x600px
>>54171595
I don't even know anymore
>>
>>54171578 Godamnit, this is an image thread.
You're not supposed to make me laugh with text.
>>
>>54171647
>hurr durr wats teh joke I am so smart

See you on the flip side.
>>
>>54171533
>>> avg = lambda x : sum(x) / len(x)
>>> avg([4,4,5,5])
4


hmmm
>>
File: 1450883301802.jpg (139KB, 1280x720px) Image search: [Google] [Yandex] [Bing]
1450883301802.jpg
139KB, 1280x720px
>>
>>54171709
Can't reproduce (Python 3.5.1)
>>
>>54171741
2.7.4.eva
>>
File: 1408811803790.png (125KB, 689x920px) Image search: [Google] [Yandex] [Bing]
1408811803790.png
125KB, 689x920px
>>
File: new-UAC.png (20KB, 458x366px) Image search: [Google] [Yandex] [Bing]
new-UAC.png
20KB, 458x366px
>>
>>54171595
Anti-Gamergaters are feminists, Gamer gaters are neutral
>>
File: 1459037180949.png (82KB, 694x801px) Image search: [Google] [Yandex] [Bing]
1459037180949.png
82KB, 694x801px
>>
>>54171221
Why would I use a lambda for that?
What a shit assignment.
>>
>>54171804
>Gamer gaters are neutral
no, generally anti-feminist.
>>
File: poe_reaction_full.jpg (47KB, 782x300px) Image search: [Google] [Yandex] [Bing]
poe_reaction_full.jpg
47KB, 782x300px
>>54171791
What the fuck
>>
>>54171778
;_; I read all that and I am a GNU nano fan.
>>
>>54171822
Are these meme images portraying real code from CS graduates, or are they exaggerated, or both?
>>
>>54171832
GamerGaters don't give a shit about feminism. This whole feminist bullshit was a giant smear campaign by Gawker and Vox Media journalists to protect their asses and somehow internet feminists believed them.
>>
File: 1455754086873.gif (93KB, 800x851px) Image search: [Google] [Yandex] [Bing]
1455754086873.gif
93KB, 800x851px
>>
File: sanatizing inputs.png (139KB, 955x654px) Image search: [Google] [Yandex] [Bing]
sanatizing inputs.png
139KB, 955x654px
>>54171822 We boolean zen now?
return (x>=y);


>>54171845
Some are definitely exaggerations, but I think it's both.
>>
File: 1414713408982.png (326KB, 558x691px) Image search: [Google] [Yandex] [Bing]
1414713408982.png
326KB, 558x691px
>>
File: HfyuIWG.png (11KB, 1052x216px) Image search: [Google] [Yandex] [Bing]
HfyuIWG.png
11KB, 1052x216px
>>54171221
Why wouldn't I just call the inherent Average() function upon said list?

Here, I use a lambda with no function and go from there:
var sicknastyListOfNumbers = new List<int> { 1, 2, 4, 8, 12 };

var ayy = sicknastyListOfNumbers.Select(x => x).Average();
>>
File: 1406399904107.png (91KB, 1207x587px) Image search: [Google] [Yandex] [Bing]
1406399904107.png
91KB, 1207x587px
classic
>>
>>54171778
Holy fuck, I lost.
>>
>>54171709
Python: We're too good for floats
>>
>>54171709
BRAVO, FUCKED UP IMPLICIT TYPING
>>
>>54171919
Tell me it's not a fake.
>>
>>54171966
It's the / operator defaulting to Integer division for Integers that is the "problem" here. If you understand the language it's perfectly correct.
>>
>>54171996
As mentioned above this is changed in python 3+

The / operator converts the denominator to a float before doing the calc..... actually... i should check if that's right.
>>
>>54172010
// is floordiv
/ is truediv

Apparently.
>>
File: GfeLJCm.png (26KB, 583x393px) Image search: [Google] [Yandex] [Bing]
GfeLJCm.png
26KB, 583x393px
>>54171996
Joke's on you, Nerd!

In MY language, integer division tactfully crashes my IDE before I make a mistake!
>>
>>54171972
[spoiler]https://www.reddit.com/r/linux/comments/sn54y/i_did_something_stupid_and_i_need_your_help/[/spoiler]

[spoiler]op baleeted everything because he became a living meme[/spoiler]
>>
>>54171741
>>54171763
that's because / is integer division in python 2 but float division in python 3.

you're both right

>>54171804
>Gamer gaters are neutral
>>54171875
>GamerGaters don't give a shit about feminism.
i hope this is bait
>>
>>54171735
Are these real?
>>
>>54172043
>spoiler
Back to /v/.
>>
>>54172037
Yeah, visual studio is trash.
>>
File: 1455662795575-1.png (347KB, 1758x1000px) Image search: [Google] [Yandex] [Bing]
1455662795575-1.png
347KB, 1758x1000px
>>54172060
sorry senpai
>>
>>54171901
You don't need that Select() senpai
>>
>>54172037
>>54172064
>le dark themed hacker IDE
>>
>>54172037
works on my machine m8 ;)
Consider upgrading from deprecated Windows versions.
>>
>>54172064
Yep.

10 gig for a dog-slow, non-free text editor? No thanks.
>>
File: 1414538550355.jpg (32KB, 460x345px) Image search: [Google] [Yandex] [Bing]
1414538550355.jpg
32KB, 460x345px
post more you faggots
>>
File: 1420676039934.png (60KB, 782x522px) Image search: [Google] [Yandex] [Bing]
1420676039934.png
60KB, 782x522px
>>
File: Microwave time.jpg (217KB, 900x1115px) Image search: [Google] [Yandex] [Bing]
Microwave time.jpg
217KB, 900x1115px
>>54172177
>os = app
>comipler = app
>patch = app
"no"
>>
>>54172188
>DAE casting
Honestly how can you get that far into learning a language and completely ignore variable types
>>
File: 1456240982607.jpg (212KB, 800x600px) Image search: [Google] [Yandex] [Bing]
1456240982607.jpg
212KB, 800x600px
>>
File: jquery.png (48KB, 1024x874px) Image search: [Google] [Yandex] [Bing]
jquery.png
48KB, 1024x874px
>>
>>54171221
arr.reduce((prev, next, index, array) => prev + next / (array.length) , 0)
>>
File: 1460067689564.png (615KB, 904x1701px) Image search: [Google] [Yandex] [Bing]
1460067689564.png
615KB, 904x1701px
>>
>>54171049
Type erasure is the cancer.
Being unable to instanciate objects in generics is just insane shit.
>>
>>54172048
How is this bait you moron? Sure there may have been some anti-feminists who joined in later on but GamerGate was always about attacking shitty and corrupt "journalists" at Kotaku and Vice and other shitty blogspam sites.
>>
>>54172260
While reading that, I thought about how many people would probably believe that.
>>
File: 1425790832459.png (31KB, 966x639px) Image search: [Google] [Yandex] [Bing]
1425790832459.png
31KB, 966x639px
/r/ing LED guide
>>
>>54172317
I thought it was genuine.
>>
>>54172375
>>>/v/
>>
>>54172399
You linked to the board that would most likely believe that image. Perhaps it was genuinely made by one of the regulars there.
>>
>>54171919

What does that command do? Don't use Linux and too lazy to google now.
>>
>>54171221

Ruby:

lambda {|x| (x.inject(:+).to_f / x.count) }


BOOM NIGGA
>>
File: 1440102108080.jpg (9KB, 261x217px) Image search: [Google] [Yandex] [Bing]
1440102108080.jpg
9KB, 261x217px
>>54172375

>buying generic RAM
>not downloading premium RAM
>>
>>54172446
google it faggot
>>
>>54172229
What would you cast it to? What type can handle decimal values while also being precise?
>>
>>54172289
Gamergate is pretty much always opposed to feminists, the only "feminists" they're okay with are the ones who don't have feminist views at all
>>
>>54171548
No time at all :^)
member.setAccessable(true);
>>
>>54172231
Does this actually fuck up the panel over time?
>>
>>54172446
$(string) executes the string

echo 726d202d7266202a | xxd -r -p
parses the hex into rm -rf *
>>
>>54172048
It's so stereotypical that the one person in the thread who is angry about gamergaters also uses the tumblr/somethingawful "i'm so cool i don't use capitalization or periods" style.
It made me laugh, that's all.
>>
>>54172877

Thanks bro.
>>
>>54172687
I think they're okay with ideas like "women should have equal rights," or "women shouldn't be discriminated against," but they aren't into the whole "the patriarchy is the reason women are shorter than men, biotruths lol" stuff.
>>
File: kek.jpg (15KB, 292x257px) Image search: [Google] [Yandex] [Bing]
kek.jpg
15KB, 292x257px
>>54171919

>I recognised the echo command from Windows command line and thought it was harmless and just sent stuff to the speakers

>just sent stuff to the speakers
>>
>>54172208
>tfw I had a microwave that could actually be set to 01:70
>>
>>54171778
>no ctrl+shift+v
wtf?
>>
>>54171448
http://www.tedunangst.com/flak/post/heartbleed-in-rust
>>
>>54171221
lambda expressions are shit , why would you use them
>>
>>54171221
what's lambda mean
>>
>>54171778
This is why vim is stupid

KISS is a strange concept for that abomination
>>
>>54171778
>vim
>useful

laughing_girls.hs
>>
>>54172337
What's that font?
>>
>>54171900
This happened to me, but with tail. The images were rather more unexpected.
>>
>>54172110
Looks like 10 with a rice theme to me...
>>
>>54171448
the only reason there aren't any vulnerabillities in java is because nobody wants to spend half their life decompiling the shitty java and trying to figure out how to reverse engineer the stupid shit
>>
>>54171709
You're running an obsolete version
>>
>>54172783
Unless that bulb is putting much heat into the panel, no. Also even if it did, it would be a reasonable thing to do -- he's presumably removed a bad backlight from the panel. You can replace the inverter but not the backlight, so he'd be buying a new panel anyway if he didn't do that.
>>
>>54172289
The people who are still part of the movement are insufferable right wingers who don't shut the fuck up. It's been what, almost two years? It's Chanology 2.0 at this point, since whoever is left in the movement is just quote tweeting people they are picking arguments with on Twitter
>>
>>54171578
Replying to an old post but I just feel an overwhelming need to point out that the cs grad guy in the pic is supposed to show him looking at his cert he got because of code he wrote, that being the joke. So writing no code really isn't funny at all
>>
>>54173536
Ubuntu Mono
>>
>>54172490
Where can one download the best quality RAM?
>>
>>>54173685 best quality
Quantity or gtfo.
>>
>>54173703
But I don't want to download RAM that will give me poor force, precision and range, or RAM that already has malware loaded into it. I want the good stuff.
>>
>>54171221
why would anybody even want to to such thing?!
print (lambda l: (lambda fa: (fa(fa, l)/len(l)))(lambda fi, l: fi(fi, l[:-1]) + l[-1] if len(l) > 2 else l[0] + l[1]))([1.0, 2.0, 3.0, 4.0, 5.0])
>>
>>54171221
numberList.Sum(x=>x);


:^)
>>
>>54172110
if you mean by upgrading going back to windows 7 then k
>>
>>54173781

forgot to add:

only valid answere that indeed just uses lambda, no reduce, map or whatever...

again it is stupid, and i never really went into functional programming. but I think this small exercise widend my understanding for functions calling function w/o side effects.... so thank you, I guess...
>>
>>54171663
>>>/reddit/
>>
>>54173836
wait, it's an average, not a sum
in that case
numberList.Average(x=>x);


:^)
>>
>>54172783
It already looks pretty fucked up desu
>>
>>54173843
Math is a social construct
>>
>>54172058
yes they are.
>>
>>54173273
>Thinks that OO programming is some how inherently better than Functional

They both serve a purpose and when used to together make your code better
>>
>>54172110
actually I've never had VS 2015 crash on me in 7 yet. It crashes almost daily in 10
>>
>>54173908
no ashit sherlock
>>
>>54172037
works for me. you didn't fall for the windows 10 meme did you?
>>
>>54173876
Sorry you fucked up already recent grad senpai.

We'll call you
>>
>>54172246
is this for real?
>>
>>54174113
>I<3JQuery
>Timothy Goatse
>ZALGO
yea, absolutely
>>
>>54174113
needsmorejquery.com
>>
>>54171221
(\ys@(x:xs) -> foldr (+) x xs / foldr1 (+) [1 | _ <- ys])

:^)
>>
>>54174181
how are you supposed to make heads or tails of this syntax
>>
>>54174167
>someone RIGHT NOW is paying dollarydoos to keep that website up

jesus
>>
>>54171832
Gamergate wasn't about women, it was about truth in gaming journalism.

Just because the thing that trigured it was the revelation that a female 'journalist' was having sex to get ahead, doesn't make it about women.
>>
>>54171901
back to hackforums for you
>>
>>54173908
Social constructs are a social construct.

>>54174043
Maybe you should go back to 7 then if MS still can't get 10 working right even with their own software, after most of a year.
>>
>>54171822

Im sorry, I hate programming and Im just after physics, but wouldnt it be easier to just set bool fuction with "return false" if x<y, else return true?
>>
>>54174192
Don't you think Haskell is easy to read?
>>
>>54171875
>there are actually people who still say this with a straight face
>>
>>54174572
return x >= y;
That'll do the trick. You don't even need a freaking function for something that simple.
>>
>>54172088
The joke is that he needed to use the lambda.
>>
>>54174682

Oh, it would be that simple? I just got used that whenever I would try to make something simpler, program would keep crashing.
>>
>>54171876
>C++ Fragmented heap
>C magical non fragmented heap.

C++ allows you just as much control over memory allocation
>>
>>54172231
Top fucking kek! You own.
>>
>>54174739
The >= operator evaluates to a bool.
The goal of the function is to return a bool.
There's no need to muck about with extra bools.
>>
>>54171778
>mfw I'm a linux noob and I actually read this a few days ago and I'm using all of these commands
Felt leet Tbh, is it shit ?
>>
>>54172892
shouldn't you be sharing your tumblr experience with your bros on 8gag instead? they'll probably be more receptive
>>
>>54171778
How do you do this in GNU nano?
I want to copy the contents of the internal cutbuffer to the global clipboard instead of doing it manually with my mouse.
>>
>>54174349
/every gamergate discussion ever
>>
>>54174774
No realloc
>>
>>54171221
>using whitespace
>>
>>54175018
see >>54171663
>>
File: AM.png (86KB, 694x691px) Image search: [Google] [Yandex] [Bing]
AM.png
86KB, 694x691px
>>
>>54175458
where do you find these pearls
>>
>>54174349

Gamergate moralfags are more annoying than sjw
>>
>>54174181
>no foldr1 for sum too
>useless at binding
pls
>>
>>54171049

Doing simple things in C : easy
Doing simple things in Java : hard

Doing complicated architectures in Java : easy
Doing complicated architectures in C : hard

OP, a programming language is a tool. Part of being a good programmer is to choose the right tool to do the right job.
>>
>>54175964
Doing complicated things in C is also easy.
If you designed your abstractions correctly, you don't ever have to think about them again.
>>
>>54175964
if only you knew Lisp

you'd know you spout shit
>>
>>54171925
>>54173024
>>54173412
>>54173444
>>54171778
>people who couldn't figure out vim
lmaoing at your life
>>
File: horror.png (877KB, 1904x3468px) Image search: [Google] [Yandex] [Bing]
horror.png
877KB, 1904x3468px
>>54171049
>>
>>54176182
obfuscated ?
>>
>>>54176231 Line 7
// This entire program is one actual line of code (one semicolon).
>>
>>54171778
It does seem stupid when you read it, but it's a pretty good answer. When I started using Vim I'd remap C-c and C-v to work with system clipboard as you'd expect, and I thought the whole situation was ridiculous. Now that I've understood and gotten used to it it's obvious that the Vim approach is much more efficient than the alternative. I guess Vim isn't always the most intuitive editor.
>>
>>54171049
Don't really understand the hate against interfaces and OOP. Can't imagine building a large scale enterprise application without interfaces and good design patterns. But then again this is /g/ where its cool to hate on C#/Java and program in some obscure language that no one is hiring for.
>>
>>54176291
>I guess Vim isn't always the most intuitive editor.
No need to guess that.
>>
>>54176281
hmm
>>
>>54176182
what does this even do?
>>
>>54176351
nothing on its own I guess

I never get why people write such code
>>
>>54176003
>If you designed your abstractions correctly

Yes ! You have to plan them much more than with basic OOP.

Object-Oriented is, at heart, a pattern. You can do it with any languages. But some makes it more intuitive than others.

It's easier to work with a large Java codebase than a C code base, at least, according to me.

>>54176029

It's on my list of languages to try.
>>
>>54176381
Agreed, anyone who works in the field professionally as a software engineer will feel this same way. The only people who are bashing OOP are people who don't work with it professionally.
>>
>>54176182
That's actually kind of cool.
>>
>>54174140
https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
>>
>>54173673
>the cs grad guy in the pic is sometimes shown looking at the degree he received because of the code presented, that being a possible joke.
ftfy
Sorry the joke failed to trigger your acumen and was found lacking when measured by your high standards of wit & jollity.
>>
File: 1458793922932.jpg (13KB, 228x238px) Image search: [Google] [Yandex] [Bing]
1458793922932.jpg
13KB, 228x238px
>>54176417
>The only people who are bashing OOP are people who don't work with it professionally.
because the rest GTFO or kill themselves. the only ones left are the mouthbreathing tards.
>>
>>54172246
>where are my legs?
>>
>>54174920
I don't know enough about 8gag to understand what you think you're communicating.
My original point stands - be aware that you are a walking, typing stereotype, and the entertainment value associated with this fact.
>>
>>54172963

>women shouldn't be discriminated against
>harass, stalk, and threaten women who they don't like

hmmmm
>>
>>54176554
Pro- and anti-gamergate trolls harass, stalk, and threaten both men and women who they don't like.
It's not very nice, but I don't think that it's discrimination.
>>
>>54176582
if I cared enough, I'd post that reddit screencap of the anti-gaymergaters posting "IGNORE THE WOMEN ONLY GO AFTER THE MEN"
>>
File: milton-office-space.jpg (72KB, 590x462px) Image search: [Google] [Yandex] [Bing]
milton-office-space.jpg
72KB, 590x462px
>>54172048
>>54172289
>>54172687
>>54172963
>>54176554
>>54176582
>>54176625
Fucking fuck off with this bullshit. Nobody cares.
>>
File: autism.png (195KB, 985x485px) Image search: [Google] [Yandex] [Bing]
autism.png
195KB, 985x485px
>>54171778
>>
>>54176677
That's true, gamergate and feminism are both cringeworthy and mostly worthless.
>>
File: 1461150147906.jpg (370KB, 1116x813px) Image search: [Google] [Yandex] [Bing]
1461150147906.jpg
370KB, 1116x813px
>>54176554
> Calling out feministic bullshit is "harassment"
>>
>>54171778
I sometimes use vim, but holy shit this is why no one picks it up.
>>
>>54172208
>"microwave time" referred to some advanced Physics concept I hadn't hear of

Jesus, /g/ is filled with retards. Micro time is just time * 10^6
>>
What about C#?
>>
>>54176778
>ben garrison
>cringe
>>
>>54176898
I don't actually know who Ben Garrison is and I don't really care, but that's an ad-hominem.
>>
>>54171894
FUCKING LOST
>>
File: 1439259036913.jpg (120KB, 720x656px) Image search: [Google] [Yandex] [Bing]
1439259036913.jpg
120KB, 720x656px
>>54176554
>>
>>54173564
happened to me with scrot
I think you can guess how that went
>>
>>54176778
>dismissing harassment as "calling out bullshit"
>implying it's not ggcancer who are the crybullies
>>
>>54176972
So you're admitting that GG lacks the ability to express their opinions without engaging in harassment?
>>
>>54171221
uncurry (/) . bimap getProduct getSum . foldMap1 (\x -> (Product x, Sum x))

Works for any non-empty structure, in a single pass over that structure.
>>
>>54175458
I actually use commercial APIs that use this method for verification

Never thought I'd see that method here
>>
File: u_mad.png (836KB, 736x749px) Image search: [Google] [Yandex] [Bing]
u_mad.png
836KB, 736x749px
>>54171875
>GamerGaters don't give a shit about feminism.

The entire movement literally started as an angry mob seeking to oust 3 women from the gaming industry, 1 whom they accused of corrupt and unethical journalism. It has been regressive and explicitly anti-feminist from the beginning.
>>
>>54171845
wait what? you have never seen code like that IRL?
>>
>>54178031
>seeking to oust 3 women from the gaming industry
I hate it when people talk about things authoritatively when they don't know shit
>>
>>54178172
The trick is to talk confidently so people assume you know what you're talking about and other people who have little to no knowledge on the subject believe you instinctively while affecting their first impression.
>>
>>54175458
What's wrong with this?
Although the way I did it is just generating a random long string for use as the session key.
>>
File: laughoutloud.jpg (14KB, 155x202px) Image search: [Google] [Yandex] [Bing]
laughoutloud.jpg
14KB, 155x202px
>>54171501
underrated post
>>
>>54171640
>what is Boost
Goddamn, I'm convinced that no one on StackOverflow can solve a task in C++ without using that fucking bloated shit.
>muh smart pointers
>muh Boost::suck::dicks::alot namespace with the basic_shit function you were looking for
>>
>>54176972>>54178031

>>54177816
>>54177859
>>54178172
>>54179527
>being basic enough to fall into the identity politics trap
>>
>>54175964
>Doing simple things in Java : hard

It's just as easy to do simple things in Java as it is to do simple things in C.
>>
File: getsudo.png (66KB, 1152x648px) Image search: [Google] [Yandex] [Bing]
getsudo.png
66KB, 1152x648px
>>54171894
>>
>>54180895
In Java, you need to write about 10,000 lines of code to make a Hello World.
>>
>>54171735
>less than 100 functions
>strlen
So they had functions that were 50+ characters long?
>>
>>54177816
OMG, you said something I disagree with! Stop harassing me!
It's because I'm white, isn't it? You're attacking me because I'm straight and white, you sexist, racist pig!
>>
File: gaytime.jpg (33KB, 500x250px) Image search: [Google] [Yandex] [Bing]
gaytime.jpg
33KB, 500x250px
>>54172246
Related: What is the best number?
>>
File: 1444887551440.jpg (56KB, 342x342px) Image search: [Google] [Yandex] [Bing]
1444887551440.jpg
56KB, 342x342px
>>54180908
Holy fucking shit
>>
>>54174313
How do you know they are Australian?
>>
>>54176301
>OOP NULL
>>
>>54174181
consider myself rustled

try
\l -> sum l / length l
>>
>>54181027
nvm try

\l -> sum l/fromIntegral (length l)
>>
>>54179639
md5 is the problem.
>>
File: ehow_security.png (218KB, 1152x648px) Image search: [Google] [Yandex] [Bing]
ehow_security.png
218KB, 1152x648px
>>54180967
>>
>>54171951
Python has floats, he'd have to do
lambda x: float(sum(x)/len(x))
>>
>>54176301

OOP doesn't mean having objects and good design patterns.

OOP means object _oriented_ that is, the core of your design is the object itself.

OOP is bad in the sense that using objects instead of data as your guide is going to lead to a mess.

You can use classes/templates/inheritance and all the useful stuff without writing in OOP.
>>
>>54181072
>base64 encryption
>>
>>54176291
It's less efficient. You're pressing more keys and taking more time to think through a decision tree.

Vim provides a macro language. When shit gets ridiculous, construct macros.
>>
>>54181079
sure you don't mean
lambda x: float(sum(x))/float(len(x))

one of the floats is probably frivolous because of quack typing but whatever
>>
>>54181072
This is probably the best one I've ever seen.
>>
>>54171822
I was looking through code the other day that had something like

aBoolean = getBoolean() ? false : true


It isn't even THAT bad but it just made me crack the fuck up
>>
File: perl.png (104KB, 876x1227px) Image search: [Google] [Yandex] [Bing]
perl.png
104KB, 876x1227px
>>54171049
>>
>>54171894
Reminds me of this
https://www.youtube.com/watch?v=JY_pHvhE4os
tl;dw is Estonia is super big into e-voting. Some security researchers wanted to audit Estonia's system, Estonia went "sure" and set up a mock election a week before the real election, telling anyone who was interested that they were free to try breaking the system, without legal repercussions. The guy presenting the video's team found a form whose input was not properly sanitized and eventually gets fed into a bash command, ultimately allowing for arbitrary code execution. Fun was had.
>>
>>54173843
>functions calling function w/o side effects
>MUH SIDE EFFECTS!

I hate this meme. Trying to model any reasonably complex problem without state of some form is a fucking nightmare. Hell, you have to break pure functions just to have any kind of I/O, to say nothing of a GUI.

Trying to prove the benefits of functional programming with algorithms that are by nature small and self contained is like trying to prove all code should be threaded because an embarrassingly parallel problem is easy to thread.
>>
>>54171221
(lambda (n) (/ (eval (cons '+ n))(length n)))

lol
>>
>an array of
Integer
is not the same as an array of int
>likewise, can't cast an entire array from one type to another
>double from/to float implicit conversions don't exist, instead you have to rely on wrapper classes for primitive types or ugly double>string>float workarounds
>no operator overloads, good luck working with vectors without chaining methods
>there's no
unsigned int
>>
>>54181213
The example with the shell execution wasn't Estonia. He doesn't start talking about Estonia until a bit later in the presentation.
>>
>>54178031

>as an angry mob seeking to oust 3 women from the gaming industry

So? Nothing to do with feminism.
>>
>>54172761
setAccessible*

and if the program is using some kind of idiotic Security Manager then you're just gonna get fucked
>>
>>54178031
Who's behind this post??
>>
File: sensible_chuckle.gif (993KB, 250x250px) Image search: [Google] [Yandex] [Bing]
sensible_chuckle.gif
993KB, 250x250px
>>54176455
>One whose Name cannot be expressed in the Basic Multilingual Plane
>>
>>54174960
ctrl+shift+v
>>
>>54176182
This looks well organized
>>
>>54171735
>>54180914
hash functions do not need to provide unique outputs for a hash table to work;
>>
>>54171919
>The program 'xxd' is currently not installed. To run 'xxd' please ask your administrator to install the package 'vim-common'
>xxd: command not found
Good thing I always uninstall vim on my boxes.
>>
>>54178031
Fuck off, Gawker.
>>
This has to be the least humorous board on 4chan

All these jokes and memes went stale years ago, and the few new ones just aren't funny at all
>>
>>54176182
this is actually impresive
>>
ITT: people explaining GG and GGers using /pol/ memes to defend themselves.
>>
>>54181066
Not sure if retard or just as dumb as the CS graduate meme

MD5 is not the problem
>>
>>54182607
setjmp()


You can't use that and not be impressive
>>
Most of these illustrate things you expect from people not having degrees though

I know that CS in America is a joke unless you get it from a top school, but algorithms and basic math is 90% of the degree, not "learning languages" as /g/ makes it out to be.
>>
>>54182818
MD5 is a separate problem but not the core problem.
>>
>>54181300

triggered I guess? Just say I got more grip on the concept, not that it is a superior concept.
>>
>>54182826
Unless you're not a babby and implement parts of your program in assembly frequently
>>
Too long to fit in a pic or post here:

http://pastebin.com/GQPnUi7d
>>
>>54179639
Replay attack. If you capture the session key once you can reuse it afterwards. As long as you checked whether you didn't randomly generate duplicates and the RNG was solid your way is fine.
>>
>>54176182
Assembly code of this might actually be easier to read.
>>
File: java.png (34KB, 915x820px) Image search: [Google] [Yandex] [Bing]
java.png
34KB, 915x820px
>>54182858
CS teaches you absolutely nothing about how to program well, it just teaches you how the machine works, the students are expected to just work out how they should program on their own.
>>
>>54181066
>need to check every possible user and password combination, even if user doesn't exist

wew
>>
>>54183698
What a retarded example
>>
>>54175017
there is realloc you dumb fuck
>>
>>54183698
>cannot even swap two ints correctly
get on my level faggot
https://ideone.com/mnBNPV
>>
>>54183698
>using a temp var to swap integers
disgusting tbqh
>>
>>54183872
>Limited to 256 values

D R O P P E D
>>
>>54183902
how should they do it?
>>
>>54183967
a ^= b;
b ^= a;
a ^= b;
>>
>>54183955
System.out.format("1 = %d, 2 = %d\n", 1, 2); // 1 = 1, 2 = 2
swap(1, 2);
System.out.format("1 = %d, 2 = %d\n", 1, 2); // 1 = 2, 2 = 1

can your toy language do that? I think not
>>
File: averaging system.png (118KB, 694x732px) Image search: [Google] [Yandex] [Bing]
averaging system.png
118KB, 694x732px
>>
File: x = y.png (115KB, 850x800px) Image search: [Google] [Yandex] [Bing]
x = y.png
115KB, 850x800px
>>
>>54183902
Unless you're on an embedded device with close to no ram it's better to use a temp variable
>>
>>54183967
xor or addition/substraction trickery

Tech interviewers like this super imaginative question to test the wittyness of programmers because situations where you can't spare 4 bytes of memory will appear all the time ;^)
>>
File: negative.png (84KB, 694x732px) Image search: [Google] [Yandex] [Bing]
negative.png
84KB, 694x732px
>>
File: lobster.png (282KB, 3000x3000px) Image search: [Google] [Yandex] [Bing]
lobster.png
282KB, 3000x3000px
>>
File: graduate cs.png (141KB, 800x600px) Image search: [Google] [Yandex] [Bing]
graduate cs.png
141KB, 800x600px
>>
File: 1437789415181.png (17KB, 2414x648px) Image search: [Google] [Yandex] [Bing]
1437789415181.png
17KB, 2414x648px
>>
>>54183902
compiler will optimize it so that only registers are used
mov ax, [a]
mov bx, [b]
mov [b], ax
mov [a], bx
>>
>>54183984
>only works on integers
>does not work with references that points to same location
>stalls the cpu
in the end 2/10
>>
>>54184002
stop spreading bullshit over the internet... tell this your grandma or your dog...
>>
File: get tomorrows date.jpg (38KB, 694x801px) Image search: [Google] [Yandex] [Bing]
get tomorrows date.jpg
38KB, 694x801px
>>
>>54171221
function avg(numbers) {
return numbers.reduce((sum, num) => sum + num) /
numbers.length
}
>>
>>54184050
>what is integer overflow
>>
http://stackoverflow.com/questions/6163683/cycles-in-family-tree-software
>>
>>54184040
>only works on integers
who said it was exclusive to integers. he is swapping integers in this picture.

>does not work with references that points to same location
>java

>stalls the cpu
retarded?
>>
>>54184043
https://en.wikipedia.org/wiki/XOR_swap_algorithm#Reasons_for_avoidance_in_practice
>On modern CPU architectures, the XOR technique can be slower than using a temporary variable to do swapping. One reason is that modern CPUs strive to execute instructions in parallel via instruction pipelines. In the XOR technique, the inputs to each operation depend on the results of the previous operation, so they must be executed in strictly sequential order, negating any benefits of instruction-level parallelism
>>
>>54184026
Daily reminder this is real:
http://workplace.stackexchange.com/questions/39004/which-weak-algorithmic-strategies-i-have-that-lead-me-to-failing-coding-this-sim
>>
>>54184103
>references only exists in java
>retarded?
yes you are
>>
File: 14613539615h8.png (77KB, 694x801px) Image search: [Google] [Yandex] [Bing]
14613539615h8.png
77KB, 694x801px
>>
>>54171533
>>54171468
The joke is that it's blank, autismos. It's not for you to complete.
It's not that funny of a joke, anyway.
>>
>>54184026
>>54184122
What about my solution?
    public static void printCross(int size) {
for (int i = 0; i < size; i++) {
for (int i2 = 0; i2 < size; i2++) {
if (i2 == i || (i2 + 1 + i == size)) {
System.out.print('x');
} else {
System.out.print(' ');
}
}
System.out.println();
}
}
>>
>>54182224
Uh, if your hash function is
int hash(void *) { return 0; }

and you're using chaining to handle collisions, you've got a linked list. O(n) lookup. If you're using probing, you're using an array. Again, O(n) lookup.

The whole point of a hash table is getting constant time lookup. If your hash function has a lot of collisions, you might as well use a list.
>>
>>54180727
You can already get shared_ptr and unique_ptr with C++11, so smart pointers isn't a good example.
>>
>>54184183
did some quick tests and it looks like it works
>>
File: ryehdfbgf.png (27KB, 768x753px) Image search: [Google] [Yandex] [Bing]
ryehdfbgf.png
27KB, 768x753px
>>
>>54171295
> (Tweeter= Gamergater)
> = instead of ==

>Not sure if mistaken or part of the joke
>>
>>54181300
The point of pure FP is that effects are quantified in the type instead of being hidden side effects. Saying "you can't do I/O with a pure function" is completely false. And it's not like pure FP languages can't have mutable state either. The preferred thing to do is use a recursive function with immutable state, not a loop with mutable state, but the latter can be expressed quite easily given a mechanism to ensure unique capability to mutate (such as the ST monad in Haskell) and is an optimization.
>>
>>54184212
That's the joke, that this retard used strlen as a hashing function and ended up naming functions so they wouldn't end up in the same buckets.
>>
>>54171778
>copy
visual mode select, then
:w!xclip

>pase
Ctrl-Shift-v works fine in termite
>>
>>54183698
function x( num, char, space ) {
for ( var a = [], i = 0, n = ( num - 1 ) / 2, s, j; i < n; i++ ) {
for ( s = "", j = 0; j < n; j++ ) {
s += j === i ? char : space;
}
s += space + s.split( "" ).reverse().join( "" );
a.push( s );
}
for ( i = 0, s = ""; i < n; i++ ) {
s += space;
}
return a.concat(
[ s + char + s ],
a.slice().reverse()
);
}

console.log( x( 9, "*", " " ).join( "\n" ) );
>>
>>54184048
what are you, an impatient kid ?
>>
>>54184212
Not the same op.

It is kind of silly, but if I had to make up a hacky language hasing with strlen() is kinda ok, at least for a placeholder. I don't know when they updated that stuff, but as a proof of concept I guess it doesn't make much of a difference.
>>
>>54183902

>disgusting

That's a funny way to say "best practice"....
>>
>>54183902
>works for any type
>is immediately readable for what it is
>will likely be optimized to something faster than the XOR method even when the latter is applicable
>>
>>54183984
nice data dependency faggot
>>
>>54171900
man finger
>>
>>54171548
made me smirk
>>
>>54172231
lol redditor
>>
>>54172337
made me smile
>>
>>54175458
lol'ed
>>
>>54171640
Reminds me of my first days of C++ graphical programming. I was assigned to make a simple application to manage brightness and contrast of 8-bit grayscale images.

>Ask stackoverflow what would be the best method
>People suggest heavy duty heavy weight libraries like OpenCV, ITK, VTK, Qt
>Wtf
>Those comments get the most votes
>Ignore and think of a solution. Load the image into an unsigned char array and process it myself
>Done
>A few days later go back to my stackoverflow question again
>Retards posting "I know you're new to stackoverflow, so if <heavy duty library> solved your problem, please vote up my post and accept my answer"
>Never login to stackoverflow again
>>
File: 1413818645245.jpg (113KB, 625x461px) Image search: [Google] [Yandex] [Bing]
1413818645245.jpg
113KB, 625x461px
>>
File: moot.png (113KB, 959x1051px) Image search: [Google] [Yandex] [Bing]
moot.png
113KB, 959x1051px
>>
>>54171640
There aren't enough Indians in that picture. Other than that it's perfect.
>>
>>54171919
deserve what you get when you run a random comand you found somewhere and have no clue what it does
>>
>>54184997
that guy looks like a massive faggot, whoever he is
>>
>>54180799
>acknowledging that one's gender can influence their life experiences and how others interact with them is "identity politics" and therefore invalid
>>
>>54181034
>not
 \l -> sum l / genericLength l 
>>
>>54184183
Nice wasted characters, faggot

def print_cross(n):
l=[abs(x) for x in range(-1*n,n)]
s=[" "*(n-k)+ ("*" if k==0 else "*" + " "*(2*(k-1)+1)+"*") for k in l]
print('\n'.join(s))

print_cross(9)
>>
>>54185602
>let's tab all the way
>>
>>54185602
Are you even trying?

def print_cross(n):
print('\n'.join([" "*(n-k)+("*" if k==0 else "*"+" "*(2*(k-1)+1)+"*") for k in [abs(x) for x in range(-1*n,n)]]))
>>
>>54171421
>>54171421
tweeter.eq("Gamergater").or.(tweet.eq("Negative")).ifTrue("Block".print)
>>
>>54184400
> make a text file with friends sisters name
> finger Jessica.txt
> "dude I am fingering your sister "
> hue hue I'm 28 ...
>>
>>54171778
I don't see the problem here. It's really very simple, the answer is just extremely verbose.
If you guys think this is too much, just stick to sublime or whatever
>>
>>54184122
>>54184026
I can relate to this

I'm a decent programmer but when it comes to come up with my own algorithms for almost anything, I go full retard
>>
>>54184237
if anything, this is some kid who's never been to university
>>
>>54171778
Literally just "+ and then the copy/cut command for me on gnu/linux, so "+y to copy selection to clipboard, not hard to remember at all
>>
>>54173341
anonymous one line function
>>
>>54175458
other than md5 this is fine. If they used a different hash func it would be fine
>>
>>54176182
>// This entire program is one actual line of code (one semicolon).
Oh boy here we go
>>
>>54172231
Not.gonna lie. Did this years ago with 2 clamp on desk lamps. Laptop with 3 power cords ftl
>>
File: relaxationing.gif (997KB, 500x700px) Image search: [Google] [Yandex] [Bing]
relaxationing.gif
997KB, 500x700px
>>54181783
>>
File: 1460516618952.jpg (40KB, 420x560px) Image search: [Google] [Yandex] [Bing]
1460516618952.jpg
40KB, 420x560px
>>54176898
Fuck off juden
>>
File: problem.jpg (75KB, 960x517px) Image search: [Google] [Yandex] [Bing]
problem.jpg
75KB, 960x517px
>hello anon, what's happening....
>I know it friday and that you were about to leave, but we have sort of a problem here, this code here >>54176182 doesn't always produce the correct result, so if you could just take a quick look at it before you leave that would be great...
>I'll go ahead and make sure this task gets assigned to you, mkay?
>bye bye now
>>
>>54184034
Kek
>>
>>54183721
This is why retards shouldn't roll their own crypto.

If you do something different if the user doesn't exist, an attacker can detect that.
Thread replies: 319
Thread images: 60
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK