/dpt/ - Daily Programming Thread

old thread: What are you working on, Sup Forums?

Other urls found in this thread:

en.wikipedia.org/wiki/Convex_hull
youtube.com/watch?v=oAKG-kbKeIo
twitter.com/AnonBabble

kys

5 posts too early edition

>tfw no refinement types

>Posted before the bump limit
>Forced memes
Delete this fucking thread.

Please don't post in this invalid thread, even if it's just shitposting.

Just finished my Minkowski Difference calculator. Now I just need to get the vertices from the product to render in a none shit order and I can focus on adding it to my graphics calculator.

In the second example, shouldn't the minkowski difference include 0?

>5 posts too early

Rate my captcha verification code!
int validate_captcha(char *captcha_response)
{
/* open a shell and validate captcha externally */
char *cmd_str = (char *) malloc(sizeof(char) * BUF_MAX);
sprintf(cmd_str, "curl -d \"secret=%s&response=%s\" %s > /tmp/aaaaaaaa.ok",
captcha_secret, captcha_response, captcha_url);
system(cmd_str);
free(cmd_str);
char *verify_str = create_filebuffer("/tmp/aaaaaaaa.ok");
system("rm -rf /tmp/aaaaaaaa.ok");
int success = (strstr(verify_str, "\"success\": true")) ? 1 : 0;
free(verify_str);
return success;

}

I-is that a Animu about traps? Pls tell me more

> ? 1 : 0
0/10

use !! in future

It does. The shape isn't rendering correctly because I haven't made a function to render it correctly yet.

Still working on my neural network to detect if a person in picture is wearing clothes or not.

I wonder if the kernel in 6th row is for detection of female nipple shape. I wonder if it's safe to post on a christian imageboard then.

Also seems like a lot of kernels are unused, as they haven't changed at all from their original form.

garbage

kys

Not posting threads before the bump limit is fucking important you fucking newfag.
Now it's just going to be a competition to who can post their OH SO LE FUNNAY XDDD forced meme (see OP) the earliest, and new threads will keep getting posted earlier and earlier.

Ask your neural network if I'm wearing clothes right now

This. I personally think if a duplicate thread is made before the original is at page 8 and at the bump limit it should be auto deleted and the person that created it area banned.

You can do it easily in a shell script what the hell are you smoking

> samefag autist trying to justify his autism

>pic related
Has programming gone too far?

fortunately you aren't a janitor and hopefully never will be

Fuck off trap retards. Nobody likes you or wants you in these threads. Talking about if I was a janitor, if I was a mod I would ban your entire shit hole country.

Are you not into traps? Are you not a real programmer? Are you just mentally ill?

>new threads will keep getting posted earlier and earlier.
sounds great user!

Epic meme Sup Forumsro!
Le programming trap meme amitite XDDD

It's actually true that real programmers like traps.

Wearing a skirt is one of the best ways to improve your programming ability

Think about it - GHC - GLASGOW Haskell Compiler

>are you mentally ill
>answers posting anime
top fucking kek! you can't make this shit up! lmao

Anyone know of a decent overview of pointers/references/how+when to allocate memory/etc. for C++?

Something that covers syntax too. I'm trying to read a code and I have no idea why some functions take references, why the return references, or pointers, it's all very confusing. Coming from dynamic languages.

Why should a programmer know anything more than Lisp and C?

One high-level expressive language, and one low-level bit-diddling one.

Why do we even bother with anything else? Abstracting abstractions and gaining nothing in return?

trying to read code*
why the functions return*

>Lisp
>high level expressive language
Learn Haskell user

So regarding this. Is the "correct" way to render the product just to draw every shape produced during the operation? So say I subtract a triangle from a square. Would I just render the 4 triangles produced by subtracting each point of the square and the 3 squares produced conversely by subtracting each point of the triangle and then slap them on top of each other?

stay delusional fucking fag

Haskell is a meme. Primarily a vehicle for mathematical syntax circlejerking.
It's not even homoiconic ffs.
Lisp is more expressive.

{ x - y | x ϵ A, y ϵ B }

and generally you want to use a convex hull algorithm and render that

New thread:

Okay but is that a yes or a no? I have the calculator already. I just want to cobble something to draw it so I can move on.

>har *cmd_str = (char *) malloc(sizeof(char) * BUF_MAX);
Why malloc?
> sprintf(cmd_str, "curl -d \"secret=%s&response=%s\" %s > /tmp/aaaaaaaa.ok",
>captcha_secret, captcha_response, captcha_url);
Nice buffer overflow waiting to happen.

God damn I want to fuck hime

KILL YOURSELF

>mad for not being a real programmer
why are you even here?

you are bad and you should feel bad

but you're mentally ill m8, why don't you seek help?

LE OMG UR SO FUNNAY XDDDDDDDD

you're mentally ill

>tumblr tier illiteracy
it's like you don't even want to be a good programmer

XDDDDDDDDD

kill yourself

>no u
no need to get defensive user, it's just obvious you're not a programmer

no need to get mad for getting told laddie

nice projecting

here's your (You), pathetic attention whore

OH MY LE GOD, uR so funnay!!
Us traps amirite XDD

>sizeof(char)
Are you literally retarded?

Us trap coders le sizeof(char) amirite?
XDD

The Gameboy is a bitch to program for. By which I mean this platform will bend you over and make you its bitch if you try to program it.

en.wikipedia.org/wiki/Convex_hull

alternatively going back to the minkowski difference
{ x - y | x ϵ A, y ϵ B }
(a set of vertices)

You could do this:
{ { x - y | y ϵ B } | x ϵ A }
(a set of sets of vertices)
This is like the first but grouped by x - you could treat this as a set of polygons and draw them all

you should be ashamed of yourselves fucking disgusting fags

user, I'm just asking if the way I am sugggesting will be accurate. It is demonstrably accurate from the tests I have run but I'm not sure.

yes

Thank you. And thank you for going out of your way. I wasn't getting snippy I promise, I really do appreciate the help whether it is what I am asking for or not.

>not a programmer
you should leave /dpt/ at once

(You)

you talking about animu shits?

(You)

>I'm literally retarded
>pic related
you can't make this shit up! lel

those too, but mainly the trap, tranny and crossdressing fags and especially the manchild weeb faggot that keeps posting hime and samefagging about hime

>trap, tranny and crossdressing fags
there's literally nothing wrong with that, plus it's a sign of superior programming skills

XD

you're clearly retarded if you find it rewarding to write this timewasting useless garbage

kill yourself and stay delusional, idiot

>It's not even homoiconic ffs
And?

>Lisp is more expressive.
Are you talking about macros? Haskell doesn't need them most of the time. Even then, you also have different levels of abstraction on macros: template haskell, quasiquoting + template haskell, quasiquoting + custom parser

>I got told and proven to be retarded
kekels

keep telling yourself that as if it even matters, pathetic small-minded little person

>timewasting useless garbage
>kill yourself
user... I'm not saying you're retarded, but your brain might not be fully developed

(Kys)

Does Haskell always perform computation at compile time where it can? You'd think anything without an IO or IORef signature (and without doUnsafeIO calls, etc) would be fit to be computed at compile time

>no, let me prove beyond any doubt that I'm mentally ill
ishyggy

>he keeps replying
>he keeps projecting

>stay delusional
sour grapes, m8?

Are you talking about template haskell? If so, yes, it runs 100% at compile time. The template haskell Q monad can run IO actions at compile time. You can literally compile a web template at compile-time and check for broken links, missing parameters, etc.

For other parts of the code, the compiler may run it or not, it depends on the complexity of the expression and the inlining threshold I guess

>trying to damage control his proven mental illness
lad...

you are clearly wrong on both counts

but you confessed not to be a real programmer; calling names on the ones that are great programmers is literally the definition of sour grapes; don't tell me you're also mentally ill and you can't use logic

LOL the "big dick playa" has gone full retard, he said he wasn't a faggot and that his mouth raping fantasies were for power only, but now he's fag shilling hard and calling others mentally ill lmfao! how delusional can you get!

>mouth raping fantasies
is this what you dream of? and you say you're not mentally ill? top kekeroonies!

I don't mean template haskell, but I suppose that's a good point. I mean if you had something like

functions = [ ("Add", fnAdd), ("Sub", fnSub) ]
getFn s = ...
(getFn "Add") a b
(getFn "Sub") x y

Could Haskell optimise the (getFn "Add") or would it do dynamic lookup?

>he said
>but now he
>Sup Forums
habib...

youtube.com/watch?v=oAKG-kbKeIo

you're easily recognizable you delusional shit

>he recognizes superior beings by the taste of their dick
wew laddie

have you been recently told and rekt user?

you said you're not a faggot yet you're here talking about gay oral sex and defending trap/tranny/crossdressing fags LOL FAG

are you saying you're a faggot because you were made to suck dick?

Could it be plausible to get a child window from an arbitrary application using something like user32 and change it's parent to a window of my choosing? What would the effects of this be?

>talking about gay oral sex
you're the only one talking about gay m8

i haven't sucked a single dick, you're the faggot that fantasizes about it

No, it doesn't in this case:

import Data.Maybe

functions :: [(String, Int -> Int -> Int)]
functions = [("Add", (+)), ("Sub", (-))]

getFn :: String -> Int -> Int -> Int
getFn = fromJust . flip lookup functions

main :: IO ()
main = print (getFn "Add" 1 2, getFn "Sub" 3 2)


(compiled with -O3)

It doesn't substitute it either if I replace strings with an enum

there's no need to lie on the internet

stay delusional samefagging faggot

kill yourself