Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-09-03

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:07 cotto_work joined #perl6
00:08 ruoso TimToady, I really didn't get what you mean...
00:08 Khisanth joined #perl6
00:11 TimToady map {...}, $x never treats $x like an iterator
00:11 TimToady map {...}, |$x is needed if $x contains an iterable object
00:12 TimToady map {...}, @x is non-destructive because @x constructs a new iterator to put in the list
00:12 TimToady map {...}, =$fh is destructive because $fh just returns itself as its iterator
00:13 ruoso TimToady, so I get back to my question... what is the API to traverse the array without forcing eager evaluation...
00:13 ruoso because even if we think on map as an operator... it still needs to be represented in terms of method calls to the input object
00:14 TimToady an @a in list context returns a special iterator that the list can use, and how that works is between the array and the iterator
00:14 ruoso right...
00:14 ruoso but what's the api to access that?
00:15 ruoso and also... what happens in "map { ... }, $x" when $x is an array object?
00:15 TimToady internally when you need the next value from the list, it either returns the next real value or the prefix:<=> of its first "spec" iterator
00:15 TimToady but "spec" iterators are hidden
00:16 TimToady nothing happens to $x; its value is poked straight into the list of real values, not specs
00:16 ruoso I mean... is $x treated as a list? or is it passed as the only value into a single iteration of map?
00:16 TimToady $x is always just itself in list context
00:17 TimToady scalar variables are never treated as composite objects unless you do something to indicate you want that
00:17 TimToady merely putting $x into a list is not enough to indicate that
00:17 ruoso ok... so that's determined by syntax...
00:17 TimToady @$x or |$x
00:17 lambdabot Maybe you meant: . ? @ bf ft id pl rc thx v wn
00:18 TimToady it's one of the reasons we still have sigils
00:18 ruoso right...
00:18 * ruoso trying to put his ideas together...
00:18 TimToady many objects can be used either in the singular or the plural, and we make that explicit
00:20 TimToady likewise, (1,2,3) is a plural view of the list, while [1,2,3] is a singular view
00:21 ruoso Ok... that solves the part that is "visible"...
00:21 TimToady which is why plural (1,2,3) turns into singular [1,2,3] in item context
00:22 bacek joined #perl6
00:22 TimToady (arguably, confusing mutability)
00:25 ruoso TimToady, when map needs the next value, what does it mean in terms of method calls on the array to "return the next real value"?
00:26 TimToady map never sees the array.  the list has already asked the array for an iterator, and runs that iterator when map wants another value
00:26 ruoso right... that's partly what I was thinking already
00:27 ruoso but what "runs that iterator" mean in terms of method calls? .prefix:<=> ?
00:27 TimToady probably
00:27 TimToady don't see why not
00:28 TimToady the point is that various languages either force you to track your own iterators, or have them implicitly floating around after "first call", and in Perl both of those approaches are considered a bit bogus
00:29 TimToady the list data structure is the natural place for iterators to live once they are created
00:30 alanhaggai joined #Perl6
00:30 TimToady so the list manages the iterator objects for you most of the time, and you don't have to manage them explicitly most of the time
00:30 ruoso hmm...
00:31 * ruoso trying to figure out what the means in the low level...
00:32 ruoso ok... in the low-level there's no "implicit"...
00:32 ruoso so, even if the syntax helps you so that "you don't have to manage them explicitly", the iterators are managed independently...
00:33 TimToady if you call =$fh in scalar context, you're doing explicit iteration.  =$fh in list context merely installs $fh in the "todo" list of iterators
00:34 TimToady note that you can't actually decide which till binding time
00:34 ruoso because an "iterator in list context create a new lazy list"
00:36 TimToady well, essentially an inner capture interpolates into an outer capture at that point, which is why list context flattens
00:36 kanru joined #perl6
00:36 TimToady slice context would keep the inner capture discreet
00:36 TimToady discrete, rather
00:37 bacek joined #perl6
00:41 * ruoso trying to put the pieces together...
00:51 ruoso TimToady, I think I found one confusing point... Is there an "Iterator" type? or is that just a way to access the list?
00:58 ruoso the reason why that is relevant is because an iterator is not supposed to provide positional access... an iterator can only be consumed...
01:00 ruoso that way, in "map {...}, map {...}, (1,2,3)", the left map receives just an iterator, and not a list...
01:02 ruoso that fits well with the fact that an iterator in list context creates a lazy list...
01:05 ruoso and also makes it clear that the return of the 'map' in the right has no obligation of providing positional access to the values...
01:05 ruoso and we also can have a generic Lazy List implementation that receives an iterator object...
01:06 Lichtkind_ joined #perl6
01:10 ruoso map would then receive an iterator and return another iterator...
01:15 ruoso TimToady, do you think that's sane?
01:24 * ruoso sleep &
01:40 TimToady seems sane to me, as long as when you say (map {...}, 1,2,3)[$index] you're transforming the iterator to a list and treating the list as subscriptable or turning it into a subscriptable array maybe
01:45 TimToady decommuting &
02:04 hercynium joined #perl6
02:13 alc joined #perl6
02:22 meppel-san joined #perl6
02:35 eternaleye_ joined #perl6
02:45 yahooooo joined #perl6
03:02 elmex_ joined #perl6
03:09 xuser joined #perl6
03:15 Auzon joined #perl6
03:22 Bzek joined #perl6
03:31 AzureStone joined #perl6
03:33 ting joined #perl6
03:34 ting joined #perl6
03:36 BinGOs_ joined #perl6
03:38 Alias_ joined #perl6
03:44 eternaleye_ joined #perl6
03:46 yahooooo joined #perl6
05:03 meppl good night
05:23 Psyche^ joined #perl6
06:02 zostay_ joined #perl6
06:10 xuser_ joined #perl6
06:22 luqui joined #perl6
06:26 ashizawa joined #perl6
06:38 eternaleye_ Hi, I've been golfing around, and I figured a good way to test myself would be generating <a b c d> X <a b c d> in a way that was easily extensible to longer resulting strings than 2 characters. As is, I could chain on additional 'X <a b c d>'s,  but that felt inelegant. So, I tried using the [op] reduce operator, xx, and slice context to get what I wanted. I arrived at 'say $_ for [X] @@ <a b c d> xx 2 ;' but it didn't
06:38 eternaleye_ work, even with various attempts at using parentheses for scope. Any ideas?
06:44 moritz_ [X] doesn't amek sense for operators that return a list
06:45 moritz_ or does it?
06:46 moritz_ eternaleye_: maybe what you wrote is right, but pugs doesn't support slice context
06:46 moritz_ eternaleye_: so it won't work with pugs
06:46 moritz_ and other iimplementations don't do hyper ops
06:46 eternaleye_ X is a list infix operator, so shouldn't [X] @@( @foo @bar @baz ) do the same as [~] <mo os e> ?
06:47 eternaleye_ Ah, pugs not having slice context would do it
06:48 eternaleye_ Thanks!
06:49 moritz_ anyway, this looks evil ;)
06:57 eternaleye_ Just think: for ( 1 .. 6 ) -> $foo { say $_ for [X] @@ <a b c d> xx $foo; } could be a reasonably effective password bruteforcing oneliner ;P
06:57 moritz_ omg ;)
06:57 eternaleye_ s/<a b c d>/[ a .. z, A .. Z, 0 .. 9 ]/
06:59 eternaleye_ Occasionally, Perl6's expressive power makes me think, "APL? We don't need no stinking APL!"
06:59 eternaleye_ It is a decidedly nice language
07:00 jferrero joined #perl6
07:03 eternaleye_ Even cooler is that I seem to recall there being a whole Perl5 module to do that ;D
07:04 moritz_ Algorithms::NestedLoops or something like that
07:33 viklund joined #perl6
07:34 iblechbot joined #perl6
08:11 masak joined #perl6
08:32 Maghnus joined #perl6
08:33 alanhaggai joined #Perl6
08:59 cosimo joined #perl6
09:04 elmex_ joined #perl6
09:18 pim joined #perl6
09:18 pim left #perl6
09:20 pim joined #perl6
09:20 pim hi, everybody.
09:20 masak hi, pim
09:21 pim why this doesn't work in perl 6 : my $n=7; if $n>3) {say "$n est bigger than 3"} ?
09:22 masak pim: too many ')'? :)
09:22 pim Yes but, that's just a mistake i have not in my real script.
09:22 pim i do it again.
09:23 masak perl6: my $n = 7; if $n > 3 { say "\$n is bigger than 3" }
09:23 p6eval elf 22120: OUTPUT[\$n is bigger than 3␤]
09:23 p6eval ..pugs, rakudo 30722: OUTPUT[$n is bigger than 3␤]
09:23 pim my $n=7; if $n>3 {say "$n est bigger than 3"}
09:23 masak pim: it works, see above.
09:23 masak have you tried it with whitespace around the binary operators?
09:23 pim YES.
09:24 masak pim: well, as you see, it works here.
09:24 masak what implementation of Perl 6 are you running?
09:24 masak Pugs, Rakudo...?
09:24 masak and what revision?
09:25 pim Here are my two lines of my script:
09:26 pim [11:37] [pim(+i)] [2:#perl6(+Jnt 30,3)] [Act: 1]
09:26 pim [#perl6]
09:26 pim sorry
09:26 pim I give you the values ...
09:30 masak yes?
09:30 viklund pim: it works for me if I put it in a script, but if I run it through -e 'code' it fails
09:31 pim OK, i come to see the error comes from other part of my script: it's as melting pot script and when i put ONLY this test in it doesn't crash, so i must analyse more...
09:31 pim probably precedent instruction...
09:31 masak viklund: I get the same thing. care to send a rakudobug about this?
09:32 masak viklund: hold on. no, it works.
09:32 masak false alarm.
09:32 pim I use two version of perl 6 perfectly isolated themselves.
09:32 masak this works here: perl6 -e 'my $n = 7; if $n > 3 { say "$n is bigger than 3" }'
09:33 pim the error is produced only for '>' test : not for '<'
09:33 masak pim: could you nopaste the exact commands you're running?
09:34 pim I have warnings complaints when starting my script about precedent instuctions.
09:34 moritz_ rakudo doesn't do any warnings yet
09:34 pim Really sorry bur I don't know how to nopaste : can you explain to me?
09:34 moritz_ http://sial.org/pbot/perl6
09:35 lambdabot Title: sial.org Pastebot - pasteling
09:35 pim thank's ...
09:38 pasteling "pim" at 82.230.45.94 pasted "sial.org Pastebot - pasteling, pim test.pl" (21 lines, 378B) at http://sial.org/pbot/32072
09:38 pim Stored at http://sial.org/pbot/32072
09:38 lambdabot Title: Paste #32072 from "pim" at 82.230.45.94
09:39 pim Right.
09:40 pim I use pugs AND perl6 compiled with parrot and both do the same error.
09:40 pim I give you my versions now ...
09:40 masak pim: seems to me the loop {} construct right before is interfering
09:40 masak you're onto something here
09:40 Myoma joined #PERL6
09:42 pim Sorry : don't understant well :O| did i mistake in my script?
09:43 masak pim: no, pugs and rakudo are at fault
09:43 masak you've found a bug
09:43 masak (I think)
09:44 pim right : may i put this in my CV.
09:45 pim This is Rakudo Perl 6, revision 30402 built on parrot 0.7.0-devel
09:46 pim for i486-linux-gnu-thread-multi.
09:46 pim This is parrot version.
09:46 pim compiled by myself.
09:47 masak oki
09:47 masak and you have a sufficiently recent Rakudo, since I'm getting the same error
09:49 masak pim: smallest file that produces the error is this: 'loop () {\n}\nmy $n'
09:49 masak without the parens, the error goes away.
09:50 masak pim: could you write about this to rakudobug?
09:52 pim i'll do.
09:52 masak pim++
09:52 masak gotta go, see you later
09:56 cosimo joined #perl6
10:06 alanhaggai joined #Perl6
10:13 alanhaggai joined #Perl6
10:39 pim I posted the bug, i did write [BUG] at the begining of the subject.
10:40 pim and described the most i could the situation when it occurs, and included,versions and complains for both versions, pugs and perl6 parrot versions.
10:45 pim i leave for now. thank's to all of you.
10:45 pim left #perl6
10:46 moritz_ pim, I changed to the subject of the RT ticket to be a bit more descriptive... too late
10:59 pmurias joined #perl6
11:06 meppl joined #perl6
11:19 pmurias TimToady: when is the context determined?
11:52 masak joined #perl6
12:05 masak is there a binary comparison operator in Perl 6 according to which two different arrays (say, two separate [1,2] arrays) are the equivalent?
12:07 masak basically, what I'm looking for is some kind of &is_deeply
12:11 zamolxes joined #perl6
12:16 alanhaggai joined #Perl6
12:19 viklund masak: I was actually thinking of implementing that tonight
12:19 masak viklund: heh. :)
12:20 masak I was just wondering about operator support for it
12:20 masak ISTR there was someway one could inflict deep semantics on one of the operators using an adverb
12:20 masak but maybe I dreamt that....
12:23 viklund I can't find anything in S03, should be in there, but I only skimmed it
12:23 masak same here.
12:23 masak I had my hopes on eqv for a while, but it seems that's not what "snapshot semantics" mean
12:24 viklund no
12:25 moritz_ masak: it's just structural equivalence, afaict
12:25 moritz_ really afk &
12:26 * masak greps S03 for 'structural equivalence'
12:27 masak moritz_: what is? and how? Show Me The Code! :)
12:29 iblechbot joined #perl6
13:24 PZt joined #perl6
13:48 moritz_ masak: there's no code ;)
13:49 masak moritz_: but what did you mean?
13:51 moritz_ masak: I thought you were trying to implement it, but didn't understand the specs
13:52 masak moritz_: no, I'm thinking how best to express structural equivalence in Perl 6
14:07 rindolf joined #perl6
14:16 masak maybe `@a <<==>> @b`?
14:17 moritz_ only if they are both made of numbers, and neither the numbers nor the arrays contain mixins
14:17 TJCRI joined #perl6
14:17 masak hm, yes
14:18 moritz_ the eqv operator is in Perl 6 because there's no trivial way to express it in Perl 6 ;)
14:21 masak seems there is no trivial way to express structural equivalence either...
14:21 [particle] eeqqvv ;)
14:21 moritz_ lol
14:21 masak haha
14:22 masak .EQV.
14:22 moritz_ I think $a eqv $b is kinda like $a.perl eq $b.perl, if .perl sorts hashes etc.
14:22 [particle] ooh, look! it's 1977 again!
14:24 meppl joined #perl6
14:26 rindolf joined #perl6
14:56 sri_work joined #perl6
14:56 Exodist joined #perl6
15:03 rindolf joined #perl6
15:13 alester joined #perl6
15:19 moritz_ we'll loose our logging bots (and me) in a few mintues
15:20 hercynium joined #perl6
15:21 moritz joined #perl6
16:32 ilbot2 joined #perl6
16:32 Topic for #perl6is now http://pugscode.org/ | nopaste: http://sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: http://irc.pugscode.org/
16:32 masak moritz: thank you. :)
16:33 moritz_ joined #perl6
16:33 moritz left #perl6
16:35 masak viklund++ has the first workaround to #58392!
16:39 TimToady eqv is structural equiv as long as the types match; there's no such operator if the types to not match, since different types serialize differently
16:39 justatheory joined #perl6
16:39 TimToady s/to no/do not/
16:40 masak TimToady: ok, so bringing that down to the example [1,[2,3]]
16:40 TimToady @tel pmurias context of what?  if you're asking what I think you're asking, binding time
16:40 lambdabot Consider it noted.
16:41 masak what does [1,[2,3]] eqv [1,[2,3]] do?
16:41 moritz_ return true
16:41 moritz_ (as far as I understood)
16:41 masak ok, that's all I need
16:41 TimToady yes, that should be true
16:42 TimToady eqv is "would the serializer produce the same sequence of bytes for both of these?"
16:42 masak ok, good
16:42 malouin left #perl6
16:42 TimToady naïve implementation can just serialize and compare strings
16:43 TimToady fast implementation can short circuit on mismatches without serializing all of both first
16:43 pugs_svn r22123 | moritz++ | [t/spec] a bit of fiddeling in S03-operators/
16:43 TimToady we also assume hash keys are sorted
16:44 masak I don't get line 44 of t/spec/S29-any/eqv.t in the light of this discussion
16:44 TimToady are you asking about "snapshot"?
16:44 masak my @a = (1,2,3); my @b = (1,2,3); ok !(\@a eqv \@b), "eqv on array references (3)";
16:45 masak it's checking that they are _not_ eqv
16:45 masak whereas I think they should be
16:45 TimToady I think there's some p5-think in that test
16:45 moritz_ ie the test is wrong?
16:45 masak aye
16:45 TimToady yes
16:46 TimToady wait
16:46 TimToady it's correct, I think
16:46 TimToady problem is that it's got actual variables
16:47 TimToady does \@a serialize to something that includes, say, the variable name?
16:47 TimToady or its location?
16:47 masak ah
16:47 Chillance joined #perl6
16:47 moritz_ pugs: my @a = (1, 2, 3); say (\@a).perl
16:47 p6eval pugs: OUTPUT[\(1, 2, 3)␤]
16:48 TimToady problem is that the value includes a notion of uniqueness
16:48 TimToady if you serialize (\@a,\@b) and then deserialize, it has to turn into 2 distinct arrays
16:48 TimToady and how does it know to do that?
16:48 moritz_ it does it automatically with pugs' output
16:48 c9s joined #perl6
16:49 moritz_ pugs: my @a = (1, 2, 3); say (\@a, \@a).perl
16:49 p6eval pugs: OUTPUT[(\(1, 2, 3), \(1, 2, 3))␤]
16:49 moritz_ whereas this is wrong
16:49 moritz_ because .[0] !=== .[1]
16:50 TimToady it's the same problem as serializing a closure, really--you end up with the symbol tables coming along for the ride
16:51 moritz_ you can serialize it to something like do { my @a = (1, 2, 3); (\@a, \@a) };
16:52 moritz_ (which is roughly what Data::Dumper)
16:53 TimToady but you still need to keep @a and @b distinct, so the test is correct
16:54 moritz_ :( yes
16:56 pugs_svn r22124 | moritz++ | [t] moved var/var.t to spec/
16:56 TimToady bbl &
16:58 masak so, the conclusion is: (1) the test was correct, (2) I can still do what I want, comparing two different arrays, yes?
16:58 masak (I got lost in the discussion, so I need to confirm)
16:58 pugs_svn r22125 | moritz++ | [t] move var/is_readonly.t to spec
16:59 moritz_ you can, but presumably not their captures (I think)
16:59 masak oh, that's fine.
17:02 pugs_svn r22126 | moritz++ | [t] moved sub_parameter_traits to spec/
17:04 alanhaggai joined #Perl6
17:05 ruoso joined #perl6
17:06 pugs_svn r22127 | moritz++ | [t/spec] fudged S06-traits/misc.t for rakudo
17:10 pmurias joined #perl6
17:11 rakudo_svn r30729 | moritz++ | [rakudo] add traits test to spectest_regression
17:12 cognominal joined #perl6
17:12 pmurias TimToady: context of function/method calls
17:12 lambdabot pmurias: You have 4 new messages. '/msg lambdabot @messages' to read them.
17:14 pmurias TimToady: so a capture evaluates it's arguments only after the binding? and how do we know which variant of a multi to choose before evaluating the multi argument, or are they a special case and receive no/limited context
17:17 ruoso pmurias, I plan to do that pre-checking with .ACCEPTS and only .BIND after the signature matches the capture...
17:18 pmurias ruoso: hi
17:18 pmurias seems resonable
17:18 pugs_svn r22128 | moritz++ | [t] moved a few tests to spec/
17:21 pugs_svn r22129 | moritz++ | [t] move tests for is (tighter|equiv|looser) to spec/
17:24 pugs_svn r22130 | moritz++ | [t] really delete duplicate test
17:30 zamolxes joined #perl6
17:33 pugs_svn r22131 | moritz++ | [t/spec] re-add accidentially deleted smartmatch.t
17:35 moritz_ moritz-- # removing test files accidentially
17:39 rakudo_svn r30731 | moritz++ | [rakudo] one more test for spectest_regression
18:06 ruoso pmurias, btw... after all the debate... "map" is again an operator instead of a method of Array...
18:07 moritz_ but only in the low level bootstrapping, right?
18:07 moritz_ I think the "special" thing should be for, not map
18:08 moritz_ and map can be implemented in terms of for
18:08 [particle] map doesn't guarantee order
18:08 [particle] for does, iirc
18:09 [particle] so it seems for is better suited to be defined at a lower level
18:09 moritz_ then it's easier to implement map in terms of for than the other way round ;)
18:09 [particle] yep
18:20 ruoso [particle], moritz_, "map" and "for" are actually synonyms...
18:20 ruoso both are lazy... both return the values...
18:20 moritz_ and yet "for" appears in the grammar (because it has two terms in a row), and map doesn't
18:21 masak ruoso: not in the sense that 'for' and 'foreach' are synonyms in Perl 5
18:21 masak moritz_: right. that was my point as well, I think :)
18:21 moritz_ or to put it this way: map is part of the Prelude, for is part of the language itself
18:21 ruoso masak, no... they're even more synonyms than that...
18:21 masak even more? :)
18:21 masak ruoso: what moritz_ said.
18:22 [particle] hrmm, okay then
18:22 [particle] now that you mention it, i remember that discussion
18:23 ruoso for is only part of the language because it has no "," after the first parameter ...
18:23 ruoso and I think map has it so it can be part of the prelude ;)
18:29 mncharity joined #perl6
18:33 TimToady map and for differ only syntactically, not semantically
18:33 mncharity Hi all.  Been a while.  Any notable highlights from the last 3 weeks or so?
18:34 moritz_ mncharity: STD.pm now has symbol tables
18:34 TimToady sorta
18:34 TimToady only global
18:34 moritz_ mncharity: there's now a wiki engine written in Perl 6
18:34 TimToady but it detects most bad sub calls
18:34 mncharity neat
18:35 TimToady dunno if you were out when identifiers changed to allow embedded apostrophes and hyphens
18:35 TimToady but only if the next char is a letter
18:35 mncharity !  that's a new one for me :)
18:35 moritz_ TimToady: STD.pm complains about (1|(2|3)) with "Right-associative any, | operator" - why is that forbidden?
18:36 TimToady I did an experiment, and there were only two conflicts in the entire test suite
18:36 TimToady and it makes Perl orthography more like English
18:36 mncharity trailing ? and ! apropos ruby and scheme?
18:36 TimToady no
18:36 TimToady but it would be easy to add your own identifier rule
18:36 mncharity indeed
18:37 mncharity moritz_: re wiki engine, for what p6 dialect/implementation(s)?  rakudo?
18:38 TimToady moritz_: dunno offhand, that error doesn't look familiar
18:38 masak mncharity: yes, rakudo. currently.
18:38 mncharity nifty
18:38 masak we haven't tried Pugs yet
18:38 moritz_ TimToady: in t/spec/S03-junctions/associative.t if you feel like investigating
18:39 TimToady mncharity: I don't know how much of the test suite was passing STD when you left, but it's 100% now, give or take quantum fluctuations
18:39 mncharity awesome.
18:39 mncharity anyone dumping and using the parses?
18:39 TimToady nach nicht
18:40 mncharity :)
18:40 moritz_ mncharity: me occasionally, for finding out WTF some constructs are supposed to mean
18:40 mncharity lol
18:40 [particle] are the parses approaching "correct"?
18:40 TimToady adding symbol checking found much less damage than I expected
18:40 [particle] or will that only be born out of implementation?
18:41 TimToady though it found some
18:41 TimToady so we're getting there, I think
18:41 moritz_ for example one test used |<< <a b c> (which I think is wrong anyway, but at least it parses)
18:41 TimToady sounds like (1|(2|3)) isn't right though
18:42 TimToady yeah, |<a b c> should have the same effect
18:42 moritz_ well, |<< would apply | to each item
18:42 moritz_ but items don't need to be "cheated" into captures anyway, right?
18:43 TimToady |('a','b','c') is equiv to |'a', |'b', |'c' I think
18:43 TimToady since items are degenerate lists
18:43 moritz_ ok
18:44 TimToady yes, more to the point, |'a' is equivalent to 'a'
18:44 mncharity how goes the test suite?
18:44 moritz_ we fixed errors that STD.pm caught
18:45 abra joined #perl6
18:45 moritz_ and I'm moving stuff as much as I reasonably can
18:45 TimToady bare (1|(2|3)) seems to parse fine, so maybe it's something else from earlier
18:45 moritz_ currently I'm blocking on understanding oo
18:45 mncharity did the regex tests get updated?
18:45 moritz_ to review + move the oo/ tests
18:45 moritz_ mncharity: don't think so
18:45 mncharity :/
18:45 rindolf joined #perl6
18:46 moritz_ rakudo IO was too b0rked for Auzon to work with
18:46 moritz_ so the big chunk of regex tests don't run in rakudo
18:46 moritz_ he did write some tests for parsing the regexes though
18:46 TimToady moritz_: t/spec/S03-junctions/associative.t is missing a comma
18:47 mncharity ok.  ah well.
18:47 mncharity oo tests++
18:47 * moritz_ stupid
18:47 mncharity I'd also like to understand oo.  Perhaps a seminar or reading group? :)
18:48 moritz_ it would very much help to meet in real life for that
18:48 mncharity campfire...
18:49 TimToady moritz_: it really ought to produce a "Two terms in a row error" somehow for that kind of error
18:50 TimToady though to be fair to STD, the green/red coding did point right to the problem
18:50 moritz_ oh, I thought that the red part was the error message
18:50 * moritz_ even dumper
18:51 TimToady green/red are probably not the best colors for RG colorblindfolk though
18:51 pugs_svn r22132 | moritz++ | [t/spec] added missing comma, TimToady++
18:52 mncharity perhaps collaboratively writing an intro to p6 oo?  on a wiki somewhere?  perl.net.au?
18:52 moritz_ mncharity: in case you haven't seen it, I wrote http://perlgeek.de/blog-en/perl-5-to-6/
18:52 lambdabot Title: blog | Perlgeek.de Blog :: Category Perl-5-to-6
18:52 mncharity looking..
18:53 moritz_ mncharity: but it touches only the surface of OO
18:55 masak perl6: say 5 ~~ Scalar
18:55 p6eval rakudo 30731: OUTPUT[Method 'ACCEPTS' not found for invocant of class 'Failure'␤current instr.: 'infix:~~' pc 13364 (src/gen_builtins.pir:8479)␤]
18:55 p6eval ..elf 22132: OUTPUT[Can't call method "Str" on an undefined value at ./elf_f line 649.␤ at ./elf_f line 3861␤]
18:55 p6eval ..pugs: OUTPUT[1␤]
18:56 pmurias joined #perl6
18:56 pmurias mncharity: hi
18:57 mncharity neat.  yeah, it's WHAT etal, desugaring and control flow, underlying oo primitives, initialization, alternate reps, runtime mutation, and... etc, which are on my own puzzle list.
18:58 mncharity hi pmurias!  how goes?
18:59 mncharity how goes the C runtime?
19:00 rdice joined #perl6
19:01 mncharity so, wrapping up... (appointment)  any other highlights?
19:01 pmurias mncharity: you mean smop?
19:01 mncharity yes
19:01 pmurias it progresses steadily
19:01 TimToady mncharity: on the performance front, STD now parses itself in <30 seconds if the lexer is pregenerated
19:02 mncharity oh wow.  nifty.
19:02 TimToady well, I'd like to squeeze another 10x out of it, but it's usable now
19:03 Juerd TimToady: That was multiple minutes before?
19:03 TimToady also need to shrink the lexer cache, which takes an unconscionable amount of disk at the moment :)
19:03 mncharity 30 s down from... 4 min?
19:03 TimToady I think was about 2 minutes before
19:04 TimToady it's still 1.5 min if you have to rebuild the cache
19:04 pmurias the cache is input independent?
19:04 TimToady but that's only when the language changes, which is often :/
19:04 TimToady well, it's idempotent, if not independent
19:05 TimToady it only generates "digraphs" for sequences it has seen
19:05 TimToady so any given parse may generate more of them
19:05 TimToady but the whole digraph scheme is just a workaround
19:05 TimToady to prevent the lexer from feed TRE patterns that are too long
19:05 TimToady *feeding
19:06 TimToady TRE tends to go quadratic in stack space on pattern size
19:07 TimToady I say "digraphs", but it's more like "polygraphs" since it's variable length
19:07 TimToady it uses more characters if it thinks a hyperoperator is coming
19:07 TimToady metaoperator rather
19:08 TimToady since those tend to generate large token lists
19:09 TimToady at some point we'll write our own DFA matcher and throw out TRE plus all its workarounds, which should simplify _AUTOLEX*
19:10 pmurias what's stoping you from switching from regex insanity to autmatons
19:10 mncharity big picture...  has there been any, how to say it... craving for elf?  volunteers stopping by?  folks wishing elf did X?  Eg, used STD and generated fast CL?  Or... not so much?
19:10 TimToady just tuits
19:10 [particle] timtoady: do you have any language preference for the dfa matcher, or just performance requirements?
19:11 mncharity or is elf development largely unmissed?
19:11 TimToady I would like one in Perl 6, of course, that compiles down to something as fast as C :)
19:11 moritz_ mncharity: I'd love to have any implementation that relies on STD.pm. I don't care what it's called, as long as it's hackable
19:12 [particle] well, i asked for it....
19:12 pmurias mncharity: elf generating m0ld code would be very nice
19:13 moritz_ mncharity: elf doesn't even have a homepage that I can link to if I write about it, so it's hard to create demand from everybody but core p6 hackers (who ususally have a preferred implementation already)
19:13 mncharity a point
19:15 mncharity ok, thanks all.  any last thoughts?  (gotta run)
19:15 TimToady and we all have our own preferred "hackspace" that we tend to stick to comfortzonewise if we feel like someone else owns another hackspace
19:15 moritz_ have the appropriate amount of fun ;)
19:15 mncharity :)
19:15 mj41 joined #perl6
19:15 TimToady not all of use are mad connect-everything-together folks like audreyt
19:15 TimToady *us
19:16 mncharity re hackspace, hmm, food for thought
19:17 mncharity tnx again &
19:21 pmichaud I may be a few minutes late for phone today
19:22 [particle] righty-ho
19:24 pmurias TimToady: i prefer to code on other peoples code/"hackspace"
19:28 pmurias TimToady: it would have to be a TDFA matcher to replace TGE?
19:30 TimToady it doesn't really need full tagging.  it needs two things that a standard dfa doesn't provide
19:30 TimToady 1) the ability to know which alternative matched
19:30 TimToady 2) the ability to back off to shorter matches
19:31 TimToady on the other hand, it doesn't need "scanning", since tokens are always anchored
19:32 TimToady and it's probably okay for a(b|c)d to be tree-ized into a(bd|cd)
19:33 TimToady esp if it makes it easier to determine (1)
19:34 TimToady or to implement (2), for that matter, since you have to know which alternative to back into
19:36 TimToady if full tagging implies quadratic stack space theoritically, then I would say I *don't* want full tagging
19:37 TimToady *theoretically
19:37 TimToady (I don't know offhand if that's true though)
19:39 TimToady basically I see a lazily generated trie that knows about all the literal strings it has parsed so far, and which branches are implied by any particular traversal of the trie
19:39 TimToady and knows when the trie runs out how to generate more from the current regex state vector
19:40 TimToady so the second time you hit any particular literal string, you never even see the regexes
19:41 * pmurias will need a fresher brain, and some time with pen & paper to process the above
19:42 TimToady pmichaud is also going to be working on this, though perhaps in PIR
19:42 TimToady so you might compare notes
19:43 TimToady lunch && phone &
19:43 ruoso the biggest problem with that seems to be the space required to keep a clone state for each sub-token...
19:45 * ruoso wonders if there is an efficient way of composing an incremental state object instead of cloning the states...
20:01 simcop2387 joined #perl6
20:19 yahooooo joined #perl6
20:33 Caelum_ joined #perl6
21:05 zamolxes joined #perl6
21:09 toddr joined #perl6
21:09 toddr left #perl6
21:32 pugs_svn r22133 | moritz++ | [t/spec] started fudging exists.t, also fixed a typo caught by chromatic++
21:32 toddr joined #perl6
21:34 rakudo_svn r30739 | chromatic++ | [Rakudo] Added .exists method for Hash.
21:39 pugs_svn r22134 | moritz++ | [t/spec] fudged exists.t for rakudo, and simplified/corrected tests a bit
21:43 rakudo_svn r30740 | moritz++ | [rakudo] added S29-hash/exists.t to spectest_regression, chromatic++
21:53 meppl joined #perl6
21:55 BinGOs joined #perl6
22:09 idemal joined #perl6
22:26 gbacon joined #perl6
22:51 Psyche^ joined #perl6
23:02 jferrero joined #perl6
23:29 meppl good night

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

Perl 6 | Reference Documentation | Rakudo