Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-06-14

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:02 pugs_svnbot r20793 | diakopter++ | [yap6] lots of visual cleanup; some rule fixing;
00:02 pugs_svnbot r20793 | diakopter++ | a tester.pm;sbin/test facility introduced to make
00:02 pugs_svnbot r20793 | diakopter++ | experimentation with Parser.pm easier.  Stable
00:02 pugs_svnbot r20793 | diakopter++ | checkpoint for the tester.pm grammar...
00:17 rian joined #perl6
00:29 pugs_svnbot r20794 | diakopter++ | [yap6] a few more fixes
00:35 apeiron_ joined #perl6
01:17 diakopter like, not cool.
01:17 diakopter turns out continuation passing style is wrong for this algorithm.  so it's another refactoring.  8|
01:29 Ched- joined #perl6
01:34 pbuetow joined #perl6
02:00 pugs_svnbot r20795 | diakopter++ | [yap6] converted back to normal rule production
02:00 pugs_svnbot r20795 | diakopter++ | now for making the ast generation actually work...
02:12 thestarslookdown joined #perl6
03:02 elmex_ joined #perl6
04:01 r0bby joined #perl6
04:07 dominiko joined #perl6
04:12 Psyche^ joined #perl6
04:53 bacek_ joined #perl6
05:08 pugs_svnbot r20796 | diakopter++ | [yap6] well now it's just a very strict tokenizer...
05:08 Auzon but does it work? ;)
05:08 diakopter it does indeed tokenize.
05:08 Auzon How much can it tokenize?
05:08 diakopter :)
05:09 diakopter I'm trying to invent a decent syntax for telling the grammar engine in what order the parsed "tokens" should be passed to the handler(s)
05:14 bacek_ joined #perl6
05:16 Auzon rakudo: class Foo {method Bar {1}}; say Foo.new.HOW.methods.perl
05:16 p6eval rakudo r28335 OUTPUT[Method 'methods' not found for invocant of class 'P6metaclass'␤current instr.: '_block11' pc 52 (EVAL_12:21)␤
05:16 Auzon rakudo: class Foo {method Bar {1}}; say Foo.new.^methods.perl
05:16 p6eval rakudo r28335 OUTPUT[MMD function __concatenate not found for types (152, -98)␤current instr.: 'parrot;Perl6;Grammar;Actions;dotty' pc 107997 (src/gen_actions.pir:8237)␤
05:20 pugs_svnbot r20797 | diakopter++ | [yap6]
05:20 pugs_svnbot r20797 | diakopter++ | particle
05:20 pugs_svnbot r20797 | diakopter++ | thinks
05:20 pugs_svnbot r20797 | diakopter++ | *he's*
05:20 pugs_svnbot r20797 | diakopter++ | embarassed
05:20 pugs_svnbot r20797 | diakopter++ | ....
05:20 pugs_svnbot r20798 | Auzon++ | [gsoc_spectest] moved what.t into the spec portion, and added new tests to check the difference between ."WHAT" and .WHAT when a WHAT method exists.
05:26 pugs_svnbot r20799 | lwall++ | [STD5] implemented lazymap to defer some of the closure calls
05:27 vsoni joined #perl6
05:27 vsoni left #perl6
05:29 diakopter yap6: say $a; my $foo = sub { has $ears; does $flying; };;;
05:29 p6eval yap6 r20799 OUTPUT[parsed: [["use"],["v6"],[";"],["say"],["\$"],["a"],[";"],["my"],["\$"],["foo"],["="],["sub"],["{"],["has"],["\$"],["ears"],[";"],["does"],["\$"],["flying"],[";"],["}"],[";"],[";"],[";"],["EOI"]]␤]
05:29 Auzon .WHAT? We have no multiple inheritance tests?
05:29 diakopter see, told you it's just a tokenizer
05:29 Auzon yap6: class Foo is Bar {}
05:29 p6eval yap6 r20799 OUTPUT[syntax error near the end of input␤[["use"],["v6"],[";"],["class"],["Foo"]]]
05:30 diakopter well now
05:30 Auzon :P
05:32 pugs_svnbot r20800 | diakopter++ | [yap6] class Foo is Bar {}
05:33 diakopter or not
05:35 Auzon dang. forgot to tag my last commit that I added 2 tests :-/
05:37 diakopter argh
05:37 Auzon no worries.
05:37 Auzon I just add it onto this one
05:37 Auzon I think this is a sign for me to sleep.
05:38 pugs_svnbot r20801 | Auzon++ | [gsoc_spectest] more TASKS and tests for class methods with inheritance. (added 4 tests here)
05:38 pugs_svnbot r20801 | Auzon++ | also, last time: (added 2 tests)
05:42 araujo joined #perl6
05:50 alester joined #perl6
05:51 diakopter hrm; sumpthinz rawng whiff duh sawrce fi'ter
05:53 pugs_svnbot r20802 | diakopter++ | [yap6] the afore-mentioned works now, but the related syntax checking is not
05:53 pugs_svnbot r20802 | diakopter++ | quite as technically strict as it ought to be..
05:56 diakopter yap6: class ^Foo is Bar {}
05:56 p6eval yap6 r20802 OUTPUT[parsed: [["use"],["v6"],[";"],["class"],["^"],["Foo"],["is"],["Bar"],["{"],["}"],["EOI"]]␤]
05:56 diakopter like I said, a super-strict tokenizer
06:04 diakopter yap6: class ^Trunk (Elephant $Dumbo:, $crow) does Flying { has Ears; }
06:04 p6eval yap6 r20802 OUTPUT[parsed: [["use"],["v6"],[";"],["class"],["^"],["Trunk"],["("],["Elephant"],["\$"],["Dumbo"],[":"],[","],["\$"],["crow"],[")"],["does"],["Flying"],["{"],["has"],["Ears"],[";"],["}"],["EOI"]]␤]
06:06 diakopter yap6: use Another; package SomethingOrOther;
06:06 p6eval yap6 r20802 OUTPUT[Can't declare a non-block package at lib/Perl6in5/Compiler/Parser.pm line 857.␤]
06:08 diakopter yap6: use Another; package SomethingOrOther { sub Begone {} ; }
06:08 p6eval yap6 r20802 OUTPUT[parsed: [["use"],["v6"],[";"],["use"],["Another"],[";"],["package"],["SomethingOrOther"],["{"],["sub"],["Begone"],["{"],["}"],[";"],["}"],["EOI"]]␤]
06:09 diakopter well, panic() works
06:13 diakopter ok well, finally the engine is decently stable and fast (enough)... tomorrow a zillion more rules.  and probably lots of slowdown.
06:18 iblechbot joined #perl6
06:41 Psyche^ joined #perl6
06:52 Psyche^_ joined #perl6
07:42 Jedai joined #perl6
07:51 gourav joined #perl6
07:52 gourav hi
07:54 gourav is any one live here at this time
07:55 gourav left #perl6
07:56 bacek joined #perl6
08:01 gourav joined #perl6
08:03 * gourav new to IRC and pugs
08:03 gourav had a wonderful chat last time
08:03 gourav can anyone suggest to start contributing where do I get started from exactly
08:03 gourav that is I am looking for some mentoring
08:04 Tene Hi, gourav!
08:04 Tene What is it you're interested in?
08:04 gourav hi Tene
08:05 gourav just interested in starting to write some code for PERL6 development and thereby start contributing
08:05 gourav I know languages like PERL, PHP, VBA and C and presently learning JAVA as well
08:05 Tene gourav: your best bet is to look at parrot.  That's the Perl 6 implementation that has been making the most progress lately.
08:05 Tene Pugs has been inactive for a long time.
08:06 gourav that's great
08:06 Tene rakudo (the name for perl 6 on parrot) has been making a lot of progress lately.
08:06 Tene The best channel for that is #parrot on irc.perl.org
08:06 Tene What sort of tasks are you interested in?
08:06 gourav I went through quite a lot of documentation lately but was not able to find any area where i can look exactly what to code/ test for
08:07 gourav any ideas
08:07 Tene Okay, the main test suite is in the pugs repository, in the t/ directory.
08:08 gourav that sounds great but how do I go there
08:08 Tene There are copies of the specifications online at http://spec.pugscode.org/ I believe.
08:08 lambdabot Title: Official Perl 6 Documentation
08:08 Tene Have you ever used svn before?
08:08 moritz_ http://perlcabal.org/syn/ <-- specification
08:08 lambdabot Title: Official Perl 6 Documentation
08:08 Tene Why do they both claim to be official?
08:08 gourav yeah use that regularly in office for saving code backup
08:09 moritz_ http://svn.pugscode.org/pugs <-- svn
08:09 lambdabot Title: Revision 20802: /
08:09 moritz_ in t/TASKS there's a list of things that need testing
08:09 gourav join #parrot
08:09 Tene I think you said you're looking to write tests?
08:09 gourav yes quite true
08:09 gourav i think that should be starting point for me
08:10 gourav this will the first time that i will really be contrubuting
08:10 gourav (sorry for the sad english this keyboard is a little pesky)
08:10 Tene that is a great place to start
08:13 gourav Tene which is the great place to start
08:13 gourav still have not found any place from where I can download any code from the SVN
08:14 Tene gourav: svn co https://svn.pugscode.org/pugs/
08:14 lambdabot Title: Revision 20802: /
08:15 gourav yeah found that
08:15 gourav but as Tene said that the major development is happening on the PERL6 development on PARROT
08:16 Tene Yes, but they both share the same tests
08:16 gourav good so how do I start the testing and contributing my test results
08:17 Tene What platform are you running on?
08:17 gourav ubuntu
08:17 gourav their desktop edition
08:17 Tene Okay.
08:17 Tene svn co https://svn.perl.org/parrot/
08:17 lambdabot Title: Revision 28335: /
08:21 pmurias joined #perl6
08:23 pmurias gourav: you should also take a look at elf pugs/misc/elf
08:25 pmurias which is also actively developed
08:39 kanru joined #perl6
08:44 gourav joined #perl6
09:00 Ched- joined #perl6
09:14 moritz_ uhm, checking out trunk/ of the parrot repo should be enough
09:15 meppl joined #perl6
09:17 barney joined #perl6
09:25 redicaps joined #perl6
09:26 cognominal_ joined #perl6
09:30 Tene oh, good suggestion.
10:40 icwiener joined #perl6
11:09 meteorjay joined #perl6
11:10 pbuetow joined #perl6
11:14 moritz_ rakudo: say <a b>.WHAT
11:14 p6eval rakudo r28336 OUTPUT[List␤]
11:14 moritz_ rakudo: say <a>.WHAT
11:14 p6eval rakudo r28336 OUTPUT[Str␤]
11:26 FurnaceBoy joined #perl6
11:32 rakudo_svn r28337 | particle++ | [rakudo] more list function tests for spectest_regression (moritz++)
11:32 chris2 joined #perl6
11:47 meppel-san joined #perl6
12:12 Jedai joined #perl6
12:16 kanru joined #perl6
12:45 ron joined #perl6
13:02 sri_work joined #perl6
13:02 sri_work joined #perl6
13:26 FurnaceBoy joined #perl6
13:50 cognominal_ joined #perl6
14:23 borondil joined #perl6
14:23 a-jing joined #perl6
14:23 a-jing left #perl6
14:26 ron joined #perl6
14:35 borondil joined #perl6
14:40 wknight8111 joined #perl6
14:40 Jedai joined #perl6
14:43 a-jing joined #perl6
14:50 alester joined #perl6
14:50 icwiener_ joined #perl6
15:03 xinming_ joined #perl6
15:10 FurnaceBoy joined #perl6
15:17 Caelum_ joined #perl6
15:21 borondil left #perl6
15:37 pmurias is svnbot alive?
15:37 pugs_svnbot r20803 | pmurias++ | [yap6] executables other than "perl" don't need to do perl5 recognition so "use v6" shouldn't be mandator in yap6
15:57 pmurias diakopter: do you have an idea how to generate the sub foo(); list?
15:57 pmurias (other the stuffing it into the source filter)
15:58 borondil joined #perl6
16:06 pugs_svnbot r20804 | pmurias++ | [yap6] did the refactoring correctly
16:06 SubStack joined #perl6
16:14 a-jing left #perl6
16:18 diakopter pmurias: drat; I already had made a lot of changes there; that's ok; I'll merge them
16:18 diakopter thanks again... ! it was a tough problem for me
16:19 pmurias np
16:19 moritz_ diakopter: that's why they say "commit early, commit often" ;)
16:21 diakopter I was trying to put your generation routines in Grammar.pm ... the only thing stopping me is getting the STD_hand.pm package name to the sub so it can put the symbols in the right place... any ideas?
16:22 diakopter I wonder if FILTER {} receives any arguments...
16:22 diakopter (like the importing package's name) :)
16:23 pmurias diakopter: you can pass them through import
16:23 pmurias &import
16:27 pmurias joined #perl6
16:32 pmurias (my new laptop)++ #having a hardware button to swith off the touchpad
16:35 pmurias why do you need the source filter to receive arguments?
16:37 ruoso perl6: my $cond = 0; my @a = $cond ?? 1 !! 2, 3, 4;
16:37 p6eval kp6 r20804: OUTPUT[syntax error at position 37, line 1 column 37:␤my $cond = 0; my @a = $cond ?? 1 !! 2, 3, 4␤                                     ^ HERE␤]
16:37 p6eval ..pugs: RESULT[[2, 3, 4]]
16:37 p6eval ..rakudo r28349: OUTPUT[Statement not terminated properly at line 1, near "?? 1 !! 2,"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
16:37 p6eval ..elf r20804: OUTPUT[Unknown rule: infix:conditional␤It needs to be added to ast_handlers.␤ at ./elf_f_faster line 2693␤]
16:37 ruoso perl6: my $cond = 0; my @a = $cond ?? 1 !! (2, 3, 4);
16:37 pmurias cycling&
16:38 p6eval kp6 r20804: RESULT[[ 2, 3, 4 ]]
16:38 p6eval ..pugs: RESULT[[2, 3, 4]]
16:38 p6eval ..rakudo r28349: OUTPUT[Statement not terminated properly at line 1, near "?? 1 !! (2"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
16:38 p6eval ..elf r20804: OUTPUT[Unknown rule: infix:conditional␤It needs to be added to ast_handlers.␤ at ./elf_f_faster line 2693␤]
16:41 diakopter pmurias: oh; you're right; the source filter doesn't need it, but &rule does...
16:42 diakopter so I guess the source filter could insert __PACKAGE__ in there... without it being magical at the time...
16:44 ruoso moritz_, I've just replied to larry's reply on your post... I'm now a strong opposer of the our multi join(Any, Str) thing...
16:44 ruoso I've just realised that it could lead to a lot of false-hits
16:44 moritz_ ruoso: probably join(Any, *@rest)
16:45 pmurias diakopter: rule can use caller
16:45 Jedai joined #perl6
16:45 ruoso moritz_, Any being the separator?
16:45 ruoso I also realised that
16:45 moritz_ ruoso: forget what I just said, that was mindless
16:46 ruoso join 1, 2, 3, 4, ', '
16:46 ruoso is kinda lame
16:46 ruoso join ', ', 1, 2, 3, 4; makes much more sense
16:46 moritz_ join(Any $separator: *@rest) perhaps
16:46 ruoso yes... that's the p5 order...
16:46 ruoso which seems to be inverted now...
16:46 ruoso join(@things, $separator) is the proposed order...
16:47 ruoso at least that is what I got from TimToady's reply...
16:47 TimToady no
16:47 TimToady the multi syntax is exactly as in Perl 5
16:47 ruoso so how 'str'.join('other') returns 'str'?
16:48 TimToady the single-dispatch syntax is purely $what_to_join($separator)
16:48 TimToady $what_to_join.join($sep) rahter
16:48 TimToady and there is no failover (at least, not there)
16:48 moritz_ anyway, TimToady++ for a clear answer to my question
16:49 ruoso but if join is not a method of $what_to_join, it falls back by putting $what_to_join as first parameter...
16:49 ruoso so... $what_to_join.join($sep) becomes join($what_to_join, $sep)
16:49 TimToady there is no fall back if it hits the .join method in Any
16:49 ruoso ohhhhhhhhhhhhhhhh
16:49 TimToady and may never be any fallback anyway if we also open Door 3
16:50 TimToady but that's an independent decision, more or less
16:51 ruoso yes... now it is...
16:52 ruoso so... forget about the reply I just sent five minutes ago ;)
16:54 [particle] joined #perl6
16:56 Auzon TimToady++ # thanks for seeing the issues that I thought about with $unknown.join('foo')
16:57 TimToady ruoso: hasn't come through yet, so I'll have to remember to forget it...  :)
17:04 ruoso TimToady, btw... had you thought more about the meta calls?
17:05 TimToady no, but I can probably think about it after my talk on Monday
17:05 ruoso alright...
17:05 TimToady brane is currently in STDspace
17:06 ruoso btw... if the fallback to sub-dispatch is dropped, the other issue pending on p6-language would also be solved...
17:08 TimToady most of the need for fallback was already dealt with via "is export", which handles the case where you *do* want to shadow the method with foo($invocant,@args)
17:08 TimToady it's just that join isn't one of those
17:08 ruoso each second I like more the idea of dropping it
17:09 ruoso it would make the dispatch much simpler
17:09 TimToady which is why I asked for a use case some time ago, and haven't really heard one
17:09 ruoso oh.. you meant a use case where the fallback is actually needed..
17:09 ruoso not a confusing one...
17:10 TimToady yes, a reason to include the feature
17:10 ruoso I really think it brings a lot of unexpected trouble...
17:11 ruoso because the Package and the Class have unrelated lives
17:11 ruoso and Package modification could cause unexpected changes in Classes
17:11 ruoso and the dispatcher will be much more complicated...
17:12 TimToady well, it would just be one dispatch calling the other dispatcher when it runs out of candidates
17:12 moritz_ TimToady: wouldn't it make sense to move most of the List builtins to Positional?
17:12 ruoso that would require the object dispatcher to introspect to get the CALLER semantics
17:13 ruoso moritz_, actually we still need a more clear "iterator" api...
17:13 TimToady Positional implies indexibility, and you can join something that you can iterate, even if it doesn't provide a subscript interface
17:13 TimToady so maybe Iterable
17:13 TimToady or some such
17:13 moritz_ TimToady: ok, makes sense
17:14 moritz_ so prefix:= is defined by default or Iteratable ?
17:14 ruoso Iterable and RWIterable?
17:14 TimToady I wish people wouldn't use the parrot shortcut to name operators...
17:14 moritz_ no need for separate roles if we have parametrized mixins, I think
17:15 moritz_ prefix:<=> # better?
17:15 TimToady much easier to read, I think
17:16 TimToady and unamibuous when you want to talk about circumfix:<( )> vs circumfix:«< >»
17:16 TimToady *unambiguous
17:16 Effington joined #perl6
17:17 ruoso about the API... I know the "Iterable" API seems a lot to be implementation specific... but higher-level "Iterable" implementations that want to behave like normal lists need to have that API as a standard
17:18 ruoso like... for (@foo) --> $x {...}
17:18 ruoso where @foo is implemented by some high-level class
17:20 cognominal_ joined #perl6
17:20 ruoso or simply foo() ==> bar() ==> baz()
17:21 kanru joined #perl6
17:33 cognominal_ joined #perl6
17:42 Chillance joined #perl6
17:44 pbuetow joined #perl6
17:50 icwiener-_- joined #perl6
18:03 chris2 joined #perl6
18:12 holst joined #perl6
18:13 holst I read about the C# bytecode and how they have "true multidimensional arrays"
18:13 holst however, they enforce C ordering
18:13 holst does the bytecode in the new perl6 system support both Fortran and C ordering?
18:14 diakopter pmurias - I figured out how to move your routines to Perl6in5::Grammar... I used a tricky mixin. :p
18:17 TimToady holst: it would depend on which new perl6 system you're talking about.  Perl 6 the language doesn't care, though if it did care it would tend toward C.  But Perl 6 objects are opaque in layout, and that includes arrays.
18:18 holst so there are no shape associated with the arrays in the byte code?
18:19 wolverian which byte code?
18:20 holst I was reading some BLISS code and they have the ability to define general access methods for multidimensional arrays: diagonal, n-diagonal, symmetric, ... :)
18:21 [particle] holst: there are multiple implementations of perl 6, so there's no one bytecode
18:21 holst the shape isnt passed-with of course but must be explicit stated
18:21 holst [particle]: aha
18:21 holst but there will be a single one right? isnt "parrot" this?
18:21 [particle] no
18:22 [particle] there will be multiple implementations of perl, just like c
18:22 [particle] as long as the implementations pass the official test suite, they're officially perl 6
18:23 holst ok, I should ask in any of the implementation channels/
18:23 [particle] many implementors are here
18:24 [particle] kp6, smop, rakudo (on parrot), pugs...
18:24 [particle] oh, also elf
18:27 [particle] i'm a parrot core committer, and we have array-of-array, not true multidim arrays
18:27 ruoso even in each implementation... there can be different array implementations coexisting...
18:27 [particle] but, we're open to the possibility, just haven't had anyone spec/develop something along those lines
18:29 ruoso I suspect that if someone declares my $foo = Array of Array of int; $foo .= new(); might be optimized to a bidimensional int array
18:30 TimToady and then what do you do when they say $foo.push(1,2,3,5)?
18:31 holst [particle]: thats because the high performance computing people hasnt been interested yet :)
18:31 holst but I think that JITs will be more and more common in this field
18:31 TimToady $foo.push([1,2,3,4],[5,6,7,8]) rather
18:31 [particle] holst: precisely. are you one? :)
18:31 holst [particle]: well, I work with numbers :)
18:32 TimToady we've certainly been trying to keep the hpc folks in mind while designing :)
18:32 yahooooo joined #perl6
18:35 ruoso holst, the thing is... nothing stops some module that bind to a high-performance array implementation in C, for instance...
18:35 ruoso it is supposed to be much easier to do that in P6 than it is in P5
18:36 ruoso thanks to the representation polymorphism
18:36 holst yes, but now there is a possibility to raise the bar on what is an "basic type"
18:37 holst having multidimensional arrays as a basic type, with both C and Fortran ordering, would be a great feature as far as I could tell
18:38 TimToady just as Perl 5 allowed you to talk to two databases at once, so too Perl 6 will allow you to specify your ordering both ways if the underlying implementation supports it
18:38 holst the modern versions of BLAS and LAPACK uses a feature called "dummy arrays" and they carry with them their shape information
18:40 TimToady it is hoped that the Perl 6 type system is flexible enough to slurp in any existing metadata and run with it
18:40 ingy hi TimToady
18:41 TimToady the only real question is whether it'll be too flexible for the optimizers to get a good handle on
18:41 TimToady hi ingy
18:41 ingy going to Chicago?
18:41 TimToady there already
18:41 TimToady you in .tw?
18:41 ingy me too
18:41 ingy no, Chicago
18:42 TimToady I'm at the hackathon
18:42 holst TimToady: the dummy arrays are a fact since 1990 in the fortran community; so there is quite a bit of research in how to work with them :)
18:42 ingy see you tomorrow unless you go to the naked bike ride tonight...
18:42 TimToady hadn't planned on it, but you never know...
18:42 ingy :D
18:42 holst anyways, I must read up on the parrot system
18:43 moritz_ holst: #parrot on irc.perl.org will answer parrot specific questions ;)
18:43 TimToady S09 and S12 talk about shaped arrays and the object system
18:44 TimToady from the language view
18:45 holst the reason I started to investigate this, is that I found a forum post which described a real problem:
18:45 holst the C# bytecode causes some problem with interoperability betewen fortran subroutines and routines writtein in VB.net or other languages
18:46 holst so you can only pass 1-dimensional arrays (with assumed shape)
18:46 [particle] http://parrotcode.org/docs/pdds/
18:46 [particle] sorry, http://www.parrotcode.org/docs/pdd/
18:46 lambdabot Title: Parrot Documentation :: Parrot Design Documents - parrotcode
18:47 TimToady well, obviously, if you're dealing with different layouts, someone has to take responsibility to interconvert, and hopefully Perl 6 can be that someone if it has the right metadata
18:48 TimToady but the language itself takes pains to keep the shape an abstract concept
18:49 ruoso SMOP solves that by using the "Responder Interface" concept... every object points to the object that knows that object's shape...
18:51 TimToady course, that still doesn't mean that you can just write Fortran in Perl 6.  :)
18:52 moritz_ which is considered a feature ;)
19:00 holst moritz_: well, I suspect that a bug will appear soon. the system seems to be broken by design, with such features as:
19:00 holst http://en.wikipedia.org/wiki/Parser_Grammar_Engine
19:00 moritz_ holst: what do you mean?
19:02 holst I mean, implementing Fortran (or a subsect like F) seems almost doable with that toolchain:)
19:02 moritz_ holst: TimToady said you couldn't simply write Fortran in Perl 6 (ie without major changes), he didn't talk about parrot + PCT
19:03 yath .oO(hmm, i wonder if i could implement RPG in perl6 rules *hides*)
19:03 yath (RPG as in Report Program Generator)
19:03 moritz_ sure you can implement Fortran with parrot, although it will probably not as fast as native compilers (which are darn fast)
19:04 holst some day they might be
19:04 moritz_ some day parallel computing will be *much* more important than micro-optimized code
19:05 holst yes, but having the JIT determine loop unrolling instead of the compiler makes more sense
19:05 yath moritz_: the erlang guys keep telling this for ten years :P
19:06 moritz_ yath: I know, but *my* laptop now has two cores - it didn't back then ;)
19:06 moritz_ yath: and 8 cores aren't out of the normal right now
19:07 pugs_svnbot r20805 | diakopter++ | [yap6] updated STATUS; now the grammar module is extremely
19:07 pugs_svnbot r20805 | diakopter++ | terse; thanks to pmurias++ for Perl101-fu
19:07 yath moritz_: well, erlang processes are pretty lightweight, but i suspect the overhead of parallelising everything is rather huge.
19:07 moritz_ perl 6 tries to be very future proof ;)
19:07 yath moritz_: OTOH, if the interpreter or compiler does the job for you, there's no problem for you :P
19:07 diakopter shoulda named it yap110
19:08 holst the problem is the interconnect between nice programming languges and the hardware
19:08 moritz_ yath: that's where we're trying to go ;)
19:08 holst today you have about 2-3 different languages to choose from if you want to do stream computing on a GPU, say
19:08 yath why should i care about my hardware when programming?
19:08 yath that's an implementation detail
19:08 holst lol
19:08 holst yes
19:09 moritz_ more than half of my friends think that they should care about memory management manually
19:09 moritz_ "because GCs suck"
19:09 yath even your goddamn cpu is "interpreting" the opcodes.
19:09 holst GCs are probably better than them on memory management
19:09 yath (in software, that is)
19:09 Tene some gcs
19:09 Tene ;)
19:09 moritz_ IMHO memory management is yet another implmentation detail
19:09 yath holst: so is a compiler.
19:10 yath Tene: not counting perl5's? :P
19:10 moritz_ yath: yes. But Java's GC has a bad reputation (because it used to be very bad), and many others are just plain b0rked
19:10 holst yath: you reasoning does not make sense about "just an implementation detail"
19:10 yath moritz_: well, java actually is very nice in this case, because you are able to *tune* (only per vm, unfortunately) either which gc is used and its parameters
19:11 holst if you want programmer productivity you must first give the programmer a GOOD language that is suitable for the job
19:11 yath isn't that what perl6 aims to do? :)
19:11 ruoso the problem in Java GC is that it is not deterministic
19:11 moritz_ yath: yes, but many java VMs only handle a fixed amount of memory, to be configured at startup
19:12 moritz_ yath: or at least that's how it used to be
19:12 moritz_ yath: and that's a decision nobody wants to make - rightfully. It's another implementation detail in your way
19:12 diakopter yap6: use F; package E { sub a {} ; }
19:12 p6eval yap6 r20805 OUTPUT[parsed: [["use"],["v6"],[";"],["use"],["F"],[";"],["package"],["E"],["{"],["sub"],["a"],["{"],["}"],[";"],["}"],["EOI"]]␤]
19:12 yath moritz_: yes. well, java (the VM) is not perfect, but it's better than the people claim.
19:12 TimToady requiring determinism to achieve a correct solution is one part of the problem :)
19:13 yath moritz_: (speaking of the hotspot vm, of course. kaffe may do things different)
19:13 holst determinism is just a philosophy
19:13 ruoso sometimes, when you're doing something CPU-intensive... the footprint will enlarge considerably, because the GC thread has a lower priority
19:13 moritz_ TimToady: well, it's very nice to know that your file is being closed immediately when your file handles goes out of scope ;)
19:13 yath ruoso: well, one could give the gc some hints.
19:14 ruoso sure... but in the end, I kinda like refcounting...
19:14 yath uh?
19:14 moritz_ yath: that's where people start to say "if I have to give hints anyway, I can do it all on my own"
19:14 ruoso because it's plain simple and deterministic behaviour
19:14 yath doing at least two operations for each reference of a pointer?
19:14 TimToady yes, but relying on accidental implementation-based determinism is bad, when you should make explicit what the dependencies are in your code
19:15 ruoso hmm...
19:15 TimToady if the code doesn't express the required dependencies, it's bogus in some sense
19:15 yath moritz_: uh, well, with this attitude i could also program in assembler.
19:15 ruoso the code being inside a for loop seems deterministic code to me
19:15 TimToady which "for" are you referring to?
19:15 ruoso java for
19:15 moritz_ yath: I know. But that's what people say nonetheless :(
19:16 yath moritz_: i admit that it's relevant to know how things are implement SOMETIMES (e.g. when dealing with performance or golfing :P), but that should be <1% of production code.
19:16 Tene diakopter: what's that parser thing you keep playing with in here?
19:16 ruoso I've already experienced the java GC getting late on a for loop...
19:16 yath s/implement/&ed/
19:16 ruoso and sometimes you have to manually hint the gc to give it priority
19:16 ruoso (they even have an API to that)
19:16 diakopter Tene: :P sorry; it's my little Perl-6-ish lexer/tokenizer.  I'm augmenting it to a parser now.
19:17 yath ruoso: hu? how is it called?
19:17 ruoso GarbageCollector or something...
19:17 yath hm
19:17 ruoso netbeans have a button so you can call it manually
19:17 ruoso before it extends the footprint
19:17 ruoso it's rediculous
19:17 yath i know of System.gc(), but that just.. well.. it doesn't trigger the gc, it does.. hm
19:17 yath it _maybe_ triggers the gc ;)
19:19 ruoso that's the point where I start to kinda like refcounting...
19:20 diakopter Perl101 === Perl5
19:21 moritz_ "you know what is in Perl 101. Everybody knows what is in Perl 101"
19:21 diakopter /join #perl110
19:23 diakopter my last commit broke SVN::Web: http://www.parrotvm.org/svn/pugs/revision/?rev=20805
19:23 lambdabot Title: revision: /pugs (via SVN::Web)
19:24 moritz_ diakopter: bad boy
19:24 diakopter it's too bad; it would be a fun diff to read
19:25 holst thanks for all the info TimToady and moritz_!
19:25 holst just a final question
19:26 holst will Perl6 beat Duke Nukem Forevers release date? :)
19:26 holst (dont answer that)
19:26 holst left #perl6
19:26 diakopter when DNF is written in Perl 6, no.
19:26 moritz_ will Duke Nukem Forever be out before christmas? ;-)
19:29 pmurias joined #perl6
19:30 pmurias j
19:31 pugs_svnbot r20806 | diakopter++ | [yap6] backing out my backout of pmurias' un-backout
19:32 diakopter pmurias: http://tinyurl.com/4pouej
19:32 lambdabot Title: view: /pugs/misc/yap6/src/lib/Perl6in5/Grammar/STD_hand.pm (Rev: HEAD, via SVN:: ...
19:35 ruoso_ joined #perl6
19:41 pmurias diakopter: there is a syntax error
19:41 diakopter ? works for me...
19:43 pugs_svnbot r20807 | diakopter++ | [yap6] committing in case I fixed a syntax error since the last commit
19:43 pugs_svnbot r20808 | pmurias++ | [yap6] fixed tiny syntax error
19:44 diakopter oh, that... thanks
19:44 diakopter I was using tester.pm after all.
19:45 pugs_svnbot r20809 | moritz++ | [spec] moved basechar.t to ignoreaccent.t, changed modifier name to reflect
19:45 pugs_svnbot r20809 | moritz++ | current synopsis, updated smartlink
19:45 sri_work joined #perl6
19:46 pmurias is hit an acronim?
19:47 diakopter hit()? it can mean to "reach/arrive at"
19:47 diakopter "the train hit the station"
19:48 coppercore joined #perl6
19:48 diakopter I guess it's a colloquialism
19:48 pugs_svnbot r20810 | pmurias++ | [yap6] removed useless declarations
19:48 coppercore moritz_: do you care for me using your logbot on a channel?
19:48 moritz_ coppercore: it's free software, go right ahead ;)
19:49 coppercore ok
19:49 coppercore :)
19:49 moritz_ coppercore: it would be nice if you kept the attribution line in the footer, but add your own contact details
19:49 coppercore of course
19:54 wknight8111 joined #perl6
19:54 pmurias diakopter: what sould live in Perl6in5 Object/*?
19:55 diakopter pmurias: I was merely dreaming when I added those; they can be deleted if you feel like pughouse cleaning
19:55 diakopter pmurias: have you tried the TRACE output yet? :)
19:57 diakopter export TRACE=2 (don't go much higher than 2 unless you want to fill up your disk/memory)
19:59 pmurias not yet
20:00 pmurias do you use a seperate tokeniser?
20:00 pugs_svnbot r20811 | moritz++ | [spec] first simple tests for :sameaccent regex modifier
20:01 diakopter pmurias: nope; the whole thing is a tokeniser.  it would be impossible to do it in >1 passes...
20:01 moritz_ yap6: say 1;
20:01 p6eval yap6 r20811 OUTPUT[parsed: [["use"],["v6"],[";"],["say"],[1],[";"],["EOI"]]␤]
20:01 moritz_ that's actually not a parse tree, just the tokenizer's output
20:01 moritz_ yap6: 2*(1+3)
20:01 p6eval yap6 r20811 OUTPUT[parsed: [["use"],["v6"],[";"],[2],["*"],["("],[1],["+"],[3],[")"],["EOI"]]␤]
20:02 diakopter pmurias: although, much of it could probably be vastly accelerated by converting many of the rules to have RE hints.
20:02 diakopter moritz_: yep I'm adding in the hierarchers/orderers now
20:02 pmurias RE hints - that's inelegant
20:03 diakopter true
20:03 pmurias such things should be generated automaticly
20:03 pmurias ;)
20:03 diakopter oh yeah; I was speculating about that the other day...
20:03 diakopter since all of these parser generators are reversible (so far)
20:03 pmurias food&
20:03 diakopter they could conceivably be compiled to something
20:08 pmurias is yap6 O(N)
20:08 pmurias ?
20:08 diakopter no; but if mapply() were enabled (and working correctly) theoretically it would be.
20:09 pmurias with the packrat thingy?
20:09 diakopter b/c it has direct right recursions it's geometric.
20:09 diakopter pmurias: yeah the packrat memoizer/pruner
20:09 pugs_svnbot r20812 | moritz++ | [spec] some more :sameaccent and :ignoreaccent tests
20:10 diakopter enabling mapply() (in parser()) slows down the parsing of small inputs greatly... I haven't experimented with how it affects the speed of tokenizing larger inputs.
20:11 diakopter if there are lots of right-associated nested expressions, it might speed it up, if I understand the theory correctly.
20:11 pmurias geometric is O(n**2) ?
20:11 diakopter there isn't any left recursion in the grammar (yet)
20:11 diakopter so it doesn't help there
20:12 diakopter yeah, polynomial; sorry
20:13 pmurias O(n*what)?
20:13 pugs_svnbot r20813 | pmurias++ | [yap6] removed Perl6in5::Object
20:13 diakopter again, based on my (highly possibly suspect) understanding...  I dunno.  whatever a vanila/naive recursive descent parser is where there are right recursions
20:16 pmurias diakopter: should i removed unused MJD stuff such as Iterator.pm
20:16 pmurias ?
20:16 diakopter sure
20:17 diakopter leave Stream and Regex
20:23 pmurias too late
20:23 pugs_svnbot r20814 | pmurias++ | removed unused MJD stuff and empty files
20:25 pmurias what was in Regex?
20:25 diakopter some more parser combinators
20:25 pmurias ones not implemented yet?
20:25 diakopter the rudiments of yetyetyet another Perl 5 RE engine
20:26 pmurias Stream is lazy lists?
20:26 diakopter it was from http://hop.perl.plover.com/Examples/ALL/Regex.pm
20:26 diakopter yeah
20:29 pmurias Stream dosn't look very appealing
20:30 diakopter no; I yanked it from being used for the input feeder
20:30 diakopter (by Lexer.pm)
20:30 diakopter converted it to something closer to STD5.pm
20:30 diakopter and Cursor5.pm
20:34 pmurias diakopter: should the source filter generates sub predeclarations?
20:34 diakopter pmurias: that would be really cool; I don't know how to do it
20:38 pmurias it will be a hack :(
20:45 pmurias svnbot is lazy :(
20:45 pugs_svnbot r20815 | pmurias++ | [yap6] sub predeclaration are generated by the source filter
20:45 pmurias diakopter: any other wishes?
20:46 diakopter ohhh.... I didn't realize FILTER was called only once...
20:46 diakopter figures
20:48 pmurias i would suggest porting yap6 to elf but not having a compile part of the edit-test cycle is a refreshing difference
20:48 diakopter you could write rules for the version of pod that's in STD
20:50 borondil joined #perl6
20:50 pmurias ok
20:50 diakopter but no, I don't have any more wishes; that's a super-clean pure-Perl-5 grammar
20:50 diakopter well, with a bit of source filtering
20:51 pmurias shouldn't we use &lit instead of &hit
20:51 meppel-san joined #perl6
20:51 justatheory joined #perl6
20:51 diakopter pmurias: sounds good to me; if it makes better sense to you
20:52 diakopter I assume you mean literal
20:52 pmurias yes
20:53 eternaleye joined #perl6
20:55 pmurias diakopter: ++ and -- could be replaced with some other operators
20:55 diakopter pmurias: any ones that have the right precedence and fixation
20:56 diakopter pmurias: oh wait, it's using a source filter anyway so it doesn't matter! :D
20:57 pmurias although +ws is only one char longer then ++ dosn't require any filtering and is self explanatory
20:58 diakopter ok.  and -ws for optional ws?
20:58 pmurias yes
20:59 pmurias the }{ rule dosn't seem to be used and it's just looking for truble
21:00 pmurias * trouble
21:00 diakopter pmurias: I'm using it in tester.pm
21:01 diakopter rule some { otherrule }{ handler code };
21:01 diakopter unless you have another idea
21:01 diakopter I wanted something other than },sub {
21:03 diakopter I didn't like mjd's syntax ( { } >> sub { }
21:04 pmurias my limited experience with source filtering js is that they only don't cause trouble if you do something extremly blunt
21:04 pmurias diakopter: what is the second block meant to do?
21:06 pmurias got it
21:06 diakopter handle the list of results from the rule match (to put them in the proper order, insert a function name
21:06 diakopter or a callback
21:06 pmurias why can't we embed the handling code inside
21:07 diakopter that's an idea
21:07 diakopter rule some { hit    - handle( handler() ) }
21:07 diakopter they could be generated similarly to the parsers
21:08 diakopter actually it would be   . handle
21:08 diakopter so it doesn't slurp whitespace
21:09 diakopter is that what you had in mind?
21:09 pugs_svnbot r20816 | Auzon++ | [gsoc_spectest] fixed some .WHAT tests. (Added 1 test)
21:09 pmurias diakopter: yes
21:09 diakopter ok; I like that idea better... it uses the existing infrastructures
21:10 * diakopter svn revert
21:11 icwiener joined #perl6
21:11 pugs_svnbot r20817 | pmurias++ | [yap6] removed "features" from the source filter
21:11 pmurias shower&
21:15 borondil left #perl6
21:21 justatheory joined #perl6
21:30 pmurias the '.' hack could be replace with overload::constant
21:32 pmurias OTOH it could just be removed
21:33 diakopter removed how?
21:33 pmurias '.' being converted to lit('.')
21:33 diakopter oh that
21:34 diakopter but 'a' is pretty close to Perl 6 style
21:35 pmurias overload::constant could also be used
21:35 pmurias but it would also affect "." and q{.} etc.
21:46 pmurias diakopter: are the rules in STD_hand.pm in any order?
21:46 diakopter no
21:50 pmurias what is tester.pm?
21:50 diakopter the much shorter grammar I'm using for experimenting
21:50 diakopter it's just the basic calculator
21:51 diakopter I used it to test the longest-match mechanism
21:52 diakopter and it does handle nested right associatives ok
21:52 pugs_svnbot r20818 | pmurias++ | [yap6] changed &hit to &lit
21:54 diakopter +p6ws will never match anything
21:54 diakopter b/c you're asking for whitespace after you've already slurped up all intervening whitespace
21:55 diakopter (should be  ".p6ws")
21:55 pmurias right
21:58 pmurias re handlers are you working on them?
21:58 pugs_svnbot r20819 | pmurias++ | [yap6] small fix
21:58 diakopter pmurias: yep
21:58 camgirl29 joined #perl6
21:58 pmurias what do you return from them?
21:59 diakopter a modified version of the hashref that was inputted (same as the other parsers)
21:59 pmurias you mean the Match object?
22:00 diakopter $in , in all the combinators
22:00 diakopter committing
22:00 pmurias what editor are you using?
22:00 diakopter at the office, Notepad++, at home/road, TextMate
22:01 pugs_svnbot r20820 | diakopter++ | [yap6] rudimentary (proof-of-concept) for post parse handlers
22:01 diakopter why; are the line endings or encoding broken or something?
22:02 diakopter um; I thought I reverted those earlier changes.... fixing
22:02 pmurias diakopter: no just curious
22:03 diakopter they're both pretty powerful - plenty for me at least
22:03 pmurias thought we could try using gobby sometime if you are not using a vi based editor
22:06 diakopter nobody commented on my Perl5=Perl101;Perl6=Perl110 joke... ;)
22:06 pmurias as only i would be inconvinienced at using non-vi key bindings
22:06 pugs_svnbot r20821 | diakopter++ | [yap6] cleanup of mis-reversions
22:08 bacek joined #perl6
22:08 coppercore left #perl6
22:08 pmurias it should be possible to create match objects automaticly
22:09 diakopter how does one force list context..
22:09 diakopter I know about scalar()
22:10 Eevee list?
22:10 Eevee as in, list()
22:10 Eevee or do you mean p5
22:10 diakopter sorry yes Perl 5
22:10 diakopter :D
22:10 pmurias (something,)
22:10 diakopter thx
22:11 Eevee yeah that
22:12 pugs_svnbot r20822 | diakopter++ | [yap6] a proof of concept that actually works
22:13 diakopter I'm thinking: both() should put its results on the same tier; one() should put it in a new tier
22:13 diakopter one's the horizontal dimension; the other is the vertical
22:16 pmurias diakopter: tier?
22:16 diakopter in the ast
22:16 diakopter or really, in the interpretation plan
22:17 [particle] joined #perl6
22:18 pmurias diakopter: it's speced how much objects should look like
22:18 diakopter ?
22:18 diakopter whereat
22:19 diakopter S00
22:19 pmurias S05
22:20 pmurias Return Values from matches
22:21 diakopter oh... I hadn't realized that was similar to what I was doing
22:21 diakopter hm
22:23 pmurias good night
22:28 diakopter TimToady: in S05 ... s/pattern/{ eval doit() }/   shouldn't that be { try...? I misunderstand.
22:28 Limbic_Region joined #perl6
22:35 diakopter or does that eval the string resulting from doit() ?
22:39 TimToady the latter
22:39 * Limbic_Region hopes to see many of you at YAPC in the next few days
22:43 Eevee_ joined #perl6
22:49 diakopter TimToady: S05:350 - sentence lacks a word I think
22:51 diakopter specifically, a verb
23:36 diakopter for yap6, as{} will signify "interpret/understand/model as/by"... and to{} will signify "evaluate/destination/outcome".
23:38 diakopter that way, all the declarations/procedures relating to a single atom/variable are together.
23:50 mjk joined #perl6

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

Perl 6 | Reference Documentation | Rakudo