Check your feather email | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com | www.treehugger.com/files/th_images/paradigm.jpg [set by audreyt on 2006-08-29 05:26:57 -0700]
Set by Akwa|user on 14 September 2006.
nothingmuch hmm 00:03
search.cpan.org/~ni-s/Tk-804.027/pod/X11Font.pod
lambdabot Title: Tk::Font - a class for finding X Fonts - search.cpan.org, tinyurl.com/s5ags
00:09 dj_goku joined 00:22 vel joined
TimToady audreyt, TreyHarris: I don't think any of those are an adequate looks_like_number. What you've got is more like looks_like_number_in_canonical_form. 00:25
audreyt true.
00:26 sri__ joined
TimToady if malformed numbers return undef but Num, (+$x).defined could be looks_like_number 00:30
00:30 SubStack joined
audreyt how is undef but Num different from ::Num 00:33
can't seem to see a difference
unless it's "fail"...
but that seems to be overstrict
00:33 jferrero joined
TimToady I mean, if you have "123foo", you get Error("malformed number") but 123 or some such as an unthrown exception. 00:34
and by the unification of errors and warnings we could make it continue working as Perl 5 does.
audreyt so it's unthrown exception that can be handled 00:36
but if you ignore it doesn't die
but instead warns by printing to stderr
is that it?
(it makes a lot of sense, just making sure)
TimToady it's an "unthrown warning", as it were.
audreyt and warning is a kind of exception
k
TimToady main problem from a p6-on-p5 perspective is that it requires that you either have real continuations or at least run all your exception handlers before unwinding, neither of which is native to p5. 00:38
audreyt though $SIG{__WARN__} comes close 00:40
but yeah.
nothingmuch what about that paper?
audreyt (bbiab, $job)
that paper is real continuations
but userland level
not kernel
nothingmuch ah
how does it do it, in 2 words?
audreyt CPS reification. 00:41
Limbic_Region . o O (scary magic)
obra . o O { Heavy Drugs }
audreyt wrapping things in eval {} and convey all cont calls with die($cxt)
nothingmuch *nod*
audreyt s/things/each and every intermediate point/
suppose that eval{} has zero overhead 00:42
00:42 mako132_ joined
TimToady hah 00:42
audreyt then it's pay only if you use
if it's constant overhead then it's constant slowdown
if eval{eval{}} is more than 2x overhead than eval{}
nothingmuch can the eval's be optimized away in certain situations?
audreyt then the scheme is not useful
TimToady the speed of light is a rather large constant... 00:43
audreyt nothingmuch: sure, if all the subexps can't nvoke callcc
then you can take away them
TimToady++
TimToady ...even when it's 1 00:44
nothingmuch prays that freetype will work this time
lumi So you only need to keep the eval around anywhere that has callcc?
TimToady like any warning?
or potential warning?
lumi Right, ow
nothingmuch what about a lightweight version of eval via some hacky core API? 00:45
TimToady you'd have to override longjmp somehow, or avoid calling it in all the places it's hardwired into perl. 00:48
nothingmuch not setjmp? 00:49
TimToady well, you'd want to avoid that on the other end too, but that part's easier. 00:50
just don't use eval {...}
nothingmuch is out of his league and best stfu
nothingmuch also gives up on Imager and goes to sleep
Limbic_Region sleep well 00:53
nothingmuch ta
TimToady --> zzz 00:54
TreyHarris TimToady: yes, i was thinking about that and couldn't think how to resolve it. i guess you do like perl 5 and hook the actual numification rather than trying to intuit what happened later. 01:05
TimToady using the built-in routine is the safest approach. 01:07
I learned not to try to second-guess the run-time in Perl 4...
TreyHarris yes... but oh, wait... Scalar::Util::looks_like_number uses regexes. how odd, i coulda sworn it wrapped the SV* -> I32 one in the perl guts... 01:08
though... we *are* supposed to be doing TDD now, right? so one could argue that this approach is more valid than the "go with whatever the implementation says it is" approach 01:09
more portable between implementations, anyway 01:10
TimToady depends on what it's for, I suppose
TreyHarris right. I supposed whatever it is, it should start "return 1 if $x.does(Num)"... 01:12
er... "return Bool::True..."? i've seen both in ext/ and t/, i don't know which if either is official style 01:14
TimToady just "return True" should be adequate. imported enums don't have to be qualified unless there's a collision. 01:18
TreyHarris and if you use Political <:truth> and expect that to play well with boolean truth, you're asking for it anyway... 01:19
TimToady on the other hand, 1 knows what to do in a boolean context. :)
the only real difference is what happens in string context. 01:20
and that raises the question of how we convert "False" to Bool::False 01:22
looks_like_boolean() :)
TreyHarris heh
TimToady so does Bool($string) return a different value than ?$string does? 01:23
TreyHarris "False" converts? i missed that
TimToady ?"False" would be true
lambdabot Unknown command, try @list
TimToady at least according to p5 semantics 01:24
TreyHarris oh, i see, you're saying the Bool constructor might take words, but the coercer would not (or rather every word would be true)
TimToady I guess we really haven't thought about the generic problem of converting the string names of enums back to enum values. 01:26
eval "
seems like overkill
TreyHarris i honestly surprised that that even was in the cards. conversion from strings, i mean. maybe because enums haven't been in perl so i never considered how perlish enums would behave... i've never seen conversion in any other language that didn't have all values as strings 01:28
TimToady but after declaring your DayOfWeek enum you'd like to be able to say DayOfWeek("Friday")
TreyHarris *nod*
TimToady or maybe it's a hash, so you can install abbreviations. 01:29
TreyHarris *nod* seems vaguely like the problem of short/long CLI args
TimToady actually, DayOfWeek:: is already a hash of names
so it's just DayOfWeek::{$d} to get back at least to the subset type 01:30
and I suppose the type numorstringifies to the appropriate value. 01:31
TreyHarris yes. but would sub next (DayOfWeek $d)... take next("Wednesday") as well as next(DayOfWeek("Wednesday"))? is that what you mean by conversion? 01:32
TimToady could autocoerce for numeric enums, but that doesn't work for stringy enums. 01:33
since both values are strings.
I just meant there needs to be an explicit way to convert 01:34
TreyHarris eh? seems backwards. both values' containers are strings. but one's a Str and one's a DayOfWeek
TimToady when you know you have the external form rather than the internal
true 'nuff, MMD would probably sort it out 01:35
I am being assailed with dinner. & 01:36
beppu_ kill -9 $$ 01:46
01:59 markstos joined 02:01 weinig|bbl is now known as weinig 02:11 Aankhen`` joined 02:16 frankg joined 02:19 justatheory joined
svnbot6 r13575 | markstos++ | [misc/pX/README] 02:25
r13575 | markstos++ | provide a pointer to another useful README file to read.
02:33 weinig is now known as weinig|bbl 02:48 putter joined
svnbot6 r13576 | lanny++ | [ext/Math-Random-Kiss/.../Kiss.pm] 02:48
r13576 | lanny++ | - remove now extraneous code from when class did Iter
r13576 | lanny++ | [ext/Math-Random-Kiss/t/rand.t]
r13576 | lanny++ | - have plan agree with number of tests
putter fglock: re out of sync :( re will be nice :) 02:52
02:57 frankg joined 03:07 frederico joined
svnbot6 r13577 | malon++ | t/packages/scope.t - test temporization of variables from external packages 03:27
03:38 ruz joined 04:00 evalbot_r13572 is now known as evalbot_r13577 04:37 jdv79 joined, norageek joined
svnbot6 r13578 | putter++ | pX/README - Fleshed out a bit. "Once upon a time...". 04:40
04:47 mozzz joined
svnbot6 r13579 | putter++ | Moved content from pX/README to pX/Common/README, so everything is now in one place. And updated it. 04:55
r13580 | putter++ | Common/design_space_sketch_Feb_11 moved Aside by author. 05:04
r13580 | putter++ | Why? It's old. Mainly of historical interest now.
05:15 BooK joined
svnbot6 r13581 | putter++ | Common/parrot_pge_tests/ created. It contains a copy of the parrot pge test suite. It would be nice to plug this into ours with minimal changes, so we can piggy back on the parrot work. Added this task to Common/Tasks. 05:15
audreyt @tell putter why not simply update t/p6regex/ ? 05:18
lambdabot Consider it noted.
05:28 evalbot_r13577 is now known as evalbot_r13581 05:33 putter joined
putter hi audreyt 05:33
lambdabot putter: You have 1 new message. '/msg lambdabot @messages' to read it.
svnbot6 r13582 | putter++ | backtrack_api.pl now resembles a minimalist backtracking api.
r13582 | putter++ | The next step is to explore PCR's Emitter and Runtime needs, and see whether/how this code might fit into them.
r13582 | putter++ | Perhaps it might also be worth making into a module. Maybe.
audreyt heya putter 05:34
I've just been hacking GHC-head so it can compile Pugs again
(ghci was broken yesterday)
just fixed it, whew :) 05:35
putter :)
err, what is t/p6regex? and why isn't it in t/rules?
audreyt because rules is just one kind of regex 05:36
:ratchet :sigspace
the proper name is now p6re
as in perl 6 regex
putter hmm... 05:37
audreyt "token" is just shorthand for ":ratchet regex"
and "rule" is just shorthand for ":ratchet :sigspace regex"
when you say
1 ~~ /1/
you are matching against a Regex not a Rule
in fact, there may not be a rule class anymore.
putter thinks it's finally time for him to sync with all this newfangled :) regexp stuff. 05:38
let's see...
sigspace?
gaal you know you've been reading lots of haskell papers when... earlier someone says "(bbiab, $job)" and you try mentally to run :t on that
putter lol
gaal lanny: hey, maybe you can port the DIEHARD tests, the original is clunky c and possibly the result will look real good 05:39
(though run a bit slow...!)
putter reads about sigspace in Snn
gaal audreyt: you hacked ghc to fix pugs? eep
audreyt gaal: yeah, FC just landed 05:40
gaal FissionatroomtemperatureCandidate?
audreyt type-indexed types and closed classes and ML functors and all sort of cool things
no, System F with Coersion
the newAST of GHC that's been in the works for a year now
obsoletes the previous "newtype" and GADT treatments 05:41
gaal "You're an Int, admit it!"
audreyt unified into a Cast node
exactly
but ghci's bytecode generator havn't caught up so I hacked it into place
it's really ~ the same thing as pugs :) 05:42
gaal isn't it a bit late to introduce things into ghci now that the release candidate is out?
s/i//
audreyt oh, this is -head
6.6 branched a while ago
gaal oh, 6.7 to be?
audreyt 6.6 won't have FC stuff.
not sure, maybe 6.6.1
gaal *nod
well it'll be 6.7 before 6.6.1? :) 05:43
audreyt or maybe 6.7 :)
hah
putter sigspace, fine, it's a separate topic. token, whatever. ratchet...
so, big picture. where do we stand on the old concept of rule/regexp unification with methods? 05:44
audreyt regexes are just specially-constructed Code that can match stuff 05:45
if you give it a name then it can be installed into grammar as methods
putter how can one give it a name?
audreyt regex name { ... } 05:46
however, it's not currently clear whether by virtue of having a name it suddenly became methods 05:47
or if it's actually all subs and grammar use mixin rather than inheritance.
putter ah...
gaal what's the invocant?
putter so what was rule foo {...} was simple renamed regexp foo {...}, and the current rule foo is simply regexp foo :blah :blah {...}? 05:48
audreyt gaal: either the class itself, or nothing at all.
pmichaud and allisn was discussing this in the context of PGE
but the current encoding in parrot, namely that Match inherits from Grammar 05:49
er sorry
Grammar inherits from Match
putter (which always seemed quite odd)
audreyt just so that they can be used as invocant, didn't quite make sense to me 05:50
I think I'd prefer a strict sub/mixin model, honestly
as is currently adopted by PCR
(S05 is silent on the concrete encoding) 05:51
putter so the old rule foo {} still exists, simply renamed to regexp foo {} ? yes? 05:52
audreyt no 05:53
regex foo {}
means a named regex foo
rule foo {}
means simply
regex foo :sigspace {... }
token foo {}
means simply
regex foo :ratchet {...}
oops, sorry, rule means
:sigspace :ratchet 05:54
to recap: Regex is the base form
rule is just shorthand for :sigspace :ratchet
token is just shorthand for :ratchet
putter so the old, pre-ratchet rule foo {} is now regexp foo :sigspace {} ? yes?
audreyt no. 05:55
it's "regex" not "regexp"
putter sigh
oh, that's fine
so the old, pre-ratchet rule foo {} is now regex foo :sigspace {} ? yes?
audreyt correct.
putter exhales a sigh of relief 05:56
audreyt glad to be of help
putter :)
my thanks
was afraid backtrack-phobia was taking over the world ;)
audreyt :D 05:57
food, bbiab
putter later
re encoding, as long as one can ask regexs for their pattern, encoding, grammar and lexical context, I'm all set. 05:58
hmm.... does p6 *have* first class lexical contexts? can one get a handle to a pad, and pass it around? 05:59
s/pattern, encoding/pattern, modifiers/ 06:00
audreyt ::MY may or may not be first class. 06:01
again, unspecced
putter k
hmm, so t/rules/ should be renamed t/regex/, and t/p6regex/ moved into it, no? 06:02
audreyt yes
putter k
audreyt the p6regex name was preserved
because on parrot side it's called that
which also has a p5regex/ 06:03
putter wc's t/p6regex/regex_tests and wonders where the other 400 tests went...
audreyt it's an old copy...
putter ahh.... thus your earlier suggestion
(ahh was re parrot origin)
TimToady MY is as first class as any other package, but is considered immutable once its scope is compiled. 06:05
putter :) 06:07
putter tries to figure out where the pugs-side version of re_tests (transliterated into p6) went to...
ah, deleted 26 Aug 2006, under the name t/rules/rules.t 06:12
audreyt TimToady: the thing is whether you can pass it out 06:21
f(MY)
and expect it to continue to refer to the pad
TimToady the package name is really MY::
audreyt on the caller's site
MY:: then.
TimToady why not?
audreyt there's no reason not to :) 06:22
so the full name is ::MY::
TimToady seems to me that's part of why we flattened the namespaces to not have here-to-end scopes for the lexicals, among other things.
audreyt agreed.
TimToady You don't really need an initial :: if there's one elsewhere in the name in most places.
audreyt nodnod 06:23
TimToady on the other hand, I've been struggling to keep :: free as a postfix so we can have $proto.:: and get the corresponding package for the prototype
that's also why we require GLOBAL::<$foo> and not just GLOBAL<$foo> 06:24
the latter would be trying to subscript the type rather than the package.
audreyt well the spec still says .:: can fallback to ::()
TimToady no it doesn't, I don't think. it has to be .'::' 06:25
audreyt though as Juerd points out it's rather dangerous a device to rely on
you fixed the spec?
TimToady I fixed that already.
several days ago
audreyt then S02:2303
needs updating as well
TimToady done 06:27
audreyt danke
gaal audreyt: shouldn't ValNative hold unboxed haskell types? 06:29
type NativeUint = Word# etc.?
audreyt gaal: no, just put !strict annotation
and -funboxed-stirct-fields will take care of that.
gaal ah
06:29 redear joined
TimToady the most interesting part of that fix is that it now allows ."foo$bar" kinds of method calls. 06:29
and a way to disambiguate .+ things from .'+' things and the like. 06:30
audreyt should .prefix:<moose> always succeed
TimToady .+foo vs .'+foo'
audreyt whenever .moose succeed?
TimToady that's kind of ambiguous with .prefix: <moose> 06:31
audreyt try again... should &prefix:<moose> resolve to the same thing as &moose?
TimToady unless the syntactic categories have special keywordish status in that location.
I think so. 06:32
audreyt but it's a fallthru, right?
sub moose ($x, $y) {}
doesn't grant moose a prefixop status
it's listop
but wait, prefix:<moose> can be listop as well, nvm.
TimToady I don't think listop is a grammatical category
audreyt can a sym, say prefix:<`> be listop? 06:33
sub prefix:<`> (*@) {}; ` 1, 2, 3;
TimToady yes, though the official listops are supposed to have a space after them--not sure exactly what decides to enforce that.
probably an equiv to an existing listop. 06:34
or maybe the *@ implies that, I dunno.
06:35 iblechbot joined
TimToady okay, the *@ now forces listop precedence by default. 06:41
audreyt cool!
svnbot6 r13583 | putter++ | Common/parrot_pge_tests/README - clarified the task. 06:46
r13583 | putter++ | Namely, changing our p6regex/regex_tests from hand edited to easily synced.
r13583 | putter++ | And importing one or two of the other compatible test files. Volunteers?
r13583 | putter++ | audreyt++
redear am i going to be labelled a troll if i ask "are we there yet?" in this channel? 06:47
TimToady no, you'll be asked if you would like a commit bit.
would you like a commit bit? 06:48
redear is perl6 still in development?
TimToady we're still having fun with it.
redear cool
can't wait man
TimToady impatience is a virtue...
pugs is a lot of fun if you'd like to play with it. we're about to put out a new release in the next few days. 06:50
svnbot6 r13584 | putter++ | t/rules renamed t/regex in accordance with current spec nomenclature.
r13585 | putter++ | t/p6regex/README - Created a README. 06:53
putter 3am. end of day. 06:55
svnbot6 r13586 | putter++ | t/p6regex moved to t/regex/p6regex
putter g'night & 07:02
TimToady night!
07:15 baest joined 07:16 mdiep_ joined
TreyHarris does the *very* happy dance 07:38
audreyt: 10 minutes to make from scratch, <14 to smoke!! 07:39
audreyt excellent!
with parallel2?
TreyHarris much better than 2 hours to make and 4.5 to smoke 07:40
parallel2?
smoke_concurrent: 3
what's parallel2?
your 20060608 intel build worked like a dream, btw :-) 07:41
audreyt I mean concurrent2 07:46
TimToady: this seems bogus
my @args = \@foo, @bar;
push |@args;
spec says it's same as
push(scalar @foo, @bar)
and says it's same as 07:47
push [,] @args;
however, with Pugs's newAST, the latter is
push [,] @args
===>
push [,] \(@foo :), \(: @bar) 07:48
===>
push @foo: @bar;
TreyHarris audreyt: i don't know about concurrent2...
audreyt ===>
@foo.push(@bar)
lambdabot Unknown command, try @list
audreyt TreyHarris: smoke_concurrent: 2
whilst the former is
push | @args;
===>
# oops, persume that @bar contains one value 'bar' 07:49
TreyHarris audreyt: ah... yes, i have it at 3, but was about to svn up so i'll see if 2 works better or not
audreyt # and replace the @bar on the [,] cases above with 'bar'
push |( [\(@foo :), \(: 'bar')] );
===> 07:50
er, sorry, the last line is
push |( [\(@foo :), 'bar'] )
===>
push(\@foo, 'bar')
i.e. both ends up becoming positional
as contrary to [,] which takes and concats multiple captures 07:51
I guess my presumption was that
|@foo # always yields only positionals
|%bar # always yields only anmeds
instead of flattening them first
is that incorrect?
basically, I'd like
$x = @foo;
f(|$x) 07:52
f(|@foo)
behave the same
instead of exploding @foo one more time to find out individual element's captureness
but not do the same with $x
TimToady sounds sane, to the extent that I can detect sanity at this time of night... 07:53
audreyt k 07:55
basically
[,]@foo
first flattens and then takes elements as captures
but
|@foo
dircetly exposes elements into positionals
as consistent with usual listop vs unary semantics
TimToady feel free to whack on the syn
audreyt k :) sleep well 07:56
TimToady zzz &
audreyt done as r12346 08:05
08:09 ofer0 joined
gaal audreyt: remember the unsafeCoerce crash to which the fix was to coerce via a W# constructor? 08:54
how does that sit with the automatic unboxing?
ah, we didn't have the optimization flag turned on
nothingmuch *yawn* 09:09
sorry, overslept
well, technically not, i only got 6 hrs
but... =P
overstayeduplastnight
anyway, /me gets to that refactoring, and then I have like 2 hrs of work
and then i have to go
gaal I like one-word oxymorons. "oversleep"'s my favorite.
nothingmuch why is that an oxymoron? 09:10
gaal how can you sleep too much?
nothingmuch most people i know will feel terrible after more than 8-9 hours of sleep
gaal nothing a nap can't fix
nothingmuch heh
audreyt: does that schedule sound good? 09:11
Juerd often overslept, and now uses an alarmclock 09:14
Indeed you can sleep too much. I feel much better now that I sleep less.
nothingmuch 's alarm clock died and consequently he has not been oversleeping anymore
before I used to set it to a high volume and the right amount of sleep 09:15
and then whenever it'd go off my body would go into an extra deep sleep for another hour or so
gaal whoa the typechecker is weirding me out
Pugs.Val:63, castVal 09:16
I want it to also work with ValNatives and ValUndefs
but it wont.
TreyHarris is svn.openfoundry.org down? 09:17
gaal looks it
ayrnieu isindown.org can also answer such questions. 09:18
sorry: isitdown.org
TreyHarris ayrnieu: it appears to be down as well :-) 09:19
gaal bbiab& 09:20
09:29 ludan joined
nothingmuch audreyt: okay, i'm ready 09:35
09:36 zeriod joined, zeriod left, zeriod joined
nothingmuch audreyt: ping when ready 09:42
brb 09:44
09:52 chris2 joined 09:56 marmic joined, krunen joined 09:59 marmic joined 10:18 rodi joined
nothingmuch audreyt: i have to leave shortly 10:25
== ~ 1 hr 10:26
10:58 buetow joined 11:03 foo\ joined 11:13 awwaiid_ joined
ruz I think 'say "woot" if -r !-f -e "/tmp"' or 'say "woot" if -r -!f -e "/tmp"' sounds like good idea 11:16
TreyHarris ruz: eh? you should be able to do the first 11:19
not yet
but eventually
ruz yep, not yet
TreyHarris assuming ! flips the boolean rather than returning its opposite 11:20
otherwise you'd be -r'ing Bool::True or Bool::False, which would be problematic
ruz as I understand from syns -X returns boolean with stats buf, ! should touch only boolean part and leave stats there 11:22
S03 should be updated :) 11:23
TreyHarris in other words, sub prefix:<!> (Bool $p) needs to be defined { $p ?? $p but False !! $p but True }, not { $p ?? False !! True }
ruz "$p but False" what's that? 11:28
ayrnieu ?eval "hello" if (1 but False) 11:31
11:31 evalbot_r13581 is now known as evalbot_r13586
evalbot_r13586 Error: Cannot cast from VBool False to Pugs.AST.Internals.VCode (VCode) 11:31
ayrnieu ?eval "hello" if (0 but True)
evalbot_r13586 Error: Cannot cast from VBool True to Pugs.AST.Internals.VCode (VCode)
ayrnieu there you go!
TreyHarris but enum isn't working yet 11:34
but mixes in to its LHS some behavior from its RHS at runtime
nothingmuch @tell audreyt i'm off hiking, but i spent this time writing MO::Overview 11:35
lambdabot Consider it noted.
TreyHarris sleeps &
nothingmuch cia 11:36
o
sleep well =)
11:39 xinming joined
ruz ?eval "abc" ~< 1 11:42
evalbot_r13586 "ƃƃƃ"
11:48 elmex joined 12:00 iblechbot joined
audreyt nothingmuch: hihi 12:05
lambdabot audreyt: You have 1 new message. '/msg lambdabot @messages' to read it.
audreyt lambdabot: @messages
lambdabot nothingmuch said 30m 2s ago: i'm off hiking, but i spent this time writing MO::Overview
audreyt oy. I overslept and missed nothingmuch 12:06
audreyt sleeps some more to compensate
gaal @tell audreyt today's existential dilemma: how to complete castVal for ValUndef and ValNative? 12:22
lambdabot Consider it noted.
12:49 DaGo joined
lumi Hi gaal 12:53
13:02 kanru joined
audreyt gaal: 13:11
lambdabot audreyt: You have 1 new message. '/msg lambdabot @messages' to read it.
audreyt castVal (VUndef v) = fromTypeable v
castVal (VNative v) = fromTypeable v
lambdabot: @message 13:12
lambdabot Maybe you meant: messages messages?
audreyt lambdabot: @messages
lambdabot gaal said 49m 15s ago: today's existential dilemma: how to complete castVal for ValUndef and ValNative?
SamB is glad lambdabot doesn't just assume you meant @messages because that is closer 13:13
ayrnieu aye, or one day you'll want to roll some dice and it will instead send ninjas after you. 13:14
SamB hah
13:21 integral_ joined 13:22 integral_ is now known as integral 13:26 crem joined 13:38 kisu joined 13:45 kanru joined 13:46 ron__ joined, prism joined
kolibrie is frustrated that his wireless card is acting up and he can't get a connection long enough to get an IP 14:01
@tell fglock I'm having problems getting my laptop on wireless, but I can check in on another computer from time to time 14:05
lambdabot Consider it noted.
kolibrie I'm not sure why the [ <!before <?presenter> > . ]* is necessary in sial.org/pbot/19887, but it is 14:08
lambdabot Title: Paste #19887 from "fglock" at 200.17.89.34
kolibrie can anyone enlighten me?
14:14 mako132_ joined 14:18 jferrero joined
gaal lambdabot: massages! 14:24
kolibrie gaal: rescue me! 14:25
gaal moose?
kolibrie I'm in Pittsburgh and my wifi isn't working and I'm speaking an 4 1/2 hours and I don't have my slides finished 14:26
gaal how can I help?
kolibrie who knows
audreyt what are you going to speak about?
kolibrie feather.perl6.nl/~kolibrie/extraction.xul 14:27
lambdabot tinyurl.com/rxtmp
kolibrie fglock pasted me this: sial.org/pbot/19887, but I do not understand why the [ <!before <?presenter> > . ]* is necessary 14:28
audreyt because without which :c couldn't work 14:30
and you need to :g instead
kolibrie oh, and :g is not yet implemented
14:30 Limbic_Region joined
kolibrie I think 14:30
gaal kolibrie: if you have a screenshot of the schedule, it's worth throwing in 14:31
audreyt :g is not?
gaal before showing either the extraction code or the data you extracted
audreyt me surprised
?eval "xxx" ~~ m:g/(.)/
evalbot_r13586 3
audreyt ?eval list("xxx" ~~ m:g/(.)/) 14:32
evalbot_r13586 (Match.new( ok => Bool::True, from => 0, to => 1, str => "x", sub_pos => (), sub_named => {} ), Match.new( ok => Bool::True, from => 0, to => 1, str => "x", sub_pos => (), sub_named => {} ), Match.new( ok => Bool::True, from => 0, to => 1, str => "x", sub_pos => (), sub_named => {} ))
audreyt looks like it's implemented just fine
gaal audreyt: that works, but I don't understand why generics code is required
audreyt it was broken on the first days of PCR integration
but I fixed it a couple days ago
gaal: generic code?
14:32 penk joined
gaal fromTypeable 14:32
audreyt you mean you should be able to gmap it? 14:33
gaal kolibrie: probably easier than a real screenshot, have another browser window with the schedule in it
kolibrie: that way people "see" your topic instantly
kolibrie gaal: if I can get on the internet...
gaal audreyt: I don't understand why the simple patmatch doesn't work
kolibrie: I'll try to fetch it for you 14:34
audreyt what were the simple patmatch?
gaal kolibrie: (how are you on irc?)
--castVal (VUndef v) = return v
kolibrie audreyt: when I switch the :c to :g in that paste, it says 'got: brian' repeatedly
audreyt gaal: how can ValUndef be a ? 14:35
be of type a
kolibrie: maybe you want for not while
for $content ~~ m:g/<talk>/ { say $$_ }
for I hope obvious reasons :)
gaal kolibrie: can I nopaste the html? 14:36
kolibrie audreyt: I only get one brian with for $content ~~ m:g/<talk>/ { say $$_ } 14:37
audreyt grammar Workshop;
gaal kolibrie: or should I email?
obra has anyone ever done a pseudo-bnf for p5? 14:38
gaal audreyt: I don't see why ValNative can't be type a (under Typeable typeclass even)
kolibrie gaal: I have the source, and on this computer (someone elses) I have internet, but on my laptop I have no wifi working
gaal too bad I can't send you a cross cable :(
audreyt gaal: you didn't Typeable.cast it 14:39
how can it be of type a?
kolibrie gaal: we just need a really long one
audreyt "of type a " means "can be of any time"
*type
kolibrie: are you runnign with pugs or v6.pm?
gaal audreyt: *why* does it need to be T.casted? it's a simple field
data Val = VUndef !ValUndef | funky stuff
audreyt castVal :: (Monad m, Typeable a) => Val -> m a
14:40 kanru joined
gaal well? 14:40
kolibrie audreyt: v6.pm at the moment
audreyt and say you have castVal :: Val -> Maybe ()
which patmatch into
something :: ValUndef -> Maybe ()
and you are saying
something x = return x
would work
but it patently cannot
as it'd be ValUndef -> Maybe ValUndef 14:41
but here we want ValUndef -> Maybe ()
kolibrie audreyt: pugs actually gives me *** Cannot parse regex: <talk>
audreyt kolibrie: I saw that. fixing
kolibrie hopes he can pull sometime 14:42
audreyt well at least svn is back
gaal audreyt: I still don't understand. :( 14:43
clkao wonders if we should setup something to use commitbit to host pugs
audreyt clkao: on svn.perl.org
clkao ;)
audreyt yes, please
gaal: ok... what we want is
castVal :: (Monad m, Typeable a) => Val -> m a 14:44
gaal in the othe cases, say VPure, we're returning some Pure
yup
audreyt we are not; we are Typeable.cast'ing something Pure
the "m a" there means whatever m and a we choose
kolibrie audreyt: gaal: what is the best way to turn the output into the yaml structure on slide 22?
audreyt this function needs to work
gaal which means we can result in anything we like, as long as it's in some monad and the held type is Typeable
audreyt that is not so
you described existential 14:45
but this is universal
it means
"we must result in anything the caller likes"
as long as it's in some monad and the held type is Typeable
look at the full sig
gaal kolibrie: it's yaml already, but a list of pairs not a map
audreyt castVal:: forall m a. Monad m, Typeable a => Val -> m a
the "forall" is on the left
which means it must work whatever the caller choose to instantiate with 14:46
14:46 awwaiid joined
kolibrie fglock added a yaml method to v6, but I need to extract just the pieces from the match that I want 14:46
14:46 mako132_ joined
gaal kolibrie: sorry, which structure? if you have a list of pairs, .yaml 14:47
audreyt gaal: the way you described is more like
castVal :: Val -> (exists m a. Monad m, Typeable a => m a) 14:48
but that is not the case here
kolibrie gaal: I have a match object, and I want a structure I can turn into yaml
audreyt so you can't simply return anything tyepable
gaal ?eval [{name=>"moose", talk =>"lalala"}, {name =>"elk", talk=> "whee"}].yaml
evalbot_r13586 "--- \n- \n ? name\n : moose\n\n ? talk\n : lalala\n\n- \n ? name\n : elk\n\n ? talk\n : whee\n\n"
audreyt you must return something that can satisfy all typeable
gaal kolibrie: this dump is in a weird yaml form, but it is equivalent to what you want. 14:49
audreyt: oof, I still don't understand higher-rank polymorphism. :(
kolibrie gaal: I may be able to { return $rulename => $<rulename>() }
gaal: a presenter is part of a talk, because I need to add other items too, like title and time 14:50
gaal hm, castVal are unsafe right? (p :: Pure) <- castVal $ val $ VMut ... will die horribly
audreyt p :: PureInt? 14:51
gaal yeah
audreyt well, it's not unsafe
gaal at runtime
audreyt that's the "m" part
it will invoke the monadic fail
gaal oh
audreyt this is the MaybeToMonad pattern
instead of returning (Maybe a) 14:52
make it workable in any Monad m => m a
gaal ah, because we don't have fromJust in fromTypeable
kolibrie: okay, what does your data look like in p6? 14:53
I'm not actually very familiar with Rules!
audreyt: okay, thanks. that makes castVal look a little funny though 14:54
Limbic_Region salutations all
gaal since all its rhs are the same.
making me think of _'ing the constructor!
audreyt that's what gmap do.
gaal which prolly doesn't work 14:55
ooh, right
audreyt castVal = gmap fromTyepable
would work if we derive data
kolibrie gaal: my $structure = ( talk => { presenter => 'brian', title => '...' })
gaal kolibrie: okay, and doesn't .yaml that dwim?
kolibrie gaal: yes. the problem is getting that datastructure from the match 14:56
gaal: and when I try to use a { return } block in my token, it doesn't seem to affect what is returned from the match 14:59
so I think I'm doing something wrong there, because I'm pretty sure that works
gaal audreyt: which gmap variant is needed? neither gmapT nor gmapM work 15:00
@hoogle gmap
lambdabot Data.Graph.Inductive.Graph.gmap :: DynGraph gr => (Context a b -> Context c d) -> gr a b -> gr c d
Data.Generics.Basics.gmapM :: (Data a, Monad m) => (a -> m a) -> a -> m a
Data.Generics.Basics.gmapMo :: (Data a, MonadPlus m) => (a -> m a) -> a -> m a
audreyt gmapQi 0 15:03
or something like that
gaal oi. No instance for (Data Val).... 6.6 needed IIRC :( 15:05
Limbic_Region Win32 is approaching 96% success on make smoke 15:06
15:14 nox_ghost joined, nox_ghost is now known as ofer1
kolibrie gaal: I got it! I just needed to add {} around my return value: { return { talk => $<presenter } } 15:16
gaal yay
kolibrie though if I have other things I am matching, like 'title' how does that work?
15:19 mako132_ joined
gaal each rule returns a more and more comlete object 15:19
the talk rule icludes the title rule, right? 15:20
so rule talk { ......<title>.... {return { talk => {$<presenter>, $<title>} } } 15:21
15:22 mako132_ joined
kolibrie gaal: ah, yes, thank you for helping me see clearly 15:22
unless the extra {} are going to do something weird
gaal heh, I hope it actually works, I suspect at this point I get parsec better than rules 15:23
audreyt talk => {:$<presenter>, :$<table>}
talk => {:$<presenter>, :$<title>}
is morelikeit
kolibrie audreyt: what is the :
audreyt :$x means
x => $x
:$<x> means
x => $<x>
magick shorthand 15:24
gaal golf!
kolibrie I was adding the token name in each tokens return block
{ return { presenter => $$/ } } 15:25
gaal brb
kolibrie { return { talk => $<presenter>() } }
audreyt also I'm not sure what 15:26
$<presenter>()
does
it sholud be
$$<presenter>
(it was croaking in pugs because of the .())
kolibrie audreyt: $$<presenter> croaks in v6 15:27
audreyt that's sad...
@tell fglock can we make $$<foo> work in {} block? $<foo>() is really nonspec nowadays...
lambdabot Consider it noted.
kolibrie he maybe got it from: $() is a shorthand for $($/) 15:28
audreyt: so I should change my slides to use $$<foo>?
audreyt yes, I think so 15:29
no, it was $/() in israel I think
but by tokyo it's $$/
and the Great Capture Unification follows from that 15:30
kolibrie audreyt: and is it better practice to keep the name with the the token in the return (token presenter { { return { presenter => $$/ } } } ), or from above (token talk { <presenter> { return :$<presenter> } } ) 15:32
audreyt I think latter works better but it's largely style 15:33
however I still don't know why you are returning things this way
I mean
token talk { <presenter> <title>
}
should be sufficient, no?
you can use them exactly the same way
kolibrie I want to be able to generate a structure that I can turn into XML, YAML, $some_other_format 15:34
I'm not sure the best place to do that
audreyt you want a plain hash not a match
is that so?
kolibrie yes 15:35
but I don't mind getting a match first and generating a hash, if that is better
audreyt I think it's a bit easier...
kolibrie sample syntax?
kolibrie really wants to keep the grammar unpoluted 15:36
audreyt hash($match.kv.map(-> $k, $v { $k => ~$v })) 15:37
which only retians the string value for each of the keys 15:38
however I'm not sure v6 supports that yet
but you get the idea.
kolibrie audreyt: does that recurse into the structure, or just one level deep? 15:39
audreyt (bbl...)
just one level deep
~$v gets the string representation
that's all you need
kolibrie audreyt: thanks 15:40
16:04 Psyche^ joined 16:05 mauke_ joined
kolibrie lunch & 16:06
16:14 mako132_ joined 16:20 mauke_ is now known as mauke, Psyche^ is now known as Patterner 16:23 weinig|bbl is now known as weinig 16:34 LimbicRegion joined 16:40 ofer1 is now known as ofer0
nothingmuch grazes 16:41
audreyt: still about?
audreyt sadly really need to sleep 16:48
1am here
can hack as soon as wakeup
I don't see an Overviewi n your repo tho 16:49
forgot to add?
anyway, bbl *thunk*
nothingmuch yeah, i didn't commit
i was going to
but then my friend called me a told me she was ready
i'll finish it now
and commit
16:49 LimbicRegion is now known as Limbic_Region 16:54 lisppaste3 joined 16:59 Psyche^ joined 17:06 justatheory joined 17:15 Psyche^ is now known as Patterner 17:16 weinig joined
nothingmuch nothingmuch.woobling.org/MO/lib/MO/Overview.pod 17:27
please review
lambdabot tinyurl.com/law9f
17:52 mdiep joined
kolibrie if { talk => $$<presenter } gives me the data structure I want, but now I want to add in $$<title>, similar to { talk => { $$<presenter>, $$<title> } } 18:02
but I need to remove the extra hash wrapping around $$<presenter> and $$<title>
what is the syntax I need? 18:03
18:16 mdiep joined 18:18 frankg joined, prism joined
nothingmuch @seen putter 18:24
lambdabot I saw putter leaving #perl6 11h 22m 20s ago, and .
nothingmuch @tell putter nothingmuch.woobling.org/MO/lib/MO/Overview.pod
lambdabot Consider it noted.
18:26 Nextgens_ joined, mako132_ joined 18:27 renormalist joined 18:33 SubStack joined 18:34 Dr_Pi joined 18:44 bernhard joined
wolverian boggles at nextgens 18:45
18:54 SamB joined, ajs_home joined
ajs_home I'm sad to say that I fell for nextgens' little stunt... sigh 18:55
mauke get a better irc client
ajs_home xchat does what I need it to... I'm not a big fan of IRC to start 18:56
mauke how did it display the message?
ajs_home --- Received a CTCP SOMEBODY has sent you a message, to read it type: /server read 1 from Nextgens_ (to #perl6) 18:57
mauke heh, a bit misleading
irssi shows it as: Nextgens_ [i=xterm@gateway/tor/x-a9ff32413fc71714] requested unknown CTCP SOMEBODY from #perl6: has sent you a message, to read it type: /server read 1
buu That's because irssi is morally superior 18:58
ajs_home morels? Where do I get these morels? I'm hungry! 18:59
buu You eat morels?! 19:00
ajs_home Morels are the best... I make a mean morel risotto
buu Mmm, food. 19:01
19:09 Aankhen`` joined 19:39 markstos joined 20:11 avarab joined
Dr_Pi I've messed up svn; when I try to do a svn cleanup, I'm getting "svn: 'perl5/Pugs-Compiler-Rule/t/12-plain_regex.t' is not under version control" 20:14
20:16 fglock joined
markstos Dr_PI: cp 12-plain_regex.t modified.t; svn update 12-plain_regex.t; cp modified.t 12-plain_regex.t 20:20
lambdabot markstos: You have 2 new messages. '/msg lambdabot @messages' to read them.
markstos But I'm just guessing... I'm no svn expert. 20:21
20:29 avarab is now known as avar 20:33 Aankhen`` joined
nothingmuch @summon ninjas 20:37
lambdabot Unknown command, try @list
nothingmuch .oO
( use Engrish; $INPUT_LECORD_SEPALATION = "\n" );
20:45 b_jonas joined 20:56 prism joined 21:04 lanny joined
lanny @tell gaal On porting DIEHARD. Um... no. :) 21:04
lambdabot Consider it noted.
21:23 _bernhard joined 22:03 prism joined 22:05 Limbic_Region joined 22:07 Aankh|Clone joined 22:23 justatheory joined 22:24 awwaiid joined 22:45 awwaiid joined, weinig is now known as weinig|food 23:02 ofer0 joined 23:14 weinig|food is now known as weinig 23:36 awwaiid joined 23:40 Odin-LAP joined 23:58 awwaiid joined