/dpt/ - Daily Programming Thread

Productivity edition.

Previous thread: What are you working on Jow Forums?

Attached: code_master.png (1164x1738, 2.17M)

Other urls found in this thread:

udacity.com/google
w3schools.com/jsref/met_document_getelementbyid.asp
developer.mozilla.org/en-US/docs/Web/API/Document/getElementById
w3schools.com/jsref/prop_html_innerhtml.asp
developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML
in1weekend.blogspot.com/2016/01/ray-tracing-in-one-weekend.html
twitter.com/SFWRedditVideos

>mfw im@s thread

Attached: 1528962804018.jpg (1920x1080, 733K)

Why is subtyping so bad?

depends what kind of subtyping you're talking about.
POO subtypes are shit because inheritance is shit.
refined types are okay.

Could I learn everything I need to about C on windows or do I have to install linux?

Attached: 1534790885678.png (1000x1400, 1.31M)

You can learn everything you need to about C without a computer

yes, but get off windows.
programming on it is shit.

>doesn't support C99 or C11

Attached: trash.png (180x191, 49K)

android app in python user here, I read the comments in the last thread but was too tired to respond. I think I will give up trying to develop on android.
anyway here is the result of my last attempt today:
I did everything that the kivy website said about setting up kivy on ubuntu, after running "buildozer android debug" on a simple example that I got from the official videos I got the errors below
I looks like the python modules are missing, but they are installed with python2 and 3


"ERROR: The colorama Python module could not be found, please install version 0.3.3 or higher
ERROR: The appdirs Python module could not be found, please install it.
ERROR: The sh Python module could not be found, please install version 1.10 or higher
ERROR: The jinja2 Python module could not be found, please install it.
python-for-android is exiting due to the errors above.
"
# Command failed: /usr/bin/python2.7 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/jarek/kivytry/app/.buildozer/android/platform/build

I guess so. I managed to get C second edition the other day but it makes me feel like a complete brainlet. The index of that book alone makes me want to give up.
It should not take too long to pick up, right?

Attached: 1534814777397.jpg (318x159, 10K)

If you want to switch to android google has some pretty good, though somewhat outdated, tutorials on it. Everything still works though.
udacity.com/google
It can be a bit tricky to find the start but they really take it from the top, even wiht basic java syntax. It's a lot to go through but if you really want to develop android apps it's a legit way to go.

If you want to switch to java*

It supported C99 recently.

Clang and gvim work perfectly on Windows. Still it would be worthwile to also use a Linux distro

That book is not intended to be an introduction to programming

>refined types
Can't those be thought of as a value and some evidence? And you get 'subtyping' from being able to use it where a corollary of the evidence is required?

I would go so far as to say using Windows would be detrimental.

haven't written a line of code in like a year

no inspiration bros

picked up C++ and some barebones C, java and python

thinking about programming just makes me want to end it all lads

how do i fix this

Attached: 1492295367643.png (632x852, 47K)

Agda

Unironically, SICP.

How do I program a waifu that will kiss me?

Attached: IMG_0690.jpg (347x347, 46K)

Not everyone should be a programmer.

i want to nakadashi iori

It's the only thing I've ever remotely enjoyed doing besides playing videogames, but I havent played videogames in a long time either, my xbox has been packed away under my bed for over a year.

Is C mandatory for CS? They didn't teach it in my university but I can try learn it myself. Or is it just a Jow Forums meme? Most jobs I've seen list "C/C++" instead of just C. Is C++ better?

pretty much. Everyone should have basic C knowledge because you'll eventually run into it in some way.

Jobs that list "C/C++" as one entity aren't worth applying to.

What do they even mean when they clump them together like that? How you do things in C is so much different to how you would do it in C?+

So, what have you been doing recently? Just existing?

I have two jobs and am in senior year of Uni. On my day off each week yes all I do is exist.

They imply C++ is a superset of C. It's a fundamental lack of understanding of the tech they're using.

You can use C in C++, not the other way around.

C and sepples are basically two entirely different languages now. employers clump them together because once upon a time, c++ used to just be C with templates.

C++ doesn't even support designated initializers you idiot

why does HTML DOM references sucks so much dicks?
say i wanted to find something like document.getElementById().InnerHTML
i click on Document in the reference, then getElementById() and... w3schools.com/jsref/met_document_getelementbyid.asp
developer.mozilla.org/en-US/docs/Web/API/Document/getElementById
???
where the fuck is innerHTML?
oh that is right, it can only be found under DOM Element
w3schools.com/jsref/prop_html_innerhtml.asp
developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML

is this why you faggots complain about javascript so much?

>So, that means you absolutely can't use C in C++. Also, I lack critical thinking skills.
Ok.

You're just over-worked, faggit.

Just use msys.

I'd just like to interject for a moment. What you’re referring to as C++, is in fact, C/C++, or as I’ve recently taken to calling it, C plus C++. C++ is not a language unto itself, but rather a superset of a fully functioning C system made useful by the C standard libraries, idioms and compilers comprising a full programming language as defined by Jow Forums. Many developers program in a modified version of the C programming language every day, without realizing it. Through a peculiar turn of events, the version of C which is widely used today is often called “C++”, and many of its users are not aware that it is basically the C programming language, developed by Bell Labs. There really is a C++, and these people are using it, but it is just a part of the system they use. C++ is the abstractions: the layer in the language that allocates the machine’s resources through higher-level syntax. Abstractions are an essential part of a programming language, but useless by themselves; they can only function in the context of a complete programming language. C++ is normally used in combination with the C programming language: the whole system is basically C with C++ added, or C/C++. All the so-called “C++” dialects are really extensions of C/C++.

There is nothing wrong, Why the fuck a method would have attributes ?

And the fuck do you do to get money after getting a CS degree?
All these companies and jobs are trash.
Wish we were in communism instead.

int a = 0;
>look mom. I can write C in Java!

...
I take it you don't work with many APIs. This isn't a cookbook, it's a 1 to 1 reference.

You'll get there one day user, in the meantime, google for "html tutorials"

>Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element.
i guess i see why, those properties aren't present in one or two methods, but in all of them.

you are right, i am thinking about learning it to use pages as interfaces, rather than relying on gtk clusterfuckery

Most recent personal project at work parses C bitfield structures and generates a diagram of the memory layout to document our binary network protocols.

I would rather just use a common protocol description across the company like ASN.1 or XDR, but that would take ages to implement on legacy stuff.

Redpill me on raytracing.

Attached: 1534435071909.png (337x432, 130K)

in1weekend.blogspot.com/2016/01/ray-tracing-in-one-weekend.html

it's in a learning/experimental phase right now.
In 5 or so years we'll probably see it as a worthwhile thing. Or do you mean what RT is itself?
lights and reflections are "closer" to "real life" by emulating how everything interacts.

You'll need to know some robotics stuff. Get some kind of Cortex-M0 or M4 demo board and learn how to write a fast PID loop.

added std::container support to my lazy pure functional static ranges

couldn't work out the template to have a constructor that just takes a container and then uses ::iterator to maybe delegate to the other ctor
but im sure its possible

Attached: .png (1255x533, 25K)

VERDAMMT NOCH

printf("%s\n", "You're a faggot");

Try that in java, pajeet.

Mainly a tl;dr of how it works. It just boils down to Dijkstra's algorithm, right?

Anyone have any book recommendations for learning Game Development with C++?

Attached: 1524146995426.jpg (560x1001, 68K)

>synd fell for the roons meme

user, you have severe autism

oh boy

>Capitulation
How's heroin working out for you?

System.out.printf("%s\n", ":^)");

indie game dev or large studio game dev? because one requires you to know a lot of stuff okay-ish, and the other requires you to know 1 or 2 things really well.

Lets say Indie but really I'd love to be able to know how a full AAA game operates on a broad level

Just learn DirectX and openGL, user. After that it's all experience.

Your autism indeed overwhelms me

>System.out
Not the same, but I'll allow it.
int sockfd = socket(PF_INET, SOCK_STREAM, 0);
if (!sockfd)
{
perror("Creating socket");
exit(EXIT_FAILURE);
}


>pajeet triggered

What language do I learn in my free time?
From university I know: Java, C# (and VB.NET cause why not torture kids :-DD), some C++ and some webdev (HTML, CSS, JS, PHP).
What others beside C are essential to learn? What are some new non-meme ones that are useful to learn?

its exactly the same you retard

Functional programming. Specific language is maybe not so important, but it's definitely something to look into.

Python

Fortran for scientific computing

Wouldn't Ruby be better :-DD?

So Haskell then ;3

>hurr durr you can use C in CPOOPOO
>calls me pajeet
Do VLA autismo

Nah Ruby is a meme. Python is a genuine job winner

this

>python job
No such thing. In most cases you will have to work with some other lang or wrapper. Maybe it is possible for webshit like django but nothing else.

>you can use C in CPOOPOO
That was the original argument. Chill out lol. Has anyone told you that you have a fragile ego.

>System.out.printf != printf
>Exactly the same
>Calls other retard
k

Yeah no shit thats the point of Python. Tons of Data Science and batch processing work is done through Python wrappers

Do I choose one of the resources in the wiki to learn it?

Yeah I liked Automate the Boring Stuff

I liked how it was free.

Data Science is not that easy though. It's more than just coding.

i posted a while back about being depressed after being bait & switched at what I thought was a software dev job but ended up an IT job.

so far I've gotten 5 interviews with top tier companies and have one of my old offers back.

my plan is to get another offer or two, go into my mangers office and demand that he makes me the supervisor of the 3 people on my team and give me a 20% pay increase, then I'll quit.

When can I put in my resume that I'm fluent in Python?

>y-you can't write C in java
char arr[]; //valid C and Java

BTFO

just put it on your resume. even if you've touched it for one day, it goes on your resume

>valid Java
No such thing.

Thats why people use a casually typed high level language to deal with it

>pajeets on suicide watch

Same time you can put down you're fluent in any language, simply code something with it and put it on your repo

You should consider accepting the fact that you truly are retarded after being called so many times by different anons.

really? fuck this changes a lot..

>blocking sockets
ew

Don't listen to him. Employers want to see actual code. Your portfolio is everything

Yes, but some people think they will get a job because they know a bit of Python and Tensorflow. You still should know the theory if you want a job as data scientist.

You right, you right, bruh.

Depends where you live, here a degree is everything.

Guessing you live in some third world shithole then

not as a recent college grad. 've been to career fairs where hiring managers laughed off the super nerdy "i love to program, look at my github :3" programmers.

Hiring managers want someone that can self-teach, be a valuable member of an agile team, etc...

its always important to oversell yourself.

What sort of theory? I've been autistically arguing over data for years on here so I don't think there's anything in stats that I wouldn't grasp in five minutes

I can just copy paste that and just as long as I understand it I dont have to write it
Or I can just do those 100 roll Jow Forums programming challenges