/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

home.pipeline.com/~hbaker1/ForthStack.html
stroustrup.com/4th.html
stackoverflow.com/questions/2365411/python-convert-unicode-to-ascii-without-errors
twitter.com/NSFWRedditVideo

Trap aesthetics

computer generated antics using a banter engine

Thank you for not using an anime image

a full-fledged game is mostly about the story, art and content in general, the engine can only help with rendering and physics and such, especially for simple 2d and 2.5d games you really don't need to use a pre-built game engine

writing a linear lisp compiler ala home.pipeline.com/~hbaker1/ForthStack.html

asyncio & python, why?

>'_UnixSelectorEventLoop' object has no attribute 'create_task'

...aaaaaand that's why you're a NEET instead of a game developer

Nvm, fixed it.

lol k tard, you think the game engine is some magic black box, you don't know how simple (and poorly designed in the case of unity) the programming behind it actually is

You have to be 18 to post here

Based on your propensity to lie in the last thread, you're clearly underage

i haven't lied you delusional fucking faggot, but yeah i'd be better off just closing this thread because you insufferable faggots are just a waste of time

>i haven't lied
Then show me your amazing greenlit game that you made all by yourself without using a third party engine.

that user wasn't me and even if it was me i wouldn't dox myself just to prove some shitty Sup Forums fag wrong

Why are you so angry?

why are you so passive aggressive?

...

What's the ultimate book on C++ for someone who isn't a complete tard?

I found C++ For Everyone as well as Accelerated C++ on the wiki, which is best?

trash here
how do I print my output from a loop in a single line?

I'm writing a clock in C that counts up to 24 hours and then adds 1 day which I will use for something else, but I want the hours, minutes and seconds to keep increasing in a single line.

stroustrup.com/4th.html

you can try to send a "clear" command to the system using system("clear");
that will clear the whole screen and lets you overwrite it.
For more sophisticated programs you could use ncurses, which is a library for creating text-based GUIs in the terminal

Something like this, maybe, not sure if it's the best way to do it.
for(whatever)
{
printf("%d-%d-%d\r", hour, minute, second);
}

Kill yourself

ty
That's for windows right?
and I assume ncurses would work on linux as well right?

ty as well

"clear" is for linux, i'm not sure about windows, if clear doesn't work, try "cls".

ncurses in linux only afaik, but might work on windows with MinGW.

why isn't there anime in the op

because your timing sucks

>how do I print my output from a loop in a single line?

'\r'

What book for learning C

...

K&R.

>Recommending stupid non-standard shit

...

Recommend me a language to learn, I can only write C and C++

if i don't have any experience, should i not even have an experience section on my resume? i feel stupid putting "Lifeguarding" in there. what about using my former lifeguard boss as a recommendation though?

()

you can mention the lifeguarding and use him as a recommendation but also talk about your programming experience (even if you haven't had a programming job) like which languages you know and what you did to learn them, which projects you've worked on

So... lisp?

>Just nagging on answers, instead of complementing them.
hard work user, you should take a break from time to time, you earned it.

Put your programming projects there, that's what I'm doing right now.

Other people have already posted the correct answer. There is no need to do it again.

>if i don't have any experience, should i not even have an experience section on my resume?

Yeah. If you're applying to tech jobs, leave out all non-tech stuff.

I've seen resumes of recent grads where they try to talk stuff up. One guy listed his time as a bouncer as having learned people skills. Nope. It was *only* a negative in my book.

I only want to see internships and relevant experience. If you have zero experience at all, maybe try some open source contributions and list that.

Work experience and job-relevant experience can be separate. Especially if you're a burger flipper programming on the side.

Talk about your job-relevant side projects under a Technical Experience section. If any were paid projects, be sure to note it.

Racket or Common Lisp.

sure, if they clumsily try to talk up their own competence as being more than it actually is then that's a negative, but you can still mention your previous work experience

Memes
Thanks!

Microsoft's build system for its .NET command line utilities and powershell are fucked. They depend upon .NET themselves, so require downloading a previous version, running that, and using it to build the next version. Unfortunately, this makes it impossible to built the command line utilities on ARM because they don't have native binaries already existing on ARM. Or, well... it's possible to build just the CoreCLR, but they don't integrate this shit well. There's no make install to just put shit into some standard locations in the $PATH and forget about it.

How the hell is Microsoft completely incapable of making a decent build system?

It's all Pajeet-tier anyway.

Why is Haskell's IRC channel so much more helpful than that of any other language?

I mean, there is no time of the day where you can't get an expert level answer to your questions within seconds by asking there. It's pretty crazy.

>there is no time of the day where you can't get an expert level answer to your questions within seconds
Because they are unemployed.

Racket's IRC channel is also pretty nice. A lot of the people who idle there work on the language itself, so the responses are as expert as can be.

kek'd

python because you'll find for many projects it allows you to get them working very quickly

also you can into the internet with python very easily

This is an anime site wtf are you doing here post code or stfu.

It's not possible to do this ?
VS says that the expression must have a constant value

So I have a Python script that reads a stream of Unicode messages and passes them to another protocol whose client only supports ASCII. How should I go about converting the string while simply dropping anything above ASCII?

>50 years from now we will have programmed God

This shit blows my damn mind

nothing has changed since 1970, majority still program in a C-like way
don't count on it

is it because you're doing int table[4] = {1, 2, 3}, 3 things in the array and tablecopy[4] = {1}, 1 thing in the array?

No, C will fill the array with 0

from the other thread
i was stuck on recursion
well i fucked it off and realised i can iterate everything better
fuck recursion
if you use it fuck you

So I'm new to C, and I have a problem. How do I check if an element of a char * vector is null ? I though that something like
*p[0] == NULL || !*p[0] || *p[0] == '\0'

would suffice but apparently its not.

>The birth of a haskell-hater.

>he still doesn't know how to copy-paste everything from stackoverflow
lmaoing @ ur life

stackoverflow.com/questions/2365411/python-convert-unicode-to-ascii-without-errors

>i'm stupid
>fuck you

Tail calls are the purest form of iteration. The two are not necessarily mutually exclusive.

u retarded m8?

t. Pajeet

C style for loops are disgusting

Sometimes I like to post progress in dpt to keep me motivated. It especially works when people reply or are interested in what I'm making....but I feel kinda guilty at times doing it since it makes me feel like I'm blogging.

what kind of recursion

if (strcmp(*p[0], "") == 0)

i was doing the quicksort algorithm

Nice blog there newfriend, but where do I upvote It? Anyway, I'm Anxiously waiting for your Patreon.
+1

that's not exactly what i mean but ok, how the fuck is it harder to do quicksort with recursion than iteration?

the algorithm is naturally recursive

Does the C++ standard library have a built in function for comparing if floats or doubles are equal with margin of error? I just want to use the standard implementation if it exists

exactly

Well at the beginning of the thread we could've used some programming related posts to stop the derailing. And the OPs are traditionally asking: "what are you working on?" so it's completely valid to post programming progress.

You learned something today. Good job.

no, your blog is shit
even is better

>!*p[0] || *p[0] == '\0'
These two

Okay. I'll continue shitposting elsewhere.

Are there any decent COBOL IDEs?
I just started working at a new company and they dropped the bombshell that they make their web applications in COBOL.

>IT
IT is shit

IT = Technician
> noun
> 1. a person employed to look after technical equipment or do practical work in a laboratory.

you fucking hapa cuck memekid shitboi hack excuse of a pajeet nigger

#rust is great, too.

...

can't you just do f1 > f2 - margin && f1 < f2 + margin?

The fuck are they burning, that's cow's poop?

There's not really a constant uncertainty. For instance, the uncertainty of A+B is the uncertainty of A + the uncertainty of B.

he's retarded is why

One of my classes is getting pretty big, currently is 607 LOC, d-doshio.

I was fucking around with the linux framebuffer and then realized why nobody uses it.

>that's cow's poop?
yep

I mean, you have to choose the degree the two numbers can be different anyway
if you want them to be equal to the second number after the decimal point you'd use 0.01 as the margin. if you need them to be closer to equal, use a smaller number

*takes a big sniff of the air*
Ahhhh....

LOC or SLOC?

for (int i = 0, j = n; i < n; i++) {
printf("%d", a[i][j]);
j--;
}

Would this work at all? I want j to decrement at the same rate that i is incrementing.

ye
you can even place it next to the i++ after a comma
for (... ; ... ; i++, j++)

why not
for (int i=0,j=n; i