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