Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-02-04

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:05 jeffreykegler joined #perl6
00:23 jeffreykegler jql: "I see perl6 as the language between the {} in the rules syntax"
00:23 jeffreykegler That makes perl6 sound like a parser generator
00:30 TimToady not on the level of say yacc; it just makes it really easy to write top-down parsers that can call into bottom-up parsers, and really easy to integrate something like a simple operator precedence parser
00:30 TimToady what gets generated automatically is the lexer for all the alternative points in the grammar
00:31 jeffreykegler Yeah, when I saw the rules stuff in the Perl 6 docs
00:31 TimToady but very little in the standard grammar requires more than 1-token lookahead
00:31 jeffreykegler I was thinking just in terms of an extension of regular expressions
00:31 TimToady and there are precisely two spots that use backtracking
00:32 jeffreykegler A feature of the languages like formats in Perl 5
00:32 jeffreykegler Not the framework of the language
00:32 TimToady it would be easy to substitute in a bottom-up matcher that did more lookahead, but I'm not personally interested in making the user look ahead that far
00:32 TimToady let alone the computer
00:33 jordilin joined #perl6
00:33 TimToady the main thing that's going on is that you can derive new grammars and mix in new rules that have the same lexical and grammatical status as the original rules
00:34 jeffreykegler The track record for more than one token of look-ahead is not good
00:34 meppl good night
00:34 TimToady which means every time you mix in more grammar you have to potentially regenerate the lexer
00:34 jeffreykegler Is this going on in a fixed number of phases?
00:35 TimToady and *that* part of it is supposed to be deterministic in the DFA sense
00:35 jeffreykegler The generation of new grammar I mean
00:36 jeffreykegler Is this like a two or three pass process?
00:38 TimToady it's however many passes are necessary; every new language must manage its set of lexers and generate them on demand, caching results for efficiency
00:38 jeffreykegler The top down parser is kind of LL?
00:39 TimToady the same subrule call in a base grammar may call out to a different set of subrules that were mixed in by the derived langauge
00:39 TimToady so it has to keep track of that
00:39 jeffreykegler Not a lot of parsing techniques are very friendly to having their grammars modified on the fly
00:39 TimToady yeah, pretty much LL, but mixing in a bottom-up parser generally gets rid of most left recursion problems
00:39 jeffreykegler LL tends to be only one
00:40 TimToady my feeling is that machines are getting fast enough that we can pay the overhead for the flexibility if we're clever about autogenerating efficient lexers
00:41 TimToady and LL tends to give much better error messages
00:41 justatheory joined #perl6
00:41 jeffreykegler LL does have the advantage that it's intuitive for programmers -- it's just kind of like subroutine calls
00:43 TimToady I hope so; parrot's approximation seems to be well accepted by those writing grammars in it
00:44 TimToady but I really have to finish the autolexing before it can really be properly extensible
00:44 jeffreykegler Is the problem automatically determining where the lexing should end and the LL start?
00:45 TimToady not really, I can already do that, and it's pretty well defined what is "declarative" and what is "procedural" in S05
00:45 TimToady and I can already generate the set of lexemes at a particular set of alternatives
00:45 jeffreykegler So that's what "declarative" and "procedural" are all about!
00:45 TimToady I just have to up and write the NFA/DFA engine
00:45 TimToady for lack of better terms
00:46 TimToady sort of a pattern/action notion
00:46 TimToady but longest tokens are the part we can determine without risking side effects, basically
00:47 TimToady we assume the "procedural" bits have side effects
00:47 TimToady and it seems to be a natural place to break it for lexical purposes
00:48 TimToady tricky bit is letting the lexer tell the parser how much it has already "cheated"
00:48 jeffreykegler I've just done some NFA / DFA programming, so I've kind of got this stuff in mind
00:48 TimToady fortunately we have TDFAs that can at least do captures in DFA region
00:48 TimToady so we don't have to reparse for the
00:49 jeffreykegler Where's the cheating?
00:49 TimToady if you're writing a recursive descent parser, your token may encompass some implicit recursions that you'll have to return from someday
00:50 TimToady we define longest-token matching transitively through subrules
00:50 jeffreykegler TDFA == tagged DFA?
00:50 TimToady yes
00:51 TimToady but I haven't integrated that notion yet.  I was first gonna just write a non-bactracking NFA
00:51 jeffreykegler Right
00:52 jeffreykegler "implicit recursions that you'll have to return from someday"
00:52 TimToady I already have the mechanism to do that
00:52 TimToady basically your tag tells you the route to call down
00:53 TimToady and the rules are smart enough to pay attention to "fate"
00:53 jeffreykegler Does this mean some of the Rec Descent stuff may be returning into your NFA/DFA
00:53 TimToady and just pick up where the token leaves off
00:54 TimToady essentially.  doesn't seem to be a problem in practice
00:54 jeffreykegler If you say so :)
00:54 TimToady the NFA/DFA doesn't really do anything
00:54 TimToady all the "actions" are either above or below it
00:55 jeffreykegler That's why it's "declarative" ?
00:55 jeffreykegler Procedures are elsewhere
00:56 TimToady yes, it's a strategy for mixing in as much "determinstic" matching as possible into the programmer's grammar view without the programmer having to worry about it much
00:56 jeffreykegler Sorry to stack questions here, but you're looking at some academic stuff on DFA's?
00:57 TimToady yeah, I've been looking at various papers
00:57 jeffreykegler Any online?
00:57 TimToady all of them :)
00:58 jeffreykegler I'd be curious
00:58 jeffreykegler I'm 54 and my mind works in low gear.  Studying papers helps me understand issues.
01:00 jeffreykegler And also just having written a NFA to semi-deterministic finite automata translator I've got the math fresh in my mind.
01:01 TimToady laurikari.net/ville/spire2000-tnfa.pdf
01:01 TimToady that's kind of the direction I'm aiming
01:03 jeffreykegler Found it.
01:03 TimToady and I have to get as much done before I turn 54 this year me own self :)
01:03 jeffreykegler As this stuff goes, it doesn't look too deadly.
01:03 jeffreykegler They say Newton gave up math by the time he turned 50.
01:03 jeffreykegler I've been reading GH Hardy's Apology of a Mathematician
01:04 TimToady well, it's easy for my eyes to glaze over as soon as I see "System XYZZY is a seven tuple of greek alphabetic soup..."
01:05 jeffreykegler I recommend you read the Hardy *AFTER* you write the TDFA engine
01:05 jeffreykegler So you won't know you're doing the impossible until you're finished
01:05 SamB TimToady: where did you see that?
01:07 TimToady that's the generic first definition of any paper on DFA magic  :)
01:07 TimToady or pretty much any paper on parsing
01:32 lisppaste3 joined #perl6
01:39 pdy joined #perl6
02:28 justatheory joined #perl6
02:47 brysonm joined #perl6
02:47 brysonm left #perl6
03:03 cathyal joined #perl6
03:04 cathyal left #perl6
04:02 alester joined #perl6
04:15 kanru joined #perl6
04:26 OuLouFu joined #perl6
04:31 OuLouFu_ joined #perl6
04:37 pbuetow joined #perl6
05:00 cyberpass joined #perl6
06:20 manfred joined #perl6
06:28 Belaf left #perl6
07:13 dduncan joined #perl6
07:18 devogon joined #perl6
07:19 gbacon joined #perl6
07:23 manfred joined #perl6
07:31 dduncan I have an opinion question if anyone can help me with it ...
07:32 dduncan let's see if copy-paste works ...
07:32 dduncan I intend to make another release of my language spec tonight, just prior to when the proposals would start being looked at (as if it might make any difference), and I have a design question you (or anyone else) may have experience with or advice on ... it relates to the names of 2 main groups of language dialects
07:32 dduncan in a nutshell, Muldis D has multiple dialects, which are compatible at the very least due to Muldis D code always having to declare what dialect it is in, akin to Perl's "use 5.6" vs "use 5.8" etc
07:32 dduncan one dialect group is currently called "non-hosted" or "concrete", and is any dialect where code is written as text strings or files like a typical programming language ... examples how you normally write Perl, or how you normally write SQL
07:32 dduncan the other dialect group is called "hosted" or "abstract", and it is always written in terms of data structures written in some other language like Perl ... an analogy is that SQL::Abstract would be hosted (in Perl), while SQL is non-hosted
07:32 dduncan my question is what might be better category names than the ones I chose ...
07:32 dduncan in particular, I like "hosted", but am wondering if its complement group might be something better than "non-hosted", something with one word that means the same thing ... maybe "independent" but better sounding or less misleading?
07:32 dduncan anyone have thoughts on this?
07:32 dduncan in SQL terms, I"m looking for the "foo" in "SQL is foo and the inputs of SQL::Abstract is (Perl) hosted"
07:32 dduncan yep, it did
07:50 Aankhen`` joined #perl6
07:54 meppl joined #perl6
07:54 dduncan slightly longer names, the 2 groups could be named "plain text" and "hosted data", and abbreviate to 'PT' and 'HD' respectively, and used together with 'Muldis D', could be 'PTMD' and 'HDMD' for abbreviation purposes
08:17 blindfish joined #perl6
08:20 barney joined #perl6
08:22 cyberpass joined #perl6
08:26 iblechbot joined #perl6
09:25 cognominal_ joined #perl6
09:30 blindfish joined #perl6
09:51 dduncan left #perl6
09:53 Psyche^ joined #perl6
10:08 mj41 joined #perl6
10:17 iblechbot joined #perl6
10:26 njbartlett joined #perl6
10:28 njbartlett joined #perl6
10:30 njbartlett_ joined #perl6
10:31 zamolxes joined #perl6
10:39 ebassi joined #perl6
10:40 penk joined #perl6
10:46 DarkWolf84 joined #perl6
10:50 pbuetow joined #perl6
10:51 pcbuetow joined #perl6
11:02 chris2 joined #perl6
11:06 rindolf joined #perl6
11:51 njbartlett joined #perl6
11:54 blindfish joined #perl6
12:01 wknight-away joined #perl6
12:15 spinclad @tell mncharity i must have been blind... debian etch has ruby1.9.
12:15 lambdabot Consider it noted.
12:15 moritz_ spinclad: it has, but it's a prerelease
12:16 spinclad lenny has a later prerelease, sid has 1.9.0.0
12:24 pdy the version in etch is from June 2006?
12:31 spinclad i may try installing it, it looks like it only depends on sid/lenny libc6 (already installed on my etch system) and libncurses6.
12:31 spinclad pdy: yes
12:32 spinclad which i take it is pretty old as these things go
12:34 njbartlett joined #perl6
12:35 spinclad i think i'll be upgrading to lenny one of these days, as it's approaching release slush, and i'm already seeing ghc 6.6.1 (older lenny) disappearing in favor of 6.8.2
12:36 pdy spinclad: depends on your requirements. for a production system it could make sense to stay with the stable release - etch, and use only selected pieces of software from the backports repository
12:39 spinclad sure, this is just my desktop, tho
12:39 pdy ah ok, on my desktop i always go with "testing" :-)
12:39 spinclad expect i will soon too
12:40 pdy you will get the joy of tags with it
12:40 pdy debtags is awesome for searches
12:41 pdy apt-get install ept-cache
12:43 moritz_ debtags is missing the data from popcon
12:43 moritz_ if it had that, it would be even more useful
12:43 pdy its not missing it. its admin duty to combine them :-)
12:43 spinclad i see the tags in aptitude already, have apt-cache, ept-cache is different?
12:43 spinclad (looking)
12:44 pdy check the homepage of Enrico Zini for his talk how to combine popcon data with other information
12:44 moritz_ I saw his talk at LinuxTag 2006
12:44 moritz_ back then it didn't include any popcon information
12:44 moritz_ so it seems I'm not up to date
12:44 pdy moritz_: his talk's from 2007 are taking it even further :-)
12:45 * pdy builds a temple for Enrico
12:46 pdy now if i would be a master of the Perl i could make use of all the wealth of information that is out there to my feet!
12:46 spinclad looks nice. look forward to playing with it.
12:47 pdy e.g. you like a software and know a friend likes that software too. what other software does the friend have which is not on my system yet, but could be of interest to me
12:49 moritz_ social packaging ;)
12:49 pdy then restrict the results based on tags is::implemented::in:perl
12:49 pdy yeah :-)
12:53 Aankh|Clone joined #perl6
13:11 wknight-away joined #perl6
13:13 alester joined #perl6
13:13 pcbuetow joined #perl6
13:14 ebassi joined #perl6
13:19 jiing joined #perl6
13:38 thoughtp1lice joined #perl6
13:39 viklund joined #perl6
13:54 monomorph joined #perl6
13:56 cognominal_ joined #perl6
14:00 jferrero joined #perl6
14:01 mico joined #perl6
14:03 pugs_svn r19799 | putter++ | a possible talk and project.
14:04 pugs_svn r19800 | ruoso++ | [smop] more leaks solved. Now the first test have only 10 objects leaking...
14:09 alester joined #perl6
14:36 volp joined #perl6
14:46 cognominal_ joined #perl6
14:49 manfred joined #perl6
14:58 TJCRI joined #perl6
15:02 alester joined #perl6
15:15 njbartlett joined #perl6
15:16 takanori joined #perl6
15:18 mico left #perl6
15:27 njbartlett joined #perl6
15:28 peeps[work] joined #perl6
15:29 faxathisia joined #perl6
15:43 sahadev joined #perl6
15:49 jhorwitz joined #perl6
15:57 rindolf joined #perl6
16:00 mico joined #perl6
16:05 konusinua joined #perl6
16:10 cyberpass joined #perl6
16:11 njbartlett joined #perl6
16:25 Psyche^ joined #perl6
16:31 mico joined #perl6
16:34 rindolf joined #perl6
16:44 chris2 joined #perl6
17:09 meppl joined #perl6
17:14 meppl joined #perl6
17:37 Jamtech joined #perl6
17:42 ruoso I was testing smop with valgrind and I don't have any more errors, only some memory leaks that seems to be already identified by the SMOP_LOWLEVEL_MEM_TRACE code
17:42 simcop2387 joined #perl6
17:42 [particle] \o/
17:44 ruoso and it seems that I'm missing some SMOP_RELEASE on the continuation, as the objects not being destroyed are SMOP__SLIME__Frames and Nodes (the nodes are referenced by the frames, so, it's probably frame's fault)
17:45 ruoso brb &
17:45 mico joined #perl6
17:48 TimToady \oJ  # left arm hurts
17:48 TimToady gah, it's too early to be this late...
17:56 pmurias joined #perl6
18:16 tobeya joined #perl6
18:20 cognominal_ joined #perl6
18:26 cognominal__ joined #perl6
18:28 pmurias joined #perl6
19:03 mico joined #perl6
19:13 cognominal_ joined #perl6
19:20 vainguard joined #perl6
19:43 ntgrl joined #perl6
19:45 sri_work joined #perl6
19:51 ludan joined #perl6
19:52 ludan hi
19:53 moritz_ good localtime() ;)
19:53 pmurias moritz_: good evening
20:00 moritz_ pmurias: how are kp6 things going?
20:07 mico joined #perl6
20:09 pmurias moritz_: ruoso is making good progress on smop
20:10 pmurias i didn't have time to work on kp6 recently
20:10 pmurias the ruby backend passes some tests
20:10 moritz_ cool
20:11 moritz_ mncharity++
20:34 mico joined #perl6
20:39 Schwern joined #perl6
20:54 ruoso hi pmurias... I'm very near of finishing stage 0 smop... I'm only chasing some memory leaks to have it finished... have some time to help?
21:01 moritz_ what are you using to detect mem leaks? valgrind?
21:02 moritz_ or your internal tracer?
21:02 ruoso bltn]
21:02 ruoso both
21:02 * ruoso with the hand misplaced in the keyboard
21:02 ruoso right now, it seems that the interpreter is leaving a reference to the frame unreleased
21:03 moritz_ how does that work? at termination of program it checks all refcounts and reports if it's != 0?
21:03 pugs_svn r19801 | ruoso++ | [smop] some more fixes, but still with some memory leaks...
21:03 pmurias ruoso: hi
21:03 ruoso moritz_, yep...
21:04 ruoso moritz_, actually, it maintains a list with all allocced values
21:04 ruoso and everytime you free a value, it removes from the list
21:04 ruoso in the end, every value in the list is a memory leak
21:05 pmurias i'm having an algorithmic competition we-thr (leaving on tu), and i'll be going to sleep soon
21:05 [particle] you can add uids, and print them upon creation and destruction to check what's going on
21:05 [particle] we did that with parrot
21:06 ruoso [particle], that's kind of what the tracer does..
21:07 ruoso I already have a debug message that shows every operation
21:07 [particle] sweet
21:09 [particle] TimToady++ # context updates
21:09 cognominal_ joined #perl6
21:10 TimToady I decided that simplifying = was a better idea that splitting it into two operators
21:10 TimToady it still has to glare at the left arg a bit, but the cases that can be considered item assignment are drastically cut down
21:11 TimToady and more importantly, easily recognizable by a human
21:11 TimToady without having to delve into subscripts and such
21:16 [particle] i'm happy = stays =
21:17 [particle] yes, it seems list context is the default now
21:18 [particle] and that's fine. users can be trained to expect that.
21:18 TimToady I wanted to save $a = 1, $b = 2 though
21:18 TimToady and this does that
21:19 [particle] catering to the c-lovers among us
21:48 yaberger_home joined #perl6
21:57 mico left #perl6
22:01 pugs_svn r19802 | ruoso++ | [smop] small progress... only 6 objects leaking in test/01...
22:11 jferrero joined #perl6
22:34 pugs_svn r19803 | ruoso++ | [smop] additional debug infomarmation. Every responder interface have a char* id that is used by the tracer to present a more usefull message.
22:46 ispy_ joined #perl6
22:48 araujo joined #perl6
22:54 Limbic_Region joined #perl6
23:13 pugs_svn r19804 | ruoso++ | [smop] now a real improvement... only one object leaking in test/01
23:18 pdy left #perl6
23:20 ruoso night &
23:20 TimToady good night
23:20 wolverian nice work, ruoso++
23:34 Auzon joined #perl6
23:38 peepsalot i don't understand this syntax:     @values.sort: { $^b cmp $^a };
23:38 Limbic_Region you are calling the sort method on @values
23:38 peepsalot is it like creating an anonymous function and passing it to sort somehow.  what is the colon doing?
23:39 peepsalot and the curly braces
23:39 Limbic_Region it is synonomous in perl 5 as sort {$b cmp $a} @values;
23:39 peepsalot ok, but I never learned perl 5 ;-)
23:40 TimToady the colon is replacing a pair of parens there, so it's equivalent to @values.sort({$^b cmp $^a})
23:40 Limbic_Region oh, sorry
23:40 peepsalot TimToady, ok, that notation makes more sense to me.  is there any reason doing it with a colon is better?
23:41 TimToady you don't have to figure out where to put the ending paren
23:41 Auzon Well, it's a piece of code that has $^a and $^b representing the two items you are comparing. You then return -1, 0, or 1 (or the P6 object equivalents) to tell it how to sort.
23:41 peepsalot so you can replace ANY function call parenthesis with a colon like that?
23:41 TimToady no, only methods
23:41 TimToady a normal function call doesn't need the colon in the first place
23:42 TimToady foo(1,2,3) is equivalent to foo 1,2,3
23:42 TimToady interestingly, you can also write @values.sort :{$^b cmp $^a}
23:42 peepsalot hmm, ok
23:43 TimToady but then it's parsed as an adverbial block rather than an argument list
23:43 Limbic_Region TimToady - did you see the /msg I sent you on PerlMonks?
23:43 wknight-away joined #perl6
23:44 TimToady not yet
23:44 peepsalot thanks for the tips.  gotta go for the moment. afk
23:44 Limbic_Region ok, it was a pointer to a node I thought might interest you
23:45 TimToady ah, my "And 0 more" mutated to "And 1 more", which is easy not to see
23:45 TimToady yeah, was looking at that and wondering whether to respond
23:46 TimToady 'course, delete is really an op on a container, which adds an additional wrinkle

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo