[erlang-questions] Allowed node names

Anders Nygren <>
Wed Jun 4 16:24:32 CEST 2008


2008/6/4 Edwin Fine <>:
> Heck, you are right. I didn't really look at the RE in the comment closely.
> ([A-Z][a-z][0-9]_-)+ will match Bd9_-, but not abcde. That's wild.

What did I tell You?
Never, ever, trust the comments.

/Anders

>
> On Wed, Jun 4, 2008 at 1:09 AM, Richard A. O'Keefe <>
> wrote:
>>
>> 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]+ .
>> '' *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.)
>>
>>
>>
>>
>>
>>
>>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list