Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perl XS Beginners

3 views
Skip to first unread message

Matthew Horsfall (alh)

unread,
Dec 13, 2013, 10:21:40 AM12/13/13
to per...@perl.org
Howdy,

I'm trying to garner some interest in a Perl XS beginner/intermediate
group/community.

I was wondering if we could sort of "take over" this list, and by that
I mean start using it and broadcasting it for XS beginners and up to
ask questions, share knowledge, etc.

Would that be an acceptable use of this list or should we start our own?

Thank you,

-- Matthew Horsfall (alh)

David Mertens

unread,
Dec 13, 2013, 12:49:50 PM12/13/13
to Paul Johnson, Matthew Horsfall (alh), per...@perl.org
Absolutely appropriate. Go for it. :-)


On Fri, Dec 13, 2013 at 12:47 PM, Paul Johnson <pa...@pjcj.net> wrote:
On Fri, Dec 13, 2013 at 10:21:40AM -0500, Matthew Horsfall (alh) wrote:
> Howdy,
>
> I'm trying to garner some interest in a Perl XS beginner/intermediate
> group/community.
>
> I was wondering if we could sort of "take over" this list, and by that
> I mean start using it and broadcasting it for XS beginners and up to
> ask questions, share knowledge, etc.
>
> Would that be an acceptable use of this list or should we start our own?

Counting your message, I see six messages on this list in the last six
months, and 20 in the last year.  The list description, on
http://lists.perl.org/list/perl-xs.html is "A list for people interested
in XS."

FWIW, I would be very happy to see this list used for that purpose.  And
thanks for taking the initiative to do this.

--
Paul Johnson - pa...@pjcj.net
http://www.pjcj.net



--
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

Paul Johnson

unread,
Dec 13, 2013, 12:47:17 PM12/13/13
to Matthew Horsfall (alh), per...@perl.org
On Fri, Dec 13, 2013 at 10:21:40AM -0500, Matthew Horsfall (alh) wrote:
> Howdy,
>
> I'm trying to garner some interest in a Perl XS beginner/intermediate
> group/community.
>
> I was wondering if we could sort of "take over" this list, and by that
> I mean start using it and broadcasting it for XS beginners and up to
> ask questions, share knowledge, etc.
>
> Would that be an acceptable use of this list or should we start our own?

David Oswald

unread,
Dec 13, 2013, 1:15:45 PM12/13/13
to Matthew Horsfall (alh), per...@perl.org

We all learn more by being challenged by the questions generated as newcomers climb the learning curve.

Matthew Horsfall (alh)

unread,
Dec 13, 2013, 1:18:11 PM12/13/13
to per...@perl.org
Awesome, thank you everyone.

So far it seems like no one has a problem with this, I'm going to
operate under this assumption.

I just hope this list is "friendly" and "patient".

If you feel like getting more involved, we're congregating in #xs on
irc.perl.org.

This is all just starting to take off, so patience please while things
get organized and set up.

Cheers,

-- Matthew Horsfall (alh)

Mike Flannigan

unread,
Dec 13, 2013, 2:37:09 PM12/13/13
to per...@perl.org

I for one had to look up what XS is:
http://en.wikipedia.org/wiki/XS_%28Perl%29

It is a an interface through which a program written
in the Perl programming language can call a C or C++
language subroutine.

I don't know enough about C or C++ to answer why a
'system' command or 'exec' command wouldn't do the
same thing.



Mike

Matthew Horsfall (alh)

unread,
Dec 13, 2013, 2:39:24 PM12/13/13
to Mike Flannigan, per...@perl.org
On Fri, Dec 13, 2013 at 2:37 PM, Mike Flannigan <mike...@att.net> wrote:
>
> I for one had to look up what XS is:
> http://en.wikipedia.org/wiki/XS_%28Perl%29
>
> It is a an interface through which a program written
> in the Perl programming language can call a C or C++
> language subroutine.
>
> I don't know enough about C or C++ to answer why a
> 'system' command or 'exec' command wouldn't do the
> same thing.

XS is how you can interface with other libraries written in C/C++.

For example, DBD::mysql interfaces with the MySQL Client libraries
which are written in C.
You wouldn't want to have to call system('mysql -e ...') or
exec('mysql -e ...') to invoke the command line client every time you
wanted to issue a SQL query, the overhead would be outrageous.

Also, many C libraries don't have command line interfaces that you can
call directly.

It's also how you write Perl modules in C that are generally much
faster than their Pure-Perl variants, think JSON::XS vs JSON::PP.

Another use of XS is to write Perl modules that make use of parts of
perl's internals that aren't exposed in Pure-Perl land, like
Devel::SawAmpersand.

Hope that helps.

-- Matthew Horsfall (alh)

David Mertens

unread,
Dec 14, 2013, 8:25:00 AM12/14/13
to bulk 88, Paul Johnson, Matthew Horsfall (alh), per...@perl.org
I agree, PerlMonks has had some good content on XS. My problem is that I don't know how to automatically track PerlMonks for messages. In fact, as far as I can tell, there is no way to do so. It can, however, be done on Stack Overflow, but that's not really a discussion forum.

That said, while exploring PerlMonks, I came up with this search that is pretty useful at locating new threads about Perl XS stuff:

http://www.perlmonks.org/?node_id=3989;HIT=xs;HET=Re%3A%20Re^%20XSLT

There's actually a lot more discussion on XS than I had realized. :-)

If PerlMonks just had a notification system, I would be able to stay on top of important queries, like XS, or PDL.

David


On Fri, Dec 13, 2013 at 6:20 PM, bulk 88 <bul...@hotmail.com> wrote:


> Date: Fri, 13 Dec 2013 18:47:17 +0100
> From: pa...@pjcj.net
> To: wolf...@gmail.com
> CC: per...@perl.org
> Subject: Re: Perl XS Beginners
>
>
 ....................

> Counting your message, I see six messages on this list in the last six
> months, and 20 in the last year. The list description, on
> http://lists.perl.org/list/perl-xs.html is "A list for people interested
> in XS."
>
> FWIW, I would be very happy to see this list used for that purpose. And
> thanks for taking the initiative to do this.

In my observations I've seen PerlMonks used more often for XS help than
this list.

Calle Dybedahl

unread,
Dec 14, 2013, 6:03:27 AM12/14/13
to per...@perl.org
>>>>> ""Matthew" == "Matthew Horsfall (alh)" <wolf...@gmail.com> writes:

> I mean start using it and broadcasting it for XS beginners and up to
> ask questions, share knowledge, etc.

Earlier this fall I got a reason to start learning XS (in order to write
the module Net::LDNS, now on CPAN). Since I found the documentation
available to be fairly good, but somewhat difficult to access for a
complete beginner, I tried to write down what I learned as a guide for
other beginners. There's explanations of concepts, code examples, a tiny
little bit about Perl internals and recommendations about which
documentation to read in which order.

You can find it on my work's blog
http://theinitblog.init.se/2013/11/an-introduction-to-xs-perls-language.html
(if you go there the hits will make the guy caring for said blog happy),
or in less javacript-requiring fashion on Github at
https://github.com/cdybedahl/XSExample/blob/master/doc/Explain_1.md

--
Calle Dybedahl <ca...@cyberpomo.com>
http://www.livejournal.com/users/cdybedahl/
"Just about anything can be done if you are demented enough."
-- Christopher C. Petro, scary.devil.monastery
0 new messages