From westerman at purdue.edu Tue May 11 12:41:43 2010 From: westerman at purdue.edu (Rick Westerman) Date: Tue, 11 May 2010 15:41:43 -0400 (EDT) Subject: [Purdue-pm] Meeting in a week. In-Reply-To: <2347471.1069.1273606755984.JavaMail.root@mailhub011.itcs.purdue.edu> Message-ID: <32183232.1071.1273606903409.JavaMail.root@mailhub011.itcs.purdue.edu> Meeting is in a week on Tuesday May 18th in WSLR 116 over lunch. No talks are currently scheduled. If you do want to give a talk then send mail to Dave (jacoby at purdue.edu) and he can put it on the meeting page. We should have a challenge problem from Mike that we can work on during the next week. The solutions to these challenge problems are always interesting to look at. -- Rick Westerman westerman at purdue.edu Bioinformatics specialist at the Genomics Facility. Phone: (765) 494-0505 FAX: (765) 496-7255 Department of Horticulture and Landscape Architecture 625 Agriculture Mall Drive West Lafayette, IN 47907-2010 Physically located in room S049, WSLR building From gribskov at purdue.edu Thu May 13 11:33:07 2010 From: gribskov at purdue.edu (Michael Gribskov) Date: Thu, 13 May 2010 14:33:07 -0400 Subject: [Purdue-pm] challenge problem In-Reply-To: <4B02DE0E.2070400@purdue.edu> References: <4B02D45C.9000609@purdue.edu> <4B02DE0E.2070400@purdue.edu> Message-ID: <4BEC45E3.4050306@purdue.edu> here is my slide show on the challenge problem > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Dave Jacoby wrote: > >> As in, it's set to start in 10 minutes. >> >> Is anyone coming? Or are we struck by the rainy fall day blahs? >> >> > I was coming but I'm taking the afternoon off and need to get some stuff > done before I leave, so no meeting for me. > > joe > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (GNU/Linux) > Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org > > iD8DBQFLAt4Nb0mzA2gRTpkRAtpRAJ9hM29COI0e9oLopTdxVdPE2OIgCwCeOFGW > 2RBRAuAfT/HXyqrFSACZcQw= > =lrnA > -----END PGP SIGNATURE----- > _______________________________________________ > Purdue-pm mailing list > Purdue-pm at pm.org > http://mail.pm.org/mailman/listinfo/purdue-pm > -- Michael Gribskov Hockmeyer Hall of Structural Biology Purdue University 240 S. Martin Jischke Drive West Lafayette, IN 47907 gribskov at purdue.edu vox: 765.494.6933 fax: 765.496-1189 calendar: http://www.google.com/calendar/embed?src=mgribskov%40gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: perl_rmp.pptx Type: application/vnd.openxmlformats-officedocument.presentationml.presentation Size: 133974 bytes Desc: not available URL: From jacoby.david at gmail.com Tue May 18 08:50:02 2010 From: jacoby.david at gmail.com (Dave Jacoby) Date: Tue, 18 May 2010 11:50:02 -0400 Subject: [Purdue-pm] Meeting Today Message-ID: Now, actually. Same Camel Time, Same Camel Room. -- David Jacoby jacoby.david at gmail.com From gizmo at purdue.edu Tue May 18 08:53:21 2010 From: gizmo at purdue.edu (Joe Kline) Date: Tue, 18 May 2010 11:53:21 -0400 Subject: [Purdue-pm] Meeting Today In-Reply-To: References: Message-ID: <4BF2B7F1.4080508@purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dave Jacoby wrote: > Now, actually. Same Camel Time, Same Camel Room. > Won't be able to make it this month. I need to leave early and have loads to do before then. joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org iD8DBQFL8rfvb0mzA2gRTpkRAqp/AJ0V/VUiAYBRl/iqleZiU5DHrSg7/QCgjnik kaabuvY99j7HuDThuMBjW4M= =OdJj -----END PGP SIGNATURE----- From derrick at csociety.org Tue May 18 09:02:46 2010 From: derrick at csociety.org (derrick) Date: Tue, 18 May 2010 12:02:46 -0400 Subject: [Purdue-pm] Meeting Today In-Reply-To: References: Message-ID: <4BF2BA26.1090806@csociety.org> I'm not able to make it, i think i can present next meeting. I have a presentation on using SWIG to build Fortran language bindings for C or maybe a presentation on building workflows with Taverna Workbench. dsk On 05/18/2010 11:50 AM, Dave Jacoby wrote: > Now, actually. Same Camel Time, Same Camel Room. > From westerman at purdue.edu Tue May 18 10:48:07 2010 From: westerman at purdue.edu (Rick Westerman) Date: Tue, 18 May 2010 13:48:07 -0400 (EDT) Subject: [Purdue-pm] Meeting Today In-Reply-To: <4630531.90.1274204492554.JavaMail.root@mailhub011.itcs.purdue.edu> Message-ID: <21949531.92.1274204887889.JavaMail.root@mailhub011.itcs.purdue.edu> ----- Original Message ----- > I'm not able to make it, i think i can present next meeting. > I have a presentation on using SWIG to build Fortran > language bindings for C or maybe a presentation on building > workflows with Taverna Workbench. > Taverna would nice. I have tried it before but never got into the swing of it. As for today's meeting we mostly chatted. Then we had an impromptu session about what I have been doing with HTML::Template and App::Config lately. The main thrust of these projects is to provide customer-oriented web pages which can be modified on a per-page or global basis by our laboratory folk. This has given me an idea about a challenge problem. I talked to Dave about this and it might fly. Given a web API for data to be returned in JSON and XML and perhaps some other format, then write a program to create a customer-oriented web page. Preferably the page could be modified by non-programmers. Said program would be best written in Perl but could be written in Javascript or maybe some other tool (Tcl/Tk?). And then there is the question of which, if any, libraries to use. Obviously something that Dave and I do a lot of so we have a leg up. But creating dynamic web pages is actually work that we all do so we should all be capable of doing the project. It would be nice to see what approach everyone takes. Also it could give people the opportunity to stretch their legs. What to try a new approach or a new library? Then try it on this challenge problem. Any comments about the above idea? If it is a 'go' then I will send out the APIs in a couple of weeks. -- Rick Westerman westerman at purdue.edu Bioinformatics specialist at the Genomics Facility. Phone: (765) 494-0505 FAX: (765) 496-7255 Department of Horticulture and Landscape Architecture 625 Agriculture Mall Drive West Lafayette, IN 47907-2010 Physically located in room S049, WSLR building From bradley.d.andersen at gmail.com Tue May 18 10:50:17 2010 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Tue, 18 May 2010 13:50:17 -0400 Subject: [Purdue-pm] Meeting Today In-Reply-To: <21949531.92.1274204887889.JavaMail.root@mailhub011.itcs.purdue.edu> References: <4630531.90.1274204492554.JavaMail.root@mailhub011.itcs.purdue.edu> <21949531.92.1274204887889.JavaMail.root@mailhub011.itcs.purdue.edu> Message-ID: Hi Rick, I think this is a good idea. \bda On Tue, May 18, 2010 at 1:48 PM, Rick Westerman wrote: > > > ----- Original Message ----- >> I'm not able to make it, i think i can present next meeting. >> I have a presentation on using SWIG to build Fortran >> language bindings for C or maybe a presentation on building >> workflows with Taverna Workbench. >> > > ? Taverna would nice. ?I have tried it before but never got into the swing of it. > > > > ? As for today's meeting we mostly chatted. ?Then we had an impromptu session about what I have been doing with HTML::Template and App::Config lately. ?The main thrust of these projects is to provide customer-oriented web pages which can be modified on a per-page or global basis by our laboratory folk. ? This has given me an idea about a challenge problem. ? I talked to Dave about this and it might fly. > > ?Given a web API for data to be returned in JSON and XML and perhaps some other format, then write a program to create a customer-oriented web page. ?Preferably the page could be modified by non-programmers. ?Said program would be best written in Perl but could be written in Javascript or maybe some other tool (Tcl/Tk?). ?And then there is the question of which, if any, libraries to use. > > ? Obviously something that Dave and I do a lot of so we have a leg up. ?But creating dynamic web pages is actually work that we all do so we should all be capable of doing the project. ?It would be nice to see what approach everyone takes. ?Also it could give people the opportunity to stretch their legs. ?What to try a new approach or a new library? ?Then try it on this challenge problem. > > ? Any comments about the above idea? > > ? If it is a 'go' then I will send out the APIs in a couple of weeks. > > > -- > Rick Westerman > westerman at purdue.edu > > Bioinformatics specialist at the Genomics Facility. > Phone: (765) 494-0505 ? ? ? ? ? FAX: (765) 496-7255 > Department of Horticulture and Landscape Architecture > 625 Agriculture Mall Drive > West Lafayette, IN 47907-2010 > Physically located in room S049, WSLR building > > _______________________________________________ > Purdue-pm mailing list > Purdue-pm at pm.org > http://mail.pm.org/mailman/listinfo/purdue-pm > From mark at ecn.purdue.edu Tue May 18 12:24:33 2010 From: mark at ecn.purdue.edu (Mark Senn) Date: Tue, 18 May 2010 15:24:33 -0400 Subject: [Purdue-pm] Meeting Today (really dashes) In-Reply-To: <21949531.92.1274204887889.JavaMail.root@mailhub011.itcs.purdue.edu> References: <21949531.92.1274204887889.JavaMail.root@mailhub011.itcs.purdue.edu> Message-ID: <1457.1274210673@pier.ecn.purdue.edu> Rick, On a web page you showed at the meeting earlier today I think it said something like Copyright 1999-2010 Purdue University It may have used a hypen instead of an en dash. There are four basic types of dashes, all of them should consist of one continuous horizontal line with no spaces before or after it. NAME LENGTH REPRESENTED BY EXAMPLE IN THE EXAMPLES hyphen short - dashes sometimes cause con- fusion en dash intermediate -- Copyright 1999--2010 (a date range) the post--World War II years figure dash width of digit --- 1---800---FLOWERS em dash long ---- It was a revival of the most potent image in modern democracy----the revolutionary idea TO GET A TYPE IN HTML TYPE IN TEX OR LATEX - - - figure dash (don't know) (it's complicated) en dash – -- em dash — --- If you are using a font that doesn't have a figure dash, use a hyphen. REFERENCES Chicago Manual of Style, 15th edition, 6.80&ndash96. http://en.wikipedia.org/wiki/Figure_dash#Figure_dash -mark From westerman at purdue.edu Tue May 18 13:02:38 2010 From: westerman at purdue.edu (Rick Westerman) Date: Tue, 18 May 2010 16:02:38 -0400 (EDT) Subject: [Purdue-pm] Meeting Today (really dashes) In-Reply-To: <26180301.122.1274212757753.JavaMail.root@mailhub011.itcs.purdue.edu> Message-ID: <20841040.124.1274212958129.JavaMail.root@mailhub011.itcs.purdue.edu> ----- Original Message ----- > Rick, > > On a web page you showed at the meeting earlier today I think > it said something like > Copyright 1999-2010 Purdue University > It may have used a hyphen instead of an en dash. It did use a simple dash. Assuming that what you mentioned is valid (and I see no reason why it should not be) I have now changed the web pages to use a double-dash (what your example calls an en dash) on the copyright statement (which is located at the bottom of each page.) I bring this up to the group because it is germane to a point I was trying to make today: where should text, especially simple text, on a dynamic web page be located? (1) In a HTML file that can be used by a program (e.g., via HTML::Template or HTML::Mason)? (2) In a editable configuration file (e.g., read in by App::Config)? (3) Embedded in the program be it Perl or JavaScript? All three methods will produce the same web page. However the first two can be manipulated by a non-programmer -- i.e., a lab tech or a pointy-haired boss -- while the latter will require more expertise. In this specific case the copyright text is embedded not only in a program but deeper inside a programmatic library. So in order to change the single-dash to a double-dash required (a) editing the library file, (b) running unit tests, (c) installing the library. Nothing too difficult. Unless you know nothing about Perl, Perl testing, Perl libraries nor installs. I really should have the copyright text in a separate non-program file that the lab techs could edit. Actually I probably should have everything in a CMS (content management system) but that would require an even bigger change. Or ... I could just keep the text inside the program. Job security! -- Rick Westerman westerman at purdue.edu Bioinformatics specialist at the Genomics Facility. Phone: (765) 494-0505 FAX: (765) 496-7255 Department of Horticulture and Landscape Architecture 625 Agriculture Mall Drive West Lafayette, IN 47907-2010 Physically located in room S049, WSLR building From bradley.d.andersen at gmail.com Tue May 18 13:05:19 2010 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Tue, 18 May 2010 16:05:19 -0400 Subject: [Purdue-pm] Meeting Today (really dashes) In-Reply-To: <20841040.124.1274212958129.JavaMail.root@mailhub011.itcs.purdue.edu> References: <26180301.122.1274212757753.JavaMail.root@mailhub011.itcs.purdue.edu> <20841040.124.1274212958129.JavaMail.root@mailhub011.itcs.purdue.edu> Message-ID: Job security is something we have precious little of in this country ... keep whatever you have!! :) On Tue, May 18, 2010 at 4:02 PM, Rick Westerman wrote: > > > ----- Original Message ----- >> Rick, >> >> On a web page you showed at the meeting earlier today I think >> it said something like >> Copyright 1999-2010 Purdue University >> It may have used a hyphen instead of an en dash. > > ? It did use a simple dash. ?Assuming that what you mentioned is valid (and I see no reason why it should not be) I have now changed the web pages to use a double-dash (what your example calls an en dash) on the copyright statement (which is located at the bottom of each page.) > > > ? I bring this up to the group because it is germane to a point I was trying to make today: ?where should text, especially simple text, on a dynamic web page be located? > > ? (1) In a HTML file that can be used by a program (e.g., via HTML::Template or HTML::Mason)? > > ? (2) In a editable configuration file (e.g., read in by App::Config)? > > ? (3) Embedded in the program be it Perl or JavaScript? > > > ? All three methods will produce the same web page. ?However the first two can be manipulated by a non-programmer -- i.e., a lab tech or a pointy-haired boss -- while the latter will require more expertise. > > ? ?In this specific case the copyright text is embedded not only in a program but deeper inside a programmatic library. ?So in order to change the single-dash to a double-dash required (a) editing the library file, (b) running unit tests, (c) installing the library. ? Nothing too difficult. ?Unless you know nothing about Perl, Perl testing, Perl libraries nor installs. > > ? I really should have the copyright text in a separate non-program file that the lab techs could edit. ? Actually I probably should have everything in a CMS (content management system) but that would require an even bigger change. ? Or ... I could just keep the text inside the program. ?Job security! > > > > -- > Rick Westerman > westerman at purdue.edu > > Bioinformatics specialist at the Genomics Facility. > Phone: (765) 494-0505 ? ? ? ? ? FAX: (765) 496-7255 > Department of Horticulture and Landscape Architecture > 625 Agriculture Mall Drive > West Lafayette, IN 47907-2010 > Physically located in room S049, WSLR building > > _______________________________________________ > Purdue-pm mailing list > Purdue-pm at pm.org > http://mail.pm.org/mailman/listinfo/purdue-pm > From mark at ecn.purdue.edu Wed May 19 06:23:29 2010 From: mark at ecn.purdue.edu (Mark Senn) Date: Wed, 19 May 2010 09:23:29 -0400 Subject: [Purdue-pm] Meeting Today (really dashes) In-Reply-To: <20841040.124.1274212958129.JavaMail.root@mailhub011.itcs.purdue.edu> References: <20841040.124.1274212958129.JavaMail.root@mailhub011.itcs.purdue.edu> Message-ID: <9081.1274275409@pier.ecn.purdue.edu> Mark Senn wrote >NAME LENGTH REPRESENTED BY EXAMPLE > IN THE EXAMPLES >hyphen short - dashes sometimes cause con- > fusion >en dash intermediate -- Copyright 1999--2010 > (a date range) > the post--World War II years >figure dash width of digit --- 1---800---FLOWERS >em dash long ---- It was a revival of the most > potent image in modern > democracy----the revolutionary > idea > >TO GET A TYPE IN HTML TYPE IN TEX OR LATEX >- - - >figure dash (don't know) (it's complicated) >en dash – -- >em dash — --- > >If you are using a font that doesn't have a figure dash, use a hyphen. > >REFERENCES >Chicago Manual of Style, 15th edition, 6.80&ndash96. >http://en.wikipedia.org/wiki/Figure_dash#Figure_dash Rick Westerman wrote >It did use a simple dash. Assuming that what you mentioned is valid >(and I see no reason why it should not be) I have now changed the web >pages to use a double-dash (what your example calls an en dash) on the >copyright statement (which is located at the bottom of each page.) Hi Rick, Just want to make sure you understood what I wrote (in a convoluted way) above. In your HTML document you should have, for example, Copyright 1999–2010 -mark From westerman at purdue.edu Wed May 19 06:53:57 2010 From: westerman at purdue.edu (Rick Westerman) Date: Wed, 19 May 2010 09:53:57 -0400 (EDT) Subject: [Purdue-pm] Meeting Today (really dashes) In-Reply-To: <9081.1274275409@pier.ecn.purdue.edu> Message-ID: <28824792.188.1274277237334.JavaMail.root@mailhub011.itcs.purdue.edu> ----- Original Message ----- > Hi Rick, Just want to make sure you understood what I wrote (in a > convoluted way) above. In your HTML document you should have, for > example, Copyright 1999–2010 > -mark Ah. Got it. Mutter ... back to edit, unit test, install, web page test. Looks good. Thanks for the advice. -- Rick Westerman westerman at purdue.edu Bioinformatics specialist at the Genomics Facility. Phone: (765) 494-0505 FAX: (765) 496-7255 Department of Horticulture and Landscape Architecture 625 Agriculture Mall Drive West Lafayette, IN 47907-2010 Physically located in room S049, WSLR building From gizmo at purdue.edu Wed May 19 12:29:40 2010 From: gizmo at purdue.edu (Joe Kline) Date: Wed, 19 May 2010 15:29:40 -0400 Subject: [Purdue-pm] fast table lookup of randomly associated items Message-ID: <4BF43C24.3090901@purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Say I have a table like the following: number Item 1-5 A 6 B 7-12 C 13-20 D 21-25 E 26-30 F Say I then have a random number generator that spits out a number from 1-30. What is the fastest way to look up the item associated with that random number? For more fun, say I want to store that table in a text file what is a good way to represent that? I kicked around some ideas and the easiest solution I could come up with is the following. I settled on JSON since it's a bit more portable than most and I like its syntax better than YAML. =================================== #!/usr/local/bin/perl use 5.010; use strict; use warnings; use File::Slurp; use JSON; my $table = q(table.json); my $json_text = read_file( $table ) ; my $data = from_json($json_text); my $number = int(rand(30)+1); my $item = q(nothing); foreach my $row ( @$data ) { if ( $number > $row->[0] ){ } else { $item = $row->[1]; last; } } say qq($number associated with $item); exit(0); =================================== table.json: [ [5,"A"], [6,"B"], [12,"C"], [20,"D"], [25,"E"], [30,"F"] ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org iD8DBQFL9Dwkb0mzA2gRTpkRArivAJ4u0zSffAZp02IUrzplg1G12O51jwCZAZQs TrHEob9EMRqZFNfZORXhmtg= =zmeb -----END PGP SIGNATURE----- From westerman at purdue.edu Wed May 19 12:41:42 2010 From: westerman at purdue.edu (Rick Westerman) Date: Wed, 19 May 2010 15:41:42 -0400 (EDT) Subject: [Purdue-pm] fast table lookup of randomly associated items In-Reply-To: <4BF43C24.3090901@purdue.edu> Message-ID: <31820261.270.1274298102125.JavaMail.root@mailhub011.itcs.purdue.edu> ----- Original Message ----- > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Say I have a table like the following: > > number Item > 1-5 A > 6 B > 7-12 C > 13-20 D > 21-25 E > 26-30 F > > Say I then have a random number generator that spits out a number from > 1-30. > > What is the fastest way to look up the item associated with that > random number? Fastest? I'd say a simple array lookup. Could be quite memory intensive but, at least in 'C' and I presume Perl, array lookups are simple pointer additions. Can't be any faster than that as long as you do not exceed physical memory boundries. > > For more fun, say I want to store that table in a text file what is a > good way to represent that? I sort of liked your human readable format above. JSON is fine but not as clear to the lay person. All-in-all could be a good challenge problem. -- Rick Westerman westerman at purdue.edu Bioinformatics specialist at the Genomics Facility. Phone: (765) 494-0505 FAX: (765) 496-7255 Department of Horticulture and Landscape Architecture 625 Agriculture Mall Drive West Lafayette, IN 47907-2010 Physically located in room S049, WSLR building From gizmo at purdue.edu Thu May 20 08:30:25 2010 From: gizmo at purdue.edu (Joe Kline) Date: Thu, 20 May 2010 11:30:25 -0400 Subject: [Purdue-pm] perl survey Message-ID: <4BF55591.8000604@purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 http://blogs.perl.org/users/ovid/2010/05/2010-perl-survey.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org iD8DBQFL9VWQb0mzA2gRTpkRAj1TAJ9us3NO0ZGm4CUqcP+JK04ewmYGogCff2S4 fy23THWZNNbWjLKeOZBgslg= =8hgy -----END PGP SIGNATURE----- From mark at purdue.edu Fri May 21 04:50:28 2010 From: mark at purdue.edu (Mark Senn) Date: Fri, 21 May 2010 07:50:28 -0400 Subject: [Purdue-pm] Announce: Rakudo Perl 6 development release #29 ("Erlangen") Message-ID: <7891.1274442628@pier.ecn.purdue.edu> Every month a new version of Perl 6 gets released. These are experimental, incomplete, and not meant for production. In the past I haven't been able to run the not very sophisticated test programs I've tried. Thought you might be interested in this. The original announncement is below. -mark >Date: Thu, 20 May 2010 12:56:56 -0400 >Subject: Announce: Rakudo Perl 6 development release #29 ("Erlangen") >From: Solomon Foster >To: Perl6 Language List , > perl6-compiler , perl6-announce at perl.org, > perl6-users at perl.org >X-ECN-MailServer-VirusScanned: by amavisd-new >X-ECN-MailServer-Origination: x6.develooper.com [207.171.7.86] >X-ECN-MailServer-SpamScanAdvice: DoScan > >On behalf of the Rakudo development team, I'm pleased to announce the >May 2010 development release of Rakudo Perl #29 "Erlangen". >Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine >(see http://www.parrot.org). The tarball for the May 2010 release >is available from http://github.com/rakudo/rakudo/downloads . > >Rakudo Perl follows a monthly release cycle, with each release named >after a Perl Mongers group. The May 2010 release is code named >"Erlangen" in recognition of Erlangen.pm and the Perl 6 talk that Moritz >Lenz, one of our core developers, gave this month. > >Some of the specific changes and improvements occurring with this >release include: > >* Lexical classes and roles were implemented. Additionally, anonymous classes > -- which were never quite right in alpha -- are now implemented more > correctly, and anonymous roles are also supported. > >* Basic support for named enumerations of the form 'enum Weekday Tuesday ...>' has been restored. > >* First cut of use Foo:from and eval('foo', :lang); needs > Blizkost[1] to be installed to work. > >* Numeric / Real roles much closer to the spec now. > >* As always, many additional small features and bug fixes make working with > Rakudo more pleasant. > >* Rakudo now passes 32,347 spectests. We estimate that there are about > 39,500 tests in the test suite, so Rakudo passes about 82% of all tests. > >For a more detailed list of changes see "docs/ChangeLog". > >The development team thanks all of our contributors and sponsors for >making Rakudo Perl possible, as well as those people who worked on parrot, the >Perl 6 test suite and the specification. > >The following people contributed to this release: >Solomon Foster, Moritz Lenz, Jonathan Worthington, Martin Berends, >chromatic, Carl Masak, snarkyboojum, Stefan O'Rear, Reini Urban, >Jonathan Scott Duff, takadonet, Christoph Otto, isBEKaml, >ash_, bubaflub, Jimmy Zhuo, Peter Lobsinger and Patrick Abi Salloum > >If you would like to contribute, >see http://rakudo.org/how-to-help , ask on the perl6-compiler at perl.org >mailing list, or ask on IRC #perl6 on freenode. > >The next release of Rakudo (#30) is scheduled for June 17, 2010. >A list of the other planned release dates and code names for 2010 is >available in the "docs/release_guide.pod" file. In general, Rakudo >development releases are scheduled to occur two days after each >Parrot monthly release. Parrot releases the third Tuesday of each month. > >Have fun! > >[1] http://github.com/jnthn/blizkost > >-- >Solomon Foster: colomon at gmail.com >HarmonyWare, Inc: http://www.harmonyware.com From gizmo at purdue.edu Fri May 21 08:22:49 2010 From: gizmo at purdue.edu (Joe Kline) Date: Fri, 21 May 2010 11:22:49 -0400 Subject: [Purdue-pm] fast table lookup of randomly associated items In-Reply-To: <31820261.270.1274298102125.JavaMail.root@mailhub011.itcs.purdue.edu> References: <31820261.270.1274298102125.JavaMail.root@mailhub011.itcs.purdue.edu> Message-ID: <4BF6A549.9010108@purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rick Westerman wrote: > > > Fastest? I'd say a simple array lookup. Could be quite memory intensive but, at least in 'C' and I presume Perl, array lookups are simple pointer additions. Can't be any faster than that as long as you do not exceed physical memory boundries. > Maybe fastest might be misnomer. I was hoping I could do something like: my $random my ($key) = grep { $_ ~~ $random } keys %table; I stumbled across something like this at stackoverflow but I can't find it now. I was thinking that I could make the hash keys the range and then use smart matching to figure out which key the random number is in the range of. Using ranges for hash keys does weird things however. Let alone that they don't get treated as a range in the smart match. Well, to be honest I couldn't really get the ranges as keys thing working so I don't know if it would really treat the key as a range. Maybe clever is what I'm looking for. :-) >> For more fun, say I want to store that table in a text file what is a >> good way to represent that? > > I sort of liked your human readable format above. JSON is fine but not as clear to the lay person. I was using YAML for awhile but about 6 months or so ago I switched to JSON. It's easier for me to understand than YAML (which has some white space being important stuff that annoys me) is easily portable between langues (especially javascript since it is really just javascript). > All-in-all could be a good challenge problem. Mark thought so when I ask him. Your web problem sounds interesting but I think I would need more of a spec to understand the problem. joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org iD8DBQFL9qVJb0mzA2gRTpkRAtcQAJ9AkVP5cmY5uNj+THUhsGEAIHBt6wCbBKAF wCqcBhLd5MnjFYVDVRMln4g= =fBnA -----END PGP SIGNATURE----- From westerman at purdue.edu Fri May 21 10:38:12 2010 From: westerman at purdue.edu (Rick Westerman) Date: Fri, 21 May 2010 13:38:12 -0400 (EDT) Subject: [Purdue-pm] fast table lookup of randomly associated items In-Reply-To: <4BF6A549.9010108@purdue.edu> Message-ID: <15842080.546.1274463492312.JavaMail.root@mailhub011.itcs.purdue.edu> > > Your web problem sounds interesting but I think I would need more of a > spec to understand the problem. > Certainly. If we do not do your problem for next month then I will write up the spec and send it out a week before the meeting. -- Rick Westerman westerman at purdue.edu Bioinformatics specialist at the Genomics Facility. Phone: (765) 494-0505 FAX: (765) 496-7255 Department of Horticulture and Landscape Architecture 625 Agriculture Mall Drive West Lafayette, IN 47907-2010 Physically located in room S049, WSLR building From mark at ecn.purdue.edu Fri May 21 10:52:17 2010 From: mark at ecn.purdue.edu (Mark Senn) Date: Fri, 21 May 2010 13:52:17 -0400 Subject: [Purdue-pm] any O'Reilly ebook $9.99 on 5/21/10 only Message-ID: <27986.1274464337@pier.ecn.purdue.edu> Purdue people may be able to borrow paper copies of these books from the Purdue libraries or use electronic copies of these books for free via O'Reilly's Safari system. O'Reilly electronic books are for sale, today (Friday, 5/21/10) only for $9.99. -------------- next part -------------- An embedded message was scrubbed... From: Marsee Henon Subject: UG News: *Free to Choose* Ebook Deal of the Day. Any O'Reilly ebook. Only $9.99. Date: Fri, 21 May 2010 10:11:41 -0700 Size: 11232 URL: -------------- next part -------------- -mark From mark at ecn.purdue.edu Sat May 22 22:19:20 2010 From: mark at ecn.purdue.edu (Mark Senn) Date: Sun, 23 May 2010 01:19:20 -0400 Subject: [Purdue-pm] fast table lookup of randomly associated items In-Reply-To: <4BF43C24.3090901@purdue.edu> References: <4BF43C24.3090901@purdue.edu> Message-ID: <11073.1274591960@pier.ecn.purdue.edu> I like this solution because it best echos the problem statement. The __DATA__ section can be moved to a separate file if wanted. -mark #!/usr/bin/perl use Modern::Perl; my @table; while () { chomp; my ($range, $letter) = split /\s+/; ($range =~ /-/) or $range .= "-$range"; my ($min, $max) = split /-/, $range; @table[$min..$max] = ($letter) x ($max-$min+1); } my $number = int 1 + rand $#table; say "number $number is associated with $table[$number]"; __DATA__ 1-5 A 6 B 7-12 C 13-20 D 21-25 E 26-30 F > Say I have a table like the following: > > number Item > 1-5 A > 6 B > 7-12 C > 13-20 D > 21-25 E > 26-30 F > > Say I then have a random number generator that spits out a number > from 1-30. > > What is the fastest way to look up the item associated with that random > number? > > For more fun, say I want to store that table in a text file what is a > good way to represent that? > > I kicked around some ideas and the easiest solution I could come up with > is the following. I settled on JSON since it's a bit more portable than > most and I like its syntax better than YAML. > =================================== > > #!/usr/local/bin/perl > > use 5.010; > > use strict; > use warnings; > > use File::Slurp; > use JSON; > > my $table = q(table.json); > my $json_text = read_file( $table ) ; > my $data = from_json($json_text); > > my $number = int(rand(30)+1); > my $item = q(nothing); > foreach my $row ( @$data ) { > if ( $number > $row->[0] ){ > } > else { > $item = $row->[1]; > last; > } > } > > say qq($number associated with $item); > > exit(0); > > =================================== > table.json: > > [ > [5,"A"], > [6,"B"], > [12,"C"], > [20,"D"], > [25,"E"], > [30,"F"] > ] And in a later message Joe wrote: > Maybe fastest might be misnomer. I was hoping I could do something like: > > my $random > my ($key) = grep { $_ ~~ $random } keys %table; > > I stumbled across something like this at stackoverflow but I can't find > it now. > > I was thinking that I could make the hash keys the range and then use > smart matching to figure out which key the random number is in the range of. > > Using ranges for hash keys does weird things however. Let alone that > they don't get treated as a range in the smart match. > > Well, to be honest I couldn't really get the ranges as keys thing > working so I don't know if it would really treat the key as a range. > > Maybe clever is what I'm looking for. :-) > > >> For more fun, say I want to store that table in a text file what is a > >> good way to represent that? > > > > I sort of liked your human readable format above. JSON is fine but > > not as clear to the lay person. > > I was using YAML for awhile but about 6 months or so ago I switched to > JSON. It's easier for me to understand than YAML (which has some white > space being important stuff that annoys me) is easily portable between > langues (especially javascript since it is really just javascript). From pmiguel at purdue.edu Tue May 25 08:28:06 2010 From: pmiguel at purdue.edu (Phillip San Miguel) Date: Tue, 25 May 2010 11:28:06 -0400 Subject: [Purdue-pm] The Perl Survey Message-ID: <4BFBEC86.9010401@purdue.edu> Possibly of interest... > -------- Original Message -------- > Subject: [Bioperl-l] OT: The Perl Survey > Date: Sat, 22 May 2010 18:25:55 +1000 > From: Kieren Diment > To: bioperl-l at lists.open-bio.org > > > > Hi, > > Sorry about the off topic posting, but I'm trying to get as large a sample of programmers that use Perl as possible. > > The Perl Foundation have funded The Perl Survey, 2010 which is ready for people to complete at http://survey.perlfoundation.org. If you could spend a little time to complete the survey, we would be most grateful. It should take around 10-15 minutes to complete. The official announcement is at: http://news.perlfoundation.org/2010/05/grant-update-the-perl-survey-1.html > > Thanks in advance > > Kieren Diment From bradley.d.andersen at gmail.com Wed May 26 05:13:20 2010 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 26 May 2010 08:13:20 -0400 Subject: [Purdue-pm] TODO ? Message-ID: Hi, Is there a Perl "TODO" list somewhere that an intermediate-level Programmer might be able to work on? Thankee Muchly, \bda From gizmo at purdue.edu Wed May 26 06:59:42 2010 From: gizmo at purdue.edu (Joe Kline) Date: Wed, 26 May 2010 09:59:42 -0400 Subject: [Purdue-pm] TODO ? In-Reply-To: References: Message-ID: <4BFD294E.4030401@purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/26/2010 08:13 AM, Bradley Andersen wrote: > Hi, > > > Is there a Perl "TODO" list somewhere that an intermediate-level > Programmer might be able to work on? > Brad, do you mean on Perl or Rakudo? There was a blog post about that a few weeks ago. I'll see if I can did it up. joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9KU0ACgkQb0mzA2gRTpla4gCfcRwBGsH3o8DK89odP1O5PSWA wxwAn0giBK0On5AxxPKZDfANH3AxPlKT =ceXi -----END PGP SIGNATURE----- From gizmo at purdue.edu Wed May 26 07:08:07 2010 From: gizmo at purdue.edu (Joe Kline) Date: Wed, 26 May 2010 10:08:07 -0400 Subject: [Purdue-pm] TODO ? In-Reply-To: References: Message-ID: <4BFD2B47.4050803@purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/26/2010 08:13 AM, Bradley Andersen wrote: > Hi, > > > Is there a Perl "TODO" list somewhere that an intermediate-level > Programmer might be able to work on? > I forgot, run 'perldoc perltodo' or even google it. Lots of stuff there for Perl5. :-) joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9K0cACgkQb0mzA2gRTpnjrgCfT0DafTBM+fozmWTLtDuAucQl h94AoIm7jVGQnqNg7f6YUeVS4lb1RvXe =OnfG -----END PGP SIGNATURE----- From bradley.d.andersen at gmail.com Wed May 26 07:22:36 2010 From: bradley.d.andersen at gmail.com (Bradley Andersen) Date: Wed, 26 May 2010 10:22:36 -0400 Subject: [Purdue-pm] TODO ? In-Reply-To: <4BFD2B47.4050803@purdue.edu> References: <4BFD2B47.4050803@purdue.edu> Message-ID: Hi Joe, Thanks! I consider myself slightly* less able in Perl than probably everyone on this list; been using Perl for 8 years, but it's never been a big part of any job until recently, so I've never really done anything very complicated. So I probably would not be able to contribute to something that others might use right away, but I'd like to poke around on my own. Take Care, \bda * slightly = "way way way" ;-P On Wed, May 26, 2010 at 10:08 AM, Joe Kline wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 05/26/2010 08:13 AM, Bradley Andersen wrote: >> Hi, >> >> >> ? ? ?Is there a Perl "TODO" list somewhere that an intermediate-level >> Programmer might be able to work on? >> > > I forgot, run 'perldoc perltodo' or even google it. Lots of stuff there > for Perl5. :-) > > joe > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkv9K0cACgkQb0mzA2gRTpnjrgCfT0DafTBM+fozmWTLtDuAucQl > h94AoIm7jVGQnqNg7f6YUeVS4lb1RvXe > =OnfG > -----END PGP SIGNATURE----- > _______________________________________________ > Purdue-pm mailing list > Purdue-pm at pm.org > http://mail.pm.org/mailman/listinfo/purdue-pm > From gizmo at purdue.edu Wed May 26 07:46:10 2010 From: gizmo at purdue.edu (Joe Kline) Date: Wed, 26 May 2010 10:46:10 -0400 Subject: [Purdue-pm] TODO ? In-Reply-To: References: <4BFD2B47.4050803@purdue.edu> Message-ID: <4BFD3432.4060303@purdue.edu> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brad, here's the best I could find with very brief googling: http://www.perl.org/contribute.html http://blogs.perl.org/users/leon_timmermans/2010/04/enlightening-perls-documentation-you-too-can-help.html http://www.modernperlbooks.com/mt/2010/04/the-thing-about-volunteers-and-civility.html http://use.perl.org/article.pl?sid=10/05/23/1130246&from=rss Basically I think it boils down to hanging out on IRC and JFDI. :-) joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9NDEACgkQb0mzA2gRTpkzBQCdGm8pAiPksiDNp5pCH63vTcFD HtAAoJvrKiW0jeo3KRSzccaE9Ew1panA =yt+4 -----END PGP SIGNATURE-----