/dpt/ - Daily Programming Thread

Old thread What are you working on, Sup Forums?

Other urls found in this thread:

commondreams.org/news/2016/08/02/pope-francis-capitalism-terrorism-against-all-humanity
wiki.libsdl.org/SDL_Rect
globalresearch.ca/us-led-economic-war-not-socialism-is-tearing-venezuela-apart/5535633
en.wikipedia.org/wiki/Operation_Condor
cia.gov/library/center-for-the-study-of-intelligence/kent-csi/vol44no5/html/v44i5a03p.htm
telesurtv.net/english/analysis/10-of-the-Most-Lethal-CIA-Interventions-in-Latin-America-20160608-0031.html
en.wikipedia.org/wiki/Iran–Contra_affair
youtube.com/watch?v=FPC0_k3lt0c
github.com/minexew/Shrine
github.com/tramplersheikhs/crocodile
github.com/tramplersheikhs/uriel
twitter.com/AnonBabble

First for scheme

DSL in Lisp for pushing forth to embedded uC's

best poster

I fucking love you no homo

to be real with you, I only learned about forth a while ago but I'd been running uLisp on my esp's and atmega chips. There was only enough ram left to do really basic crap but with forth i can embed the interpreter, an mqtt client, and still have space to send a decent set of instructions. it's just a super nice way to be able to take any uC's I have, and repurpose them live. cool right?

you guys :-D

They didn't want convicts in the company

what oled screen is that? been looking for one that isn't a major pain in the ass

would be nice if it had raspi drivers

Makes perfect sense if they do anything that involves a government contract or healthcare or anything that's regulated in any way. No way was that guy getting a clearance.

it's an SSD1306 128X32. does SPI and I2C. it's nice enough but what I really want to find is a big e-ink screen. I've been searching for 'replacements' online but can only find digitizers and stuff :( there are a lot of e-ink screens available but none big enough to do what I want

for (auto it = m_Animations.begin(); it != m_Animations.end(); ++it){
if( it->m_Name == name)
return &*it;
}


>return &*it;
So this is the power of sepples

Didn't know there were trinitron monitors. Fugg.

it's just a VGA tv, I've got it plugged into an SJWA+ in this picture.

for (auto& it : m_Animations)
if (it.m_Name == name)
return ⁢

Posted the other day but I figured it out on my own for the most part

Is there a more optimized way to calculate where the y should be on a tile slope?

For ascending-right slopes (that are 45 degrees), I have been using:

y = (ty*v) + ( v - ( ox - (tx*u) ) );

For ascending-left slopes (that are 45 degrees), I have been using:

y = (ty*u) + ( ox - (tx*v) ) * ( v / u );

This is what the following stuff means:
>ox: the bottom corner on the front side of the direction entity is moving
>tx: tile column
>ty: tile row
>u: tile width
>v: tile height (both u and v are 16 in this case)

They work, for their corresponding sides, and i've been playing around and haven't encountered any problems.

What I would like to do later is center the entity along the slope, so ox would become the entities x + w/2 in both scenarios; it works, but i've encountered an issue where it collides with solid tiles underneath it. The thing I have thought of doing is creating a world box that doesn't sink into the slope, and then its a simple offset from there.

I have two (45 degree) ramps that are descending left or right, and I have yet to find or come up with a formula that works for those. Is there a better formula I can use that applies to all ramps, with all the variables I have so far?

i wrote a vba script for my boss and he was impressed. i am da programur now

Yes.

can you give more context? is this a sim and you're just creating functions to determine positional interactions with a geometric shape? is this a game and you've got objects interacting with a plane? What libraries are you using?

Disgusting.

How do I become as good a programmer as Terry?

kys

hello muslim OP poster

>lefty religious leaders reading programming books
Is this a new meme?

>Catholicism considered leftist
what a day and age we live in.

Hey, welcome to the Internet.
commondreams.org/news/2016/08/02/pope-francis-capitalism-terrorism-against-all-humanity

Working on a program for managing sheep tags that are imported from a file that the tag scanner produces.
Pretty simple, but I'm beginning to regret writing it in Python with PyQt4. Works as it should on my machine (running Arch Linux) but I'm trying to target Mac OSX and not having much fun getting PyQt4 to work

building a search engine (wibr.me) comprised only of older style websites. I am often able to coax old sites from people by asking about old sites in /g.

This is a 2D platform game and tiles are in a 1 dimensional array.

I'm using SDL2, but I am not using SDL_Rect's, I am using a box struct I made myself that stores the x, y, w, and h.

0 starts at the top left corner of the screen.

Here is an example of the code I am using:

ox = (int)ent->hb.box.x + ((int)ent->hb.box.w/2);

// ascending right slope
if ( tiletype == 2 )
{
int y = (ty*v) + ( v - ( ox - (tx*u) ) );

if ( ox > (tx+1)*u )
y = ty*u;

if ( ent->pos[1] > y - ent->hb.box.h )
{
ent->pos[1] = y - ent->hb.box.h;
A_P_sethb ( ent );
}
return true;
}

Does anyone know why whenever I execute a python script in linux (which uses subprocesses), I can't see any text I type at the prompt when the script has finished executing. Whenever I press enter too, there's no newline. Just prints the prompt over and over

>commondreams.org/news/2016/08/02/pope-francis-capitalism-terrorism-against-all-humanity

I'll chalk it up to he comes from South America. A place known for it's beautiful multifaceted historically significant culture, wild and verdant landscapes, and lush natural resources--all of which have been getting raped to death systematically by large US corps for years. I get why he'd have an opinion.

>I'm using SDL2, but I am not using SDL_Rect's, I am using a box struct I made myself that stores the x, y, w, and h.

you know SDL_Rect alrady does that?

wiki.libsdl.org/SDL_Rect

>(which uses subprocesses)
m'lad you're clearly already in dangerous waters. give us more info. you've probably spawned a process that is not returning and it's tied to the terminal session you're on.

>ye olde "it's the US' fault that south america sucks" meem
KYS

>What are you working on, Sup Forums?

Exploring the deepest, darkest corners of Racket

I want to use my own, it doesn't change anything

reinventing the wheel i see.

keep it up

if I come into your house and beat the shit out of you every day is it your fault? you get new locks, i break them. you get a gun, i'm bullet proof. you try to nationalize your resources? I set up a coup against you in your family.

CIA openly admit their tactics faggot wake up and realize we're in control because we have the sack to strong arm other nations. you're god damn right it's our fault and we're on top of the world for it.

>reinventing the wheel
>c user
no news here

Oh that makes sense, I've got stuff running in the background but I've sent the standard out to /dev/null

B-but it's true, user:

globalresearch.ca/us-led-economic-war-not-socialism-is-tearing-venezuela-apart/5535633

I would try and find another way other than subprocesses to do what you're doing. they're just nasty. always. there is the os and sys libs you can probably use those. if it's some application you're working with i bet there is a module for it already

>The CIA invented all the cartels
Doubt[x]

found the 18 y/o. just because you were still your dad's jism inside your fat fuck truckstop mother at the time doesn't mean it didn't happen.

en.wikipedia.org/wiki/Operation_Condor
cia.gov/library/center-for-the-study-of-intelligence/kent-csi/vol44no5/html/v44i5a03p.htm
telesurtv.net/english/analysis/10-of-the-Most-Lethal-CIA-Interventions-in-Latin-America-20160608-0031.html
en.wikipedia.org/wiki/Iran–Contra_affair

notice the .gov on one of those? it's because we openly admit to what we're doing. If i'm fucking you in the face, telling you i'm fucking you in the face, and you feel my rock solid cock choking the life out of you, go ahead and doubt all you want.

No it's because it's a simple struct, and I had to change libraries before, I found it easier to have minor things not attached to the library.

Now do you have any idea on how to do the slopes better?

You misinterpret.
I never said we dont do those things.
Im just saying the cartels are the primary reason.

Now back to P R O G R A M M I N G

>Im just saying the cartels are the primary reason.
found the C# dev

Id rather be accused of being nearly underage than a C# """"""""""""""""""developer""""""""""""""""""

you're right that was really fucked up of me.

apology accepted, lad

it's easy for me to forget we're all people here on Sup Forums

am i people?

you are an element in the list that is people.

my roommate doesn't want my bicycle inside the apartment.

where the fuck do i put it?

>hello muslim Original Poster poster

how do I tackle reading some large program's code in order to learn how to modify it?

>open some file based on a filename that vaguely hints at what functionality it contains
>it's full of functions i don't what the FUCK they're about
Do i just start at main and read without fully understanding until i get a sense of what's going on?

is it like a lisp list?

kill your roomate, sexually dominate the corpse and display it so that other people who would get between you and your bicycle never consider intervening ever again.

op poster clearly means original post poster.

w-w-whats wrong with c#

:(

im getting a netduino soon

yeah so technically you're an atom in that list, unless people is actually mapping a function to each element in which case there is probably a lot more going on with you once properly evaluated after the read phase

OP means Original Poster. Its implied that the original post poster is called Original Poster. Thats why OP is fag, not Original Post is fag. That wouldn't make sense stupid user.

OP has always had two meanings: original post and original poster
Fuck off newfag.

Depends on the language.

OP has always been the person starting the thread. You are living in some fake nigger world where you are somehow an old fag dictating nonsense to people.

>What are you working on, Sup Forums?
A bootloader.

The best way to do slopes for a tiled game is to use the Separating Axis Theorem(SAT). So basically, all "slopes" would be triangles and you just do Convex-polygon-vs-Triangle SAT tests to detect and resolve overlap. If the geometry doesn't rotate then you can make simplifications to your code. There are simpler less mathy ways to do the same thing in 2D. For example, you could just do a bunch of perpendicular projections, find the max dot product inside the polygon and then extract the contact manifold that way.

>whats wrong with c#
You're being meme'd.

why the fuck would you say "hello OP poster" without linking to a post, when its implied that OP means Original Poster. I bet you use a whole line for open curly bracket at the beginning of your programs, you moron.

dumb samefag

>I bet you use a whole line for open curly bracket at the beginning of your programs, you moron.

you wish. are you just gonna take that from this guy? I think you're a huge faggot already but he is adding fuel to the fire

what is this?

TempleOS -- Brought to you from God himself by the Prophet T.A Davis

{
objectively correct
}


{
objectively pajeet
}

c++

>he doesn't know TempleOS

I wish Terry hadn't gotten banned from every streaming service.

can you actually do anything in it or is it just some schizo religious sandbox to explore

I think you meant to say

{
awful
}

youtube.com/watch?v=FPC0_k3lt0c

It has no network support, is its basically useless.

I know TempleOS but what's this "Press OK to be puppeted by the Holy Spirit" program

the OS is the result of a man's schizophrenic break--it has limited applicability. You should look at it as an example of the fruits yielded by verdant but untended mental gardens. Terry could probably help this entire planet if only this planet would help Terry.

You can actually do quite a bit.
>It has no network support, is its basically useless.
Wrong.
github.com/minexew/Shrine
github.com/tramplersheikhs/crocodile

not sure what that is, I've never been educated on game development or programming, but thank you I will look into it.

If anyone is interested in the working code:

switch ( tiletype )
{
case 0:
case 1:
break;
/* ascending right */
case 2:
ox = (int)ent->hb.box.x + (int)ent->hb.box.w;
oy = (ty*v) + ( v - ( ox - (tx*u) ) );

if ( ox > (tx+1)*u )
oy = ty*u + 1;

if ( ent->pos[1] > oy - ent->hb.box.h )
{
ent->pos[1] = oy - ent->hb.box.h;
A_P_sethb ( ent );
return true;
}
break;
/* ascending left */
case 3:
ox = (int)ent->hb.box.x;
oy = (ty*u) + ( ox - (tx*v) ) * ( v / u );

if ( ox < tx*u )
oy = ty*u + 1;

if ( ent->pos[1] > oy - ent->hb.box.h )
{
ent->pos[1] = oy - ent->hb.box.h;
A_P_sethb ( ent );
return true;
}
break;
/* descending right */
case 4:
ox = (int)ent->hb.box.x + (int)ent->hb.box.w;
oy = (ty*u) + ( ox - (tx*v) ) * ( v / u );

if ( ox > (tx+1)*u )
oy = (ty+1)*u - 1;

if ( ent->pos[1] < oy )
{
ent->pos[1] = oy;
A_P_sethb ( ent );
return true;
}
break;
/* descending left */
case 5:
ox = (int)ent->hb.box.x;
oy = (ty*v) + ( v - ( ox - (tx*u) ) );

if ( ox < tx*u )
oy = (ty+1)*u - 1;

if ( ent->pos[1] < oy )
{
ent->pos[1] = oy;
A_P_sethb ( ent );
return true;
}
break;
}

github.com/tramplersheikhs/uriel

I thought TOS's whole thing was it was PURE and cant be tainted by the outside world?

But a modern fork would be pretty cool desu.

pretty sure TA davis's definition of what pure is would change about as often as his train of thought.

>tfw you will never be a genius like Terry

First/second/nth stage? Is it for x86 or for some other architecture?

count it a blessing.

thats a pretty bad trap.

fuck, I've already wanked it at least once to this. Mostly because it's chucky themed i'm fine in that respect right?

Surprisingly its the low-quality wig that kills it for me.

Building a neural network that takes in images of anime girls in bikinis and outputs images of naked anime girls (and vice versa).
Training should finish in about an hour. So far, results look less bad than expected, but it's not something that'll see serious use.

>trap

didn't see that till you pointed it out. the boobs though how

>
fake boobs are easy lad.
If he did more stuff with bangs to cover up the forehead he'd be wankable

...

Here's a more accurate chart.

C wins again