»ö« 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:01 virtualsue left 00:07 vendethiel- left 00:09 pmurias left 00:12 vendethiel joined 00:19 beck_ joined 00:21 BenGoldberg joined 00:22 denis_boyun_ left
beck_ m: my %hash=(a=>"A-key"); say "GOOD" if (%hash<a>:exists && True) 00:30
00:30 Alula left
camelia rakudo-moar 91d899: OUTPUT«GOOD␤» 00:30
beck_ m: my %hash=(a=>"A-key"); say "GOOD" if (True && %hash<a>:exists)
camelia rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/Bjg9uQhlGj␤You can't adverb that␤at /tmp/Bjg9uQhlGj:1␤------> ; say "GOOD" if (True && %hash<a>:exists⏏)␤ expecting any of:␤ pair value␤»
00:34 raiph joined 00:35 vendethiel left 00:40 vendethiel joined
beck_ Just read the S03, the adverb being applied to the operator..(I thought they were tighter for some reason) 00:41
00:44 Alula joined
TimToady it modifies the loosest operator tighter than comma 00:58
m: my %hash = a => "A-key"; say "GOOD" if True and %hash<a>:exists 00:59
camelia rakudo-moar 91d899: OUTPUT«GOOD␤»
TimToady good place for the loose variant of &&
and you don't need any of those superstitious parens :) 01:01
beck_ I had just chosen the parens form over 'and' out of superstition. Changing it since you called me out on it. (looks much better now) 01:17
01:19 rurban left 01:22 vendethiel left 01:31 ron1230 joined
ron1230 Forgot to mention ... Could someone please drop an atomic bomb or two on Israel and blow up 1 WTC / the Freedom Tower. Microwaving babies me also be a relavant answer to some of the targeted abuse I see. 01:34
01:34 ron1230 left 01:40 dayangkun joined
tony-o classic ron, lol 01:46
01:48 ssqq joined 01:59 vendethiel joined 02:03 ron1230 joined
ron1230 s/relavant/relevant/ 02:05
02:06 ron1230 left 02:11 jimmy__ joined
jimmy__ moritz: 7th annual edition? Isn't 6th? 02:11
02:17 perltricks left, jimmy__ is now known as JimmyZ_ 02:24 vendethiel left
ssqq :m my $x = 'str'; given $x { when 5 { say 'int' } when 'str' { say 'str' }} 02:32
colomon m: my $x = 'str'; given $x { when 5 { say 'int' } when 'str' { say 'str' }} 02:34
camelia rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/IPit9TR4zM␤Missing semicolon.␤at /tmp/IPit9TR4zM:1␤------> 'str'; given $x { when 5 { say 'int' } ⏏when 'str' { say 'str' }}␤ expecting any of:␤ postfix␤ …»
ssqq m: my $x = 'str'; given $x { when 'str' { say 'str' } when 5 { say 'int' }} 02:36
camelia rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/zhxDFt5MRU␤Missing semicolon.␤at /tmp/zhxDFt5MRU:1␤------> r'; given $x { when 'str' { say 'str' } ⏏when 5 { say 'int' }}␤ expecting any of:␤ postfix␤ …»
colomon m: my $x = 'str'; given $x { when 5 { say 'int'; }; when 'str' { say 'str'; };}
camelia rakudo-moar 91d899: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏str' (indicated by ⏏)␤ in method Numeric at src/gen/m-CORE.setting:13766␤ in sub infix:<==> at src/gen/m-CORE.setting:4599␤ in sub infix:<==> at src/gen/m…»
colomon oooo, that seems bad 02:37
m: say "str" ~~ 5 02:40
camelia rakudo-moar 91d899: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏str' (indicated by ⏏)␤ in method Numeric at src/gen/m-CORE.setting:13766␤ in sub infix:<==> at src/gen/m-CORE.setting:4599␤ in sub infix:<==> at src/gen/m…»
ugexe m: my $x = 'str'; given $x { when 'str' { say 'str' }; when 5 { say 'int' }} 02:42
camelia rakudo-moar 91d899: OUTPUT«str␤»
ssqq ugexe: predicate with Str should at first if *$_* maybe is Str. 02:45
JimmyZ_ oh, please file a bug :P 02:46
m: my str $x = 'str'; given $x { when 5 { say 'int'; }; when 'str' { say 'str'; };} 02:47
camelia rakudo-moar 91d899: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏str' (indicated by ⏏)␤ in method Numeric at src/gen/m-CORE.setting:13766␤ in sub infix:<==> at src/gen/m-CORE.setting:4599␤ in sub infix:<==> at src/gen/m…»
JimmyZ_ m: my Str $x = 'str'; given $x { when 5 { say 'int'; }; when 'str' { say 'str'; };}
camelia rakudo-moar 91d899: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏str' (indicated by ⏏)␤ in method Numeric at src/gen/m-CORE.setting:13766␤ in sub infix:<==> at src/gen/m-CORE.setting:4599␤ in sub infix:<==> at src/gen/m…»
BenGoldberg m: my Str $x = 'str'; given $x { when 'str' { say 'of course its a str' } } 02:49
camelia rakudo-moar 91d899: OUTPUT«of course its a str␤»
BenGoldberg m: my Str $x = 'str'; given $x { when Int { say 'huh' }; when 'str' { say 'of course its a str' } } 02:50
camelia rakudo-moar 91d899: OUTPUT«of course its a str␤»
BenGoldberg m: my Str $x = 'str'; given $x { when Int { say 'huh' } }
camelia ( no output )
BenGoldberg m: my $x = '123'; given $x { when 5 { say 'huh' } }
camelia ( no output )
BenGoldberg m: my $x = '123'; given $x { when 123 { say 'huh' } }
camelia rakudo-moar 91d899: OUTPUT«huh␤»
BenGoldberg m: my $x = '123'; given $x { when False { say 'huh' } } 02:51
camelia ( no output )
ssqq m: say so 'str' ~~ Int;
camelia rakudo-moar 91d899: OUTPUT«False␤»
02:52 chenryn joined
BenGoldberg m: say rx/ 'abc' / ~~ 123; 03:12
camelia rakudo-moar 91d899: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤ in sub infix:<==> at src/gen/m-CORE.setting:4599␤ in method ACCEPTS at src/gen/m-CORE.setting:4370␤ in block <unit> at /tmp/HyVppHmc24:1␤␤»
03:14 Mso150_s joined 03:30 noganex_ joined 03:34 noganex left 03:48 Mso150_s left
BenGoldberg m: my @a = (^5).pick(*); my $p = Promise.new; for ^4 -> $id { my @b = @a; start { say "$id begun"; repeat { print $id; @b .= pick(*) } until [<=] @b; $p.keep(@b); say " $id done" } }; say 'await'; say await $p; # concurrent bogosort! 03:52
camelia rakudo-moar 91d899: OUTPUT«0 begun␤01 begun␤12 begun␤2await␤3 begun␤3102130210321032103213021032132013201320132032013201320123102301230123012301203123012301231021302130213021302310231020312032031230213023021302130213021302130213021302130213021320132013201320312031203120312…»
BenGoldberg m: my @a = (^5).pick(*); my $p = Promise.new; for ^4 -> $id { my @b = @a; start { say "$id begun"; repeat { print $id; @b .= pick(*) } until [<=] @b; $p.keep(@b); say " $id done" } }; say 'await'; say await $p; # concurrent bogosort!
camelia rakudo-moar 91d899: OUTPUT«0 begun␤01 begun␤12 begun␤2await␤3 begun␤0132103120312302310130 2 done␤13010130 1 2 3 4␤01»
03:54 kurahaupo left 03:57 kurahaupo joined, kurahaupo left 03:58 vendethiel joined 04:30 anaeem1 joined 04:38 perturbation left 04:41 vendethiel left 04:43 Woodi left, Woodi joined 04:51 chenryn left, mr-foobar left, mr-fooba_ joined 04:54 kaleem joined 05:02 kaare_ joined 05:06 vendethiel joined, bjz_ left 05:07 chenryn joined, dayangkun left 05:08 bjz joined 05:18 bjz left 05:19 kaleem left 05:28 vendethiel left 05:29 ssqq left
moritz good morning 05:33
05:36 vendethiel joined 05:40 BenGoldberg left
JimmyZ_ good morning 05:55
05:57 vendethiel left 05:58 kaare_ left 06:01 telex left 06:02 telex joined 06:11 mr-fooba_ left 06:18 [Sno] left 06:19 raiph left 06:22 mr-foobar joined, kaare_ joined 06:30 vendethiel joined 06:50 cognominal left 06:52 vendethiel left 06:56 cognominal joined 07:10 kaleem joined 07:17 ssqq joined
ssqq :m package Foo::Bar {}; package Bar is Foo {}; 07:17
m: package Foo::Bar {}; package Bar is Foo {}; 07:18
camelia rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/DROS8jkoGD␤Foo does not support inheritance, so Bar cannot inherit from it␤at /tmp/DROS8jkoGD:1␤------> ␤»
ssqq How to declar a *inheritable* package?
07:20 dj_goku left, [Sno] joined 07:26 jluis joined
ssqq How to declare *inheratable* package? 07:31
07:34 dj_goku joined 07:35 denis_boyun joined 07:36 KCL_ joined
jnthn ssqq: "class" 07:44
You need class in both places instead of package there. 07:45
ssqq m: class Foo {}; package Bar is Foo {};
camelia rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/vEkFSoZGXT␤Method 'add_parent' not found for invocant of class 'Perl6::Metamodel::PackageHOW'␤at /tmp/vEkFSoZGXT:1␤------> ␤»
jnthn *both*
ssqq m: class Foo {}; class Bar is Foo {}; 07:46
camelia ( no output )
jnthn In Perl 6 we have a number of package declarators (package, module, class, role, grammar) which provide different behaviors. 07:47
07:48 FROGGS joined
ssqq :m class Foo { our $foo = 1; }; class Bar is Foo { say Foo::<$foo> } 07:50
:jnthn thanks.
FROGGS m: class Foo { our $foo = 1; }; class Bar is Foo { say Foo::<$foo> }
camelia rakudo-moar 91d899: OUTPUT«1␤»
07:52 bjz joined
ssqq m: my %hash = :a; if %hash<a>:exists { say '%hash exists <a>" } 07:56
camelia rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/FEEmjmaFwr␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/FEEmjmaFwr:1␤------> ash<a>:exists { say '%hash exists <a>" }⏏<EOL>␤ expectin…»
ssqq m: my %hash = :a; if %hash<a>:exists { say '%hash exists <a>' }
camelia rakudo-moar 91d899: OUTPUT«%hash exists <a>␤»
ssqq The syntax of *%hash<key>:exists* is come from NQP? 07:57
07:57 gfldex joined
jnthn No, was spec'd in Perl 6 from the start 07:57
NQP doesn't support it.
ssqq jnthn: I could find this symbol in CORE::.keys; *exists* is a internal attribute of Hash? 08:03
I could not find it
pnu tadzik: fyi supernovus changed the HTTP::Easy default host to (any interface), so deploying Bailador app to Heroku works now out of the box :-) github.com/pnu/heroku-buildpack-rakudo#usage
08:06 zakharyas joined 08:07 virtualsue joined
ssqq Note that Rakudo does not yet implement operator adverbs. As a workaround you can use the non-standard exists method. 08:08
jnthn: How to get all predeclared *package-name* of perl6? 08:09
moritz m: say GLOBAL::.keys 08:11
camelia rakudo-moar 91d899: OUTPUT«␤»
moritz hm 08:12
ssqq moritz: Where could learn more NPQ sepe or documents? 08:13
sepe = spec
JimmyZ_ what do you want to learn?
ssqq JimmyZ_: yes, I think NQP should more easier than perl6. 08:14
moritz ssqq: github.com/edumentab/rakudo-and-nq...als-course is one of the better learning resources
JimmyZ_ it's harder actually
moritz its structure is simpler, which makes it easier to understand, but you have to do more yourself 08:15
JimmyZ_ if you don't want to hack a compiler, then nqp is not your course
ssqq JimmyZ_: I think Perl 6 is only suitable language to hack compiler. 08:17
jnthn m: say CORE::.keys
camelia rakudo-moar 91d899: OUTPUT«%DEPRECATIONS @UNITS $init-time-num %FILETEST-HASH %CLEAN-PARTS-NUL &zip %pvalcodecache %propcodecache $?TABSTOP $UINT64_UPPER $sprintfHandlerInitialized $default &samewith &lastcall &nextsame &callsame &nextwith &callwith &redo &next &last &return &return…»
jnthn oh, packages
m: say CORE::.grep(!*.value)>>.key 08:18
camelia rakudo-moar 91d899: OUTPUT«%DEPRECATIONS @UNITS $init-time-num %FILETEST-HASH %CLEAN-PARTS-NUL &zip %pvalcodecache %propcodecache $?TABSTOP $UINT64_UPPER $sprintfHandlerInitialized $default &samewith &lastcall &nextsame &callsame &nextwith &callwith &redo &next &last &return &return…»
08:18 darutoko joined
jnthn oh? :) 08:18
JimmyZ_ ssqq: yeah, you can learn what you chioce :)
jnthn m: say CORE::.grep({ !.value.DEFINITE })>>.key
camelia rakudo-moar 91d899: OUTPUT«%DEPRECATIONS @UNITS $init-time-num %FILETEST-HASH %CLEAN-PARTS-NUL &zip %pvalcodecache %propcodecache $?TABSTOP $UINT64_UPPER $sprintfHandlerInitialized $default &samewith &lastcall &nextsame &callsame &nextwith &callwith &redo &next &last &return &return…»
08:18 rurban joined
jnthn hmm 08:19
m: say CORE::.keys.grep(/^\w/) # :P
camelia rakudo-moar 91d899: OUTPUT«Mu Any Cool Nil Attribute Signature Parameter Code Block Routine Sub Method Submethod Regex Str Int Num Parcel Iterable Iterator ListIter List Array LoL EnumMap Hash Capture ObjAt Stash Scalar Proxy Grammar Junction PROCESS Bool False True ContainerDescrip…»
08:20 Isp-sec joined
jnthn Note taht :exists is a named argument to indexing an array. 08:22
Not a package.
Also, Rakudo very much does implemnt operator adverbs and has for a while now...so guess something is outdated...
teaching &
JimmyZ_ m: say CORE::.exist('Mu'); 08:23
camelia rakudo-moar 91d899: OUTPUT«No such method 'exist' for invocant of type 'PseudoStash'␤ in block <unit> at /tmp/T89vh8k8we:1␤␤»
JimmyZ_ m: say CORE::.exists('Mu');
camelia rakudo-moar 91d899: OUTPUT«No such method 'exists' for invocant of type 'PseudoStash'␤ in block <unit> at /tmp/dI_9Xsp5Y4:1␤␤»
jnthn m: say CORE::<Mu>:exists 08:25
camelia rakudo-moar 91d899: OUTPUT«True␤»
jnthn really teaching, now everyoen is here... :) &
JimmyZ_ happy teaching :) 08:27
08:27 yeahnoob joined, yeahnoob left, yeahnoob joined 08:31 abraxxa joined 08:37 KCL_ left
ssqq jnthn: Where could get a NQP interpreter? 08:40
moritz nqp-m: say('hi ssqq');
camelia nqp-moarvm: OUTPUT«hi ssqq␤»
08:41 beck_ left
ssqq moritz: O, rakudo have buit-in NQP interpreter. 08:42
moritz ssqq: well, if you build rakudo, you first build nqp
ssqq: though of course you can download and build nqp on its own too
08:46 ssqq left 08:47 vendethiel joined
masak morning, #perl6 08:51
08:51 Mso150 joined
masak feels sorry for ron1230 :( 08:52
08:56 dagerik joined
dagerik use v6;my @f=1,1,{$^a+$^b}...*;say @f[42]~".html"; 08:56
what does this do
moritz m: use v6;my @f=1,1,{$^a+$^b}...*;say @f[42]~".html"; 08:57
camelia rakudo-moar 91d899: OUTPUT«433494437.html␤»
08:57 sergot joined
moritz dagerik: does "it prints '433494437.html'" answer your question? 08:57
sergot hi o/
dagerik how does it print that. i dont know perl. where does it get numbers from 08:58
moritz dagerik: this article explains it: justrakudoit.wordpress.com/2010/08/...moization/ 08:59
cosimo less test failures in lwp-simple hopefully 09:02
moritz \o/ 09:03
sergot: it would be awesome if you could write a post for the Perl 6 advent calendar about your gsoc project 09:04
09:09 vendethiel left
sergot moritz: with pleasure :) 09:10
09:12 pecastro_ left
sergot moritz: how many posts do we already have? 09:14
moritz sergot: 9 09:16
sergot I will write it, should I send it to you then?
or how does it work?
moritz sergot: no, you should claim a day in the perl6/mu/ repo in misc/perl6advent-2014/schedule
sergot: and I'll send you an invitation for the blog system
09:17 vendethiel joined
sergot moritz++ great, it is clear now :) 09:17
09:18 virtualsue left 09:21 dakkar joined 09:22 ptc_p6 joined
dalek : 306d7ad | sergot++ | misc/perl6advent-2014/schedule:
p6 advent calendar post added
moritz sergot: btw you can write your post whenver you want, and schedule it for publication within wordpress 09:37
09:38 vendethiel left 09:40 vendethiel joined
sergot moritz: awesome :) 09:41
09:42 yeahnoob left, dagerik left 09:57 ptc_p6 left, ptc_p6 joined 09:59 myp left 10:03 Isp-sec left 10:04 fhelmberger joined 10:05 myp joined 10:09 kurahaupo joined 10:12 Ven joined, virtualsue joined
Ven moritz++ 10:12
also, oyez, #perl6
10:12 virtualsue left 10:16 virtualsue joined
arnsholt Salut, Ven! 10:16
10:19 Ugator joined 10:26 vendethiel left 10:29 JimmyZ_ left
timotimo o/ 10:31
10:32 araujo joined 10:34 mvuets joined 10:37 jluis left, daxim joined
cosimo connection refused when running panda. known? 10:37
10:38 bjz left, Mso150 left
timotimo it's come up a bunch of times in the recent days 10:40
it seems to be due to trying the AAAA first and not falling back to the A record when we get a connection refused
and i have no idea why the server isn't listening on AAAA 10:41
10:41 jluis joined
masak learns about 'oyez' 10:42
10:43 vendethiel joined
arnsholt I recognize it as (pretty old) French. Does it have more recent use too? 10:43
masak seems to be used in English courts. 10:45
cognate with Latin 'audire'.
osfameron and spanish oír 10:46
arnsholt Right, that makes sense 10:47
masak osfameron: oíc 10:48
osfameron :D
arnsholt Trust the English to keep random bits of French hanging around =D
masak from the disgusting-sentences-you-did-not-expect-to-hear-when-you-woke-up-this-morning department. 10:49
Ven arnsholt: it is old french, yes :) 10:50
chivalry time stuff... 10:51
(I once looked at a list of "french words used in english", I couldn't recognize half of them)
timotimo does someone want to explain value types to theo on the mailing list? 10:54
Ven checks the mailing lists 10:55
haha. 10:57
11:02 pecastro joined
masak pens an answer 11:03
11:05 noganex joined 11:06 vendethiel left
masak sent. 11:07
11:08 noganex_ left
timotimo thanks 11:08
11:14 rindolf joined 11:15 pmurias joined 11:19 |Tux| left
tadzik pnu: wow, awesome :) 11:25
timotimo tadzik: can you have a look at why the panda metadata server doesn't respond to v6 connections? 11:27
tadzik timotimo: yeah
timotimo thanks
11:27 TuxCM joined
tadzik fixed 11:27
timotimo that was quick
why didn't you do that like four days ago? :) 11:28
tadzik I did :)
'tis a fragile thing
timotimo what makes it so fragile? and how hard would it be to have a fallback server somewhere? 11:31
tadzik well, mostly feather reboots make it fragile
timotimo does feather have systemd? you could set it up to run the server even on your uid/gid 11:32
tadzik and it's still just a starman server running on my account, which I restart after every reboot
timotimo i think someone said we would have that server run on port 80 on "the regular" web server at some near point 11:33
and of course we'll have cpanda soon-ish 11:34
huh 11:35
installing gtk-simple with panda works, with ufo it errors out either when building or when running tests 11:36
11:39 rindolf left, rindolf joined 11:42 noganex_ joined
timotimo now i'm annoyed 11:42
i was under the impression that GTK::Simple was broken and i needed to find a workaround 11:43
11:44 kaleem left
dalek k-simple: 457871d | (Timo Paulssen)++ | lib/GTK/Simple.pm6:
remove superfluous .so from library name
11:44 jluis left, darutoko left 11:45 noganex left 11:49 darutoko joined 11:50 jluis joined
dalek p-js: b438b9a | (Pawel Murias)++ | / (3 files):
Avoid having a mini-nqpmo, concatentate the nqpmo in the standard manner.
p-js: d212c74 | (Pawel Murias)++ | src/core/NQPMu.nqp:
Revert "Temporarly add nqp-js hacks to the setting."

This reverts commit b3387d74ff2173ed852530585ae9b587cd7e4274.
p-js: d2fb4b8 | (Pawel Murias)++ | tools/build/ (2 files):
Hardcode less things while building mininqpmo.
p-js: 7368510 | (Pawel Murias)++ | / (3 files):
Stop calling nqpmo "mininqpmo".
mvuets i just made a fresh rakudo moar + panda build via rakudobrew++
yoleaux 30 Nov 2014 20:12Z <[Coke]> mvuets: using .tell is more likely to get heard later.
mvuets and panda crashes: paste.scsys.co.uk/449465
is it me or something new? 11:52
11:52 Ven left
mvuets [Coke]++ noted, thanks (-: 11:52
11:55 chenryn left 11:59 pecastro left, pecastro_ joined 12:05 bjz joined, atta_ left, atta joined 12:10 vendethiel joined
timotimo rakudobrew could get a "share to twitter" feature 12:11
carlin I am finding that rakudo isn't practical for a CGI webapp as each process uses too much memory :( 12:13
moritz carlin: :( how much does it use? Which backend?
12:13 JimmyZ_ joined
JimmyZ_ carlin: it is! 12:14
timotimo carlin: why would you do CGI webapps? it's 2014, almost 2015. that's about 15 years after the point where nobody would ever want to use CGI for anything ever 12:15
carlin moar backend, each process uses around 70MB
JimmyZ_ carlin: github.com/unbit/moarvm-uwsgi-skel
timotimo are you for real?
that used to be more!
a rakudo-moar process is 120 megabytes of ram on my system :( 12:16
carlin so ~30 concurrent requests will bring down the server, whereas with P5 and python 100s of requests don't even register 12:17
(server has 2GB RAM) 12:18
timotimo yeah
we're aware rakudo uses more ram than is sensible
on the other hand
you can have a rakudo process run with multiple processes
and do async I/O
so you don't need the same amount of processes
carlin yeah there are definitely a better way to do it 12:19
timotimo python and perl5 do have some async i/o, too, but it can still bottlenecked on CPU
carlin just the simplest possible thing that works doesn't work
timotimo basically every other way is better, like FastCGI
12:19 noganex joined
timotimo and FastCGI isn't even that good 12:19
carlin are there any plans regarding the memory usage? what makes it so high? 12:20
timotimo several things 12:21
a good source of memory usage reduction had been to only deserialize objects, static frames and codes, types and stuff when they are used for the first time 12:22
12:22 noganex_ left
timotimo i'm hoping we can get some more usage reduction out of that 12:22
JimmyZ_ yeah, like lazy_load, lazy-deserialization, NSA, spesh
timotimo NSA and spesh don't help reduce the minimum memory usage 12:23
actually, i'd argue spesh increases it
but it shouldn't be very noticable
i may be mistaken
JimmyZ_ and on-stack-allocation frame? 12:24
timotimo disabling spesh gets "say 'test'" from 120 megabytes down to 107 megabytes
JimmyZ_: you mean what we'll get when we have escape analysis?
leaving spesh on but turning off the jit gets us to 112 megabytes 12:25
JimmyZ_ timotimo: nope, I mean what brrt ever said
timotimo ah, right
i thought that was mostly a cpu-time improvement
12:28 chenryn joined
JimmyZ_ and we don't have static optimizer before writing .moarvm 12:28
which may reduce the size ... 12:29
12:29 pecastro_ left
timotimo ah, yes 12:29
i was thinking we're probably generating excessive set instructions by having InstructionList objects with a given result_reg and not using the knowledge of that result_reg in the "last" instruction 12:30
12:31 pecastro joined
JimmyZ_ if we have smart static optimizer like GCC :P 12:31
timotimo there's no reason why we couldn't have an off-line optimizer 12:32
like a program that loads a .moarvm file, optimizes the bytecode, writes it back 12:33
we could invoke that during installation for excessively big things like the core setting as well as the stage0
JimmyZ_ yup
12:33 vendethiel left
timotimo maybe we could make the process that does the optimization "portable" so that it could be moved into moarvm itself at some point 12:34
JimmyZ_ like: mark it as static optimization or dyn optimization? 12:35
12:35 vendethiel joined
timotimo that's not what i mean 12:35
our dynamic optimizer should of course always grow, because it has more data to work with
we don't have the necessary data from the logging stage and the arguments passed when we'd statically optimize 12:36
JimmyZ_ yeah 12:46
12:49 mvuets left, mvuets joined 12:51 rindolf left 12:52 rindolf joined 12:55 anaeem1 left 12:57 smls joined 12:58 rindolf left, rindolf joined 12:59 vendethiel left 13:00 chenryn left
smls moritz: Shouldn't the p6advent post title start with «Day 01 - » ? 13:01
b2gills m: rand(1); # (1..N) should probably be (0..^N)
camelia rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/rZptIGSoZ6␤Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick␤at /tmp/rZptIGSoZ6:1␤------> rand⏏(1); # (1..N) should probably be (0..^N)␤»
13:07 pecastro left 13:08 vendethiel joined
moritz smls: yes 13:10
13:12 xinming_ left 13:13 xinming joined
mvuets nice post, btw, moritz++ 13:13
moritz thanks 13:15
[Coke] welcomes our US team back to work today. 13:17
moritz earth rotation temporarily completed 13:19
13:20 kaleem joined 13:23 xinming left 13:24 xinming joined
b2gills m: if 1, 2 -> $, $ { ... }; # any way this can be made to work 13:26
camelia rakudo-moar 91d899: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/zckVIq3LGB:1␤␤»
moritz b2gills: it doesn't make sense, because a two-element list is always True in boolean context 13:27
smls m: if 1, 2 -> [$a, $b] { .say for $a, $b }; 13:28
camelia rakudo-moar 91d899: OUTPUT«1␤2␤»
smls What moritz said, though.
moritz more simply written as { my ($a, $b) = 1, 2; .say for $a, $b } 13:29
13:30 vendethiel left 13:31 cibs left, cibs joined
b2gills So there is no way to cache two values in the same `if` block. 13:34
( and have the `if` block actually test the values )
moritz b2gills: you haven't told us yet how you want them tested? 13:37
any? or? xor?
13:37 pmurias left
moritz s/any/and/ 13:38
mvuets hm, that's an interesting question. i can imagine such pseudo use case: if $a, $b = foo(); !$a && $b > 42 { ... } # where $a and $b are bound to the lexical scope of if 13:41
(well, i stole it from golang) 13:42
13:43 vendethiel joined
Rounin What is that code supposed to do 13:48
Is the condition the bit after the semicolon?
mvuets yes
Rounin So the idea is to make $a and $b equal to foo(), but only for the purpose of the if 13:49
mvuets it's like the first bit in the classic C-loop
Rounin Not globally
mvuets right
rational: avoid polluting a scope
13:49 sven_123_ left
Rounin Not exactly a joy to read, though 13:49
mvuets agreed (-:
b2gills if .some.expensive.operations -> $a { if .another-expensive-operation -> $b { $a.say; $b.say }} 13:50
13:50 sven_123 joined
mvuets Rounin: golang uses that construct mostly for error checking (returned from functions) as it has no exceptions 13:51
Rounin Hmmm... 13:52
In my day we returned null if we didn't like something
mvuets what would be a single argument analogue in p6? in p5 it's: if ((my $x = foo()) == 42) { ... }
13:53 mvuets left
moritz Rounin: ... and read the error string from a global variable. Bad old days :-) 14:00
14:02 noganex_ joined
Rounin moritz: Error string? Just print "Kernel image segmentation 0xFFAAADF09AB09" and no one will dare question it 14:04
14:04 noganex left
masak tadzik: I was wondering about the reasons to make something as vital as panda installation dependent on something as unreliable as a running feather service. 14:04
14:05 vendethiel left
smls m: (if (0, 10).pick -> $x { say $x } else { say 'nope' }) for ^10 14:05
camelia rakudo-moar 91d899: OUTPUT«nope␤nope␤10␤10␤nope␤nope␤10␤10␤10␤10␤»
14:06 onebitboy left
smls mvuets: ^^ the arrow syntax does work, and for a single argument it can even makes sense to use it :) 14:06
m: (if (0, 10).pick -> $x { say $x } else { say $x }) for ^10 14:07
camelia rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/lKYVBAQAuE␤Variable '$x' is not declared␤at /tmp/lKYVBAQAuE:1␤------> 10).pick -> $x { say $x } else { say $x⏏ }) for ^10␤ expecting any of:␤ postfix␤»
smls m: (if (0, 10).pick -> $x { say $x } else -> $x { say $x }) for ^10 14:08
camelia rakudo-moar 91d899: OUTPUT«0␤10␤10␤10␤10␤10␤0␤10␤10␤10␤»
smls :)
moritz the nice syntax just doesn't work for storing + comparing 14:09
for that you still have to use if 42 == (my $x = ...) { }
smls oh, right
moritz but there's really a limit for how much sugar you can provide without causing diabetes :-) 14:10
.oO( if 42 == (foo -> $x) { ... } )
14:10 ptc_p6 left
smls Perl 5 "solves" it by making variables declared in a block header, lexical to the block. But that's an inconsistency Perl 6 tried to avoid... 14:12
tadzik masak: it's only recently unreliable
14:16 vendethiel joined
masak yes, granted. 14:20
moritz another solution is given foo() -> $x { when 42 { say $x } }
14:21 PerlJam joined
JimmyZ_ masak: any good esc paper suggestion? 14:26
14:27 ptc_p6 joined 14:31 kaare_ left 14:32 onebitboy joined 14:38 noganex joined
PerlJam #perl6++ (for starting to fill in the advent schedule) 14:41
14:41 noganex_ left
moritz PerlJam: will you write the "table of contents" post for this year? 14:43
14:43 pecastro joined
PerlJam sure 14:43
14:49 pecastro left 14:50 pecastro joined, exixt left
masak JimmyZ_: maybe www.ssw.uni-linz.ac.at/Research/Pap...ler_14.pdf 14:53
JimmyZ_ masak: oh, thanks
pretty big one :) 14:54
and pretty new: May, 2014
14:54 pecastro left
masak aye. 14:57
can't vouch for its quality, since I only skimmed it. 14:58
but it looks like it hits some very nice points.
15:02 vendethiel left
[Coke] an inline:p5 article would be awesome. 15:02
masak oh yes
nine? 15:03
masak realizes that "nine" would have been the perfect nick around the time of p4-p5 integration
JimmyZ_ masak: oh, it also mentioned Allocation Sinking optimization too 15:09
the paper
9.2.1 LuaJIT 15:10
15:10 vendethiel joined 15:11 pecastro joined 15:12 mvuets joined 15:13 onebitboy left
mvuets catching up on irc.perl6.org 15:14
15:15 noganex_ joined
jnthn just managed that :) 15:16
Agree that the if thing is probably already at the right level of sugar :) 15:17
Easy to get addicted and want more though :)
masak then define custom statement forms :>
not everything has to be solved in core. 15:18
15:18 [Sno] left
jnthn Hey, you the macro guy :P 15:18
mvuets i have to read up on this arrow operator
15:18 noganex left
jnthn Well, it's a way to write a block takng parameters rather tahn an operator 15:19
m: my $lol = -> $a, $b { $a ~ 'wtf' ~ $b }; say $lol('omg', 'bbq')
camelia rakudo-moar 91d899: OUTPUT«omgwtfbbq␤»
JimmyZ_ looks like we can steal many optimization ideas from luajit :P 15:20
masak yes, it's not an operator so much as the start of a term.
m: my &b = -> $what { say "look, I'm a $what!" }; b "term" 15:21
camelia rakudo-moar 91d899: OUTPUT«look, I'm a term!␤»
JimmyZ_ masak: thank, it really hits some very nice points
mvuets m: my $lol = sub ($a, $b) { $a ~ 'wtf' ~ $b }; say $lol('omg', 'bbq') 15:22
camelia rakudo-moar 91d899: OUTPUT«omgwtfbbq␤»
mvuets is an anonymous sub much different from an arrow block? 15:23
can i call it lambda?
or closure?
jnthn Yes, in fact -> is parsed in the gramamr by a rule lambda
It is a closure too