[erlang-questions] Allowed node names

Richard A. O'Keefe ok@REDACTED
Wed Jun 4 07:09:01 CEST 2008


On 4 Jun 2008, at 2:51 am, Edwin Fine wrote:

> Gosh, Vlad, how can you say it is not documented? I mean, it clearly  
> states in the comments to the Erlang C source code in erts/emulator/ 
> beam/dist.c that
>
> **
> ** n must be a valid node name: string of ([a-z][A-Z][0-9]_-)+
> **
>
> It only took me 20 minutes to track this down. Don't you know, Real  
> Programmers Don't Need No Steenking Documentation, They Just Read  
> The Code  ;-)
>
What makes this savage joke even better is that
 >> The comment is WRONG <<

It should be [-_a-zA-Z0-9]+ .
'a@REDACTED' *is* valid, but since it isn't
a lower case letter followed by an upper case letter
followed by a digit followed by a dash or underscore,
the comment claims that it isn't.

It gets even better:  the next comment, "Scanned past the host name",
is *also* wrong.  The bit that has been scanned past is the *node*
name; the host name follows the subsequent '@'.

--
"I don't want to discuss evidence." -- Richard Dawkins, in an
interview with Rupert Sheldrake.  (Fortean times 232, p55.)









More information about the erlang-questions mailing list