Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-05-29

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:01 jnthn std: my $x; say "$x >> ";
00:01 p6eval std 30924: OUTPUT«ok 00:01 115m␤»
00:03 envi^home joined #perl6
00:27 dalek rakudo: d42fd31 | jonathan++ | src/Perl6/Actions.pm:
00:27 dalek rakudo: The whatever currying was a little too liberal; after some labour I came up with
00:27 dalek rakudo: this patch to make it a tad more conservative.
00:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​42fd31473bc24a5989fb26717d1031a5d18537a
00:29 masak tedv: still there? I just backlogged over your pack/unpack musings. seems interesting. I'd just like to get things working too. if there's any way I can help, please let me know.
00:31 masak ok, so thejoyofsix.org can be hacked through the Mu repo. moritz_++
00:32 jnthn \o/
00:32 jnthn masak: Trying to re-instate #`{ blah } for ya. :-)
00:32 masak \o/
00:33 masak I see the rationale for having the heading be 'The Joy of (Perl) Six', but that '(Perl)' kinda breaks some rythm. it's not like people are going to misunderstand the whole thing if we don't confess up front what the page is about.
00:34 BrowserUk joined #perl6
00:34 * masak edits it out, favouring forgiveness before permission
00:34 masak BrowserUk: ?
00:38 colomon joined #perl6
00:40 * masak considers removing the final smiley and decides to leave it there
00:40 masak not all people find the lack of smileys amusing.
00:40 plobsing joined #perl6
00:41 pugssvn r30925 | masak++ | [joyofsix] some minor edits
00:49 jnthn > sub foo(Str $x) #`{LOL IMA COMMENT} { say "WIN!" }; foo("")
00:49 jnthn WIN!
00:49 masak \o/
00:49 jnthn Let's see what the speccies have to say.
00:50 colomon jnthn: you're still up?
00:50 jnthn Needed a little beating our parsing in an STD direction rather than copy paste
00:50 jnthn colomon: It appears so.
00:50 masak colomon: it's not late, it's early!
00:50 colomon you could have written a bot to replace yourself....
00:50 jnthn colomon: .pick(*) is fixed
00:51 colomon jnthn: I was just checking that.  :)
00:51 jnthn colomon: Then I could blame my last commit message on it. Good plan!
00:51 colomon masak: I've only had six hours sleep in the last 36, it's officially late in my book.  ;)
00:52 masak ouch :) toddler keeping you up?
00:52 masak someone just informed me re my latest blog post that the cake is a lie. :)
00:52 colomon He didn't go to sleep until after midnight last night, and then woke up at 5 am.
00:52 masak they say the nice moments make it all worth it.
00:52 masak :P
00:53 jnthn Grr, I still haven't blaught.
00:53 masak blog bligged blaught
00:53 jnthn blag
00:54 masak Oh my blogsphemy!
00:54 colomon masak: he was fantastically cute with his cousins today.
00:54 arnsholt I think this channel contributes more language weirdness than the rest of my interactions with the world, combined =p
00:55 masak arnsholt: you up too? just out of bed, or not yet in it?
00:55 arnsholt I've been in it, reading a book
00:55 masak nice.
00:55 arnsholt And 150 pages later discovered that it was 3AM
00:55 arnsholt =)
00:55 jnthn beds are overrated
00:56 masak we should start a club. European Perl 6 Insomniacs.
00:56 jnthn Our meetings are at 3AM.
00:56 arnsholt Indeed =D
00:56 masak naturalement.
00:56 masak #ep6i in three :)
00:57 colomon the problem is we have at least three different 3AMs just among those of us here now...
00:58 jnthn I thought myself, masak  and arnsholt shared a 3am?
00:59 colomon okay, two.
00:59 colomon It's 3am for all of you?
01:00 colomon I almost feel guilty for talking to you!
01:00 masak yes, don't encourage us!
01:00 masak it'll only make things worse!
01:01 arnsholt ^^
01:01 masak arnsholt: what were you reading?
01:01 arnsholt First among equals, by Jeffrey Archers
01:01 arnsholt *Archer
01:02 arnsholt It's quite good
01:02 jnthn colomon: Yes, but I got up at midday ;-)
01:04 jnthn spectets well into the trig now and looking good \o/
01:06 PenThrive left #perl6
01:13 pausenclown joined #perl6
01:17 pugssvn r30926 | sorear++ | [viv] andthen/orelse translation
01:22 dalek rakudo: a4dc280 | jonathan++ | src/Perl6/Grammar.pm:
01:22 dalek rakudo: Get our comment parsing more STD-ish by introducing the comment protoregex, and
01:22 dalek rakudo: add support for #`(...) to fix a regression from alpha.
01:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​4dc28061d1f0e13e914b849283776a84bafa911
01:23 sorear "my" variable $C masks earlier declaration in same scope at STD.pm line 32590.
01:23 sorear the word "my" does not appear in 32590
01:23 sorear the totality of 32590 is : $C->statementlist
01:25 sorear it's really confused - it's generating errors out of line order
01:36 dalek nqp-rx: 3c60bf4 | jonathan++ | src/Regex/P6Regex/Actions.pm:
01:36 dalek nqp-rx: Fix a panic call, so we actually panic with the useful error message.
01:36 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/3​c60bf42e1bcb7375ad78348f4beefe13b476dd5
01:39 * jnthn -> sleep now, but if anybody wants to update the bootstrap files with the latest nqp-rx, then RT#74832 will be resolvable.
01:39 jnthn night o/
01:47 [mark] joined #perl6
01:47 gbacon joined #perl6
01:58 eternaleye joined #perl6
02:05 pugssvn r30927 | sorear++ | [viv] Translate anonymous hashes better
02:11 jaldhar joined #perl6
02:41 sorear STD.pm has too many errors.
02:41 sorear ^^^ Literal output from perl5
02:41 TimToady :D
02:41 pugssvn r30928 | sorear++ | [viv] translate when(*)
02:46 sorear !=~!=~ is not a valid infix in perl5
02:49 rml` joined #perl6
02:49 sorear TimToady: there's a delightful little misparse somewhere in STD, !~~ generates TWO infix_prefix_meta_operator nodes
02:51 sorear no, excuse me, it generates the same node twice
02:55 sorear ah, Actions.pm failure
03:02 meppel joined #perl6
03:06 sorear TimToady: Why does Actions.pm exist?
03:11 pugssvn r30929 | sorear++ | [viv] Translate !~~
03:11 pugssvn r30929 | [Actions] Don't duplicate metaops
03:24 pugssvn r30930 | sorear++ | [viv] Translate try
03:59 meppel joined #perl6
04:06 skangas joined #perl6
04:13 pugssvn r30931 | sorear++ | [viv] *really* crude translation for map & grep
04:17 fridim joined #perl6
04:19 sorear 50K...
04:19 pugssvn r30932 | sorear++ | [viv] Type erasure for my
04:21 sorear TimToady: STD.pm6 line 4258 looks like a fossil, ABORTBRANCH doesn't exist
04:25 pugssvn r30933 | sorear++ | [viv] Declarations need to be treated as blocks
04:39 TimToady Actions.pm exists because I though I'd be doing downward context propagation on the AST in 'std', so I put it where both viv and std could get to it
04:39 TimToady (flakey network here--comes and goes)
04:40 TimToady anything ABORTFOO is a fossil from before the xact mechanism existed
04:41 TimToady it assumed one could backtrack with a die/eval, which is bogus when continuations are being emulated
04:41 sorear What is std supposed to do?
04:41 TimToady compiles CORE.setting currently, mostly
04:41 sorear ah
04:41 TimToady but any submodules used by STD
04:42 TimToady you'll note it spits out extra oks and timings now and then if you use something that needs compiling
04:42 pugssvn r30934 | sorear++ | [viv] Only autouse Cursor
04:42 TimToady those are calls to std
04:43 sorear What is eqv?
04:45 TimToady infix:<eqv>?
04:46 sorear yes
04:46 pugssvn r30935 | sorear++ | [viv] Map eqv to eq like gimme5
04:47 TimToady basically, would these two objects serialize to the same value if you serialized them right now
04:47 sorear it's gotten much faster... each thing I change jumps me 3,000 lines :D
04:47 sorear polymorphic deep equality? nice
04:47 TimToady yes, it does tend to accelerate, which is always nice
04:47 sorear I always missed that
04:47 TimToady it goes with cmp, polymorphic comparison
04:48 TimToady eqv is basically cmp == Same
04:49 TiMBuS joined #perl6
04:49 TimToady whereas === is object identity, where all value types treat all eqv values as the same object
04:50 sorear hmm.  nextsame time
04:51 envi^home joined #perl6
04:52 TimToady TimToady: How hard would it be for STD to associate names in the AST with definition sites?
04:53 TimToady well, it's pretty easy for types, which must be predeclared, but functions can be postdeclared
04:54 pugssvn r30936 | sorear++ | [viv] Finish implementing <.nextsame> (oops)
04:56 sorear thinking back to the earlier discussion of contexts
04:58 sorear my $v = 0; sub bar($n) { $v = &*OP($n,$v); }; sub foo { my &*OP = &[+]; for 1,2,3 { bar($_); } }; foo; say $v
04:58 sorear seems to have suprising behavior
05:00 * diakopter blinks awake
05:03 TimToady I expected 6, and that's what I got
05:03 sorear hmm.  gimme5 seems to be miscompiling STD.pm6:5149
05:03 sorear TimToady: but the 'for' produces a lazy list, which is not evaluated until after foo returns because it's in a returning place, and by then the contextual is gone
05:04 sorear in: «: $<quotepair><key>»  out: [':', '$<quotepair><key>']
05:04 * sorear wonders what the correct out is, for viv
05:05 TimToady foo is called in sink context, which propagates to the 'for', which makes it eager
05:05 sorear I thought inwards context propagation was history
05:06 TimToady the only reason to evaluate anything in sink context is to have a side effect
05:07 TimToady it's sort of a funny monad
05:08 diakopter -.  -.
05:09 diakopter .-  .-
05:12 kaare joined #perl6
05:15 TimToady well, nothing uses that $/<sym> value, so it's kind of a placeholder for a real value... :)
05:22 sorear rakudo: my $x = "a b"; say «$x».elems
05:22 p6eval rakudo a4dc28: OUTPUT«Can't form :w list from non-constant strings (yet) at line 11, near ".elems"␤current instr.: 'perl6;HLL;Grammar;panic' pc 528 (ext/nqp-rx/src/stage0/HLL-s0.pir:348)␤»
05:22 sorear pugs: my $x = "a b"; say «$x».elems
05:22 p6eval pugs: OUTPUT«2␤»
05:22 TimToady alpha: my $x = "a b"; say «$x».elems
05:22 p6eval alpha 30e0ed: OUTPUT«1␤»
05:22 TimToady oops :)
05:22 sorear which is right?
05:23 TimToady pugs
05:23 TimToady is supposed to approximate shell quoting rules
05:24 sorear yum reparsey goodness
05:30 pugssvn r30937 | sorear++ | [viv] Implement shell-words quoting
05:33 pugssvn r30938 | sorear++ | [viv] Map === to ==
05:37 pugssvn r30939 | sorear++ | [viv] sort takes a direct block; translate $^[ab]; leg => cmp
05:40 pugssvn r30940 | sorear++ | [viv] Metaop cases for !===, !eqv
05:41 pugssvn r30941 | sorear++ | [viv] Nil constant
05:41 sorear STD.pmc syntax OK
05:51 TimToady \o/
05:54 * TimToady is finally caught up on backlog caused by commute to SD and ensuing chaos
05:54 pugssvn r30942 | sorear++ | [viv] Ensure output is marked as UTF-8
05:55 pugssvn r30943 | sorear++ | [viv] Correct 'has' usage
05:57 sorear ...why does Cursor call BUILD
05:57 sorear without defining one of its own or anything like that
05:57 TimToady in case the grammar wants to do some initialization of its own, but that was a long time ago
05:57 TimToady it's mostly a fossil
05:59 pugssvn r30944 | sorear++ | [Cursor, gimme5] Rip out BUILD fossil
06:01 * sorear is in runtime errors now
06:01 pugssvn r30945 | sorear++ | [viv] Arguments with defaults are implicitly optional
06:02 TimToady after that, you just have to round-tip it with no difference :)
06:02 TimToady *trip
06:03 TimToady and parse the test suite with no more errors than snaptest does now
06:03 TimToady then I'd be happy to scrap gimme5 :)
06:04 TimToady bbl &
06:12 atomicstack joined #perl6
06:14 BrowserUk joined #perl6
06:18 pugssvn r30946 | sorear++ | [viv] chars -> length
06:21 uniejo joined #perl6
06:23 pugssvn r30947 | sorear++ | [viv] Disable required argument checking for now - STD breaks the rules and can't be fixed under gimme5
06:32 eternaleye joined #perl6
06:39 was kicked by pmichaud: lisppaste3
06:42 pugssvn r30948 | sorear++ | [viv] Implement our-like handling for role names
06:49 yinyin joined #perl6
06:50 Jmax joined #perl6
07:01 moritz_ good morning
07:03 sorear hello
07:03 Guest37593 left #perl6
07:07 moritz_ jnthn++ # Whatever currying fixes
07:09 * moritz_ deleted some spam from the IRC logs
07:12 bacek joined #perl6
07:15 dolmen joined #perl6
07:16 pugssvn r30949 | sorear++ | [viv] Moose Roles aren't inherited so we have to use method modifiers, not SUPER
07:19 snarkyboojum rakudo: my @a = 1,2,3; say @a.map: *.succ
07:19 p6eval rakudo a4dc28: OUTPUT«␤Null PMC access in find_method('params')␤current instr.: 'perl6;Block;count' pc 550379 (src/gen/core.pir:90597)␤»
07:22 * moritz_ wonders if that kind of currying shouldn't also be done at compile time
07:23 pugssvn r30950 | sorear++ | [viv] Fix last commit
07:23 TimToady rakudo: say (*.succ).WHAT
07:23 p6eval rakudo a4dc28: OUTPUT«Block()␤»
07:23 moritz_ the problem is that it's a PIR level sub without a Perl 6 signature
07:24 moritz_ rakudo: say (*.succ).signature
07:24 p6eval rakudo a4dc28: OUTPUT«␤Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
07:25 sorear TimToady: What are the normal failures for snaptest?
07:26 sorear viv, using viv's STD.pmc, is functional for simple inputs... working up to STD scale now
07:28 TimToady most of the failures are undefined symbols due to not knowing where to look for the librarys
07:28 dalek rakudo: 5940b25 | moritz++ | docs/ChangeLog:
07:28 dalek rakudo: [docs] update ChangeLog
07:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​940b2588a786e0c36324aa4d59e35968d7fcb05
07:29 sorear oh, gimme5 translates temp $*CURPAD as local $::CURPAD;
07:29 sorear no wonder it's breaking
07:29 pugssvn r30951 | moritz++ | [t/spec] unfudge a Whatever test
07:29 sorear what does temp $*CONTEXTUAL mean?  anything useful?
07:30 * sorear thinks it looks confused
07:30 TimToady should be local $::CURPAD = $::CURPAD
07:30 sorear a fossil from $* == $GLOBAL:: days perhaps
07:31 TimToady temporizing a lexical differs from 'my' in that it defaults to its outer value
07:31 TimToady s/lexical/dynamic/
07:31 TimToady not a fossil
07:33 TimToady S02:2711
07:34 TimToady and theoretically 'let $*foo = 4' copies its final value outward on success, but not on failure
07:35 sorear TimToady: Is it possible to obtain from STD information on what variables are in scope at what points?  STD clearly generates the information...
07:37 TimToady well, $*CURPAD implies the visibility of everything in that pad, transitively through any OUTERs
07:38 TimToady and $*CURPKG likewise out through PARENTs
07:38 sorear perhaps Actions.pm should grab references to $*CURPAD, then
07:39 sorear or perhaps viv should be refactored as action methods instead of an AST walker
07:42 pugssvn r30952 | sorear++ | [viv] Proper temp translation
07:43 TimToady anything that is declared already remembers its pad, or at least a pad id
07:44 sorear at the site of declaration
07:44 sorear they aren't available at the use site
07:44 sorear I'd like to look at a name and go "oh, that's an our class with full name BLAH"
07:45 TimToady and anything that calls <.getdecl> remembers a declarand in the parse tree
07:45 TimToady under key <decl>
07:46 sorear I seem to have completely broken LTM
07:46 sorear temp %*RX is being parsed as a function clal...
07:47 moritz_ rakudo does that too :-)
07:48 TimToady pad_can_find_name does a little bit of that; it's what constructs the OUTER::OUTER::OUTER:: for some messages
07:49 sorear temp»(?:\s)*(?#::)     (?#FATE0 )
07:49 TimToady well, I have to get up early, so I'd better go to sleep now
07:49 sorear I don't think this is right...
07:49 TimToady that looks like utf-8 > latin-1 damage
07:51 TimToady zzz &
07:51 sorear sleep well
07:55 * moritz_ tries to understand rakudo's method call emitting
07:55 moritz_ methodop seems to do the heavy lifting
07:55 moritz_ but it doesn't know the invocant (?)
07:56 jakk joined #perl6
07:56 moritz_ is there a place that consructs method calls and knows about the invocant?
07:57 sorear dotty?
07:57 pugssvn r30953 | sorear++ | [viv] Fix more encoding damage ( TimToady++ )
07:57 moritz_ sorear: dotty starts with parsing '.'
07:58 moritz_ so... termish?
07:59 moritz_ ugh, termish has no action method
08:00 moritz_ ah, inherited from nqp-rx
08:02 pmichaud good morning, #perl6 :-)
08:03 moritz_ good (early?) morning, pmichaud
08:03 moritz_ pmichaud: any success towards more p6ish Match objects?
08:03 pmichaud moritz_: yes
08:03 moritz_ \o/
08:03 pmichaud not complete success yet, but I've had some success
08:03 dalek nqp-rx: 3ce1fa3 | moritz++ | src/stage0/ (3 files):
08:03 dalek nqp-rx: update stage0 files
08:03 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/3​ce1fa3723390312352ae252c8565e768f9c4f59
08:03 pmichaud right now I'm getting a strange failure in range.t
08:04 moritz_ pmichaud: anything I can help hacking on?
08:05 pmichaud I probably should've done this in a branch
08:05 moritz_ it's never too late for a branch (in git at least :-)
08:06 moritz_ git checkoub -b mob_really # :-)
08:06 pmichaud don't I need to stash my intermediate changes somewhere?
08:06 moritz_ not for creating a new branch
08:07 moritz_ only for switching to an existing branch
08:07 pmichaud ah, I think I may have found my remaining bug
08:07 pmichaud might not need the branch after all :)
08:07 moritz_ \o/
08:07 pmichaud otoh, I'm probably celebrating prematurely.
08:08 moritz_ somehow it's frustrating: I've spend days on these mob\d branches
08:08 moritz_ and now you come up with something working(ish) in a few hours
08:08 pmichaud I have the advantage of knowing how all of the pieces fit together, though.
08:08 moritz_ I know
08:09 M_o_C joined #perl6
08:11 pmichaud I seem to have postcircumfix:<{ }> working fine.... just adding in postcircumfix:<[ ]>  now.
08:12 pmichaud although if it doesn't work I'll need to stop for the night -- already 03h15 here and I should get some sleep
08:12 pmichaud (so if it doesn't work I'll push the branch and you can look/play a bit if you'd like :)
08:15 sorear good morning pmichaud
08:16 pmichaud alpha:  'abc' ~~ /b/;  say $/ ~~ Positional;
08:16 p6eval alpha 30e0ed: OUTPUT«1␤»
08:16 pmichaud hrm
08:16 pmichaud alpha:  'abc' ~~ /b/;  say $/ ~~ Associative;
08:16 p6eval alpha 30e0ed: OUTPUT«1␤»
08:16 pmichaud I didn't quite expect that.
08:16 pugssvn r30954 | sorear++ | [viv] Generate correct min values for \X and .
08:18 pmichaud ahhh, .[] seems to work now
08:18 pmichaud let's try a full spectest
08:20 pmichaud hmmm, almost works
08:20 pmichaud I'm having trouble with "Match does Positional" for some reason.
08:21 pmichaud (the full declaration needs to be    class Match is Regex::Match is Cool does Positional does Associative { ... }
08:23 moritz_ ah, inheriting from Regex::Match might be a better approach than completely writing it from scratch
08:23 pmichaud yes
08:23 pmichaud especially since Regex::Match already knows all of the pieces
08:27 pmichaud okay, I have "does Positional" working and "does Associative" working.  Now if I can just get "does Positional does Associative" working.  :-|
08:27 pmichaud that appears to be an issue with the metamodel, not with the Match class itself, though.
08:28 JimmyZ joined #perl6
08:36 Su-Shee joined #perl6
08:39 clintongormley joined #perl6
08:40 pmichaud rakudo:  say ?(Q:PIR { %r = box 1 })
08:40 p6eval rakudo a4dc28: OUTPUT«1␤»
08:40 pmichaud rakudo:  say (Q:PIR { %r = box 1 }).WHAT
08:40 p6eval rakudo a4dc28: OUTPUT«Int()␤»
08:40 pmichaud rakudo:  say (Q:PIR { %r = box 1 }).PARROT
08:40 p6eval rakudo a4dc28: OUTPUT«Integer␤»
08:45 pmichaud seems to want to do with prefix:<?> and infix:<===> somehow
08:45 cognominal pmichaud, about matches, are you aware that :
08:45 Ross joined #perl6
08:45 cognominal rakudo:    say  ('a' ~~ /a/)^.methods
08:45 p6eval rakudo 5940b2: OUTPUT«Method 'methods' not found for invocant of class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
08:46 pmichaud cognominal: yes, this should fix that.
08:46 cognominal And the anonymous class part?
08:46 pmichaud that also
08:46 cognominal your are my hero
08:46 cognominal pmichaud++
08:54 cognominal http://www.lemonde.fr/politique/article/2010/​05/29/lagarde-torreton-et-lellouche-champions​-de-l-absenteisme-a-paris_1364671_823448.html
08:57 Su-Shee cognominal: this is eery. I'm just reading an article about the union of nouvel observateur and le monde...
08:58 cognominal ho, sorry, wrong channel again
08:59 * Su-Shee clicks blindly on every link. ;)
08:59 cognominal here, that's only French but EU is even worse.
08:59 ejs joined #perl6
09:00 Su-Shee I could easily write the same article in german..
09:01 cognominal I wish I could speak/read german but I was a loafer in school
09:02 Su-Shee same here with french. I only recently reactivated it that I at least can read again...
09:03 Su-Shee and funny as it sounds but it would really help if p2p were more international. ;)
09:03 cognominal agreed :)
09:04 Su-Shee cognominal: though newspapers are a very good entrance into german. it's considered good style if the german has a good simplicity and ease and clarity.
09:04 ejs joined #perl6
09:05 Su-Shee it would also help if there were tv series in german/french (russian I need!) which are actually worthwhile watching ;)
09:06 sorear LTM is still broken and I'm not awake enough to figure out why
09:06 * sorear off
09:06 cognominal I had a stupid idea to get a Wittgenstein book, with a page a german and the opposite translated in French. Wittgenstein is hardly the best author to learn german. I have alrady trouble to read him in French, a good author but not an easy one.
09:07 Su-Shee oh lord.. that's about like saying "hey, I start beginner's french with foucault!" ;)
09:07 Su-Shee oh, no even better: "I read Proust first" ;)
09:07 cognominal (Su-Shee)++
09:07 Su-Shee "because of is good grammar in his pagelong sentences" ;))
09:09 Su-Shee the official teaching french books by the french cultural institution did a great trick - in lesson 2 or 3 - you barely can say something different but "the cat is green" - you read a passage of maguerite duras. orginal. because this short hemingway style is perfect. but you still read the orginal. great idea.
09:10 cognominal :)
09:12 cognominal I would use some well chosen Prévert poems instead, easy and fun.
09:12 cognominal Hardly an original idea, that's what they teach to young kids
09:13 cognominal afk&   # they gave me a SIM card but not tool to insert in my iPad.
09:15 pmichaud moritz_: my changes now in the "mob_pm" branch on github.  feel free to look and experiment there a bit.
09:15 pmichaud I'm running a spectest now -- so far no fails
09:15 pmichaud off to take a quick shower, then will be back to check on spectest progress
09:27 am0c joined #perl6
09:28 pmichaud all current spectests pass in the mob_pm branch.
09:29 pmichaud I'm okay with merging it to trunk if someone wants to go ahead and do that.
09:29 * moritz_ also runs a spectest
09:29 moritz_ will merge later
09:29 pmichaud One piece that is known not to work in the branch is something like   $/[1, 2, 4]
09:29 pmichaud because of the inability to have "does Positional"
09:29 pmichaud maybe jnthn++ can look into that
09:30 moritz_ ./perl6 -e '"abc" ~~ /<alpha>(.)+/; say $<alpha>; say $0.WHAT'
09:30 moritz_ a
09:30 moritz_ Method 'WHAT' not found for invocant of class 'ResizablePMCArray'
09:30 pmichaud right, I didn't work on getting the arrays in place yet
09:30 moritz_ ah well, still needs some work
09:30 pmichaud I was primarily wanting to get match objects as Rakudo objects
09:30 pmichaud arrays are next
09:30 moritz_ sure, it's already a good improvement
09:31 pmichaud although *really*  ResizablePMCArray ought to be mapping to Parcel, at least.
09:31 pmichaud I'm not sure why that's not happening.
09:32 pmichaud hmmm.
09:32 pmichaud I could've sworn that at one point I had RPA acting like Parcel.
09:32 pmichaud maybe I had to take that out.
09:33 pmichaud wonder what happens if I put the mapping back in
09:33 moritz_ $ ./perl6 -e '"abc" ~~ /<alpha>*/; say uc $/'
09:33 moritz_ ABC
09:33 moritz_ \o/
09:34 pmichaud yes, I specifically checked that.  Match is now ~~ Cool
09:36 pmichaud ah, I see why I was getting the Integer.Bool failure
09:36 pmichaud hmmm.
09:39 pmichaud looks like mapping RPA to Parcel has some issues.
09:40 pmichaud okay, I'll work on it some more tomorrow
09:40 * moritz_ will try to backport some methods to Match.pm
09:41 pmichaud like... which ones?
09:41 moritz_ .caps, .chunks, .perl
09:41 pmichaud okay, those are good ones
09:41 moritz_ I need the first two for the book :-)
09:41 pmichaud I'd probably like to see .caps and .chunks provided in Regex;Match
09:41 pmichaud but if you want to just do them in p6 for rakudo for now, that's fine.
09:41 moritz_ you'll be free to backport them to NQP :-)
09:42 pmichaud wfm.
09:42 pmichaud although .caps and .chunks might actually be easier to implement now since Cursor objects have much more information than Match objects
09:43 pmichaud i.e., rather than trying to build them from Match, better might be from Cursor (which has all of the captures in sequence)
09:44 pmichaud ah, but those are methods on Match, so that's where they need to be
09:44 pmichaud never mind, then
09:44 moritz_ does a match object still has a back reference to cursor?
09:44 pmichaud it does :-)
09:44 moritz_ well :-)
09:45 pmichaud it might also be a good idea to have the BUILD_MATCH method also build .caps while it is at it :)
09:45 moritz_ I don't think .caps is used often enough to warrant the use of extra memory for it
09:46 pmichaud it'd only be an additional array
09:46 pmichaud but yes, for now I'd go with the backport version.
09:46 pmichaud we can improve things a bit later
09:47 pmichaud (and when I see the backported version, I can see about migrating to nqp also)
09:47 Su-Shee what's the official way to install a perl6 module nowadays? I throw it into my PERL6LIB path?
09:49 moritz_ Su-Shee: you throw it into ~/.perl6/lib/
09:49 moritz_ Su-Shee: if you try to load a module that doesn't exist, you'll get a list of all the default locations
09:50 Su-Shee and if it has a makefile?
09:51 moritz_ then what?
09:54 Su-Shee hmpf, wait I have to clean up the segfault first.
09:55 Su-Shee what do I miss here? Can't find ./NativeCall in @*INC
09:55 pmichaud afk, nap
09:56 moritz_ Su-Shee: how old is your rakudo?
09:57 Su-Shee moritz_: erlangen. freshly build.
09:57 moritz_ Su-Shee: too old :-)
09:57 Su-Shee aeh..
09:57 moritz_ not to old to load modules
09:57 moritz_ but too old to get the good error message
10:00 moritz_ rakudo: 'aa' ~~ /<alpha>+/; say $<alpha> ~~ Positional
10:00 p6eval rakudo 5940b2: OUTPUT«Method 'HOW' not found for invocant of class 'ResizablePMCArray'␤current instr.: 'perl6;Perl6Role;ACCEPTS' pc 11140 (src/gen/RoleToInstanceApplier.pir:20)␤»
10:00 moritz_ RPAs are a PITA
10:01 moritz_ rakudo: 'aa' ~~ /<alpha>+/; say pir::getclass__SP($<alpha>)
10:01 p6eval rakudo 5940b2: OUTPUT«error:imcc:syntax error, unexpected SREG, expecting '(' ('$S58')␤  in file 'EVAL_1' line 77␤syntax error ... somewhere␤current instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 1034 (compilers/pct/src/PCT/HLLCompiler.pir:544)␤»
10:03 moritz_ rakudo: 'aa' ~~ /<alpha>+/; say pir::get_class__SP($<alpha>)
10:03 p6eval rakudo 5940b2: OUTPUT«The opcode 'get_class_s_p' (get_class<2>) was not found. Check the type and number of the arguments␤current instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 1034 (compilers/pct/src/PCT/HLLCompiler.pir:544)␤»
10:03 ejs joined #perl6
10:05 moritz_ rakudo: 'aa' ~~ /<alpha>+/; say pir::isa__iPs($<alpha>, 'ResizablePMCArray')
10:05 p6eval rakudo 5940b2: OUTPUT«1␤»
10:06 moritz_ rakudo: 'aa' ~~ /<alpha>+/; say $<alpha>.isa('ResizablePMCArray')
10:06 p6eval rakudo 5940b2: OUTPUT«Method 'isa' not found for invocant of class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
10:07 gbacon joined #perl6
10:15 mberends Su-Shee: NativeCall is in http://github.com/jnthn/zavolaj (documentation fail :-/ )
10:16 moritz_ mberends: is fakedbi in proto's project.list?
10:17 mberends yes, zavolaj also
10:17 mberends and on proto.perl6.org :)
10:18 m6locks does proto work with master? i've never managed to get it working due to some random directory problems and stuff
10:18 mberends m6locks: it's been improved quite a bit since March
10:19 colomon joined #perl6
10:19 m6locks oh ok, so imma try again soon
10:20 * mberends wants to make proto automatically pick the latest monthly release
10:21 whiteknight joined #perl6
10:23 BrowserUk joined #perl6
10:25 azert0x joined #perl6
10:35 * moritz_ wants a ponie
10:35 moritz_ a Perl 6 On New Internal Engine
10:37 dalek rakudo: 250adbb | pmichaud++ |  (5 files):
10:37 dalek rakudo: Initial fixes towards enabling Rakudo-specific Match objects.
10:37 dalek rakudo: Most things work, but there are still a couple of issues with
10:37 dalek rakudo: getting Match ~~ Positional to work (see src/core/Match.pm for
10:37 dalek rakudo: details).
10:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​50adbb1ccde9f953123468e3c1ddecbb75104a7
10:37 dalek rakudo: 3ac2d94 | moritz++ |  (5 files):
10:37 dalek rakudo: Merge remote branch 'origin/mob_pm'
10:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​ac2d94cb7e5f33b5c649d8669234f34d093962e
10:37 dalek rakudo: f58bca2 | moritz++ | build/ (2 files):
10:37 dalek rakudo: remove some setting left-overs from alpha
10:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​58bca26f62022fb33aadd3694ba100189114582
10:37 dalek rakudo: f743dca | moritz++ | build/gen_ (2 files):
10:37 dalek rakudo: [build] remove two fossile Perl scripts
10:38 Su-Shee I have to use proto?
10:38 moritz_ no; you can install dependencies manually if you want
10:39 * Su-Shee downloads the stuff with the name I can't remember or type properly.
10:44 moritz_ rakudo: say list(('foo' ~~ /<alpha>+/).<alpha>).WHAT
10:44 p6eval rakudo 5940b2: OUTPUT«List()␤»
10:44 moritz_ rakudo: say list(('foo' ~~ /<alpha>+/).<alpha>) ~~ List
10:44 p6eval rakudo 5940b2: OUTPUT«1␤»
10:44 moritz_ rakudo: say list(('foo' ~~ /<alpha>+/).<alpha>).kv
10:44 p6eval rakudo 5940b2: OUTPUT«0f1o2o␤»
10:45 Su-Shee mberends: do I have to make fakedbi or can I just throw the files into the appropriate dirs?
10:52 jferrero joined #perl6
10:55 mberends Su-Shee: the 'make' compiles the .pm6 files to .pir which is optional. The 'make install-user' should copy the files to the appropriate dirs, unless something is missing. See also: 'make help'
10:56 mberends Su-Shee: the .pir files load faster than .pm6 because they're precompiled
10:56 Su-Shee ok, I just copy it into the dir. ;)
10:57 * mberends hopes the first FakeDBI user achieves success
10:59 Su-Shee mberends: "erlangen" is recent enough?
10:59 mberends Su-Shee: yes it should be
11:00 pugssvn r30955 | moritz++ | [t/spec] lots of Rakudo unfudges
11:01 Su-Shee I can "use" it.
11:01 mberends :-)
11:01 snarkyboojum yay for unfudges!
11:01 mberends Su-Shee: for a first application, copy and paste a few lines from fakedbi/t/10-mysql.t
11:02 Su-Shee mberends: no, I mean "use FakeDBD;" works. ;)
11:02 snarkyboojum would be awesome if you could do something like "./proto.pl search xyz" :)
11:03 mberends snarkyboojum: if you'd like to add that feature to proto, I'd be glad to help
11:03 snarkyboojum mberends: :)
11:03 Su-Shee now I used FakeDBI.
11:03 snarkyboojum mberends: might take you up on the offer if you think it'd be a nice idea
11:04 kaare joined #perl6
11:06 Su-Shee oh surprise. I actually need a mysqld as well ;)
11:07 mberends snarkyboojum: it's the "open source" way, write code that scratches *your* itch ;-)
11:07 snarkyboojum mberends: aye :)
11:08 moritz_ that's why I'm working on the Match objects right now
11:08 snarkyboojum moritz_++ :)
11:08 moritz_ $ ./perl6 -e 'say ("abc" ~~ /<alpha>(.)/).list'
11:08 moritz_ b
11:09 moritz_ $ ./perl6 -e 'say ("abc" ~~ /<alpha>(.)/).hash'
11:09 moritz_ alpha   a
11:09 moritz_ and it's really a Perl 6 hash
11:09 moritz_ and a Perl 6 List
11:16 christine joined #perl6
11:19 Su-Shee mberends: FakeDBD::mysql::Connection()<0xd8d4e10>
11:19 Su-Shee :)
11:20 am0c joined #perl6
11:21 isBEKaml joined #perl6
11:21 mberends Su-Shee: that's (half) good news, it may even be a database/permissions thing :)
11:21 Su-Shee no, it's plainly the say output of my $dbh :)
11:22 Su-Shee which I would interpret as a success I'm trying to say :)
11:23 mberends Su-Shee: ah, the $dbh doesn't have an Str() method. But you can probably try $dbh.do('CREATE TABLE yada( ..');
11:23 Su-Shee I'm at it.. :)
11:24 dalek rakudo: bbb336a | moritz++ | src/core/Match.pm:
11:24 dalek rakudo: make Match.list and Match.hash return Perl 6 objects
11:24 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​bb336a173b8bd5b740e7a4f10aea535fd38615a
11:25 lisppaste3 joined #perl6
11:26 isBEKaml hi, #perl6! My latest Rakudo build failed -> http://pastebin.com/HtUk6cEj
11:26 Su-Shee *tadaa* "1" ;)
11:27 mberends \o/
11:27 snarkyboojum isBEKaml: try a make realclean; perl Configure.pl --gen-parrot; make?
11:27 mberends Su-Shee++ # for motivation
11:27 isBEKaml snarkyboojum: done that already. perl Configure.pl --parrot-config to point to my latest parrot build.
11:28 isBEKaml parrot was built an hour ago.
11:28 snarkyboojum isBEKaml: I had a build failure this afternoon, and had to do a make real clean
11:28 Su-Shee mberends: let me put it that way: if I ignore the entire environment and just throw everything into @*INC and write stupidly DBI and just exchange -> with . it works perfectly fine. (though _seriously_ slow)
11:28 snarkyboojum but different error about Stringy or something
11:29 snarkyboojum isBEKaml: what platform are you building on?
11:29 isBEKaml snarkyboojum: linux x86 32 bit
11:29 mberends Su-Shee: very nice. sorry about the slowness :-/
11:29 Su-Shee mberends: not your fault :)
11:29 snarkyboojum isBEKaml: Mmm.. builds on for me
11:29 snarkyboojum *ok
11:30 * Su-Shee blames mysql from now on.
11:31 isBEKaml snarkyboojum: lemme try once again. I do make realclean and build. Somehow it failed this time. :(
11:31 snarkyboojum isBEKaml: good luck
11:33 snarkyboojum isBEKaml: you don't use Configure to get the right parrot for you, but build it separately?
11:33 snarkyboojum sorry, Configure.pl
11:34 isBEKaml snarkyboojum: I Configure and build parrot first and then use Rakudo's Configure.pl to point to the latest parrot_config
11:34 snarkyboojum oh
11:35 snarkyboojum I just use Configure.pl with --gen-parrot to get the parrot version in build/PARROT_REVISION and build it, before building rakudo
11:35 snarkyboojum that way it's just perl Configure.pl --gen-parrot; make; and I'm done
11:38 isBEKaml snarkyboojum: the problem with that is, it checks out everytime nuking it to get the same revision over again from the PARROT_REVISION file instead of just svn upping it.
11:38 snarkyboojum isBEKaml: it shouldn't
11:39 snarkyboojum unless the version has changed.. ok :)
11:40 isBEKaml snarkyboojum: I'm building rakudo again. hopefully, it should build this time . :)
11:41 snarkyboojum isBEKaml: but using --gen-parrot ensures you're building it against a revision everyone else is building it against at least
11:41 isBEKaml snarkyboojum: I'm bleeding edge! ;)
11:42 snarkyboojum isBEKaml: but rakudo may not build on latest parrot (as has happened recently quite a bit)
11:43 snarkyboojum isBEKaml: PARROT_REVISION is basically telling you what version of parrot plays nicely with bleeding edge rakudo :)
11:44 isBEKaml snarkyboojum: yeah, but I found the error message to be odd: Class '[ 'GatherIterator' ]' not found
11:44 isBEKaml snarkyboojum: I think, your error message was odd too. Stringy's just a role to String types and there's nothing in it. :)
11:44 snarkyboojum well I had a build error to do with masak's buf changes, doing a role stringy
11:45 snarkyboojum yeah - not sure why I had to do a make realclean :)
11:48 Su-Shee mberends: I'm managing do, prepare and execute - how would I do fetchrow_* etc?
11:49 mberends Su-Shee: the execute returns a resultset object that has a fetchrow_arrayref() method
11:49 Su-Shee ah.
11:50 redicaps joined #perl6
11:52 Su-Shee mberends: $sth = $dbh.prepare(bla); $result = $sth.execute; $result.fetchrow_array ?
11:52 mberends Su-Shee: the result from fetchrow_arrayref can be accessed as $result[0] .. $result[$result.elems-1]
11:53 Su-Shee first I need to get until something other then true :)
11:53 mberends Su-Shee: $sth = $dbh.prepare(bla); $result = $sth.execute; $row_ref = $result.fetchrow_arrayref; say $row_ref[0]
11:53 cognominal moritz_++   #  last patch. damn, within a few weeks I will lack  pretexts for whining.
11:53 skangas joined #perl6
11:55 Su-Shee ok, I'm getting errors at $result.fetchrow_arrayref ($result.fetchrow_array and so on): Method 'fetchrow_arrayref' not found for invocant of class 'Bool'
11:56 Su-Shee ah wait, I think I did something else wrong.
11:57 mberends Su-Shee: fetchrow_array not yet implemented, only fetchrow_arrayref and fetchall_arrayref so far.
11:59 Su-Shee mberends: http://pastebin.org/290012
12:00 * mberends looks
12:02 Su-Shee rakudo erlangen build with --gen-parrot.
12:03 snarkyboojum don't you need $sth.fetchrow_arrayref?
12:03 snarkyboojum not $result.fetchrow_arrayref?
12:04 Su-Shee snarkyboojum: <@mberends> Su-Shee: the execute returns a resultset object that has a  fetchrow_arrayref() method
12:04 colomon joined #perl6
12:04 * mberends has been known to confuse minor details like that
12:05 mberends Su-Shee: snarkyboojum++ is right
12:05 snarkyboojum but execute does 'return !defined $!errstr;'
12:05 snarkyboojum which is why you're getting a boolean
12:05 colomon moritz_++ pmichaud++
12:05 Su-Shee ah. then I've just tried the wrong method :)
12:06 snarkyboojum right method, wrong invocant :)
12:06 mberends Su-Shee: right method, wrong variab... er, what snarkyboojum++ said
12:06 Su-Shee no first I tried the right invocant with the wrong method :)
12:06 Su-Shee then the wrong invocant with the right method ;)
12:06 snarkyboojum that too :)
12:06 Su-Shee YAY! banshee@glampad:/home/banshee/Perl6> ./dbitest.pl
12:06 Su-Shee susi
12:06 meppl joined #perl6
12:07 isBEKaml banshee? :O
12:07 mberends wailing in the night
12:07 Su-Shee yeah my old nick which I keep as my username because half of my email adresses still use it
12:07 snarkyboojum w00t! working database Perl 6 stuff :)
12:07 isBEKaml yeah, why would anyone choose their username like that? :D
12:08 snarkyboojum mberends++
12:08 * Su-Shee show a bright future:
12:08 Su-Shee banshee@glampad:/home/banshee/Perl6> ./dbitest.pl
12:08 Su-Shee 133hasihoppi
12:08 Su-Shee isBEKaml: why not? I like my username
12:09 Su-Shee mberends: ok, so we can start high end data mining now. ;)
12:10 Su-Shee (that was a fetchall_arrayref instead of a fetchrow_arrayref)
12:10 isBEKaml Su-Shee: nice if you like it. (I thought the word bansee carried a negative image/connotation)
12:10 isBEKaml snarkyboojum: Don't know what happened. it just built now.
12:10 isBEKaml odd, whatever that was...
12:11 Su-Shee mberends: I hereby declare: everything working as supposed to :)
12:11 mberends Su-Shee++ # early adopter
12:12 Su-Shee to be honest: it took more time to prepare my mysql and put the the perl files into the right places then to figure out how to use it and actually do stuff. if you remove the preparations, it works straight forward.
12:12 isBEKaml Su-Shee++ ## 6 DB'd it! :)
12:13 snarkyboojum isBEKaml: a glitch in the matrix :)
12:13 isBEKaml mberends++ ## early explorer in P6 to DBs. :)
12:13 * mberends started implementing FakeDBD::AnyData, because of not having a clue how hard it could be
12:16 dju joined #perl6
12:17 mberends afk & # swimming
12:22 cognominal joined #perl6
12:23 colomon rakudo: ([[+]] 1, 20, 300, 4000).say
12:23 p6eval rakudo 5940b2: OUTPUT«Could not find sub &infix:<[+]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
12:24 colomon rakudo: my @a = 1..10; @a >>=<< 11..20; say @a.perl
12:24 p6eval rakudo 5940b2: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 18373 (src/builtins/Junction.pir:373)␤»
12:25 colomon rakudo: my @a = 1..10; @a >>=<< 11..20; say @a.perl
12:25 p6eval rakudo 5940b2: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 18373 (src/builtins/Junction.pir:373)␤»
12:28 rgrau joined #perl6
12:28 snarkyboojum weird, I can get a different error message in the REPL for a statement depending on what I've evaluated on a previous line
12:31 snarkyboojum if I start a REPL session, and do % enter, I get 'Confused at line 1...' then if I do ([[+]] 1, 20, 300, 4000).say with a leading space I get 'Confused at line 1, near " ([[+]] 1,'
12:32 Su-Shee HA! my @foo = $sth.fetchrow_array;
12:32 Su-Shee @foo.say;
12:32 Su-Shee 7susi
12:32 Su-Shee *lalala* :)
12:32 snarkyboojum if I do ([[+]] 1, 20, 300, 4000).say without leading space I get 'Could not find sub &prefix:<[[+]]>'
12:32 snarkyboojum esoteric behaviour depending on leading whitespace and a previous error
12:33 colomon rakudo: ([ [+] ] 1, 20, 300, 4000).say
12:33 p6eval rakudo 5940b2: OUTPUT«Confused at line 11, near "([ [+] ] 1"␤current instr.: 'perl6;HLL;Grammar;panic' pc 528 (ext/nqp-rx/src/stage0/HLL-s0.pir:348)␤»
12:33 colomon rakudo: ([ R[+] ] 1, 20, 300, 4000).say
12:33 p6eval rakudo 5940b2: OUTPUT«Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1989 (ext/nqp-rx/src/stage0/Regex-s0.pir:1052)␤»
12:34 Su-Shee rakudo: my @foo; @foo.push('bar'); @foo.push('baz'); @foo.say;
12:34 p6eval rakudo 5940b2: OUTPUT«barbaz␤»
12:35 Su-Shee rakudo: my @foo; @foo.push('bar'); @foo.push('baz'); @foo[0].say;
12:35 p6eval rakudo 5940b2: OUTPUT«bar␤»
12:36 isBEKaml rakudo: say [+] (1..5)
12:36 p6eval rakudo 5940b2: OUTPUT«15␤»
12:36 isBEKaml odd, that fails in the REPL
12:37 colomon rakudo: ([R[+]] 1, 20, 300, 4000).say
12:37 p6eval rakudo 5940b2: OUTPUT«Could not find sub &infix:<R[+]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
12:37 snarkyboojum rakudo: say [\+] (1..5)
12:37 p6eval rakudo 5940b2: OUTPUT«1361015␤»
12:38 snarkyboojum rakudo: say ([\+] 1..5).perl
12:38 p6eval rakudo 5940b2: OUTPUT«(1, 3, 6, 10, 15)␤»
12:39 dju_ joined #perl6
12:41 isBEKaml rakudo: say 55 \+ (25,35,45)
12:41 p6eval rakudo 5940b2: OUTPUT«Confused at line 11, near "say 55 \\+ "␤current instr.: 'perl6;HLL;Grammar;panic' pc 528 (ext/nqp-rx/src/stage0/HLL-s0.pir:348)␤»
12:43 rgrau_ joined #perl6
12:47 isBEKaml > say [+] (10,203,30,45, 500)
12:47 isBEKaml Could not find sub &prefix:<[+]>
12:47 isBEKaml > say [+] (0..5)
12:47 isBEKaml Could not find sub &prefix:<[+]>
12:47 isBEKaml Wrong first time, right second time Same error message?? :O
12:48 isBEKaml REPL fail. :(
12:48 pugssvn r30956 | colomon++ | [t/spec] A few wilder tests for nesting.
12:48 colomon >  say [+] (10,203,30,45, 500)
12:48 colomon 788
12:48 colomon >  say [+] (0..5)
12:48 colomon 15
12:48 colomon that's on my local build of the latest in github
12:49 isBEKaml me too. I built it just a while ago.
12:49 snarkyboojum colomon: do say 55 \+ (25,35,45) first
12:49 cognominal works here toot
12:49 snarkyboojum to get a 'Confused at line 1'
12:49 colomon snarkyboojum: say 55 \+ (25,35,45)
12:49 colomon ?
12:49 snarkyboojum it's along the lines of the weird behaviour I mentioned above
12:49 snarkyboojum yeah
12:50 snarkyboojum the repl seems to do weird things if you do anything to get a 'Confused at' error message
12:50 colomon > say 55 \+ (25,35,45)
12:50 colomon Confused at line 1, near "say 55 \\+ "
12:50 colomon > say [+] (10,203,30,45, 500)
12:50 colomon Could not find sub &prefix:<[+]>
12:50 colomon indeed.  weird
12:50 snarkyboojum that's it :)
12:50 isBEKaml yep.
12:50 isBEKaml :)
12:50 snarkyboojum that's what isBEKaml is seeing too
12:50 isBEKaml > say [{+}] (10,203,30,45, 500)
12:50 isBEKaml Unable to parse blockoid, couldn't find final '}' at line 1
12:51 isBEKaml I did this first and repeated the series of above tests and finally fail with the right statements. :)
12:52 isBEKaml I think it's something to do with statefulness in the REPL.
12:55 colomon +1
12:55 isBEKaml it remembers the previous error state and hits the same wrong end.
12:59 JimmyZ joined #perl6
13:02 snarkyboojum and only if the statement generating the error is run as the first command in the repl :)
13:02 redicaps joined #perl6
13:02 snarkyboojum otherwise it seems to be ok
13:04 isBEKaml no, doesn't seem to be so.
13:05 isBEKaml http://pastebin.com/cgR62Nmh
13:05 jnthn o/
13:05 isBEKaml \o
13:06 colomon \o
13:06 jnthn rakudo: say [+] (0..5)
13:06 p6eval rakudo bbb336: OUTPUT«15␤»
13:06 snarkyboojum isBEKaml: not always then :)
13:06 colomon rakudo: ([[+]] 1, 20, 300, 4000).say
13:06 p6eval rakudo bbb336: OUTPUT«Could not find sub &infix:<[+]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
13:06 jnthn > say [+] (0..5)
13:06 jnthn 15
13:06 jnthn colomon: ooh
13:07 colomon jnthn: if you do say 55 \+ (25,35,45) in your local REPL, normal [+] will fail afterward
13:07 colomon jnthn: I added some more tests to nesting.t this morning, too.  ;)
13:07 isBEKaml jnthn: or for that matter, any failing statement before the correct statement. :)
13:07 colomon afk
13:07 jnthn colomon: REPL problem for the most part though?
13:07 colomon that one is.
13:07 jnthn isBEKaml: The problem is probably that it generates the meta-op sub during the parse and marks it as generated
13:08 snarkyboojum isBEKaml: http://pastebin.com/vNePxL3R
13:08 snarkyboojum that works
13:08 jnthn However, a later error means we never compile and install that meta-op sub.
13:08 colomon the [[+]] is everywhere
13:08 jnthn But the parser still says "oh hey, I generated it"
13:08 jnthn Yeah, I think that's a Real Broken.
13:08 snarkyboojum ah, that would explain it
13:08 jnthn (the [[+]] one)
13:09 jnthn erg...I see why the nestings are busted.
13:09 jnthn OK, I can fix that later today. :-)
13:09 jnthn (people testing my code)++
13:11 snarkyboojum jnthn: the first example I gave doesn't use a previous metaop http://pastebin.com/Pp8AWaBZ
13:12 snarkyboojum or maybe I'm using the wrong terminology there
13:15 snarkyboojum so might be a different problem?
13:19 azert0x joined #perl6
13:19 isBEKaml snarkyboojum: I think what jnthn++ said made sense. I was looking over all the pastebins we put up, they seem to fit what he described.
13:20 snarkyboojum even though my example doesn't use a previous meta-op?
13:21 snarkyboojum or maybe a lone % does - I don't know :)
13:22 snarkyboojum but I don't think it would
13:26 jnthn wow, a lot of backlog and progress while I slept/read/whatevered.
13:26 jnthn :-)
13:27 isBEKaml :)
13:27 isBEKaml snarkyboojum: I'm not sure about the % generating the meta-op.
13:27 isBEKaml snarkyboojum: I don't know if it does.
13:28 isBEKaml jnthn: Does the REPL remember variables from history?
13:28 snarkyboojum well % doesn't even parse right?
13:28 jnthn isBEKaml: Not yet, that's one of the things pmichaud++ is working on
13:28 isBEKaml snarkyboojum: yeah, it doesn't and everything else that comes in after that fail, fails.
13:29 snarkyboojum isBEKaml: doesn't look like it
13:29 isBEKaml jnthn: Ok.
13:29 snarkyboojum unless you run the command first, in which case it works after a fail
13:30 isBEKaml snarkyboojum: yes, just saw that.
13:30 snarkyboojum anyway - I won't confuse the issue any more :)
13:32 * isBEKaml goes back to reading the Specs.
13:33 hudnix joined #perl6
13:42 jnthn rakudo: [][]
13:42 p6eval rakudo bbb336:  ( no output )
13:43 jnthn > say [[+]] 1,2,3,4,5;
13:43 jnthn 15
13:43 jnthn \o/
13:44 jnthn rakudo: say (1,2,3) >>[-]<< (4,5,6);
13:44 p6eval rakudo bbb336: OUTPUT«-3-3-3␤»
13:45 colomon \o/
13:45 jnthn Still got problems with some of The Others.
13:49 jnthn oh, I think I see why...
13:50 isBEKaml snarkyboojum: wait, here's something more. :D
13:50 isBEKaml http://pastebin.com/d3k9ZYpF
13:51 snarkyboojum isBEKaml: yep - same sort of thing, you've run the meta-op before the error and that continues to work, but no others do
13:51 isBEKaml snarkyboojum: yep, so % does seem to generate the meta-op.
13:51 snarkyboojum it does?
13:52 isBEKaml snarkyboojum: looks like it and failed when trying to install. So others seem to fail.
13:52 isBEKaml We have been going back and forth without any inputs from the gurus here. :) I'll defer to them to chime in... jnthn ?
13:54 snarkyboojum it's not just the % though, it's anything that generates that error like .
13:54 jnthn > say 1 R[R[R-]] 2
13:54 jnthn 1
13:54 jnthn > say 1 RR[R-] 2
13:54 jnthn 1
13:54 jnthn :-)
13:55 isBEKaml jnthn: uh, 1 ? shouldn't it be -1?
13:55 isBEKaml rakudo: say 1 [-] 2
13:55 p6eval rakudo bbb336: OUTPUT«-1␤»
13:55 jnthn isBEKaml: Odd number of Rs.
13:55 jnthn So it ends up as 2 - 1
13:55 jnthn :-)
13:56 isBEKaml ah, :)
13:56 jnthn rakudo: say 1 - 2
13:56 p6eval rakudo bbb336: OUTPUT«-1␤»
13:56 jnthn rakudo: say 1 R- 2
13:56 p6eval rakudo bbb336: OUTPUT«1␤»
13:56 jnthn rakudo: say 1 RR- 2
13:56 p6eval rakudo bbb336: OUTPUT«-1␤»
13:56 jnthn rakudo: say 1 RRR- 2
13:56 p6eval rakudo bbb336: OUTPUT«1␤»
13:56 jnthn :-)
13:56 jnthn I wish we had an A prefix meta-op
13:56 jnthn then you could write pirate Perl 6
13:56 jnthn 1 ARRRR 2
13:56 jnthn 1 ARRRR- 2 :-)
13:57 isBEKaml ARRR, har har har,, pirates of the perlibbean.. :)
13:57 Su-Shee *haha* :)
13:57 pmichaud good morning, #perl6
13:57 jnthn colomon: Do we have any tests for the R[R[R-]] bits?
13:57 jnthn yayitspmichaud!
13:57 isBEKaml EPARSEFAIL
13:58 isBEKaml morning, pmichaud !
14:00 jnthn pmichaud:
14:00 jnthn src/core/YOU_ARE_HERE.pm \
14:00 jnthn 220
14:00 jnthn +  src/core/Match.pm \
14:00 jnthn YOU_ARE_HERE probably wants to come last, though it's not a big deal.
14:00 pmichaud oh, yeah…
14:00 jnthn (as in, not a big deal under the way it's currently implemented)
14:01 jnthn pmichaud: On Positional and Associative (doing both), what was the problem?
14:01 jnthn pmichaud: A composition conflict, perchance?
14:01 pmichaud didn't look like one
14:01 colomon jnthn: nothing quite that complicated, but there are tests for one or two levels in nesting.t
14:01 jnthn OK, you're liable to get one.
14:01 pmichaud first stage problem was   method "Bool" not found for class Integer
14:01 jnthn colomon: I just looked in there, but saw nothing fudged.
14:01 jnthn pmichaud: Oh, oddness.
14:02 pmichaud yes, I know what is causing that
14:02 jnthn pmichaud: But if you're going to do both roles you will get a conflict you need to resolve at some point.
14:02 jnthn pmichaud: Because role Positional[::T = Mu] { ... method of() { T } }
14:02 * moritz_ back
14:02 jnthn And similar for Associative
14:02 pmichaud well, thus far I'm getting errors that aren't at all saying anything about conflicts
14:02 jnthn So you want a method of() { Mu }
14:02 jnthn OK
14:02 jnthn That was my first guess, anyways.
14:02 pmichaud just a sec and I'll bring it up to date
14:03 jnthn OK
14:03 jnthn If it's meta-model-y stuff I'd like to get it fixed. :-)
14:04 jnthn colomon: We pass all of it, but OTOH so I guess did Rakudo before I did these fixe
14:04 jnthn *fixes
14:04 cognominal in ::T = Mu (Mu is a default type parameter, just like value for parameters in routine signatures?
14:05 jnthn colomon: Correct
14:05 jnthn gah
14:05 jnthn cognominal: correct
14:05 cognominal jnthn++
14:08 moritz_ rakudo: say (gather take 3).sort.WHAT
14:08 p6eval rakudo bbb336: OUTPUT«Int()␤»
14:08 moritz_ that's pretty confusing
14:08 moritz_ I'd expect a List or a Parcel or Seq or so
14:08 jnthn o.O
14:10 moritz_ anyway, I'm confident that was a bit of fiddling I'll be able to implement .caps and .chunks pretty soon
14:10 kel_ joined #perl6
14:10 pmurias joined #perl6
14:11 moritz_ commit bbb336 prepared the basics
14:11 jnthn moritz_++
14:12 moritz_ akshually 9 of the first 10 test for .caps and .chunks pass
14:13 jnthn colomon: oh lol, I just hadn't svn up'd the test suite
14:13 jnthn jnthn--
14:15 moritz_ rakudo: say list(gather { take 1; say 1; take 2; say 2 } )
14:15 p6eval rakudo bbb336: OUTPUT«1␤2␤12␤»
14:20 Su-Shee wtf? my fakedbi oeh.. went stale. what does "Null PMC access in can()
14:20 Su-Shee mean?
14:20 Su-Shee that some method can't be called? is not found?
14:20 Su-Shee died of a sudden death?
14:20 jnthn Su-Shee: Something happened that really shouldn't have. :-/
14:21 moritz_ died a sudden death
14:21 jnthn Su-Shee: Can you no-paste the backtrace?
14:21 Su-Shee sure. sex.
14:21 Su-Shee sec :)
14:21 Su-Shee man :)
14:21 jnthn ...
14:21 Su-Shee I think "perl 7" is a safer name. ;)
14:22 Su-Shee jnthn: http://pastebin.org/290189
14:22 jnthn Some kid was watching a rocket launch with his dad once suddenly came out with "dad, what's sex?" Turned out he meant the "10 secs" on the countdown. :-)
14:23 jnthn Su-Shee: Eww
14:23 Su-Shee databases confuse me.
14:24 Su-Shee oh wait do I just missed the execute?
14:24 Su-Shee forget it.
14:24 Su-Shee GNAGNA. ;)
14:24 jnthn Ah
14:25 jnthn But it probably means we're missing a NULL check somewhere.
14:25 jnthn Most likely in Zavolaj.
14:25 Su-Shee must have accidently dd'ed it.
14:25 jnthn Should have got some complaint about an undefined variable rather than a NPMCA.
14:25 Su-Shee yes works again.
14:26 jnthn \o/
14:27 moritz_ rakudo: class A { multi method a() { }; multi method a() { } }
14:27 p6eval rakudo bbb336:  ( no output )
14:27 moritz_ rakudo: class A { multi method a() { }}; use MONKEY_TYPING; augment class A { multi method a() { } }
14:27 p6eval rakudo bbb336: OUTPUT«A method named 'a' already exists in class 'A'. It may have been supplied by a role.␤current instr.: 'perl6;ClassHOW;add_method' pc 4969 (src/metamodel/ClassHOW.pir:502)␤»
14:27 Su-Shee and has something which starts to resemble "fetchrow_hashref"
14:27 moritz_ that's a bug, right?
14:28 jnthn moritz_: Looks like it.
14:28 moritz_ any masaks around?
14:28 moritz_ looks like not
14:28 jnthn oh noes, how will we get an RT ticket filed?
14:28 Su-Shee moritz_: well write a FakeMasak then!
14:29 jnthn pmichaud: about?
14:29 Su-Shee jnthn: can I try writing fetchrow_hashref?
14:29 * moritz_ submitted bug report
14:30 jnthn mberends: What Su-Shee asked, if you're about. :-)
14:30 jnthn Su-Shee: But I'm sure mberends++ would welcome patches. :-)
14:30 moritz_ just do it :-)
14:30 moritz_ Su-Shee: and if you have a github ID, I can give you commmit access to fakedbi
14:30 moritz_ hugme: show fakedbi
14:30 hugme moritz_: the following people have power over 'fakedbi': P⁣erlJam, T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣berends, m⁣oritz_, p⁣michaud, s⁣orear. URL: http://github.com/mberends/fakedbi/
14:31 Su-Shee ok. first I need mozarella caprese. then I touch databases again.
14:33 moritz_ jnthn: how do I iterate over a ResizablePMCArray in rakudo?
14:33 moritz_ in Perl 6 code :-)
14:33 isBEKaml in #perl6, do we have to be explicit? :-)
14:34 isBEKaml moritz_: ^^ :P
14:34 moritz_ well, I know how to iterate over a RPA in PIR
14:34 moritz_ and over a Perl 6 array in Perl 6
14:34 pmichaud simplest is probably to convert the rpa to a Seq and then iterate over that.
14:34 jnthn Aye
14:35 moritz_ Seq.new($RPA) ?
14:35 pmichaud should work.
14:35 pmichaud RPAs are basically parcels
14:35 pmichaud (parcels are basically rpas)
14:36 jnthn pmichaud: I want to try and get decent backtraces in, and am thinking it may be nice to provide an overridable method in HLL::Compiler
14:36 jnthn pmichaud: Then languages can implement it to do their own thing.
14:36 pmichaud jnthn: that's what I'd like also :-)
14:36 pmichaud so, +1
14:36 jnthn pmichaud: OK. Any ideas what to call it, and where to hang to call for it?
14:36 pmichaud I'd even like HLL::Compiler to provide a sane deffault
14:36 pmichaud oh, how about 'display_backtrace' ?
14:37 pmichaud or 'dump_backtrace'
14:37 jnthn That'd work. Do we want a seperate one for when in the repl too?
14:37 pmichaud or even 'backtrace'
14:37 pmichaud just do the basic one to begin with, and I'll take a look at it
14:37 moritz_ somhow  'for Seq.new($rpa)' only does one iteration, even though $rpa has two items
14:37 pmichaud I'll have a better idea then where it should go and when
14:38 pmichaud moritz_: maybe  Seq.new($rpa).eager
14:38 moritz_ I'm iterating over indexes now
14:38 moritz_ that's ugly, but it works
14:38 moritz_ \o/ most .caps/.chunks tests pass
14:39 moritz_ only failure: $/.chunks should return a List, returns a GatherIterator
14:39 moritz_ I'll fudge that one
14:39 jnthn pmichaud: The thing is that it seems we might want to put it in eval
14:39 jnthn pmichaud: But that isn't really want we want either
14:39 jnthn Since that's what other languages call to eval our code.
14:40 jnthn pmichaud: Not to mention that interactive expects to call it and get the exception.
14:40 pmichaud jnthn: I don't think it belongs in eval, no
14:40 jnthn pmichaud: Below that is only HLLCompiler.command_line and HLLCompiler.main
14:41 pmichaud it could go in evalfiles
14:41 pmichaud and I'm fine if it goes in .main
14:41 jnthn pmichaud: But that's not in the call chain if we do perl6 -e "...awful things..."
14:41 pmichaud er, .commandline
14:42 pmichaud .commandline would certainly in the call chain, wouldn't it?
14:42 pmichaud *certainly be
14:42 jnthn pmichaud: Yes, that always is.
14:42 jnthn pmichaud: That seems workable.
14:42 pmichaud start with commandline then
14:42 jnthn pmichaud: OK. Seems we inherit that one form PCT::HLLCompiler.
14:42 jnthn Which is...in the Parrot repo?
14:42 pmichaud oh, ick.
14:42 pmichaud yes, in the Parrot repo
14:42 jnthn Hm
14:43 jnthn Well, we could put the .backtrace in nqp-rx of course
14:43 jnthn Like, check if there is a .backtrace method
14:43 jnthn If yes, call it
14:43 pmichaud start with that
14:43 jnthn If no, just re-throw
14:43 jnthn OK
14:43 isBEKaml hey, speaking about backtraces, wouldn't it be nice if we have line numbers or there abouts indicated by the compiler when it barfs?
14:44 jnthn isBEKaml: We do for compile time errors, it's the runtime ones we seem to suck at.
14:44 jnthn isBEKaml: That's what I'm working on fixing. :-)
14:44 isBEKaml oh, jnthn++ (I'd really like that)
14:46 pugssvn r30957 | moritz++ | [t/spec] brush up caps.t, and fudge it for rakudo
14:47 * moritz_ loves to see his pushes rejected by github
14:47 tedv| joined #perl6
14:47 moritz_ becaues it means somebody else hacked on rakudo in the mean time :-)
14:48 dalek rakudo: 9085183 | jonathan++ | src/Perl6/Actions.pm:
14:48 dalek rakudo: Tweak some name canonicalization/non-canonicalization bits for R[R[-]] style
14:48 dalek rakudo: things. Fixes RT#75402.
14:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​085183cde6de0c0cef6ebea8c324937b4185522
14:48 dalek rakudo: f2896c3 | jonathan++ | src/ (2 files):
14:48 dalek rakudo: Rename notresults to negate, to be in line with S03.
14:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​2896c3f43148b407d77bb84303ca7cad1de8c97
14:48 dalek rakudo: 8c14284 | moritz++ | src/core/Match.pm:
14:48 dalek rakudo: [Match] .caps and .chunks
14:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​c142841c3db54820a185957248e32e577b767ad
14:49 moritz_ pmichaud: did you realize that you commited 327050ef3d0d452dd43b7855df8b411f1b4a88a6 (YOU_ARE_HERE wants to be last in the core setting) to the branch that I already merged?
14:49 pmichaud moritz_: I did not realize that, no.  :)
14:49 pmichaud not until just now.  :)
14:49 pmichaud I'll move to the other branch :-)
14:49 pugssvn r30958 | jnthn++ | [t/spec] Couple more nesting and bracketed infix tests.
14:50 moritz_ pmichaud: should I delete the branch, in order to avoid such confusion in future?
14:50 moritz_ (after cherry-picking to master)
14:50 pmichaud yes, please
14:51 moritz_ done
14:51 pmichaud excellent, thanks.
14:51 moritz_ that git branching model is really powerful, once you've grokked it :-)
14:54 dalek rakudo: ffb9a36 | pmichaud++ | build/Makefile.in:
14:54 dalek rakudo: YOU_ARE_HERE wants to be last in the core setting (jnthn++).
14:54 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​fb9a368a45594640546f1e31c92b78b3a82347e
15:03 jnthn rakudo: my rule test {test}; "test" ~~ /<test>/; say $/.keys.perl;
15:03 p6eval rakudo bbb336: OUTPUT«Method 'test' not found for invocant of class 'Cursor'␤current instr.: '_block65' pc 626 (EVAL_1:23214921)␤»
15:03 jnthn rakudo: my rule test {test}; "test" ~~ /<&test>/; say $/.keys.perl;
15:03 p6eval rakudo bbb336: OUTPUT«()␤»
15:03 Su-Shee is this still the latest? http://svn.pugscode.org/pugs/util/perl6.vim
15:03 jnthn rakudo: my rule test {test}; "test" ~~ /<test=&test>/; say $/.keys.perl;
15:03 p6eval rakudo bbb336: OUTPUT«()␤»
15:03 moritz_ Su-Shee: nope
15:03 pmichaud .keys is very unlikely to work yet
15:03 jnthn rakudo: my rule test {test}; "test" ~~ /<test=&test>/; say %($/).keys.perl;
15:03 p6eval rakudo bbb336: OUTPUT«()␤»
15:03 jnthn pmichaud: OK :-)
15:04 jnthn pmichaud: Just trolling Rakudo for closable RT tickets. :-)
15:04 moritz_ what *should* .keys on a match object return?
15:04 pmichaud I've been wondering where .keys should go
15:04 pmichaud .keys on Match should probably fail
15:04 pmichaud or it would return   @().keys, %().keys
15:04 pmichaud (i.e., the union of all keys)
15:04 moritz_ I'd prefer that
15:05 jnthn pmichaud: http://rt.perl.org/rt3/Tic​ket/Display.html?id=62528 seems to want it to be the same as %().keys
15:05 jnthn oh, maybe not
15:05 jnthn it'd work if it returned the union in that case too
15:05 jnthn (since there's no positional captures)
15:05 pmichaud at any rate, all of the array and hash methods still need a ton of work (not just on Match)
15:06 moritz_ aye
15:06 pmichaud I was a little surprised to see that Hash ~~ EnumMap
15:06 pmichaud and postcircumfix:<{ }> on EnumMap is returning a proxy
15:06 pmichaud probably shouldn't be a proxy there
15:06 jnthn pmichaud: EnumMap seems to be the new name for Mapping
15:07 pmichaud (since it's immutable)
15:07 jnthn pmichaud: Hmm, good point.
15:07 pmichaud anyway, I'll be going through those today+tomorrow and seeing if I can get lists and hashes cleaned up
15:07 pmichaud rather than try to stuff a bunch of things into Match just to get it to do workarounds too
15:08 jnthn *nod*
15:20 mberends Su-Shee, moritz_, jnthn: FakeDBI patches definitely welcome. Better still, ++busnumber
15:23 Su-Shee mberends: I'm getting my feet wet with fetchrow_hashref right now.
15:23 mberends :-)
15:28 mberends Su-Shee: fetchrow_array might be easier to begin with because column names are hard to implement portably.
15:28 patspam joined #perl6
15:30 Su-Shee already have half of it.
15:30 Su-Shee had to do a little relationship argument in the meanwhile wether or not DBI _has_ fetchrow_array ;)
15:32 pmichaud jnthn: if you want to see the current difficulty I'm having with "does Associative does Positional", update to the latest version of trunk and add "does Positional" to src/core/Match.pm
15:32 pmichaud nopasting the error I'm currently getting....
15:33 mberends Su-Shee: and one request soon to be included in the README: please keep it backward compatible with classic DBI v1 ;)
15:34 Su-Shee mberends: do I want to know what that means?
15:34 pmichaud interesting... paste.lisp.org no longer lists #perl6 as a channel
15:35 pmichaud jnthn: http://nopaste.snit.ch/20720
15:35 dalek rakudo: c491a18 | pmichaud++ | src/core/operators.pm:
15:35 dalek rakudo: Enable &prefix:<?> to work on foreign objects.
15:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​491a184fa347d130f3b35b6c176c4dd1d56f0fa
15:38 jnthn pmichaud: investigating
15:40 mberends Su-Shee: before we become bold and invent new API definitions (such as "fetch_column_names" or whatever), let's be able to sanity check our work by being able to switch application code between Perl 6 and Perl 5 with as few syntax changes as possible.
15:43 colomon foreign objects?  I feel like I must have missed something cool while I was out herding 2 year olds....
15:43 pmichaud colomon: foreign objects are those that aren't part of the Rakudo hierarchy
15:43 pmichaud e.g., Parrot objects
15:44 colomon pmichaud: sure, but why did you do it now?  that's the interesting question...  :)
15:44 jnthn pmichaud: In the meantime, see http://gist.github.com/418336
15:44 pmichaud colomon: oh.  when I add 'does Positional' to Match, the role composer ends up making a call to &infix:<===> which in turn ends up making a call to &prefix:<?>
15:44 pmichaud which in turn attempt to call .Bool on whatever argument is passed
15:45 pmichaud but at the time that this is taking place, parrot Integers don't have a 'Bool' method yet
15:45 jnthn pmichaud: oh argh, that patch sucks...ignor eit.
15:45 pmichaud (that doesn't come until later)
15:46 pmichaud and we have a Parrot integer because it got autoboxed from within  &infix:<===>(Integer, Integer)
15:46 pmichaud so, at that point the Parrot Integer is a "foreign object" that doesn't know how to respond to .Bool, but it does know how to respond to VTABLE_boolean, so we use that.
15:46 pmichaud jnthn: umm.... what patch?
15:46 jnthn pmichaud: :-)
15:46 jnthn pmichaud: The one in the gist
15:46 pmichaud oh
15:47 pmichaud I didn't see that :)
15:47 colomon pmichaud: gotcha.  interesting and cool.
15:47 jnthn pmichaud: For what you've run into, it's that the role composer tries to get the name of a method by doing .name on it
15:47 jnthn pmichaud: Which fails on Parrot subs.
15:48 jnthn pmichaud: Going to just stringify it instead, since it stringifies to its name for Perl 6 and Parrot ones.
15:48 pmichaud jnthn: +1
15:48 jnthn pmichaud: Hopefully that deals with it.
15:48 pmichaud colomon: we do a similar thing for .[] and .{} also -- if the target object doesn't have the appropriate method, then we fall back to parrot's vtable interface
15:49 jnthn pmichaud: The awkward thing we may hit is if you want to compose Positional into something and then after that write another multi postcircumfix:<[ ]> in the class.
15:49 pmichaud jnthn: I don't need the postcircumfix:<[ ]> there if "does Positional" works.
15:49 Su-Shee mberends: is there a reason for the loop with $i instead of for $native_row -> $bla ... ?
15:49 jnthn pmichaud: OK
15:50 pmichaud (and "does Positional" works if "does Associative" isn't present... but then other things break)
15:51 mberends Su-Shee: a rather trivial reason: it was the least-change translation of the Perl 5 equivalent test, for easy reference in case it went wrong somewhere.
15:53 Su-Shee mberends: in $native_row[last_element_of_my_row] is something like this: udofoobarfoobardatadata
15:54 Su-Shee what's that?
15:54 mberends eek, probably a bug or a NYI bit
15:55 mberends hopefully not an off-by-one error, indexing beyond end of array
15:55 mberends the native array is not as error-friendly as a Rakudo array
15:56 Su-Shee it segfaults if I grab an index beyong.
15:56 Su-Shee beyond.
15:56 jnthn pmichaud: Gah, well, that only gets us a little further... :-/
15:57 jnthn Method 'multi' not found for invocant of class 'Sub'
15:58 jnthn Well, can workaround that too.
15:58 pmichaud jnthn: yeah, that's what I was starting to see -- a bunch of little pieces that seem to get us one smaller step along.
15:58 pmichaud would it help if Positional was written in p6?
15:58 jnthn pmichaud: *very* much so
15:58 jnthn pmichaud: These kinds of things are why Associative is.
15:58 mberends Su-Shee: that may be a(nother) reason to stick to a C-style loop
15:58 pmichaud okay
15:59 jnthn pmichaud: Here's the thing that got me *really* stuck though.
15:59 jnthn pmichaud: It seems we want to ahve the commonalities in Associative and Positional.
15:59 jnthn pmichaud: e.g. handling slices etc
15:59 jnthn pmichaud: And then classes implementing the role would supply the way to get just one attribute.
15:59 Su-Shee mberends: also it seems that I can't treat a native array the same way as rakudo arrays?
15:59 jnthn pmichaud: gah, just one item.
15:59 jnthn For a single numeric index.
15:59 Su-Shee mberends: like de-referencing it?
16:00 jnthn pmichaud: Trouble is, the composition will end up failing because you have a Parrot multi and along with it a Perl 6 multi.
16:00 * Su-Shee sticks with the c loop.
16:00 jnthn pmichaud: And are trying to combine them into one.
16:00 pmichaud jnthn: right, I recognize that.  :-)
16:00 jnthn pmichaud: So may just be best to bite the bullet and move Positional to core.
16:00 jnthn pmichaud: There's no problem at all with adding a role to a class through augmnet.
16:01 pmichaud jnthn: okay.  Well, you could try one more workaround, or I could work on moving Positional to core (or some combination of the two)
16:01 pmichaud I'm inclined to do the latter
16:01 jnthn pmichaud: Do the latter
16:01 pmichaud okay
16:01 jnthn pmichaud: Because otherwise we only get more problems further down the line.
16:01 pmichaud adding a role to a class with augment is    augment class Foo does Bar { }    ?
16:02 jnthn pmichaud: Also, by taking Numeric rather than ['Integer'] will fix other problems we have.
16:02 jnthn pmichaud: Yes, exactly that. :-)
16:02 pmichaud jnthn: okay.  I'll work on that.
16:02 jnthn OK
16:02 pmichaud it'll help prep for list refactors too.
16:02 pmichaud afk for a bit
16:05 mberends Su-Shee: correct, the NativeArray supports far fewer operations than a Perl array, and not de-referencing. "does Positional" is more of a hint of what you can *try*, not that it fully delivers it all :-/
16:06 Su-Shee mberends: I stopped trying to be fancy and went with the $i loop.
16:07 rv2733 joined #perl6
16:08 mberends Su-Shee: ok
16:10 Su-Shee mberends: this is what I've changed: http://pastebin.org/290353
16:11 mberends Su-Shee: looks perfect!
16:11 jnthn mberends: It may be best to iterate over the native array and pull the things out into a Perl 6 array.
16:11 jnthn mberends: Rather than letting that leak out more widely.
16:12 jnthn mberends: Though maybe Zavolaj should somewhat try to take care of that too.
16:13 mberends jnthn: that's how we're doing it in a C-style loop, to not expect too much from NativeArray
16:14 jnthn mberends: oh, you're not returning the NativeArray from FakeDBI?
16:14 Su-Shee I didn't know that's why I poked in its guts. ;)
16:14 jnthn If so, good. :-)
16:15 mberends jnthn: it copies element-wise from NativeArray to a Perl 6 array
16:15 jnthn mberends++
16:15 jnthn Excellent.
16:17 mberends Su-Shee: do you have a github ID?
16:18 Su-Shee yes. "Su-Shee" :)
16:18 Su-Shee http://github.com/Su-Shee
16:19 moritz_ hugme: add Su-Shee to fakedbi
16:19 * hugme hugs Su-Shee. Welcome to fakedbi!
16:19 mberends ++moritz_ # beat me to it
16:20 moritz_ rakudo: 'abc' ~~ /<alpha>+/; say $<alpha>».uc
16:20 p6eval rakudo bbb336: OUTPUT«Method 'list' not found for invocant of class 'ResizablePMCArray'␤current instr.: '!dispatch_method_parallel' pc 357 (src/glue/dispatch.pir:71)␤»
16:20 moritz_ rakudo: 'abc' ~~ /<alpha>+/; say list($<alpha>)».uc
16:20 p6eval rakudo bbb336: OUTPUT«ABC␤»
16:20 moritz_ jnthn: any objections to changing the invocation in the parallel dispatcher to a sub call instead of method call?
16:21 Su-Shee hm, do I see somewhere within _my_ github realm that I can commit to another repository?
16:21 jnthn pmichaud: http://gist.github.com/418336 works; if it looks right to you I'll commit it. We can't always catch the exception and re-throw it, or else we lose most of the back trace (tried throw and rethrow).
16:21 moritz_ Su-Shee: yes, on your dashboard (ie github.com/ front page)
16:21 jnthn pmichaud: Once that's in, I'll dig into writing the Rakudo backtrace printer. :-)
16:22 jnthn moritz_: I guess >> is meant to put things in list context, so list(...) may well be more correct anyway.
16:22 Su-Shee ah, there it is :)
16:22 pmichaud what is >> now?
16:22 * jnthn afk for a bit
16:22 pmichaud does it do .list ?
16:23 moritz_ yes
16:23 jnthn pmichaud: As in
16:23 jnthn $foo>>.blah
16:23 pmichaud seems to me that it will need to remain .list
16:23 jnthn ah, I think you had got that :-)
16:23 pmichaud because  list($foo)   is still a single element.
16:23 moritz_ huh?
16:23 pmichaud (even if $foo is an array)
16:24 moritz_ rakudo: my $x = [1, 2, 3]; .say for list($x)
16:24 p6eval rakudo bbb336: OUTPUT«123␤»
16:24 moritz_ indeed
16:24 moritz_ I'm surprised
16:24 jnthn rakudo: my $x = [1, 2, 3]; .say for $x.list
16:24 p6eval rakudo bbb336: OUTPUT«1␤2␤3␤»
16:24 jnthn Aha.
16:24 jnthn ok, bbi30
16:25 pmichaud rakudo:  my $x = <a b c>;   say $x>>.uc
16:25 p6eval rakudo bbb336: OUTPUT«ABC␤»
16:26 moritz_ rakudo: say <a b c>>>.uc
16:26 p6eval rakudo bbb336: OUTPUT«ABC␤»
16:26 moritz_ rakudo: say <a b c>».uc
16:26 p6eval rakudo bbb336: OUTPUT«ABC␤»
16:26 moritz_ the really odd thing is: inside a module I get a syntax error for »
16:26 moritz_ but it parses with >>
16:26 moritz_ will try to reproduce...
16:27 pmichaud rakudo:  my $x = [1, 2, 3];  .say for $x.list
16:27 p6eval rakudo bbb336: OUTPUT«1␤2␤3␤»
16:28 pmichaud (ah, jnthn++ already tried that one)
16:31 moritz_ so should it be list($obj).list ? :-)
16:33 pmichaud no
16:33 pmichaud $obj.list is sufficient
16:33 moritz_ ... unless $obj is a foreign object
16:34 pmichaud in this case, it just means we have to get .list working
16:34 pmichaud on Match
16:34 moritz_ .list works on Match :-)
16:34 pmichaud is it returning a flattening list?
16:35 pmichaud rakudo:  'abc' ~~ /<alpha>+/;  .say for $<alpha>
16:35 p6eval rakudo bbb336: OUTPUT«a␤b␤c␤»
16:35 moritz_ good question... at least it returns a Perl 6 list
16:35 pmichaud that's wrong.
16:35 moritz_ oops
16:36 moritz_ wait
16:36 TimToady rakudo: .say for [<a b c>]
16:36 p6eval rakudo bbb336: OUTPUT«abc␤»
16:36 moritz_ I thought list() was non-flattening, and .list was flattening?
16:36 pmichaud list() flattens objects that flatten
16:37 pmichaud $<alpha> isn't a flattening object (because of the $)
16:37 pmichaud although
16:37 pmichaud perhaps I'm wrong there
16:37 pmichaud since it's really $/{'alpha'}, which *would* flatten
16:37 moritz_ rakudo: .say for [<a b c>].list
16:37 p6eval rakudo bbb336: OUTPUT«a␤b␤c␤»
16:37 moritz_ pmichaud: is that wrong too?
16:38 pmichaud that's right
16:38 pmichaud rakudo: .say for list([<a b c>])
16:38 TimToady modulo it's supposed to be .flat, as of Feb
16:38 p6eval rakudo bbb336: OUTPUT«abc␤»
16:38 pmichaud that's also right.
16:38 mberends Su-Shee: to be able to commit, you may have to edit fakedbi/.git/config and change "git://github.com/" to "git@github.com:"
16:38 TimToady shouldn't the stringifier insert spaces
16:38 TimToady ?
16:38 pmichaud TimToady: yes, I think it should.
16:39 pmichaud TimToady: I'm not sure what's up with that -- I'm pretty sure that worked at one time
16:39 pmichaud anyway,  .list  (really .flat)  will convert a non-flattening scalar into a flattening list
16:39 Su-Shee mberends: will do.
16:39 pmichaud while list(...)  creates a list, flattening any of the items inside that are naturally flattening
16:40 pmichaud (i.e., that aren't scalars)
16:40 moritz_ Match.list uses the sub form internally
16:40 moritz_ so that's probably what's wrong
16:40 moritz_ it was the only way I found that would turn a RPA into a Perl 6 list
16:41 TimToady so flat([1,2,3]) stays [1,2,3], i.e. non-flat
16:41 pmichaud of course, the issue here is that $<alpha>  isn't a Match object to begin with, so Match.list doesn't apply anyway :)
16:41 moritz_ I should probably create a new Seq, and setattribute '$!stoarge' it
16:42 moritz_ ah, right
16:42 TimToady re $<foo> vs $/<foo>, I suspect we should make those act like var vs expr
16:42 moritz_ rakudo: .say for 'abc' ~~ /(.)(.)(.)/
16:42 p6eval rakudo bbb336: OUTPUT«abc␤»
16:42 pmichaud TimToady: what about   $<foo bar>  ?
16:42 TimToady which is an argument that the flatten flag is basically syntactically applied
16:43 pmichaud (the flatten flag is already syntactically applied for the most part)
16:43 TimToady well, that's an interesting corner case, but I'd argue to treat as a variable for consistency, i think
16:43 pmichaud for now I think I'd prefer that $<foo> and $/{'foo'}  continue to act the same.
16:44 pmichaud I think that's generally more consistent.
16:44 TimToady mebbe
16:44 pmichaud (I can see the other side -- since I fell victim to that interpretation myself above :-)
16:45 TimToady just have to figure out which way we want to answer the FAQ :)
16:45 TimToady probably have to drop offline for a bit now
16:45 pmichaud well, let me get a chance to clean it up over the next couple of weeks before we decide :)
16:45 TimToady bi ~ 1hr or so
16:45 TimToady &
16:51 moritz_ pmichaud, jnthn: with http://nopaste.snit.ch/20721 the ».meth parallel dispatch also works on RPAs is it the wrong approach? (feels a bit like it)
16:52 pmichaud it's wrong.
16:52 pmichaud the correct solution is likely to add a .list method to RPA
16:53 moritz_ ok
16:53 pmichaud I'm not sure I want to be auto-flattening other foreign objects just yet
16:55 pmichaud but also, every workaround that gets added in now to try to get .list and list() to behave is making the overall task of fixing/refactoring lists and iterators that much harder.
16:56 pmichaud (to make .list and list() behave in corner cases, that is)
16:56 moritz_ right
16:57 moritz_ rakudo: my $x = (1, 2, 3); $x.push(3); say $x
16:57 p6eval rakudo c491a1: OUTPUT«Method 'push' not found for invocant of class 'Seq'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:57 moritz_ rakudo: my $x = (1, 2, 3); push $x, 5; say $x
16:57 p6eval rakudo c491a1: OUTPUT«1 2 3 5␤»
16:57 moritz_ heh :-)
17:00 pmichaud wtf?
17:00 pmichaud rakudo:  my $x = (1, 2, 3);  say $x.WHAT
17:00 p6eval rakudo c491a1: OUTPUT«Seq()␤»
17:00 pmichaud *sigh*
17:01 moritz_ that used to be a Parcel, no?
17:01 pmichaud no, because it's being placed into item context
17:01 pmichaud rakudo:  say (1,2,3).WHAT
17:01 p6eval rakudo c491a1: OUTPUT«Parcel()␤»
17:01 pmichaud that's a parcel :)
17:03 pmichaud ahhhh, method push in Array needs to have a type constraint on the invocant, I guess
17:03 pmichaud I guess we're not automatically constraining invocants yet?
17:03 jnthn pmichaud: No
17:04 pmichaud okay.  I can make it explicit.
17:04 xinming_ joined #perl6
17:04 jnthn pmichaud: Like many things..."I really need to fix that."
17:04 jnthn pmichaud: Did the gist I pasted look OK?
17:04 pmichaud jnthn: I'm very familiar with that feeling.
17:04 pmichaud jnthn: +1 from me on the gist
17:04 jnthn pmichaud: Great.
17:04 pmichaud if it doesn't work out, we still have time to change it around :)
17:04 pmichaud and I may end up rewriting it in NQP anyway
17:05 jnthn I plan to write the actual backtrace printer in NQP
17:05 pmichaud +1
17:05 jnthn And just call it from Compiler.pir
17:05 pmichaud I will greatly appreciate that :-)
17:05 jnthn I'd like that to be compiler.nqp one day
17:05 jnthn But...we .include loads of stuff so it's be not quite trivial to do. :)
17:05 pmichaud me too, ... exactly.  :-)
17:05 pmichaud anyway, afk lunch here
17:06 Su-Shee hugme: shun mysql's c api.
17:10 Su-Shee mberends: I add a test accordingly in 10-mysql.t?
17:10 mberends Su-Shee: yes please!
17:11 Su-Shee mberends: it's highly fascinating what data I can pull from those native arrays..
17:11 mberends oooh!
17:11 Su-Shee I just looked around :)
17:12 cognominal rakudo:  [and] (defined, length)>> :("foo")   #  I have probably no idea of what I am doing. But what the heck
17:12 p6eval rakudo c491a1: OUTPUT«Confused at line 11, near "[and] (def"␤current instr.: 'perl6;HLL;Grammar;panic' pc 528 (ext/nqp-rx/src/stage0/HLL-s0.pir:348)␤»
17:13 jnthn wtf :-)
17:13 jnthn cognominal: I have no idea what you're doing either. ;-)
17:14 BrowserUk joined #perl6
17:14 Ross joined #perl6
17:14 cognominal I want to multiplex the arguments to apply them to many function than to apply an  and the the resulting array. leaving aside that  and introduce a sequence point.
17:15 cognominal s/then/
17:16 cognominal do you see what I mean?
17:16 jnthn Maybe  all(&defined, &length).("foo")
17:17 jnthn Though length doesn't exist any more :P
17:17 cognominal you got the idea
17:17 cognominal yes, that was originally a question about perl5 style that led me to that.
17:17 jnthn though closer tow hat you had maybe is
17:17 moritz_ [and] (&defined, &chars)».("foo")
17:17 jnthn (&defined, &chars)>>.("foo") works
17:18 jnthn rakudo: say [and] (&defined, &chars)>>.("foo")
17:18 p6eval rakudo c491a1: OUTPUT«Could not find sub &infix:<and>␤current instr.: '' pc -1 ((unknown file):-1)␤»
17:18 jnthn well :-)
17:18 moritz_ try [&&] instead
17:18 jnthn rakudo: say [&&] (&defined, &chars)>>.("foo")
17:18 cognominal so you say :)
17:18 p6eval rakudo c491a1: OUTPUT«Could not find sub &infix:<&&>␤current instr.: '' pc -1 ((unknown file):-1)␤»
17:18 moritz_ oh
17:18 moritz_ it's a syntactic form
17:18 jnthn moritz_: well, usually it's compiler-special
17:18 jnthn moritz_: We can add a multi too in order to make that work, I guess
17:18 isBEKaml How do I convert a Num to an Int ?
17:18 jnthn .Int
17:19 moritz_ or rounding
17:19 moritz_ round(), ceiling(), floor()
17:19 isBEKaml rakudo: 36.5414.Int.say;
17:19 moritz_ jnthn: I thought I already did that once
17:19 p6eval rakudo c491a1: OUTPUT«36␤»
17:19 moritz_ jnthn: but maybe that was in alpha
17:20 isBEKaml rakudo: 36.5414.Int.perl.say;
17:20 p6eval rakudo c491a1: OUTPUT«36␤»
17:20 isBEKaml Ah, thanks.
17:20 jnthn moritz_: Maybe. If so, then it's easy to copy-paste. :-)
17:21 moritz_ jnthn: I'll try
17:21 cognominal moritz_, what do you mean by "syntactic form
17:22 moritz_ cognominal: $a && $b  doesn't evaluate $b if $a is false
17:22 moritz_ cognominal: so it can't be implemented as an ordinary subroutine-like operator
17:22 moritz_ cognominal: it's specially handled in the compiler
17:23 isBEKaml \o/
17:23 * isBEKaml successfully ported wizard.pl from pugs games to Rakudo!
17:23 cognominal ho. that what I was trying to say "leaving aside that  and introduce a sequence point."
17:24 jnthn isBEKaml++ :-D
17:24 moritz_ rakudo: say 1 && 2 && 3
17:24 p6eval rakudo c491a1: OUTPUT«3␤»
17:24 TimToady [&&] can't guarantee lack of side effects, but it does at least evaluate its list lazily, and return the first true value
17:25 TimToady er, that's [||], I mean
17:25 jnthn :-)
17:25 TimToady [&&] would return the first false value :)
17:25 cognominal we got the idea :)
17:25 moritz_ rakudo: say [//] Any, Num, 5
17:25 jnthn TimToady: Does that just fall out of it having a *@args sig?
17:25 p6eval rakudo c491a1: OUTPUT«5␤»
17:25 TimToady which might, of course, be an interesting value of false
17:26 TimToady jnthn: well, infix:<&&> is really S&& insofar as it guarantees strict laziness
17:27 moritz_ jnthn: seems it's not such an easy fix... I've added an 'our multi sub infix:<&&>(Mu $a, Mu $b) { $a && $b }' to src/core/metaops.pm, and it still dies with "Could not find sub &infix:<&&>" :(
17:27 TimToady if that's what S really means there....
17:27 jnthn moritz_: oh.
17:27 jnthn :-|
17:27 moritz_ I though S was "sequential", not "really lazy"
17:28 TimToady S is kinda fuzzy
17:28 TimToady I suspect it means different things to different operators
17:28 moritz_ jnthn: should it matter where in the setting the operator appears (as long as it's top level)?
17:28 TimToady but the fuzz could just be in my head
17:30 TimToady I think && guarantees that its *@args are evaluated as a List of Lazy Scalar or something strange like that
17:30 jnthn moritz_: No
17:30 mariano joined #perl6
17:30 TimToady a() && b() is really [&&] (lazy a()), (lazy b())
17:31 TimToady assuming lazy is the way to lazify an item
17:31 jnthn TimToady: Maybe something to hand-wave for 6.0.0. ;-)
17:31 pugssvn r30959 | svatsan++ | [examples] Ported wizard's game to Rakudo
17:32 jnthn TimToady: OTOH, maybe S turns out to matter more once we have parallelism.
17:32 isBEKaml jnthn: :D. I kind of gave up on hangman. Globals were killing me. :/
17:32 jnthn Aww
17:32 moritz_ isBEKaml: in the p6 book there's a nice example of hangman
17:32 moritz_ iirc
17:33 moritz_ not in the actual text, but in the wip/ directory
17:34 TimToady [&&] is one of those spots where a strictly lazy language like Haskell comes out a bit cleaner
17:34 isBEKaml moritz_: ah, this is actually better than the one in pugs repo. ;)
17:35 jnthn TimToady: I guess in this case lazy is a kinda parser-known thunker of some sort though?
17:35 moritz_ isBEKaml: aye; when PerlJam++ added it first, I spent 20 minutes playing it, instead of writing on the book :-)
17:36 isBEKaml :)
17:36 moritz_ it turns out that playing hangman in a non-native language is rather frustrating
17:37 isBEKaml moritz_: And, I have been telling myself to read some more of spec today. Wound up trying to port Wizard's instead. ;)
17:37 jnthn I can _______ that.
17:38 aesop lol strict laziness
17:38 moritz_ what's amusing about it?
17:39 aesop never seen those two words together before
17:40 jnthn lol cucumber manitee
17:40 moritz_ now we know you're not a haskell hacker :-)
17:40 TimToady see S07:36
17:41 TimToady Larry the Cucumber and Barbara Manitee?
17:41 cognominal leaving aside that  and introduce a sequence point.
17:41 cognominal oops
17:41 aesop true
17:41 cognominal http://www.haskell.org/hask​ellwiki/Lazy_vs._non-strict
17:41 aesop definitely seen that
17:42 jnthn TimToady: ...just when I thought I had two words that most people wouldn't have seen together... :P
17:42 isBEKaml jnthn: I've never heard of manitee, manatee? (Sorry, non-native here)
17:43 jnthn VeggieTales ftw
17:43 moritz_ non-resolved cultural reference at line 127
17:44 jnthn isBEKaml: It's the cow of the sea.
17:44 TimToady isBEKaml: yes, that's the correct spelling
17:45 jnthn Big, eats green stuff and not too elegant, but lives underwater.
17:45 isBEKaml jnthn: Yes, I was asking if you were referring to manatee instead of manitee (And, yes, I have heard of manatees - mercilessly hunted down by people in the 1920s to the point to near extinction)
17:45 isBEKaml IIRC>
17:45 jnthn isBEKaml: Ah...I'm a native speaker so I spell everything rong. :-)
17:46 isBEKaml jnthn: unfair. non-natives tend to be punished by their own parents for spelink wruong..  :D
17:47 TimToady the main threat to manatees these days is propellers
17:49 aesop and maybe oil spills
17:49 isBEKaml and, I also heard they were believed to be mermaids. ;)
17:51 isBEKaml jnthn: there's already a sea cow aka dugong! :)
17:52 jnthn isBEKaml: I thought dugong and /man<[iae]>tee/ were the same thing? :-)
17:53 jnthn oh, no, they are indeed different
17:53 isBEKaml same genus, different species.
17:53 jnthn That's what I get for learning about sea life from http://www.weebls-stuff.com/songs/dugong/.
17:55 * moritz_ has a patch that gives us Perl 6 arrays in Match objects
17:55 moritz_ and it's like... trivial
17:56 jnthn \o/
17:56 moritz_ I wonder why it's so easy now, and was such a pain in my mob\b branches
17:56 moritz_ it passes all of S05*/*.t
17:56 moritz_ running the full spectest now
17:56 * jnthn is also spectesting a bump to latest Parrot ATM
17:56 jnthn So far so good.
17:57 moritz_ mostly-latest parrot works fine here
17:57 jnthn moritz_: aye, I just want to get latest so we have that nqp-rx fix I did yesterday plus the .backtrace caller so I can implement shiny nicer backtraces. :-)
18:05 moritz_ I just had some local spectest failures because I had a Foo.pm file in my rakudo dir
18:05 moritz_ and the tests use @*INC.push: ...
18:05 moritz_ so local directories are searched first
18:05 [particle] joined #perl6
18:05 moritz_ which is clearly a fail
18:06 moritz_ but automatically changing them all to unshift also leads to fallout
18:06 moritz_ I need to investigate a bit more thoroughly once my current spectest run is finished
18:09 japhb joined #perl6
18:12 pmichaud I'm about to start a branch to refactor (yet again) lists and laziness and iterators and flattening.  *sigh*
18:12 pmichaud this is getting a bit old :-|
18:12 jnthn hugme: hug pmichaud
18:12 * hugme hugs pmichaud
18:12 dalek rakudo: 46e2b53 | jonathan++ | build/PARROT_REVISION:
18:12 dalek rakudo: Bump to latest Parrot to get a fix and an improvement.
18:12 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​6e2b53906a5f25d0990a947194d7b304cdf939b
18:12 dalek rakudo: 6afdfbd | jonathan++ | src/metamodel/RoleToRoleApplier.nqp:
18:12 dalek rakudo: Stringify methods to get the name rather than .name them; we do that in other
18:12 dalek rakudo: bits of the metamodel, to RoleToRoleApplier should be consistent.
18:12 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​afdfbd6dd4157e224202d0f4622b5e4b42af832
18:13 pmichaud consistent +1
18:13 jnthn pmichaud: I'd done it in other places so figured I may as well there too.
18:13 jnthn pmichaud: I've left the multi check as calling .multi though.
18:13 pmichaud wfm
18:13 * sorear appears
18:13 pmichaud I'll start my refactor by seeing what it takes to move Positional into core
18:13 jnthn We *could* make it play nice with Parrot multis by doing a pir::isa check against MultiSub.
18:14 jnthn pmichaud: OK. Hopefully it's not too painful.
18:14 jnthn pmichaud: Associative wasn't, once I fixed the bug that stopped us doing augment to add a role.
18:14 pmichaud well, it's largely a question of whether we're able to compile the setting with a compiler that doesn't understand Positional
18:15 pmichaud (since Positional will be in the setting instead of in the base compiler)
18:15 jnthn pmichaud: Ah, true.
18:15 pmichaud Associative is much less critical there, because it doesn't impact lists/arrays/flattening/etc.
18:15 moritz_ (offtopic: it never ceases to amaze me how long it takes to cook corn on the cob)
18:16 jnthn pmichaud: True. OTOH, I had a bit of fun from the fact that every method has a *%_ - which is something that does Associative.
18:16 pmichaud true.  :-)
18:17 pmichaud the other nastiness is that refactoring lists and positional and the like always breaks "make test"
18:17 jnthn Yes. :-(
18:17 pmichaud so it's a slow process to even get the basics going again
18:17 jnthn Not to mention make spectest.
18:17 moritz_ or compiling the setting :-)
18:17 jnthn Heh
18:17 * Su-Shee looks at the long, long list of tests. did I really want DBI?
18:17 jnthn I hate it when compiling the setting breaks.
18:18 * jnthn has spent lots of time working on things that can easily lead to that
18:18 pmichaud yay!  all tests pass!
18:19 moritz_ like, uhm, multis? meta model?
18:19 jnthn !!
18:19 jnthn moritz_: Signatures. :)
18:19 jnthn moritz_: And those
18:19 pmichaud maybe I should stop here (i.e., immediately after doing git clone, that is)
18:19 jnthn pmichaud: That's moving moving Positional to ...oh, you didn't.
18:19 jnthn :-)
18:19 jnthn Now if only I could get all tests to pass on Win32. :-)
18:19 pmichaud stopping at this point is likely my only chance of having a successful day.
18:20 jnthn Aww.
18:20 * moritz_ pushed Match + Array fix
18:20 pmichaud otherwise it's going to be a day of pain and torment.
18:20 jnthn I imagine said refactor is more than 1 day's effort.
18:20 pmichaud I'm hoping less than 3, though.
18:20 jnthn That's probably more realistic.
18:20 pmichaud well, maybe.  There are still a lot of iterator issues I haven't worked out completely yet.
18:21 pmichaud on the plus side, it's a holiday weekend here, the kids are away, and Paula is somewhat homebound
18:21 pmichaud so I hope to have a lot of time to dedicate to the problem :)
18:21 moritz_ \o/
18:21 jnthn pmichaud++
18:22 jnthn std: fdjsa££1!!!
18:22 pmichaud moritz_: I'm glad you found the easy answer to the array problem.
18:22 p6eval std 30959: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/JMtTiOLnbY line 1:␤------> [32mfdjsa[33m⏏[31m££1!!![0m␤    expecting any of:␤        POST␤   argument list␤      bracketed infix␤  infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤       statement modifier
18:22 p6eval ..loop␤Undeclared routine:␤      'fdjsa' u…
18:22 moritz_ pmichaud: so am I :-)
18:24 dalek rakudo: 9de1eba | moritz++ | src/builtins/ (2 files):
18:24 dalek rakudo: use Perl 6 arrays in Match objects
18:24 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​de1eba437841f9969c66823d0e82130175b2ebd
18:24 pmichaud jnthn: so, how does the compiler manage to work if Associative isn't present?
18:24 moritz_ rakudo: ('acfg' ~~ /b/).chars
18:24 p6eval rakudo c491a1:  ( no output )
18:24 moritz_ rakudo: say ('acfg' ~~ /b/).chars
18:25 p6eval rakudo c491a1: OUTPUT«-7␤»
18:25 moritz_ pmichaud: in Perl 6 I expect that to be 0 -- do you want a Perl 6 level fix, or rather an nqp-rx fix?
18:26 pmichaud nqp-rx, please.
18:27 jnthn pmichaud: Associative comes *very* early in the bootstrap.
18:27 pmichaud jnthn: I'm guessing that when we run the base compiler to compile the settings, none of the subroutines have an Associative constraint.
18:27 pmichaud and after compiling the settings, Associative is available?
18:27 pmichaud (because it's early in the compile sequence?)
18:27 pmichaud okay, I think Positional may be able to work the same.
18:28 jnthn pmichaud: All that actually matters is that Associative is declared in the setting before any methods are.
18:28 jnthn pmichaud: If you look at CORE_SOURCES, the ordering of a lot of that stuff is quite carefully done. :-)
18:28 pmichaud right -- I'll have to switch them around a bit anyway
18:28 jnthn It's a bit of a balancing act.
18:29 pmichaud Positional would probably need to be declared in the setting before any methods or subs
18:29 jnthn We have two things that help us a *lot* though.
18:29 pmichaud or anything that takes an @-parameter.
18:29 jnthn 1) Stubs are enough for the parser to be happy about the type name from there on in.
18:29 jnthn 2) Sub and method signatures are lazily composed on the first call
18:30 jnthn So we can get away with quite a lot.
18:30 moritz_ so we can't have compile-time methods calls in the setting?
18:30 pugssvn r30960 | svatsan++ | [examples] Fixed up tic_tac_toe for Rakudo
18:31 jnthn moritz_: Not to things declared in the setting.
18:31 jnthn That's a bigger issue overall though.
18:31 jnthn I mean, it's the same as
18:31 jnthn class Foo { }; BEGIN { Foo.new }
18:32 jnthn Which will currently explode.
18:34 pmichaud okay, need a short break here, then will get started
18:41 dalek rakudo: 401d2d0 | moritz++ | src/core/Match.pm:
18:41 dalek rakudo: remove workarounds in Match.caps
18:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​01d2d0e5d67d83b73b9be0f4a32fbe59dcb1f02
18:44 plobsing joined #perl6
18:47 Su-Shee jnthn/mberends: http://pastebin.org/290594 that's why I put all files by hand in my @*INC - what's not found here exactly?
18:48 moritz_ NativeCall.pm ?
18:48 Su-Shee it's in my @*INC and it works within actually using fakedbi.
18:49 isBEKaml Su-Shee: PERL6LIB doesn't work, last I seen. Did you try putting your libsin ~/.perl6/lib ?
18:49 Su-Shee @*INC -> .perl6/lib
18:50 moritz_ Su-Shee: do any of the involved scripts or modules modify @*INC?
18:50 Su-Shee moritz_: not that I know of.
18:51 Su-Shee if I actually say @*INC from perl 6 repl it gives me: > say @*INC;
18:51 Su-Shee ./home/banshee/.perl6/lib/home/banshee​/Perl6/rakudo-2010.05/parrot_install/l​ib/2.4.0-devel/languages/perl6/liblib
18:51 Su-Shee and I can use NativeCall;
18:51 Su-Shee without any errors.
18:51 isBEKaml Su-Shee: perl6 -e '$*INC.perl.say' ## what does this show?
18:51 Su-Shee oh perl6 -e works? nice :)
18:52 Su-Shee wtf?
18:52 Su-Shee "undef"
18:52 moritz_ @ vs. $
18:52 isBEKaml sorry, @*INC
18:52 Su-Shee never cut and paste :)
18:52 mberends Su-Shee: I suggest copying zavolaj/lib/NativeCall.pm6 and zavolaj/lib/NativeCall.pir to ~/.perl6/lib because the zavolaj/lib directory is outside the fakedbi tree
18:53 Su-Shee mberends: that's what I did. now I like to call make test though.
18:53 mberends oki
18:53 Su-Shee isBEKaml: [".", "/home/banshee/.perl6/lib", "/home/banshee/Perl6/rakudo-2010.05/parrot_i​nstall/lib/2.4.0-devel/languages/perl6/lib", "lib"]
18:53 isBEKaml Su-Shee: ok. if you have put yours in ~/.perl6/lib, that should work. :)
18:54 Su-Shee ./perl6 -e 'use NativeCall;'
18:54 mberends the "lib" at the end is relative to your current directory, which should be fakedbi/ for testing
18:54 Su-Shee no problem. no error.
18:55 moritz_ rakudo: say $*thing.perl
18:55 p6eval rakudo 9de1eb: OUTPUT«undef␤»
18:55 moritz_ that's wrong
18:55 moritz_ there is no undef in Perl 6
18:55 isBEKaml moritz_: yes, that's what I thought too. Nil?
18:55 moritz_ isBEKaml: Any
18:56 moritz_ it's in src/builtins/Exceptions.pir
18:56 TimToady or perhaps even Mu, since there's no variable
18:57 TimToady a Failure with an interesting value might be more appropriate here
18:57 pmichaud it used to be that $*foo did result in a failure
18:57 pmichaud alpha:  say $*thing.perl
18:57 p6eval alpha 30e0ed: OUTPUT«undef␤»
18:57 pmichaud huh
18:58 moritz_ there's a ticket in RT requesting that
18:58 pmichaud it's pretty easy to add
18:59 pmichaud (assuming we have Failure objects available)
18:59 dalek rakudo: 418e795 | moritz++ | src/core/Match.pm:
18:59 dalek rakudo: remove an outdated comment in Match.pm
18:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​18e79560bfd82c43f7f75d6f9d6b69789fe708a
18:59 jnthn nqp: my @a := 1,2,3; for @a { say($_); last; }
18:59 p6eval nqp: OUTPUT«get_iter() not implemented in class 'Integer'␤current instr.: '_block11' pc 0 (EVAL_1:4)␤»
19:00 jnthn nqp: my @a := (1,2,3); for @a { say($_); last; }
19:00 p6eval nqp: OUTPUT«1␤»
19:00 jnthn yay, nqp has last
19:00 pmichaud sorear++ for that.
19:01 jnthn sorear++
19:02 mathw evening
19:02 jnthn o/ mathw
19:03 moritz_ \o
19:03 mathw hey
19:03 Su-Shee my perl6 executable.. I should set some environment var to it?
19:04 moritz_ Su-Shee: you should run 'make install' in rakudo, and then use the installed perl6 bin
19:04 isBEKaml Su-Shee: you should probably do a make install in your rakudo dir and append the executable's location to your $PATH
19:04 moritz_ right
19:04 isBEKaml what moritz_++ said.
19:04 moritz_ and what isBEKaml++ said :-)
19:04 Su-Shee I've added hard coded the path in the makefile which works but I'd like to have a proper setup. :)
19:05 Su-Shee ah make install works now? :)
19:05 moritz_ it did so for about half a year :-)
19:05 isBEKaml Su-Shee: you don't need to hard code in the make file. install by default installs to the current directory (as far as rakudo goes, not parrot)
19:05 pmichaud jnthn: interesting... in reviewing discussions from late Feb and early March, we speculated that the @-sigil really means "does Array" instead of just "does Positional"
19:06 Su-Shee isBEKaml: I know that. ;)
19:06 Su-Shee moritz_: how the hell should I know... I lost overview over like 45698 rakudos :)
19:06 jnthn pmichaud: I've heard it speculated as does Iterable too.
19:06 Su-Shee I should clean up. ;)
19:06 pmichaud I'm less inclined to buy that
19:06 isBEKaml Su-Shee: read Makefile? :)
19:07 Su-Shee isBEKaml: what for? ;) if all goes smoothly, I don't bother :)
19:07 jnthn pmichaud: Well, thing is, you can probably derive a Positional interface from being able to iterate something, but not vice versa so easily.
19:08 pmichaud the fundamental reason to want @ to mean "Array" is that people expect @-things to remember values
19:08 pmichaud while Iterable doesn't imply that
19:08 jnthn Ah
19:08 jnthn Yes.
19:08 isBEKaml Su-Shee: :)
19:08 pmichaud still need to keep reading notes
19:08 Su-Shee ah. now I get proper, expected errors I actually want to have :)
19:10 isBEKaml is this supposed to work? @array[$index]<somekey> ?? Or was this even working ?
19:10 isBEKaml Found this little nugget in Pugs repo. :D
19:10 moritz_ yes, should work
19:10 lue ohai o/
19:10 isBEKaml hey, lue!
19:10 jnthn rakudo: my @foo = { x => 42 }; say @foo[0]<x>
19:10 moritz_ rakudo: my @a = { a=>1}, { a=> 2}; say @a[0]<a>
19:10 pmichaud isBEKaml: at present that's supposed to work, as long as @array[$index] is either unvivified or something that does Associative
19:10 p6eval rakudo 9de1eb: OUTPUT«42␤»
19:10 p6eval rakudo 9de1eb: OUTPUT«1␤»
19:11 TimToady oha yo/
19:11 * sorear backlogs
19:11 sorear (completed)
19:11 moritz_ that was fast :-)
19:11 isBEKaml sorear: wow, that's fast! :)
19:11 sorear I started 3 hours ago
19:12 isBEKaml pmichaud: I didn't know Arrays could Associate. Thanks for that. :)
19:12 sorear and got distracted before saying I started
19:12 TimToady it was not an ingressive progressive, I guess
19:12 pmichaud isBEKaml: they don't associate.  But one of their elements might.
19:13 pmichaud i.e., @array isn't Associative, but @array[$index] might be.
19:13 isBEKaml Ah, I see.
19:13 pmichaud (see examples above from jnthn++ and moritz_++)
19:14 sorear perl6: my $a = 2; my $b := $a; $a := 1; say $b
19:14 p6eval pugs: OUTPUT«2␤»
19:14 p6eval ..rakudo 9de1eb: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 18381 (src/builtins/Junction.pir:373)␤»
19:14 p6eval ..elf 30960: OUTPUT«␤»
19:14 sorear TimToady: pmichaud: what's the correct resolution?
19:14 pmichaud should output 1
19:15 pmichaud oh, wait
19:15 pmichaud second :=
19:15 pmichaud output should be 2
19:15 pmichaud rebinding $a doesn't affect $b's binding
19:15 moritz_ alpha: my $a = 2; my $b := $a; $a := 1; say $
19:15 p6eval alpha 30e0ed: OUTPUT«say requires an argument at line 10, near " $"␤in Main (file src/gen_setting.pm, line 2593)␤»
19:15 moritz_ alpha: my $a = 2; my $b := $a; $a := 1; say $b
19:15 p6eval alpha 30e0ed: OUTPUT«2␤»
19:15 moritz_ alpha++ pugs++
19:17 pmichaud at least, I *think* that's the result.  Not sure what we'll do to make that happen in rakudo actually.
19:17 pmichaud the one that provides the answer is likely:
19:17 pmichaud my $a = 2;   sub foo($b) { $a := 1; say $b };  foo($a)
19:19 pmichaud I think I could argue that one as '1"
19:19 pmichaud er, 1
19:19 dalek nqp-rx: 416e5b4 | moritz++ |  (2 files):
19:19 dalek nqp-rx: match objects should never have negative .chars, even if the match fails
19:19 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/4​16e5b4fd46cc4d36640b23dff38a06aa11445bb
19:20 moritz_ (the test for that nqp-rx commit might be a bit mis-placed, but I didn't find any explicit test for match objects)
19:20 isBEKaml rakudo: my @array; say @array[0]<something>.perl; ## unvivified
19:20 p6eval rakudo 9de1eb: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Proxy'␤current instr.: '!postcircumfix:<{ }>' pc 14968 (src/builtins/Code.pir:23)␤»
19:20 moritz_ should just evaluate to an empty Proxy, or so
19:21 whiteknight joined #perl6
19:21 isBEKaml yes, the error doesn't mean anything to me. Boiled down to this.
19:24 moritz_ rakudo: .say for @('ab' ~~ m/(.)+/)
19:24 p6eval rakudo 9de1eb: OUTPUT«ab␤»
19:29 moritz_ rakudo: 'abd' ~~ m/ <alpha> <alpha> c || <alpha> b d /;
19:29 p6eval rakudo 9de1eb:  ( no output )
19:30 moritz_ rakudo: 'abd' ~~ m/ <alpha> <alpha> c || <alpha> b d /; say %($/).keys
19:30 p6eval rakudo 9de1eb: OUTPUT«␤»
19:30 moritz_ rakudo: 'abd' ~~ m/ <alpha> <alpha> c || <alpha> b d /; say $/.hash.keys
19:30 p6eval rakudo 9de1eb: OUTPUT«alpha␤»
19:30 TimToady lunch &
19:30 moritz_ what do I need to do to make hash() work in that case?
19:30 pmichaud autovivification of hashes and arrays is still a bit of a challenge.  We really ought to have .WHENCE available
19:31 pmichaud moritz_: fixing hash and keys is part of dealing with iterators and lists, believe it or not
19:31 moritz_ ok
19:32 moritz_ rakudo: say Array ~~ List
19:32 p6eval rakudo 9de1eb: OUTPUT«0␤»
19:32 moritz_ /o\
19:32 pmichaud rakudo currently doesn't have a real List class, iirc
19:32 moritz_ it has List, but it's actually a shallow iterator
19:32 pmichaud I think I need to log off so I can solve the problems rather than try to explain why Rakudo is currently broken.  1/2 :-)
19:32 pmichaud (or how to work around Rakudo's current brokenness)
19:32 moritz_ :-)
19:33 * lue is going to check the ROADMAP for something to do over this holiday weekend.
19:34 pugssvn r30961 | moritz++ | [t/spec] fudge capturing-contexts.t for Rakudo
19:37 pugssvn r30962 | moritz++ | [t/spec] my-scope some named regexes
19:37 sorear pmichaud: the double := example makes me think we need an extra level of indirection :(
19:38 sorear my $x; creates .lex "$x" as an ObjectRef pointing to a new Perl6Scalar
19:38 pmichaud sorear: that's why I gave the sub example.  Whatever we decide for it determines what we decide to do for the double :=
19:38 alester joined #perl6
19:38 sorear alpha's := was just store_lex; alpha used lexpad entries as ObjectRef
19:39 sorear but ng keeps track of rw and flat
19:39 pmichaud and for the answer to the sub question, I think we need a TimToady++ clarification
19:39 moritz_ did I get that right that <.foo> is now always supposed to be a method call?
19:40 sorear yes
19:40 sorear <.sym> is weird, though; I'm trying to convince TimToady to make it a macro
19:40 pmichaud <.foo> has always been a method call
19:43 pugssvn r30963 | moritz++ | [t/spec] bring subrule.t up to date wrt current spec; fudge for rakudo
19:58 pugssvn r30964 | svatsan++ | [examples] Fixed up some more to work with Rakudo
20:03 jnthn *sigh* Seems Parrot's reporting of annotations in what it hands back from .backtrace has worsened somewhat since I last used it. :-/
20:04 mberends :(
20:05 rgrau joined #perl6
20:06 jnthn Doesn't help that the compile-to-bytecode-and-check-they-work-there tests that I set up to *always* run in make test were disabled.
20:06 lue what exactly is the problem with error messages and such that it requires  modification to the grammar engine? [according to ROADMAP]
20:07 jnthn lue: Well, I'm dealing with the runtime ones at the moment.
20:08 pugssvn r30965 | moritz++ | [t/spec] fudge named-chars.t for rakudo
20:09 lue I'm looking for something in rakudo to work on...
20:09 moritz_ rakudo: / <?> /
20:09 p6eval rakudo 9de1eb:  ( no output )
20:10 moritz_ lue: RT has an extensive TODO list :)
20:10 moritz_ I currently don't know of any LHFs - will tell you when I find one
20:13 lue What I considered a few days ago was rewriting all the trigonometric functions into honest-to-goodness Perl 6 code.
20:13 lue even — <.< — sin()
20:13 moritz_ lue: that's something you should discuss with colomon
20:18 lue I know. I was looking at a couple methods for approximating sine.
20:19 lue Yeah, I should tromp some bugs in RT, see what I feel like taking a crack at.
20:20 * isBEKaml bed. 'night folks! have a good one! :)
20:21 moritz_ lue: a potential LHF would be to go through the smart matching tests
20:21 [particle] joined #perl6
20:21 moritz_ lue: some of the non-passing tests are likely just missing implementations of ACCEPT methods, and not hard at all
20:21 _buno_ joined #perl6
20:21 lue rakudo: say <a b c>».uc
20:21 p6eval rakudo 9de1eb: OUTPUT«ABC␤»
20:23 pugssvn r30966 | moritz++ | [t/spec] my-scope a few regexes, and fudge for rakudo
20:23 pugssvn r30967 | moritz++ | [t/spec] simplify arrayhash.t
20:24 moritz_ lue: you could also investigate back-porting Match.perl from alpha
20:25 sorear jnthn: parrot tests or rakudo tests?
20:25 lue I'll look at the smart-matching tests
20:25 pugssvn r30968 | moritz++ | [t/spec] spec-updated non-capturing.t
20:25 lue rakudo: sub f() {say <a b c>».uc;}; f()
20:25 p6eval rakudo 9de1eb: OUTPUT«ABC␤»
20:27 dalek rakudo: c0bcaf0 | moritz++ | t/spectest.data:
20:27 dalek rakudo: run another S05 spectest file
20:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​0bcaf07aed3066f7fc83bffc3a431717d335d28
20:27 dalek rakudo: e6dfd1d | moritz++ |  (2 files):
20:27 dalek rakudo: implement smartmatching of arrays and hashes against regexes; add a few more
20:27 dalek rakudo: passing test files
20:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​6dfd1df56c7fae48cddef15390c690ee5008c7d
20:27 lue How would I check *just* the smart match tests?
20:27 moritz_ cat t/spec/S03-smartmatch/*.t
20:27 moritz_ or do you mean "run"?
20:28 moritz_ add the names to t/localtest.data
20:28 moritz_ run   make localtest
20:29 lue could I put t/spec/S03-smartmatch/*.t into the localtest file?
20:29 moritz_ no
20:29 moritz_ t/localtest.data should have the same format as t/spectest.data
20:29 moritz_ so you need to list the file names, and remove the t/spec/
20:30 moritz_ cd t/spec && ls S03-smartmatch/*.t > ../localtest.data
20:31 aindilis joined #perl6
20:32 pugssvn r30969 | moritz++ | [t/spec] switch tilde.t to lexical regexes
20:34 moritz_ std: rx (o)
20:34 p6eval std 30968: OUTPUT«ok 00:01 116m␤»
20:37 whiteknight joined #perl6
20:39 sorear TimToady: Do you have any tips for debugging LTM?
20:39 lue rakudo: say (Mu, 1, Mu) ~~ .[1]
20:39 p6eval rakudo 9de1eb: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 11822 (src/builtins/Any.pir:54)␤»
20:39 pugssvn r30970 | moritz++ | [t/spec] switch regex.t to lexical regexes; refudge for rakudo
20:41 sorear hmm.  statementlist_01 lexer is being generated very differently
20:42 jnthn sorear: parrot tests
20:43 sorear why would anyone disable parrottests
20:43 sorear TimToady: ping
20:44 moritz_ compiling to pbc and then testing differed from the structure of the other tests, and iirc it had some infrastructural problems
20:44 jnthn moritz_: It worked fine, it just looked a bit odd.
20:44 jnthn moritz_: Which is better than not knowing months down the line when things got broke.
20:44 sorear TimToady: STD.pm6 line 1430 - AIUI, and as viv implements, there should be no LTM going on here
20:44 dalek rakudo: f514389 | moritz++ | t/spectest.data:
20:44 dalek rakudo: re-enable 4 test files
20:44 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​51438949136cd024f72636f696f50c091297455
20:44 moritz_ jnthn: agreed
20:44 jnthn Essentially, priorities fail.
20:45 sorear TimToady: since each alternative starts with <.ws>, which is imperative
20:45 jnthn Anyways...guess it's time to go debugging.
20:45 sorear TimToady: gimme5 over-eagerly optimizes out the ws, and so enables LTM
20:45 sorear TimToady: which is correct?
20:52 jnthn Ah...may have worked out what's going on...
20:54 moritz_ rakudo: 'abc' ~~ /bc/; say pir::is_null__IP($/.ast)
20:54 p6eval rakudo e6dfd1: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I56')␤  in file 'EVAL_1' line 76␤syntax error ... somewhere␤current instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 1034 (compilers/pct/src/PCT/HLLCompiler.pir:544)␤»
20:54 moritz_ rakudo: 'abc' ~~ /bc/; say pir::isnull__IP($/.ast)
20:54 p6eval rakudo e6dfd1: OUTPUT«0␤»
20:55 moritz_ rakudo: 'abc' ~~ /bc/; say $/.ast.perl
20:55 p6eval rakudo e6dfd1: OUTPUT«Method 'perl' not found for invocant of class 'Undef'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
20:55 jnthn rakudo: 'abc' ~~ /bc/; say pir::typeof__sp($/.ast)
20:55 p6eval rakudo e6dfd1: OUTPUT«Undef␤»
21:07 lue I can't find the part in S03 about smart matching array slices
21:08 mariano joined #perl6
21:09 moritz_ lue: at the RHS of a smart-match, $_ is set to the LHS
21:09 moritz_ lue: so .[1, 3] is just LHS.[1, 3]
21:10 lue rakudo: say (Mu, 1, Mu) ~~ $_.[1]
21:10 p6eval rakudo e6dfd1: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 11822 (src/builtins/Any.pir:54)␤»
21:10 lue rakudo: say (Mu, 1, Mu) ~~ @_.[1]
21:10 p6eval rakudo e6dfd1: OUTPUT«Lexical '@_' not found␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
21:11 lue so it's a problem with setting it.
21:11 lue [or them, depending]
21:11 moritz_ I don't know if you understood what I said
21:11 moritz_ (Mu, 1, Mu) ~~ .[1]
21:11 moritz_ should be the same as
21:12 moritz_ given (Mu, 1, Mu) { $_.[1] }
21:12 moritz_ not the same as smart-matching against $_.[1]
21:14 lue So, upon finding .[1], it should set $_ to the LHS ?
21:14 moritz_ it should *always* set $_ to the LHS
21:14 moritz_ (which it doesn't do, in current rakudo)
21:15 moritz_ the .[1] semantics just fall out of that, magically
21:15 lue rakudo: (1,2,3); say .[1]
21:15 p6eval rakudo e6dfd1: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 11822 (src/builtins/Any.pir:54)␤»
21:15 lue rakudo: (1,2,3); say $_.[1]
21:15 p6eval rakudo e6dfd1: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 11822 (src/builtins/Any.pir:54)␤»
21:16 lue hrm, I don't think I'm quite getting it...
21:16 moritz_ rakudo: $_ = (1, 2, 3); say $_.[1]
21:16 p6eval rakudo e6dfd1: OUTPUT«2␤»
21:20 moritz_ just saying (1, 2, 3); doesn't set $_
21:23 * sorear could really use a time travelling debugger about now
21:25 dalek rakudo: 5c62b61 | moritz++ |  (2 files):
21:25 dalek rakudo: implement Match.perl; fix Match.ast to return Any if not set (not Undef)
21:25 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​c62b61ee886172070a5eb7ee2fbb61f4bddd478
21:29 * moritz_ seems to have broken caps.t already
21:29 moritz_ is that test file failing for anybody else?
21:30 colomon moritz_: where is it?
21:30 moritz_ colomon: S05-capture/caps.t
21:30 colomon fails here.
21:30 colomon I have e6dfd1df56c7fae48cddef15390c690ee5008c7d
21:30 lue grr... where is ACCEPTS?
21:30 moritz_ colomon: if you revert 401d2d0e5d67d83b73b9be0f4a32fbe59dcb1f02, does that test pass?
21:31 moritz_ lue: which ACCEPTS? :-)
21:31 colomon lue: each class implements its own ACCEPTS.
21:31 colomon moritz_: trying.
21:32 colomon is the parrot from e6dfd1df56c7fae48cddef15390c690ee5008c7d okay with 401d2d0e5d67d83b73b9be0f4a32fbe59dcb1f02?
21:32 colomon .oO(thanks heaven for cut-n-paste)
21:32 lue for Mu, because that's what ~~ uses
21:33 colomon lue:  ~~ uses whatever ACCEPTS is appropriate for the object on the right.
21:34 colomon moritz_: caps.t is fine with 401d2d0e5d67d83b73b9be0f4a32fbe59dcb1f02
21:34 colomon lue: I don't see any evidence there is a Mu.ACCEPTS.
21:34 lue our multi infix:<~~>(Mu $topic, Mu $matcher) {
21:34 lue $matcher.ACCEPTS($topic)
21:34 lue }
21:34 lue from core/operators.pm
21:35 moritz_ that doesn't mean that $matches is of type Mu
21:35 moritz_ only that it conforms to Mu
21:35 jnthn That's the the "delegator"
21:35 jnthn It maps ~~ to ACCEPTS
21:36 jnthn The fix we need is probably gotta go in the actions.
21:37 lue I was thinking that.
21:37 jnthn Ooh. I may have Parrotfix.
21:37 lue Setting $_ to the LHS seems like a grammar issue.
21:38 jnthn It needs some different code-gen, yeah
21:38 jnthn Not sure what the cleanest way is off hand.
21:39 dju_ joined #perl6
21:41 dju_ joined #perl6
21:43 * jnthn afk for a bit
21:43 jnthn (line numbers working going OKish, btw)
21:43 moritz_ \o/
21:43 lue If I were to try and fix a grammar issue, I'll have to study up on how it all works first :/
21:45 lue .oO(If Perl 6 is my MMORPG, where is the tutorial level? :D)
21:46 colomon moritz_: okay if I go back to HEAD
21:46 colomon ?
21:46 colomon ;)
21:46 moritz_ colomon: yes, I'm working on a fix right now
21:47 colomon moritz_++
21:49 moritz_ you should only prefix-increment my karma until I've actually committe a fix :-)
21:53 moritz_ WTF
21:53 moritz_ adding a debug statement to .caps makes some tests pass
21:53 lue colomon: how do you feel about rewriting trig functions to Perl 6?
21:53 lue [see backlog, around 20:13 UTC]
21:54 molaf joined #perl6
21:54 colomon lue: hmmmm....
21:54 colomon (no chance to backlog at the moment, but....)
21:55 sorear What does it mean when :::: cursor_xact (20 lines of text) ?
21:55 colomon my quick thought is that it's probably not good as a default implementation, because (at least in theory) the Parrot versions we call should be about as fast as possible on a Parrot platform.
21:56 colomon on the other hand, there's a very good argument to have a pure p6 version.
21:56 colomon good both for ports and (at least potentially) for numeric types other than system floating point.
21:57 lue Maybe it's just me, but inline PIR seems a bit... weird. [I cannot find a good adjective]
21:57 * sorear is not thrilled with the concept of reinventing a sine algorithm
21:58 lue rakudo: say sin(3)
21:58 p6eval rakudo e6dfd1: OUTPUT«0.141120008059867␤»
21:58 lue rakudo: say sin(3+4i)
21:58 p6eval rakudo e6dfd1: OUTPUT«3.85373803791938 + -27.0168132580039i␤»
21:58 moritz_ lue: it makes perfect sense to re-use low level implementations if they are available
21:59 moritz_ colomon: I've pushed a fix... and I have no idea why it fixes anything
21:59 colomon particularly because (as I said) the inline PIR version should be as fast as possible on in a Parrot-based p6.
22:00 dalek rakudo: 9581e6a | moritz++ | src/core/Match.pm:
22:00 dalek rakudo: fix Match.caps again; I have no idea why it's a fix, but it is. Weird.
22:00 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​581e6a8b8d98a2e6bd81feb802c5e0271fda13a
22:00 colomon The PIR probably boils down to a call to the underlying C library implementation.
22:00 lue Don't ask me why, but I feel that PIR should be in .pir files and P6 in .pl files. [However, I do see clearly why you'd spend 5 seconds typing inline PIR than 5 hours implementing a decent sine algorithm]
22:02 colomon lue: if you're just looking for something random to do in p6 that's math-related, it would be very interesting to try implementing a new type that does Numeric.  Something like Hamiltonian numbers.
22:03 colomon It wouldn't be something to go directly into p6, it would be an early module
22:03 colomon that tests how easy it is to use does Numeric to make a new type.
22:03 lue Some weird type of number, like Quaternions. I like that :)
22:04 colomon yes, exactly.
22:04 lue Let's take a trip to Wikipedia!
22:04 colomon http://en.wikipedia.org/wiki/Quaternions
22:04 colomon I've gotta run, but read up and see if it sounds interesting to you.
22:05 lue I've read up on Quaternions before, one otherwise boring evening. Didn't know they were also called Hamiltonian numbers.
22:08 pugssvn r30971 | moritz++ | [t/spec] lexicalify perl.t
22:14 skangas joined #perl6
22:16 moritz_ phenny: ask mberends if docs/S11-Modules-proposal.pod is all implemented -- I believe it is. What should we do with the document? just add a note that it docuemnts the "is"-state?
22:16 phenny moritz_: I'll pass that on when mberends is around.
22:17 Guest19880 left #perl6
22:20 mberends er,
22:20 phenny mberends: 22:16Z <moritz_> ask mberends if docs/S11-Modules-proposal.pod is all implemented -- I believe it is. What should we do with the document? just add a note that it docuemnts the "is"-state?
22:21 moritz_ hugme: tweet rakudoperl Rakudo now has proper Perl 6 match objects (#rakudo, #perl6)
22:21 * hugme hugs moritz_; tweet delivered
22:21 jnthn moritz_++ ! :-)
22:22 mberends moritz_: although it's implemented in Rakudo, I'll move it to the proto repo, because it still needs to be implemented fully there - the multiple ver/auth numbering is not yet done.
22:28 mberends some essence of what was implemented may deserve mention in S11 itself.
22:29 lue Quaternions ought to be reallly interesting. afk, and afterwards implementing them
22:30 mberends interesting that their most useful modern day application is modeling motion in 3D
22:40 jrtayloriv joined #perl6
22:44 astrojp joined #perl6
23:00 Psyche^ joined #perl6
23:13 sorear I have finally found the bug I've been debugging the last 36 hours
23:13 sorear or rather, the miscompilation of STD
23:13 * sorear looks for the superbug
23:14 sorear oh, just an unimplemented case
23:18 diakopter I've finally found the bug (also an unimplemented case) for which I've looking for 4-5 hours.  visualstudio--
23:27 pugssvn r30972 | sorear++ | [viv] Translate <foo=.bar> syntax
23:27 sorear \o/ viv-with-own-STD.pmc can now compile regexes
23:27 sorear time for the big Test
23:28 * sorear starts stage3
23:28 sorear Can't exec "std": No such file or directory at Cursor.pm line 2676.
23:28 sorear Can't compile ../lib/DEBUG.pm6 at Cursor.pm line 2676.
23:31 sorear one ln -s ../std later...
23:49 sorear hmm, took nearly twice as long to fail as gimme5 std took to succeed...
23:53 astrojp left #perl6

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

Perl 6 | Reference Documentation | Rakudo