Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-11-29

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:04 polettix joined #perl6
00:05 theorb joined #perl6
00:12 zakame__ joined #perl6
00:23 AzureStone joined #perl6
00:30 Southen_ joined #perl6
00:30 Southen joined #perl6
00:37 [particle] joined #perl6
00:47 Alias_ joined #perl6
01:11 BinGOs_ joined #perl6
01:25 felipe joined #perl6
01:45 faxathisia joined #perl6
01:46 DarkWolf84 what's that
02:01 bsb joined #perl6
02:09 Khisanth joined #perl6
02:14 bsb left #perl6
02:15 cnhackTNT joined #perl6
02:15 gongyiliao left #perl6
02:46 Psyche^ joined #perl6
03:05 jjore-m joined #perl6
03:11 Lorn joined #perl6
03:27 dlocaus left #perl6
04:53 AzureStone left #perl6
05:08 cnhackTN1 joined #perl6
05:09 BinGOs joined #perl6
05:21 Aankhen`` joined #perl6
05:37 Daveman joined #perl6
05:59 BinGOs joined #perl6
06:15 BinGOs_ joined #perl6
06:22 kst joined #perl6
06:24 alc joined #perl6
06:26 jisom joined #perl6
06:58 Alias_ joined #perl6
06:59 c9s joined #perl6
07:06 c9s_ joined #perl6
07:13 devogon joined #perl6
07:29 iblechbot joined #perl6
08:37 franck___ joined #perl6
09:12 penk joined #perl6
09:19 pugs_svn r18959 | moritz++ | [irclog] updates to .htaccess
09:19 masak joined #perl6
09:26 pugs_svn r18960 | moritz++ | [irclog] use modern URLs everywhere
09:28 pugs_svn r18961 | moritz++ | [irclog] nick and spelling fixes
09:33 elmex joined #perl6
09:34 agentzh joined #perl6
10:07 pbuetow joined #perl6
10:29 tokuhiro_ joined #perl6
10:32 dalecooper joined #perl6
11:00 ebassi joined #perl6
12:01 Aankh|Clone joined #perl6
12:05 [particle] joined #perl6
12:24 Lorn joined #perl6
12:49 lichtkind joined #perl6
12:51 integral joined #perl6
12:52 cmarcelo joined #perl6
13:07 penk joined #perl6
13:09 Torment joined #perl6
13:34 idiotmax joined #perl6
13:57 rgs question:
13:57 rgs X.contains(any @$_)
13:57 rgs that means that X contains every element of @$_ ? or at least one ?
13:58 moritz_ what's the semantics of method contains?
13:58 rgs X is a hash
13:59 moritz_ S29 doesn't list "contains" as a method
13:59 moritz_ anyway, the test $x == any(@list) will succeed if $x is equal to at least one of @list
14:00 moritz_ so if contains() doesn't accept a junction, it will be rendered to X.contains(first elem) or X.contains(second elem) or ...
14:00 rgs moritz_: I got that code straight from the S03 you pointed me to on P5P :)
14:00 moritz_ at least that's my understanding of authreading
14:01 moritz_ rgs: damned ;)
14:01 rgs ok
14:01 moritz_ i think it will succeed if it contains one of @$_
14:01 moritz_ gotta go...
14:01 moritz_ ciao
14:02 rgs thanks
14:02 drrho joined #perl6
14:02 * rgs will wait for TimToady to be extra sure
14:06 iblechbot joined #perl6
14:07 smtms joined #perl6
14:12 hanekomu joined #perl6
14:21 gongyiliao joined #perl6
14:35 ether0 joined #perl6
14:38 hanekomu_ joined #perl6
14:40 TJCRI joined #perl6
14:44 jhorwitz joined #perl6
14:52 rgs smart matching is commutative, right ?
14:52 Psyche^ joined #perl6
15:04 fglock joined #perl6
15:05 pugs_svn r18962 | fglock++ | [kp6] all tests pass again
15:10 Aankhen`` joined #perl6
15:33 pugs_svn r18963 | fglock++ | [kp6] more Array.STORE fixes
15:35 fglock kp6: my @a = [1,2,3]; say @a.perl;
15:35 exp_evalbot r18963: OUTPUT[[ [ 1, 2, 3 ] ]␤]
15:36 chris2 joined #perl6
15:36 gongyiliao left #perl6
15:43 pugs_svn r18964 | fglock++ | [kp6] script/kp6 - more "-e" documentation
15:47 masak joined #perl6
15:49 pmurias joined #perl6
15:51 pmurias rgs: %hash.contains(any(@elems)) is equivalent to any(@elems.map({%hash.contains}))
15:52 pugs_svn r18965 | fglock++ | [kp6] t/kp6/67-list-interpolation.t - minor fix
15:52 rgs pmurias: ok, so at least one of @elems is a key in %hash
15:53 pmurias yes
15:53 rgs pmurias: and we have @x ~~ %y iff %y ~~ @x right ?
15:54 pmurias rgs: i don't know that one
15:54 penk joined #perl6
15:57 pmurias rgs: i would guess not look at S03: 2606
16:07 pugs_svn r18966 | fglock++ | [kp6] added t/kp6/68-list-assignment.t
16:08 fglock next thing to fix is binding - after coffee &
16:14 amnesiac joined #perl6
16:15 Psyche^ joined #perl6
16:24 kanru joined #perl6
16:28 barney joined #perl6
16:30 moritz_ since TEST is gone, where is the list of test from the pugs suite to run?
16:36 fglock moritz_: script/run_tests.pl, after DATA
16:36 aindilis joined #perl6
16:38 moritz_ fglock: thanks
16:40 pugs_svn r18967 | fglock++ | [kp6] added t/todo/69-list-binding.t
17:03 hanekomu_ joined #perl6
17:16 jjore-m joined #perl6
17:35 dlocaus joined #perl6
17:35 dlocaus moritz_: ping?
17:35 moritz_ dlocaus: pong!
17:35 * moritz_ plays ping pong regularly, but calls it "table tennis" ;)
17:35 dlocaus on the http://irclog.perlgeek.de/perl6/today , the "previous" day link is broken
17:35 lambdabot Title: IRC log for #perl6, 2007-11-29
17:36 moritz_ dlocaus: ah, I see, thanks
17:36 dlocaus I used to be good at table tennis.  My GF tried to get me interested in "tennis", but I kept on putting a spin on the tennis ball.
17:36 dlocaus apparently that's very bad sportsmanship..
17:36 moritz_ ;)
17:36 dlocaus she kept on wondering why all her "return" hits were flying everywhere. :)
17:37 pugs_svn r18968 | moritz++ | [irclog] (hopefully) fixed next/prev. day links
17:38 moritz_ dlocaus: I noticed that the effect of spin is different in table tennis and tennis...
17:38 moritz_ table tennis: the angle between ball and racket changes
17:38 moritz_ tennis: just the trajectory of the ball changes
17:39 dlocaus fglock: I've been scratching my head about something.  KP6 uses an AST to convert the perl6 code to language "X", one of which will be parrot.  KP6 can also use the AST to convert the perl6 code to perl6.  But, why are we writing the backend for the perl6 language?  I understand that it so that we can test out the compilation, but if that is the case, then can we just use the perl6::(insert perl5 module name here) instead of re-writi
17:40 fglock dlocaus: we need the "perl6 backend" in order to convert back AST to source code,
17:40 dlocaus moritz_: I wish I knew, all I know about physics is imperical evidence and not to try and not to play chicken with an 18 wheeler truck.
17:40 fglock for example, for implementing macros
17:40 dlocaus "back AST"?
17:40 fglock AST back to source code
17:41 fglock and for debugging, too
17:42 moritz_ think of it as B::Deparse
17:43 fglock yes
17:44 dlocaus but if we are depending on parrot to do some of the really dirty work for us, namespacing, inheritiance, binding issues, why are we doing the backend?  If we are just trying to translate the backend do we really need the runtime engine?
17:45 moritz_ one of the goals of kp6 is to stay portable
17:45 fglock hmm - kp6 is perl6-in-perl6, not perl6-in-parrot
17:45 dlocaus sorry, /if we are just tyring to translate the backend/if we are just trying to translate perl6/
17:47 fglock but yes, the kp6 side of the parrot runtime should be really simple
17:47 fglock if parrot does the dirty work
17:48 dlocaus Isn't there a perl5 project to write a perl5 compiler in parrot?
17:48 * [particle] kicks a dead ponie
17:49 dlocaus opps.
17:49 moritz_ that was ponie, and discontinued some years ago
17:49 fglock dlocaus: yes, there have been more than one
17:49 PerlJam dlocaus: feel free to revive the ponie if you want :-)
17:50 dlocaus PerlJam: sorry, I don't have enough time to try and even pull that off :). Its taken me quite a while, before I could even ask intelligent questions in KP6 :)
17:50 fglock i've got a secret plan to write a perl5 compiler using kp6 :P
17:51 fglock hmm - i can't commit
17:51 dlocaus I hate this bootstraping compiler idea, it is so darn hard to wrap my mind around it.
17:52 fglock dlocaus: have you checked out MiniPerl6? it's much simpler
17:52 dlocaus No, a few days ago, I finally had that lightbulb go off on KP6.
17:53 fglock dlocaus: can you commit? I'm getting an error here
17:53 dlocaus Which raises another question, why did you use a "tree" model to build the $::(*) objects, and not something like "Class::Prototype"
17:53 dlocaus one second, trying
17:54 fglock dlocaus: because I need the algorithm to be portable (to C for example)
17:54 pugs_svn r18969 | dlo++ | [kp6] minor documentation improvment
17:54 dlocaus fglock: I commited fine.
17:54 dlocaus kitty:~/perl6> svn commit -m "[kp6] minor documentation improvment"  src/KindaPerl6/Runtime/Perl6/Junction.pm
17:54 dlocaus Sending        src/KindaPerl6/Runtime/Perl6/Junction.pm
17:54 dlocaus Transmitting file data .
17:54 dlocaus Committed revision 18969.
17:54 dlocaus kitty:~/perl6>
17:54 fglock or dotnet :P
17:55 dlocaus why does it have to be portable to C?
17:55 fglock ruoso is working on a C implementation
17:55 dlocaus ruoso is going to write a C implementation of KP6?
17:56 fglock yes (the runtime)
17:56 dlocaus One of the reasons I like writing in perl, is that its about 1/2 the code.... ;)
17:56 fglock v6/yap6
17:57 fglock ugh - i just can't commit
17:58 [particle] fglock: any error message/code?
17:58 fglock RA layer request failed: OPTIONS request failed on ... - it looks like a network error
18:00 ruoso dlocaus, yap6 is near of having all the features needed to support kp6
18:00 * ruoso going away...
18:01 fglock I can get to feather, but I get: A checksum mismatch occurred: Base checksum mismatch on '/mirror/pugs/src/perl6/Perl-6.0.0-STD.pm'
18:04 pugs_svn r18970 | fglock++ | [kp6] array binding uses .BIND
18:06 fglock_ joined #perl6
18:06 fglock_ it was a local network problem - I'm now using a dialup line
18:06 dlocaus brb, running make forcerecompile/test; going to get something to east.
18:06 dlocaus eat
18:07 * moritz_ just ate a lasagne built by his room mate
18:07 fglock_ lasagne++
18:15 ilogger2 joined #perl6
18:15 Patterner built..? hammered from the finest rock you can find?
18:16 * [particle] prefers rock lobster
18:16 justatheory joined #perl6
18:16 moritz_ Patterner: "built" like software is "built" from its raw components (aka source code)
18:17 Patterner All hail the Food::Component::Pasta.
18:31 dlocaus lasagna is good, but its too fattening... all that cheese
18:31 dlocaus EWWW
18:31 dlocaus http://en.wikipedia.org/wiki/Lasagna
18:31 dlocaus The word "lasagna" is derived from the Greek word "lasanon" meaning chamber pot.[3][4] The word was later borrowed by the Romans as "lasanum" to mean cooking pot. The Italians then used the word to refer to the dish in which what is now known as lasagna is made.
18:31 lambdabot Title: Lasagna - Wikipedia, the free encyclopedia
18:32 rgs you shall not believe everything that is written in wikipedia
18:32 drrho joined #perl6
18:38 TJCRI joined #perl6
18:41 dlocaus perl5 only has # and =pod to make comments right?
18:41 dlocaus there isn't any other way of making a comment?  /*   */ for instance?
18:42 moritz_ only with source filets
18:42 moritz_ *filters
18:42 dlocaus is there any unorthdox methods?
18:42 dlocaus ie, the really wrong way to do it, but it works?
18:43 moritz_ patch the parser?
18:43 [particle] if(0) { commented out parse-able source }
18:43 dlocaus I want to see if there is a way that I could embed the perl6 code we compile into the perl5 code as comments, but since it is "newline" independent, I need some way of hiding it out..
18:44 moritz_ dlocaus: in here-documents for example
18:44 [particle] =for perl6\n stuff \n=cut
18:45 dlocaus humm ok
18:45 dlocaus I'll check into that.
18:46 pugs_svn r18971 | fglock++ | [kp6-perl5] t/todo/69-list-binding.t - some tests pass
18:53 IllvilJa joined #perl6
19:05 pugs_svn r18972 | fglock++ | [kp6] an infinite loop bug in Array.BIND - left commented out; t/todo/69-list-binding.t fails 2 tests
19:12 drupek12 joined #perl6
19:14 polettix joined #perl6
19:35 ilogger2 joined #perl6
19:35 Kattana joined #perl6
19:36 pugs_svn r18973 | dlo++ | [kp6] fixed documentation notation, cosmetic change
19:41 DarkWolf84 joined #perl6
19:47 hanekomu_ joined #perl6
19:47 jhorwitz joined #perl6
19:47 [particle] joined #perl6
19:47 kst joined #perl6
19:47 ft joined #perl6
19:47 f0rth joined #perl6
19:47 kcwu joined #perl6
19:47 SamB joined #perl6
19:54 pmurias dlocaus: why do you want to embed the perl6 code into the perl5 code?
19:54 pugs_svn r18974 | fglock++ | [kp6] s/Array/List/ in some places
19:55 dlocaus pmurias: Sometimes, I get confused by why something is happening, then I convert the perl6 code into the ::DISPATCH(...) mess, and read what is going on from that presepective
19:56 dlocaus The problem is I end up having to clean up the perl5 ::DISPATCH into something "simpiler"
19:56 dlocaus it would be good to have the perl6 code or something of that nature, to "document" what is going on.
19:56 TimToady if you just want the original for reference, s/^/#\t/mg works pretty well.
19:57 TimToady or s:g/^^/#\t/ in the new world order
19:57 TJCRI joined #perl6
19:58 dlocaus pmurias: I'm reading up on S05 (regex) now...
20:02 clkao 'win 58
20:03 dlocaus In contrast          <ident> !~~ ^ 'moose' $       would allow any identifier containing "moose" as long as it is not equal to "moose". For clarity it might be good to use extra brackets:
20:03 dlocaus How does that work?
20:03 jisom joined #perl6
20:03 dlocaus what about ^ 'moose' $ says "the id can contain moose, but cannot be /^moose$/?
20:05 pugs_svn r18975 | fglock++ | [kp6] more Array x List
20:05 [particle] ^ and $ anchor the pattern
20:06 [particle] ...to the beginning and end of the string
20:06 dlocaus but what enforces the requirement that it must have "moose" in it?
20:06 [particle] so, ^ 'moose' $ only matches a string with the five letters: moose
20:08 dlocaus but for the rule <ident> !~~ ^ 'moose' $
20:08 dlocaus would it match "ThisIs_moose"
20:08 [particle] !~~ is the opposite of ~~
20:09 dlocaus right, so it should be that the rule <ident> !~~ ^ 'moose' $
20:09 dlocaus would match everything that does not match in perl5: /^moose$/ correct?
20:09 dlocaus $ident !~ /^moose$/;
20:10 [particle] (phone)
20:11 TimToady it also requires the match of an identifier, and the !~~ is a submatch anchored to the beginning and end of that identifier
20:11 TimToady even if embedded in a longer match
20:12 dlocaus I thought white space was "for appearances" only if not specified as being required?
20:13 pmurias S05: 495
20:13 dlocaus IE, if it was present, it doesn't necessary have to match something
20:13 pmurias dlocaus: yes
20:14 dlocaus But, TimToady said that it requires the match of the identifier.
20:14 pmurias !~~ takes <ident> as the left parameter
20:14 dlocaus so
20:14 dlocaus <ident> !~~ ^ 'moose' $
20:14 dlocaus would be in perl5  $ident !~ /^moose$/ && $ident =~/\b?moose\b?/;
20:16 Limbic_Region joined #perl6
20:16 pmurias dlocaus: ident is a subrule
20:16 Tene dlocaus: yes, that would also match identifiers not containing "moose" at all.
20:16 TimToady more like $ident =~ /^([a-zA-Z]\w*)$/ and $1 ne 'moose'
20:16 dlocaus but the documetnation said that it must have "moose" in it
20:16 TimToady the !~~ negates that
20:17 dlocaus that was the documentation for that.
20:17 dlocaus In contrast          <ident> !~~ ^ 'moose' $       would allow any identifier containing "moose" as long as it is not equal to "moose".
20:17 dlocaus 'would allow any identifier containing 'moose' as long as it [the identifier] is not equal to moose
20:17 pmurias wouldn't it be more like /(?!moose)(??{$ident})/
20:18 TimToady except the lookahead isn't necessarily anchored the same
20:18 Tene pmurias: that would disallow "moosables"
20:18 TimToady dlocaus: yes, it allows "schmoose", "moosed", etc, just not "moose"
20:19 pmurias Tene: sorry
20:19 Tene TimToady: but wouldn't it also allow "orange", "water", "xxxxxxx", etc?
20:19 Tene Identifiers that don't contain 'moose' at all?
20:19 TimToady certainly, it allows those too
20:19 Tene dlocaus is asserting that it claims to only allow identifiers that contain 'moose', or can be read as such.
20:19 TimToady the sentence is not intended to be exclusive
20:20 dlocaus Tene: I am not asserting that, the documentation says that.  That was a quote from the documetnation
20:20 Tene dlocaus: the text is ambiguous about exclusivity.
20:20 dlocaus ah, I get it now.
20:21 TimToady the "In contrast" says it's to be read in the context of the previous
20:21 pugs_svn r18976 | fglock++ | [kp6] yet more Array x List
20:21 pmurias wouldn't it be better to just remove the <<containing "moose">> part
20:21 TimToady but it could certainly be clarified
20:22 TimToady no, because then it wouldn't say what I want it to say either
20:22 TimToady but I will fix it
20:22 dlocaus so: 'would allow any identifier containing "moose" as'
20:22 dlocaus should be changed to: 'would allow any identifier (even one containing "moose") as long as it does not match /^moose$/
20:25 Limbic_Region TimToady - 1 year and 26 days until Xmas?
20:26 TimToady Perhaps Perl comes of age on her 21st birthday, and will immediately drink herself into oblivion
20:26 Limbic_Region oh wait, next year is a leap year
20:27 Limbic_Region well, if I were a betting man I would feel comfortable betting next year's Xmas would be The Xmas
20:29 TimToady we're getting darn close to the bootstrap, if I can just get my head swelled long enough to encompass the longest token matcher.  after that it doesn't matter if my head shrinks
20:29 pugs_svn r18977 | fglock++ | [kp6] t/todo/69-list-binding.t - one more test passes
20:30 dlocaus maybe an early x'mas next year?
20:31 TimToady productizing the whole thing will take a goodly long time.
20:32 dlocaus "productizing"?
20:32 PerlJam Having a usable-in-production perl6 is a good first step  :)
20:32 TimToady making it slick enough that you don't have to have a Masters in Sysadmin to install.
20:33 PerlJam TimToady: Having adequate documentation to fend off "I think X should be in core" people would be good too.
20:33 dlocaus I didn't know there was a degree for System administration, I always thought good sys admin's were forged.
20:34 PerlJam dlocaus: mastery is when they call you a bofh
20:35 Limbic_Region PerlJam - better yet - "here is the spec and tests - write your own implementation with whatever you want core and it is still perl 6"
20:35 pugs_svn r18978 | fglock++ | [kp6] t/kp6/69-list-binding.t resolved
20:36 PerlJam Limbic_Region: as far as productizing goes, I think we should build the first few perl6 distributions.  perl6-web, perl6-database, perl6-kitchen-sink, etc.
20:37 dlocaus for http://dev.pugscode.org/browser/v6/v6-KindaPerl6/src/KindaPerl6/Grammar.pm
20:37 TimToady maybe should name them perl6-slackware, perl6-debian, perl6-fedora, etc.
20:37 lambdabot Title: /v6/v6-KindaPerl6/src/KindaPerl6/Grammar.pm - Pugs - Trac, http://tinyurl.com/225wsx
20:37 Limbic_Region PerlJam I don't think anyone (aside from audreyt) will be rushing out to make their own perl 6 anytime soon
20:37 dlocaus how do I say this
20:37 Limbic_Region PerlJam:  I just like the fact that anyone who wants to can
20:37 TimToady carefully
20:37 dlocaus return ::Apply(
20:37 dlocaus 'code'      => COMPILER::get_var(
20:37 dlocaus ::Var(
20:37 dlocaus sigil     => '&',
20:37 dlocaus twigil    => '',
20:37 dlocaus name      => $$<ident>,
20:37 dlocaus namespace => $$<namespace>,
20:37 dlocaus ) ),
20:37 dlocaus 'arguments' => $$<exp_parameter_list>,
20:37 dlocaus 'codeAsIs' => "$$<ident> $$<namespace>",
20:38 dlocaus )
20:38 dlocaus moritz_: the sial.org/pbot/perl6 bot is out.. some sort of proxy error... -fyi
20:39 dlocaus THe "$$<ident> and $$<namespace>" arguments do not interpolate
20:39 fglock_ dlocaus: $x ~ ' ' ~ $y
20:40 fglock_ MiniPerl6 doesn't interpolate
20:40 dlocaus oh.
20:41 fglock_ dlocaus: not sure if this is a godd idea - just storing from/to pointers are shorter
20:41 fglock_ is shorter
20:41 fglock_ good
20:41 * fglock_ should read before sending
20:41 dlocaus Right now, I'm just poking around to see if I can make the code "some-what" self documenting.
20:42 dlocaus I love Firefox.  1 day after distributing a patch, the whole world is updated.
20:42 dlocaus makes microsoft look like ...
20:43 pugs_svn r18979 | fglock++ | [kp6] array binding cleanup
20:45 thoughtpolice joined #perl6
20:46 fglock_ kp6:  my @a := ( [1,2,3],5,6); say @a.perl;
20:46 exp_evalbot r18979: OUTPUT[[ [ 1, 2, 3 ] ]␤]
20:46 fglock_ is this correct?
20:46 buubot joined #perl6
20:47 fglock_ kp6:  my @a := ( [1,2,3],5,6); say "   ",@a.perl,"   ";
20:47 exp_evalbot r18979: OUTPUT[   [ [ 1, 2, 3 ] ]   ␤]
20:49 dlocaus pugs: exp_parameter_list
20:49 exp_evalbot OUTPUT[*** No such subroutine: "&exp_parameter_list"␤    at /tmp/ghy0rvRRg9 line 1, column 1 - line 2, column 1␤]
20:50 dlocaus pugs: my @a := ( [1,2,3],5,6); say "   ",@a.perl,"   ";
20:50 exp_evalbot OUTPUT[   [[1, 2, 3],]   ␤]
20:50 fglock_ cool :)
20:51 pmurias dlocaus: i think the best thing would be to make kp6 emit #line
20:52 pmurias and optionaly insert the perl6 code with an additional script
20:52 dlocaus pugs: 1/1
20:52 exp_evalbot RESULT[1/1␤]
20:52 dlocaus pugs: $a = 1/1; say $a;
20:52 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$a" requires predeclaration or explicit package name␤    at /tmp/iKjeG7D8Nz line 1, column 3␤]
20:53 dlocaus pugs: my $a = 1/1; say $a;
20:53 exp_evalbot OUTPUT[1␤]
20:53 dlocaus pugs my $a = 1/0; say $a;
20:53 dlocaus pmurias: you mean just emit #(token) __FILE__ : __LINE__ line numbers?
20:54 dlocaus I hadn't thought about that, right now, I'm just seeing if I can get enough of the matching string to show up so that I can put it some where.
20:55 dlocaus brb
20:56 pmurias joined #perl6
21:00 dlocaus How did you guys do this on $MATCH->{'ident'}? when $MATCH claims to be
21:00 dlocaus 0  KindaPerl6::Perl5::Match=SCALAR(0x346d590)
21:00 dlocaus -> 'say "hello!"'
21:00 dlocaus in compiled/perl5-kp6-mp6/lib/KindaPerl6/Grammar.pm
21:00 pugs_svn r18980 | lwall++ | Use of Assignment type should be Item_assignment instead.
21:02 pugs_svn r18981 | fglock++ | [kp6] t/kp6/16-what.t resolved
21:02 dlocaus ah, an inside out class.
21:02 dlocaus well, not quite
21:03 pmurias dlocaus: why would you want to emit #(token)
21:04 dlocaus oh, by token I meant something I can go back and replace later
21:04 pmurias #line actually works in perl5
21:04 dlocaus #(dlocaus_replace_me) __FILE__ : __LINE__
21:04 dlocaus #line?
21:05 pmurias eval: #line 123;die 'watch this'
21:05 pmurias it works like in C
21:06 dlocaus I'm not faimilier with how this works in C
21:06 dlocaus I ran that in a perl program, and nothing happened.
21:08 pmurias dlocaus: sorry replace the ; with a newline
21:09 dlocaus urhum? how did that work?
21:09 pmurias i'm not familiar with perl5 internals
21:09 TimToady you don't want to know
21:10 neuromu joined #perl6
21:10 [particle] ^--- jedi mind trick
21:10 TimToady if you even glance at toke.c in a mirror, it will drive you mad
21:10 pmurias :)
21:10 pmurias even if you are mad already?
21:10 dlocaus I thought perl comments were stripped from the dynamically generated byte code.
21:10 TimToady if anything could make you madder, it would be toke.c
21:11 pmurias got to try ;)
21:11 dlocaus is there an svn server for perl5 that I can take a peek at?
21:11 TimToady dlocaus: sure, but it's got to remember the current line number for error messages somehow
21:11 TimToady and #line is not treated like an ordinary comment
21:11 dlocaus I seam to recall that perl5 was on perforce?
21:12 dlocaus I wonder what other wunderous perls are in toke.c?
21:12 TimToady rsync -avz rsync://ftp.linux.activestate.com/perl-current/ .
21:13 jjore-m dlocaus, if you look for "intuit" you'll see some neat stuff.
21:13 pmurias dlocaus: #line is documented in "Programming Perl"
21:13 TimToady let's put it this way.  there are 7 or 8 different ways a lexer can "cheat".  toke.c does them all.
21:14 pmurias page 590 in the polish edition (althought i doubt you have that one)
21:15 dlocaus I'm looking in the English Cammel book (US engish if there is a distinction)
21:15 TimToady each of the ways to cheat individually screws with your mind, and toke.c intermeshes them all simultaneously.
21:16 TimToady and above that the compiler cheats several more ways, just to make sure the compilation looks to be done in "one pass", while propagating context information every whichaway.
21:16 dlocaus its 618 in the English Camel book.
21:17 dlocaus that is really intersting.
21:17 TimToady not to mention building the execution order on the fly
21:18 TimToady so that by the time you get to the end of, say, a BEGIN block, it's ready to execute already.
21:18 dlocaus oohh... I should have just downloaded a compressed version of it....
21:18 TimToady s/you get/the parser gets/
21:19 TimToady the -z does compression on the rsync already
21:19 TimToady and this way you get "bleadperl".  :)
21:20 pmurias OT: does anyone remember what was the data stucture for geting the number of elements in a given range (1..interger) called,it worked by storing the number of elements up to powers of or similarly
21:20 dlocaus oh geez.
21:20 dlocaus what a copyright statement on toke.c
21:20 dlocaus 1991-2007
21:21 fglock_ home &
21:22 TimToady Yeesh.  All I can say is, it's a good thing I was smarter when I was younger, or we'd never have got Perl 5.  :)
21:23 pmurias * structure,integer,powers of 2
21:23 pmurias TimToady: but now you're wiser and we will have Perl 6 ;)
21:24 dlocaus wow, the perl5 code looks very nice. Well documented and formated
21:24 TimToady well, dunno about wiser--more treacherous, anyway.
21:25 TimToady dlocaus: that part wasn't my fault  :)
21:25 TimToady as in "Old age and treachery will overcome youth and skill."
21:26 dlocaus S_incline here it is
21:27 dlocaus perl has really spoiled me.
21:27 dlocaus I can barely remember how annoymous variables work in C
21:27 moritz_ with malloc ;)
21:28 TimToady they actually work?  neat!
21:28 [particle] it's a twelve step process
21:28 TimToady Step 1: admit you have a problem...
21:29 moritz_ Step 2: install perl
21:29 dlocaus its stuff like this:     if (strnEQ(s, "line", 4))
21:29 dlocaus where is "line" stored? on the stack? in some constants area?
21:29 TimToady up to the compiler
21:30 dlocaus :)
21:30 TimToady a sufficiently smart compiler might turn that into if (s[0] == 'l' && s[1] == 'i' etc
21:30 dlocaus yea,.. and if you modify it what happens?
21:30 TimToady modify what?
21:31 dlocaus well
21:31 dlocaus strnEQ(char *s, char *s2, int ) {
21:31 dlocaus strcpy('weee',s2);
21:31 dlocaus }
21:31 allbery_b gcc will stow "line" in read-only storage
21:32 allbery_b unless told otherwise
21:32 dlocaus c knows about read-only storage?
21:32 TimToady but in the good old days it was just "Doctor, it hurts when I do this..."
21:32 moritz_ dvorak: the question is if your assembler knows about it ;)
21:32 allbery_b dlocaus:  it does have "const"
21:32 moritz_ s/dvorak/dlocaus/ # sorry
21:32 allbery_b and the type of a string literal is (const char *)
21:33 dlocaus I last worked with C about 15+ years ago.
21:33 allbery_b the standard allows it to put those in r/o, and gcc does so these days
21:33 dlocaus I can read it, and I know I've shot myself in the fut with it.
21:33 dlocaus I thought it was quite possible to just confuse C to death.
21:34 allbery_b (flip side, it's entirely possible for the compiler to recognize that a string constant with NUL will fit in a register and compare it *that* way)
21:34 allbery_b it's not so much that you can confuse C as that you can confuse yourself (or others reading your code)
21:34 * dlocaus is a bit more used to a flakey assembler.
21:34 allbery_b then again, that is true of certain other languages as well :>
21:35 moritz_ ORLY? ;)
21:35 dlocaus When I was programming C, I would do amusing things like create variables on the stack, and then later use free( stackVaraible) to release it.
21:36 pmurias dlocaus: what was the point?
21:36 dlocaus no point, it was just a lousy bug for me to hunt down.
21:36 dlocaus which is one of the reasons, I REALLY like perl.
21:37 dlocaus and if the stack ptr was high enough when it was created, sometimes, the bug didn't express itself.
21:37 dlocaus or until much later, when the stack got over written.
21:37 moritz_ you can use valgrind these days to find such bugs
21:37 TimToady well, in general C is a lot of accidents waiting to happen simultaneously
21:37 dlocaus The problem was I passed the pointer around so many times, I forgot that the original structure was allocated from the stack.
21:38 dlocaus -oopps-
21:40 dlocaus OT: My all time favorite bug... well, there is 2 of them.  1.  I accidently double incremented on a circular loop pointer.  Thus, on even valued circular loops, the code would hang, on odd valued circular loops, the code would work fine.   My 2nd all time favorite bug... well, I forgot to throatal the email for some warnings, and after a major crash the code dumped 900 emails into my bosses cell phone.
21:42 TimToady you mean that wasn't on purpose!?!?
21:42 dlocaus the emails? yeah... it was funny "How the HELL am I going to delete these emails?"
21:43 dlocaus needless to say the snickering got back to the other end of the line.
21:44 dlocaus I think it would be a good email service to offer.  To throatal email for people.
21:44 dlocaus Send an email to person@mydomain.com with subject "[white list] ...", then throtal the email to that account
21:44 dlocaus it would forwarded the email to an address predetermined by the user.
21:45 dlocaus Since, many cell phones have a 10 or 5 cent fee, this would be a good service.  And backed up emails could be read on line or just mass deleted.  It would be a limited market though
21:47 ilogger2 joined #perl6
22:10 dlocaus my brain is out of commission... I'll cya guys alter
22:10 dlocaus left #perl6
22:20 TimToady well, he was warned.  :)
22:24 fglock joined #perl6
22:36 pugs_svn r18982 | fglock++ | [kp6] add a test
22:50 rindolf joined #perl6
22:52 spinclad ans: if you're mad already you still go mad
22:58 pugs_svn r18983 | fglock++ | [kp6-perl5] "HashProxy" is gone
22:58 pugs_svn r18983 | fglock++ | [kp6] TODO update
22:58 araujo joined #perl6
23:08 pugs_svn r18984 | fglock++ | [kp6] roadmap update
23:56 ether0 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo