»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
00:01 araujo joined 00:04 leprevost joined 00:25 patspam left
tylercurtis jnthn: ooc, what's the rounding behavior of nqp::div_int? 00:28
00:29 patspam joined, patspam left
jnthn tylercurtis: Heh, good question. 00:30
tylercurtis: Whatever the C# % operator does :-)
tylercurtis: oh wait...rounding behavior?
nqp::div_int will never coerce in and of itself 00:31
p6eval nqp: OUTPUT«Confused at line 1, near ":div_int w"␤current instr.: 'parrot;HLL;Grammar;panic' pc 654 (src/cheats/hll-compiler.pir:206)␤»
jnthn If you don't provide it something that knows how to be unboxed to an int it'll just fail.
tylercurtis jnthn: nqp::div_int(3, 2) still needs to be rounded somehow. 00:32
jnthn oh, gah
div, not mod :-)
Yeah, you're right.
I'm not sure off hand. I'm sure / in C# is probably "whatever the CPU thinks" where the CPU is x86 though. ;-)
dalek odel: c79e97e | jnthn++ | parrot/src/pmc/STable.pmc:
Here starts the port of 6model to Parrot. This just begins to stub in an STable PMC. It ain't going to do a great deal more than this really - mostly just learn to freeze/thaw itself. Note, didn't even check if it compiles yet. :-)
00:33
odel: aa048af | jnthn++ | parrot/src/pmc/RakudoObject.pmc:
Add a stub RakudoObject PMC with lots of comments about what it is/isn't.
odel: 1db95fb | jnthn++ | parrot/src/metamodel/repr.h:
Add a struct containing a bunch of function pointers that map to the representation API (or at least, what we have got defined so far). Again, not checked it compiles yet - just stubbing with notes.
jnthn I wouldn't take what 6model does from that angle with any value at all though.
I didn't even really consider it
Was more interested in modeling the box/unbox stuff.
tylercurtis Right. I'm not asking about what semantics is currently has so much as what it should have. 00:34
jnthn I guess see if S03 has anything to say about it under the div entry. 00:37
tylercurtis $x div $y is floor($x / $y), iirc. 00:38
00:43 whiteknight joined 00:53 patspam joined 00:59 tom_tsuruhara left
colomon floor sounds right. I think it's fdiv in parrot 01:08
01:15 patspam left 01:20 guidjos joined 01:23 azert0x left 01:27 guidjos left 01:49 araujo left
TimToady rakudo: say (1/2 ** 3).WHAT 02:05
p6eval rakudo 9734b2: OUTPUT«Rat()␤» 02:06
TimToady rakudo: say (1 ** 3).WHAT 02:07
02:07 whiteknight left
p6eval rakudo 9734b2: OUTPUT«Int()␤» 02:07
TimToady rakudo: say (0 ** 3).WHAT
p6eval rakudo 9734b2: OUTPUT«Int()␤»
colomon rakudo: say ((1/2) ** 3).WHAT 02:11
p6eval rakudo 9734b2: OUTPUT«Num()␤»
colomon Ah, okay.
TimToady why's that a Num? 02:14
02:17 ipatrol_ joined
ipatrol_ perl6: say ah; 02:17
p6eval rakudo 9734b2: OUTPUT«Could not find sub &ah␤ in main program body at line 22:/tmp/N99oNidBlK␤»
..pugs: OUTPUT«*** No such subroutine: "&ah"␤ at /tmp/oPLQnVaT3g line 1, column 5-7␤»
ipatrol_ perl6: say "ah";
p6eval pugs, rakudo 9734b2: OUTPUT«ah␤» 02:18
TimToady Doctor, it hurts when you do that... 02:20
ipatrol_ gives TimToady some bicarbonate 02:21
TimToady <blurfsk> 02:22
ipatrol_ see, isn't it less painful to read code when you stick to a style? 02:25
awk gave me an inspiration for a class syntax 02:28
colomon TimToady: because there is no Rat infix:<**> operator.
guess there's no reason we couldn't have one, though, for positive Int powers 02:29
ipatrol_ $class = {BEGIN sub; my $data = $stuff; END cleanup;}
TimToady colomon: just hated having to write { $_ * $_ * $_ } in rosettacode.org/wiki/Numerical_inte...ion#Perl_6 02:30
colomon TimToady: well, just for you, I suppose... 02:31
ipatrol_ i think the awk thing is a perfect idiom 02:32
02:41 nimiezko joined, [Coke] left
TimToady we're trying to err on the non-minimalistic side of OO this time 02:42
colomon TimToady: do we want to add spectests to the effect that Rats raised to positive Ints should be Rats if possible? 02:43
TimToady works fo rme
*r <-- note the space here
ipatrol_ it's very compact and very familiar to any *nix administrator 02:46
colomon > say ((2/3) ** 3).perl
8/27
ipatrol_ looking like awk
tylercurtis ipatrol_: I'm not familiar with awk. What exactly would that syntax do? 02:50
ipatrol_ O.O 02:51
perl is based on awk
\xF0 :/
tylercurtis I know what all the individual bits of it mean in Perl. I'm not sure what you are suggesting to make the combination mean. 02:52
ipatrol_ BEGIN would create the instance, the centerwould defime functions and atteibutes, and END would be called for destruction 02:53
tylercurtis It seems like that would require getting rid of the current meaning of BEGIN and END. 02:55
ipatrol_: What syntax would you want for roles? 02:57
02:58 nimiezko left
colomon TimToady: spectesting, but I'm going to go to bed before it's done. 03:13
TimToady thanks
03:16 mfollett joined
ingy rakudo: say (1..3 Xxx 1..3).perl 03:24
p6eval rakudo 9734b2: OUTPUT«((1), (1, 1), (1, 1, 1), (2), (2, 2), (2, 2, 2), (3), (3, 3), (3, 3, 3))␤»
ingy tupltastic
TimToady now if only we had slice context... 03:30
those are not yet tuples in the pythonic sense 03:31
03:33 meppel joined, mfollett left 03:36 meppl left 03:38 meppel is now known as meppl 03:42 mfollett joined 03:44 brxue joined 03:54 Schwern joined 03:55 petdance joined 03:57 mfollett left
tylercurtis Good night, #perl6. 03:58
TimToady o/
03:59 tylercurtis left, [sbp] joined 04:00 Raynes_ joined 04:01 snarkyboojum_ joined 04:02 gabiruh_ joined, saaki_ joined, ingyfoo joined, xinming joined 04:03 aesop_ joined, MOAR-f00li5h joined 04:04 MOAR-f00li5h left, MOAR-f00li5h joined 04:05 f00li5h left, MOAR-f00li5h left, f00li5h joined, f00li5h left, f00li5h joined 04:21 envi^home joined 04:22 saaki left, xinming_ left, mberends left, Raynes left, flatwhatson left, aesop left, gabiruh left 04:24 leprevost left 04:26 leprevost joined 04:36 gottreu left, mberends joined, flatwhatson joined 04:47 xinming left 04:50 Tene_ joined, moritz joined, saaki joined, gfldex_ joined 04:51 aesop joined, mathw_ joined, jettero_ joined, christin1 joined 04:52 xinming joined, risou joined
brxue hello, I downloaded rakudo from github.com, but it report "undefined reference to `allocate_interpreter'" when executes "perl Configure.pl -gen-parrot", can anyone help? 04:52
and something like this, undefined reference to `initialize_interpreter' 04:53
undefined reference to `Parrot_cmd_options' 04:54
04:54 Sec left 04:56 frodwith_ joined
TimToady I've never seen that one... 04:56
04:56 bacek joined
TimToady did you say -gen-parrot or --gen-parrot? 04:56
04:58 aloha joined
brxue hello, it's -gen-parrot 04:59
TimToady I always use --gen-parrot, dunno if it makes a diff
did you have a parrot installed anywhere already?
brxue no installed before 05:00
let me try it
05:01 christine left, aesop_ left, frodwith left, jettero left, saaki_ left, proller left 05:02 proller joined
brxue to TimToady, it seems there is a parrot installed already, but I didn't source the environment variable of the installed parrot 05:02
TimToady I don't much about using an existing parrot--I always use the one that rakudo builds 05:03
that way it's likelier to be the right version
brxue there seems no difference about using --gen-parrot or -gen-parrot
TimToady what kind of machine are you on?
brxue amd64 05:05
TimToady OS?
brxue redhat linux 05:06
TimToady and does it actually do much of anything when you use --gen-parrot, such as check out an SVN of parrot and compile it?
brxue let me confirm 05:07
TimToady I get: Checking out Parrot r48933 via svn... 05:08
then a bunch of stuff that configure is checking, signed "The Parrot Team", then a compile
sometimes it skips all this unless you do a 'make clean' first 05:09
brxue it seems parrot-2.7.0 already in the tarball?
TimToady tarball? which tarball? 05:10
is this Rakudo Star?
brxue yeah
TimToady or the HEAD version?
brxue Rakudo Star 2010.08 release 05:11
TimToady I've never actually installed Star; I just use HEAD...
someone else around here might know more
if you say 'parrot' does it find an already installed one? 05:12
TimToady is just cherry picking here in the absence of someone who really knows what's going on piping up
but this tends to be a rather low point in the 24-hour clock 05:13
TimToady blames the Pacific Ocea
*Ocean even
most of the eurofolk haven't got out of bed yet
brxue no svn check out is performed, probably because I don't do cleaning, but Makefile is still not generated 05:14
let extract tarball again and rebuild
florz R* doesn't do an SVN checkout 05:15
but other than that I can only tell you that it build without any problems on debian lenny if you just follow the readme ;-)
brxue the downloaded rakudo star already has parrot
florz yeah 05:16
05:17 kjeldahl joined 05:18 proller left, colomon left, perlygatekeeper1 left, mathw left 05:35 Guest23195 joined 05:37 petdance left 05:46 risou left 06:07 chitragupt joined
brxue where does parrot_config locate in rakudo star's parrot directory? 06:13
when doing configure, it executes "/usr/bin/perl tools/build/parrot_config_c.pl --mini > src/null_config.c", may it should be "/usr/bin/perl tools/build/parrot_config_c.pl --mini > src/parrot_config.c"? 06:18
06:19 kjeldahl left 06:20 chitragupt left
brxue build error when gcc -o miniparrot src/main.o src/null_config.o -Wl,-rpath=/home/brxue/work/perl6/rakudo-star-2010.08/parrot-2.7.0/blib/lib -L/home/brxue/work/perl6/rakudo-star-2010.08/parrot-2.7.0/blib/lib -lparrot -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline -lncurses -Wl,-E 06:29
06:30 icwiener joined 06:31 chitragupt joined
sorear you'd really be better off asking that over in #parrot 06:34
(irc.perl.org) 06:35
06:35 kjeldahl joined
sorear also it would be prudent to tell them exactly what the build error is 06:36
ideally, via unabridged build transcript 06:37
06:37 molaf joined
sorear (use pastebin.) 06:37
brxue thank you, sorear 06:41
06:41 brxue left 06:50 wamba joined 06:58 mathw_ is now known as mathw 07:12 araujo joined 07:17 chitragupt left 07:21 Chillance left 07:23 chitragupt joined 07:27 chitragupt left 07:28 chitragupt joined 07:35 ipatrol_ left 07:36 ipatrol_ joined 07:44 chitragupt left 07:45 galf joined, galf left 07:52 x3nU left, x3nU joined 07:54 ipatrol_ left 07:59 Ross joined
moritz is currently at his parents in law's, and saw a body lotion or so called "Body Series". They could have written it as "Body ...*" :-) 08:03
08:05 stepnem left
mberends <Body>...*</Body> 08:05
moritz :-) 08:07
08:11 szabgab left, szabgab joined 08:14 chitragupt joined 08:15 timbunce joined 08:17 araujo left 08:19 araujo joined 08:21 stepnem joined 08:25 Mowah joined 08:26 patrickas joined 08:30 chitragupt left 08:34 tadzik joined 08:39 masak joined
masak alohai, #perl6! 08:40
phenny masak: 11 Sep 19:49Z <moritz_> ask masak if he already applied some version of his enum patch, and if not, if I can do anything to speed it up or to help
dalek odel: 12b7d68 | mberends++ | java/ (9 files):
[java] fully update Lexpad and some other classes that use it
masak moritz: I want to incorporate a bit of feedback from pmichaud++, and maybe write a few tests, too. providing a sounding-board for that would help me the most right now.
moritz www.perlmonks.org/?node_id=859811 funny thing, we just discussed this in #perl6 the other day
masak: I'll do my best, but today I'll spend 5 hours driving, so probably not today :/ 08:41
masak moritz: it's good to know you're interested, though. I'll see how far I get, and then I might status-report my findings to you, whether you're on- or offline. 08:42
moritz masak: and if you push your changes to the branch, I can start experimenting with them 08:43
or even write tests :-) 08:44
masak "the branch"? there's a branch already?
moritz s/the/a/
masak oki
I can do that.
moritz the branch as such.
08:44 wamba left
masak I'm really just blocking on focus right now -- too many things at once happening. :) 08:44
08:48 chitragupt joined
masak wow, either I don't yet fully understand repeated captures into capturing groups in Perl 5 regexes, or they suck. suspecting the latter :) 08:48
by the way, #perl6 should totally get a bot that can do @hoogle-like searches, like lambdabot does in #haskell. except with Perl 6 signatures and on the setting, of course. 08:52
something like this:
@setting Str --> List of Str
and it responds Str.split, Str.comb...
...Str.words, Str.lines...
along with their full signatures. 08:53
moritz masak: in p5, (.)+ captures only the last repetition 08:55
not all that useful, but understandable in the context of backtracking
masak moritz: aye.
moritz -> on the road
masak drive safely!
08:58 zulon joined
tadzik search.cpan.org/~garu/App-Rad-1.04/...App/Rad.pm -- just when I thought Perl 6 is _so_ better for writing short scripts due to MAIN sub 09:05
masak it comes built-in in Perl 6. 09:07
tadzik all this, this subs running too? 09:09
masak no; you'll have to wire that yourself. 09:11
tadzik yeah, that's my point 09:12
tadzik feels like writing something simiilar
masak rakudo: sub MAIN($subcommand) { &::($subcommand) }; sub foo() { say "OH HAI" }
p6eval rakudo 9734b2: OUTPUT«===SORRY!===␤Indirect name lookups not yet implemented at line 22, near " }; sub fo"␤» 09:13
masak that'd be the way, I guess.
$ perl6 -e 'sub MAIN($subcommand) { eval($subcommand) }; sub foo() { say "OH HAI" }' foo
OH HAI
tadzik Perl 5 has it way easier with no parameter lists 09:15
masak simpler, yes. easier, mmmn. 09:16
tadzik simplier, yeah 09:17
09:18 zulon left 09:22 chitragupt left 09:31 chitragupt joined 09:36 DarthGandalf joined 09:37 azert0x joined 09:49 chitragupt left 09:50 chitragupt joined 09:57 chitragupt left 10:06 JimmyZ joined 10:08 JimmyZ left 10:10 chitragupt joined 10:18 Axius joined 10:21 Ross left 10:24 amkrankruleuen joined
tadzik when doing: say 'ok' if foo() and bar; is it any different than say 'ok' if foo() && bar;? 10:24
masak no. 10:25
the precedence is different between '&&' and 'and', but in that case it doesn't affect the resulting AST.
tadzik that's what I thought, thanks masak 10:26
say 'ok' if foo and bar looks just so humanish :)
masak that's the idea :)
masak is currently greatly enjoying himself automatically turning the HTML mush generated by use.perl.org into clean, pretty Markdown 10:27
tadzik speaking of markdown, I recently seen something called sexpcode
sorear 'if' isn't an operator, it's special statement syntax 10:28
operator precedence doesn't affect it
masak nod
tadzik cairnarvon.rotahall.org/2010/05/25/...er-bbcode/ 10:29
this seems like fun
masak interesting.
tadzik sounds like yet another funny grammar excercise 10:30
10:33 Axius left
sorear wonders how to properly schedule a #cpan6sketch when there isn't an attendable working meeting of all who care about it 10:33
I guess e-mail 10:34
tadzik maybe a calendar on doodle
we always schedule PM meetings there
oh, you mean the form, not the date? 10:35
masak: are you thinking about improving read()/write()? 10:39
10:39 risou joined
masak tadzik: a bit. 10:39
tadzik neutro went hell faster after dropping ufo for Module::Build, but now File::Copy is a pain in the head 10:40
10:40 alksentrs joined, pmurias joined
sorear maybe what we really need is a moderated mailing list 10:40
pmurias!!!
pmurias sorear: hi!
phenny pmurias: 09 Sep 21:18Z <tylercurtis> ask pmurias is there's a more up-to-date source of information about SMOP and Mildew than www.perlfoundation.org/perl6/index.cgi?smop
sorear pmurias: I'd like to repeat my earlier ask about mildew's non-cpan install procedure 10:41
tadzik wklej.org/id/387906/ -- now that's funny
pmurias sorear: non-cpan install procedure? 10:42
sorear: what do you mean? 10:43
pmurias was away on vacation so it not up to date on the backlog
sorear pmurias: you dropped by, said hi, got the first tell, and then left before I woke up :( 10:45
timezones. hates 'em. 10:46
anyway, mildew is almost certainly completely broken with the STD-rennovating I've done
and I'd like to fix it... not really easy to fix a CPAN dist on the post-build side 10:47
pmurias has to help unpack the bicycles :/
sorear just a pointer to the procedure you used to prepare the dist would be a huge help 10:48
even (especially) if it's just an INSTALL file I mised
pmurias dzil buil
d
dzil build
you have comaint on all my stuff on CPAN
i'll be back in 30~ min
tadzik rakudo: try { die "asd"; CATCH { exit 0; } }; say 'alive' 10:49
p6eval rakudo 9734b2: OUTPUT«alive␤»
tadzik intentional?
sorear v6/Mildew or v6/Mildew-Setting-SMOP?
oh, wait 10:50
THIS IS A DEPENDENCY TREE
install SMOP, then Mildew, then Mildew-Setting-SMOP 10:51
I'll try this in the morning, out
thanks
10:59 mikehh joined 11:02 gfldex_ is now known as gfldex 11:07 patrickas left
tadzik how do I make 'or' in when? 11:15
I tried: when any('i', {! *.defined }), but that's not the way
masak don't use both {} blocks and whatever *.
11:15 stepnem left
tadzik well, that was desparate 11:16
masak it's one or the other.
unless you're really sure what you're doing.
tadzik I get Unable to parse blockoid, couldn't find final '}' at line 177 either way
wklej.org/id/387921/ 11:17
11:17 whiteknight joined, timbunce left 11:19 stepnem joined 11:21 specific_bot joined 11:22 specific_bot left, jettero_ is now known as jettero 11:23 jettero left 11:29 Kodi joined 11:34 rgrau_ joined
masak not altogether on-topic (since it's Ruby), but... wow! mamememo.blogspot.com/2010/09/qlobe.html 11:35
11:36 dju joined, timbunce joined
masak lunch & 11:36
11:37 masak left
dalek kudo: fdae00f | colomon++ | src/core/Rat.pm:
Add infix:<**>(Rat $a, Int $b).
11:37
11:39 dju left, plobsing left 11:40 dju joined 11:41 plobsing joined 11:57 Axius joined 11:59 rindolf joined
tadzik nice 12:00
jnthn o/
12:01 zulon joined
tadzik oh hai 12:02
jnthn: mind some neutro on windows testing in a short while?
jnthn tadzik: I can give it a quick go, sure. 12:09
tadzik jnthn: so once again, where should the module files be installed on windows?
araujo is back home now 12:12
jnthn tadzik: Good question - where are they being installed on other platforms? 12:14
12:14 timbunce left
tadzik jnthn: they go to ~/.perl6/lib, and it is assumed that the directory is in users' PERL6LIB 12:14
jnthn Probably somewhere similar, anyway. But I guess then it depends on if it's a local or global install...
ah, OK
tadzik is %*ENV<HOME> available on windows? 12:15
given that, it should be pretty portable, assuming user has git installed 12:16
jnthn no, but 12:17
> say %*ENV<HOMEPATH>
\Documents and Settings\Jonathan
That one works, it seems.
tadzik oh, File::Copy is horribly broken by now. Not really File::Copy, but Rakudo's read()/write() rather
12:17 Axius left 12:18 [Coke] joined, Axius joined 12:21 chitragupt left 12:23 nadim left 12:27 Axius left 12:28 Axius joined 12:32 [sbp] is now known as sbp
tadzik btw, maybe you know jnthn 12:33
rakudo: try { die "asd"; CATCH { exit 0; } }; say 'alive' # intentional?
p6eval rakudo 9734b2: OUTPUT«alive␤»
jnthn No, wrong. 12:34
tadzik I hoped so
jnthn exit is perhaps a control exception, if it is going to be implemented as an exception at all.
But even CONTROL probably shouldn't catch it either.
12:40 Ross joined, risou left 12:43 risou joined, nadim joined 12:45 dual left 12:51 nadim left 12:52 nadim joined
tadzik crap :( 12:53
12:55 masak joined
masak \o/ 12:55
12:55 zulon left
tadzik hai 12:55
jnthn yayitsmaska!
er, masak :-)
masak :)
re &exit and CONTROL; by the spec END should run both after &exit and after &die 12:56
but maybe that's implemented as direct calls to the END phaser triggers from those functions, I dunno. 12:57
jnthn Well, die only causes us to exit if something doesn't catch and handle the exception.
I guess see backtrace function in src/perl6/compiler.pir or worreva it's called to add something to call the end blocks. 12:58
That's what gets called if we're about to exit due to uncaught exceptions.
masak speaking of which, someone requested backtrace-without-die functionality the other day. I think that'd be nice.
tadzik jnthn: cp on windows is 'copy'? 12:59
jnthn rakudo: say Perl6::Compiler.backtrace(Exception.new) # maybe
p6eval rakudo fdae00: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤»
12:59 nadim left
jnthn rakudo: say Perl6::Compiler.backtrace(Exception.new('blah')) # maybe 12:59
p6eval rakudo fdae00: OUTPUT«Method 'backtrace' not found for invocant of class 'Perl6Exception'␤ in main program body at line 5␤»
jnthn oh, hm 13:00
Well, not quite that then.
tadzik: yes
masak: Anyway, it should be do-able.
masak yay
jnthn (without major effort)
dir('examples') ==> map { slurp("examples/$_") } ==> [+] () # Read in a bunch of files and add together the values inside them 13:01
masak why the last empty pair of parens?
LoRe rakudo: print ([1..3] <<->> [1..3]).perl 13:02
masak Rakudo deficiency?
p6eval rakudo fdae00: OUTPUT«Bool::False»
LoRe rakudo: print ([1..3] <<+>> -<< [1..3]).perl
p6eval rakudo fdae00: OUTPUT«[0, 0, 0]»
masak LoRe: huh.
LoRe: oh! 13:03
the first one parses as <[<->]>
er, or not... :)
rakudo: say ((1, 2, 3) <<->> (1, 2, 3)).perl 13:04
p6eval rakudo fdae00: OUTPUT«Bool::False␤»
masak rakudo: say ((1, 2, 3) >>-<< (1, 2, 3)).perl
p6eval rakudo fdae00: OUTPUT«[0, 0, 0]␤»
masak should those two differ? the arrays are of the same length.
LoRe rakudo: print ([1..3] <<[-]>> [1..3]).perl
tadzik jnthn: could you try if you can bootsrap neutro on windows now? 13:05
or at least use it
p6eval rakudo fdae00: OUTPUT«[0, 0, 0]»
LoRe ok
masak oh!
it parses as either < or > and something.
I'm not sure how it manages to do that.
masak submits rakudobug 13:06
LoRe++
tadzik I can has a commit bit to perl6/Ecosystem? 13:09
Kodi Is %h.grab(*, :replace) the same as %h.pick(*, :replace), or does the former leave %h empty? 13:10
13:10 orafu left, orafu joined
Kodi Honestly I doubt whether grab should accept a :replace argument. 13:10
masak tadzik: I think moritz admins that one. 13:11
tadzik moritz: ping
masak wuh, what happened to moritz' underscore? :)
jnthn std: dir('examples') ==> map { slurp("examples/$_") } ==> [+] () 13:12
p6eval std 32123: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'dir' used at line 1␤Check failed␤FAILED 00:01 119m␤»
jnthn std: dir('examples') ==> map { slurp("examples/$_") } ==> [+]
p6eval std 32123: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/OSSbhqktGG line 1 (EOF):␤------> ==> map { slurp("examples/$_") } ==> [+]⏏<EOL>␤Undeclared routine:␤ 'dir' used at line 1␤Parse failed␤FAILED 00:01 118m␤»
jnthn masak: Nope, STD wants 'em too
masak ok. 13:13
std: [+]
p6eval std 32123: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/YJs4nYDtdl line 1 (EOF):␤------> [+]⏏<EOL>␤Parse failed␤FAILED 00:01 115m␤»
jnthn :-)
masak I thought those parsed as listops.
jnthn Looks like STD needs to learn about dir too :-)
tadzik moritz lost his tail! :(
jnthn masak: I seem to remember [+] on its own working once too 13:14
13:14 Axius left
jnthn masak: In STD. Never has in Rakudo. 13:14
masak nod
jnthn Dunno if it's regression or deliberate change in STD. 13:15
masak guess we'll have to ask weird Al.
13:16 Patterner left 13:17 Ross left
jnthn When he gets back from the amish paradise? :-) 13:17
13:18 Ross joined 13:19 Ross left, Ross joined
masak heh :) 13:20
jnthn loves the weird Al videos. 13:22
masak yes, he's good. 13:24
heh, my hacked-together HTML->Markdown filter keeps finding infelicities in the HTML :) 13:25
jnthn oh heh 13:26
> now
(DateTime.new(year => 1970).Instant + 1284297974.875)
tadzik :)
masak urgh :)
tadzik well, true 13:27
jnthn Surely we can stringify a bit more usefull than that? :-)
masak "it's 1970 and then some"
masak submits rakudobug
tadzik . o O ( [BUG] now() could be smarter )
13:27 Psyche^ joined, Psyche^ is now known as Patterner
masak tadzik: [BUG] LTA DateTime.perl in Rakudo 13:28
tadzik: nothing to do with now()
jnthn rakudo: 1, 1, *+* ... 100
p6eval rakudo fdae00: ( no output )
jnthn rakudo: say (1, 1, *+* ... 100)
p6eval rakudo fdae00:
..OUTPUT«(timeout)134558914423337761098715972584418167651094617711286574636875025121393196418317811514229832040134626921783093524578570288792274651493035224157817390881696324598610233415516558014126791429643349443770140873311349031701836311903297121507348075269767778742049125862690252036501…
masak jnthn: nowadays you have to hit it exactly. 13:29
jnthn ...huh, why doesn't it stop?
oh, damm
masak jnthn: new spec.
that's the downside it bought.
tadzik so how does it work now?
jnthn > 1, 1, *+* ... *>100
1 1 2 3 5 8 13 21 34 55 89 144
masak tadzik: you have to hit it exactly.
tadzik duh
jnthn ...it still goes one over there too
oh, ...^ 13:30
masak :)
tadzik > perl6 t/01-parser.t 13:31
zsh: segmentation fault perl6 t/01-parser.t 13:32
oh funny
shouldn've messed with too fresh parrots I'm afraid
13:33 pmurias left, Raynes_ is now known as Raynes, Raynes left, Raynes joined
Kodi masak: That silly stringification of Instant was my idea. Instant is supposed to be opaque, so I think that's the only way you can reliably seralize them. 13:34
jnthn OTOH, Perl 6 is meant to be, like, useful and helpful... 13:35
masak Kodi: ok.
jnthn Stringification is nothing to do with serialization though 13:36
That's a fine output for .perl
Just not .Str(ingy)
masak Kodi: but it's a DateTime, not an Instant
Kodi: a DateTime should be able to do better.
Kodi jnthn: Indeed, it is .perl. I guess .Str() was auto-generated from it?
jnthn Maybe, yeah
masak no, the REPL does .perl
jnthn We could use a good .Str
oh.
yeah, you're right
> ~now 13:37
(DateTime.new(year => 1970).Instant + 1284298637.796)
...still no better.
Kodi masak: Huh? now() should return an Instant, not a DateTime. Do you mean DateTime.now()?
jnthn masak: wait, is that really true?
masak Kodi: see the output.
jnthn > "lol\n"
lol
>
masak ok, it's .Str
jnthn masak: no, seems it stringifies.
masak aye.
jnthn I prefer that though I think.
masak maybe only non-scalars do .perl or something.
aye.
jnthn
.oO( .repl )
13:38
Kodi masak: I'm sorry, I don't understand. You said 'now', not 'DateTime.now', so you got an Instant, not a DateTime. What's the problem? 13:39
masak: Do you mean Instant.Str should convert to DateTime?
13:41 risou left
Kodi I think what's going on here is that stringification falls back on .perl in the absense of .Str. Perhaps that should be considered a bug. 13:41
13:43 ash_ left 13:45 ash_ joined, risou joined, ash_ left, ash_ joined
masak Kodi: oh, sorry. I read the REPL output as giving back a DateTime, but it doesn't. 13:48
Kodi: nevertheless, couldn't the stringification be nicer somehow? 13:49
for example a nicer DateTime converted to an .Instant, without the ugly additive constant.
Kodi masak: That would certainly work. The one downside is that stringification would be more expensive than the user might expect, since it would require converting the Instant to a DateTime. 13:50
masak: To be clear, do you agree that .perl should be left as-is?
masak hm.
I don't have a well-formed opinion one way of another. 13:51
s/of/or/
Kodi masak: I guess there are no real promises that stringification is fast, so we can just say 'method Str { ~DateTime.new(self) }'. 13:53
masak hm. provided that's what the user'd expect. 13:54
that output says nothing about it being an Instant.
Kodi masak: What about something like 'Instant:2010-09-12T13:49:34.05Z'? Not really ISO nor actual Perl 6 syntax, but unambiguous and readable. 13:56
Uh, wait, that wouldn't work with leap seconds.
masak why not?
Kodi No, I take that back. 13:57
For a moment I thought UTC had leap-second handling as screwy as POSIX time. :P
masak :)
wow, my Markdown converter parses all my old blog posts! \o/ 13:58
Kodi Anyway, I don't expect Instant.Str to even exist, so I guess whatever you want it to do is fine by me. 13:59
13:59 alksentrs left
tadzik masak: is it in Perl 6? 13:59
masak tadzik: sadly, no. I needed the speed this time. 14:00
tadzik :)
masak but it probably could have been. I'm not doing anything odd.
just tokenizing the HTML, building a DOM out of it, traversing the DOM and outputting Markdown.
it's just 300 lines of Perl 5. 14:01
14:05 nadim joined 14:06 patspam joined
tadzik damnit, why is my Config::INI fucked again after some Rakudo update 14:08
oh, forgot to pull 14:12
-_-
masak huh? Perl 5 scalarifies the lhs to || ? 14:18
that language is just so full of surprises!
jnthn We should make a new Perl that's less surprising! 14:19
Oh, wait...
tadzik :D 14:20
14:21 Kodi left
tadzik I'm afraid my grammar parsing has just hanged 14:22
14:24 nadim left 14:28 dual joined 14:36 moritz is now known as moritz_, nadim joined
moritz_ then you probably quantified a zero-width match 14:37
14:37 Infinoid joined 14:40 alksentrs joined 14:41 risou left 14:42 risou joined
tadzik moritz_: I can has a commit bit for perl6/ecosystem? 14:43
14:45 Axius joined
Infinoid Howdy, folks. I'm going to be banging on dalek a little bit, to get moritz++'s evil commit-feed scheme working. 14:47
tadzik wklej.org/id/388019/ -- can someone help me with a grammar? Why doesn't it match to the very end? 14:49
masak Infinoid++
14:50 colomon joined 14:52 dalek left 14:53 dalek joined, ChanServ sets mode: +v dalek
colomon rakudo: say ((2/3) ** 3).perl 14:53
p6eval rakudo fdae00: OUTPUT«8/27␤» 14:54
masak tadzik: it looks kosher to me. I'm thinking it might be something similar to the backtracking-into-quantifier bugs that are in RT already. 14:55
tadzik: though here it's not backtracking per se, but getting back to an ongoing quantifier after successfully matching an inner rule. perhaps that triggers the same weakness in the grammar engine.
tadzik wow, plenty or modules are gone 14:59
masak gone? 15:00
colomon gone? 15:02
moritz_ tadzik: you should have commit bit to perl6/ecosystem 15:07
it's in the same user group as mu/roast/specs/perl6.org etc.
tadzik gone. Uploading smoke tests results, you will see 15:09
tjs.azalayah.net/ser.html
selecting the black fields shows a secret message 15:10
(I think 'building failed' should be red too)
updated 15:12
moritz_: I thought so, but I have no ssh clone link 15:13
colomon what does "module gone" mean? 15:14
tadzik that the repo is gone
masak moritz_: same here; I don't seem to have commit access to perl6/ecosystem.
15:15 dalek left
tadzik hmm, there are modules missing 15:15
15:15 dalek joined, ChanServ sets mode: +v dalek
tadzik (on the list) 15:15
colomon github.com/gluckspilz/mubot 15:16
Infinoid moritz_: I just noticed JSON doesn't have support for comments. Is there some other way we can document this config file?
(commits to perl6.org and modules.perl6.org should also be tracked now btw)
tadzik there should be no json :)
colomon huh 15:17
tadzik colomon: it's gone from modules.perl6.org
15:17 Axius left
moritz_ tadzik, masak: should be fixed now 15:17
pmichaud good morning, #perl6
15:17 Axius joined
tadzik good morning pmichaud 15:17
oh, who has a windows machine? 15:18
moritz_++ # works
masak morning, pmichaud
tadzik: jnthn has one
tadzik yeah, but he seems uninterested :) 15:19
so, who wants to test a module installer on windows?
moritz_ Infinoid: maybe a separate file? dalek.README or so?
moritz_ pushed a test commit to perl6.org 15:20
Infinoid Great, let's see how long the bot takes
15:21 vapace joined, Axius left
Infinoid the bot is now tracking 51 github feeds... 15:22
15:23 Axius joined
moritz_ wow 15:23
btw somebody added logging for the perl6/roast repo, but it goes to #parrot instead of #perl6
if the new scheme works, I'll just add it to the config file
Infinoid The log claims that feed will now output to both channels 15:24
15:27 wamba joined
tadzik so what about this grammars bug? 15:28
15:34 zulon joined
masak tadzik: I didn't manage to convince myself it's an actual bug. it may be; I'm simply not sure. 15:36
tadzik: it might appear clearer if you golf the rules and the input a bit.
tadzik wklej.org/id/388044/ -- anyone?
15:37 yrgd joined
masak all I can say is that it has some of the traits of the 'backtracking into quantifier' bugs. 15:38
well, except for the backtracking part.
moritz_ tadzik: try to put <expr> first in the arg rule 15:39
15:39 Axius left
moritz_ and exclude { from the charclass too 15:39
tadzik same effect, only longer debug 15:40
moritz_ as is, it will match a { through the character class <-[}]>
and then fail to match a }
tadzik the second one makes it not parse
15:41 Axius joined
moritz_ and it should not parse 15:42
because i is not an allowed function name
just b and u
pmichaud anyone know a fast way to compute (^$n).reverse without using 'reverse' ?
tadzik: looking at your nopaste 15:43
moritz_ has a working version
token func { 'b' | 'u' | 'i' }
token arg { [ <-[{}]> | <expr> ]+ }
masak moritz_++
tadzik oh noes
my bad
moritz_ pmichaud: I'm tempted to propose postfix:<^>, the 'downfrom' operator :-) 15:44
but I'm not entirely serious 15:45
15:45 zulon left
pmichaud I can always do gather loop ($i = $n-1; $i>=0; $i--) { take $i } but it seems like there ought to be something just a bit nicer 15:46
or even
moritz_ IMHO (^$n).reverse should return a range with a backward iterator
pmichaud we don't have backwards iterators (yet?)
jnthn Well, if we did, then reverse can maybe just return a backwards iterator.. 15:47
pmichaud maybe .reverse just implements a backwards iterator
oh, wait!
nm 15:48
dalek : 718e7c9 | Infinoid++ | misc/dalek-conf.json:
Add the dalek-plugins repo to dalek's feed config.
pmichaud I thought Parrot might have a built-in reverse :)
masak moritz_: as long as it doesn't present itself as a Range... 15:49
pmichaud I'll think about it a bit more shortly -- bbiab
15:49 Mowah left
moritz_ Infinoid++ 15:49
masak I'm ready to give the enums patch a whack. one question: is 'make spectest' supposed to give so many failures? 15:50
Infinoid moritz_: Either your perl6.org commit got lost in the startup time (takes dalek up to 6 minutes to sync up after starting) or the feed still isn't working
masak I don't have the results summary, but it's 10-15 failing files.
this one, made 4 days back, is typical for how it looks nowadays: gist.github.com/569768 15:51
moritz_ masak: my last spectest on latest parrot was clean
masak ok, making spectest again.
15:51 Kodi joined
masak but the above gist is not atypical for how it looks nowadays on my machine. 15:51
moritz_ Infinoid: pushed another commit to perl6.org 15:52
Kodi pmichaud: $n ... 0 ? (Admittedly I haven't kept up with the recent changes to series.)
15:53 Sanitoeter joined
moritz_ doubts that series are fast 15:53
rakudo: say 3 ... 0
p6eval rakudo fdae00: OUTPUT«3210␤»
rindolf Wow! It works?
rakudo: say 3 .. 0
p6eval rakudo fdae00: OUTPUT«␤»
rindolf Oh.
moritz_ '.' ne ''
is irclog.perlgeek.de/perl6/today unbearably slow for anybody else?
Kodi moritz_: Normal speed for me. 15:54
masak moritz_: no problems here.
jnthn moritz_: Feels a little slower than usual but not unbearably.
dalek href="https://perl6.org:">perl6.org: 2127193 | moritz++ | README:
add missing reference to README
Infinoid \o/
moritz_ Kod, masak: thanks. Oddly enough all http connects to that server take ages on my laptop (like, 10 to 20 seconds or so) 15:55
rindolf moritz_: loads pretty quickly.
15:55 ingyfoo is now known as ingy
jnthn moritz_: Yeah, it's the connect that's taking the time for me too. After that it loads fast. But it's not anythin glike 10 to 20 seconds. More like 2. 15:55
moritz_ maybe it's related to the ipv6 bridge
yep, seems to be pretty normal after 'aiccu stop' 15:56
15:58 patrickas joined, Axius left
dalek odel: add93e5 | mberends++ | java/ (8 files):
[java] add p6hash and p6int
15:59
tadzik yay, I has a basic sexpcode parser 16:03
pmichaud .... why does 3 ... 0 work, ooc? 16:07
jnthn
.oO( I remember P-Code from my Visual Basic days, but never came accross Sex P-Code )
pmichaud we still have a succ/pred decider?
ah, we do. 16:08
tadzik jnthn: FYI cairnarvon.rotahall.org/misc/sexpcode.html 16:09
looks quite nice, and quite nice as a grammar example
or an excercise 16:10
16:10 chitragupt joined
jnthn Oh, as in S-expression 16:10
:-)
16:15 Axius joined
tadzik how to express escaping characters in a character class, so } is disallowed but \} is ok? 16:15
masak moritz_: seems many test file failures are of the kind "Dubious, test returned 1 (wstat 256, 0x100)" 16:17
that used to happen and had something to do with the harness, no? 16:18
moritz_ not sure where it comes from
but if there's no "parse failure: no plan" or so, it's harmless
tadzik the only sensemaking way on my mind right now is "wait for <!before> and <!after>" :/ 16:21
moritz_ you can't do it with char classes 16:22
16:22 patspam left
moritz_ because they only ever match one character 16:22
so
[ <-[{}\\]> | \\ . ]* 16:23
or [ <-[{}\\]> | \\ <[{}]> ]* 16:24
if you only want to allow { or } after a backslash
before and after don't work well because of cases like \\\{
vs
\\{
tadzik hmm
moritz_ in perl 5 it's a bit more efficient if add a + after the char class 16:26
btw Jeffrey Friedl explains those regexes nicely in "Mastering Regular Expressions". He uses Perl 5 syntax, but the concepts are the same
16:31 pmurias joined
tadzik rakudo: my %a = sub => 'asd'; # intentional? 16:33
p6eval rakudo fdae00: OUTPUT«Null PMC access in getprop()␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/tn689O_7xb␤»
16:33 tylercurtis joined
masak tadzik: something a bit like that has been reported to RT. 16:33
tadzik: though I don't remember it being a NPMCA.
moritz_ masak: hm, doing another spectest run now, this seems to have quite some fallout again :( 16:34
masak moritz_: good. let's compare notes after both our spectest runs finish. 16:35
16:38 kuzuha joined, Axius_ joined 16:39 Axius left, patspam joined
pmichaud anyone think we should switch the pod links at perlcabal.org/syn/ to point to the raw versions of the files? (As it is now, they end up displaying "This blog is taking too long to generate".) 16:47
moritz_ works for me
16:48 patrickas left, patrickas joined
pmichaud done. 16:49
masak pmichaud++
dalek : 31c0945 | pmichaud++ | docs/feather/syn_index.html:
Switch pod links at perlcabal.org/syn/ to point to the raw sources instead of the blobs (many of the files end up with "This blob is taking too long to generate.")
16:51
moritz_ masak: nopaste.snit.ch/23305 17:00
masak moritz_: thanks. I'm on S32, so not long now. 17:01
17:01 Axius_ left
masak moritz_: I already see that I have two failures each in S29-context/die.rakudo and S29-context/exit.rakudo that you don't. 17:03
pmichaud afk, soccer
dalek kudo: d1eb87c | pmichaud++ | src/core/ (2 files):
Rewrite C<.reverse> to be more efficient, move from Any-list to List.

from 44s to 4s when run on Rakudo's README.
17:04
masak moritz_: you have no test failures. I have plenty. 17:05
17:17 envi^home left
colomon pmichaud: just wondering -- should we have some way of iterating a list backwards? Off the top of my head, it seems like that would be faster than constructing the reversed list, and still work many of the times you'd want to use reverse. 17:17
tadzik := is assigning, not copying? 17:20
TimToady := is binding, = is called "assignment", and copies 17:22
tadzik ok, thanks TimToady
Kodi TimToady: Should KeyHash's .grab really have a :replace argument? 17:25
tadzik := doesn't work in has, is it known? 17:27
rakudo: my $a = 5; class A { has $.foo := $a; }
p6eval rakudo fdae00: OUTPUT«maximum recursion depth exceeded␤ in '&infix:<=>' at line 1␤ in <anon> at line 1␤ in 'Signature::perl' at line 1␤ in main program body at line 2:/tmp/vuuXGkRr3B␤»
masak moritz_: gist.github.com/569768
nom & 17:28
17:28 masak left 17:29 dalek left 17:30 dalek joined, ChanServ sets mode: +v dalek
TimToady Kodi: sometimes I think that not even .pick should have a :replace, but that it should be a different operation 17:33
.repick or some such
Kodi That makes a certain amount of sense.
TimToady pick with replacement is a nice metaphor, but the reality of implementation is quite different 17:34
patrickas should $s ... $e and $s .. $e produce the same results when $s and $e are strings of single characters? 17:36
17:40 rgrau_ left
TimToady .. turns into the corresponding ... when iterated, so yes 17:41
though only if the sequence is increasing, I suspect
since ranges don't autoreverse
tadzik .u ಠ 17:43
phenny U+0CA0 KANNADA LETTER TTHA (ಠ)
patrickas I am reading the series spec for strings and it's going to take a while for me to digest it and attempt to implement it
Going the other way, a ...^ maybe be forced to have a final value by passing an argument to an explicit last($my-last-value) 17:49
what's the reason behind this requirement? ^^
and the opposite case too. 17:50
TimToady it is merely that it is specced to be implemented in terms of a loop of some kind, using last semantics. that's all 17:51
bbl & 17:52
17:59 Axius joined 18:03 ingy left 18:04 Axius left, Axius joined, ingy joined
tadzik rakudo: 'asd^2'.index(/'*' | '^'/) 18:08
p6eval rakudo fdae00: ( no output ) 18:09
tadzik Substring '_block91' not found in 'asd^2' here
std: 'asd^2'.index(/'*' | '^'/)
p6eval std 32123: OUTPUT«ok 00:01 117m␤»
tylercurtis tadzik: index doesn't take a regex argument.
LTA error message, though. 18:10
tadzik tylercurtis: it could complain... what you just said
18:10 bluescreen joined 18:11 bluescreen is now known as Guest27047 18:14 skangas joined
patrickas how long does p6eval run before timing out ? 18:21
18:22 risou left 18:36 redarrow joined 18:37 patrickas left, Ross left 18:38 wamba left, Ross joined, Myhrlin joined 18:39 Schwern left 18:44 icwiener left 18:46 Guest23195 left 18:50 Axius left 18:54 chitragupt left 18:58 rgrau_ joined 19:01 Mowah joined 19:17 gottreu joined 19:26 chitragupt joined
dalek odel: dceef70 | jnthn++ | dotnet/runtime/Metamodel/Representations/P6opaque.cs:
Fill out P6opaque some more, so that it now does slot allocation in the single inheritance case to enable array offset attribute access to be supported. Untested.
19:30
odel: 04ff386 | jnthn++ | dotnet/runtime/Metamodel/KnowHOW/KnowHOWBootstrapper.cs:
Fix a thinko in KnowHOWBootstrapper. I think. :-)
odel: e04e040 | jnthn++ | dotnet/compiler/PAST2DNSTCompiler.pm:
Fix an ordering problem to unbreak knowhow delcarations in ordinary non-setting code.
19:36
19:37 amkrankruleuen left 19:53 Schwern joined
gottreu Does anyone know where the repository for Pod::PseudoPod resides, if there is one? 19:54
19:57 mberends left
moritz_ gottreu: on github, owner is chromatic 19:58
github.com/chromatic/Pod-PseudoPod-LaTeX 19:59
20:01 patspam left
dalek odel: b2f3bac | jnthn++ | common/NQP/NQPSetting.pm:
Add a (very primitive) KnowHOWAttribute knowhow to the setting, so we can start to declare knowhows with attributes.
20:02
odel: c5dac2d | jnthn++ | dotnet/compiler/ (2 files):
Refactor JnthnNQP's package declarators a little to be more STD-ish, and then do a first cut of the new code for compiling attribute declarations.
20:02 patspam joined
dalek kudo: 9993bb2 | moritz++ | docs/ChangeLog:
[docs] update ChangeLog
20:07
20:10 wallberg joined
tadzik btw, how is speeding up read()/write() going? :) 20:11
bah, bedtime. See you tomorrow 20:13
20:13 tadzik left, rindolf left 20:14 chatcopitecos joined 20:15 chatcopitecos left
wallberg hi masak & Co! 20:15
20:18 alksentrs left
gottreu moritz_, not the LaTeX generator, but the base package Pod::PseudoPod. there's a github repo, but it's behind CPAN's version, and it doesn't seem to be the place where development actually takes place. 20:18
jnthn wallberg: Seems only the Co are here at the moment. :-) 20:23
wallberg :-)
lue ohai o/ 20:26
jnthn hellue
20:27 timbunce joined
dalek odel: 3ab10e5 | jnthn++ | dotnet/ (17 files):
All representation methods should probably get the ThreadContext in the .Net version (just as the Parrot ones will all want to get the interp). Gets us a step closer to P6opaque slot alloc actually working.
20:27
lue on perlcabal.org/syn, the S26 .pod should link to the /raw/ version, not /blob/ [where may I change this?] 20:29
jnthn mberends++ will probably smack me for doing that commit now rather than thinking of it earlier... 20:30
lue: I think pmichaud++ fixed that earlier.
lue: It's just not propagated to the live site yet.
20:33 alksentrs joined 20:34 mberends joined 20:36 vapace left, vapace joined 20:44 kjeldahl left 20:49 mj41 left 20:51 mj41 joined 21:00 Kodi left 21:09 jferrero left
tylercurtis jnthn: in :($!foo), is $!foo bound or assigned the value of the parameter? 21:09
21:11 chitragupt left 21:12 yrgd left 21:13 vapace left, vapace_ joined 21:17 vapace_ left, vapace_ joined 21:23 mj41_ joined 21:24 mj41 left, chitragupt joined, mj41_ is now known as mj41
jnthn tylercurtis: assignment 21:25
Same for :($.foo) too, though in that case it calls self.foo to get the thing to bind to
tylercurtis jnthn: Can $!foo be bound explicitly? Can $.foo (assuming it's rw)? 21:26
jnthn $!foo := ...; should work in a method 21:27
(may not work in declarations)
Binding to $.foo is weird
('cus it's really a method call returning an l-value)
21:28 qw3rty joined 21:29 mj41 left, mj41_ joined, mj41_ is now known as mj41
ash_ rakudo: my $a = 5; sub f($a = \$a) { say $a }; f; $a = 3; f; 21:35
p6eval rakudo 9993bb: OUTPUT«Capture()<0x630b3b0>␤Capture()<0x5e88d20>␤»
tylercurtis Thanks for answering these questions. I started thinking about representations and wondering in what circumstances a class could be laid-out as a simple struct of the attributes without needing actual containers.
ash_ rakudo: my $a = 5; sub f($b = \$a) { say $b[0]; }; f; $a = 3; f;
p6eval rakudo 9993bb: OUTPUT«5␤3␤»
tylercurtis Obviously, augment complicates things, but I think that could be handled by either precompiling a pessimized and an optimized version, or precompiling one and caching the compilation in some intermediate form that still has the necessary pessimization/optimization options to generate the other.
jnthn I'm going for lazy pessimization 21:36
e.g. we produce something struct-ish when we can, but fall back to something worse if needed.
21:37 chitragupt left 21:40 Mowah left
tylercurtis I'm very curious about how you'll implement compact structs on Parrot. 21:42
21:42 vapace_ left
jnthn At the moment I'm pondering that some reprs can flag that they should be stored "inline". 21:42
21:43 vapace_ joined 21:44 PacoLinux left
ash_ compact structs could be handled with a bytebuffer 21:50
or an UnmanagedStruct 21:51
jnthn I expect I'll do something a little like [Un]managedStruct does. 21:52
tylercurtis One nice thing about targetting a lower-level backend with Bennu is that I'll have considerably more freedom with how I can emit code for certain things. For example, for compact structs, Bennu could, if no pessimizations were necessary, emit essentially(possible exactly?) the same code a C compiler would.
Of course, targeting a lower level backend also means I have to roll my own everything... 21:53
jnthn Trade-offs. :-) 21:56
21:57 svetlins joined
tylercurtis :) Once I get some more stuff parsing, I'll have to decide whether to roll my own vtables (for the low-level classes involved in bootstrapping the metamodel) in the setting or to do them in the compiler. 22:02
The latter's likely the prettier option, and makes it more convenient for other people to write representations, but it has the disadvantage that it might make it harder for people to roll their own low-level method dispatch.
22:02 Myhrlin left
TimToady rakudo: .say for 0, 0.001, 0.002 ... 20 # segfault on my machine before it gets to 20 22:04
p6eval rakudo 9993bb:
..OUTPUT«(timeout).002␤0.003␤0.004␤0.005␤0.006␤0.007␤0.008␤0.009␤0.01␤0.011␤0.012␤0.013␤0.014␤0.015␤0.016␤0.017␤0.018␤0.019␤0.02␤0.021␤0.022␤0.023␤0.024␤0.025␤0.026␤0.027␤0.028␤0.029␤0.03␤0.031␤0.032␤0.033␤0.034␤0.035␤0.036␤0.037␤0.038␤0.039␤0.04␤0.041␤0.042␤0.043␤0.044␤0.045␤0.046␤0.047␤0.…
TimToady it's really difficult to do a large integration when you can't run 20,000 iterations... 22:05
22:06 chitragupt joined
flussence appears to work on mine (2010.08), though it's slowly leaking memory 22:06
TimToady 32 or 64-bit?
flussence 32
TimToady 32 here too
it gets all the way to 20 for you?
flussence slow laptop, but it's at 4.1 so far
TimToady mine only gets to 19.804 22:07
22:07 rgrau_ left
ash_ running it to see how far my compy gets 22:07
TimToady it seems quite reproducable here
jnthn tylercurtis: My feeling is representations are OK to be harder to write/port and can be quite low-levely, and customizable method dispatch wants to be something folks can do easily. 22:09
22:10 Tene_ is now known as Tene, timbunce left
ash_ my dies at 19.362 (this time, i'll run again and see if its the same) 22:10
TimToady recompiled HEAD, trying again 22:11
ash_ hmm, i'll try it in the gdb next to see where the segfault happens 22:12
22:12 flatwhatson left
tylercurtis jnthn: well, customizable method dispatch should be easy, either way. It's non-vtable-based low-level ultra-fast method dispatch that might be less convenient(impossible, even, perhaps) to write if I do vtables in the compiler. 22:12
jnthn Eww, it only gets to 5.286 before segfaulting here. :/
tylercurtis: I'm pondering that the HOW API will have a way for a meta-class to say "here's the things that belong in my v-table" or some such 22:13
TimToady 19.678 this time 22:14
pmichaud I'm guessing that it's ending up with the full linked list of iterators somehow.
(back from soccer :)
jnthn tries it under the 'bugger.
flussence 20 :D 22:15
ash_ its noticably jerkier at around 18~ish, like it prints a bunch then freezes for a second, prints a bunch, then freezes
19.342 this time
jnthn pmichaud: You are...CORRECT.
flussence yeah, mine does that every ~196 iterations
jnthn It stack overflows.
flussence GC?
jnthn oh huh, where on earth are my debug symbols... 22:16
flussence tries with 64bit
tylercurtis jnthn: note that I'm not talking about things at the Perl 6 MOP level. Hopefully, new HOWs and at least some new reprs can be implemented above the level I'm discussing. I'm talking about things at the bootstrap-the-metamodel level. Representations are more likely to need to be at that level than HOWs, though, I expect.
jnthn tylercurtis: Oh, OK. 22:17
22:17 azert0x left
jnthn tylercurtis: I thought you were a level higher. :-) 22:17
ash_ running in gdb, so i'll see where it crashes for me, hopefully its consistent 22:18
22:18 qw3rty left
flussence 64bit 2010.08 made it to 20 too 22:18
jnthn ash_: I suspect it's consistent-ish on a given machine
ash_: And depends on stack size.
pmichaud we know that Parrot tends to die whenever there's any sort of linked list with more than 20K elements. trac.parrot.org/parrot/ticket/1723
jnthn er, yup 22:19
pmichaud: It's in the GC
pmichaud: deep recursion.
pmichaud I should probably look at the series operator to see if it's somehow keeping the entire list.
jnthn pmichaud: So it's exacly that.
pmichaud I haven't been following the commits for that over the past few days.
tylercurtis jnthn: I don't think that it is acceptable for representations to necessarily be harder and more low-level, by the way. Although most will need to be low-level, I can think of some that should be able to be implemented in normal Perl 6 code(e.g., ORM stuff).
jnthn tylercurtis: I don't think folks writing ORM stuff will need custom representations. 22:20
tylercurtis: That's more a custom meta-class issue.
tylercurtis: I suspect I'll be able to find some way to allow higher level implementations of them, but I don't know that it'll be very useful. 22:21
TimToady it's seems suboptimzal for GC to be using recursion where it could probably be using its own list of TODOs
22:22 cj_ is now known as cj
jnthn TimToady: Indeed. 22:22
pmichaud TimToady: I don't know anyone who disagrees with that. :)
jnthn oh wtf
You gotta love this
The comment says
/* if object is a PMC and contains buffers or PMCs, then attach the PMC
* to the chained mark list. */
However, it doesn't do that at all - it just recurses. 22:23
22:25 vapace_ left
tylercurtis jnthn: ORM isn't a good example, since that would require caching that may make a custom representation inappropriate. I guess I don't really have any good examples of high-level representation use cases. But I plan to make it possible/convenient. Maybe someone else will find a good use for it. 22:26
pmichaud afk again for a while -- need a bit of rest after today's soccer game. 22:27
bbl 22:28
22:31 Ross left
tylercurtis In S03, := and ::= are listed under "Item assignment precedence" even though their descriptions specify that they're parsed as list assignments. 22:36
22:36 meppl left 22:40 patspam left 22:42 pmurias left
dalek odel: 79cb4c2 | jnthn++ | dotnet/runtime/Rakudo.Net.csproj:
Remove several references that we're not using.
22:47
23:01 chitragupt left 23:04 chitragupt joined 23:15 wallberg left
dalek odel: 2e85654 | jnthn++ | dotnet/runtime/Runtime/Ops.cs:
Add some ops for dealing with low level lists (those based on the P6list representation).
23:19
odel: d88a87b | jnthn++ | common/NQP/NQPSetting.pm:
Flesh out NQPList a little bit.
odel: 2eadf22 | jnthn++ | dotnet/runtime/ (2 files):
Add a default list field type to the TC.
lue rakudo: my %h = "2a", 1, "ri", 3; say (%h.keys ~~ /<digit> .+/) 23:20
p6eval rakudo 9993bb: OUTPUT«any(Match.new(␤ from => 2,␤ orig => "ri",␤ to => -3,␤), Match.new(␤ from => 0,␤ orig => "2a",␤ to => 2,␤ named => {␤ digit => Match.new(␤ from => 0,␤ orig => "2a",␤ to => 1,␤ ),␤ },␤))␤»
lue rakudo: my %h = "2a", 1, "ri", 3; say (%h.keys «~~» /<digit> .+/)
p6eval rakudo 9993bb: OUTPUT«2a␤»
lue I find that interesting. I assume it's supposed to do that? 23:21
23:23 flatwhatson joined
tylercurtis lue: why not? It's just normal hyperop bheavior as far as I can see. None of the other elements of %h.keys matches / <digit> .+ / 23:23
s/bheavior/behavior/ 23:25
lue I meant that without hyperoping it, it prints the code for a junction of match objects, but with «», it only prints the strings that match.
tylercurtis didn't notice the first one.
dalek odel: 8fd22f5 | jnthn++ | dotnet/runtime/Metamodel/KnowHOW/KnowHOWBootstrapper.cs:
Add parents, methods and attributes introspection methods for knowhows.
odel: cd212c9 | jnthn++ | dotnet/runtime/Metamodel/Representations/P6opaque.cs:
Fix a thinko in the slot computation code. Seems it runs and allocates slots now.
tylercurtis Apparently, Regex.ACCEPTS(Array) is essentially @array.any.match($regex). 23:27
rakudo: my %h = "2a", 1, "ri", 3; say (%h.keys «~~» /<digit> .+/).perl; 23:28
p6eval rakudo 9993bb: OUTPUT«[Match.new(␤ from => 2,␤ orig => "ri",␤ to => -3,␤), Match.new(␤ from => 0,␤ orig => "2a",␤ to => 2,␤ named => {␤ digit => Match.new(␤ from => 0,␤ orig => "2a",␤ to => 1,␤ ),␤ },␤)]␤»
tylercurtis lue: Matches stringify to the matched string. But junctions apparently just do .perl to stringify.
ash_ jnthn: when you ran that loop for the 0.001 ... 20 loop, my stack trace is 155304 frames deep, that seems really scary 23:30
jnthn ash_: Yes, it's Bad. 23:31
23:31 Sanitoeter left
ash_ does gc_mark not return? 23:32
23:32 Sanitoeter joined
lue What's the magic operator that'll let me see if I got no matches from a List (like %h.keys) against a regex? 23:33
[I've been experimenting for a while now] 23:36
ash_ ~~ ?
rakudo: my @a = <a b c>; say /a/ ~~ @a, /a/ ~~ <b c d>;
tylercurtis !(%h.keys ~~ / <digit> .+/) should work.
p6eval rakudo 9993bb: OUTPUT«00␤»
lue aaah. What does the ! mean?
tylercurtis ash_: that doesn't work. 23:37
ash_: because Array.ACCEPTS is <<===>> 23:38
ash_ i thought one of the smart matches was this case, let me double check
tylercurtis ash_: only in Perl 5.
lue so all I needed was a .Bool...
tylercurtis lue: well, you asked how to check for no matches, so I told you to use !(or not if you prefer). 23:39
or .not.
ash_ S03 line 3595 23:40
rakudo: say ?(<a b c> ~~ /a/), ?(<b c d> ~~ /a/)
p6eval rakudo 9993bb: OUTPUT«10␤»
lue I guess I got stuck trying to use prefix:<?> as a way to check for boolean
tylercurtis ash_: right. But ~~ is asymmetric.
ash_ Array ~~ Regex checkes .any.match(X) 23:41
where X = your regex
lue and using «~~» in combination with ? apparently
ash_ lue: how are you using your match? in an iffy context? 23:42
tylercurtis lue: @a <<~~>> $regex should always be true for non-empty @a.
lue rakudo: my %h = 'di', 3, 'hai', 4; say ?(%h.keys «~~» /^'=' .+/) 23:43
p6eval rakudo 9993bb: OUTPUT«1␤»
ash_ rakudo: my %h = 'di' => 3, 'hai' => 4; say ?(%h.keys ~~ /^'=' .+/)
p6eval rakudo 9993bb: OUTPUT«0␤»
ash_ rakudo: my %h = 'di' => 3, 'hai' => 4; say ?(%h.keys ~~ /^'=' .+/), ?(<'='> ~~ /^'='.+/) 23:44
p6eval rakudo 9993bb: OUTPUT«00␤»
ash_ rakudo: my %h = 'di' => 3, 'hai' => 4; say ?(%h.keys ~~ /^'=' .+/), ?(<'='foo> ~~ /^'='.+/)
tylercurtis lue: also, you can just do %h ~~ $some-regex instead of %h.keys ~~ 4some-regex
p6eval rakudo 9993bb: OUTPUT«00␤»
dalek odel: a7e45c1 | jnthn++ | README.txt:
Couple of README updates to better explain what's in here, for the curious.
lue oh, it automagically ignores the values? 23:45
tylercurtis According to S03.
ash_ it should do hash keys
not hash values
lue I wonder why it only works right when you use =>.
tylercurtis rakudo: my %h = 'di', 3, 'hai', 4; say ?(%h.keys ~~ /^'=' .+/), ?(<'='foo> ~~ /^'='.+/) 23:46
p6eval rakudo 9993bb: OUTPUT«00␤»
ash_ rakudo: my %h = 'a', 1; say %h.perl
p6eval rakudo 9993bb: OUTPUT«{"a" => 1}␤»
lue rakudo: my %h; %h{'di'} = 3; %h{'hai'} = 4; say ?(%h.keys «~~» /^'=' .+/)
p6eval rakudo 9993bb: OUTPUT«1␤»
tylercurtis lue: don't use <<~~>>.
ash_ rakudo: my %h = 'di', 3, 'hai', 4; say %h.perl
lue ash_: I didn't see your removal of «»
p6eval rakudo 9993bb: OUTPUT«{"hai" => 4, "di" => 3}␤»
ash_ it should be fine with comma's 23:47
tylercurtis lue: <<~~>> is not what you want. If either the left or right side of the ~~ has any elements, it will be true, regardless of whether any elements actually matched. 23:48
lue .oO[ The preceding conversation was a result of me not knowing the finer points of various bits of Perl 6. If you already know these points, you may ignore the conversation. :) ] 23:51
tylercurtis lue: personally, I'd prefer using %h.keys.grep($some-regex), because it relies less on the reader knowing what Regex.ACCEPTS does with Hashes or Arrays. (I didn't remember what it did until I looked it up just a few moments ago). 23:53
Speaking on smart-matching, specbug in S03:3600. $_ ~~ X where X is Match should be X, not $_. 23:56
lue Alright .oO[ although I've never had enough reason to even see what .grep is for and what it means :) ] 23:57