Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-09-13

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Limbic_Region heh
00:00 Limbic_Region have you seen it?
00:00 TimToady there's little about the Female Brain that cannot be explained by having to keep 5 kids from being eaten simultaneously with feeding them
00:01 TimToady nope, just shooting my mouth off, as usual
00:02 TimToady the Male Brain, on the other hand, had better concentrate on one Wooly Mammoth at a time
00:02 Limbic_Region when I was in high school, my non-fiction to fiction ratio was about 10:1 but it is now a lot closer to 3:1
00:03 TimToady most of my non-fiction is magazines these days
00:03 * Limbic_Region recently finished reading a fantasy book by Raymond Feist
00:03 rakudo_svn r31046 | jonathan++ | [rakudo] Switch us over to using Perl6MultiSub for all user-generated code (so this excludes operators, but includes any code that users write). All tests that passed before continue to pass. This patch includes several changes that we may want to revisit. (1) Hack in ACCEPTS
00:03 rakudo_svn ..so Any always type-checks against anything other than Junction and Object type-checks against anything, whether or not they actually inherit from it. (2) Test.pm gets Object rather than Any on its multis; this may or may not be the Right Thing. (3) Because Parrot doesn't yet give us a way to
00:03 rakudo_svn ..type-map MultiSub, and because we're not using .HLL yet anyway, we need to do a workaround in a block's loadinit.
00:03 TimToady Currently reading Pirate Freedom by Gene Wolfe
00:04 TimToady before that, Jhegalla by Steven Brust
00:05 TimToady before that, the Tough Guide to Fantasy, arguably non-fiction :)
00:05 TimToady (by Diana Wynne Jones)
00:06 TimToady but the more fantasy you've read, the funnier the book is
00:06 * Limbic_Region will have to look it up
00:07 Limbic_Region I am not much of a fiction fan but I was cautioned to balance my diet in that regard
00:07 Limbic_Region I really am not into sci-fi - I have read a few of Asimov's foundation series
00:07 Limbic_Region I like children's fantasy mostly
00:08 Limbic_Region s/children/young adult/children/
00:11 TimToady well, Bujold is still my favorite author, and she's a bit hard to classify, even when writing "sci-fi" or "fantasy"
00:12 TimToady she really tends to write somewhere at the intersection of romance and anthropological fiction
00:14 TimToady well, generally closer to the latter
00:14 Limbic_Region well, I would have to say that Feist is my favorite author in the Fantasy genre but that's probably because I haven't sampled more than 2 or 3 other authors
00:15 TimToady I am not familiar with Feist
00:15 Limbic_Region Riftwar Saga is probably his best known series
00:18 Limbic_Region I read a trilogy by Jude Fisher but wasn't impressed
00:18 TimToady anyway, I just don't know anyone who's better at mixing levity with gravity than Bujold
00:19 Limbic_Region I have already bookmarked
00:19 TimToady if you want other recommendations, my wife knows the field and can usually predict what else you'd like from what you've liked so far
00:19 TimToady especially if you can figure out why you liked it
00:21 TimToady or why you didn't like the other stuff :)
00:21 Limbic_Region is she Gloria at your surname or should I email you to pass on?
00:21 TimToady got it in one
00:22 TimToady and she'd be delighted to advise you
00:22 Limbic_Region my wife seems to enjoy the same fantasy books as me which is great since we don't have any other genres in common
00:22 Limbic_Region so having a wider variety would be greate
00:22 Limbic_Region will send an email some time soonish
00:23 TimToady Bujold falls into the category of book that we read out loud to each other
00:23 Limbic_Region ah, what it would be like not to have young kids around </jealousy>
00:23 TimToady but she reads pretty much anything except horror
00:24 TimToady well, some of Bujold we don't read to kids until they grow up :)
00:24 Limbic_Region I read "The Bad Place" by Dean Koontz back in 7th or 8th grade and I thought it was good but never read anything else from him
00:24 Limbic_Region of course, that wasn't much of a horror which apparently he went on to write
00:24 TimToady 'bout to start in with Lewis and my son-in-law Sean, who (with Geneva) are staying with us
00:24 mncharity joined #perl6
00:25 Limbic_Region I just loaned a 10 year old The Magician's Nephew
00:25 Limbic_Region as well as A Wrinkle In Time and Bridge To Terebithia
00:25 TimToady don't know that last one
00:25 Limbic_Region told her if she liked them I had more
00:25 Limbic_Region They recently made it into a Hollywood Movie
00:26 Limbic_Region http://en.wikipedia.org/wiki/​Bridge_to_Terabithia_(novel)
00:26 lambdabot Title: Bridge to Terabithia (novel - Wikipedia, the free encyclopedia
00:26 TimToady but when I think of a Wrinkle in Time, I think of all these little Python programmers coming out of their identical houses and bouncing their balls in unison. :)
00:26 Limbic_Region heh
00:26 mncharity hi all
00:26 * Limbic_Region laughs
00:26 Limbic_Region salutations mncharity
00:27 mncharity TimToady: it seems the current gimme5 of 'say 3' doesn't seem to include "say" in the resulting AST?
00:27 * Limbic_Region halts the book conversation for something a bit more on topic
00:28 * mncharity thinks "not on my account I hope..."
00:29 TimToady most tokens are not named
00:29 TimToady they're implicit in the _from/_to
00:30 TimToady when you say gimme5, do you mean STD?
00:31 PZt joined #perl6
00:31 mncharity I see a term 'say(3)' with sym identifier and args.  nothing saying 0-3.
00:31 mncharity re STD, yes.
00:32 TimToady yes, it doesn't appear to capture that at the moment
00:33 TimToady though one node has the 0 and another node has the 3 for the beginning of the args
00:33 TimToady but it's not generating an AST yet in any case, just a parse tree
00:34 kanru joined #perl6
00:35 mncharity The second thing I noticed trying to get STD_blue and elf to 'say 3' was that the match nodes don't record what rules generated them.  So one is in hairy guessing land.  "well, my parent called me "foo" (and my grandparent called my parent "bar"), and I've a field "zig" but no field "zog", so I hypothesize I'm a match for rule X branch Q".  explicit tagging makes life so much easier.
00:36 TimToady oh, I see what happened.  I snarfed off the identifier into $i so I could feed it to another routine, so it didn't capture under $<identifier>
00:37 mncharity re AST vs parse tree, sigh, nomenclature.  I meant "the output of gimme5/STD.pm currently makes it non-trivial to pick out the identifier name 'say' when parsing 'say 3'.
00:37 mncharity re $i, *nod*
00:38 TimToady the problem with labelling nodes with rules is that you have to deal with derived grammars and such, if you want a complete name, and the derived grammars are often, in fact, anonymous
00:38 TimToady but it'd be easy to tag with a short name of some sort
00:39 TimToady you just might not know which grammar's version of that rule matched
00:39 mncharity that would be great.
00:40 TimToady and I didn't want to put hard links all over the place because that slows yaml way down
00:41 TimToady and, by and large, when I wanted to deal with context, I used a context var.  :)
00:43 TimToady and also, presumably some of this processing would be done by reduction closures in a real grammar to make real AST nodes
00:43 charsbar joined #perl6
00:43 TimToady that's what parrot does, anyway, and it seems to work for them
00:44 [particle] reduce, reuse, recycle. that's our motto!
00:44 TimToady still working on duce, use, cycle first...
00:46 mncharity re reduction closures... sigh... I still haven't seen a good story for combining actions with grammars.  mixing actions into grammars is a major maintenance problem, and severely interferes with grammar extensibility and repurposing.
00:47 TimToady that's why we have {*} stubs
00:47 TimToady so we can keep the actions out of the grammar
00:48 mncharity yare put the (post-match) actions in separate methods in the grammar, linked by a naming convention.  so grammar and actions could evolve separately.
00:48 mncharity re {*}, nod.
00:49 mncharity but for Grammar's in general, my impression is we are still in need of a better story.
00:51 TimToady being called to dinner &
00:51 mncharity oh, btw, third observation - the current gimme5/STD provides rx:P5/a+b.../ rx literals as unparsed strings.  It would be nice to have a p5 re grammar too.
00:51 mncharity re dinner, ok, thx.
00:51 TimToady yes, need to do same thing I did for internal rx/ :P5 a+b.../
00:52 TimToady which does parse as p5 regex
00:52 TimToady (as of a few days ago)
00:52 TimToady the external :P5 is just a fossil
00:52 TimToady see P5Regex class
00:52 TimToady decommuting &
00:55 mncharity ah, interesting.
01:01 pugs_svn r22233 | putter++ | [elf] Permit easier replacement of the AST->IR step.
01:01 pugs_svn r22233 | putter++ | Also misc additions.  run-tests.result updated, but unexamined.
01:02 charsbar_ joined #perl6
01:04 pugs_svn r22234 | putter++ | [STD_blue] Set up for development.
01:04 pugs_svn r22234 | putter++ | STD_blue_run now parses for an elf_g derivative.
01:04 pugs_svn r22234 | putter++ | -e 'say 3' is close to working.
01:05 ruoso joined #perl6
01:20 pugs_svn r22235 | putter++ | [rx_on_re] Continued refactoring yare's Regexp_ModuleA, towards creating
01:20 pugs_svn r22235 | putter++ | elf's rx/re IR nodes and analysis, and p5 runtime engine.
01:20 pugs_svn r22235 | putter++ | One t_baseline.result case was changed from "Match failed" to compilation
01:20 pugs_svn r22235 | putter++ | failure.  It was a "we are completely incapable of handling this" case, and
01:20 pugs_svn r22235 | putter++ | thus only a change of symptom.
01:21 mncharity I was without net connectivity for a bit, and elf was one of the few things I could work on. :)
01:22 mncharity g'night all.
01:38 Maghnus joined #perl6
01:44 a-jing joined #perl6
01:44 a-jing left #perl6
02:05 hercynium joined #perl6
02:17 s1n moritz_: you're killin me
02:31 s1n anyone have any idea what's up with the ====='s in the spectest_regression?
02:31 s1n makes it damn annoying to log the test to a file
02:32 kanru joined #perl6
03:01 s1n hello, anyone alive?
03:02 elmex_ joined #perl6
03:07 meppl joined #perl6
03:09 charsbar joined #perl6
03:19 ewilhelm sin ==== in the test output?
03:20 ewilhelm is that the parallel progress bar?
03:23 ewilhelm I think moritz_ was enabling that with jobs=3, so you need jobs=1 ?
03:23 meppl good night
03:27 s1n ewilhelm: i'm not using a jobs value
03:27 s1n and yes it's in test output
03:27 s1n it's running the test with "--jobs" only
03:28 ewilhelm sin, yeah I saw that in the patch, but not sure why it is just --jobs
03:28 ewilhelm updating my svn now...
03:29 s1n ewilhelm: do you know what revision he added that?
03:30 ewilhelm last 48 hrs?
03:30 s1n heh, that's a ton of commits
03:30 s1n did he commit to parrot or pugs?
03:31 ewilhelm parrot 30985
03:32 * ewilhelm hopes they put make ... JOBS=n support in that, but apparently not
03:35 s1n ewilhelm: looking at patching this now
03:36 ewilhelm s1n, yeah, you need something like this in MAKEFILE:
03:36 ewilhelm TEST_JOBS = 3
03:36 ewilhelm HARNESS_WITH_FUDGE_JOBS = $(HARNESS_WITH_FUDGE) --jobs $(TEST_JOBS)
03:37 s1n ewilhelm: yeah, that's what i was thinking
03:37 ewilhelm then you can make spectest_regression TEST_JOBS=1
03:37 ewilhelm have to put that in root.in though IIRC
03:45 Jedai joined #perl6
03:49 s1n anyone good at writing makefiles?
03:50 s1n or shell scripting for that matter
03:51 ewilhelm s1n, what's the question?
03:52 s1n i'm trying to write a test for a variable definition
03:52 ewilhelm for TEST_JOBS?
03:52 s1n yeah
03:53 ewilhelm I think don't - t/harness has a Getopt::Long spec of :3
03:53 s1n if [ ! $TEST_JOBS ] ; then TEST_JOBS=1 fi
03:53 ewilhelm which is why '--jobs ' with no arg is working
03:53 s1n yeah but i'm trying to make it so the user can specify the number of jobs
03:54 s1n i.e. we may not all want the default
03:54 ewilhelm well, I said it should be one, but take that up with moritz and schwern
03:56 ewilhelm but I think you can just put the var in and it will be either nil or not
03:56 s1n well, i just want to have this test for TEST_JOBS define
03:57 ewilhelm the defined-or is in the perl code already in t/harness
03:57 ewilhelm patch in a sec...
03:57 s1n wait
03:58 s1n i'm looking to add this to the makefile, what are you doing?
03:58 ewilhelm http://scratchcomputing.com/tmp/root.in.patch
03:59 ewilhelm just that.  so `make spectest_regression TEST_JOBS=1` and `make spectest_regression` both work
03:59 s1n ewilhelm: okay, but if TEST_JOBS is not defined, will --jobs= still work?
03:59 ewilhelm that is, without TEST_JOBS defined, you get 3 via the Getopt spec it t/harness
04:00 s1n oh, it defaults in the harness...
04:00 s1n ok
04:00 ewilhelm right
04:00 s1n you or i want to submit this patch (i lack commit access)
04:00 ewilhelm not that I think that's a sensible default for the first roll-out, but at least it should have a knob! right?
04:00 ewilhelm moritz_, ping?
04:01 ewilhelm s1n, I guess I will parrotbug it
04:01 s1n ewilhelm: it's better than what's currently there
04:01 s1n i could parrotbug it for you if you want
04:01 ewilhelm or is it rakudobug ?
04:02 s1n well, does all of parrot default to 3?
04:02 ewilhelm s1n, ok, I leave the patch in your hands
04:02 ewilhelm parrot default=1
04:03 s1n then it's a rakudobug, where does parrot set that?
04:03 ewilhelm it's got no global setting because long painful story
04:03 ewilhelm parrot's default is in $parrot/t/harness
04:04 s1n $ENV{TEST_JOBS} || 1
04:05 ewilhelm and just reads the $ENV{TEST_JOBS} directly
04:05 ewilhelm yeah
04:05 s1n why does that not work with rakudo?
04:05 ewilhelm because /me was only a backseat driver on schwern's patch?
04:05 rakudo_svn r31049 | tene++ | [rakudo]
04:05 rakudo_svn r31049 | tene++ | * First draft of gather/take
04:05 s1n okay but how does rakudo overwrite that?
04:06 s1n i.e. where does the 3 come from?
04:06 s1n ahh, it does actually use it
04:06 ewilhelm everyone has their own t/harness
04:07 ewilhelm so in perl6/t/harness you have the GetOptions ... 'jobs:3'
04:09 Jedai joined #perl6
04:14 s1n ewilhelm: okay, doing the TEST_JOBS thing seems to work best
04:37 Alias_ joined #perl6
05:13 alester_ joined #perl6
05:13 ashizawa joined #perl6
05:13 lumi joined #perl6
05:16 ashizawa_ joined #perl6
05:23 Psyche^ joined #perl6
06:54 smg joined #perl6
07:40 |jedai| joined #perl6
07:58 Myoma joined #PERL6
08:02 pmurias joined #perl6
08:02 pmurias ruoso: hi
08:03 pmurias ruoso: what do you think of putting contexts of till they are fully specced and using item context everywhere for now?
08:28 hercynium joined #perl6
08:33 iblechbot joined #perl6
08:49 |jedai| joined #perl6
09:20 pmurias ruoso: actually i would go for having only item rw and item ro contexts for now :($ is rw) and :($ is ro)
09:48 sri_work joined #perl6
10:16 masak joined #perl6
10:29 masak perl6: my $b := &say; $b(5)
10:29 p6eval elf 22235: OUTPUT[/home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤     from /home/evalenv/pugs/misc/elf/elf​_f_src/STD_red/match.rb:140:in `each'␤       from
10:29 p6eval ../home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.r...
10:29 p6eval ..pugs, rakudo 31066: OUTPUT[5␤]
10:29 masak perl6: my &b := &say; b(5)
10:29 p6eval elf 22235: OUTPUT[/home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤     from /home/evalenv/pugs/misc/elf/elf​_f_src/STD_red/match.rb:140:in `each'␤       from
10:29 p6eval ../home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.r...
10:29 p6eval ..pugs, rakudo 31066: OUTPUT[5␤]
10:30 masak perl6: my &b := &say; &b(5)
10:30 p6eval rakudo 31066: OUTPUT[Lexical 'b' not found␤current instr.: '_block11' pc 21 (EVAL_13:16)␤]
10:30 p6eval ..elf 22235: OUTPUT[/home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤     from /home/evalenv/pugs/misc/elf/elf​_f_src/STD_red/match.rb:140:in `each'␤       from
10:30 p6eval ../home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.r...
10:30 p6eval ..pugs: OUTPUT[5␤]
10:30 masak that last one, is it supposed to work (as it does in Pugs)?
10:30 masak I find nothing in the synopses about this.
10:32 sri_work_ joined #perl6
10:33 masak also, should this work?
10:33 masak perl6: sub a(&b) { &b(5) }; a(&say)
10:34 p6eval rakudo 31066: OUTPUT[invoke() not implemented in class 'Undef'␤current instr.: 'a' pc 145 (EVAL_15:67)␤]
10:34 p6eval ..elf 22235: OUTPUT[/home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤     from /home/evalenv/pugs/misc/elf/elf​_f_src/STD_red/match.rb:140:in `each'␤       from
10:34 p6eval ../home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.r...
10:34 p6eval ..pugs: OUTPUT[5␤]
10:43 ashizawa joined #perl6
10:56 masak if I don't declare an attribute as "is rw", it should still be changeable from within methods in the class itself, right?
10:57 masak perl6: class A { has %.h; method a() { %.h = {}; } }; A.new.a
10:57 p6eval rakudo 31067: OUTPUT[Cannot morph a Perl6Scalar.␤current instr.: 'parrot;A;a' pc 215 (EVAL_14:87)␤]
10:57 p6eval ..pugs: RESULT[\()]
10:57 p6eval ..elf 22235: OUTPUT[Can't locate object method "h_h" via package "A" at (eval 117) line 7.␤ at ./elf_f line 3861␤]
10:57 masak Pugs++ # you and I think alike today
11:00 Tene I should be able to resolve your function questions up there after I get some sleep
11:01 masak sounds good.
11:01 Tene As long as someone bugs me about it.  Maybe make a paste and leave a msg for me with purl in #parrot?
11:02 Tene g'night masak.  thanks for all your work on testing.  :)
11:02 masak Tene: g'night. my pleasure.
11:03 * masak makes the paste
11:12 ruoso pmurias, that is not possible, because several objects already behave differently depending on context...
11:12 ruoso specially the iterators...
11:16 pmurias i worried that will get dragged into something contradicting the spec
11:26 pmurias how does rakudo implement context?
11:33 c9s_ joined #perl6
11:36 c9s_ 11:33 [ allbery_b     ] [ cls_bsd   ] [ Helios-   ] [ LCamel     ] [ pjcj      ] [ sri_work_    ]
11:36 c9s_ oops
11:37 pmurias hash context is specced a bit contradictorily it both evaluates the next expression in list context and in hash context
11:43 meppl joined #perl6
11:49 pbuetow joined #perl6
12:08 ilogger2_ joined #perl6
12:13 iblechbot joined #perl6
12:29 alester_ joined #perl6
12:31 c9s joined #perl6
12:37 wknight8111 joined #perl6
12:46 ilogger2 joined #perl6
12:51 jferrero joined #perl6
13:04 hercynium joined #perl6
13:06 pbuetow_ joined #perl6
13:27 pbuetow joined #perl6
13:35 Chillance joined #perl6
13:44 pmurias ruoso: where should i but wrapper function required for using smop from haskell via FFI?
13:45 pmurias i'm thinking of smop_haskell_ffi.c
13:59 xiaoyafeng joined #perl6
14:10 Myoma joined #PERL6
14:24 charsbar joined #perl6
14:26 charsbar_ joined #perl6
14:36 masak joined #perl6
14:51 iblechbot joined #perl6
15:05 vasi joined #perl6
15:06 vasi left #perl6
15:21 Juerd joined #perl6
15:26 ghriehggnoeezoiz joined #perl6
15:27 ghriehggnoeezoiz left #perl6
15:52 xinming joined #perl6
16:10 rindolf joined #perl6
16:10 rindolf Hi all.
16:13 wknight8111 joined #perl6
16:24 masak hiya rindolf,
16:25 rindolf Hi masak
16:25 rindolf masak: what's up?
16:25 masak rindolf: hacking on november.
16:25 rindolf masak: what is November?
16:26 masak it's a wiki engine
16:26 masak http://www.november-wiki.org/
16:26 lambdabot Title: Main_Page
16:27 masak http://github.com/viklund/november/
16:27 lambdabot Title: viklund's november at master — GitHub
16:27 masak it's fun, because it makes me want to exercise Rakudo in complicated ways
16:28 masak ...which is good both for me and Rakudo :)
16:28 masak today I've been wanting to send methods as parameters to other classes, but I find I can't yet
16:28 Juerd masak: I like your long use.perl writeup
16:29 masak Juerd: the Good/Cool/Awesome/Bad/Ugly/Weird one?
16:29 masak thanks!
16:29 Juerd Yes, that one
16:30 masak it's especially gratifying to update it with things that get fixed, now that jonathan++ is back from his vacation
16:31 masak seems that Ugly bugs get fixed first :)
16:32 masak gotta go home and make my room habitable again -- see you!
16:51 pmurias joined #perl6
17:21 hanekomu joined #perl6
17:21 gbacon joined #perl6
17:25 alester_ joined #perl6
17:30 Chillance joined #perl6
19:03 xinming_ joined #perl6
19:04 meppl joined #perl6
19:05 larsen_ joined #perl6
20:19 xinming joined #perl6
20:20 eternaleye joined #perl6
20:26 hercynium joined #perl6
20:39 pbuetow joined #perl6
20:47 BinGOs joined #perl6
20:47 larsen__ joined #perl6
20:52 BinGOs joined #perl6
21:01 BinGOs joined #perl6
21:01 charsbar joined #perl6
21:08 BinGOs joined #perl6
21:10 REPLeffect joined #perl6
21:19 BinGOs joined #perl6
21:27 Limbic_Region joined #perl6
21:53 Auzon joined #perl6
21:59 Auzon joined #perl6
22:10 Myoma joined #PERL6
22:32 s1n pmichaud: ping
22:35 s1n when doing radix numbers of the notation :\d(...)
22:35 s1n does the radix number itself have to be in decimal form?
22:36 s1n can the radix number in fact be a number in radix notation?
22:37 s1n i.e. is ::2<10><111> eval out to 7 (decimal)?
22:37 s1n the spec doesn't say
22:38 TimToady the radix is always decimal
22:39 s1n TimToady: can the <...> bits be in radix form?
22:39 s1n i.e. is it possible to nest a radix notation?
22:41 iblechbot joined #perl6
22:41 TimToady only the functional form
22:41 drbean joined #perl6
22:41 s1n what do you mean?
22:41 TimToady so :16("0b1001001") is legal, but not :16<0b1001001>
22:41 s1n why, what's the difference?
22:42 TimToady the first is a function call
22:42 TimToady you could be passing :16($x)
22:42 TimToady the second is just a quote form
22:42 s1n so with the functional form eval the bits seperately?
22:43 s1n first the quotes, then the radix :16(..)?
22:43 TimToady :16(...) is a function call
22:43 TimToady :16<...> isn't
22:43 TimToady the argument to a function call can be any expression
22:43 s1n so you can't use :16(), it has to be <> or []?
22:44 TimToady use it for what?
22:44 s1n for the radix notation
22:44 TimToady literal or functional?
22:44 s1n heh, i'm dense, what's the difference?
22:45 TimToady it's like the difference between 42 and x(42)
22:45 TimToady the literal provides a value that is known at compile time
22:45 TimToady :16($x) isn't known at compile time
22:46 s1n is <> and [] the literal case?
22:46 TimToady yes
22:46 TimToady though inside [] is an expression too, so maybe just <>
22:46 s1n okay, that answers my question then
22:47 s1n hmm, how is the [] an expression?
22:47 TimToady actually :16("0b100") is illegal anyway, if you mean binary
22:47 TimToady since since 0b is legal hex
22:48 s1n well, lets just cover the <> case, this is literal and will be interpreted as the radix value following the colon
22:48 s1n i.e. :16<10> evals to 16
22:48 TimToady yes
22:49 s1n okay, what about []?
22:49 s1n what is :16[10]?
22:50 TimToady same as :16<a>
22:50 s1n so the [] is literal?
22:51 TimToady no
22:51 TimToady it encloses a list
22:51 [particle] joined #perl6
22:51 s1n hmm
22:51 TimToady that's what [] usually does in subscript position
22:51 s1n okay, i'll need to talk that case over with pmichaud
22:51 TimToady and adverbial syntax is parsed as subscripts are
22:51 s1n what about :16(10)?
22:52 s1n non-literal?
22:52 TimToady bad programming
22:52 s1n heh
22:52 s1n is it remotely legal?
22:52 TimToady it would convert 10 to a string, then use that as hexadecimal
22:52 s1n i see a reference to something similar in s02-literals
22:52 s1n hmm
22:52 TimToady in fact, the test suite used to have those brainos in it
22:53 s1n okay, i'll work on the <> case and come back to the other cases
22:53 TimToady radix.t already tests a lot of htose
22:53 TimToady *those
22:54 s1n can you have something like :16<1_1>
22:54 TimToady I believe so
22:54 TimToady yes, STD allows it
22:54 TimToady line 1765
22:55 s1n how do i read that?
23:00 aindilis joined #perl6
23:01 Jamtech joined #perl6
23:03 ruoso joined #perl6
23:08 pugs_svn r22236 | lwall++ | [STD] missing some capture brackets
23:16 justatheory joined #perl6
23:21 cotto_home joined #perl6
23:24 pbuetow joined #perl6
23:31 s1n TimToady: so is :2<1a> valid?
23:35 jferrero joined #perl6
23:37 TimToady syntactically, yes, but it will be rejected in semantic analysis
23:37 TimToady specifically, in radcalc(), which is currently commented out
23:37 cognominal TimToady, what   class H::A { } ; say H::A.WHAT   should print?
23:38 cognominal in Parrot, it prints "A"
23:38 s1n TimToady: okay, so it's syntactically legal, and it evals to 12 (decimal)?
23:38 cognominal I expect "H::A"
23:39 s1n cognominal: how far up the ancestry would you go before stopping?
23:40 cognominal sln, I don't understand.  H::A has no ancestor
23:40 s1n cognominal: H has no parent?
23:40 s1n whatsoever?
23:42 cognominal I probably don't understand namespace.   for me H::A is a class,   H is just a namespace that contains the class A, so its name is H::A
23:44 s1n H has to be in a namespace of some form, either a subclass, or another namespace, such as Object is the top-most parent in Java
23:44 cognominal so I would expect   class H::A { } class H::B is H::A { }   to work but it does not.
23:45 cognominal I get  Attempt to inherit from non-existent parent class
23:45 s1n class H::B is H::A { } should be something like H::A::B?
23:45 s1n well, does H exist? is it being treated like a namespace or a class name?
23:45 s1n sounds like class name
23:46 cognominal I don't see how it is different form perl5
23:47 s1n perl5 just treated those like packages, how is perl6 specced? packages or classes?
23:47 s1n i.e. perl5 would have treated H like a package/namespace
23:47 s1n sounds like what you're seeing is treating H like a class, which you have not defined
23:47 cognominal classes are some special sort of namespace.
23:47 s1n try defining H first, see if it works
23:47 s1n well, in perl5 they were
23:48 cognominal I am not treating H as a class.
23:48 s1n you aren't but what does the spec say?
23:51 braceta joined #perl6
23:51 cognominal my reading of S10 and S11 seem to confirm wht I think
23:52 cognominal embedded classes relies on an altogether different mechanism
23:54 s1n i don't know what you mean by that but Bool::True is an example and i'm unsure how it's actually treating it
23:54 s1n did you try creating class H { }?
23:54 cognominal no. I don't know what that would mean
23:55 s1n i see it referring to SUPER::, which indicates classname...
23:58 cognominal pugs: class H::A { } ; say H::A.WHAT
23:58 p6eval pugs: OUTPUT[H::A␤]
23:59 cognominal perl6: class H::A { } ; say H::A.WHAT
23:59 p6eval pugs: OUTPUT[H::A␤]
23:59 p6eval ..elf 22236: OUTPUT[STRING␤]
23:59 p6eval ..rakudo 31096: OUTPUT[A␤]

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

Perl 6 | Reference Documentation | Rakudo