ignorance and intolerance in computing communties

Discussion in 'Perl Misc' started by Xah Lee, May 2, 2007.

1. Xah LeeGuest

Today, a motherfucker Christophe Rhodes (aka Xof in irc://chat.freenode.net/lisp
) kicked banned me.
Here's the few relevant excerpt. (full, unedited excerpt will be
published if there is a public interest)

Begin excerpt:

[5:31am] <xahlee> k, here is a simple problem but rather tedious to do
it correctly.
....
[5:32am] <xahlee> given a unit vector A={a1,a2}, write a function
AngleA, such that it returns the positive angle from {1,0} to A.
[5:33am] <xahlee> mathematically this is simple, but to implement it
is rather cumbersome, with many if statements.
[5:34am] <xahlee> also, anyone who has implemented this will know trig
well.
[5:34am] <xahlee> i wonder if there's already in some library in lisp.
(i doubt it)
[5:36am] <pjb> xahlee: (acos (scalar-product A #(1 0)))

....

[6:34am] <xahlee> can anyone show me the source code of a function
that convert a complex number (a1 b2) to it's polar representation?
[6:35am] <Xof> (defun polarize (complex) (values (abs complex) (phase
complex)))
[6:35am] <Xof> wait, why am I replying to the troll?
[6:36am] <fax> :/
[6:36am] <Jasko> even the mighty Xof is not immune!
[6:36am] <tritchey> Xach: you were right, he HAS turned into mary
poppins.
[6:36am] <xahlee> well... what is the source code for your â€œphaseâ€?
[6:36am] <Xach> xahlee: it is, as kmp once said, given from god
[6:36am] <Xof> clhs phase
[6:36am] <specbot> http://www.lispworks.com/reference/HyperSpec/Body/f_phase.htm
[6:36am] LiamH joined the chat room.
[6:36am] <fax> xahlee: you know enough maths to write an
impllementation
[6:36am] <froydnj> piso: ah...hmmm
[6:37am] <fax> xahlee: if its a CLHS function, then how its actually
written will be implementation specific
[6:37am] <fax> er CL not CLHS
[6:37am] <xahlee> as i described, i'm interested in the algorithm of
the implementation, not what it means.
[6:37am] <xahlee> Â«can anyone show me the source code of a function
that convert a complex number (a1 b2) to it's polar representation?Â»
[6:37am] <Xof> all of that is true, but there's quite a good
suggestion for how to implement it on the page I got from specbot
[6:37am] <fax> xahlee: afaik there is no way to calculate it without
conditionals
[6:38am] <Xof> xahlee: and that's what you got
[6:38am] <fax> you can do 4 dot products, or atan.. however you do it
you have to handle cases
[6:38am] <xahlee> fax: thanks fax! only you come thru understand the
question and not being a troll.
[6:38am] <Xof> (atan y x)
[6:38am] <xahlee> the others so far, e.g. xof and pjb in particular,
just wanted to troll.
[6:38am] <Xof> look, ma, no conditionals
[6:38am] <fax> xahlee: more than just me gave you some info..
[6:39am] Xof was promoted to operator by ChanServ.
[6:39am] Xof set a ban on *!
*n=13.pacbell.net.
[6:39am] You were kicked from the chat room by Xof. (now go away,

------------------

Christophe Rhodes has unjustly kicked banned me about 3 times in the
past year in #lisp. Basically, making it impossible for me to use the
service provided by freenode.net in way. Today's incident, is actually
the most lenient. In the past ~3 times, he simply kick banned me
within few minutes i joined the #lisp channel.

Christophe Rhodes is one example of a power-struggling tech geeker in
the computing industry. Incidents like this, happens frequently in
just about all computer forums where almost all members are
exclusively male.

I want to bring this to the public attention (in this case, in the
lisp community). Because, it is motherfuckers like these, that does
society harm, and they all pretent to be saints and justice holders.

-------------------

Some notes about the math problem discussed in the topic:

As i have indicated in my post, it is non-trivial to implement a
function that returns the positive angle of a vector. For example, it
can be done with sign checking of the coordinate components (in total
4 cases, which can be done as 2 levels of nesting if, or simply 4
if.), and or the evaluation of Min[Abs[ArcCos[x],Abs[ArcSin[x]]], or
use clever ways with dot product, or ArcTan. It is not a trivial to
know which algorithm is in general more efficient. (this is important,
since finding the angle of a vector is a basic function, that may
needs to be called millions times directly or indirectly) Further,
consider the inverse trig function, it is likely 99.99% of people with
a PH D in math wouldn't know how these are actually implemented. So,
the question of whether calling one of the inverse trig function is
more robust or efficient than another is a open question. And, besides
the algorithmic level, the question also entails how the language
actually implement the inverse trig functions.

Besides efficiency concerns, there's also robustness concerns. For
example, if the 2 vectors are {1,0} and {0,1}, a simplistic
implementation will result in division by 0 or similar errors.
Checking whether one of them lies on the x or y axis means more if
statements, as well the non-trivial problem of determining if two
numbers are equal. (e.g. is 0.000001 considered equal to 0.0001 )

My interest in bringing this up for discussion, is because i'm writing
a program in Linden Scripting Language to generate a architecture of a
given polyhedral symmetry in Second Life (see http://xahlee.org/sl/index.html
), and i need to write a function that returns the positive angle of 2
given vectors from A to B. I have implemented solution to this
problem a few times in Mathematica since about 1993. Being a
efficiency and perfection nerd with some leisure at the moment, i
thought i'd like to know more details about his problem. A optimal
implementation with respect to the algorithm level, or see how
languages implement the function that convert complex numbers to polar
form, or some general understanding and learning with regards to this
problem.

In a person's computing career, concrete and specialized questions
like these abound, and the answers or knowledge about them are scarce.
Due to the general ignorance of technical knowledge, and the power-
struggling nature of males, and the habit of intolerance and â€œtroll-
cryingâ€ in computing communities, made it difficult to have any
sensible discussion of original questions that doesn't fit into some
elementary level of FAQs and concepts.

Asides from complainting about the person who unjustly kicked banned
me many times in the past year (which has happened to me in other irc
channels (in particular, #perl, #python, #emacs,...), mailing lists,
forums, as well happens all the time to many many others (every day in
just about every irc channel).), i hope that in general, tech geekers
be more tolerant and knoweledgable. In particular, aquire
understanding and communication from persons in society who are not in
the computing community.

For example, in newsgroups everyone is all concerned and involved
about the phenomenon of troll all day. To understand this more
seriously, study psychology, sociology, anhtropology, ethnology,
history. I do not mean getting interested and excited with a slashdot
news article then start to discuss it in your forum. But do, take a
class in community colleges, or if suitable, spare a reading of your
favorite science fiction for a text book on the these subjects. The so-
called â€œtrollâ€ (whatever it means), is a social, behavior phenomenon.
So, understanding social sciences is the proper way to understand it,
if necessary, learn how to remedy the situation. Not, for example, by
tech geeking with other tech geekers.

If you are, for example, interested in the comparative superiority of
computer languages that almost every tech geekers seem to know so much
about, then, try to take a course on the great many specific branches
of philosophy, the great branches and depths of (non-computer-
language) lingusitics, or the great depth and branches and specialties
and even philosophies of mathematical logic, or its history. Various
thinking, as well as aid you in seeing perspectives, philosophies, or
how to approach a problem with a good definition. Similarly,
theories of semantics or meaning and syntax and grammar, in a way that
can give you a independent and original thinking on the questions of
judging computing languages. Similarly, mathematical logic gives you a
extremely modern technical tool in evaluating or accessing the
problem. Spare a tech-geeking on a techincal book on your favorite
languages or computer language design book or latest computer
engineering practice guide or forum argumentation or wiki or Open
Sourcing zeitgeist ****, to read a text book or learn on the above
topics.

Xah

âˆ‘ http://xahlee.org/

Xah Lee, May 2, 2007

2. EdwardGuest

On May 2, 8:33 am, Xah Lee <> wrote:

<snip>

> As i have indicated in my post, it is non-trivial to implement a
> function that returns the positive angle of a vector. For example, it
> can be done with sign checking of the coordinate components (in total
> 4 cases, which can be done as 2 levels of nesting if, or simply 4
> if.), and or the evaluation of Min[Abs[ArcCos[x],Abs[ArcSin[x]]], or
> use clever ways with dot product, or ArcTan. It is not a trivial to
> know which algorithm is in general more efficient. (this is important,
> since finding the angle of a vector is a basic function, that may
> needs to be called millions times directly or indirectly) Further,
> consider the inverse trig function, it is likely 99.99% of people with
> a PH D in math wouldn't know how these are actually implemented. So,
> the question of whether calling one of the inverse trig function is
> more robust or efficient than another is a open question. And, besides
> the algorithmic level, the question also entails how the language
> actually implement the inverse trig functions.

<snip>

"We should forget about small efficiencies, say about 97% of the time:
premature optimization is the root of all evil."

The question you are asking depends a great deal on other factors
outside of the coding environment such as the compiler and the
hardware. If you are coding for a specific language/compiler/hardware
combination, all you need do is profile different versions of your
code until you're happy with the results.

Edward, May 2, 2007

3. PillsyGuest

On May 2, 11:33 am, Xah Lee <> wrote:
[...]
> In a person's computing career, concrete and specialized questions
> like these abound, and the answers or knowledge about them are scarce.
> Due to the general ignorance of technical knowledge, and the power-
> struggling nature of males, and the habit of intolerance and "troll-
> crying" in computing communities, made it difficult to have any
> sensible discussion of original questions that doesn't fit into some
> elementary level of FAQs and concepts.

I'm sort of wondering why you'd expect to have a conversation about
one concrete and specialized topic in a venue devoted to an entirely
different concrete and specialized topic.

Cheers,
Pillsy

Pillsy, May 3, 2007
4. James StroudGuest

Xah Lee wrote:
> Today, a motherfucker Christophe Rhodes (aka Xof in irc://chat.freenode.net/lisp
> ) kicked banned me.

Are you aware that you are a troll? Have you considered that this has
anything to do with your being kick-banned? Why do 99.999999 % of the
people on the web not get treated like you? Answer: you are a troll and
they are not.

James

James Stroud, May 3, 2007
5. Steven D'ApranoGuest

Responding to Trolls [was Re: ignorance and intolerance in computing communties]

On Wed, 02 May 2007 21:23:13 -0700, James Stroud wrote:

> Xah Lee wrote:
>> Today, a motherfucker Christophe Rhodes (aka Xof in irc://chat.freenode.net/lisp
>> ) kicked banned me.

>
> Are you aware that you are a troll? Have you considered that this has
> anything to do with your being kick-banned? Why do 99.999999 % of the
> people on the web not get treated like you? Answer: you are a troll and
> they are not.

Sometimes I dream of a world, a wonderful, far away world, where nobody
was allowed to post to Usenet until they can correctly answer the
following multiple-choice question:

Q Verbally abusing trolls ...
1. gives them the attention they crave
2. fails to discourage their trollish behaviour
3. annoys the people who otherwise wouldn't have seen the troll's post
4. all of the above

--
Steven D'Aprano

Steven D'Aprano, May 3, 2007
6. Michele DondiGuest

Re: Responding to Trolls [was Re: ignorance and intolerance in computing communties]

On Thu, 03 May 2007 14:54:21 +1000, Steven D'Aprano
<> wrote:

>Subject: Responding to Trolls [was Re: ignorance and intolerance in computing communties]

Nope. No way.

Michele
--
{\$_=pack'B8'x25,unpack'A8'x32,\$a^=sub{pop^pop}->(map substr
((\$a||=join'',map--\$|x\$_,(unpack'w',unpack'u','G^<R<Y]*YB='
..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,\$_,
256),7,249);s/[^\w,]/ /g;\$ \=/^J/?\$/:"\r";print,redo}#JAPH,

Michele Dondi, May 3, 2007

> As i have indicated in my post, it is non-trivial to implement a
> function that returns the positive angle of a vector. For example, it
> can be done with sign checking of the coordinate components (in total
> 4 cases, which can be done as 2 levels of nesting if, or simply 4
> if.), and or the evaluation of Min[Abs[ArcCos[x],Abs[ArcSin[x]]], or
> use clever ways with dot product, or ArcTan. It is not a trivial to
> know which algorithm is in general more efficient. (this is important,
> since finding the angle of a vector is a basic function, that may
> needs to be called millions times directly or indirectly) Further,
> consider the inverse trig function, it is likely 99.99% of people with
> a PH D in math wouldn't know how these are actually implemented. So,
> the question of whether calling one of the inverse trig function is
> more robust or efficient than another is a open question. And, besides
> the algorithmic level, the question also entails how the language
> actually implement the inverse trig functions.
>
> Besides efficiency concerns, there's also robustness concerns. For
> example, if the 2 vectors are {1,0} and {0,1}, a simplistic
> implementation will result in division by 0 or similar errors.
> Checking whether one of them lies on the x or y axis means more if
> statements, as well the non-trivial problem of determining if two
> numbers are equal. (e.g. is 0.000001 considered equal to 0.0001 )
>
>
> Â  Xah
> Â
> âˆ‘http://xahlee.org/

Xah could you please post staff related to lisp programming like above
from the IRC.

thanks
bobi

8. Xah LeeGuest

Xah Lee wrote:
Â«
....
â€œIgnorance And Intolerance In Online Computing Communitiesâ€
http://xahlee.org/Netiquette_dir/ignorance_intolerance.html

.... As i have indicated in my post, it is non-trivial to implement a
function that returns the positive angle of a vector....
Â»

I have now coded this. I think it is probably the most algorithmically
optimal, and rather much simpler than i originally thought. Here's the
Mathematica code:

vectorAngle[{a1_, a2_}] := Module[{x, y},
{x, y} = {a1, a2}/Sqrt[a1^2 + a2^2] // N;
If[x == 0 && y == 0, "fucked",
If[x == 0, If[Sign@y === 1, Ï€/2, -Ï€/2],
If[y == 0, If[Sign@x === 1, 0, Ï€],
If[Sign@y === 1, ArcCos@x, 2 Ï€ - ArcCos@x]
]
]
]
]

Btw, if we can use any Mathematica's buildin function, this is
actually just
vectorAngle2[{a1_, a2_}] := Arg@(Complex @@ {a1, a2})

I'm still interested, if someone would show the source code, of how
Perl, Python, or Lisp or Java, implement the function that finds the
angle of a complex number.

Originally, i was also hoping perhaps there's some math trick by dot
product or combination of trig functions, that obviates the need to
check which quadrant the vector is in ...

Xah

âˆ‘ http://xahlee.org/

Xah Lee, May 3, 2007
9. Frank BussGuest

Xah Lee wrote:

> I'm still interested, if someone would show the source code, of how
> Perl, Python, or Lisp or Java, implement the function that finds the
> angle of a complex number.

So you have forgotten to cross-post to comp.lang.java

I think at least for strict floating-point Java uses the netlib:

http://www.netlib.org/fdlibm/e_atan2.c

For normal floating-point calculations I assume Java uses something like
FPATAN on x86'er computers:

http://www.ews.uiuc.edu/~cjiang/reference/vc107.htm

But you can download the source code of the JVM to verify it yourself:

https://openjdk.dev.java.net/

--
Frank Buss,
http://www.frank-buss.de, http://www.it4-systems.de

Frank Buss, May 3, 2007
10. Roel SchroevenGuest

Xah Lee schreef:
> Xah Lee wrote:
> Â«
> ...
> â€œIgnorance And Intolerance In Online Computing Communitiesâ€
> http://xahlee.org/Netiquette_dir/ignorance_intolerance.html
>
> ... As i have indicated in my post, it is non-trivial to implement a
> function that returns the positive angle of a vector....
> Â»
>
> I have now coded this. I think it is probably the most algorithmically
> optimal, and rather much simpler than i originally thought. Here's the
> Mathematica code:
>
> vectorAngle[{a1_, a2_}] := Module[{x, y},
> {x, y} = {a1, a2}/Sqrt[a1^2 + a2^2] // N;
> If[x == 0 && y == 0, "fucked",
> If[x == 0, If[Sign@y === 1, Ï€/2, -Ï€/2],
> If[y == 0, If[Sign@x === 1, 0, Ï€],
> If[Sign@y === 1, ArcCos@x, 2 Ï€ - ArcCos@x]
> ]
> ]
> ]
> ]

I might be wrong of course, but can't you just use atan2? Only problem
is that it returns negative angles for quadrants 3 and 4, but that is
easily solved. In Python:

from math import atan2, pi, fmod
def vectorAngle(x, y):
return fmod(atan2(y, x) + 2*pi, 2*pi)

No conditionals in sight.

--
If I have been able to see further, it was only because I stood
on the shoulders of giants. -- Isaac Newton

Roel Schroeven

Roel Schroeven, May 3, 2007