/dpt/ - Daily Programming Thread

Daily Programming Thread

What are you working on, anonymous ?

# New & Revised /dpt/ Code of Conduct #
We want to ensure that the /dpt/ community, while large and diverse, remains
welcoming and respectful to all participants. To that end, we have a few
ground rules that we ask people to adhere to.

- *Be friendly and patient.*

- *Be welcoming.* We strive to be a community that welcomes and supports
people of all backgrounds and identities. This includes, but is not limited
to members of any race, ethnicity, culture, national origin, colour,
immigration status, social and economic class, educational level, sex,
sexual orientation, gender identity and expression, age, size, family
status, political belief, religion, and mental and physical ability.

- *Be respectful.* Not all of us will agree all the time, but disagreement
is no excuse for poor behavior and poor manners. We might all experience
some frustration now and then, but we cannot allow that frustration to turn
into a personal attack. It’s important to remember that a community where
people feel uncomfortable or threatened is not a productive one. Members of
the /dpt/ community should be respectful when dealing with other members as
well as with people outside the /dpt/ community.

- *When we disagree, try to understand why.* Disagreements, both social and
technical, happen all the time and /dpt/ is no exception. It is important
that we resolve disagreements and differing views constructively. Remember
that we’re different. The strength of /dpt/ comes from its varied community,
people from a wide range of backgrounds. Different people have different
perspectives on issues. Being unable to understand why someone holds a
viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to
err and blaming each other doesn’t get us anywhere. Instead, focus on
helping to resolve issues and learning from mistakes.

Other urls found in this thread:

youtube.com/watch?v=1S1fISh-pag
herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/
twitter.com/SFWRedditVideos

First for Rust is best

me on the right

Which waifu would you want to pair program with?

Nekopara card matching game in unity

No you're just wrong. I'm not gonna waste time with you, you're just a retarded faggot. Now leave this site, you won't be missed.

Did I strike your CoC hard enough you homo numale?

R

these ops just get funnier every time

weeb

Should I learn Python or Nodejs first?

golang is good

>age, weight and precise height
Those weebs are definite perverts...

hi, guys, i'm new at programming... I have learned HTML5, CSS3 and JS (Mostly),but I want to learn other programming languages as C, C++, Ruby, Python, etc. Which you recommmend me and what can I use it for?

If I plan to sell my program, can I include the fonts that come installed with Windows in it? Or are they copyrighted?

Haskell

>precise height
In Europe we just call those 'height'.

Throw your program in the garbage

they most probably are. wikipedia will probably tell you. if not, just use a search engine.
you can use some free fonts, like DejaVu Sans/Serif, Liberation Sans/Serif, FreeSans.

That doesn't answer my question.

C; you can use it for anything and everything

yes it does

Why all the extra new lines?

Can i design or create desktop windows apps with C?

Yeah, if your fucking autistic.

Yes

which part of "anything and everything" is giving you trouble?

Yes but you should use C#

If the fonts are bundled with Windows then why do you even want to include them with the program? You can load them just fine without the files in the folder.

If your time is worthless that is.

Daily reminder that Java is all that matters in 2016.

I meant using them in logos and shit.

>Sup Forums
>logos
every tiem!

I'm working on a shit game based on C++.
I just do it to practice since I'm new to the language and to programming overall, it's being really fun. Motivates me a lot into continuing it

>2006
ftfy

Fixed.

is it true that you code better while crossdressing?

learn you a haskell

>no cute anime gf to suddenly tickle you while programming

don't know about crossdressing, but I'm lubing up for my coding dildo
I got it for free when registering as an Apple Developer

...

>tfw no cute anime gf to sit on my lap and wiggle her butt while we program together

Why do the shittiest languages have the best girls?
>Ruby, PHP, Javascript, VB, Scala, Actionscript
I would marry them all ;_;

Ok, I'm planning to try Visual Studio 15, should I use it or should I use Visual Studio Code or other?

Visual Studio unless you computer is a literal toaster.

>Visual Studio
Shit, it does not even have a proper C compiler for fuck sake. If you want to program in C do not use VS.

>Windows
Are you sane?

C is better

Then what do you recommend me?

Most people use gcc as a compiler.
As for editor, use any editor of your choice, could be Emacs, Vi(m), kate, nano, etc

Use CLion and Mingw-w64 :^)

VS includes a C compiler, retard.
Visual Studio for C projects, geany for tinkering with simple code.

install arch with no gui and use the terminal

thats how REAL programmers work

not this babby gui WANNABEE programmers

I have a bitvise SSH server running on my Windows PC, but whenever I try to "Invoke-Item" on a video file from my Linux laptop it doesn't work. It works for images, but not video files.

What gives?

>VS includes a C compiler, retard.
What part of "proper" did you not understand?
It does not even support C99 yet.

C99 is cancer anyway, which is why VLAs specific to this standard were remove in the next standard iterations.

>VS includes a C compiler
it doesn't

Nice catgirl, mind if I take her?

Is JetBrains a meme company?

Are their IDEs just memes? I recently went back to Eclipse and actually like it a lot more.

It's funny that you say that, because most people here decry anything newer than C89.

No matter what, you're just supposed to hate Microsoft.

I already have MinGW installed

Thank you, but I prefer to see my progress as an app

C99 does not only include VLAs, it includes tons of stuff.
Moreover, VLAs were not removed, only considered optional.
And finally, VS does not even support C11.

It could be related to the fact that you're retarded.

I'm working on a program called "Learn C with Tyrone"

The goal is to teach gangstas how to program in C, Because C is the most gangster language.

So far this is what i have:

//Learning C with Tyrone
//This program is free software all of the free dumbs are included

#include
#include

typedef char string[50];

int main(int argc, char *argv[])
{
if (argc < 2) {
printf("sheeit what you talkin bout nikka?\n");
printf("Next time tell me your name fool word?\n");
return 1;
}
printf("What up my nigga %s\n", argv[1]);
int murderCode = 187;
float f = 4.4;
char c[] = "sup";
string myString = "this is a string";
printf("This be an int my nugga: %d\n",murderCode);
sleep(3);
printf("Dis shit her be a float: %f\n",f);
sleep(3);
printf("Sheeit dis be a char array: %s\n",c);
sleep(3);
printf("Dis shit right her be a string: %s\n",myString);
sleep(3);
printf("Sheeit watch me bust mmy gat, Got 10 rounds in dis mo fucka\n");
sleep(2);
for (int i = 0; i < 11; i++) {
printf("Pop\n");
}
printf("Sheeit we missded dem fools\n");
sleep(2);
printf("back dis bitch up and let me reload tyrone\n");
while (1) {
printf("pop pop pop pop\n");
sleep(4);
printf("yeaaaa boi we got em\n");
sleep(2);
printf("we gots to get outta her main\n");
if (murderCode == 187) {
break;
}
}
sleep(4);
printf("We got a load of product we got to move to the west side\n");
sleep(2);
printf("Word?... Send that shit fool\n");
return 0;
}

You're a meme.

>app

get out

>most people here decry anything newer than C89
First time I hear such a claim.

>No matter what, you're just supposed to hate Microsoft.
Because most of their products are shitty, however most of their fonts are fine I think.

>most people here decry anything newer than C89.
I'd like to see your statistical data that backs up such a statement

Are you retarded? VLAs are exclusively a C89 and C99 feature, its support was dropped in c90, added back in c99 and then dropped in c11

>most retards here that were proven time and time again to not know what the fuck they're talking about decry anything newer than C89
ftfy

>app
consider killing yourself, you don't belong here

>VLAs
>C89
>tard

youtube.com/watch?v=1S1fISh-pag

Don't talk if you do not know C. VLAs were first added in C99, they were not in older standards.
They were NOT dropped in C11, if you do not believe me you can search for them in the C11 standard.

You don't spend enough time here, then. I've seen it suggested that the newer standards are full of garbage abstractions for newbs.

well, i havent really found anything better than PyCharm for large Python projects that is free

i find i need an IDE when i work in a team since it makes version control and merging easy, on my own a text editor is fine

>1 or 2 people claim such a thing
>it's a fact now that /dpt/ hates them

/wdg/ is dead so I'll shit up this thread with my filthy webdev peasantry:

Is there any alternative to styling components in react.js than inline styles? Shit feels a bit primitive after having separation of concerns hammered into me from the get-go

needs more gangsta lingo

wow, you are a terrible apper

>VS does not even support C11
There's only a handful of c11 features one would use in their C projects. For most use cases the mixture of c90 and partial c11 features are enough for VS to be a viable option for clean C development.
Nope, they were dropped and no compiler worth its salt deserves to support them, good riddance because VLAs are cancer.

Webdev has always been accepted here as long as it's not about HTML or CSS, the person who started those /wdg/ threads is an idiot who only divided /dpt/.

or 2 people claim such a thing

/dpt/ is only 1 or 2 people anyway.

herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/

Now stop whining, if you're just gonna play around and/or learn basic c, visual studio is fine, but if you're gonna use the more advanced c shit, it might not be.

>There's only a handful of c11 features one would use in their C projects
Which is wrong, considering that C11 includes all C99 features and VS does not even support them.

>Nope, they were dropped
You did not search as I told you, huh?

>and no compiler worth its salt deserves to support them
Funny, considering that only compilers worth their salt support them.

It's a WIP, I'm going to put a socket example in it and pointers and a switch, That should show tyrone the basics.

I don't need to search anything, because I know VLAs are NOT required to be supported and that's for a very good reason, besides even if you were to use VLAs that just says that you're a shitty developer who has no idea what he's doing or a freshman who found out about C standards an arrays.

I would like to ask for your help with C#.

I have a form with 2 picturebox in it and a timer which moves them. Now the problem is with this.

At a certain location the timer must stop and show a messagebox, but it "forgots" to check it.

Here is a part of the code, writing from mobile in a toilet so sorry:

Random r =new Random();
int politicalhorse;
Int adbhorse;

..timer_tick(blablabla)
{
politicalhorse += r.Next(10);
adbhorse += r.Next(10);

//this block just sometimes get "read"

if(politicalhorse.Left ==600 || abdhorse.Left ==600){
timer.stop();
if(politicalhorse.Left == 600) Messagebox.Show("The President wins!!");

else{ MessageBox.Show("The Ambassador of Israel wins!!");
}

}

The first part is about the C++ compiler, meaning that tons of C code will be invalid (even stuff like a simple malloc because they demand a cast)

>if you're just gonna play around and/or learn basic c
If you do want to do that then there is an even better reason not to use VS: It suggests for their shitty *_s variants of standard functions

>because I know VLAs are NOT required to be supported
Backpedalling, huh? At first you said they were removed and now that they are not required to be supported?
What if I told you that stdio.h is not required to be supported either?

>besides even if you were to use VLAs
Nothing wrong with VLAs, good job making shitty claims.

You stupid?

r.Next(10) gives number from 0 to 10
So if politicalhorse is 599, it can end up anywhere from 600 to 609, meaning it will not be always equal to 600.

you are checking ==, but adding a random number between 1 and 10. So it's possible for the positions to skip past 600. Just change == 600 to >= 600.

Most compilers have it removed, some have it disabled by default which is as good as being removed, because nobody in their right mind would use them in real world development.
>Nothing wrong with VLAs
If your company requires you to overflow the stack on a daily basis, then by all means use them. Being a shitty dev isn't against the law.

>The first part is about the C++ compiler, meaning that tons of C code will be invalid (even stuff like a simple malloc because they demand a cast)
That whole blog post is about which C99/C11 features they support and why.

>If you do want to do that then there is an even better reason not to use VS: It suggests for their shitty *_s variants of standard functions
#define _CRT_SECURE_NO_WARNINGS
problem solved.

There is now web development thread so I'll ask here.
I have an .svg image with text in it that I want to show on my website. Do I have to include the font file somewhere in the website's folder? Because right now it's displaying as some generic font, instead of the font that I made the image with.

That while is pointless.

also
>typedef char string[50];

>Most compilers have it removed
No compiler had it removed, but this was not the topic anyway.

>some have it disabled by default which is as good as being removed
Again, this is not the case.

Since you pretend to know that much, tell me, which compilers are these? (that's right, none)
Also, you ignored half of my post. Didn't you say that they were removed by the standard before but then backpedalled to saying that they are optional?

>overflow the stack
The C standard says nothing about stacks.

>If your company
Good thing I am not working as a code slave.

>That whole blog post is about which C99/C11 features they support and why.
...in their C++ compiler (which again will not compile most of C programs)

>problem solved.
It's not solved because no person who begins programming in C will know about it and will get tricked by their warnings.

Oups sorry, I wrote it incorrectly.
It is hard to write when one takes shit.


The horses' movement values are already assigned at start.

So it looks like this:


politicalhorse= r.Next(10);
abdhorse = r.Next(10);

..tick(blabla){

politicalhorse_pic+=politicalhorse;

abdhorse_pic+= abdhorse;

// then the rest I wrote with the correction that the pictureboxex that represent the horses gets checked not the int
}

>The C standard says nothing about stacks.
Do you even know what are the implications of using VLAs, friendo?
>Good thing I am not working as a code slave.
So you admit you're not even working as a dev? Your opinion is worthless, just stop posting, famalam.

>thinks there's a difference between c89 and c90
oh wow what the hell are you doing in /dpt/

do your own homework

Are you retared? c89 doesn't even allow single line comments or declaring vars in loop. Fuck off, fag.

It's not pointless, It's an example of a while loop, It's not finished anyway.

What's wrong with my string?

>...in their C++ compiler (which again will not compile most of C programs)
It will compile any C program that does not use any unsupported C99/C11 features.