From jscarbrough at where2getit.com Thu Oct 1 06:58:26 2009 From: jscarbrough at where2getit.com (Jon Scarbrough) Date: Thu, 01 Oct 2009 08:58:26 -0500 Subject: [Chicago-talk] Create PDF Recommendation In-Reply-To: References: Message-ID: <4AC4B582.9090505@where2getit.com> We've used htmldoc in the past with limited success (http://www.htmldoc.org). One thing I've looked at recently is OpenOffice. They have a full suite of converters and you can control the process from a command line. If you do a google search for "openoffice command line converter" you'll get lots of links. This would be my next choice for doing html -> pdf conversions. There are CPAN modules for interacting with OpenOffice as well but I don't think the conversion options are exposed through them. Best regards, Jon Scarbrough Where2GetIt.com > > On Sep 30, 2009, at 11:28 AM, Jim Jacobus wrote: > >> Can anyone recommend an easy way to create PDFs? I want to supply a >> report to customers as either a HTML for or PDF. File I am creating >> is simple, no graphics, single column, monospaced characters. >> I was going to use PDF-Create-1.04 , but with it I have to do a lot >> of work like keeping track of page breaks and such. I've done that >> before, but I was hoping there would be something easier since I can >> start with an HTML. Ideally, it would work like the print preview in >> the Firefox browser--in other words it would work like a print >> driver. Any ideas? Thanks in advance. >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk > From lee at laylward.com Thu Oct 1 08:39:57 2009 From: lee at laylward.com (Lee Aylward) Date: Thu, 1 Oct 2009 10:39:57 -0500 Subject: [Chicago-talk] Create PDF Recommendation In-Reply-To: <4AC4B582.9090505@where2getit.com> References: <4AC4B582.9090505@where2getit.com> Message-ID: <20091001103957.6385a43f@hactar.servercentral.net> On Thu, 01 Oct 2009 08:58:26 -0500 Jon Scarbrough wrote: > We've used htmldoc in the past with limited success > (http://www.htmldoc.org). One thing I've looked at recently is > OpenOffice. They have a full suite of converters and you can control > the process from a command line. If you do a google search for > "openoffice command line converter" you'll get lots of links. This > would be my next choice for doing html -> pdf conversions. There are > CPAN modules for interacting with OpenOffice as well but I don't > think the conversion options are exposed through them. > > Best regards, > I have also had some success calling htmldoc from perl to covert HTML to PDF. I did have to rewrite a number of my templates to use inline CSS, and switch a few things to table layouts, though. The OpenOffice idea looks promising, but I doubt our admins would be happy installing OO.org on any of our servers. -- Lee From me at heyjay.com Thu Oct 1 14:42:09 2009 From: me at heyjay.com (Jay Strauss) Date: Thu, 1 Oct 2009 16:42:09 -0500 Subject: [Chicago-talk] Using "@" to reference element in array Message-ID: <39eaccc10910011442u5cb20b48m506dacedf06ea78@mail.gmail.com> Hi, I just got a script at work where the writer used: my @array = qw[adf af a adf asdfd]; print @array[2]; And it works!! I thought that notation didn't go into effect until Perl6. I've always done $array[2], and never tried the style above. Is there any reason not to adopt the style above in future Perl5 programming? Thanks Jay -------------- next part -------------- An HTML attachment was scrubbed... URL: From kent at c2group.net Thu Oct 1 15:00:59 2009 From: kent at c2group.net (Kent Cowgill) Date: Thu, 1 Oct 2009 17:00:59 -0500 Subject: [Chicago-talk] Using "@" to reference element in array In-Reply-To: <39eaccc10910011442u5cb20b48m506dacedf06ea78@mail.gmail.com> References: <39eaccc10910011442u5cb20b48m506dacedf06ea78@mail.gmail.com> Message-ID: <3D9EFE99-71C4-4F04-ABC0-E81E6065518E@c2group.net> On Oct 1, 2009, at 4:42 PM, Jay Strauss wrote: > Hi, > > I just got a script at work where the writer used: > > my @array = qw[adf af a adf asdfd]; > print @array[2]; > > And it works!! You must not have warnings turned on. @array[ @indices ] is a valid way to produce a slice of array values, but when there's only one index, the @ sigil doesn't make much sense. And when you have warnings turned on, perl tells you that it doesn't make sense: Scalar value @array[2] better written as $array[2] at line . Kent Cowgill kent at c2group.net http://kentcowgill.org/blog http://youtube.com/kcowgill http://kentcowgill.org/photos http://flickr.com/people/kcowgill From tigerpeng2001 at yahoo.com Thu Oct 1 15:07:27 2009 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Thu, 1 Oct 2009 15:07:27 -0700 (PDT) Subject: [Chicago-talk] Using "@" to reference element in array In-Reply-To: <39eaccc10910011442u5cb20b48m506dacedf06ea78@mail.gmail.com> References: <39eaccc10910011442u5cb20b48m506dacedf06ea78@mail.gmail.com> Message-ID: <611754.71349.qm@web58706.mail.re1.yahoo.com> @array[2] is just an array with one element. ('a')?; and print prints out the element. ________________________________ From: Jay Strauss To: Chicago.pm chatter Sent: Thu, October 1, 2009 4:42:09 PM Subject: [Chicago-talk] Using "@" to reference element in array Hi, I just got a script at work where the writer used: my @array = qw[adf af a adf asdfd]; print @array[2]; And it works!! I thought that notation didn't go into effect until Perl6. I've always done $array[2], and never tried the style above.? Is there any reason not to adopt the style above in future Perl5 programming? Thanks Jay -------------- next part -------------- An HTML attachment was scrubbed... URL: From merlyn at stonehenge.com Thu Oct 1 16:05:58 2009 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Thu, 01 Oct 2009 16:05:58 -0700 Subject: [Chicago-talk] Using "@" to reference element in array In-Reply-To: <39eaccc10910011442u5cb20b48m506dacedf06ea78@mail.gmail.com> (Jay Strauss's message of "Thu, 1 Oct 2009 16:42:09 -0500") References: <39eaccc10910011442u5cb20b48m506dacedf06ea78@mail.gmail.com> Message-ID: <86tyyig1ex.fsf@blue.stonehenge.com> >>>>> "Jay" == Jay Strauss writes: Jay> print @array[2]; Think of that as the same as @array[2..2], as in, a list that has only one element. "print" prints a single element list in the same way that it prints a scalar. But let's put this on the left side of an assignent: $array[2] = @ARGV; # get the count of arguments into $array[2] @array[2..2] = @ARGV; # get the first argument ($ARGV[0]) into $array[2] quite different reactions! -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion From me at heyjay.com Thu Oct 1 19:53:30 2009 From: me at heyjay.com (Jay Strauss) Date: Thu, 1 Oct 2009 21:53:30 -0500 Subject: [Chicago-talk] Using "@" to reference element in array In-Reply-To: <3D9EFE99-71C4-4F04-ABC0-E81E6065518E@c2group.net> References: <39eaccc10910011442u5cb20b48m506dacedf06ea78@mail.gmail.com> <3D9EFE99-71C4-4F04-ABC0-E81E6065518E@c2group.net> Message-ID: <39eaccc10910011953ic527f18ic1d4ec58b0d1aa5@mail.gmail.com> You are right. I don't have warnings turned on. I was just looking over his script. (normally I use warnings) Thanks Jay On Thu, Oct 1, 2009 at 5:00 PM, Kent Cowgill wrote: > > On Oct 1, 2009, at 4:42 PM, Jay Strauss wrote: > > Hi, >> >> I just got a script at work where the writer used: >> >> my @array = qw[adf af a adf asdfd]; >> print @array[2]; >> >> And it works!! >> > > You must not have warnings turned on. > > @array[ @indices ] is a valid way to produce a slice of array values, but > when there's only one index, the @ sigil doesn't make much sense. And when > you have warnings turned on, perl tells you that it doesn't make sense: > > Scalar value @array[2] better written as $array[2] at line blah>. > > > Kent Cowgill kent at c2group.net > > http://kentcowgill.org/blog http://youtube.com/kcowgill > http://kentcowgill.org/photos http://flickr.com/people/kcowgill > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at heyjay.com Thu Oct 1 19:54:02 2009 From: me at heyjay.com (Jay Strauss) Date: Thu, 1 Oct 2009 21:54:02 -0500 Subject: [Chicago-talk] Using "@" to reference element in array In-Reply-To: <611754.71349.qm@web58706.mail.re1.yahoo.com> References: <39eaccc10910011442u5cb20b48m506dacedf06ea78@mail.gmail.com> <611754.71349.qm@web58706.mail.re1.yahoo.com> Message-ID: <39eaccc10910011954u40829ff1gc1258080b43001f2@mail.gmail.com> Yeah, I see that now. Thanks Jay On Thu, Oct 1, 2009 at 5:07 PM, tiger peng wrote: > > @array[2] is just an array with one element. ('a') ; and print prints out > the element. > > ------------------------------ > *From:* Jay Strauss > *To:* Chicago.pm chatter > *Sent:* Thu, October 1, 2009 4:42:09 PM > *Subject:* [Chicago-talk] Using "@" to reference element in array > > Hi, > > I just got a script at work where the writer used: > > my @array = qw[adf af a adf asdfd]; > print @array[2]; > > And it works!! > > I thought that notation didn't go into effect until Perl6. > > I've always done $array[2], and never tried the style above. Is there any > reason not to adopt the style above in future Perl5 programming? > > Thanks > Jay > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard at rushlogistics.com Fri Oct 2 05:50:53 2009 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 02 Oct 2009 08:50:53 -0400 (EDT) Subject: [Chicago-talk] Help hacking some code. Message-ID: <20091002125053.B19A51A7C@bellona.xo.com> For a number of years I have been using Steve Kunz perlmenu.pm as a nice low overhead GUI for a database app. I am very happy with it. However, I am try to dig deep into its code to solve a mystery. I have written the author and have not heard back so I was hoping that perhaps someone here might lend some advice. The code below provides a basic menu and I am trying to add color by placing use Term::ANSIColor; print color 'bold blue'; in different parts of the code in order to try an add color. No matter where I seem to place it, no color is displayed. I have even tried placing it in the menu_display subroutine -- which is called in the code -- in perlmenu.pm. Please find that subroutine further down. All of the code in perlmenu.pm is posted here http://kobesearch.cpan.org/htdocs/perlmenu/perlmenu.pm.html For several days I have been searching -- to no avail -- for some kind of system("reset") in the code that would blow away color. Is this something that Curses is canceling out? From what I understand perl Curses does support color, so I am confused about what is preventing this from working. Does anyone have any ideas as to how I can go about achieving this task? Any help would be greatly appreciated and if there are any MLB fans listening I will gladly donate my 4 seats down the third base line for today's 1:20 game against the Arizona Diamondbacks in exchange for help solving this problem. BEGIN { $Curses::OldCurses = 1; } use Curses; use perlmenu; ... &menu_init(1,"Select an Animal"); # Init menu &menu_item("Collie","dog"); # Add item &menu_item("Shetland","pony"); # Add item &menu_item("Persian","cat"); # Add last item $sel = &menu_display("Which animal?"); # Get user selection if ($sel eq "%UP%") { ... } if ($sel eq "dog") { ... } #********** # MENU_DISPLAY # # Function: Display items in menu_sel_text array, allow selection, and # return appropriate selection-string. # # Call format: $sel = &menu_display("Prompt text",$arrow_line,$top_item); # # Arguments: - Prompt text (for the bottom line of menu). # - Line number offset for the arrow (defaults to zero). # - Index of top item on screen (defaults to zero). # - Column number offset for the arrow (multiple-column mode # only, defaults to zero). # # Returns: Selected action string (from second param on &menu_item) # %UP% -- "u"|"U" pressed (or "t"|"T" and looking for top) # %EMPTY% -- Nothing in menu to display # # Notes: 1) This routine ALWAYS sets "nocbreak" and "echo" terminal # modes before returning. # 2) This routine exits directly (after calling the optional # "quit" routine) if "q"|"Q" is pressed. #********** sub menu_display { ($menu_prompt,$arrow_spec_row,$menu_top_item,$arrow_spec_col) = @_; local($ret); # Check for no "menu_item" calls. $total_items = $#menu_sel_text + 1; if ($total_items <= 0) { &nocbreak(); # ALWAYS turn off "cbreak" mode &echo(); # ALWAYS turn on "echo" return("%EMPTY%"); } &clear(); $xrow = $xcol = 0; $last_menu_top_item = -1; # Force drawing of menu items $ret = &menu_display_internal(0,$menu_prompt,0); if ($#_ > 0) { $_[1] = $arrow_spec_row; } if ($#_ > 1) { $_[2] = $menu_top_item; } if ($#_ > 2) { $_[3] = $arrow_spec_col; } &menu_return_prep(); $ret; } From shlomif at iglu.org.il Fri Oct 2 06:27:06 2009 From: shlomif at iglu.org.il (Shlomi Fish) Date: Fri, 02 Oct 2009 15:27:06 +0200 Subject: [Chicago-talk] Help hacking some code. In-Reply-To: <20091002125053.B19A51A7C@bellona.xo.com> References: <20091002125053.B19A51A7C@bellona.xo.com> Message-ID: <200910021527.07571.shlomif@iglu.org.il> Hi! See below for my response. On Friday 02 Oct 2009 14:50:53 Richard Reina wrote: > For a number of years I have been using Steve Kunz perlmenu.pm as a nice > low overhead GUI for a database app. I am very happy with it. However, I > am try to dig deep into its code to solve a mystery. I have written the > author and have not heard back so I was hoping that perhaps someone here > might lend some advice. The code below provides a basic menu and I am > trying to add color by placing > > use Term::ANSIColor; > print color 'bold blue'; I don't think Term::ANSIColor works well with Curses.pm. You should try: http://www.perlmonks.org/?node_id=32154 (first hit for http://www.google.com/search?q=curses%20perl%20color ) Other than that, I should note that the module you are using seems to be coded quite amateurishly. Let me go over that: > > in different parts of the code in order to try an add color. No matter > where I seem to place it, no color is displayed. I have even tried placing > it in the menu_display subroutine -- which is called in the code -- in > perlmenu.pm. Please find that subroutine further down. All of the code > in perlmenu.pm is posted here > http://kobesearch.cpan.org/htdocs/perlmenu/perlmenu.pm.html non-Pragma modules should start with an uppercase letter - PerlMenu.pm or Perlmenu.pm or whatever. And it should be under a more meaningful namespace than the top-level one. > > For several days I have been searching -- to no avail -- for some kind of > system("reset") in the code that would blow away color. Is this something > that Curses is canceling out? From what I understand perl Curses does > support color, so I am confused about what is preventing this from > working. Does anyone have any ideas as to how I can go about achieving > this task? > > Any help would be greatly appreciated and if there are any MLB fans > listening I will gladly donate my 4 seats down the third base line for > today's 1:20 game against the Arizona Diamondbacks in exchange for help > solving this problem. > > BEGIN { $Curses::OldCurses = 1; } > use Curses; > use perlmenu; > ... > &menu_init(1,"Select an Animal"); # Init menu You shouldn't use &menu_init(...) with an ampersand - use menu_init(...) instead. > > &menu_item("Collie","dog"); # Add item > &menu_item("Shetland","pony"); # Add item > &menu_item("Persian","cat"); # Add last item > > $sel = &menu_display("Which animal?"); # Get user selection > > if ($sel eq "%UP%") { ... } > if ($sel eq "dog") { ... } Maybe use a dispatch table here. > > > > #********** > # MENU_DISPLAY > # > # Function: Display items in menu_sel_text array, allow selection, and > # return appropriate selection-string. > # > # Call format: $sel = &menu_display("Prompt text",$arrow_line,$top_item); > # > # Arguments: - Prompt text (for the bottom line of menu). > # - Line number offset for the arrow (defaults to zero). > # - Index of top item on screen (defaults to zero). > # - Column number offset for the arrow (multiple-column mode > # only, defaults to zero). > # > # Returns: Selected action string (from second param on &menu_item) > # %UP% -- "u"|"U" pressed (or "t"|"T" and looking for top) > # %EMPTY% -- Nothing in menu to display > # > # Notes: 1) This routine ALWAYS sets "nocbreak" and "echo" terminal > # modes before returning. > # 2) This routine exits directly (after calling the optional > # "quit" routine) if "q"|"Q" is pressed. > #********** > sub menu_display { > ($menu_prompt,$arrow_spec_row,$menu_top_item,$arrow_spec_col) = @_; You should use my for these variables them. And use strict and use warnings > local($ret); Why are you using local? > > # Check for no "menu_item" calls. > $total_items = $#menu_sel_text + 1; $total_items should be declared. > if ($total_items <= 0) { > &nocbreak(); # ALWAYS turn off "cbreak" mode > &echo(); # ALWAYS turn on "echo" > return("%EMPTY%"); > } > > &clear(); $xrow = $xcol = 0; Don't put them both on the same line. > $last_menu_top_item = -1; # Force drawing of menu items > $ret = &menu_display_internal(0,$menu_prompt,0); > if ($#_ > 0) { $_[1] = $arrow_spec_row; } Why are you accessing @_ directly using $#_ like that? > if ($#_ > 1) { $_[2] = $menu_top_item; } > if ($#_ > 2) { $_[3] = $arrow_spec_col; } > &menu_return_prep(); > $ret; You should separate logical paragraphs of your code using empty lines. And << $ret; >> should be << return $ret; >>. For more information, consult: http://oreilly.com/catalog/9780596001735 Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Best Introductory Programming Language - http://shlom.in/intro-lang Chuck Norris read the entire English Wikipedia in 24 hours. Twice. From richard at rushlogistics.com Fri Oct 2 06:56:41 2009 From: richard at rushlogistics.com (Richard Reina) Date: Fri, 02 Oct 2009 09:56:41 -0400 (EDT) Subject: [Chicago-talk] Help hacking some code. In-Reply-To: <20091002125053.B19A51A7C@bellona.xo.com> Message-ID: <20091002135641.357D23531@centaur.xo.com> Hi Shlomi, Thank you very much for you reply. I did not write this code, it was instead written by the modules author Steve Kunz a long time ago. I do not consider myself capable of rewriting his module and has demonstrated robust stability over the years I have little reason to. However, I am grateful nevertheless for the suggestions and I will look into the suggestion about substituting ANSI Color. Thank you, Richard ---- Chicago.pm chatter wrote: > > Hi! > > See below for my response. > > On Friday 02 Oct 2009 14:50:53 Richard Reina wrote: > > For a number of years I have been using Steve Kunz perlmenu.pm as a nice > > low overhead GUI for a database app. I am very happy with it. However, I > > am try to dig deep into its code to solve a mystery. I have written the > > author and have not heard back so I was hoping that perhaps someone here > > might lend some advice. The code below provides a basic menu and I am > > trying to add color by placing > > > > use Term::ANSIColor; > > print color 'bold blue'; > > I don't think Term::ANSIColor works well with Curses.pm. You should try: > > http://www.perlmonks.org/?node_id=32154 > > (first hit for http://www.google.com/search?q=curses%20perl%20color ) > > Other than that, I should note that the module you are using seems to be coded > quite amateurishly. Let me go over that: > > > > > in different parts of the code in order to try an add color. No matter > > where I seem to place it, no color is displayed. I have even tried placing > > it in the menu_display subroutine -- which is called in the code -- in > > perlmenu.pm. Please find that subroutine further down. All of the code > > in perlmenu.pm is posted here > > http://kobesearch.cpan.org/htdocs/perlmenu/perlmenu.pm.html > > non-Pragma modules should start with an uppercase letter - PerlMenu.pm or > Perlmenu.pm or whatever. And it should be under a more meaningful namespace > than the top-level one. > > > > > For several days I have been searching -- to no avail -- for some kind of > > system("reset") in the code that would blow away color. Is this something > > that Curses is canceling out? From what I understand perl Curses does > > support color, so I am confused about what is preventing this from > > working. Does anyone have any ideas as to how I can go about achieving > > this task? > > > > Any help would be greatly appreciated and if there are any MLB fans > > listening I will gladly donate my 4 seats down the third base line for > > today's 1:20 game against the Arizona Diamondbacks in exchange for help > > solving this problem. > > > > BEGIN { $Curses::OldCurses = 1; } > > use Curses; > > use perlmenu; > > ... > > &menu_init(1,"Select an Animal"); # Init menu > > You shouldn't use &menu_init(...) with an ampersand - use menu_init(...) > instead. > > > > > &menu_item("Collie","dog"); # Add item > > &menu_item("Shetland","pony"); # Add item > > &menu_item("Persian","cat"); # Add last item > > > > $sel = &menu_display("Which animal?"); # Get user selection > > > > if ($sel eq "%UP%") { ... } > > if ($sel eq "dog") { ... } > > Maybe use a dispatch table here. > > > > > > > > > #********** > > # MENU_DISPLAY > > # > > # Function: Display items in menu_sel_text array, allow selection, and > > # return appropriate selection-string. > > # > > # Call format: $sel = &menu_display("Prompt text",$arrow_line,$top_item); > > # > > # Arguments: - Prompt text (for the bottom line of menu). > > # - Line number offset for the arrow (defaults to zero). > > # - Index of top item on screen (defaults to zero). > > # - Column number offset for the arrow (multiple-column mode > > # only, defaults to zero). > > # > > # Returns: Selected action string (from second param on &menu_item) > > # %UP% -- "u"|"U" pressed (or "t"|"T" and looking for top) > > # %EMPTY% -- Nothing in menu to display > > # > > # Notes: 1) This routine ALWAYS sets "nocbreak" and "echo" terminal > > # modes before returning. > > # 2) This routine exits directly (after calling the optional > > # "quit" routine) if "q"|"Q" is pressed. > > #********** > > sub menu_display { > > ($menu_prompt,$arrow_spec_row,$menu_top_item,$arrow_spec_col) = @_; > > You should use my for these variables them. And use strict and use warnings > > > local($ret); > > Why are you using local? > > > > > # Check for no "menu_item" calls. > > $total_items = $#menu_sel_text + 1; > > $total_items should be declared. > > > if ($total_items <= 0) { > > &nocbreak(); # ALWAYS turn off "cbreak" mode > > &echo(); # ALWAYS turn on "echo" > > return("%EMPTY%"); > > } > > > > &clear(); $xrow = $xcol = 0; > > Don't put them both on the same line. > > > $last_menu_top_item = -1; # Force drawing of menu items > > $ret = &menu_display_internal(0,$menu_prompt,0); > > if ($#_ > 0) { $_[1] = $arrow_spec_row; } > > Why are you accessing @_ directly using $#_ like that? > > > if ($#_ > 1) { $_[2] = $menu_top_item; } > > if ($#_ > 2) { $_[3] = $arrow_spec_col; } > > &menu_return_prep(); > > $ret; > > You should separate logical paragraphs of your code using empty lines. > > And << $ret; >> should be << return $ret; >>. > > For more information, consult: > > http://oreilly.com/catalog/9780596001735 > > Regards, > > Shlomi Fish > > > -- > ----------------------------------------------------------------- > Shlomi Fish http://www.shlomifish.org/ > Best Introductory Programming Language - http://shlom.in/intro-lang > > Chuck Norris read the entire English Wikipedia in 24 hours. Twice. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From davidy at nationalcycle.com Fri Oct 2 15:57:53 2009 From: davidy at nationalcycle.com (David Young) Date: Fri, 02 Oct 2009 17:57:53 -0500 Subject: [Chicago-talk] Problem with JSON module Message-ID: Hi all, I've been racking my brain trying to figure out this problem. In the code snippet below I do something simple. I have some JSON ($unq which is "unquoted" JSON), and $qj (quoted JSON). They are identical, except the key:value pairs are quoted with double quotes in the latter. Then I run "from_json" to convert each into a perl reference. I then run "to_json" and get back the JSON I started with. (quoted or unquoted) But I don't understand how $u or $q are different so that the quotes are either present or not present when performing the conversion back to JSON. I put $u and $q side by side below showing how they are identical (other than the reference addresses). Help. ydy ======START===== use JSON; $uqj = '{"data":{"graphType":"bars","ticks":[[0,"02"],[1,"03"],[2,"04"],[3,"08"],[4,"09"]],"metrics":[{"label":"Welding-1","data":[[0,31.3794],[1,57.6309],[2,0],[3,40.0247],[4,43.9238]]},{\ "label":"Welding-2","data":[[0,88.2248],[1,38.5611],[2,0],[3,49.0184],[4,51.9849]]}],"note":"Dept by Shift"}}'; $qj = '{"data":{"graphType":"bars","ticks":[[0,"02"],[1,"03"],[2,"04"],[3,"08"],[4,"09"]],"metrics":[{"label":"Welding-1","data":[["0","31.3794"],["1","57.6309"],["2","0.0000"],["3","40.0\ 247"],["4","43.9238"]]},{"label":"Welding-2","data":[["0","88.2248"],["1","38.5611"],[2,0],["3","49.0184"],["4","51.9849"]]}],"note":"Dept by Shift"}}'; $u = from_json($uqj); $q = from_json($qj); print "Unquoted:\n"; print to_json($u); print "\n"; print "Quoted:\n"; print to_json($q); print "\n"; $end=1; ======END====== I get this: =====START OUTPUT===== DB<2> x $q B<3> x $u 0 HASH(0xa3b859c) HASH(0xa3b85b4) 'data' => HASH(0xa3cf7d4) 'data' => HASH(0xa3cf9cc) 'graphType' => 'bars' 'graphType' => 'bars' 'metrics' => ARRAY(0xa3d64ac) 'metrics' => ARRAY(0xa3c65bc) 0 HASH(0xa3d6f60) 0 HASH(0xa3d488c) 'data' => ARRAY(0xa3d705c) 'data' => ARRAY(0xa3d48c8) 0 ARRAY(0xa3d6f54) 0 ARRAY(0xa3d5414) 0 0 0 0 1 31.3794 1 31.3794 1 ARRAY(0xa3d71a0) 1 ARRAY(0xa3d6be8) 0 1 0 1 1 57.6309 1 57.6309 2 ARRAY(0xa3d71b8) 2 ARRAY(0xa3d6c48) 0 2 0 2 1 0.0000 1 0 3 ARRAY(0xa3d71e8) 3 ARRAY(0xa3d6c78) 0 3 0 3 1 40.0247 1 40.0247 4 ARRAY(0xa3d7218) 4 ARRAY(0xa3d6c6c) 0 4 0 4 1 43.9238 1 43.9238 'label' => 'Welding-1' 'label' => 'Welding-1' 1 HASH(0xa3d71ac) 1 HASH(0xa3d6c3c) 'data' => ARRAY(0xa3d71dc) 'data' => ARRAY(0xa3d6c84) 0 ARRAY(0xa3d7128) 0 ARRAY(0xa3d6c54) 0 0 0 0 1 88.2248 1 88.2248 1 ARRAY(0xa3d72cc) 1 ARRAY(0xa3d6d2c) 0 1 0 1 1 38.5611 1 38.5611 2 ARRAY(0xa3d72e4) 2 ARRAY(0xa3d6f48) 0 2 0 2 1 0 1 0 3 ARRAY(0xa3d72f0) 3 ARRAY(0xa3d6f78) 0 3 0 3 1 49.0184 1 49.0184 4 ARRAY(0xa3d87e0) 4 ARRAY(0xa3d6f6c) 0 4 0 4 1 51.9849 1 51.9849 'label' => 'Welding-2' 'label' => 'Welding-2' 'note' => 'Dept by Shift' 'note' => 'Dept by Shift' 'ticks' => ARRAY(0xa3d485c) 'ticks' => ARRAY(0xa3d2448) 0 ARRAY(0xa3d39c4) 0 ARRAY(0xa3d2cd4) 0 0 0 0 1 02 1 02 1 ARRAY(0xa3d6fe4) 1 ARRAY(0xa3d45a4) 0 1 0 1 1 03 1 03 2 ARRAY(0xa3d6f90) 2 ARRAY(0xa3d4580) 0 2 0 2 1 04 1 04 3 ARRAY(0xa3d6bf4) 3 ARRAY(0xa3d2460) 0 3 0 3 1 08 1 08 4 ARRAY(0xa3d3478) 4 ARRAY(0xa3d39dc) 0 4 0 4 1 09 1 09 -- I take the "Shhhh" out of IT - ydy From andrew at cleverdomain.org Fri Oct 2 23:50:50 2009 From: andrew at cleverdomain.org (Andrew Rodland) Date: Sat, 3 Oct 2009 01:50:50 -0500 Subject: [Chicago-talk] Problem with JSON module Message-ID: <200910030150.50402.andrew@cleverdomain.org> "x" in the debugger doesn't show it, but I would bet that JSON is keying on the magical, mostly-hidden type ("OK") flags of scalars. If you do $a = "12.34", $a has a valid string value but not a valid numeric value. If you calculate $a + 0, $a now has a valid string value *and* a valid numeric value, until it's changed by either a string operation or a numeric operation (at which point the value that wasn't part of the operation is marked as no longer "OK".) If you do $b = 12.34, $b has a valid numeric value but not a valid string value. If you then print $b, $b will have valid numeric *and* string parts, etc. etc. > $ perl -MDevel::Peek -le '$a = "12.34"; print "Before:"; Dump($a); 0 + $a; print "After:"; Dump($a)' > Before: > SV = PV(0xe58b68) at 0xe80ca8 > REFCNT = 1 > FLAGS = (POK,pPOK) > PV = 0xe7ad00 "12.34"\0 > CUR = 5 > LEN = 8 > After: > SV = PVNV(0xe5a0b0) at 0xe80ca8 > REFCNT = 1 > FLAGS = (NOK,POK,pIOK,pNOK,pPOK) > IV = 12 > NV = 12.34 > PV = 0xe7ad00 "12.34"\0 > CUR = 5 > LEN = 8 > $ perl -MDevel::Peek -le '$b = 12.34; print "Before:"; Dump($b); "" . $b; print "After:"; Dump($b)' > Before: > SV = NV(0x15810d0) at 0x1559ca8 > REFCNT = 1 > FLAGS = (NOK,pNOK) > NV = 12.34 > After: > SV = PVNV(0x15330b0) at 0x1559ca8 > REFCNT = 1 > FLAGS = (NOK,POK,pNOK,pPOK) > IV = 0 > NV = 12.34 > PV = 0x157c020 "12.34"\0 > CUR = 5 > LEN = 40 JSON is presumably turning JSON numeric literals into numeric scalars (storing 0 + $val), and likewise when it gets a value that has NOK or IOK but not POK, it outputs a numeric value without quotes. Andrew From v.velox at vvelox.net Sun Oct 4 12:59:56 2009 From: v.velox at vvelox.net (Zane C.B.) Date: Sun, 4 Oct 2009 14:59:56 -0500 Subject: [Chicago-talk] VFS Message-ID: <20091004145956.3879b7bf@vixen42.vulpes> I am starting work on useful and fully documented VFS in Perl. Any one have any requests/suggestions/etc. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 196 bytes Desc: not available URL: From younda at gmail.com Sun Oct 4 14:06:44 2009 From: younda at gmail.com (David J. Young) Date: Sun, 4 Oct 2009 16:06:44 -0500 Subject: [Chicago-talk] Problem with JSON module In-Reply-To: <200910030150.50402.andrew@cleverdomain.org> References: <200910030150.50402.andrew@cleverdomain.org> Message-ID: <7001e3dd0910041406m52a0a0d7v78ad5c5cc5125ccb@mail.gmail.com> Thanks Andrew for the pointer to the Devel::Peek module. I didn't know about this module. I had also found that Data::Dumper did very subtly show a difference between a value internally stored in Perl as a string or as a number. In the two dump snippets shown below, the numeric value is unquoted, and the string value is single quoted. For my purposes, I added zero (+ 0) to my values before putting them into the data structure that I was passing to the "to_json" call. This produced the JSON string I needed without the double quotes. Now my jQuery flot charts work perfectly. Thanx for the help! 'data' => [ 'data' => [ [ [ 0, '0', '31.3794' '31.3794' ], ], [ [ 1, '1', '57.6309' '57.6309' ], ], [ [ 2, '2', 0 '0.0000' ], ], [ [ 3, '3', '40.0247' '40.0247' ], ], On Sat, Oct 3, 2009 at 1:50 AM, Andrew Rodland wrote: > "x" in the debugger doesn't show it, but I would bet that JSON is keying on > the magical, mostly-hidden type ("OK") flags of scalars. If you do $a = > "12.34", $a has a valid string value but not a valid numeric value. If you > calculate $a + 0, $a now has a valid string value *and* a valid numeric > value, > until it's changed by either a string operation or a numeric operation (at > which point the value that wasn't part of the operation is marked as no > longer > "OK".) If you do $b = 12.34, $b has a valid numeric value but not a valid > string value. If you then print $b, $b will have valid numeric *and* string > parts, etc. etc. > > > $ perl -MDevel::Peek -le '$a = "12.34"; print "Before:"; Dump($a); 0 + > $a; > print "After:"; Dump($a)' > > Before: > > SV = PV(0xe58b68) at 0xe80ca8 > > REFCNT = 1 > > FLAGS = (POK,pPOK) > > PV = 0xe7ad00 "12.34"\0 > > CUR = 5 > > LEN = 8 > > After: > > SV = PVNV(0xe5a0b0) at 0xe80ca8 > > REFCNT = 1 > > FLAGS = (NOK,POK,pIOK,pNOK,pPOK) > > IV = 12 > > NV = 12.34 > > PV = 0xe7ad00 "12.34"\0 > > CUR = 5 > > LEN = 8 > > > $ perl -MDevel::Peek -le '$b = 12.34; print "Before:"; Dump($b); "" . $b; > print "After:"; Dump($b)' > > Before: > > SV = NV(0x15810d0) at 0x1559ca8 > > REFCNT = 1 > > FLAGS = (NOK,pNOK) > > NV = 12.34 > > After: > > SV = PVNV(0x15330b0) at 0x1559ca8 > > REFCNT = 1 > > FLAGS = (NOK,POK,pNOK,pPOK) > > IV = 0 > > NV = 12.34 > > PV = 0x157c020 "12.34"\0 > > CUR = 5 > > LEN = 40 > > JSON is presumably turning JSON numeric literals into numeric scalars > (storing > 0 + $val), and likewise when it gets a value that has NOK or IOK but not > POK, > it outputs a numeric value without quotes. > > Andrew > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -- I take the "Shhhh" out of IT - ydy -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshua.mcadams at gmail.com Sun Oct 4 15:26:06 2009 From: joshua.mcadams at gmail.com (Joshua) Date: Sun, 4 Oct 2009 17:26:06 -0500 Subject: [Chicago-talk] VFS In-Reply-To: <20091004145956.3879b7bf@vixen42.vulpes> References: <20091004145956.3879b7bf@vixen42.vulpes> Message-ID: <49d805d70910041526r32c4dcffnb7f1a1460e18df@mail.gmail.com> Might want to look at File::System and see if the developer of that module has anything he'd like to do differently. On Sun, Oct 4, 2009 at 2:59 PM, Zane C.B. wrote: > I am starting work on useful and fully documented VFS in Perl. Any > one have any requests/suggestions/etc. > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From warren.lindsey at gmail.com Mon Oct 5 08:28:11 2009 From: warren.lindsey at gmail.com (Warren Lindsey) Date: Mon, 5 Oct 2009 10:28:11 -0500 Subject: [Chicago-talk] VFS In-Reply-To: <20091004145956.3879b7bf@vixen42.vulpes> References: <20091004145956.3879b7bf@vixen42.vulpes> Message-ID: <841e880a0910050828r581a657bh183b59de82527248@mail.gmail.com> Will it support FUSE or Plan 9's 9P fs? On Sun, Oct 4, 2009 at 2:59 PM, Zane C.B. wrote: > I am starting work on useful and fully documented VFS in Perl. Any > one have any requests/suggestions/etc. > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From me at heyjay.com Tue Oct 6 09:17:56 2009 From: me at heyjay.com (Jay Strauss) Date: Tue, 6 Oct 2009 11:17:56 -0500 Subject: [Chicago-talk] Doing "-X" tests in a loop Message-ID: <39eaccc10910060917v7fb1f05boe12aeba6b7298ebf@mail.gmail.com> Hi, How would I do "-X" test in a loop? I've been trying variations on eval, but can't get it to work: foreach (qw[-e -r -s]) { eval "$error = $_ unless $_ $xopt{data_file}"; print "$_: $error\n"; } but $error doesn't change if any of the tests fail Obviously my "eval" is wrong but I've tried it a bunch of different ways and cant get it work. Could someone point me in the right direction? Thanks Jay -------------- next part -------------- An HTML attachment was scrubbed... URL: From drench+chipm at gmail.com Tue Oct 6 10:21:27 2009 From: drench+chipm at gmail.com (Dan Rench) Date: Tue, 6 Oct 2009 12:21:27 -0500 Subject: [Chicago-talk] Doing "-X" tests in a loop In-Reply-To: <39eaccc10910060917v7fb1f05boe12aeba6b7298ebf@mail.gmail.com> References: <39eaccc10910060917v7fb1f05boe12aeba6b7298ebf@mail.gmail.com> Message-ID: On Tue, Oct 6, 2009 at 11:17 AM, Jay Strauss wrote: > How would I do "-X" test in a loop?? I've been trying variations on eval, > but can't get it to work: > > ??? ??? foreach (qw[-e -r -s]) { > > ??? ??? ??? eval "$error = $_ unless $_ $xopt{data_file}"; > ??? ??? ??? print "$_: $error\n"; > ??? ??? } Back up a bit. When find yourself using string eval(), stop, because string eval() is almost never a good idea. But I'll bite anyway: if you change that "eval" into a "print" you will see that what's getting eval'ed is something like: " = -e unless -e somefilename": $error is getting interpolated into a blank string, where you want it literal, and your first $_ is unquoted. I think you want $error to contain "-e" or "-r" or "-s", right? Same goes for the bareword that $xopt{data_file} becomes: you'll need to put quotes around it. But what kind of quotes? You could pick single quotes, but you better make sure the name of $xopt{data_file} doesn't contain any characters that mess up your quoting! I'll be condemned to Perl Hell (or at least Heck) for this, but I think this will do what you're asking: eval qq{\$error = '$_' unless $_ '\Q$xopt{data_file}\E'}; Please don't actually use this code! Get rid of eval(), take the result of stat($xopt{data_file}) and go from there. From joel.limardo at forwardphase.com Tue Oct 6 11:00:49 2009 From: joel.limardo at forwardphase.com (Joel Limardo) Date: Tue, 6 Oct 2009 13:00:49 -0500 Subject: [Chicago-talk] Doing "-X" tests in a loop In-Reply-To: <39eaccc10910060917v7fb1f05boe12aeba6b7298ebf@mail.gmail.com> References: <39eaccc10910060917v7fb1f05boe12aeba6b7298ebf@mail.gmail.com> Message-ID: <000601ca46ae$f19ccf40$d4d66dc0$@limardo@forwardphase.com> Do you really even need to know whether there was actually an 'error'? #!/usr/bin/perl -w use strict; use Data::Dumper; my @files = qw|README.TXT note2gap.txt nonexistent.txt|; my %euphoria = map{$_=>[(-e $_), (-f $_), (-s $_)]} @files; print Dumper %euphoria; print q|nonexistent.txt doesn't exist because it doesn't satisfy -f, |. ((!($euphoria{'nonexistent.txt'}[1]))?'true':'false'); print qq|\nREADME.TXT does exist because it does satisfy -f, |. ((($euphoria{'README.TXT'}[1]))?'true':'false'); 1; === output of Dumper, etc. === $VAR1 = 'nonexistent.txt'; $VAR2 = [ undef, undef, undef ]; $VAR3 = 'README.TXT'; $VAR4 = [ 1, 1, '750' ]; $VAR5 = 'note2gap.txt'; $VAR6 = [ 1, 1, '6299' ]; You can always test for undef (print statement output): nonexistent.txt doesn't exist because it doesn't satisfy -f, true README.TXT does exist because it does satisfy -f, true From: chicago-talk-bounces+joel.limardo=forwardphase.com at pm.org [mailto:chicago-talk-bounces+joel.limardo=forwardphase.com at pm.org] On Behalf Of Jay Strauss Sent: Tuesday, October 06, 2009 11:18 AM To: Chicago.pm chatter Subject: [Chicago-talk] Doing "-X" tests in a loop Hi, How would I do "-X" test in a loop? I've been trying variations on eval, but can't get it to work: foreach (qw[-e -r -s]) { eval "$error = $_ unless $_ $xopt{data_file}"; print "$_: $error\n"; } but $error doesn't change if any of the tests fail Obviously my "eval" is wrong but I've tried it a bunch of different ways and cant get it work. Could someone point me in the right direction? Thanks Jay -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at heyjay.com Tue Oct 6 17:46:30 2009 From: me at heyjay.com (Jay Strauss) Date: Tue, 6 Oct 2009 19:46:30 -0500 Subject: [Chicago-talk] Doing "-X" tests in a loop In-Reply-To: References: <39eaccc10910060917v7fb1f05boe12aeba6b7298ebf@mail.gmail.com> Message-ID: <39eaccc10910061746g6ad8e1acv83227d809aadf43a@mail.gmail.com> Thanks Dan, I want to do some file tests, so I can give back meaningful errors to the user and avoid doing work on bad files. I'll look up stat and see how to use it. Thanks Jay On Tue, Oct 6, 2009 at 12:21 PM, Dan Rench > wrote: > On Tue, Oct 6, 2009 at 11:17 AM, Jay Strauss wrote: > > > How would I do "-X" test in a loop? I've been trying variations on eval, > > but can't get it to work: > > > > foreach (qw[-e -r -s]) { > > > > eval "$error = $_ unless $_ $xopt{data_file}"; > > print "$_: $error\n"; > > } > > Back up a bit. When find yourself using string eval(), stop, because > string eval() is almost never a good idea. > > But I'll bite anyway: if you change that "eval" into a "print" you > will see that what's getting eval'ed is something like: " = -e unless > -e somefilename": $error is getting interpolated into a blank string, > where you want it literal, and your first $_ is unquoted. I think you > want $error to contain "-e" or "-r" or "-s", right? Same goes for the > bareword that $xopt{data_file} becomes: you'll need to put quotes > around it. But what kind of quotes? You could pick single quotes, but > you better make sure the name of $xopt{data_file} doesn't contain any > characters that mess up your quoting! > > I'll be condemned to Perl Hell (or at least Heck) for this, but I > think this will do what you're asking: > > eval qq{\$error = '$_' unless $_ '\Q$xopt{data_file}\E'}; > > Please don't actually use this code! Get rid of eval(), take the > result of stat($xopt{data_file}) and go from there. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at heyjay.com Tue Oct 6 17:48:24 2009 From: me at heyjay.com (Jay Strauss) Date: Tue, 6 Oct 2009 19:48:24 -0500 Subject: [Chicago-talk] Doing "-X" tests in a loop In-Reply-To: <2251071046185507@unknownmsgid> References: <39eaccc10910060917v7fb1f05boe12aeba6b7298ebf@mail.gmail.com> <2251071046185507@unknownmsgid> Message-ID: <39eaccc10910061748t547cddf8oc7429c7c342fb069@mail.gmail.com> My intent was to loop through the -x tests and stop on the first failure. I'll play around with your way too. Thanks Jay On Tue, Oct 6, 2009 at 1:00 PM, Joel Limardo wrote: > Do you really even need to know whether there was actually an ?error?? > > > > #!/usr/bin/perl -w > > use strict; > > use Data::Dumper; > > > > my @files = qw|README.TXT note2gap.txt nonexistent.txt|; > > my %euphoria = map{$_=>[(-e $_), (-f $_), (-s $_)]} @files; > > > > print Dumper %euphoria; > > > > print q|nonexistent.txt doesn't exist because it doesn't satisfy -f, |. > ((!($euphoria{'nonexistent.txt'}[1]))?'true':'false'); > > print qq|\nREADME.TXT does exist because it does satisfy -f, |. > ((($euphoria{'README.TXT'}[1]))?'true':'false'); > > > > 1; > > > > === output of Dumper, etc. === > > $VAR1 = 'nonexistent.txt'; > > $VAR2 = [ > > undef, > > undef, > > undef > > ]; > > $VAR3 = 'README.TXT'; > > $VAR4 = [ > > 1, > > 1, > > '750' > > ]; > > $VAR5 = 'note2gap.txt'; > > $VAR6 = [ > > 1, > > 1, > > '6299' > > ]; > > > > You can always test for undef (print statement output): > > > > nonexistent.txt doesn't exist because it doesn't satisfy -f, true > > README.TXT does exist because it does satisfy -f, true > > > > > > *From:* chicago-talk-bounces+joel.limardo=forwardphase.com at pm.org [mailto: > chicago-talk-bounces+joel.limardo = > forwardphase.com at pm.org] *On Behalf Of *Jay Strauss > *Sent:* Tuesday, October 06, 2009 11:18 AM > *To:* Chicago.pm chatter > *Subject:* [Chicago-talk] Doing "-X" tests in a loop > > > > Hi, > > How would I do "-X" test in a loop? I've been trying variations on eval, > but can't get it to work: > > foreach (qw[-e -r -s]) { > > eval "$error = $_ unless $_ $xopt{data_file}"; > print "$_: $error\n"; > } > > but $error doesn't change if any of the tests fail > > Obviously my "eval" is wrong but I've tried it a bunch of different ways > and cant get it work. > > Could someone point me in the right direction? > > Thanks > Jay > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.velox at vvelox.net Thu Oct 8 17:37:09 2009 From: v.velox at vvelox.net (Zane C.B.) Date: Thu, 8 Oct 2009 19:37:09 -0500 Subject: [Chicago-talk] VFS In-Reply-To: <841e880a0910050828r581a657bh183b59de82527248@mail.gmail.com> References: <20091004145956.3879b7bf@vixen42.vulpes> <841e880a0910050828r581a657bh183b59de82527248@mail.gmail.com> Message-ID: <20091008193709.0d8df449@vixen42.vulpes> On Mon, 5 Oct 2009 10:28:11 -0500 Warren Lindsey wrote: > Will it support FUSE or Plan 9's 9P fs? > > On Sun, Oct 4, 2009 at 2:59 PM, Zane C.B. > wrote: > > I am starting work on useful and fully documented VFS in Perl. Any > > one have any requests/suggestions/etc. It will support any thing a backend is written for. Currently finishing up the file backend and then I will be releasing it. The initial supported functions are going to be as below. chdir chown chmod close eof getc getpos mimetype read readAll setpos write "readAll" and "mimetype" are two non-standard ones. "readAll" simplifies reading all of a handle with out a loop. "mimetype" returns the preferred MIME type of handle. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 196 bytes Desc: not available URL: From fasteliteprogrammer at yahoo.com Sun Oct 11 13:57:04 2009 From: fasteliteprogrammer at yahoo.com (Craig) Date: Sun, 11 Oct 2009 13:57:04 -0700 (PDT) Subject: [Chicago-talk] perl 5.10.1 ubuntu question Message-ID: <795437.70642.qm@web36503.mail.mud.yahoo.com> Does anyone know whwere i can get a perl 5.10.1 for PPA? From chimcentral at yahoo.com Mon Oct 12 08:42:09 2009 From: chimcentral at yahoo.com (chimcentral at yahoo.com) Date: Mon, 12 Oct 2009 08:42:09 -0700 (PDT) Subject: [Chicago-talk] jobs at optiver... Message-ID: <607966.4013.qm@web44807.mail.sp1.yahoo.com> hey guys, i haven't been to a meeting in some time but have been lurking. i work for a trading company (Optiver, in house proprietary trading applications) and we are looking for talented application engineers (configure, support, architect, enhance) and linux sysadmins. With both jobs, perl scripting abilities is highly desired. First, sorry if this isn't the correct route to announce this. Second, next meeting, would it be ok if we had our HR person drop by and chat, talk about the company, etc? or...this can be done electronically i guess. Third, i am not a recruiter fyi. i have been to a couple pm meetings in chicago and know there is more talent there than the crud recruiters bring to us. thanks and again, sorry if this isn't the right venue/list for this. matt From sean at blanton.com Mon Oct 12 13:16:39 2009 From: sean at blanton.com (Sean Blanton) Date: Mon, 12 Oct 2009 15:16:39 -0500 Subject: [Chicago-talk] jobs at optiver... In-Reply-To: <607966.4013.qm@web44807.mail.sp1.yahoo.com> References: <607966.4013.qm@web44807.mail.sp1.yahoo.com> Message-ID: Hi Matt, I'd like to hear a bit about how Optiver uses Perl to support their cutting edge high-frequency trading operations that I read about in the New York Times. If we get a context and some specifics for how Perl is used, it would be interesting to those not actively seeking a job as well as those that might be. I gave a talk at a previous meeting where I talked about our company and software and at the end suggested anyone interested should contact me. I did/tried to spend most of the time on the broader technology challenges and how Perl helps us. Regards, Sean On Mon, Oct 12, 2009 at 10:42 AM, chimcentral at yahoo.com < chimcentral at yahoo.com> wrote: > hey guys, > > i haven't been to a meeting in some time but have been lurking. > > i work for a trading company (Optiver, in house proprietary trading > applications) and we are looking for talented application engineers > (configure, support, architect, enhance) and linux sysadmins. With both > jobs, perl scripting abilities is highly desired. > > First, sorry if this isn't the correct route to announce this. > Second, next meeting, would it be ok if we had our HR person drop by and > chat, talk about the company, etc? or...this can be done electronically i > guess. > Third, i am not a recruiter fyi. i have been to a couple pm meetings in > chicago and know there is more talent there than the crud recruiters bring > to us. > > thanks and again, sorry if this isn't the right venue/list for this. > > matt > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at blanton.com Mon Oct 12 14:21:00 2009 From: sean at blanton.com (Sean Blanton) Date: Mon, 12 Oct 2009 16:21:00 -0500 Subject: [Chicago-talk] jobs at optiver... In-Reply-To: <607966.4013.qm@web44807.mail.sp1.yahoo.com> References: <607966.4013.qm@web44807.mail.sp1.yahoo.com> Message-ID: Also, Matt, you can always organize your own meeting or get-together. I think it's fine to announce a meeting for your HR people who are interested in talking with group members and providing them with opportunities for careers and free beer. On Mon, Oct 12, 2009 at 10:42 AM, chimcentral at yahoo.com < chimcentral at yahoo.com> wrote: > hey guys, > > i haven't been to a meeting in some time but have been lurking. > > i work for a trading company (Optiver, in house proprietary trading > applications) and we are looking for talented application engineers > (configure, support, architect, enhance) and linux sysadmins. With both > jobs, perl scripting abilities is highly desired. > > First, sorry if this isn't the correct route to announce this. > Second, next meeting, would it be ok if we had our HR person drop by and > chat, talk about the company, etc? or...this can be done electronically i > guess. > Third, i am not a recruiter fyi. i have been to a couple pm meetings in > chicago and know there is more talent there than the crud recruiters bring > to us. > > thanks and again, sorry if this isn't the right venue/list for this. > > matt > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fasteliteprogrammer at gmail.com Sun Oct 18 17:21:50 2009 From: fasteliteprogrammer at gmail.com (Craig) Date: Sun, 18 Oct 2009 19:21:50 -0500 Subject: [Chicago-talk] perl 5.10.1 linux Question Message-ID: <4ADBB11E.70404@gmail.com> I am plan to update my perl 5.10.1 on fedora 11 and i want to know when i do install do i have to reinstall everything or will it break? I just want to hear some pointers about this:) From sean at blanton.com Sun Oct 18 19:02:45 2009 From: sean at blanton.com (Sean Blanton) Date: Sun, 18 Oct 2009 21:02:45 -0500 Subject: [Chicago-talk] perl 5.10.1 linux Question In-Reply-To: <4ADBB11E.70404@gmail.com> References: <4ADBB11E.70404@gmail.com> Message-ID: Update to which version and what do you mean by 'everything'? On Sun, Oct 18, 2009 at 7:21 PM, Craig wrote: > I am plan to update my perl 5.10.1 on fedora 11 and i want to know when i > do install do i have to reinstall everything or will it break? > > I just want to hear some pointers about this:) > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fasteliteprogrammer at gmail.com Mon Oct 19 06:02:44 2009 From: fasteliteprogrammer at gmail.com (Craig) Date: Mon, 19 Oct 2009 08:02:44 -0500 Subject: [Chicago-talk] perl 5.10.1 linux Question In-Reply-To: References: <4ADBB11E.70404@gmail.com> Message-ID: <4ADC6374.7070207@gmail.com> i mean all the tools that come with perl when you download the source. > Update to which version and what do you mean by 'everything'? > > > On Sun, Oct 18, 2009 at 7:21 PM, Craig > wrote: > > I am plan to update my perl 5.10.1 on fedora 11 and i want to know > when i do install do i have to reinstall everything or will it break? > > I just want to hear some pointers about this:) > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From warren.lindsey at gmail.com Mon Oct 19 09:01:18 2009 From: warren.lindsey at gmail.com (Warren Lindsey) Date: Mon, 19 Oct 2009 11:01:18 -0500 Subject: [Chicago-talk] perl 5.10.1 linux Question In-Reply-To: <4ADC6374.7070207@gmail.com> References: <4ADBB11E.70404@gmail.com> <4ADC6374.7070207@gmail.com> Message-ID: After restaging my personal Linux boxen many times over the years, I've come to learn when using package based distros you must make a decision early on whether to install your own perl and modules or to use the provided pkgs/rpms. After installing and upgrading your Linux a few times you'll find a system that works for you. Once you start to approach the enterprise level you can start to look at tools like puppet or chef to help out. On Oct 19, 2009, at 8:02 AM, Craig wrote: > i mean all the tools that come with perl when you download the source. > > >> Update to which version and what do you mean by 'everything'? >> >> >> On Sun, Oct 18, 2009 at 7:21 PM, Craig >> wrote: >> I am plan to update my perl 5.10.1 on fedora 11 and i want to know >> when i do install do i have to reinstall everything or will it break? >> >> I just want to hear some pointers about this:) >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> >> >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at blanton.com Mon Oct 19 09:48:25 2009 From: sean at blanton.com (Sean Blanton) Date: Mon, 19 Oct 2009 11:48:25 -0500 Subject: [Chicago-talk] perl 5.10.1 linux Question In-Reply-To: References: <4ADBB11E.70404@gmail.com> <4ADC6374.7070207@gmail.com> Message-ID: I've always built my own, and with any change I prefer to have an isolated test environment, test thoroughly, and have a rollback plan/option. Regards, Sean On Mon, Oct 19, 2009 at 11:01 AM, Warren Lindsey wrote: > After restaging my personal Linux boxen many times over the years, I've > come to learn when using package based distros you must make a decision > early on whether to install your own perl and modules or to use the provided > pkgs/rpms. After installing and upgrading your Linux a few times you'll find > a system that works for you. > > Once you start to approach the enterprise level you can start to look at > tools like puppet or chef to help out. > > On Oct 19, 2009, at 8:02 AM, Craig wrote: > > i mean all the tools that come with perl when you download the source. > > > Update to which version and what do you mean by 'everything'? > > > On Sun, Oct 18, 2009 at 7:21 PM, Craig < > fasteliteprogrammer at gmail.com> wrote: > >> I am plan to update my perl 5.10.1 on fedora 11 and i want to know when i >> do install do i have to reinstall everything or will it break? >> >> I just want to hear some pointers about this:) >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > > > _______________________________________________ > Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joakim.lagerqvist at gmail.com Mon Oct 19 09:51:13 2009 From: joakim.lagerqvist at gmail.com (Joakim Lagerqvist) Date: Mon, 19 Oct 2009 23:51:13 +0700 Subject: [Chicago-talk] perl 5.10.1 linux Question In-Reply-To: <4ADC6374.7070207@gmail.com> References: <4ADBB11E.70404@gmail.com> <4ADC6374.7070207@gmail.com> Message-ID: <2e7c9dd20910190951s26ceaffejc9a0798df1428cf3@mail.gmail.com> 2009/10/19 Craig : > i mean all the tools that come with perl when you download the source. I would recommend that you keep the perl that comes with fedora so that you don't break dependencies when you install/updated with tools like yum. Instead you can compile and install a perl that you put in /usr/local (or something) that you can use for anything non-fedora. Additionally use local::lib and install modules in your home directory or somewhere. best, Joakim From lembark at wrkhors.com Tue Oct 20 05:03:18 2009 From: lembark at wrkhors.com (Steven Lembark) Date: Tue, 20 Oct 2009 08:03:18 -0400 Subject: [Chicago-talk] perl 5.10.1 linux Question In-Reply-To: <2e7c9dd20910190951s26ceaffejc9a0798df1428cf3@mail.gmail.com> References: <4ADBB11E.70404@gmail.com> <4ADC6374.7070207@gmail.com> <2e7c9dd20910190951s26ceaffejc9a0798df1428cf3@mail.gmail.com> Message-ID: <20091020080318.19997963lembark@wrkhors.com@wrkhors.com> On Mon, 19 Oct 2009 23:51:13 +0700 Joakim Lagerqvist wrote: > 2009/10/19 Craig : > > i mean all the tools that come with perl when you download the source. > > I would recommend that you keep the perl that comes with fedora so > that you don't break dependencies when you install/updated with tools > like yum. > > Instead you can compile and install a perl that you put in /usr/local > (or something) that you can use for anything non-fedora. Additionally > use local::lib and install modules in your home directory or > somewhere. They have worked for me. Some of your 5.10.0 code may have problems due to differences in smart-match handling in 5.10.1. I'd leave the perl that came with your O/S alone: it is part of the core distro. Just build a copy of your own (trivial on today's hardware) with something like: perl -d -e -Dprefix=/opt/perl/5.10 -Duseshrplib -Doptimize='-O3 -march=barcelona -pipe'; To avoid version conflicts and test out new versions, I put them in separate subdir's by version number. Upgrading the version after testing it requires only: cd /opt/perl; rm *; ln -fs /* .; and /opt/perl/bin/, etc, all point to the version I want to use. Downgrading is just a matter of a cd, rm, and symlinking an older version. If you get sick of typing /opt/perl/bin/perl (or don't want your $PATH to get a mile long) then just: cd /opt/bin/; ln -fs ../perl/bin/* .; and put /opt/bin/ onto your path. The version- speicfic links make upgrades and downgrades invisible to the code. Anything that requires a specific version can use #!/opt/perl/5.8/bin/perl The version directory also avoids issues with overwriting working library versiosn with new ones during testing. You can also use: #!/bin/env perl to run perl from your path, which allows testing the newer versions by updating your path; the default path can be just "/opt/bin:..." to get the current version from /opt/perl. enjoi -- Steven Lembark 85-09 90th St. Workhorse Computing Woodhaven, NY, 11421 lembark at wrkhors.com +1 888 359 3508 From drench+chipm at gmail.com Tue Oct 20 15:16:04 2009 From: drench+chipm at gmail.com (Dan Rench) Date: Tue, 20 Oct 2009 17:16:04 -0500 Subject: [Chicago-talk] More code that will send me to Perl Purgatory Message-ID: At some point JSON.pm renamed its True() to true() and False() to false(). If there was a "deprecated" grace period that supported both it's past. The code I was working on needed to run on a set of servers with up-to-date JSON, as well as one black sheep that's running all ancient libraries on Perl 5.6.1. It couldn't get upgraded for various reasons. I ended up with this (comments removed because it's more fun that way): my $JSON_true = eval { JSON::true() } || eval { JSON::True() }; my $JSON_false = eval { JSON::false() }; if (! defined $JSON_false) { $JSON_false = eval { JSON::False() }; } My sympathies to future maintainers. From andy at petdance.com Wed Oct 21 15:37:09 2009 From: andy at petdance.com (Andy Lester) Date: Wed, 21 Oct 2009 17:37:09 -0500 Subject: [Chicago-talk] Poll: Which editor(s) or IDE(s) are you using for Perl development? References: Message-ID: <5136F914-A7EB-4FFD-B0F1-FC04C68D3931@petdance.com> Begin forwarded message: > From: Gabor Szabo > Date: October 21, 2009 5:26:08 PM CDT > To: PM Groups > Subject: [pm_groups] Poll: Which editor(s) or IDE(s) are you using > for Perl development? > > Please read this and if possible forward this to your PM group > ---------------- > > Hi, > > I have setup a simple 5-second poll to find out what editor(s) or > IDE(s) > people use for Perl development. I'd appreciate very much if you > clicked > on the link and answered the question. You can mark up to 3 answers. > > Please also forward this mail in the company you are working and to > people > in your previous company so we can get a large and diverse set of > responses. > > The poll will be closed within a week or after we reached 1000 voters. > Whichever comes first. > > Please act now! > > http://bit.ly/2V8Ltz > > > thanks > Gabor > http://szabgab.com/blog.html > http://perlmongers.wordpress.com/ -- Andy Lester => andy at petdance.com => www.theworkinggeek.com => AIM:petdance From pcmantz at gmail.com Wed Oct 21 21:34:23 2009 From: pcmantz at gmail.com (Paul Mantz) Date: Wed, 21 Oct 2009 23:34:23 -0500 Subject: [Chicago-talk] Hackathon! Message-ID: <42f28fe0910212134t783705c1x4c8f91ba29ec2c2b@mail.gmail.com> Hey guys, Pumping Station: One is having our monthly Hackathon again. We're going to show up sometime around 8pm this Saturday night, and code until you pass out or choose to go home to your comfortable beds. Last time was a lot of fun; we had a few people from perl mongers show up, and it would be great if we had more. If you want to work in something besides perl, there's a wide variety of people with various specialties to collaborate with. Some caffeine will be provided, but more is always welcome. If you know of any other groups that might be interested in coding all night, feel free to pass this message along. For more information about Pumping Station: One, please see http://pumpingstationone.org/blog/about.html . Adios, -- Paul Mantz http://www.mcpantz.org Zmanda - Open source backup and recovery http://www.zmanda.com/ From andy at petdance.com Wed Oct 21 21:38:16 2009 From: andy at petdance.com (Andy Lester) Date: Wed, 21 Oct 2009 23:38:16 -0500 Subject: [Chicago-talk] Hackathon! In-Reply-To: <42f28fe0910212134t783705c1x4c8f91ba29ec2c2b@mail.gmail.com> References: <42f28fe0910212134t783705c1x4c8f91ba29ec2c2b@mail.gmail.com> Message-ID: On Oct 21, 2009, at 11:34 PM, Paul Mantz wrote: > Pumping Station: One is having our monthly Hackathon again. We're > going to show up sometime around 8pm this Saturday night, and code Aw heck, that sounds like fun, but I can't. Please let us know about these more in advance! xoxo, Andy -- Andy Lester => andy at petdance.com => www.theworkinggeek.com => AIM:petdance From jon-chicagotalk at jrock.us Thu Oct 22 01:04:03 2009 From: jon-chicagotalk at jrock.us (Jonathan Rockway) Date: Thu, 22 Oct 2009 03:04:03 -0500 Subject: [Chicago-talk] More code that will send me to Perl Purgatory In-Reply-To: (Dan Rench's message of "Tue, 20 Oct 2009 17:16:04 -0500") References: Message-ID: <87ljj3x3bg.fsf@bar.jrock.us> * On Tue, Oct 20 2009, Dan Rench wrote: > At some point JSON.pm renamed its True() to true() and False() to > false(). If there was a "deprecated" grace period that supported both > it's past. The code I was working on needed to run on a set of servers > with up-to-date JSON, as well as one black sheep that's running all > ancient libraries on Perl 5.6.1. It couldn't get upgraded for various > reasons. > > I ended up with this (comments removed because it's more fun that way): > > my $JSON_true = eval { JSON::true() } || eval { JSON::True() }; > my $JSON_false = eval { JSON::false() }; > > if (! defined $JSON_false) { > $JSON_false = eval { JSON::False() }; > } Uh, "exists" works on the symbol table: use JSON; say 'False' if exists $JSON::{False}; say 'false' if exists $JSON::{false}; This means you can just ||= in a "reasonable default": BEGIN { $JSON::{False} ||= $JSON::{false} } Regards, Jonathan Rockway -- print just => another => perl => hacker => if $,=$" From drench+chipm at gmail.com Thu Oct 22 08:09:25 2009 From: drench+chipm at gmail.com (Dan Rench) Date: Thu, 22 Oct 2009 10:09:25 -0500 Subject: [Chicago-talk] More code that will send me to Perl Purgatory In-Reply-To: <87ljj3x3bg.fsf@bar.jrock.us> References: <87ljj3x3bg.fsf@bar.jrock.us> Message-ID: On Thu, Oct 22, 2009 at 3:04 AM, Jonathan Rockway wrote: > Uh, "exists" works on the symbol table: > > ?use JSON; > ?say 'False' if exists $JSON::{False}; > ?say 'false' if exists $JSON::{false}; I normally associate symbol table manipulation with hacks that need "no strict 'refs'" so I didn't even consider something like that. But it's obvious now that I should have. If I have to update that code some day (hoping not to), it's going in like that. Thanks. From tigerpeng2001 at yahoo.com Thu Oct 22 12:11:29 2009 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Thu, 22 Oct 2009 12:11:29 -0700 (PDT) Subject: [Chicago-talk] split function and zero-width seperator Message-ID: <621976.45611.qm@web58701.mail.re1.yahoo.com> Hello everyone, ? I am trying to?isolate numbers from string, manipulate the numbers then put them back to original positions in the string. When I try to use zero-width separator, the split function looks weird, it generated?much more elements than I expect. ? Are?there any mistakes? Why the split behaviors like this? (The regexp?looks right when I use it with s///) ? Could anyone help? ? Thanks, Tiger #build the seperator :-) perl -le '$a = "15678.91 ml; r45.12 "; ????????????? $a =~ s/((?!(\d|\.))(?<=(\d|\.)))|((?=(\d|\.))(? -------------- next part -------------- _______________________________________________ China-pm mailing list China-pm at pm.org http://mail.pm.org/mailman/listinfo/china-pm From tigerpeng2001 at yahoo.com Thu Oct 22 12:37:16 2009 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Thu, 22 Oct 2009 12:37:16 -0700 (PDT) Subject: [Chicago-talk] split function and zero-width seperator In-Reply-To: <621976.45611.qm@web58701.mail.re1.yahoo.com> References: <621976.45611.qm@web58701.mail.re1.yahoo.com> Message-ID: <639933.57328.qm@web58701.mail.re1.yahoo.com> I found the answer by checking?perldoc of split, it says: If the PATTERN contains parentheses, additional list elements are created from each matching substring in the delimiter.? It seems I have to simplify the seperater (PATTERN) first. perl -MData::Dumper -le '$s=chr(127); ???????????????????????? $a = "15678.91 ml; r45.12 "; ???????????????????????? $a =~ s/((?!(\d|\.))(?<=(\d|\.)))|((?=(\d|\.))(? To: Chicago.pm chatter Sent: Thu, October 22, 2009 2:11:29 PM Subject: [Chicago-talk] split function and zero-width seperator Hello everyone, ? I am trying to?isolate numbers from string, manipulate the numbers then put them back to original positions in the string. When I try to use zero-width separator, the split function looks weird, it generated?much more elements than I expect. ? Are?there any mistakes? Why the split behaviors like this? (The regexp?looks right when I use it with s///) ? Could anyone help? ? Thanks, Tiger #build the seperator :-) perl -le '$a = "15678.91 ml; r45.12 "; ????????????? $a =~ s/((?!(\d|\.))(?<=(\d|\.)))|((?=(\d|\.))(? From szabgab at gmail.com Thu Oct 22 14:05:05 2009 From: szabgab at gmail.com (Gabor Szabo) Date: Thu, 22 Oct 2009 23:05:05 +0200 Subject: [Chicago-talk] Virtual visit to Chicago Perl Mongers Message-ID: Hi, I know you will hate me for this but I could not help. I am on a virtual world tour to visit Perl Monger groups and blog about them. This time I visited Chicago.pm http://perlmongers.wordpress.com/2009/10/22/perl-mongers-in-chicago/ regards Gabor -- Gabor Szabo http://szabgab.com/blog.html From cjhamil at gmail.com Thu Oct 22 14:54:01 2009 From: cjhamil at gmail.com (Chris Hamilton) Date: Thu, 22 Oct 2009 16:54:01 -0500 Subject: [Chicago-talk] Virtual visit to Chicago Perl Mongers In-Reply-To: References: Message-ID: Gabor, Please note that this is my own personal opinion, I certainly don't want to speak for anyone else... Not to be overly critical of your blog post (and you are of course entitled to your opinions), but I'm somewhat confused as to the purpose of your blog as it seems only to exist to critique the web sites of PM groups rather than actually providing any insight whatsoever into the actual groups themselves. Let me state up front that I'm nothing more than a quiet observer of the information exchanged by this PM group (I'm fairly certain this is my first message to the mailing list ever, actually), but I have found those involved here to be extremely quick to respond to questions and also exceptionally knowledgeable with the guidance provided in their replies. Also, although I've seen somewhat of a decline in email traffic regarding meetings recently, in the past meetings seemed to be semi-regularly setup and attended. That being said, I can't disagree with your underlying point that the website very likely is in need of attention, though I can't comment too much on that as I haven't had need to visit it since I first joined the mailing list. I guess I just don't see the correlation between your purported goal of meeting PM groups and your apparent desire to almost completely disregard any communication on the mailing list prior to posting your blog entry which seems, at least to me, to be overly negative with little to no effort put forth to meet or interact with this group prior to its writing whatsoever. My apologies if I seem overly defensive or critical, I have just found the Chicago Perl Mongers to be positive, insightful, and helpful time and time again in the nearly 2 years I have been following their mailing list. Sincerely, Chris Hamilton On Thu, Oct 22, 2009 at 4:05 PM, Gabor Szabo wrote: > Hi, > > I know you will hate me for this but I could not help. > I am on a virtual world tour to visit Perl Monger groups and > blog about them. > > This time I visited Chicago.pm > > http://perlmongers.wordpress.com/2009/10/22/perl-mongers-in-chicago/ > > > regards > Gabor > > -- > Gabor Szabo > http://szabgab.com/blog.html > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From szabgab at gmail.com Thu Oct 22 15:28:14 2009 From: szabgab at gmail.com (Gabor Szabo) Date: Fri, 23 Oct 2009 00:28:14 +0200 Subject: [Chicago-talk] Virtual visit to Chicago Perl Mongers In-Reply-To: References: Message-ID: Hi, If you read all the posts than you saw I started off by an encouraging post and a very positive one and even the on about Grand Rapid is still ok. By the time I got to Chicago.pm I got a tired of several others I had to skip as those were hopelessly broken. (I sent them messages about this so I hope some of them will improve their sites.) I guess I should have first sent a report on what is broken on the site and wait till someone fixes it and blog only after that. I am sorry for not doing that. Luckily that blog is not syndicated so there is still time to fix some of these issues and then I can rewrite the blog before sending it off to more readers. regards Gabor On Thu, Oct 22, 2009 at 11:54 PM, Chris Hamilton wrote: > Gabor, > > Please note that this is my own personal opinion, I certainly don't want to > speak for anyone else... > > Not to be overly critical of your blog post (and you are of course entitled > to your opinions), but I'm somewhat confused as to the purpose of your blog > as it seems only to exist to critique the web sites of PM groups rather than > actually providing any insight whatsoever into the actual groups themselves. > > Let me state up front that I'm nothing more than a quiet observer of the > information exchanged by this PM group (I'm fairly certain this is my first > message to the mailing list ever, actually), but I have found those involved > here to be extremely quick to respond to questions and also exceptionally > knowledgeable with the guidance provided in their replies.? Also, although > I've seen somewhat of a decline in email traffic regarding meetings > recently, in the past meetings seemed to be semi-regularly setup and > attended. > > That being said, I can't disagree with your underlying point that the > website very likely is in need of attention, though I can't comment too much > on that as I haven't had need to visit it since I first joined the mailing > list. > > I guess I just don't see the correlation between your purported goal of > meeting PM groups and your apparent desire to almost completely disregard > any communication on the mailing list prior to posting your blog entry which > seems, at least to me, to be overly negative with little to no effort put > forth to meet or interact with this group prior to its writing whatsoever. > > My apologies if I seem overly defensive or critical, I have just found the > Chicago Perl Mongers to be positive, insightful, and helpful time and time > again in the nearly 2 years I have been following their mailing list. > > Sincerely, > Chris Hamilton > > On Thu, Oct 22, 2009 at 4:05 PM, Gabor Szabo wrote: >> >> Hi, >> >> I know you will hate me for this but I could not help. >> I am on a virtual world tour to visit Perl Monger groups and >> blog about them. >> >> This time I visited Chicago.pm >> >> http://perlmongers.wordpress.com/2009/10/22/perl-mongers-in-chicago/ >> >> >> regards >> ? Gabor >> >> -- >> Gabor Szabo >> http://szabgab.com/blog.html From tigerpeng2001 at yahoo.com Thu Oct 22 20:36:33 2009 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Thu, 22 Oct 2009 20:36:33 -0700 (PDT) Subject: [Chicago-talk] split function and zero-width seperator In-Reply-To: <639933.57328.qm@web58701.mail.re1.yahoo.com> References: <621976.45611.qm@web58701.mail.re1.yahoo.com> <639933.57328.qm@web58701.mail.re1.yahoo.com> Message-ID: <241912.16407.qm@web58707.mail.re1.yahoo.com> No, as the matching deleimters are captured. I can use the numbers as seperator. perl -MData::Dumper -MRegexp::Common -le ' ??? $a="15678.91 ml; .121 0.12312? 12313. r45.12 "; ??? @a= grep {! /^$/} split /($RE{num}{real})/, $a; ??? print Dumper? \@a' $VAR1 = [ ????????? '15678.91', ????????? ' ml; ', ????????? '.121', ????????? ' ', ????????? '0.12312', ????????? '? ', ????????? '12313.', ????????? ' r', ????????? '45.12', ????????? ' ' ??????? ]; ________________________________ From: tiger peng To: Chicago.pm chatter Sent: Thu, October 22, 2009 2:37:16 PM Subject: Re: [Chicago-talk] split function and zero-width seperator I found the answer by checking?perldoc of split, it says: If the PATTERN contains parentheses, additional list elements are created from each matching substring in the delimiter.? It seems I have to simplify the seperater (PATTERN) first. perl -MData::Dumper -le '$s=chr(127); ???????????????????????? $a = "15678.91 ml; r45.12 "; ???????????????????????? $a =~ s/((?!(\d|\.))(?<=(\d|\.)))|((?=(\d|\.))(? To: Chicago.pm chatter Sent: Thu, October 22, 2009 2:11:29 PM Subject: [Chicago-talk] split function and zero-width seperator Hello everyone, ? I am trying to?isolate numbers from string, manipulate the numbers then put them back to original positions in the string. When I try to use zero-width separator, the split function looks weird, it generated?much more elements than I expect. ? Are?there any mistakes? Why the split behaviors like this? (The regexp?looks right when I use it with s///) ? Could anyone help? ? Thanks, Tiger #build the seperator :-) perl -le '$a = "15678.91 ml; r45.12 "; ????????????? $a =~ s/((?!(\d|\.))(?<=(\d|\.)))|((?=(\d|\.))(? From fasteliteprogrammer at gmail.com Sat Oct 24 05:47:23 2009 From: fasteliteprogrammer at gmail.com (craig) Date: Sat, 24 Oct 2009 07:47:23 -0500 Subject: [Chicago-talk] Perl question Message-ID: <4AE2F75B.4090602@gmail.com> When i compile perl 5.10.1 and try to test it with gtk2.But for some reason i was told i don't need to install Glib.pm for my perl to work is this true? From fasteliteprogrammer at gmail.com Sat Oct 24 15:06:46 2009 From: fasteliteprogrammer at gmail.com (craig) Date: Sat, 24 Oct 2009 17:06:46 -0500 Subject: [Chicago-talk] installing cpan error prob Message-ID: <4AE37A76.9020701@gmail.com> I try to install Gtk2 on cpan command line on fedora 11 and i get this error Test Summary Report ------------------- t/GtkIMContext.t (Wstat: 256 Tests: 9 Failed: 1) Failed test: 9 Non-zero exit status: 1 t/GtkTreeView.t (Wstat: 512 Tests: 41 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 123 tests but ran 41. Files=217, Tests=4638, 61 wallclock secs ( 2.61 usr 0.41 sys + 33.91 cusr 5.34 csys = 42.27 CPU) Result: FAIL Failed 2/217 test programs. 1/4638 subtests failed. make: *** [test_dynamic] Error 255 TSCH/Gtk2-1.221.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports TSCH/Gtk2-1.221.tar.gz Running make install make test had returned bad status, won't install without force From sean at blanton.com Sun Oct 25 18:38:56 2009 From: sean at blanton.com (Sean Blanton) Date: Sun, 25 Oct 2009 20:38:56 -0500 Subject: [Chicago-talk] what are these symbol table entries? Message-ID: In the symbol table there are entries like: $_<.\win32.c = '.\win32.c' $_ From lembark at wrkhors.com Sun Oct 25 21:23:01 2009 From: lembark at wrkhors.com (Steven Lembark) Date: Mon, 26 Oct 2009 00:23:01 -0400 Subject: [Chicago-talk] More code that will send me to Perl Purgatory In-Reply-To: <87ljj3x3bg.fsf@bar.jrock.us> References: <87ljj3x3bg.fsf@bar.jrock.us> Message-ID: <20091026002301.5fcb98felembark@wrkhors.com@wrkhors.com> On Thu, 22 Oct 2009 03:04:03 -0500 Jonathan Rockway wrote: > * On Tue, Oct 20 2009, Dan Rench wrote: > > At some point JSON.pm renamed its True() to true() and False() to > > false(). If there was a "deprecated" grace period that supported both > > it's past. The code I was working on needed to run on a set of servers > > with up-to-date JSON, as well as one black sheep that's running all > > ancient libraries on Perl 5.6.1. It couldn't get upgraded for various > > reasons. > > > > I ended up with this (comments removed because it's more fun that way): > > > > my $JSON_true = eval { JSON::true() } || eval { JSON::True() }; > > my $JSON_false = eval { JSON::false() }; > > > > if (! defined $JSON_false) { > > $JSON_false = eval { JSON::False() }; > > } > > Uh, "exists" works on the symbol table: > > use JSON; > say 'False' if exists $JSON::{False}; > say 'false' if exists $JSON::{false}; Sorry for the delayed response. Minimal installer for a named sub: use Symbol qw( qualify_to_ref ); my $handler = \&JSON::False; my $ref = qualify_to_ref 'false', 'JSON'; # undef avoids warnings w/strict. undef &$ref; # assign a ref to a glob => install symbol. *$ref = $handler; with added sanity check: ... my $ref = qualify_to_ref 'false', 'JSON'; *{ $ref{ CODE ] } # it's already there or # or *$ref = $handler; # put it where belongs. Given that False may not be defined (i.e., this is the pre-deprecation code): my $src = qualify_to_ref 'JSON::False'; if( my $handler = *{ $src }{ CODE } ) { my $dst = qualify_to_ref 'JSON::False'; if( *{ $dst }{ CODE } ) { # already got falsies, maybe need pasties? } else { # ok, False exists, false does not: add false. *$dst = $handler; } } else { # no Falsies here at all. } Symbol makes all of this a helluva lot easier. -- Steven Lembark 85-09 90th St. Workhorse Computing Woodhaven, NY, 11421 lembark at wrkhors.com +1 888 359 3508 From lembark at wrkhors.com Sun Oct 25 21:25:31 2009 From: lembark at wrkhors.com (Steven Lembark) Date: Mon, 26 Oct 2009 00:25:31 -0400 Subject: [Chicago-talk] More code that will send me to Perl Purgatory In-Reply-To: References: <87ljj3x3bg.fsf@bar.jrock.us> Message-ID: <20091026002531.7837b238lembark@wrkhors.com@wrkhors.com> On Thu, 22 Oct 2009 10:09:25 -0500 Dan Rench wrote: > I normally associate symbol table manipulation with hacks that need > "no strict 'refs'" so I didn't even consider something like that. But > it's obvious now that I should have. If I have to update that code > some day (hoping not to), it's going in like that. Thanks. perldoc Symbol; Notice "qualify_to_ref". Your refs will be stricter than a general's dominatrix :-) -- Steven Lembark 85-09 90th St. Workhorse Computing Woodhaven, NY, 11421 lembark at wrkhors.com +1 888 359 3508 From sean at blanton.com Mon Oct 26 04:00:29 2009 From: sean at blanton.com (Sean Blanton) Date: Mon, 26 Oct 2009 06:00:29 -0500 Subject: [Chicago-talk] Downtown Meeting Tomorrow? Message-ID: I believe tomorrow is our normal meeting date downtown. I can host (near Chicago and Wells). Any volunteers for topics? Afterwards to nearby Clark Street Ale House? (Seems to be a consistent favorite.) If there are no talks we can go straight to CSAH. The quieter beer garden should still be doable with the current weather forecast. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshua.mcadams at gmail.com Mon Oct 26 10:15:31 2009 From: joshua.mcadams at gmail.com (Joshua) Date: Mon, 26 Oct 2009 12:15:31 -0500 Subject: [Chicago-talk] Downtown Meeting Tomorrow? In-Reply-To: References: Message-ID: <49d805d70910261015o43e8a25bvef952e9ba79ab51@mail.gmail.com> Thanks for getting this thread started... I meant to last week, but went camping and didn't have internet access :) A social meetup sounds good to me! On Mon, Oct 26, 2009 at 6:00 AM, Sean Blanton wrote: > I believe tomorrow is our normal meeting date downtown. I can host (near > Chicago and Wells). Any volunteers for topics? > Afterwards to nearby Clark Street Ale House? (Seems to be a consistent > favorite.) If there are no talks we can go straight to CSAH. The quieter > beer garden should still be doable with the current weather forecast. > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From hwigoda at mindspring.com Mon Oct 26 13:26:02 2009 From: hwigoda at mindspring.com (Hal Wigoda) Date: Mon, 26 Oct 2009 15:26:02 -0500 Subject: [Chicago-talk] Downtown Meeting Tomorrow? In-Reply-To: <49d805d70910261015o43e8a25bvef952e9ba79ab51@mail.gmail.com> References: <49d805d70910261015o43e8a25bvef952e9ba79ab51@mail.gmail.com> Message-ID: <484281B8-AAAD-4A46-82D4-AF17E9AB5269@mindspring.com> i have a class til 8:45 downtown at depaul. Where is CSAH? On Oct 26, 2009, at 12:15 PM, Joshua wrote: > Thanks for getting this thread started... I meant to last week, but > went camping and didn't have internet access :) > > A social meetup sounds good to me! > > On Mon, Oct 26, 2009 at 6:00 AM, Sean Blanton > wrote: >> I believe tomorrow is our normal meeting date downtown. I can host >> (near >> Chicago and Wells). Any volunteers for topics? >> Afterwards to nearby Clark Street Ale House? (Seems to be a >> consistent >> favorite.) If there are no talks we can go straight to CSAH. The >> quieter >> beer garden should still be doable with the current weather forecast. >> >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From sean at blanton.com Mon Oct 26 14:45:48 2009 From: sean at blanton.com (Sean Blanton) Date: Mon, 26 Oct 2009 16:45:48 -0500 Subject: [Chicago-talk] Downtown Meeting Tomorrow? In-Reply-To: <484281B8-AAAD-4A46-82D4-AF17E9AB5269@mindspring.com> References: <49d805d70910261015o43e8a25bvef952e9ba79ab51@mail.gmail.com> <484281B8-AAAD-4A46-82D4-AF17E9AB5269@mindspring.com> Message-ID: Clark Street Ale House is at 742 N Clark, just south of Chicago Ave. I'm sure some people will be there after 9pm if anyone shows up. There is wi-fi there. Discussions and hacking sessions are possible. Since no one has volunteered for a stand-up projected talk, how about we begin at 7 and feel free to come casually late? OpenMake can foot a round or two of refreshments. On Mon, Oct 26, 2009 at 3:26 PM, Hal Wigoda wrote: > i have a class til 8:45 downtown at depaul. > > Where is CSAH? > > > > On Oct 26, 2009, at 12:15 PM, Joshua wrote: > > Thanks for getting this thread started... I meant to last week, but >> went camping and didn't have internet access :) >> >> A social meetup sounds good to me! >> >> On Mon, Oct 26, 2009 at 6:00 AM, Sean Blanton wrote: >> >>> I believe tomorrow is our normal meeting date downtown. I can host (near >>> Chicago and Wells). Any volunteers for topics? >>> Afterwards to nearby Clark Street Ale House? (Seems to be a consistent >>> favorite.) If there are no talks we can go straight to CSAH. The quieter >>> beer garden should still be doable with the current weather forecast. >>> >>> _______________________________________________ >>> Chicago-talk mailing list >>> Chicago-talk at pm.org >>> http://mail.pm.org/mailman/listinfo/chicago-talk >>> >>> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at blanton.com Tue Oct 27 14:27:43 2009 From: sean at blanton.com (Sean Blanton) Date: Tue, 27 Oct 2009 16:27:43 -0500 Subject: [Chicago-talk] Downtown Meeting Tomorrow? In-Reply-To: References: <49d805d70910261015o43e8a25bvef952e9ba79ab51@mail.gmail.com> <484281B8-AAAD-4A46-82D4-AF17E9AB5269@mindspring.com> Message-ID: Reminder. Meetup at Clark St. Ale House. 742 N Clark, just south of Chicago Ave. Free beer from OpenMake Software. Begin at 7pm, no one shows up at that time except Sean so feel free to come late, but free beer may end anytime after 9. On Mon, Oct 26, 2009 at 4:45 PM, Sean Blanton wrote: > Clark Street Ale House is at 742 N Clark, just south of Chicago Ave. I'm > sure some people will be there after 9pm if anyone shows up. There is wi-fi > there. Discussions and hacking sessions are possible. > > Since no one has volunteered for a stand-up projected talk, how about we > begin at 7 and feel free to come casually late? OpenMake can foot a round or > two of refreshments. > > > > > > On Mon, Oct 26, 2009 at 3:26 PM, Hal Wigoda wrote: > >> i have a class til 8:45 downtown at depaul. >> >> Where is CSAH? >> >> >> >> On Oct 26, 2009, at 12:15 PM, Joshua wrote: >> >> Thanks for getting this thread started... I meant to last week, but >>> went camping and didn't have internet access :) >>> >>> A social meetup sounds good to me! >>> >>> On Mon, Oct 26, 2009 at 6:00 AM, Sean Blanton wrote: >>> >>>> I believe tomorrow is our normal meeting date downtown. I can host (near >>>> Chicago and Wells). Any volunteers for topics? >>>> Afterwards to nearby Clark Street Ale House? (Seems to be a consistent >>>> favorite.) If there are no talks we can go straight to CSAH. The quieter >>>> beer garden should still be doable with the current weather forecast. >>>> >>>> _______________________________________________ >>>> Chicago-talk mailing list >>>> Chicago-talk at pm.org >>>> http://mail.pm.org/mailman/listinfo/chicago-talk >>>> >>>> _______________________________________________ >>> Chicago-talk mailing list >>> Chicago-talk at pm.org >>> http://mail.pm.org/mailman/listinfo/chicago-talk >>> >> >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: