[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
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

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

Thread replies: 255
Thread images: 42
File: NSA.jpg (89 KB, 1366x768) Image search: [Google]
NSA.jpg
89 KB, 1366x768
old thread: >>54497019

What are you working on, /g/?
>>
>>54505857
first for blacks are not human
>>
>>54505857
what kind of skirt is best for programming?
>>
>>54505866
>>>/pol/
>>
>>54505857
>Creating threads before the bump limit just so you can post your literal faggotry
Delete this thread and kill yourself
>>
File: C vs C++.png (463 KB, 785x678) Image search: [Google]
C vs C++.png
463 KB, 785x678
>>54505876
plaid red pleated
>>
A nuclear war is eminent. Your neighbor has a fallout shelter/bunker and he lets you in. Inside the bunker is every programming resource you could imagine, however you have no internet connection. All you have is your laptop and whatever you carry with you. There is enough supplies in the bunker to feed 10 people for 100 hundred years.

What do you program on your laptop?
>>
>>54505934
FizzBuzz
>>
>>54505945
Cool. I would try and program a virtual 3D world of some sort.
>>
>>54505876
Red green tartan kilt.
>>
>>54505934
try to form a super computer to run a simulation to repopulate the earth
>>
>>54505934
>food for 10 people for 100 YEARS
>implying any food would last that long
>implying your bunker is large enough to hold 100 YEARS OF FOOD FOR 1 PERSON TIMES TEN
>>
>>54505857
About to make a perlin noise generator in glorious C and interface it to more glorious scheme.
>>
>>54505987
This is all theoretical anon. Besides I'm pretty sure dried food that is vacuum sealed could last pretty long. Alsa maybe there is a greenhouse in the bunker?

>>54505985
You mean create an AI to try and figure out how to go about doing it, the logistics of it all?
>>
>>54505987
>implying any food would last that long
You'd be surprised how long certain canned foods can last. Not to mention alcohol is a reasonable nutrition strategy and lasts forever too. There's a reason why beer is big in Germany with its evil frosty winters.

And the bunker might be the remains of some missile silo the neighbor's house was built on top of. The root poster might be living in a place with tons of silos like the midwest.
>>
>>54505876

None. You should program without any clothes on.

>>54505934

Video games. Something to keep myself and the neighbor entertained.

>>54505987

Honey will last thousands of years.

Dried foods, stored in a cold enough environment, will last a damn long time, although not 100 years.

If you have the materials to grow your own food underground, you could last as long as you can generate electricity for heating lamps and such... presuming the soil doesn't get irradiated, that is.
>>
>>54506104
>and the neighbor entertained.
Uhhh about that... You rape and kill him.

Whoops
>>
>>54505987
Honey
Glucose
The neighbor's children
Pop Tarts

All of these could last 100 years
>>
>>54506104
>Video games
You think you could program a video game like Oblivion by yourself in 100 years? From scratch.
>>
>>54506128
I wonder if you could survive of that and vitamin supplements
>>
File: 1462992664959.webm (3 MB, 720x480) Image search: [Google]
1462992664959.webm
3 MB, 720x480
>>
>>54506258
what the hell is Cbase?
>>
>>54506138

I never said I'd make a game like Oblivion. It'd probably be 2D.
>>
>>54505857
Source? Is it Himegoto?
>>
>>54505857
Why does Xcode take so fucking long to install?
>>
>>54506258
Souce, plox.
>>
>>54505866
sub-species of human
>>
Does anyone have some resources on pseudorandom number generation techniques? I need to write a weird pseudorandom number generator and I can't seem to find what I'm looking for.
>>
>>54506678
https://en.wikipedia.org/wiki/Xorshift
>>
>>54506678
>a weird pseudorandom number generator
use the digits of pi, you can compute the n-th digit in O(1) time
they seem pretty random to me
>>
>>54506684
This is getting somewhere...

Basically I am looking to deterministically generate a random looking number n from a vector [n1,n2,n3.....nk] in such a way that traveling through that vectorspace is still randomized. I don't need it to be cryptographically secure.

If anyone has some ideas or resources about anything like that, that would be pretty dope.
>>
If I wanted to create a new file in c++ by copying an old file how would I do that.
A getline while loop seems way too slow. There has to be a better way like just setting the files equal to each other.
>>
>write app code in C++
>need to make it callable from Objective-C
>using Objective-C++
iOS is a mess
>>
>>54506762
FILE *in = fopen("input.txt", "rb");
FILE *out = fopen("copy.txt", "rb+");
fseek(in, 0, SEEK_END);
long len = ftell(in);
fseek(in, 0, SEEK_SET);
fwrite(in, len, 1, out);
fclose(in);
fclose(out);
>>
>>54506746
Xorshift is one of the best if not the best not cryptographically secure prngs. It's fast, yet it's also high quality.
>>
>>54506793
>raw pointers
disgusting
>>
>>54506746
>>54506811
So I don't know much about vector spaces, but you could use this as a basis for your prng.
>>
//interest rate calculator using simple interest
#include <iostream>
using namespace std;

int main()
{
float princ, rate, spent, balance, interest, time;
cout << "How much money was initially deposited?" << endl <<": ";
cin >> princ;
cout << "What is the interest rate percentage?" << endl << ": ";
cin >> rate;
cout << "How long has the money been in the account (years)?" << endl << ": ";
cin >> time;
rate = rate * 0.01;
cout << "How much money has been spent?" << endl << ": ";
cin >> spent;

//interest calculation
interest = princ * rate * time;
//balance calculation
balance = princ + interest - spent;

cout << "\nYour account balance is ";
cout << "$" << balance;
return 0;
}
>>
import math
# Largest Prime Factor
# The Prime Factors of 13195 are 5, 7, 13 and 29.
# What is the largest prime factor of the number 600851475143 ?
factors = []
prime = []
number = 13195
#number = 600851475143

i = 1
j = 0

while i < number:
if number % i == 0 and i !=1:
factors.append(i)
i+=1
print(list)

for j in factors:
for k in range(2, math.sqrt(j)+1):
if j % k != 0 and j not in prime:
prime.append(j)
print(prime)


I can't seem to figure out why this doesn't work, I have a feeling my second loop doesn't even need to be there.
>>
>>54506841
>interest = princ * rate * time;
lel
>>
>>54506857
How would you have done it?
>>
>>54506859
https://en.wikipedia.org/wiki/Compound_interest
>>
>>54506869
The exercise said use simple interest, but I could do compound or continuous compound.

How would you express the constant 'e' in C++ though?
>>
>>54506818
You're suggesting smart pointers, right?
>>
>>54506811
Don't give a shit about crypographic security.

>>54506823
It's clearer if I post a non-working attempt I think

float rand_3d_determ(unsigned int x, unsigned int y, unsigned int z, unsigned int w) {
y = y << 8;
z = z << 16;
w = w << 24;
unsigned int combined = (x & 0x00000011) + (y & 0x00001100) + (z & 0x00110000) + w;
srandom(combined);
return random()/((float)(RAND_MAX));
}
int main() {
printf("%f\n",rand_3d_determ(1,0,0,0));
printf("%f\n",rand_3d_determ(2,0,0,0));
printf("%f\n",rand_3d_determ(3,0,0,0));
printf("%f\n",rand_3d_determ(4,0,0,0));
printf("%f\n",rand_3d_determ(5,0,0,0));
printf("%f\n",rand_3d_determ(6,0,0,0));
}

I want each of those calls to rand_3d_determ to be wildly different but for some reason they're outputting the exact same thing.
>>
>>54506920
It's 2016, you shouldn't have to juggle pointers.
>>
>>54506923
I'm a dumbass. Should have done F's instead of 1's on those bitmasks. Well it works now.
>>
are there any decent all-purpose IDE's?
having to switch when working with different languages is a pain

>inb4 vi(m)/emacs
i like GUI's thank you very much
>>
>>54505857
>What are you working on, /g/?

Just trying to average these ints over here...
>>
File: currentyear.jpg (94 KB, 1600x900) Image search: [Google]
currentyear.jpg
94 KB, 1600x900
>>54506926
>>
>>54506980
I'm not recommending vim. I'm recommending
>vim
>automake
>gdb
>valgrind
>screen
>rlwrap
>>
>>54507017
>running a debugger in cli
noty senpai
>>
so /dpt/ why don't you stream your programming work over twitch.tv? There's so few streams everytime
>>
>>54507017

Why run an IDE when you can cobble together a shit-ton of nonsense?

I don't like making software, I like making complex processes.
>>
>>54507034
Say what you will about gdb but
>hating on valgrind

>>54507041
twitch.tv is video games only you get banned for non-video games

>>54507045
valgrind, automake, rlwrap, and screen are braindead easy to use. that leaves vim and gdb.
>>
>>54507078

Nobody ever said anything about 'easy' or 'hard'. What is it with /g/? Anytime someone criticizes a choice, /g/ comes back with some shit response that tries to imply that the other said it was too hard.
>>
>>54507078
>twitch.tv is video games only you get banned for non-video games

uhh..?
twitch.tv directory/game/Programming
>>
>>54507106
>shit-ton of nonsense
>complex processes
>i wasn't saying it was hard or anything
>>
>>54506980
Jetbrains, Atom, VS, NetBeans
>>
>>54507017
But you're still recommending vim so your opinions are invalid

Enjoy your placebo editor. The greatest programmers in the world use emacs, acme, and IDEs because they are intelligent enough to see beyond themselves and understand that they are not actually more efficient when actually programming with a modal editor.

FACT: 99% of "efficient" vim users just re-arrange config files all day
Vim is a great text editor but a disappointing program creator
>>
>>54507116

>sees the word complex
>thinks it means hard
>doesn't consider fragility
>doesn't consider time spent on configuration
>doesn't consider long-term engineering costs

Fucking idiot.
>>
>>54507111
>directory/game/Programming
>game
>>
File: giphy[1].gif (605 KB, 512x588) Image search: [Google]
giphy[1].gif
605 KB, 512x588
>>54507078
>twitch.tv is video games only
/directory/game/Programming

GET REKT! *Blows Airhorn*

You can stream your codeing on twitch and have bots spam your empty chat with links to other streamers and websites where you can talk to hot grills. Kappa
>>
>>54507151
games and programming then
>>
>>54507137
The fact that there's "game" in its url doesn't mean you can't stream non-games programming. Is there a rule? Because I see a lot of streams not related to games (like people programming twitch bots).
>>
>>54507163
>>54507157
>>
>>54507136
>implying half those things need configuration
>implying all of those things need regular configuration
>implying hard can't be a synonym for laborious

>>54507134
Did you just say emacs users spend less time than vim users editing config files and more time programming?

Top kek. You clearly don't know about emacs.
>>
>>54507151
Nobody will watch you stream tho.
How many people do you think venture below the fold of twitch's homepage?
How many do you think actually click past the first page?
Nobody.
How many would want to watch you write code?
zero.
>>
hey /dpt/

Can somone show me a great recourse for learning C/C++? I am familiar with Python thus know how languages work and such but just a nice place to get started
>>
>>54507173
Except that's not true. If you are good and do interesting stuff, you'll get viewers. See people like Casey Muratori.
>>
>>54507170
Programming your text editor in a desperate bid to make it as good as a real IDE is still programming.

Since vimfags don't use lisp, they can only ever script.
>>
>>54507183
The C++ Programing language
>>
File: hue.gif (897 KB, 800x430) Image search: [Google]
hue.gif
897 KB, 800x430
>>54507173
>How many would want to watch you write code?
>zero.

>You can stream your codeing on twitch and have bots spam your empty chat with links to other streamers and websites where you can talk to hot grills.

PREEMPTIVELY REKT

BRUTAL

SAVAGE

*airhorn*
>>
>>54507187
Does he constantly commentate what he's doing?
that's probably why.
nobody watches streams for the video games, they're there for the personality
>>
>>54507183
>I am familiar with Python thus know how languages work

;^)
>>
File: hetzer.jpg (319 KB, 1024x751) Image search: [Google]
hetzer.jpg
319 KB, 1024x751
>>54507183
This is literally all you need. (Besides G++)
www.cplusplus.com/doc/tutorial/
>>
>>54507191
I don't need vim to be an IDE when I have a terminal mutexer though foolish emacser. All I need it to be is a text editor.

Meanwhile emacsers try to make emacs their IDE, email client, web browser, version control system, text editor, and end up having to configure EVIL mode anyway.
>>
>>54507225
>mutexer
uh
>>
>>54505857
On my will
>>
>>54507225
>>54507238
terminal multiplexer*
>>
>>54505857
i'm learning opengl, but slowly, because this superbible book is shit and every online tutorial is even worse

also why is that boy wearing a dress?
>>
>>54507225
I don't even use emacs. I use acme. And you're full of shit. I've never seen a real emacs user doing real work use more extra shit than gdb, shell, and slime.

>terminal emulator multiplexing
>not using the display system
Harmful, and also bloat. That's way too many layers of abstraction. What's the point of making fun of emacs users when you have to deal with a similar clusterfuck that's just split into different programs?

And why aren't you at least using neovim?
>>
>>54507254
>this superbible book is shit
Why did you write the word shit twice?
>>
>>54507254
RTFM read the manual, wiki and the spec, don't read tutorials they're fucking shit
>>
>>54507278
>>54507269
should I read the red book then?
because it looks like a reference text more than anything else
>>
>>54507269
consider my fedora tipped
>>
>>54507284
i haven't read it but it's probably fine, just get a recent edition with modern opengl stuff not just the deprecated fixed function pipeline stuff
>>
>>54507269
>>54507287
>>
>>54507268
goodnight australia have fun with acme
also i recommend upgrading to a computer that can handle screen its a little strange yours cant
>>
>>54507305
please don't post regressive left propaganda thanks
>>
File: 1443661660459.gif (184 KB, 500x382) Image search: [Google]
1443661660459.gif
184 KB, 500x382
>>54507293
>Making your own game engine
>Not using one of the millions that already exist.
Why?
>>
>>54507321
Probably because he just want to _learn_ and not make actual games?
>>
>>54507321
kys
>>
>>54505857
I'm trying to build an iOS app with Xamarin, but when I go to launch the iPhone Simulator it just gets stuck on launching forever.

>Launching app on 'iPhone 6s Plus iOS 9.3'...

I'm using Visual Studio and SSHing into a Mac with all the right stuff installed.
>>
File: 1442634173737.jpg (74 KB, 1280x720) Image search: [Google]
1442634173737.jpg
74 KB, 1280x720
>>54507343
Spending hours _learning_ how to do something he will never need to know or find useful is just... oh wait I'm talking to an Arch user.
>>
>>54507374
kill
your
self
>>
>>54507374
>obtaining knowledge is bad
why am i not surprised it comes from a worthless weeb
>>
>>54507378
kill
you're
self
>>
fuck off to >>>/vg/agdg if you want to make shitty shit games using someone else's shitty shit engine
>>
File: 19598[1].jpg (56 KB, 400x320) Image search: [Google]
19598[1].jpg
56 KB, 400x320
>>54507378
>>
>>54507374
So what happened at work today? Lots of built up anger.
>>
File: 66311223[1].jpg (112 KB, 400x400) Image search: [Google]
66311223[1].jpg
112 KB, 400x400
>>54507374
>>
File: 51525148515448505553.jpg (65 KB, 917x1075) Image search: [Google]
51525148515448505553.jpg
65 KB, 917x1075
>>54507374
>>
>>54507321
when you use an engine you're still doing pretty much all the work, you're just limiting yourself by using an engine, it's only good for if you want to make a fucking ripoff with zero effort put into it or if you're making some soulless cookie cutter call of doody tier shit
>>
>>54507440
>when you use an engine you're still doing pretty much all the work
i dont have a reaction image for this shit
>>
>>54507443
KILL YOUR SELF

FUCK OFF TO >>>/vg/agdg STUPID SHITTER
>>
>>54507447
whats with all the goddamn spergs lately?
>>
File: 12754757.jpg (279 KB, 1200x1600) Image search: [Google]
12754757.jpg
279 KB, 1200x1600
>>54505857
What is it about programming that turns so many people gay?
>>
>>54507452
what's with all the goddamn millennial shitkids lately? programming is not hard, you're just imagining that the game engine is some magical thing of gargantuan complexity that saves you a ton of work, you're just clueless
>>
>>54507447
not him, why is using an engine so frowned upon here?
do you also insist on writing your own heap allocator, compiler and OS before doing anything?

I'm starting to think it's one assblasted autist who responds with >>>/agdg/ every time someone mentions how much time they saved by using a preexisting engine rather than slogging it alone from scratch and spending years and years with nothing to show for it
>>
>>54507462
if you're using an engine you should literally fuck off to >>>/vg/agdg, you're in the wrong thread stupid fag
>>
>>54507453
Nothing. There is perhaps 1 or 2 people who keep spamming the stupid trap meme on here.
>>
>>54507461
i've seen some projection in my life but holy shit anon

>>54507453
lack of females?
kind of like prison gays
>>
>>54507474
this, and then there's the vocal minority of retard tier career feminists and professional victims
>>
>>54507479
if you even have a game at all i'm sure it's riddled with technical flaws and just being a generally shitty lazy hackjob
>>
>>54507469
You still haven't mentioned why using an engine is bad.

What's the matter, not hard enough for you?
I bet you write everything in C like it's some kind of accomplishment to write shit in a 30 year old programming language with no object oriented.
>>
>>54507462
>not him, why is using an engine so frowned upon here?
The same reason arch/gentoo is so popular here.
One camp believes in learning how to build everything from scratch, the other believes in using the work others have already done and continuing from that.

Basically /g/ has political partys just like everything else, and this is a hot issue.
>>
>>54507512
they're fucking shit, plain and simple. unity is even intentionally shit (or they're FUCKING ARROGANT RETARDS) so that you have to buy assets to fix it!!!!!!!!!!!!!!!!!!!!!!!!!!
>>
>>54507513
libraries and engines are usually shit or at least overrated. if you have the ability and the resources, you should avoid relying on other people's shitty shit. "One is never served so well as by oneself."
>>
>>54507520
>they're fucking shit, plain and simple

You still haven't listed a single reason, anon.
>>
>>54507542
and why should i? fucking entitled millennial babby

go ahead and use someone's shitty engine, the joke's on you
>>
>>54507461
>>54507504
>>54507553
you sound like a suicidal 30 year old with nothing but /dpt/ going on in his life
go outside, get laid and get a job or something
or kill yourself, i dont really care which

>>54507513
this guy gets it
>>
>>54507553
list just one reason sweetcakes, just so I can know you're not completely full of shit, you fucking autist
>>
>>54507574
you should see the smug fag team that was on here bragging about their barely functioning irrlicht shit game, they couldn't even get rendering and physics to work

making a game has a lot of design, programming etc involved either way, an engine especially a shit engine just restricts you
>>
>>54507600
fuck off, this is more on topic than those discussions on bestiality from yesterday
>>
>>54507618
its more on topic but its lower quality. this thread should be purged
>>
opengl and making game engines is not hard it's just a delusional restriction entitled millennial shitkids impose on themselves, they tell themselves that they're too good to do it because they don't dare to even try
>>
when using a game engine *properly* you still have to write your own shaders and program the game logic etc, you're still doing a lot of work
>>
File: 1422065068795.png (98 KB, 473x458) Image search: [Google]
1422065068795.png
98 KB, 473x458
>>54507618
>fuck off, this is more on topic than those discussions on bestiality from yesterday
God I love dpt
>>
Guy from yesterday with the portability issue. It turns out the problem was that OpenGL 4.4wasn't letting me change attributes in the shader while 3.3 does for whatever reason. I have no fucking idea why this is and I think it is stupid if they removed this ability but there it is. Problem resolved. One of many more to come I can only assume.

But I fixed it by declaring floats in the shader and passing the attributes to those first.
>>
>>54506526
Goldenboy
https://www.youtube.com/watch?v=CX2EFdDMUrY
>>
>>54507660
>when using a game engine *properly* you still have to write your own shaders
The whole point of using a game engine is so you DONT have to write your own shaders.

You make the game logic, the engine handles the physics, shades, resolution, exc.

You use a game engine so you spend time actually working on the game and not the way pixels are presented on the screen.
>>
>>54507701
no, then you just end up with generic steam greenlight shitter game #1235153435
>>
>>54507701
>"actually" working on the game
Not that guy but I resent this phrasing. Just because you are going deeper than people that are using pre-built engines doesn't mean you aren't working on a game. There are countless reasons to go deeper.
>>
File: 1406803019377.jpg (103 KB, 1280x720) Image search: [Google]
1406803019377.jpg
103 KB, 1280x720
I want /agdg/ to leave
>>
File: 1411232558157.gif (298 KB, 500x281) Image search: [Google]
1411232558157.gif
298 KB, 500x281
>>54507732
I second the motion.
>>
File: cplusplus.png (55 KB, 1597x935) Image search: [Google]
cplusplus.png
55 KB, 1597x935
What the fuck did I do wrong?
>>
>>54507732
this
>>
File: cinnamon.webm (472 KB, 800x450) Image search: [Google]
cinnamon.webm
472 KB, 800x450
Ask your favorite programming literate anything (IAMA)

>>54507183
There is http://www.learncpp.com/ but how it's confusing functions with procedures is embarrassing.

This may help
https://github.com/fffaraz/awesome-cpp
https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

>>54506811
There is a new one: xoroshiro128+

http://xoroshiro.di.unimi.it/

PCG is also a top notch prng

http://www.pcg-random.org/

>>54506453
Yes
>>
>>54507762
Your missing a default visual studio include. I don't remember what it is. Just make a new, non blank c++ file and it will have it.
>>
>>54507732
one of the biggest circlejerks I have seen
>>
>>54507762
You aren't linking to the correct location.
>>
>>54507779
>There is a new one: xoroshiro128+
>http://xoroshiro.di.unimi.it/
thx
>>
>>54507762
You used the postfix incremented meme.
>>
>>54507786
FUCK OFF, I MAKE GAMES FOR FUN NOT FOR MONEY, WHY WOULD I PROGRAM MY GAME FROM SCRATCH WHEN I CAN JUST COPY PASTE INTO BASED UNITY

BUY MY PIXEL PLATFORMER YYYYYYYYOU KEK
>>
>>54507792
Linking what? All I did was create new blanc c++ project then typed this hello world program.
>>
>>54507820
Why the fuck are you in this thread?
Clicking and dragging shit into your gooey game engine is not programming.
>>

#A palindromic number reads the same both ways.
#The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
#Find the largest palindrome made from the product of two 3-digit numbers.
palin = []
i = 100
j = 100
while i < 1000:
while j < 1000:
x = i * j
print(" "+str(x)+" = "+str(i)+"*"+str(j))
if str(x) == str(x)[::-1] and x not in palin:
palin.append(x)
j+=1
i+=1
j=0
palin.sort()
print(palin[len(palin)-1])


Using Euler project to learn programming.
My brain is dead, this code feels horrible, I can't think of how to reduce all the duplication.
>>
File: 12312132.jpg (5 KB, 250x250) Image search: [Google]
12312132.jpg
5 KB, 250x250
>>54507841
Welcome to the wonderful world of programming. You're gonna love it.
>>
File: latest[6].jpg (20 KB, 400x400) Image search: [Google]
latest[6].jpg
20 KB, 400x400
>>54507841

You have to include stdafx.h if you are using Visual Studio as your debugger. It's a visual studio thing.
>>
I-m learning how to use bootstrap to make responsive html5 pages

>inb4 that's not programming
>>
>>54507890
fuck off to >>>/g/wdg fag
>>
How do I get into reverse engineering/learning ASM?

I only ever made multiclients for shitty games by patching out mutex/semaphore checks but that's all I know when it comes to ASM (so a few simple instructions) and RE in general.
>>
>>54507854
I just realised I don't even need a list.
#A palindromic number reads the same both ways. 
#The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
#Find the largest palindrome made from the product of two 3-digit numbers.
palin = 0
i = 100
j = 100
a = 0
b = 0
while i < 1000:
while j < 1000:
x = i * j
if str(x) == str(x)[::-1]:
if palin < x:
palin = x
a = i
b = j
j+=1
i+=1
j=0
print("The largest Palindrome for the product of two 3-digit numbers is "+str(palin)+" = "+str(a)+" * "+str(b))


I still think I could go through all the 3 digit products better, I have duplication.
>>
>>54508023
don't use python
don't use strings, you should do it "numerically"
>>
>>54507222
>>54507779
ty ty ty c:
>>
>>54507944
Check for tutorials, write your own C programs and reverse them, practice with crack-me's and so on.
>>
>>54507886
Doesn't work though
>>
File: 1444364307542.png (410 KB, 3000x3000) Image search: [Google]
1444364307542.png
410 KB, 3000x3000
I'd just like to interject for a moment. What you're referring to as bussy is in fact boy/pussy or as I've recently taken to calling it, boy+pussy.
>>
>>54508214
>TODO
everytime
have a piece of absolute garbage code?
dont worry, just slap a // TODO above it, check it in and call it a day
>>
>>54508023
Using range() is a much better way of looping through all integers in a given range. To prevent the duplication, you check only integers in the inner loop that are equal to or greater than the current integer in the outer loop; for example, if in your code i is 100, check j from 100 to 999. when I becomes 101, check j from 101 to 999, etc.

You only need a couple lines to do this cleanly:

palindrome = 0
for i in range(100,1000):
for j in range(x,1000):
if str(i*j) == str(i*j)[::-1] and x*y > palindrome:
palindrome = x*y
print(palindrome)
>>
>>54508327
...I dunno how I fucked up the variable naming like that. x = i and y = j. You get the idea.
>>
>>54508327
>>54508350
Thanks, that way of thinking suddenly clicked for me.

I'd love to try make something a little more mathematically optimised, like knowing that palindromes have a particular mathematical property and that I use that to only search a smaller range, I guess I will need to get better at mathematics first.
>>
Java is the best programming language. Thousands of packages and libraries and extremely fast. You don't have to code ENTERPRISE QUALITY if you don't want to.
>>
>>54508384
Go away, Pajeet.
>>
>>54508130
Any specific website that's some sort of a database of crackmes and such?
>>
>>54506980
What are you primary languages?
>>
>>54507779
This webm made me stand up and clap.
>>
File: 51555148494956564853.jpg (56 KB, 1205x720) Image search: [Google]
51555148494956564853.jpg
56 KB, 1205x720
>>54508448
literally the first google result, anon

I also used to use this website

>spin.quequero.org / index_old.php

but it's italian so gl with that
>>
>>54508411
C and Visual Basic are the most Pajeet languages
>>
File: Ada_Lovelace_portrait.jpg (2 MB, 2439x3504) Image search: [Google]
Ada_Lovelace_portrait.jpg
2 MB, 2439x3504
>>54507305
Don't forget the inventor of the algorithm
>>
>>54508604
>inventor of the algorithm
what
>>
Whera re the car parts where I died?
>>
>>54508636
Check the glowing crate right next to you, ya dingus.
>>
>>54508639
I died again. What do?
>>
>>54508597
>C and Visual Basic are the most Pajeet languages
let me fix that for you
Java is the most pajeet language
>>
>>54507305
Bullshit. the pioneers in computer engineering never listened to turing. Turing actually become famous in computer science after his dead. Read a book sometime.
>>
>>54508384
Poo in compiler Sanjay.
>>
>>54508698
Your a pajeet language, basterd .
>>
I need someone to verify my logic here.
Let's say I have an async network model using Boost.Asio, now I also have a class that performs all the server logic. Would it be enough that for each async packet, I schedule a logic function through some thread that executes those one at a time? Would that prevent race conditions from happening without the need for locks on virtually everything in the logic class?
>>
>>54506793
>undefined behavior
ishyggy
>>
>>54508604
>Write "first" program (if you disinclude the Alexandrians)
>"invented the algorithm"
If you're going to shit post at least go all out and say she invented computers.
>>
>>54507106
>I can't do it anons
please leave
>>
>>54508746
QUOTE UNQUOTE PROGRAM
he only used her for her connections to high society
>>
>>54507134
>recommending vim
m8, how retarded can you be, really
>>
>>54507134
>program creator
ah, you're the kind of webshit that needs GameMaker type software to get anything done
>>
>>54508761
To tell the truth, I feel like the list of people that wrote programs before Ada could be greatly expanded as well.
>>
>>54507134
>placebo editor
>vim is a great text editor
Are you mentally ill?
>>
>>54508597
>C
>Pajeet
What? That literally makes no sense.
Do you even understand the pajeet meme?
>>
>>54508698
your a too
>>
>>54507268
>I use acme
>mouse programmer
bwahahahahahahahaha, opinions fucking discarded
bwahahahahaha
>>
>>54508723
your a too
>>
>>54507474
ask me how I know you're not a real programmer
>>
>>54508826
All bell labs used acme since they always improve their tools
Ritchie, Thompson, pike, etc

Keyboard only is a thing of the past
>>
>>54507732
>game programming is too hard with all the math and physics
>muh css fizzbuzz tho
>animoooooooooooooooooooo
m8...
>>
File: 1213432443.jpg (504 KB, 10000x10000) Image search: [Google]
1213432443.jpg
504 KB, 10000x10000
>>54508850
>/agdg/
>Programming
>>
>>54508850
>with all the math and physics
>Implying people who use off the shelf game engines do any of that shit
People who write game engines do that shit, not people who use click and drag gooeys.
>>
>>54508847
>no bully
hahahahahaha, fuck off with your mental illness
>>
>>54508847
seems like these three random guys are just some shitters that don't know how to computer and how to be efficient
>>
>>54508856
Agdg program in pure low level libraries like directX or OpenGL

A lot more math involved than Haskell as well!
http://www.vex.net/~trebla/haskell/prerequisite.xhtml
>>
>>54508856
>muh degeneracy
>>
UMARU-CHAN EDITION WHEN???
>>
>>54508860
>how to computer
muh mouse
>how to be efficient
muh multitouch
>>
File: 1422950659138.jpg (18 KB, 526x297) Image search: [Google]
1422950659138.jpg
18 KB, 526x297
>>54508861
>/agdg/
>Programming anything
Literally go to /agdg/ and mention you are doing anything remotely low level and prepare to be called an enginefag and promptly told to use Unity(tm).
>>
>>54508861
>Implying that anyone in /agdg/ writes game engines
>Implying that anyone in /agdg/ can program
>>
>>54508883
>implying /dpt/ is different
anon...
>>
>>54508883
Lots do, but of course you are just memeing
>>
>>54508892
Not everyone is as incompetent as you, anon.
>>
>>54508857
>not people who use click and drag gooeys
b-but... muh Acme!
>>
>>54508904
c'mon m8, we all know already; be honest, you can't even average 2 ints, amirite?
>>
New trap thread when?
>>
File: 1462073047356.gif (2 MB, 275x319) Image search: [Google]
1462073047356.gif
2 MB, 275x319
>2 people starred my library on Github
>begin to panic that it has some major issue and they are going to bully me
>>
>>54508925
Don't fear mistakes, if they find an issue they'll report and you'll fix it.
>>
>>54508925
>mentally ill animufag fears bullying
you should
>>
My first brainfuck program.

++++++++++[>+++++>+++<<-]>--->++<<++++++++++[>+.>.<<-]
>>
>>54508925
>I'm afraid of improving myself and my code
>>
>>54508932
unless cuck license
>>
>>54508939
>mentally ill animufag
At least that is better than the mentally ill fag who goes onto anime sites and complains about anime.
>>
>>54508960
>>54508939
Can we not do this today?
>>
On making a usable desktop of my old laptop after i was served with a search warrant, fml.
>>
>>54508987
>i was served with a search warrant
What did you do?
>>
>>54508925
>github
>afraid they are going to bully me
Just pretend you are a woman or black.
>>
>>54508977
animu is the cancer of /g/ tho
>>
>>54509017
You're welcome to your opinion, but anime is an ingrained culture within the entirety of 4chan. It's literally welcome on every single board, preferably when related to the particular subject matter of a thread.
>>
>>54509017
Anime has been here a lot longer than you, bud.
/g/ is for guro, not normies.
>>
>>54509017
>anime is cancer on the site created for animefans
weirdly true
>>
File: 1337103161805.jpg (117 KB, 461x500) Image search: [Google]
1337103161805.jpg
117 KB, 461x500
teaching myself php
have to take it as an online course next semester because it didn't fit in my schedule, so i'm trying to get a headstart.

any good internet resources? rn i'm using codeacademy but its kinda shit, so i may look at khanacademy. those are the only two i really know
>>
>>54509049
>>>/g/wdg/
>>
>>54508999
posted anime to a technology board
>>
>>54509030
>culture
sub
>literally welcome
not on /g/
>>54509031
/g/ is for technology, newfags like you can't possibly know this
>>
File: oneslowgtp.jpg (102 KB, 500x1200) Image search: [Google]
oneslowgtp.jpg
102 KB, 500x1200
>>54509017
>>
>>54509073
>muh mental illness
>>
File: 1374577599111.png (318 KB, 664x602) Image search: [Google]
1374577599111.png
318 KB, 664x602
>>54509067
>/g/ is for technology
Jesus christ, you must really be new.
>>
>>54509073
>reddit: 129
>4chan: 1051
This pic really is ancient
>>
>>54509100
>illiterate can't read page title
ok
>>
>>54509073
ash ketchum hates anime?
>>
>>54509109
the 4chan one looks edited, look at the spell check
>>
>>54509111
>I've only been on 4chan for a few weeks
Fucking lurk more
>>
>>54509181
hasnt been goro since like 2004 you fucking ape
>>
>>54509200
>goro
>>
File: 1452907689577.jpg (132 KB, 500x1200) Image search: [Google]
1452907689577.jpg
132 KB, 500x1200
>>54509073
>>
>>54509181
fucking learn to read you inbred retard
>>
File: 1391219317257.png (580 KB, 800x2810) Image search: [Google]
1391219317257.png
580 KB, 800x2810
>>54509217
>>
anime is cute :3
>>
>>54509246
This is wrong though.

/b/ doesn't hate anime.
>>
>>54509296
How on earth would you know that?
You don't actually go on fucking /b/, do you?
>>
>>54509296
except that /b/ does
/b/ has no community is not somethng nor anything dont say stupid stuff
>>
File: 1234567890.png (115 KB, 322x276) Image search: [Google]
1234567890.png
115 KB, 322x276
>>54509311
Of course I do. It's the only board where lolis are permitted silly..
>>
>>54509246
>Lol funny comic about 4chum
>t. weeblord

4chan is one of the most popular websites in the world. Not everyone here likes anime. I'd be surprised if a majority of the site actually LIKED anime.
>>
>>54508826
>>54508829
>>54508850
>>54508892
Still a fucking faggot, I see.
Why're you not banned when you contribute literally nothing, and post the same repetitive bullshit so much you're actually identifiable?
>>
>>54509586
Outside of shit like /b/ and /v/, 4chan boards are still pretty obscure.
>Not everyone here likes anime
So? It's still a fucking anime website.
If I go to a racemixing cuck forum, and post about how much I don't like I don't like racemixing cuckoldery, does that make it not a racemixing cuck forum?
>>
I've just gotten into a weird habit of naming (not variable names) but in my documentation I have given objects weird little human nicknames. Like my InputController is Addie, ProcessController is Derek, and my OutputController is Lucy.
Just wondering if anyone else does this. It's just for my own programs/games and will never transfer into code. It's just some weird habit I've gotten into in the past week.
>>
File: 1444805576558.jpg (44 KB, 544x509) Image search: [Google]
1444805576558.jpg
44 KB, 544x509
>>54509640
That is the most bizarre, absurd thing I have heard all day.
>>
>>54509586
b-but anime founded moot for this site~
>>
>>54509655

AND GUESS WHAT? THAT TRAITOR SOLD IT TO THE JAPANESE.

Never forget what they did to Pearl Harbor.

>>54509629
>Outside of shit like /b/ and /v/, 4chan boards are still pretty obscure.

Not particularly. /g/ is pretty fast compared to most other boards.
Thread replies: 255
Thread images: 42

banner
banner
[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.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.