Re: [Boston.pm] cgi form question
On Fri, 2008-01-18 at 15:11 -0500, Mike Williams wrote: On Jan 17, 2008 3:56 PM, Xiong, Bob [EMAIL PROTECTED] wrote: Sure. Please see my code snippet below. use CGI ':standard'; generate_form(); do_work(); Generate_form both starts and ends the form. Do_work tries to add input elements. Those input elements are therefore not part of the form. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] allow user to download a file from web server
On Wed, 2008-01-02 at 12:38 -0500, Xiong, Bob wrote: Thanks, John. But I was looking for the Perl code. I also intended to allow a user to download the file and save it to his/her own computer (without opening it up). Sorry about not making myself clear. - Bob Xiong The trick is to lie to the browser about the content-type. E.g., for a PDF file if you use print $cgi-header('application/pdf); then the browser knows it has PDF data, and will use the correct plugin or helper application to display it. On the other hand, if you claim print $cgi-header('application/octet-stream'); then the browser has no information about what plugin or helper app to use, so will usually pop up the select application or save file to disk dialog. *This is browser-dependent.* The browser can cheat and look at file extensions, or the first few bytes of the file data. But it works most of the time. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] allow user to download a file from web server
On Wed, 2008-01-02 at 12:57 -0500, Christopher Schmidt wrote: I don't think this is the best solution. Instead, one should probably set the Content-Disposition: attachment; filename=preferred_filename.pdf . This will tell the browser Download ths file to the filename specified -- which the browser will then present to the user with that filename as the default, and ask them where to save it, at least in lynx, Firefox, IE6/7, Safari, and Opera. On the one hand, gives the browser a suggested filename. On the other hand, gives the browser a file extension, therefore letting it cheat and go looking for a plugin/helper-app. On balance, it probably is the best way to go with a modern mix of browsers. (IE5 I think was the one that always wanted to cheat.) --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Social Meeting in August
On Tue, 2007-08-14 at 11:07 -0400, john saylor wrote: hi On 8/14/07, Ronald J Kimball [EMAIL PROTECTED] wrote: Or would people rather do something on the weekend? i attend so infrequently, i do not expect my preference to carry much weight, but this sunday night [19 aug] would be good for me. The advantage of Tuesday is that it's easier to fit a large group into a bar or restaurant than it would be on a weekend night. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
[Boston.pm] Moose vs Kakuro
Moose 0.18 just hit the FreeBSD ports, so I tried my kakuro benchmark: Mooseless 0m17.8s Moose 0.13 9m05.6s Moose 0.17 3m29.1s Moose 0.18 0m58.3s 0.18 immutable 0m18.1s That is, the new version is more than 3 times faster than the previous. Plus it adds the ability to mark a class as immutable when you are done adding methods, etc. This brings the speed to indistinguishable from Mooseless, given the noise in my testing method. Yay, Moose! --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Perl and DST 2007 -- a couple glitches?
On Tue, 2007-01-23 at 00:41 -0500, Bill Ricker wrote: General advice has been that if the OS is patched for the DST change, Perl will be OK between March 11 and Apr 4, when US DST starts 3 weeks early this year. This is why we need more touch-screen interfaces: so we can spin the minute hand in xclock forward in the spring and back in the fall. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Fwd: Tech Meeting Followup
On Wed, 2007-01-17 at 18:33 -0500, Guillermo Roditi wrote: Efficiency: No, thanks. You are using Moose, runtime loading of objects and runtime instantiation of anon classes. You were doomed way before I came in. Moose is getting better on the efficiency issue. For those who remember my Kakuro code (CPU user time): Mooseless: 0m17.839s Moose 0.13: 8m15.220s Moose 0.17: 3m22.465s --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Loop index in foreach?
On Mon, 2006-09-18 at 08:28 -0700, Palit, Nilanjan wrote: That works too ( I have used it as well), but I guess what I'm really asking (hoping?) for is a Perl special variable, kinda like $., which Perl auto-magically initializes increments ... Perl6 will have a way of iterating over indices and values at the same time. I don't think anyone has back-ported it though. The various somewhat cumbersome ways to code it are your best approaches for now, if you really need the index. Note that you might be able to get away without the index, with a suitable rearrangement of your code: @newarray = map {complicated_function($_)} @array; --kag -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Boger Sent: Monday, September 18, 2006 10:39 AM To: boston-pm@mail.pm.org Subject: Re: [Boston.pm] Loop index in foreach? On Mon, Sep 18, 2006 at 07:30:40AM -0700, Palit, Nilanjan wrote: In a foreach loop, is there a way to find out the loop index number? E.g.: foreach (@myarray) { ... push(@newarray[??loopindex??], somevalue); ... } Currently, I have to resort to the following: for (my $i= 0; $i = $#myarray, $i++) { ... push(@newarray[$i], somevalue); ...} ... which is more wordy -- I was wondering if there's a more elegant/efficient (i.e. less code) to do this? Not sure if I'd call this more elegant, but perhaps my $index = 0; foreach (@myarray) { ... push(@newarray[$index], somevalue); ... $index++; } ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] pretty-printing messages
On Wed, 2006-06-21 at 14:59, Federico Lucifredi wrote: can anyone remind me how that pretty-printing module that El Damian showcased the other year was called? It was able to handle plurals (x file/s deleted), even irregular ones, among the many things ;-) http://search.cpan.org/~dconway/Lingua-EN-Inflect-1.89/lib/Lingua/EN/Inflect.pm might be what you are looking for. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Perl Curses?
On Thu, 2006-06-01 at 15:29, Janet Marie Jackson wrote: I'm writing a command-line program to manage student grading for a course, which will run on the school's Unix boxes (it can't be put on the web for security reasons), and was debating what the best choice is to handle the user interface. Has anyone got some experience with Curses.PM and/or could point me toward any examples or documentation (in addition to CPAN)? Or is there something better to do command-line interfaces? The user will need to be able to select tasks from a menu and then perform them. Take a look at Damian's IO::Prompt. http://search.cpan.org/~dconway/IO-Prompt-v0.99.4/lib/IO/Prompt.pm If it does what you want (and I think it does) then it should be easier to deal with than Curses. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Using Perl to communicate to a Palm device
On Wed, 2005-10-26 at 10:00, Alex Brelsfoard wrote: Has anyone here used Perl to communicate to a Palm device? What I am primarily concerned with is updating the calendar with a specific event. I have a scheduling system, calendar system, and event's registration system that I'd like to create functions for. Basically someone would view an event they would like to remember, click a link which would calla Perl function to create a PDB file which the user is then asked to download or open. This would then send the file in preparation to be hotsync'd. Make sense? If anyone has any good resources (modules, web sites, code, etc.) I would greatly appreciate any advice. I haven't used it for much more than variants on the pdbdump script that comes with the distribution, but http://search.cpan.org/~arensb/p5-Palm-1.3.0/ should have all of the PDB-related functions you need. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Special Tech Meeting w/ Damian Conway, Wed, Oct 26
On Thu, 2005-10-20 at 16:02, Ronald J Kimball wrote: Send your preference to the discussion list. Time::Space::Continuum --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Social Meeting on Thursday with brian d foy
On Tue, 2005-10-18 at 10:55, [EMAIL PROTECTED] wrote: hi ( 05.10.17 22:17 -0400 ) Ronald J Kimball: But first things first, we need to choose a location. Suggestions? brewpub? i'm usually wary of epinions, but this might be a good starting point: http://www.epinions.com/rest-Restaurants-All-Boston_Cambridge-Brewpub I'll agree with CBC and Boston Beer Works being at the top of that list. I'd move John Harvard further up. Finding parking near Davis Square (for Redbones) is probably marginally easier, though. And I don't think Boston.PM has met there, so I'll put my vote in for it. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Social Meeting on Thursday with brian d foy
On Tue, 2005-10-18 at 23:16, Ronald J Kimball wrote: On Mon, Oct 17, 2005 at 11:10:13PM -0400, Uri Guttman wrote: who wants to handle the group reservation? I figured I would start collecting RSVPs once we had agreed on a time. I'll probably be there, but 8pm would be better for me. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
[Boston.pm] brian d foy is in the neighborhood
http://use.perl.org/~brian_d_foy/journal/27200 Emergency Social Meeting? Try to hold it near Hopkinton, or invite brian into town? --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] brian d foy is in the neighborhood
On Mon, 2005-10-17 at 16:22, John Macdonald wrote: On Mon, Oct 17, 2005 at 02:23:40PM -0400, Kenneth A Graves wrote: http://use.perl.org/~brian_d_foy/journal/27200 Emergency Social Meeting? Try to hold it near Hopkinton, or invite brian into town? Brian is actually in Milford - I'm in Hopkinton for the week, I'm flying over tonight and returning Friday, so I'd prefer Tues/Wed/Thursday evenings. Oops. Misread on my part. Metro-west all blends together. The somewhere out there or the somewhere in town question still holds. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] other campus conference pages
Just to update everyone: my contact at Simmons likes the idea of hosting YAPC. The ball is being passed to Conferences and Special Events to figure out if Simmons has the capacity. Uri: What's your guess as to how long do we have to get this together? --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] yapc::boston?
On Fri, 2005-08-26 at 23:17, Uri Guttman wrote: KAG == Kenneth A Graves [EMAIL PROTECTED] writes: KAG http://www.yapc.org/venue-reqs.txt has the full list. The key KAG thing missing from above is a venue to hold dinner for everyone. KAG Toronto did this with the cruise. We should steal that idea: KAG Boston Light and back would be great. they did get the cruise sponsored. no way they (or we) could afford it without outside funds. Pshaw. With all the high-powered tech companies headquartered in Boston, like Digital, Wang, and Thinking Machines, we should have no trouble getting sponsorship. More seriously, the Toronto approach of find out the cost and have a backup dinner/auction plan if no sponsorship comes through, seems correct. (Or have the auction pay for the cruise! No one leaves this boat until we sell these 10 copies of Master Perl 6 in 36 Hours, Unleashed!) --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Perl Parsers
On Thu, 2005-07-28 at 16:11, Mike T. Machenry wrote: It is said that 'only perl can parse Perl' -- Wikipedia I have been searching the 'net for a Perl Parser. I haven't had any luck on CPAN and I found a dead project on sourceforge(t). Does anyone know of any Perl parsers that exist? I understand that lex/yacc can't parse Perl due to ambiguities in the syntax. I would be quite happen with a 95% correct parse tree. I also do not care which language the parser is written in. I would like to hear about any and all parsers that anyone knows about though even if you think they might kind of suck. Thank you. Take a look at http://search.cpan.org/~adamk/PPI-1.002/ No idea how well it works, but it is at least being actively maintained. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] YAPC::NA rideshare
On Wed, 2005-05-04 at 10:59, Sean Quinlan wrote: I'm considering attending YAPC this summer, and was considering driving. Is anyone else planning on driving and would like a backup (or primary) driver who is willing to chip in on costs? Or would anyone be interested in being a backup driver and chip in on costs with me (I'd be renting, size of vehicle dependent on # of passengers). I'm driving through the Adirondacks there and back. (Stopping overnight each way.) Mostly because I saw quite enough of I-90 last year. I've already reserved car and hotels, but might be able to adjust plans if anyone is interested in joining me. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] perl6/pugs
On Mon, 2005-02-28 at 13:32, Aaron Sherman wrote: On Mon, 2005-02-28 at 12:51, Benjamin Kram wrote: Has anyone had a chance to play with pugs? I just svned down a copy and was going to toy with it a bit. Only a little bit. I am, however, sure that the correct way to boost the popularity of your favorite niche language is to write a compiler / interpreter in it for a popular language. Pugs will certainly boost Haskell in this way ;-) I haven't gotten around to playing with Pugs yet, but I did build Haskell this weekend. It's a functional-programming conspiracy. --kag ___ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Weird regex behavior?
Just tried it with version 5.005_03 built for i386-freebsd, and the captures worked. So the problem isn't with all old versions. --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Tech Meeting w/ Damian Conway, Tuesday, July 13
On Thu, 2004-07-01 at 16:43, Ronald J Kimball wrote: Please RSVP to me if you're planning to attend. Because we anticipate a big turnout for this meeting, send your RSVPs now, so we can arrange for a larger room if necessary. Yes. I'll plan on bringing my laptop. --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Tech Meeting w/ Damian Conway, Tuesday, July 13
On Thu, 2004-07-01 at 17:16, Kenneth A Graves wrote: Yes. I'll plan on bringing my laptop. How did I hit reply-to-group? Stupid fingers. Pay no attention to the man hiding behind the laptop. --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Tech Meeting w/ Damian Conway, Tuesday, July 13
On Thu, 2004-07-01 at 23:03, Chris Devers wrote: On Thu, 1 Jul 2004, Kenneth A Graves wrote: On Thu, 2004-07-01 at 17:16, Kenneth A Graves wrote: Yes. I'll plan on bringing my laptop. How did I hit reply-to-group? Stupid fingers. Pay no attention to the man hiding behind the laptop. Oh so it is that big. Good thing the group was warned. Well, it's big enough to block my view of other people. By the Ostrich Principle, it's big enough to block other people's view of me. --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Tech Meeting w/ Damian Conway, Tuesday, July 13
On Thu, 2004-07-01 at 23:34, Kripa Sundar wrote: KAG Pay no attention to the man hiding behind the laptop. why are you going to bring it anyway? damian uses his own ibook. I see you are paying no attention, as advised. :-) He needs it to hide behind. :-) More or less effective than a tin-foil hat at preventing brain damage associated with a Damian talk? Science requires data. --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] OT: DSL service in NE
Federico Lucifredi wrote on 6/27/04 2:32 pm (GMT): is it currently possible to get a DSL line hooked up without the extra 30$ cost of the Verizon phone line typically associated with it? There is a rumor that Verizon will soon offer DSL over naked copper. You would still have to pay for the copper pair, but not for local phone service over it. Poke around dslreports.com. I think most of these rumors get discussed there. --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Tech Meeting Followup
Uri Guttman wrote on 6/16/04 4:19 am (GMT): CD == Chris Devers [EMAIL PROTECTED] writes: CD* Perl 6 Update CD http://damian.conway.org/S eminars//Perl6.html not sure how up to date (whatever that means with p6) this is. Read your conference materials, Uri. He's giving an updated version this afternoon. I think he's concentrating on the new OO stuff. --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Tech Meeting Followup
On Tue, 2004-06-15 at 23:57, Uri Guttman wrote: KAG == Kenneth A Graves [EMAIL PROTECTED] writes: KAG SelfGOL i think he did that here. i remember my wanting it and seeing it. we can chat with him here for info on the newer talks he has. My flaky memory, then. I'll change my vote to Everyday Perl. I saw some of it at a previous YAPC, but it all flashes by so fast... --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] travel plans to YAPC::NA
On Thu, 2004-05-27 at 11:58, Philipp Hanes wrote: I appear to have missed the window of cheap flights to Buffalo from Boston. Yesterday, things were looking like about $160, today they're around $350. Bah. How are people who are going there this year traveling? I really want to go, since I've enjoyed all the previous ones. But that's a pretty steep price, now. Driving seems a little rough, at least on my own. Even if I speed, I don't imagine it'll be under 7 hours. Amtrak is $128 round trip, but takes 11-12 hours each way. What's everyone else doing? YAPC is my one annual escape from my Life-O-Java, and I'd hate to miss it. For some strange reason, commuter rail doesn't reach Buffalo. So I'm renting a car and driving out Tuesday. I'll drive back either Saturday or Sunday. Anyone wanting to share a ride should email me and we'll see if we can figure out the details. --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
[Boston.pm] Perl Medic: the Blog
I walked away from this week's meeting with a copy of Perl Medic, the it book of the moment. (Thanks, Uri.) Now, what every it book needs is a Reading Group. Unfortunately, Oprah seems to have overlooked Perl Medic. So, I'm appropriating a bit of web space from one of my clients to host a blog dedicated to my new acquisition. Everyone else currently reading the book is welcome to come visit, and share their thoughts. I expect to cover a chapter or two a day. http://www.newburyport.k12.ma.us/~kag/medic/ (Because I'd already installed MovableType on that machine. That's why.) --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Which T-station for tomorrow's meeting?
On Mon, 2004-04-26 at 12:52, Kripa Sundar wrote: I am planning to park at Riverside (the D Green line), and take the inbound train. Which T station should I get out at? Do I need to switch to a different Green line? It's a short walk from Kenmore. (Or a short walk from Blandford on the B line. Not sure which is closer, but I doubt it's worth the trouble to switch trains.) --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] OT - cannot SSH into Redhat box
On Tue, 2004-04-20 at 21:32, Ranga Nathan wrote: I installed Redhat server (Enterprise) on a box but I can not SSH into the box. The sshd is running and I can ssh from within the box but not from outside. /etc/hosts.allow and /etc/hosts.deny are both empty. There is no other firewall I can find there. HTTP connection is fine. I checked sshd_config and that looks clean (i.e no blocking entries). I remember going through a similar situation a couple of years ago and have forgotten what I did. Anything I missed out? Check /var/log/secure for error messages. If you are trying to ssh in as root (instead of as yourself, then using su), then there is a config line in sshd_config you'll have to change. If available, try a different ssh client. Instead of running sshd as a daemon, run it in debug mode. Run the ssh client in debug mode as well. Somewhere in the noise might be something useful. --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm
Re: [Boston.pm] Tech meeting?
On Thu, 2004-04-08 at 15:20, Ronald J Kimball wrote: I have at least one other possible location, but it's not on the T. :/ On first parsing, I missed the not, and pictured us all gathered in a red line car... --kag ___ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm