<< 1 >>
Rating:  Summary: There and Back Again Review: Extending and Embedding Perl is as it boldly states on the cover: "The definitive guide to XS, embedding, and the Perl internals". This book is well organized and information dense. One could spend days sifting through the available perlapi, perlcall, perlembed, perlguts perlxs, perlxstut, and h2xs documentation. After which you'll probably understand very well references to nethack's "You are in a maze of twisty little passages all alike". Or you could get yourself a copy of this book and find your way out of the maze.Most of the available documentation on extending and embedding perl is written from the prospective of the core perl developers for core perl developers. This book is written for advanced Perl programmers who for whatever reason need or wish to peer into that netherworld between Perl, C, and the glue that interface Perl with other languages. It is a deliberate thorough guide led by authors that are both extremely knowledgeable and also capable of communicating that knowledge. While it would greatly reduce the learning curve, no prior knowledge of C is required to read this book. This is a surprising claim and while it won't be easy, this reader is proof that someone with little true knowledge of C can in fact read and for the most part comprehend what the authors wish to convey. There are clearly areas for improvement. Things like NULL being used throughout chapter 3, only to finally be defined later in a footnote in chapter 4. And other cases of terms being used before they are explained. Things that leave the reader juggling unnecessarily until the information is provided that lets understanding fall into place. But for the most part, if you are a competent juggler and are patient your questions will eventually be answered. You won't walk away a C programmer, but you will learn enough to solve the problems which led you to consider reading this book in the first place. One thing I liked very much about the layout of the book is how it switches back between presenting sections on C programming and Perl. The authors revisit C each time it is necessary to understand the next Perl internals topic. Those that are learning C or need the review receive the relevant information just before it is required. Over the course of the book, you'll learn about interfacing from Perl to C and C back to Perl. For those that must plug references to Tolkien in things Perl... you can go back and rephase that into an appropriate reference to Bilbo's book "There and Back Again". You'll also learn the perl api, data structures for core variable types, and how to work with scalars, arrays, hashes, strings, regular expressions, file handles, typeglobs, objects, callbacks and PDL with C and C++. And there is even mention of working with Fortran, Java, and more esoteric alternatives. The book finishes with an in depth look at Perl internals: the parser, tokenizer, op code trees, execution, and compiler. And closes with a discussion of the Perl development process: How it may be monitored and participated in. What's missing? Detailed coverage of the I/O subsystem and the regular expression engine. I.e., topics which might themselves make for a good book. There was also light coverage on things like scratchpads. There were times while reading when I didn't know whether the issue being discussed was fully covered or curtailed. But you will certainly find better coverage of the issues in this book than elsewhere. This is an impressive book. I hope it will greatly influence the way Perl6 internals are documented.
Rating:  Summary: There and Back Again Review: Extending and Embedding Perl is as it boldly states on the cover: "The definitive guide to XS, embedding, and the Perl internals". This book is well organized and information dense. One could spend days sifting through the available perlapi, perlcall, perlembed, perlguts perlxs, perlxstut, and h2xs documentation. After which you'll probably understand very well references to nethack's "You are in a maze of twisty little passages all alike". Or you could get yourself a copy of this book and find your way out of the maze. Most of the available documentation on extending and embedding perl is written from the prospective of the core perl developers for core perl developers. This book is written for advanced Perl programmers who for whatever reason need or wish to peer into that netherworld between Perl, C, and the glue that interface Perl with other languages. It is a deliberate thorough guide led by authors that are both extremely knowledgeable and also capable of communicating that knowledge. While it would greatly reduce the learning curve, no prior knowledge of C is required to read this book. This is a surprising claim and while it won't be easy, this reader is proof that someone with little true knowledge of C can in fact read and for the most part comprehend what the authors wish to convey. There are clearly areas for improvement. Things like NULL being used throughout chapter 3, only to finally be defined later in a footnote in chapter 4. And other cases of terms being used before they are explained. Things that leave the reader juggling unnecessarily until the information is provided that lets understanding fall into place. But for the most part, if you are a competent juggler and are patient your questions will eventually be answered. You won't walk away a C programmer, but you will learn enough to solve the problems which led you to consider reading this book in the first place. One thing I liked very much about the layout of the book is how it switches back between presenting sections on C programming and Perl. The authors revisit C each time it is necessary to understand the next Perl internals topic. Those that are learning C or need the review receive the relevant information just before it is required. Over the course of the book, you'll learn about interfacing from Perl to C and C back to Perl. For those that must plug references to Tolkien in things Perl... you can go back and rephase that into an appropriate reference to Bilbo's book "There and Back Again". You'll also learn the perl api, data structures for core variable types, and how to work with scalars, arrays, hashes, strings, regular expressions, file handles, typeglobs, objects, callbacks and PDL with C and C++. And there is even mention of working with Fortran, Java, and more esoteric alternatives. The book finishes with an in depth look at Perl internals: the parser, tokenizer, op code trees, execution, and compiler. And closes with a discussion of the Perl development process: How it may be monitored and participated in. What's missing? Detailed coverage of the I/O subsystem and the regular expression engine. I.e., topics which might themselves make for a good book. There was also light coverage on things like scratchpads. There were times while reading when I didn't know whether the issue being discussed was fully covered or curtailed. But you will certainly find better coverage of the issues in this book than elsewhere. This is an impressive book. I hope it will greatly influence the way Perl6 internals are documented.
Rating:  Summary: Finally - all in one place Review: I got a copy of this book in one of the Israel Perl Mongers meetings (www.perl.org.il), to read and review it. The topic is useful as this subject was considered as voodoo done by Perl hackers and "mappers of the Perl internals". I suppose you can say this claim is not true anymore, because this book collects the know-how from the perldocs, the newsgroups, the camel book (and other resources) and the personal experience of authors of the book. Finally, you don't have to pick up small pieces of information about this subject in many places as people did prior to this book. What one would do, if one wanted to learn how to extend Perl or embed Perl before this book was available was doing one or more of the following: * Read relevant small parts of the Camel book (preferably the recent edition rather than the 1st or 2nd) and "Advanced Perl Programming" (which is rather old, and only touches this matters). This would give you some idea about Perl internals and perhaps some clues about XS, but that's about it. * browse through newsgroups, mail archives and mailing lists to look for clues, and ask expert users, which usually, are not polite to answer newbies questions about such matters. * figure out some cryptic (though, personally, I like them) incomplete (examples-wise) perldocs such as: perlembed, perldebguts, perlxstut, perlxs, perlclib, perlguts, perlcall, perlapi, perlintern, perliol, perlapio, perlhack * locate and dig into available CPAN module using this technology. I think reading one book, with common terminology and many examples, is better than doing one or more of the above. The book starts with an introduction of C for Perl programmers. It is very short and in my opinion not so accurate (due to its shortness), but since this should be a short introduction - it lives up to the promise. You can write a lot more than a "hello world" program after reading this short chapter, and you get a bonus, how to compile on gcc (gcc is ANSI-C and is available for all platforms), which is a wise idea. Perl programmers might be a bit disappointed to discover how much code and how complicated code you need to write in C to produce something that does the same as any Perl oneliner. The third chapter about Advanced C is a very good continuation to this introduction, especially, becuase the authors can assume you know some Perl (although I'm not sure they do). As someone giving lectures in "introduction to Computer Science, C language", I was tempted to borrow several very nice examples and explenations from this chapter. And I might also do that :-) The next chapter explains how C code can be incorporated into a Perl Module and more generally into a CPAN package of a Perl module. This is very useful. Many resources (including books), focus on writing C/Perl code, and they say nothing or next to nothing about packaging (what you should do in order to make sure others can use your code, what you can and can't assume about the target system, etc.) The fourth chapter is a useful cover of Perl variable types. This is somehting you could find in the "camel book", you can also find this in the (rather old) "Advanced Perl Programming", and of course in perldocs - but having it in one place, in order with examples and explenations is a real joy. Now you can figure it our reading one thing, and if you feel you want more, go to the perldocs. Explaining Perl API, XS and advanced XS, alternatives to XS explain how you can add to your Perl programs some code (or programs or libraries) in C. I, personally wanted to have a module in Perl that gives interface to a data structure. Since the implementation I had is in C and it is tested and verified, I wanted to have a Perl module which exports the functionality, and offers a perl-oriented interface, without needing to reimplement the data structure in Perl. These book chapters made all the difference, and with the knowlede in chapter 2, I can now finish this, and after doing my testing, put it on CPAN. Isn't that great?! If you are interested in doing the opposite, write Perl in C code, you can learn it in chapter 8. And if theory does not meet practice, you can read chapter 9 (and also try it out yourself) which presents a case study. Pretty useful stuff. For people who are taking their first steps, the material so far is more than enough. But once you go deeper you want to know more about how to do more complicated stuff, and how stuff actually works. Chapter 10 which introduces you to the Perl internals is just what you would be looking for. Chapter 11 will be the tour into the depts, teaching you some perl hacking, i.e. how to alter Perl's behaviour. The indices are useful, though can be found (though, not in similar format) elsewhere. To sum this review, I loved the book. I wish I could take more time to practice what I read there thoroughly. I will surely get a copy of this book to have it on my bookshelf, and when the need comes, on my desk.
Rating:  Summary: This book belongs on your bookshelf Review: I really fell in love with this book as I read through it. It does an excellent job of explaining the hairy details of working with Perl at the C level, whether etending Perl (the bulk of this book), embedding it in other apps, or hacking the guts. I haven't found any other books that try to fill this space, but even if there were this would still be the book to buy!
Rating:  Summary: This book belongs on your bookshelf Review: I really fell in love with this book as I read through it. It does an excellent job of explaining the hairy details of working with Perl at the C level, whether etending Perl (the bulk of this book), embedding it in other apps, or hacking the guts. I haven't found any other books that try to fill this space, but even if there were this would still be the book to buy!
Rating:  Summary: Want to dive deep into perl? Get this book Review: The most concise book ever on demistfying the dreaded XS. The information found in the book is not a collection from PODs or from the Tiger, Camel books. Top down approch step by step explanaiton, and best of all very detailed explanation of C code. The author, with great effort illustrates C code by chunks and explains them. Much better approach then line by line explanation in which you generally get lost, or than summarizing the code leaving you to understand the design criteria written in two lines of code for more than half an hour.
If you are a skilled Perl developer and would like to interface libraries or create modules written in C, this is the book for you. I wish I've come across this book earlier. I couldh have saved man months of work.
Rating:  Summary: Exellent straight forward and complete. Review: The Short Review: This is a marvellous book, and if you want to learn about how to embed or extend C with Perl, then this is the book. Go buy. The Long Review: I used to be a commercial C programmer more years ago than I care to remember, but I never ever really "got" all those asterisks, and ampersands and all that other funny stuff. I was still really a LISP programmer at heart, and in 1991 when I first started learning C, I wondered why anyone would want to learn all those hieroglyphics when wonderful languages like LISP were around. Of course, the answers are speed, efficiency and power. But when I discovered Perl a few years later, which had all of this in buckets, it was with a very great relief that I threw off the millstone of C. But as I've got more into Perl, eventually even coming to teach and occasionally write about it, there have been many times when I've needed to drill down back into the demon of C. This has mainly been to increase the efficiency and speed of database code I've written for various companies. Alas, all those perlguts and perlembed manual documents were more cryptic and painful, to my mind, than the economic theories of the Keynesians; I got there in the end, but usually in a battered, bruised and bloodied state. But then I had the good fortune to go to a Damian Conway talk on Perl6, where I had the great privilege of meeting Hugo van der Sanden, who revealed the future appearance of Inline C in Perl 5.10. The beast would be outed, and I decided to try to master it. But how to figure it all out? Fortunately, a kind clever person at the bar afterwards pointed me towards this book, and all has since become clear. Well, clearer! :-) The dreaded malloc word appears on p.64, and the ... phrase "linked lists" appears on p.83, but somehow I survived. This book is well written, concise, and an absolute must for all those, such as myself, who need to work with C and Perl, but who've been putting off the ... day. With this superb book, we cowards no longer have any excuses. Magic! :-)
Rating:  Summary: A good book, but leaves windows programmers short Review: We bought this book as part of a project we were doing in windows. We were trying to integrate perl scripting as a macro language in an existing application. Although we couldn't have done it without this book, there were still a lot of unanswered questions. The book is short on details about the build process and is focused on the unix-like command line environment. (We are now quite good at integrating perl into windows GUI apps. Contact us at www.ubcomputer.com if you're interested in our services!)
<< 1 >>
|