»ö« | 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.
plobsing yes but, doesn't it cause access to @x[0] to run off to infinity? 00:00
diakopter std: [:=] [:=] (my @x) 00:01
sorear := is a special form, not an operator
p6eval std 30649: OUTPUT«ok 00:01 111m␤»
sorear [:=] *shouldn't* parse
although lots of people disagree with me on this
maybe I could add := to soreakudo and tempt masak with SPECTESTS 00:02
lue I don't see how it would work.
plobsing soreakudo? you have a fork?
lue I can see [+] and [-] of course, but not [:=] 00:03
does [=] even work? It seems to me operators like = and := don't work well as a metaop. 00:07
plobsing AFAIC, R= is just plain evil. 00:09
00:10 JimmyZ left
lue russian reversal assignment? that does sound evil. 00:10
plobsing rakudo: my $x = 1; my $y = 2; $x R= $y; say($x); say($y);
p6eval rakudo 92508d: OUTPUT«1␤1␤»
lue (when I said metaop, I meant these guys: [+] [-]) 00:11
plobsing I thought R and Z were metaops too
lue they are.
sorear plobsing: not a fork-fork, but there's a huge backlog for patch review
00:16 jaldhar left, _jaldhar joined
plobsing sorear: does rakudo have a patch reviewer shortage? 00:16
sorear plobsing: yes, circumstantially 00:21
the stuff I've been doing is almost entirely in the pmichaud bus zone
lue afk (compiling blender) 00:24
sorear I get the feeling STD_syntax_highlight was ported from Perl 4 00:26
00:40 jferrero left 00:43 nsh left, nsh_ joined 00:57 justatheory joined 00:59 justatheory left 01:02 justatheory joined 01:04 justatheory left
sorear String::IRC-- making up custom names for every color 01:16
just follow conio.h, it's the standard 01:17
or curses
or RGBI bitfields
but not "olive", "maroon", "navy", "fuschia"
evalbot control version 01:28
p6eval This is evalbot revision 30533
01:33 {shade} left 01:38 {shade} joined
pugssvn r30650 | lwall++ | [CORE] add protos of operators 01:41
r30650 | [STD] add operators to symbol tables as subs
r30650 | [Cursor] canonicalize operator names in symbol table
r30651 | sorear++ | Add a mIRC color code backend to STD_syntax_highlight 01:46
eternaleye (backlogging) cognominal: re signatures, you have to bind, not assign and I'm not sure how that works with a signature stored in a variable. Try `my $a, $b; :( $a, $b ) := ( 1, 2 )` - :() constructs a signature, := binds to it 01:52
01:55 JimmyZ joined
eternaleye Hm, drake1 isn't here anymore. I was going to tell him about 'ls | grep ... | while read i' being much more reliable than 'for F in $(...)' 01:57
Though find -exec ... \; is better still 02:00
rakudo: my Int $a, Str $b; :( $a, $b ) := ( 1, 'Hi!' ); .say for $a, $b; 02:01
p6eval rakudo 92508d: OUTPUT«Confused at line 11, near "my Int $a,"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤» 02:02
eternaleye rakudo: my $a, $b; :( $a, $b ) := ( 1, 'Hi!' ); .say for $a, $b;
p6eval rakudo 92508d: OUTPUT«Symbol '$b' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
eternaleye rakudo: my ($a, $b); :( $a, $b ) := ( 1, 'Hi!' ); .say for $a, $b;
p6eval rakudo 92508d: OUTPUT«Any()␤Any()␤»
cognominal eternaleye, thx, I will check out
eternaleye alpha: my ($a, $b); :( $a, $b ) := ( 1, 'Hi!' ); .say for $a, $b;
p6eval alpha 30e0ed: OUTPUT«Use of uninitialized value␤␤Use of uninitialized value␤␤»
eternaleye Hmm
cognominal :) 02:03
eternaleye alpha: my ($a, $b) := ( 1, 'Hi!' ); .say for $a, $b;
p6eval alpha 30e0ed: OUTPUT«rtype not set␤in Main (file <unknown>, line <unknown>)␤»
eternaleye rakudo: my ($a, $b) := ( 1, 'Hi!' ); .say for $a, $b;
p6eval rakudo 92508d: OUTPUT«1␤Hi!␤»
eternaleye THERE we go!
('my' operates on a signature)
rakudo: my (Int $a, Str $b) := ( 1, 'Hi!' ); .say for $a, $b; 02:04
p6eval rakudo 92508d: OUTPUT«1␤Hi!␤»
eternaleye rakudo: my (Int $a, Int $b) := ( 1, 'Hi!' ); .say for $a, $b;
p6eval rakudo 92508d: OUTPUT«Nominal type check failed for parameter '$b'; expected Int but got Str instead␤current instr.: '' pc 0 (EVAL_2:1)␤»
eternaleye Tada!
cognominal also I am not sure if $a := @b[1] should bind to the slot or to the container in the slot 02:05
eternaleye rakudo: my (Int $a, Complex $b ( :$re, :$im ) ) := ( 1, 1 + 3i ); .say for $a, $re, $im;
p6eval rakudo 92508d: OUTPUT«1␤1␤3␤»
eternaleye Unpacking is fun
cognominal if I do @b[1] = 1 should it affect $a or not? 02:06
I guess this is the most useful thing to do.
otherwise the old @b[1] will still be (only) accessible thru $a. 02:07
idle thinkings... 02:08
02:17 snarkyboojum left 02:19 JimmyZ left 02:20 kerframil left
sorear the behavior of $a := @b[1] is effectively forced from an implementator's perspective 02:35
02:36 constant joined, constant left, constant joined
cognominal sorear, what do you mean? 02:37
sorear rakudo: sub BIND($name, $reg is rw) { pir::store_dynamic_lex__vSP($name, $reg); }; my $x; my @y; BIND('$x', @y[1]); @y = <a b c>; say $x;
p6eval rakudo 92508d: OUTPUT«␤»
sorear rakudo: sub BIND($name, $reg is rw) { pir::store_dynamic_lex__vSP($name, pir::find_lex__PS('$reg')); }; my $x; my @y; BIND('$x', @y[1]); @y = <a b c>; say $x; 02:38
p6eval rakudo 92508d: OUTPUT«␤»
sorear not quite working.
cognominal I am dizzy with these pir:: et Q:PIR...
sorear := is the essential binding operation 02:39
it is used, notionally, during signature binding
the rhs is any old value that can be passed to functions 02:40
cognominal this is the only thing implemented so far in rakudo...
sorear when you function(@foo[1]), the slot is lost
only the container is passed to function
so, for the rhs, the old meaningful usage is the container
02:50 justatheory joined 02:51 Chillance left
sorear viv gives wrong output on unimplemented cases, interesting 02:52
pugssvn r30652 | lwall++ | [Cursor] don't complain of uninit $*FATAL on supposition 02:58
TimToady s/FATAL/FATALS/
03:00 masonkramer left, JimmyZ joined, masonkramer joined 03:01 nadim_ left
sorear TimToady: Is there a list of what needs to be done with viv? Are there any good "stepping stone" inputs before I spend the 4:20 to process STD? 03:05
JimmyZ std: eval "class Foo { }" 03:07
p6eval std 30651: OUTPUT«ok 00:01 110m␤»
JimmyZ rakudo: eval "class Foo { }"
p6eval rakudo 92508d: OUTPUT«Null PMC access in get_string()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear JimmyZ: std doesn't run code, so it can't see the runtime error in that line
{ is special in double-quoted strings now
you need to use 'class Foo { }' 03:08
JimmyZ sorear: It's a bug?
sorear rakudo: eval 'class Foo { }'
p6eval rakudo 92508d: ( no output )
sorear JimmyZ: There's a bug there, but it has nothing to do with classes or eval
rakudo: say "class Foo { 2 + 2 }" 03:09
p6eval rakudo 92508d: OUTPUT«class Foo 4␤»
JimmyZ oh, I thought it was not a bug
sorear { XXX } interpolates Perl code
{ } should interpolate 'undef', but instead it crashes
known bug, I'm pretty sure
cognominal also I see a point about signatures that does not appear in Perl6 (rakudo) grammar. If the methods metha and methb have the same signature (say $sig), I would like to declare them method metha $sig { ... } method methb $sig { } 03:15
so as not to repeat the common signature. 03:16
...more idel thoughts :)
TimToady sorear: no, no list for viv 03:23
03:35 lest_away is now known as lestrrat 03:39 xinming left
sorear Can't call method "Str" on an undefined value at viv line 989 03:42
sorear tracks
03:44 tylerni7 left 03:49 tylerni7 joined
JimmyZ phenny: help? 03:50
phenny JimmyZ: Hi, I'm a bot. Say ".commands" to me in private for a list of my commands, or see inamidst.com/phenny/ for more general details. My owner is sbp.
JimmyZ phenny tell moritz_ I sent a patch to RT #75114: Can't augment class Int 03:51
TimToady sorear: def_module_name changed to longname, I think
sorear yeah 03:56
I figured that much out... slow going but progress
that said I finally managed to read all the way through STD.pm6; correct highlighting helps a lot
I wish we had something like that for perl5/cursor :) 03:57
04:00 justatheory left
TimToady well, we just have to rewrite it all in Perl 6 :) 04:04
'course, for that, we need viv -5...
sorear viv -5 ? 04:05
diakopter emit_p5
sorear is hacking on viv
I wanted some p6 related stuff to work on; diakopter++ recommended viv 04:06
diakopter finally I did something right ;)
TimToady: note that viv can be read either as 6->5 or 5->4 04:07
TimToady unfortunately I already did the easy bits :)
sorear it depends on whether TimToady approves of random non-TimToady-mind-readers hacking viv
TimToady: that's ok. I only find hard things fun.
diakopter giggles at 5->4. I kill me. 04:08
TimToady you want to take small chunks out STD.pm5 as produced by gimme5 and reproduce 'em with viv -5
diakopter thinks sorear seems like the reverse-engineering-is-the-best-game-ever sort 04:09
sorear: does this mean you can produce an html colorized edition of STD.pm6? 04:10
sorear diakopter: once we've figured out how to write a perl 5 deparser in viv, adding the perl 4 deparser will be relatively easy
then hook it up to STD_P5.pm6
pugssvn r30653 | lwall++ | [STD] read user's mind on 'Str $toto'
TimToady 'course, Perl 4 didn't have closures...
sorear diakopter: I already have an html colorized STD.pm6. However, it contains large amounts of obfuscated javascript and crashes firefox when I load it 04:11
diakopter re: no closures; 'ts ok; I can write the framebuilder & trampoline-builder
sorear why STD_syntax_highlight generates obfuscated javascript /at all/ is beyond me
diakopter heh
node collapsing/expanding I think
TimToady I believe on mouseovers it puts the list of outer contexts 04:12
diakopter I think it appears obfuscated b/c it's minified
04:12 [mark] joined
sorear diakopter: the worst part is going to be memory management 04:13
Perl 4 has no garbage collector
*foo = *bar; # the old *foo glob-object is now a memory leak 04:14
diakopter oh.
sorear you'd have to write your own garbage collector
04:14 envi^home joined
sorear you'd probably want to use inside-out objects for this 04:14
TimToady well, Perl 5 doesn't exactly have a GC either 04:15
sorear $node_types{$node_num} = 'additive';
04:15 snarkyboojum joined
sorear needs to make a more detailed study of Perl 4 some time 04:18
I've been involved with the Perl scene since, uh, 5.005 04:19
pugssvn r30654 | sorear++ | deflongname is just longname now 04:20
sorear I think I'd like a less verbose form of VAST 04:21
TimToady that would be useful
diakopter nonvast
04:28 snarkyboojum left 04:29 snarkyboojum joined
diakopter +v pugssvn 04:33
sorear diakopter: /mode #perl6
sorear would do it himself, but this goodfornothing ISP keeps dropping my ops
diakopter I know :P; I was hoping I could trigger TimToady's alias
04:34 TimToady sets mode: +vvv buubot dalek hugme, TimToady sets mode: +vv ilogger2 IRSeekBot, TimToady sets mode: +vvv lisppaste3 p6eval phenny, TimToady sets mode: +v pugssvn
diakopter ooo it worked 04:34
sorear +ooo/
04:34 diakopter sets mode: +o sorear
diakopter maybe your isp detects when you get ops 04:35
sorear I think they just don't care
it's not like they have competitors
a far too common story in the US
TimToady maybe they think you're tweeting :) 04:36
diakopter US, the land of threat-of-force enforced geographic monopolies
sorear TimToady: I don't *think* they've banned twitter yet.
diakopter oh wait, that's everywhere.
sorear they have dropped usenet, though 04:37
diakopter wonders what 'twit (v.)' once meant
oh. 04:38
sorear diakopter: onomatopoeia for birdsong
TimToady as in twitterpated :) 04:39
sorear hmm 04:40
lots of shared substructure 04:41
sorear can't read YAML
what does .: mean?
TimToady key is actually '.' 04:42
it's just the ordered nodes
wanted a key name that couldn't be confused with the named keys
sorear ordered nodes?
TimToady array
sorear what if there's more than one? 04:43
TimToady there's only one ., but multiple entries are marked with -
sorear .: &1 !!perl/hash:VAST::statementlist .:
04:43 TiMBuS joined
sorear irssi-- 04:43
what does it mean if there's a .: directly under .:
TimToady I don't recall ever seeing that 04:44
oh wait, it's indented more?
sorear yes
TimToady it's the first entrie in the oute r.
sorear why isn't it - ?
sorear thinks yaml is overcomplicated, wants a simpler unambiguous notation for object graphs 04:45
TimToady it's not too bad when you get used to it 04:47
diakopter worried I don't see the ambiguity 04:50
sorear YAML is not unambiguous 04:52
the obvious simpler representations are
YAML's sin is complexity
the YAML spec is 200 pages 04:53
YAML has approximately the same expressive power as s-expressions
I modified viv to use Data::Dumper but Data::Dumper handles not-tree-like data structures badly 04:54
(by badly I mean not human readable) 04:55
TimToady yes, I was trying to switch gimme5 to using DD yesterday but it fails
04:55 kulp left
TimToady utf8 problems 04:55
not that yaml isn't without its share of utf8 problems too 04:56
diakopter I don't know how DD would handle the cross-tree references
sorear TimToady: would changing the default output format of viv to --concise break anything? 04:57
once I implement concise, of course :)
TimToady I don't know
nothing major that I'm aware of 04:58
sorear makes viv output much more readable by piping it through sed 's/ /: /g'
diakopter mberends' vill parses the yaml output
sorear Why do VAST nodes sometimes present in both numbers and names? 05:00
TimToady std: Str $toto 05:01
p6eval std 30654: OUTPUT«===SORRY!===␤Bare type Str cannot declare $toto without a preceding scope declarator such as 'my' at /tmp/KG4sNTYATH line 1:␤------> Str ⏏$toto␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse
..failed␤FAI…
diakopter std: sub Str foo () { }; 05:02
TimToady so you can reconstruct it in original order, or by semantics
p6eval std 30654: OUTPUT«===SORRY!===␤Malformed block at /tmp/2Cy6RwLkN1 line 1:␤------> sub Str ⏏foo () { };␤ expecting any of:␤ block␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 110m␤»
eternaleye (re concise form of VAST) maybe call it DEEP?
That way we can say that the perl6 translator is DEEP and VAST 05:03
diakopter or DISTANT (or FAR)
eternaleye One of the reasons I like Perl(5|6) so much is that there's a culture of humor. C++, Java - their cultures are so _plain_. In Perl, the language designer makes puns and those who write reference books are incorrigible :D 05:05
JimmyZ s
diakopter std: our sub Str foo () { };
p6eval std 30654: OUTPUT«===SORRY!===␤Malformed block at /tmp/KUwNY1wjPc line 1:␤------> our sub Str ⏏foo () { };␤ expecting any of:␤ block␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 110m␤»
diakopter std: my sub Str foo () { }; 05:06
p6eval std 30654: OUTPUT«===SORRY!===␤Malformed block at /tmp/QAdAIYB8Ca line 1:␤------> my sub Str ⏏foo () { };␤ expecting any of:␤ block␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 110m␤»
eternaleye std: our Str sub foo () { };
p6eval std 30654: OUTPUT«ok 00:01 111m␤»
diakopter sigh
05:06 snarkyboojum left
diakopter in one neural network; out the same. 05:06
eternaleye std: our sub foo (--> Str) { }; 05:07
p6eval std 30654: OUTPUT«ok 00:01 111m␤»
05:07 isBEKaml joined
diakopter that much I remembered 05:09
having implemented it
TimToady well, the error is LTA 05:11
05:12 snarkyboojum joined 05:16 canolucas joined 05:21 canolucas left
sorear TimToady: so, Cursor Matches have the parcel-nature? 05:32
unlike NQP Matches, which have only capture-nature 05:33
TimToady mmm, no, they're more like captures; parcels don't do Hash 05:38
05:39 lestrrat is now known as lest_away
sorear captures don't do putting-keys-in-order 05:40
05:40 lest_away is now known as lestrrat 05:47 snarkyboojum left
TimToady they do if they're really Matches and have to be able to return .chunks :) 05:50
05:52 sorear left 05:53 snarkyboojum joined, sorear joined
sorear diakopter: I begin to beleive you 05:57
06:00 lestrrat is now known as lest_away
TimToady just so you don't finish believing him :) 06:12
JimmyZ std: my $a = 1; ++++$a = 5; 06:23
p6eval std 30654: OUTPUT«ok 00:01 112m␤»
JimmyZ rakudo: my $a = 1; ++++$a = 10; say $a; 06:24
p6eval rakudo 92508d: OUTPUT«10␤»
pugssvn r30655 | lwall++ | [STD] properly diagnose typename between routine declarator and sub name 06:31
06:36 TimToady sets mode: +o sorear
JimmyZ nqp: my $a :=1; ++$a; 06:40
p6eval nqp: ( no output )
JimmyZ nqp: my $a :=1; $a++;
p6eval nqp: ( no output )
JimmyZ Where can I report NQP-rx bug? 06:42
06:45 {shade} left 06:48 orafu left, orafu joined
sorear JimmyZ: it's still using the parrot tracket 06:48
JimmyZ: also, a lot of things that look like bugs in nqp aren't
nqp has a lot of the teco-nature - not really designed to be used by the public, so it's got a *lot* of rough edges, but it's simple and works well 06:49
TimToady std: sub Str foo () { }; 06:50
06:50 {shade} joined
p6eval std 30654: OUTPUT«===SORRY!===␤Malformed block at /tmp/HYebboMO6N line 1:␤------> sub Str ⏏foo () { };␤ expecting any of:␤ block␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 113m␤» 06:50
sorear JimmyZ: what's the nqp bug here? 06:51
constants aren't. FORTRAN lives on 06:52
JimmyZ nqp: my $a :=1; ++++$a;
p6eval nqp: OUTPUT«The opcode 'inc' (inc<0>) was not found. Check the type and number of the arguments␤current instr.: 'parrot;PCT;HLLCompiler;evalpmc' pc 987 (compilers/pct/src/PCT/HLLCompiler.pir:542)␤»
JimmyZ nqp: my $a := 1; $a++++; say($a) 06:54
p6eval nqp: OUTPUT«2␤»
JimmyZ rakudo: my $a = 1; $a++++; say($a)
p6eval rakudo 92508d: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17864 (src/builtins/Junction.pir:393)␤»
JimmyZ sorear: mutil prefix or postfix ++/-- is wrong both in rakudo and nqp 06:55
sorear mutil? 07:04
TimToady std: sub Str foo () { };
p6eval std 30655: OUTPUT«===SORRY!===␤Return type Str is not allowed between 'sub' and 'foo'; please put it:␤ after the (missing) scope declarator but before the 'sub',␤ within the signature following the '-->' marker, or␤ as the argument of a 'returns' trait after the signature. at
../t…
JimmyZ rakudo: my $a = 1; ++++$a; say($a); # sorear: something like this 07:05
p6eval rakudo 92508d: OUTPUT«3␤»
JimmyZ multi 07:06
sorear I am not so sure; TimToady, is that a lvalue?
TimToady ++$a is an lvalue 07:07
std: our multi Str foo () { }; 07:08
p6eval std 30655: OUTPUT«===SORRY!===␤Return type Str is not allowed between 'multi' and 'foo'; please put it:␤ after the 'our' but before the 'multi',␤ within the signature following the '-->' marker, or␤ as the argument of a 'returns' trait after the signature. at /tmp/GLMKMrzc4s
..lin…
07:38 molaf joined 07:44 molaf left 07:46 nadim_ joined 07:48 meppl joined
sorear Would anyone kill me if I used UTF-8 line drawing characters in the output of --concise? 08:01
Gothmog_ depends on the locale, i assume ;) 08:12
08:18 mberends joined 08:19 iblechbot joined 08:28 Su-Shee joined 08:29 kel_ joined
sorear TimToady: $node->{"."} is a statementlist object? WTF? 08:39
I thought you said it was an array
I'm completely confused
08:41 snarkyboojum_ joined 08:43 snarkyboojum left, snarkyboojum_ is now known as snarkyboojum, XaeroOne joined
sorear oh, I think I see 08:43
"." is all children (array if needed)
"foo" is all foo children (array if needed)
moritz_ good morning 08:45
phenny moritz_: 03:52Z <JimmyZ> tell moritz_ I sent a patch to RT #75114: Can't augment class Int
08:46 plobsing left 08:49 Gothmog_ left 08:51 Gothmog_ joined
isBEKaml hello moritz_ 08:54
moritz_ oh hai 08:55
08:57 k23z__ joined
moritz_ updated u4x.perl6.org 08:59
JimmyZ couldn't open it 09:00
Su-Shee "Forbidden"
isBEKaml moritz_: no index file? 09:02
moritz_: I noticed a small typo in render.pl just now. :21 s/pt/pts/ 09:04
this won't copy the style.css to output directory
sorear is loving 'use warnings FATAL => 'all'; use Carp::Always' 09:05
moritz_ isBEKaml: just noticed that, and fixed locally 09:06
pugssvn r30656 | moritz++ | [u4x] correct path, warn if copy failed
Su-Shee I've just read the single most mean spirited, angry blog posting ever. luckily, it's not the perl community. ;) 09:07
JimmyZ I cou 09:08
moritz_ u4x.perl6.org/control-flow.html
Su-Shee (we're so well off even with all the tension between 5 & 6... -> deepinanime.blogspot.com/2009/11/ra...copy.html)
moritz_: works.
moritz_: displays content. words can be read. code can be seen. 09:09
isBEKaml moritz_: once this is all done, you can add the TPF message or licence notices at the bottom. I have left it off for the end, with a temporary place holder in green at the bottom. :) 09:12
09:12 JimmyZ left
moritz_ isBEKaml: can I put HTML into that message? 09:14
09:14 skangas joined
isBEKaml moritz_: I think not. You can add the message in style.css. body:after 09:14
09:18 skangas left
moritz_ isBEKaml++ 09:19
pugssvn r30657 | moritz++ | [u4x] license notice
r30658 | moritz++ | [u4x] rename scripts/ to web/
isBEKaml moritz_: This is only the first cut. we still have some way to go. :) 09:23
sorear It turns out that writing a good pretty printer for VAST is Harder Than It Sounds.
mberends heh 09:26
moritz_ mberends++ # nice blog post about Rakudo performance measuring 09:28
sorear is planet dead?
it thinks there's been nothing new in 5 days
isBEKaml moritz_: have you found out a way out of =begin|end tags in p6 pods? 09:34
09:34 iblechbot left
sorear abbreviated blocks? 09:35
moritz_ isBEKaml: wanted to wait for feedback from masak++ before I remove them 09:36
sorear: maybe just no new blog entry - that happens
sorear moritz_: where is mberends' blog and why isn't it on the planet?
moritz_ blogs.perl.org/users/martin_berends...mance.html 09:38
isBEKaml moritz_: ok. Fixing up a minor typo and removing unnecessary style then.
pugssvn r30659 | svatsan++ | Fixed minor typo and clean up style 09:39
moritz_ mberends: I think you should divide the tags on your post with a comma
mberends: otherwise movable type thinks it's one tag 'perl6 rakudo' 09:40
mberends will do, thanks moritz_ 09:43
.oO( also got some ideas about how to add some aggregate stats to the bottom the JSON layout )
09:45
09:45 xinming joined
moritz_ sorear: it seems that blogs.perl.org doesn't offer a feed by tag, so it's not easy for planetsix to import all 'perl6' tagged posts 09:46
09:53 k23z__ left 10:15 mikehh joined
pugssvn r30660 | sorear++ | Draft of a concise printer for VAST. The code is awful and it has memory 10:22
r30660 | issues on large inputs, but it works and the output *is* about 50% shorter.
r30660 | It could be improved a good amount with feedback on what AST attributes are
r30660 | actually unneccessary.
moritz_ sorear, isBEKaml: it would be nice if you started commit messages to the pugs repo with a short [foo] marker so that people know what subsystem you're committing to 10:23
sorear ok 10:24
moritz_ in that case [viv] or so
isBEKaml ok
10:30 lest_away is now known as lestrrat
sorear after 10 minutes and 900 MB (but very good cache behavior - average CPU was 80%), ./viv -c STD.pm6 finished 10:33
producing 600,000 lines of output
sorear sees how to turn it into a streaming algorithm, which will help, but isn't important 10:34
the only reason you'd feed STD.pm6 into viv, other than stress testing, is to convert it into some machine-usable format 10:35
moritz_: who runs the perl6.org webserver? 10:36
sjohnson sorear: i think Su-Shee does
10:41 pmurias joined 10:54 JimmyZ joined
moritz_ 10:58
sorear: anything you want to put up on perl6.org? 11:01
11:07 kaare joined, kaare is now known as Guest90810 11:14 Guest90810 left, yahooooo left 11:15 yahooooo joined 11:17 iblechbot joined 11:18 Nathariel joined
Su-Shee sjohnson: no, I don't. 11:25
11:34 wknight8111 joined 11:35 uniejo joined
colomon what can we do with enums at the moment? 11:36
colomon is looking at the enum Order and wondering... 11:37
11:37 uniejo left
colomon enum Order (Increase => -1, Same => 0, Decrease => 1); say +Order::Increase 11:43
rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); say +Order::Increase
p6eval rakudo 92508d: OUTPUT«Can not find sub Order::Increase␤current instr.: 'perl6;Perl6Exception;throw' pc 15350 (src/builtins/Associative.pir:46)␤»
colomon rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); say +Order::Increase
p6eval rakudo 92508d: OUTPUT«Can not find sub Order::Increase␤current instr.: 'perl6;Perl6Exception;throw' pc 15350 (src/builtins/Associative.pir:46)␤»
colomon rakudo: enum Order (Increase => -1, Same => 0, Decrease => 1); enum Order (Increase => -1, Same => 0, Decrease => 1); say +Order::Increase
p6eval rakudo 92508d: OUTPUT«Contextual $*PKGDECL not found␤current instr.: 'perl6;Perl6;Grammar;add_my_name' pc 42458 (src/gen/perl6-grammar.pir:131)␤»
colomon is very confused. 11:44
locally, I get an error the first time I try that in the REPL, then it works....
and if I put it in Cool-str.pm, I get "Could not find sub !YOU_ARE_HERE" 11:48
moritz_ rakudo: enum A <b c d>; say c; say A::c
p6eval rakudo 92508d: OUTPUT«1␤Can not find sub A::c␤current instr.: 'perl6;Perl6Exception;throw' pc 15350 (src/builtins/Associative.pir:46)␤»
moritz_ the fully quallified form is NYI in rakudo
colomon fully qualified? 11:49
moritz_ A::c vs. just c
colomon > enum Order (Increase => -1, Same => 0, Decrease => 1); say +Order::Increase
-1
that's local, with stock Rakudo.
and let me emphasize that I get the YOU_ARE_HERE error just defining Order, I took away all uses of it and it still happens. 11:50
sjohnson Su-Shee: oops :[ 11:51
colomon actually, here's a fresh full REPL run:
> enum Order (Increase => -1, Same => 0, Decrease => 1); say +Order::Increase
Can not find sub Order::Increase
> enum Order (Increase => -1, Same => 0, Decrease => 1); say +Order::Increase
-1
notice the two input lines are exactly the same.
afk # must make pancakes for wife
moritz_ you don't even need to define the enum the second time 11:52
11:54 k23z__ joined, k23z__ left 11:55 k23z__ joined 12:03 jhuni left 12:06 JimmyZ left 12:08 am0c left
colomon moritz_++ # good call on defining. 12:12
moritz_ I CAN HAZ A PATCH 12:13
I'm just not sure if it's a good one
lisppaste3 moritz_ pasted "Enum patch for colomon++" at paste.lisp.org/display/99301 12:18
moritz_ colomon: please try if this makes any difference for you defining an enum in the setting
you can apply it with git am $filename
12:21 kel_ left 12:22 [mark] left
colomon back now 12:26
moritz_ it's kind of a shot in the dark, no idea if it's the right thing to do 12:33
12:35 Nathariel left
colomon > enum Order (Increase => -1, Same => 0, Decrease => 1); say +Order::Increase 12:42
-1
seems to work from REPL, which I'm guessing you already knew.
moritz_ yes 12:43
colomon (sorry, got distracted trying to figure out how to record a Newfoundland radio show tonight. Radioshift++)
moritz_ no problem
colomon still get the Could not find sub !YOU_ARE_HERE error when I add the enum to the setting. 12:44
maybe it should be "our"?
moritz_ it's "our" by default
colomon I'm thinking we should push you patch anyway, if it passes spectest -- it definitely seems to be an improvement.
"our" does not help. 12:45
any other notions?
moritz_ takes a hard look at the enum code 12:49
colomon my $result := (pir::find_sub_not_null__ps('!YOU_ARE_HERE'))($compiled);
seems likely to be the line generating the error.
moritz_ where is sub !YOU_ARE_HERE defined?
not... in the setting maybe? 12:50
colomon YOU_ARE_HERE.pm
moritz_ no wonder it can't be found
colomon it's at the very end of core, isn't it?
moritz_ right
and the problem is ...
if I understand correctly, that line executes the enum body in the context of the setting 12:51
so
by definition, an enum in the setting isn't going to work
possible solution: do an ordinarly lookup of !YOU_ARE_HERE 12:52
if it succeeds, we're in "ordinary" compilation phase
if not, we're in the setting, and need to not use YOU_ARE_HERE 12:53
colomon sounds reasonable, I guess.
I'm fuzzy on why YOU_ARE_HERE is involved at all in the first place.
moritz_ iiuc, it's the sub that executes code in the context of the setting 12:54
colomon so the point (here) is to execute $compiled in the context of the setting? 12:55
and if we're in the setting, we want to execute it in the context of.... ? 12:56
moritz_ of the stage0 compiler
ie just run it 12:57
12:57 xomas_ left, ruoso left
moritz_ and don't have any access to the rest of the setting 12:57
colomon do you have an idea how to code that? 12:58
moritz_ I'm trying, but I'm getting "rtype not set" errors 12:59
colomon can you paste your code?
moritz_ just a sec...
colomon: nopaste.snit.ch/20569 13:00
ah 13:01
moritz_ stupid
I should actually use a named enum
colomon ?
moritz_ +my %h = enum (Increase => -1, Same => 0, Decrease => 1); 13:02
that's an anonymous enum
colomon which is a different section of code, yes?
moritz_ yes
Actions.pm around line 1364, if $<name> { ... }
need to make lunch now, will try to get back hacking after that 13:03
13:11 orafu left, orafu joined 13:22 TiMBuS left 13:28 XaeroOne left 13:34 XaeroOne joined 13:37 snarkyboojum left
moritz_ rakudo: Q:PIR { get_hll_global('YOU_ARE_HERE') } 13:42
p6eval rakudo 92508d: OUTPUT«The opcode 'get_hll_global' (get_hll_global<0>) was not found. Check the type and number of the arguments␤current instr.: 'perl6;PCT;HLLCompiler;evalpmc' pc 987 (compilers/pct/src/PCT/HLLCompiler.pir:542)␤»
moritz_ rakudo: my $s = Q:PIR { %r = get_hll_global 'YOU_ARE_HERE' }; $s({ say "OH HAI" }) 13:43
p6eval rakudo 92508d: OUTPUT«Null PMC access in can()␤current instr.: '&infix:<=>' pc 17523 (src/builtins/Junction.pir:205)␤»
moritz_ rakudo: my $s = Q:PIR { %r = get_hll_global '!YOU_ARE_HERE' }; $s({ say "OH HAI" })
p6eval rakudo 92508d: OUTPUT«Method 'set_outer' not found for invocant of class 'Block'␤current instr.: '!YOU_ARE_HERE' pc 378031 (src/gen/core.pir:29492)␤»
moritz_ rakudo: my $s = Q:PIR { %r = get_hll_global '!YOU_ARE_HERE' }; say "alive"; $s({ say "OH HAI" })
p6eval rakudo 92508d: OUTPUT«alive␤Method 'set_outer' not found for invocant of class 'Block'␤current instr.: '!YOU_ARE_HERE' pc 378031 (src/gen/core.pir:29492)␤»
13:44 snarkyboojum joined
colomon moritz_: how can __p work as pir? 13:44
rtype is return type, maybe?
moritz_ I think "rtype not set" means I've tried to bind/assign to somthing that's not an rvalue 13:45
erm
not an lvalue
or something
no
colomon isnull__p takes what and returns what? 13:46
moritz_ oh
shouldbe just isnull() 13:47
and find_sub seems to wrong
I'm using get_hll_global now
13:48 pmurias left
slavik I figured out reflection in java ... 13:48
moritz_ colomon: we're in for trouble... 13:51
colomon: I've kinda made my patch work... except that prefix:<-> and Pair.value are defined in the setting 13:52
colomon: so there's no way to execute the enum outside the context of the setting :( 13:53
pugssvn r30661 | svatsan++ | [u4x] Added more styles towards u4x.perl6.org
colomon oh, noes.
moritz_ well 13:54
we could work around that
with getattribute
colomon afk for a few, but keep typing, I'll be back soon... 13:55
isBEKaml hi slavik 13:56
14:02 pmurias joined, rv2733 joined
snarkyboojum how do you do a negated character class in Perl 6? 14:05
colomon moritz_: did you mean prefix:<~> and Pair.key? 14:06
or am I not seeing somewhere the code is being used?
(or is that => -1 that is the problem?-
)
snarkyboojum something like <-[blah]> ? 14:07
colomon yes 14:08
(he says after a quick spec search...)
snarkyboojum colomon: thanks - maybe my eyes are too blurry, but I couldn't find it clearly in the spec :| 14:09
colomon "A leading - indicates a complemented character class"
example is <-[a..z_]>
snarkyboojum colomon: doh, and then the tests show the way :) cheers. 14:10
colomon you had it right in the first place, you just didn't know you did.... :)
snarkyboojum colomon: must be something else I'm doing then :)
slavik hi isBEKaml 14:11
perl's reflection > java's reflection 14:12
isBEKaml slavik: don't know. never tried perl's reflection, perl6' is more intuitive imo :) 14:13
slavik haven't tried that :P what does it look like?
in Perl, they are just hashes ;)
isBEKaml slavik: object.WHAT, .HOW, .WHERE and so on.. :)
slavik: oh, you're referring to dispatch tables?? I never thought of them as reflection, specifically. 14:14
slavik aren't they part of reflection? as in: load this thing, find out what methods it has, call one of them.
isBEKaml slavik: that's the .HOW 14:15
slavik: if my reading of the spec is right, (S02?), it says that every class has a way of returning a metaclass instance that gives information about the class. 14:17
rakudo: say Str.HOW.methods(Str);
p6eval rakudo 92508d:
..OUTPUT«IntpredlBoolsuccNumWHICHperlsStrACCEPTSdefroundsqrtasinsplitcoshexpmatchacoshwordssigncotanatan2lcfirstseccislogsamecasesprintfcapitalizesinflipp5choplcsubstacosechacotanabschompindexceilingcotanhunpolarcombtrim-trailingatanordacosevalchoptanhatanhcoseccharsrootsucucfirsttansubstrl…
slavik ooh, nice 14:18
isBEKaml slavik: Still, p5's got it a lot simpler than java and p6 just made it more intuitive. 14:19
slavik I def agree :) 14:20
snarkyboojum or you can do a shortcut 14:23
rakudo: say Str.^methods 14:24
p6eval rakudo 92508d:
..OUTPUT«StrACCEPTSdefpredIntlBoolsuccNumsWHICHperlrootsucfirstsamecasetanlog10coscapitalizebytesfmtflipp5choplcasinhNumericacotanchrcotanhacotanhcombfloorasechatanacosroundevalchoptanhsplitexpmatchacoshwordscotanatan2lcfirstucseccislogsubstrsprintfsinacosecsubstsinhcosechacosechabschompind…
isBEKaml snarkyboojum++
I didn't know that...
snarkyboojum read it in one of jnthn++'s blog posts 14:25
isBEKaml link?
snarkyboojum rakudo: say Str.^methods(:local)
p6eval rakudo 92508d: OUTPUT«WHICHperlsStrACCEPTSdefpredIntlBoolsuccNum␤»
snarkyboojum isBEKaml: will try and find it 14:26
moritz_ use.perl.org/~JonathanWorthington/journal/ somewhere there 14:27
snarkyboojum isBEKaml: use.perl.org/~JonathanWorthington/journal/39455 14:28
14:28 rgrau joined
isBEKaml snarkyboojum: danke! :) 14:28
moritz_ colomon: noway - enums are of type EnumMap, and that's defined in the setting 14:29
snarkyboojum isBEKaml: welcome!
colomon bother
seems like a major issue there....
moritz_ colomon: so... either rewrite EnumMap in PIR
or we need a two-stage setting
or something entirely more clever 14:30
rewriting EnumMap in PIR doesn't look that hard
either way, I'd like to talk to pmichaud|jnthn first 14:32
dalek kudo: 32150d5 | (Martin Berends)++ | src/Perl6/Module/Loader.pm:
[Perl6/Module/Loader.pm] when a 'use' or 'need' cannot find a module, just say
14:33
14:33 JimmyZ joined
lisppaste3 moritz_ pasted "enums in the setting - I got so far only" at paste.lisp.org/display/99307 14:34
moritz_ colomon: current state as a patch
pmichaud good morning, #perl6 14:35
moritz_ good morning pmichaud
mberends hello pmichaud 14:36
14:36 kfo_ joined 14:39 kfo left, kfo_ is now known as kfo
sorear hello pmichaud 14:41
moritz_: Properly syntax-highlighted versions of STD.pm6 and the spectests
moritz_ sorear: so, what do you need? an account on the box? 14:42
sorear moritz_: Not sure. I was thinking I could, maybe, get away with power of suggestion + fixing the syntax highlighter 14:43
moritz_ sorear: I prefer actions to suggestions :-)
I'm running far too much for the Perl 6 infrastructure alone, and would welcome anybody to take up responsibility for some corners 14:44
sorear well, then, sure, an account on the box would be a fine solution. what other responsibilities on the box do you need releived? 14:46
moritz_ install a security update now and then (Debian) 14:47
add a virtual host when somebody needs it
sorear: welcome to feather2; most web stuff runs under my user account currently, so feel free to do sudo su - moritz 14:51
sorear: I plan to migrate each web presence to a separate UNIX user though
so one for perl6.org, one for proto.perl6.org etc. 14:52
14:53 pmurias left 14:55 plobsing joined
sorear I don't know why, but there's something very pleasing about having ps -e fit on one screen 14:56
colomon moritz_: sorry to disappear on you there, was watching a video with my boy, and didn't have the second screen hooked up to the laptop. 14:58
sorear woah, only 1.2GB used?
moritz_: do you have any tips for setting up small system images?
colomon moritz_: do you think that patch is worthwhile, or a dead end?
sorear the FreeBSD 7 image I'm using for portability testing is a manual "minimum full development system" and it's >4G
moritz_ colomon: that depends on the way forward... converting EnumMap to PIR *might* be a viable option
sorear: something like grml? or DamnSmallLinux? 14:59
sorear: but I don't really know... I avoid sysadmin tasks if possible :-)
15:00 masonkramer left, masonkramer joined 15:07 rgrau left 15:09 justatheory joined 15:13 justatheory left, XaeroOne left
sorear pmichaud: any updates on topic/lexical-persistence-2? 15:13
pmichaud sorear: still catching up on other backlogged items, sorry 15:14
sorear no problem
pmichaud I have another task you could potentially work on, since you're a bit familiar with HLL::Compiler now... :-)
15:14 rgrau joined
pmichaud I'd really like to see --target=pbc work. 15:15
according to jnthn++, all we really have to do is print the resulting Eval PMC object to a file. 15:18
the only "tricky" part is getting 'pbc' into the targets list properly
(and it's not really that tricky)
sorear I think I could pull that off
It would involve making stages something more than a simple list
more of a DAG
pmichaud well, it's often been my intention that stages should be a dag 15:19
just never got around to it
sorear actually, a tree - a stage can't have >1 predeccessor
pmichaud oh, I suspect it could
15:20 iblechbot left
pmichaud but I'm not necessarily asking for a long solution in this case, I'd be willing to live with a shortcut :-) 15:20
we could do it with the existing linear stage by just adding a 'pbc' stage and having it do nothing if target != 'pbc'
there's also a fair bit of leeway for changes here -- the PCT staging mechanism is already deprecated in Parrot so that we can change it as needed 15:21
(indeed, I deprecated it precisely because I wanted to do something a bit different)
sorear I'll have to fix my code that relies on it then 15:22
pmichaud anyway, we could simplify a lot of build scripts if --target=pbc were added somehow
and that's a project I'm not likely to get to anytime soon, myself
moritz_ pmichaud: how are context sensitive PAST nodes coming? 15:25
sorear pmichaud: Why does PCT::HLLCompiler bail in a test harness? 15:26
Also, it doesn't work. prove -e parrot-nqp works fie.
cognominal hi, what is environmenet variable specifying where to search PBCs in parrot? 15:27
sorear LD_LIBRARY_PATH
erm
probably not
cognominal will try it 15:28
pmichaud sorear: I don't understand "bail in a test harness"
cognominal: I'm not sure that there is an environment variable for searching PBCs. 15:29
there is an option to parrot for it, however.
sorear pmichaud: PCT/HLLCompilir.pir +806
cognominal that's ok
pmichaud moritz_: I'm just blocking on time -- few things going on around the house. I also have to figure out what to call the nodes. PAST::???
moritz_ ContextCond? 15:30
pmichaud sorear: oh, *that* 15:31
dalek p-rx: 4e9b9f4 | pmichaud++ | build/gen_setting.pl:
Add "#! nqp" marker and generation note to beginning of nqp-setting.nqp .
p-rx: e76a952 | pmichaud++ | build/Makefile.in:
Rename nqp-setting.pm to nqp-setting.nqp .
p-rx: 3397f77 | pmichaud++ | src/stage0/ (4 files):
Update bootstrap.
p-rx: 44e68e4 | pmichaud++ | (2 files):
More cleaning up for nqp-setting.pm -> nqp-setting.nqp .
p-rx: 136d1b6 | pmichaud++ | src/stage0/ (3 files):
Update bootstrap.
pugssvn r30662 | svatsan++ | [u4x docs] Clean up [code] style and remove new line trouble in glossary
pmichaud earlier versions of p5's Test::Harness (i.e., 2.64) have this nasty habit of always passing a command line option to the underlying program to set @INC 15:32
15:32 japhb left
isBEKaml moritz_: I have added necessary styles. Please try that out and let me know if you need more. I'm open to suggestions. :) 15:32
pmichaud and, of course, the hll programs have no clue what to do with that option
(because these other languages don't have an @INC) 15:33
so, we put in the workaround to always ignore that option for now.
I can update the note to indicate that it's 2.64 and earlier that gives the problem
moritz_ isBEKaml: looks nice, thanks 15:36
pmichaud oh, I remember now. 15:37
Test::Harness wanted to know the underlying interpreter's idea of @INC, so it would run the interpreter once asking for @INC before it actually ran the test script. 15:38
that works if your underlying interpreter is Perl 5, but fails miserably otherwise
15:44 JimmyZ left
pmichaud moritz_: I plan to add the context-sensitive past nodes today sometime. Have some errands to run over the next 2-3 hours, but the remainder of the day after that is open for hacking (afaik) 15:44
moritz_ pmichaud: great. If tehre's anything I can do to help you, feel free to ask 15:45
15:46 snarkyboojum left
moritz_ (except when it's writing English that's free of spelling errors :-) 15:46
pmichaud moritz_: there are days when I could really use some help with that aslo. 15:47
moritz_ :-) 15:48
15:50 agentzh joined
sorear 3.02: - Made @INC propagation more compatible with 2.64. Was breaking Parrot's test suite. 15:50
15:52 snarkyboojum joined 15:54 patrickas joined 16:00 japhb joined
sorear # Avoid using -l for the benefit of Perl 6 16:01
16:03 xomas_ joined 16:05 snarkyboojum left
sorear it seems as though 'modern' versions of Test::Harness don't run the program named in -e to get @INC 16:06
I'm currently trying to quantify 'modern'
16:10 am0c joined 16:13 agentzh left
moritz_ rakudo: say 2 !eq 2 16:17
p6eval rakudo 32150d: OUTPUT«0␤»
pmichaud sorear: yes, but there are a few distributions out there that still come bundled with 2.64.
Ubuntu 9.10, for example, comes with 2.64.
So, I suspect it'll be a while before we can avoid the need for the workaround. 16:18
afk for a while, errands
isBEKaml moritz_: I'm bad with imaging. So didn't add images into the web pages. Plus, you could still turn this fledgling stuff into this week's task. Consolidate the converted pages into a single page for navigation. Bonus points using perl. :) 16:21
moritz_: I'm thinking of templating. How hard is it in perl?
moritz_ isBEKaml: not hard at all
isBEKaml: search.cpan.org/~samtregar/HTML-Tem...emplate.pm that's what I've used for proto.perl6.org 16:22
isBEKaml moritz_: wow, nice. I don't know how, the first thing that came to mind was TT. Was that for the web? 16:23
moritz_ TT is an alternative
but IMHO we don't need a Turing complete templating language for something that simple
isBEKaml moritz_: hmm, I could learn about HTML::Template and try it out locally. :) 16:26
moritz_ rakudo: say 'aa' leg 'a' 16:33
p6eval rakudo 32150d: OUTPUT«1␤»
moritz_ rakudo: say 'a' lt 'aa'
p6eval rakudo 32150d: OUTPUT«1␤»
slavik leg? 16:43
moritz_ less-than, equal, greater
slavik <=> ???
moritz_ yes 16:44
but for strings
slavik why not cmp?
moritz_ because cmp is now a more generic comparison
slavik oh, I see
sorear moritz_: how do you spell the generic boolean relationals?
moritz_ which relationals? 16:45
dalek ok: f9eeb51 | moritz++ | src/operators.pod:
[ops] string comparison
patrickas std:'test'.match(/(\W & <-[\.]>)/); 16:53
moritz_ std: 'test'.match(/(\W & <-[\.]>)/);
p6eval std 30662: OUTPUT«ok 00:01 115m␤»
patrickas thanks :-) 16:55
rakudo: 'test'.match(/(\W & <-[\.]>)/);
p6eval rakudo 32150d: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1696 (ext/nqp-rx/src/stage0/Regex-s0.pir:932)␤»
moritz_ rakudo: / a & b/
p6eval rakudo 32150d: OUTPUT«Confused at line 11, near "/ a & b/"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
patrickas rakudo: / a \& b/ 16:57
p6eval rakudo 32150d: ( no output )
isBEKaml what does the <-[\. ]> mean? not all these characters between [ ] ?
moritz_ "any character except the dot"
isBEKaml and the space.
[^\. ] ? 16:58
moritz_ I don't think whitespace is significant in character classes
patrickas actually this is taken straight from github.com/carlins/http-client/blob.../Client.pm
moritz_ neither is the dot, so no reason to escape it
isBEKaml aren't all characters in square brackets taken literally? we don't need to escape regex spl characters right?
moritz_ isBEKaml: unless you want to put a ] into a char class... 16:59
patrickas I could not get the module it to work using rakudo so I wated to mae sure if it was a rakudo bug or a HTTP::Client bug
moritz_ alpha: / a & b /
p6eval alpha 30e0ed: ( no output )
moritz_ wonders if alpha actually implemented it
patrickas that was a messed up sentence I typed! 17:00
moritz_ alpha: for <a b 0> { say $_, ?($_ ~~ /a & \w/) }
p6eval alpha 30e0ed: OUTPUT«a1␤b0␤00␤»
moritz_ seems it did
pmichaud the characters -, ], and whitespace have to be escaped
moritz_ and - just for catching Perl 5 errors, right?
pmichaud correct.
isBEKaml - ? range operator?
A-Za-z
pmichaud the range operator is .. 17:01
moritz_ notaynmore range operator
pmichaud A..Za..z 17:02
of course, you really want to be using <?alpha> :-P
isBEKaml if that's not the case, i'd go with POSIXy :alpha: 17:03
pmichaud that doesn't exist in p6
more to the point, the way to write :alpha: is <alpha> :-P
oh, and backslash has to be escaped :-) 17:04
isBEKaml So, p6 isn't POSIX compliant. :P
moritz_ if you want POSIX, use C :-) 17:05
isBEKaml I don't use C a lot these days. Still many languages are stuck in a PCRE limbo. :)
arnsholt IIRC <alpha> is anything defined by Unicode as an alpha
Which I'd argue is the correct semantics =) 17:06
sorear isBEKaml: perl 6 regexes are a complete redesign, they have no compatibility whatsoever with POSIX regexes 17:07
though, perl 6 will probably support rx:POSIX// at some point
by analogy with rx:P5//
isBEKaml sorear: I got that. I was referring to other languages stuck with PCRE regex implementations while P6 is pushing the envelope without looking to maintain status quo. :) 17:08
Really, you want to be starting afresh... 17:09
pmichaud okay, really afk now 17:10
isBEKaml Does this still work? [^{list of characters to avoid}] ?
sorear no 17:11
you want <-[aeiou]>
isBEKaml rakudo: for <1 b 0 -> { say "$_ +" ~ ?($_ ~~ /<alpha>/) } 17:13
p6eval rakudo 32150d: OUTPUT«1 +0␤b +1␤0 +0␤- +0␤»
17:14 slavik left
isBEKaml hm, not bad.. 17:14
we don't need to mark special character cases for unicode classes, right?
Doesn't seem to be needed, I guess. Case in point: \s matches even unicode white space character. 17:16
rakudo: for <1 b 0 -> { say "$_ +" ~ ?($_ ~~ /<-[<alpha>]>/) } 17:18
p6eval rakudo 32150d: OUTPUT«1 +1␤b +1␤0 +1␤- +1␤»
17:22 justatheory joined
sorear TimToady: [viv] Why did you choose to make the default emit_p5 behavior for leaf nodes unaltered passthrough instead of carping? 17:26
17:26 slavik joined 17:28 envi^home left
pugssvn r30663 | sorear++ | [viv] package_def needs to strip adverbs 17:32
isBEKaml gonna hit the bed. have a good one, #perl6! 17:33
17:34 isBEKaml left, iblechbot joined 17:38 _buno_ joined 17:39 pmurias joined 17:55 k23z__ left
pugssvn r30664 | sorear++ | [viv] Handle nested packages, packages with curlies 18:18
sorear TimToady: Why does gimme5 use YAML? 18:30
.u 23cf 18:31
phenny U+23CF EJECT SYMBOL (⏏)
18:34 Jedai joined
pmurias sorear: what should it use instead of YAML? 18:37
sorear pmurias: that's not the question 18:39
why is gimme5 sending data structures *at all*
18:41 [circuitbreaker] joined
pmurias it uses the data structure for LTM 18:41
sorear how?
pmurias it keeps the AST of the rule so that it can calculate the lexers 18:42
18:42 circuitbreaker left
pmurias my knowledge how it does that is outdated and incomplete so i would have to look at the source again to tell you more 18:42
sorear: the stuff in lex/ is generated at run time 18:47
sorear How does the stash concept work? It seems as though even lexpads are stashes. 18:52
pmurias STD seems to use for looking up variable/function/... names 18:55
s/use/use them/
and both lex pads and packages store them 18:56
19:01 wknight8111 left 19:11 pmurias left
sorear what's xact? 19:15
moritz_ "exact"? 19:26
dalek kudo: 87e0e1b | moritz++ | src/Perl6/Actions.pm:
enable calling a fully qualified enum key
19:30
19:46 rv2733 left 19:59 mberends left
Su-Shee in terms of programming language design - what are "true iterators"? 20:05
20:14 mikehh left
patrickas rakudo: say (map { .WHAT } , ("foo"=> "bar" , "bas"=>"qux" )); 20:14
p6eval rakudo 32150d: OUTPUT«Pair()Pair()␤»
patrickas rakudo: say (map { .WHAT } , {"foo"=> "bar" , "bas"=>"qux" });
p6eval rakudo 32150d: OUTPUT«Hash()␤»
patrickas is that by design ? or is it a bug ? 20:15
20:15 g00s joined
patrickas rakudo: my %h = ("foo"=> "bar" , "bas"=>"qux" );say (map { .WHAT } , %h); 20:17
p6eval rakudo 32150d: OUTPUT«Hash()␤»
20:18 Heame joined 20:19 Heame left
sorear pmichaud: TimToady: diakopter: If type constraints in Perl6-subsets are just constraints, not coercions, then how does Callable[:(Int, Int --> Int)] avoid Rice? 20:31
lue Saluton! 20:33
Just wondering: how's it going on importing libraries from other languages? 20:34
sorear mildew and rakudo support is 20:38
20:48 g00s left 20:49 molaf joined, _buno_ left 20:52 molaf left 21:02 quietfanatic joined
jnthn sorear: Rioe? 21:11
*Rice?
patrickas i understand "slurp" is now a built in in perl6, is the opposite also built in? 21:16
jnthn patrickas: I don't think so. 21:18
.oO( is the opposite going to be called "spit"? )
bkeeler spew
patrickas jnthn: thnx, i usually use spew
bkeeler which I saw was added to nqp as a builtin
jnthn lol
That's...disgusting, but so is spit. 21:19
mathw "Eeeww".spew($filehandle); 21:20
patrickas filehandle or filename ? 21:21
Su-Shee well throwing errors isn't really much more pleasant ;)
mathw patrickas: well you could do either of course :)
but you probably shouldn't
Su-Shee: yes maybe we should replace 'die' with 'puke'
21:21 masak joined
masak loliminmoscow! 21:21
phenny masak: 15 May 10:06Z <moritz_> ask masak if there's any tool that used the =begin glossary marker in docs/u4x/documentation - if not I'd like to remove it, because then it happens to be valid perl 5 POD, and easier for me to process :-)
masak moritz_: no, no tool. feel free. 21:22
Su-Shee finally a real do what I mean and say what I really think language!
patrickas mathw: the whole point is not to bother opeining files and working with filehandles for quick one lineers
bkeeler Heyas comrade masak!
masak bkeeler: privet.
jnthn masak!! 21:24
masak jnthn!!1
jnthn masak: Did any bushes greet you in Moscow yet?
bkeeler privet bushes in particular? 21:25
jnthn Those are privet hedges.
;-)
masak: How is it?
bkeeler Never throw the letter "Q" into a privet bush
masak I'm still thinking about those privet bushes...
;)
jnthn :-) 21:26
masak it's good. the subway was quite OK. the room could fit five of me.
jnthn Ain't the subway stations majestic? :-)
masak I mean, it could sleep five of me. comfortably.
(it's big)
jnthn Wow.
That's a nice thing.
jnthn also had a quite big one too 21:27
masak as journeys go, the trip here was uneventful.
but they made sure to scrub me hard at the passport control.
jnthn ? 21:28
masak well,
first I was in this line to the actual passport control.
jnthn Odd, they just look at me boredly, stamp my visa and I'm done. :-/
masak that took an hour. quite a bottleneck, that passport control.
jnthn Ouch. :-(
Depends how many other flights are coming in at the same time I guess.
masak and when I finally got to the counter, it turned out I was missing a form.
patrickas since the channel is alive again I will re ask my earlier question :-)
rakudo: my %h = ("foo"=> "bar" , "bas"=>"qux" );say (map { .WHAT } , %h); 21:29
jnthn masak: Oh?
p6eval rakudo 87e0e1: OUTPUT«Hash()␤»
jnthn masak: Ouch...they didn't give them out on the plane?
masak jnthn: yah, a "migration form". they didn't give me one.
patrickas is that expected ? or should there be two Pairs() ?
jnthn masak: Oh :-(
masak that would have been a good idea, though.
jnthn masak: Well, yeah, every time I've flown they have done that. :-|
jnthn is a tad mystified that they didn't. :-(
pmichaud hello, all 21:30
masak so I had to fill it out, and get in line again.
bkeeler Heyas pmichaud
jnthn That sucks.
masak hi, pmichaud
jnthn hi pmichaud!
masak and then I got scowled at, in Russian, for not filling in the form properly ;)
jnthn ...grr.
masak oh well.
jnthn Russian scowls are quite unique, huh. :-)
masak I'm here now. \o/
jnthn \o/
Did you have any борщ yet? :-)
masak no, but good idea for tomorrow. 21:31
jnthn figures that's more likely than водка
masak da.
today, the cafes had closed when I got to the hotel.
jnthn :-(
You find something to nom on anyways?
masak so I'm currently eating some funny spongy thing and drinking yoghurt :)
jnthn :-) 21:32
jnthn recommends finding some proper борщ tomorrow. With сметана. :-)
masak mmmm. 21:33
I will.
jnthn Indeed. :-)
pmichaud patrickas: it's a bug in rakudo at the moment -- hashes don't flatten properly in list context
bkeeler Try some птичье молоко
pmichaud at least, I *think* that's the case.
21:34 Su-Shee left
masak bkeeler: pigeon milk? 21:34
jnthn bkeeler: wtf?
:-)
jnthn googles...
bkeeler en.wikipedia.org/wiki/Ptasie_mleczko
jnthn oh
patrickas pmichaud: thanks. I am finding many rough edges trying my first perl6 program so expect lots of noob questions
jnthn Yes, that looks rather more appertizing than...pigeon. 21:35
Literal translation FTF.
bkeeler hehe
quietfanatic Hm. Now that 'undef' is gone, how do I smartmatch undefined things? 21:36
jnthn Nice etymology too!
Cute. :-)
quietfanatic $val ~~ Mu matches everything
pmichaud quietfanatic: $val ~~ .notdef # iirc
lue olol masak! [compiling blender, not paying attention]
21:36 rgrau left
quietfanatic That's defined things though, not undefined things... 21:36
pmichaud I don't understand the question, then. 21:37
quietfanatic Hm.
masak today's aphorism: 'Если смотреть трезво на вещи, то невольно хочется выпить.'
quietfanatic Wait no it isn't
just a sec
masak 'Looking at things soberly, one cannot help wanting to drink.'
no, .notdef went away.
quietfanatic rakudo: say (3 ~~ .notdef)
p6eval rakudo 87e0e1: OUTPUT«1␤»
quietfanatic rakudo: say (Int ~~ .notdef)
p6eval rakudo 87e0e1: OUTPUT«1␤»
quietfanatic seems to always return true. 21:38
masak but Rakudo still implements it :)
quietfanatic rakudo: say (.notdef)
p6eval rakudo 87e0e1: OUTPUT«1␤»
pmichaud what took .notdef's place, if anything?
quietfanatic Yeah, I don't think $x ~~ .method_call works that way, does it?
It's call the method on $_
*It'd
jnthn masak: I likes that one. :-)
masak pmichaud: um. don't recall.
pmichaud at one point, ~~ .methodcall would invoke the method on the left argument
masak jnthn: thought you might :)
21:39 Sarten-X joined
pmichaud I don't know if that's still true -- apparently some things have changed recently. 21:39
masak it's still true.
quietfanatic Basically my question is, I used to have 'if $thing ~~ undef | /regex/'
jnthn pmichaud: It should do that.
masak but .notdef is gone from spec.
jnthn pmichaud: It did in alpha.
quietfanatic How do I do that now?
pmichaud Any .foo method truth ?X i.e. ?.foo
jnthn pmichaud: Didn't get the syntactic cases of smarthmatch added back yet though.
lue maybe if $thing ~~ Mu 21:40
pmichaud $thing is always Mu, though
quietfanatic Everything ~~ Mu
pmichaud that's a type check, not a definedness check
lue Ah.
pmichaud maybe $thing !~ .defined
jnthn !~~
Yeah
I think there's another way though
quietfanatic But then it doesn't junction with my regex.
jnthn that works out well in given/when cases
jnthn tries to remember
masak oh wait. seems .notdef is very much still in the spec. :/ 21:41
S32/Basics.
quietfanatic Any:U doesn't parse.
jnthn oh
Any !.defined undefined not .defined
(from S03)
std: "blah" ~~ !.defined
p6eval std 30664: OUTPUT«ok 00:01 115m␤»
pmichaud I'm not sure how to handle !.defined
jnthn rakudo: "blah" ~~ !.defined
p6eval rakudo 87e0e1: ( no output )
pmichaud we do that... syntactically?
jnthn ...I...have no idea.
quietfanatic How on earth does that work?
jnthn oh 21:42
pmichaud: It is in the syntactic section of S03.
The first section contains privileged syntax; if a match can be done
via one of those entries, it will be. These special syntaxes are
dispatched by their form rather than their type.
And it's in that first section.
So I guess it's...uglily syntactic.
pmichaud what about something like $x ~~ .foo * 2 21:43
quietfanatic But that requires special syntax. I'm guessing I can't do $x ~~ !.defined | /regex/ with that.
pmichaud is .foo referring to $x or to the outer $_ ?
because the rhs isn't .foo, it's (.foo * 2)
jnthn pmichaud: I suspect $_ then... :-/
pmichaud: Which is I guess why I find making !.foo work a bit ugly. 21:44
pmichaud I find it all a bit ugly, tbh
jnthn pmichaud: I can't see anything in S03 that calls out ~~ .foo * 2 being special.
pmichaud right
masak so... we have both .notdef and !.defined ...?
jnthn I wasn't a fan of .notdef, but I'm even less of a fan of this way.
pmichaud so it's kind of weird that !.foo would be special
quietfanatic rakudo: class Undefined { method ^ACCEPTS ($thing) {!$thing.defined} }; say 3 ~~ Undefined; say Int ~~ Undefined;
p6eval rakudo 87e0e1: OUTPUT«0␤0␤»
quietfanatic rakudo: class Undefined { method ACCEPTS ($thing) {!$thing.defined} }; say 3 ~~ Undefined.new; say Int ~~ Undefined.new; 21:45
p6eval rakudo 87e0e1: OUTPUT«0␤1␤»
pmichaud I mean, ~.foo and +.foo and ?.foo aren't special
quietfanatic There we go :D
jnthn pmichaud: Aye.
masak quietfanatic: !
pmichaud shuts his eyes and hopes the !.defined thing magically goes away
masak things have disappeared before at the blink of an eye :P 21:46
quietfanatic rakudo: class Undefined { method ACCEPTS ($thing) {!$thing.defined} }; say 3 ~~ Undefined.new | 3
p6eval rakudo 87e0e1: OUTPUT«1␤»
pmichaud either that, or that we decide that ~~ rebinds $_ for its rhs operand
diakopter rakudo: say !(.defined)
p6eval rakudo 87e0e1: OUTPUT«1␤»
pmichaud (whatever it may be)
quietfanatic rakudo: say 3 ~~ :!defined
p6eval rakudo 87e0e1: OUTPUT«0␤»
quietfanatic rakudo: say Int ~~ :!defined
p6eval rakudo 87e0e1: OUTPUT«1␤»
quietfanatic Found it.
jnthn oh, cute. 21:47
pmichaud i.e., thunkify the rhs operand
quietfanatic using :pair syntax, which transforms into a method call
jnthn :-)
quietfanatic++
pmichaud oh, I like that
quietfanatic I suppose it was intended for filetests. I.E. file ~~ :e
pmichaud I like that so much I want to get rid of .defined :-)
masak takes a shower
pmichaud and just use :defined instead
jnthn OK, with that in mind...let's kill kill kill !.defined
;-)
quietfanatic rakudo: say 3 ~~ :!defined | 3
p6eval rakudo 87e0e1: OUTPUT«1␤»
jnthn pmichaud: :defined desugars to a call to .defined, fwiw 21:48
masak huh. there's a tub. it's right there, next to the bidet. didn't notice it before. :)
jnthn masak: Wow. You *do* have a nice room. :-)
quietfanatic It's equivalent to -> {.defined == 1}
diakopter masak: LOL
quietfanatic or -> {.defined == 0} if you have a ! 21:49
pmichaud jnthn: oh.
so that's syntactic also?
jnthn pmichaud: Gah, I mis-spoke
pmichaud: No, it calls Pair.ACCEPTS
quietfanatic (I may be misusing that -> though)
pmichaud right
jnthn pmichaud: Which then in turn calls .defined
pmichaud right
oh
so it only worked for .defined
or no?
jnthn pmichaud: No, it works for any method
quietfanatic It works for anything
pmichaud right 21:50
so we could get rid of the icky .defined syntax and substitute pair syntax?
quietfanatic rakudo: 5 ~~ :say
p6eval rakudo 87e0e1: OUTPUT«5␤»
jnthn pmichaud: You mean, remove the smart-match syntactic special cases?
pmichaud not all of them, just that one
jnthn pmichaud: Or at least the .foo one?
Ah, OK
I think we could
I don't mind that one too much though
It's the !.defined that gives me the really uneasy feeling. 21:51
pmichaud because it really bugs me that $X ~~ .foo * 2 doesn't do the same as given $X { when .foo * 2 { true }; false }
jnthn Oh, ouch.
You're right.
pmichaud I don't like that $_ gets treated specially for only the case of the rhs being a lone method call
jnthn starts to be won over to pmichaud++'s POV. 21:52
quietfanatic I agree, this special syntax is quite unnecessary.
pmichaud or, alternatively, I'd like to somehow make it clear that the lhs is bound to $_ for the whole expression 21:53
quietfanatic I'd prefer infix:<~~> stay more like an operator rather than a statement control. 21:54
diakopter rakudo: 5 .~~ say
p6eval rakudo 87e0e1: OUTPUT«Confused at line 11, near "5 .~~ say"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
pmichaud well, ~~ by definition is "special", at least traditionally
that's what the "smart" part of "smart match" is supposed to mean :-)
jnthn Aye, though it's mostly special in its dispatchyness rather than its thunkiness.
.oO( I use i and y totally inconsistently in English now... )
21:55
pmichaud jnthn: that ys okai, Englysh ys alwais adaptyng
at least I don't notice you putting extra vowels in words like "color" or "flavor" :-) 21:56
quietfanatic flaiyvor
jnthn You're just coloured by your parcitular flavour of English. :P
*particular 21:57
pmichaud (maybe you do that, and I just don't notice anymore after spending lots of time around aussies and nz'ers and brits and the like.)
jnthn pmichaud: I generally write whatever the spell checker I'm working under wants, and if there is none I just type whatever. :-)
color is shorter though. :-)
pmichaud
.oO( "type whatever" --> "colo*r" and "flavo*r" ? )
21:58
or even just col*r and flav*r
21:59 iblechbot left
diakopter sorear: the Callable[:(Int, Int --> Int)] syntax is (hopefully) temporary (for annotating strongly-typed closures) until TimToady specs something better. I'm hoping for &:(Int, Int --> Int) 21:59
quietfanatic
masak quietfanatic: SE4 - color? 22:01
I'd like to propose ˈcolɵrˈ 22:02
quietfanatic masak: 色 == color, though I don't know what SE4 means 22:03
English-speakers usually just pronounce it colr.
spinclad 4: fourth tone?
masak quietfanatic: it's the Mandarin pronunciation. I'm coming from the hanzi direction, while I guess you're kanji. ;)
22:03 orafu left, PacoLinux left
jnthn I kan zi that being a problem... 22:04
22:04 jhuni joined
quietfanatic Indeed, I inputted it as "iro" 22:04
masak I don't know the Cantonese pronunciation, unfortunately.
sorear diakopter: &:() still has the Rice problems, unless it's doing something deceptively simple like only matching the signature
22:04 orafu joined
sorear diakopter: is my &:(Int --> Int) &foo = * + 1; legal? 22:05
spinclad Rice?
my Rice $grain
masak is it something about it being computationally hard to find equivalent siggies?
quietfanatic If it's legal in a signature it ought to be legal in a my, which is parsed as a signature.
masak quietfanatic: but not all things make sense in a my. 22:06
quietfanatic: return type, for example.
quietfanatic Well you can say my Int|Str $x though
like a junction type.
std: my Int|Str $x
p6eval std 30664: OUTPUT«===SORRY!===␤Malformed my at /tmp/CdrTqWaCbj line 1:␤------> my Int⏏|Str $x␤ expecting any of:␤ multi_declarator␤ scoped declarator␤ typename␤Parse failed␤FAILED 00:01 113m␤»
quietfanatic maybe not
sorear quietfanatic: type checking an arbitrary function against a signature reduces to the halting problem 22:07
spinclad: en.wikipedia.org/wiki/Rice%27s_theorem
quietfanatic ...I'm afraid all this is a bit beyond me at this time
jnthn quietfanatic: No, you can't do that in Perl 6.0.0. 22:08
quietfanatic: Maybe some day :-)
diakopter sorear: not yet
jnthn quietfanatic: There's always subset Foo where Int|Str;
quietfanatic I guess so.
diakopter sorear: (it's not yet legal, hence me saying TimToady hasn't specd it yet) 22:09
masak: why wouldn't a return type make sense in a my? 22:10
masak diakopter: because a my usually initializes variables. it doesn't return things, to my knowledge. 22:11
diakopter er
I was referring to a my variable that is initialized to a closure.
initialized with a closure. 22:12
masak ah. we're talking past each other, then.
diakopter and that closure returns a particular type.
spinclad (/me seems that the return type is the part that makes sense in a my: my Int &foo; as it's the covariant part of the signature)
masak I meant `my ($a, $b --> Int)`
diakopter I don't know what that is specd to mean :)
masak std: my ($a, $b --> Int) 22:13
p6eval std 30664: OUTPUT«ok 00:01 112m␤»
diakopter I didn't doubt it parsed; I don't know what it means
masak we're on the same page there :P
diakopter k 22:14
sorear: are you saying it follows from Rice's theorem that no programming language can have strongly typed function variables? 22:15
masak seems it is saying that you can't tell in general whether a function is in a particular class of functions or not. 22:18
I can see how that reduces to the Halting Problem, yes.
but I'm not sure I see the full ramifications.
sorear diakopter: no. I am saying that Perl 6, as it is currently designed, cannot 22:19
but that can change.
22:19 szabgab left
quietfanatic Because it doesn't do static analysis? 22:19
22:19 patspam joined
diakopter how would/could it be changed? 22:19
quietfanatic :) It's easy to see if something has the right signature--give it those arguments and check that it returns the right type. 22:20
masak quietfanatic: if it returns. 22:21
quietfanatic aw shoot :)
sorear sub { return $_ % 2 ?? 'foo' : 2.0 } 22:22
masak sorear: !!
sorear right, right, of course
masak but yes. what sorear said.
diakopter since it's not annotated, it returns an Any, I thought 22:23
sorear diakopter: the simplest way is to make signatures part of the typing of subs. I don't really like that the presence or absense of signatures changes things, but the options are worse
diakopter sub { return $_ % 2 ?? 'foo' : 2.0 } is the same thing as sub (--> Any) { return $_ % 2 ?? 'foo' : 2.0 } , right? 22:24
dalek ok: 41c52f8 | jonathan++ | src/subs-n-sigs.pod:
Various bits of editing to the subs-n-sigs chapter.
sorear (Cursor still hurts my head)
diakopter: no, it's the same thing as sub (Any --> Any) {...
diakopter ok
sorear the case that really bothers me is * + 1
it's a WhateverCode with signature (Any --> Any)
diakopter ok 22:25
sorear should I be able to assign it to a variable typed as (Int --> Int)
?
22:25 kensanata joined
quietfanatic Probably not. 22:26
22:26 kulp joined, kulp left, kulp joined
spinclad you should be able to assign it to a (Int --> Any), since then it just will only get fed Ints. 22:26
quietfanatic You'd be able to assign an (Int --> Int) sub to a (Any --> Any) variable though
or maybe not that either.
sorear subtyping is easy
parametricity is harder 22:27
spinclad quietfanatic: no, you can assign a (Any --> Int) to a (Int --> Any)
quietfanatic Yeah, that's what it'd be.
22:27 patspam left
sorear covariance vs. contravariance 22:27
spinclad that interpolates two (Int --> Any) noops
diakopter luckily for me, such contravariance can be fixed up at compile-time by injecting a runtime type-check 22:30
sorear diakopter: no, it can't, because Perl 6 type checks are Any --> Bool
not Any --> ::T|Failure 22:31
diakopter not a Perl 6 type check
an underlying platform type check
22:31 szabgab joined
diakopter (is what I was considering) 22:32
lue .rnd( I tried searching for a simple sed one-liner to replace an error in many blender source files, and I get perl :) ) 22:33
diakopter I don't understand how Perl 6 type checks are Any --> Bool 22:34
what does that mean
(what is passed into the "Any" slot) 22:35
sorear diakopter: the candidate 22:36
diakopter where is the type passed in? 22:37
sorear the type check is specific to the type
a perl 6 type check can't replace an object or wrap it in any way
it can only say "yes" or "no"
diakopter what is a "Perl 6 type check"? is this a runtime object?
sorear a Perl 6 type check is what happens when you say my TYPE $foo; $foo = VALUE; 22:38
diakopter the "when" there is very confusing; I can't tell whether you mean compile time or runtime 22:39
sorear runtime
diakopter it can't be done at compile-time?
sorear of course not; VALUE isn't known then
diakopter why couldn't one know the type of VALUE? 22:40
sorear because expressions don't have types, values do
you have to evaluate the expression before you can know its type 22:41
and the type can be different each time you evaluate it
I should have said $foo = EXPR;
diakopter no EXPR can be typed?
jnthn sorear: "a perl 6 type check can't replace an object or wrap it" - not quite true. :-)
rakudo: subset Foo where -> $checked is rw { $checked = 42 }; 22:42
:-)
p6eval rakudo 87e0e1: ( no output )
sorear Wow.
diakopter I don't see how no EXPR can ever be booed 22:43
22:43 patrickas left
diakopter er 22:43
typed
heh
sorear diakopter: the type of every expression is Mu
only variables can have more-specific types 22:44
diakopter that is dumb
jnthn rakudo: subset Foo where -> $checked is rw { $checked = 42 }; my Foo $x = 100; say $x;
p6eval rakudo 87e0e1: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17864 (src/builtins/Junction.pir:393)␤»
jnthn D'oh. :-/
oh, it's probably right.
It's trying to assign to the 100 :-)
Anyway, don't do that. ;-)
rakudo: subset Foo where -> $checked is rw { $checked = 42 }; my $y = 100; my Foo $x = $y; say $x; say $y; 22:45
p6eval rakudo 87e0e1: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17864 (src/builtins/Junction.pir:393)␤»
jnthn Hmpfh.
dalek ok: 09a1f28 | jonathan++ | src/multi-dispatch.pod:
Example of multi-dispatch and nested signatures.
22:51
ok: 5d9cb15 | jonathan++ | src/subs-n-sigs.pod:
A little more editing for subs-n-sigs.
22:55 Targhan left 22:57 kensanata left 22:58 Psyche^ joined, Patterner left, Psyche^ is now known as Patterner 23:00 Targhan joined
Targhan Hmmm so I'm running "perl Configure.pl --gen-parrot" on windows and one of the very first things it prints out is "The system cannot find the path specified." This seems kind of bad, but I have no idea what's missing. Any ideas? 23:02
bkeeler pmichaud: still around?
sorear "one of" is rarely ever good enough in programming circles
jnthn Targhan: May not be a problem - if it then goes on to check out Parrot and build it.
sorear if only we had the whole error
Targhan okay fair enough 23:03
sorear use paste.lisp.org/new/perl6
oh
Targhan well the actual crash line is:
23:03 snarkyboojum joined
Targhan holy god, programmin in windows is terrible. I can't even copy from the cmd.exe window? 23:03
one moment... 23:04
jnthn Right click, Mark...
bkeeler You have to turn on the facility
diakopter there are two modes, quickedit and nonquickedit
select with the left pointer, hit enter to copy
sorear use paste.lisp.org/new/perl6
BinGOs I hear there is something called Console2 (sourceforge.net/projects/console/) 23:05
Targhan I'm attempting to download powershell now, but I'll check that out too
diakopter in quickedit mode, right click pastes and left click selects for copy 23:06
masak g'night, people.
23:06 masak left
BinGOs I found powershell to be heinously slow. 23:06
Targhan ahh quick edit is the winner
23:06 lestrrat is now known as lest_away
bkeeler phenny: tell pmichaud if you're in a reviewing mood, there's now a 'regex-interpolation' branch in nqp-rx 23:07
phenny bkeeler: I'll pass that on when pmichaud is around.
diakopter I daresay "programming in windows is terrible" is not a fair claim
sorear programming is terrible 23:08
diakopter :)
bkeeler Sounds perfectly fair to me
23:08 meppl left
lisppaste3 Targhan pasted "windows build error" at paste.lisp.org/display/99321 23:08
sorear (programming in windows 95 is downright awful)
Targhan it's windows xp at least 23:09
anyway, I have MSVC installed and cl.exe is in my path
sorear Targhan: do you have VC++ installed?
Targhan as is nmake.exe
sorear ah
23:09 ethel left
Targhan svn is also in path, and obviously perl 23:09
anyway I'm digging through Configure.pl to see what the error means, but if someone has encountered it before, advice is appreciated. 23:10
jnthn Targhan: In your parrot directory, there should be some file showing what the C ompiler actually outputted.
sorear Targhan: since this is a Parrot failure, you may have better luck asking in #parrot 23:11
that said, the main Parrot Win32 dev is here and not there
Targhan heh
jnthn sorear: Oh?
diakopter Targhan: is this activeperl or strawberryperl?
Targhan The line between parrot and perl6 is still a bit fuzzy in my mind
this is activeperl
should I install strawberryperl?
jnthn I've had more luck building Rakudo with Active Perl. 23:12
sorear jnthn: You
Targhan A previous google search turned up someone with a similar problem in September of last year, though he was using strawberry
diakopter Targhan: 64-bit activeperl?
jnthn sorear: Heh. I'm not all that active on Parrot dev nowadays. :P
Targhan let me check the build
jnthn Targhan: Mabye cd parrot and then perl Configure.pl --verbose may help (iirc) 23:13
Or at least tell you a bit more.
Targhan perl --version says v5.10.1 build for MSWin32-x86-multi-thread
so 32 bit I guess
diakopter yeah
did you use the 64-bit msvc envvars shortcut or the 32-bit one
oh, I guess you're on 32-bit xp... 23:14
Targhan erm I don't know how to answer that question
it's 32 bit xp
diakopter how did you add cl to your path
Targhan right clicked my computer -> properties
advanced tab, edit environment variables
added vc/bin directory to it
diakopter (it's recommended to use the C:\Program Files\Microsoft Visual Studio 9.0\VCvcvarsall.bat 23:15
Targhan configure --verbose is complaining about missing libraries though
diakopter (it's recommended to use the C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat
Targhan which makes me think some linker paths are not setup
let me check out that batch file
diakopter or 8 or whichever visual studio version you have
Targhan yeah 23:16
lisppaste3 Targhan annotated #99321 "parrot configure with verbose" at paste.lisp.org/display/99321#1
Targhan But yeah I think it's an environment variable thing. looking at script now
diakopter sorear: I don't understand how/why EXPR can never have a type other than Mu. 23:20
Targhan hmmm
so when I run vcvarsall from cmd, the parrot configure works 23:21
Is there a less ghetto way of making that script always run than adding it to autoexec.bat?
diakopter heh
Targhan I guess I could take a diff of the environment variables and input them manually 23:22
diakopter make a shortcut to "cmd.exe /k ""%path_to_vcvarsall%""" and run that instead
instead of cmd.exe directly I mean
Targhan looks like the autoexec.bat thing didn't work. Guess that's system startup only 23:24
diakopter yeah
actually autoexec.bat is ignored. 23:25
Targhan Hmmm it's building an awful lot more stuff 23:26
uh.. woo! Thank you, irc channel!
just getting something compiled that can operate against unit tests will be great. 23:27
diakopter does anyone else know why/how/whether no EXPR can be of a type other than Mu? 23:30
sorear diakopter: that's the way dynamically typed languages work 23:31
jnthn diakopter: I'm...kinda confused by the whole discussion.
diakopter I thought Perl 6 was optionally dynamically typed.
sorear javascript, perl5, etc are exactly the same way
diakopter I thought Perl 6 enforced types when annotations were present.
at compile time.
jnthn I mean, if you have for example $a + $b and you statically know all the multi-candidates (which we often do) and you statically know the types of $a and $b, then certainly unless the multi candidates are "too interesting" you could at compile time determine what the type of the expression would be. 23:32
diakopter: No, the enforcement may be at runtime.
diakopter: There's no *requirement* to do it at compile time. 23:33
diakopter right, ok
jnthn diakopter: You can fail at compile time on antyhign that would fail at runtime.
But if you can at compile time say "huh, that could never work out!", it's totally fine (and good) to fail at compile time.
sorear However, if there's even the slightest chance of it working, you need the runtime check
jnthn sorear: Aye, though there's likely pragma that will let you control what odds you're willing to accept. 23:35
sorear rakudo: try { eval "use Nonexistant" }; say "Failed: $!"
p6eval rakudo 87e0e1: OUTPUT«Unable to find module 'Nonexistant' in the @*INC directories.␤No exception handler and no message␤current instr.: 'perl6;Perl6Exception;throw' pc 15350 (src/builtins/Associative.pir:46)␤»
sorear mberends recently changed rakudo to say; exit(1) instead of throwing an exception on module not found 23:41
I cannot say I am entirely happy with this 23:42
jnthn That feels...dubious.
sorear 32150d5
diakopter sorear: Perl 6 is not "dynamically typed" like Perl 5 and JavaScript. 23:45
jnthn sorear: There's some papers on Gradual Typing which, if you didn't see them before, are quite interesting reading; the ideas are quite applicable to the Perl 6 view of typing. 23:47
diakopter sorear: I'm trying to understand why you would give such a pedantic/condescending/smartass reply like "that's the way dynamically typed languages work". Were you trying to give me an overly-simplistic answer just so I'd stop asking the question? 23:53
sorear No 23:55
I was trying to flush the root misunderstanding out
diakopter okay, so my sensation of pedantry was correct. 23:56
jnthn sorear: Yes, but if your understanding is/was that Perl 6 is entirely dynamically typed like Perl 5 and Javascript, then the misunderstanding is/was yours.
23:57 Chillance joined
sorear jnthn: I never said *his* root misunderstanding 23:57
jnthn :-)
sorear If I'm wrong, I'd like to find out sooner rather than later.
Broad statements help that happen.
diakopter :) hrm. to me, questions work better 23:58
(esp when (as in this case, I respect your understanding a lot) the hearer respects the speaker)
TimToady it's generally better to give each other the benefit of the doubt 23:59