»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:02 a3gis joined 00:07 a3gis left 00:15 Bryanstein joined 00:17 benabik joined 00:18 bjz_ joined 00:19 bjz left 00:20 kurahaupo joined 00:25 dayangkun left 00:38 dayangkun joined 00:50 kurahaupo_mobile left 00:55 dayangkun left, FROGGS left 00:56 FROGGS joined, dayangkun joined, Ben_Goldberg joined 00:57 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 01:08 kurahaupo left 01:09 kurahaupo joined 01:19 isacloud__ joined 01:20 flussenc1 joined, sftp_ joined 01:21 dagurval_ joined, cxreg2 joined, TimToady_ joined 01:22 simcop2387_ joined, Goodbox_ joined, isacloud_ left, TimToady left, flussence left, dagurval left, Vlavv left, simcop2387 left, Goodbox left, Bucciarati left, cxreg left, sftp left, jtpalmer left, simcop2387_ is now known as simcop2387, jtpalmer_ joined, Vlavv joined, isacloud__ is now known as isacloud_ 01:23 Bucciarati joined 01:27 Guest37676 is now known as masak
masak enjoyed skien.cc/blog/2014/04/09/unpythonic-python/ 01:32
HN discussion has some gems, too: news.ycombinator.com/item?id=7560647 01:35
01:38 flussenc1 is now known as flussence 01:39 flussence left, flussence joined 01:41 btyler joined 01:46 ilbot3 left 01:48 ilbot3 joined 01:49 lustlife joined 01:56 klapperl_ joined 01:58 klapperl left 02:14 plobsing joined 02:28 xragnar_ joined, xragnar left, xragnar_ is now known as xragnar 02:32 bjz_ left 02:35 bjz joined 03:05 hoverboard joined 03:13 Ben_Goldberg joined 03:15 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 03:33 lizmat_ joined 03:35 lizmat__ joined, lizmat_ left, BenGoldberg left, BenGoldberg joined 03:36 lizmat left 04:02 kaare_ joined 04:03 xinming__ left 04:04 xinming joined 04:12 pdcawley left 04:13 pdcawley joined 04:19 pencilk joined 04:34 Psyche^_ left 04:35 Psyche^ joined 04:36 pencilk left 04:38 jk_ joined 04:51 hoverboard left 04:54 kaare_ left 04:58 SamuraiJack_ joined 05:03 cxreg2 left 05:05 BenGoldberg left 05:06 BenGoldberg joined 05:12 kurahaupo left 05:13 cxreg joined 05:20 kaare_ joined 05:33 sorear left 05:37 sorear joined 05:42 klapperl_ left, kaleem joined 05:44 klapperl joined 05:51 btyler left 06:00 BenGoldberg left 06:09 logie left
japhb /home/gjb/share/rakudo-jvm-9ff0bc002d060a291d62010c07bac9593d625846/install/bin/nqp-j --target=jar --output=blib/Perl6/World.jar --encoding=utf8 \ src/Perl6/World.nqp 06:28
make: *** [blib/Perl6/World.jar] Segmentation fault (core dumped)
^^ Is that expected right now when building r-j?
Woodi hallo :) 06:31
masak: I wonder do C Pyton version run fastest... looks just 1 sub call :) 06:32
moritz the IO costs will dominate the runtime, I guess 06:38
Woodi foun www.somethingofthatilk.com/index.php?id=237 following links on that blog :) but using game consoles sold with dumping prices and do noit buy any games is way to go. no one protect small bakers whet giant markets dump prices on bread. they dump quality also...
06:38 ldthien0 joined
Woodi in C-ly version ? 06:38
moritz Woodi: in both C-ish and pythonic 06:39
06:40 kurahaupo joined
Woodi in pythonic ver there is 100 sub calls 06:40
moritz wow
100 sub calls
that'll take years. 06:41
in both versions, there are also 100 print calls :-)
Woodi that was named "Pythonic Python"... ;)
06:42 dbane left
sergot morning o/ 06:45
Woodi hallo :)
btw. turring machines are probably proved to be universal computation model so do we shouldn't use more gotos ? ;) 06:47
moritz has to quit firefox to compile the setting with for rakudo-j these days, otherwise he gets an OOM 06:48
Woodi: Turing machines don't have gotos at all
Woodi jumps ?
moritz Woodi: neither
Woodi hmm, must correct my imagination with wiki.. 06:49
moritz it just has states, transitions, and a tape with a movable head
06:49 lizmat__ left, lizmat joined
moritz one could emulate the states with gotos, but there are better ways to do that 06:49
07:02 darutoko joined 07:04 sftp_ is now known as sftp
lizmat good *, #perl6! 07:10
from a sunny Zürich
sightseeing and commuting& 07:11
07:11 lizmat left 07:13 zakharyas joined 07:14 Ven joined
moritz \o 07:18
Ven o/ 07:19
07:19 klapperl_ joined
moritz r: my $a = {:x}; my $role = role { has $.cool = "yeah" }; $a does $role; say $a.cool 07:19
camelia rakudo-jvm 9ff0bc: OUTPUT«(timeout)»
..rakudo-parrot 9ff0bc: OUTPUT«yeah␤»
..rakudo-moar 9ff0bc: OUTPUT«Type check failed in binding <anon>; expected '<anon>' but got 'Hash+{<anon>}'␤ in method at /tmp/tmpfile:1␤ in block at src/gen/m-CORE.setting:993␤ in method BUILD_LEAST_DERIVED at src/gen/m-CORE.setting:951␤ in sub infix:<does> at src/gen/m…»
Ven p: say {:x}.perl 07:20
camelia rakudo-parrot 9ff0bc: OUTPUT«{"x" => Bool::True}␤»
Ven p: say {+:x, -:x}.perl # can I get a false ?
camelia rakudo-parrot 9ff0bc: OUTPUT«Block.new()␤»
07:20 klapperl left
moritz m: say (:!x).perl 07:21
camelia rakudo-moar 9ff0bc: OUTPUT«"x" => Bool::False␤»
Ven moritz++ 07:23
moritz r: my $a = []; my $role = role { has $.cool = "yeah" }; $a does $role; say $a.cool 07:25
camelia rakudo-parrot 9ff0bc: OUTPUT«yeah␤»
..rakudo-jvm 9ff0bc: OUTPUT«Nominal type check failed for parameter 'null'␤ in method at /tmp/tmpfile:1␤ in block at gen/jvm/CORE.setting:993␤ in method BUILD_LEAST_DERIVED at gen/jvm/CORE.setting:951␤ in sub infix:<does> at gen/jvm/CORE.setting:16514␤ in sub infix:<d…»
..rakudo-moar 9ff0bc: OUTPUT«Type check failed in binding <anon>; expected '<anon>' but got 'Array+{<anon>}'␤ in method at /tmp/tmpfile:1␤ in block at src/gen/m-CORE.setting:993␤ in method BUILD_LEAST_DERIVED at src/gen/m-CORE.setting:951␤ in sub infix:<does> at src/gen/…»
Ven p: my $a = []; my $role = role { has $.cool = "yeah" }; $a but $role; say $a.cool # do I remember that correctly ? 07:26
camelia rakudo-parrot 9ff0bc: OUTPUT«No such method 'cool' for invocant of type 'Array'␤ in block at /tmp/SC_JKe7xA7:1␤␤»
moritz r: my $a = []; Ra does role { has $.cool = "yeah" }; $a does $role
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Variable '$role' is not declared␤at /tmp/tmpfile:1␤------> e { has $.cool = "yeah" }; $a does $role⏏<EOL>␤ expecting …» 07:27
moritz Ven: 'but' leaves the original unmodified
and returns a clone with the mix-in
Ven moritz: hence the "do I remember that correctly" :p
moritz r: my $a = []; $a does role { has $.cool = "yeah" };
Ven far prefers $'s position on azerty keyboards
camelia ( no output )
moritz r: my $a = []; $a does role { has $.cool = "yeah" }; say $a.cool 07:29
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«yeah␤» 07:30
07:31 bjz_ joined
moritz submits rakudobug 07:32
07:33 bjz left 07:57 xinming left 07:58 xinming joined
Ven What's "c'dent"? 08:05
well, something from 2010 it seems 08:06
tadzik ingy's language
08:10 denis_boyun_ joined 08:20 plobsing left 08:27 dmol joined
Ven r: say (1, 2) Z- (3, 4); say (1, 2) >>-<< (3, 4); # not sure what's the diff 08:30
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«-2 -2␤-2 -2␤»
Ven r: sub sma(Int \P where * > 0) returns Sub { sub ($x) { state @a = 0 xx P; @a.push($x).shift; P R/ [+] @a; } } 08:32
camelia ( no output )
Ven r: (1, 2) Z- (3, 4) Z- (5, 6) 08:34
camelia ( no output )
Ven r: say (1, 2) Z- (3, 4) Z- (5, 6); say (1, 2) >>-<< (3, 4) >>-<< (5, 6) 08:35
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«-7 -8␤-7 -8␤»
Ven en.wikibooks.org/wiki/Perl_6_Progra..._Operators Doesn't even have Z :( 08:36
r: class A { method Int { 5 }; method Numeric { 6 } }; say +A.new 08:40
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«6␤»
08:52 pecastro left
Ven r: gather for ^5 { say 'hey, listen !'; }; eager gather for ^5 { say 'die, navi !'; }; 08:53
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«hey, listen !␤hey, listen !␤hey, listen !␤hey, listen !␤hey, listen !␤die, navi !␤die, navi !␤die, navi !␤die, navi !␤die, navi !␤»
08:53 virtualsue joined 08:54 pecastro joined
jnthn japhb: The JVM should never be expected to segfault... 08:58
Ven kinda thought gather could be lazy 08:59
09:00 dakkar joined
jnthn Ven: It is, but you put it in sink context. 09:01
Ven Kinda makes sense. 09:02
r: my @a = gather for ^5 { say 'hey, listen !'; }; eager gather for ^5 { say 'die, navi !'; };
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«hey, listen !␤hey, listen !␤hey, listen !␤hey, listen !␤hey, listen !␤die, navi !␤die, navi !␤die, navi !␤die, navi !␤die, navi !␤»
Ven ("kinda" because the other option would be to give a warning "useless statement" ) 09:03
(which is certainly not what most people would expect -- I'd argue it's pretty useless to use gather in sink context, only for side-effects, though)
jnthn Use binding also :) 09:05
= is a mostly eager construct.
Ven r: my @a := gather for ^5 { say 'hey, listen !'; }; eager gather for ^5 { say 'die, navi !'; } # getting through it !
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«die, navi !␤die, navi !␤die, navi !␤die, navi !␤die, navi !␤» 09:06
jnthn
.oO( the, navi, the )
Ven jnthn++ # thanks -- Only 4 questions I kinda don't understand :D
jnthn Well, Perl generally associated semantics with operators more strongly than types. Assignment will consistently be "mostly eager" (that is, evaluate up until known infinite things). 09:09
09:10 kaleem left
Ven my @a = ^Inf; # mostly is the word 09:11
well, that'll probably get executed because it's the last expression
09:11 kurahaupo left
Ven r: my @a = ^Inf; 1 # mostly is the word 09:11
camelia ( no output )
09:12 denis_boyun_ left
jnthn meeting & 09:17
tadzik hmm. Can anyone in the US be my postal relay? Complementary beer will be provided at the earliest social gathering 09:18
long story short, I really want that t-shirt: shirt.thatdailydeal.com/home.php?id=23458 09:19
09:22 kaleem joined 09:25 eMBee joined 09:27 anaeem1 joined, d^_^b left, d^_^b joined 09:28 clkao left 09:29 clkao joined
ingy hi ClarusCogitatio 09:31
er
hi clkao :)
Ven: where did you find c'dent?
Ven hi clkao, hi ingy 09:32
colomon Iingy! \o/
ingy! \o/
Ven found it from rosetta, I think. That along with several questions I still have
masak ingy! \o/ 09:35
Ven r: class A { method Int { !!! } }; subset Intable where *.^can('eat'); role IntableExt[Intable ::T] { has T intval; }; class B does Intable[A]; say B.new.perl; 09:37
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Malformed has (did you mean to declare a sigilless \intval or $intval?)␤at /tmp/tmpfile:1␤------> e IntableExt[Intable ::T] { has T intval…»
Ven r: class A { method Int { !!! } }; subset Intable where *.^can('eat'); role IntableExt[Intable ::T] { has T $intval; }; class B does Intable[A]; say B.new.perl; 09:38
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc: OUTPUT«===SORRY!===␤No such method 'parameterize' for invocant of type 'Perl6::Metamodel::SubsetHOW'␤»
..rakudo-moar 9ff0bc: OUTPUT«===SORRY!===␤Cannot find method 'parameterize'␤»
Ven r: class A { method Int { !!! } }; subset Intable of Any where { .^can('eat') }; role IntableExt[Intable ::T] { has T $intval; }; class B does Intable[A]; say B.new.perl;
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc: OUTPUT«===SORRY!===␤No such method 'parameterize' for invocant of type 'Perl6::Metamodel::SubsetHOW'␤»
..rakudo-moar 9ff0bc: OUTPUT«===SORRY!===␤Cannot find method 'parameterize'␤»
09:38 dbane joined
Ven r: class A { method Int { !!! } }; subset Intable of Any where { .^can('eat') }; role IntableExt[Intable ::T] { has T $intval; }; class B does IntableExt[A]; say B.new.perl; 09:38
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Too late for semicolon form of class definition␤at /tmp/tmpfile:1␤------> $intval; }; class B does IntableExt[A]; ⏏say B.new.p…» 09:39
Ven r: class A { method Int { !!! } }; subset Intable of Any where { .^can('eat') }; role IntableExt[Intable ::T] { has T $intval; }; class B does IntableExt[A] { }; say B.new.perl;
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!===␤None of the parametric role variants for 'IntableExt' matched the arguments supplied.␤Cannot call ''; none of these signatures match:␤:(Mu ::$?CLASS ::::?CLASS, Any ::T $ where { ... })␤»
Ven r: class A { method Int { !!! } }; subset Intable of Any where { .^can('Int') }; role IntableExt[Intable ::T] { has T $intval; }; class B does IntableExt[A] { }; say B.new.perl;
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«B.new()␤»
ingy heya colomon 09:43
greetings masak!
masak: just added initial PR supports to git-hub 09:44
I'll have to make a LT video for you :) 09:45
ingy is in .tw waiting for audreyt to appear
nwc10 hi ingy. Have fun. Say hi to audreyt 09:47
09:47 fridim_ joined
moritz aye, say hi to au from #perl6! 09:48
masak yes, please do say hi to au++ from us! 09:51
JimmyZ say hi to au from china :) 09:54
09:56 FROGGS left
ingy :D 09:57
will do
masak "from china" -- I see what you did there :P 09:58
09:59 dbane left
JimmyZ :P 09:59
Ven Really, what's R/ ? R meta-operator ??
jercos pirate meta-op :D
ingy arrrr 10:00
Ven yerrrr meta-op'reter
jercos (Looks like it reverses operand order for convenience?)
> 2 R/ 5
2.5
Ven uuhhhhhhh
r: (1, 2) R[Z-] (3, 4) 10:01
camelia ( no output )
Ven r: say (1, 2) R[Z-] (3, 4)
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«2 2␤»
10:01 dbane joined
Ven Uhmmm ... fair enough ? I guess ... Thanks jercos ! 10:01
jercos :) np
Ven couldn't find anything from S03 10:02
colomon indeed Rop reverses the operands 10:03
Ven r: say 2 * [+] (1, 2 ... 10) Z* (10, 9 ... 1); 10:04
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«440␤»
Ven r: say 2 * [+] (1, 2 ... *) Z* (10, 9 ... 1);
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«440␤»
Ven r: (1, 2) Z- (3) 10:22
camelia ( no output )
Ven r: say (1, 2) Z- (3)
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«-2␤»
Ven r: say (1, 2) >>Z<< (3)
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Missing << or >>␤at /tmp/tmpfile:1␤------> say (1, 2) >>Z<⏏< (3)␤ expecting any of:␤ postfix␤ infix…»
Ven r: say (1, 2) <<-<< (3)
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«-2␤»
Ven is not sure what's the difference between Z and >> <</
(execution order ?) 10:25
10:28 denis_boyun_ joined
Ven r: say so '0'; say so '0.0'; say so '0foo'; 10:29
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«False␤True␤True␤»
Ven is sad now :(
use strict-if; 10:30
10:30 a3gis joined
Ven r: say '0'.Bool; 10:31
colomon Ven: Zop is lazy and in-order. >>op<< is hyper and unordered
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«False␤»
Ven colomon: wouldn't S>>op<< be like Zop ?
r: use MONKEY_TYPING; augment class Int { method Bool { !!! } }; augment class Str { method Bool { !!! } }; if '0' { say 'hello' } 10:32
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Package 'Int' already has a Method 'Bool' (did you mean to declare a multi-method?)␤at /tmp/tmpfile:1␤------> ␤»
colomon Ven: I don't know.
10:33 virtualsue left 10:36 a3gis left 10:38 kurahaupo joined 10:43 kurahaupo left 10:47 mtk left 11:08 rindolf joined 11:12 sjn left 11:19 Rix left
masak Ven: as far as I know, S has nothing to do with iterators. Z is lazy. 11:21
Ven: and even if S>>op<< *could* emulate Zop, I wouldn't want to keep writing the former. bad huffmanization.
11:21 sjn joined 11:22 sjn left
masak r: say +'0.0'; say +'0foo' 11:27
camelia rakudo-moar 9ff0bc: OUTPUT«0␤===SORRY!===␤Cannot convert string to number: trailing characters after number in '0⏏foo' (indicated by ⏏)␤»
..rakudo-jvm 9ff0bc: OUTPUT«0␤Cannot convert string to number: trailing characters after number in '0⏏foo' (indicated by ⏏)␤ in method gist at gen/jvm/CORE.setting:12504␤ in method gist at gen/jvm/CORE.setting:1053␤ in sub say at gen/jvm/CORE.setting:13417␤ in block …»
..rakudo-parrot 9ff0bc: OUTPUT«0␤Cannot convert string to number: trailing characters after number in '0⏏foo' (indicated by ⏏)␤ in method gist at gen/parrot/CORE.setting:12525␤ in method gist at gen/parrot/CORE.setting:1056␤ in sub say at gen/parrot/CORE.setting:13459…»
masak Ven: numification is already strict in the way you describe. interestingly, boolification doesn't appear to have been given the same treatment. (maybe for good reasons, I dunno.) 11:28
Ven masak: I'd really like Boolification to be strict :_ 11:29
masak Ven: I can think of at least one reason I wouldn't like that. 11:35
Ven: namely, I want to be able to write `if ($var) { ... }` on any value without fearing I'll get an exception.
Ven masak: I can think of a lot of reasons I wouldn't like that
but I can think of a hundred more of why I'd want that 11:36
also, that could be made to error early on 11:37
masak I'm all for that, but the use case I mentioned doesn't feel like something I'd want to error, ever. that's kind of the beauty of it. 11:38
11:38 pdcawley left
masak at which point you're faced with splitting things up into, um, .Bool and .permissive-Bool, and having `if` statements use the latter. 11:39
personally, I think Perl 6 already has too much of that kind of internals fragmentation cluttering up the model. 11:40
it's easy to add complexity, difficult to remove it :)
11:41 pdcawley joined
Ven masak: ... which is why I'd like a "use strict-if" of some sorts, that overrides Int and Str's .Bool to throw 11:44
masak good news: anyone can write and publish a module. :) 11:45
Ven masak: and that good news is why I tried to use MONKEY_TYPING to fix that 11:46
11:48 AW3i joined
masak ah. 11:48
Ven I must be missing something. though :)
arnsholt Monkey-patching the Bool methods can cause some terrible action-at-a-distance bugs down the line, though 11:49
Ven I know
masak seems like a risk Ven is willing to take. 11:50
tadzik I read that in Sisko's voice
"that's a chance we'll have to take" 11:51
Ven I'd say I "value correctness", but I'm sure y'all disagree :p
masak no, that seems to be what you value :> 11:52
in this instance, I value convenience.
Ven which is fine, really ! that's a script language, after all 11:53
that's just one of the thing I've put in the bucket of "looks convenient but bites you after the fact". Like parentless function call
masak r: say "Perl 6 is a script language".trans('cp' => 'tc') 11:54
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«Perl 6 is a strict language␤»
masak \o/
tadzik :P
masak Ven: you can have my parentless function calls after you pry them from my cold, dead hands. :P 11:55
arnsholt I think this is a case that actually wants to be a macro. Not sure if our macro facilities can handle this yet, though
Ven (unless you can't mix them up)
tadzik r: say "I think not!".trans('k ' => ' k')
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«Ikthin knot!␤»
tadzik :o
masak tadzik: go and read up on .trans :)
tadzik yeah, I should :)
masak tadzik: it's Perl 6's version of tr/// 11:56
tadzik r: say "I think not!".subst('k ', ' k')
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«I thin knot!␤»
tadzik yyyeeah
Ven masak: like, if `a b c` is invalid, I'm mostly okay with them. That's why I'm okay with them in haskell
but whenever I do coffee and such, I find it to read pretty poorly 11:57
I get you can go overboard with mostly anything, esp. in a language such as perl6
s/6//
(as opposed to languages like python, when a reduce function is considered to hard to understand to be added to the language ..) 11:58
masak Ven: everything in moderation. of course you can abuse listop syntax to produce something horribly unreadable. most of the time I feel it reduces parenthesis clutter, though. 11:59
Ven: ...and I must say you bring a refreshing "users should be punished" attitude to the channel :) 12:00
Ven masak: ha, you seem to kinda like it though ? I really think we ought to do better with our tools. You shouldn't be allowed to shoot yourself in other's people foot 12:02
("our tools" applies to ALL programming, no exception)
masak Ven: there's a State of the Onion somewhere that you really should read. 12:04
Ven www.perlfoundation.org/perl6/index...._the_onion ?
masak Ven: one of its points is that if we make our tools so safe that it's no longer possible to make serious mistakes, the tools will also not be powerful enough to do interesting things. and an analogy to free will, because it's TimToady :) 12:05
Ven "Perl is humble. It doesn't try to tell the programmer how to program. It lets the programmer decide what rules today, and what sucks. It doesn't have any theoretical axes to grind. And where it has theoretical axes, it doesn't grind them." ?
12:05 rurban joined
masak right. and things like that. 12:05
Ven masak: but that's really a strawman imho 12:06
you can make the tools "safer" while not going overboard with them too :)
masak yes, of course. 12:07
and that's a lot of what we're doing with Perl 6 compared to Perl 5, IMO.
Ven Never did perl 5, so I couldn't tell.
I certainly heard it's nuts before, though
masak it's nuts in that crunchy, tasty way. 12:08
Ven I'll take your words on that one ! And I really must look like a narrow-minded one, but tools like haskell reduce your ability to shoot yourself in the foot, in a good way 12:09
masak please don't take my responses as rebukes. I (and many others here, I'm sure) will gladly listen to suggestins for improvements. 12:10
suggestions*
Ven There's a quote from runarorama that I particularly like "functional programming is a restriction on how we write programs, but not on what programs we can express." 12:12
masak what you can't expect is a group of people who haven't already thought about these design considerations a lot, and who just accept your suggestions without balancing counterarguments :)
that point about axes to grind is quite central, for example.
Ven I don't expect it !
masak Perl 6 is a lot more functional/FP than Perl 5. but it's still not am FP language in the way Haskell is. 12:13
Perl 6 is multi-paradigm.
Ven That much is obvious 12:14
I don't think there's a language that is not "multi-paradigm"
(and a lot of people strongly believe haskell is the best imperative language, which I could very well agree with) 12:15
masak :P 12:17
Ven masak: I know I do that, though. I take a lot of responses as rebukes, a lot of that is because I'm not a native speaker, another big part is because it's hard to "read" emotions going with one's sentence -- is it a reproach ? is it a compliment ? etc 12:18
tadzik that's a problem with internet indirect communication 12:19
s/internet//
Ven and that makes it even harder to argue 12:20
state of the onion 200[89] seem to be down, though 12:24
Ven will try to stay constructed while "freshly punishing users" here 12:27
12:34 Ven left 12:38 xenoterracide joined 12:45 anaeem1 left 12:46 anaeem1 joined
Woodi so what 'language is FP' means, by definition ? gc, immutable, no side effects, ((( syntax ? probably Haskell have more features then just FP ones 12:50
12:50 anaeem1 left
Woodi and if someone say ((( syntax is essential then.. I do not know what... :) 12:52
12:53 Ven joined
Ven well, that was a pretty rough cut in the conversation. Good thing that's a programming school, or I'd be pretty angry to get a power cutoff right in the middle of class 12:55
Woodi: functional usually refers to referential transparency
Woodi right, func results can be substituted. but is inlining the same ? :) 12:58
13:01 guru joined, guru is now known as Guest71657
Ven Woodi: that's what inlining is 13:02
13:02 Guest71657 is now known as ajr_
Woodi actually every sub/procedure/function call should have that feature + controlled side effects... 13:03
Ven GHC inlines very agressively. If you have an unsafe function (using unsafePerformIO, for example). you have to mark it yourself as noinline
13:04 [particle] joined, Rix joined
Woodi so just defaults are more strictly :) 13:04
Ven I think you'll find out you usually don't need "unsafe" functions ;-) 13:05
Woodi I forget 'map' it's functional thing too :)
Ven I mean, "unsafeCoerce" has "unsafe" it its name. What would you except ?
I think that's just misleadingly thinking "higher-order functions == functional programming"' which I certainly don't agree with =) 13:06
Woodi Ven: I bet moust functions in Cfamily/Paskal/Basic etc are safe :)
Ven How so ?
I bet most functions in Cfamily/Pascal/Basic are some of the unsafest that exist 13:07
13:07 kaare_ left
Ven The sole fact that these languages have a "null" and no Maybe/Option type makes them pretty bad for functional programming. 13:07
I mean, even java8 has lambdas and Optional.
Woodi it's potential unsafenest... but usually you pass arguments and get result, that's all... 13:08
Ven "print" is unsafe.
13:08 xenoterracide left
Woodi ok, probably I am wrong, as usual :) 13:08
but that FP distinction is a bit artificial 13:09
Ven I'd really recommend to read on Haskell and the IO monad
13:09 rurban left
jnthn back 13:10
Ven You basically have 2 ways to deal with side-effects in referentially transparent languages : unique type system or monads (kinda cps)
I think Clean and Mercury have a unique type system, and you can express monads in most languages (enforce them, not so much) 13:11
Woodi I know about IO monads. but many functions are just helpers, without side effects, just factored some common code...
Ven And that's fine. They don't have side-effects. They could be memoized and the program would still work the same
13:12 kbaker_ joined
Ven (a common mistake is that haskellers don't like side-effects, but some say that's wrong : they like it so much they gave it a dedicated type !) 13:12
Woodi code need to do something, not disappear after calculation is finished :) 13:14
Ven which is why you need an entry point. In haskell, that's your "main"
In scala (with scalaz), you usually wrap your pureMain in an impure one that calls .run 13:15
(though scala doesn't enforce many things)
Ah, but I'll get scolded for promoting languages :P
Woodi I bought lastly Cloujure book, but it's a slooow language... 13:16
13:16 AW3i left
cognominal Ven, the problem is that eventually everything gets bundled in it and its difficult to take apart. At least idris has conventions to act on or extract part of the state. 13:17
moritz in #perl6 you're not allowed to complain about slow languages :-)
Ven I think you mean the JVM is slow ? Didn't you try `lein repl` to test stuff ?
Woodi moritz: no way !
cognominal ... as explained here : eb.host.cs.st-andrews.ac.uk/drafts/...torial.pdf
Ven cognominal: yeah, I agree, that's usually the main problem. Idris still has some rough edges, though. 13:18
yeah, read that :)
Woodi Ven: just results from alioth game
Ven Woodi: mostly jvm startup time
It's like in rakudo benchmarks : once the JIT has run for a while, it gets really really fast 13:19
JimmyZ rakudo has jit :P
Ven i think the jvm's jit is a bit more powerful than rakudo's jit, though :P 13:20
for now, at least :p
JimmyZ rakudo use jvm's jit ;)
cognominal rakudo has jit, meaning moarbm? jnthn has worked overnight? :)
jnthn Rakudo doesn't have a JIT :)
Ven uuh, moarvm
jnthn Taht's a VM's job. :) 13:21
JimmyZ :)
Ven jvm's JIT is (still) better than moarvm's
once it reaches full speed, though, cause I've heard moarvm starts up far faster :p
Woodi do we need JITs at all ? just compile them all...
jnthn MoarVM's spesh branch JITs to specialized bytecode at the moment. To machine code (which is what folks classically mean by JIT) is to come. :)
Ven jnthn++ # lots of perf. improvements these days 13:22
jnthn But the "produce machine code" aspect is really just one part of what any modern JIT is doing.
cognominal that's the visible effect, that's what people see or have heard of. 13:23
JimmyZ what's the difference between tracing jit and method-at-runtime jit ? 13:24
Woodi probably JIT 2nd gen :)
moritz well, most people just have heard that JIT make stuff fast
Ven well, in dynamically typed languages, JITs do a lot of what AOT compilers can do in other languages 13:25
JimmyZ www.codeproject.com/Articles/34148/...at-runtime 13:26
jnthn JimmyZ: A tracing JIT records the code-path taken through an interpreter, including what conditions hold for that code-path to be valid.
JimmyZ: It then produces code for that code path, which may span many methods, with guards to trigger de-opt if the conditions are broken at some point. 13:27
JimmyZ: Method-JITs tend to JIT methods as a whole.
However, trace JIT vs method JIT isn't a binary choice. 13:28
I see it as more of a scale.
Woodi ...except JIT do not put that data to some database and must to recalculate with every run :) and not all paths depends on data probably...
hmm, feature request ! 13:29
db for jits data, per program :)
JimmyZ We can have these two sometimes?
jnthn Woodi: You need to prove the stuff in the database is safe to apply. That may not be a great deal cheaper than calculating it again. Or maybe it can be. But I don't think it's immediately obvious. 13:30
Woodi: Not to mention fixups mean you can't just read/run.
Woodi I hoped I can... 13:31
timotimo tadzik: www.getdigital.de/Star-Wars-Fan.html - shipping from here should be much less pricey and i like the design more
Woodi ok, so what JIT do what compilation is missing ?
tadzik timotimo: the price difference is quite striking, I'm not sure if it will indeed be cheaper 13:32
timotimo wow holy shit i didn't even look at the price there 13:33
jnthn Woodi: Not sure I follow the quesiton...
13:34 rurban joined
Woodi jnthn: JIT do something usefull + making native code on demand. what lacks in compilation process in comparision to perfect JIT ? 13:35
13:35 jk_ left
jnthn Woodi: Ability to make decisions based on information discovered at runtime. 13:35
Woodi: And then back out of those decisions if the things they rely on get broken.
Woodi: For example, a JVM may inline stuff on the assumption a certain type has no subclasses. But if a new subclass is dynamically loaded at runtime, it has to know to back out of that optimization. 13:36
Woodi: If you have something eval-like, you can't know when compiling a given unit of code whether that will happen.
13:36 pmurias joined
pmurias jnthn: have you seen the graal jvm stuff? 13:36
Woodi pmurias: no 13:37
jnthn: right, eval is not-compilable :)
jnthn pmurias: Aware of it, not had chance to dig into the details. 13:38
JimmyZ A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler: researcher.watson.ibm.com/researche...aceJIT.pdf
13:38 rindolf left
JimmyZ if someone is interested 13:39
jnthn JimmyZ++ # looks nice 13:41
JimmyZ thanks 13:42
jnthn ugh, headache. :/ Going to lie down for a bit. bbl. 13:43
13:46 Goodbox_ left 13:47 bluescreen10 joined 13:48 risou is now known as risou_awy, pdcawley left, pdcawley joined 13:58 btyler joined 13:59 SamuraiJack_ left 14:09 logie_ joined
Woodi pmurias: graal is interesting, seems kind like MOP functionality :) 14:11
14:14 thou joined 14:15 risou_awy is now known as risou 14:19 zacts joined 14:27 ajr_ left 14:28 guru joined, guru is now known as ajr_ 14:30 hoverboard joined
Ven www.jnthn.net/papers/2011-nlpw-classes.pdf slide 14, shouldn't that `if !%.attributes..` be `if %.attributes...` ? same for methods 14:40
oh I'm blind -.- my bad
Ven is not quite used to twigils yet 14:41
14:44 kaleem left
Ven r: class Golf { has $!player; has $!tee; method play { $!player.go($!pee) } |; 1 14:45
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Bogus statement␤at /tmp/tmpfile:1␤------> ee; method play { $!player.go($!pee) } |⏏; 1␤ expecting any of:␤ p…»
Ven r: class Golf { has $!player; has $!tee; method play { $!player.go($!pee) } }; 1
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Attribute $!pee not declared in class Golf␤at /tmp/tmpfile:1␤------> ee; method play { $!player.go($!pee) } }⏏; 1␤ ex…»
Ven r: class Golf { has $!player; has $!tee; method play { $self.'pee' = 1; $!player.go($!pee) } }; 1 14:46
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at /tmp/tmpfile:1␤------> er; has $…»
[Coke] Still no dalek? pushed the daily updates from yesterday 14:47
14:49 REPLeffect joined
Ven r: { sub postfix:<!>($n) { [*] 1..$n } say 10!; }; say 5!; 14:49
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> { sub postfix:<!>($n) { [*] 1..$n } ⏏say 10!; }; say 5!;␤ expecting any …» 14:50
Ven r: { sub postfix:<!>($n) { [*] 1..$n }; say 10!; }; say 5!;
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Negation metaoperator not followed by valid infix␤at /tmp/tmpfile:1␤------> !>($n) { [*] 1..$n }; say 10!; }; say 5!⏏;␤ …»
TimToady_ is back home now 14:52
Ven good *, TimToady_
14:52 TimToady_ is now known as TimToady
TimToady is also back home now 14:53
14:53 klapperl joined 14:56 klapperl_ left
frettled Amazong! 14:57
After going to one of Damian's Perl masterclasses, and hearing him say that he had regained his enthusiasm for P6, I felt more like doing P6 again, too. 15:00
15:00 FOAD left, FOAD joined
frettled TimToady: and Damian mentioned that you were working on a Perl 6 book (like Programming Perl?), do you require any external enthusiasm for that? :) 15:01
jnthn TimToady: Glad you made it back safely :)
15:03 kaare_ joined 15:06 bluescreen100 joined
TimToady frettled: I probably need more internal enthusiasm :) 15:06
15:06 denis_boyun_ left
TimToady or more likely, less enthusiasm for everything else I'm interested in... :) 15:07
15:07 treehug88 joined
Ven multi sub MAIN('save', $name, :$delete!) { } # can I just get `--delete` as a boolean flag ? 15:09
15:09 bluescreen10 left
Ven `Bool :$delete!`, I guess... 15:10
frettled TimToady: ah, well, that's probably beyond even my awesome powers. :) 15:11
benabik Infernal enthusiasm? 15:14
15:18 virtualsue joined 15:23 IllvilJa joined 15:24 klapperl left 15:26 klapperl joined
IllvilJa Modules for perl 5 (or at least some of them) can be installed using the package management system (apt-get and friends) on ubuntu. Am I right that something like that is not in place for perl 6? 15:27
geekosaur I doubt many distributions have any perl 6 modules packaged as yet 15:28
it's up to the distributions to do so, not to anyone here
(unless of course someone who has say in someone's distribution packaging is hanging out here...) 15:29
IllvilJa Ok. If I want to install "panda" on Ubuntu 13.10, what is the best practice there? I got the package 'rakudo' installed, but 'panda' seem to not have been included with it and there is no separate package with that name. I assume the best thing is to install panda by hand? 15:30
IllvilJa is horrified by the length of his own chatlines
geekosaur meh. sometimes my responses are short; sometimes they're long enough that my client has to break them up to avoid IRC's 512 byte message limit. this ain't twitter 15:31
tadzik IllvilJa: hey 15:32
IllvilJa: there are basically 3 ways
1) get a Rakudo Star which includes panda and a handful of other modules
2) install panda by hand as described on github.com/tadzik/panda
3) use rakudobrew (github.com/tadzik/rakudobrew) which installs a specified rakudo and panda for you
frettled 1) Rakudo Star: rakudo.org/downloads/star/
tadzik frettled++
IllvilJa tadzik: thanks! Alternative 2 seem to be the best for me, as i alrady got ubuntu's packaged rakudo installed. 15:33
frettled tadzik++ more! :) 15:34
IllvilJa One of those days someone will create a package for rakudo panda on Ubuntu :-).
tadzik IllvilJa: you're welcome :) Let me know if it gives you any trouble
IllvilJa: btw, which version of rakudo is that?
frettled IllvilJa: Ubuntu's Rakudo is most likely a few months behind, just so you're aware of that.
tadzik sometimes, sadly, the versions in linux distros are *quite* old
and you may need to checkout and older panda
I can help with that too
IllvilJa frettled, tadzik: that's fine, I don't need bleeding edge. I'll lookup the version...
frettled In Trusty, they're on 2013-12
In Saucy, they're a year behind. 15:35
tadzik it's 2013.03 in my 13.10
that's pretty ancient :/
IllvilJa: I'll strongly recommend building rakudo yourself
it's not much hassle really
and will give you a *much* better experience
IllvilJa Hm. 2013.02.1 is my version, but I think I'll try that one anyway.
15:36 fridim_ left
tadzik it's just a matter of 'rakudobrew build moar', and it just takes a couple of minutes 15:36
IllvilJa Hm. Could be an option.
tadzik I should make a proper install script for it too
15:36 beastd joined
tadzik in fact, I'll do that right away 15:36
IllvilJa I'll give 2013.02.01 already installed a spin though.
tadzik sure :) 15:37
pmurias Woodi: how does graal seems like a MOP?
Woodi: graal/truffle is used to generate a jit from a description of an ast interpreter
tadzik you may need to checkout panda b7b966b9f3fbd52ee1f4f6 or something
it's from one year ago, so that should work
rakudo is a bit of a moving target, and I have to keep panda updated constantly :) 15:38
recent panda is most likely incompatible with 2013.03
I didn't even tag it back then :)
now I do, when there are breaking changes
IllvilJa Hm. It is the need for installing panda in a special way that might defeat the convenience of using the rakudo packaged for ubuntu. 15:39
tadzik I'm afraid so :/
so, the alternative: git clone git://github.com/tadzik/rakudobrew.git ~/.rakudobrew && export PATH="$HOME/.rakudobrew/bin:$PATH" && rakudobrew build moar
it should work :) 15:40
IllvilJa Maybe I should do that rakudobrew thing... and bug ubuntu package maintainers to update rakudo package and add a compatible panda package to follow along with it.
15:40 anaeem1 joined
IllvilJa The reason I run into the need to use panda is that the third line in my intended Perl 6 code looks like 'use JSON::Tiny' ;-). 15:40
But still, 'sudo apt-get install rakudo' giving a barebones Perl 6 install is a good step forward! 15:41
tadzik :)
it odes :) 15:42
er, it is
IllvilJa Now we need to get the eco system along as well using apt-get ;-).
But one step at a time!
tadzik in a perfect world, we'd have a dedicated ubuntu maintainer in our crew :)
15:43 zakharyas left
IllvilJa Y.p 15:43
s/Y\.p/Yep/
Apologies for the perl FIVE regexp ;-).
I'm still a n00b at perl 6 regexes. 15:44
tadzik that looks compatible :)
r:
r: "Y.p".subst(/Y\.p/, "Yep").say
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«Yep␤»
IllvilJa Fascinating! 15:45
Ven R: "Y.p".subst(/ 'Y' . 'p' /, 'Yep').say # does it have sigspace by default ? 15:47
[Coke] "we call this a "use mention error"", and I thought of masak.
Ven r: "Y.p".subst(/ 'Y' . 'p' /, 'Yep').say # does it have sigspace by default ?
camelia rakudo-parrot 9ff0bc, rakudo-jvm 9ff0bc, rakudo-moar 9ff0bc: OUTPUT«Yep␤»
Ven \o/
15:52 fridim_ joined 15:54 jnap1 left, jnap joined 15:58 hoverboard left
moritz [Coke]: autoerror? :-) 15:58
15:59 denis_boyun joined 16:03 telex left 16:04 telex joined 16:12 Rotwang joined
jnthn In p6bench, I suspect Forest Fire would go faster if we removed the use of the deprecated * in bless... :) 16:20
16:22 rurban_ joined 16:29 ajr_ left 16:30 guru joined 16:31 guru is now known as Guest49493, Guest49493 is now known as ajr_ 16:32 falk0n joined 16:35 rurban left 16:38 virtualsue left
jnthn Pushed some more bits :) 16:41
16:46 ajr_ left 16:47 Ven left 16:48 virtualsue joined 16:49 dbane left
moritz is dalek dead? 16:49
JimmyZ yeah 16:50
moritz p6eval@feather3:~$ tmux attach
protocol version mismatch (client 8, server 7)
hoelzro =( 16:51
16:51 dakkar left, dalek joined, ChanServ sets mode: +v dalek
hoelzro try ps aux | grep tmux to find the pid, and /proc/$TMUX_PID/exe attach 16:51
moritz nah, I've just killed thing thing
and started again 16:52
jnthn omg you killed thing thing!
benabik hoelzro++
jnthn moritz++ # dealek
*dalek
benabik hoelzro: I’d wondered about a good way to do it. Last time I just reinstalled the old version.
hoelzro benabik: that works too =)
I can't take the credit for that trick 16:53
someone else (on Twitter?) told me about it
but that doesn't make it any less cool
benabik I’m sure they heard it from someone else too. :-)
16:53 pmurias left
dalek p/multispec: 9c92365 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Map setmultispec op for MoarVM.
16:58
16:58 xinming__ joined 16:59 falk0n left, xinming left 17:00 kaleem joined 17:04 xinming__ left, xinming joined, nebuchadnezzar left
dalek kudo/multispec: dcd156a | jnthn++ | src/Perl6/Metamodel/ (2 files):
Start using setmultispec on MoarVM.
17:08
kudo/multispec: eca0594 | jnthn++ | src/Perl6/Actions.nqp:
Auto-gen'd protos don't need special vars.

We will never look at them or use them, so don't waste time/space on having them.
vendethiel in perl6, when you do something like `sub foo(Str $a = '')`, does it allocates a `str` everytime ??
dalek kudo/multispec: e2cd785 | jnthn++ | src/core/Regex.pm:
Partial fix to regressions from setmultispec work.

We need to make onlystar protos consistently not show up in caller introspection to make this reliable. We need that for not getting CALLER:: wrong in thunks anyway, so might as well implement it.
17:08 rurban_ left
vendethiel not getting kicked?
jnthn vendethiel: No, a '' will come from the constant pool 17:09
vendethiel: Same for all literal Str, Int, Num...
17:09 ajr_ joined, hoverboard joined
vendethiel jnthn: cool :). Reading your slides from 2011 is like starting a serie that's over already : you don't have to wait :) 17:10
17:12 MayDaniel joined, kaleem left 17:13 virtualsue left, anaeem1 left 17:24 anaeem1_ joined 17:26 rurban joined 17:27 kurahaupo joined 17:30 fridim_ left 17:34 kurahaupo left 17:35 araujo left 17:39 rurban_ joined 17:45 rurban left 17:50 kurahaupo joined 18:06 kurahaupo_mobile joined, kurahaupo left 18:08 FROGGS joined 18:09 SamuraiJack_ joined 18:14 kurahaupo joined 18:15 kurahaupo_mobile left, SamuraiJack_ left 18:16 rurban joined 18:18 kurahaupo_mobile joined 18:20 rurban left, kurahaupo left 18:38 darutoko left 18:47 spider-mario joined 18:48 Rotwang left 19:01 dwarring joined
Ulti launchpad.net/ubuntu/+source/rakudo/2013.12-1 this is surprisingly up to date! 19:02
FROGGS nice! 19:03
19:08 colomon left 19:09 nebuchadnezzar joined 19:10 denis_boyun left 19:12 denis_boyun_ joined 19:14 bluescreen__ joined
dalek p/multispec: b6ff62f | jnthn++ | src/QAST/Block.nqp:
Add is_thunk to QAST::Block.

For now just as another attribute; there's now 3 of these that could flatten into a single attribute of flag bits.
19:17
p/multispec: 3b9d36e | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Pass is_thunk on down to Moar backend.
p/multispec: 92536f6 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Map ctx[caller|outer]skipthunks for MoarVM.
19:17 bluescreen100 left, rurban joined 19:21 rurban left 19:30 cooper left
dalek kudo/multispec: d54d2b3 | jnthn++ | src/Perl6/Actions.nqp:
Mark onlystar protos as thunks.
19:31
kudo/multispec: 83adc48 | jnthn++ | src/core/ (4 files):
Assorted updates now that onlystars are thunks.

This fixes many long-standing inconsistencies when we skip over any onlystar protos. The multispec optimization forced the issue, but it has existed for a couple of years, since we started inlining or doing multi-sub compile time call optimization. Note, updates will be needed for the JVM and Parrot backends to cope with these changes.
19:34 virtualsue joined
jnthn multispec is looking good on Moar now, spectest wise. 19:34
19:35 rurban joined
timotimo i'm kind of getting the feeling that "thunk" may be overused now 19:35
19:36 molaf joined
jnthn It's consistent enough with other uses of it. 19:36
19:37 cooper joined
timotimo OK 19:37
dalek p/multispec: d8f9b63 | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION to one with multispec.

This also happens to get spesh.
jnthn (including the one already in Actions.pm)
19:39 rurban left
jnthn So, now to update things for Parrot... 19:43
Then JVM
arnsholt jnthn: Is there much to be gained from merging boolean attributes into flag bits, in your estimation?
19:44 rindolf joined
jnthn arnsholt: 16 bytes per QAST::Block 19:44
arnsholt Might relieve GC pressure a bit I guess, but I'm guessing maybe not terribly much in terms of setting compile time?
Oh, that'll turn into quite a bit for something like the setting, won't it 19:45
19:45 spider-mario_ joined
jnthn Dunno exaclty how much. It own't be a huge saving, but it'll probably be measurable. 19:45
There must easily be a few thousands blocks in there 19:46
19:46 spider-mario left, spider-mario_ is now known as spider-mario
benabik Less GC pressure is less GC runs. Probably not a big difference though. 19:46
jnthn "Every little helps" :) 19:47
btyler gs 19:51
whoops, wrong window, this isn't git :)
moritz btyler: it's called "bs" :-) 19:52
jnthn guesses that's a short alias for git status :) 19:54
btyler bingo
jnthn I get tempted to do myself more aliases. 19:56
But I teach Git these days, and switching away from the aliases is kinda argh. I'd end up using them in class 'cus they'd get hard-wired into my fingers. :)
anocelot btyler: Once I did that with the wrong keyboard and polluted an IRC channel to the tune of 6+ commands. >.> 19:57
btyler for sure. the downside to 'gs' is that when I'm on a system where my .*rcs aren't present, I invoke ghostscript quite frequently
geekosaur that kind of thing is why I don't use such aliases
19:57 kaare_ left
geekosaur I have to use other systems quite frequently, on some of them my aliases are neither present nor appropriate 19:58
vendethiel always loses time when "ne" is not available as an "emacs" alias
20:02 spider-mario left 20:05 treehug88 left, treehug88 joined
[Coke] github.com/perl6/specs/blob/master...ossary.pod should include thunk. 20:07
20:14 hoverboard is now known as food 20:16 hummeleB1 left
moritz thinks he can do that 20:17
20:18 beastd left
dalek ecs: f705069 | moritz++ | S99-glossary.pod:
[glossary] explain thunk
20:21
jnthn I'm glad you thunk to...
timotimo thunks 20:22
20:25 food is now known as hoverboard 20:36 effbiai left, rurban joined 20:37 effbiai joined
moritz r: say MY.^name 20:38
camelia rakudo-parrot 1fe14b, rakudo-jvm 1fe14b, rakudo-moar 1fe14b: OUTPUT«MY␤»
moritz r: say MY::.^name 20:39
camelia rakudo-parrot 1fe14b, rakudo-jvm 1fe14b, rakudo-moar 1fe14b: OUTPUT«PseudoStash␤»
20:40 jnap1 joined
benabik r: say MY::.^name.perl 20:41
camelia rakudo-parrot 1fe14b, rakudo-jvm 1fe14b, rakudo-moar 1fe14b: OUTPUT«"PseudoStash"␤»
20:41 jnap left, rurban left
benabik Nope, it’s benabik. Nice try though. 20:41
dalek ecs: 749198b | moritz++ | S99-glossary.pod:
Add some more glossary terms
20:42
[Coke] sees moritz favors british plurals! 20:50
moritz: s/oppositise/opposites/ 20:51
s/belogns/belongs/
geekosaur does that make it belogna? 20:52
dalek ecs: f39d20e | moritz++ | S99-glossary.pod:
typos, [Coke]++
20:59
segomos timotimo: are you supernovous? 21:00
timotimo no, that's the other timo 21:02
21:03 virtualsue left, itz_ left, itz left 21:04 dayangkun left 21:05 itz joined, sjn_ joined, itz_ joined 21:07 btyler left 21:11 btyler joined 21:17 dayangkun joined, virtualsue joined 21:18 anaeem1__ joined 21:21 anaeem1_ left
dalek p/multispec: 55feaad | jnthn++ | src/vm/parrot/QAST/ (2 files):
is_thunk and ctx[caller|outer]skipthunks on Parrot
21:22
kudo/multispec: edccc49 | jnthn++ | src/core/Backtrace.pm:
A cheat for Parrot to fix failing tests.

This along with the NQP patch gets this branch fuctioning well on Parrot; the multispec itself isn't used, but the improvements to proto and CALLER::/OUTER:: pseudo-package interaction now work out on Parrot, and future fixes to OUTER:: with regard to thunks should work too.
jnthn 2 down, 1 to go... :)
timotimo glad to hear it 21:23
dalek ast: a97910a | (David Warring [email@hidden.address] | integration/advent2012-day0 (2 files):
adding advent 2012 days 2 and 3
21:30
ast: e7d8def | (David Warring [email@hidden.address] | integration/advent2012-day04.t:
adding 2012 day 4

This is reasonably expensive (20sec @moar - 1min @jvm). Should maybe be a stress test.
jnthn Should really be one, yes... :) 21:34
cxreg jnthn: not to be an ingrate but it's been like 2.5 months since your last 6guts post, it'd be nice to get an update :)
jnthn cxreg: 2.5 months? o.O 21:35
Doesn't time fly... :)
cxreg it really does 21:36
jnthn I've been meaning to write one about the optimization stuff I've been working on. I should get to that. :)
cxreg jnthn++
jnthn Thanks for the reminder. Had my head down in the code for quite a while I guess...but it's useful to talk about what I'm doing a bit too :) 21:38
timotimo cxreg: if you need a "what's new and cool in perl6" fix, you can look at p6weekly.wordpress.com to find my ramblings :) 21:39
cxreg timotimo++ awesome
21:40 rindolf left 21:46 treehug88 left 21:55 denis_boyun_ left, treehug88 joined 21:57 bluescreen__ left 22:04 lustlife left 22:05 Alula left, Exodist left, JimmyZ left, larks left, jercos left 22:06 woosley left, risou left, Exodist joined, JimmyZ joined, risou joined, larks joined, jercos_ joined 22:07 woosley joined, Alula joined
corecatcher timotimo++ thanks for your p6weekly summary 22:11
22:13 jercos_ is now known as jercos
timotimo yw :) 22:14
22:14 treehug88 left 22:15 kurahaupo_mobile left
timotimo early bedtime today 22:15
dalek p/multispec: 46d1e20 | jnthn++ | src/vm/jvm/ (8 files):
is_thunk and ctx[caller|outer]skipthunks on JVM
timotimo gnite
22:15 btyler left
timotimo hooray! 22:15
jnthn 'night, timotimo :) 22:16
Hopefully you might be able to run us a bench tomorrow :)
timotimo jnthn: did you have time yet to measure if this offsets the overhead added by adding the multi methods for assign and stuff?
ah
yeah, i can do that
jnthn timotimo: Oh, on Moar we're doing hash and array assignments in under half the time we used to.
timotimo oh crap! 22:17
that's excellent!
jnthn I think we can get spesh to do a PIC-ish thing and get better still too 22:18
22:19 colomon joined
timotimo position independent code? 22:19
jnthn polymorphic inline cache 22:20
Like what we do for methods
timotimo what exactly would be cached there? 22:21
22:21 virtualsue left
jnthn Two types. 22:21
Or one.
Depends on the call arity
And the candidate
timotimo and that's not already happening 'cuz it's a method call anyway? 22:22
jnthn So we can very quickly right there in the interp go to the typical case.
timotimo even though*
jnthn Well, this is about invoke rather than lookup
Of course, if we can statically work out what multi candidate we're gonna hit in spesh thanks to the caching...that's even better. :)
timotimo oh
yeah, it would
okay, bedtimes for now, benchtimes for tomorrow
jnthn :) 22:23
sleep well
timotimo hopefully better than last night :S
jnthn oh, you're sleeping badly this week too? :S
TimToady is just sleeping at the wrong time of day for some reason :) 22:25
22:26 kbaker_ left
jnthn TimToady: I just can't guess why... :) 22:32
TimToady for a moment I was blaming the backlog for putting me to sleep... 22:36
but that doesn't seem so likely now 22:37
22:38 rurban joined
dalek kudo/multispec: 2b99556 | jnthn++ | src/Perl6/Actions.nqp:
Unbust build on JVM.
22:41
kudo/multispec: 1a61362 | jnthn++ | tools/build/Makefile-JVM.in:
Don't try running Parrot test on JVM.

It skips rather than blows up, but it's still pointless to try.
22:43 rurban left
jnthn OK, seems multispec is good on the various backends... 22:46
dalek p: 9c92365 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Map setmultispec op for MoarVM.
nqp: b6ff62f | jnthn++ | src/QAST/Block.nqp:
nqp: Add is_thunk to QAST::Block.
22:46 dalek left 22:47 dalek joined, ChanServ sets mode: +v dalek
dalek kudo/nom: dcd156a | jnthn++ | src/Perl6/Metamodel/ (2 files):
Start using setmultispec on MoarVM.
22:49
rakudo/nom: eca0594 | jnthn++ | src/Perl6/Actions.nqp:
rakudo/nom: Auto-gen'd protos don't need special vars.
22:49 dalek left, dalek joined, ChanServ sets mode: +v dalek 23:05 lizmat joined
jnthn o/ lizmat 23:06
23:06 lizmat left
jnthn heh :) 23:06
23:08 lizmat joined
lizmat o/ jnthn 23:08
dalek p: fcae3c9 | (Andrew Egeler)++ | src/HLL/Compiler.nqp:
Fix REPL ctx-saving bug

This fixes a REPL bug: If a command had no output, $*MAIN_CTX wasn't being saved. This means, for example, 'use Test' (no output), followed by 'ok True' on the next line would throw an error (as if 'use Test' was never run).
23:10 woolfy joined 23:11 jnap1 left
jnthn lizmat: You might have a slightly faster spectest with today's work :) 23:11
lizmat well, for now I can't build after a Configure :-(
jnthn Oh. 23:12
Why?
lizmat MoarVM op 'setmultispec' is unknown as a core or extension op
at gen/moar/stage1/QAST.nqp:1435 (gen/moar/stage1/QAST.moarvm::53)
from gen/moar/stage1/QAST.nqp:1419 (gen/moar/stage1/QAST.moarvm:moarop_mapper:31)
jnthn huh
I bumped MOAR_REVISIOn and NQP_REVISION, I thought...
lizmat after doing a perl Configure.pl --gen-moar --gen-nqp --backends=moar
TimToady do we still need =master
?
jnthn Shoudln't 23:13
oh, wait
yeah, I screwed up the bump
Sorry
dalek p: 28688ac | jnthn++ | tools/build/MOAR_REVISION:
Fix MoarVM revision bump.
23:14
kudo/nom: f85ac4e | jnthn++ | tools/build/NQP_REVISION:
Get correct Moar version, REPL fix.
23:15 bluescreen10 joined
jnthn lizmat: That should work out better. 23:15
lizmat already pulled, building now
jnthn hopes it works out better :) 23:20
23:20 bluescreen10 left
lizmat builds ok, spectesting now 23:20
some errors in depreciations 23:21
jnthn huh...I got those cleaned up, I thought... 23:22
uh
no, I didn't push that patch
gah
lizmat Files=801, Tests=31033, 195 wallclock secs ( 8.39 usr 3.75 sys + 1282.07 cusr 94.43 csys = 1388.64 CPU) 23:24
dalek p: 80fcbf7 | jnthn++ | tools/build/MOAR_REVISION:
Get Moar with backtrace generation thunk fixes.
lizmat not much difference, I'm afraind :-(
jnthn lizmat: Uh, it was above 200 yesterday, no?
lizmat no, it was already at ~193 or so
jnthn Ah
Got a little faster for me. 23:25
But only by a few seconds.
lizmat Files=801, Tests=31033, 195 wallclock secs ( 8.40 usr 3.95 sys + 1281.41 cusr 100.53 csys = 1394.29 CPU)
was one from yesterday
jnthn hm, k 23:26
Oh...
But guess you also got the spesh merge now.
And it's a little over-eager to specialize at the moment, which means we slowed startup a small amount. 23:27
I was comparing with that yesterday vs. today
lizmat ack
jnthn Anyway, that means your spectest looks good with spesh :)
TimToady is multispec merged now? 23:28
jnthn TimToady: Yeah.
dalek kudo/nom: e498597 | jnthn++ | tools/build/NQP_REVISION:
Get Moar backtrace/thunk interaction fix.
jnthn TimToady: And the assign_pos work.
TimToady \o/ 23:29
jnthn while_array_set from p6bench is running in under half the time it used to take.
TimToady does @foo[$bar][$baz] = $blech; use assign_pos? 23:30
jnthn should
lemme check
23:30 dmol left
jnthn uh, it is but with a vaveat 23:31
*caveat
23:31 woolfy left
jnthn That is, it relies on a WHENCE for the auto-viv aspect of it. 23:32
So it's one WHENCE, not 2.
TimToady 1st level is still auto..what you said
jnthn Where is the -1 check meant to go, ooc?
23:32 lizmat left
jnthn Or negative indexing generally 23:32
At present, Rakudo has it in postcircumfix:<[ ]> 23:33
TimToady I'd think you can report it as soon as you notice it
standard semantics never allow -1 for a .[]
jnthn Well, at present we do:
multi sub postcircumfix:<[ ]>( \SELF, \pos ) is rw { fail "Cannot use negative index $(pos) on $(SELF.WHAT.perl)" if pos < 0; SELF.at_pos(pos); 23:34
}
gah, paste fail
That fail, with current stuff, frustrates inlining the postcircumfix
TimToady well, it's really just a lower bounds check
23:35 ajr_ left
TimToady and you'll still want bounds checks after inlining 23:35
jnthn Yeah; it's the fail call that we can't inline.
TimToady (modulo proofs of unneededness)
why not?
it was never really the intent that fail be implemented mandatorily via "return" 23:36
jnthn The fixable reason is that we never inline anything that makes a sub call 'cus we don't do the scoping analysis to ensure the inline won't lead to a different answer. 23:37
That is, the "I know how to fix it" reason
TimToady well, fail was envisioned more as an alternate return
jnthn The fact fail ends up needing a return handler installing is the trickier bit.
TimToady can you inline something with a normal return yet?
23:38 lizmat joined
jnthn No, unless the return is vanished. 23:38
I suspect that wants fixing, though.
TimToady well, if it vanised by turning into a goto END instead...
*sh
jnthn Yeah, quite...
TimToady and fail can do the same
23:38 woolfy joined
TimToady at top level 23:38
jnthn It's all do-able, it's just in the "more than a few hours work" category :)
23:39 rurban joined
TimToady well, you almost have more than a few hours till dawn... 23:39
jnthn :P
I also slept awfully earlier in the week, so I should probably sleep :)
TimToady wishes you sweet (or absent) dreams 23:40
jnthn Anyway, was just seeing if it was in the right place before I went worrying over if I need to work out how to get that inline blocker dealt with... :)
TimToady well, can't know index till runtime mostly
jnthn Right.
I wasn't sure if the answer was going to be "at_pos should be checking it" 23:41
TimToady though could probably notice that you're using an index over a known range
jnthn (on the basis that some array types should allow negative indexes and so we want to leave it up to the type)
TimToady well, you'll just run into the same issue when you go to inline at_pos :)
jnthn Well, that's different though
That's a method. The compile-time inliner doesn't go for those; they're left for the VM. 23:42
23:42 BenGoldberg joined
jnthn Whereas postcircumfixes are subs so we could inline them. 23:42
TimToady the intent is that .[] be limited to non-negatives by design, and you use .{} for other stuff
jnthn OK. Then it's in the right place and I'll just need to fathom the inline. :)
oh...the other question on that... 23:43
TimToady or forcing people to use .() for fancy stuff isn't so bad
jnthn Should we be promising at_pos that we give it an Int index?
23:43 rurban left
jnthn Oh, wait 23:43
oh, hm
I was gonna say @a[Inf]
But all it does is whine about that :) 23:44
It may be more efficient if at_pos can expect an Int and the postcircumfix is meant to provide it with one.
But not enough to make it worth doing if it's a pain language-design wise.
TimToady is all in favor of efficiency these days
lizmat is too tired to follow what is going on here...
TimToady at_pos is only sort of user-facing 23:45
jnthn Yeah
lizmat seems it is more efficient to get some sleep
jnthn lizmat: Probably ;)
TimToady it's fine to limit to Int
jnthn OK, I'll play with that tomorrow then.
I think we can get it to work out better than way.
TimToady seems likely to me too
jnthn The other thing I can do if I really feel like cheating is just have the optimizer spot that the postcircumfix candidate list matches the CORE.setting one exactly and cheat. 23:46
Rather than making it fall out of the general inlining mechanism.
The latter is what I want eventually, of course. 23:47
TimToady the autoviv on non-last dimension only happens if you didn't preallocate anyway
jnthn *nod*
And you only pay the cost the first time anyway.
After that it's viv'd and it's just an at_pos access 23:48
TimToady 'course, forest copies the array each time through
jnthn Yeah
The other thing that's really costing us, looking at Moar traces, is creating scalar containers.
TimToady yes, cheating on the builtin types doesn't feel much like cheating to me
assign_pos to natives should help a lot there 23:49
jnthn I'm wondering just how much Moar can escape analyze them away too.
TimToady has no feelings about that 23:50
jnthn I think it can make a decent shot at it, but it's not entirely trivial to implement.
Probably worth it though.
TimToady anyway, Perl has always separated array access from hash access so that arrays could be fast
jnthn *nod*
TimToady so you can still bank on that
jnthn Mebbe I'll work on teaching the optimizer to do some better analysis on variables tomorrow. 23:51
(Perl6::Optimizer that is)
23:51 segomos left
jnthn The other thing is that since WHENCE is a less common case, we might be able to make every scalar 8 bytes smaller. 23:52
If we can have a way of using a mixin-y thing for those that want it.
Or subtype... 23:53
TimToady or even a bit in the header, worst case
jnthn Well, lots to ponder...
*sigh* I need to deal with Moar's strings at some point too... 23:54
23:54 BenGoldberg left
TimToady might be able to help some with that, since that's one of my passions 23:54
jnthn ooh :) 23:55
NFG? ;)
TimToady that's how they've labeled my code at times :) 23:56
jnthn Could do with some more general cleanups/opts first, though.
haha :D
Anyways, I should rest... :)
'night
TimToady o/
23:56 rurban joined 23:58 segomos joined