[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]

/dpt/ - 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: 349
Thread images: 32

File: 1444578902961.jpg (211KB, 612x816px) Image search: [Google]
1444578902961.jpg
211KB, 612x816px
Old thread: >>59972925

What are you working on /g/?
>>
First for Idris, the language of the future
>>
>>59976956
a botnet
>>
>>59976956
Third for D
>>
>>59976991
>D(ead)
FTFY
>>
File: peasants.jpg (24KB, 582x413px) Image search: [Google]
peasants.jpg
24KB, 582x413px
>What programming languages are used late at night?

https://stackoverflow.blog/2017/04/19/programming-languages-used-late-night/
>>
>>59976982
It's true that there almost always is a best way given a set of priorities but you rarely get to the point where you can start consider it like this.
>>
>>59976995
Your meme is the only dead thing here
>>
>>59976842
>Agreed but it's not a generally applicable catch for all UB for the semantic operations defined in the language.
Dependent types (with pi) are enough to specify anything you could possibly want to specify.

>Especially not in an imperative language that aims to be performing operations efficiently.
Good thing types can be irrelevant at run time.

Think about this. C won't compile if you try to use a variable before it is declared. Does using a variable before it is declared result in undefined behaviour?
>>
>>59977003
There are people who don't know Latin?
>>
File: 1484662353328.png (178KB, 904x824px) Image search: [Google]
1484662353328.png
178KB, 904x824px
>>59977003
>Haskell
>>
>>59977028
We're talking about americucks here, friend.
>>
>>59977041
Makes sense, people want to use Haskell, but most companies want easily replaceable developers even if it's inefficient, so they use codemonkey languages, so most Haskelling gets done outside office hours
>>
Hi guys! I asked a few days ago (or maybe yesterday, memory's shit) I asked about approaching Java and some anon recommended me Heads First Java. Today I had sometimes and I was to get into it when I saw it teaches you over Java 5, being 8 the actual version.

Should I still install Java 5 SDK or there's maybe more updated content? I won't ask if it weren't 3 version difference, I got told they do major changes between major versions.
>>
>>59977041
it really shows you which languages get you employed
>>
>>59977081
This. Language success is no indicator of quality.
>>
>>59977041
>All those code monkey searches
My sides
>>
>>59977081
SQL and Visual Basic?
>>
>>59977070
In less than 100 days, Java 9 comes out

install java 8
>>
>>59977016
Anon stop shoehorning the types into this. We've made it perfectly clear that they're irrelevant.
>does using a variable before it's declared result in undefined behavior
I believe using an unrecognised symbol is considered an error in the spec. I don't remember what compilers are obliged to do on error but I don't think they can produce a binary really.
Undefined behavior lets the compiler author choose a way to deal with it. It's a lack of obligation.
>>
>>59977138
>We've made it perfectly clear that they're irrelevant.
Oh have we?
>>
>>59977162
Excuse me?
>>
>>59976956
Anyone wanna help me figure out why this isn't working? Did the same thing just fine in c++ last night, but for whatever reason Python i'm having troubles.

GRAVITY = 9.8

def distanceFallen(timeElapsed):
return GRAVITY * (timeElapsed ** 2 / 2)


def distanceOutput(height):
time = 0
while int(height) > 0:
if height == 0:
print('After {0} seconds, the object is on the ground!'.format(time))
print("After {0} seconds, the object is at:{1} meters".format(time, distanceOutput(height)))
time += 1
height -= distanceFallen(time)

distanceOutput(100)


When I debug it, apparently it just keeps running the print line over and over without ever progressing to time+=1. I'm clearly missing some fundamental property of loops, I thought it would run every line inside of the While loop, not just the line immediately following it.
>>
def length [X](xs:List[X]) : Int = xs match{
case Nil => 0
case a::as => 1 + length(as)
}


Pattern matching is beautiful.
>>
>>59977137
My question is kind of fulfill, but I should had asked in a better way.

There's some learning platform or method (Like Heads First Java) but for Java 8? Thanks for awnsering my doubts, guys.
>>
>>59977173
height will never be 0
>>
>>59977209
>Scala
>>
>>59977173
while int(height) > 0:
if height == 0:

How do you plan for height to reach 0?
>>
>>59977209
Why not just use Foldable.length?
>>
>>59977162
Do your language types correspond to machine types 1:1? They do not most likely.
The source of UB is to allow compilers to not be as strict as they would with a fully defined spec. You can fully define your language but you're going to let people on many platforms suffer.
So it's not actually the types because the types in the languages we have aren't the types on the machines. If you look at something like x87 we don't have a C type for 80bit precision float. Which x87 often preferred. If we make a perfectly defined set of operations for float overflow for instance you're gonna have to produce the code to emulate (as an example) 32bit float on the x87 architecture.

It's not about types it's about accommodating machines. Viewing it as a problem of types and division by zero is the naive view. It's a compromise
The video I liked cover more interesting aspects than we're talking about but I find this insistence on talking about types silly.
>>
File: 12werfgh.png (263KB, 524x661px) Image search: [Google]
12werfgh.png
263KB, 524x661px
>>59977211
>>
>>59977237
By machine types I mean the high level types that corresponding to the operations you're allowed to operate on registers. Not that the machine normally is operating in a typed manner.
>>
>>59977241
That doesn't look very newbie-friendly, but I wil lgive it a try.
>>
>>59977173
Found your problem
print("After {0} seconds, the object is at:{1} meters".format(time, distanceOutput(height)))


distanceOutput(height) is going to execute infinitely because everytime it reaches this line, it goes into the function again cause a recursion error.

Also what
>>59977228
>>59977217
said, your if loop will never reach 0 as the while loop will exit due to >0
>>
>>59977270
DO YOU WANNA BE A NEWBIE OR A PRO?

READ THIS BOOK, C'MON!
>>
>>59977173
GRAVITY = 9.8

def distanceFallen(timeElapsed):
return GRAVITY * (timeElapsed ** 2 / 2)


def distanceOutput(height):
time = 0
while int(height) > 0:
if height == 0: # you'll never get to this because it's only looping while height > 0
# also, if you want to evaluate height as an int but you're not sure it'll be in that format,
# you should just cast it explicitly.
# calling `while int(height) > 0` doesn't reassign height as an int type object.
print('After {0} seconds, the object is on the ground!'.format(time))
print("After {0} seconds, the object is at:{1} meters"
.format(time, distanceOutput(height))) # this is your problem.
# you're calling `distanceOutput` recursively,
# never decrementing `height`, so it goes infinitely
time += 1
height -= distanceFallen(time)

distanceOutput(100)
>>
Slowly killing myself - see attached.
>>
>>59977278
YES SIR
>>
>>59976956
Please refrain from using pictures with anime memorabilia as the Original Post. Thank you.
>>
>>59977290
>reacting on slack with pepe
are you killing yourself because you're realizing you're a gargantuan faggot?
>>
>>59977221
What's wrong with scala?
>>
>>59977343
it doesn't scale.
>>
>>59977362
Spark
>>
>>59977362
Java runs much of google and most of amazon.

How do JVM languages not scale anon?
>>
>>59977237
With proof that an operation will not overflow, it doesn't matter what happens if it does - just use whatever is fastest. Without proof, the programmer should choose an operation with defined overflow behaviour. Good types mean no undefined behaviour.

Do you get it now?
>>
How many posts does 4chan get every second?
Because I'm stress testing my message board and I can get around 35 posts per second before my c2d starts throttling.

Also, sometimes you see this, sqlite doesn't want to tell me when the certain table fields are inaccessible, it just returns zero.
>>
>>59977407
According to the catalog, 4chan gets thousands of post per minute. Popular boards like /v/ /pol/ /b/ gets 500-700 post per minute.
>>
>>59977398
i don't know.

i was trying to bamboozle people
>>
>>59977407
>sqlite for this kind of thing

sigh
>>
File: 1481412037227.png (27KB, 395x872px) Image search: [Google]
1481412037227.png
27KB, 395x872px
>>59977407
I just checked and it's going at 698 posts per minute now, so 11 posts/sec. I think boards are spread over 2 servers though.
>>
>>59977461
Oh yeah this is a bit inaccurate since my script doesn't deal with boards that skip dubs.
>>
>>59977285
alright here we go
GRAVITY = 9.8


def distanceFallen(timeElapsed):
return GRAVITY * (timeElapsed**2/2)
def distanceOutput(height):
time = 0
h=height
while h >= -10000:
if h <= 0:
print ('After {0} seconds, the object is on the ground!'.format(time))
return
print("After {0} seconds, the object is at:{1:.1f} meters".format(time,h))
time += 1
h = height - distanceFallen(time)


distanceOutput(100)








If I set the loop for while >=0, it wouldn't actually run that "on the ground" print statement, so i just set it to a negative number.
Was there a better way for me to do that?
>>
>>59977480
You don't need a loop because you're using this recursively.
>>
>>59977480
GRAVITY = 9.8

distanceFallen = lambda timeElapsed: GRAVITY * (timeElapsed**2/2)

def distanceOutput(height):
time = 0
h=height
while h >= -10000:
if h <= 0:
print 'After %s seconds, the object is on the ground!' % (time)
return
print("After %s seconds, the object is at: %s meters" % (time,h))
time += 1
h = height - distanceFallen(time)
if __name__ == '__main__':
distanceOutput(100)
>>
>>59977401
So you're talking about compile time checks. That's what you're hiding when you say types.
It's not about fucking types in general then anon. If you're gonna talk about types as a concept in a specific language say so. If you say types in general when I'm talking about C/C++ you have to be explicit in saying that you mean that it's about this specific construct in a different language.
>do you get it now?
I get YOU now. You fucking asshole. Complete waste of time talking to people like you.
C could easily have defined all operations in the language regardless of types. Even division by 0. The result could be whatever they wanted. It's not done because of the reasons I've mentioned. It's frustrating that you ignore my posts just because you want to peddle your proof writing softare.
You don't belong in this discussion. Fuck off.
>>
>>59977480
Hmm why a while loop and not a for since you know the conditions?
Why h = height instead of using height?
You can put your print statement after your while loop because it will only exit after the loop condition is met i.e object reaches the ground. Like this

 while h >= -10000:
print("After {0} seconds, the object is at:{1:.1f} meters".format(time,h))
time += 1
h = height - distanceFallen(time)
print ('After {0} seconds, the object is on the ground!'.format(time))
return
>>
>>59977591
>So you're talking about compile time checks. That's what you're hiding when you say types.
I think it's fairly obvious I wasn't talking about dynamic types nor C/C++ types, anon.
>>
>piece of code that reads and prints some data files works when put inside one program and doesn't when put inside another
>>
File: 1467311026571.jpg (143KB, 735x900px) Image search: [Google]
1467311026571.jpg
143KB, 735x900px
>>59977655
>>
>>59977452
It's fine, I'll just make it try again 50 times before failing.
I don't even see the error message anymore.
>>
i'm making a compiler.

is using global arrays bad idea?

it just works tho
>>
>>59977452
>Sending your queries OVER THE FUCKING NETWORK OR ANY KIND OF SOCKET, EVEN IF IT'S LOCAL
No fucking thanks. sqlite3 is the most efficient possible solution to anything requiring SQL.
>>
>>59976991
D is nice.
>>
>>59977758
Global is always a bad idea. What if you wanted to multithread it?
>>
I've spent the last few months building a search engine (wibr.me) where only older html style, hobbiest made sites are kept. Which are minimal in bloat. If you know any decent sites, please submit some! I only got a few sites indexed and need some assistance with that.
>>
>>59978048
you want minimal websites, is that it?

so we put the url, and click search?
>>
>>59978048
http://www.cliki.net/
http://www.common-lisp.net/
>>
>>59978088
In the top right of the page, you can submit pages so they can be indexed by the search engine.
>>
>>59978048
does the bravenet hit counter on my geocities page count as bloat?
>>
>>59978116
don't wanna type Captchas because fuck you

here are some:
http://wildwildwest.warnerbros.com/cmp/frameset.html
http://www.arngren.net/
http://www.dpgraph.com/
http://www.dolekemp96.org/main.htm
http://edition.cnn.com/US/OJ/
http://www.aliweb.com/
http://edition.cnn.com/EVENTS/1996/year.in.review/
http://park.org/
>>
>>59978096
>>59978163
Thanks :)
>>59978151
Is not bloat. You know what I mean, like excessive use of javascript or css or excessive ads that weigh down the page.
>>
>>59978048
https://www.openbsd.org/
https://slackbuilds.org/
http://beej.us/
http://grey.sdf-eu.org/
https://www.schneier.com/
http://codingbat.com
>>
>>59977398
>Java runs much of google and most of amazon
>much of google

I don't know about much, but they apparently use it for some of the apps.

Honestly, when does one start enjoying programming in Java? I haven't enjoyed this language since day 1 in classes.
>>
Are feminists making it harder for competent female programmers to get hired?
>>
>>59978256
You don't have to be paid six figures to write Java, but it helps.
>>
who's the wize guy that submitted google.com to my search engine. lol
>>
>>59977480
You don't need to use recursion in this call.

Best practice is to not use recursion unless you really need it. It makes for code that normies can't into.

t. normie.
>>
>>59978306
That was me lol
>>
>>59978331
tail recursion > iteration
>>
>>59978306
Don't listen to him it was me
>>
>>59978048
When does it update, or is it manual on your part?
>>
>>59978331
>>59978351
Until your call stack explodes, yes.
>>
Someone help me with this code. Pic related is what I'm trying to achieve vs what I am achieving.

#include<iostream>
using namespace std;

int main(){
// array set
int array[10] = {77, 33, 88, 99, 22, 55, 11, 44, 66, 0};
int index;
// print array
cout << "Reading in: ";
for(int i=0; i<10; i++){
cout << array[i] << " ";
}
// read index
cout << "\nEnter a number from 0 to 9: ";
cout << index << endl;
cin >> index;
// checks if valid index
if(index > 9 || index < 0){
cout << "Number is out of range.\n";
}
else{
cout << "Element number " << index << " is " << array[index] << endl;
}
return 0;
}
>>
>>59978360
No, that was definitely me. I know because I submitted it.
>>
>>59978364
Tail recursion does not cause stack overflow.
>>
Formatted it wrong, sorry. Also another pic

#include<iostream>
using namespace std;

int main(){
// array set
int array[10] = {77, 33, 88, 99, 22, 55, 11, 44, 66, 0};
int index;
// print array
cout << "Reading in: ";
for(int i=0; i<10; i++){
cout << array[i] << " ";
}
// read index
cout << "\nEnter a number from 0 to 9: ";
cout << index << endl;
cin >> index;
// checks if valid index
if(index > 9 || index < 0){
cout << "Number is out of range.\n";
}
else{
cout << "Element number " << index << " is " << array[index] << endl;
}
return 0;
}
>>
>>59978371
Uh, it was me that submitted dude.
>>
>>59978365
C++ is zero-indexed. Subtract 1 from the user input and you're good to go.

t. normie
>>
>>59978395
Maybe we both submitted it then?
>>
>>59978380
Don't cout index before you set it to a value, otherwise it's just garbage.
>>
>>59978400
>Enter a number from 0 to 9
Why would you subtract 1?
>>59978365
I'm not understanding what's wrong here...
>>
>>59978377
(checked)

Not in civilized, languages, true. We don't know what compiler he's using though, and I've gotten a tail call to SO in C.
>>
>>59978256
Google's search engine is written in Java (or it was, they may have switched to Go since they, you know, invented it) and their crawler was rewritten in Java in like '06-'07; although by now they may have rewritten it as well.
>>
>>59978418
There's nothing wrong with his code, but he hasn't realized how to count from 0 yet.

t. normie.
>>
>>59978380
This line:
cout << "\nEnter a number from 0 to 9: ";
cout << index << endl; // <-- Here
cin >> index;

You are outputting index before initializing it, which is undefined, which is why you get an odd result.
>>
>>59978478
Ok, thanks. Did that, but I'm getting 77 as my input when it's supposed to be 3. What to do to fix this?

Adjusted code:

#include<iostream>
using namespace std;

int main(){
// array set
int array[10] = {77, 33, 88, 99, 22, 55, 11, 44, 66, 0};
int index;
// print array
cout << "Reading in: ";
for(int i=0; i<10; i++){
cout << array[i] << " ";
}
// read index
cout << "\nEnter a number from 0 to 9: ";
cin >> index;
cout << index << endl;
// checks if valid index
if(index > 9 || index < 0){
cout << "Number is out of range.\n";
}
else{
cout << "Element number " << index << " is " << array[index] << endl;
}
return 0;
}
>>
File: png fug.png (15KB, 1036x177px) Image search: [Google]
png fug.png
15KB, 1036x177px
Complete noob to programming here - doing exercises and drills from Bjarne book - I'm showing you this random drill I was working on because I have a question.

What's the general rule of thumb for { }.

For example I've got the program work except the last if without any brackets in the if - else statements but then again I was forced to place them in order to make it work.

I want to figure this out because I want to avoid unnecessary {} in the future.
>>
>>59978564
Well I'll give you a hint to start: Look at the picture you posted, where it says Input, and then look at the number the number the auto-checker wrote to your program, and consider what's going on.
>>
File: 1488460547456.png (203KB, 474x307px) Image search: [Google]
1488460547456.png
203KB, 474x307px
>this guys slaps your gf's ass
your move?
>>
>>59978619
If it is on a single line you don't need brackets. If it is a multi line line, use brackets.
>>
>>59978564
Does cin read in from the console?
I code C not C++, so i dont know these fucntions/macros.
Are you inputting 77 mantually?
If not, it sounds like its reading index from an uninitialized value. Init index = 3, and youll probly get what you expect.
>>
>>59977028

Most people have better things to do with their time than learn a language not really spoken anywhere.
>>
>>59978243
Index completed. ty
>>
>>59978633
Prepare for zombie apocalypse, since a zombie just slapped my gf's ass.
>>
jesus christ is this someone from /wdg/?
https://codegolf.stackexchange.com/a/86988/52685
>>
>>59978619
As a "veteran" programmer i consider your code to be very confusing, whenever you have a ';' semicolon, you should immediately put a newline.
Not only because it makes it simpler for you to understand, but because that is the way your compiler looks at it.

>>59978641
This guy is correct,

but consider you pack mutliple functions/ conditions onto one line, their words may seems confusing to you. so split your code into many lines as i said, and you will see how he is right.
>>
>>59978646
No, it inputs automatically
>>
>>59978646

cout = stdout
cin = stdin
cerr, clog = stderr

They are neither functions nor macros, but objects with overloaded bitshift operators.
>>
>>59978363
I can see a list of submissions, I'll quickly glance through them to make sure they arent bloated shit quality crap you get on google, then they will get indexed within seconds. I wrote a web crawler for it to download and parse the html.
>>
>>59978633
laugh hysterically with my girl and walk away
>>
>>59978048
my site in jaboct.com
i wrote it myself in html with whatever other code i needed to accomplish what i wanted.
But if you want to put a couple /g/entlemens sites into your engine then stick my bitch in there.
>>
File: gotcha.png (12KB, 735x308px) Image search: [Google]
gotcha.png
12KB, 735x308px
>>59978704
>>59978641

Gotcha guys ty a lot.
>>
>>59978772
If you want to be a """"java pro"""" stick ur '}' on their own line too.

If you want to be a """C pro""" stick the '{' on its own line.

But i consider the ladder to be bloat.
And the former to be more explicit.
>>
>>59978791
Trash.
>>
>>59978759
Done. Thank you.
>>
>>59978632
I've tried to fix it and it's still giving me 77, not 3 like I want

Someone please help
>>
>>59978829
>If not, it sounds like its reading index from an uninitialized value. Init index = 3, and youll probly get what you expect.
Im trying but you did not seem to care...
>>
>>59978852
You aren't supposed to initialize the array yourself, the auto-checker sends the input to you one integer at a time, and you need to read them into an array. The last input from the auto-checker is the index to print.
>>
>>59978852
>>59978898

Oops ment to link this nig.
>>
>>59978726
So it only goes one deep, not to the child pages?
>>
>>59978852
bro, first of all you're typing '77' as your input - the input is the index so you want to type a number between 0 and 9, not the value you want to obtain.

Second, when you type '3', you're getting the FOURTH item in the array, because you're indexing from 0.

So "get me item 3" is actually "get me item 4 (0, 1, 2, 3 <-)
>>
My school uses this book. I love Java, but operating systems aren't written Java. Isn't that kind of dumb to use this book then?
>>
>>59976983
is there any good free reading material on idris? (coming from an OK haskeller)
>>
>>59978702
#include <stdio.h>
#define S "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
int main(void)
{
const char *str = S S;
unsigned i, j;
for (i = 0; i < 26; i++)
{
for (j = i; j < i + 26; j++)
putchar(str[j]);
putchar('\n');
}
return 0;
}
>>
>>59979103
You could buy Edwin's book.

There's also a tutorial: http://docs.idris-lang.org/en/latest/tutorial/index.html#tutorial-index
>>
>>59979106
???
>>
Anyone else still stuck in the mindset of there being no females on the internet? Back in the day it was almost universally male, and I assumed any one claiming otherwise was a guy just pretending to be a girl. But now there's actually tons of fucking women all over the internet, mostly just normie social media but a few spill over into other communities and websites, its weird.
>>
>>59979101
Not if java can do a good job of representing the systems, and i believe it could.
I agree with you, they might as well teach the class in C.
>>
>>59979101
I'm guessing that's why it's called operating system *concepts*
>>
>>59979129
Just stick to impenetrable nerd hobbies like foreign 90s music and microcontroller programming
>>
>>59979129
I have no reason to give a fuck about which gender you are.
I may refer to you as "he" but in reality (expecially a software development environment) "their" gender is of absolute unimportance. Anyone who brings up their gender is baiting and waisting my time.
>>
>>59979175
I get less shit over my contributions ever since I changed from a feminine github username to a neutral/slightly masculine one.
>>
>>59979186
L O N D O N
O
N
D
O
N
>>
>>59979186
Then your dealing with "faggots" who are focusing on unimportant aspects (gender) instead of what actually matters (code).

Why do you even bring up your gender in the first place, i just say the words i want to say and never give any explicit hints to my gender or sexuality.
>>
>>59979214
>Why do you even bring up your gender in the first place
Oh look, this shit again. My original username was based on my IRL name. Let me guess, using my name is "bringing up my gender". I never mentioned anything about my gender while using it.
>>
>>59979230
If you dont want people to care about/bring up your gender, then dont use a username based on a gendered name.
>>
>>59979230
>women
>has to start an argument
it's like you try to be cunts all the time.
F U C K
O F F
>>
File: ferris43.gif (2MB, 540x540px) Image search: [Google]
ferris43.gif
2MB, 540x540px
Friendly reminder that you're being counted as a female in university studies regarding women in computing if your github/stackoverflow/etc accounts feature an anime girl avatar.
>>
>>59979248
Then male programmers should stop using usernames based on gendered names, too.
>>
>>59979230
Hi
We're currently seeking talented female programmers for Rust.
Join us
https://users.rust-lang.org/
>>
>>59979253
>muh sekrit programming club no girls allowed! who else /lonely virgin/ here??
>>
>>59979271
but male programmers don't care?
>>
I took a C++ class. What type of programs should I focus on with this language?
>>
>>59979292
They evidently do care, shown by them getting bent out of shape over them discriminating against people using feminine usernames and then being called out on it.
>>
>>59979271
I do not agree, i use a username that is similar to my male name, and i dont give a fuck if anyone tries to make fun of my gender. I understand that it may happen less because it is a male related username.
But realise, your the one who is stressing over this sitaution, so you are the one that needs to take steps to avoid it.
I dont/ have never givenen a fuck of anyone attack my gender. But you have, so take steps not to imply your gender.
That will help fix your problem.
>>
>>59979308
it's c++. it can do anything.
>>
>>59979284
Call me when it has real HKTs.
>>
>>59979291
>would get mad if a man "sexually harrasses" her by flirting
>insults men for not being over sexual
heh neurons are firing
>>
>>59979324
It's not about people making fun of my gender. It's about my contributions and work being consistently devalued because of it.

I realize that I'm free to not contribute/fork/start my own competitor, but men who say "I'm not sexist I don't even care about gender!" and then demonstrate that to be false need to be called out on their shit.
>>
>>59979006
No, because I don't want to do that at the moment. It becomes infinity more complicated and you cannot control for quality. The web dev can submit the specific page he wants indexed.
>>
>>59979341
He made a shit post, and got a shit reply in return.
>>
>>59979129
you're literally the only female ITT if you're even a girl and not a tranny
>>
>>59979259

I don't use any avatar on my github!
>>
>>59979378
>devalued
Alright, replace "make fun of" with that and try to understand my point.

>I'm free to not contribute/fork/start my own competitor
But you are free to do that too. This is the internet, gender does not matter.
>need to be called out on their shit
Call them out on the spot, posting anonmyously while replying to no one but me (not your aggressor), does not make any point.

If you find picking a gendered name causes you problems, it sound like you already found you solution, stop useing
>female
gendered name.

Problem solved, stop bitching cunt.
This is the interent, do as you please.
>>
>>59979425
All of /dpt/ is women pretending to be men (some of whom are pretending to be women).
>>
>>59979433

I use a picture of myself.
>>
>>59979459
i-is it l-lewd?
>>
>>59979459
I liked you better when you were Racket Rocket
>>
>>59979473

I'm not a trap.
>>
>>59979516
Males can be lewd too.
>>
What's a good and light IDE that I can use to finally break away from Dev-C++? On windows btw.
>>
>be TA for a class
>release test grades
>shitloads of emails from students in an hour
>nitpick details and try to fool me into giving a few points back

fucking undergrads

>>59979516
back to /o/ turd
>>
>>59979543
I TA for a lab, stay strong brother
>>
>>59979543
J..John?
>>
>>59979330
Can you give me some ideas though? Something I can put on my resume. Plan on working on it all summer.
>>
Currently learning C++ and it's shit. Why is it oriented around women?
>>
>>59979562
Write an operating system in idiomatic C++17.
If only to prove linus wrong.
>>
>>59979557
most kids are annoying as fuck, but helping the few actually trying to understand stuff makes it worth the effort

>>59979560
nope
>>
>>59979538
I use Code::Blocks for C.
>>
File: 1492650306068.png (157KB, 500x686px) Image search: [Google]
1492650306068.png
157KB, 500x686px
>>59979571
not all objects are women
>>
>>59979562
make a video game with opengl
>>
>>59979538
just use VS community edition if you're on windows. 2017 allows you to be very specific with the individual components you install. It's still gonna be about 1GB for C++, but it's a lot better than it has been
>>
>>59979384
Bit limited, could be a cool search engine for here if you get that going.
>>
>>59979459
I never added a profile picture.

>>59979538
If you really need to use an IDE, use Qt Creator.
>>
>>59979611
I like you. You putting the code on GitHub or anywhere public?
>>
>>59979611
Not only is linus a smart guy, but he is a better project leader.
Good fucking luck nigger, you need it,.
>>
>>59979101
probably made because a bunch of people only know java after going to java shack universities. sounds like a stupid book
>>
>>59979259
Pic unrelated
>>
I'm writing encryption software for the dpt roller

I'm using this function to encrypt the data.

        public void encrypt(String t)
{
Random rnd = new Random();
int Key = rnd.Next(1, 999);
String CharList = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

int count = 0;
Console.WriteLine("Your key is {0}, and your encrypted Text is:", Key);
while (count < t.Length )
{
Console.Write("{0}", CharList.Substring(((Convert.ToInt32(t[count]) + Key)%61), 1));
count++;
}


I'm wondering if there is any way to even reverse this process or should I be doing this another way? Its mostly the modulus operator I can't seem to reverse. I figured if I had a key it might potentially be reversible, but I guess I was wrong.
>>
>>59979709
Meanwhile code blocks isnt even 100MB.
>>
>>59979946
I'm not even sure it's possible to write encryption in java, there's no unsigned types of any kind.
>>
>>59979961
its C#
>>
>>59979966
what's the difference?
>>
>>59979958
Apples and Oranges really.
>>
>>59979983
uh... idk. I just know c# is a spinoff of c++
so if encryption is possible in c++ its probably possible in c#

How would you go about encrypting? I can do the rest from there, I just need to know what I should be working with if not a random number modulus type thing.
>>
>>59976956
anyone could help me figure why this piece of code change the printing order?


std::wstring first_int(const wchar_t* str, const wchar_t* & next_val) {
bool foundnum = false;
std::wstring result = L"";
while (*str && (iswdigit(*str) || !foundnum)) {

if (iswdigit(*str)) {
foundnum = true;
result += *str;
}
++str;
}
next_val = str;

return result;
}


int main(){

std::wstring num = L"B|141:196|148:231|148:231|157:273|139:327";
const wchar_t* s = num.c_str();
std::wcout << first_int(s, s) <<":"<< first_int(s, s);
return 0;
}


prints
196:141


but changing
std::wcout << first_int(s, s) <<":"<< first_int(s, s);


to
std::wcout << first_int(s, s) <<":"
std::wcout<< first_int(s, s);

prints
141:196

as expected
>>
>>59980027
If you're gonna write C, just write C you dumbshit.
>>
>>59980024
>Encrypting in M$ language
LaughingNSA.jpg
>>
>>59980027
you're making assumptions about the order of execution here - your first_int is modifying the state of the input variables and that combined with no standardised execution order means the output is undefined behaviour.

That code is just kinda cruddy anyway, you're mixing C++ and C. Don't decay into wchar_t types for a start
>>
int tokenizer (char* line, int lineNumber)
{
char* ptrBegin;
char* ptrEnd;
char* endOfString = &line[strlen(line)];

ptrBegin = line;
ptrEnd = endOfString;
char buffer[strlen(line)+1];

while(ptrBegin != endOfString)
{
int i=0;
do
{
buffer[i] = ptrBegin[i];
++i;
}
while(&ptrBegin[i] != (ptrEnd+1));

buffer[i-1] = '\0';
int tknType = idToken(buffer);

if ((tknType == 0) && (ptrBegin == ptrEnd)){ //in case of the whole string being parsed
++ptrBegin; //and not finding a valid token
ptrEnd = endOfString;
}
else if(tknType == 0){
--ptrEnd;
}
else if(tknType == 1){
printf("(TKN_identifier, %s, line:%d)\n",buffer,lineNumber+1);
ptrBegin = ptrEnd;
ptrEnd = endOfString;
}
else if(tknType == 2){
printf("(TKN_number, %s, line:%d)\n",buffer,lineNumber+1);
ptrBegin = ptrEnd;
ptrEnd = endOfString;
}
else if(tknType == 3){
printf("(TKN_aritOperator, %s, line:%d)\n",buffer,lineNumber+1);
ptrBegin = ptrEnd;
ptrEnd = endOfString;
}
else if(tknType == 4){
printf("(TKN_Literal, %s, line:%d)\n",buffer,lineNumber+1);
ptrBegin = ptrEnd;
ptrEnd = endOfString;
}
else if(tknType == 5){
printf("(TKN_Delim, %s, line:%d)\n",buffer,lineNumber+1);
ptrBegin = ptrEnd;
ptrEnd = endOfString;
}

}
}


how shit is my tokenizer
>>
>>59980104
Your brackets are incorrectly placed.
>>
>>59979101
it makes sense if students aren't expect to know C or if it's just a high-level look at operating systems without having to deal much with raw pointers and such things
>>
>>59980080
yea, the code is ugly, and the wchar_t its because
is what the winapi uses
>>
>>59980170
eugh, I know that feel.
>>
File: gotcha1.png (38KB, 869x612px) Image search: [Google]
gotcha1.png
38KB, 869x612px
I can't tell what's fuged here.
>>
>>59980104
I'm a newfag so I don't know how to do code markup, but at the very least you should have a lookup for the textual formats of the tokens, then you could just do:

printf("(TKN_%s, %s, line:%d)\n", tkn2str(tknType), buffer, lineNumber + 1);

for tokens 1 through 5
>>
>>59980217
well val is never going to be great than ::max or less than ::min, so that'd be a pretty big issue.
>>
>>59980217
I think you should look at what your initial values are set to.
double largest_so_far = largest possible double lol
...
if (val > largest_so_far) { //HMMMM
...
}
>>
>>59980230
code markup is just

//Your code could be here!


>>
>>59980287
fuck you.
>>
>>59980230
>>51971506
>>
>>59980314
thanks
>>
>>59980325
Abuse the code tag is against the rule
>>
>>59980252
>>59980264
Ye but I have to figure out a way if I only enter negative numbers largest will be be set and same goes for only positives.
I think I'm stupid I should assigned the largest possible to smallest and vice versa FUG..
>>
>>59980427
yeah, if you want your initial values to be overwritten by any possible input, you want the starting "smallest value" to be ::max and the starting "largest value" to be ::min.
>>
>>59980035
The dpt roller said make a program that encrypts and decrypts data.

do I just skip that one?
>>
>>59980476
>Use python
>Import library for encryption
>Done in 2 minutes
>>
>>59980537
isnt the point to actually learn something?
>>
>>59980562
If you are interested in encryption, pick up a book and start reading about it. Implementing your own faulty version of an encryption following steps on the internet doesn't count. You might as well just use pre made libraries. If you are doing for the sake of doing, then the shortest method is often the best method.
>>
>>59980584
when it comes to encryption it's not, please never release a crypto library or something that makes use of cryptography.
>>
>>59980476
If you have some basic math knowledge under your belt, md5 is fairly easy to implement, and you can easily check if it's working correctly.
>>
>>59980651
>md5
>decrypt
lol nooo
>>
>>59980628
he said to use a pre-made library if you actually need crypto, and to just make something quick and easy if you are learning.

you should just drop programming right now if your reading comprehension is this bad
>>
>>59980651
>>59980659
Shit you're right, I need to go to bed. I meant to say AES.
>>
>>59980651
>md5
Stop
>>
File: gotcha2.png (37KB, 656x672px) Image search: [Google]
gotcha2.png
37KB, 656x672px
Need a creative solution for this step? I was thinking of making a boolean variable and if the char is invalid make it false - only if it's true the rest of the min / max stuff go trough.
>>
>>59980651
>>59980659
>>59980703
>>59980706
What is md5 and AES?
>>
>>59980764
Seems like a simple if else why do you need a boolean variable?
>>
>>59980778
What is google?
>>
>>59980783
Alright.
A lot popped up. Thankfully the 4th one down said encryption.
>>
File: bonzi-buddy.png (323KB, 363x303px) Image search: [Google]
bonzi-buddy.png
323KB, 363x303px
>mfw using Python
>mfw I write top down, modular function procedural programs
>mfw people tell me to use OOP because it's better
>mfw I don't see the point

Am I just a retard
>>
>>59977096
t.virgin neet without having anything to show for his life
>>
>>59980840
>Python
>Am I just a retard
>>
File: tech-support.jpg (22KB, 608x378px) Image search: [Google]
tech-support.jpg
22KB, 608x378px
>>59980847
>wanting something to show for your life

get your ego under control anon. when you stop trying to impress people you'll find happiness.
>>
>>59978365
(setq vector #(9 11 4 22 10 2 7 98 45 66))
(elt vector (read))
>>
>>59980781
Because if I insert let's say 1000 potato even tho it's invalid - the max will register as 1000 and I don't want that.
>>
>>59980840
You are using Python
>>
File: eyeroll.gif (982KB, 390x259px) Image search: [Google]
eyeroll.gif
982KB, 390x259px
>>59980866
>>59980892

Tbh I saw this coming a mile away, but I thought I'd post anyways.
>>
>>59980910
Tbh Python was made with OOP in mind but just don't fall for the OOP ruse. If your project can be done functionally, do it functionally.
>>
>>59980880
There is a keyword for that: continue, which will cause the program to "jump" to the start of the loop. As an aside, have you guys done an STL library stuff? Something like:
#include <unordered_map>
...
unordered_map<string, double> units {"m" = 1.0; "cm" = 0.01, "in" = 0.0254, "ft" = .3048}
...
while(...)
...
if(units.find(unit) != units.end())
val = val * units[unit];
else {
cout << "Bad unit" << endl;
continue;
}
...
>>
>>59980840
give me your sample code
>>
>>59980965
Oops that declaration is wrong, sorry:
unordered_map<string, double> units {{"m", 1.0}, {"cm", 0.01}, {"in", 0.0254}, {"ft", 0.3048}};
>>
>>59976983
Inconsistent and Turing-complete garbage simply can't be the language of the future.
>>
>>59980847
It's interesting that the people in the middle of the day, presumably at their job, are googling up a storm on how to do their job.
>>
>>59980969
def fizzbuzz(n):

if n % 3 == 0 and n % 5 == 0:
return 'FizzBuzz'
elif n % 3 == 0:
return 'Fizz'
elif n % 5 == 0:
return 'Buzz'
else:
return str(n)

print "\n".join(fizzbuzz(n) for n in xrange(1, 21))
>>
File: 1396571416586.jpg (34KB, 278x278px) Image search: [Google]
1396571416586.jpg
34KB, 278x278px
Give me something to do so I can stop thinking of killing myself.
>>
>>59981076
a random suicide method generator.
>>
spent the last two days reverse engineering and reimplementing some dudes particle filter.
there were no comments and all of the variables and functions were 3 letters long.
plus he had a bunch of code that did absolutely nothing.
learned a lot though
>>
File: angry.jpg (8KB, 236x236px) Image search: [Google]
angry.jpg
8KB, 236x236px
>>59980969
no way, it's mine
>>
>>59980931
why would you not use objects if it made more sense to use objects?
objects are intuitive and reusable.
>>
>>59981107
Because inheritance is a bitch and all multiple inheritance is going to do is cause more errors. If you are not using inheritance why not just stick to function?
>>
>>59981089
proud of you
>>
File: damn.jpg (27KB, 398x153px) Image search: [Google]
damn.jpg
27KB, 398x153px
Benchmarking for loops in Actionscript3
pic related: the results
code(printing and comments removed for length):
const SIZE:uint = 2000000;
var benchArray_str:Array = new Array();
var benchArray_int:Array = new Array();
var benchVector_str:Vector.<String> = new Vector.<String>;
var benchVector_int:Vector.<int> = new Vector.<int>;
for(var s:int = 0; s < SIZE; s++) {
benchArray_str.push(String.fromCharCode(s));
benchVector_str.push(String.fromCharCode(s));
}
for(var i:int = 0; i < SIZE; i++) {
benchArray_int.push(i);
benchVector_int.push(i);
}
var time:Number, object:Object, t:int;
time = getTimer();
for(t; t < benchArray_str.length; t++) { benchArray_str[t]; }
time = getTimer(); t = 0;
for(t; t < benchArray_int.length; t++) { benchArray_str[t]; }
time = getTimer(); t = 0;
for each (object in benchArray_str) { object; }
time = getTimer();
for each (object in benchArray_int) { object; }
time = getTimer();
for(t; t < benchVector_str.length; t++) { benchArray_str[t]; }
time = getTimer(); t = 0;
for(t; t < benchVector_int.length; t++) { benchArray_str[t]; }
time = getTimer(); t = 0;
for each (object in benchVector_str) { object; }
time = getTimer();
for each (object in benchVector_int) { object; }

Generic code for printing:
"For/For each test [<Container>::<Type>]: "+(getTimer()-time).toString()+"ms";
>>
>>59981177
>Actionscript3
for what purpose
>>
>>59981185
>for what purpose
Fun and educational, my course uses it, so i wanted to see what looping i should do, and what containers and types are the most effective
>>
>>59981127
>Because inheritance is a bitch and all multiple inheritance is going to do is cause more errors.
only if you're retarded. Multiple inheritance is like upgrading a class. Lets say you had a mini fridge and you wanted to have a freezer too. Just make a new class that inherits the mini fridge and add the freezer to it.
>If you are not using inheritance why not just stick to function?
because objects by themselves are still intuitive and reusable and sometimes it makes more sense to do so.
Objects are like structures in that they neatly group data but also come with handy tools that let you modify that data out of the box.
Just because you don't want to learn oop doesn't mean it has no purpose.
>>
>>59981209
>inheritance
>POO
>>>/r/abbit
>>
>>59981216
>it is different so i am determined to hate it
enjoy never being better than what you currently are
>>
>>59981234
Something being different doesn't say anything about it being garbage or not.
>>
>>59980840
you're writing shitty little scripts

try to write a real complex program like that with tens of thousands (or millions) of lines of code and see how it goes
>>
>>59980840
>mfw I don't see the point
You won't be able to unless you are subhuman.
>>
>>59981209
>Just make a new class that inherits the mini fridge and add the freezer to it.
Easy. Because of overlap between the two classes. Both the minifridge and the freezer cool temperature to a certain degree. How you ask your new class to cool temperature. Well fuck which inheritance should it use. Of course, you can say that is easy to avoid now but a lot of times when projects get big and complicated and class inherit from multiple classes and shit overlaps that you never noticed till another class inherits the inherited class and then suddenly everything goes to shit.

>because objects by themselves are still intuitive and reusable and sometimes it makes more sense to do so.
In certain situations. Are you telling me writing FizzBuzz in OOP is going to make it more intuitive and reusable?

>Just because you don't want to learn oop doesn't mean it has no purpose.
That is stupid logic. Python was made with OOP in mind. My point is that you learn both OOP and functional programming and learn when to use one methodology over the next. Using OOP for everything is retarded and vice versa.
>>
>>59981254
you are only saying its garbage because you are determined to hate it.
ive doubt you ever written an significant oop code.
you probably passed got to the lesson inheritance, got mad because you didnt understand it and now you hate it.
But go ahead, feel superior for refusing to write classes.
clearly you are correct the millions of programmers that use classes are idiots.
why are you on here again? shouldnt you be lead a software dev team a billion dollar project?
>>
>>59981313
>Using OOP for everything is retarded
Using OOP for anything is retarded*
FTFY
>>
>>59981316
>you are only saying its garbage because you are determined to hate it.
I am determined to hate it because it's garbage.
>you probably passed got to the lesson inheritance
What kind of retarded place would even be teaching that? Is this some sort of joke?
>But go ahead, feel superior for refusing to write classes.
I don't need to "feel" superior about factually accurate things.
>millions of programmers that use classes are idiots
I never said that. I'm pretty sure the smarter ones realize how garbage POO is, it's just that they can make money using it since your kind seems to have infiltrated pretty deep. The rest are definitely idiots, though.
>why are you on here again?
To shit on POO until my last breath.
>shouldnt you be lead a software dev team a billion dollar project?
Yes, that's what I'm doing on the side.
>>
>>59981313
>Using OOP for everything is retarded and vice versa.
yeah. thats why is said "when it makes more sense to do so"

i never claimed you should only write with objects, but the other guy claims objects have no purpose. refusing to use objects just because you have a stick up your ass is retarded
>>
>>59981359
>when it makes more sense to do so
Which is never.
>>
File: [tilting increases].png (27KB, 500x500px) Image search: [Google]
[tilting increases].png
27KB, 500x500px
>>59981349
>>59981358
>>59981366
>>
>>59981366
>I don't like thing
"ok"
>>
>>59981366
Actually I'm wrong, you should use it only if you plan to sabotage the entire project you're working on.
>>59981390
Why would someone like garbage? Assuming that someone isn't mentally ill of course it wouldn't make sense for him to like garbage.
>>
>>59981398
t. not an argument
>>
>>59981349
Hey. What browser are you shit posting from? It is it the one you made yourself which doesn't use OOP?

>>59981359
Because more often then not functional programming trumps OOP. You only use OOP if you have to, not oh I can use OOP so I should.
>>
>>59981410
>more often then not functional programming trumps OOP
at least this is an opinion i can respect even though it's neckbeardy as shit. procedural C tards on the other hand can gtfo
>>
>>59981431
>even though it's neckbeardy as shit
Why? Functional programming is simple to read, use and write. I guess liking code that is simple makes me a neckbeard.
>>
>>59981410
You do realize that saying "FP" without specifying that it's procedural makes no fucking sense when saying "FP trumps OOP"?
>>59981431
Most FP languages are procedural so it's only natural that they trump POO.
Same with C.
>>
>>59981451
>Most FP languages are procedural
What? Are you serious?
>>
>>59980965
>>59980982
Thank you dude, helping me learning more fun stuff - I am self learning all this and I'm so glad I have you guys.
It only motivates me to go find even more myself, you just open windows and directions to research.
>>
>>59981451
C is fucking trash it's like C++ but lacking most of the useful features like it doesn't even have namespaces like in C++ and in any reasonable language
>>
>>59981473
Why on earth do sepplesfags always bring up namespaces?
It's one of the most useless features it has.
>>
>>59981451
>Dodging my question
Anon. Come on POO is so shit so tell us what browser are you shitposting from that doesn't use POO. Is it possible, you are shitting on POO while using a program made using POO?

My little anon can't be this hypocritical.
>>
>>59981480
opinion discarded
>>
>>59981466
Yes, most FP languages use procedures as their main building block.
>>59981473
It isn't the best language, but it's still better than any single POO language simply by virtue of being procedural.
>>59981482
I didn't claim that I don't use software written in POO style. I don't care that much about the quality of the software I use, I would be writing everything myself if I did.
>hypocritical
You don't seem to know what this word means.
>>
>>59981473
Anything higher level than C isn't real programming.

C++ is just glorified monkey work.
>>
>>59981501
>>59981502
not sure if trolling or retarded

either way you fucking suck and this thread is a pathetic waste of time. you don't deserve my (You)s. kill yourselves.
>>
>>59981522
+18 please.
Learn to curse before you come here.
>>
Working on my hard cock right now
>>
>>59981501
>Using OOP for anything is retarded
>Produces to use software he deems retarded

Really gets your noggin joggin
>>
I have a question /g/ !

List<Character> list = Arrays.asList(array);


Tell me please what i just created in the code above? "ArrayList" or "LinkedList" ? Don't tell me "List" because it is just a interface.


List<Character> list = new ArrayList<Character>(Arrays.asList(array)); // this is arraylist
List<Character> list = new LinkedList<Character>(Arrays.asList(array)); // this is linkedlist
>>
>>59981549
>Using OOP for anything is retarded
Indeed.
>Produces to use software
What was this supposed to mean?
How does acknowledging the retardation of the software I use hypocritical? If anything, not doing so would be hypocritical.
>>
>>59981554
It's a "List".
>>
I seriously hope nobody in this thread actually uses OOP
>>
>>59981565
If it is so retarded why don't you program one that doesn't use OOP instead of taking it up the ass while shouting at the clouds how OOP is bad?
>>
>>59981554
neither. it's just your array behind a fixed-size list interface
>>
>>59981593
I don't care about using retarded software. I just won't ever write it myself.
Rewriting all of the retarded software I use would be a waste of time since I don't really care about using garbage software in the first place.
>>
>>59981591
var o:Object = new Object();
o.a = new Array();
o.vs = new Vector.<String>;
o.i = new int;
o.s = new String;
for(var t:int = 0; t < o.data.elementCount; t++) {
trace(o.data[i].value);
}

Of course not anon!
>>
>>59981609
if the software you use is so garbage why don't you make a better alternative which will make you ludicrously rich if it's so good
>>
>>59981609
>Man this software is retarded
>Proceeds to continue to use it while proclaiming how retarded it is via the retarded software

This is layer upon layers of irony here.
The only reason you can shitpost about how bad OOP is because you are using a software made using OOP.

Because without OOP, you can't shitpost about how bad OOP is. Really makes you grey matter batter.
>>
>>59981623
>which will make you ludicrously rich if it's so good
That's now how it works. Most people (just like me), don't care about using garbage software, so something better isn't necessarily going to make more money.
>>59981643
You're saying that if POO didn't exist browsers and all of the software necessary to connect to the internet would somehow not exist as well. Which is a pretty retarded claim to make.
>>
>>59981697
No you moron that isn't what I am saying. I am saying that the only reason you can shitpost about POO is because you are using a POO software. Without POO software, you are hapless to declare to the wrong how bad POO is. So you are using a POO software to say POO is bad, because it is your only available option. Which makes you an imbecile.
>>
>>59981697
>POO is bad
>Okay give us an alternative software that doesn't use POO
>Garbage software
>Okay but you are using the same garbage software so why don't you make a better software so you can show us why POO is so bad
>Error Error
>POO is bad
>>
>>59981744
>I am saying that the only reason you can shitpost about POO is because you are using a POO software
There are non-POO browsers and non-POO software out there. You being too retarded to know about this simple fact doesn't somehow mean it's not true.
>Without POO software, you are hapless to declare to the wrong how bad POO is
This assumes that there exists only POO software, which is clearly not the case. Even if POO software was somehow the only thing available, given a single non-POO compiler it would be possible to build any type of non-POO software.
>because it is your only available option
I seriously hope you are just severely underage, it sickens me to even think that someone over the age of 16 could possibly be this delusional.

>>59981767
I didn't even bother to read your post, because I already know it's fucking stupid by the greentext abuse.
>>
>>59981810
-Posted using a POO browser
>>
>>59981697
if you can't get people to use your software, maybe it's not the OOP software that's garbage
>>
>>59981810
>Poo is bad

While
>Doesn't give alternative to Poo software
>Uses Poo software
>Uses said Poo software to declare how bad Poo is

Riveting arguments there anon. You really convinced everyone in this thread you are not a moron while you post your retardation using a browser that uses OOP. You are like the "vegan" that proclaims eating meat is bad while eating meat in front of everyone else.

I don't think you can call anyone 16 when it is clear you are 12.
>>
>>59981821
In fact, I did. A while back. It didn't make me feel any more at peace with myself, so trying something else now.

>>59981822
I see reading comprehension isn't your strong game.
Try again, I'll let you know when you're able to parse elementary English.

>>59981842
>You are like the "vegan" that proclaims eating meat is bad while eating meat in front of everyone else.
I never proclaimed that using POO is bad. I merely stated the self-evident and obvious course of action "Anyone writing POO should be executed by the state in a prompt fashion".
>>
>>59981871
>weak bait
kill yourself you shitty timewaster. if you're such a great programmer why don't you go and program something with your glorious procedural C instead of spouting your hot opinions while convincing nobody.
>>
>>59981871
>I never proclaimed that using POO is bad

>>59981349
>Using OOP for anything is retarded*

>I never proclaimed that using POO is bad
>Using OOP for anything is retarded*
>>
>>59981888
>if you're such a great programmer
I'm not a great programmer, but a much better one than anyone who thinks POO isn't absolute garbage.
>program something with your glorious procedural C
It's very telling that your kind seems to think C is the only procedural language out there. Your retardation is showing.

>>59981901
I'm convinced at this point that you don't know basic English.
"using POO software" and "writing POO software" aren't somehow the same thing.
>>
>>59981934
kys
>>
>>59981941
That's forbidden love!
>>
>>59981949
DIAF
>>
>>59981934
No you are the one who didn't specify, don't expect people to read your retarded mind because no one wants to be infected with stupid.

Secondly if you are so against writing in poo why do you support and encourage the writing of poo by using software made with poo? So you are not the vegan that says eating meat is bad. You are the vegan that says killing animals to make meat is bad while eating meat. Good job making yourself look more of a hypocrite.
>>
>>59981961
>No you are the one who didn't specify, don't expect people to read your retarded mind because no one wants to be infected with stupid.
I simply couldn't comprehend what you were trying to say here. Try rewriting it in a more human manner, it seems like your choice of programming paradigm has negatively impacted your brain.
>Secondly if you are so against writing in poo
I don't think I would say that I'm against writing in it. I just think anyone who does so should be executed as soon as humanly possible.
>>
>>59981985
>I never proclaimed that using POO is bad
>Using OOP for anything is retarded
My little anon can be this stupid. I am going to keep throwing this back into your face till you admit you are retarded. These are the exact words you used.

> I just think anyone who does so should be executed as soon as humanly possible.
Who let the 12 year old in?

But real talk tho, I thank you for your efforts to make everyone who disses OOP look bad.
>>
File: Capture.png (19KB, 667x530px) Image search: [Google]
Capture.png
19KB, 667x530px
Currently trying to learn how to display images in a japplet and I found this code

Why does this not work? I have the image in the bin folder. All that happens is a blank japplet which you can see in the picture
>>
>>59981999
>Using OOP for anything is retarded
It indeed is. I didn't say that I'm against writing it though. It's just not something I or anyone human should be doing.
>Who let the 12 year old in?
Your parents just want the best for you.
>But real talk tho,
Is that how your kind usually speaks? Please don't talk to me like this, I'm not one of your own.
>I thank you for your efforts to make everyone who disses OOP look bad.
At no point did I "diss" "OOP" (which doesn't exist by the way, but you seem to think it does).
>>
>>59982037
Isn't Swing deprecated? You should be using JavaFX or whatever it's called.
>>
>>59982037
its time to stop pajeet
>>
>>59982038
-Posted using a browser made with OOP
>>
>>59982051
You sound pretty proud of it, I'm sure being noticed is a big accomplishment for you anon. I'm happy for you
>>
>>59981502
reminder that GCC went through the process of being reworked to compile as a "C++" program because the C++ compiler could generate better code and reduce compile times.
>>
>>59982074
Anon you are going through the programmer version of the rebellious teenager phase where you declare you hate your parents while taking money and living under their roof.

I hope you grow out of it
>>
>>59982098
You're not the sharpest tool in the shed, are you?
>>
Is it possible to implement a version of Dijkstra's algorithm that doesn't use a decrease-key binary heap and still have a Big O of O(E log V)?
>>
>>59982112
It is okay. That is the "I am 14 and this is deep" and "No one understands me" mentality you have there. We understand. We here at /dpt/ hope you grow up to be a fine young programmer.
>>
File: 1490138778357.jpg (49KB, 231x360px) Image search: [Google]
1490138778357.jpg
49KB, 231x360px
>to get the top grade, a minimum of 10 documented design decisions and 4 UML diagrams is required
getting tired of this shit
>>
>>59982135
What are you even trying to say? You should just leave before you embarrass yourself anymore.
>>
can we go back to arguing about tabs vs. spaces, vim vs. emacs, git vs. svn or whatever other pointless shit you disagree on please
>>
>>59982145
Aww anon is embarrassed and is asking others to leave his room.
>>
>>59982144
Did you forget to reply to someone?
>>
>>59982147
btw, the answer to those is:
tabs
vim
git
>>
>>59982147
emacs is for nerds.
brackets belong on new lines.
if you bracket single statements, you need to stop.
git and svn are memes
>>
>>59982155
She took a real beating...
>>
>>59982170
t. Redditor
>>
>>59982167
are you the same faggot every time?
>>
New thread:
>>59982188
>>59982188
>>59982188
>>
>>59982147
Space, emacs and both git and svn are trash.
>>
>>59982175
I bracket single statements but like
if (true)
{ return true; }
>>
>>59982208
absolutely
D I S G U S T I N G 
>>
>>59982223
it keeps consistency with all other scopes, prevents any accidental errors creeping in if you change contents of the if to more than a single statement, and distinguishes it more obviously than a simple newline.

e.g.
class foo
{};

auto func()
{}

// empty scope
{}


conditionals shouldn't get special treatment.
>>
>>59982208
>not part of the 'fuck compiler formatting master race'

if (
true
)

{
return true;
}
>>
>>59982262
>prevents any accidental errors
if (fag)
kill(self);
{ return true; }


you're literally trolling
>>
>>59982319
not even trolling. The fuck are you even doing in your code?
>>
>>59982367
you're literally the only person i've ever seen who advocates this brace style. it's fucking garbage
>>
File: laughingwhores.png (490KB, 449x401px) Image search: [Google]
laughingwhores.png
490KB, 449x401px
>>59978633
/tmp/ccxXLBme.o: In function `main':
undefined reference to `girlfriend'
>>
>>59982386
no, it's the best of both worlds.

- vertical compactness of non-braced single statements
- requires no changes (no braces -> braces) if changing to more than a single statement
- consistent with all other scopes in the language.

Not my problem everyone is too blind to see the one true style.
>>
File: 1486640183525.png (368KB, 636x694px) Image search: [Google]
1486640183525.png
368KB, 636x694px
>>59982416
I was skeptical at first, but I've warmed up to it. Stay the course, anon.
>>
>>59982458
don't encourage him
>>
>>59982526
Hey, at least it isn't GNU-tier of terrible; his reasoning makes sense.
>>
>>59979571
It's a multi paradigm language. It's inclusive of a lot of styles.
>>
>>59978633
I wish Andrei browsed /g/.
>>
>>59978478
...yet people still claim that they don't need Rust's safety checks.
>>
>>59983356
>runtime safety checks
>for something a C++ compiler catches at compile time
>and which you should see yourself if you aren't a half-blind newfag who started programming literally last week
>>
>>59983439
Who said this?
>>
>>59978331
confirmed for little babby
>>
>>59978331
best practice is unironically to NEVER use recursion
>>
>>59983439
>> Runtime safety checks.
Lolno. Rust's safety checks are all at compile time.

Also, the Rust compiler is smart enough to figure out that this should compile:

fn foo(x: i32) -> i32 {
let result: i32;
let mut r = 92;
loop {
r = r * r + 62;
if r == x {
result = 1;
break;
}
if r == x * x {
result = 92;
break;
}
}
return result;
}


but not this:

fn foo(x: i32) -> i32 {
let result: i32;
let mut r = 92;
loop {
r = r * r + 62;
if r == x {
result = 1;
break;
}
if r == x * x {
break;
}
}
return result;
}


Declaring an immutable variable before a complicated loop and having the compiler prove that it will only be initialized once can be quite valuable.
>>
>>59977061
>We can pick a few interesting technologies and visualize them as an animation.
look at the graph below that sentence, you will see that haskell is mostly unemployed neckbeards.
>>
>>59977061
>people want to use Haskell
you're delusional
Thread posts: 349
Thread images: 32


[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.