/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: muslimah_qt.png (536x536, 288K)

Other urls found in this thread:

stackoverflow.com/questions/49489364/wget-and-encoding-how-to-force-utf-8
unix.stackexchange.com/questions/321492/wget-returning-binary-instead-of-html
github.com/mattparks
twitter.com/SFWRedditImages

27th for Ada!

This image, it angers me.

I don't even understand why someone would draw this.
Anime is haram.
And so are computers.

same

Anone! What do you think of my dress? I'm going to wear it to the JavaScript lesson!

Attached: bb712fe6519cdaa6e9bbdf6a33d24e16.jpg (860x1280, 127K)

I was supposed to work on something but I'd rather shitpost and lang wars instead

This thread is for programmers who think cute muslimahs are hot. The other one is for programmers who enjoy getting cummed inside.

Good book, thanks for recommending, user.

Someone post a challenge

which thread is the real one god fucking damnit

This one, it was made first. I don't see a reason why it would be invalid.

Find a strictly weak normalizing pure type system.

Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0?
Find all unique triplets in the array which gives the sum of zero.

e.g
nums = [-1, 0, 1, 2, -1, -4],
output:
[
[-1, 0, 1],
[-1, -1, 2]
]

p.s. The solution set must not contain duplicate triplets.

see

Gotta learn to take it easy.

Imagine a website selling bikes that has a huge userbase. What kind of database should it have?

sqlite.

>customer table
>order table
>product table
>orderline table
it wouldn't be that complicated

depends on the size of the bike

i don't know
someone here might know, but it would probably be better to ask the thread for web development and not the thread for programming

>people associate databases purely with webshit
How disappointing.

Attached: 980x.jpg (980x650, 112K)

>unique
>must not contain duplicates

Ehh, been like 4 years since I last did anything in c++. I've been thinking about it and I really don't remember much. I'm sure if I spent some time looking at my old code I'd remember more, but right now I'm kind of drawing a blank on c++ syntax and best practices

when do I get to leave webdev

Attached: 1561403175726.jpg (1200x900, 106K)

I code in C++.

Is there an open source nn that generates futa hijabi girl hentai while respecting my freedoms? Nobody makes that stuff so I can't get my fix.

yes
can you read?

Is there any decent libcurl wrapper in C++, or am I limited to writing C in C++?

I've experimented with curlcpp but the documentation is trash and the code was last altered 10 years ago.

just use c++ requests bro :)

I'll check it out, thanks

Why don't more languages allow for Design by contract?

>Can't create contexts
>emojis in the readme
Fuck off.

Lisp is the most powerful programming language.

I don't have a compiler to test it out
IEnumerable Solve(int nums) {
var triplets = new List();
var negs = nums.Where(n => n < 0);
var zeros = nums.Where(n => n == 0);
var poss = nums.Where(n => n > 0);

if (zeros.Count() > 2)
triplets.Add(( 0, 0, 0 ));

if (zeros.Count() != 0)
foreach (var n in negs.Where(ng => poss.Count(p => p == -ng) != 0))
triplets.Add(( n, 0, -n ));

triplets.AddRange(
from p in poss from n in negs from n1 in negs
where n + n1 + p == 0
select ( n, n1, p ));
triplets.AddRange(
from p in poss from p1 in poss from n in negs
where n + p + p1 == 0
select ( n, p, p1 ));

return triplets.Distinct();
}

Ada is a DLS of Lisp and therefore the most powerful programming language by extension.

Lol at this image, fucking girl would be stoned for having a heretic mask like that and what the fuck is she doing without a Male family escort? Fucking whore.

Attached: Kot_Bomb.jpg (449x363, 35K)

What language was Rust supposed to replace?

yup already spotting mistakes like `int nums` instead of `int[] nums` but the code looks self-explanatory and correct

Sepples, because sepples is already replacing sea.

doesn't work for [ -1, 2 ] because -1 will be repeated.
need to make sure n != n1 and p1 != p then specialize for (n == -2p), p, p and n, n, (p == -2n).
fuck fuck that is if n and p are found more than once

wow, how brave of you to come out as gay

I'm trying to teach myself OpenGL but I'm having a hard time understaning View/Eye space versus world space. I get that typically you set the camera at {0,0,0} and then do some weird projection but I don't really understand how that transformation turns the 3D space into what gets displayed on the screen.

Attached: 1547452777412.jpg (324x324, 50K)

I'm trying to get out of webdev and I think I have a decent understanding of python, anyone able to give me a challenge to test out

Attached: 39ac5beb2289e753.jpg (500x500, 28K)

intredasting
nums.combination(3).select { |a,b,c| a+b+c == 0 }.uniq(&:sort)

>want to get out of webdev
>learn a lang used mostly for d(ead)evops and backends then AI memes
learn something general purpose like C++ or C#

wget "raw.githubusercontent.com/python/cpython/master/Lib/__future__.py"

when I wget a python file from a raw.githubusercontent domain, I have trouble reading it
the only thing that can read it is TextMate, everything else I've tried (atom, vim, nano, xcode) is unable to detect the proper encoding and displays gibberish
is this just me? what's causing this? how do I fix it?

Given a list of integers, return the 2nd biggest number on that list.

this works
import requests

url = "raw.githubusercontent.com/" \
"python/cpython/master/Lib/__future__.py"

r = requests.get(url, allow_redirects=True)

open('__future__.py', 'wb').write(r.content)

Is this bad? instruction is a 16 bit integer.

uint8_t nibble[4];
nibble[0] = (instruction >> 12) & 0x0F;
nibble[1] = (instruction >> 8) & 0x0F;
nibble[2] = (instruction >> 4) & 0x0F;
nibble[3] = instruction & 0x0F;

uint8_t high_byte, low_byte;
high_byte = (instruction >> 8) & 0xFF;
low_byte = instruction & 0xFF;

so wget is fucking it up somehow

stackoverflow.com/questions/49489364/wget-and-encoding-how-to-force-utf-8

looks like it returns gzipped files
unix.stackexchange.com/questions/321492/wget-returning-binary-instead-of-html

no shit, faggot.

create a permuted index

if an algorithm involves a graph, i immediately do not understand it

same here
>want to be a great programmer
>absolute mathlet
it just wasn't meant to be.

nope that's perfectly good

Is this book good?

Attached: lrg.jpg (500x656, 85K)

i'm interested too. i was just wondering about a book of algorithms in c or pascal or whatever. i'm sick of pseudocode.

yikes

Attached: mastering.png (626x926, 44K)

>tfw no Malaysian qt programmerfu

MongoDB

a hash table

I LOVE (CP)Pee

_state_.erase(
std::remove_if(
_state_.begin(),
_state_.end(),
[&last_idx](Element *t) {
return t->_inner_idx_ == last_idx;
}),
_state_.end());

what a fucking war crime sepples is

fuck you, BITCH

>meet cute programmer girl that knows her shit in C++ and is a joy to be around
>get closer to her and start doing things other than programming together
>she tells me she's trans

Fuuuuuuck duuuuuuuuuuuude...

you wouldn't have bothered to show us such trivial code if not to showcase its inscrutability

so what? if you didn't notice right away, he's obviously passable.
fuck his boipucci and then dump him.

contrary to delusional twitter ideologues and the marketing departments of major corporations, 99.99995% of females have no interest in technology whatsoever

i wish that was me

this high schooler did more than you ever will in your entire pathetic life
basically, you are ALL LOSERS haha
github.com/mattparks

Oh no! Really large comments for an explanation book!!!

I have a bigger github penis

*************************************************************
*
* -------------- merely defending the indefensible --------------------------
*
*************************************************************

github is the facebook of programming communities. If you don't know what I mean you're probably a zoomer.

hey, Matt.

so you're saying ur not as good?

Hi Matt, good luck on your video game degree!!

hello, matt. "implementing" ECS is not impressive at all.

Attached: matthew.jpg (2600x3251, 2.24M)

>

Attached: literally you.jpg (601x508, 31K)

but I said the truth.
It's because I have schizophrenic superpowers like king Terry, and I'm not atheist from MIT

What are some good podcasts on rogramming and software design?

Which non-pajeet development suite should I use for a 2-d mobile strategy game? No I don't know what I'm doing or talking about and want to get cracking figuring things as I go. C++ a must. Game needs to be multi-platform. I was looking at cocos, but my director has strong like for Unreal. Would it be a mistake to suggest cocos ? Thanks.

Idk what that means but ima guess Intel CPUs because compared to AMD they seem to be strictly weaker atm

>be data structs class
>have to make a game in sfml as our last project and then present it to the class which is 80 people.
>decide to make a really simple game so easy grade
>game is people are jumping out of a burning building and the user has to use the arrow keys to move a trampoline at the bottom of the screen to catch the people falling
>think its hilarious at first
>begin to realize that perhaps I'm going to piss of my professor with this game because it might be edgy
>too far into development to back out now
>this game is worth 15% of my grade
Why must I be like this?

I don't know but you could emulate it with quickcheck.

It's a little over the top to be quite frank.

YOLO

People are giving you troll answers.
It would probably use PostgreSQL.

asset swap to something not edgy

t. premature optimizator.

What part did you dont understand? it is too long to explain in detail, but for starter you need to learn transformation matrix (translation rotation, scaling). and then learn model, view, and projection matrix and their uses to transform your global screen's space to camera's space. That should get you started.

Attached: Capture.png (806x513, 54K)

remove the fire, replace people with eggs or pigs or something

Imagine getting triggered by women dressing modestly.
Christian women also cover their heads, you fucking morons! If anything you should be happy they're not dressed like fucking thots.

Attached: Yuna Kim.jpg (600x854, 228K)

t. premature ejaculator

Golang and Dart/Flutter is the future.