[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
/dpt/ - Daily Programming Thread
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

You are currently reading a thread in /g/ - Technology

Thread replies: 316
Thread images: 25
File: 1452488484673.png (484 KB, 507x900) Image search: [iqdb] [SauceNao] [Google]
1452488484673.png
484 KB, 507x900
Old thread: >>52485483

What are you doing, /g/?
>>
first for coding!
>>
Back when I was new in /g/, I thought /dpt/ was full of cool guys and geeks who can program like a pro.
I was actually pretty intimated by these threads because I was just a newbie programmer and I thought you guys were master hackers or something.
Then I actually lurked in these threads for a while and realized you're all just a bunch of faggots like /v/ and /b/ who do literally nothing but shitpost all day.
I really thought you guys were cool.
I am very disappointed.
>>
File: niggapls.png (439 KB, 440x594) Image search: [iqdb] [SauceNao] [Google]
niggapls.png
439 KB, 440x594
>>
>>52488589
what
>>
>>52488589
'murrica
>>
>>52488581
cool story bro, at least we have code tags
>>
>>52488594
>>52488597
i thought you guys are good at math? Its common core dude
>>
>>52488594
it's common core which unironically gets taught in the US

it's basically one dumb way to do mental arithmetic but it gets forced upon everyone

in that pic they start with 12, add 3 to get a "round" number 15, add another 5 to get 20, add another 10 to get 30, add another 2 to get 32. and then they magically know how to keep track and add 3 + 5 + 10 + 2 = 20 just fine.
>>
>>52488619
>common core
>good
>>
>>52488581
I think you're just projecting your own ineptitude onto everyone else.
>>
>>52488589
>doing 32-12 the old fashioned way is bad
>doing 3+5+10+2 the old fashioned way is fine though
>>
>>52488601
the fuck? lol
>>
>>52488639
yeah its a buncha niggers
>>
>>52488601
What is this?
>>
>>52488589
I don't get it
>>
>>52488594
Common core has a ridiculous attempt to teach intuitive arithmetic to children.

By doing this they have managed to confuse millions of adults who aren't used to seeing the way they perform math in their head, written down on paper.

I personally consider it worthless--proper and concise notation is more important than the method you used to get to the result.

You should teach children how to "show their work" but not expect them to actually use it if they know a better way.
>>
>>52488653
32-12

12+3 = 15
15+5 = 20
20+10 = 30
30+2 = 32

3+5+10+2=20
>>
>>52488664
nice you just typed it instead of explaining, gj
>>
>>52488664

why not
12 + 8 = 20
20 + 12 = president ron paul = 80
80 - 20 = 60
12 = 60
12/6 = 60/6
2 = 10
2 * 10 = 20
>>
File: 1452658453112.png (169 KB, 800x800) Image search: [iqdb] [SauceNao] [Google]
1452658453112.png
169 KB, 800x800
>>
>>52488589
What's going on in the new way?
>>
File: 1390404444101.gif (1 MB, 480x480) Image search: [iqdb] [SauceNao] [Google]
1390404444101.gif
1 MB, 480x480
>>52488589
I don't understand at all.
>>
File: 1451290911844.jpg (46 KB, 791x520) Image search: [iqdb] [SauceNao] [Google]
1451290911844.jpg
46 KB, 791x520
>>
>>52488714
>>52488696
>>52488601
I think you should fuck off back to >>>/pol/
>>
>>52488685
>>52488697
>>52488712

12 + (3 + 5 + 10 + 2) = 32
32 - 12 = (3 + 5 + 10 + 2)
3 + 5 + 10 + 2 = 20

32 - 12 = 20
>>
>>52488733
Where the hell does (3 + 5 + 10 + 2) come from?
>>
File: fuckingretard.jpg (63 KB, 800x600) Image search: [iqdb] [SauceNao] [Google]
fuckingretard.jpg
63 KB, 800x600
>>
File: 1452409829985.jpg (532 KB, 616x5370) Image search: [iqdb] [SauceNao] [Google]
1452409829985.jpg
532 KB, 616x5370
>>
>>52488733
>my generation is the last generation of Americans that can properly do math

feels good man
>>
>>52488739
Basically start with the lower number and add numbers (preferably multiples of 5) until you reach the larger number. Then sum up the numbers you used to reach the larger number and that's the difference.
>>
>>52488742
>burger
>can properly do math
>any year
>>
>>52488740

20 is the correct answer r-right?
>>
>>52488755
I could kick your ass at math any day of the week.
>>
>/pol/shit
See guys? This is why you post anime.
>>
>>52488742
>>52488752
>>52488765
maths*
>>
>>52488761
Yes, to cut a board into n pieces you need n-1 cuts.
>>
>>52488741
Playing devils advocate, how can you tell those sources are accurate? There is nothing stopping the police force in areas like Atlanta from withholding crimes committed by whites or exaggerating crimes committed by blacks.
>>
File: 1452656016294.png (166 KB, 1328x908) Image search: [iqdb] [SauceNao] [Google]
1452656016294.png
166 KB, 1328x908
>>52488761
Yes because you saw a piece of wood once and you get two pieces, thats ten minute. You saw wood twice you get three pieces, thats 20
>>
>>52488752
What? Your explanation is fucking shit.
Also, what possible advantage does that have over just going over each digit and comparing them?
>>
>>52488771
shouldn't you be fellating ahmed?
>>
>>52488712
It's easy.

19 - 7

7 + 4 = 11
11 + 2 = 13
13 + 4 = 17
17 + 2 =19

4 + 2 + 4 +2 = 12

Understand?
>>
>>52488772
>>52488779

why would 15 be "correct" then
>>
>>52488761
no you cut the board in the middle for 10 minutes then cut one in half for 5 minutes

>>52488772
wrong
>>
>>52488781
It's to teach kids mental arithmetic even though if a kid is going to be good at mental arithmetic they'll figure this shit out on their own.
>>
>>52488789
It's not, the teacher is a fucking moron. Math teachers in public schools are awful. If you're good at math you don't become a public school teacher. Therefore math teachers at public schools are inherently bad at math.
>>
File: 1452411700166.jpg (79 KB, 960x505) Image search: [iqdb] [SauceNao] [Google]
1452411700166.jpg
79 KB, 960x505
>>52488778
Believing there is a systematic racist culture today is ignorant. Its like being one of the people who say there is a "patriarchy". Black people have it A LOT easier. I mean look at the news. You are NEVER going to see the headline say "Black cop shoots white teenager"
>>52488789
It isn't, the teacher is stupid
>>
>>52488789
Because the marker is a retard.

>>52488796
>It's to teach kids mental arithmetic
By forcing one retarded way onto everybody? Different people all have different ways to quickly work out or approximate equations in their head.
>>
>>52488781
here's a similar method
all subtraction is too hard (that's self evident)
adding numbers that aren't 1, 2, 5 or 10 is too hard (obviously)

so

a - b = c
b + c = a

add 1s, 2s, 5s and 10s to b until you get a
the total you added is c

32 - 12 = c
12 + c = 32

12
+10 -> 22
+5 -> 27
+2 -> 29
+1 -> 30
+2 -> 32

10 + 5 + 2 + 1 + 2 = 20
>>
>>52488786
lol

19-7

7+3=10
7+9=19
19-7=3+9=12

It's not a stupid way to do computations.
>>
File: correctanswer.jpg (25 KB, 150x611) Image search: [iqdb] [SauceNao] [Google]
correctanswer.jpg
25 KB, 150x611
>>52488740
>>
>>52488806
It's not like that in UK public schools
>>
>>52488790
But the question states to cut ANY board in half it takes 10 minutes.
>>
>>52488811
That's why it's dumb, if a kid is gonna be good at mental arithmetic they'll figure out the mental algorithms that work best for them naturally.
>>
>>52488812
+10 -> 22
+10 -> 32 would be faster

the idea in the original is that you want to "even out" the number first (which in some cases might make it simpler)

>>52488817
look at the diagram, the board is a plank
>>
>>52488817
Well, that's pretty stupid, considering there is an infinite number of ways to cut the board in half. Also, that assumes a bunch of shit that wasn't specified in the problem.
>>
>>52488740
What if I pay a Mexican to cut it for me?
>>
>>52488778
If anything it's the opposite. Go look at the most wanted list of any major city. So many dark skinned people are inexplicably listed as white.
>>
>>52488822
you think susan us such a bitch?
>>
Man you people.
I don't know if you're all pretending to be stupid or what, but if you cut a plank of wood at a specified rate, and then to decide a similar sized plank of wood in the same direction at the same rate, then obviously it's going to take the same amount of time to make the cut.

You don't even need multiplication for this shit.
>>
>>52488769
I'm from /pol/ and I like anime...
>>
File: family.gif (998 KB, 460x307) Image search: [iqdb] [SauceNao] [Google]
family.gif
998 KB, 460x307
>>52488790
>no you cut the board in the middle for 10 minutes then cut one in half for 5 minutes

What the actual fuck
>>
File: realcorrectanswer.png (26 KB, 300x230) Image search: [iqdb] [SauceNao] [Google]
realcorrectanswer.png
26 KB, 300x230
>>52488740
>>52488817
>>
File: doesnt-work.png (137 KB, 704x768) Image search: [iqdb] [SauceNao] [Google]
doesnt-work.png
137 KB, 704x768
We're coderz, we smash stacks.
>>
File: 1451448843039.jpg (1012 KB, 1580x3433) Image search: [iqdb] [SauceNao] [Google]
1451448843039.jpg
1012 KB, 1580x3433
>>52488778
>>52488841
here data to back up anons reply
what someone got in a couple minutes, you can find a lot more
>>
>>52488873
Nice one.
>>
>>52488817
now explain how that works with a long beam shaped piece of wood, as shown in the diagram
>>
>>52488731
niggers a shit
>>
>>52488828
>>52488903
>that pic
>a board
kek american education ladys and gentlemen
>>
>>52488740
M U R R I C A
U
R
R
I
C
A
>>
>>52488933
a board doesn't have to be square

if it's twice or more as long as it is wide, the answer is 20 minutes

only a perfectly square board could fit that question
>>
>>52488631
>implying he is not right
also he said he was inept.He just realized others who lurk here are too
>>
>>52488815
it is fairly stupid
19 - 7 = 12 simple as that

or 9 - 7 = 2
10 + 2 = 12
>>
>>52488974
inept american detected
>>
>>52488975
Are you a commie by any chance?
>>
>>52488975
Okay, show me

3425-2143

Don't forget, it's a trick for mental computation.

2143+7=2150
2150+50=2200
2200+800=3000
3000+425=425
3425-2143=857+425=1282

I have removed the stupid steps. Reaching 5 is useless, I target 0 directly.
>>
>>52488983
inept frogposter detected
>>52488988
yes
>>
>>52488988
you are "magically knowing" which numbers to add. subtraction makes more sense because for example 9 - 7 is trivially 2.
>7+3=10
>7+9=19
>19-7=3+9=12
is really fucking dumb
>>
>>52488725
"oh shit, facts"
>>
>>52489004
it's useful for large numbers

but it's not something you get taught
it's something you learn yourself while practising maths
>>
>>52489022
My teacher (when I was 7) taught us a similar trick and he's a good teacher.
>>
>>52489004
3425-2143
5-3=2
2-4=8 with -2 carry
4-1-2=1
3-2=1

1282

easy as shit
>>
>>52488601
Why the fuck would that nigger just hit a small child like that? That's seriously fucked up.
>>
retards
why can't you just put 32 - 12 into your smartphone and be happy
cunts
>>
>>52489030
My method is faster. Practice the two a lot, and see which is faster.
>>
>>52489004
>3425-2143=857+425=1282
>7+50+800+425=857+425
lmfao so keeping track of this is supposed to not be stupid
>>
>>52489038
If a nigger is born into or exposed to the ghetto/hood culture then they are 99% certain to act like a bunch of fucking apes
fucking disgusting
>>
>>52489016
I don't care about the factuality of it; it's completely unrelated to programming.

>>52489041
Why would I bother to reach in my pocket to grab my phone, turn the screen on, open the app drawer, open the calculator app, wait a second or two for it to load, and then enter the equation, when I can work it out on my own in the fraction of a second.
>>
>>52489045
it really isn't you fucking tard

you're left with 857+425 so you still have to add two large numbers. subtracting isn't harder than adding.

see >>52489048
>>
>>52489048
What is your point?
>>
>>52489030
>2-4=8

waht
>>
>>52489062
>subtracting isn't harder than adding
That's where you're wrong.
>>
Fucking idiots itt
32 - 12 = 32 - 12

Learn to lazy evaluate you morons
>>
>>52489064
you're keeping track of a fuckload of numbers and pretending like adding a large number of random ass numbers is easier than subtracting
>>
>>52489070
He's obviously working mod 10.
>>
>>52489070
modular arithmetic you dip

>>52489074
ok 4-2=2 is harder than 2+2=4 yeah right kill yourself murritard
>>
>>52489078
I just show the steps. It's faster than any other methods.
>>
>>52488725
I think you should go back to >>>/r/eddit
Fucking PC faggot
>>
>>52489089
>Fucking PC faggot
>>>/v/
>>
>>52489070
>>52489081

>C and C++ think (2-4)%10 is -2
>>
>>52489083
>ok 4-2=2 is harder than 2+2=4 yeah right kill yourself murritard
Yes it is.
>>
>>52489087
no it isn't

32-12 is literally one or two parallelizable steps with the old way
the common core way takes several steps and requires additional memory
>>
>>52489094
Political Correctness, tard.
Go back to reddit you fucking cancer, get out of here.
>>
>>52489097
your mental model is retarded
>>
>>52489095
Yes, modulo on negative numbers is weird and inconsistent is programming languages.
Mathematically, it's well defined.
>>
>>52489095
% is remainder, not modulus
>>
>>52489131
the remainder of -2 / 10 is 8
>>
>>52489131
fucking retard
>>
>>52489139
-2 / 10 = -0.2

the fractional component is -2
>>
Here's a little something to keep yr drives warm in the winter.

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>

FILE *word;

int main()
{
char al[36] = {' '};

al[0] = 'a';
al[1] = 'b';
al[2] = 'c';
al[3] = 'd';
al[4] = 'e';
al[5] = 'f';
al[6] = 'g';
al[7] = 'h';
al[8] = 'i';
al[9] = 'j';
al[10] = 'k';
al[11] = 'l';
al[12] = 'm';
al[13] = 'n';
al[14] = 'o';
al[15] = 'p';
al[16] = 'q';
al[17] = 'r';
al[18] = 's';
al[19] = 't';
al[20] = 'u';
al[21] = 'v';
al[22] = 'w';
al[23] = 'x';
al[24] = 'y';
al[25] = 'z';
al[26] = '1';
al[27] = '2';
al[28] = '3';
al[29] = '4';
al[30] = '5';
al[31] = '6';
al[32] = '7';
al[33] = '8';
al[34] = '9';
al[35] = '0';

int one = 0;
int two = 0;
int three = 0;
int four = 0;
int five = 0;
word = fopen("/Path/To/file", "w+");
for(one = 0; one < 36; one++){
for(two = 0; two < 36; two++){
for(three = 0; three < 36; three++){
for(four = 0; four < 36; four++){
for(five = 0; five < 36; five++){
char passw[5] = {al[one], al[two], al[three],
al[four], al[five]};
fwrite(passw, 1, sizeof(passw), word);
printf("%d %d %d %d %d\n", five, four, three, two, one);
};
five = 0;
};
four = 0;
};
three = 0;
};
two = 0;
};
fclose(word);
return(0);
}
>>
>>52489142
KILL YOURSELF SHITKID

http://stackoverflow.com/questions/12556946/how-does-the-modulus-operator-work

>It gives you the remainder of a division.
>It gives you the remainder of a division.
>It gives you the remainder of a division.
>>
>>52489152
-2 / 10 = -1 + 8 tenths
>>
>>52489161
>stackoverflow
The code monkeys place.
>>
getting upvotes for a subtly racist comment on reddit haha
>>
>>52489152
And 1 / 3 = 0.333...
Yet 1 % 3 != infinite 3s

Idiot.
>>
>>52489158
>FILE *word;
>global
Kill yourself
>>
>>52489164
ARE YOU FUCKING SHITTING ME

-2 / 10 = 0 - 2 tenths
>>
>>52489176
RETARD I HOPE YOU'RE BEDRIDDEN AND SLOWLY DIE IN CANCER AND THAT THE NURSE STEALS ALL YOUR PAIN MEDICATION SO YOU SPEND YEARS IN EXCRUCIATING PAIN BEFORE YOU FINALLY DIE IN A FIRE
>>
What does e in math mean?
>>
My friend just told me that he doesn't wipe until the paper is clean

Do people actually do this? Just wipe a couple of time and if there's still shit there it doesn't matter?
>>
>>52489191
The remainder is a positive integer
>>
>>52489208
Is your friend Indian?
>>
>>52489208
I just jump in the shower, toilet paper is a meme.
>>
>>52488565
$ ./rpn
>foo * (bar * boo) ^ far
foo bar boo * far ^ *

My RPN converter supports variables somehow

now that I've done this, was there actually any practical reason for it?
not the variables I mean, RPN in general
>>
File: KILL YOURSELVES.png (16 KB, 475x171) Image search: [iqdb] [SauceNao] [Google]
KILL YOURSELVES.png
16 KB, 475x171
>>52489211
TRUNCATION IS HOW YOU DO INTEGER ARITHMETIC IN C/C++ FUCKING DIPSHIT
>>
>>52489217
I've wanted to start doing this but I can't be bothered.
>>
>>52489208
people are disgusting

shitskins even wipe with their bare hands i shit you not

they use a plastic bottle to rinse so they shit up the sink too
>>
>>52489212
American
>>
why is /dpt/ so hostile today, did your periods line up or something?
>>
>>52489227
It's no effort at all, you don't have to get completely wet, you just point the jet towards your anus for a few seconds and you're done. I think it takes more effort to wipe.
>>
>>52489221
RPN MASTER RACE
<< 1 << over 1 > >> << over * swap 1 - swap >> while swap drop >> 'fac sto
>>
>>52489249
SO MANY SMUG SHITKIDS WITH THEIR RETARDED OPINIONS

TO THIS DAY THERE STILL HAVE BEEN NO REAL ADVANTAGES TO FP DEMONSTRATED
>>
>>52489249
There are no girls on the internet anon
>>
>>52489255
>>52489217
After wiping for 10 minutes straight and seeing blood in the wipes one too many times I'm gonna start this.
>>
>>52489255
depends on the quality of your stool
>>
>>52488589
In my head I'd do 12->22->30->32
That's 10+8+2=20

They should just let kids do their calcs how they want, just tell them some tips for faster mental calculation.
>>
>>52489269
everyone in /dpt/ is female until proven otherwise
>>
>>52489302
We know when someone is male when they post quality, well-structured code.
>>
File: 1413810051100.jpg (36 KB, 500x375) Image search: [iqdb] [SauceNao] [Google]
1413810051100.jpg
36 KB, 500x375
Whats the best program for making a 2D game?
>>
>>52489311
pygame
>>
>>52489311
one that you make yourself using opengl
>>
>>52489316
>I am writing a simple top down rpg in Pygame, and I have found that it is quite slow.... Although I am not expecting python or pygame to match the FPS of games made with compiled languages like C/C++ or event Byte Compiled ones like Java, But still the current FPS of pygame is like 15. I tried rendering 16-color Bitmaps instead of PNGs or 24 Bitmaps, which slightly boosted the speed, then in desperation , I switched everything to black and white monochrome bitmaps and that made the FPS go to 35. But not more. Now according to most Game Development books I have read, for a user to be completely satisfied with game graphics, the FPS of a 2d game should at least be 40, so is there ANY way of boosting the speed of pygame?

>Thanks , the DOUBLEBUF flag gave me the final boost I needed for my 40 FPS goal. I will try rendering seperate rects but since all the sprites of my rpg are first blitted by the tile engine onto a huge surface and then that surface is blitted on the screen, it wont make a lot of difference. Thanks! I finally got the 40 FPS I wanted. ^_^
>>
>>52489309
how is posting feminine code proof of being a man?
>>
>>52489038
usa's population is one of the dumbest amongst the developed countries.
>>
>>52489332
Nice try, anon, but feminine code is a disorganized spaghetti mess.
>>
>>52489329
Learning how to write efficient code is the best way to have a high FPS.
>>
>>52489349
good luck writing efficient code in python/pygame
>>
pygame is old technology (sdl1, software rendering). there much better alternatives like pysfml, pyglet, pysdl2 with pypy, ...
>>
Give me one good reason NOT to learn JS.

No other programming language is in the position JavaScript is.
>>
>>52489380
or just drop that fucking garbage language altogether
>>
>>52489384
fucking web dev tard fuck off with your gay shit

sure use it for your shitty bloated website but outside of web dev it's TRASH
>>
>>52489384
if you think you know better why are you asking
>>
My AA3 gf cheated on me. What do?
>>
>>52489346
quality well-structured code is the exception, not the norm, and there are more male programmers so... masculine code is a disorganized spaghetti mess
>>
>>52489333
Bullshit, their White, Jewish and Asian population built the richest country on earth, they have the most Nobel prize winners, their academic output is collosal. Their universities are the best on the planet. They have the best textbook authors. On average they have a witty sense of humour second only to Brits.

I'm sick of retards trying to push this stereotype. It just shows you're an uncultured dolt who think the "hurr Americans can't even read maps lel xD" meme is real and has never actually meant any Americans.

t. South African.
>>
>>52489398
Your Ace Attorney 3 waifu?
>>
>>52489399
kill yourself kike
>>
Can you prove that your code isn't feminine, /dpt/?
>>
File: 1453086179216.jpg (43 KB, 1043x403) Image search: [iqdb] [SauceNao] [Google]
1453086179216.jpg
43 KB, 1043x403
>>
>>52489392
I don't think I know better, that's why I'm asking.
>>
>>52489400
>>52489333
To add. You'll find the exact same behaviour in the African population living in Britain in Sweden.

London fires etc. Exactly the same pattern as furguson.
>>
>>52489409
>damage control

it's ok anon, we won't make fun of you for being a man
>>
>>52489406
No, my Artificial Academy 3 gf, it was just released yesterday, fun game.
>>
>>52489400
Let's assume we have two nations:
1) 50 million inhabitants, 30 % are fucking morons
2) 250 million inhabitants, 75 % are fucking morons

Which of those nations will, on average, produce a higher academic output?
>>
>>52489410
Total words: 398

Genre: Informal
Female = 0
Male = 423
Difference = 423; 100%
Verdict: MALE

Genre: Formal
Female = 260
Male = 305
Difference = 45; 53.98%
Verdict: Weak MALE

Weak emphasis could indicate European.
>>
Irrational numbers are a meme, right?
>>
>>52489453
your mom is meme
>>
>>52488565
Learning haskell
>>
I'm bored, /dpt/. How easy is it to make a game in Haskell?
>>
>>52489469
depends on what you count as a game
>>
>>52489476
idk, pretty much anything interactive
>>
File: muricaa.jpg (622 KB, 1024x1372) Image search: [iqdb] [SauceNao] [Google]
muricaa.jpg
622 KB, 1024x1372
>>52489400
>they have the most Nobel prize winners, their academic output is collosal. Their universities are the best on the planet. They have the best textbook authors.

And how many of them have been naturalized ? because this is what the usa have done since ever: stealing brains through naturalization, they also do that in sports. If you look at the people who have been born and raised in america, most of them are punk ass nigga, redneck, gringos, ...

"America is the only country that went from barbarism to decadence without civilisation in between."
>>
>>52489486
i don't do haskell but you could probably do some CLI text based game pretty easily
>>
What books would you fine gentlemen recommend for learning Java as a beginning programmer?
>>
>>52489486
https://hackage.haskell.org/package/gloss-1.9.4.1/docs/Graphics-Gloss.html
>>
>>52489517
SICP
>>
>>52489517
https://docs.oracle.com/javase/tutorial/
>>
>>52489517
>gentlemen

>>>/b/
>>
what do i need to download to run c++ code?
>>
>>52489537
if you're on linux, you probably already have g++
if you aren't, you should be
>>
>>52489537
OS?
>>
>>52489537
mingw
>>
>>52488589
>busywork.jpg
-_-

>>52489280
>They should just let kids do their calcs how they want
Not at all. Subtracting 1s before the 10s is better and so on.

Because 21 - 19 will fuck it up for you if you do the 10s before the 1s:

_2__1
-1__9

_1_11
-1__9

_1_11
-1__9
====
_0__2

See?


>>52489399
Good coders don't need validation from /g/.
>>
>j=0;
>while(j<8){
> strcpy(Data+17*j,Data2);//
> j++;
>}

Anyone have any idea what on God's good Earth "Data+17*j" is meant to be?


>>52489537
VisualStudio
>>
>>52489544
>g++
>not clang
Enjoy you're shit OS.
>>
>>52489556
>clang
Enjoy your shit optimizations, bloated assembly code, and potential security pitfalls.
>>
>>52489552
It points to Data[17*j]
>>
>>52489556
gcc/g++ is literally the best compiler
>>
>>52489563
Thanks
>>
>>52489400
Jews are white, David Duke.

>>52489549
P.S. I just saw something horrible in this: >>52488589

The old way uses two operations.

The new way uses a whopping seven operations. That's an increase of 250%.

So parents should tell the teachers that the old way is in this case 71% more effecient. (And I guess that when the numbers are larger, it will be even more effecient with the old way.)
>>
>>52489439
Ordered list of per capita for scientific academic output:

Netherlands: 0.011834319526627219
Canada: 0.01111
UK: 0.010687022900763359
Germany: 0.009732360097323601
>US: 0.008989460632362058
France: 0.007518796992481203
Italy: 0.0066006
Spain: 0.006465
Japan: 0.006309148264984227
> POWERGAP
South Korea: 0.003883495145631068
Russia: 0.00204
China: 0.0005093502146547333
India: 0.00023382

Sources:
http://www.openaccessweek.org/profiles/blogs/the-top-20-countries-for-scientific-output
https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population


Ignoring the based Nordics and Germanics because we all know they are based as fuck (Sweden and company will also be Netherlands tier). The US still outperforms most non-Germanic European countries and they blow the stereotypically "smart" Asian countries the fuck. They are doing by far the best for a 100m club country.


Most of the Euro faggots who shitpost about Americans are fucking wogs who are far inferior to the US per capita.
>>
>>52489545
windows

>>52489552
do i have to download an ide? can't i just use notepad++?
>>
>>52489605
Sure, then combine it with gcc or minGW
>>
>>52489605
please use an ide, and successively learn how to utilize its features
>>
>>52489605

Stick to Python.
>>
>>52489489
If you knew jack shit about the history of science you'd know most of their best scientists are home bred.

Arguably the best scientist of the 18th century was Josiah Gibbs who was 100% American born, raised and educated.
>>
File: 1438335764301.jpg (132 KB, 625x805) Image search: [iqdb] [SauceNao] [Google]
1438335764301.jpg
132 KB, 625x805
>>52489622
>>
>>52489621
i don't like the indentation meme, i prefer nipple brackets
>>
>>52489634
>Posting Einstein of all men
>Not know the qoutes attributed to Einstein who sucked Gibb's dick like all contemporary scientists.
>Not knowing Eintein's first significant publication was in 1905.

Not even ironic, it's expected. You went for the first meme scientist like the typical faggot you are.
>>
>>52489661
list of American scientists:
https://en.wikipedia.org/wiki/List_of_American_scientists

list of British Jew scientist:
https://en.wikipedia.org/wiki/List_of_British_Jewish_scientists
>>
>>52489719
why do they keep lists of jews isn't that a bit creepy

or is it like a social network for jews
>>
>>52489719
list Asian cuisines:
https://en.wikipedia.org/wiki/List_of_Asian_cuisines
>>
>>52489620
why can't i just use notepad++?
>>
what is `c1 = [ (x, y) | x <- [1..4], y <- [5..8], x + y > 8 ]` without comprehension in haskell?
>>
>>52489731
You should
>>
>>52489758
filter (\(x,y) -> x + y > 8) $ zip [1..4] [5..8]
>>
>>52489781
>filter (\(x,y) -> x + y > 8) $ zip [1..4] [5..8]
nope
>>
>>52489758
>>52489781
>>52489799

haskell is a meme
>>
>>52489758
c1 = [(1,8),(2,7),(2,8),(3,6),(3,7),(3,8),(4,5),(4,6),(4,7),(4,8)]

:^)
>>
>>52488594
>>52488653
>>52488697
Basically, instead of taking the little number away from the big number, they're starting with the little number and adding "easy" little numbers until they get to the big number.
>>
Is there somebody knowing something about libssl?
I try to send encrypted messages from android app to c program on my computer and I have small problem.
Android to import key generated by my program needs DER formated public key. To do this I sned him output of i2d_RSAPublicKey and it didn't work, so after few hours I checked output of command
openssl rsa -in rsa_priv -pubout -ouopenssl rsa -in rsa_priv -pubout -outform DER  | base64tform DER  | base64

and was different from what I got by calling i2d_RSAPublicKey. Specifications says that both of these should return the same value. Surprisingly output of the command worked.
>>
$ ./rpn
>2^5
2 5 ^ = 7

My RPN converter / evaluator works but it's cheeky as fuck
>>
>>52488974
https://en.wikipedia.org/wiki/Space_%28punctuation%29
Try it out sometime, specifically after full stops.
>>
>>52489622
> 18th century
> 100% american

I doubt that.
>>
>>52488740
>10 = 2
>>
https://www.reddit.com/r/ProgrammerHumor/comments/41g4cl/trumpscript_make_python_great_again/

REEEEEEEEEEEEE

They're making fun of Trump with "TrumpScript."

We have to make BernieScript in retaliation.
>>
File: polish hiphop dog.jpg (18 KB, 500x252) Image search: [iqdb] [SauceNao] [Google]
polish hiphop dog.jpg
18 KB, 500x252
>>52489939
>Let's use this instead of Java, until we can figure out what's going on.
every now and again someone on reddit says something that makes me chuckle a bit
>>
>>52489939
https://www.youtube.com/watch?v=0UTHlTJYeHc

i watched this and i don't like him anywhere near as much as trump. better than hillary though

>those fucking legs on that white chick
>tfw no gf
>>
File: 1451913987301.jpg (128 KB, 957x1382) Image search: [iqdb] [SauceNao] [Google]
1451913987301.jpg
128 KB, 957x1382
>browse C# security solutions
>ClaimsPrincipal
>ClaimsIdentity
>Claims
>ClaimsAuthenticationManager
how did they manage to make something pretty straightforward into something so complex
>>
>>52489939
/dpt/ is left, redneck.
>>
>>52490135
>implying
>>
>>52490135
My general feel of /dpt/ is Libertarian with a little anti mass immigration thrown in, I'm not really feeling a left-wing vibe here if I'm being honest.
>>
>>52490150
Really? I though the general feel of /dpt/ was programming. Silly me.
>>
>>52490150
and anti-SJW and anti-feminism
>>
>>52490160
Get professional help.
>>
>>52490160
No, that's the main topic, we may deviate from that topic, but we always come back to it. You can talk about anything you like here.
>>
>>52490167
I'm pro both of these.
>>
>>52490204
You self identify as a SJW?
>>
>>52490215
Yes because I believe women should have the same rights as men.
>>
>>52490220
The law doesn't discriminate against women though, women have the same rights as men.
>>
>>52489429
Except it didn't, they haven't even announced that they're making it yet.

>inb4 herpadur i was just pretending to be retarded
>>
>>52488565
A decentralized content aggregation network.

<3 iframes + postmessage
>>
Why people use Javascript when they could use the superior PHP?
>>
>>52490236
The law doesn't discriminate against blacks either.
>>
>>52490257
Correct.

Their problems are their own fault, it has nothing to do with with people.
>>
>>52490271
Yes its black peoples' fault for walking while black, cycling while black etc

Same way its the woman's fault for being raped.
>>
>>52490257
blacks and women are naturally different to white men. for instance, blacks and women aren't as likely to be genuinely interested in programming and willing to put time and effort into it. and it's completely natural, it's not that they get "scared" away from programming. give a toy truck and a doll to a bunch of chimps and guess which of the chimps play with the truck and which ones play with the doll.
>>
>>52488740
It's good to know our children are in capable hands though.
>>
>>52490284
You must be a troll, I shall ignore you now.

Goodbye.
>>
>>52490289
I'm not a stupid racist so I don't understand.
>>
>>52490332
ok
>>
is it just me or are physical books easier to learn from?
>>
>>52490284
It's a black persons fault when they murder and raping white women yes. Just as it's a white person fault when he commits crime. The former just happens far more than the latter.

Choices. Choices. It's what seperates Civilization from African failed states.
>>
>>52490364
i guess you'll be more inclined to "get your money's worth" and learn the material properly with a physical book
>>
this whole website is cancerous
>>
>>52488821
With the amount of blacks you guys have been ingesting as a country over the last few years, it probably will be before long. Remember we have at least 150 year head start on you guys of 'adopting' our colorful friends.
>>
>>52490371
Complete dodge
>>
>>52490389
like look at you faggots you are literally discussing black crime statistics in a fucking programming thread

/POL/ RUINED THIS WEBSITE
>>
>>52488881
lol wtf
>whitey sure has grown colorful
>>
>>52489758
filter ((>8).uncurry (+)) $ concatMap (flip map [5..8] . (,)) [1..4]
>>
>>52489076
kekd
>algebra in action, gents.
>>
>>52490418
Complete dodge
>>
>>52489158
>CS Grad guy, is that you?
>>
>>52490422
>Constant weebshit
>Tranny posting
>General off topic shit
>WAAH WHY IS SHITPOSTING WHEN I DON'T LIKE RUINING THIS SITE WAAH

Grow up.
>>
>>52489537
>what do i need to download to run c++ code?
Nothing.

https://isocpp.org/get-started
>>
File: 1447921043042.jpg (7 KB, 180x210) Image search: [iqdb] [SauceNao] [Google]
1447921043042.jpg
7 KB, 180x210
>>52490545
>Nothing.
>>
>>52490486
I'm actually starting to like agdg better than this shithole. Anime/trap posters are completely ignored, always progress posted, helpful and constructive criticism, no retarded OS/language wars. Not a huge fan of games and there is little code posted but /dpt/ threads are just so tiresome to go through now...
>>
>>52490486
weebshit is still infinitely better than /pol/ garbage

if you want to talk about how much you hate niggers or whatever just go back to your containment board.
>>
>>52490204
>>>/tumblr/
>>
>>52490545
A compiler
>>
>>52490600
>anime is better!
>go back to your containment board while we post anime outside of /a/ in a non-relevant thread!
>>
>>52490622
>>>/pol/
thanks in advance
>>
>>52490364
no, i think there's an effect of reading material from a physical book that sticks in you're mind better anon. however, the instant searchability of an ebook is hard to beat.
>>
>>52490622
This is an anime-themed website, not a stormfront-themed website.
>>
>>52490570
>starting
No, you were always a shitposter who could handle the fact that people aren't all the same. Go find yourself a hugbox like all the other millenial pussies who can't face the real world and stay there.

>>52490600
Fucking retard, do you not see how stupid post is?

/pol/ garbage is still infinitely better than weebshit
if you want to talk about how much youlove waifus or whatever just go back to your containment board.
>>
>>52490552
Are..you suggesting I'm wrong anon?
>>
What are the best languages to learn for beginners?
>>
>>52490650
couldn't* handle

Add more faggot and insults**
>>
>>52490650
>he doesn't like /pol/shit
>he must be a sheltered millennial!
or maybe he doesn't see the relevance of the the average IQ of blacks to programming

good job on proving this screencap 100% correct
>>
>>52490570
agdg is 10x better than this place. People actually make stuff there. People just shit post about languages here.
>>
>>52490660
Probably Python or C++.

To learn Python just about any training resource will do. However, to learn C++, only PPP2 will do.
>>
>>52490650
You're a retard.
I'm not talking about the racial shit, I couldn't care less. I'm talking about the lack of programming, and general faggotry that are these threads. Nothing but shitposting. No progress. Hardly any code. Wow, great programming thread guys.
Get fucked, you presumptuous cunt.

>>52490695
That's what I said.
>>
>>52490721
>That's what I said.
I know. I'm agreeing with you. Most people are happy about having people agree with them.
>>
>>52490721
programming isn't only about code

but a coder like you wouldn't know that
>>
>>52490160
>/dpt/
>programming

Fucking kek m8
>>
>>52490160
LOL. Do you see much programming in this thread?
>>
>>52490686
Again the exact same shit can be said about weebs and traps.

We all have to deal with. I've never been on /pol/, but I happen to think they are funny unlike weebs who are just pathetic, but I don't bitch about either because it's fucking 4chan and it's a massive community.

You faggots whining about /pol/ are the new furies, you ruin every thread for yourself by being obsessed about it.
>>
>>52490738
>coder
You belong somewhere else.
>>52490731
>happy about having people agree with them
Doesn't make a difference, but what I was saying is you pretty much repeated my post.
>>
>>52490773
He's obviously insulting the other poster by calling him a coder instead of a programmer.
>>
>>52490764
This is an anime-influenced website.

If you don't like anime and you like unfunny newfag /pol/ shit, why don't you go back to stormfront where you belong?
>>
What is your all-time favourite anime, /dpt/?
>>
>>52490812
Dragon Ball.
>>
>>52490804
>>52490812
>>52490818
weebs need to leave and go to reddit
>>
>>52490804
It's also and SA influenced website. Yet that was considered cancer in the first week of 4chan's existance. Just like weebshit on /b/ and other boards has been cancer as early as 2006 (while "/pol/ shit" was accepted).

But you wouldn't know that because you weren't old enough to be allowed internet access until 2010.
>>
>>52490818
I assume you mean Z, the original series was pretty shit.
>>
>>52490812
Kiloyu Selafasan
>>
So I'm working on the 'string exchange' program idea from the /dpt/ idea roller. I'm doing it between Haskell and C.
Right now I'm stumped as to how to interpret multiple 'arguments' as a single string. In C I can just format a string by looping through the known arguments but in Haskell as far as I know I can't do this.

Anyone have any ideas? Argument parsing in Haskell is already a mess.
>>
>>52490804
>If you don't like /pol/ and you like unfunny newfag anime shit, why don't you go back to >>>/a/ where you belong?

I'm going to keep doing this until you stop being a fuckwit. So I guess I'll writing a script for it to run for 30 more years or so.
>>
>>52490812
LOGH

>>52490834
Are you kidding? The original was awesome.
>>
>>52490834
le 90s kid xD detected
>>
>>52490868
Born on 1993, a prime number. Jealous? I would be if I were born on a non-prime year.
>>
>>52490812
Hyouge mono
>>
>>52490840
main = do
combined <- fmap unwords getArgs
>>
>>52490812
ghibli
>>
>>52490812
Chobits
>>
>>52490812
gauhdlui
>>
>>52490804
>If you don't like anime
>and you like unfunny newfag /pol/

>implying those are antipodes
I-is /dpt/ a safe-space yet anon-kun?
>>
>>52490812
Battle Programmer Shirase
>>
>>52490834
No I include the both.
>>
how do i get better at bug testing shit?
im known as the company's garry newman for breaking stuff once in a while, but im also praised for writing good maintainable code in a short timespan
it doesn't add up
>>
>>52490812
Scooby Doo.
>>
Found a problem in an open source project in the repos of major distros. Too scared to go through the process of reporting and fixing incase I mess something up.
>>
>>52490939
Why could I have been born in a prime year?
>>
>>52490822
>implying 4chan wasn't weebcentral from the beginning
newfag pls
>>
Quick, everyone make a new thread with an image you like.
>>
>>52491089
Well, then first get someone who knows more about it than you, who you won't be too embarrassed in front of, to have a look at it as well anon.
>>
>>52491110
not till 310 you faggot
>>
>>52491053
unit testing
look over your code every once in a while while you write it. have someone else check it even.
>>
How can I avoid string overflows in scanf() in C?
>>
>>52491053
Only one of those is your imagination. Enjoy being fired soon.
>>
>>52491361
you avoid them by not using scanf and not using C
also, C doesn't have strings
>>
>>52491455
thanks
>>
NEW THREAD

>>52491552
>>52491552
>>52491552

NEW THREAD
>>
>>52491089
>implying open source recognize the existence of problems in their software
>>
>>52488589
Someone try to make a case that argues this teaches kids addition better than the old method. Protip: you can't even think of one argument.
>>
>>52488873
I'm at a loss.
Thread replies: 316
Thread images: 25
Thread DB ID: 435782



[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | 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.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at [email protected] with the post's information.