[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: problems from the Perl Cookbook solved in Lua?
- From: "Jonathan Branam" <sspeare@...>
- Date: Sun, 5 Aug 2001 20:15:00 -0700
In general, the Perl CookBook is pretty cool. The idea for Lua would
have good merit, although I believe the contents would end up being
different. Because Lua is not so much used for "system scripting"
(as John Belmonte just called it) the chapters would end up being
something more along the lines of "Example of inheritance" rather
than "How to find all files in a directory."
For those interested here are some of the topics in Perl Cookbook:
http://www.oreilly.com/catalog/cookbook/toc.html
1. Strings
1.1 Accessing Substrings
1.3 Exchanging Values Without Using Temporary Variables
1.4 Converting Between ASCII Character and Values
1.4 Processing a String One Character at a Time
1.6 Reversing a String by Word or Character
1.7 Expanding and Compressing Tabs
1.9 Expanding Variables in User Input
1.9 Controlling Case
1.10 Interpolating Functions and Expressions Within Strings
1.14 Trimming Blanks from the Ends of a STring
1.15 Parsing Comma-Separated Data
1.16 Soundex Matching
1.17 Program: fixstyle
1.18 Program: psgrep
2. Numbers
2.0 Intro
2.1 Checking Whether a String Is a Valid Number
2.2 Comparing Floating-Point Numbers
2.3 Rounding Floating-Point Numbers
2.4 Converting Between Binary and Decimal
2.5 Operating on a Series of Integers
2.7 Generating Random Numbers
2.11 Doing Trigonometry in Degrees, not Radians
2.13 Taking Logorithms
2.14 Multiplying Matrices
2.15 Using Complex Numbers
2.17 Putting Commas in Numbers
2.18 Printing Correct Plurals
2.19 Program: Calculating Prime Factors
3. Dates and Times
3.0 Intro
3.1 Finding Today's Date
3.2 Converting DMYHMS to Epoch Seconds
3.3 Converting Epoch Seconds to DMYHMS
3.4 Adding to or Subtracting from a Date
3.5 Difference of Two Dates
3.6 Day in a Week/Month/Year or Week Number
3.7 Parsing Dates and Times from Strings
3.8 Printing a Date
3.9 High-Resolution Timers
3.10 Short Sleeps
3.11 Program: hopdelta
4. Arrays
4.0 Intro
4.1 Specifying a List in Your Program
4.2 PRinting a List with Commas
4.3 Changing Array Size
4.4 Doing Something with every Element in a list
4.5 Iterating Over and Array by Reference
4.6 Extracting Unique Elements from a List
4.7 Finding Elements in One Array but Not Another
4.8 Computing Union, Intersection, or Difference of Unique Lists
4.9 Appending One Array to Another
4.10 Reversing an Array
5. Hashes
6. Pattern Matching
7. File Access
8. File Contents
9. Directories
10. Subroutines
11. References and Records
12. Packages, Libraries, and Modules
13. Classes, Objects, and Ties
14. Database Access
15. User Interfaces
16. Process Management and Communication
17. Sockets
18. Internet Services
19. CGI Programming
20. Web Automation
----- Original Message -----
From: "Luiz Henrique de Figueiredo" <lhf@tecgraf.puc-rio.br>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Sunday, August 05, 2001 4:27 PM
Subject: problems from the Perl Cookbook solved in Lua?
> I reproduce below a posting from comp.lang.misc.
> Perhaps some of you in lua-l are interested in contributing Lua
implementations?
> I'm not familiar with the contents of the "Perl Cookbook" and so cannot
say
> offhand whether the problems considered in it may have good Lua solutions,
> but perhaps it's worth trying?
> --lhf
>
> From pixel@mandrakesoft.com Sun Aug 5 19:04:08 EDT 2001
> Article: 29389 of comp.lang.misc
>
> ----------------------------------------
> http://pleac.sf.net/
>
> Following the great Perl Cookbook (by Tom Christiansen & Nathan
Torkington,
> published by O'Reilly) which presents a suite of common programming
problems
> solved in the Perl language, this project aims to gather fans of
programming,
> in order to implement the solutions in other programming languages.
>
> If successful, this project may become a primary resource
> - for quick, handy and free reference to solve most common programming
> problems using higher-level programming languages
> - for learning a new language from an already known one
> - for comparison on ease-of-use and power/efficiency of these languages
> ----------------------------------------
>