»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
jnthn std: my $x; say "$x >> "; 00:01
p6eval std 30924: OUTPUT«ok 00:01 115m␤»
00:03 envi^home joined 00:08 M_o_C left
dalek kudo: d42fd31 | jonathan++ | src/Perl6/Actions.pm:
The whatever currying was a little too liberal; after some labour I came up with
00:27
00:27 azert0x left
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:29
ok, so thejoyofsix.org can be hacked through the Mu repo. moritz_++ 00:31
jnthn \o/ 00:32
masak: Trying to re-instate #`{ blah } for ya. :-)
masak \o/
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:33
00:34 BrowserUk joined
masak edits it out, favouring forgiveness before permission 00:34
BrowserUk: ?
00:38 colomon joined
masak considers removing the final smiley and decides to leave it there 00:40
not all people find the lack of smileys amusing.
00:40 plobsing joined
pugssvn r30925 | masak++ | [joyofsix] some minor edits 00:41
jnthn > sub foo(Str $x) #`{LOL IMA COMMENT} { say "WIN!" }; foo("") 00:49
WIN!
masak \o/
jnthn Let's see what the speccies have to say.
colomon jnthn: you're still up? 00:50
jnthn Needed a little beating our parsing in an STD direction rather than copy paste
colomon: It appears so.
masak colomon: it's not late, it's early!
colomon you could have written a bot to replace yourself....
jnthn colomon: .pick(*) is fixed
00:50 Su-Shee left
colomon jnthn: I was just checking that. :) 00:51
jnthn colomon: Then I could blame my last commit message on it. Good plan!
colomon masak: I've only had six hours sleep in the last 36, it's officially late in my book. ;)
masak ouch :) toddler keeping you up? 00:52
00:52 envi^home left
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.
masak they say the nice moments make it all worth it.
:P
jnthn Grr, I still haven't blaught. 00:53
masak blog bligged blaught
jnthn blag
masak Oh my blogsphemy! 00:54
colomon masak: he was fantastically cute with his cousins today.
arnsholt I think this channel contributes more language weirdness than the rest of my interactions with the world, combined =p
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
masak nice.
arnsholt And 150 pages later discovered that it was 3AM
=)
jnthn beds are overrated
masak we should start a club. European Perl 6 Insomniacs. 00:56
jnthn Our meetings are at 3AM.
arnsholt Indeed =D
masak naturalement.
#ep6i in three :)
colomon the problem is we have at least three different 3AMs just among those of us here now... 00:57
jnthn I thought myself, masak and arnsholt shared a 3am? 00:58
colomon okay, two. 00:59
It's 3am for all of you?
I almost feel guilty for talking to you! 01:00
masak yes, don't encourage us!
it'll only make things worse!
arnsholt ^^ 01:01
masak arnsholt: what were you reading?
arnsholt First among equals, by Jeffrey Archers
*Archer
It's quite good 01:02
jnthn colomon: Yes, but I got up at midday ;-)
spectets well into the trig now and looking good \o/ 01:04
01:05 masak left 01:06 PenThrive left 01:09 pausenclown left 01:13 pausenclown joined
pugssvn r30926 | sorear++ | [viv] andthen/orelse translation 01:17
dalek kudo: a4dc280 | jonathan++ | src/Perl6/Grammar.pm:
Get our comment parsing more STD-ish by introducing the comment protoregex, and
01:22
01:22 jferrero left
sorear "my" variable $C masks earlier declaration in same scope at STD.pm line 32590. 01:23
the word "my" does not appear in 32590
the totality of 32590 is : $C->statementlist
it's really confused - it's generating errors out of line order 01:25
01:30 stephenlb left
dalek p-rx: 3c60bf4 | jonathan++ | src/Regex/P6Regex/Actions.pm:
Fix a panic call, so we actually panic with the useful error message.
01:36
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
night o/
01:47 [mark] joined, gbacon joined 01:48 BrowserUk left 01:58 eternaleye joined 02:02 colomon left
pugssvn r30927 | sorear++ | [viv] Translate anonymous hashes better 02:05
02:11 jaldhar joined 02:12 Limbic_Region left 02:32 whiteknight left
sorear STD.pm has too many errors. 02:41
^^^ Literal output from perl5
TimToady :D
pugssvn r30928 | sorear++ | [viv] translate when(*)
sorear !=~!=~ is not a valid infix in perl5 02:46
02:47 mikehh_ left 02:49 rml` joined
sorear TimToady: there's a delightful little misparse somewhere in STD, !~~ generates TWO infix_prefix_meta_operator nodes 02:49
no, excuse me, it generates the same node twice 02:51
ah, Actions.pm failure 02:55
03:02 meppel joined 03:03 Guest5151 left 03:06 meppl left
sorear TimToady: Why does Actions.pm exist? 03:06
03:07 eternaleye left 03:09 meppel is now known as meppl
pugssvn r30929 | sorear++ | [viv] Translate !~~ 03:11
r30929 | [Actions] Don't duplicate metaops
r30930 | sorear++ | [viv] Translate try 03:24
03:25 synth left 03:45 rml` left 03:46 gbacon left 03:59 meppel joined 04:03 meppl left 04:05 meppel is now known as meppl 04:06 skangas joined 04:10 perlperson left
pugssvn r30931 | sorear++ | [viv] *really* crude translation for map & grep 04:13
04:17 fridim joined 04:18 meppl left
sorear 50K... 04:19
pugssvn r30932 | sorear++ | [viv] Type erasure for my
sorear TimToady: STD.pm6 line 4258 looks like a fossil, ABORTBRANCH doesn't exist 04:21
pugssvn r30933 | sorear++ | [viv] Declarations need to be treated as blocks 04:25
04:36 Targhan left
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
(flakey network here--comes and goes)
anything ABORTFOO is a fossil from before the xact mechanism existed 04:40
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?
TimToady compiles CORE.setting currently, mostly
sorear ah
TimToady but any submodules used by STD
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
TimToady those are calls to std
sorear What is eqv? 04:43
TimToady infix:<eqv>? 04:45
sorear yes 04:46
pugssvn r30935 | sorear++ | [viv] Map eqv to eq like gimme5
04:46 cdarroch left
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
polymorphic deep equality? nice
TimToady yes, it does tend to accelerate, which is always nice
sorear I always missed that
TimToady it goes with cmp, polymorphic comparison
eqv is basically cmp == Same 04:48
04:49 TiMBuS joined
TimToady whereas === is object identity, where all value types treat all eqv values as the same object 04:49
sorear hmm. nextsame time 04:50
04:51 envi^home joined
TimToady TimToady: How hard would it be for STD to associate names in the AST with definition sites? 04:52
well, it's pretty easy for types, which must be predeclared, but functions can be postdeclared 04:53
pugssvn r30936 | sorear++ | [viv] Finish implementing <.nextsame> (oops) 04:54
sorear thinking back to the earlier discussion of contexts 04:56
my $v = 0; sub bar($n) { $v = &*OP($n,$v); }; sub foo { my &*OP = &[+]; for 1,2,3 { bar($_); } }; foo; say $v 04:58
seems to have suprising behavior
diakopter blinks awake 05:00
TimToady I expected 6, and that's what I got 05:03
sorear hmm. gimme5 seems to be miscompiling STD.pm6:5149
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
in: «: $<quotepair><key>» out: [':', '$<quotepair><key>'] 05:04
sorear wonders what the correct out is, for viv
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
TimToady the only reason to evaluate anything in sink context is to have a side effect 05:06
it's sort of a funny monad 05:07
diakopter -. -. 05:08
.- .-
05:12 kaare joined 05:13 kaare is now known as Guest37593
TimToady well, nothing uses that $/<sym> value, so it's kind of a placeholder for a real value... :) 05:15
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)␤»
sorear pugs: my $x = "a b"; say «$x».elems
p6eval pugs: OUTPUT«2␤»
TimToady alpha: my $x = "a b"; say «$x».elems
p6eval alpha 30e0ed: OUTPUT«1␤»
TimToady oops :)
sorear which is right?
TimToady pugs 05:23
is supposed to approximate shell quoting rules
sorear yum reparsey goodness 05:24
pugssvn r30937 | sorear++ | [viv] Implement shell-words quoting 05:30
r30938 | sorear++ | [viv] Map === to == 05:33
r30939 | sorear++ | [viv] sort takes a direct block; translate $^[ab]; leg => cmp 05:37
r30940 | sorear++ | [viv] Metaop cases for !===, !eqv 05:40
r30941 | sorear++ | [viv] Nil constant 05:41
sorear STD.pmc syntax OK
TimToady \o/ 05:51
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
r30943 | sorear++ | [viv] Correct 'has' usage 05:55
sorear ...why does Cursor call BUILD 05:57
without defining one of its own or anything like that
TimToady in case the grammar wants to do some initialization of its own, but that was a long time ago
it's mostly a fossil
pugssvn r30944 | sorear++ | [Cursor, gimme5] Rip out BUILD fossil 05:59
sorear is in runtime errors now 06:01
pugssvn r30945 | sorear++ | [viv] Arguments with defaults are implicitly optional
TimToady after that, you just have to round-tip it with no difference :) 06:02
*trip
and parse the test suite with no more errors than snaptest does now 06:03
then I'd be happy to scrap gimme5 :)
bbl & 06:04
06:09 atomicstack left 06:12 atomicstack joined 06:14 BrowserUk joined
pugssvn r30946 | sorear++ | [viv] chars -> length 06:18
06:21 uniejo joined, uniejo left
pugssvn r30947 | sorear++ | [viv] Disable required argument checking for now - STD breaks the rules and can't be fixed under gimme5 06:23
lisppaste3 nick pasted "pliea2" at paste.lisp.org/display/105876 06:28
pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/105998 06:30
06:32 eternaleye joined
lisppaste3 pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/106261 06:33
pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/106423
pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/106585 06:34
pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/106747 06:35
pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/106909
pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/107071 06:36
pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/107234 06:37
pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/107396
pliea2 pasted "if 500 people join #ubuntu-women ill show my tits" at paste.lisp.org/display/107558 06:38
06:38 fridim left 06:39 lisppaste3 was kicked by pmichaud (lisppaste3))
pugssvn r30948 | sorear++ | [viv] Implement our-like handling for role names 06:42
06:49 yinyin joined 06:50 Jmax joined
moritz_ good morning 07:01
sorear hello 07:03
07:03 Guest37593 left
moritz_ jnthn++ # Whatever currying fixes 07:07
moritz_ deleted some spam from the IRC logs 07:09
07:12 bacek left, bacek joined 07:15 dolmen joined
pugssvn r30949 | sorear++ | [viv] Moose Roles aren't inherited so we have to use method modifiers, not SUPER 07:16
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)␤»
moritz_ wonders if that kind of currying shouldn't also be done at compile time 07:22
pugssvn r30950 | sorear++ | [viv] Fix last commit 07:23
TimToady rakudo: say (*.succ).WHAT
p6eval rakudo a4dc28: OUTPUT«Block()␤»
moritz_ the problem is that it's a PIR level sub without a Perl 6 signature
rakudo: say (*.succ).signature 07:24
p6eval rakudo a4dc28: OUTPUT«␤Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
07:24 plobsing left
sorear TimToady: What are the normal failures for snaptest? 07:25
viv, using viv's STD.pmc, is functional for simple inputs... working up to STD scale now 07:26
TimToady most of the failures are undefined symbols due to not knowing where to look for the librarys 07:28
dalek kudo: 5940b25 | moritz++ | docs/ChangeLog:
[docs] update ChangeLog
sorear oh, gimme5 translates temp $*CURPAD as local $::CURPAD; 07:29
no wonder it's breaking
pugssvn r30951 | moritz++ | [t/spec] unfudge a Whatever test
sorear what does temp $*CONTEXTUAL mean? anything useful?
sorear thinks it looks confused 07:30
TimToady should be local $::CURPAD = $::CURPAD
sorear a fossil from $* == $GLOBAL:: days perhaps
TimToady temporizing a lexical differs from 'my' in that it defaults to its outer value 07:31
s/lexical/dynamic/
not a fossil
S02:2711 07:33
and theoretically 'let $*foo = 4' copies its final value outward on success, but not on failure 07:34
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:35
TimToady well, $*CURPAD implies the visibility of everything in that pad, transitively through any OUTERs 07:37
and $*CURPKG likewise out through PARENTs 07:38
sorear perhaps Actions.pm should grab references to $*CURPAD, then
or perhaps viv should be refactored as action methods instead of an AST walker 07:39
pugssvn r30952 | sorear++ | [viv] Proper temp translation 07:42
TimToady anything that is declared already remembers its pad, or at least a pad id 07:43
sorear at the site of declaration 07:44
they aren't available at the use site
I'd like to look at a name and go "oh, that's an our class with full name BLAH"
TimToady and anything that calls <.getdecl> remembers a declarand in the parse tree 07:45
under key <decl>
sorear I seem to have completely broken LTM 07:46
temp %*RX is being parsed as a function clal...
moritz_ rakudo does that too :-) 07:47
TimToady pad_can_find_name does a little bit of that; it's what constructs the OUTER::OUTER::OUTER:: for some messages 07:48
sorear temp»(?:\s)*(?#::) (?#FATE0 ) 07:49
TimToady well, I have to get up early, so I'd better go to sleep now
sorear I don't think this is right...
TimToady that looks like utf-8 > latin-1 damage
zzz & 07:51
sorear sleep well
moritz_ tries to understand rakudo's method call emitting 07:55
methodop seems to do the heavy lifting
but it doesn't know the invocant (?)
07:56 jakk joined
moritz_ is there a place that consructs method calls and knows about the invocant? 07:56
sorear dotty? 07:57
pugssvn r30953 | sorear++ | [viv] Fix more encoding damage ( TimToady++ )
07:57 jakk left
moritz_ sorear: dotty starts with parsing '.' 07:57
so... termish? 07:58
ugh, termish has no action method 07:59
ah, inherited from nqp-rx 08:00
pmichaud good morning, #perl6 :-) 08:02
moritz_ good (early?) morning, pmichaud 08:03
pmichaud: any success towards more p6ish Match objects?
pmichaud moritz_: yes
moritz_ \o/
pmichaud not complete success yet, but I've had some success
dalek p-rx: 3ce1fa3 | moritz++ | src/stage0/ (3 files):
update stage0 files
pmichaud right now I'm getting a strange failure in range.t
moritz_ pmichaud: anything I can help hacking on? 08:04
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 :-)
git checkoub -b mob_really # :-) 08:06
pmichaud don't I need to stash my intermediate changes somewhere?
moritz_ not for creating a new branch
only for switching to an existing branch 08:07
pmichaud ah, I think I may have found my remaining bug
might not need the branch after all :)
moritz_ \o/
pmichaud otoh, I'm probably celebrating prematurely.
moritz_ somehow it's frustrating: I've spend days on these mob\d branches 08:08
and now you come up with something working(ish) in a few hours
pmichaud I have the advantage of knowing how all of the pieces fit together, though.
moritz_ I know
08:09 M_o_C joined
pmichaud I seem to have postcircumfix:<{ }> working fine.... just adding in postcircumfix:<[ ]> now. 08:11
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
(so if it doesn't work I'll push the branch and you can look/play a bit if you'd like :)
sorear good morning pmichaud 08:15
pmichaud alpha: 'abc' ~~ /b/; say $/ ~~ Positional; 08:16
p6eval alpha 30e0ed: OUTPUT«1␤»
pmichaud hrm
alpha: 'abc' ~~ /b/; say $/ ~~ Associative;
p6eval alpha 30e0ed: OUTPUT«1␤»
pmichaud I didn't quite expect that.
pugssvn r30954 | sorear++ | [viv] Generate correct min values for \X and .
pmichaud ahhh, .[] seems to work now 08:18
let's try a full spectest
hmmm, almost works 08:20
I'm having trouble with "Match does Positional" for some reason.
(the full declaration needs to be class Match is Regex::Match is Cool does Positional does Associative { ... } 08:21
moritz_ ah, inheriting from Regex::Match might be a better approach than completely writing it from scratch 08:23
pmichaud yes
especially since Regex::Match already knows all of the pieces
08:25 yinyin left
pmichaud okay, I have "does Positional" working and "does Associative" working. Now if I can just get "does Positional does Associative" working. :-| 08:27
that appears to be an issue with the metamodel, not with the Match class itself, though.
08:28 JimmyZ joined 08:36 Su-Shee joined 08:39 clintongormley joined
pmichaud rakudo: say ?(Q:PIR { %r = box 1 }) 08:40
p6eval rakudo a4dc28: OUTPUT«1␤»
pmichaud rakudo: say (Q:PIR { %r = box 1 }).WHAT
p6eval rakudo a4dc28: OUTPUT«Int()␤»
pmichaud rakudo: say (Q:PIR { %r = box 1 }).PARROT
p6eval rakudo a4dc28: OUTPUT«Integer␤»
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
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)␤»
pmichaud cognominal: yes, this should fix that. 08:46
cognominal And the anonymous class part?
pmichaud that also
cognominal your are my hero
pmichaud++
08:47 skangas left
cognominal www.lemonde.fr/politique/article/20...23448.html 08:54
Su-Shee cognominal: this is eery. I'm just reading an article about the union of nouvel observateur and le monde... 08:57
cognominal ho, sorry, wrong channel again 08:58
Su-Shee clicks blindly on every link. ;) 08:59
cognominal here, that's only French but EU is even worse.
08:59 ejs joined
Su-Shee I could easily write the same article in german.. 09:00
cognominal I wish I could speak/read german but I was a loafer in school 09:01
Su-Shee same here with french. I only recently reactivated it that I at least can read again... 09:02
and funny as it sounds but it would really help if p2p were more international. ;) 09:03
cognominal agreed :)
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
09:04 ejs left, ejs joined
Su-Shee it would also help if there were tv series in german/french (russian I need!) which are actually worthwhile watching ;) 09:05
sorear LTM is still broken and I'm not awake enough to figure out why 09:06
sorear off
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.
Su-Shee oh lord.. that's about like saying "hey, I start beginner's french with foucault!" ;) 09:07
oh, no even better: "I read Proust first" ;)
cognominal (Su-Shee)++
Su-Shee "because of is good grammar in his pagelong sentences" ;))
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:09
cognominal :) 09:10
I would use some well chosen Prévert poems instead, easy and fun. 09:12
Hardly an original idea, that's what they teach to young kids
afk& # they gave me a SIM card but not tool to insert in my iPad. 09:13
pmichaud moritz_: my changes now in the "mob_pm" branch on github. feel free to look and experiment there a bit. 09:15
I'm running a spectest now -- so far no fails
off to take a quick shower, then will be back to check on spectest progress
09:27 am0c joined
pmichaud all current spectests pass in the mob_pm branch. 09:28
I'm okay with merging it to trunk if someone wants to go ahead and do that. 09:29
moritz_ also runs a spectest
will merge later
pmichaud One piece that is known not to work in the branch is something like $/[1, 2, 4]
because of the inability to have "does Positional"
maybe jnthn++ can look into that
moritz_ ./perl6 -e '"abc" ~~ /<alpha>(.)+/; say $<alpha>; say $0.WHAT' 09:30
a
Method 'WHAT' not found for invocant of class 'ResizablePMCArray'
09:30 am0c left
pmichaud right, I didn't work on getting the arrays in place yet 09:30
moritz_ ah well, still needs some work
pmichaud I was primarily wanting to get match objects as Rakudo objects
arrays are next
moritz_ sure, it's already a good improvement
pmichaud although *really* ResizablePMCArray ought to be mapping to Parcel, at least.
I'm not sure why that's not happening. 09:31
hmmm. 09:32
I could've sworn that at one point I had RPA acting like Parcel.
maybe I had to take that out.
wonder what happens if I put the mapping back in 09:33
moritz_ $ ./perl6 -e '"abc" ~~ /<alpha>*/; say uc $/'
ABC
\o/
pmichaud yes, I specifically checked that. Match is now ~~ Cool 09:34
ah, I see why I was getting the Integer.Bool failure 09:36
hmmm.
looks like mapping RPA to Parcel has some issues. 09:39
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?
moritz_ .caps, .chunks, .perl
pmichaud okay, those are good ones
moritz_ I need the first two for the book :-)
pmichaud I'd probably like to see .caps and .chunks provided in Regex;Match
but if you want to just do them in p6 for rakudo for now, that's fine.
moritz_ you'll be free to backport them to NQP :-)
pmichaud wfm. 09:42
although .caps and .chunks might actually be easier to implement now since Cursor objects have much more information than Match objects
i.e., rather than trying to build them from Match, better might be from Cursor (which has all of the captures in sequence) 09:43
ah, but those are methods on Match, so that's where they need to be 09:44
never mind, then
moritz_ does a match object still has a back reference to cursor?
pmichaud it does :-)
moritz_ well :-)
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
pmichaud it'd only be an additional array 09:46
but yes, for now I'd go with the backport version.
we can improve things a bit later
(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?
moritz_ Su-Shee: you throw it into ~/.perl6/lib/ 09:49
Su-Shee: if you try to load a module that doesn't exist, you'll get a list of all the default locations
Su-Shee and if it has a makefile? 09:50
moritz_ then what? 09:51
Su-Shee hmpf, wait I have to clean up the segfault first. 09:54
what do I miss here? Can't find ./NativeCall in @*INC 09:55
pmichaud afk, nap
moritz_ Su-Shee: how old is your rakudo? 09:56
Su-Shee moritz_: erlangen. freshly build. 09:57
moritz_ Su-Shee: too old :-)
Su-Shee aeh..
moritz_ not to old to load modules
but too old to get the good error message
09:58 ejs left
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)␤»
moritz_ RPAs are a PITA
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)␤»
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
moritz_ rakudo: 'aa' ~~ /<alpha>+/; say pir::isa__iPs($<alpha>, 'ResizablePMCArray') 10:05
p6eval rakudo 5940b2: OUTPUT«1␤»
10:06 ejs left
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 10:13 BrowserUk left
mberends Su-Shee: NativeCall is in github.com/jnthn/zavolaj (documentation fail :-/ ) 10:15
moritz_ mberends: is fakedbi in proto's project.list? 10:16
mberends yes, zavolaj also 10:17
and on proto.perl6.org :)
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
m6locks oh ok, so imma try again soon 10:19
10:19 colomon left
mberends wants to make proto automatically pick the latest monthly release 10:20
10:21 whiteknight joined 10:23 BrowserUk joined 10:25 azert0x joined
moritz_ wants a ponie 10:35
a Perl 6 On New Internal Engine
dalek kudo: 250adbb | pmichaud++ | (5 files):
Initial fixes towards enabling Rakudo-specific Match objects.

getting Match ~~ Positional to work (see src/core/Match.pm for details).
10:37
kudo: 3ac2d94 | moritz++ | (5 files):
Merge remote branch 'origin/mob_pm'
kudo: f58bca2 | moritz++ | build/ (2 files):
remove some setting left-overs from alpha
kudo: f743dca | moritz++ | build/gen_ (2 files):
[build] remove two fossile Perl scripts

make Match.list and Match.hash return Perl 6 objects
Su-Shee I have to use proto? 10:38
moritz_ no; you can install dependencies manually if you want
Su-Shee downloads the stuff with the name I can't remember or type properly. 10:39
moritz_ rakudo: say list(('foo' ~~ /<alpha>+/).<alpha>).WHAT 10:44
p6eval rakudo 5940b2: OUTPUT«List()␤»
moritz_ rakudo: say list(('foo' ~~ /<alpha>+/).<alpha>) ~~ List
p6eval rakudo 5940b2: OUTPUT«1␤»
moritz_ rakudo: say list(('foo' ~~ /<alpha>+/).<alpha>).kv
p6eval rakudo 5940b2: OUTPUT«0f1o2o␤»
Su-Shee mberends: do I have to make fakedbi or can I just throw the files into the appropriate dirs? 10:45
10:52 jferrero joined
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:55
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. ;)
mberends hopes the first FakeDBI user achieves success 10:57
Su-Shee mberends: "erlangen" is recent enough? 10:59
mberends Su-Shee: yes it should be
pugssvn r30955 | moritz++ | [t/spec] lots of Rakudo unfudges 11:00
Su-Shee I can "use" it. 11:01
mberends :-)
snarkyboojum yay for unfudges!
mberends Su-Shee: for a first application, copy and paste a few lines from fakedbi/t/10-mysql.t
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" :)
mberends snarkyboojum: if you'd like to add that feature to proto, I'd be glad to help 11:03
snarkyboojum mberends: :)
Su-Shee now I used FakeDBI.
snarkyboojum mberends: might take you up on the offer if you think it'd be a nice idea
11:03 christine left 11:04 kaare joined, kaare is now known as Guest19880
Su-Shee oh surprise. I actually need a mysqld as well ;) 11:06
mberends snarkyboojum: it's the "open source" way, write code that scratches *your* itch ;-) 11:07
snarkyboojum mberends: aye :)
moritz_ that's why I'm working on the Match objects right now 11:08
snarkyboojum moritz_++ :)
moritz_ $ ./perl6 -e 'say ("abc" ~~ /<alpha>(.)/).list'
b
$ ./perl6 -e 'say ("abc" ~~ /<alpha>(.)/).hash' 11:09
alpha a
and it's really a Perl 6 hash
and a Perl 6 List
11:16 christine joined
Su-Shee mberends: FakeDBD::mysql::Connection()<0xd8d4e10> 11:19
:)
11:20 am0c joined 11:21 isBEKaml joined
mberends Su-Shee: that's (half) good news, it may even be a database/permissions thing :) 11:21
11:21 am0c left
Su-Shee no, it's plainly the say output of my $dbh :) 11:21
which I would interpret as a success I'm trying to say :) 11:22
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:25 lisppaste3 joined
isBEKaml hi, #perl6! My latest Rakudo build failed -> pastebin.com/HtUk6cEj 11:26
Su-Shee *tadaa* "1" ;)
mberends \o/ 11:27
snarkyboojum isBEKaml: try a make realclean; perl Configure.pl --gen-parrot; make?
mberends Su-Shee++ # for motivation
isBEKaml snarkyboojum: done that already. perl Configure.pl --parrot-config to point to my latest parrot build.
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
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)
snarkyboojum but different error about Stringy or something
isBEKaml: what platform are you building on? 11:29
isBEKaml snarkyboojum: linux x86 32 bit
mberends Su-Shee: very nice. sorry about the slowness :-/
Su-Shee mberends: not your fault :)
snarkyboojum isBEKaml: Mmm.. builds on for me
*ok
Su-Shee blames mysql from now on.
isBEKaml snarkyboojum: lemme try once again. I do make realclean and build. Somehow it failed this time. :( 11:31
snarkyboojum isBEKaml: good luck
isBEKaml: you don't use Configure to get the right parrot for you, but build it separately? 11:33
sorry, Configure.pl
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
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
that way it's just perl Configure.pl --gen-parrot; make; and I'm done
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
unless the version has changed.. ok :) 11:39
isBEKaml snarkyboojum: I'm building rakudo again. hopefully, it should build this time . :) 11:40
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! ;)
snarkyboojum isBEKaml: but rakudo may not build on latest parrot (as has happened recently quite a bit) 11:42
isBEKaml: PARROT_REVISION is basically telling you what version of parrot plays nicely with bleeding edge rakudo :) 11:43
isBEKaml snarkyboojum: yeah, but I found the error message to be odd: Class '[ 'GatherIterator' ]' not found 11:44
snarkyboojum: I think, your error message was odd too. Stringy's just a role to String types and there's nothing in it. :)
snarkyboojum well I had a build error to do with masak's buf changes, doing a role stringy
yeah - not sure why I had to do a make realclean :) 11:45
Su-Shee mberends: I'm managing do, prepare and execute - how would I do fetchrow_* etc? 11:48
mberends Su-Shee: the execute returns a resultset object that has a fetchrow_arrayref() method 11:49
Su-Shee ah.
11:50 redicaps joined
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]
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]
cognominal moritz_++ # last patch. damn, within a few weeks I will lack pretexts for whining.
11:53 skangas joined
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:55
ah wait, I think I did something else wrong. 11:56
mberends Su-Shee: fetchrow_array not yet implemented, only fetchrow_arrayref and fetchall_arrayref so far. 11:57
Su-Shee mberends: pastebin.org/290012 11:59
mberends looks 12:00
Su-Shee rakudo erlangen build with --gen-parrot. 12:02
snarkyboojum don't you need $sth.fetchrow_arrayref? 12:03
not $result.fetchrow_arrayref?
Su-Shee snarkyboojum: <@mberends> Su-Shee: the execute returns a resultset object that has a fetchrow_arrayref() method 12:04
12:04 colomon joined
mberends has been known to confuse minor details like that 12:04
12:05 [mark] left
mberends Su-Shee: snarkyboojum++ is right 12:05
snarkyboojum but execute does 'return !defined $!errstr;'
which is why you're getting a boolean
colomon moritz_++ pmichaud++
Su-Shee ah. then I've just tried the wrong method :)
snarkyboojum right method, wrong invocant :) 12:06
mberends Su-Shee: right method, wrong variab... er, what snarkyboojum++ said
Su-Shee no first I tried the right invocant with the wrong method :)
then the wrong invocant with the right method ;)
snarkyboojum that too :)
Su-Shee YAY! banshee@glampad:/home/banshee/Perl6> ./dbitest.pl
susi
12:06 meppl joined
isBEKaml banshee? :O 12:07
mberends wailing in the night
Su-Shee yeah my old nick which I keep as my username because half of my email adresses still use it
snarkyboojum w00t! working database Perl 6 stuff :)
isBEKaml yeah, why would anyone choose their username like that? :D
snarkyboojum mberends++ 12:08
Su-Shee show a bright future:
banshee@glampad:/home/banshee/Perl6> ./dbitest.pl
133hasihoppi
isBEKaml: why not? I like my username
mberends: ok, so we can start high end data mining now. ;) 12:09
(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)
snarkyboojum: Don't know what happened. it just built now.
odd, whatever that was...
Su-Shee mberends: I hereby declare: everything working as supposed to :) 12:11
mberends Su-Shee++ # early adopter
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! :)
snarkyboojum isBEKaml: a glitch in the matrix :) 12:13
isBEKaml mberends++ ## early explorer in P6 to DBs. :)
mberends started implementing FakeDBD::AnyData, because of not having a clue how hard it could be
12:16 dju left, dju joined
mberends afk & # swimming 12:17
12:19 cognominal left 12:22 cognominal joined
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)␤»
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)␤»
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:27 BrowserUk left, azert0x left 12:28 rgrau joined
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:28
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:31
Su-Shee HA! my @foo = $sth.fetchrow_array; 12:32
@foo.say;
7susi
*lalala* :)
snarkyboojum if I do ([[+]] 1, 20, 300, 4000).say without leading space I get 'Could not find sub &prefix:<[[+]]>'
esoteric behaviour depending on leading whitespace and a previous error
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)␤»
colomon rakudo: ([ R[+] ] 1, 20, 300, 4000).say
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)␤»
Su-Shee rakudo: my @foo; @foo.push('bar'); @foo.push('baz'); @foo.say; 12:34
p6eval rakudo 5940b2: OUTPUT«barbaz␤»
Su-Shee rakudo: my @foo; @foo.push('bar'); @foo.push('baz'); @foo[0].say; 12:35
p6eval rakudo 5940b2: OUTPUT«bar␤»
isBEKaml rakudo: say [+] (1..5) 12:36
p6eval rakudo 5940b2: OUTPUT«15␤»
isBEKaml odd, that fails in the REPL
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)␤»
snarkyboojum rakudo: say [\+] (1..5)
p6eval rakudo 5940b2: OUTPUT«1361015␤»
snarkyboojum rakudo: say ([\+] 1..5).perl 12:38
p6eval rakudo 5940b2: OUTPUT«(1, 3, 6, 10, 15)␤»
12:39 dju_ joined 12:40 JimmyZ left
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:42 dju left 12:43 rgrau_ joined 12:44 rgrau left 12:47 dju_ left
isBEKaml > say [+] (10,203,30,45, 500) 12:47
Could not find sub &prefix:<[+]>
> say [+] (0..5)
Could not find sub &prefix:<[+]>
Wrong first time, right second time Same error message?? :O
REPL fail. :( 12:48
pugssvn r30956 | colomon++ | [t/spec] A few wilder tests for nesting.
colomon > say [+] (10,203,30,45, 500)
788
> say [+] (0..5)
15
that's on my local build of the latest in github
isBEKaml me too. I built it just a while ago. 12:49
snarkyboojum colomon: do say 55 \+ (25,35,45) first
cognominal works here toot
snarkyboojum to get a 'Confused at line 1'
colomon snarkyboojum: say 55 \+ (25,35,45)
?
snarkyboojum it's along the lines of the weird behaviour I mentioned above
yeah
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)
Confused at line 1, near "say 55 \\+ "
> say [+] (10,203,30,45, 500)
Could not find sub &prefix:<[+]>
indeed. weird
snarkyboojum that's it :)
isBEKaml yep.
:)
snarkyboojum that's what isBEKaml is seeing too
isBEKaml > say [{+}] (10,203,30,45, 500)
Unable to parse blockoid, couldn't find final '}' at line 1
I did this first and repeated the series of above tests and finally fail with the right statements. :) 12:51
I think it's something to do with statefulness in the REPL. 12:52
colomon +1 12:55
isBEKaml it remembers the previous error state and hits the same wrong end.
12:59 JimmyZ joined 13:02 redicaps left
snarkyboojum and only if the statement generating the error is run as the first command in the repl :) 13:02
13:02 redicaps joined
snarkyboojum otherwise it seems to be ok 13:02
isBEKaml no, doesn't seem to be so. 13:04
pastebin.com/cgR62Nmh 13:05
jnthn o/
isBEKaml \o
colomon \o 13:06
jnthn rakudo: say [+] (0..5)
p6eval rakudo bbb336: OUTPUT«15␤»
snarkyboojum isBEKaml: not always then :)
colomon rakudo: ([[+]] 1, 20, 300, 4000).say
p6eval rakudo bbb336: OUTPUT«Could not find sub &infix:<[+]>␤current instr.: '' pc -1 ((unknown file):-1)␤»
jnthn > say [+] (0..5)
15
colomon: ooh
colomon jnthn: if you do say 55 \+ (25,35,45) in your local REPL, normal [+] will fail afterward 13:07
jnthn: I added some more tests to nesting.t this morning, too. ;)
isBEKaml jnthn: or for that matter, any failing statement before the correct statement. :)
colomon afk
jnthn colomon: REPL problem for the most part though?
colomon that one is.
jnthn isBEKaml: The problem is probably that it generates the meta-op sub during the parse and marks it as generated
snarkyboojum isBEKaml: pastebin.com/vNePxL3R 13:08
that works
jnthn However, a later error means we never compile and install that meta-op sub.
colomon the [[+]] is everywhere
jnthn But the parser still says "oh hey, I generated it"
Yeah, I think that's a Real Broken.
snarkyboojum ah, that would explain it
jnthn (the [[+]] one)
erg...I see why the nestings are busted. 13:09
OK, I can fix that later today. :-)
(people testing my code)++
snarkyboojum jnthn: the first example I gave doesn't use a previous metaop pastebin.com/Pp8AWaBZ 13:11
or maybe I'm using the wrong terminology there 13:12
13:14 whiteknight left
snarkyboojum so might be a different problem? 13:15
13:19 azert0x joined
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:19
snarkyboojum even though my example doesn't use a previous meta-op? 13:20
or maybe a lone % does - I don't know :) 13:21
but I don't think it would 13:22
13:23 azert0x left
jnthn wow, a lot of backlog and progress while I slept/read/whatevered. 13:26
:-)
isBEKaml :) 13:27
snarkyboojum: I'm not sure about the % generating the meta-op.
snarkyboojum: I don't know if it does.
jnthn: Does the REPL remember variables from history? 13:28
snarkyboojum well % doesn't even parse right?
jnthn isBEKaml: Not yet, that's one of the things pmichaud++ is working on
isBEKaml snarkyboojum: yeah, it doesn't and everything else that comes in after that fail, fails.
snarkyboojum isBEKaml: doesn't look like it
isBEKaml jnthn: Ok. 13:29
snarkyboojum unless you run the command first, in which case it works after a fail
isBEKaml snarkyboojum: yes, just saw that. 13:30
snarkyboojum anyway - I won't confuse the issue any more :)
isBEKaml goes back to reading the Specs. 13:32
13:33 hudnix joined, Ross left
jnthn rakudo: [][] 13:42
p6eval rakudo bbb336: ( no output )
jnthn > say [[+]] 1,2,3,4,5; 13:43
15
\o/
rakudo: say (1,2,3) >>[-]<< (4,5,6); 13:44
p6eval rakudo bbb336: OUTPUT«-3-3-3␤»
colomon \o/ 13:45
jnthn Still got problems with some of The Others.
13:48 M_o_C left
jnthn oh, I think I see why... 13:49
isBEKaml snarkyboojum: wait, here's something more. :D 13:50
pastebin.com/d3k9ZYpF
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.
snarkyboojum it does?
isBEKaml snarkyboojum: looks like it and failed when trying to install. So others seem to fail. 13:52
We have been going back and forth without any inputs from the gurus here. :) I'll defer to them to chime in... jnthn ?
snarkyboojum it's not just the % though, it's anything that generates that error like . 13:54
jnthn > say 1 R[R[R-]] 2
1
> say 1 RR[R-] 2
1
:-)
isBEKaml jnthn: uh, 1 ? shouldn't it be -1? 13:55
rakudo: say 1 [-] 2
p6eval rakudo bbb336: OUTPUT«-1␤»
jnthn isBEKaml: Odd number of Rs.
So it ends up as 2 - 1
:-)
isBEKaml ah, :) 13:56
jnthn rakudo: say 1 - 2
p6eval rakudo bbb336: OUTPUT«-1␤»
jnthn rakudo: say 1 R- 2
p6eval rakudo bbb336: OUTPUT«1␤»
jnthn rakudo: say 1 RR- 2
p6eval rakudo bbb336: OUTPUT«-1␤»
jnthn rakudo: say 1 RRR- 2
p6eval rakudo bbb336: OUTPUT«1␤»
jnthn :-)
I wish we had an A prefix meta-op
then you could write pirate Perl 6
1 ARRRR 2
1 ARRRR- 2 :-)
isBEKaml ARRR, har har har,, pirates of the perlibbean.. :) 13:57
Su-Shee *haha* :)
pmichaud good morning, #perl6
jnthn colomon: Do we have any tests for the R[R[R-]] bits?
yayitspmichaud!
isBEKaml EPARSEFAIL
morning, pmichaud ! 13:58
jnthn pmichaud: 14:00
src/core/YOU_ARE_HERE.pm \
220
+ src/core/Match.pm \
YOU_ARE_HERE probably wants to come last, though it's not a big deal.
pmichaud oh, yeah…
jnthn (as in, not a big deal under the way it's currently implemented)
pmichaud: On Positional and Associative (doing both), what was the problem? 14:01
pmichaud: A composition conflict, perchance?
pmichaud didn't look like one
colomon jnthn: nothing quite that complicated, but there are tests for one or two levels in nesting.t
jnthn OK, you're liable to get one.
pmichaud first stage problem was method "Bool" not found for class Integer
jnthn colomon: I just looked in there, but saw nothing fudged.
pmichaud: Oh, oddness.
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.
pmichaud: Because role Positional[::T = Mu] { ... method of() { T } }
moritz_ back
jnthn And similar for Associative
pmichaud well, thus far I'm getting errors that aren't at all saying anything about conflicts
jnthn So you want a method of() { Mu }
OK
That was my first guess, anyways.
pmichaud just a sec and I'll bring it up to date
jnthn OK 14:03
If it's meta-model-y stuff I'd like to get it fixed. :-)
14:03 redicaps left 14:04 lisppaste3 left
jnthn colomon: We pass all of it, but OTOH so I guess did Rakudo before I did these fixe 14:04
*fixes
cognominal in ::T = Mu (Mu is a default type parameter, just like value for parameters in routine signatures?
jnthn colomon: Correct 14:05
gah
cognominal: correct
cognominal jnthn++
moritz_ rakudo: say (gather take 3).sort.WHAT 14:08
p6eval rakudo bbb336: OUTPUT«Int()␤»
moritz_ that's pretty confusing
I'd expect a List or a Parcel or Seq or so
jnthn o.O
moritz_ anyway, I'm confident that was a bit of fiddling I'll be able to implement .caps and .chunks pretty soon 14:10
14:10 kel_ joined, pmurias joined
moritz_ commit bbb336 prepared the basics 14:11
jnthn moritz_++
moritz_ akshually 9 of the first 10 test for .caps and .chunks pass 14:12
jnthn colomon: oh lol, I just hadn't svn up'd the test suite 14:13
jnthn--
moritz_ rakudo: say list(gather { take 1; say 1; take 2; say 2 } ) 14:15
p6eval rakudo bbb336: OUTPUT«1␤2␤12␤»
Su-Shee wtf? my fakedbi oeh.. went stale. what does "Null PMC access in can() 14:20
mean?
that some method can't be called? is not found?
died of a sudden death?
jnthn Su-Shee: Something happened that really shouldn't have. :-/
moritz_ died a sudden death 14:21
jnthn Su-Shee: Can you no-paste the backtrace?
Su-Shee sure. sex.
sec :)
man :)
jnthn ...
Su-Shee I think "perl 7" is a safer name. ;)
jnthn: 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. :-)
Su-Shee: Eww 14:23
Su-Shee databases confuse me.
oh wait do I just missed the execute? 14:24
forget it.
GNAGNA. ;)
jnthn Ah
But it probably means we're missing a NULL check somewhere. 14:25
Most likely in Zavolaj.
Su-Shee must have accidently dd'ed it.
jnthn Should have got some complaint about an undefined variable rather than a NPMCA.
Su-Shee yes works again.
jnthn \o/ 14:26
moritz_ rakudo: class A { multi method a() { }; multi method a() { } } 14:27
p6eval rakudo bbb336: ( no output )
moritz_ rakudo: class A { multi method a() { }}; use MONKEY_TYPING; augment class A { multi method a() { } }
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)␤»
Su-Shee and has something which starts to resemble "fetchrow_hashref"
moritz_ that's a bug, right?
jnthn moritz_: Looks like it. 14:28
moritz_ any masaks around?
looks like not
jnthn oh noes, how will we get an RT ticket filed?
Su-Shee moritz_: well write a FakeMasak then!
jnthn pmichaud: about? 14:29
Su-Shee jnthn: can I try writing fetchrow_hashref?
moritz_ submitted bug report
14:30 JimmyZ left
jnthn mberends: What Su-Shee asked, if you're about. :-) 14:30
Su-Shee: But I'm sure mberends++ would welcome patches. :-)
moritz_ just do it :-)
Su-Shee: and if you have a github ID, I can give you commmit access to fakedbi
hugme: show fakedbi
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: github.com/mberends/fakedbi/
Su-Shee ok. first I need mozarella caprese. then I touch databases again. 14:31
moritz_ jnthn: how do I iterate over a ResizablePMCArray in rakudo? 14:33
in Perl 6 code :-)
isBEKaml in #perl6, do we have to be explicit? :-)
moritz_: ^^ :P 14:34
moritz_ well, I know how to iterate over a RPA in PIR
and over a Perl 6 array in Perl 6
pmichaud simplest is probably to convert the rpa to a Seq and then iterate over that.
jnthn Aye
moritz_ Seq.new($RPA) ? 14:35
pmichaud should work.
RPAs are basically parcels
(parcels are basically rpas)
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
pmichaud: Then languages can implement it to do their own thing.
pmichaud jnthn: that's what I'd like also :-)
so, +1
jnthn pmichaud: OK. Any ideas what to call it, and where to hang to call for it?
pmichaud I'd even like HLL::Compiler to provide a sane deffault
oh, how about 'display_backtrace' ?
or 'dump_backtrace' 14:37
jnthn That'd work. Do we want a seperate one for when in the repl too?
pmichaud or even 'backtrace'
just do the basic one to begin with, and I'll take a look at it
moritz_ somhow 'for Seq.new($rpa)' only does one iteration, even though $rpa has two items
pmichaud I'll have a better idea then where it should go and when
moritz_: maybe Seq.new($rpa).eager 14:38
moritz_ I'm iterating over indexes now
that's ugly, but it works
\o/ most .caps/.chunks tests pass
only failure: $/.chunks should return a List, returns a GatherIterator 14:39
I'll fudge that one
jnthn pmichaud: The thing is that it seems we might want to put it in eval
pmichaud: But that isn't really want we want either
Since that's what other languages call to eval our code.
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
jnthn pmichaud: Below that is only HLLCompiler.command_line and HLLCompiler.main
pmichaud it could go in evalfiles 14:41
and I'm fine if it goes in .main
jnthn pmichaud: But that's not in the call chain if we do perl6 -e "...awful things..."
pmichaud er, .commandline
.commandline would certainly in the call chain, wouldn't it? 14:42
*certainly be
jnthn pmichaud: Yes, that always is.
14:42 hercynium left
jnthn pmichaud: That seems workable. 14:42
pmichaud start with commandline then
jnthn pmichaud: OK. Seems we inherit that one form PCT::HLLCompiler.
Which is...in the Parrot repo?
pmichaud oh, ick.
yes, in the Parrot repo
jnthn Hm
Well, we could put the .backtrace in nqp-rx of course 14:43
Like, check if there is a .backtrace method
If yes, call it
pmichaud start with that
jnthn If no, just re-throw
OK
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?
jnthn isBEKaml: We do for compile time errors, it's the runtime ones we seem to suck at. 14:44
isBEKaml: That's what I'm working on fixing. :-)
isBEKaml oh, jnthn++ (I'd really like that)
pugssvn r30957 | moritz++ | [t/spec] brush up caps.t, and fudge it for rakudo 14:46
moritz_ loves to see his pushes rejected by github 14:47
14:47 tedv| joined
moritz_ becaues it means somebody else hacked on rakudo in the mean time :-) 14:47
dalek kudo: 9085183 | jonathan++ | src/Perl6/Actions.pm:
Tweak some name canonicalization/non-canonicalization bits for R[R[-]] style
14:48
kudo: f2896c3 | jonathan++ | src/ (2 files):
Rename notresults to negate, to be in line with S03.
kudo: 8c14284 | moritz++ | src/core/Match.pm:
[Match] .caps and .chunks
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. :)
not until just now. :)
I'll move to the other branch :-)
pugssvn r30958 | jnthn++ | [t/spec] Couple more nesting and bracketed infix tests.
moritz_ pmichaud: should I delete the branch, in order to avoid such confusion in future? 14:50
(after cherry-picking to master)
pmichaud yes, please
moritz_ done 14:51
pmichaud excellent, thanks.
moritz_ that git branching model is really powerful, once you've grokked it :-)
dalek kudo: ffb9a36 | pmichaud++ | build/Makefile.in:
YOU_ARE_HERE wants to be last in the core setting (jnthn++).
14:54
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)␤»
jnthn rakudo: my rule test {test}; "test" ~~ /<&test>/; say $/.keys.perl;
p6eval rakudo bbb336: OUTPUT«()␤»
Su-Shee is this still the latest? svn.pugscode.org/pugs/util/perl6.vim
jnthn rakudo: my rule test {test}; "test" ~~ /<test=&test>/; say $/.keys.perl;
p6eval rakudo bbb336: OUTPUT«()␤»
moritz_ Su-Shee: nope
pmichaud .keys is very unlikely to work yet
jnthn rakudo: my rule test {test}; "test" ~~ /<test=&test>/; say %($/).keys.perl;
p6eval rakudo bbb336: OUTPUT«()␤»
jnthn pmichaud: OK :-)
pmichaud: Just trolling Rakudo for closable RT tickets. :-) 15:04
moritz_ what *should* .keys on a match object return?
pmichaud I've been wondering where .keys should go
.keys on Match should probably fail
or it would return @().keys, %().keys
(i.e., the union of all keys)
moritz_ I'd prefer that
jnthn pmichaud: rt.perl.org/rt3/Ticket/Display.html?id=62528 seems to want it to be the same as %().keys 15:05
oh, maybe not
it'd work if it returned the union in that case too
(since there's no positional captures)
pmichaud at any rate, all of the array and hash methods still need a ton of work (not just on Match)
moritz_ aye 15:06
pmichaud I was a little surprised to see that Hash ~~ EnumMap
and postcircumfix:<{ }> on EnumMap is returning a proxy
probably shouldn't be a proxy there
jnthn pmichaud: EnumMap seems to be the new name for Mapping
pmichaud (since it's immutable) 15:07
jnthn pmichaud: Hmm, good point.
pmichaud anyway, I'll be going through those today+tomorrow and seeing if I can get lists and hashes cleaned up
rather than try to stuff a bunch of things into Match just to get it to do workarounds too
jnthn *nod* 15:08
15:09 [Coke] left
mberends Su-Shee, moritz_, jnthn: FakeDBI patches definitely welcome. Better still, ++busnumber 15:20
Su-Shee mberends: I'm getting my feet wet with fetchrow_hashref right now. 15:23
mberends :-)
Su-Shee: fetchrow_array might be easier to begin with because column names are hard to implement portably. 15:28
15:28 patspam joined
Su-Shee already have half of it. 15:29
had to do a little relationship argument in the meanwhile wether or not DBI _has_ fetchrow_array ;) 15:30
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
nopasting the error I'm currently getting....
mberends Su-Shee: and one request soon to be included in the README: please keep it backward compatible with classic DBI v1 ;) 15:33
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
jnthn: nopaste.snit.ch/20720 15:35
dalek kudo: c491a18 | pmichaud++ | src/core/operators.pm:
Enable &prefix:<?> to work on foreign objects.
jnthn pmichaud: investigating 15:38
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:40
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
e.g., Parrot objects
colomon pmichaud: sure, but why did you do it now? that's the interesting question... :) 15:44
jnthn pmichaud: In the meantime, see gist.github.com/418336
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:<?>
which in turn attempt to call .Bool on whatever argument is passed
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.
pmichaud (that doesn't come until later)
and we have a Parrot integer because it got autoboxed from within &infix:<===>(Integer, Integer) 15:46
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.
jnthn: umm.... what patch?
jnthn pmichaud: :-)
pmichaud: The one in the gist
pmichaud oh
I didn't see that :) 15:47
colomon pmichaud: gotcha. interesting and cool.
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
pmichaud: Which fails on Parrot subs.
pmichaud: Going to just stringify it instead, since it stringifies to its name for Perl 6 and Parrot ones. 15:48
pmichaud jnthn: +1
jnthn pmichaud: Hopefully that deals with it.
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
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.
Su-Shee mberends: is there a reason for the loop with $i instead of for $native_row -> $bla ... ?
jnthn pmichaud: OK
pmichaud (and "does Positional" works if "does Associative" isn't present... but then other things break) 15:50
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:51
Su-Shee mberends: in $native_row[last_element_of_my_row] is something like this: udofoobarfoobardatadata 15:53
what's that?
mberends eek, probably a bug or a NYI bit 15:54
hopefully not an off-by-one error, indexing beyond end of array 15:55
the native array is not as error-friendly as a Rakudo array
Su-Shee it segfaults if I grab an index beyong. 15:56
beyond.
jnthn pmichaud: Gah, well, that only gets us a little further... :-/
Method 'multi' not found for invocant of class 'Sub' 15:57
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.
would it help if Positional was written in p6?
jnthn pmichaud: *very* much so
pmichaud: These kinds of things are why Associative is.
mberends Su-Shee: that may be a(nother) reason to stick to a C-style loop
pmichaud okay
jnthn pmichaud: Here's the thing that got me *really* stuck though. 15:59
pmichaud: It seems we want to ahve the commonalities in Associative and Positional.
pmichaud: e.g. handling slices etc
pmichaud: And then classes implementing the role would supply the way to get just one attribute.
Su-Shee mberends: also it seems that I can't treat a native array the same way as rakudo arrays?
jnthn pmichaud: gah, just one item.
For a single numeric index.
Su-Shee mberends: like de-referencing it?
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.
jnthn pmichaud: And are trying to combine them into one.
pmichaud jnthn: right, I recognize that. :-)
jnthn pmichaud: So may just be best to bite the bullet and move Positional to core.
pmichaud: There's no problem at all with adding a role to a class through augmnet.
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
I'm inclined to do the latter
jnthn pmichaud: Do the latter
pmichaud okay
jnthn pmichaud: Because otherwise we only get more problems further down the line.
pmichaud adding a role to a class with augment is augment class Foo does Bar { } ?
jnthn pmichaud: Also, by taking Numeric rather than ['Integer'] will fix other problems we have. 16:02
pmichaud: Yes, exactly that. :-)
pmichaud jnthn: okay. I'll work on that.
jnthn OK
pmichaud it'll help prep for list refactors too.
afk for a bit
16:05 tedv| left
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:05
Su-Shee mberends: I stopped trying to be fancy and went with the $i loop. 16:06
16:07 rv2733 joined
mberends Su-Shee: ok 16:08
Su-Shee mberends: this is what I've changed: pastebin.org/290353 16:10
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.
mberends: Rather than letting that leak out more widely.
16:12 gbacon left
jnthn mberends: Though maybe Zavolaj should somewhat try to take care of that too. 16:12
16:13 dolmen left
mberends jnthn: that's how we're doing it in a C-style loop, to not expect too much from NativeArray 16:13
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. ;)
jnthn If so, good. :-)
mberends jnthn: it copies element-wise from NativeArray to a Perl 6 array 16:15
jnthn mberends++
Excellent.
mberends Su-Shee: do you have a github ID? 16:17
Su-Shee yes. "Su-Shee" :) 16:18
github.com/Su-Shee
moritz_ hugme: add Su-Shee to fakedbi 16:19
hugme hugs Su-Shee. Welcome to fakedbi!
mberends ++moritz_ # beat me to it
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)␤»
moritz_ rakudo: 'abc' ~~ /<alpha>+/; say list($<alpha>)».uc
p6eval rakudo bbb336: OUTPUT«ABC␤»
moritz_ jnthn: any objections to changing the invocation in the parallel dispatcher to a sub call instead of method call?
Su-Shee hm, do I see somewhere within _my_ github realm that I can commit to another repository? 16:21
jnthn pmichaud: 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).
moritz_ Su-Shee: yes, on your dashboard (ie github.com/ front page)
jnthn pmichaud: Once that's in, I'll dig into writing the Rakudo backtrace printer. :-)
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 :)
pmichaud what is >> now?
jnthn afk for a bit
pmichaud does it do .list ?
moritz_ yes 16:23
jnthn pmichaud: As in
$foo>>.blah
pmichaud seems to me that it will need to remain .list
jnthn ah, I think you had got that :-)
pmichaud because list($foo) is still a single element.
moritz_ huh?
pmichaud (even if $foo is an array)
moritz_ rakudo: my $x = [1, 2, 3]; .say for list($x) 16:24
p6eval rakudo bbb336: OUTPUT«123␤»
moritz_ indeed
I'm surprised
jnthn rakudo: my $x = [1, 2, 3]; .say for $x.list
p6eval rakudo bbb336: OUTPUT«1␤2␤3␤»
jnthn Aha.
ok, bbi30
pmichaud rakudo: my $x = <a b c>; say $x>>.uc 16:25
p6eval rakudo bbb336: OUTPUT«ABC␤»
moritz_ rakudo: say <a b c>>>.uc 16:26
p6eval rakudo bbb336: OUTPUT«ABC␤»
moritz_ rakudo: say <a b c>».uc
p6eval rakudo bbb336: OUTPUT«ABC␤»
moritz_ the really odd thing is: inside a module I get a syntax error for »
but it parses with >>
will try to reproduce...
pmichaud rakudo: my $x = [1, 2, 3]; .say for $x.list 16:27
p6eval rakudo bbb336: OUTPUT«1␤2␤3␤»
pmichaud (ah, jnthn++ already tried that one) 16:28
moritz_ so should it be list($obj).list ? :-) 16:31
pmichaud no 16:33
$obj.list is sufficient
moritz_ ... unless $obj is a foreign object
pmichaud in this case, it just means we have to get .list working 16:34
on Match
moritz_ .list works on Match :-)
pmichaud is it returning a flattening list?
rakudo: 'abc' ~~ /<alpha>+/; .say for $<alpha> 16:35
p6eval rakudo bbb336: OUTPUT«a␤b␤c␤»
moritz_ good question... at least it returns a Perl 6 list
pmichaud that's wrong.
moritz_ oops
wait 16:36
TimToady rakudo: .say for [<a b c>]
p6eval rakudo bbb336: OUTPUT«abc␤»
moritz_ I thought list() was non-flattening, and .list was flattening?
pmichaud list() flattens objects that flatten
$<alpha> isn't a flattening object (because of the $) 16:37
although
perhaps I'm wrong there
since it's really $/{'alpha'}, which *would* flatten
moritz_ rakudo: .say for [<a b c>].list
p6eval rakudo bbb336: OUTPUT«a␤b␤c␤»
moritz_ pmichaud: is that wrong too?
pmichaud that's right 16:38
rakudo: .say for list([<a b c>])
TimToady modulo it's supposed to be .flat, as of Feb
p6eval rakudo bbb336: OUTPUT«abc␤»
pmichaud that's also right.
mberends Su-Shee: to be able to commit, you may have to edit fakedbi/.git/config and change "git://github.com/" to [email@hidden.address]
TimToady shouldn't the stringifier insert spaces
?
pmichaud TimToady: yes, I think it should.
TimToady: I'm not sure what's up with that -- I'm pretty sure that worked at one time 16:39
anyway, .list (really .flat) will convert a non-flattening scalar into a flattening list
Su-Shee mberends: will do.
pmichaud while list(...) creates a list, flattening any of the items inside that are naturally flattening
(i.e., that aren't scalars) 16:40
moritz_ Match.list uses the sub form internally
so that's probably what's wrong
it was the only way I found that would turn a RPA into a Perl 6 list
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 :)
moritz_ I should probably create a new Seq, and setattribute '$!stoarge' it
ah, right 16:42
TimToady re $<foo> vs $/<foo>, I suspect we should make those act like var vs expr
moritz_ rakudo: .say for 'abc' ~~ /(.)(.)(.)/
p6eval rakudo bbb336: OUTPUT«abc␤»
pmichaud TimToady: what about $<foo bar> ?
TimToady which is an argument that the flatten flag is basically syntactically applied
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
pmichaud for now I think I'd prefer that $<foo> and $/{'foo'} continue to act the same.
I think that's generally more consistent. 16:44
TimToady mebbe
pmichaud (I can see the other side -- since I fell victim to that interpretation myself above :-)
TimToady just have to figure out which way we want to answer the FAQ :) 16:45
probably have to drop offline for a bit now
pmichaud well, let me get a chance to clean it up over the next couple of weeks before we decide :)
TimToady bi ~ 1hr or so
&
16:49 TiMBuS left
moritz_ pmichaud, jnthn: with nopaste.snit.ch/20721 the ».meth parallel dispatch also works on RPAs is it the wrong approach? (feels a bit like it) 16:51
pmichaud it's wrong. 16:52
the correct solution is likely to add a .list method to RPA
moritz_ ok 16:53
pmichaud I'm not sure I want to be auto-flattening other foreign objects just yet
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:55
(to make .list and list() behave in corner cases, that is) 16:56
moritz_ right
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)␤»
moritz_ rakudo: my $x = (1, 2, 3); push $x, 5; say $x
p6eval rakudo c491a1: OUTPUT«1 2 3 5␤»
moritz_ heh :-)
pmichaud wtf? 17:00
rakudo: my $x = (1, 2, 3); say $x.WHAT
p6eval rakudo c491a1: OUTPUT«Seq()␤»
pmichaud *sigh*
moritz_ that used to be a Parcel, no? 17:01
pmichaud no, because it's being placed into item context
rakudo: say (1,2,3).WHAT
p6eval rakudo c491a1: OUTPUT«Parcel()␤»
pmichaud that's a parcel :)
ahhhh, method push in Array needs to have a type constraint on the invocant, I guess 17:03
I guess we're not automatically constraining invocants yet?
jnthn pmichaud: No
pmichaud okay. I can make it explicit. 17:04
17:04 xinming_ joined
jnthn pmichaud: Like many things..."I really need to fix that." 17:04
pmichaud: Did the gist I pasted look OK?
pmichaud jnthn: I'm very familiar with that feeling.
jnthn: +1 from me on the gist
jnthn pmichaud: Great.
pmichaud if it doesn't work out, we still have time to change it around :)
and I may end up rewriting it in NQP anyway
jnthn I plan to write the actual backtrace printer in NQP 17:05
pmichaud +1
jnthn And just call it from Compiler.pir
pmichaud I will greatly appreciate that :-)
jnthn I'd like that to be compiler.nqp one day
But...we .include loads of stuff so it's be not quite trivial to do. :)
pmichaud me too, ... exactly. :-)
anyway, afk lunch here
Su-Shee hugme: shun mysql's c api. 17:06
17:07 xinming left
Su-Shee mberends: I add a test accordingly in 10-mysql.t? 17:10
mberends Su-Shee: yes please!
Su-Shee mberends: it's highly fascinating what data I can pull from those native arrays.. 17:11
mberends oooh!
Su-Shee I just looked around :)
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)␤»
jnthn wtf :-) 17:13
cognominal: I have no idea what you're doing either. ;-)
17:14 BrowserUk joined, Ross joined
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:14
s/then/ 17:15
do you see what I mean? 17:16
jnthn Maybe all(&defined, &length).("foo")
Though length doesn't exist any more :P 17:17
cognominal you got the idea
yes, that was originally a question about perl5 style that led me to that.
jnthn though closer tow hat you had maybe is
moritz_ [and] (&defined, &chars)».("foo")
jnthn (&defined, &chars)>>.("foo") works
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)␤»
jnthn well :-)
moritz_ try [&&] instead
jnthn rakudo: say [&&] (&defined, &chars)>>.("foo")
cognominal so you say :)
p6eval rakudo c491a1: OUTPUT«Could not find sub &infix:<&&>␤current instr.: '' pc -1 ((unknown file):-1)␤»
moritz_ oh
it's a syntactic form
jnthn moritz_: well, usually it's compiler-special
moritz_: We can add a multi too in order to make that work, I guess
isBEKaml How do I convert a Num to an Int ?
jnthn .Int
moritz_ or rounding 17:19
round(), ceiling(), floor()
isBEKaml rakudo: 36.5414.Int.say;
moritz_ jnthn: I thought I already did that once
p6eval rakudo c491a1: OUTPUT«36␤»
moritz_ jnthn: but maybe that was in alpha
isBEKaml rakudo: 36.5414.Int.perl.say; 17:20
p6eval rakudo c491a1: OUTPUT«36␤»
isBEKaml Ah, thanks.
jnthn moritz_: Maybe. If so, then it's easy to copy-paste. :-)
moritz_ jnthn: I'll try 17:21
cognominal moritz_, what do you mean by "syntactic form
moritz_ cognominal: $a && $b doesn't evaluate $b if $a is false 17:22
cognominal: so it can't be implemented as an ordinary subroutine-like operator
cognominal: it's specially handled in the compiler
isBEKaml \o/ 17:23
isBEKaml successfully ported wizard.pl from pugs games to Rakudo!
cognominal ho. that what I was trying to say "leaving aside that and introduce a sequence point."
17:24 jferrero left
jnthn isBEKaml++ :-D 17:24
moritz_ rakudo: say 1 && 2 && 3
p6eval rakudo c491a1: OUTPUT«3␤»
TimToady [&&] can't guarantee lack of side effects, but it does at least evaluate its list lazily, and return the first true value
er, that's [||], I mean 17:25
jnthn :-)
TimToady [&&] would return the first false value :)
cognominal we got the idea :)
moritz_ rakudo: say [//] Any, Num, 5
jnthn TimToady: Does that just fall out of it having a *@args sig?
p6eval rakudo c491a1: OUTPUT«5␤»
TimToady which might, of course, be an interesting value of false
jnthn: well, infix:<&&> is really S&& insofar as it guarantees strict laziness 17:26
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....
jnthn moritz_: oh.
:-|
moritz_ I though S was "sequential", not "really lazy"
TimToady S is kinda fuzzy 17:28
I suspect it means different things to different operators
moritz_ jnthn: should it matter where in the setting the operator appears (as long as it's top level)?
TimToady but the fuzz could just be in my head
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
TimToady a() && b() is really [&&] (lazy a()), (lazy b()) 17:30
assuming lazy is the way to lazify an item 17:31
jnthn TimToady: Maybe something to hand-wave for 6.0.0. ;-)
pugssvn r30959 | svatsan++ | [examples] Ported wizard's game to Rakudo
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. :/
jnthn Aww
moritz_ isBEKaml: in the p6 book there's a nice example of hangman
iirc
not in the actual text, but in the wip/ directory 17:33
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. ;)
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 :-)
isBEKaml :) 17:36
moritz_ it turns out that playing hangman in a non-native language is rather frustrating
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.
aesop lol strict laziness 17:38
moritz_ what's amusing about it?
aesop never seen those two words together before 17:39
jnthn lol cucumber manitee 17:40
moritz_ now we know you're not a haskell hacker :-)
TimToady see S07:36
Larry the Cucumber and Barbara Manitee? 17:41
cognominal leaving aside that and introduce a sequence point.
oops
aesop true
cognominal www.haskell.org/haskellwiki/Lazy_vs._non-strict
aesop definitely seen that
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)
jnthn VeggieTales ftw 17:43
moritz_ non-resolved cultural reference at line 127
jnthn isBEKaml: It's the cow of the sea. 17:44
TimToady isBEKaml: yes, that's the correct spelling
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)
IIRC>
jnthn isBEKaml: Ah...I'm a native speaker so I spell everything rong. :-)
isBEKaml jnthn: unfair. non-natives tend to be punished by their own parents for spelink wruong.. :D 17:46
TimToady the main threat to manatees these days is propellers 17:47
aesop and maybe oil spills 17:49
isBEKaml and, I also heard they were believed to be mermaids. ;)
jnthn: there's already a sea cow aka dugong! :) 17:51
jnthn isBEKaml: I thought dugong and /man<[iae]>tee/ were the same thing? :-) 17:52
oh, no, they are indeed different 17:53
isBEKaml same genus, different species.
jnthn That's what I get for learning about sea life from www.weebls-stuff.com/songs/dugong/.
moritz_ has a patch that gives us Perl 6 arrays in Match objects 17:55
and it's like... trivial
jnthn \o/ 17:56
moritz_ I wonder why it's so easy now, and was such a pain in my mob\b branches
it passes all of S05*/*.t
running the full spectest now
jnthn is also spectesting a bump to latest Parrot ATM
So far so good.
moritz_ mostly-latest parrot works fine here 17:57
17:57 eternaleye left
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. :-) 17:57
18:00 [particle]1 left
moritz_ I just had some local spectest failures because I had a Foo.pm file in my rakudo dir 18:05
and the tests use @*INC.push: ...
so local directories are searched first
18:05 [particle] joined
moritz_ which is clearly a fail 18:05
but automatically changing them all to unshift also leads to fallout 18:06
I need to investigate a bit more thoroughly once my current spectest run is finished
18:08 [particle] left 18:09 japhb joined
pmichaud I'm about to start a branch to refactor (yet again) lists and laziness and iterators and flattening. *sigh* 18:12
this is getting a bit old :-|
jnthn hugme: hug pmichaud
hugme hugs pmichaud
dalek kudo: 46e2b53 | jonathan++ | build/PARROT_REVISION:
Bump to latest Parrot to get a fix and an improvement.
kudo: 6afdfbd | jonathan++ | src/metamodel/RoleToRoleApplier.nqp:
Stringify methods to get the name rather than .name them; we do that in other
pmichaud consistent +1 18:13
jnthn pmichaud: I'd done it in other places so figured I may as well there too.
pmichaud: I've left the multi check as calling .multi though.
pmichaud wfm
sorear appears
pmichaud I'll start my refactor by seeing what it takes to move Positional into core
jnthn We *could* make it play nice with Parrot multis by doing a pir::isa check against MultiSub.
pmichaud: OK. Hopefully it's not too painful. 18:14
pmichaud: Associative wasn't, once I fixed the bug that stopped us doing augment to add a role.
pmichaud well, it's largely a question of whether we're able to compile the setting with a compiler that doesn't understand Positional
(since Positional will be in the setting instead of in the base compiler) 18:15
jnthn pmichaud: Ah, true.
pmichaud Associative is much less critical there, because it doesn't impact lists/arrays/flattening/etc.
moritz_ (offtopic: it never ceases to amaze me how long it takes to cook corn on the cob)
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. :-)
the other nastiness is that refactoring lists and positional and the like always breaks "make test" 18:17
jnthn Yes. :-(
pmichaud so it's a slow process to even get the basics going again
jnthn Not to mention make spectest.
moritz_ or compiling the setting :-)
jnthn Heh
Su-Shee looks at the long, long list of tests. did I really want DBI?
jnthn I hate it when compiling the setting breaks.
jnthn has spent lots of time working on things that can easily lead to that 18:18
pmichaud yay! all tests pass!
moritz_ like, uhm, multis? meta model? 18:19
jnthn !!
moritz_: Signatures. :)
moritz_: And those
pmichaud maybe I should stop here (i.e., immediately after doing git clone, that is)
jnthn pmichaud: That's moving moving Positional to ...oh, you didn't.
:-)
Now if only I could get all tests to pass on Win32. :-)
pmichaud stopping at this point is likely my only chance of having a successful day. 18:20
jnthn Aww.
moritz_ pushed Match + Array fix
pmichaud otherwise it's going to be a day of pain and torment.
jnthn I imagine said refactor is more than 1 day's effort.
pmichaud I'm hoping less than 3, though.
jnthn That's probably more realistic.
pmichaud well, maybe. There are still a lot of iterator issues I haven't worked out completely yet.
on the plus side, it's a holiday weekend here, the kids are away, and Paula is somewhat homebound 18:21
so I hope to have a lot of time to dedicate to the problem :)
moritz_ \o/
jnthn pmichaud++
std: fdjsa££1!!! 18:22
pmichaud moritz_: I'm glad you found the easy answer to the array problem.
p6eval std 30959: OUTPUT«===SORRY!===␤Confused at /tmp/JMtTiOLnbY line 1:␤------> fdjsa⏏££1!!!␤ expecting any of:␤ POST␤ argument list␤ bracketed infix␤ infix or meta-infix␤ postfix␤ postfix_prefix_meta_operator␤ statement modifier
..loop␤Undeclared routine:␤ 'fdjsa' u…
moritz_ pmichaud: so am I :-)
dalek kudo: 9de1eba | moritz++ | src/builtins/ (2 files):
use Perl 6 arrays in Match objects
18:24
pmichaud jnthn: so, how does the compiler manage to work if Associative isn't present?
moritz_ rakudo: ('acfg' ~~ /b/).chars
p6eval rakudo c491a1: ( no output )
moritz_ rakudo: say ('acfg' ~~ /b/).chars
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?
pmichaud nqp-rx, please. 18:26
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.
and after compiling the settings, Associative is available?
(because it's early in the compile sequence?)
okay, I think Positional may be able to work the same.
jnthn pmichaud: All that actually matters is that Associative is declared in the setting before any methods are. 18:28
pmichaud: If you look at CORE_SOURCES, the ordering of a lot of that stuff is quite carefully done. :-)
pmichaud right -- I'll have to switch them around a bit anyway
jnthn It's a bit of a balancing act.
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.
pmichaud or anything that takes an @-parameter.
jnthn 1) Stubs are enough for the parser to be happy about the type name from there on in.
2) Sub and method signatures are lazily composed on the first call
So we can get away with quite a lot. 18:30
moritz_ so we can't have compile-time methods calls in the setting?
pugssvn r30960 | svatsan++ | [examples] Fixed up tic_tac_toe for Rakudo
jnthn moritz_: Not to things declared in the setting. 18:31
That's a bigger issue overall though.
I mean, it's the same as
class Foo { }; BEGIN { Foo.new }
Which will currently explode. 18:32
pmichaud okay, need a short break here, then will get started 18:34
dalek kudo: 401d2d0 | moritz++ | src/core/Match.pm:
remove workarounds in Match.caps
18:41
18:44 plobsing joined
Su-Shee jnthn/mberends: pastebin.org/290594 that's why I put all files by hand in my @*INC - what's not found here exactly? 18:47
moritz_ NativeCall.pm ? 18:48
Su-Shee it's in my @*INC and it works within actually using fakedbi.
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
moritz_ Su-Shee: do any of the involved scripts or modules modify @*INC? 18:50
Su-Shee moritz_: not that I know of.
if I actually say @*INC from perl 6 repl it gives me: > say @*INC; 18:51
./home/banshee/.perl6/lib/home/banshee/Perl6/rakudo-2010.05/parrot_install/lib/2.4.0-devel/languages/perl6/liblib
and I can use NativeCall;
without any errors.
isBEKaml Su-Shee: perl6 -e '$*INC.perl.say' ## what does this show?
Su-Shee oh perl6 -e works? nice :)
wtf? 18:52
"undef"
moritz_ @ vs. $
isBEKaml sorry, @*INC
Su-Shee never cut and paste :)
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
Su-Shee mberends: that's what I did. now I like to call make test though. 18:53
mberends oki
Su-Shee isBEKaml: [".", "/home/banshee/.perl6/lib", "/home/banshee/Perl6/rakudo-2010.05/parrot_install/lib/2.4.0-devel/languages/perl6/lib", "lib"]
isBEKaml Su-Shee: ok. if you have put yours in ~/.perl6/lib, that should work. :)
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
Su-Shee no problem. no error.
moritz_ rakudo: say $*thing.perl 18:55
p6eval rakudo 9de1eb: OUTPUT«undef␤»
moritz_ that's wrong
there is no undef in Perl 6
isBEKaml moritz_: yes, that's what I thought too. Nil?
moritz_ isBEKaml: Any
it's in src/builtins/Exceptions.pir 18:56
TimToady or perhaps even Mu, since there's no variable
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
alpha: say $*thing.perl
p6eval alpha 30e0ed: OUTPUT«undef␤»
pmichaud huh
moritz_ there's a ticket in RT requesting that 18:58
pmichaud it's pretty easy to add
(assuming we have Failure objects available) 18:59
dalek kudo: 418e795 | moritz++ | src/core/Match.pm:
remove an outdated comment in Match.pm
jnthn nqp: my @a := 1,2,3; for @a { say($_); last; }
p6eval nqp: OUTPUT«get_iter() not implemented in class 'Integer'␤current instr.: '_block11' pc 0 (EVAL_1:4)␤»
jnthn nqp: my @a := (1,2,3); for @a { say($_); last; } 19:00
p6eval nqp: OUTPUT«1␤»
jnthn yay, nqp has last
pmichaud sorear++ for that.
jnthn sorear++ 19:01
mathw evening 19:02
jnthn o/ mathw
moritz_ \o 19:03
mathw hey
Su-Shee my perl6 executable.. I should set some environment var to it?
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
moritz_ right
isBEKaml what moritz_++ said.
moritz_ and what isBEKaml++ said :-)
Su-Shee I've added hard coded the path in the makefile which works but I'd like to have a proper setup. :)
ah make install works now? :) 19:05
moritz_ it did so for about half a year :-)
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)
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"
Su-Shee isBEKaml: I know that. ;) 19:06
moritz_: how the hell should I know... I lost overview over like 45698 rakudos :)
jnthn pmichaud: I've heard it speculated as does Iterable too.
Su-Shee I should clean up. ;)
pmichaud I'm less inclined to buy that
isBEKaml Su-Shee: read Makefile? :)
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.
pmichaud the fundamental reason to want @ to mean "Array" is that people expect @-things to remember values 19:08
while Iterable doesn't imply that
jnthn Ah
Yes.
isBEKaml Su-Shee: :)
pmichaud still need to keep reading notes
19:08 BrowserUk left
Su-Shee ah. now I get proper, expected errors I actually want to have :) 19:08
isBEKaml is this supposed to work? @array[$index]<somekey> ?? Or was this even working ? 19:10
Found this little nugget in Pugs repo. :D
moritz_ yes, should work
lue ohai o/
isBEKaml hey, lue!
jnthn rakudo: my @foo = { x => 42 }; say @foo[0]<x>
moritz_ rakudo: my @a = { a=>1}, { a=> 2}; say @a[0]<a>
pmichaud isBEKaml: at present that's supposed to work, as long as @array[$index] is either unvivified or something that does Associative
p6eval rakudo 9de1eb: OUTPUT«42␤»
rakudo 9de1eb: OUTPUT«1␤»
TimToady oha yo/ 19:11
sorear backlogs
(completed)
moritz_ that was fast :-)
isBEKaml sorear: wow, that's fast! :)
sorear I started 3 hours ago
isBEKaml pmichaud: I didn't know Arrays could Associate. Thanks for that. :) 19:12
sorear and got distracted before saying I started
TimToady it was not an ingressive progressive, I guess
pmichaud isBEKaml: they don't associate. But one of their elements might.
i.e., @array isn't Associative, but @array[$index] might be. 19:13
isBEKaml Ah, I see.
pmichaud (see examples above from jnthn++ and moritz_++)
sorear perl6: my $a = 2; my $b := $a; $a := 1; say $b 19:14
p6eval pugs: OUTPUT«2␤»
..rakudo 9de1eb: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 18381 (src/builtins/Junction.pir:373)␤»
..elf 30960: OUTPUT«␤»
sorear TimToady: pmichaud: what's the correct resolution?
pmichaud should output 1
oh, wait 19:15
second :=
output should be 2
rebinding $a doesn't affect $b's binding
moritz_ alpha: my $a = 2; my $b := $a; $a := 1; say $
p6eval alpha 30e0ed: OUTPUT«say requires an argument at line 10, near " $"␤in Main (file src/gen_setting.pm, line 2593)␤»
moritz_ alpha: my $a = 2; my $b := $a; $a := 1; say $b
p6eval alpha 30e0ed: OUTPUT«2␤»
moritz_ alpha++ pugs++
pmichaud at least, I *think* that's the result. Not sure what we'll do to make that happen in rakudo actually. 19:17
the one that provides the answer is likely:
my $a = 2; sub foo($b) { $a := 1; say $b }; foo($a)
I think I could argue that one as '1" 19:19
er, 1
dalek p-rx: 416e5b4 | moritz++ | (2 files):
match objects should never have negative .chars, even if the match fails
19:20 rv2733 left
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
p6eval rakudo 9de1eb: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Proxy'␤current instr.: '!postcircumfix:<{ }>' pc 14968 (src/builtins/Code.pir:23)␤»
moritz_ should just evaluate to an empty Proxy, or so
19:21 whiteknight joined
isBEKaml yes, the error doesn't mean anything to me. Boiled down to this. 19:21
moritz_ rakudo: .say for @('ab' ~~ m/(.)+/) 19:24
p6eval rakudo 9de1eb: OUTPUT«ab␤»
19:27 rgrau_ left
moritz_ rakudo: 'abd' ~~ m/ <alpha> <alpha> c || <alpha> b d /; 19:29
p6eval rakudo 9de1eb: ( no output )
moritz_ rakudo: 'abd' ~~ m/ <alpha> <alpha> c || <alpha> b d /; say %($/).keys 19:30
p6eval rakudo 9de1eb: OUTPUT«␤»
moritz_ rakudo: 'abd' ~~ m/ <alpha> <alpha> c || <alpha> b d /; say $/.hash.keys
p6eval rakudo 9de1eb: OUTPUT«alpha␤»
TimToady lunch &
moritz_ what do I need to do to make hash() work in that case?
pmichaud autovivification of hashes and arrays is still a bit of a challenge. We really ought to have .WHENCE available
moritz_: fixing hash and keys is part of dealing with iterators and lists, believe it or not 19:31
moritz_ ok
rakudo: say Array ~~ List 19:32
p6eval rakudo 9de1eb: OUTPUT«0␤»
moritz_ /o\
pmichaud rakudo currently doesn't have a real List class, iirc
moritz_ it has List, but it's actually a shallow iterator
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 :-)
(or how to work around Rakudo's current brokenness)
moritz_ :-)
lue is going to check the ROADMAP for something to do over this holiday weekend. 19:33
pugssvn r30961 | moritz++ | [t/spec] fudge capturing-contexts.t for Rakudo 19:34
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 :(
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
sorear alpha's := was just store_lex; alpha used lexpad entries as ObjectRef 19:38
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
moritz_ did I get that right that <.foo> is now always supposed to be a method call?
sorear yes 19:40
<.sym> is weird, though; I'm trying to convince TimToady to make it a macro
pmichaud <.foo> has always been a method call
pugssvn r30963 | moritz++ | [t/spec] bring subrule.t up to date wrt current spec; fudge for rakudo 19:43
19:47 clintongormley left 19:48 envi^home left 19:56 whiteknight left
pugssvn r30964 | svatsan++ | [examples] Fixed up some more to work with Rakudo 19:58
jnthn *sigh* Seems Parrot's reporting of annotations in what it hands back from .backtrace has worsened somewhat since I last used it. :-/ 20:03
mberends :( 20:04
20:05 rgrau joined
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]
jnthn lue: Well, I'm dealing with the runtime ones at the moment. 20:07
pugssvn r30965 | moritz++ | [t/spec] fudge named-chars.t for rakudo 20:08
lue I'm looking for something in rakudo to work on... 20:09
moritz_ rakudo: / <?> /
p6eval rakudo 9de1eb: ( no output )
moritz_ lue: RT has an extensive TODO list :) 20:10
I currently don't know of any LHFs - will tell you when I find one
lue What I considered a few days ago was rewriting all the trigonometric functions into honest-to-goodness Perl 6 code. 20:13
even — <.< — sin()
moritz_ lue: that's something you should discuss with colomon
20:14 mariano left
lue I know. I was looking at a couple methods for approximating sine. 20:18
Yeah, I should tromp some bugs in RT, see what I feel like taking a crack at. 20:19
isBEKaml bed. 'night folks! have a good one! :) 20:20
moritz_ lue: a potential LHF would be to go through the smart matching tests 20:21
20:21 [particle] joined, isBEKaml left
moritz_ lue: some of the non-passing tests are likely just missing implementations of ACCEPT methods, and not hard at all 20:21
20:21 _buno_ joined
lue rakudo: say <a b c>».uc 20:21
p6eval rakudo 9de1eb: OUTPUT«ABC␤»
pugssvn r30966 | moritz++ | [t/spec] my-scope a few regexes, and fudge for rakudo 20:23
r30967 | moritz++ | [t/spec] simplify arrayhash.t
moritz_ lue: you could also investigate back-porting Match.perl from alpha 20:24
sorear jnthn: parrot tests or rakudo tests? 20:25
lue I'll look at the smart-matching tests
pugssvn r30968 | moritz++ | [t/spec] spec-updated non-capturing.t
lue rakudo: sub f() {say <a b c>».uc;}; f()
p6eval rakudo 9de1eb: OUTPUT«ABC␤»
20:26 _buno_ left
dalek kudo: c0bcaf0 | moritz++ | t/spectest.data:
run another S05 spectest file
20:27
kudo: e6dfd1d | moritz++ | (2 files):
implement smartmatching of arrays and hashes against regexes; add a few more
lue How would I check *just* the smart match tests?
moritz_ cat t/spec/S03-smartmatch/*.t
or do you mean "run"?
add the names to t/localtest.data 20:28
run make localtest
20:28 rgrau[1] left
lue could I put t/spec/S03-smartmatch/*.t into the localtest file? 20:29
moritz_ no
t/localtest.data should have the same format as t/spectest.data
so you need to list the file names, and remove the t/spec/
cd t/spec && ls S03-smartmatch/*.t > ../localtest.data 20:30
20:31 skangas left, aindilis joined
pugssvn r30969 | moritz++ | [t/spec] switch tilde.t to lexical regexes 20:32
moritz_ std: rx (o) 20:34
p6eval std 30968: OUTPUT«ok 00:01 116m␤»
20:37 whiteknight joined
sorear TimToady: Do you have any tips for debugging LTM? 20:39
lue rakudo: say (Mu, 1, Mu) ~~ .[1]
p6eval rakudo 9de1eb: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 11822 (src/builtins/Any.pir:54)␤»
pugssvn r30970 | moritz++ | [t/spec] switch regex.t to lexical regexes; refudge for rakudo
sorear hmm. statementlist_01 lexer is being generated very differently 20:41
jnthn sorear: parrot tests 20:42
sorear why would anyone disable parrottests 20:43
TimToady: ping
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.
moritz_: Which is better than not knowing months down the line when things got broke.
sorear TimToady: STD.pm6 line 1430 - AIUI, and as viv implements, there should be no LTM going on here
dalek kudo: f514389 | moritz++ | t/spectest.data:
re-enable 4 test files
moritz_ jnthn: agreed
jnthn Essentially, priorities fail.
sorear TimToady: since each alternative starts with <.ws>, which is imperative 20:45
TimToady: gimme5 over-eagerly optimizes out the ws, and so enables LTM
jnthn Anyways...guess it's time to go debugging.
sorear TimToady: which is correct?
jnthn Ah...may have worked out what's going on... 20:52
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)␤»
moritz_ rakudo: 'abc' ~~ /bc/; say pir::isnull__IP($/.ast)
p6eval rakudo e6dfd1: OUTPUT«0␤»
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)␤»
jnthn rakudo: 'abc' ~~ /bc/; say pir::typeof__sp($/.ast)
p6eval rakudo e6dfd1: OUTPUT«Undef␤»
lue I can't find the part in S03 about smart matching array slices 21:07
21:08 mariano joined
moritz_ lue: at the RHS of a smart-match, $_ is set to the LHS 21:09
lue: so .[1, 3] is just LHS.[1, 3]
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)␤»
lue rakudo: say (Mu, 1, Mu) ~~ @_.[1]
p6eval rakudo e6dfd1: OUTPUT«Lexical '@_' not found␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
lue so it's a problem with setting it. 21:11
[or them, depending]
moritz_ I don't know if you understood what I said
(Mu, 1, Mu) ~~ .[1]
should be the same as
given (Mu, 1, Mu) { $_.[1] } 21:12
not the same as smart-matching against $_.[1]
lue So, upon finding .[1], it should set $_ to the LHS ? 21:14
moritz_ it should *always* set $_ to the LHS
(which it doesn't do, in current rakudo)
the .[1] semantics just fall out of that, magically 21:15
lue rakudo: (1,2,3); say .[1]
p6eval rakudo e6dfd1: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 11822 (src/builtins/Any.pir:54)␤»
lue rakudo: (1,2,3); say $_.[1]
p6eval rakudo e6dfd1: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''␤current instr.: '!postcircumfix:<[ ]>' pc 11822 (src/builtins/Any.pir:54)␤»
lue hrm, I don't think I'm quite getting it... 21:16
moritz_ rakudo: $_ = (1, 2, 3); say $_.[1]
p6eval rakudo e6dfd1: OUTPUT«2␤»
moritz_ just saying (1, 2, 3); doesn't set $_ 21:20
sorear could really use a time travelling debugger about now 21:23
dalek kudo: 5c62b61 | moritz++ | (2 files):
implement Match.perl; fix Match.ast to return Any if not set (not Undef)
21:25
21:28 alester left
moritz_ seems to have broken caps.t already 21:29
is that test file failing for anybody else?
colomon moritz_: where is it? 21:30
moritz_ colomon: S05-capture/caps.t
colomon fails here.
I have e6dfd1df56c7fae48cddef15390c690ee5008c7d
lue grr... where is ACCEPTS?
moritz_ colomon: if you revert 401d2d0e5d67d83b73b9be0f4a32fbe59dcb1f02, does that test pass?
lue: which ACCEPTS? :-) 21:31
colomon lue: each class implements its own ACCEPTS.
moritz_: trying.
is the parrot from e6dfd1df56c7fae48cddef15390c690ee5008c7d okay with 401d2d0e5d67d83b73b9be0f4a32fbe59dcb1f02? 21:32
.oO(thanks heaven for cut-n-paste)
lue for Mu, because that's what ~~ uses
colomon lue: ~~ uses whatever ACCEPTS is appropriate for the object on the right. 21:33
moritz_: caps.t is fine with 401d2d0e5d67d83b73b9be0f4a32fbe59dcb1f02 21:34
lue: I don't see any evidence there is a Mu.ACCEPTS.
lue our multi infix:<~~>(Mu $topic, Mu $matcher) {
$matcher.ACCEPTS($topic)
}
from core/operators.pm
moritz_ that doesn't mean that $matches is of type Mu 21:35
only that it conforms to Mu
jnthn That's the the "delegator"
It maps ~~ to ACCEPTS
The fix we need is probably gotta go in the actions.
lue I was thinking that. 21:37
jnthn Ooh. I may have Parrotfix.
lue Setting $_ to the LHS seems like a grammar issue.
jnthn It needs some different code-gen, yeah 21:38
Not sure what the cleanest way is off hand.
21:39 Ross left, dju_ joined 21:40 dju_ left 21:41 dju_ joined
jnthn afk for a bit 21:43
(line numbers working going OKish, btw)
moritz_ \o/
lue If I were to try and fix a grammar issue, I'll have to study up on how it all works first :/
.oO(If Perl 6 is my MMORPG, where is the tutorial level? :D)
21:45
colomon moritz_: okay if I go back to HEAD 21:46
?
;)
moritz_ colomon: yes, I'm working on a fix right now
colomon moritz_++ 21:47
21:48 Su-Shee left, pnate left
moritz_ you should only prefix-increment my karma until I've actually committe a fix :-) 21:49
WTF 21:53
adding a debug statement to .caps makes some tests pass
lue colomon: how do you feel about rewriting trig functions to Perl 6?
[see backlog, around 20:13 UTC]
21:54 molaf joined
colomon lue: hmmmm.... 21:54
(no chance to backlog at the moment, but....)
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.
on the other hand, there's a very good argument to have a pure p6 version. 21:56
good both for ports and (at least potentially) for numeric types other than system floating point.
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
lue rakudo: say sin(3) 21:58
p6eval rakudo e6dfd1: OUTPUT«0.141120008059867␤»
lue rakudo: say sin(3+4i)
p6eval rakudo e6dfd1: OUTPUT«3.85373803791938 + -27.0168132580039i␤»
moritz_ lue: it makes perfect sense to re-use low level implementations if they are available
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.
dalek kudo: 9581e6a | moritz++ | src/core/Match.pm:
fix Match.caps again; I have no idea why it's a fix, but it is. Weird.
22:00
colomon The PIR probably boils down to a call to the underlying C library implementation.
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]
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:02
It wouldn't be something to go directly into p6, it would be an early module 22:03
that tests how easy it is to use does Numeric to make a new type.
lue Some weird type of number, like Quaternions. I like that :)
colomon yes, exactly. 22:04
lue Let's take a trip to Wikipedia!
colomon en.wikipedia.org/wiki/Quaternions
I've gotta run, but read up and see if it sounds interesting to you.
lue I've read up on Quaternions before, one otherwise boring evening. Didn't know they were also called Hamiltonian numbers. 22:05
pugssvn r30971 | moritz++ | [t/spec] lexicalify perl.t 22:08
22:14 skangas joined
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
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?
moritz_ hugme: tweet rakudoperl Rakudo now has proper Perl 6 match objects (#rakudo, #perl6) 22:21
hugme hugs moritz_; tweet delivered
jnthn moritz_++ ! :-)
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:22
some essence of what was implemented may deserve mention in S11 itself. 22:28
lue Quaternions ought to be reallly interesting. afk, and afterwards implementing them 22:29
22:30 pmurias left
mberends interesting that their most useful modern day application is modeling motion in 3D 22:30
22:34 whiteknight left 22:40 jrtayloriv joined 22:44 astrojp joined 23:00 Psyche^ joined 23:03 Patterner left, Psyche^ is now known as Patterner
sorear I have finally found the bug I've been debugging the last 36 hours 23:13
or rather, the miscompilation of STD
sorear looks for the superbug
oh, just an unimplemented case 23:14
diakopter I've finally found the bug (also an unimplemented case) for which I've looking for 4-5 hours. visualstudio-- 23:18
pugssvn r30972 | sorear++ | [viv] Translate <foo=.bar> syntax 23:27
sorear \o/ viv-with-own-STD.pmc can now compile regexes
time for the big Test
sorear starts stage3 23:28
Can't exec "std": No such file or directory at Cursor.pm line 2676.
Can't compile ../lib/DEBUG.pm6 at Cursor.pm line 2676.
one ln -s ../std later... 23:31
hmm, took nearly twice as long to fail as gimme5 std took to succeed... 23:49
23:53 astrojp left