From scott at illogics.org Thu May 1 03:14:35 2003 From: scott at illogics.org (Scott Walters) Date: Thu Aug 5 00:16:59 2004 Subject: Phoenix.pm: Perl Mongers, Fuzzy Logic Message-ID: <20030501081435.GI20479@illogics.org> Okey, I tend to bite off more than I can chew, but here it is: I've had good response in the past on doing a Fuzzy Logic presentation, so I'd like to do something in three parts: . Theory of Fuzzy Logic and how my interface implements it - applications for Fuzzy Logic, comparison to statistical methods and to neural networks. Fuzzy sets, fuzzy operations, data units in fuzzy systems. Classification and pattern recognition using systems of fuzzy logic. How Fuzzy Logic deals with the learning problem, its advantages and disadvantages to back-propogation and genetic programming. . Design of my (yet to be released) Fuzzy Logic module. Use of permutators and discriminators to find near-optimal solutions. Example Fuzzy Sets using "recently", "good health", and "shooting range" as examples of time, distance, and amount. Specifications for lacking modeling environment. . Walk-through of example program to control an imaginary robot. Contest - Games::AI::Bots battle on the LCD projector between modified versions of the sample program or else completely different solutions. I'm aiming to record presentations on VHS-C and compress them up as MPEGs and post them on slowass.net, so people only attending part 2 or part 3 aren't excluded. I haven't quite gotten the sound to work as the capture device I have access to uses the computers audio in, and the mic jacks on the machines around here don't seem to want to work. Perhaps I'll subtitle them ;) Games::AI::Bots was Doug's idea for a contest. I've kind of co-opted it. With luck, it can serve to illustrate other ideas in the future as well. There is no meeting this Thursday I guess, but I'll plan on kicking things off in two weeks. Thoughts? -scott From Craig.Frooninckx at acxiom.com Thu May 1 12:34:07 2003 From: Craig.Frooninckx at acxiom.com (Frooninckx Craig - cfroon) Date: Thu Aug 5 00:16:59 2004 Subject: Phoenix.pm: Perl Mongers, Fuzzy Logic Message-ID: <6B681776AD07ED4EBEEA5D961E431088022C89D3@phxmx02.corp.acxiom.net> I would be interested (as well as several of my co-workers) would be interested in hearing about your fuzzy logic. Let us know when your presenting. -----Original Message----- From: Scott Walters [mailto:scott@illogics.org] Sent: Thursday, May 01, 2003 1:15 AM To: phoenix-pm-list@happyfunball.pm.org Subject: Phoenix.pm: Perl Mongers, Fuzzy Logic Okey, I tend to bite off more than I can chew, but here it is: I've had good response in the past on doing a Fuzzy Logic presentation, so I'd like to do something in three parts: . Theory of Fuzzy Logic and how my interface implements it - applications for Fuzzy Logic, comparison to statistical methods and to neural networks. Fuzzy sets, fuzzy operations, data units in fuzzy systems. Classification and pattern recognition using systems of fuzzy logic. How Fuzzy Logic deals with the learning problem, its advantages and disadvantages to back-propogation and genetic programming. . Design of my (yet to be released) Fuzzy Logic module. Use of permutators and discriminators to find near-optimal solutions. Example Fuzzy Sets using "recently", "good health", and "shooting range" as examples of time, distance, and amount. Specifications for lacking modeling environment. . Walk-through of example program to control an imaginary robot. Contest - Games::AI::Bots battle on the LCD projector between modified versions of the sample program or else completely different solutions. I'm aiming to record presentations on VHS-C and compress them up as MPEGs and post them on slowass.net, so people only attending part 2 or part 3 aren't excluded. I haven't quite gotten the sound to work as the capture device I have access to uses the computers audio in, and the mic jacks on the machines around here don't seem to want to work. Perhaps I'll subtitle them ;) Games::AI::Bots was Doug's idea for a contest. I've kind of co-opted it. With luck, it can serve to illustrate other ideas in the future as well. There is no meeting this Thursday I guess, but I'll plan on kicking things off in two weeks. Thoughts? -scott ********************************************************************** The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer system. Thank You. From Eden.Li at asu.edu Thu May 1 14:39:12 2003 From: Eden.Li at asu.edu (Eden.Li@asu.edu) Date: Thu Aug 5 00:16:59 2004 Subject: Phoenix.pm: Perl Mongers, Fuzzy Logic In-Reply-To: <20030501081435.GI20479@illogics.org> References: <20030501081435.GI20479@illogics.org> Message-ID: <1051817952.3eb177e039c12@webmail.asu.edu> Scott, Have you any papers on this subject yet? eden Quoting Scott Walters : > . Theory of Fuzzy Logic and how my interface implements it - > applications > for Fuzzy Logic, comparison to statistical methods and to neural > networks. > Fuzzy sets, fuzzy operations, data units in fuzzy systems. > Classification and pattern recognition using systems of fuzzy logic. > How Fuzzy Logic deals with the learning problem, its advantages and > disadvantages to back-propogation and genetic programming. From scott at illogics.org Thu May 1 17:03:00 2003 From: scott at illogics.org (Scott Walters) Date: Thu Aug 5 00:16:59 2004 Subject: Phoenix.pm: Perl Mongers, Fuzzy Logic Message-ID: <20030501220300.GL20479@illogics.org> Eden, No, just notes from library books and ther ilk. Are you interested in double checking my work? The notation that most books use is very obscure and poorly explained, and they don't get past the introduction before they drop English as a communication tool and just throw lots of formulas at you, so I've had every chance to go astray. What I have combines the only case of an actual source code listing I could find, with what I've picked up in introductions. Methods for avoiding feedback/non stableizing systems is the most advanced text I was able to decipher. Apparently, there are mathematical methods for designing fuzzy systems for control - that is beyond me. If you're interested - and I really hope you are - then I'd be glad to organize and forward along what I have. -scott On 0, Eden.Li@asu.edu wrote: > > Scott, > > Have you any papers on this subject yet? > > eden > > Quoting Scott Walters : > > . Theory of Fuzzy Logic and how my interface implements it - > > applications > > for Fuzzy Logic, comparison to statistical methods and to neural > > networks. > > Fuzzy sets, fuzzy operations, data units in fuzzy systems. > > Classification and pattern recognition using systems of fuzzy logic. > > How Fuzzy Logic deals with the learning problem, its advantages and > > disadvantages to back-propogation and genetic programming. > From intertwingled at qwest.net Thu May 1 17:23:31 2003 From: intertwingled at qwest.net (intertwingled) Date: Thu Aug 5 00:16:59 2004 Subject: Phoenix.pm: Perl Mongers, Fuzzy Logic References: <20030501081435.GI20479@illogics.org> Message-ID: <3EB19E62.21C44EDC@qwest.net> I, on the other hand, have a tendency to chew off more than I can bite. =/ Tony Scott Walters wrote: > Okey, I tend to bite off more than I can chew, but here it is: > > I've had good response in the past on doing a Fuzzy Logic presentation, > so I'd like to do something in three parts: > > . Theory of Fuzzy Logic and how my interface implements it - applications > for Fuzzy Logic, comparison to statistical methods and to neural networks. > Fuzzy sets, fuzzy operations, data units in fuzzy systems. > Classification and pattern recognition using systems of fuzzy logic. > How Fuzzy Logic deals with the learning problem, its advantages and > disadvantages to back-propogation and genetic programming. > > . Design of my (yet to be released) Fuzzy Logic module. > Use of permutators and discriminators to find near-optimal solutions. > Example Fuzzy Sets using "recently", "good health", and "shooting range" > as examples of time, distance, and amount. > Specifications for lacking modeling environment. > > . Walk-through of example program to control an imaginary robot. > Contest - Games::AI::Bots battle on the LCD projector between > modified versions of the sample program or else completely different > solutions. > > I'm aiming to record presentations on VHS-C and compress them up as MPEGs and > post them on slowass.net, so people only attending part 2 or part 3 aren't > excluded. I haven't quite gotten the sound to work as the capture device > I have access to uses the computers audio in, and the mic jacks on the > machines around here don't seem to want to work. Perhaps I'll subtitle > them ;) > > Games::AI::Bots was Doug's idea for a contest. I've kind of co-opted it. > With luck, it can serve to illustrate other ideas in the future as well. > > There is no meeting this Thursday I guess, but I'll plan on kicking > things off in two weeks. > > Thoughts? > > -scott -- Even the safest course is fraught with peril. From vodhner at cox.net Sun May 4 16:19:22 2003 From: vodhner at cox.net (Victor Odhner) Date: Thu Aug 5 00:16:59 2004 Subject: Phoenix.pm: Best PHP reference book? In-Reply-To: <1051817952.3eb177e039c12@webmail.asu.edu> References: <20030501081435.GI20479@illogics.org> <1051817952.3eb177e039c12@webmail.asu.edu> Message-ID: <3EB583DA.5030107@cox.net> I was given an Amazon gift certificate and thought I'd buy a PHP book. I have a strong PerlCGI/Apache background and can certainly teach myself PHP, so what I need is a book with long-term reference value: rigorous syntax definition, examples of how to do non-trivial things, etc. Can someone suggest a good PHP reference book? O&BTW, "aztechbiz.com" doesn't seem to recognize the AZPHP list I used to belong to. Does the AZPHP list still exist? Thanks, Vic From scott at illogics.org Mon May 5 08:26:50 2003 From: scott at illogics.org (Scott Walters) Date: Thu Aug 5 00:16:59 2004 Subject: Phoenix.pm: Best PHP reference book? Message-ID: <20030505132650.GY20479@illogics.org> Hi Victor, http://www.slowass.net/phaedrus/todospool.pl?mesgid=36 - this was posted to this list a while back, but the link is broken now (even if you decode that correctly). Perhaps Google can turn up a copy of that, somewhere. If you find it, please add a link to the "Books" section on the website at http://phoenix.pm.org under "Free Books". Many have a justifiable loyalty to O'Reilly, as they churn out consistently good books. I happen to know that they have a few PHP books, including a cookbook, if memory serves. http://wiki.slowass.net/?BookShelf lists one PHP book in the little private library I kicked off a while back. Not to start a flame-war, but if you know and understand Perl, why would you want to "learn" PHP? Just another resume buzzword, you have to use it, what? Perl is already slighted enough for not being a serious programming language, only suited for rank hacks with no engineering discipline and script kiddies (also with no engineering discipline). Hope this helps. -scott On 0, Victor Odhner wrote: > > I was given an Amazon gift certificate and thought I'd > buy a PHP book. > > I have a strong PerlCGI/Apache background and can > certainly teach myself PHP, so what I need is a book > with long-term reference value: rigorous syntax > definition, examples of how to do non-trivial things, > etc. > > Can someone suggest a good PHP reference book? > > O&BTW, "aztechbiz.com" doesn't seem to recognize > the AZPHP list I used to belong to. Does the > AZPHP list still exist? > > Thanks, > > Vic > > From vodhner at cox.net Mon May 5 09:15:46 2003 From: vodhner at cox.net (Victor Odhner) Date: Thu Aug 5 00:16:59 2004 Subject: Phoenix.pm: Best PHP reference book? In-Reply-To: <20030505132650.GY20479@illogics.org> References: <20030505132650.GY20479@illogics.org> Message-ID: <3EB67212.408@cox.net> Scott, thanks for the book suggestions. Scott Walters wrote: > Not to start a flame-war, but if you know and understand > Perl, why would you want to "learn" PHP? Just another resume > buzzword, you have to use it, what? Perl is already slighted > enough for not being a serious programming language, only > suited for rank hacks with no engineering discipline and > script kiddies (also with no engineering discipline). I'm afraid I don't understand what you're trying to say here. Is it that you don't like PHP? Or you don't like Perl? After 30+ years at journeyman level in ALGOL, PL/I, COBOL, C and a bunch of less useful languages that I'd just as soon not think about (Prolog, LISP, VB, need I go on?), I found Perl. I've basically worked in nothing else except some C and a couple lines of VB in the past 6 years or so. Of course nowadays I'm doing data entry as my day job, but I'm earning more with Perl most weeks. Perl works. PHP is just, well, a piece of the Perl/Apache thing as far as I'm concerned. I'm working now in a system that has some growing CGI response problems -- the pains of growing success -- and working in-process (PHP, ModPerl) may be part of the solution. Not the whole solution, mind you -- excessive database hits may be the real problem, but first they have to break up the 6,000 line monolithic library that gets loaded by each CGI call. Um yeah, do you think? ;-) So now about those books: was one of them a really good reference, would you say? Which one did you like *best*? Vic From wlindley at wlindley.com Mon May 5 09:24:33 2003 From: wlindley at wlindley.com (William Lindley) Date: Thu Aug 5 00:16:59 2004 Subject: Phoenix.pm: Best PHP reference book? In-Reply-To: <20030505132650.GY20479@illogics.org> Message-ID: On Mon, 5 May 2003, Scott Walters wrote: > http://phoenix.pm.org under "Free Books" updated with new link: http://www.apress.com/book/supplementDownload.html?bID=3&sID=392 \\/ http://www.wlindley.com From bishop at fate.com Mon May 5 10:32:57 2003 From: bishop at fate.com (Mike Sherwood) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: Best PHP reference book? In-Reply-To: <3EB67212.408@cox.net>; from vodhner@cox.net on Mon, May 05, 2003 at 07:15:46AM -0700 References: <20030505132650.GY20479@illogics.org> <3EB67212.408@cox.net> Message-ID: <20030505083257.A3339@fate.com> On Mon, May 05, 2003 at 07:15:46AM -0700, Victor Odhner wrote: > Scott Walters wrote: > > Not to start a flame-war, but if you know and understand > > Perl, why would you want to "learn" PHP? Just another resume > > buzzword, you have to use it, what? Perl is already slighted > > enough for not being a serious programming language, only > > suited for rank hacks with no engineering discipline and > > script kiddies (also with no engineering discipline). > > I'm afraid I don't understand what you're trying to say here. > Is it that you don't like PHP? Or you don't like Perl? PHP is basically a crippled version of Perl with some minor syntax differences. This is how I think of it and it's made it easy to transition from writing web applications in Perl to writing them in PHP. It's just another tool to do the same types of jobs for some people. > Perl works. PHP is just, well, a piece of the Perl/Apache > thing as far as I'm concerned. I'm working now in a system > that has some growing CGI response problems -- the pains of > growing success -- and working in-process (PHP, ModPerl) may > be part of the solution. Not the whole solution, mind you -- > excessive database hits may be the real problem, but first > they have to break up the 6,000 line monolithic library that > gets loaded by each CGI call. Um yeah, do you think? ;-) For this, I'd be inclined to try to write some little benchmark applications before going too far towards one type of solution. Ie, put some realistic, if not extreme load on the database and see how it responds. Converting to PHP or ModPerl may be of some help no matter what the problem is. However, the best case scenario is to asymptotically approach the database performance. There are a lot of ways to set up a database that don't scale well. Looking at this end first is what I'd do. It sounds like there are a lot of problems that may warrant completely rewriting the application, and a new language is a good motivation to do this and take an opportunity to do some redesign. Loading large libraries every time something is called is likely to impact performance negatively, but to what degree is important to know. If it's taking 2 extra seconds for each execution to load this large library and 30 seconds to get a response to a query, the 2 seconds stops looking so bad. I have some PHP books, but in practice I found just using php.net like one would use cpan to find all the information you need on specific functions and examples works pretty well. I know at least one of the books I have is the PHP&Mysql one (O'Reilly, I believe). It wasn't bad as casual reading for syntax and rough ideas, but it left me thinking it would be a poor all-in-one reference. The examples they gave in there seemed like they could get someone into the position you're in - a working application with scalability issues. Then again, MySQL always leaves a bad taste in my mouth anyway. -Mike From scott at illogics.org Mon May 5 10:37:40 2003 From: scott at illogics.org (Scott Walters) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: Best PHP reference book? Message-ID: <20030505153740.GA20479@illogics.org> On 0, Victor Odhner wrote: > > Scott, thanks for the book suggestions. > > Scott Walters wrote: > > Not to start a flame-war, but if you know and understand > > Perl, why would you want to "learn" PHP? Just another resume > > buzzword, you have to use it, what? Perl is already slighted > > enough for not being a serious programming language, only > > suited for rank hacks with no engineering discipline and > > script kiddies (also with no engineering discipline). > > I'm afraid I don't understand what you're trying to say here. > Is it that you don't like PHP? Or you don't like Perl? No, no. I mean what I say - Perl lacks strong typing, protection levels on methods, has a funny syntax for reading instance data in classes, provides no fascilities for attribute inheritance - you have to protect instance data by manually doing variable name mangling. OO languages are used for "serious" development work, and most people who select languages to be used for "serious" development work don't consider Perl to cut the OO mustard - for very valid reasons. (Yes, Perl 6 aims to correct these and other problems). I'm not just talking about OO either - there are a lot of rough edges in Perl. I do like Perl, and I have no interest in PHP ;) > > After 30+ years at journeyman level in ALGOL, PL/I, COBOL, C > and a bunch of less useful languages that I'd just as soon > not think about (Prolog, LISP, VB, need I go on?), I found Perl. > I've basically worked in nothing else except some C and a > couple lines of VB in the past 6 years or so. Of course > nowadays I'm doing data entry as my day job, but I'm earning > more with Perl most weeks. I happen to like Lisp ;) > > Perl works. PHP is just, well, a piece of the Perl/Apache > thing as far as I'm concerned. I'm working now in a system > that has some growing CGI response problems -- the pains of > growing success -- and working in-process (PHP, ModPerl) may > be part of the solution. Not the whole solution, mind you -- > excessive database hits may be the real problem, but first > they have to break up the 6,000 line monolithic library that > gets loaded by each CGI call. Um yeah, do you think? ;-) [Original reponse deleted] What I think is of no matter, but... PHP and Perl are very, very different, and only superficially similar. Perl has been actively trying to move away from what PHP has been actively moving towards. Some novice Perl programmers that use a tiny subset of the language have reported good luck switching to PHP because of the superficial similiaries, but for someone used to the thousands of things that Perl offers, it is tough to switch. People seem to like PHP for the sloppy simplicity that many Perl'ers used to find endearing. There are some languages out there with very good technical and philosophical merits - Python is one of them, and I've heard good things about Ruby and Pike. If you can stomache it, Haskell and Ocaml pack one hell of a punch. ....but you should make up your own mind on the matter. As far as the 6,000 line monolithic library problem, my suggestions: run FastCGI, or do something similar by writing a webserver using HTTP::Daemon or whatever. If you use a module such as HTTP::Daemon, you can write threading code for the utmost level of memory efficiency and performance - running mod_perl or PHP, you still have a seperate forked process for each of a small finate number of processes you're willing to spend memory on. People have reported good lucking using POE (the pulled object environment) and its components - POE was designed for writing high performance servers. I don't recommend mod_perl - there are too few cases where it is actually a win, and it introduces strange and bizarre bugs - even core modules like Safe coredump it or don't work at all. If you don't mind the overhead of forking a CGI process, but the overhead of parsing 6,000+ lines of code is killing you, perlcc - the perl compiler - actually works quite well now (version 5.8.0). Generating a binary saves perl from having to parse all of the source code each and every hit. Finally, you may wish to configure Apache to handle static content requests itself and proxy active content requests to a FastCGI or threaded Perl server on another port. This gives you most of the advantages of running Apache and most of the advantages of mod_perl-like solutions without actually having to run mod_perl. > > So now about those books: was one of them a really good > reference, would you say? Which one did you like *best*? I haven't read any of them - at all. I'm sorry. Just wanted to point out that they were available so that it wasn't dead silent in this channel, and so you had the chance to evaluate them yourself. -scott > > Vic > > From scott at illogics.org Mon May 5 10:50:41 2003 From: scott at illogics.org (Scott Walters) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: Best PHP reference book? Message-ID: <20030505155040.GB20479@illogics.org> > > PHP is basically a crippled version of Perl with some minor syntax > differences. This is how I think of it and it's made it easy to > transition from writing web applications in Perl to writing them in PHP. > It's just another tool to do the same types of jobs for some people. Yeah. Rewritting 6,000 lines of code is kind of throwing out the baby with the bath water. I'd serious look at making a threading server with HTTP::Server. Perl's threading (while I'm not fond of the implementation) is safe - unless declared otherwise, everything goes into thread-local-store, so it works like fork(), but a lot more efficient, and using threads::shared, you need only declare a variable (or queue or such object) to be :shared, and all threads can see it and access it. You'd want the "worker pool" example - one thread would listen for connections, and put the work to be done on a queue, then you could have a handful of threads taking things off of the queue, processing them, and returning the output. The existing application would be a worker thread and wouldn't change me. You'd want to tie STDOUT for each process so that print(), printf(), write(), etc all continued to work. The tied STDOUT would have to buffer up the output and return it to the daemon thread to send as output, or even pass it along in chunks in a queue for real-time-ish output. In short, you're looking at adding about 100 lines of code, rather than rewritting 6,000. -scott From vodhner at cox.net Mon May 5 11:08:58 2003 From: vodhner at cox.net (Victor Odhner) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: map + grep problem In-Reply-To: <20030505153740.GA20479@illogics.org> References: <20030505153740.GA20479@illogics.org> Message-ID: <3EB68C9A.8060905@cox.net> Here's a really basic Perl construct that for some reason I've never used. In this case I'm trying to take the intersection of two arrays, and this seemed appropriate to me: @a1=(a,b,c,d); @a2=(b,d,f); print( ( map{grep /^$_$/, @a2} @a1 ), "\n"); What I get is bdfbdfbdfbdf. It doesn't seem that $_ is being set to each element of @a1 and then grepped against @a2. Can anybody explain my blind spot here? Again, I just want a list that is the intersection of the two lists. Of course I can run a loop, but "map" seems a nice tight way to do the job. Vic From scott at illogics.org Mon May 5 11:13:10 2003 From: scott at illogics.org (Scott Walters) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: map + grep problem Message-ID: <20030505161310.GC20479@illogics.org> On 0, Victor Odhner wrote: > > Here's a really basic Perl construct that for some reason I've never > used. In this case I'm trying to take the intersection of two arrays, > and this seemed appropriate to me: > > @a1=(a,b,c,d); > @a2=(b,d,f); I assume that a, b, c, d etc are variables or quoted strings or you're really doing something like: @a1 = qw(a b c d); > print( ( map{grep /^$_$/, @a2} @a1 ), "\n"); map{} and grep{} each localize $_. You have to copy the data at one point as access to the previous $_ will be hidden. print(map({ my $x = $_; grep { $_ eq $x } @a2 } @a1), "\n"); ...would be closer to the mark. However, the Cookbook will probably tell you to use hashes - then you can do a hashed (very quick access to a given element) rather than looping through each and every element of an array: # (1, 2, 3, 4) -> ( 1=>1, 2=>1, 3=>1, 4=>1 ) - just make keys exist for each element %a2 = map { $_ => 1 } @a2; foreach my $i (@a1) { if(exists $a2{$i}) { print "a1 and a2 both have the element '$i'\n"; } } -scott > > What I get is bdfbdfbdfbdf. > > It doesn't seem that $_ is being set to each element > of @a1 and then grepped against @a2. > > Can anybody explain my blind spot here? > > Again, I just want a list that is the intersection > of the two lists. Of course I can run a loop, but > "map" seems a nice tight way to do the job. > > Vic > From kellewic at yahoo.com Mon May 5 11:46:14 2003 From: kellewic at yahoo.com (Shay Harding) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: map + grep problem In-Reply-To: <20030505161310.GC20479@illogics.org> Message-ID: <20030505164614.90441.qmail@web10804.mail.yahoo.com> > However, the Cookbook will probably tell you to use > hashes - then you can do a hashed > (very quick access to a given element) rather than > looping through each and every element > of an array: > > # (1, 2, 3, 4) -> ( 1=>1, 2=>1, 3=>1, 4=>1 ) - > just make keys exist for each element > %a2 = map { $_ => 1 } @a2; This could be written as: my %h_a2; @h_a2{@a2} = undef; which would be quicker than using map. The above really only assigns to the first key, then Perl assigns "undef" to the rest. This code still works for the above assignment as well. > foreach my $i (@a1) { > if(exists $a2{$i}) { > print "a1 and a2 both have the element > '$i'\n"; > } > } > > -scott __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com From vodhner at cox.net Mon May 5 22:46:22 2003 From: vodhner at cox.net (Victor Odhner) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: map + grep problem In-Reply-To: <20030505164614.90441.qmail@web10804.mail.yahoo.com> References: <20030505164614.90441.qmail@web10804.mail.yahoo.com> Message-ID: <3EB7300E.3040804@cox.net> Shay Harding wrote: > This could be written as: > my %h_a2; > @h_a2{@a2} = undef; OK, wow. It works nicely, but what on earth is @h_a2{@a2}??? I see you taking a hash, calling it a list, subscripting it like a hash, and using a list as the subscript. I have no problem with subscripting a hash with a list, that's old hat. But what is it called when you put "@" in front of it instead of "$"? I guess I should be asking for the latest and greatest in *Perl* books! I've been Perling continuously since 1994 but you guys are shaming me. Vic From kellewic at yahoo.com Mon May 5 23:18:19 2003 From: kellewic at yahoo.com (Shay Harding) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: map + grep problem In-Reply-To: <3EB7300E.3040804@cox.net> Message-ID: <20030506041819.28477.qmail@web10802.mail.yahoo.com> Hash slice. Perl flattens @a2 and the @h_a2 says to take those and make them keys. If you wanted to assign some other value to all the keys, you could do: @h_a2{@a2} = ("value")x@a2; Shay --- Victor Odhner wrote: > Shay Harding wrote: > > This could be written as: > > my %h_a2; > > @h_a2{@a2} = undef; > > OK, wow. It works nicely, but > what on earth is @h_a2{@a2}??? > > I see you taking a hash, calling it a > list, subscripting it like a hash, > and using a list as the subscript. > > I have no problem with subscripting a > hash with a list, that's old hat. > But what is it called when you put > "@" in front of it instead of "$"? > > I guess I should be asking for the > latest and greatest in *Perl* books! > I've been Perling continuously since > 1994 but you guys are shaming me. > > Vic > > > __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com From scott at illogics.org Tue May 6 11:30:32 2003 From: scott at illogics.org (Scott Walters) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: map + grep problem Message-ID: <20030506163032.GN20479@illogics.org> In the documentation, something like @foo{...} instead of $foo{...} or %foo{...} instead of %foo{...} ... is called a "slice".. either an "array slice" or "hash slice". It gives you a list context to assign to or from. This is used most commonly when asking for several elements of an array: my($time, $date, $name) = @record[3,6,7]; rather than: $time = $record[3]; $date = $record[6]; $name = $record[7]; Glad to see some discussion in here =) -scott On 0, Victor Odhner wrote: > > Shay Harding wrote: > > This could be written as: > > my %h_a2; > > @h_a2{@a2} = undef; > > OK, wow. It works nicely, but > what on earth is @h_a2{@a2}??? > > I see you taking a hash, calling it a > list, subscripting it like a hash, > and using a list as the subscript. > > I have no problem with subscripting a > hash with a list, that's old hat. > But what is it called when you put > "@" in front of it instead of "$"? > > I guess I should be asking for the > latest and greatest in *Perl* books! > I've been Perling continuously since > 1994 but you guys are shaming me. > > Vic > > > From scott at illogics.org Fri May 16 07:58:14 2003 From: scott at illogics.org (Scott Walters) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: Any linux programmers out there? (fwd) Message-ID: <20030516125812.GV20479@illogics.org> Bill sent this to me, but I think Perlers might enjoy writing an "I'm here" letter. My idea of fun =) ---------- Forwarded message ---------- Date: 16 May 2003 11:03:05 -0700 From: Craig White To: plug-discuss@lists.plug.phoenix.az.us Cc: Ray Grey Subject: Any linux programmers out there? I have a rather interesting situation with a client of mine. They are a non-profit mental health provider - the Executive Director is Ray Grey I have included him in the distribution of this email. Anyway, I think he agrees with me that the best path for a non-profit corporation to go is open source/free software and he does have a die-hard Windows guy as president of the board of directors. Apparently the issue comes down to his belief that there aren't any Linux programmers around. Imagine that! They are in central Phoenix. I told him that there were many Linux programmers around and if I put the word out on just one mail list (PLUG), that he would likely be inundated with people, capable and willing and most likely resumes. I can't guarantee that anyone will get a programming assignment...it may ultimately end up at an over priced Windows integrator. The project involves collection of data into an SQL database and sending electronic compilations of the data as billing data in HCFA type blocks...multi-user and the user interface and the middleware is not determined. If you are interested, please send him an email - feel free to copy me or don't copy me and that's fine. If you are a programmer but are currently involved in other projects please drop him a short note just to let him know that there are Linux programmers as this is a sticking point. If you have questions, please feel free to send them to me. The big issue here, if I failed to make the point is that we have a non-profit agency with a lot of Macintosh computers and no real investment in Microsoft Windows hardware or software. It's obvious to me that this is the right time to move to open source / free software and the major obstacle to this is that they have a perception that Linux programmers, integrators, system administrators etc. are not readily identifiable...stand up and be counted and you will make a difference in the perception of decision makers. Thanks, Craig ----- End forwarded message ----- From kellewic at yahoo.com Fri May 16 10:21:07 2003 From: kellewic at yahoo.com (Shay Harding) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: Any linux programmers out there? (fwd) In-Reply-To: <20030516125812.GV20479@illogics.org> Message-ID: <20030516152107.68674.qmail@web10801.mail.yahoo.com> There are other types of programmers besides Linux? --- Scott Walters wrote: > Bill sent this to me, but I think Perlers might > enjoy writing > an "I'm here" letter. My idea of fun =) > > ---------- Forwarded message ---------- > Date: 16 May 2003 11:03:05 -0700 > From: Craig White > To: plug-discuss@lists.plug.phoenix.az.us > Cc: Ray Grey > Subject: Any linux programmers out there? > > I have a rather interesting situation with a client > of mine. They are a > non-profit mental health provider - the Executive > Director is Ray Grey > I have included him in the > distribution of > this email. > > Anyway, I think he agrees with me that the best path > for a non-profit > corporation to go is open source/free software and > he does have a > die-hard Windows guy as president of the board of > directors. > > Apparently the issue comes down to his belief that > there aren't any > Linux programmers around. Imagine that! > > They are in central Phoenix. > > I told him that there were many Linux programmers > around and if I put > the word out on just one mail list (PLUG), that he > would likely be > inundated with people, capable and willing and most > likely resumes. I > can't guarantee that anyone will get a programming > assignment...it may > ultimately end up at an over priced Windows > integrator. > > The project involves collection of data into an SQL > database and sending > electronic compilations of the data as billing data > in HCFA type > blocks...multi-user and the user interface and the > middleware is not > determined. > > If you are interested, please send him an email - > feel free to copy me > or don't copy me and that's fine. > > If you are a programmer but are currently involved > in other projects > please drop him a short note just to let him know > that there are Linux > programmers as this is a sticking point. > > If you have questions, please feel free to send them > to me. > > The big issue here, if I failed to make the point is > that we have a > non-profit agency with a lot of Macintosh computers > and no real > investment in Microsoft Windows hardware or > software. It's obvious to me > that this is the right time to move to open source / > free software and > the major obstacle to this is that they have a > perception that Linux > programmers, integrators, system administrators etc. > are not readily > identifiable...stand up and be counted and you will > make a difference in > the perception of decision makers. > > Thanks, > > Craig > > > ----- End forwarded message ----- __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com From Peter.Loo at bannerhealth.com Fri May 16 10:41:56 2003 From: Peter.Loo at bannerhealth.com (Loo, Peter) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: Any linux programmers out there? (fwd) Message-ID: Hi All, This will be my first comment as I believe this subject is definitely worth the time to express my feelings. Yes, there are other programmers besides Linux, but the most hardcore and efficient programmers are those who invest their personal time and write great programs for all to share. These are the GREAT people to whom I take off my hat. "SALUTE!" We are also a non-profit organization. I am a great advocate for Open Source and Free Software. Sincerely, Peter Loo Banner Health Phoenix, AZ 85008 -----Original Message----- From: Shay Harding [mailto:kellewic@yahoo.com] Sent: Friday, May 16, 2003 8:21 AM To: phoenix-pm-list@happyfunball.pm.org Subject: Re: Phoenix.pm: Any linux programmers out there? (fwd) There are other types of programmers besides Linux? --- Scott Walters wrote: > Bill sent this to me, but I think Perlers might > enjoy writing > an "I'm here" letter. My idea of fun =) > > ---------- Forwarded message ---------- > Date: 16 May 2003 11:03:05 -0700 > From: Craig White > To: plug-discuss@lists.plug.phoenix.az.us > Cc: Ray Grey > Subject: Any linux programmers out there? > > I have a rather interesting situation with a client > of mine. They are a > non-profit mental health provider - the Executive > Director is Ray Grey > I have included him in the distribution of > this email. > > Anyway, I think he agrees with me that the best path > for a non-profit > corporation to go is open source/free software and > he does have a > die-hard Windows guy as president of the board of > directors. > > Apparently the issue comes down to his belief that > there aren't any > Linux programmers around. Imagine that! > > They are in central Phoenix. > > I told him that there were many Linux programmers > around and if I put > the word out on just one mail list (PLUG), that he > would likely be > inundated with people, capable and willing and most > likely resumes. I > can't guarantee that anyone will get a programming assignment...it may > ultimately end up at an over priced Windows > integrator. > > The project involves collection of data into an SQL > database and sending > electronic compilations of the data as billing data > in HCFA type > blocks...multi-user and the user interface and the > middleware is not > determined. > > If you are interested, please send him an email - > feel free to copy me > or don't copy me and that's fine. > > If you are a programmer but are currently involved > in other projects > please drop him a short note just to let him know > that there are Linux > programmers as this is a sticking point. > > If you have questions, please feel free to send them > to me. > > The big issue here, if I failed to make the point is > that we have a > non-profit agency with a lot of Macintosh computers > and no real > investment in Microsoft Windows hardware or > software. It's obvious to me > that this is the right time to move to open source / > free software and > the major obstacle to this is that they have a > perception that Linux > programmers, integrators, system administrators etc. > are not readily > identifiable...stand up and be counted and you will > make a difference in > the perception of decision makers. > > Thanks, > > Craig > > > ----- End forwarded message ----- __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com From intertwingled at qwest.net Fri May 16 11:25:11 2003 From: intertwingled at qwest.net (intertwingled) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: Any linux programmers out there? (fwd) References: <20030516125812.GV20479@illogics.org> Message-ID: <3EC510E6.9D4C4468@qwest.net> sorry, I only do freebsd. Sincerely, Scott Walters wrote: > Bill sent this to me, but I think Perlers might enjoy writing > an "I'm here" letter. My idea of fun =) > > ---------- Forwarded message ---------- > Date: 16 May 2003 11:03:05 -0700 > From: Craig White > To: plug-discuss@lists.plug.phoenix.az.us > Cc: Ray Grey > Subject: Any linux programmers out there? > > I have a rather interesting situation with a client of mine. They are a > non-profit mental health provider - the Executive Director is Ray Grey > I have included him in the distribution of > this email. > > Anyway, I think he agrees with me that the best path for a non-profit > corporation to go is open source/free software and he does have a > die-hard Windows guy as president of the board of directors. > > Apparently the issue comes down to his belief that there aren't any > Linux programmers around. Imagine that! > > They are in central Phoenix. > > I told him that there were many Linux programmers around and if I put > the word out on just one mail list (PLUG), that he would likely be > inundated with people, capable and willing and most likely resumes. I > can't guarantee that anyone will get a programming assignment...it may > ultimately end up at an over priced Windows integrator. > > The project involves collection of data into an SQL database and sending > electronic compilations of the data as billing data in HCFA type > blocks...multi-user and the user interface and the middleware is not > determined. > > If you are interested, please send him an email - feel free to copy me > or don't copy me and that's fine. > > If you are a programmer but are currently involved in other projects > please drop him a short note just to let him know that there are Linux > programmers as this is a sticking point. > > If you have questions, please feel free to send them to me. > > The big issue here, if I failed to make the point is that we have a > non-profit agency with a lot of Macintosh computers and no real > investment in Microsoft Windows hardware or software. It's obvious to me > that this is the right time to move to open source / free software and > the major obstacle to this is that they have a perception that Linux > programmers, integrators, system administrators etc. are not readily > identifiable...stand up and be counted and you will make a difference in > the perception of decision makers. > > Thanks, > > Craig > > ----- End forwarded message ----- -- Even the safest course is fraught with peril. From jasonriedel at jasonriedel.com Fri May 16 23:53:53 2003 From: jasonriedel at jasonriedel.com (Jason Riedel) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: I need Perl/Tk Wisdom Message-ID: <009201c31c30$53bd7900$66021eac@PHXRIEDELJ> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: fullsource.pl Type: application/octet-stream Size: 10778 bytes Desc: not available Url : http://mail.pm.org/archives/phoenix-pm/attachments/20030516/95dfa917/fullsource.obj From jasonriedel at jasonriedel.com Sat May 17 05:16:41 2003 From: jasonriedel at jasonriedel.com (Jason Riedel) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: Re: I need Perl/Tk Wisdom Message-ID: <001d01c31c5d$6c598c10$66021eac@PHXRIEDELJ> Sorry, No need to answer my dumb question. The answer was $w->update; after each insert() Thanks, Jason Riedel ----- Original Message ----- From: Jason Riedel To: phoenix-pm-list@happyfunball.pm.org Sent: Friday, May 16, 2003 9:53 PM Subject: I need Perl/Tk Wisdom Fellow Perl Mongers, I am working on an application that has 2 text boxes. One gathers data: $config_text The other shows the results: $results_text When a button is pressed the data from that test box is retrieved and stored in an array. After some checks all the data is submitted to the proper sub routine and in each one Net::Telnet::Cisco is called and executes it's foreach loop roughly 20-100 times. Inside the foreach loop I call $results_text->insert('end', "update");. The problem is I won't see the text until the foreach loop has completed all of its runs. I tried using the after() fix listed in the following post, but had no luck. http://www.perlmonks.org/index.pl?node_id=65969 However,I could have implemented it wrong? Any help or suggestions is appreciated, full source is attached. Thanks, Jason Riedel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/phoenix-pm/attachments/20030517/ea96dd8b/attachment.htm From johngnub at cox.net Mon May 19 00:20:23 2003 From: johngnub at cox.net (johnb) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: I need Perl/Tk Wisdom In-Reply-To: <009201c31c30$53bd7900$66021eac@PHXRIEDELJ> Message-ID: <97C17E5C-89B9-11D7-BCE8-000A9585B970@cox.net> Are you useing prompt ? The Net::Telnet module defines the output of a command as the distance from one prompt to the next, if a prompt is not found during the loop, then,,,, Things I have use include: - print, waitfor method see perldoc Net::Telnet - Debug mode, and see if this is the core if the issue, see perldoc Net::Telnet Have fun! On Friday, May 16, 2003, at 09:53 PM, Jason Riedel wrote: > Fellow Perl Mongers, > ? > I am working on an application that has 2 text boxes. > ? > One gathers data: $config_text > The other shows the results: $results_text > ? > When a button is pressed the data from that test box is retrieved and > stored in an array. After some checks all the data is submitted to the > proper sub routine and in each one?Net::Telnet::Cisco is called and > executes it's foreach loop roughly 20-100 times. Inside the foreach > loop I call $results_text->insert('end', "update");. The problem is I > won't see the text until the foreach loop has completed all of its > runs. > > I tried using the after() fix?listed in the following post, but had no > luck. > ? > http://www.perlmonks.org/index.pl?node_id=65969 > ? > However,I could have implemented it wrong? > ? > > Any help or suggestions is appreciated, full source is attached. > ? > Thanks, > Jason Riedel > ? > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2013 bytes Desc: not available Url : http://mail.pm.org/archives/phoenix-pm/attachments/20030518/397c74fa/attachment.bin From scott at illogics.org Wed May 28 15:11:40 2003 From: scott at illogics.org (Scott Walters) Date: Thu Aug 5 00:17:00 2004 Subject: Phoenix.pm: perl design patterns project Message-ID: <20030528201140.GQ20479@illogics.org> Hi folks, Sorry to poll on this subject, but *hint* *hint* now might be a really good time for one or two people - expert or intermediate with Perl - to help me with perldesignpatterns.com. I need high-level input - essentially a co-author *cough*. Thanks, -scott