[erlang-questions] Allowed node names
Edwin Fine
erlang-questions_efine@REDACTED
Wed Jun 4 15:52:58 CEST 2008
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.
On Wed, Jun 4, 2008 at 1:09 AM, Richard A. O'Keefe <ok@REDACTED>
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]+ .
> '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.)
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080604/f4da9888/attachment.htm>
More information about the erlang-questions
mailing list