Fork me on GitHub
#off-topic
<
2017-02-21
>
fellshard01:02:45

(Equality is pretty much the perfect use case for multimethods, isn't it?)

fellshard01:02:16

Then you'd be able to create generic and specific equality implementations for arbitrary type combinations, ensuring it's internally consistent insofar as you need it to be.

qqq13:02:30

@danielgrosse : what's your math question?

danielgrosse13:02:30

I have line width the know width w and the source point x.

danielgrosse13:02:46

Now I want to calculate point y.

qqq13:02:16

You need more info.

qqq13:02:41

And why does line-width matter ?

danielstockton13:02:10

Looks like it dictates the next tangent. It seems easy if you know the radius.

danielstockton13:02:24

width or length?

qqq13:02:45

The problem is, at point x, you "go up for a while; then you get tangent point y." However, you can "go up for a while" for as long as you want -- and that varaible determines location of y.

danielgrosse13:02:14

The coordinate x is bound to the circle. So raising it, will move to point y. But I can't determine, how far I have to move, to match the connection between the two lines.

danielgrosse13:02:48

The radius is 1000

qqq13:02:05

okay, so the radius is 1000, point x = (1000, 0)

qqq13:02:12

this is not enough info to calcualte location of point y

qqq13:02:21

we need more info, like "how long is the line at point x

qqq13:02:27

or something similar

dpsutton13:02:32

why it is w

danielstockton13:02:08

Do you know the length of line w? Can't you make two right angled triangles from the centre to x, y and the intersection of the two tangents?

rauh13:02:11

1. `tan` gets angle. 2. double the angle. 3. `cos` & `sin` to get the `y`.

danielgrosse13:02:23

I know the length

qqq13:02:34

This may sound rude: can you please assign concrete numbers to everything that is known in the diagram? It's not clear what is known / what is not known. Assigning this(and providing a concerte example) would help us help you.

dpsutton13:02:12

x and w are known, (presumably as is r, the radius). He wants y

qqq13:02:24

What is w?

qqq13:02:30

Is w a vec2?

dpsutton13:02:37

whut? it's a line segment

qqq13:02:00

Is w a single point? is it the length of the red line?

dpsutton13:02:08

w is a line segment

dpsutton13:02:12

it's center point is x

dpsutton13:02:22

x lies on both w and the circle

qqq13:02:26

@danielgrosse: okayh, this is enough, so x has coordinate (1000, 0)

qqq13:02:41

the point where the two lines meet has coordinates (1000, 100) // since entire line segment has length 200

qqq13:02:48

(do we agree so far?)

dpsutton13:02:50

are we assuming the tangent line segments are the same?

dpsutton13:02:04

ah nevermind

qqq13:02:41

so the point where the two lines meet -- call that point Z. Now, draw a line between (0,0) and Z. Y will be the reflection of X, with respect ot this line.

danielgrosse13:02:43

@qqq yes, thats the fact.

dpsutton13:02:36

i'm not convinced that y necessarily is the reflection of x

dpsutton13:02:49

and in fact, i don't believe it to be the case in general

danielgrosse13:02:55

It is the reflection. X is the center of the line

dpsutton13:02:13

i don't think y is the reflection of x when drawing the radius to point z

dpsutton13:02:37

i think this only happens when w is the correct length to make a regular polygon around the circle

dpsutton13:02:22

the drawing gives it a sense of scale and makes it look like it is in fact the reflection, but dramatically increase w and it will look quite strange

dpsutton13:02:34

this is going to be the simple intersection of a line and a circle

qqq13:02:11

@danielgrosse : do we agre with the above so far?

qqq13:02:57

okay, so we're callint the origin (0,0) to be O.

qqq13:02:07

Now, note that angle OXZ = 90 degree (because tangent at X)

qqq13:02:18

note also that angle OYZ = 90 egree (because tangent at Y)

qqq13:02:50

from OXZ, we calcualte that OZ = sqrt(1000^2 + 100^2) = 100 * sqrt(101)

qqq13:02:11

using this, we calcualte that ZY = 100

qqq13:02:28

actually, here's an easier way:

qqq13:02:51

let's calcualte angle ZOX . tan( angle ZOX) = ZX / OX = 1 / 10

qqq13:02:03

angle ZOX = arc-tan (1 / 10)

qqq13:02:12

angle YOX = 2 * arc-tan (1/10)

qqq13:02:34

now, let theta = YOX = 2 * arc-tan (1/10)

qqq13:02:47

we get coordinates for point Y to be (1000 cos theta, 1000 sin theta)

qqq13:02:55

does this make sense?

danielgrosse13:02:24

@qqq Thank you. Let me think about it.

qqq13:02:33

yeah, the key thing to keep in mind -- is triangles OYZ and OXZ. Note that they're symmetric in that: OZ = OZ OYZ = 90 deg = OXZ OY = r = 1000 = r = OX this means tha these two triangles are reflections of each other, giving us: angle YOZ = XOZ

rauh13:02:21

Can also be done without any trigonomentrics: http://www.wolframalpha.com/input/?i=e%5E(i*2*tan%5E-1(x)) (see "alternate form", you x is the first part without `i`, your `y` is the second summand). Just needs to be scaled by radius `r`. Your `x = (l/2)/r`

danielgrosse13:02:57

@rauh So you say it could be (1 - x^2 / x^2 + 1) + (yix/y^2 + 1)

rauh13:02:30

`i` the imaginary part, this is your `y`, just omit it.

rauh13:02:45

It's a complex number.

danielgrosse13:02:53

(1 - x^2 / x^2 + 1) + (2yx/x^2 + 1)

rauh13:02:15

See they're the same:

``````(let [x 0.5
x2 (* x x)
num (- 1 x2)
den (inc x2)]
[(/ num den) (/ (* 2 x) den)])

(let [x 0.5
ang (Math/atan x)
ang2 (* 2 ang)]
[(Math/cos ang2) (Math/sin ang2)])
``````

rauh13:02:52

Again, scaling by the radius is omitted. That part is trivial.

danielgrosse14:02:51

@rauh you're right. So I get the coords of y in the example. But I need the angle to calc the radians. So the second function fits more.

sifou biri16:02:41

very interesting course stumbled upon http://callingbullshit.org from uw

fellshard17:02:03

Huh. I'll be intrigued if they can keep this non-partisan. Traditionally, this falls under a 'critical thinking' course, but it seems more application-based by examining specific tactics for generating and evaluating b.s.

fellshard17:02:40

I'm liking what I'm seeing, though. Kudos to my alma mater!

fellshard17:02:01

> No. We began developing this course in 2015 in response to our frustrations with the credulity of the scientific and popular presses in reporting research results. While the course may seem particularly timely today, we are not out to comment on the current political situation in the United States and around the world. Rather, we feel that in a democracy everyone will all be better off if people can see through the bullshit coming from all sides. You may not agree with us about the optimal size of government or the appropriate degree of US involvement in global affairs, and we're good with that. We simply want to help people of all political perspectives resist bullshit, because we are confident that together all of us can make better collective decisions if we know how to evaluate the information that comes our way.

fellshard17:02:21

I'd note that it's less about identifying b.s. and more with identifying the truth, first and foundationally.

tbaldridge17:02:44

The problem is, identifying truth can often be hard.

tbaldridge17:02:32

I once heard to politicians argue about which side created more jobs. The truth? They were both using the same dataset, except citing gross vs net job loss/gains.

fellshard17:02:53

Maybe listening to politicians for truth isn't our best bet, eh?

tbaldridge17:02:16

The moderator of the radio program asked: "Why didn't you just state that you're using the same data then talk about gross vs net?". Their reply was: "people would tune out of the debates and stop listening".

fellshard17:02:32

AKA 'we cite only what supports our point', yes

fellshard17:02:54

It's up to individuals to build their own b.s. / truth filters

fellshard17:02:01

No-one can do it for you.

tbaldridge17:02:09

And that's for simple cases. More complex cases are stuff like small sample set sizes, poor statistics gathering etc.

tbaldridge17:02:29

One other example was a study done awhile back that "showed" (even though the researchers said it didn't) that homeschoolers performed better than those attending public schools. The caveat (that the researchers mentioned): the public school assessment tests were mandatory, the homeschooler tests were opt-in.

sveri17:02:39

I found common sense and questioning yourself to be a very good bullshit detector.

tbaldridge17:02:45

That then created a bias because no parent would have their kid take a test if they thought they'd do badly.

tbaldridge17:02:10

So I've seen a lot of people argue that AI or machine learning can "find bullshit" or "tell if a article is true", but none of those efforts hit the real problem: research that is misinterpreted, or poorly conducted.

fellshard18:02:51

Yep. I believe that's what that course is about.

fellshard18:02:06

Quite explicitly, in fact.

benh20:02:45

@fellshard @tbaldridge we are shockingly bad at managing ignorance. Everybody wants to shoehorn facts into a tidy narrative

tbaldridge20:02:11

I blame Obama

benh20:02:39

he didn’t invent it

benh20:02:50

but he certainly didn’t squash it either

tbaldridge20:02:02

That was my attempt at shoehorning

benh20:02:39

haha, and of course internet is an extremely clumsy communications medium

tbaldridge20:02:31

But yeah, I agree, it's a long standing problem. Just go talk to someone about the causes of any war (esp. The American Civil war or WWII) and you'll normally hear a one-liner about some insane group who hated another group. When the reality is much more complicated.

sveri20:02:07

For instance, how come someone can convince so many people to become a soldier and basically commit suicide?

benh20:02:21

I think Peer pressure is a major factor

benh20:02:44

people don’t want to let their pals down

benh20:02:53

sometimes its the only job available

benh20:02:13

in the UK they emphasis the ‘adventure training’ aspect

benh20:02:36

how else are you gonna get the govenment to pay for you to learn skiing

benh20:02:38

and climbing

sveri20:02:28

I could understand if you die at home anyway, for whatever reason, so basically self defense, but going into a war where you have a high chance to be killed? For money? And not even a lot of money? You could earn more money becoming a dealer or banker or whatever and have not that a high chance of dying.

sveri20:02:54

But yea, here in germany the army also is massively going into schools and tries to make army look like fun -.-

benh20:02:42

we’ve had an unusually long period of peace in Western Europe

benh20:02:14

perhaps its an outlier thats coming to an end

tbaldridge20:02:20

we have the same thing here in the US. I have friends who joined purely because they couldn't find a job. And the US Army gives food/room, and when you get out nice discounts to college and housing.

dpsutton20:02:21

EU got a nobel peace prize recently

sveri20:02:24

Yea, because we did the same we did with cheap work, by outsourcing it^^

benh20:02:09

US Army builds alot of infrastructure doesn’t it

benh20:02:33

because its a way to avoid getting Congress to agree funding

tbaldridge20:02:24

That has happened in the past, but it's not the norm.

tbaldridge20:02:51

We're just really inefficient. The last I heard there's 2 logistics people for every 1 soldier on the field.

benh20:02:28

well, that could be a funamental truth about supply lines

tbaldridge20:02:42

The US Military is really a golden calf in the US. No politician can say anything about down-sizing it without being crucified by the people.

benh20:02:19

the acceptable face of socialism

benh20:02:28

and do they run Clojure ?

benh20:02:35

you cannot possibly say, no doubt

benh21:02:41

not yet got round to reading this

qqq22:02:58

Two questions: 1) How many years until https://openai.com/requests-for-research/#description2code is solved? 2) After that is solved, how long until Google or AWS builds a "cloud programmer" where you talk to it and it writes code?

qqq22:02:21

and 3) How do we make a living when (2) happens?

zylox22:02:30

ill make a living creating lists on chatrooms

dpsutton22:02:25

what are your favorite lists so far?

zylox22:02:28

Step 1: create lists, Step 2: figure out how to monitize, Step 3: profit.

zylox22:02:34

works for startups

qqq22:02:11

are we joking because we believe (1) ai programs that write code won't happen or (2) it's too insane to discuss

zylox22:02:13

its actually (3) i havent thought about it, nor do i think i could even conceptualize the form it would take.

qqq22:02:46

in a sense we already have computer programs that write code -- they're called compilers / interpreters; theonly issue is right now, they can only convert "precise code -> precise code", whereas the next evolution would sadly be "vague english description -> precise code"

dpsutton22:02:13

i believe cobol was the first compiler

dpsutton22:02:27

english description -> precise code

qqq22:02:09

this also seems like the natural evolution of cloud services

qqq22:02:21

if we look at what a founder needs

qqq22:02:48

AWS/GAE is basically: all these other enginers you would have hired? we'll replace them with an API

qqq22:02:07

their ML services: you don't need a data scientist either; just use our algorithms / compute power

qqq22:02:21

it seems like programmers are the next group to replace in their evolution

tbaldridge22:02:01

nah there will always be jobs in this area, at least in our lifetime.

tbaldridge22:02:36

They've tried the whole "programs that write programs that replace programmers" and it never works because software design is a super hard problem that takes tons of variables into account.

tbaldridge22:02:10

Sure, there's MS Access for simple CRUD stuff, but the meat and potatoes of programming will always require a human.

tbaldridge22:02:01

Notice that all these programs that do machine learning are all about repetition and analysis of previous situations. I have yet to see/hear of an AI that can actually think "outside the box".

tbaldridge22:02:00

the moment AlphaGo wins against the to Go player by (without human prompting) hacking the traffic network and delaying his car...then we have to worry, lol

jon22:02:22

just saw MD Anderson is benching IBM Watson

alexmiller22:02:14

just sprinkle it on top and you’re done right?

fellshard22:02:23

The term AI is sorely misused right now. Loooots of FUD, little understanding. Lots of 'business people' with deep misunderstandings of the extent of ML, especially when modern 'AI' is equated with historic science fiction 'true AI'.