/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

strawpoll.me/11949251
starcraftai.com/wiki/Main_Page
godbolt.org/g/7HMVvk
youtube.com/watch?v=EHa3twURYHE
twitter.com/NSFWRedditImage

First for Java

why shouldnt i learn C for game dev

Functional programming thread:

Please use Norwegian for /dpt/. A poll was conducted and Norwegian was preferred to English by a large majority of respondents.

strawpoll.me/11949251

how can i see computer science as something else besides something that's ultimate goal is creating consumer grade products or as simply as a hobby?

I'm halfway through my degree and I can say it's rewarding to finish a project, but i need a higher purpose.

how is computer science beneficial to understanding God?

Nigdy

Computer science is applied mathematics.

can you explain further? i'm trying to figure out why computer science is actually valuable.

game engine+games are extremely complex pieces of software involving highly abstract goals, that usually require very rapid and significant iteration

the high-level thinking of game design is usually easier to express and refactor in a high-level language. however, due to performance considerations, object oriented c++ tends to be a popular choice. other popular choices involve writing low-level, performance-critical systems in c/++, while having game systems and logic specified in something higher-level, like c# or lua

there's nothing "wrong" with writing in c, it just typically makes the job harder than necessary when you get past core systems like rendering/collison/etc

Because games don't run on platforms that don't have C++ compilers.

Why is the pursuit of any sort of knowledge valuable? Why is mathematics valuable, or linguistics, or history, or zoology?

with mathematics we're unraveling god's design. you could say its his language.

just trying to tie computer science with philosophy. i mean i'm glad the industry pays well and I enjoy programming as much as playing video games but i'd like to pursue it still and also align it with something more meaningful.

>just trying to tie computer science with philosophy.
Literally type theory.

that's lame

I'm thinking the ultimate goal in computer science is artificial intelligence, no? mechanized pursuit of knowledge.

computer is something that can execute an extension of your mind

you tell it what to do, and it does it

right now its like a retarded and paraplegic extension of you who is also autistic and can do maths at incredibly ihgh speeds

Well a good chunk of type theory is about what is computable and at what cost. That is, quantifying the ability of a computer to decide what is true and in what context.

>is about what is computable

Fact: The most interesting problems are not computable.

is that the whole n = np? what is computable and what isn't and why things that aren't computable are that way? what makes them that way or w/e.

Not surprising that your entire life is computable

If you look at type theory from a moral standpoint, currently it posits that computers are really good at "work" but that they're terrible at "thinking". Even though "thinking", to a computer, is just a form of "work". They can e.g. check that a solution to a complex problem like Traveling Salesman is valid very easily, but can't solve the problem themselves.

Yes, but in the context of type theory, computable things are true statements.

>moral
Computers don't have souls (yet (?))

Moral probably wasn't the right word, I'm not sure why I used it. From a human standpoint? IDK.

>implying we know, what the soul is
>implying we are soulful

But then, your life is, too.

This thread is pathetic. It is not about programming. It's just a bunch of computers illiterates and first semesters memeing about whatever they just learned.

A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

The only real programming questions I have seen so far are from beginners(it's fine to be a beginner btw).

This entire site is shit and I don't know why anyone would regularly come here.

Starcraft Broodwar API using BWAPI
starcraftai.com/wiki/Main_Page

I'm not joining any competition though. Just for the fun of it and it's a great project to discover shits where I can use Java 8 features like streams and lambdas.

By the way, if any of you guys are interested in creating one of your own BW AI, maybe we can have a general thread one day and have our bots fight each other?

>its like a retarded and paraplegic extension of you

yep, that pretty much describes any program I've ever made.

cool story, bro

...

What do you mean first semesters memeing? do you think we're not sincere or something?

What do you guys think about "reward interstitials" for actual websites?

So instead of demanding credit cards from people, you just give points to use by watching ads to do some things like say sending a virtual rose on a dating website

that looks pretty cool.

It's copypasta

I want to get into embedded systems as a hobbyist.
What kind of development board should I get? Microchip Curiosity? Arduino? Raspberry pi?

>replying to tripfags

much sorry

I'm the best worst tripfag. Everybody loves replying to me.

Please don't acknowledge that a poster is using a trip.

no problem

...

so that's the point of computer science. to know what it is to know. basically to figure out what a soul really is. perhaps its just an illusion.

my soul is real

...

1. It cant walk around
2. You c4n f00l it by d01n6 th15

You need to consider his retardation so you have no bugs, and to make use of his autism and math skills

But the point is, you can dettach chores from your mortal mind and have the machine take care of them

How are you driving and using a keyboard at the same time?

I usually don't, since I don't see them.

someone sage a thread on Sup Forums and I'll find the post immediately.

Go find it.

...

Just anonymize them you idiot.

C++ question
How do I prevent a memory leak in the following code?
MyObj obj1(1), obj2(2);
MyObj obj3 = obj2 - obj1;

The operation obj2 - obj1 creates a new object and returns a reference to it, and operator= copies the content of that object and puts it in obj3. But the object created by operator- is never deleted.
plz help.

That's not the one. You will know it when you see it.

nah. it's too late. I'll never find it now.

go again.

don't sage a thread on the first page or it won't work.

Solution: don't do this

Strange constraint...anyways, posted.

When a person uses a trip through multiple threads, it means this person wants to be acknowledged.
That doesn't belong to the nature of anonymous imageboards, and such persons should be ignored, so their ego would lessen and not desire to get more attention.

Batch scripts are pretty comfy, just converted a complete series to a suitable format that plays on my PS4.

ok that was too easy

but I have to support that operation

why are you fucking around with pointers?

That's the one. Now why doesn't it work on the first page?

How else could you return a reference to an object that doesn't self destruct when the function call ends?

well it sometimes works, but only if it's not one of the top few threads that were bumped in the last few seconds.

just use shared ptrs or something

Don't return a reference, return the value.

Can someone do me a favor and post the back of their copy of K&R C?
I'm like 80% sure I got a bootleg copy off of eBay

Should I pursue computer science independently while working a full time job as a software engineer or should I pursue computer science via academia?

Part two:
The text inside looks more like a facsimile than a new print

Error C2440 'initializing': cannot convert from 'glm::f32vec3 (__cdecl *)(const glm::f32vec3 &,const Params *)' to 'glm::f32vec3 (__cdecl *)(const glm::f32vec3 &,const Params *)'


Why doesn't this work? It's the same type?

this

2nd attempt

If your project requires a specific compiler and you're creating a git project, would you typically just include the compiler in the project assuming no licensing issues?

>2017 - 1 week
>using actual dead tree books

need more context

>stupid opinion
>frogposter
nobody is surprised

Yes, also I should stop using pointers.
Thanks

This sounds strange but I can not retain information from an electronic book nearly as well as from a physical book

Reminder to vote for Norwegian /dpt/, to keep out Pajeet

strawpoll.me/11949251

Yeah except you give them attention anyway because you're a retard.

I'm using a pointer to a templated function instance which has the exact same prototype as my typedef.

Heres a simple demonstration of what I'm essentially doing:
godbolt.org/g/7HMVvk

Rude.

does the code you linked work?

>reply to tripposters to be a retard
>hide tripposters (i.e. don't reply to them) to be a retard
Seems about right.

yes, which is why i dont know why this doesn't work:

1. You want a move assignment constructor, rather than a copy assignment constructor.
2. If there is a destructor, it will be deleted when it goes out of scope. If you need evidence that it is doing just that, add a print statement to your destructor.

Seriously, abuse the fuck out of RAII. You will not leak unless you are doing something stupid, and that something stupid probably involves cyclical references, which you should probably be using weak_ptr for.

So why are you posting on /dpt/ on Christmas Eve, lads?

so link some code that doesn't work

I don't celebrate Christmas

Because Christmas is is two weeks yet.

>not being on call during Christmas

What are you, not a corporate slave or something?

>architect put our shit on Ubuntu
>on Apache
>doesn't know how to configure caching
>I have to be on call
>I can't into Linux

Not sure who trolled whom here.

Ideas for mobile phone applications.

Blyat, poshel naxui.

Pajeet?

I can't be bothered with one god, let alone several.

nyet

ITT: youtube.com/watch?v=EHa3twURYHE

Slavs, why u hack everything?

Because I'm jewish and there is nothing wrong with that.

I'm putting off wrapping my mom's gift and buying my dad's gift (which is a subscription, so I could get it done in 5 minutes. I'm just lazy).