»ö« 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:09 colomon left 00:11 ajr_ left, atta joined 00:31 bjz_ left, bjz joined 00:37 jnap left, pdcawley left 00:40 pdcawley joined 00:42 MrMeek left 00:45 jnap joined, MrMeek joined 00:49 colomon joined 01:07 rurban left 01:10 rurban joined 01:12 rurban1 joined 01:15 rurban left 01:17 raiph joined 01:18 dwarring left 01:24 FROGGS_ joined 01:28 FROGGS left 01:29 vendethiel left 01:30 vendethiel joined 01:36 thou left 01:38 klapperl joined 01:41 klapperl_ left 01:47 lustlife joined
flussence I got a bit annoyed by the startup time of bin/perl6 (which turned out to be a copy of perl6-j), and I'm too lazy to type out perl6-{m,p} every time, so I wrote a replacement for it: gist.github.com/flussence/9966581 01:59
02:08 WJB left 02:12 WJB joined 02:30 xragnar_ joined, xragnar is now known as Guest71064, Guest71064 left, xragnar_ is now known as xragnar 02:47 evstigneev joined
xiaomiao flussence: interesting hack. Not sure if that makes sense in general - makes reproducing things potentially confusing 02:48
03:02 raiph left 04:02 evstigneev left 04:10 subbota joined 04:12 kaare_ joined 04:13 jnap left 04:18 xenoterracide left 04:22 dayangkun left 04:25 [Sno] left 04:26 [Sno] joined, [Sno] left 04:27 BenGoldberg left 04:30 Psyche^_ joined 04:34 Psyche^ left 04:35 dayangkun joined 04:43 jnap joined 04:47 jnap left 05:28 [Sno] joined 05:37 woosley left
moritz [Coke]: I'm installing libpcre3-dev on host07; no idea if that has UTF-8 support 05:40
yoleaux 3 Apr 2014 21:29Z <[Coke]> moritz: if we can get a recent pcre on host07 with UTF support to try to fix Pugs. Thanks!
05:44 dayangkun_ joined 05:48 dayangkun left 05:54 WJB left, denis_boyun joined 06:03 WJB joined 06:10 kaare_ left 06:15 hoverboard left 06:46 kaleem joined 06:50 dmol joined 06:57 subbota left 07:07 darutoko joined
sergot Hey! 07:13
masak ohayo
sergot Please help me :)
irclog.perlgeek.de/perl6/2014-04-03#i_8534489
07:15 zakharyas joined 07:17 fhelmberger joined
sergot got 3 answers so far :) 07:18
moritz sergot: my answer would be the same as FROGGS++'s, except that I'd list "mature concurrency support" as a plus for the JVM 07:20
as well as "interop with java"
sergot Ok, thanks moritz++
:)
arnsholt flussence: The perl6 script will be linked to whatever backend you listed first in --backends 07:24
So if you prefer Parrot or Moar, just put one of those first 07:25
sergot r: multi sub infix:<->(Str $a, Str $b) { return $a.split($b).join; }; say "abcdbe" - "b"; 07:27
camelia rakudo-parrot 972ef0, rakudo-jvm 972ef0, rakudo-moar 972ef0: OUTPUT«acde␤»
07:27 pecastro left
sergot What do you think about such a built-in sub? 07:28
r: multi sub infix:<->(Str $a, Str $b) { return $a.split($b).join; }; say "abcdbe" - "b" - "a";
camelia rakudo-parrot 972ef0, rakudo-jvm 972ef0, rakudo-moar 972ef0: OUTPUT«cde␤»
07:33 kaare_ joined
masak sergot: nice set of questions. I will try to fill it in later :) 07:33
&
07:38 denis_boyun left
sergot masak++: thanks in advance :) 07:40
Woodi hallo everyone 07:41
sergot hi Woodi
Woodi sergot: poll is via irc ? :) 07:42
ah, damn 07:43
gist have some functionality I was not aware off...
sergot Woodi: you can comment or fork it or just write here :) 07:45
07:46 jnap joined
Woodi just unforgotting my github pass. they tell me my password is "commonly guessed by hackers"... 07:46
xiaomiao o_O 07:48
Woodi if I brain-random choose subsets of pwgen generated passwords I make better pass or worse ? :)
07:50 jnap left
Woodi hmm, I see Java is now "run everywhere" ;) 07:52
xiaomiao run faster! 07:55
run away!!1
08:11 virtualsue joined 08:17 rurban1 left 08:36 FROGGS_ left 08:43 sftp_ left 08:46 sftp joined, jnap joined 08:47 rurban joined 08:49 grondilu joined
grondilu just learnt that microsoft has released C# source code: roslyn.codeplex.com/ 08:50
08:50 pecastro joined 08:51 jnap left
grondilu (the compiler I mean) 08:52
08:56 rurban left
Woodi sergot: looks I messed some buttons so gist.github.com/slunski/9970983 answers are 09:18
grondilu: Netscape and Sun opened some code just before going down... 09:26
09:26 hummeleB1 joined
Woodi but MS case is probably bit different, they plan for mobile market domination. or everywere demination with "fuller" versions of products... 09:27
would be better companies just develop open source products constantly... 09:28
xiaomiao Woodi: "but how can you profit"
Woodi by selling hardware of course :) 09:29
xiaomiao hnurgh. 09:31
Woodi by selling _individual_ support maybe ? anyway, by doing hard things and not plain, easy and overpriced... 09:33
xiaomiao by building good products? 09:34
man, I amuse myself too easily 09:35
09:47 jnap joined 09:52 jnap left, pecastro left
grondilu Woodi: fwiw, I was mentioning this because I wondered if that could be good news for Perl 6, as maybe some new ideas could be stolen for rakudo. 09:52
timotimo o/ 09:54
Woodi hej
timotimo i'd love to make a living doing support for companies to use Perl 6 and use "down time" for development :) 09:55
Woodi what rosylyn exactly is ? it is C# 4.0 compiler or something other ? 09:57
btw. are "assembiles" code compiled for native machine executable packs ? 09:58
timotimo i think assemblies is their name for any packaged bytecode and/or native code, but i'm not sure 09:59
10:04 pecastro joined
masak assemblies are a kind of unit of deployment, IIUC. 10:04
timotimo heyo masak 10:05
how's t4 coming along btw? :)
masak timotimo: my vacation starts today. it's entirely possible that during it, I'll be $dayjob-detoxed enough to turn to t4. 10:06
the coming ten days will tell :)
timotimo ooh 10:09
i wish you a pleasant vacation, whether or not you end up doing t4 :)
now i'm building nqp-moarvm with latest master and then with jnthn-lex-loc to run the benchmarks 10:14
and, i suppose, i could run them again with moarvm/spesh on top of that
since they would hopefully synergize well
10:14 denisboyun joined
grondilu wonders wth is wrong with rosettacode. It's very rarely online :/ 10:15
timotimo #rosettacode is on this network :)
grondilu goes there
10:26 virtualsue left
masak sergot: gist.github.com/sergot/9951466#comment-1205398 10:31
sergot masak: thank you! :) 10:36
Woodi++: thank you too :)
timotimo stay tuna'd for benchmarks in about half an hour 10:38
actually, i could also run master-spesh today 10:39
just to see how spesh+l2l would be more than the sum of its parts
sergot I've just updated the gist - added something to 3rd question. Will be great if you update your answers - but it is not necessary if you don't have enough time. 10:42
timotimo that's question 2 :) 10:44
sergot Oh, right, I'm sorry, 2nd :)
thanks timotimo 10:45
10:48 jnap joined 10:52 jnap left 10:56 FROGGS[mobile] joined
timotimo i'm a dummy sometimes :) 10:56
just because i named the folder something doesn't mean git automagically read my mind as to what branch to check out
and i was wondering why lex-loc + spesh was slower than just lex-loc 10:57
11:02 LLamaRider joined 11:05 rindolf joined
timotimo interesting results. 11:09
t.h8.lv/p6bench/2014-04-03-spesh.html - yesterday's rakudo master vs spesh 11:11
t.h8.lv/p6bench/2014-04-04-lexloc-spesh.html - today's nqp-master vs nqp-lexloc X moar-master vs moar-spesh 11:12
it's interesting that ll+spesh seems to actually be slower than ll-only for forest-fire 11:13
masak I get 9 failig spectests on an up-to-date Rakudo-Moar.
failing* 11:14
timotimo that seems about right
11:17 colomon left
masak that seems about 9 steps from right. :) 11:17
timotimo well, it seems like you haven't made it worse somehow in your local setup s'all 11:18
jnthn: does it discourage you that the work of several weeks (in the form of spesh) seems to give almost no benefit and the work of one evening (in the form of lex-loc) gives a 50% performance boost in the microbenchmark that it most directly impacts? :P 11:20
LLamaRider timotimo: it would be nice to also have the "target" you're aiming for in those plots. E.g. the P5 runtime
11:21 colomon joined 11:26 fhelmberger_ joined 11:28 fhelmberger left 11:46 txt-file joined 11:49 jnap joined 11:53 jnap left 11:54 rurban joined
daxim_ perl6: '|'.quotemeta.say 11:57
camelia rakudo-parrot 972ef0, rakudo-jvm 972ef0, rakudo-moar 972ef0: OUTPUT«No such method 'quotemeta' for invocant of type 'Str'␤ in block at /tmp/tmpfile:1␤␤»
..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method quotemeta in type Str␤ at /tmp/tmpfile line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4596 (module-CORE @ 576) …»
11:59 rurban left 12:07 pdcawley left
lizmat daxim_: everything non alphanumeric is meta in Perl 6, afaik 12:12
there is one specced in S32/Str:259, but there's also the question whether it is needed 12:14
[Coke] sergot: I would agree with moritz++'s modifications to FROGG++'s response. 12:15
12:21 benabik left, xenoterracide joined
sergot [Coke]++: thanks! :) 12:35
12:35 pdcawley joined
[Coke] sergot: I am also interested in rakudo on jvm because it will give the opportunity (eventually) to deploy perl 6 code in an J2EE-only environment. 12:37
12:37 virtualsue joined
[Coke] *a 12:37
daxim_ it is needed for porting code, p5 has quotemeta and \Q, python has re.escape 12:39
writing the whole time text.replace() like in ecmascript is unattractive 12:40
lizmat daxim_: so, for my understanding, do you need P5 or P6 semantics in .quotemeta? 12:42
12:42 SamuraiJack__ joined
lizmat in other words a .p5quotemeta or .quotemeta 12:42
moritz note that strings don't interpolate as regexes into regexes, but as literals
12:43 mtk joined
moritz lizmat: I don't think there's much difference; p5 quotemeta escapes everything except word characters and digits 12:43
12:50 jnap joined 12:51 kbaker_ joined, eiro_ joined 12:54 jnap left 12:55 rurban joined 12:57 ajr joined 12:58 ajr is now known as Guest80680, Guest80680 is now known as ajr_ 12:59 eiro_ left 13:00 rurban left 13:05 kbaker_ left 13:10 falk0n joined, mtk left 13:11 kaleem left 13:12 FROGGS[mobile] left 13:13 FROGGS[mobile] joined, falk0n left, mtk joined
lizmat is almost ready to unleash her new winner {} implementation on the world 13:18
13:20 kaleem joined 13:22 fhelmberger joined
PerlJam lizmat: take the leash off! Let it run wild! :) 13:22
13:22 fhelmberger left
dalek kudo/nom: 6768b72 | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
Re-implement WINNER, support "done @promises"

Much of the logic existed twice in the sub, this has now been simplified. Also, any parameter sanity tests are now performed *before* looking for a Promise/Channel so that problems in parameters do not stay hidden if they just did not happen to hit that case.
13:23
kudo/nom: e09c87d | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Simplify Supply.list, like Channel.list now

This seems now possible after the WINNER refactor
13:25 fhelmberger_ left, xfix left
timotimo LLamaRider: f5 to see p5 as well 13:26
lizmat: thanks for improving WINNER 13:27
i'm amazed i still have commit access to rakudo and nqp :P
lizmat timotimo++ for the initial implementation 13:28
timotimo you have pity on me, how nice ;))
lizmat I couldn't have refactored it without it, nor written it from scratch as easily
PerlJam timotimo++ lizmat++ 13:31
PerlJam builds a new rakudo 13:32
13:34 xfix joined
LLamaRider timotimo++ awesome, thanks for adding P5 to that! :) 13:46
13:48 kbaker_ joined
LLamaRider P5 is quite respectable in the benchmark in comparison, some way to go still 13:49
but definitely great visuals
13:50 jnap joined 13:54 jnap left 13:55 rurban joined 13:56 colomon left 13:58 thou joined 14:01 jnap joined
hoelzro morning #perl6! 14:02
PerlJam gutentag hoelzro
14:05 btyler joined, kaare_ left, salv0 left
timotimo LLamaRider: except almost all benchmarks are very poor for comparison's sake 14:05
14:06 rindolf left
LLamaRider how come? 14:08
14:12 jnap left
dalek kudo/nom: a544f29 | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
Oops, $:k should contain ordinal, not promise
14:15
14:21 kaleem left, falk0n joined
timotimo LLamaRider: if you look at japhb/perl6-bench on github, you'll see that they really are just microbenchmarks 14:21
14:22 salv0 joined 14:23 rindolf joined
timotimo in fact, they are in the microbenchmarks.pm (or .json?) file 14:24
the big majority of them
14:29 bluescreen10 joined 14:33 raiph joined
LLamaRider timotimo: I see. But they are still quite valuable to test the core of the language, so that's fine 14:37
I would even propose adding the super-slow example I found yesterday
r: (^10000).pick(*).sort; 14:38
P5 gets that done in 0.02 seconds
camelia rakudo-parrot 972ef0, rakudo-jvm 972ef0, rakudo-moar 972ef0: OUTPUT«(timeout)»
lizmat r: ^10000.sort
camelia rakudo-jvm e09c87: OUTPUT«Error while reading '/home/p6eval_eval/p6eval-token': Permission denied at /home/p6eval/jvm-rakudo/eval-client.pl line 10.␤» 14:39
( no output )
lizmat r: ^10000.list.sort
camelia rakudo-jvm e09c87: OUTPUT«(timeout)»
( no output )
14:39 isBEKaml joined 14:40 FROGGS[mobile] left, treehug88 joined 14:44 fhelmberger joined 14:45 virtualsue left 14:48 FROGGS[mobile] joined 14:52 FROGGS[mobile] left
timotimo LLamaRider: i would merge a pull request for you :) 14:53
14:53 FROGGS[mobile] joined
moritz eeks, somebody broke rakudo-j again on camelia 14:55
timotimo if it stays that way until monday, i'll put simplifying the sort function into the LHF of the p6weekly 14:56
moritz j: say 1 14:57
camelia rakudo-jvm e09c87: OUTPUT«(timeout)»
14:58 guru joined, guru is now known as Guest22852 14:59 ajr_ left 15:02 Guest22852 is now known as ajr_
timotimo r: my $test; for ^5 -> $OUTER::test { say $test }; say $test; 15:08
camelia rakudo-parrot e09c87, rakudo-jvm e09c87, rakudo-moar e09c87: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Malformed parameter␤at /tmp/tmpfile:1␤------> my $test; for ^5 -> $OUTER:⏏:test { say $test }; say $test;␤ expecting …»
15:09 fhelmberger_ joined 15:11 fhelmberger left 15:21 [Sno] left, kaare_ joined 15:27 isBEKaml left 15:28 fhelmberger_ left 15:36 denisboyun left 15:40 zakharyas left 15:42 jeffreykegler joined
jeffreykegler I wonder if someone on the list could help me -- recently there circulated what was (I thought) an excellent blog post (web page?) circulated on C language gotchas for those not used to programming at the von Neumann level: having to do your own memory allocation; track your own array bounds; make sure string lengths are correct; etc., etc. Does anyone remember where that was? 15:46
15:47 kbaker_ left
moritz jeffreykegler: I've read several such guides, mostly links from reddit.com/r/programming 15:51
jeffreykegler: there are several big institutions / companies that publish C coding guides with hints like the ones you mentioned 15:52
timotimo reddit annoys me. once you found something interesting, it's basically gone forever
unless you comment
or use internet 1.0 style bookmarks 15:54
jeffreykegler moritz: this may have been a reddit thing. Any suggestions for how/where I might search?
timotimo forget it, having something on reddit actually removes it from all search engines and indices
basically the text might as well never have existed
jeffreykegler timotimo: I know of many alternatives, but the particular one I have in mind was especially good, and I'd like to find it again ... 15:55
moritz jeffreykegler: stackoverflow.com/questions/4780873...es#4781724
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...id=4781724
jeffreykegler unfortunately my memory these days is as much of a sieve as reddit appears to be
moritz jeffreykegler: www.reddit.com/r/programming/search...&t=all 15:56
16:00 jeffreykegler1 joined
jeffreykegler1 This was not security-focused -- it was aimed at someone who could reasonably call himself a programming expert, but was not fully aware of the pitfalls of programming down to the metal. 16:01
16:01 jeffreykegler left
jeffreykegler1 has a flaky internet connection and is apologetic about popping in and out 16:01
geekosaur find a friendly vps provider and set up a znc. does wonders for me 16:03
timotimo a bnc? 16:04
weechat in a screen session works very well
i imagine a tmux session would be even nicer
btyler jeffreykegler: was it "ctraps": www.literateprogramming.com/ctraps.pdf ? 16:05
jeffreykegler1 btyler: another excellent resource, but not the specific one. 16:06
Anyway, I didn't give you guys much to go on,
and was hoping to get lucky anyway, so I perhaps should accept that the link has moved on into an alternative universe. 16:07
I did look follow up on all the links, and just didn't find it. Thanks for trying!! 16:11
segomos irssi+screen wins 16:14
16:15 pecastro left
timotimo screen is so last century 16:16
and weechat has convinced me 100% that it's more awesome than irssi :P
16:16 xenoterracide left
Woodi I tried two timesto use tmux but screen keybinds are perfect :) 16:17
dalek kudo-star-daily: f45aea1 | coke++ | log/ (5 files):
today (automated commit)
16:21
Woodi btw. for me we are still at Web 1.xx until it is fully Semantic or with _data_ separated from implementation :) scrapping included, etc...
moritz Woodi: then you might be interested in a project I'm pondering 16:26
Woodi: basically twitter, but for JSON messages, not just text
(and then format strings for human readable representations, possibly multi-lingual) 16:27
16:27 ajr_ left 16:32 guru joined 16:33 guru is now known as Guest33452, SamuraiJack__ left, Guest33452 is now known as ajr_, denis_boyun_ joined 16:38 denis_boyun__ joined, falk0n left 16:43 xfix left 16:49 [Sno] joined 16:52 xfix joined 16:56 rurban left 17:05 pdcawley left 17:07 pdcawley joined 17:14 denis_boyun__ left 17:16 kivutar joined 17:26 rurban joined 17:27 kbaker_ joined 17:31 rurban left, ajr_ left 17:35 xenoterracide joined 17:37 FOSScookie joined
FOSScookie I remember there being a link to a page that had the current state of rakudo and niecza development status. I cannot find it in the pidgin logs can you give me that link again? 17:44
17:46 dwarring joined
timotimo is that perl6.org/compilers/features or what's it? 17:47
17:47 kurahaupo joined, zakharyas joined
FOSScookie Yes, that is it. Thanks :) 17:48
dalek ast: 6a78aa6 | (David Warring [email@hidden.address] | integration/advent2013-day18.t:
completing 2013 advent day 18
17:49 kivutar left 17:57 FROGGS joined 18:01 xinming__ joined 18:03 FOSScookie left 18:04 xinming_ left 18:06 guru joined, guru is now known as Guest34620 18:07 Guest34620 is now known as ajr_
jnthn o/ from a train 18:11
FROGGS[mobile] o/ from a hotel
nwc10 \o from a balcony 18:12
timotimo ô
nwc10 (but I'm back in Vienna, after a breif dalliance in the UK (sort of), care of a roaming 3G) 18:13
grondilu r: say (rand xx 10)[0, 2 ... *] # is it ok to subscript a finite array with an infinite list of indexes? 18:14
camelia rakudo-moar a544f2: OUTPUT«0.690761385209 0.945037371008574 0.785832695826018 0.738640810376016 0.305420903360923␤»
..rakudo-jvm a544f2: OUTPUT«0.6956918283244483 0.6913481913265194 0.5712483954682283 0.5415502470378891 0.7891892362012431␤»
..rakudo-parrot a544f2: OUTPUT«0.211881146623881 0.0478726747414342 0.384264605105258 0.578718755202395 0.247960562410981␤»
grondilu wondered this as he was looking at rosettacode.org/wiki/Fast_Fourier_t...orm#Perl_6 18:15
jnthn grondilu: Apparently :P
18:15 telex left 18:16 telex joined
nwc10 FROGGS[mobile]: a hotel in Germany? Or further afield? 18:21
[Coke] hopes to get some spare time back after $dayjob project goes live this weekend. fingers crossed. 18:22
18:27 rurban joined
jnthn timotimo: spesh is a O(months) project building something that will enable/do dozens of different opts, lex2loc is a O(days) single opt. :) 18:28
grondilu rewrote FFT on RC: rosettacode.org/wiki/Fast_Fourier_t...orm#Perl_6 18:29
(no loop :-) 18:30
[Coke] rosettacode.org/wiki/Fast_Furious#six
18:31 raiph left 18:32 rurban left
PerlJam grondilu: nice. 18:33
(of course, I don't know what it looked like before, but that particular implementation is very concise and understandable) 18:34
grondilu yeah it's going to be hard to make it simpler 18:38
PerlJam
.oO( Just use the built-in fft() routine! ;)
18:38 FROGGS[mobile] left
grondilu though maybe a geometric sequence could be written 1, [\*] $r xx * 18:40
timotimo it seems like i didn't write it on the channel >_>
wait, i can find out!
1bc is on moarvm/master 18:41
so blue is spesh
hold on
both are on master
wat.
18:41 kurahaupo left
timotimo looks like i dun goofed up :) 18:41
did you see i was unable to build rakudo on top of lex-loc?
jnthn No 18:42
It's odd 'cus I built it just fine.
grondilu keeps thinking the degenerate case of [*] should be 1
[Coke] m: say [\*]
camelia rakudo-moar a544f2: OUTPUT«␤»
[Coke] m: say [*]
camelia rakudo-moar a544f2: OUTPUT«1␤»
timotimo but the output of triangle reduce is a list
[Coke] m: say [\+]
camelia rakudo-moar a544f2: OUTPUT«␤»
timotimo the empty list is just fine in my opinion 18:43
m: say [\*] 1
camelia rakudo-moar a544f2: OUTPUT«1␤»
timotimo m: say [\*] 1, 2
[Coke] timotimo++
camelia rakudo-moar a544f2: OUTPUT«1 2␤»
timotimo m: say [\*] 1, 2, 3
camelia rakudo-moar a544f2: OUTPUT«1 2 6␤»
grondilu sorry, I meant the first term of [\*] should always be 1
timotimo oh?
jnthn timotimo: How did it fail?
timotimo so you're saying triangle reduce should always include one invocation of the operator with no arguments?
grondilu m: say [\*] 2 xx *
oops 18:44
m: say [\*] 2 xx 5
camelia rakudo-moar a544f2: OUTPUT«(timeout)»
rakudo-moar a544f2: OUTPUT«2 4 8 16 32␤»
grondilu well, maybe that's a bit too much to ask.
timotimo m: say &[*](), [\*] 2 xx 5 18:45
camelia rakudo-moar a544f2: OUTPUT«12 4 8 16 32␤»
timotimo oops :)
m: say (&[*](), [\*] 2 xx 5)
camelia rakudo-moar a544f2: OUTPUT«1 2 4 8 16 32␤»
timotimo m: sub fixed_tri_red(&operator, @list) { &operator(), [\&operator] @list }; fixed_tri_red(&[*], (1, 2, 3, 4, 5)); 18:46
camelia rakudo-moar a544f2: OUTPUT«===SORRY!=== Error while compiling /tmp/M8Izodv1Af␤Two terms in a row␤at /tmp/M8Izodv1Af:1␤------> tor, @list) { &operator(), [\&operator] ⏏@list }; fixed_tri_red(&[*], (1, 2, 3, 4␤ expecting any of:␤ …»
timotimo m: sub fixed_tri_red(&operator, @list) { &operator(), [\&operator] |@list }; fixed_tri_red(&[*], (1, 2, 3, 4, 5));
camelia ( no output )
timotimo m: sub fixed_tri_red(&operator, @list) { &operator(), [\&operator] |@list }; say fixed_tri_red(&[*], (1, 2, 3, 4, 5));
camelia rakudo-moar a544f2: OUTPUT«1 any(sub+{<anon>}+{precedence} infix:<*>(Any $a?, Any $b?) { ... }, 1 2 3 4 5)␤»
grondilu more generally, I was thinking the first term of a triangular reduce metaoperation should always be the degenerate case of the applied operator.
timotimo what the f? :)
we should introduce a full triangle reduce metaoperator: [\\*] 18:47
18:49 darutoko left
grondilu so that arithmetic and geometric progressions could be written naturally [\+] $_ xx * and [\*] $_ xx * starting respectively with 0 and 1 (the two degenerate cases of [+] and [*] 18:49
)
timotimo rectangle reduce? [|*]
grondilu and factorial could be written [\*] 1 .. * (? not sure about thi one though) 18:50
grondilu thinks
dalek kudo/nom: 3325bb1 | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
Test for Promise/Channel on first one as well
grondilu yes, factorial would then be [\*] 1 .. *
jnthn timotimo: It builds fine here. 18:51
timotimo: Just tried it again from scratch 18:52
grondilu timotimo: I think it must still look triangular, but maybe with a ° to mean that we want the degenerate case as well. So [°\*]
or [.\*]
though to be fair I do remember TimToady has aready stated that it would be more difficult to teach, so I won't insist. It's just that this FFT code made me think about it and it keeps nagging me a little bit. 18:55
jnthn timotimo: It's hard to infer much from t.h8.lv/p6bench/2014-04-03-spesh.html at present. 18:57
timotimo: I suspect most of the differences are noise-ish.
19:01 Araq joined
nwc10 I have uploaded a picture of the view from here: www.flickr.com/photos/34063820@N00/13628965234/ 19:01
I would add notes
but it seems that flickr-- has removed tha useful feature.
19:01 Rotwang joined
nwc10 the bright circle just to the right of the tree is the Riesenrad 19:02
jnthn nwc10: ooh, nice :)
nwc10 everything else is a bit to hard to describe easily.
timotimo gotta run for now
19:02 xenoterracide left, xenoterracide joined
nwc10 if I had notes I could stick one on where the airport control tower is. 19:02
19:03 Araq left 19:04 zakharyas left 19:08 xenoterracide left 19:12 rurban joined
dalek kudo/nom: 8908784 | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
Some more cleanup in WINNER
19:13
[Coke] WINNER WINNER 19:19
dalek rl6-roast-data: ad1cb0c | coke++ | / (6 files):
today (automated commit)
19:20
moritz h3.gd/ctrace/ 19:21
lizmat [Coke]: well, actually I'm working on .winners
$ perl6 -e 'say (^10).pick(*).map( { start { .sleep; $_ } } ).winners'
0 1 2 3 4 5 6 7 8 9
given a list of Promises / Channels, it returns a lazy list with the values as they come in 19:22
moritz lizmat++
is that -j or -m?
lizmat eh, it's built on winner {}, so should work on both 19:23
I've only tested -m
timotimo jnthn, did you look at the nqp benches?
or only at the rakudo ones?
lizmat now my plan was to allow for an optional code block to be passed to .winners
[Coke] Found out they opened a "Brits R Us" about 5m from my $dayjob. will be swinging by later to see if I can find prawn crisps. :) 19:24
lizmat similar to the winner {} syntax
but alas, this fails with an error I don't quite get
$ perl6 -e 'say (^10).pick(*).map( { start { .sleep; $_ } } ).winners: { $:v.say }' 19:25
Required named parameter 'k' not passed
jnthn timotimo: Looked at both. The NQP ones didn't show a great deal
timotimo: I mean, I mostly pay attention to the right hand side of them since that's where you see the trend
timotimo mhm 19:26
the native 2d loop one was really happy
jnthn yeah, it was
Beat Perl 5.
lizmat ah, duh, thank you all for being a wall :-)
timotimo liz, it used only v? 19:27
jnthn lizmat: It's TimToady immitation day, didn't y'know? :P 19:28
19:31 treehug8_ joined, treehug88 left 19:33 fhelmberger joined
jnthn lizmat: Curius, are you developing the WINNER stuff on j or m? 19:34
lizmat on , 19:35
on m
rather :-)
jnthn: is that important at this level ? it shouldn't, should it ? 19:36
jnthn lizmat: In terms of "will it work", shouldn't matter. 19:37
lizmat: But folks using the conc stuff a bit on Moar matters to me in so far as it helps me get an idea of its stability, weak points, etc.
lizmat the only odd thing I found so far, is interaction with gather / take 19:38
jnthn Ah
segv? )
19:38 fhelmberger left
lizmat not what I expected... but I abandoned that approach in favour of map {} 19:38
dalek p/execname: 1454654 | (Tobias Leich)++ | tools/build/Makefile-Moar.in:
call the gen-runner provided my moar
19:40
jnthn detrain, bbiab
dalek p/execname: 26686a4 | (Tobias Leich)++ | .gitignore:
ignore nqp-m.c
19:41
19:43 btyler left, denis_boyun_ left 19:45 denis__ joined 19:47 denis__ left, denis_boyun_ joined 19:51 btyler joined
moritz FROGGS: I don't know what you're doing right now, but the exec name finding could happen in the shell script wrapper 19:55
currently perl6-m is a wrapper that calls moar ... perl6.moarvm "$@"
it could pass --execname="$0" to moar 19:56
no idea if windows has an equivalent
and the same approach might work for the JVM too 19:57
20:00 treehug88 joined 20:03 treehug8_ left, treehug8_ joined, treehug8_ left 20:04 treehug8_ joined 20:05 treehug88 left 20:15 jeffreykegler1 left 20:22 rindolf left 20:30 treehug8_ left 20:32 treehug88 joined 20:38 xenoterracide joined 20:41 jdv79 left
dalek ast: dab8862 | (David Warring [email@hidden.address] | integration/advent2013-day19.t:
adding advent 2013 day 19
20:45
kudo/nom: 69109d2 | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
Move &invoke_right to global INVOKE_KV

So List.winners can use it also
20:48
kudo/nom: 883145d | (Elizabeth Mattijsen)++ | src/core/List.pm:
Naive implementation of .winners()
lizmat $ time perl6 -e '(^10).pick(*).map( { start { .sleep; $_ } } ).winners: { $:v.print }' 20:49
0123456789
real0m9.339s
user0m0.773s
sys0m0.090s
20:51 BenGoldberg joined
lizmat jnthn: seems we got a .winners ! 20:51
20:52 hoverboard joined
jnthn lizmat: Hmm. Did S17 get one too? ;) 20:52
lizmat no, not yet, but from your question I gather it should ?
jnthn lizmat: What are its semantics, rough?
20:52 rurban left
jnthn *roughly 20:52
lizmat given a list of Promises / Channels, it returns a lazy list with results in the order they were seen 20:53
optionally calling a code block when each Promise is kept / a Channel has something to mention
jnthn What's the code block do? 20:54
Does it have map semantics?
That is, the lazy list gets its return values?
lizmat it works the same as the code block in winner
yup, the lazy list gets its return values 20:55
jnthn Oh, so you can optionally take the thing that spake?
lizmat $ perl6 -e 'my @a; (^10).pick(*).map( { start { .sleep; $_ } } ).winners: { @a.push: $:v }; say @a
0 1 2 3 4 5 6 7 8 9
so you can safely push to an array in that code block
or take, indeed 20:56
jnthn ah, actor semantics.
Though the lazy list surely hsa them too?
*has
Uh, is safe to iterate I mean...
lizmat $ perl6 -e 'my @a = gather { (^10).pick(*).map( { start { .sleep; $_ } } ).winners: { take $:v } }; say @a' 20:57
0 1 2 3 4 5 6 7 8 9
jnthn nice
BenGoldberg What about: say gather { (^10).map( { start { .sleep; $_ } ).winners: { } };
Err\ 20:58
What about: say gather { (^10).map( { start { .sleep; take $_ } ).winners: { } };
20:58 IllvilJa joined
lizmat $ perl6 -e 'my @a = gather { (^10).pick(*).map( { start { .sleep; take $_ } } ) }; say @a' 20:59
that's indeed one of those cases where it just doesn't work
BenGoldberg I didn't really expect it to, honestly
The gather is in one task/thread, and the take is in another
lizmat if the take is in a different thread, it won't work
jnthn I suspect the problem is that the take isn't in the dynamic scope of the gather 21:00
Since it's on a different thread.
Though it's in the lexical scope, so...
21:00 denis_boyun_ left
lizmat well, if that isn't supposed to work, then it should warn / die 21:01
$ time perl6 -e 'my @a := (^10).pick(*).map( { start { .sleep; $_ } } ).winners: { $:v.print }; say @a[5]' 21:02
0123455
real0m5.357s
user0m0.689s
sys0m0.096s
which shows it is a lazy list indeed
jnthn lizmat: I'm surprising it doesn't die.
21:02 dayangkun_ left
jnthn *surprised 21:02
lizmat: Like, really surprised... 21:03
lizmat you mean because we exit before waiting for all the threads ?
jnthn No, I'm surprised the take doesn't die.
With a nasty internal error if nothing else.
lizmat maybe it just takes to a copy in the local thread that we never see? 21:04
jnthn maybe 21:05
I'll try and get the exit time stuff fixed up this weekend in moar-conc 21:06
Though I only get a half-weekend...gotta go travel to Stockholm on Sunday.
lizmat but other than that, you're happy with .winners ?
jnthn lizmat: Well, it is a cute combinator 21:07
lizmat: I think we'll need to discuss its error semantics at some point
lizmat it's basically the same error semantics as winner {...} 21:09
21:09 Rotwang left 21:11 dmol left, denis_boyun_ joined
dalek kudo/nom: e6f73eb | (Elizabeth Mattijsen)++ | docs/ChangeLog:
Add entries for winner {} fix and new .winners()
21:13
21:17 dayangkun_ joined
segomos did caller get renamed? 21:18
lizmat not that I know of 21:22
segomos is it just 'caller.whatever' or ?, i'm starting to find references to %CALLER, $.caller, $CALLER, and various other combinations 21:23
jnthn segomos: What are you trying to achieve?
21:24 denis_boyun_ left
jnthn (there's more than one mechanism in this space and it's hard to know what to point you at without knowing the use case) 21:24
dalek kudo/nom: a757718 | (Elizabeth Mattijsen)++ | t/spectest.data:
Adding dwarrings++ advent 2013 tests to roast
21:26
segomos jnthn: i'm trying to do something similar to perl5's Web::Scraper and in doing so, i need the 'process' blocks to be bound to an objects, though i'd like the syntax to be plain and clean like web::scraper
lizmat for moar: Files=799, Tests=31002 21:27
segomos metacpan.org/pod/Web::Scraper
jnthn segomos: Thanks, looking
segomos: It's still not clear why you need CALLER 21:28
segomos: I think I'd used dynvars to handle this.
sub scraper(&decls) { my %*SCRAPER_STUFF; decls(); ...process them... }
sub process($thing, *%adverbs) { %*SCAPER_STUFF{$thing} = %adverbs; } # or whatever 21:29
21:30 hummeleB1 left
segomos i c, i think i get it - i'll screw around with it some more that way - thank you 21:30
jnthn I think that'll be much neater than using caller.
Well, CALLER I guess
lue How do I write up a function (or chain of functions), and throw an array of filenames at it and say "process these in parallel" (i.e. a parallel do_stuff($_) for @names)? I tried messing with Channel, but it doesn't seem to be what I want.
jnthn But I tend to see that as a last resort.
segomos jnthn: that is way better, and it works as desired - tyvm 21:31
jnthn segomos: Welcome. Look forward to seeing the module :)
lue: Do you need to get results back, or not?
segomos jnthn: this one and my csv::query are fighting for my attention atm :-)
lue jnthn: no, the process just outputs a file in the end, I don't need to get anything back from the function. (This is for that synopsis generator of mine, wanting to see if paralleling it speeds it up any.) 21:32
21:34 denis_boyun joined 21:35 bluescreen10 left
dalek p/jnthn-lex-loc: 4dd7814 | jnthn++ | src/NQP/Optimizer.nqp:
Walk default defaults in the optimizer.
21:35
ecs: 9e4c566 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Also mention MoarVM
jnthn lue: await @files.map: -> $file start { ...process $file... }; 21:36
lue Ah, didn't catch the await keyword :) .
jnthn uh, I screwed up the syntax 21:38
await @files.map: -> $file { start { ...process $file... } }
lizmat lue: or now: @files.map( -> $file start { ... process file; $result } ).winners: { ... process $:v }
jnthn lizmat: I think that end-weights it less well in this case, mind... 21:39
lizmat: Especially if you don't care for processing the files. 21:40
lizmat: uh, I mean processing the results
lizmat ah, ok
jnthn lizmat: Which thread is the block invoked on, ooc?
lizmat the thread doing .winners 21:41
:q
hugme hugs lizmat, good vi(m) user!
lizmat .winners is basically:
map { winner * { done @awaitables { $:v } } } 21:42
jnthn ah, k.
Makes sense.
lizmat with some work reducing @waitables and exiting when there are no awaitables left
jnthn If you want thread affinity, there's supplies.
Uh, the other kind of... :) 21:43
lizmat hehe
also, note lines 383-384:
# for some reason we cannot check &block for definedness
# as it will bomb on a signature mismatch *without* being called
hence the INVOKE_KV( &block // sub {}, # yuck 21:44
something to be investigated later, haven't been able to golf that just yet
BenGoldberg Maybe you could just provide a default value for &block? 21:45
lizmat well, that's what I'm doing essentially
I'd rather not have to invoke INVOKE_KV if it's not necessary 21:46
jnthn Odd...
BenGoldberg Provide a default value for &block, then check whether block is equal to that default value.
jnthn Maybe it's golfable?
lue on my few-days-old rakudo, this segfaults on perl6-m and hangs on perl6-j after everything is done: gist.github.com/lue/9886068 21:47
lizmat lue: please prefix the .map with await
until jnthn++ has had time to fix up the exiting when threads still running issues 21:48
lue Of course I forget the Important Keyword™ :P
jnthn Or get yourself a newer perl6-j to fix its exit hang.
lue yeah, I'll be sure to update in a moment :) . 21:49
lizmat jnthn: I just realized that $:v is specced to contain the promise
I implemented it as having the value, to be more in line with channels
if one would want the actual promise, the $:k value should allow fetching it from the original list 21:50
fwiw, I've had little use for the Promise itself, other than getting its result
jnthn lizmat: Well, it's mostly useful to unpack it yourself to get control over the exception. 21:51
lizmat perhaps .winners should not return the values 21:52
but the promises in order ?
hmmm... but that wouldn't work with Channels
BenGoldberg List if pairs, with Promise or Channel as the key, and values as the values? 21:53
s/if/of
lizmat I guess jnthn's point was that if you return the value, you've already died if the Promise was broken 21:54
by just passing the Promise, you have control on when the Promise is checked 21:55
BenGoldberg Hmm
lizmat FWIW, the longer I'm working on winner {} and .winners, I find trying to force handling of Channels and Promises into the same syntax 21:56
rather contrived
BenGoldberg How about: If the Promise was broken, then the value of the pair would be a Failure object.
lizmat the Promise.excuse hmmm... 21:58
BenGoldberg IIRC, the excuse is an exception... the value of the pair would be that exception, wrapped in a Failure 21:59
IIUC, attempting to use a Failure as a normal value results in an exception being thrown 22:00
22:04 lustlife left, hoverboard left 22:05 Mouq joined 22:08 kaare_ left
lizmat hmmm... I always thought that Promise.excuse returned a Failure 22:09
jnthn No, returns the Exception itself. 22:10
No point lazifying it, I think.
lizmat so no point in doing: 22:11
$contestant.status == Kept
+ ?? $contestant.result
+ !! $contestant.excuse
?
or should I wrap the .excuse in a Failure ?
and if so, how do I do that ? Failure.new( $contestant.excuse ) ? 22:12
jnthn lizmat: No, I don't think excuse should wrap it in a failure 22:13
lizmat: You're asking for the exception there
BenGoldberg I don't think excuse itself should wrap the exception in the failure... rather .winner should wrap the exception in a failure when putting it as the value of a paire. 22:14
lizmat please note that winner {} should also work on channels
BenGoldberg Err, I meant to say, .winners 22:15
jnthn A Promise is kinda a one-value channel.
lizmat so, if it is a Channel returning a value, you would want a pair of Channel => value ?
BenGoldberg Right 22:16
jnthn Not entirely sure about pairs...
lizmat me neither, seems like a lot of extra work that may not be needed
BenGoldberg Maybe .winners should take an extra argument, so that the user can say whether they want a list of Channels/Promises, or a list of values, or ... 22:17
D'oh, I know. Just have .winners examine the prototype of the block it's passed. 22:18
lizmat that's what INVOKE_KV does 22:19
dalek kudo/nom: 567105e | (Elizabeth Mattijsen)++ | src/core/asyncops.pm:
For now, wrap failed Promises in a Failure
22:32
22:32 hoverboard joined
lizmat and with that, I'm going to sleep on the ramifications of handling both Channels and Promises with winner {} and .winners 22:33
gnight #perl6!
22:34 treehug88 left
jnthn 'night, lizmat++ 22:36
22:37 LLamaRider left
dalek p/jnthn-lex-loc: d317008 | jnthn++ | src/vm/jvm/ModuleLoader.nqp:
Eliminate epic hack in JVM ModuleLoader.

The optimizer now got clever enough to see through the hack.
22:38
p: 44181ad | jonathan++ | src/NQP/Optimizer.nqp:
Start recording var decls/usages.
22:43
p: d062aa3 | jonathan++ | src/NQP/Optimizer.nqp:
Implement lexical => local lowering.
p: a83cec1 | jonathan++ | src/NQP/Optimizer.nqp:
Can lower $/ and self also.
p: 39e7a00 | jonathan++ | src/NQP/Optimizer.nqp:
Fix spello; [Coke]++.
nqp: 4dd7814 | jnthn++ | src/NQP/Optimizer.nqp:
nqp: Walk default defaults in the optimizer.
22:45 denis_boyun left
dalek kudo/nom: 39a18e2 | jnthn++ | tools/build/NQP_REVISION:
Bump to an NQP with lex->loc optimization.

Gets us faster builds/compiles/spectests.
22:45
22:50 pecastro joined 22:57 btyler left
Mouq [lizmat, jnthn]»++ 23:24
p6: return 1;
camelia ( no output )
..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Illegal control operator: return␤ at /tmp/tmpfile line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4596 (module-CORE @ 576) ␤ at /home/…»
Mouq ^^ Segfaults on Moar in -e 23:25
23:32 ssutch left 23:35 grondilu left