/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Old thread:

Attached: memeball.jpg (782x747, 56K)

Other urls found in this thread:

youtube.com/watch?v=o1T4N1DMGGE
tour.golang.org),
stackoverflow.com/a/1687696
twitter.com/SFWRedditGifs

fucking hate biased pro commie memes that lead to thread derailment haha

>commie propaganda
rope

If you embargo a capitalist country, the internal industry grows terribly and gets big enough to hit the international ones, which is why only socialist countries get embargoed.

these

fake and gay op pls drink bleach
u drink bleach too pls

oh god new threads are so hard to make

this is a technology board, we don't need any political discussion here. I don't care whether or not you are a communist

leftypol stop ruining everything you touch please

>bans free trade
>cries about countries not freely trading with them

Attached: 1529564176082.png (255x139, 49K)

Keep the OP's pic on topic, pls

Animu isn't on-topic. It's degenerate faggotry.

Cuba *STILL a Haiti level Shithole

youtube.com/watch?v=o1T4N1DMGGE

Attached: cuba.jpg (400x301, 38K)

>cuba
>leader in medical technology

too bad it's for tourists and not actual cubans

(cuba is a shithole and op is a faggot for derailing the thread with it)

...

...

for once i'm onboard with this. This is just uncalled-for propoganda on your part OP. Shame on you you commie faggot.
now go back to

Technology is inherently progressive. Jow Forums is a socialist board. You may leave now.

I don't care about your political beliefs. If you want political discussion go to .

Fail thread is fail.

> world leader in medical technology
> had to bring medics from Spain to tend to Castro
Also before the regime Cuba had a GDP greater than Portugal.

>66497213
> /leftypol/ bullshit on a technology boards
MOOOOOOOOOOOODS!

>still driving around rusted Buicks from the 1950s

US is a one party state like Cuba and its benefits is for super rich people and not for all of its working citizens.
Anyone who still thinks US is the role model of a modern, western free country is delusional, your revolution failed after like 3 presidents.

Change my mind.

Attached: IMG_20180522_135204.jpg (500x325, 28K)

the US is a two party state. not that that is any better

It's a one party state with two different PR departments. Reps and dems do the same shit because at the end of the day they need to please their masters who paid for their campaign if they want to sit in the capitol or in the WH again.

Attached: IMG_20180524_221632.jpg (657x1024, 75K)

Nope, it's a two party state and the parties are different, with different people, different ideology, different financial backing, and different goals.

>different goals
"screw you over" is one goal

Their ideologies might seem different but they're not. Specially their foreign policy, where if you're not droneing someone you're carpet bombing them.

Attached: IMG_20180625_115606.jpg (800x450, 45K)

Also not true, and in either case both parties have dozens of goals. Democrats have no goal concerning social conservativism and that is a giant Republican goal for most of the past 30 years.

No their ideologies are extremely different, both agreeing to capitalism is actually a small part of the Venn diagram.

Their foreign policies are drastically different, do you actually think NATO would be in any danger if a Democrat was President?

Attached: low iq sjw.jpg (640x640, 309K)

>unlimited campaign donations
>democracy
Pick 1.

Those cars are superior to all the plastic shit they make nowadays.

so, what do you guys think about Go? I'm following the Go tour (tour.golang.org), and doesn't seem too bad
>inb4 muh generics

stop derailling the thread, this is /dpt/, not Jow Forums

fuck up OP

There's a good reason why Castro was never assassinated and Qaddafi was. If the US wanted him dead he would be.

>There's a good reason why Castro was never assassinated and Qaddafi was
why are americans so ignorant and retarded?

Attached: mutts.jpg (1024x936, 215K)

>If the US wanted him dead he would be.
The US can barely even hold elections without major foreign interference, user.

You're just upset that Cuba is a puppet state.

I'm not the OP

shut up OP. you and your pathetic thread are shit

come on, faggots, stop derailing this thread

stop trying to save your pathetic thread OP
go to the real dpt

This isn't the real /dpt/.

You've never gotten behind the wheel of a 50s car if you think it rides or handles better than anything modern.

you derailed it first OP

Now suck my freedom cock you communist scum

I'm not the OP, you fucking retard

in any case, this thread clearly shows your hypocrisy and ignorance, as others said

Attached: SJW.jpg (693x693, 105K)

You literally lost the war against us, you nazi retards!

The cold war happened too.

Capitalism does that, not communism. That kinda degenerate shit would literally earn you a one time visit to the paredon in Cuba, anons.

You mean that period of time when you lost wars to barefoot Asian peasants?

Or that time that the Soviet Union collapsed...

this

>degenerate american liberals = communists
kek

also, let's not forget WHO defeated nazis... and who had/has the most jews in the world after israel

tankies need to die

Take your faggy maymays back to trannypol.

>Capitalism does that, not communism
There's an 90% chance those women identify as socialists or communists, and hate capitalism as much as you.

they're intent on escalating violence so they're suicidal anyway

t.

Come at us. Last time, you ended up offing yourself in a bunker in Berlin.

go back to screeching about "imperialists" on leftypol
retard
>everyone who isn't a tankie is a nazi
authoritarianism is a trap

Attached: 1528109343383.png (316x89, 4K)

I don't use leftypol, I am not on oestrogen.

>(You)
>doesn't get jokes
>calls other people retards
autism

All communists are autistic.

no i'm not a neoliberal capitalist sjw, mr tankie

no, only retarded US "leftists" who happen to not give a shit about workers and poor people

doesn't mean shit

you just pretend to care about the workers to get power, stalin

If you cared about workers you wouldn't want to flood them with refugees.

christ you people are pathetic

the US doesn't have to be a good model for Cuba to be shit

>polite sage for off topic

thanks for the (You)s

redpill me on zeromq vs rabbitmq vs activemq

>Cuba belonged to the high-income countries of Latin America since the 1870s

>Prior to the Cuban Revolution, Cuba ranked fifth in the hemisphere in per capita income, third in life expectancy, second in per capita ownership of automobiles and telephones, first in the number of television sets per inhabitant.[15] Its income per capita in 1929 was reportedly 41% of the US, thus higher than in Mississippi and South Carolina.[16]

Attached: DL6h-gVUQAABQem.jpg (400x400, 36K)

stackoverflow.com/a/1687696
I remember doing some research, I think I found zeromq to be the best one, but in the end, I didn't use it, so dunno...

>muh high-income countries
>muh per capita income
retard spotted

ABANDON THREAD

no u

fuck off tankie

>look mom i (YOU)'d all those racist nazis!!!
>that'll teach em'!!!!

Car makers user plastic so that the cars are safer for you, retard. In the event of a crash, the car itself absorbs the energy rather than transmitting it to your body.

>also, let's not forget WHO defeated nazis...
>forgetting that USSR was part of the allies
>forgetting that USSR got to berlin first

Cracks me up every time.

Actual programming question:
Ive been programming for about two years, and i just recently srarted writing a 2D game in SDL. Its going alright and ive managed to get a world and a couple of characters onto the screen and move them around. Now, what is the best way to read in a map to render in the game? So far ive just literally hardcoded where all the parts of the map are gonna be. Ive played around with reading a textfile with a character for every square of background, but that seems like a very unreliable solution. How am i supposed to do this?

Doing it in sepples btw, forgot to mention.

This is more of a general question, but how long it took for you guys to actually UNDERSTAND some stuff like pointers and arrays? When I started learning Perl, it took me 5 to 6 days just to understand what the fuck arrays were. I was at 5th grade back then (2001), so I hadn't seen matrices or arrays in math class yet.

About pointers, I still have no clue what some stuff does, specially in C. Just that it works. I still don't feel confident enough to utilize them except for a few self-contained cases.

I honestly don't remember. It just kinda clicked one day.

When are you comfortable using them? Do you want understand that arrays etc. are effectively pointers?

>Starting a dpg thread with commie bait
Shitty thread gg go next

Do it the old way, code tables to correspond to certain tiles. That way, you can even make a level editor in little time. It can be very simple stuff like:
A1 = top_left_of_church.jpg (or whatever format you use)
A2 = top_center_of_church.jpg
A3 = top_right_of_church.jpg

It took me a week to really understand arguments in C. To a complete beginner, even something simple like calling a "function(int a, int b)" from main() felt like you just discovered the keys to some underground treasure or something.

Also returning pointers.

If you're talking about a 2d map of a level and you want it to be human readable, then I don't see what the problem is with character per tile. Include the mapping of what characters means what in the file.

level1.txt:
......Y..
...~~~...
..~~~~~..
...~~~~~.
.....~...
.X..

I find it difficult to figure out what exactly people woudn't understand in pointers.

I think my main gripe with C was that I came from a PHP, so C not having something as simple as a string type really fucked me over. I mean, you can usually learn a new language in a few days once you mastered something first, but how the hell are you supposed to realize you store a string in a char array?

>how the hell are you supposed to realize you store a string in a char array
a book tells you to?

>how the hell are you supposed to realize you store a string in a char array?
I don't think it's something you realize, but if you're learning C that feels like something you should learn like day 1?

"In this introductory lesson, we talk about types. There's int, [...], char, and String which is an array of char"

What's difficult about them? They point to places, there isn't that much complexity to it.

Probably assignments are hard to understand at first. Like how

int *a;
int b;
*a = 3;
a = &b;

The first question a person would ask is "Why doesn't int *a = 3 work at all, but if I put a=&b before it, it does?"

I tried to learn C by an "intermediate" online course, then I realized I didn't know what the hell were all those char[] = "string" were.

>Why doesn't int *a = 3 work at all
The person should instead ask

>what is this line supposed to do?

Answer to this question and you'll immediately understand why it';s breaking the program.

A book!

Poinsters are easy, putting const at the right place though, that's the real fucking mystery.

I agree that this is probably what is confusing... but it's not *that* confusing. Conceptually it's pretty straightforward, then sure the syntax is a bit cryptic, so maybe you just need to write it out on a note and have it there while you're using it for the first few times. But for all the things that are confusing about programming, this feels trivial.

The first char array in K&R only appears in Chapter 2, I'm pretty sure of it.

const always modifies what's the the left of it

> const int i = 1;
> nothing to the left of const

Thanks, i guess ill try to do it that way then.

Well, it is possible to survive until chapter 2 of K&R without drowning in spaghetti falling out of your pockets caused by your inability to use strings?