/dpt/ Daily Programming Thread

int is 2 bits edition
What are you working on Jow Forums?

Attached: Screenshot_20190617_080013.jpg (1080x831, 120K)

Other urls found in this thread:

youtu.be/0R23npUCCnw?t=628
twitter.com/AnonBabble

Jow Forums stands for Jow Forumsolang

>int is 2 bits edition
OP. You even have a reference.
Do better.

Unlimited storage by exploiting google photos.

Last thread:

>2 bits
So
-2 to 1?

is C++ going to replace haskell?
Am I going to end up unemployed?

why's everyone obsessed with chaining threads, you can search only OPs in the archives

I will ask again, why do guys hate web dev or 'webshit'?

Reverse engineering an MMO.

fuck off

We're jealous because we aren't 10x fullstackers

what? it's a genuine question.

web is too high IQfor us

7 bit char was the best decision ever made in programming

It's convenient when you want to check something in the last few threads, anything older and yeah the archives are better.

see you in 10 years

>why
Virtually everything is slow and unreliable. Despite that actually doing a website that's responsive (I believe webdevs mean something completely different by 'responsive') and clean is easy. I've done it without any form of training.
This is because culturally webdevs embody the worst elements of software. There's a large and pointless diversity in frameworks in web and people move often. It's not conducive to robust software or speed of development but that's what it's marketed as. The few things that 'necessitate' complexity in the web is things like advertiser auctions. Pure evil basically.
You're corrupted and I want you purged.

This. So much this. I can't upclap this post hard enough.

edit: thanks for the gold!

>Pure evil basically.
>You're corrupted and I want you purged.
cringe

More progress on learning vulkan: I now have view, model and projection matrices.

Attached: rot_quad.webm (800x600, 509K)

I used to be a web developer and I actually hated it for the following reasons

1. Websites should be mostly text, and any design choices should improve readability and page navigation. Instead, 99% of web developers like flashy shit, parallax scrolls, images, animations, fucking landing pages with two sentences that 2 minutes to scroll through etc. You have to download 30 mb of data just to read an article.

2. Almost all website can be adequately built with a couple of libraries, some routing and basic templating. Instead, your average npm package has 40 dependencies and modules for everything like "indenting text" (I'm serious).

3. It's not just websites themselves that are bloated with shitty design and unneeded libraries - the entire environment is filled to the brim with garbage. You can't just open up a text editor and write some javascript, no, now you need compilers, transpilers, plugins, package managers, bundlers... all this for nothing - the complexity adds absolutely ZERO to the content.

4. The unending stream of NEW MUST USE tools and frameworks and trash that is impossible to keep up with but you have to because everyone else refuses to stick to tried and tested technologies in favour of your latest flashy package.

how many thousand lines of code did this take?

>I used to be a web developer
what do you do now and how did you get out?
please help

1.5k right now, it's mostly setup code

Why are graphics so fucking niggerlicious? Over 200 LoC to setup a fucking window and another fucking 100 LoC for shaders. Fuck this shit.

I'm unemployed unfortunately. I left my job due to stress and spent the last of my money on drugs and alcohol and became homeless. I ended up moving back in with my parents.

so this is what awaits me if I don't get out of webshit ASAP

It's not supposed to be easy to get into it's supposed to give you full control

vulkan is such a meme holy shit

youtu.be/0R23npUCCnw?t=628

Like I said, it's mostly setup code, stuff that's hidden away once you need to draw your models and all that.

worst*

any tips on how to get into deep programming concentration mode? I'm an okay programmer, but lately I've been finding it impossible to avoid distractions, even at my own room.

most website aren't only text, nor should they. wake up gramps, web isn't just blogs and e-commerce anymore

Yeah because writing my own driver every time I want to make a new 3D app is exactly what I need.

It's what actual game developers need. Or are you one of those fucking idiots who think that Vulkan will actually replace OpenGL/Direct3D?

There's a difference between web applications that need to be web applications (google docs) and web applications that could have been static pages with zero drawbacks (your shitty website).

>writing my own driver
Ya it's exactly like that. Except not.

Read this book. You can find it on libgen

Attached: images (1).jpg (333x500, 33K)

never_improve.jpg

>will
it already fucking has. GL4 and DX11 are deprecated legacy shit now.

It's supposed to replace OpenGL, but it's not supposed to be some bootstrap thing where indie programmers can write their own engines for fun

just use glfw and fixed function, at least amd and nvidia still support that.

it takes more for a technology to be replaced that someone declaring it depricated
not that OpenGL 4 is depreciated

Nobody fucking works with raw opengl/directx anyway, and those that do appreciate the level of control vulkan provides.

I work with OpenGL and I don't want to touch Vulkan with a ten foot clownpole, it's complicated and bullshit enough as it is

>Nobody fucking works with raw opengl/directx
Nigga what

>GL4 and DX11 are deprecated
Neither of them are deprecated, DX11 will get deprecated by fucking Microsoft in favor of DX12.

the name shall always be a clue, read uncle bob trilogy.

there won't be a gl4 update, and there won't be a gl5. there won't be a high level dx13 either, so what the fuck are you talking about? this is the future that has been decided on.

and as always, the lie that accompanies is "someone will write a high level library to replace that functionality". they said the same thing when they axed fixed function and immediate mode. guess what, it never fucking happened then and it never will fucking happen now.

I don't think you understand what "depreciated" means in relation to software

already hardware raytracing has been made exclusive to this shit. it's deprecated. it's old, it's unsupported and dead.

yeah I think you've got the wrong thread buddy, the consumer electronics thread is two blocks down

(define (foo . l) l)
(apply foo (cons 1 2))
=> (1)
Can somebody explain this behaviour? What should happen when you apply something which is not a list?

I work with vulkan and I will never touch opengl again unless I have no other choice.

>the lie that accompanies is "someone will write a high level library to replace that functionality". they said the same thing when they axed fixed function and immediate mode. guess what, it never fucking happened then
fixed function and intermediate mode still works, dumbass

>I wish more of my bones were broken

great do you want to reprogram my rendering system for me

What does it mean to "get an approximation that is accurate to 4 decimal places"?
Should I round before checking the 4 decimals or not?

Let's say x = 0.6180339887498948482...
and the approximation is 0.61805555555555... , is it considered accurate to 4 decimals or not?

no thanks to microsoft and khronos that is. It's purely amd and nvidia continuing to provide support in their drivers that enables it to happen. they could decide to axe it if they wanted, but half-life 1 and quake 2 no longer running on a new driver would probably be un-popular.

god I hate working with Java. it's so verbal, even when I go out of my way not to use accessors and mutators. and shit like not having typedef. fuck this.

>It's purely amd and nvidia continuing to provide support in their drivers that enables it to happen
was it ever supposed to work any other way? support falls on the people who implement it

Why can't I thread the obj.mod() and obj.p() methods from within the constructor when the object is created? And how can I do it?

CODE:
import threading
import time

class C:
"""Changes the value of p1 every 2 seconds and prints it"""
p1 = False

def __init__(self):
threading.Thread(target = mod, args = self).start()
threading.Thread(target = p, args = self).start()

def mod(self):
self.p1 = True
time.sleep(2)
self.p1 = False
time.sleep(2)

def p(self):
print(self.p1)
time.sleep(0.5)

obj = C()


TRACEBACK:
Traceback (most recent call last):
File "c.py", line 20, in
obj = C()
File "c.py", line 9, in __init__
threading.Thread(target = mod, args = self).start()
NameError: name 'mod' is not defined

approximation to n digits means you give n digits and round the last one appropriately

for example in your case, 0.388748 -> 0.3887, 0.388792 -> 0.3888

memory of a gold fish

it's not up to people who write the standard to "maintain support" for things you idiot, it's up to the people who implement it

except there are far more of the former than you are willing to concede.
besides web wouldn't be so popular, bloated and shit if desktop GUI wasn't such a fucking mess

you are a retard

>
>cppreference
>pajeet tutorial site
fucking retard

and you're ill-informed on the subject

what language? on racket:
> (apply foo (cons 1 2))
; apply: contract violation
; expected: list?
; given: '(1 . 2)
; argument position: 2nd
; [,bt for context]

read the reply chain retard, you are arguing against your imagination.

I could explain it to you, but since you didn't understand it before, you're unlikely to understand a second attempt.

Huh, worked for me in my scheme interpreter
is this sane? should I restrict apply to lists?

How about reusing code between projects then?

>It's purely amd and nvidia continuing to provide support in their drivers that enables it to happen
It was never any other way
OpenGL is an abstract API specification
it only ever works on anything if an implementation supports it

read further retard

yeah let me just casually write and maintain a perfectly generic and bug free wrapper for low level code by myself. it's still basically writing my own driver.

your point is illogical
it's always in the implementers hands what actually works and what doesnt
khronos depriecating something in the standard has little to do with it

>it's still basically writing my own driver.
does that scare you little man

see, totally incapable of any kind of human level comprehension

worthless goldfish

>except there are far more of the former than you are willing to concede.
Let's take this website for example. A developer could redesign the whole thing into a single page app like Slack or something and add all sorts of "modern" shit to it. Would it be better? No, because the purpose of a bulleting board, forum, or whatever, is to post text and read text. This applies to almost every web application I see.

>desktop GUI
Desktop GUI is dead not because of desktop GUIs themselves, but because the whole process of downloading, installing, updating etc. is too laborious compared to simply typing in an address and logging in with your Google account or whatever.

Ok so I should round and then check if the digits are corrects? Here is the problem:
I have an algorithm to compute the inverse of the golden ratio, that is 0.6180339887498948482...
With 11 iterations I get .6180555555555556
with 12 iterations I get .6180257510729613
So I need 12 iterations to "get an approximation that is accurate to 4 decimal places"? Because 11 iterations rounded to 4 decimal places gives the wrong 4 decimals? Seems strange to me.

>code reuse means wrapping the whole thing
Nice strawman. And you know nothing of drivers, Vulkan is child's play compared to that. It expects you to have a good grasp of concurrency, that's all.

Why?
Genuine question from an openglfag.

It's a huge barrier to entry. Game development nowadays is an exercise in pulling up the open and free ladders and funneling people into proprietary bloat solutions like unity and unreal.

your inability to elaborate only suggests to me that your communication skills are lacking, or you don't want to go any further because you don't want to admit you're wrong and you don't actually know what you're talking about

Damnit, faggots, I thought you were gonna actually post what you were doing.

Vulkan isn't designed for people who care about "barriers to entry" and midway solutions still exist

And you don't even know WHAT is being talked about.

>midway solutions
like what? where is the library? every time they promise a library will appear, like the invisible hand to libtards it will appear magically. but it doesn't. It won't appear unless they themselves write it.

you thinking things being depreciated in the OpenGL standard actually means anything

get a room and kiss already

>where is the library?
I don't even use Vulkan so I don't know, there's dozens for plain OpenGL

clinickly rarted no read no think

raytracing is already exclusive. every time some new graphics technology is invented it will be exclusive to vulkan 2 or dx13 or whatever. at some point a new gpu architecture will be unrecognizable to the current high level api model, and will have to be emulated in the driver. exactly like gl1.1 is after the superscalar revolution. and gl4/dx11 will be about as useful as gl1.1 and dx8 are today, i.e. not at all.

Recommend me some linear algebra material to learn by myself online. Preferably something easy that gets to the point.

Attached: 1545416224504.jpg (216x234, 8K)

just googled it and apparently SDL supports Vulkan now so there you go

sdl just exposes a context.

Khronos maintains an OpenGL implementation called ANGLE which simply delegates to other APIs, including Vulkan. So you no longer need driver support to use OpenGL.

There's also gfx-rs for Rust. I don't know of something similar for C or C++.