[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 350
Thread images: 41

File: 1334682645405.jpg (475KB, 1024x1076px) Image search: [Google]
1334682645405.jpg
475KB, 1024x1076px
Old /dpt/ at >>51474126

What are you working on?
>>
>>51477701
Is LISP dead?
>>
second for C master race
>>
>>51477701
ThirD
>>
Friendly reminder that OOP is cancer and the only things worse than object-oriented programming are object-oriented languages.
>>
File: 1430853197680.png (331KB, 474x432px) Image search: [Google]
1430853197680.png
331KB, 474x432px
>>51477782
nice meme!
>>
File: jcexceptions.png (40KB, 623x368px) Image search: [Google]
jcexceptions.png
40KB, 623x368px
>>
File: raii.png (41KB, 649x365px) Image search: [Google]
raii.png
41KB, 649x365px
>>
File: 1447124961854.jpg (58KB, 500x581px) Image search: [Google]
1447124961854.jpg
58KB, 500x581px
C is fun to write, but fuck, everything take so much longer.
A simple codeeval solution written in C is more than 100 lines of code.
>>
>>51477934
That's a stupid thing to say.
>>
>>51477893
I try to avoid exceptions altogether
>>
I need to make a json file that is created by a GUI editor.

should I use C# or java?
>>
>>51477959
What platforms does it need to run on?
>>
>>51477893
At least he acknowledges based Scott Meyer.
>>
>>51477939
What kind of codeeval solutions are you writing that are 100 lines of code, anon?
>>
>>51477966
mostly windows and linux.

I'm planning on doing a 2D fighter but I need also to make a character editor and a separated player executable.

Maybe I'll make the player using SFML, but I need an editor that makes a json file.
>>
>>51477939
I don't think I've ever gone over 100 lines with C.
Maybe a few times
>>
>>51477939
Git gud
>>
>>51477939
#include <stdio.h>

#define MAX_BYTE 512
int main (int argc, char *argv[])
{
if (argc == 2)
{
FILE *file;
if ((file = fopen(argv[1], "r")) == NULL)
{
printf("Couldn't open file.\n");
return -1;
}
else
{
char buffer[MAX_BYTE] = {0};
char *ptr;
while(fgets(buffer, MAX_BYTE, file) != 0)
{
ptr = &buffer[MAX_BYTE-1];
while(ptr != buffer)
{
ptr--;
while(*ptr != '\n' && *ptr != ' ')
ptr--;
for(*ptr = 0; (ptr != &buffer[0]) && (*(ptr-1) != ' ');)
ptr--;
printf("%s", ptr);
if(ptr != &buffer[0])
putchar(' ');
}
putchar('\n');
}
fclose(file);
return 0;
}
}
else
{
printf("Incorrect usage. Program takes filename as argument.\n");
return -1;
}
}

r8 my word reverser, anon
>>
>>51478006
Well, cross platform UI is a bit better on Java. But the language and tooling for C# in general is much better.
>>
>>51478064
You could clean up those if-else statements
Just use one if statement for checking argc and one for opening the file
>>
>>51478064
>uses fgets
>still checks for newline
why
>>
>>51478064
I can't even read that.
Mine doesn't look much better.
void reverse_line(char *buf, unsigned len)
{
char array[200][200];
unsigned i = 0;
unsigned trv = 0;
while (sscanf(buf + trv, "%s", array[i]) && trv < len)
{
strncpy(array[i], array[i], strlen(array[i])); /* get rid of newlines */
trv += strlen(array[i]) + 1; /* traverse next word + space */
i++;
}
while (0 < i--)
{
printf("%s", array[i]);
if (i == 0)
printf("%c", '\n');
else
printf(" ");
}
}
>>
>>51478092
fgets leaves the newline in, you know.
>>
>>51478114
BTFO
T
F
O
>>
>>51478064
>>51478103
wait this is code for reversing the line?
>>
>>51478142
Reversing the word order of the line.
>>
>>51477934
I dislike the things Blow says (mostly to do with his dismissal of "big idea" languages and type theory) but at least he is doing something instead of just bitching.
>>
>>51478103
>printf("%c", '\n');
>>
>>51477939
Does codeeval have a score for "programmer time" in addition to "CPU time"? If not, it should.
>>
>>51478159
So why are none of you using strtok?
>>
I'm trying C# and Python
>>
#import math
code = 114688837778579513684337030346042655818
def is_prime(n):
for i in range(2, n):
if n%i == 0:
return False
return True
llimit = 1000000
mlimit = 9999999
while llimit < mlimit:
for i in range(llimit, llimit+999, 2):
if is_prime(i) == True:
if i%code == 0:
print i
break
else:
continue
print 'incremented '+str(llimit)+' to '+str(llimit+999)
llimit = llimit + 999
>>
File: 1428353052866.jpg (282KB, 1000x1000px) Image search: [Google]
1428353052866.jpg
282KB, 1000x1000px
>>51478198
>including anything but stdio.h
>>
Im writing a 4chan thread image downloader. In C.
Fun times.
>>
>>51478189
There's no point in enforcing that because you could just copy paste your solution from your editor and claim it took you 2 seconds to write the code.

Is it bad that that reverse words challenge tooke me like an hour?

>>51478198
I didn't know that was an option, even.
>>
>>51478229
trying to crack a bios password for a sony vaio, no proof of purchase and the s/n last 7 digit thing didn't work.
>>
>>51478229
if n%i == 0

should be
if n%i == 0 && n != i
>>
>>51478226
Why Python?

Do you want to be a shit programmer?
>>
>>51478064
>nested loops
Kek, C programmers are so fucking awful. Why would you make your solution O(n^2) instead of finding a faster way?
>>
>>51478239
don't feel bad, i spent at least that amount of time on a way to find lowest unique number
>>
I understand that Java syntax is retarded and I fully see why, but I am worried because I have an easier time reading Java than most anything else. Does this mean I am retarded?
>>
File: asem.png (66KB, 1344x658px) Image search: [Google]
asem.png
66KB, 1344x658px
I really don't understand. Any ASM tutorials you guys could suggest?
>>
best C# GUI linux library pls?
>>
>>51478346
sometimes instructors take problems from books verbatim, so if you google a unique sentence from the problem, you can find someone's solution
>>
>>51478346
>yfw this indian has been posting his homework on /dpt/ since September
>>
>>51478369
GTK+
>>
>>51478338
No, Java is just the opposite of Perl.
Nice to read but shit to write.
>>
>>51478369
>c# on linux
you should be shot
>>
>>51478270
ty
>>
>>51478346

I can give you details. I'm writing this message to let you know that I'm currently typing up how you would go about doing this. Wait just a bit (I'm finishing up my dinner atm).
>>
>>51478239
>Is it bad that that reverse words challenge tooke me like an hour?

I dunno, how long do you think it would take in Python?
>>
>>51478164
>dismissal of type theory
This I gotta see.
>>
>>51478424
What's wrong anon :^)?
>>
>>51478424
>you should hate a good language because the guys who made it worked at microsoft
full fedora m8

do you also believe in the illoominati and the NWO

top kuck
>>
>>51477934
How does C++ discourage RAII?
>>
>>51478443
It would take me a day, I'm not familiar with python's string libraries.
>>
>>51478443
' '.join(line.split(' ')[::-1])
or something
>>
>>51478424
better than Java. then again Vala exists and it's pretty much the same as C#.
>>51478449
>>51478164
his objection was pretty much
>games aren't academia
>safety doesn't matter in games
>i need speed (apparently he doesn't understand how good use of type theory can improve speed but w/e)
to be fair, his language is a huge improvement over C and it has some ideas worth pursuing in future languages. i'd still probably end up using Rust if i had to pick between the two, though
>>
>>51478452
good goy
>>
>>51478369
this >>51478424 >>51478525
I'd never use your shit in linux.
>>
what is jonathan blow's language called? i hope it's not called "jonathan blow's programming language"
>>
>>51478547
jai
>>
>>51478496
And the rest of the program is `import sys; for line in open(sys.argv[1]): print`
>>
>>51478547
all we know is the compiler is called "JAI" so people have started calling it that. it hasn't been confirmed by him AFAIK
>>
>>51478524
Well, the language I'm developing is based on type theory with dependent and linear types and the prototypical use case is for games/simulators. So we'll see how it fares against Blow's language.
>>
>>51478543
Why? C# is a great language. Why not use it on linux?
>>
>>51478577
cuz mono bad xd
>>
>>51478575
Good luck with that. You basing it on "Dependent types for low level programming"?
>>
>>51478577
why do I care if C# is a great language? it's tied to microsoft, more than enough reason not to, ever, use it.
>>
File: image001.jpg (124KB, 480x320px) Image search: [Google]
image001.jpg
124KB, 480x320px
>C#
>ever
even fucking Swift is better
>>
File: 1201395060095.jpg (7KB, 158x183px) Image search: [Google]
1201395060095.jpg
7KB, 158x183px
>>51478607
>>
>>51478607
Why is that any reason not to use it?
>>
>>51478632
Freetards won't use a language unless it's poorly specified, riddled with undefined behavior, and implemented by several competing organizations.
>>
what would be better, using libgit2 or wrapping process calls to git itself? i know how to use git but libgit2 is alien and confusing. c apis are always fucking garbage too and the api reference for libgit2 is easily the worst i've ever seen. what benefit does it have over just wrapping git processes?
>>
File: 1444987352105s.jpg (3KB, 125x125px) Image search: [Google]
1444987352105s.jpg
3KB, 125x125px
>>51478185
>>
>>51478597
It's mostly based on the material out there about linear capabilities, or rather that's what inspired me to augment your typical dependent type theory with linearity.

As far as I know, the approach I've taken is novel. The only other decent material on combining dependent and linear type theories I've seen just doesn't even make an attempt and does it modally, so you can either be working with dependent types or linear types but not both at the same time.
>>
>>51478575
by the way, is it eager/strict or lazy by default?
>>
Who /Allman/ here?
>>
>>51478663
>calling git from c

Why not write a shell script instead?
>>
>>51478346

Okay, same guy as >>51478431.

This question is asking you to process a single array (dunno if the array is of type SBYTE, SWORD, SDWORD or etc), but I'm going to imagine it's of type sbyte to keep things simple.

When writing this program, there is only ONE question you need to ask yourself (in the program) and depending if it's true, you should perform one loop with written tasks or another to process it. In order to process the array, ask this question: "Is the current number I'm looking at a positive or negative integer?"

IF it is positive, add the value into an array you'll make for yourself (since the question wants you to do so). And if it is NOT positive then it MUST be negative, so add that negative number to a different array. You're basically sorting these numbers into two piles, one being positive and the other negative.

Use a loop to go through the numbers and have it end when you get to the end of the array. Inside the loop you should have the decision structure for if the number is positive or negative. After making a decision, I suggest you write a procedure outside of your main procedure (like a function in C++) to separate the code and make it look a lot more clean and easy to understand.

I hope this helps. If you have any more questions, do ask.
>>
>>51478685
Strict. It's basically got the run time semantics of C, although it's not like ATS in that you have to write both a C program and the verification proofs separately. It's all-in-one.
>>
>>51478700
Sorry, but I have taste.
>>
>>51478660
Well meme'd
>>
>>51478563
b-but python is a shit language!!
>>
>>51478683
>The only other decent material on combining dependent and linear type theories I've seen just doesn't even make an attempt and does it modally, so you can either be working with dependent types or linear types but not both at the same time.
>>
>>51478660
>Freetards won't use a language

>>51478543
>I'd never use your shit in linux.

/dpt/
>>
>>51478703
well my program requires a little more than just calling into git, the git part is only a small part.
>>
>>51478739
It's not as bad as I just made it sound, but there's basically two separate type theories and you have to switch between them with special decorator expressions.

Mine integrates the two seamlessly, though I haven't put any effort into formally proving that it's sound. I'll save that for my masters thesis or something.
>>
>>51478346

Same as this guy >>51478705

One more thing I forgot to mention (dunno if you knew this or not), but the section where it says .DATA is where you list your variables, such as this:

"number1 BYTE 1"

"number1" is just the name of the array. "BYTE" is the type of array, and the 1 after BYTE is the actual content inside the array.

Under "main proc" is where you write your code/instructions.
>>
Can someone please recommend me a good beginners book or some resources on T-SQL?

I am completely overwhelmed trying to figure out where to start.
>>
>>51478543
I'd be careful to use any C# crap on any platform.
99% of software written in it is complete shit by people who just learned how to program.
>>
>>51478771
Good luck anon. I know almost nothing about type theory, but I'm sure there is a HUGE incompatibility here, else it would have been already proven. It would be too sweet to be true
>>
Thinking on buying SICP and 'The C programming language" but god damn they're expensive.

However you can easily find both in pdf version but having the physical book is just better. Is it worth it?
>>
>Get a job
>Alright this should be great
>No documentation to get familar with the system
>No comments in the code
>Code is not self documenting
>Duplicate data fucking everywhere
>Different access methods for every application some with 3 different access methods in the same app
>IIS servers hosted with only self signed certs despite working with important data
>Views with thousands of case statements in them
>Web pages that only work on IE 7-9 and chrome

What's the worst place you ever worked at code wise?

And should I even bother with a resignation letter or just not show back up?
>>
>>51478806
>99% of software written in it is complete shit by people who just learned how to program.
That's the same for pretty much every language.
>>
>>51478834
Read a few chapters of the pdfs to see if it is worth it.
>>
>>51478830
>It would be too sweet to be true
I've been thinking that too. I mean, I'm just an undergrad student, mostly self-taught, especially when it comes to advanced topics like category and type theory. But so far, everything has come together beautifully.
>>
>>51478853
>implying
It is true for other noob languages like VB or Python.
>>
>>51478845
>>IIS servers hosted with only self signed certs despite working with important data
nothing wrong with self-signed certs.
>>
>>51478198
>strtok
Never used it before. So I looked it up,
#include <stdio.h>
#include <string.h>

int main ()
{
char str[] ="- This, a sample string.";
char * pch;
printf ("Splitting string \"%s\" into tokens:\n",str);
pch = strtok (str," ,.-");
while (pch != NULL)
{
printf ("%s\n",pch);
pch = strtok (NULL, " ,.-");
}
return 0;
}

Good mother Mary...
>>
>>51478855
A big reason why I want them is because they are THE books.
>>
File: wasd.png (70KB, 1572x530px) Image search: [Google]
wasd.png
70KB, 1572x530px
About to order a custom WASD keyboard. I modified the default german layout to be more programming friendly. (Removed umlauts and moved common programming characters like curly braces onto the free space away from alt-gr)
What do you think?
>>
>>51478862
Intuition is quite important. You might not be able to formally prove the correctness (yet), but nothing is stopping you from "smelling" that there is something there.
>>
>>51478915
Might aswell get TAOCP and Concrete Mathematics too then if you want to fill your bookshelf.
>>
>>51478845
Just update their Adobe Reader and get moneyz.
>>
>>51478834
Used K&R is pretty cheap.
>>
>>51477934
What is the talking about RAII is literally 90% of the reason why it's useful.
>>
>>51478766
Mind explaining? It might be something that git can already do with some obscure command or option.
>>
File: 1367710994437.gif (2MB, 640x272px) Image search: [Google]
1367710994437.gif
2MB, 640x272px
>>51478965
>TFW I don't have permission to update or install anything

>TFW have to test outside of debugging by requesting a promotion to test and then testing my development work in Test

Hahahahaha
>>
File: Space-cadet.jpg (1MB, 2001x773px) Image search: [Google]
Space-cadet.jpg
1MB, 2001x773px
>>51478942
Don't forget the hyper and meta keys.
>>
>>51478969
those are all the nasty made in india international edition printed on literal toilet tissue
>>
>>51479011
Cool, where can I get one?
>>
>>51479011
why doesn't it have dedicated keys for parenthesis?
>>
How do I gain access to a massive distributed network to grow a Skynet AI?
>>
>>51479043
Get hired by Google
>>
>>51479033
Not everyone writes in Lisp anon
>>
>>51478983
i'm just making a dumb github clone for fun (to see if I can ... i probably wont be able to) and i need to do things like initialise new repositories.
>>
>>51479062
But it is for lisp machines
>>
>>51479062
>keyboard from a lisp machine
>not made for writing lisp
>>
>>51479053
I tried, they said I was underqualified and called me a madman.
>>
why is C# wrong?

it's not like you can't use the open source implementations.

if you don't want to use the open source implementations and still use microsoft as a legitimate argument, i pity you.

good goy m8
>>
>>51478229
>calculating all primes every time
>range(2,n) instead of range(2, ceil(sqrt(n)))
del self
>>
>>51479092
why is flash wrong?

it's not like you can't use ope source implementations

if you don't want to use the open source implementations and still use adobe as a legitimate argument, i pity you.

good goy m8
>>
>>51479080
>>51479082
Well don't I just look dumb now
>>
>>51479114
what's wrong with using the open source clone of propietary software?

you can't go full free software on non free hardware.

this is why ideologies are fucking stupid.

I'm sure you're using some non free software on your broswer or other shit on some server just to post that.

hypocrit
>>
>>51479138
>what's wrong with using the open source clone of propietary software?
have you used them? they're shit
>>
>>51479043
amazon gives you "free" credit for going to their conferences
>>
>>51479114
>why is flash wrong?
because you need a shitty plugin

>>51479146
mono is not bad desu senpai
>>
>>51479015
Not all of them. You just have to be careful.
>>
the actionscript virtual machine is open-source, though
>>
>>51479033
What do you mean? They're right beside the p and they don't need the shift key unlike normal keyboards (sadly).
>>
>>51479146
It's a waste of time to go full freetard today, just to use the internet I'm sure you'll need to use a non propietary software.
>>
>>51479160
The only good thing about mono is that it let's a kissless virgin like myself feel what it's like to have mono.
>>
>>51479162
Is it worth having a physical copy even?
I know I'm just gonna keep it on my shelf and I've already read through it like 3 times now.
>>
>>51479186
Oh indeed, the additional parenthesis in the usual place confused me.
>>
>>51478023
My average per file is also pretty low
$ for i in $(find -name "*.c" | grep -v 'pregen\|lodepng\|out.c'); do wc -l $i; done | awk 'BEGIN {sum = 0; n = 0} {sum += $1; n+=1} END {print "Average: ", sum/n, "Total: ", sum, "Items: ", n}'
Average: 122.503 Total: 18743 Items: 153

excluded some autogenerated files and lodepng
>>
>>51479206
That's up to you. If you have the money then it might be worth the $15 for a reference book.
>>
what do i put in my PATH variable to get mingw-w64 and g++ working in cmd prompt? I've tried mingw-w64/some bullshit/mingw64/bin but it's not working.
>>
>>51478232
>stdint
>stdlib
>string
>>
>>51478780

I appreciate it, but I'm still confused.

        .orig    x3000
and r2,r2,0
lea r3,file
in
ldr r1,r3,0
loop
add r4,r1,-4
brz enddata
not r1,r1
add r1,r1,1
add r1,r1,r0
brnp next
add r2,r2,1
next
add r3,r3,1
ldr r1,r3,0
br loop
enddata
ld r0,char
add r0,r0,r2
out
halt

char .fill x0030
x .blkw 1
file .stringz "abcxdefabef"
eot .fill x0004
.end


Here's a program I found that counts the number of instances of "x" in a string. I'm working around this for my application, but beyond the first few and last few lines, I'm lost.

        .orig    x3000 ;starting address
and r2,r2,0 ;init r2 = 0, used to count instances
lea r3,file ;init r3 = the string
in
ldr r1,r3,0
loop
add r4,r1,-4
brz enddata
not r1,r1
add r1,r1,1
add r1,r1,r0
brnp next
add r2,r2,1 ;increment r2
next
add r3,r3,1
ldr r1,r3,0
br loop
enddata
ld r0,char
add r0,r0,r2
out
halt

char .fill x0030
x .blkw 1 ;char x
file .stringz "abcxdefabef" ;string to check
eot .fill x0004
.end


Besides commented code, ???
>>
>>51478232
>being unable to malloc
>>
>>51479336
C:\Mingw64\bin does it for me. Make sure you got the right path.
>>
>>51479375
>using malloc
>codeeval

but your score will be shit
>>
>>51478845
>everything in PHP or Perl
>no test coverage
>dev servers were in Sydney, I had to ssh and use vi to edit the code
>100+ ms latency on every keystroke
>no comments
>unreadable perl, thankfully most of the app was in php
>every PHP class extended "General"
>no one knew what "General" actually did
>70% of the engineers were offshore in India and were very poor communicators
>no QA, no code reviews, developers pushed code straight to production
>>
>>51479381
Yeah that was working for me before but I've had to switch to mingw-w64 due to a bug with string conversions, I'll keep trying though. They provide a .bat file that works but i'm trying to get it working for convenience's sake.
>>
>>
>>51479336
Why the hell do you want to use cmd? Just use minTTY that comes with mingw.
>>
>>51478915
>THE books
They're are literally dozens of better software books out they're today than these old, outdated works. They're both memes.

K&R is a good meme because DMR, but memetheless, yea no.
>>
>>51477782
>OOP is cancer

Not really.
>>
>>51479276
fine

i actually had an international edition of K&R for a while, but it leaked this nasty smell whenever I opened it so I never read it
>>
>>51479474
So you're saying that SICP and K&R are just memes because they have old concepts?
>>
>>51478873
>implying 99% of all C ever written isn't 'my first fizzbuzz'
>>
>>51479522
Amend that to old, shitty concepts and yes.
>>
>>51479474
>old, outdated works
K&R teaches you more in 200 pages than those modern 1000+ page bloated textbooks with pack-in CD-ROMS.
>>
>>51479529
nice meming

wonder when you would show up after all the c# bashing itt
>>
>>51479542
>CD-ROMS
>modern book
>>
>>51479522
You can definitely learn from K&R so long as it's not your absolute first introduction to programming.

SICP is a meme.
>>
>>51479551
pack-in DVDs.
>>
>>51479548

I just got home, m8.

>nice meming

It's true. When we're talking about languages that get pushed as 'my first language', then there's no doubt that the lions share of code written is going to be newbie exercises.

The same goes for any popular language.
>>
>>51479581
>implying you're ever allowed to leave your Indian call center
>>
File: watamote; tired.jpg (39KB, 998x720px) Image search: [Google]
watamote; tired.jpg
39KB, 998x720px
Need some C++ help. I'm making a calculator that will take multiple numbers and operators.

I've been trying to figure out how to fix a bug where if I put the equal sign right after an operator, I get no answer.

Ex: 2 + 2 + 8 + =

int main()
{
double lnum = 0;
double rnum = 0;

cin >> lnum;
for(char oper; cin >> oper;)
{
if(oper == '+' || oper == '-' || oper == '*' || oper == '/')
{
cin >> rnum;
switch(oper)
{
case '+':
lnum += rnum;
break;
case '-':
lnum -= rnum;
break;
case '*':
lnum *= rnum;
break;
case '/':
lnum /= rnum;
break;
}
}
else if(oper == '=')
{
cout << "Answer: " << lnum;
return 0;
}
}
}
>>
>>51479598

I leave whenever I want.

t. Rama S. Radhakrishnan
>>
>>51479604
Well the way you are doing it right now won't work because it can't respect order of operation. If you re-implement and use a different algo you can cover that and will probably fix your issue.
>>
>>51479604
Delete the whole thing and rewrite using fgets() and strtok().
>>
Facts:
>K&R is outdated
>SICP is not a meme
>Java encourages bad code because it lacks free functions.
>c++ > c
>vim >= emacs > everything else
>Go is a meme
>Python and ruby are garbage
>webdev is for retards
>People who create getters/setters for every private variable dont understand OOP and are shit coders
>Indians need to get out of tech
>>
best C++ GUI library?
>>
>>51479644
Oh, alright. Thanks. Guess I'll be learning about tokens then.
>>
>>51479677
p. accurate except the zed shaw-tier k&r opinion
>>
>>51479677
please senpai, you're memeing too hard
>>
>>51479677
>vim >= emacs > everything else
Vim is better for entering and manipulating text
Emacs is better for a holistic programming experience
>>
>>51479694
qt probably
>>
>>51479677
>Java encourages bad code because it lacks free functions.

Truly irrelevant. For all the terrible things that Java does, this is low on the shitlist.
>>
>>51479677
>I'm le edgy elitist programmer
>>
>go to used book store
>find programming section
>all the books are for dummies-tier shit, or 1990s era references for things like java and perl

I can never find any of the meme books /g/ likes
>>
>>51479023
they're like $10,000 and only available at auctions
>>
>>51479786
>used book store

Of course not, what kind of monster would sell their SICP?
>>
>>51478942
>German keyboard
>Removed german characters
Why not just get a default US layout then?
>>
>>51479820
SICP 1st edition is pretty easy to find anywhere
they're like $5 at any online bookseller.
1st edition K&Rs are also equally worthless
>>
File: emag__eht.png (180KB, 1366x768px) Image search: [Google]
emag__eht.png
180KB, 1366x768px
I tried to separate my code but I'm retarded.
Is this even possible?
...
Also is there any better way to scrape info from websites like this?
>>
>>51479877
use strtok
>>
>>51479897
>use strtok
;_;
>>
>>51479897
>>51479947
You could implement your own strtok like what I did in >>51478103.

Just traverse an array and look for strings manually.
>>
>>51479110
Returns a float.
import math
code = 114688837778579513684337030346042655818
def is_prime(n):
# for i in range(2, n):
for i in range(2, math.ceil(math.sqrt(n))):
if n%i == 0:
return False
return True
#llimit = 1000000
llimit = 1722277
mlimit = 9999999
while llimit < mlimit:
for i in range(llimit, llimit+999, 2):
if is_prime(i) == True:
if i%code == 0:
print i
break
else:
continue
print 'incremented '+str(llimit)+' to '+str(llimit+999)
llimit = llimit + 999

>>
>>51478288
>nested loops are always O(n^2)

confirmed for not understanding Big O notation
>>
>>51479110
changed to range(2, int(math.ceil(math.sqrt(n))))
so much quicker
>>
>>51479992>>51479947>>51479897>>51479877
that is python, people
>>
>>51480035
Ai AI donkey faggot
>>
>>51480102
jjust use it through ctypes
>>
keks
>>
File: 1429250603669.png (84KB, 1000x1000px) Image search: [Google]
1429250603669.png
84KB, 1000x1000px
>>51479897
>people recommending strtok when ip_address isn't even in scope
>>
FAGGOTS
>>
File: IMG_20151122_185216_2.png (750KB, 717x550px) Image search: [Google]
IMG_20151122_185216_2.png
750KB, 717x550px
I'm not asking anyone to do my homework, just give me a hint or something. I'm stuck as fuck right now. Pic related is my assignment, on the left is what it should do, on the right is what I have written so far. Sorry for the quality, best I can do right now. Thanks
>>
>>51480243
Ask cortana
>>
>>51480243
rewrite it in C
>>
>>51480243
Ask a classmate to use his working code
>>
File: JUST FUCK.jpg (7KB, 250x250px) Image search: [Google]
JUST FUCK.jpg
7KB, 250x250px
>I left all my assignments until the day before they were due again
when will I fucking learn my lesson
>>
File: 14482121463530.jpg (1MB, 2310x2306px) Image search: [Google]
14482121463530.jpg
1MB, 2310x2306px
Does essential /g/'s programming book list img exists? Can't find it, found only sci's wiki guide.
>>
>>51480329
There's a lot of Russian ones on there, is /sci/ bilingual?
>>
>>51480329
what the fuck is with all the russian books

https://wiki.installgentoo.com/index.php/Programming_Books
http://g.sicp.me/books/
>>
>>51477701
What's a good gui builder for c++. Cross plat is a must
>>
File: Python-Icon.png (2KB, 48x48px) Image search: [Google]
Python-Icon.png
2KB, 48x48px
>>51480243
learn to take screenshots
also
>printing with list comprehension
>>
>>51478834
Didn't paperback SICP used to cost $10?

Just checked and MIT press is selling for $50, what the fuck?
>>
>>51480386

Qt
>>
>>51480383
Because it's from 2ch's /pr/, dummy.
>>
>>51480410
>what the fuck?

unabated Judaism.
>>
File: WP_20151122_20_12_10_Raw.jpg (1MB, 2592x1936px) Image search: [Google]
WP_20151122_20_12_10_Raw.jpg
1MB, 2592x1936px
Comfy Sunday night studying
>>
>>51480390
I'm at work and trying to do this in my truck, the service around here isn't good enough for my phone to provide internet so I can post with my laptop.
>>
>>51480454
>not a real gun

May as well not even post it.
>>
File: C.png (136KB, 2000x2126px) Image search: [Google]
C.png
136KB, 2000x2126px
>>
File: 1442106773709.jpg (95KB, 1280x720px) Image search: [Google]
1442106773709.jpg
95KB, 1280x720px
Just started learning webdev, am I doing a good job?

codepen.io/anon/pen/QjPopO
>>
Tell me about PHP.
Is it the true redpill non-meme webdev language?
>>
File: 1445732905653.jpg (418KB, 768x768px) Image search: [Google]
1445732905653.jpg
418KB, 768x768px
Couple questions:
struct history_st& history()
{
static struct history_st globalhistory;
return globalhistory;
}

int main(void)
{
struct history_st* history = history();
}
// Produces error: 'history' cannot be used as a function.


Ok maybe it's because I'm using a variable with the same name as the function? Can the compiler really not figure that out, if not why the hell not? I go with my intuition and change history to "history1". This seems to work but then I get:

error: cannot convert 'history_st' to 'history_st*' in initialization


Well why the hell wouldn't this work? A pointer to a reference is normally completely fine correct? Such as:

//This is perfectly legal!
int var = 5;
int *p_var = &var;


So finally I change the code to the below piece, and all is well. It compiles fine and I presume it works how I want. However doesn't history() return a reference to a history_st structure? I thought references were supposed to refer to actual objects, but I guess they work on other references too? Take for example this:
int my_reference = 5;
int &alias1 = my_reference; //this is ok and makes sense
int &alias2 = alias1; // does this also refer to my_reference?


// Final working code, compiles.
struct history_st& history()
{
static struct history_st globalhistory;
return globalhistory;
}

int main(void)
{
struct history_st& history1 = history();
}


Cheers and thanks for any clarifications.
>>
>>51480549
there is literally not a single worse language than PHP

it is literally preferable to web dev in assembly to writing PHP
>>
File: anon's homework.png (3KB, 183x255px) Image search: [Google]
anon's homework.png
3KB, 183x255px
>>51480243
def buildList(list):
list = []
i = 1
while True:
item = input("Enter item #%d" % i)
if item == "QUIT":
break
list.append(item)
i += 1
return list

def listPrint(list):
size = len(list)
print("Printing list of size %d" % size)
for i in range(0, size):
print("%d: %s" % (i, list[i]))

def listPut(list, n, item):
list[n] = item
>>
>>51480584
literally this
>>
>>51478023
Confirmed for never written anything past fizzbuzz.
>>
>>51480626
font in pic?
>>
>>51480549
PHP is not a programming language, please do not call it that
>>
>>51480626
Oh, and the image you posted doesn't specify what the behavior should be if
n >= len(list)
, so I just let it use the default behavior (throwing an error).

>>51480639
Terminus, 12px.
>>
>>51480576
References aren't like pointers. Taking the reference of a reference just gets you another reference to the object, since you can't reassign a reference.

Also, in C++ you don't need to use "struct history_st" except when declaring. Just "history_st".
>>
File: 1448146787938.jpg (69KB, 640x400px) Image search: [Google]
1448146787938.jpg
69KB, 640x400px
>>51480626
"Anon's homework.jpg" kek.

Thanks senpai, a little more help than I wanted but you're still the fucking best.
>>
>>51480576
>>51480670
Oh, and I can see you're getting confused about the dual use of the & operator. When applied to a type, it means "reference to type". When applied to a variable, it's the same as C and it gets the address of the variable.
>>
>>51480626
the 0 in in range is kinda superfluous don't you think?
>>
>>51479160
>because you need a shitty plugin
Well, i need a shitty VM to run C#.
>>
>>51480746
C# is shit so it checks out
>>
>>51480746
same for java

and actually, mono has AOT.
>>
>>51479558
Why SICP meme? Because of lisp?
>>
>>51480534
>>51480549
>>>/g/wdg
>>
>>51480689
I know, I shouldn't have just given you the code but I wasn't sure where to start (no offense)

Here's a few things to note:

* The conditions for while/for/etc statements don't need parentheses around them like in C
* The example output shows that you're supposed to prompt the user for each item, which you can do by passing a string into the input() function.
* Instead of repeating the input assignment to v twice (once at the beginning of the function and once per loop), it might be preferable assign v a default value (like ""), and then loop "forever" (while True), and break the loop when you encounter a "QUIT" message.
* The listPrint function is just supposed to print the list, not build one, so you shouldn't call buildList at the start. Also, "el" is only in scope for the definition of buildList, so that code wouldn't work in any case.
* Instead of writing x = x + 1, you can write x += 1. You can do this same sort of thing with other operators like - and *.
* I have no idea what you were attempting to do with while (x != buildList(el)). Again, el is not in scope, and you don't want to rebuild the list. At all.
* I don't know what you thought putting code inside brackets would do, but it doesn't make sense. Also, that's not the way for..in loops work. You'd have to write
for x in k:
print(x)

But the example output shows that you need to print the index you're at, so you need to get the length of the list, and then print and access each index.

If you haven't yet, take a look at Learn Python the Hard Way (an online Python book). It's a good tutorial that might help you.
>>
>>51480735
Ah, you're right, I don't use Python and was just looking up the syntax to help anon. Didn't realize you could use range on a single operand.
>>
File: NoFace.jpg (25KB, 200x301px) Image search: [Google]
NoFace.jpg
25KB, 200x301px
>>51478378
>yfw he is going to stop for 1 month and restart posting the same shit from Jan since he will retake that class
>>
>>51480830
* single numeric operand
>>
>>51480243
learn to type "how to take a screenshot" in google first
>>
File: image.png (368KB, 1918x1038px) Image search: [Google]
image.png
368KB, 1918x1038px
>>51480848
i made a 4chan thread saver.
pic is the result
>>
>>51480921
post her nudes already
>>
>>51479604
Since you're basically defining a syntax here, I think you need to add some kind of error checking. Otherwise it's going to be very fragile.

Using strtok, as anon suggested, might be a good idea. Another option might be to write a small parser for your syntax. The parser would be able to do the error checking.
>>
anyone else did this to a friend's code to watch him suffer?
#define > >=
#define < <=
#define == <=
#define true ((rand()&20)!=15)
#define false (!true)
#define float int
>>
>>51480815
Yea, those things you were saying you have no idea what they were for. I didn't either. I couldn't get anything I had tried in the beginning to work and eventually just started guessing and looking stuff we hadn't even learned yet online which was a mistake. But I'll definitely look that book up over this break that's about to begin. Thanks again bro.
>>
>>51480962
wat. thats not my thread
>>
>>51478378
please post links
>>
File: Anonymous.jpg (60KB, 780x439px) Image search: [Google]
Anonymous.jpg
60KB, 780x439px
>>51480991
I know, but did op deliver on that very thread? I assume not.
>>
Give me something to do
>>
>>51480983
can't do that.

but the best is replacing while with if
>>
>>51481010
>>>/b/653340116
>>
File: vim-editor.png (6KB, 528x528px) Image search: [Google]
vim-editor.png
6KB, 528x528px
I'm looking to get started with programming in C++.

I have a book I'm following and it gives recommendations on some compilers and other things needed for a C++ programming environment in Unix-Linux.

Just wanted to see if anyone here maybe had a graphic, or recommendations, for some essential programming environment software.
>>
Hey /g/ I'm a total noob to computers but very interested in programing and just on how to get really good at computer use. Where do i begging?
>>
>>51481047
>essential programming environment
Literally a Linux distro. Including Cygwin.
>>
>>51480983
That's pleb tier, in Forth you can redefine numbers if you want:
: 1 2 ; 
1 1 + cr .
4 ok
>>
>>51478378
please do the needful
>>
File: Borat.jpg (19KB, 232x300px) Image search: [Google]
Borat.jpg
19KB, 232x300px
>>51481041
>>
>>51480921
Why are you telling me?
>>
>>51481110
accident lol
>>
Working on a C project I have to do with 3 other classmates.
>probably gonna end up doing the whole thing alone cause they dgaf and cause I ccb to go and motivate them
>also it's easier to program alone cause noone is slowing you down
>>
>>51477723
It is dead for /G/
>>
>>51481064
based forth
the ultimate expressive language
>>
>>51477723
I wrote a (very incomplete and non-compliant) LISP parser in Haskell.
>>
File: 1442729347672.jpg (3MB, 3504x2336px) Image search: [Google]
1442729347672.jpg
3MB, 3504x2336px
What's the point of privacy in OOP?
Why use public methods to get and set private variables instead of just making the variables public?
No entiendo. :-(
>>
>>51481413
To my understanding, it's to control access to certain variables.

From a design perspective, I'm guessing it means that in the event that a mutator/accessor "process" is modified, nothing else is impacted by the side effects of that modification.
>>
>>51481413
BUILD WALL
>>
>>51481413
Because if multiple private variables have some kind of invariant relationship to one another, letting the user modify them unchecked could leave the object in an invalid state.
>>
>>51481413
Usually you want to control the getting/setting. That might mean not having a set method, thus making the field read-only outside places that have access to the private variable.
>>
>>51481447
what programming language do you think trump would use

I'd say D
>>
File: 1442177684348.png (1MB, 1004x676px) Image search: [Google]
1442177684348.png
1MB, 1004x676px
>>51481413
>Why use public methods to get and set private variables instead of just making the variables public?
this is dumb. just make the variable public if you're just going to have straight set/get

you want encapsulation. like when you start your car you don't want to fiddle with the fuel injectors and whatnot, you just turn the key or press a button. the car's interface is relatively simple compared to what goes on inside the car, so it's easy to use which leads to increased productivity.
>>
>>51481413
>>51481487
Cont.

Also what >>51481511 said.

If you can sensibly write get/set methods for a private variable, the variable should just be public.
>>
>>51481413
Because retards make getters and setters for every single variable and remove encapsulation. They basically just like writing useless code.

What you're supposed to do is have a public interface that hides private variables.

Like if you have TV object, turnOn() and changeChannel() make sense and hide the internals. No user is going to need to change the transistors inside and they shouldn't so hiding those are perfectly fine.

This is what javafags and pythonic devs don't understand for some reason, and then you get OOP haters shitting on OOP when people use it wrong.
>>
>>51481539
>and then you get OOP haters shitting on OOP when people use it wrong.
To be fair, if the language forces you to use OOP all the time, people are going to abuse it. I don't think anyone except the most butthurt of C fags actually hates the concept of OOP, just how it's often seen as a default or even ubiquitous methodology.
>>
>>51481511
>>51481522
But couldn't you have a setter that restricts potential values of the private variable and a getter that returns a modification of the private variable?
That seems reasonable enough to me.
>>
>>51481539
>then you get OOP haters shitting on OOP when people use it wrong.

People who hate OOP are memers that hate it even when done right.
>>
>>51481563
Absolutely. Those wouldn't be getters or setters for the actual variable, though.

If you have trivial get/set like this:
private int foo;

public int getFoo() {
return foo;
}

public void setFoo(int value) {
foo = value;
}

You should just use a public variable.
>>
>>51481413
>What's the point of privacy in OOP?
Most objects should only be modified in specific ways. For instance, let's say you had a binary search tree that was stored as an array (so a[0] = the root, a[1] and a[2] = the children of the root, and so on). Now, let's say you had a function tree.insert(x) that inserted x into the appropriate place in the tree (by traversing the tree and doing the appropriate operations to keep the tree sorted). If the storage array was public, it could be modified anywhere, which would potentially (and almost definitely) put it into an invalid state. You might think that the answer is to just say "well, nobody should be retarded and modify the tree storage", but with really big codebases and changing personnel it becomes a lot more likely that someone will. Instead of just hoping nobody will do bad things to the object, it's arguably better to make certain fields only accessible to the object's methods in order to ensure everything works correctly.
>Why use public methods to get and set private variables instead of just making the variables public?
This is not the only use of OOP, and in most cases is actually a shitty use of OOP by cargo-cultists and beginners. If a private field is set and retrieved using public functions that literally just set or retrieve the value of the field, the field should just be public.
>>
>>51481563
>>51481581

9/10 times someone will write setters for a type that will never be constrained, never be changed later, etc.
>>
>>51481563
yes that's reasonable. what's dumb is if the interface is badly designed so that the users of the class have to do additional logic outside of the class. but if you have the logic inside the method then that's fine.
>>
>>51481622
Alright.
>>
File: mygf.png (117KB, 372x351px) Image search: [Google]
mygf.png
117KB, 372x351px
>>51481611
I like this explanation. I didn't really understand the car and TV examples, but a BST makes sense to me.
Thank you anon! Here's a special image of a smug anime girl just for you.
>>
File: k.jpg (84KB, 768x512px) Image search: [Google]
k.jpg
84KB, 768x512px
>>
>>51481740
He'll make programming great again
>>
File: 1441577687436.jpg (205KB, 950x1020px) Image search: [Google]
1441577687436.jpg
205KB, 950x1020px
>>51481740
trump would shit on lisp. he probably does everything in c#.
>>
>>51481762
You're fired, trump would never touch such a week inexpressive language with such shitty generics

D for Donald
>>
>>51481762
Trump would shit on programming in general.
It's literally the janitorial work of the 21st century.
Legions of disposable computer eunuchs at your reach and they'll even work for free, just for the experience.
>>
>>51481795
But didn't you hear anon? Obama wrote his first line of code a year or two ago!
Presidents are programmers now!
POTUS = Programmer Of The United States
>>
>>51481810
COOL JAVA PAHJEET
>>
>>51481821
How the fuck did you know my name ? !
Get out of here , I fuck your mother !
>>
>>51481810
WHY NOT BRING IT TO THE WHITE HOUSE
>>
>>51481810
weak shit
call me when obama writes a sudoku solver
http://arstechnica.com/information-technology/2015/05/prime-minister-of-singapore-shares-his-c-code-for-sudoku-solver/
>>
>>51481821
WOW, ETHAN, GREAT MOVES. KEEP IT UP. PROUD OF YOU.
>>
name one good tool/language/framework for these:

2D/3D game framework that supports json files.
json library
GUI library.
>>
>>51481562
>>51481566

The _concept_ of OOP is what's fundamentally flawed.

Programs should never, ever be "object" oriented. You should never base your programming around them. You can't just start out by thinking, "Hmm, I bet I can solve this problem with classes x, y, and z!" That's not how it works. There's no issue with objects per se, but engineering your code around them can easily lead you down the wrong path.

I have always found it much easier to let objects arise naturally rather than force them into my code. If several types of variables often accompany each other, I wrap them in a struct. If the same code logic is repeated in three or more places, I break it into a function. The end result might be something that looks similar to OOP, but the process was absolutely not "object-oriented". It was simply a steady refinement of code, always taking the next most logical step. I write the code first, blindly, to get a feel for the problem -- and then I refine it until it's perfect.
>>
Trump would code in c++ with QT5 imo.
>>
>>51481850
>JSON, JavaScript-
dropped

>>>/g/wdg
>>
>>51481862
C++ is not American enough.
>>
>>51481862
Trump would code in D and extern C++ for QT5
Come on, he's fucking D. Trump. Obviously he would use a powerful, loud and expressive language with his name on it.
>>
>>51481867
JSON is completely separate from Javascript and is a very good serialisation format.
>>
>>51481850
>2D/3D game framework that supports json files.
Literally why. Can't you code anything yourself? JSON is trivial to parse. Why the fuck can't you write your own parser? It takes like 25 minutes. In the time you've spent shitposting on 4chan you could've already written one.
>>
>>51481880
Actually scratch the extern C++, he'd bring back all the China++ to D and make D great again
>>
>>51481862
Ben Carson would use brainfuck or malbolge desu
>>
>>51481888
Remember.
He doesn't know how to implement anything.
He always writes glue code to mash together other people's shitty libraries.

He's not a programmer.
He's a code monkey.
>>
What would hillary, bernie, and jeb use?
whats the most kuck language?
>>
>>51481902
Ben Carson would do surgery in brainfuck and then try to stab someone
>>
>>51481850
SDL + Make your own
make your own
QT
>>
>>51481914
You literally just described every web dev.

Java-monkeys who can't re-implement even 10% of the standard library by themselves are no better.
>>
>>51481917
C+=
C Plus Equality

Bernie would use other people's code
>>
>>51481888
>It takes like 25 minutes. In the time you've spent shitposting on 4chan you could've already written one.
I can vouch for this
muh 4chins archiver
>>
>>51481840
What's up with all that bit-level crap?
>>
>>51481944
China doesn't have enough room to give everyone a byte
>>
>>51477723
I was thinking of learning AutoLISP for work. And maybe clojure since they are so similar.
>>
In C++ when I make a function where does the opening curly bracket go?


int main()
{

or
int main()
{


Or something like that. Book shows the first editor keeps trying for like 2 tab spaces in every time and I have to move it back.

Whats the convention.
>>
>>51481998
Normally it goes on the next line.

That's very important.
>>
>>51481998
The convention is
{
for functions and classes and {
for loops and conditionals and shit.
The most common for tabs is 4-spaces.
>>
>>51481998
In C/C++, it doesn't matter.
So long as there exists a bracket between main() and the next statement, the compiler will understand what you mean.

You could even write a function all in 1 line if you wanted to.
>>
>>51481998
int main() {
>>
>>51481998
int main() {

there you go
>>
>>51481998
>Whats the convention.
There are lots of different conventions.
>>
>>51481998
it's a matter of taste
if your editor is misinterpreting A there's nothing wrong with doing
int main() {
if (a) {
return 0;
}
}

                                                                 you could also get a not shitty editor
>>
>>51482008
>>51482011
>>51482015
>>51482017
>>51482023
All these people are wrong.
They probably don't use C++.
It has to go on the next line.
>>
>>51481998
There's no single convention. Since you're learning from a book, I'd say stick with the convention it uses for now. Configure your editor to use said convention. If your editor can't be configured, stop using such a shit editor.
>>
>>51482015
>>51482017
hivemind
>>
>>51482036
int main(void) { return 0; }

this is valid C++
>>
>>51482045
 int main(){} 

implicit return 0
>>
>>51482036
if you're using a C compiler from the 60's maybe
>>
>>51482045
Yes, if it's short or a single statement feel free to do them on the same line.


DO NOT WRITE { ON THE SAME LINE OTHERWISE
>>
>>51482050
main(){}
>>
>>51482035
int main() 
{
if (a) {
return 0;
}
}


imo
>>
Fucking C programmers ITT
Where have all the good men gone?
{
>>
>>51482075
C is the best language for everything.
Fuck off /wdg/.
>>
>>51482055
>ever writing something in a block on the same line
What are you trying to hide?
>>
>>51481930
wait, "can" as in "potentially" or "can" as in "does"? if the latter, then the code monkey is the one that uses someone else's code, and the programmers are the ones reinventing the wheel?
>>
>>51482075
/g/ is only for C and Lisp.
Why the hell are you here?
>>
>>51482084
C programmers should not be telling people how to use braces in C++. Braces on the same line are a horrific fucking cancer. Plus, what's with the guy that fucking alternates between same and next line? Probably a C programmer. You should all be shot.
>>
>>51482036
b8
and you faggots fell for it, for the nth time
>>
>>51481998
int main () {
>>
>>51482106
>b8
Implying it's not also true.
>>
>>51482094
>"can" as in "can" or "can" as in "does"
Which do you think, genius?
>>
File: le funny trap joke.jpg (605KB, 1136x1600px) Image search: [Google]
le funny trap joke.jpg
605KB, 1136x1600px
>>51482104
> what's with the guy that fucking alternates between same and next line?

I use same line { for structs and initializer lists.
I use next line { for everything else.
It just looks nicer.
>>
>>51482104
int main()
{
if (faggot(you)) {
std::cout << "Suck my wang!\n";
std::cout << "Don't tell me what to do.\n";
std::cout << "K&R still holds up for C++.\n";
}
return 0;
}
>>
>>51482084
what about webdev in C/C++?
>>
File: keyboard-layout.png (52KB, 1262x371px) Image search: [Google]
keyboard-layout.png
52KB, 1262x371px
>>51478942
US_INT is the only layout one should use you pathetic faggot
>>
File: k&r.png (14KB, 575x402px) Image search: [Google]
k&r.png
14KB, 575x402px
>>51482126
I do this too, and so does K&R style in code::blocks
>>
>>51482153
>have to shift for curly braces, parentheses, and underscores

G A R B A G E
A
R
B
A
G
E
>>
NEW THREADU

>>51482173
>>
>>51482168
>shifting takes longer than not shifting
slow down grandma, gotta go fast
>>
>>51481860
All programs are data and algorithms. There are objects and there are actions. OOP is useful in that some of the actions exist only in relation to data. OOP allows you to bind those actions to data so that code becomes more readable and safer. Bullshit it's flawed, people just abuse it.
>>
>>51482301
OOP is just a set of closures

method(object, arguments... )
operation(objects..., arguments...)
>>
>>51481860
>The _concept_ of OOP is what's fundamentally flawed.

I stopped reading here.
>>
>>51482350
They are similar. I guess it just makes more sense to some people that the objects own the actions and not the actions own the objects. But both are necessary to be fully expressive.
>>
>>51481917
>hillary

Objective-C, exclusively for a platform and program that doesn't respect your freedom.

>bernie

C++ or C. Basically, free() shit lmao.

>jeb

Visual Basic.
>>
>>51481998
>gnu indentation

please don't

ever
>>
>>51481867
Simply epic
>>
>>51481762
Trump: C++
Clinton: Java
Sanders: Ruby
Paul: C
>>
>>51482885
Trump isn't a programming language, he's a build utility.

$ make wall
Thread posts: 350
Thread images: 41


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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 content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.