/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?
Old thread:

Other urls found in this thread:

reddit.com/r/Rule34LoL/new/.json'
gov.uk/browse/benefits/
yourtexasbenefits.hhsc.texas.gov/programs/snap
trinary.ru/projects/setunws/
introprogramming.info/english-intro-csharp-book/
twitter.com/NSFWRedditVideo

first for nodev

First for Go!

fuck you for using an anime image

install gentoo

Is Win32 as awful as people say?

Yes.

Could you explain why?

No.

C external libraries in windows

what do?

I want to mess with web pages

Not him, but one word: Legacy

/dpt/ is dead when the americans are sleeping

why cant europe into programming

curl -sH "User-Agent: Mozilla/6.0" 'reddit.com/r/Rule34LoL/new/.json' | grep -o '"url": "[^\"]*", "[^\"]*": "[^\"]*", "[^\"]*": [a-z]*, "[a-z]*": "[^\"]*"' | sed 's/^.*rl....//g;s/\".*tle..../::/g;s/^\(.*\).$/\1/g' | awk -F "::" '{printf ("%s\n--> %s\n\n", $2, $1)}'


i really like masturbating to game characters

Europeans are still at work when Americans are sleeping.

I am at work and I don't post on Sup Forums about my work

Daily reminder that you're not a real programmer unless you're into traps.

also daily reminder that self admitted gay men are not attracted to traps

Because europeans have jobs and are functioning people who dont post anime shit in a programming thread.

I'm european, but almost every EU country has a higher unemployment than the US, and those that don't are
UK - Cucked, can't watch fetish porn
Fr - Cucked by blacks
Ger - Cucked by syrians

Round Robin is literally the best scheduling algorithm.

>CPU time allocation is completely fair, no task is starved, and no task can hog
>O(1)

All other algorithms BTFO. Prove me wrong.

#include
#include

char *strfsm(const char *str, void (*(*st)(int, void *))(void), void *dat)
{
for (int ch; (ch = *str) != '\0'; ++str)
if ((st = (void (*(*)(int, void *))(void))st(ch, dat)) == NULL)
return (char *)str;
return NULL;
}

// tests

#include

static void (*even(int, void *))(void), (*odd(int, void *))(void);

void (*even(int ch, void *is_even))(void)
{
return (void (*)(void))(isspace(ch) ? (*(_Bool *)is_even = 0, odd) : even);
}

void (*odd(int ch, void *is_even))(void)
{
return (void (*)(void))(isspace(ch) ? (*(_Bool *)is_even = 1, even) : odd);
}

static _Bool even_no_of_ws(const char *str)
{
_Bool res;
strfsm(str, even, &res);
return res;
}
// ...

I wish C either had
A) a standard generic function pointer type à la void *)
B) an anonymous inline typedef feature, so that instead of void (*fn(int))(void) you could use, for example, _Typedef(void (*)(void)) fn(void)

Doesnt fucking matter, Germany for example has an unemployment rate of 4.1% but 50 million citizens, the US has 4.7% but 300 million citizens, so there are way more unemployed Americans.

>Open photoshop
>Wait for 100 MS BG services to get their fair share
>Pick tool
>Wait for 20 chrome processes
>Draw point
>Wait for Steam, Discord, Skype and Spotify
>Audio lags like shit

Why are you so defensive? The question was about low activity during daytime /dpt/, why the fuck are you going into full defence mode and spouting this Sup Forums shit?

Underutilization

>20 chrome processes
>Steam, Discord, Skype and Spotify
Found your problems.

There are 556 million citizens in EU28, average is 9.8%, so there would be almost 2x many unemployed EU'ians than US of A'ians

america is 1/3 african negroids

>Using programs on your computer
>Found your problem

>_Typedef(void (*)(void)) fn(void)
_Typedef(void (*)(void)) fn(int) rather

>my algorithm sucks
>its the user's fault

>static void ((*(even(int, void *)))(void))
ftfy

Are nested attributes for a ML as important as I think, or could I get away with 1D arrays max?

>even
doesn't a function call have higher precedence than a pointer dereference? so your grouping doesn't really change anything

I added a download queue so you can add songs and start downloading them all at once

Think I'm gonna make sure it works properly and I'm gonna build binaries and make it another release

EU isn't one country.

>EU isn't one country.
And the United States of America isn't just one state.

Economics and demographics wise it might as well be.

germany is not a single state either

Not really

he used redundant parentheses so I gave him more

But it is one country. Compare like to like.
Are you fucking implying that, for example, the Baltics and France have the same or even comparable economics and demographics?

Then I don't believe it's bad.

Do you fucking that program or not, i have already made it

cool i learned something today, thanks friend

So I learned Haskell.
Where do I collect my well-paid job?

actually no you're wrong fuck you

Are you implying that North Dakota has similar economics and demographics to California or New York?

The only thing that matters is that a french citizen is also an eu citizen and by extension a latvian, german and swedish citizen, same with companies.

>Do you fucking that program or not
What did he mean by this?

gov.uk/browse/benefits/

but you're not me tho

you meant cuckistan?

Did you get your maths PhD as well?

let's not get ahead of ourselves here; there's still coq to learn before you can get a job

The difference is that one is a country and the other is a not, retard. Guess what, we have states with different economics and demographics here too.

don't fuck with me troll i will end you

the dole

Are you fucking retarded?

fire me irl

hi where are the disgusions aboud brogramin :DDDDDDD

/wdg/

fucking need* that program

Switzerland master race. Most free nation on Earth right now

That user probably came to vomit his post and left immediately without even seeing if there would be a response/feedback.

That copy pasta is as relevant as ever.

yourtexasbenefits.hhsc.texas.gov/programs/snap

C# is literally the most practical programming language

Too bad for him, it was a nice practice of webscraping, although my program runs pretty slow, it takes like 3-5sec to parse through subcribers and channel names for my test 4 youtube channels

Would you program for ternary computer?
trinary.ru/projects/setunws/

except coq

How do real interpreters do it? I look for the block start, then if another block start is found, I pass the string sliced from the index till the end, and so on, until the end of the file/it runs out of blocks to interpret, seems like it would be incredibly slow and take up geometrically more memory as the files grew.

Sounds about right

Anyone know of a way to generate a string that will match a RegEx? I'm using PHP.

My regex:

[A-Za-z0-9]{8}(-[A-Za-z0-9]{4}){3}-[A-Za-z0-9]{12}

Looks like a template for registration keys.

>realizing people die if we don't help them
>EU doesn't give a crap because "lol, who needs humanity when we have da money? XD"
>UK are too good for the EU
>france treats people like animals and votes Le Pen
>germany helps people
>germany gets shit from every other nation
>based germany doesn't care
>based germany upholds the european values and humanism


The only good thing about Switzerland is Scala

Just saying, I was kidding, but raw #, EU/Europe still has more unemployed than the US.

Not sure, but you seem to be.

Is there a way to delete the last element of a dynamically allocated array in C++ or do I have to delete the whole thing and make a new one with 1 less length?

EU - economic federation between sovereign states
USA - republic federation between sovereign states

If I'm making a simple Android app using Java, like a math game or text messages thing.
Could it still work if I made everything public vs void?
I know it's not done this way, theoretically...

Looks cool.
Where's the source hosted @ ?

Edit
Public vs private

Call the destructor on the last element and decrement the length (might involve casting to an array of -1 length).

>poo in loo

Try a lighter font

Doesn't free the pointer memory

Forgot to mention that I'm working with c-strings not an object.

I've always wanted to get into programming, but never had the time. Now that I've made some money and become NEET, with the help of free money from gubmint, I'd love to devote time to learn something useful.

Can someone suggest the best no-nonsense book for a complete beginner to programming for learning C?

Use realloc to a smaller size instead of new and delete.

It would be later.

Then set the last character to null.

ah, thx user

Don't learn C, it's obsolete

You can learn programming basics in other languages also

introprogramming.info/english-intro-csharp-book/

if you want to learn c# and general programming basics at the same time. Beware though, in this book you won't learn GUI programming

What are you talking about? Interpeting a file as you read it?

Though it does assume it's been allocated with something like malloc that doesn't require a length to free.

One provides more autonomy than the other.

C obselete? It's still the best low level and highest performing language out there.

Yes you would. Use std::vector for this. Do not use "new Type[Length]" arrays unless you have explicit good reason to

>How do real interpreters do it?
Build an AST you stupid moron.

Really? Because compared to state laws and regulations, there aren't a lot of federal laws.

Other way around mate. You should only use std::vector if you have good reason to use it over an array. And you should only use std::list if you have good reason to use it over a vector.

Arrays allocated with malloc can always be shortened.

TL note: C is obsolete, if you can throw endless piles of hardware at your problem. In many case you can.

How does being low level and high performance make it a viable language for learning? That doesnt really make sense