/dpt/ Daily Programming Thread

This is /dpt/, the best subreddit of Sup Forums

In this thread:
r/programming
r/compsci
r/ReverseEngineering
r/softwaredevelopment

/!\ ** Read this before asking questions ** /!\

mattgemmell.com/what-have-you-tried/
catb.org/~esr/faqs/smart-questions.html


What are you working on?

previous thread

Other urls found in this thread:

kanzaki.com/docs/ical/recur.html
en.wikipedia.org/wiki/Pixel_aspect_ratio
better-dpt-roll.github.io/
twitter.com/SFWRedditImages

Pache is stupid and gay

>What are you working on?
Binary switch input to ascii character display on an FPGA in VHDL

also reading C books in prep for job interviews

...

Will I become a cute girl (male) if I get myself a physical copy of sicp ?
I already own the programming socks, and engineering panties.

Reminder that polygons have no area. If you claim otherwise, you have to explain what shape we're supposed to implicitly associate with polygons, and what units of measurement we have to use.

I started working on an HTML generator in PHP.
It's pretty cool so far.

Here's a preview:
$container = new Bs4\Elements\Common\Container();
$row = new Bs4\Elements\Common\Row();

$text = new \Bs4\Elements\Common\Text("Some text here");
$row->appendElement($text);
$container->appendElement($row);
echo $container->render();


Around 1.6k lines of code so far spanned over multiple classes and about 20 files so far.

>engineering panties
these exist?

>user questions reasoning on why pixels need to have area
>HURR DURR POLYGONS NO AREA HAHAHA LOOK AT THIS RETARD

no

>What are you working on?
Javascript binary file converter for converting images to a game texture format.

My dad is always shilling for COBOL. Is it really that good?

it's shit.

>makes abysmally moronic argument for why pixels can't have area
>the same reasoning "proves" that polygons have no area
>b-b-but pixels!!
Brain deformities.

But why? All I see is people who don't know shit about it hating it and people who use it liking it

the question was "what shape would the pixel be? where would the area come from?"
you immediately twisted that simple question into
>LOLOLOLOL THIS FAGGOT THINKS POLYGONS HAVE NO AREA

I used intensity with a bit of processing (just a curve really) plus a dithering algorithm.

>The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense.

>if pixels have an area, then what shape would the pixel be?
>if polygons have an area, then what shape would the polygon be?
>d-d-don't twist my "logic"! it's only supposed to apply to pixels!

remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.


what the fuck, what did I do wrong

>messed up 5+ visual and skipped 3 nothing-but-static captchas until I got it right

god damn

>changing pixel into polygon
you're the retard that it, not me

>changing pixel into polygon
you're the retard that insinuated it, not me or the other user

If you were hiring an employee would what you rather have:

Someone with a relevant bachelor degree or higher but no experience

Someone with years of experience but no degree

>pixels can't have an area because if they did, we'd have to implicitly pick some shape that represents all pixels
>this is perfectly valid reasoning!
>polygons can't have an area because if they did, we'd have to implicitly pick some shape that represents all polygons
>hurrrrr no this is invalid because muh pixels! the argument is only valid for pixels!!
Simply subhuman.

What are my goals?

nvm

>6 captchas to post those 3 letters

experience trumps a useless degree assuming they're actually competent.

Say you're hiring employees for front end development but this was more of a general question

so you're saying that pixels can have many different shapes?

>There are mabpny different kinds of pixels
are you sure you're not the subhuman here?

>you're saying that pixels can have many different shapes?
You're saying that polygons can have many different shapes? Wow, like, you mean you can talk about a specific shape that's an instance of a polygon, or talk about polygons in general, and the properties they have? That's incredible.

lol you're so fucking stupid, are you really saying there can be different pixels?

I didn't say anything about polygons you fucking asshat. I am asking about pixels

wow lol, just look at this retard... did he really just say that? everybody can see it's dumb

I would take one for a trail and never hire him. Repeat until the project is done.

also, if there different kinds of pixels, what would those "kinds" be?

Yes, tard; different displays can have different shapes for pixels.

AHAHAHAHAHAHA

>What are you working on?
An implementation of RRULES. Fuck is this shit tedious -- so many edgecases. I think optimization will be fun, though, once I get there.
kanzaki.com/docs/ical/recur.html

en.wikipedia.org/wiki/Pixel_aspect_ratio
>Pixel aspect ratio (often abbreviated PAR) is a mathematical ratio that describes how the width of a pixel in a digital image compares to the height of that pixel.
Time for you to kill yourself, inbred subhuman.

From programming perspective this doesn't matter.

Any raster device has an aligned grid.

Google "subpixel." He's entirely right.

Anyone want a job in UK.
The pay won't be too great(around 30k) but it should be pretty fun work.

Do you even know how that shit is encoded i DVDs? They are, as I said, encoded in SAMPLE POINTS which makes up the video and is stored along with a PAR flag. The DVD player then decodes the compressed sample points and then maps it onto a rectangular grid according to the PAR. Pixels are SAMPLE POINTS.

def chop_sort(size):
N = math.ceil(size/10) #Number of partitions
ND = math.ceil(size/N) #Number of elements or data by partition
print("N ceiled is: {}".format(N))
print("ND ceiled is: {}".format(ND))

A = []

fp = open("file.txt", "r")

counter = 1
counter2 = 1

for line in fp:
if counter

>Any raster device has an aligned grid.
That's why these remain the only true polygon displays, with continuous analog vectors.

>hurrrrrrrhurhurrhurrhurrr lelelel did you just say pixels can have different shapes???
>literally makes 4-5 samefagging posts to emphasize how ridiculous that is
>immediately proven wrong
>begins to chant "sample points" to relieve the asshurt and cognitive dissonance
You are a living argument for abortion.

>the schizophrenic cretin still doesn't understand why i brought up polygons
>thinks it has something to do with vector monitors

Hahaha, I just dropped in from Sup Forums to kill some time, thanks for the entertainment.

Polygons have area in the second dimension except for third dimension.

wow look at that freshly minted SICP, I bet that neet paid full price for that one, just like that fumo!

you can tell he's never read it either, that spine is immaculate

this is the most disturbing image i have seen in a while

you disgust me

The fact that PAR is a separate flag and can only achieved by either digitally stretching or with anamorphic lenses should tell you something. Pixels exist separate from their physical representations on your monitor. Can you properly refute the sample points arguments at the very least? It's getting pretty fucking tiring repeating this shit

>pixels have no area
>hahahahahaha are you saying pixels have different shapes
>"Pixel aspect ratio (often abbreviated PAR) is a mathematical ratio that describes how the width of a pixel in a digital image compares to the height of that pixel."
>okay but this still proves me right because hurrr samples durrr DVD
Tsk. Simply subhuman.

...

>still no argument
>can only greentext to make himself feel like "owned" someone
How many times do I have to repeat myself? Pixels have no area but it's not mutually exclusive from them being display-able. The coordinates just need to be mapped onto a corresponding grid with a definite area. A PAR flag defines how that grid is shaped but as far as the computer system is concerned, pixels are sample points that are to be mapped. If the grid does not properly correspond to the array, here is where resampling algorithms come in. Those algorithms process a bunch of sample points to spit out even more sample points so that the entire array can perfectly correspond to the physical grid that is your monitor. There is nothing wrong with this and all you're going to reply with is a bunch of intentionally misquoted statements and an ad hominem.

...

>"Pixel aspect ratio (often abbreviated PAR) is a mathematical ratio that describes how the width of a pixel in a digital image compares to the height of that pixel."
>Pixels have no area
When will you learn the difference between raw image data and pixels, mongrel? Never, I guess.

>raw image data and pixels
so thisnhas been an argument about semantics all along. Let's go back to this:
Say you've got an image file with a resolution of 1280x720, and it's not open. It's not being displayed on your monitor. What would you call those small "things" that make up the 1280x720 resolution?

Very new to JS. I have an HTML button with the id "myButton". Why isn't it giving an alert when pressed?


function generateAlert() {
alert("I am an alert box!");
}

$(document).ready(function() {

$('#myButton').on('click', generateAlert);
});

Why are you created an entire function called generateAlert() just to call one single function, alert()?

You can just call alert() standalone on click. Why bloat it?

How does type theory manage to be so comfy?

>so thisnhas been an argument about semantics all along
No, mongrel. There has been no argument. I'm just amusing myself watching you "prove" that polygons can't have area because there are different polygons and claim that pixels have an aspect ratio but no area. I'm not "arguing" with you. I'm just humiliating you by merely quoting what you are saying.

>Say you've got an image file
>What would you call those small "things" that make up the 1280x720 resolution?
RGB tuples.

It's a placeholder for another function. I'm mostly asking why my button isn't causing anything to happen.

academic

And by the way, those RBG tuples aren't points in 2D space. They're points in the image color space.

CS is the worst thing that happened to programming.
Too much talk and cock and little to no actual implementation or usefulness.

All the useful practical implementation etc you use comes out of CS and out of theory, whether it's a university or a research lab. Dennis Ritchie did a Masters. Bjarne did a Masters.

By demanding very little from its practitioners.

Any ideas how i can run strings of js functions with node from python? How do i pass arguments and recover return values?

>Bjarne
Yup

>DURR POLYGONS POLYGONS POLYGONS
You're the one that brought up polygons in the first place.
>They're points in the image color space
Yeah, they're still points. You just admitted that they're points. How big those points are going to be still depends on how you're going to output them. As far as the system is concerned, they're still a collection of points.

C and C++ are examples of ""practical"" (garbage) langauges

Everything after fortran was a mistake

>FORTRAN, derived from Formula Translation
>developed by Computer Scientist John Backus
Sounds like more useless academic nonsense!

Every academic nonsense after fortran is there to be argued about and not be useful

Try to calm yourself categorylet, being this impotently mad isn't good for you.

>You're the one that brought up polygons in the first place.
Yes, because they reflect the sheer retardation of your logic. When you made that argument, you effectively implied all the stupid shit your logic implies.

>Yeah, they're still points. You just admitted that they're points.
No, you subhuman mongoloid. The tuples that make up the raw image data are points, and they're not even remotely the points you keep sperging about.

>How big those points are going to be
No, you subhuman mongoloid. Those points aren't going to be "small" or "big" because they have no spatial content at all, because they are points in the image color space. Pixels have spatial properties, including aspect ratio and area.

You'd have to be Canadian to read anger into that post.

>pixels have area
>no spatial content
then what do you call the coordinates that make tell each rgb sample they're position in the image?
If I have an image, I can print it as big as I want or as small as I want depending in the DPI settings. Something tells me that each of the points that make up the image has no inherent area.

>the mongrel keeps conflating pixels with raw image data
We could do this all day. Really doesn't take much effort to explain how you're being retarded when it's so blatant.

>what do you call the coordinates that make tell each rgb sample they're position in the image?
At least you finally understand that an RGB tuple doesn't encode a "position in an image", despite it being a point in the image color space.

>If I have an image, I can print it as big as I want or as small as I want
>each of the points that make up the image has no inherent area
Yes, tard, because raw image data has no area, because RGB tuples have no spatial content at all.

In fact, I have a shocking revelation for you: you can also take this raw image data and print it flipped, or print it onto a sphere, or print it onto a cylinder, or whatever the fuck, because raw image data doesn't have to be mapped to pixels in any particular way, or at all.

and yet, that still says nothing about the area
all you have are rgb samples and the coordinates where those samples are. A combination of those values is what constitutes a pixel. Still nothing about the area, which depends highly on how you're going to display it.

>this retard continues to conflate pixels with its rendering

>that still says nothing about the area
Because raw image data is not pixels, mongrel. We've already established this.

>"Pixel aspect ratio (often abbreviated PAR) is a mathematical ratio that describes how the width of a pixel in a digital image compares to the height of that pixel."
>Pixels have no area
I suggest you go edit the page on PAR, because pixels are points in your schizophrenic world, and points don't have an aspect ratio.

>pixels have an aspect ratio but they have no area

>At least you finally understand that an RGB tuple doesn't encode a "position in an image", despite it being a point in the image color space.
I need to address this point specifically. I nver fucking said that. I already specified earlier on that the samples themselves are arranged in a specific manner. I'm pretty sure that already implies what you think I didn't understand.

You can see this weeb shitter poser didn't even read the book the fucking faggot. kek

Tell me then, why is there a distinction between PAR and SAR if the aspect ratio is inherent within the pixel itself? You seem to be insisting that Display Pixels are the only definition of pixels, with which I disagree.

What is the best, less error-prone way to parse binary data.

So raw image data is pixels, and these "pixels" have no spatial content, and yet you screech that they're graphics primitives like lines or circles, which are defined by their spatial properties because mysterious reasons, you totally weren't claiming that "pixels" (color data) are points in 2D space. Nice damage control, but it's still clear to everyone that your mother is your father's sister.

I have 0 experience in CS and programming. Give me a list of projects I should complete, sorted from easiest to hardest.

Don't give me BS answers like "do things that interest you." I don't know what interests me yet.

Seething

wait, you guys are still arguing about the pixel.
What about the monado?

>"Pixel aspect ratio (often abbreviated PAR) is a mathematical ratio that describes how the width of a pixel in a digital image compares to the height of that pixel."
>pixels have no area because muh GAR, BAR and KAR. can't explain that, huh???

Don't do anything then you uninspired fuck.

...

better-dpt-roll.github.io/

>graphics primitives
where did that come from?
anyways. Pixels are color data with a location in an image

>pixels have an aspect ratio but no area
>RGB tuples encode positions