Camelia, the Perl 6 bug

IRC log for #perl6, 2006-05-11

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:02 feng joined perl6
00:06 meppl gute nacht
00:14 mako132_ joined perl6
00:29 gaal joined perl6
00:29 svnbot6 r10273 | lwall++ | Double quoted strings need to be careful about unmatched curlies.
00:37 puetzk joined perl6
00:42 neoesque joined perl6
00:45 oylenshpeegul joined perl6
00:57 pmichaud_ I see some tests in pugs/trunk/t/rules/from_perl6_rules/stdrules.t that don't seem to follow S05 -- where should I comment?
01:00 jsiracusa joined perl6
01:00 audreyt you got a commit bit :)
01:00 pmichaud_ okay, I'll adjust it that way then :-)
01:00 pmichaud_ it involves removing a number of tests :-)
01:00 audreyt they were from dconway's Perl6::Rules :)
01:01 audreyt nodnod. that's fine :)
01:01 pmichaud_ I'll adjust later; have to run to the store
01:02 pmichaud_ do commits to the svn.perl.org repo make it into the pugs repo, or do I need to checkout/commit directly to pugs?
01:02 audreyt pugs->svn.perl.org is one way mirror
01:02 audreyt so checkin to the pugs one is preferred
01:02 pmichaud_ okay, just checking.  no problem.
01:02 audreyt pmichaud++
01:08 f0rth joined perl6
01:17 arcady joined perl6
01:27 hikozaemon joined perl6
01:32 justatheory joined perl6
01:32 * audreyt starts step 0 of Capturizing Pugs: hack Val to support true objects
01:33 audreyt however I wonder if we should roll an interim 6.2.12 before I destroy all the internals :)
01:33 JonathanWang joined perl6
01:33 audreyt it's been 3 months, and the changes are much more than worthy for a point release already...
01:33 audreyt thoughts?
01:34 Quell joined perl6
01:35 obra Do it.
01:35 obra Good for getting into stable linux dists.
01:35 jserv-- joined perl6
01:36 audreyt yeah. and the 3x+ speedup is nontrivial :)
01:37 audreyt k. will triage a bit then
01:37 audreyt helps welcome on looking at smoke.pugscode.org and TODOize nonregressions, as well as highlight regressions here
02:04 AtomicStack joined perl6
02:07 Spire joined perl6
02:07 Spire hi
02:07 mithenks joined perl6
02:17 oylenshpeegul left perl6
02:24 shachaf joined perl6
02:44 Spire left perl6
03:08 DesreveR joined perl6
03:09 FurnaceBoy joined perl6
03:22 bsp joined perl6
04:56 penk joined perl6
05:08 iblechbot joined perl6
05:11 gaal did we have a release after Arbel?
05:11 gaal wow that's a lot of changelogging :)
05:31 svnbot6 r10274 | pmichaud++ | Update some tests to be consistent with S05.  (They're still marked "todo",
05:31 svnbot6 r10274 | pmichaud++ | but at least they're syntactically correct for now.)
05:34 TimToady pmichaud: what's up with the rules/rules.t that says it's moving to parrot land?
05:56 pmichaud_ TimToady: I dunno -- hadn't looked at that or seen it yet
05:57 pmichaud_ I think it may be a reference to the fact that pge/parrot has a copy of most of these tests in its own test directory
05:58 pmichaud_ (in t/compilers/pge/p5regex)
06:00 Odin-LAP joined perl6
06:22 svnbot6 r10275 | spinclad++ | Initial checkin of Judy-1.0.3/{doc,src}
06:59 particle_ joined perl6
07:00 Quell joined perl6
07:23 elmex joined perl6
07:23 neoesque joined perl6
07:32 svnbot6 r10276 | spinclad++ | - doc changes for proposed JudyHS iterators:
07:32 svnbot6 r10276 | spinclad++ |   add JudyHS{First,Next,Last,Prev,MaxLength} and JHS{F,N,L,P,ML}
07:33 Quell joined perl6
07:34 Aankhen`` joined perl6
07:47 drrho joined perl6
07:48 TimToady joined perl6
07:57 Aragone joined perl6
07:57 Aragone is now known as Arathorn
08:18 azuroth androids! everybody needs good androids! androids have feelings too!
08:20 lumi OT but can anyone resolve cvs.sourceforge.net?
08:21 Arathorn nope
08:22 azuroth not here...
08:22 lumi Not just me then
08:31 Arathorn (it's back now)
08:31 marmic joined perl6
08:31 lumi True, thanks
09:02 neoesque joined perl6
09:21 macroron joined perl6
09:25 drbean_ left perl6
09:32 * Arathorn tries to work out if there's any more elegant way of finding if two Judy1's key sets intersect than doing a linear scan through both, side by side, and seeing if the keys ever 'line up'
09:41 iblechbot joined perl6
09:56 ludan joined perl6
09:56 ludan hi
10:00 drbean_ joined perl6
10:01 svnbot6 r10277 | audreyt++ | * bool::true is now Bool::True.
10:01 svnbot6 r10277 | audreyt++ | * True is now a valid literal.
10:02 chris2 joined perl6
10:04 drbean_ is now known as drbean
10:14 cognominal joined perl6
10:16 svnbot6 r10278 | audreyt++ | * Some other Bool::True and Bool::False fixes.
10:17 drbean ratchet suggests to me backtracking (freewheeling) rather than its opposite, fixed gears, to me.
10:25 svnbot6 r10279 | audreyt++ | * In Pugs shell, :d and :D (dump parse tree) now continues
10:25 svnbot6 r10279 | audreyt++ |   the parse from the current environment; use :reset to
10:25 svnbot6 r10279 | audreyt++ |   reset the environment.
10:25 svnbot6 r10280 | audreyt++ | * sub_calls.t: change space-dot to long-dot.
10:25 svnbot6 r10280 | audreyt++ | * Unspecced:
10:25 svnbot6 r10280 | audreyt++ |     foo'bar';
10:26 svnbot6 r10280 | audreyt++ |   does this need to parse as foo('bar')?
10:29 svnbot6 r10281 | audreyt++ | * var.t: double-declaration:
10:29 svnbot6 r10281 | audreyt++ |     my $x; my $x;
10:29 svnbot6 r10281 | audreyt++ |   is a parseok, not a parsefail.
10:29 svnbot6 r10282 | audreyt++ | * Support for $ENV::x and $+x.
10:29 svnbot6 r10282 | audreyt++ | * Unspecced:  Does this *set* the ENV?
10:29 svnbot6 r10282 | audreyt++ |     $+PATH = 'foo';
10:29 svnbot6 r10282 | audreyt++ | * Unspecced:  What does this mean?
10:29 svnbot6 r10282 | audreyt++ |     @+PATH = <foo bar>;
10:29 svnbot6 r10283 | audreyt++ | * Pugs.AST: bare-block-as-statement no longer cause two
10:29 svnbot6 r10283 | audreyt++ |   OUTER scopes be created.
10:31 audreyt bbiab
10:31 svnbot6 r10284 | audreyt++ | * Parser: Correct the parsing for
10:31 svnbot6 r10284 | audreyt++ |     f(((a=>1)))
10:31 svnbot6 r10284 | audreyt++ |   so it's now a positional, not named, argument.
10:31 svnbot6 r10284 | audreyt++ | * Parser: The (:name) pair form now means :name(Bool::True),
10:31 svnbot6 r10284 | audreyt++ |   not :name(1).
10:31 svnbot6 r10285 | audreyt++ | * %*ENV.exists('FOO') now returns True even when FOO is set
10:31 svnbot6 r10285 | audreyt++ |   to empty string, for example:
10:31 svnbot6 r10285 | audreyt++ |     export FOO=
10:32 svnbot6 r10286 | audreyt++ | * Parser.Operator: Don't treat named-only functions as unary.
10:32 svnbot6 r10286 | audreyt++ |     sub f (:$x!) {}
10:32 svnbot6 r10286 | audreyt++ |   does not make "f" into an unary preifx.
10:32 svnbot6 r10287 | audreyt++ | * Pugs.AST.Internals: Remove the unused "MonadEval" class.
10:58 wolverian oh, Prelude imports Bool now? yay :)
10:59 trym joined perl6
11:06 theorbtwo drbean: I think the short answer to that is "learn more mechanics".
11:06 theorbtwo A ratchet will only rotate one direction.
11:08 ruz joined perl6
11:27 xern joined perl6
11:30 cognominal ...or learn more english, I had to go for the dictionnary definition to get it
11:30 broquain1 How do I fix this (it's a make error): Could not find module `Data.FastPackedString' # A ghc upgrade?
11:31 broquain1 is now known as broquaint
11:39 Cynic joined perl6
11:40 pasteling Someone at 220.239.0.89 pasted "O_O" (1 line, 3B) at http://sial.org/pbot/17138
11:40 Cynic er
11:40 Cynic something in that rings alarm bells in my head
11:41 pasteling Someone at 220.239.0.89 pasted "|" (1 line, 1B) at http://sial.org/pbot/17139
11:41 jsiracusa joined perl6
11:42 Khisanth joined perl6
11:57 sahadev joined perl6
12:02 mj41_ joined perl6
12:09 audreyt broquaint: hi
12:09 audreyt broquaint: nopaste the error?
12:10 audreyt broquaint: there should be nothing inm pugs that imports D.FPS anymore
12:10 audreyt broquaint: see if nuking dist/ works? or a fresh checkout
12:11 pasteling "broquaint" at 217.206.131.214 pasted "Could not find module `Data.FastPackedString':" (39 lines, 2.7K) at http://sial.org/pbot/17140
12:11 broquaint I'll do a fresh checkout and try again ...
12:12 audreyt aha. no need
12:12 audreyt just rm src/Data/Yaml/Syck.hs
12:12 audreyt and perl Makefile.PL ; make
12:12 audreyt again
12:13 broquaint Making ...
12:14 gaal hey
12:14 audreyt gaal: yo!
12:14 audreyt a release! :)
12:15 gaal audreyt, I've been updating CodeGen.YAML and Prim.Eval to use the CompUnit datatype
12:15 gaal so it's forwaard compatible, seeing as we're releasing soon
12:15 audreyt please commit asap
12:16 gaal got a weird error here: Couldn't match `Pad' against `Map Pugs.Types.Var PadEntry
12:16 gaal I thought Pad *was* Map Pugs.Types.Var PadEntry
12:16 audreyt no
12:16 audreyt it's newtyped
12:16 audreyt need a MkPad
12:16 broquaint That looks to have fixed it. Thanks, audreyt :)
12:16 audreyt np :)
12:16 gaal (this is after changing compunit's pad from TVar Pad to just Pad
12:16 gaal ahhhh
12:16 gaal okay :)
12:17 trym coffee, anyone?
12:18 audreyt trym: sure, /dcc me a cup
12:18 trym ooh wouldnt that have been nice
12:18 trym faxing stuff etc
12:18 trym I used to dream about that when I was little.. a magic fax..
12:23 gaal lunch, bbiab &
12:25 audreyt :)
12:26 mkirank joined perl6
12:27 mkirank left perl6
12:48 broquaint What's the earliest version of GHC needed for pugs?
12:48 audreyt 6.4.1
12:49 broquaint Groovy, I'm going to add that to the Makefile.PL.
12:54 pmichaud_ is now known as pmichaud
12:56 svnbot6 r10288 | broquaint++ | * Added what the minimum version of GHC is required when it isn't installed.
12:57 gaal uh, remind me, are guards allowed in case expressions?
12:58 audreyt sure
12:58 gaal case x of y | y == 42 || y == 54 -> ...
12:58 audreyt that works
12:58 audreyt case x of
12:58 audreyt  y | y == 42 || y == 54 -> ...
12:58 audreyt you can also use pattern guards.
12:59 audreyt gaal: saw the moose.jpg?
12:59 gaal <- |
12:59 gaal no?
12:59 gaal what moose.jpg
12:59 audreyt it's a gift to you :)
12:59 audreyt http://pugs.blogs.com/photos/porcelain/moose.jpg
12:59 gaal oo!
13:00 gaal !!
13:00 gaal thank you so much!
13:00 audreyt :D
13:01 gaal wow, there's also a cheshire lambda nearby
13:01 audreyt that's for yuval :)
13:02 gaal this is very, very cool
13:03 audreyt :))
13:05 gaal the Generator type needs changing to String -> Eval Val (from simply Eval Val), where the arg is a description
13:05 gaal but that can wait till after the release
13:05 audreyt "description"?
13:06 gaal name of compilation unit
13:06 audreyt oh. yup.
13:06 audreyt try avoid String from now on -- "type" it to CompUnitName
13:06 gaal but for now i'll remove that field from CompUnit. good thing there's a version field :)
13:06 gaal sure
13:06 audreyt well heh, just -- it away
13:07 gaal eyah
13:07 audreyt I'll take a look at String->'ing it
13:08 gaal ehh, what gives String -> [Word8] ? (for packing a show'n version number)
13:08 svnbot6 r10289 | audreyt++ | * drift.pl: DrIFT doesn't handle newtype deriving, so we handle that for it
13:09 audreyt "encode"
13:09 gaal thanks :)
13:09 audreyt surprisingly, the same name as perl5 :)
13:11 ludan joined perl6
13:11 ludan hi
13:13 audreyt ludan: greetings
13:14 chris2_ joined perl6
13:14 svnbot6 r10290 | audreyt++ | * Pugs.AST.Internals: convert two "data" into "newtype"
13:14 svnbot6 r10290 | audreyt++ |   (InitDat and Pad) in the vain hope of boosting some performance.
13:16 chris2_ is now known as chris2
13:18 kolibrie joined perl6
13:22 Limbic_Region joined perl6
13:29 drbean theorbtwo: Because you have a ratchet in a freewheel on a bicycle, you can backpedal.
13:29 drbean If there is no ratchet, ie it is a fixed gear, you can't backpedal.
13:29 gaal Haskellearners, bookmark this: http://research.microsoft.com​/~simonpj/Haskell/guards.html
13:30 kanru joined perl6
13:30 xinming joined perl6
13:31 audreyt yeah, this is the Real Reason why pugs started to be ghc specific
13:31 audreyt instead of even trying to get anywhere near haskell98
13:33 gaal audreyt: I won't be available much in the next 16 hours, unfortunately
13:34 audreyt that's fine, I don't plan that soon a release
13:35 Odin-LAP joined perl6
13:35 kanru joined perl6
13:37 svnbot6 r10291 | audreyt++ | * ext/: more bool::[true|false] --> Bool::[True|False] change.
13:45 chris2_ joined perl6
13:45 svnbot6 r10292 | fglock++ | PCR - :ratchet subrule call
13:45 particle_ i must be doing something wrong...
13:45 particle_ nopaste?
13:45 gaal urg. I broke the yaml parsing but I'm not sure why.
13:45 gaal perlbot nopaste
13:45 perlbot Paste your code here and #<channel> will be able to view it: http://sial.org/pbot/<channel>
13:46 pasteling "particle_" at 144.81.84.203 pasted "makefile.pl not recognizing embedded parrot ??" (33 lines, 1.3K) at http://sial.org/pbot/17144
13:47 particle_ probably me not specifying it correctly
13:47 chris2_ is now known as chris2
13:47 gaal "Parrot linking not supported with MSVC.  Parrot linking will be disabled."
13:47 gaal what compiler are you using?
13:47 particle_ ah
13:47 particle_ yep, too early for me. msvc
13:48 particle_ can that be fixed?
13:48 audreyt probably yes
13:48 elmex joined perl6
13:48 particle_ is there a pointer to why it's broken?
13:48 audreyt but none of us had enough mingw+msvc tuits
13:48 audreyt ghc uses gcc
13:49 audreyt well, you can comment out the test and see howit breaks
13:49 particle_ well, i'll attempt to build pugs with msvc first, then worry about fixes
13:49 audreyt nod.
13:49 particle_ is the test in makefile.pl, or ... i'll look it up
13:49 hexmode joined perl6
13:50 audreyt line 267 m.pl
13:50 particle_ failing on data.yaml.syck
13:51 particle_ Compiling Data.Yaml.Syck   ( src/Data/Yaml/Syck.hs, dist\build\src/Data/Yaml/Syck.o )
13:51 particle_ C:\DOCUME~1\particle\LOCAL​S~1\Temp\ghc2436.hc:9:29: ../../syck/syck.h: No such file or directory
13:51 audreyt please rm  src/Data/Yaml/Syck.hs
13:51 particle_ okie
13:52 audreyt m.pl now rm's it for you :)
13:52 svnbot6 r10293 | audreyt++ | * unlink src/Data/Yaml/Syck.hs to resolve a FAQ.
13:53 gaal audreyt: could you please take a look at http://perlcabal.org/gaal/tmp/cu.0.diff
13:53 gaal I get a "no parse" on reading the data back
13:53 gaal not sure why.
13:54 gaal (I know I still have an asymmetry writing a VInt and assuming a native Haskell var, but I don't think that's it.)
13:56 audreyt looking
13:56 fglock joined perl6
13:56 audreyt how do I test this?
13:57 gaal rm blib6/lib/Prelude.pm.yml ; make ; ./pugs 'say 42'
13:57 gaal generating the prelude will work, reading it won't.
13:58 gaal I had half of a patch to add coordinates to YAML errors, but it'd have bloated the nodes a lot so I let it go
13:58 gaal now I'm sorry I didn't keep it around :(
13:59 gaal that "no parse" error is a pain (get ready to ^c some looong output)
14:02 audreyt well, building profiled and +RTS -xs
14:02 audreyt can give you the stack trace.
14:08 gaal noted. I won't have time to build one today though - have to leave in ~15min :(
14:09 nnunley joined perl6
14:09 svnbot6 r10294 | audreyt++ | * src/syck and src/cbits is no more.
14:11 FurnaceBoy joined perl6
14:13 justatheory joined perl6
14:16 pasteling "particle_" at 144.81.84.203 pasted "win32 build error" (18 lines, 959B) at http://sial.org/pbot/17145
14:16 audreyt and I need to sleep also :/
14:16 audreyt particle_: just run "make" again
14:16 particle_ ok, is that the standard answer? :)
14:17 gaal that and try tweaking ghc heap sizes in config.yml :)
14:17 particle_ keep trying make until it works?
14:17 particle_ i see
14:17 gaal (if you do that you need to regen Makefile though)
14:17 particle_ does regen makefile force full rebuild?
14:18 audreyt not at all.
14:18 particle_ ah, unlike parrot. nice.
14:19 naughton joined perl6
14:21 gaal I have to go, see y'all
14:21 audreyt have fun :)
14:21 gaal thanks, good night :)
14:22 shachaf joined perl6
14:33 fglock left perl6
14:34 jserv-- joined perl6
15:05 cratylus joined perl6
15:14 nothingmuch joined perl6
15:23 azurot1 joined perl6
15:29 Qiang joined perl6
15:38 chris2 joined perl6
15:43 svnbot6 r10295 | audreyt++ | * Data.ByteString.Seq: first cut at a "Rope" data type.
15:43 rgs cut the rope ?
15:44 spinclad trim to fit
15:46 flounder99 left perl6
15:49 svnbot6 r10296 | audreyt++ | * Seq: stub implementation
15:50 aufrank joined perl6
15:53 aufrank joined perl6
16:07 audreyt TimToady: does this still work?
16:07 audreyt say'hi';
16:13 leo audreyt: a cord implementation is inside Boehm GC src
16:14 leo which is e.g. inside gcc src
16:18 audreyt ah. nice.
16:20 audreyt with immutable strings and sharing, I think some kind of concat-tree will be a win in the long run
16:20 leo copy short pieces and concat-node long once, yes
16:21 audreyt exactly
16:21 audreyt also, slurping 1GB files as concat-chunks
16:21 ingy tasty
16:22 ingy like bubble tea
16:26 ghenry joined perl6
16:27 FurnaceBoy is now known as FB|afk
16:28 audreyt sleep &
16:37 ruz joined perl6
16:40 kanru joined perl6
16:44 cdpruden joined perl6
16:59 ruphup joined perl6
17:03 TimToady audreyt: say'hi' works up till the moment someone defines a ' postfix operator.
17:04 particle_ or possibly infix also, yes?
17:06 particle_ like infix:' can be defined as '::' :)
17:14 rgs_ joined perl6
17:15 rgs_ is now known as rgs
17:16 pmichaud TimToady: thank you thank you for not using :skip :-)
17:16 pmichaud (in S05)
17:17 rgs joined perl6
17:25 penk joined perl6
17:26 davidfetter joined perl6
17:27 audreyt yay, sanity prevailed.
17:27 audreyt #(...) is still considered "whitespace".
17:30 audreyt TimToady: given
17:30 KingDiamond joined perl6
17:30 audreyt proto int($?) { ... }
17:30 audreyt that defaults to $_
17:30 audreyt it's very strange to think that
17:30 audreyt Int
17:30 audreyt would mean int($_)
17:31 audreyt also, the fact that Rand != Rand
17:31 audreyt is a bit weird as well
17:31 audreyt not so sure about autouppercasing in general
17:32 audreyt also, sometimes the function name has no uppercase ;)
17:32 audreyt bbl &
17:32 wolverian I dislike uppercase function names when the return value varies (e.g. Time)
17:33 wolverian s,uppercase,capitalized,
17:35 wolverian I guess that's fairly arbitrary..
17:36 TimToady audreyt: why should int() default to $_?  But yes, we'd have to think about collisions with type names.
17:37 wolverian in general, it feels better to me to denote types somehow, and without sigils, capitalisation seems obvious.
17:37 audreyt TimToady: well, it's not been specced to not default to $_
17:37 audreyt and in perl5 it does
17:38 audreyt and rule -1 is that "perl5 is the fallback" :)
17:38 particle_ wwp5d
17:38 TimToady as with Jesus, the correct answer is "something surprising".
17:39 Juerd Why should it not default to $_?
17:39 Juerd int is meaningless without arguments
17:39 TimToady Maybe it's *only* provisional Foo that looks for foo()
17:39 Juerd So a default, and thus $_, seems in order...
17:39 ruz_ joined perl6
17:40 particle_ can't you do that with .int?
17:40 audreyt TimToady: the motivation for this is trying to do away with optional-unary?
17:40 TimToady yes, all the default-to-$_ forms are much less important to support now.
17:40 Juerd particle_: You can.
17:40 Juerd particle_: But why make argless int invalid?
17:40 TimToady that was part of the intent of inventing .foo in the first place.
17:40 flounder99 joined perl6
17:41 Juerd TimToady: I agree that .int is better style, but breaking mental compatibility should not be done so lightly.
17:41 particle_ juerd: it's *too* magical. at least the dot provides some context
17:41 audreyt it shouldn't be done selectively.
17:41 PerlJam What does ".int" mean?
17:41 audreyt I'm in favour of removing _all_ ?=$_ ;)
17:41 particle_ $_.int
17:41 audreyt that is, all optional unary that defaults to $_.
17:41 PerlJam gotcha
17:41 Juerd TimToady: If un-defaulting means a case of ambiguity is solved, then I'm all for it. But I don't see any negative side effects to having int default to $_, especially now that we have lexical $_ and CALLER::
17:41 PerlJam I guess I could have figured that out, but it doesn't hurt to ask  :-)
17:42 Juerd PerlJam: It only hurts to answer ;)
17:42 * particle_ thinks the evalbots should be renamed wwp5d and wwp6d
17:42 TimToady P5: length / 5
17:43 Juerd TimToady: Okay, I'm convinced.
17:43 audreyt actually, that is... a parsefail
17:43 audreyt ?eval int / 5
17:43 TimToady audreyt: it seems a bit odd to undef default $_ on built-ins when every bare block is =CALLER::<$_>
17:43 penk joined perl6
17:43 evalbot_10296 Error:  unexpected end of input expecting "\\", "$/", "$!" or "/"
17:43 audreyt and it's probably not my bug :)
17:44 TimToady er, I mean OUTER::
17:44 Juerd ?eval say int / 5; # See doc/blah.pod
17:44 evalbot_10296 Error:  unexpected "b" expecting term postfix, comment, operator, ":", ",", postfix conditional, postfix loop, postfix iteration, ";" or end of input
17:44 Juerd Okay, okay
17:44 pjcj joined perl6
17:44 Juerd ?eval say int / 5; # See ~/.foorc
17:44 evalbot_10296 Error: No such method in class Any: "&foorc"
17:44 audreyt Juerd: note that this is bug-for-bug compatible with perl5
17:44 audreyt p5evalbot: int / 5
17:44 p5evalbot audreyt: Sorry, I couldn't find a plugin that matched your command
17:44 Juerd audreyt: Yes, it is. But that's not an argument for anything in Perl 6 :)
17:45 Juerd It's Ponie's mantra :)
17:45 audreyt in perl6, this argument means "let's do away with it please"
17:45 Juerd Heh
17:45 audreyt TimToady: CALLER_ and OUTER_ are quite different.
17:45 TimToady yes.
17:45 audreyt TimToady: OUTER_ is fine; CALLER_ introduces parseambigs.
17:46 TimToady right
17:46 TimToady so lets shoot those suckers...
17:46 audreyt we can even go so far as to say that optional-unary always parse as listop
17:47 audreyt that eliminates this entire class of ambigs
17:47 Juerd What's optional about them, if they don't default to $_?
17:47 audreyt and improve predictiveness in parsers, since there need to be no special-case "nullterm" for them
17:48 Juerd Isn't an argument without default by definion mandatory? :)
17:48 audreyt Juerd: sub f ($x? = 5) {...}
17:48 audreyt f / 4
17:48 audreyt # same ambig
17:48 TimToady no, it just defaults to undef
17:48 Juerd Rephrase: do these default to anything else than $_?
17:48 Juerd And does that make any more sense than defaulting to $_?
17:49 TimToady question is, does .f / 4 do the right thing...
17:49 audreyt it does
17:49 PerlJam except when you're in a method, right?
17:49 TimToady not if $_ is an object with an f method.
17:50 audreyt er.
17:50 audreyt $obj.meth 1 2 3
17:50 audreyt $obj.meth 1, 2, 3
17:50 audreyt is illegal, no?
17:50 TimToady yes
17:50 audreyt so why should
17:50 audreyt .f 1
17:50 audreyt be legal?
17:51 TimToady not saying it is.  Just saying .f calls $_'s method over your sub
17:51 TimToady s/calls/picks/
17:51 audreyt but so is f($_).
17:51 audreyt there is really no difference.
17:51 audreyt if you mean &f($_), write &f($_) :)
17:51 TimToady hmm, I do seem to recall saying that...
17:53 audreyt interestingly, the only optional unary currently that does not default to $_ is &exit
17:53 audreyt exit / 4
17:53 audreyt (it defaults to 0)
17:53 audreyt and I don't think people will revolt if exit is made into listop...
17:54 audreyt I mean, parsed as such
17:54 cognominal joined perl6
17:54 TimToady "Here, pick one of these exit values..."  :)
17:54 audreyt ?eval exit(1,2,3)
17:54 particle_ exit three times, with these different values
17:54 evalbot_10296 Error: No such sub: "&exit"
17:54 audreyt aw. safe mode
17:54 pmichaud would exit retain the same precedence level, in that case?
17:55 pmichaud or does it move down to the other listops?
17:55 audreyt pmichaud: if it's parsed as listop, then maybe it can be moved downward
17:55 pmichaud (same with the other unaries)
17:55 audreyt er, not same
17:55 audreyt the other optional-unaries are simply getting nonoptional
17:55 pmichaud okay
17:56 audreyt which means the "nullterm" treatment can go away :D
17:56 pmichaud how about -e, -f, -x, etc?
17:56 audreyt interestingly, .++ is specced to call postfix ++
17:56 audreyt so .-e can't easily work
17:58 audreyt I don't have a good answer. that probably means the optional-unary parsecateg stays...
17:58 pmichaud well, for me nullterm probably stays anyway, I use it for infix:,
17:58 pmichaud (and even if p6 doesn't use it, pge does)
17:58 audreyt *nod*
17:58 audreyt right, for trailing/preceding seps it's still useful
17:58 audreyt -e / 5
17:59 audreyt -e * * *
17:59 TimToady whaaaaaaaaateeeeeeeeveeeeeeer.......
18:00 pmichaud TimToady: any idea how "solid" the :sigspace adverb is going to be?  (i.e., should I go ahead and start changing pge to match, or wait a few days for other responses)?
18:00 audreyt infix/prefix/term monster
18:01 PerlJam :sigspace?
18:01 TimToady would it be easy to just alias it to :words for now and then drop :words later?
18:01 pmichaud pj: latest update to S05 changes :words/:w to :sigspace/:s
18:01 PerlJam oh, I went sig -> signature in my head
18:01 TimToady and added ms// and ss////
18:01 TimToady s/\///
18:01 pmichaud TimToady: it's not difficult to change, other than I need to update the tests
18:02 audreyt TimToady: in A03 you suggested something like
18:02 audreyt if .is_dir.is_writable {... }
18:02 pmichaud TimToady: but yes, I can just do :w/:words as an alias for now
18:02 audreyt to stand for
18:02 audreyt if -d -w { ... }
18:03 audreyt I wonder, if that's in place, whether it makes sense to make -x become mandatory unary.
18:04 audreyt if they can be made into mandatory unary, then the ambig optional-unary parsing is entirely resolved
18:04 TimToady lemme think about it in the shower.  Gotta be a $meeting in <.5 hr.
18:04 audreyt ok. and I really should sleep as it's 2am :)
18:04 audreyt *wave*
18:05 TimToady &
18:05 PerlJam how did you guys arrive at :sigspace?
18:05 PerlJam it doesn't seem to fit (the name) with the other adverbs
18:05 * pmichaud points at TimToady
18:06 PerlJam sure blame the language designer  :)
18:07 pmichaud the first time I saw :sigspace was reading it in the S05 diff :-)
18:07 svnbot6 r10297 | audreyt++ | * unTODO passing tests with latest PGE.
18:07 svnbot6 r10296 | audreyt++ | * Seq: stub implementation
18:07 audreyt clearly it's pacing the signals.
18:07 * audreyt prefers :spaceout
18:08 pmichaud besides, I suspect everyone will use :s anyway, or ms// and ss//
18:08 audreyt rule foo { bar } rule multifoo { <foo>+ }
18:08 audreyt does this match "barbarbar"?
18:09 audreyt where "this" means /^<multifoo>$/
18:09 audreyt ?eval  rule foo { bar } rule multifoo { <foo>+ } "barbarbar" ~~ /^<multifoo>$/
18:09 pmichaud yes, it appears to match to me
18:09 evalbot_10296 Match.new(   ok => bool::true,    from => 0,    to => 9,    str => "barbarbar",    sub_pos => (),    sub_named =>     { "multifoo" =>         Match.new(           ok => bool::true,            from => 0,            to => 9,            str => "barbarbar",            sub_pos => (),            sub_named => {"foo" => "3"}         )     } )
18:09 audreyt how do I get it to match only "bar bar bar"?
18:10 pmichaud oh wait
18:10 pmichaud no, it should not match
18:10 audreyt PGE has it matching currently, it appears
18:10 pmichaud no, it's probably that "rule" isn't passing the ":w" option to pge
18:10 audreyt but in any case, if it shouldn't match, how do I get it to match? :)
18:10 audreyt ahhh.
18:10 pmichaud try   rule foo {:w bar }
18:10 audreyt ?eval  rule foo {:w bar } rule multifoo { <foo>+ } "barbarbar" ~~ /^<multifoo>$/
18:10 evalbot_10297 Match.new(   ok => bool::false,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
18:11 audreyt thank-you.
18:12 pmichaud the newer versions of the regex compiler accept adverbs
18:12 audreyt woot
18:12 pmichaud thus  $P0 = compreg 'PGE::P6Regex';   $P1 = $P0(pattern, 'w'=>1)
18:12 pmichaud compiles pattern assuming :w
18:12 audreyt that's good.
18:12 pmichaud same with ratchet, ignorecase, etc.
18:13 audreyt pugs/src/pge/run_pge.pir needs to be updated to accomodate that then
18:13 pmichaud right, and you can get the rule/regex/token aliases correct :-)
18:13 audreyt :)
18:13 audreyt so, it's determined at <foo> level?
18:14 audreyt that is, foo is compiled to <?ws>bar<?ws>
18:14 audreyt right?
18:14 pmichaud yes
18:14 audreyt rule foo {bar}
18:14 audreyt will then match "barbarbar"
18:14 pmichaud yes
18:14 audreyt whilst
18:14 audreyt rule foo { bar}
18:14 evalbot_10297 joined perl6
18:14 audreyt rule foo {bar }
18:14 audreyt will all only match "bar bar bar"
18:14 pmichaud correct
18:14 audreyt ?eval 1==1
18:14 evalbot_10297 Bool::True
18:15 audreyt ?eval 1 ~~ /0/
18:15 evalbot_10297 Match.new(   ok => Bool::False,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
18:16 audreyt is there a
18:16 audreyt $x = regex{...}
18:16 audreyt form
18:16 audreyt and if yes, how does it differ from
18:16 audreyt $x = rx{...}
18:16 audreyt ?
18:16 pmichaud as I  understand it, 'regex' is basically the same as 'sub'
18:17 pmichaud so, regex{...} and rx{...} are essentially the same here
18:17 audreyt nod. I was wondering if the anon form of regex is abbred as rx
18:17 audreyt or is _just_ rx
18:17 pmichaud so far I've been thinking of them as identical
18:17 * PerlJam doesn't undrstand why we would have rx and regex
18:17 pmichaud (in term position)
18:18 audreyt PerlJam: because qr is 2char and "regex" would be 5?
18:18 pmichaud one difference is that 'regex' requires curlies, while rx can use other delims
18:18 pmichaud regex / abc /   # illegal
18:18 pmichaud rx / abc /    # okay
18:19 PerlJam audreyt: yeah, but most of the time people are just going to write /.../ anyway
18:19 pmichaud pj:  not if one needs to supply adverbs
18:19 pmichaud pj:  $x = rx :s / ... /
18:20 PerlJam then are 3 more chars such a hardship?
18:20 audreyt pmichaud: *nod* I was just wondering if dropping the "regex" anon form may work
18:20 DaGo joined perl6
18:20 audreyt but I think consistency wins here.
18:20 PerlJam or could regex just become rx
18:20 pmichaud I don't think rx takes a name
18:20 audreyt just in anon (term) position
18:21 PerlJam and thus the parallel to sub ends
18:21 audreyt so nvm :)
18:21 pmichaud I think rx is more closely aligned with qX
18:21 PerlJam (though sub doesn't need alternate delims)
18:23 PerlJam pmichaud:  right but qX is quotish and rx is/was trying to move away from that idea (I thought)
18:23 svnbot6 r10298 | fglock++ | PCR :ratchet - added support for constants and escape sequences; 17 tests pass
18:23 Odin-LAP joined perl6
18:23 pmichaud depends on what one means by "qX" is quotish :-)
18:25 pmichaud (i.e., how do you see qX as different from rx in this context?)
18:25 svnbot6 r10299 | audreyt++ | * Parse for "token" and "regex" forms; full adverb support
18:25 svnbot6 r10299 | audreyt++ |   to PGE bridge coming soon...
18:26 PerlJam Actually, it's just something that Larry or Damian said in one of the AES
18:27 pmichaud ah.  I think the idea was that we'd move away from the concept that variables interpolate before interpeting the pattern
18:27 PerlJam yeah, A05 -- Deferred regex rules are now defined with rx// rather than qr//, because a regular expression is no longer a kind of quoted string.
18:27 pmichaud right.  qr would interpolate and then interpret the pattern, rx interprets the pattern and then matches variables in the pattern
18:29 * PerlJam would like to see those examples under "Keyword and Context Reform" reworked to include token and regex.
18:32 PerlJam and I still don't quite get what Allison meant in her summary that "rule ... may only be used inside a grammar"
18:32 PerlJam Perhaps I'm overthinking it.
18:34 PerlJam Does that mean that rule foo { ... } is illegal in absense of a surrounding grammar declaration?  If so, does that make  my $x = rule { ... } illegal?  And if *that's* true, does that mean that the only way to get an "anonymous rule" is to use rx/regex with the appropriate modifiers?
18:34 Ymmv joined perl6
18:43 pmichaud perljam: that's how I would interpret allison's statement, yes
18:46 TimToady another difference between regex and rx is that regex can declare a signature.
18:46 pmichaud yes
18:47 PerlJam pmichaud: then is  grammar Foo;  my $ar = rule { ... } ;    legals?
18:47 PerlJam er, s/ls/l/
18:48 spinclad ?eval "$ ^ foo" ~~ rx:sigspace { <variable> }   # sigil space?
18:48 evalbot_10297 is now known as evalbot_10299
18:48 evalbot_10299 *** Cannot parse PGE:  <variable>  *** Error: Name 'variable' not found  Match.new(   ok => Bool::False,    from => 0,    to => 0,    str => "",    sub_pos => (),    sub_named => {} )
18:48 pmichaud pj: I dunno.  I'm waiting to see what actually makes it into S05
18:48 PerlJam aha!
18:48 dduncan joined perl6
18:48 Juerd A comparative *table* of regex/rule/rx features would be useful. Is one around?
18:48 PerlJam spinclad seems to be with me.  :sigspace is a terrible name
18:48 PerlJam :-)
18:48 TimToady anonymous methods and rules probably would have to autogen a role around themselves and be generic somehow.
18:49 pmichaud TimToady: I think pj's question has more to do with the notion of "rule" being outside a grammar
18:49 TimToady okay, how about :significantwhitespace instead? :/
18:49 dduncan in regards to 6.2.12, what is the *earliest* day it could possibly be released, so I can have an idea what I can fit in before then?
18:49 spinclad :signifspace (:snifspace for short)
18:49 Juerd TimToady: :X
18:49 PerlJam TimToady: sure, if you want to discourage its use :)
18:50 PerlJam spinclad: no way, that's just as bad.
18:50 Juerd TimToady: As uppercase letters in regexes typically indicate opposites :)
18:50 pmichaud :spacerule
18:50 TimToady we're also trying to coin a term, and sigspace is easy to say.
18:50 Juerd TimToady: And /x was the whitespace-insensitive form :)
18:50 pmichaud or even :sprule
18:50 pmichaud :sprx, :spacerx
18:50 TimToady the whole point is "what is the significance of the space?"
18:51 TimToady I had :sig for a while.
18:51 * pmichaud likes "spacerx".  Could be "spacer x" which sounds like "racer x" which means "Go, Speed Racer!"
18:51 Juerd A problem with sig is that it's easy to confuse with signature
18:51 TimToady that's why it's sigspace now.
18:51 PerlJam :words, :panic, etc have a certain definiteness about them that appeals to me.  I can't think of anything that fits as well to replace :sigspace
18:51 Juerd That reads, to me, as signature space.
18:51 TimToady tough
18:51 PerlJam Juerd: me too
18:51 pmichaud Juerd: then use :s :-)
18:51 TimToady we're coining
18:52 PerlJam :space  (do we have to mention that it's significant?)
18:52 pmichaud pj: looks too much like <space>
18:52 PerlJam :aether then
18:52 Juerd If you want to apply your own rules inconsistently,...
18:52 PerlJam :)
18:52 Juerd :spacey
18:53 Juerd Then you'd have spacey and non-spacey :)
18:53 TimToady yes, the significance of it is what is significant.
18:53 PerlJam Well, I liked :skip (but I'm biased by P::RD)
18:54 TimToady skip says that it *isn't* significant to me...
18:54 pmichaud the point of the adverb is that this says what to do with the metasyntactic whitespace in the regex
18:54 pmichaud and ":skip" doesn't seem to mean that
18:54 PerlJam :metaspace
18:54 TimToady but culturally, the most important thing here is not :mumble, but ss///
18:55 * Juerd was serious about spacey, by the way. If you want to coin, coin well :)
18:55 PerlJam which will, of course, be mistyped as "meatspace
18:55 PerlJam er, :meatspace
18:56 Juerd TimToady: Double-s combinations are probably better avoided, because some people here are very sensitive about it, and would feel offended.
18:56 TimToady we'll know the culture has taken hold when people start correcting things in IRC using ss/// instead of s///
18:56 TimToady that's so last millenium...
18:56 spinclad :meatspace : these spaces have muscle.  you can't just skip over them.
18:56 Juerd SS here has a very strong mental association with Schutzstaffel.
18:56 TimToady yes, well here it means "Sunday School".
18:57 * pmichaud thinks "SS Minnow"
18:57 Juerd I hope Sunday schools aren't as deadly.
18:57 TimToady If we're going to start avoiding taboo words, we've got a lot of other languages to worry about.
18:58 * PerlJam thought none of those things ... just "ss"
18:58 Juerd This isn't lingual.
18:58 Juerd People here don't speak German. That's quite irrelevant when it comes to the WW II.
18:58 PerlJam :snake  (python strikes again!)
18:58 Juerd Most people don't even know what SS stands for, exactly.
18:59 ingy Hi TimToady
18:59 TimToady howdy ingy
18:59 PerlJam Juerd: Secret Service of course
18:59 Juerd I personally have no problem with ss. I know that many people will, though.
19:00 TimToady I never, ever take second-hand offense into account.  "Someone might be offended".  Gah.
19:00 svnbot6 r10300 | Darren_Duncan++ | ChangeLog : updated new release template to be for 6.2.12 rather than 6.28.0 ; brought log notes on my ext/ modules up to date
19:00 Juerd To illustrate: I have once almost lost a freelance job because one of my functions was called "ss", and described as "eliminate whitespace". I had to rename it to trim(), and spent hours defending myself.
19:00 PerlJam How about :interstice  ?   (no one will know what it means  ;)
19:00 pmichaud :intertokenspace
19:00 pmichaud :interspace, the final frontier
19:01 pmichaud (unfortunately, :i is already taken)
19:01 Juerd I can imagine that this is hard to imagine if you're not remembering the victims of this specific war once a year.
19:01 Juerd But I beg you to be careful.
19:01 PerlJam pmichaud: is it law that the abbreviated form must use the first char of the long form?
19:01 Juerd I'm not requesting change, but I do want you to be aware of this possible problem.
19:02 pmichaud pj: I'm not the law, I'm the maintenance crew
19:02 pmichaud :-)
19:02 PerlJam Juerd: you think perl6 will be boycotted because of such misunderstanding?
19:03 Juerd PerlJam: Not by most. But by some older, more sensitive people, it probably will.
19:03 PerlJam Juerd: excellent! perl6 is the 50 or 100 year language, so those older people will be dead for the majority of its lifetime.
19:03 Juerd Another illustration: contact/dating site CU2, www.cu2.nl, is often plagued by neo-nazis who sneak "SS" into words (like "rechtSS" or "maSSel") as a sign of recognition.
19:04 Juerd It runs a script (I won't name its internal name, but it's funny) to find these, and correct them.
19:04 TimToady good reason to steal the meme, as far as I'm concerned.  avoiding it merely propagates the specialness.
19:04 dduncan left perl6
19:05 cognominal ho ss is not securte sociale? :)
19:05 Juerd TimToady: I can certainly understand that, and think it may be a wise idea.
19:05 Juerd I'm just afraid that some others won't.
19:05 PerlJam :stitches almost works :)
19:05 spinclad Juerd: this suggests that 'SS' carries heavier baggage than 'ss'
19:06 TimToady I think the emphasis was Juerd's
19:06 Juerd spinclad: It's capitalized in those words because otherwise they would be rather normal words.
19:06 Juerd TimToady: It wasn't.
19:06 spinclad so they capitalize them and so spot each other..
19:07 Juerd Though indeed, since this script, they've been using rechtss and massel without further caps. Doesn't work as well, though.
19:07 TimToady so we'll just make the SS// illegal.  :)
19:07 FB|afk is now known as FurnaceBoy
19:07 Juerd spinclad: Yes. There are many more signs and symbols, though. I've worked with CU2 for quite a while, so I know them.
19:08 Juerd spinclad: There's 14/88, for example, or just 88 by itself. People who have 88 in their nickname, but weren't born in 1988, get their accounts disabled as a precaution.
19:08 spinclad of course... like '42' and '93' among the 0.:.T.:.O.:.
19:08 Juerd spinclad: And there are many symbols that can be used in images - the swastika is popular, but there are much more subtle ones.
19:09 Odin-LAP Hail victory. :p
19:09 Juerd 88 stands for HH, which stands for Heil Hitler...
19:09 PerlJam Juerd: I am *so* glad I don't have to deal with such paranoia (among other things)
19:09 Juerd 14 stands for some racist phrase.
19:09 Juerd PerlJam: I wish it were paranoia.
19:09 Odin-LAP No, instead you get paranoia about other things.
19:09 Odin-LAP "U.S.? Doing bad things? IMPOSSIBLE!"
19:09 Juerd ("14" because the phrase has 14 words.)
19:09 Odin-LAP :p
19:09 flounder99 left perl6
19:10 Odin-LAP Juerd: Wow. I knew neonazis were silly ... but that silly?
19:10 Juerd For those interestedd about "hate symbols", there's this site: http://www.adl.org/hate_symbols/default.asp
19:10 PerlJam Odin-LAP: I'm accustomed to the idea that the US government isn't the most trustworthy entity
19:10 * pmichaud wonders about the hidden meanings of 'i18n' :-)
19:11 Juerd Oh, this site reminds me of another much used one: wpww, or just wp (White Power World Wide)
19:11 Odin-LAP PerlJam: Oh, I wasn't implying you were one of those people. ;)
19:11 Juerd Or s/Power/Pride/, as this site says
19:11 Odin-LAP PerlJam: It just seems to be a fairly influential mentality, much like the nazihatred is in europe...
19:12 spinclad paranoia (real paranoia, shared) in the heightened significance and conspiratorial thinking these people share and foster
19:12 PerlJam Odin-LAP: the world is full of stupid people.  :)
19:12 Juerd spinclad: s/in/is/?
19:13 spinclad no, s/ in/, in/... trying to say how the term could apply
19:13 Juerd Oh
19:13 Odin-LAP PerlJam: Yes and no. The world is full of people who don't really want to think about things that are uncomfortable.
19:14 Juerd Gotta go
19:14 Juerd Bye
19:14 Juerd Oh, not before I spam this again: http://tnx.nl/php.jpg
19:14 Juerd afk
19:15 spinclad the world is full of the hunger and thirst after certainty
19:15 SamB joined perl6
19:15 spinclad such a great misleader
19:16 spinclad yeah, that was priceless
19:17 Odin-LAP The 'V for Vendetta' broadcast monologue is really good in that respect. "You need only look in a mirror." (Even better in the comic, actually. :)
19:24 r0nny joined perl6
19:41 sbkhh joined perl6
19:42 sbkhh is now known as Odin-LAP
19:42 spinclad BTW, the s(m:w)(ms) change in S05 has broken a number of ASCII-art alignments (not that they matter for any canonical meaning, of course, but for the commentary)
19:47 bernhard joined perl6
20:19 ruz joined perl6
20:39 TimToady spinclad: ms can still be written m:s, so the alignment is the same.  Admittedly the symmetries change.
20:47 particle_ :significantother
20:47 TimToady so///   :)
20:47 * particle_ idly wonders if ~~ with match with regexes, rules, or tokens
20:54 TimToady ~~ will match anything it can figure out how to match.
20:55 particle_ *insert david blane stunt here*
20:56 TimToady In fact, I was just thinking that $x ~~ $boolean should probably evaluate $x in a boolean context and then compare.
20:56 particle_ i just had that same thought
20:57 TimToady I had it earlier today in the shower...
20:57 TimToady but didn't have a toothbrush handy.
20:57 TimToady (nor a laptop)
20:57 particle_ now there's a product for thinkgeek.
20:58 particle_ "do your best thinking in the shower, but don't have a laptop with wifi to tell the world?..."
20:58 TimToady "so buy this toothbrush for $22"
20:59 pmichaud a wifi toothbrush?
20:59 FurnaceBoy """_________
20:59 pmichaud that ought to be an operator
20:59 TimToady m:w_________
20:59 particle_ that's mouthwash
20:59 pmichaud postfix:<"""_______>
20:59 TimToady WWW______
21:00 pmichaud takes the place of Acme::Bleach
21:00 TimToady ________""" prefix for lefthanders
21:00 particle_ i always wanted left-handed c++ comments
21:00 particle_ comment here \\ i++;
21:01 TimToady add one to i \\ I++
21:01 TimToady *i even
21:01 TimToady { here's a left-handed Perl comment }# $i++;
21:01 particle_ perhaps there should be a ()# operator for r-to-l languages
21:02 particle_ yep
21:02 TimToady It's disturbing how disturbed we both are...
21:02 particle_ :ecapsgis
21:02 TimToady surely ecapsgis:
21:03 particle_ of course!
21:03 TimToady !esruoc fo
21:03 davidfetter left perl6
21:03 TimToady The main problem is that people will think $x! means $x not.
21:03 * FurnaceBoy averts his eyes
21:04 pmichaud wouldn't that be x$! ?
21:04 TimToady yes, but people get confused easily.
21:04 particle_ perl6 is an expressive language. we should have smiley adverbs
21:05 TimToady that's just a SMOMP
21:05 pmichaud particle:  we can do it in regex already:  to match two hyphens:    / (-: :-)
21:05 pmichaud /
21:06 TimToady that also matces 14:05 < pmichaud> on my machine...
21:06 TimToady *matches
21:06 particle_ ah, masochistic programming
21:09 particle_ of course, they should be classified as whitespace so you don't have to say :skip(<smileys>)
21:09 TimToady :P
21:09 TimToady which is already legal
21:10 particle_ :-O
21:12 TimToady ᛊ:᚜
21:13 TimToady I suppose $x ~~ :!2 would match if $x isn't base two...
21:14 particle_ can any integer radix be specified in adverbial form?
21:14 pmichaud particle_: yes
21:14 particle_ or should i say any positive integer
21:14 particle_ :0
21:14 pmichaud :13<012abc>
21:15 TimToady hmm  :16<$x> := 255; say $x;  # ff
21:15 particle_ pm: that's my lucky radix!
21:15 TimToady I guess that'd have to be :16($x) := 255;
21:16 particle_ could it be my $Int :16($x) := 255; ??
21:16 TimToady my sub sayhex (:16($n)) { say $n }
21:16 particle_ oops, too many $s
21:17 particle_ can a sub body introspectively see the adverbs  passed it?
21:17 TimToady no, cause an Int can't hold alphas
21:17 TimToady eh, they're just name params
21:17 TimToady *named
21:17 larsen joined perl6
21:17 particle_ 's not an alpha, it's radix 16
21:17 TimToady the point is, it would do inside out radix conversion
21:18 TimToady when used as lvalue
21:18 TimToady or binding
21:18 particle_ righty-ho. that's cool.
21:18 obra seen nothingmuch
21:19 particle_ hrmm, so there's no Hex, Oct, Bin, or Dec base classes
21:19 particle_ just noticing
21:19 TimToady Nope, those are just strings
21:20 ruoso joined perl6
21:20 TimToady one could put a constraint on a string type, of course
21:20 particle_ :0x10<ff> # legal?
21:20 TimToady subset Oct of Str where /^[0-7]+$/;
21:21 TimToady particle_: not legal
21:21 pmichaud particle: no, not legal, sorry :-)
21:21 particle_ good.
21:21 pmichaud the adverb is always taken as decimal
21:22 TimToady though, oddly, :0x is probably a legal adverb on a s////
21:22 TimToady meaning do it 0 times.
21:23 TimToady which is just as well considering the extra slash...
21:23 particle_ and a radix must be a literal, not something that evaluates to a positive integer
21:24 xinming joined perl6
21:24 particle_ token radix { : <[0..9]+ } # ...in other words
21:25 pmichaud probably   token radix { \: \d+ }
21:26 particle_ hrmm... are underscores accepted?
21:26 pmichaud hopefully not in the adverb radix itself
21:26 particle_ that's what i'm wondering
21:26 nnunley joined perl6
21:26 TimToady It seems unnecessary.
21:27 particle_ great. then pm's got it right
21:28 TimToady unless it's token radix { \: <[1-9]> \d* }
21:28 particle_ yep, gotta rule out :0
21:29 TimToady well, unless it's a semantic constraint, in which case :016<ff> is okay
21:29 particle_ oh, what about >36?
21:29 pmichaud :100[64,27]
21:29 TimToady or :100<64 27>
21:29 particle_ ah, see that.
21:30 ruz_ joined perl6
21:30 TimToady I was actually pretty serious about the reverse radix processing, since we don't seem to have anything but sprintf so far.
21:30 particle_ i like it.
21:30 pmichaud I was afraid of that :-)
21:30 TimToady and that doesn't support non b o d x
21:30 doubtm joined perl6
21:30 particle_ parse error
21:31 TimToady yeah, I can see why, pmichaud.
21:31 TimToady after all, next thing is
21:31 doubtm hi, what is the advantage of using a perl script over a simple bash script to create a zip/tar file?
21:31 TimToady :16( .* ) /
21:31 TimToady s/^/\//
21:32 TimToady hmm.  $x.as(:13)
21:33 pmichaud I'm not sure about parsing that :13
21:33 TimToady just means :13(*)  :)
21:33 pmichaud now, $x.as(13) works for me :-)
21:34 TimToady either that, or it defaults to $_  :)
21:34 TimToady Except that a value used as a subset would have to convert the number to 13.
21:34 TimToady rather than base 13.
21:34 pmichaud I need to check up on "as" :-)
21:35 TimToady and would likely fail for values of 13 that aren't 13.
21:35 TimToady .as(Type)
21:36 TimToady doubless .as() should convert to the base type, and then see if the constraint holds if it's a subset.
21:36 TimToady and presumably become undef or pitch a fit if not.
21:36 TimToady $x.as(Odd)
21:37 TimToady If :13 is a type, then we get subset Base13 of Str where :13
21:38 SamB joined perl6
21:38 azurot1 joined perl6
21:38 Southen joined perl6
21:38 TimToady except then :13($x) is really inside out in the same way that hex() was.
21:39 particle_ integer adverbs doesn't smell right to me
21:40 TimToady they aren't really adverbs--we just hijacked the syntax.
21:40 particle_ with a quoted literal next to it, it looks like a radix. without it...
21:40 TimToady so smiley adverbs don't have to be real adverbs either.
21:40 particle_ sold! :)
21:41 particle_ smiley adverbs have a different idea of negation.
21:41 svnbot6 r10301 | gaal++ | * use CompUnit type for compilation serialization. For now
21:41 svnbot6 r10301 | gaal++ |   this doesn't buy us much except future-compatibility (or,
21:41 svnbot6 r10301 | gaal++ |   well, resilience); the new structure has a version field.
21:41 svnbot6 r10301 | gaal++ |   Please 'rm blib6/lib/Prelude.pm.yml' once after updating.
21:41 particle_ :) and :-) mean the same thing, and :( is the opposite of :)
21:44 gaal you realize of course that if :-) makes  it into the language }:) must as well.
21:44 TimToady my eyebrows ache
21:45 particle_ 0:-)
21:45 gaal those are antlers
21:47 * particle_ wonders which version of unicode will include the full smiley library
21:47 Ymmv joined perl6
21:48 gaal are there enough code points?
21:48 * gaal saw a work by Bill Viola last week that had hella many human expressions in it
21:49 TimToady $x.as("%:13s") maybe?
21:50 TimToady $x.:13 maybe?  Hmm...
21:52 jsiracusa joined perl6
21:53 pmichaud as("%:13s") works for me.  Or even just as("%:13"), unless %: means something else already
21:53 pmichaud or even  as('%13:')
21:53 pmichaud oh wait, nm
21:53 pmichaud that's bad
21:54 pmichaud back to as('%:13')
21:55 azurot1 joined perl6
21:55 Southen joined perl6
21:56 particle_ is r used in sprintf? could be used for radix...
21:56 particle_ looks like it's not.
21:58 SamB joined perl6
21:59 gaal gotta go, night&
22:04 particle_ printf '<%:13d>', 13;  # prints "<10>"
22:04 particle_ like that?
22:04 pmichaud why the 'd'?
22:05 particle_ good question
22:05 pmichaud printf '<%:13d>', 12;   # prints "<c>"
22:05 particle_ i suppose you'd like to specify whether it's printing in the <64 43 23> mode
22:05 particle_ or in the <zfb> mode
22:05 pmichaud or we limit ourselves to radix <= 36
22:06 pmichaud or we assume that radix > 36 means print as a list
22:07 particle_ then, suppose you want to print your list with or without leading zeroes
22:07 particle_ 34 1 20 vs 34 01 20
22:07 pmichaud that'd be  <%02:13d>
22:07 pmichaud or whatever
22:07 pmichaud i.e., the leading zero and width flags still go before the ':'
22:07 particle_ printf uses # for some formatting like that
22:08 particle_ so, maybe %#:13
22:08 pmichaud what does the # means there?
22:08 pmichaud ah, I see
22:08 pmichaud (man 3 printf works :-)
22:08 particle_ # prefixes non-zero octtal with "0", non-zero hex with "0x"
22:08 leo the whole :radix thingy should just die (my 2c) - a number conversion method is enough
22:10 leo and ':' seems already to be overloaded like hell
22:12 particle_ hrmm, does parrot have generalized base conversion yet? i don't think so.
22:12 pmichaud no, it doesn't
22:12 leo sure it has
22:16 leo int_to_str(Interp *interpreter, char *tc, HUGEINTVAL num, char base)
22:16 pmichaud what about going the other way?  that's the one I've needed
22:16 pmichaud (and is it exposed at the PIR level?)
22:17 leo the usual escapes, but for sure not :13 ;-)
22:17 leo (who really needs that)
22:19 particle_ huffman coders
22:19 pmichaud time to go pick up the kids
22:19 pmichaud later, all
22:19 leo re PIR level - invent some general sprintf syntax or whatever
22:20 pmichaud oh, that works.  I vote for "%:13d".   :-PPPP
22:20 particle_ :)
22:20 particle_ pmichaud punts
22:20 leo that's fine
22:36 froh-doh joined perl6
22:50 spinclad ::8<020><deadbeef>  # hex
22:51 TimToady no.
22:51 spinclad so what is :16<10> ?  is that a single digit with value 10 (0xa) or 0x10?  or do the decimal-string digits only take effect at :37 ?
22:51 spinclad TimToady: i was meaning the art in S05 itself, where the actual choice matters more than the potential...
22:51 spinclad (and finally...) S03 r9202: 'but do for allow an additional dot before the "hyper"': ss((for) (allow))($1 $0)
22:52 * spinclad 's done backlogging
22:52 ludan joined perl6
22:52 ludan hi
22:53 TimToady howdy
22:53 spinclad re deadbeef: didn't think so, really
22:54 spinclad (scuse the spam)
22:54 spinclad hi, ludan
22:54 TimToady ah, understand "the art" now
22:55 MementoMori joined perl6
22:55 TimToady :16<10> would always be taken as 0x10
22:56 TimToady :37 seems too high
22:56 Spire joined perl6
22:56 TimToady I'd be inclined to say that only the multi-arg form :16<10 10> would take 10 as decimal.
22:57 TimToady probably clearer to write :16[10,10] in that case though.
22:57 MementoMori left perl6
22:57 spinclad true
22:57 TimToady and degenerates to :16[10] as a decimal 10
22:58 TimToady and isn't really any longer, so maybe :16<10 10> is just a bad idea.
22:59 TimToady Actually, from me, that Bad Idea™
23:00 spinclad yeah, i'd rather avoid ambiguity where possible.  nice to wing the blue sky, nice to stay grounded too.
23:02 FurnaceBoy joined perl6
23:03 TimToady arguably :16<10 10> could usefully mean (:16<10>, :16<10>)
23:03 spinclad i'd be inclined to insist on :16<dead_beef> * 16**8, as well, and keep a bare number inside the < >s
23:04 TimToady :16($x)
23:05 TimToady trying to avoid eval(=$*IN) here...
23:05 spinclad .oO{ :to16, :from16 would be clearer but too huffman heavy }
23:06 TimToady yeah, usually when you want a base representation, you want a lot of them.
23:06 leo Perl6 without :\d+ is like a fish w/o a bycycle
23:07 webmind leo, it won't be missed but would look really cool ?
23:08 TimToady I saw a frog on a bicycle once...
23:08 spinclad ah! ding!  now i see -- :<base> is a multi-adverb -- signatures String --> Int (and Array of String --> Int) and Int --> String
23:09 * spinclad begins to hate it less
23:10 TimToady according to Darwin, we're fish that have learned to ride bicycles...
23:10 TimToady Perl6 is just trying to hurry evolution along a little...
23:10 spinclad because they just happened to be lying around, left by some designer...
23:11 Limbic_Region joined perl6
23:11 TimToady I'm not against Intelligent Design in the abstract, but I happen to think that the intelligent way to design a biological system happens to coincide mostly with Darwin's ideas.
23:12 TimToady if Someone wanted to hurry it up with a snap of the fingers, I've got no problem with that.
23:12 TimToady but I don't think He did.
23:12 spinclad agree -- it's the principle of Least Effort on the part of the Universe
23:13 spinclad just Let Things Happen
23:13 FurnaceBoy Occam's Razor?
23:13 TimToady save the intelligent design for the important bits, like salvation.  :)
23:14 spinclad i think Occam's Razor is Least Effort in theorizing; i was thinking of the world's physics, not that of our minds
23:15 szbalint I find it interesting that some people believing in ID exclude the possibility that evolution could have been/is the Intelligent Designer's tool...
23:15 TimToady most people who "believe" in ID are just cheerleading, but most people who believe in most anything are just cheerleading.
23:16 spinclad so for :<base>[n, n, n], does :<base>(@array) work too?  is its signature  Array of Int --> Int ?
23:16 TimToady mostly people actually define their religion by whatever seems convenient at the time.
23:16 FurnaceBoy amen...
23:17 TimToady I don't think so.  :<base>[@array] works fine for that.
23:17 szbalint not only their religion.
23:18 TimToady and I'd rather reserve :base(@array) for lists of numbers, I think.
23:19 TimToady we don't really have a way to "hyper" the args of a function other than using lists.
23:23 Quell joined perl6
23:25 spinclad hmm.  so how do i discriminate the multi?  i seem to see signatures of (Array of Int --> Int) and (Array of String --> Array of Int), at a stage where the parser could take \d+ as either a String for the base or a decimal Int...
23:28 spinclad is :<base>[1, 2, 3] always a list of digits, and :<base>[@array] also, and ... what is :<base>(@array) ?
23:30 spinclad s/ is / is [1, 2, 3] in /
23:32 spinclad .oO{  :16.«@array  }
23:32 Ymmv joined perl6
23:33 spinclad (Array of Int --> Int) and (Array of Int --> Array of String) ?
23:38 spinclad anyway, time to make dinner... *wave*
23:39 spinclad and thanks
23:46 nothingmuch does anybody have Javascript::Spidermonkey working on OSX?
23:48 stevan joined perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs