Camelia, the Perl 6 bug

IRC log for #november-wiki, 2009-04-20

| Channels | #november-wiki index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:49 Tene http://blogs.gurulabs.com/stephen/2009/​04/more-web-grant-updates---paste.html
00:49 zarah Tene's link is also http://tinyurl.com/c7lqut
00:50 Tene I added filesystem persistence for pastes and a recently-pasted list on the main page
00:55 Tene live kopipasta demo at http://pleasedieinafire.net:2080/
00:55 zarah Tene's link is also http://tinyurl.com/d7jxly
03:48 spinclad zarah: f/w?
03:48 zarah spinclad: eh... wha'?
03:52 Tene spinclad: what is 'f/w'?
03:57 spinclad never mind, i got it: f/w is framework
03:58 spinclad i saw one reference earlier that i couldn't work out, then a later use made it clear.
03:59 Tene ah
04:14 spinclad glad to catch kopipasta up now... i caught your code pastes earlier (tasty pasta indeed), then couldn't connect when i tried later.
04:23 Tene Yeah, my connection at home isn't so great
05:35 ihrd joined #november-wiki
06:01 masak joined #november-wiki
06:15 Tene masak, ihrd: I got kopipasta to save to the filesystem (needs better error handling) and encode the pastes with HTML Entities.
06:15 masak Tene: nice.
06:16 masak I'd like to bring it under the reign of Web::Request and Web::Response, and maybe touch up the stylesheet a bit.
06:16 Tene There's no stylesheet right now.
06:16 masak exactly. :)
06:16 Tene What I *really* want to do is write a module that will simply serve filesystem requests
06:17 masak Tene: sure, go right ahead.
06:17 Tene so I can put the stylesheet on the fs, and just redirect there
06:17 Tene Also, btw, HTML::Entities needs a decode()
06:17 Tene simple to get there from the encode, but I didn't need it yet
06:18 masak mberends and I talked during the weekend about adding DTD validation to Tags. we think statically converting the DTD to a piece of Perl data structure is the way to go.
06:21 Tene that would be nice
06:22 Tene Tags also needs to be separated out into different behavior for HTML, XHTML, etc.
06:25 masak aye.
06:25 masak maybe time to work on a test suite?
06:26 Tene also needs a better name
06:26 Tene 'Tags' is a horrible name. :)
06:26 masak aye.
06:26 Tene also, we need a different name for 'div'
06:26 Tene because it conflicts with the Perl 6 'div'
06:26 masak same with 'map'.
06:27 masak also, we need a way to warn users who just assume that 'div' and 'map' will be named that, without thinking of the Perl 6 functions.
06:27 masak waitwait, isn't the Perl 6 'div' an op?
06:27 Tene not sure
06:28 masak then it's no issue, methinks. the problem with 'map' is that it's a function.
06:28 Tene I was seeing something strange with 'div' and didn't investigate further
06:28 masak ok.
06:29 Tene I'm thinking we just import a few common elements (html, head, body, title, p, ul, ol, li, table, etc) and put the less common tags in a different set of exports
06:29 Tene so you have to ask for :extra or :all or something
06:30 Tene the other option is that default doesn't import anything, and you have to ask for :html, :xhtml, etc.
06:30 Tene but I prefer different modules for that
06:30 Tene but I'm convinceable
06:31 Tene ihrd: I read through Routes.pm a few times, but I don't really get it.  Are there any example uses of Routes?
06:32 Tene oh, t/routes
06:33 Tene Hmm... i don't much like it... will need to think a lot more about why.
06:34 Tene maybe I will change my mind.
06:35 ihrd Tene: hi! sorry, I can`t discuss now, mail me you sugesstions plz
06:35 Tene ihrd: I can't discuss now also
06:35 Tene :)
06:36 Tene masak: I am considering writing an IRC bot that will eval perl 6 and post to kopipasta
06:36 masak Tene: cool.
06:37 Tene anyway, sleep time now
06:37 Tene goodnight all
06:37 masak Tene: we have a better option nowadays than STD.pm
06:37 masak let's talk about it tomorrow. :)
06:37 masak Tene: night.
06:37 Tene yes, I would like suggestions
06:37 Tene I have secret plans of porting POE to Parrot
06:37 masak I'll try Perl 6 parsing a bit locally.
06:38 masak I need it for many different things.
06:38 Tene hm?
06:38 Tene explain?
06:39 masak which part? the one where I need to parse Perl 6?
06:39 Tene Yes, what your goal is.
06:40 masak Tene: with regard to kopipasta, colour coding.
06:40 Tene ah
06:40 masak there's no pastebin that colour codes Perl 6 yet.
06:40 Tene That would be very nice, yes.
06:40 Tene I like that.
06:40 Tene I may experiment as well.
06:40 masak that was the idea with making a pastebin. :)
06:40 masak what's new is that Rakudo can now output a parse tree.
06:40 masak --output=parse
06:41 Tene you can also get a match object in rakudo itself
06:41 masak Tene: matching on a Perl 6 program?
06:41 Tene Yes.
06:42 Tene I can't remember which syntax works right now, but the grammar is in Perl6::Grammar
06:42 masak oh!
06:42 * masak must experiment
06:42 masak I'm amazed at how such fantastic news manages to sneak past me :)
06:43 Tene masak: that's been the case as long as rakudo has been able to match regular expressions
06:43 Tene $text ~~ /<Perl6::Grammar::TOP>/
06:43 Tene works
06:43 Tene kinda
06:43 masak o_O
06:43 masak ok, that's... perfect.
06:44 moritz_ you can try with .parse and :actions
06:44 moritz_ and supply your own actions
06:44 moritz_ and write a Perl 6 compiler in Rakudo ;-)
06:45 masak I'll try that right away.
06:46 masak oh, but it only works for the things Rakudo can parse, of course...
06:46 masak so I still can't use it for user-defined operators.
06:46 masak oh well, I'll use STD.pm for that.
06:46 Tene masak: pmichaud suggested those might be coming RSN
06:46 masak I know.
06:47 masak I just plan to be first. :)
06:47 masak don't mind if the module gets obsoleted in a day.
06:47 Tene What are you needing user-defined ops for?  I don't get what you're doing.
06:49 masak I need it for a number of modules. nothing Web.pm-specific.
06:49 masak to have a really good Set module, we need user-defined ops.
06:49 Tene nodnod
06:50 Tene but what are you trying to parse them for if you can't run them?
06:54 masak Tene: if I can preparse a program, turn the user-defined ops into multisubs, and then run the modified program, I'll have user-defined ops before everyone else :)
06:55 masak I call the idea 'fudo' -- Fake User-Defined Operators.
07:02 Tene okay, I can successfully match against Perl6::Grammar::TOP
07:02 Tene but I can't get a Match object that I can investigate
07:13 moritz_ rakudo: say (1 ~~ /<Perl6::Grammar::TOP>).perl
07:13 p6eval rakudo 0d5515: OUTPUT«say requires an argument at line 1, near " (1 ~~ /<P"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:85)␤»
07:14 moritz_ rakudo: say (1 ~~ /<Perl6::Grammar::TOP>/).perl
07:14 p6eval rakudo 0d5515: OUTPUT«No result object␤current instr.: 'parrot;PCT;Grammar;ast' pc 86 (src/PCT/Grammar.pir:87)␤»
07:17 Tene rakudo: say (1 ~~ /<Perl6::Grammar::TOP>/)<perl><statemen​t_block><statementlist><statement>[0];
07:17 p6eval rakudo 0d5515: OUTPUT«Method 'postcircumfix:{ }' not found for invocant of class 'Failure'␤current instr.: 'postcircumfix:{ }' pc 5633 (src/classes/Associative.pir:133)␤»
07:18 moritz_ Tene: the top level capture would be Perl6::Grammar::TOP
07:18 moritz_ Tene: unless you write Perl6::Grammar.parse(...)
07:18 Tene rakudo: 'say 1' ~~ /<Perl6::Grammar::TOP>/;say $/<Perl6::Grammar::TOP><statement_b​lock><statementlist><statement>[0];
07:18 p6eval rakudo 0d5515: OUTPUT«say 1␤»
07:18 Tene now, if I can just get the positional and named...
07:23 Tene eh, i guess that works...
07:23 Tene Q:PIR
07:27 szabgab joined #november-wiki
07:38 masak yuck. :)
07:52 ihrd woow, this is wonderfull ( I readed your discussion), use rakudo grammar to colorize code will be much faster
07:53 masak ihrd: it is, yes.
07:56 masak should be able to parse the stuff output by --target=parse.
07:57 masak hm, or maybe run it through a simple filter to make it valid Perl 6.
07:57 masak it almost is already.
07:58 wayland__ joined #november-wiki
08:08 masak I played around with filtering line-by-line using regexes. conclusion: probably a better idea to build a grammar.
10:33 wayland76 I presume you know that azawawi did a HTML Perl6 colouriser?
12:27 ruoso joined #november-wiki
12:36 masak wayland76: aye.
12:36 zarah masak: You have new messages. Write '/msg zarah @messages' to read them.
14:26 masak wayland76: that might be good to look at, even though azawawi used Perl 5 for is colourizer.
19:03 sri_kraih joined #november-wiki
22:14 mj41_ joined #november-wiki
22:19 moritz_ joined #november-wiki
22:24 Matt-W joined #november-wiki
23:19 ihrd joined #november-wiki

| Channels | #november-wiki index | Today | | Search | Google Search | Plain-Text | summary