/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous Thread: Previous Thread: >Which Programming Language should I learn?
Just pick one, and be prepared to be berated for your choice.

>What books should I read and use for learning?
g.sicp.me/books/listing.html

>Should I get a degree or learn on my own and have a really nice portfolio?
Degrees get you more interviews, portfolios win positions.

>Look at my CSS/HTML/JS/Node/etc...
NO! F*ck off back to /wdg/

>How do you Sup Forumsuys get your code in that special style?
1. Put the word code into square brackets.
2. Type your sh*tty code.
3. Close your code tag as just about any other browser script would again putting the word code into square brackets, except add a / between the left bracket and the 'c'.

>How much money can I make if I get into Programming?
Check glassdoor for salaries in your area. (But hey, the sky's the limit, right? Just program something worth billions!)

Now, please buckle up for a 300+ post thread. And as always, "Thanks for flying /dpt/!" Enjoy the ride.

Other urls found in this thread:

gpuopen.com/vulkan-and-doom/
msdn.microsoft.com/en-us/library/windows/desktop/mt186622(v=vs.85).aspx
msdn.microsoft.com/en-us/library/windows/desktop/dn933253(v=vs.85).aspx
my.mixtape.moe/oarnpo.mp4
wiki.osdev.org/Creating_an_Operating_System
software.intel.com/en-us/articles/intel-sdm
lil-chat-thang.herokuapp.com/
twitter.com/AnonBabble

Want to practice my data analysis skills a bit in Kotlin so I pulled all the /dpt/ threads and have them in json files now. I'll be posting graphs and stats about the general.

that sounds fairly neat, senpai

c++ is the greatest language of all time

kotlin is a meme language.

there is literally nothing wrong with using javascript wherever possible, it is the patrician multi paradigm language

Here's the dpt template
Previous thread: >>

What are you working on, Sup Forums?

There's no additional bullshit you stupid fucking monkey.

claims of languages being memes are in fact a meme

>What are you working on, Sup Forums?

Exploring the deepest, darkest corners of Racket. Advent of Code 2017.

ii like it
fucking FAQ inb4 the same stupid questions being asking in every thread (sometimes more than once per thread)

Thank you!

FAQ's don't work in generals.
No one ever reads them, and you still get the same questions every day no matter what.
And changing the OP will inevitably trigger autists. Plus new OP's can't be fucked copy-pasting all that.

just leave it alone.

who are you aiming this at?
why are you mad that i like what OP did?
you do you, let him do him.

(geez, i heard of you spectrum cases sperging out, but... DAMN!)

D3D12 is superior to Vulkan on Windows. You get way more control over memory thanks to WDDM.

Kotlin is a shit language.

>superior to Vulkan on Windows
>on Windows
A camel is superior to a Ferrari in the desert.

Vulkan is great on Windows though, it's just D3D12 is better. OpenGL has always sucked on Windows, though, so saying D3D is better than OpenGL isn't saying much.

growing up, everyone told me i was so artistic.
but now that i look back on my 'art' it's really shitty.
this was in Boston. they had accents.
>now questioning everything.

I've never programmed in D3D12 and I don't know anything about it, but I'm kinda skeptical about the idea that Microsoft can produce something that isn't trash.

I have a very specific problem. I am using JavaFx and am using the ImageView node to paint images to the scene. I have set an event handler to the instance of my ImageView so that when I click on the imageview I can make it do stuff. I derive the image for the imageview from an object of my own creation. I want to find a way that I can access that object from the event handler of my imageview. Unfortunately from the perspective of the handler of the imageview I can only access the Image object. What do?

>growing up, everyone told me i was so artistic.
And now you realize you're just autistic?

Taste in art is subjective and an artist is often the worst critic of their own work.

I always was, too, but they've really stepped their game up since Windows 8 when it comes to APIs. The only thing that sucks is that it's still COM-based.

>data analysis skills
so like whats the point

frequency dictionaries
post length
image vs text posts
etc.

whats the point

I tried extending ImageView but java does not like that...

in Boston, it's AHTISTIC
>i pahked mah cah in the hahvahd yahd

>in Boston, it's AHTISTIC
Oh. I see what you did there now...

Not that COM is actually all that bad with language support (e.g. C++ WRL), but it's rough without it.

>they've really stepped their game
>it's still COM-based
Every time.

how come? with vulkan you send the commands directly to the gpu, you can't have more control than that.

why do we have to put a domain name when creating in VS and/or AS?
do we have to OWN that domain?

This is truth.

>frequency dictionaries
>post length
>image vs text posts
No, no, no, kiddo... that's not what data analysis is about. It's about tracking actual relevant statistics and finding correlations that can help you make more shekels.

...

>web app github page
>code_of_conduct.md
honestly take thse people behind the shed alraedy

As far as APIs making sense and having good documentation go, it's a massive improvement.

D3D12 works the same way but gives you even more control in some areas (particularly memory management and multi-GPU) because it isn't designed to be as portable. Obviously this kind of stuff could be exposed to Vulkan via extensions or spec updates in the future but AFAIK it's still very limited or experimental.

like what

> that can help you make more shekels.

in what way, advertising based on what you found?

Ever consider that these things would not exist had it not been for people who had wronged them in the first place?

>C3PO+R2D2 works the same way but gives you even more control in some areas

Does it really affect you?

???

Ever consider that these things would not exist had it not been for people who can't deal with a little bit of meanness on the internet?

literally NO ONE knows

you mean the package name?
no you don't
it's just used to avoid naming clashes

>productive but sensitive people are the problem, not unproductive people who get a kick out of being dickheads

>advertising based on what you found?
Sure, that's a major example. People are making billions off of mining data and finding correlations between what people do on the internet and what kind of things they buy. If you figure out a new way to increase the rate of clicks per ad impressions compared to the competition by showing the right ads, at the right time, to the right people, you're a rich man.

>implying mean people are inherently unproductive
>implying people who can't take an insult and get all anal about "conduct" on the internet are productive
Nope, nope, nope, nope, nope, nope.

The people who complain about shit like that tend to be people who aren't even productive and just want to start shit so they can say they did something productive.

>Nope, nope, nope, nope, nope, nope.
Did I just trigger you, user?

People who care about a CoC either way are unproductive.

do you have any source? the kernel driver used by vulkan should be the same as for directx

The D3D12 API lets you do certain things the Vulkan API does not. It's not really that complicated.

>durrr u tuhriggurd
You know I'm right. Nothing "productive" comes out of numales and gurl koders.

The next number to be put in the tree is 6 but I don't get why the 5 doesn't move to the right. But the 7 gets out on the right the very next move

Fill me in brehs

I started reading C Programming: A Modern Approach but it's way too fucking long. Is the K&R book more concise?

like what? both vulkan and directx 12 are using the same underlying WDDM driver.

gpuopen.com/vulkan-and-doom/

vkAllocateMemory() is implemented on top of WDDM.

msdn.microsoft.com/en-us/library/windows/desktop/mt186622(v=vs.85).aspx
msdn.microsoft.com/en-us/library/windows/desktop/dn933253(v=vs.85).aspx
Last time I checked support for this stuff in Vulkan was non-existent or experimental.

Is taste completely subjective? Surely there are things that are near-universally seen as "beautiful" or "good" or "pure." Like a sunset, for example.

yeah K&R is pretty concise.

Taste being a matter of a majority of opinions is still subjective.

explain to me what the insertion operation does

If you don't like this one you can check Gustedt's Modern C. Just avoid K&R, it's way past obsolete at this point.

>emulate Wii game using DirectX12
>78fps
>emulate Wii game using Vulkan
>41fps

>b-b-but there is no difference between vulkan and DX12! they're literally exactly the same!

sorry sweetie, but Linux just got BTFO by Windows 10 once again.

Should we make a copypasta for the header of every /dpt/ similar to the other thread?
For example we can put link to cppreference "where do i start to learn STL in seppels"
or another "Tutorial" website?

They would be productive were they not continually harassed.

>vulkan vs. directx shit-flinging
>every single day

the great thing about using Windows is that you have the freedom to use either directx or vulkan.

Depends on whether you want to file everything that isn't strictly objective as "subjective". In any case, you can make a meaningful distinction between things that appeal only to certain individuals based on their unique genetic makeup/personality/life experiences/whatever, and things that naturally appeal to almost everyone thanks to some common core of humanity that different people share.

Any copypasta should recommend Agda as the first programming language to learn.

>black people would be productive if we just pull them up by their bootstraps by giving them welfare and affirmative action college and jobs

Dolphin hasnt quite implemented vulkan yet afaik

>They would be productive were they not continually harassed.
That's what they keep telling themselves. In reality, they're incapable of productivity, but they don't want to face it, so they have to constantly look for external factors to blame. They set arbitrary rules hoping that someone WILL break them, and when that doesn't happen, they go to great lengths to reinterpret neutral actions as violations of said rules.

just realized, there's not been much, if any, curry in dpt for a long while now.
did we win?

curry is tasty. it's /dpt/'s collective loss

i may have a plan...
tell me how viable this would be:
take 80% of my tasks from comfy programming job and outsource them to oDesk or something. with the extra time, i can get a second 6 figure job and do the same thing.
and a 3rd, maybe 4th or 5th.
4x (5x - 1x to pay the pajeets) money for the same efforts.

...

looks like diarrhea and you wiped with brittle leaves

>have to look over all their work to make sure it's not shit
>then have to fix the shit so you don't look bad
have fun

i think you're underestimating the time it would take to integrate their work with yours. you'd be a manager, essentially

yes. i'd be a manager making $440k/year
;) teehee

yeah that sounds good i guess

t. never ate anything that tasted good

It was, until some pleb put a ++ on the front of it

>take 80% of my tasks from comfy programming job and outsource them
What makes you think your employers wouldn't have done it in the first place instead of hiring you if it was a net win financially?

How much'st've a Python noob need to study to be able to produce a YouTube video downloader with Python?

What books would I need to read if I want to write a basic operating system? I know C++ and C well enough, and am somewhat familiar with data structures and algorithms, so all I need is an actual book to explain OS dev to me.

Uhh, quite a lot to be honest, you have to somehow parse your way through Youtube's pages.

Best to use youtube-dl instead - it's written in Python, it already exists, and it does nearly every service.

I imagine he wants to try make a downloader as a learning project. He can probably use something like beautifulsoup to parse YouTube's pages.

the glib answer is to read the minix book. that’s what linus did

hers what you need to know im guessing, just use the web inspetcor to find how they do the video, what's the link
then it's pretty easy

or use youtube-dl

is opencv a meme or should i use neural networks?
my.mixtape.moe/oarnpo.mp4

This? Sorry for the horribly pixelated cover from amazon. Thanks for your answer.

Look for osdev and osdever for a good starting point. Bran's tutorial is a classic but you may need to fix the makefile and you could possibly get a less-old version of GRUB Legacy.

It helps if you can read CPU manuals and suitable hardware reference manuals. You'll also need to know some assembly.

For a typical operating system you will need:
* A bootloader (thus, some way to load shit off the boot medium you are booting from)
* A disk driver (could be a ramdisk)
* A filesystem driver
* A task scheduler
* A kernel standard library (can leech off newlib if necessary)
* A memory allocator
* Exception and interrupt handlers
* Some timer you can configure for a constant interrupt

Some of these will be readily available.

Other things to check out are:

* PCI support (actually pretty easy and quite nice)
* Virtual memory system
* User mode support
* ELF binary loading (or PE, I just prefer ELF and you can get a pretty straightforward one if you static link)
* For x86 only: A V86 monitor (mostly helps w/ SVGA and if you're booting off a floppy disk the INT 13h handlers save you the pain of dealing with the cancer that is the PC floppy disk controller)
* A graphics driver
* A sound driver
* A network stack (not easy, you might be able to wing it with IPX though)
* A USB stack (was cancer the last time I tried it)

TL;DR there's a shitload of things you can explore, so get a nice base working and run with it

Thanks, that is very helpful.

This is a really good book. It's not going to tell you how to create an OS by yourself, but it will tell you how certain OS's do things and why they do it.
It specializes in teaching Inferno, which is an OS that is heavily based on Plan9.

wiki.osdev.org/Creating_an_Operating_System

this wiki is very useful

These sound very good. Thanks a lot for your help.

I use OSdev but most of the content is out of date or not very helpful (more precisely it's less clear and practical than the manuals). That being said it can show working examples when the developer's manuals are not clear enough.

I'm not quite understanding, what manuals are you talking about here?

software.intel.com/en-us/articles/intel-sdm this, for example, which is pretty much from where all the x86-related OSdev information comes from. Also your hardware programming manual.

lil-chat-thang.herokuapp.com/
I made a thing

>see a Rust program that could be useful
>no binary
>since the shills keep spamming that the language just werks thanks to the cutting-edge "moad-hull" and "curr-gah" systems I decide to bite the bullet and try to build it
>hours after installing rustc I clone the repo and go to the root folder
>cargo build
>takes hours to update dependencies
>once finished, pages of error for undefined types
First time I actually fall for an internet meme.