#perl - Sun 18 Mar 2007 between 00:28 and 00:42



thrigkrazyk: did you check CPAN? Would a few regex or a lex-like scanner suffice?
NOTevilGumbyBRAIN: What have you parsed lately?
GumbyBRAINWell you got the last few notebooks have all the cool kids lately.
PerlJamkrazyk: What do you know about the format of the recipes?
krazykHere are some examples...
1/4 cup plus 2 tablespoons unsweetened cocoa powder (not Dutch-process)
6 tablespoons unsalted butter, softened
1/2 pound bittersweet chocolate, finely chopped
killer_thrig: how do I get strace output to file?
f00li5hkrazyk: and what do you want to get out of it?
PerlJamkrazyk: I think we've all seen recipes before. You didn't answer the question.
thrigthe man page for strace discusses the -o option (and handy -ff, depending)
krazykunits, special characteristics such as "not Dutch-process"... everything, really (that's why I gave the examples -- of course you've seen them but they help to explain)
killer_the paste at 435.html is the case where aparently open (SF, ">$filename"); just isn't working
krazykjust looking for some ideas, trying to develop what I aim to accomplish -- it's just for fun
PerlJamkrazyk: Well, if they were in "MealMaster" format, there's a module on CPAN for it already :-)
thrigwhat did I say about not using SF and ">$filename" ? and define "not working"? Does it lay on the sofa? Issue an error?
krazykI want to parse arbitrary recipes in a very general way
PerlJamkrazyk: barring that, I'd start to abstract out the parts that you're interested in and write a parser (maybe using Parse::RecDescent)
krazykPerlJam: yes! that's the answer I wanted to elicit without my saying it
never used RecDescent, but always wanted to :)
killer_thrig: here is the strace.. http://www.paste.me.uk/436.html I haven't spotted anything that give me a clue yet
krazykcan't go wrong with Damian Conway
f00li5hkrazyk: you really can't
krazykany other modules that might help with cooking units?
US policy decisions on units are about as fun as DST policy decisions
gotta work around the "cups" and "tablespoons"
f00li5hkrazyk: sounds like a good place for a class with use overload
thrigkiller_: do we get to see a minimal "this code does not create the file" example?
f00li5hor perhaps Tie::CookingUnits
(which you have to write yourself)
krazykhmmm, maybe that would be a nice place for me to start contributing to CPAN
thrigthen fun distinctions between 1-1/4 or the Unicode/other wacky charset symbol for one fourth
killer_thrig: I'll try to recreate it in another example script.. but it was working here then I noticed no files were being created, so I broke something here. an error message from "die" would be nice
thrigwhat happened to stderr?
killer_dunno.. running from the command line produces NO output.. it should AT LEAST print the "Content-type: text/html\n\n" to the console or an error as to why not
have I turned off stderr somehow?
thrigcurious! that bears looking into.
killer_thrig: if I comment out the list of "my vars" declarations at the begining I get a SLEW of errors at the console
thrigwarnings and strict are Good Things

Page: 3 10 17 24 31 38 45 52 59 66 73 80 87 

IrcArchive