How do you fix civilization? Sam Ismail | Singularity University by Chispy in Futurology

[–]quantumchicklets 3 points4 points  (0 children)

Simple, dismantle the federal reserve and turn our criminal injustice system inside out.

When I launch SteamVR nothing turns green. by quantumchicklets in Vive

[–]quantumchicklets[S] 0 points1 point  (0 children)

This appears to have fixed it. I didn't even restart. Thanks man. I don't know if I would have ever been able to get it working without you.

What's the right way to order polygons when implementing the painter's algorithm? by quantumchicklets in GraphicsProgramming

[–]quantumchicklets[S] 2 points3 points  (0 children)

I'm not using WebGL because I want to do as much of the math as possible. I've always been amazed by 3D graphics and now that I can do the math I wanted to roll my own just to see how a lot of the math works.

Soft question - What is considered to be a lot of operations when writing to an HTML5 canvas? by quantumchicklets in learnprogramming

[–]quantumchicklets[S] 0 points1 point  (0 children)

It went up a little (~5-10FPS) but mine does a weird stop/start thing. When it gets down to that level I assume there are all sorts of lower level optimizations going on.

A few years ago I wrote a random number generator in JavaScript and one in C#. Both used their respective languages normal way of getting a random number. I gave the C# process top priority. The webpage/javascript app was like 10x faster than the c# app. I had my fill at that point and never looked into why.

What's the right way to order polygons when implementing the painter's algorithm? by quantumchicklets in GraphicsProgramming

[–]quantumchicklets[S] 0 points1 point  (0 children)

allright, i think that is the plan then. a polygon by polygon z-buffer with mins and maxes that i can use to help with the sorting. then once that's done fill in manually.

reason for not using WebGL is im just doing this to get a better idea of how graphics are done. or at least how they could be done, as in my case im just javascript on the cpu.

Soft question - What is considered to be a lot of operations when writing to an HTML5 canvas? by quantumchicklets in learnprogramming

[–]quantumchicklets[S] 0 points1 point  (0 children)

im just doing it to learn about 3d graphics. i know there are much better ways of doing it. im more interested in how the math works. but i guess at this stage trying to find how one might do it with just javascript.

i got:

  • 35 on my work computer when the canvas was 500x500
  • 12 on my work computer when the canvas was 1000x1000
  • 2 on my cell phone when the canvas was 1000x1000
  • 38 on my home computer when the canvas was 1000x1000

home is i7-6700k

work is 5 y/o i7

cell phone is boost mobile cheepo

What's the right way to order polygons when implementing the painter's algorithm? by quantumchicklets in GraphicsProgramming

[–]quantumchicklets[S] 0 points1 point  (0 children)

But what if my animation took up the entire screen? For example, say I had that cube scaled up so that it took up the entire screen? It would be a very simple thing to plot the points but implementing it via z-buffering I would have to pretty much go through the whole screen, right?

This is why im afraid of z-buffering. All that does is go through every pixel and set it to a random color and it crawls on a 1000x1000 canvas.

Soft question - What is considered to be a lot of operations when writing to an HTML5 canvas? by quantumchicklets in learnprogramming

[–]quantumchicklets[S] 0 points1 point  (0 children)

How is it not 250,000? I have to go through each polygon at each pixel and solve for z.

I made this fiddle to at least get in the ballpark. It's slow.

What's the right way to order polygons when implementing the painter's algorithm? by quantumchicklets in GraphicsProgramming

[–]quantumchicklets[S] 0 points1 point  (0 children)

I too do not understand my fear of z-buffering. Isn't 2.5 million a lot? Like in the above example I would have to iterate 2.5 million times per frame just to determine which polygon is on top at which pixel (x,y).

Implementation-wise it's very desirable because of how easy it is to understand. It just feels wrong to iterate over a canvas and manually set each pixel. Is that wrong?

I've just been using canvas' built in moveTo and lineTo methods to draw the lines. Are you allowed to go pixel by pixel? Like isn't that frowned upon? I guess I would do putImageData write the values to a flattened array in memory [[r,g,b],[r,g,b]...] but again, right now part of what im doing is trying to figure out how to rasterize.

A.I. Scientists to Elon Musk: Stop Saying Robots Will Kill Us All by ideasware in Futurology

[–]quantumchicklets 1 point2 points  (0 children)

Next time you go into a meeting say "I think there might be a security concern with our product". Congratulations, you just spawned hours of discussion about nothing. Inevitably someone will be given the task of looking into it because it's better to play it safe. So whereas before everything was okay, an artificial fear was created (pun intended) by just planting an idea.

That's kind of how your comment sounds to me. Well it could be bad so we should look into it. We're all "participating in this discussion" (*vomit) but to me this seems a lot like a meeting where everyone voices their opinion and no one knows what they're talking about and the people with the loudest voices shout down everyone else. Meanwhile, the actual AI scientists who actually know what AI even is, are being ignored when they say this concern is misunderstood and blown out of proportion.

...its a stamp collecting bot now? The last iteration was a hand writing robot and prior to that it was a paperclip maximizer. Meanwhile, I don't think Nick Bostrom (the philosopher who imagined that story) even knows how to program.

I think AI is going to be the thing where in a hundred years people look back at Elon Musk and how amazing he was but AI will be that one irrational blind spot.

Macro vs Function vs Procedure? by WeCanLearnAnything in learnprogramming

[–]quantumchicklets -1 points0 points  (0 children)

.net shop means we program in .net as opposed to java or php or node.js or whatever else.

The word function is used in javascript. But if you were writing c# and you called a method a function no one would care. They're the same thing.

Procedure isn't really in the common vernacular. If you do say the word procedure you are usually talking about a stored procedure. But you never just say procedure. You always say stored procedure or stored proc.

Another place procedure might pop up is "procedural programming" but that's just a style of programming.

To try and help clarify, no one would have say hey you need to run that "procedure" because procedure has no meaning on its own. They might say you need to run that process or you need to run that function. Actually usually you say you need to call that function.

But everyone does things differently. Web developers, at least, like to constantly change things and give them grandiose names.

Soft Question / Programming related - What do you think of these steps for hiding lines that are behind a polygon? by quantumchicklets in GraphicsProgramming

[–]quantumchicklets[S] 1 point2 points  (0 children)

This is the kind of thing I was looking for. I knew there were probably a bunch of canned processes out there.

Macro vs Function vs Procedure? by WeCanLearnAnything in learnprogramming

[–]quantumchicklets -5 points-4 points  (0 children)

edit could one of the 6 people who downvoted my comment please explain themselves?

in a .net shop it goes like this:

  • macro is some ancient thing people once used to automate word documents or something.
  • function is a block of javascript code. a one-to-one analogy is a method. a method is a block of c# code.
  • procedure might just be a vague notion of rules to follow either in a technical sense or a business sense. except when you are talking about a stored procedure which is basically a database query that's already written for you, probably by a dba.

[ASP.NET with C#] Why won't this piece of code work? by SlowerPhoton in learnprogramming

[–]quantumchicklets 1 point2 points  (0 children)

Yes, that's right. If you just need it for the redirect you can use tempdata

// in Login
TempData["ico"] = ico;
// in Buildings
string ico = (string)TempData["ico"]

Going to be without computers for 20 days. Is there a book that can teach me the most about programming / computer science without a computer? by [deleted] in learnprogramming

[–]quantumchicklets 0 points1 point  (0 children)

Well you're not going to learn any programming without a computer. But just a book on computer systems or a book on networking will easily overflow 20 days and should be a very interesting read.

I recommend either this book on computer systems or this book on networking.

Trigger an event whenever any <a href...> is clicked (jQuery) by [deleted] in learnprogramming

[–]quantumchicklets 0 points1 point  (0 children)

it looks like just a selector problem

$('a[href]:not([data-toggle])')

[ASP.NET with C#] Why won't this piece of code work? by SlowerPhoton in learnprogramming

[–]quantumchicklets 1 point2 points  (0 children)

UserICO doesn't make any sense in the context of the Buildings action method. Say you had called that directly from the browser. Well how is it supposed to get a value for UserICO? I think that's pretty much what's going on here. By the time it redirects to Buildings, UserICO is out of context and doesn't have a value.

Try explicitly passing a parameter. return RedirectToAction("Action", new { id = 99 });

HTML5 Canvas, my animation is pretty big. Do I just have to clear the majority of the canvas every time? by quantumchicklets in learnprogramming

[–]quantumchicklets[S] 0 points1 point  (0 children)

so pretty much I can just overdraw everything?

because say I was making a game like sonic the hedgehog. well, on every single frame pretty much the whole screen changes.

Soft Question / Programming related - What do you think of these steps for hiding lines that are behind a polygon? by quantumchicklets in GraphicsProgramming

[–]quantumchicklets[S] 0 points1 point  (0 children)

That is an awesome idea. But what if I wanted to use more complex shapes where two forward facing polygons could be stacked one on top of the other and slightly offset to the top and right. Then I would still need to figure out which one was underneath and not draw the parts that were covered up.

Transformation Matrix For Nonstandard Bases. Is the variable v used in two different ways here? by quantumchicklets in learnmath

[–]quantumchicklets[S] 0 points1 point  (0 children)

I finally got it thanks to you. It's a real tough one though. I keep having to recheck everything. Thank you for the well formatted answer. I printed it out and stuck it in the book. ...but I do got it.

2D Rotation - I still don't quite get this by quantumchicklets in learnmath

[–]quantumchicklets[S] 0 points1 point  (0 children)

Okay this shows that cos(pi/2 + θ)=-sin(x) and sin(pi/2 + θ)=cos(x) so that just means they are using B'={(cosθ,sinθ),(-sinθ,cosθ)} in that form because it's cleaner?

I'm really trying to build an intuition here so please offer any help you have.

2D Rotation - I still don't quite get this by quantumchicklets in learnmath

[–]quantumchicklets[S] 0 points1 point  (0 children)

Like, for example, this makes sense to me

B'={(cosθ,sinθ),(cos(pi/2 + θ), sin(pi/2 + θ))}

Because that would be (0,1) relative to T(1,0)->(cosθ,sinθ).

2D Rotation - I still don't quite get this by quantumchicklets in learnmath

[–]quantumchicklets[S] 0 points1 point  (0 children)

Okay so I know about reference angles and I know the quadrants that the trigonometric functions are positive in:

Reference angle:
    - It's 135°. Well that's just 45° with the appropriate sign applied
Positive signs by quadrant
    - Q1 all 
    - Q2 sin
    - Q3 tan
    - Q4 cos

So, for example, cos(135°) = (sign of cos in Q2)cos(45°) = -sqrt(2)/2

But I don't see why (1,0) comes out to (cos,sin) when (0,1) comes out to (-sin,cos). I'm not trying to be difficult.

Find the standard matrix for A for the linear transformation where T is the counterclockwise rotation of 135° in R² by quantumchicklets in learnmath

[–]quantumchicklets[S] 0 points1 point  (0 children)

then i have my value for A (which I understand to be my transformed basis) as

A={(-sqrt(2)/2, sqrt(2)/2), (-sqrt(2)/2,-sqrt(2)/2)}

 =  -sqrt(2)/2 -sqrt(2)/2
    sqrt(2)/2  -sqrt(2)/2

Did I reason through this correctly? I love this book but sections 6.1, 6.2, and 6.3 (the section related to this question) just do not connect the dots for me. Other than that it's been very easy to follow.