/dpt/ - Daily Programming Thread

Previous - What are you working on, Sup Forums?

Other urls found in this thread:

github.com/Sup
a.4cdn.org/g/thread/55049900.json
a.4cdn.org/g/1.json
a.4cdn.org/g/2.json
youtube.com/watch?v=YaxGNQE5ZLA
nytimes.com/2016/05/24/world/europe/austria-presidential-election.html
twitter.com/NSFWRedditGif

Erste fuer D

Mona lizard. Right now I'm building one with 300 triangles and 1000 candidates for each. We'll see how that turns out.

D's shit and so is your waifu & favourite vidya

designated shooting streets

Trump was right. Shoo shoo Saracen scum.

OI, tripfag. You know anything about where the desktop threads went?

No idea.

8th for Go
also, nice triple (5, 9 and 0) dubs

Still reading through this

I'm learning WPF, seems a bit big and definitely fun.

they were banned.

damn.

Overthewire Bandit games.

A Danbooru scraper & Sup Forums scraper would be very fun & useful. The key to start is finding well-written pseudocode & not just a YouTube video called "how to write le scraper".

Does Sup Forums have an api?

Do you enjoy dick in your mouth (hint: yes)?

>seems a bit big

4 u

i'm a girl, so yes..

...

calm down, fatty

pls b in grayslake

Aww. No more Yuuji stalking.

I was expecting that response, ty bb.

your png is now optimized

>break someone's car while cleaning it
>>your car is now optimised

>Baneposting

Cute Akari. I thought about the yurus at work today. Made cleaning up the shattered glass so much easier.

Anyone else up to baneposting a bit here?

what the fuck are you talking about dude?

it has a smaller size

How do i use the Sup Forums api?

Yet part of its defining features was destroyed in the process. Today we mourn UUUU.png, that user shamelessly killed

github.com/Sup Forums/4chan-API

thank you

a.4cdn.org/g/thread/55049900.json

a.4cdn.org/g/1.json
a.4cdn.org/g/2.json

Now I can't post my high test women in the desktop threads.

...

let's dispel with this fiction that this man does not know what he's doing. He knows exactly what he's doing.

THERE IT IS

Imagine being ginger

I'm really starting to hate Obama. Rather than "arm gays" people are saying "ban guns!", and he's feeding into that.

Not once did he mention the reason for the attack, either -- radical Islam.

USA can't afford to be politically correct anymore.

>I'm really starting to hate Obama.

That implies that at some point you liked him or didn't disliked him

if you're a leftie you might aswell kill yourself, you're too intolerant and ignorant to the dead people

This is retarded.
Rather than arm gays, ban muslims.

I never liked the guy, but he wasn't the worst president. Then he started going on about how his son would look like Trayvon, and how important Obamacare would be, and all sorts of other shit.

Lefties are mentally impaired.

The only good about the shootings is that it makes it easier/more realistic to find a qt not-extreme-leftist bf.

we should seriously ban muslims or at least subdivide countries so that white people can choose to live with white people and so on, we need to stop this ultra-faggy political correctness bullcrap and face the reality that people are different and have different cultures

a better version of havij

>subdivide countries
Fuck off, just because they were fucking let in by Labour doesn't mean I'm giving up part of England to them

we could use them as wage slaves if not literal slaves

So basically 1800's South, but w/ Muslim slaves instead of black slaves?

Thought of making a rendering engine in Go.
Then I realized how big an undertaking that will be to manage, and that I have no experience working on anything larger than tiny tools, let alone something on the scale of making a GUI kit.

As much as I dislike Trump, that was funny.

>Not once did he mention the reason for the attack
Because politics. Look at the allies we have in the region. It's the same reason Bush called Islam a religion of peace.

Also, did this just become a Sup Forums thread? Please stop.

yeah it worked great until SJW's took over

Fuck off, that ended with a 60% white America

>Also, did this just become a Sup Forums thread? Please stop.

Would've been better off just not importing them at all. We could still be 90%+ white.

Finally, it's done. Not bad for 300 triangles. Could be better.

this is a dumb question, but does the GNU assembler on OpenBSD come with M68000 support by default?

the -m68000 switch doesn't work, do I need to recompile it?

"Congress shall pass no law respecting an establishment of religion, or prohibiting the free exercise thereof"

Rather than violating the constitution, how about we arm the fucking gays?

Unless you're running OpenBSD on a 68k CPU, the native compiler for it likely won't target it. What you need is a GCC cross compiler. You may need to build it from source, in which case, you have to use a target triplet along the lines of m68k-elf-openbsd or m68k-elf-linux

The constitution only defends the rights of the American people from the government

Right, but when you say "ban Muslims", one must question, what of the Muslims with US citizenship?

alright, thanks for the answer

>falling for the US citizenship meme

If you are born or naturalized in the US, you have full rights to practice any religion you wish, so long as in doing so, you do not bring harm to others. This holds true even if others are harming others in the name of your religion.

No problem mate. Also, if you're going to go out building a bunch of cross compilers, I'd recommend making a separate folder for them, like /opt/cross, to keep away name pollution. You're more or less going to have multiple applications called gcc, and the structure after installation should look something like this:

/usr/bin/gcc # this is your native compiler
/opt/cross/bin/m68k-elf-openbsd-gcc # cross compiler
/opt/cross/m68k-elf-openbsd/bin/gcc # also cross compiler
/opt/cross/m68k-elf-openbsd/lib # cross compiler's libraries
/opt/cross/m68k-elf-openbsd/include # cross compiler include path

If you let /opt/cross/bin be a part of your $PATH, you don't have to worry about gcc meaning anything other than your native compiler.

Also, I think some configure scripts allow you to set a compiler prefix to use a particular cross compiler.

>jew-S citizenship

>being born in America makes you an American

yeah I was thinking of just putting the binaries in my $HOME/bin folder

>If you are born or naturalized in the US, you have full rights to practice any religion you wish, so long as in doing so, you do not bring harm to others.

You also have the right to keep and bear arms, such that you can protect yourself against those who WOULD bring harm to others.

...

That fuck should've been impeached long ago...too bad the neocons make it so the left has total control.

>americans elect same shit president twice
>blame opposition parties

I did not vote for that globalist puppet. I was not old enough.

underage pls go

I never said how old I was for the 2012 election. If you must know, I'm 20. Still not going to vote, as these elections are a sham.

Yes. Yes it does. See the 14th amendment.

That works too.

Goddamn I love my country.

youtube.com/watch?v=YaxGNQE5ZLA

F# patterns are much better than Haskell patterns

Your country did

A program to fiddle with context-free grammars. I just got this part to work (checks if a word has the empty word in its transitive reflexive closure).
It's a bit trickier to do for CFGs in general instead of just your run-of-the-mill LL CFG because you haven't got a "no loops" guarantee if you're working from left to right.

It's not much and most of it might have a more efficient way of doing it (what I said above has worst case exponential time and space complexity, for example), but I did it all by myself and I'm proud.

I bought a new gun today. Feels great to be an American.

We are the only hope left for rebuilding the western world on the foundation of freedom.

Many if not most american citizens are not american

I discovered something about Windows: whenever I click the window title (WindowChrome) and leave pressed while not doing any mouse drag, it causes the cursor to do a fast "blink/flash" after like 1.5 seconds. That's making my r/a/dio player to glitch the audio for like 100 ms.
It kinda sucks but I'm too lazy to fix it since seems like a Windows problem and not from my application.

user, to be an American citizen by definition implies you are an American. That's what the "American" in "American citizen" is for, dipshit.

>it might have a more efficient way of doing it
If you can get your CFG into Chomsky Normal Form, CYK algorithm should do it in like... n^3 time I think.

>user, to be an American citizen by definition implies you are an American. That's what the "American" in "American citizen" is for, dipshit.
It doesn't and never will and you know it.

Does anyone know how to set a default syntax in Sublime3?

>If you can get your CFG into Chomsky Normal Form, CYK algorithm should do it in like... n^3 time I think.
I'll look into it if I ever get around to changing the algorithm, thanks.

vote trump damnit

not voting doesn't do anything

I would love to hear the logic behind your counter argument about how one can be an American citizen, and yet not American.

CYK is pretty damn important to know. At least two of my classes have covered it. Alternatively, if you have a non CNF algorithm, but can restrict your parsing to something like LALR(1), look into how Bison/YACC works.

>Not gonna vote
Vote Libertarian. We're basically the party of not sucking. Problem is we don't get a lot of votes because two party system.

Voting doesn't do anything either.

I've only had a basic intro to automata course so far. We mostly focused on LL1 when discussing CFGs, no mention of CNF or any algorithms pertaining to it.

So if I illegally immigrate (aka invade) America and have a kid there, that kid is American and deserves to be an American citizen?

lad

this guy lost by 49.7% vs 50.3%

nytimes.com/2016/05/24/world/europe/austria-presidential-election.html

if people didn't have your cancerous defeatist mindset he could have become the next hitler

>voted for him twice
>completely content with my decision
Get rekt, fascists.

what, was it a high test PNG?

seriously, what was the defining feature?

Actually, now that I think about it, I'm not sure if CYK would help? I don't want to check if the empty word is recognised by the language, I want to check if a specific word can be reduced to the empty one.

>American
I'm American, yet I don't live in the USA.
hint: America is bigger than your shithole

estrogen polluted fags like you will be the demise of the west

>So if I illegally immigrate (aka invade) America and have a kid there, that kid is American
Yes. The constitution explicitly says so.

>and deserves to be an American citizen?
Whether they deserve to or not is not what is being discussed. What is being discussed is the definition of American, and the definition of American citizen, as defined by the current laws on paper.

The word "American" is a demonym for someone who lives in or is a citizen of the United States. See any dictionary for this.

By the constitution, whose authority in the United States is higher than any other law, even International Law, any individual born in the United States is a citizen of the United States.

Insightful post, fucking tripnigger faggot

Ah. In that case, I can't think of any algorithms off the top of my head for dealing with this case.

The defining feature was the filename.

will you fuck off back to your blog please

Does this python even monitor the ports I want it to?
I keep getting tons of interference, I'm starting to think it just monitors everything...
HOST = socket.gethostbyname(socket.gethostname())
s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
s.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1)
s.ioctl(socket.SIO_RCVALL, socket.RCVALL_ON)
s.recvfrom(port1)[1][0]
s.recvfrom(port2)[1][0]

What am I doing wrong? I don't know that much about networking stuff.

/dpt/ please help me with this c++.

I have this code fragment

std::string bin26 = "00000000000000000000000000";

bin26.replace(16,21, "11001");

//Wanted output: from bin26:
//00000000000000001100100000
//Given output: from bin26:
//000000000000000011001


I know it's doing that because the characters past that point aren't there in the segment I'm using to replace but how do I get it to replace purely that segment I'm asking for (16-25).

You can't put the 14th amendment on the same pedestal as the first 10. Would you have said the same of the 18th?
And no, being american is not defined by being an american citizen. The migrants in Germany and Sweden are not German or Swedish