Mailing List Archive

Re: xkcd.com/353 ( Flying with Python )
On 30/03/24 7:21 pm, HenHanna wrote:
> https://xkcd.com/1306/
>                          what does  SIGIL   mean?

I think its' a Perl term, referring to the $/@/# symbols in front of
identifiers.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Re: xkcd.com/353 ( Flying with Python ) [ In reply to ]
Greg Ewing wrote:

> On 30/03/24 7:21 pm, HenHanna wrote:
>> https://xkcd.com/1306/
>>                          what does  SIGIL   mean?

> I think its' a Perl term, referring to the $/@/# symbols in front of
> identifiers.



thanks!

https://www.explainxkcd.com/wiki/index.php/1306:_Sigil_Cycle
--
https://mail.python.org/mailman/listinfo/python-list
Re: xkcd.com/353 ( Flying with Python ) [ In reply to ]
>
> > https://xkcd.com/1306/
> > what does SIGIL mean?
>
> I think its' a Perl term, referring to the $/@/# symbols in front of
> identifiers.
>

I had a vague recollection of hearing it elsewhere (*Game of Thrones,* on
the armies' battle flags?), but didn't know what it meant. Google tells me:

*an inscribed or painted symbol considered to have magical power.*

So, they're more than just line noise. They confer power on their users...

Perhaps '@' in the context of decorators is the most prominent example in
Python, since decorators technically don't allow the programmer to do
something they couldn't before, but are now are used everywhere, a key
feature of many applications and modules.

Magical-ly, y'rs,

Skip

>
--
https://mail.python.org/mailman/listinfo/python-list
Re: xkcd.com/353 ( Flying with Python ) [ In reply to ]
On 2024-03-30 11:25, Skip Montanaro via Python-list wrote:
>>
>> > https://xkcd.com/1306/
>> > what does SIGIL mean?
>>
>> I think its' a Perl term, referring to the $/@/# symbols in front of
>> identifiers.
>>
>
> I had a vague recollection of hearing it elsewhere (*Game of Thrones,* on
> the armies' battle flags?), but didn't know what it meant. Google tells me:
>
> *an inscribed or painted symbol considered to have magical power.*
>
> So, they're more than just line noise. They confer power on their users...
>
> Perhaps '@' in the context of decorators is the most prominent example in
> Python, since decorators technically don't allow the programmer to do
> something they couldn't before, but are now are used everywhere, a key
> feature of many applications and modules.
>
> Magical-ly, y'rs,
>
I wouldn't consider '@' to be a sigil any more than I would a unary minus.
In Perl there's the prefixes $ (scalar), @ (array) and %
(hash/dictionary), but also & (function), although it's rare because
there's also the () afterwards.

Variables in PHP have the prefix $ and only $.

In old versions of BASIC, string variables had the suffix $, and integer
variables the suffix %. Some versions also had the suffix # (for double
precision, I think).
--
https://mail.python.org/mailman/listinfo/python-list
Re: xkcd.com/353 ( Flying with Python ) [ In reply to ]
On 30/03/2024 07:04, Greg Ewing via Python-list wrote:
> On 30/03/24 7:21 pm, HenHanna wrote:
>> https://xkcd.com/1306/
>>                          what does  SIGIL   mean?
>
> I think its' a Perl term, referring to the $/@/# symbols in front of
> identifiers.

There seem to be several derivation sources including a fantasy world
city suspended above a very thin, tall steeple....

Personally, I know SIGIL as an opensource EPUB editor!

None of them seem to have any direct connection to the xkcd cartoon.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


--
https://mail.python.org/mailman/listinfo/python-list
Re: xkcd.com/353 ( Flying with Python ) [ In reply to ]
On 2024-03-30 17:58:08 +0000, Alan Gauld via Python-list wrote:
> On 30/03/2024 07:04, Greg Ewing via Python-list wrote:
> > On 30/03/24 7:21 pm, HenHanna wrote:
> >> https://xkcd.com/1306/
> >> ???????????????????????? what does? SIGIL?? mean?
> >
> > I think its' a Perl term, referring to the $/@/# symbols in front of
> > identifiers.

Correct (although strictly speaking they are in front of an expression,
not an identifier).

> There seem to be several derivation sources including a fantasy world
> city suspended above a very thin, tall steeple....
>
> Personally, I know SIGIL as an opensource EPUB editor!

Well, it's an ordinary English word of Latin origin (sigillum means
literally "small sign") in use since the 15th century. No need to go
hunting for proper names.

> None of them seem to have any direct connection to the xkcd cartoon.

In my opinion the connection to Perl sigils is very direct.

hp


--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Re: xkcd.com/353 ( Flying with Python ) [ In reply to ]
On 3/30/24 10:31, MRAB via Python-list wrote:
> On 2024-03-30 11:25, Skip Montanaro via Python-list wrote:
>>>
>>> > https://xkcd.com/1306/
>>> >                           what does  SIGIL   mean?
>>>
>>> I think its' a Perl term, referring to the $/@/# symbols in front of
>>> identifiers.
>
> I wouldn't consider '@' to be a sigil any more than I would a unary minus.

Nonetheless, Perl folk do use that term, specifically.

"One thing that distinguishes Perl from other languages is its use of
sigils; the funny looking symbols placed in front of variable names. "

$ Scalar $foo
@ Array @foo
% Hash %foo
& Subroutine &foo
* Typeglob *foo


> Sigils have many benefits, not least of which is that variables
can be interpolated into strings with no additional syntax. Perl scripts
are also easy to read (for people who have bothered to learn Perl!)
because the nouns stand out from verbs. And new verbs can be added to
the language without breaking old scripts.

> Programming Perl, Chapter 1, 4th Edition

etc.
--
https://mail.python.org/mailman/listinfo/python-list
Re: xkcd.com/353 ( Flying with Python ) [ In reply to ]
On 2024-03-31 12:27:34 -0600, Mats Wichmann via Python-list wrote:
> On 3/30/24 10:31, MRAB via Python-list wrote:
> > On 2024-03-30 11:25, Skip Montanaro via Python-list wrote:
> > > > > https://xkcd.com/1306/
> > > > >?????????????????????????? what does? SIGIL?? mean?
> > > >
> > > > I think its' a Perl term, referring to the $/@/# symbols in front of
> > > > identifiers.

[You cut out a lot of context here]

> > I wouldn't consider '@' to be a sigil any more than I would a unary minus.
>
> Nonetheless, Perl folk do use that term, specifically.

I'm pretty sure he's referring to the use of @ in python to denote a
decorator here. Which is a totally different thing than a Perl sigil.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"