Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-07-30

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 TimToady .tell abc-xyz Currently rakudo uses a grammar written in NQP that you can get at, but it's not called STD, and it's not fully bootstrapped in Perl 6.  It may be bootstrapped in some future version, but for now it's more valuable to implement it in NQP as a portability layer.
00:00 yoleaux TimToady: I'll pass your message to abc-xyz.
00:01 ShimmerFairy joined #perl6
00:02 ugexe testers.perl6.org is not accepting reports
00:04 dalek Heuristic branch merge: pushed 226 commits to rakudo/glrish by TimToady
00:05 dalek Heuristic branch merge: pushed 24 commits to rakudo/glrish by TimToady
00:05 freeze joined #perl6
00:16 freeze joined #perl6
00:18 ShimmerFairy joined #perl6
00:22 BenGoldberg joined #perl6
00:22 BenGoldberg joined #perl6
00:24 laouji joined #perl6
00:30 freeze joined #perl6
00:39 laouji joined #perl6
00:42 laouji joined #perl6
00:50 dalek rakudo-star-daily: de710b5 | coke++ | log/ (8 files):
00:50 dalek rakudo-star-daily: today (automated commit)
00:50 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/de710b575f
01:07 khw joined #perl6
01:22 rmgk_ joined #perl6
01:22 alexande3 joined #perl6
01:29 aborazmeh joined #perl6
01:29 aborazmeh joined #perl6
01:33 dolmen joined #perl6
01:34 namenick joined #perl6
01:35 namenick p6: "aa" ~~ / .+ % <?same> /;
01:35 camelia rakudo-moar debcfc: OUTPUT«Method 'same' not found for invocant of class 'Cursor'␤  in block <unit> at /tmp/tmpfile:1␤␤»
01:36 yeahnoob joined #perl6
01:53 dayangkun joined #perl6
02:12 awwaiid joined #perl6
02:15 Khisanth joined #perl6
02:23 chenryn joined #perl6
02:29 llfourn joined #perl6
02:34 hoelzro joined #perl6
02:51 noganex joined #perl6
03:01 huf joined #perl6
03:11 jack_rabbit joined #perl6
03:16 chenryn joined #perl6
03:29 llfourn joined #perl6
03:39 atroxaper joined #perl6
03:40 jack_rabbit joined #perl6
03:51 ShimmerFairy joined #perl6
04:01 jack_rabbit joined #perl6
04:09 kaare_ joined #perl6
04:14 dayangkun joined #perl6
04:15 raiph joined #perl6
04:21 atroxaper joined #perl6
04:50 prammer joined #perl6
04:50 cognominal joined #perl6
04:56 vendethiel joined #perl6
04:58 chenryn joined #perl6
05:17 baest joined #perl6
05:23 atroxaper joined #perl6
05:29 llfourn joined #perl6
05:32 TEttinger joined #perl6
05:40 lizmat good *, #perl6!
05:40 lizmat alas, I will be afk for most of the day&
05:46 ChoHag joined #perl6
05:50 diana_olhovik_ joined #perl6
05:56 rurban joined #perl6
05:59 ChoHag I believe utf-8 may be my friend too today.
05:59 timotimo
05:59 ChoHag But my new nemeses: Tiny fonts.
05:59 ChoHag nemesis
06:00 timotimo oh yes.
06:00 * ChoHag sighs
06:00 ChoHag One problem per day is enough.
06:00 timotimo i hear you
06:00 chenryn joined #perl6
06:02 atroxaper joined #perl6
06:10 brrt joined #perl6
06:14 Guest92532 joined #perl6
06:14 [Sno] joined #perl6
06:17 Guest92532 left #perl6
06:23 sunwenjie joined #perl6
06:24 domidumont joined #perl6
06:25 timotimo .tell smls could you be super nice and fetch the newest dll files for gtk-simple for me to put onto hack? or maybe give me a script or instructions where they can be found, exactly? also, if you could grab gtksourceview-3 in addition to what we already have, that'd be swell :)
06:25 yoleaux timotimo: I'll pass your message to smls.
06:26 brrt \o
06:30 FROGGS joined #perl6
06:34 RabidGravy joined #perl6
06:39 jkva joined #perl6
06:39 agre joined #perl6
06:41 zakharyas joined #perl6
06:50 agre joined #perl6
06:59 timotimo m: class One { our sub test { say "yay" } }; class Two { import One; method foo { test() } }; Two.foo;
06:59 camelia rakudo-moar debcfc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wB6qd38T5t␤Undeclared routine:␤    test used at line 1␤␤»
06:59 timotimo how to do this right?
07:01 moritz m: class Oone { sub test is export { say "yay" } }; class Two { import One; method foo { test() } }; Two.foo;
07:01 camelia rakudo-moar debcfc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uOKaPNBIog␤Could not find module One to import symbols from␤at /tmp/uOKaPNBIog:1␤------> 3 { say "yay" } }; class Two { import One7⏏5; method foo { test() } }; Two.foo;␤»
07:01 moritz m: class One { sub test is export { say "yay" } }; class Two { import One; method foo { test() } }; Two.foo;
07:01 camelia rakudo-moar debcfc: OUTPUT«yay␤»
07:01 moritz timotimo: use "is export" if you want to import :-)
07:01 timotimo ok
07:03 coffee` joined #perl6
07:05 jkva joined #perl6
07:08 Ven joined #perl6
07:11 abraxxa joined #perl6
07:13 dolmen joined #perl6
07:15 azawawi joined #perl6
07:30 azawawi hi #perl6
07:30 llfourn joined #perl6
07:31 espadrine joined #perl6
07:34 cdc brrt++ # blogging
07:34 brrt thanks :-)
07:35 ChoHag Can I consume a role/extend a class where the final class/subclass changes (or defines) the default of an attribute?
07:36 ChoHag Or any other aspect of a consumed attribute for that matter.
07:42 mr-foobar joined #perl6
07:42 atroxape_ joined #perl6
07:44 telex joined #perl6
07:52 atroxaper joined #perl6
07:52 darutoko joined #perl6
07:54 moritz the consumer can set the default in a BUILD submethod
07:55 moritz or you can write a role that requires the consumer to provide a method which returns the default
07:55 coffee` joined #perl6
07:56 RabidGravy someone be a love and make URI so I can manipulate the uri
07:57 virtualsue joined #perl6
07:57 [TuxCM] [Coke], lizmat, http://tux.nl/Files/uchar-nopro
07:57 timotimo don't we have some URI module already?
07:57 moritz sure we do
07:57 [TuxCM] that is a slightly stripped version, as my original contains company code
07:58 RabidGravy yeah, but it's parse only, don't want to get sidetracked into making mutations
08:00 azawawi lizmat: ping
08:03 Mhoram joined #perl6
08:04 azawawi .tell lizmat why is .send deprecated? Any reason behind that? Thanks for all your hard work. https://github.com/rakudo/rakudo/commit/​26589f2b72534870a6a4a996ae10d5ccd9d9b801
08:04 yoleaux azawawi: I'll pass your message to lizmat.
08:04 timotimo azawawi: because hoelzro renamed it to "print"
08:05 gfldex joined #perl6
08:05 azawawi oops thought it was lizmat :)
08:05 azawawi so does it make it sense? socket.print ?
08:06 timotimo i think so?
08:06 RabidGravy consistency
08:06 azawawi you're printing to a socket... that's new :)
08:07 timotimo well, tcp is stream-based
08:07 timotimo so yeah, you *are* writing to a socket
08:07 RabidGravy send(2) does something slightly different in that it allows you to specify flags
08:07 timotimo we don't have anything for UDP sockets yet
08:07 timotimo RabidGravy: our old "send" didn't have any support for flags, either
08:08 RabidGravy zackly
08:08 timotimo in unix, the difference between "write" and "send" is that send lets you pass flags
08:08 timotimo in perl6 you can't flags anyway
08:08 timotimo so we don't let you send (yet)
08:10 azawawi cool
08:10 * azawawi must be a rakudo 2025 feature :)
08:10 timotimo i've been very very slow with the udp socket support :(
08:12 * RabidGravy changes HTTP::UserAgent
08:12 timotimo thank you kindly
08:13 azawawi timotimo: well I have been very very slow with farabi6  :)
08:14 timotimo i disagree
08:15 dakkar joined #perl6
08:20 RabidGravy I think I have reached an all time high in the number of modules I have in progress
08:21 [TuxCM] test             50000    47.312    47.217
08:21 [TuxCM] test-t           50000    47.420    47.325
08:26 xinming joined #perl6
08:27 virtualsue joined #perl6
08:36 timotimo hum.
08:36 timotimo i do "require Cairo;" and then attempt to access the cairo_t class via ::('cairo_t'), but i get "no such symbol cairo_t" ... i think this must have worked at some point
08:37 timotimo i ought to give the require statement a list of names to fetch i guess
08:37 timotimo Trying to import symbols cairo_t, Cairo from 'Cairo', but it does not export anything
08:37 timotimo :|
08:38 * jnthn peers at the RT queue
08:39 timotimo ah, it doesn't "is export" that
08:40 timotimo there's not a single "is export" in the cairo module
08:40 nwc10 jnthn: is that a wise thing to do? :-)
08:40 timotimo but it already worked at some point :\
08:41 timotimo fixed the mistake apparently, yay
08:43 g4 joined #perl6
08:46 jnthn Well, it gives me something to do while the coffee starts working better :)
08:47 RabidGravy really with send -> print   recv wants to be changed too as they used to be kinda sorta symmetrical
08:53 amurf joined #perl6
09:02 nwc10 pete pasted this text "Characters should actually be grapheme clusters, though current implementations erroneously count codepoints instead." which I think is from http://doc.perl6.org/routine/chars
09:03 nwc10 is that text out of date now, due to NFG?
09:03 dalek rakudo/nom: 30089ad | jnthn++ | src/core/ (2 files):
09:03 dalek rakudo/nom: Tighten up types on things that must be callable.
09:03 dalek rakudo/nom:
09:03 dalek rakudo/nom: This avoids whining (potentially at a distance) about missing .count,
09:03 dalek rakudo/nom: .arity, and so forth, and instead showing a more helpful error about
09:03 dalek rakudo/nom: how we can't bind the signature here.
09:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/30089ade35
09:03 dalek roast: 8a54a62 | jnthn++ | S32-exceptions/misc.t:
09:03 dalek roast: Test for RT #125675.
09:03 dalek roast: review: https://github.com/perl6/roast/commit/8a54a6205f
09:03 dalek roast: 01d0210 | jnthn++ | S32-list/sort.t:
09:03 dalek roast: todo => skip on some very dubious tests.
09:03 dalek roast: review: https://github.com/perl6/roast/commit/01d0210aaf
09:04 jnthn nwc10: On MoarVM at least, yes
09:04 xfix joined #perl6
09:05 nwc10 does the masakbot create github issues, as well as RT tickets? :-)
09:05 nwc10 more usefullly, does dha++ fix stuff like this if made aware of it?
09:06 nightfrog joined #perl6
09:12 jnthn m: use Test; sub foo($r = rx{foo}) { ok $r ~~ Regex }; foo();
09:12 camelia rakudo-moar debcfc: OUTPUT«===SORRY!===␤Cannot call method 'match' on a null object␤»
09:16 sergot joined #perl6
09:17 sergot hi o/
09:18 zakharyas joined #perl6
09:19 RabidGravy yo sergot
09:20 rurban Why did you call arrays declared with a fixed size "shaped" and not "sized"? I think I'll call them sized_arrays in perl5, i.e. AvSIZED. Is it because of multidimensional support?
09:20 jnthn Yes.
09:20 rurban Should I also call them shaped?
09:20 jnthn I dunno, are you going to do multi-dim support?
09:20 rurban perl5 has no multidim support
09:20 rurban I die on multi dims so far
09:21 rurban but maybe I can add it later.
09:21 JimmyZ Does JVM  have multidim support?
09:21 JimmyZ looks like not?
09:21 rurban Not sure if the parser allows that. my int @a[2,10]; hmm
09:21 jnthn JimmyZ: Already ported MultiDimArray REPR to JVM.
09:22 brrt perl5 has multidim faking, and it's awesome ^^
09:22 jnthn So so far as Perl 6 needs, "yes" ;)
09:22 brrt or at least, it's useful
09:22 dalek rakudo/nom: c8c1b67 | jnthn++ | src/Perl6/Actions.nqp:
09:22 dalek rakudo/nom: Avoid boolifying code objects in compiler.
09:22 dalek rakudo/nom:
09:22 dalek rakudo/nom: Some of them react to boolification by trying to match against $_,
09:22 dalek rakudo/nom: when we only want to check if we have one. Fixes RT #125670.
09:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c8c1b676ed
09:22 dalek roast: 9263645 | jnthn++ | S06-signature/defaults.t:
09:22 dalek roast: Test for RT #125670.
09:22 dalek roast: review: https://github.com/perl6/roast/commit/9263645f60
09:23 JimmyZ I meant JVM itself :)
09:23 jnthn JimmyZ: iirc yes, though I may be remembering the CLR :P
09:24 jnthn Well, there's two RTs down... :)
09:24 rurban I just thought of being less confusing to the casual user. Ok, Shaped then. I really dislike this name. Sized sounds good for multidim also. But this is too late unfortunat.
09:25 itz joined #perl6
09:25 itz morning
09:25 brrt morning itz
09:25 timotimo it's itz!
09:25 Mhoram joined #perl6
09:31 llfourn joined #perl6
09:34 dalek rakudo/nom: d922521 | jnthn++ | src/Perl6/World.nqp:
09:34 dalek rakudo/nom: Always decont things used as type constraints.
09:34 dalek rakudo/nom:
09:34 dalek rakudo/nom: Fixes RT #125715.
09:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d92252109c
09:34 espadrine joined #perl6
09:35 dalek roast: 985d992 | jnthn++ | / (2 files):
09:35 dalek roast: Test for RT #125715.
09:35 dalek roast: review: https://github.com/perl6/roast/commit/985d9921cc
09:49 chenryn joined #perl6
09:56 rurban_ joined #perl6
09:56 Ven joined #perl6
10:06 mr-foobar joined #perl6
10:08 dalek rakudo/nom: 915e445 | jnthn++ | src/Perl6/Actions.nqp:
10:08 dalek rakudo/nom: Remove comment about decision already made.
10:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/915e445c22
10:08 dalek rakudo/nom: 0a1da50 | jnthn++ | src/Perl6/ (2 files):
10:08 dalek rakudo/nom: Fix private method call in role code-gen.
10:08 dalek rakudo/nom:
10:08 dalek rakudo/nom: We can't just assume $*PACKAGE holds the type we should locate the
10:08 dalek rakudo/nom: private method in. Rather, ::?CLASS must be used in this case.
10:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0a1da507d1
10:08 dalek roast: b7f4121 | jnthn++ | S14-roles/stubs.t:
10:08 dalek roast: Test for RT #125694.
10:08 dalek roast: review: https://github.com/perl6/roast/commit/b7f4121557
10:08 Ven joined #perl6
10:23 inokenty joined #perl6
10:28 llfourn joined #perl6
10:29 jnthn m: (1,2,3).map({ die 'oh noes' })
10:29 camelia rakudo-moar d92252: OUTPUT«Unhandled exception: oh noes␤   at <unknown>:1  (/home/camelia/rakudo-inst-1/share/perl6/run​time/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:792  (/home/camelia/rakudo-inst-1/share/perl​6/runtime/CORE.setting.moarvm:die:86)␤ fro…»
10:43 jnthn Didn't we have an RT about error of last statement in a problem sucking if it occurs while sinking?
10:43 * jnthn can't find it
10:50 itz https://rt.perl.org/Public/​Bug/Display.html?id=124434?
10:51 jnthn m: Failure.new(Exception.new); 1
10:51 camelia rakudo-moar 0a1da5: OUTPUT«Exception exception produced no message␤␤Actually thrown at:␤  in block <unit> at /tmp/CeOq_nzqJJ:1␤␤»
10:52 jnthn That one does look fixed, but isn't what I meant :)
10:52 jnthn skids++ work probably fixed that one recently
10:57 dalek rakudo/nom: fac28d3 | jnthn++ | src/ (3 files):
10:57 dalek rakudo/nom: Test for concise error on sinking last statement.
10:57 dalek rakudo/nom:
10:57 dalek rakudo/nom: If the last statement in a file used to need sinking, and doing so
10:57 dalek rakudo/nom: threw an exception, we'd spit out an epic low-level backtrace rather
10:57 dalek rakudo/nom: than a nice high-level one. Fix that by making non-EVAL and non-REPL
10:57 dalek rakudo/nom: stuff we compile put the last statement in sink context in the code we
10:57 dalek rakudo/nom: generate rather than having MAIN do the sinking. Also means a trailing
10:57 dalek rakudo/nom: 0; in a file now warns.
10:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fac28d33d4
10:57 dalek roast: bcebafd | jnthn++ | S10-packages/precompilation.t:
10:57 dalek roast: Fix test to not produce a sink warning.
10:57 dalek roast: review: https://github.com/perl6/roast/commit/bcebafd495
10:57 dalek roast: 364c287 | jnthn++ | integration/weird-errors.t:
10:57 dalek roast: Test we get concise error on last statement sink.
10:57 dalek roast: review: https://github.com/perl6/roast/commit/364c2870b6
11:08 ShimmerFairy joined #perl6
11:10 dalek roast: ed5d178 | jnthn++ | S17-promise/start.t:
11:10 dalek roast: Test for RT #125346.
11:10 dalek roast: review: https://github.com/perl6/roast/commit/ed5d1781a3
11:13 jnthn m: my $p = (0..3).map: *+1; say await $p;
11:13 jnthn oops
11:13 jnthn m: my $p = start { (0..3).map: *+1 }; say await $p;
11:13 camelia rakudo-moar 0a1da5: OUTPUT«(timeout)»
11:13 camelia rakudo-moar 0a1da5: OUTPUT«␤»
11:13 jnthn hmm
11:14 FROGGS m: await 42
11:14 yoleaux 29 Jul 2015 16:22Z <lizmat> FROGGS: looking at debugging 'Proc::Async.new("perl6", "-e", "exit 2").start.result.perl.say'
11:14 camelia rakudo-moar 0a1da5: ( no output )
11:14 yoleaux 29 Jul 2015 16:22Z <lizmat> FROGGS: it looks like the "done" callback is not being called, and thus the exit code is never set
11:15 jnthn Wonder why we lose the result of the map...
11:15 jnthn m: my $p = start { (0..3).map: *+1 }; say $p.result;
11:15 camelia rakudo-moar 0a1da5: OUTPUT«1 2 3 4␤»
11:15 FROGGS m: my $p = start { (0..3).map: { say "huh"; $_+1 } }; say await $p;
11:15 camelia rakudo-moar 0a1da5: OUTPUT«huh␤huh␤huh␤huh␤1 2 3 4␤»
11:16 FROGGS m: my $p = start { (0..3).map: { $_+1 } }; say await $p;
11:16 camelia rakudo-moar 0a1da5: OUTPUT«␤»
11:16 FROGGS hmmmm
11:18 jnthn That really is a wtf...
11:18 chenryn joined #perl6
11:19 jnthn Hm, and it really is lunch time.
11:19 jnthn bbiab
11:20 FROGGS what the lunch
11:20 brrt joined #perl6
11:20 jnthn Apparently, nothing unless I go to the shop...
11:51 leont joined #perl6
11:53 nine brrt: I'm sure you are being asked that every other day, but I don't recall reading about it: would it be possible to appropriate llvm's or gcc's optimization passes for MoarVM?
11:53 brrt i'm not asked that often, in fact :-)
11:53 brrt but it's a good question
11:54 brrt the answer, unfortunately, is no
11:54 nine That begs the question: why? :)
11:55 brrt ehm... let me think about that for a bit
11:56 brrt the most basic reason is that it's a question of (in-memory) code representation
11:56 araujo joined #perl6
11:56 brrt if you want gcc or llvm to do something clever with your code, you must first convert your code to llvm ir or gcc ir
11:57 brrt possibly textually, which is not really awesome
11:57 nine That's a given, yes. But I don't see how that would be impossible?
11:57 nine Of course, if it would actually be worth it, would be another question.
11:58 nine But since it seemed to quite quite some work just to use all x86_64 registers and how much more work it will probably be to make _good_ use of them, the answer may not be clear.
11:58 brrt well, what you're talking about would amount to replacing the entire moarvm jit 'backend' with a gcc/llvm backend, and that's certainly possible
11:59 brrt if you want to use *just* the optimization passes, then you'd have to convert your code to llvm ir, then have it optimize it, then convert it back; but i'm unsure what the point of that would be
11:59 brrt because clearly llvm and gcc have just fine code generators
12:00 brrt the main problem with such an approach - from my admittedly biased view - is that both gcc and llvm are made for c and c++ semantics
12:01 brrt that means that to get perl6 semantics out of that (or more specifically moarvm semantics) you'll have to add in all sorts of constraints to the IR
12:02 brrt unfortunately, such restraints prohibit llvm from optimizations
12:02 salv0 joined #perl6
12:03 [TuxCM] .tell [Coke] http://tux.nl/Files/uchar-nopro
12:03 yoleaux [TuxCM]: I'll pass your message to [Coke].
12:03 brrt a very simple example would be the interaction with GC; it requires that at certain points all values are flushed to memory
12:04 brrt a moarvm-specific JIT may be able to lift some of those constraints because it has full knowledge of the code, but llvm would not be able to
12:04 brrt moreover, llvm is large and slow
12:05 llfourn joined #perl6
12:07 brrt gcc is of course GPL
12:08 brrt which is a licensing headache
12:09 Ven ...and is a headache to use as a library :P
12:10 arnsholt Well, you're not really supposed to be able to use GCC as a library, are you? =)
12:10 brrt it exists arnsholt
12:10 brrt not sure if it's called libjit or that's something else
12:11 arnsholt Oooh, right. I'd forgot about that
12:11 brrt bbiab
12:13 brrt joined #perl6
12:13 * brrt back
12:14 brrt anyway, nine, was that a reasonable answer? :-)
12:15 smls joined #perl6
12:21 sergot .seen masak
12:21 yoleaux I saw masak 27 Jul 2015 16:28Z in #perl6: <masak> yeah, but two `whenever`s can work in parallel without any extra instructions, which is nice.
12:21 Ven joined #perl6
12:30 muraiki joined #perl6
12:34 ab6tract joined #perl6
12:34 ab6tract o/ #perl6
12:35 ab6tract doing a hackathon with flock, comparing some speed metrics of his perlito5-java backend vs rakudo
12:35 ab6tract *fglock
12:35 ab6tract the difference between Int and int on jvm is.... a bit unbelievable, to be honest
12:36 brrt between perlito5-java and rakudo or within rakudo?
12:36 brrt \o ab6tract
12:40 ab6tract brrt: within rakudo
12:40 ab6tract https://gist.github.com/ab5​tract/1c394b6ef32bbf27374c
12:40 ab6tract gist is incomplete, just showing where I am currently
12:42 ab6tract I haven't had the patience so far to let the non-native version finish
12:42 ab6tract with native int, though, we are ~100% faster than p5 :D
12:43 brrt \o/
12:43 brrt (i'm at 0.48 seconds for the native run)
12:43 brrt pretty cool
12:44 brrt i'm wondering how that will do after the new codegen is in place
12:44 brrt (and after that, what happens when we have whole-routine register allocations and optimization)
12:45 ab6tract brrt: 0.48 seconds on moarvm ?
12:45 Ven joined #perl6
12:45 brrt yeah
12:45 brrt 4.6s for perl5
12:45 ab6tract that's fracking awesome :D
12:45 brrt use integer reduces that (for perl5) to 3.7s
12:46 ab6tract damn.. you... autocorrect.... fracking is not cool. fricking cool is fricking cool
12:46 brrt actually, one of the open projects is reducing big integer operations to small integers
12:46 brrt fracking gets quite hot, i've heard
12:46 brrt (for moarvm)
12:47 brrt and possibly to use escape analysis to (locally) unbox Int to int
12:50 jnthn On Windows the difference between the two benchmarks in https://gist.github.com/ab5​tract/1c394b6ef32bbf27374c is more notable: 0.67s including startup for Rakudo on Moar, vs. 7.35s for Perl 5 (dropping to 6.53s with use integer)
12:50 ab6tract that would be sweet
12:50 ab6tract jnthn: nice!
12:51 jnthn Remove the native "int" types, and it's darn slow, alas
12:52 brrt MVM_JIT_DISABLE=1 increases runtime to 2.8s; MVM_SPESH_DISABLE=1 to 2.9s
12:54 jnthn Despite all the allocation going on, causing 593 GC runs, the time doing GC only amounts to 2.5% of runtime.
12:54 jnthn Oh...
12:54 ab6tract i get 280 seconds here
12:54 jnthn ab6tract: 46s for r-m without the "int" annotations for me
12:54 ab6tract (for the non-native version)
12:54 jnthn But...we're not inlining any stuff o.O
12:55 jnthn Oh...darn, I bet I upset a bunch of that when I fixed &?ROUTINE.
12:56 * jnthn should sort that out
12:56 brrt of course
12:56 brrt it's much easier to perform if you just do the wrong thing :-P
12:56 jnthn Right ;)
12:56 ab6tract prelate's generated java code runs in 0.9 seconds :)
12:57 brrt well, that was on your machine that took 5s for the moarvm code, right
12:57 ab6tract s/prelate/flavio/   # only having these autocomplete issues in webchat.freenode.net
12:57 jnthn That's quite a correction :P
12:57 ab6tract brrt: no, I'm doing jam testing
12:58 brrt i don't comprehend?
12:59 ab6tract brrt: everything should be smoother now, I've gotten the autocorrect crap disabled
12:59 ab6tract so, "no I
12:59 ab6tract "no I'm doing jvm testing"
12:59 brrt ah, ok
12:59 brrt :-)
12:59 brrt autocorrect makes people confused
13:00 FROGGS that exclaims things :o)
13:00 ab6tract seriously... i think typos are easier to parse
13:00 ab6tract FROGGS: :)
13:00 jnthn Perl 6. It runs on MoarVM and jam. :P
13:00 ab6tract jnthn: so, interestingly, when I use for instead of while, the native type hints don't seem to have much of an impact at all
13:01 jnthn ab6tract: How do you write that with "for"?
13:01 brrt i think that's probably because for takes a closure
13:01 jnthn Indeed
13:02 nine brrt: yes, thank you very much for explaining.
13:02 brrt you're welcome :-)
13:07 ab6tract joined #perl6
13:08 ab6tract jnthn: https://gist.github.com/ab5tract/1c394​b6ef32bbf27374c#file-benchmark-for-p6
13:10 skids joined #perl6
13:12 brrt yeah, that's blocky
13:14 jnthn ab6tract: I highly doubt that way of writing it will perform well at the moment.
13:17 raiph joined #perl6
13:18 DrForr tadzik: Deprecation warning in Panda::Ecosystem.
13:22 tadzik DrForr: oh. Will look, thanks
13:22 DrForr Added a GH issue as well.
13:23 ab6tract jnthn: preliminary investigation agrees :)
13:23 ab6tract jnthn: am I doing something particularly suboptimal there?
13:24 llfourn joined #perl6
13:24 jnthn ab6tract: using "for" on a native array
13:25 jnthn Things should improve after the GLR
13:25 jnthn Though not sure if that alone will cut out any boxing.
13:26 donaldh joined #perl6
13:27 aborazmeh joined #perl6
13:27 aborazmeh joined #perl6
13:29 spider-mario joined #perl6
13:29 ab6tract jnthn: a bit of a saddy that we will again have performance implications of for-vs-where
13:29 abraxxa joined #perl6
13:34 dalek roast: 6e4fb04 | jnthn++ | S32-io/IO-Socket-Async.t:
13:34 dalek roast: Fix deprecation in test.
13:34 dalek roast: review: https://github.com/perl6/roast/commit/6e4fb04852
13:35 ab6tract jnthn: so the for-vs-while performance difference is just for native arrays? or will for always be slower because closures
13:36 jnthn ab6tract: Not sure about "always", but they won't be going away any time soon.
13:36 RabidGravy joined #perl6
13:36 jnthn ab6tract: Though the difference should hopefully reduce far enough that you have to really care about performance to bother about it.
13:37 RabidGravy boom!
13:41 nine Boom. Boom boom boom. Boom boom. Boom! Have a nice day.
13:43 * DrForr waves to nine. Woops :)
13:49 cognominal joined #perl6
13:52 rindolf joined #perl6
13:55 TimToady joined #perl6
13:56 ab6tract jnthn: so I got 2498.388 seconds for the naive for version :)
14:01 khw joined #perl6
14:03 ab6tract does anyone know of example Java interop code? The stuff from the advent calendar is all quite old
14:05 jnthn m: use Test; sub doit() { if True { LEAVE 1; return 'ls'; } }; is doit(), 'ls', 'return in nested block with LEAVE works';
14:05 camelia rakudo-moar fac28d: OUTPUT«const_iX NYI␤  in sub doit at /tmp/RaWLP57F6m:1␤  in block <unit> at /tmp/RaWLP57F6m:1␤␤»
14:06 jnthn ab6tract: I know psch++ worked on it most recently, and may have posted some examples somewhere
14:09 ab6tract pinging psch++ :)
14:12 timotimo ab6tract: do you know that a for ^1000 will actually generate an int over native integers?
14:14 dalek nqp: 3c8c39d | jnthn++ | tools/build/MOAR_REVISION:
14:14 dalek nqp: Bump MOAR_REVISION for various fixes.
14:14 dalek nqp: review: https://github.com/perl6/nqp/commit/3c8c39da82
14:15 Ven joined #perl6
14:15 dalek rakudo/nom: b1a56a2 | jnthn++ | tools/build/NQP_REVISION:
14:15 dalek rakudo/nom: Bump NQP_REVISION.
14:15 dalek rakudo/nom:
14:15 dalek rakudo/nom: Gets a MoarVM with a race condition in frame validation fixed, along
14:15 dalek rakudo/nom: with a bug in extop/exception interaction fixed.
14:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b1a56a2c0b
14:16 dalek roast: 21837e8 | jnthn++ | S04-phasers/enter-leave.t:
14:16 dalek roast: Test for RT #125480.
14:16 dalek roast: review: https://github.com/perl6/roast/commit/21837e8d14
14:18 timotimo well, there's at least an optimization in place that's supposed to do it, but it broke multiple times in the past
14:20 ab6tract timotimo: that's why I was doing my int @range = ^400. that was my attempt to enforce nativity
14:20 timotimo ah
14:20 timotimo you mean naivity?
14:20 ab6tract :)
14:21 ab6tract it was a naive attempt to enforce a native array
14:22 jnthn You got a native array
14:22 jnthn It's just that doing a "for" over one isn't particularly smart.
14:23 timotimo right, it'll probably box each of those ints
14:23 timotimo and then unbox it again
14:28 * jnthn gets tired of seeing https://rt.perl.org/Ticket/Display.html?id=68572 and its dependents, and decides he's smart enough today to decide for good that our-scoped stuff inside of roles is just going to be forbidden.
14:29 cognominal timotimo: nativity is delayed until christmas
14:31 * [Coke] finds that uchar needs xrdb, and wonders about making a uchar6 which might not need it.
14:31 yoleaux 12:03Z <[TuxCM]> [Coke]: http://tux.nl/Files/uchar-nopro
14:31 [Coke] Tux++
14:32 smls joined #perl6
14:38 yqt joined #perl6
14:42 ab6tract perl6 appears to respect CLASSPATH (at least, it chokes when it is malformatted in any way). however, loading modules from the CLASSPATH doesn't seem to be working... that is, what works in perlito5 with hte same enviornment is not loadable from perl6
14:58 virtualsue joined #perl6
15:00 jdv79 what is the failure mode for >>.?  should all other tasks be cancelled asap or let them complete?
15:00 jdv79 i couldn't find it in the spec
15:00 jdv79 when >>. is async that is
15:03 hoelzro_ii joined #perl6
15:10 [Coke] .ask tux if uchar has been tested on OS X? (I just installed quartz, xrdb, and now it runs without x errors, but if I run "uchar -d STUFF" it just prints out the original word.
15:10 yoleaux [Coke]: I'll pass your message to tux.
15:17 nowan joined #perl6
15:21 donaldh joined #perl6
15:23 ab6tract .ask psch any clues on what might be borking module loading from non-SDK modules which also happen to be in CLASSPATH?
15:23 yoleaux ab6tract: I'll pass your message to psch.
15:25 raiph .tell moritz Did you mean `use Perl6::Grammar:from<NQP>` (ie no space before `:from`)?
15:25 yoleaux raiph: I'll pass your message to moritz.
15:27 raiph star: use LWP::Simple; LWP::Simple.get('http://api.ipify.org').say; LWP::Simple.mirror('http://api.ipify.org') # Perl 6 LWP::Simple clone doesn't support `mirror`, so...
15:27 camelia star-m 2015.03: OUTPUT«78.47.60.231␤No such method 'mirror' for invocant of type 'LWP::Simple'␤  in block <unit> at /tmp/4OekuvQXz3:1␤␤»
15:27 raiph star: use LWP::Simple:from<Perl5>; LWP::Simple.get('http://api.ipify.org').say; LWP::Simple.mirror('http://api.ipify.org') # ... thought I'd try this but does the `:from<Perl5>` actually work?
15:27 camelia star-m 2015.03: OUTPUT«78.47.60.231␤No such method 'mirror' for invocant of type 'LWP::Simple'␤  in block <unit> at /tmp/siur_BbOHa:1␤␤»
15:28 ab6tract raiph: I think you need to use Inline::Perl5 first
15:28 timotimo star: use LWP::Simple; LWP::Simple.get('http://api.ipify.org').say
15:28 camelia star-m 2015.03: OUTPUT«78.47.60.231␤»
15:28 timotimo hm, doesn't seem rigght
15:28 raiph timotimo: LWP::Simple is bundled with Star
15:29 timotimo mhm
15:29 [TuxCM] [Coke], not tested on OSX
15:29 timotimo it'd be sensible to have it throw an exception if the :from isn't supported or something?
15:29 timotimo star: use LWP::Simple:from<lua>;
15:29 camelia star-m 2015.03: ( no output )
15:29 [TuxCM] developed ages ago on HP-UX for testing diacriticals we needed for our GBA
15:29 ab6tract timotimo: agreed
15:29 raiph is this because camelia's star is too old?
15:29 itz . o O ( HP-SUX )
15:30 [TuxCM] itz, why?
15:30 * [TuxCM] would understand such a snark remark about AIX
15:30 itz http://foldoc.org/HP-SUX :)
15:32 [TuxCM] have you ever works on it?
15:32 ab6tract star: use Thing:from<nonlang>
15:32 camelia star-m 2015.03: OUTPUT«===SORRY!===␤Do not know how to load code from nonlang␤»
15:32 ab6tract star: use Thing:from<lua>
15:32 camelia star-m 2015.03: OUTPUT«===SORRY!===␤Do not know how to load code from lua␤»
15:33 ab6tract funny :)
15:33 timotimo yeah, it only errors out if it finds no module at all
15:33 * geekosaur only familiar with an ancient version of hp/ux where an open file couldn't be deleted (unlike most unixlikes, but like windows)
15:33 timotimo it seems like the :from is more or less a tiebreaker in its implementation
15:33 itz not since the early 90s
15:34 [TuxCM] geekosaur, still true for share libraries that are used from memory. I don't recall it ever being true for files opened with an editor or somesuch
15:34 geekosaur also, AIX was a great OS. just don't make the mistake of thinking it's a unixlike :)
15:34 [TuxCM] AIX sucks on *all* levels except its file system implementation
15:34 geekosaur [TuxCM], this was in the context of the unix anonymous temp file hack: open/create and immediately unlink, leaving only the fd
15:35 ugexe lizmat: i was looking to implement absolutify() inside CURLy so CURLI could absolutify `provides` and `bin` paths. so i'm clear on its purpose, is it correct that $p1.absolutify($p2) would work would like rel2abs? or is absolutify meant to work with no arguments?
15:35 [TuxCM] which fool thought it would be a great idea to put 64bit objects and 32bit objects in the same library?
15:35 geekosaur and, um, this was in the late 1980s
15:35 [TuxCM] and allow the same object names for both
15:36 xfix joined #perl6
15:36 timotimo why not?
15:36 timotimo sounds like FatELF and what osx has
15:36 ab6tract timotimo: well, fwiw, :from<Java> is essentially broken for me
15:36 [TuxCM] because you cannot see from outside if there is any valid content in it
15:36 spider-mario joined #perl6
15:36 geekosaur (having my first serious C program be a BBS meant some interesting long distance calls at odd hours...)
15:36 [TuxCM] just testing for the file is void. loading the lib needs specific ENV vars
15:37 [TuxCM] and it makes porting OSS very hard, as most of the projects remove the library before the add the objects
15:38 [TuxCM] that means you have to build for 32bit, safe the lib, rebuild for 64bit
15:38 ugexe without an argument to absolutify i dont see how, with its current attributes/methods, to determine the actual absolute path
15:38 [TuxCM] use ENV and ar flags to add the objects from the saved lib to add those to the newly created lib
15:42 [Coke] jnthn: how might I get a list of all the characters that are combiners?
15:43 jnthn m: (^1000).grep({ uniprop($_, 'Canonical_Combining_Class') != 0 }).map(&uniname).say
15:43 camelia rakudo-moar b1a56a: OUTPUT«COMBINING GRAVE ACCENT COMBINING ACUTE ACCENT COMBINING CIRCUMFLEX ACCENT COMBINING TILDE COMBINING MACRON COMBINING OVERLINE COMBINING BREVE COMBINING DOT ABOVE COMBINING DIAERESIS COMBINING HOOK ABOVE COMBINING RING ABOVE COMBINING DOUBLE ACUTE ACCENT CO…»
15:43 jnthn But look beyond the first 1000, of course ;)
15:45 timotimo m: say 100.&uniprop('Canonical_Combining_Class')
15:45 camelia rakudo-moar b1a56a: OUTPUT«0␤»
15:49 [Coke] weird, getting Cannot convert string to number: base-10 number must begin with valid digits trying to compare to 0.
15:51 jnthn Oh, maybe you're tripping up on unassigneds...
15:51 jnthn Or "Not_Reordered" or so
15:51 * jnthn forgot the Unicode data isn't all integers
15:51 timotimo turns out i didn't find any gnome introspection stuff for gtksourceview because it's called "GtkSource-3.0.typelib"
15:52 timotimo and i saw it and was like "... that's not it for sure"
15:52 [Coke] jnthn: '888':'Not_Reordered'
15:52 [Coke] easy enough to fix. :)
15:52 jnthn .grep({ +uniprop($_, 'Canonical_Combining_Class') }) may do it
15:52 TimToady m: .say for (^1000).grep({ uniprop($_, 'Canonical_Combining_Class') ne 0 }).map(&uniname)
15:52 camelia rakudo-moar b1a56a: OUTPUT«COMBINING GRAVE ACCENT␤COMBINING ACUTE ACCENT␤COMBINING CIRCUMFLEX ACCENT␤COMBINING TILDE␤COMBINING MACRON␤COMBINING OVERLINE␤COMBINING BREVE␤COMBINING DOT ABOVE␤COMBINING DIAERESIS␤COMBINING HOOK ABOVE␤COMBINING RING ABOVE␤COMBINING …»
15:53 jnthn Or that...
15:53 hoelzro o/ #perl6
15:54 telex joined #perl6
15:57 hoelzro jnthn++ # fixing RT issues
15:59 dalek specs: 91635d4 | jnthn++ | S14-roles-and-parametric-types.pod:
15:59 dalek specs: Elaborate on meta-structure of roles.
15:59 dalek specs:
15:59 dalek specs: This also explains and justifies making `our` declarations inside of
15:59 dalek specs: roles a compile-time error.
15:59 dalek specs: review: https://github.com/perl6/specs/commit/91635d4f63
16:02 dalek roast: 42f32cc | jnthn++ | S (2 files):
16:02 dalek roast: Remove tests out of line with current design.
16:02 dalek roast: review: https://github.com/perl6/roast/commit/42f32cc8ad
16:02 dalek roast: a722e02 | jnthn++ | S14-roles/basic.t:
16:02 dalek roast: Update test to match current design.
16:02 dalek roast:
16:02 dalek roast: While the ticket complained about our $.x and my $.x in roles, only
16:02 dalek roast: the former was covered in the test. This changes it to cover the
16:02 dalek roast: latter, which is valid.
16:02 dalek roast: review: https://github.com/perl6/roast/commit/a722e02b13
16:02 dalek rakudo/nom: 05edaa4 | jnthn++ | src/ (2 files):
16:02 dalek rakudo/nom: Don't allow our packages inside of roles.
16:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/05edaa4d97
16:02 dalek rakudo/nom: e80b49a | jnthn++ | src/Perl6/ (2 files):
16:02 dalek rakudo/nom: Disallow our-scoped subs in roles.
16:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e80b49ac99
16:02 dalek rakudo/nom: 31a083f | jnthn++ | src/Perl6/Actions.nqp:
16:02 dalek rakudo/nom: Disallow our-scoped variables in roles.
16:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/31a083f942
16:04 spider-mario joined #perl6
16:04 sunwenjie joined #perl6
16:05 ab6tract .ask psch the module loader code for NQP... is there no native-Java way to find a class? can't we just s/::/./ and load the class? I know that CLASSPATH issues are notoriously common in Java, but still...
16:05 yoleaux ab6tract: I'll pass your message to psch.
16:06 [Coke] m: say "a" ~ chr(774);
16:06 camelia rakudo-moar b1a56a: OUTPUT«ă␤»
16:06 ab6tract at present, even though I have '.' in my CLASSPATH, I cannot load a ./Module.class or ./Module.java via use Module:from<Java> (using a short, stupid name for the sake of example)
16:08 dalek doc: fd4b367 | jdv79++ | lib/Language/concurrency.pod:
16:08 dalek doc: Start of section on safety.
16:08 dalek doc: review: https://github.com/perl6/doc/commit/fd4b3670a5
16:09 dalek roast: f205c13 | jnthn++ | S14-roles/namespaced.t:
16:09 dalek roast: Test RT #73390, RT #100468, RT #88750, RT #76450.
16:09 dalek roast: review: https://github.com/perl6/roast/commit/f205c13faf
16:11 jnthn There's another of those 6-year-old tickets dealt with :)
16:11 RabidGravy joined #perl6
16:11 chansen_ joined #perl6
16:12 TimToady jnthn: what's your feeling on when we should start hacking seriously on GLR?
16:12 clkao joined #perl6
16:13 jnthn TimToady: "Soon" :)
16:14 jnthn TimToady: I have very few $dayjob responsibilities this month
16:14 jnthn TimToady: Uh, for Aguust I mean :)
16:14 jnthn *August
16:14 TimToady do you think we can get it out for the Aug release?
16:14 jnthn If we can be decisive enough about things.
16:15 jnthn I was pondering the various types and their relationships on the flight home last night
16:16 TimToady we definitely need to make a harder distinction between iterators and lazy arrays-of-non-containers
16:16 jnthn Indeed
16:16 [Coke] tux, lizmat, jnthn : here's uchar -d: https://gist.github.com/coke/a6185c6ecdeec5e83bd3
16:17 [Coke] m: say "3" neq "4"
16:17 camelia rakudo-moar b1a56a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iFFgkRq0Q3␤Two terms in a row␤at /tmp/iFFgkRq0Q3:1␤------> 3say "3"7⏏5 neq "4"␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        sta…»
16:18 [Coke] I wonder if adding a helpful message there about using "ne" instead of "neq" would help.
16:18 jnthn I pondered a bit what happens if we make List be what Parcel is now, only Array gets .shift and friends, and we have some type (I called it Generator to have a working name) for things that produce values but aren't committed to keeping them around.
16:18 TimToady what's "neq"?
16:18 jnthn And it turned out that nearly everything produced a Generator... :P
16:18 TimToady did you mean !eq?
16:18 [Coke] TimToady: it's how pascal-like languages spell ne.
16:18 pnu joined #perl6
16:19 jnthn And then it wasn't clear what type thigns like .eager, .hyper, etc. produced.
16:19 [Coke] just took me a second to figure out I wasn't writing coldfusion. :)
16:19 ggherdov joined #perl6
16:19 TimToady jnthn: I think of those as negotiators
16:20 jnthn Do you have a feel for how "deep" they go?
16:20 jnthn .map(...).map(...).hyper # is the hyper just about that final map?
16:21 TimToady I'm hoping it goes deeper, for optimization purposes
16:22 TimToady you'd like to be able to hand nested mappings to a single processor, so you don't have pipelining overhead along with threading
16:22 TimToady (my gut tells me)
16:22 jnthn Right, that's the desirable thing about it going deeper
16:22 FROGGS joined #perl6
16:22 jnthn The problematic bit is @thing-i-don't-know-about.map(...).hyper
16:23 zoosha joined #perl6
16:23 jnthn And I've no idea if the thing I don't know about can have any unevaluated things safely evaluated over many threads.
16:23 jnthn In other words, I'm worrying about composability.
16:24 jnthn As a data point, PLinq (the .Net parallelized implementation of map, grep, etc.) makes you mark out where in a pipeline it's safe to parallelize, and then lets you opt out of it again deeper in.
16:24 Spot__ joined #perl6
16:24 jnthn So it has a "region" it knows you've declared safe.
16:25 TimToady well, everything would need to know the range of its capabilityes, and the negotiation restricts that actual possibilities to the intersection of the output and input capabilities
16:26 TimToady I also see interational ops as returning a negotiator, and it's not till someone actually starts pulling stuff that you actually set up the whole pipeline
16:26 jnthn Sure, but sub foo() { my %h; $file.words.map({ %h{$_}++ }) }; foo.map(...).hyper # how do we know the map inside of the thing returned from the sub will be upset by parallelism during the neogiation?
16:26 TimToady perhaps that's like what you're saying about opting out later
16:27 jnthn Oh, I can easily agree on not setting up the pipeline until we actually start pulling stuff. That's exactly the way Supply pipelines work.
16:27 TimToady good question
16:28 jnthn I think my question is orthogonal (and better captured by the example I just gave)
16:28 TimToady I suppose in that particular case we've got to notice that the map refers to something extern that is not threadsavfe
16:28 TimToady sorry for typos, laggy connection...
16:28 jnthn np
16:29 jnthn Well, it's really easy for not threadsafe things to get disguised though... Which is why we've tended towards explicit things like .hyper and .race to opt in and say "I promise this is safe"
16:31 TimToady so maybe we need to separate the markers for can-hyper vs want-hyper somehow
16:31 TimToady or can-whatever-this-pipeline-can
16:31 jnthn Maybe something like that, yeah.
16:31 jnthn I'd really like to take care of .hyper and .race during the GLR work, anyways. So we are sure we have the API to do them.
16:31 jnthn (Or didn't do anything to stop us having them.)
16:32 TimToady if we do one level to start, let's at least not preclude deeper
16:34 araujo joined #perl6
16:34 jnthn *nod*
16:34 TimToady if we negotiation a strictly lazy pipeline, can we get to the point where our getters are just nested closures, or does that buy us anything over an OO approach?
16:35 jnthn Well, at the moment we do far better at optimizing chains of method calls than nested closures
16:35 araujo joined #perl6
16:35 jnthn Both on Moar and on JVM
16:35 jnthn We can inline method calls successfully already.
16:35 TimToady okay
16:36 TimToady a bunch of metaops are done with FP currently though
16:36 jnthn We don't do well at inlining things that close over outer state so far.
16:36 jnthn Yeah, we may want to refactor some of that. The operators themselves don't tend to close over anything, so should be inlinable.
16:37 jnthn Well, not sure they are now, but that's an achievable amount of work, I think.
16:38 jnthn (In the context of meta-ops, I mean. We can inline most operators in "normal" use.)
16:38 jnthn Anyway, I'd lean to a more object-y API for iterators.
16:38 TimToady well, most of 'em need state anyway
16:39 smls jnthn: In your GLR idea, what would be the difference between Generator and Iterator?
16:39 yoleaux 06:25Z <timotimo> smls: could you be super nice and fetch the newest dll files for gtk-simple for me to put onto hack? or maybe give me a script or instructions where they can be found, exactly? also, if you could grab gtksourceview-3 in addition to what we already have, that'd be swell :)
16:39 jnthn Aye, but if that's carried in attributes, we're really good at optimizing access to those.
16:40 smls hm, timotimo's message was not meant for me was it?
16:40 jnthn smls: Generator = a think that produces values if iterated
16:40 jnthn *a thing
16:41 captain-adequate joined #perl6
16:41 timotimo smls: not?
16:41 jnthn And the Iterator is the thing you actually use to obtain values.
16:41 smls timotimo: Well, I don't understand what it's about
16:42 timotimo you are right
16:42 timotimo i really wanted retupmoca
16:42 timotimo i just lazily looked at the GTK::Simple git log
16:43 smls ah :)
16:43 dalek perl6-roast-data: 51374e9 | coke++ | / (9 files):
16:43 dalek perl6-roast-data: today (automated commit)
16:43 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/51374e967d
16:44 TimToady jnthn: I dunno, http://stackoverflow.com/questions​/1022564/what-is-the-difference-be​tween-an-iterator-and-a-generator seems to say it kinda the other way around
16:44 TimToady in any case, the concepts kinda blur when you're mixing FP and OO
16:44 TimToady I never could keep them straight :)
16:45 jnthn If you know who C# does it, then I'm using Iterator for something like IEnumerator (but we'll need to fold a good bit more into ours) and Generator for IEnumerable
16:45 jnthn *how
16:46 jnthn But really, I'm using Generator for "the type of thing you get from .map, xx, lines, etc." - something you actually normally encounter as a programmer
16:46 [TuxCM] [Coke], mine also takes into account which of those are supported by the current font. That might be why you got those X errors
16:46 TimToady by the SO definition, a generator is just an iterator with an implicit object somewhere, and an iterator is an object that supplies a generator-like method
16:46 jnthn And Iterator as the API used to pull things through the pipeline.
16:47 rurban joined #perl6
16:48 jnthn Well, I'm mostly trying to say that the type genCountingNumbers() returns is something user-visible, but the thing your implementation of map (or for) obtains in order to actually walk through the values is something else.
16:48 jnthn (It *is* user-visible I guess, but you rarely need to work at that level.)
16:50 TimToady right, map/for really interrogate their argument (singular) for an iterator to pull from
16:50 jnthn So for $value -> $x { ... } is roughly my $tmp1 = $value.iterator; my $tmp2 = -> $x {...}; while $tmp1 { $tmp2($tmp1.pull) }
16:51 TimToady right
16:52 TimToady and we'll have to teach p5 programmers that there aren't really any lists, syntactically speaking, just singular objects that can behave like lists
16:53 TimToady well, except insofar as comma is syntactic
16:53 smls jnthn: "Iterator as the API used to pull things through the pipeline" -- isn't that Iterable (the role) rather than Iterator (the class)?
16:53 jnthn smls: Iterator probably is a role
16:53 smls oh
16:53 jnthn Like IEnumerator is
16:53 smls m: say Iterable; say Iterator;
16:53 camelia rakudo-moar 31a083: OUTPUT«(Iterable)␤(Iterator)␤»
16:53 timotimo "Iterable" sounds more like something you can grab earlier values out of - or perhaps only "start again from the beginning"?
16:54 jnthn smls: I'm not talking about how things are now, but how I think they should be post-GLR, fwiw.
16:54 TimToady smls: if you're asking about how it is now, it's confused now
16:54 jnthn And Iterable is just something like role Iterable { method iterator() { ... } }
16:54 smls joined #perl6
16:54 TimToady we overloaded .list for too many things
16:54 jnthn Indeed, and the List type.
16:54 smls ok
16:55 jnthn Anyway, I'll maybe avoid using the word Generator 'cus it's perhaps loaded in ways I didn't intend.
16:56 jnthn I mostly mean "a thingy that, when iterated, may forget its values"
16:56 TimToady but if we think of a gather/take as a generator, it kinda fits into the notion that you have code producing values rather than an object
16:56 jnthn Well, gather/take is one of the things I'd have said returns a Generator in the way I used the word, yes
16:56 smls pmichaud proposed 'Seq' as a provisional name for that, didn't he?
16:56 jnthn But it turns out that almost every list operation then will
16:57 jnthn smls: Yes
16:57 TimToady internal types don't really need short names though
16:57 jnthn I could live with that name for it too
16:57 jnthn Well, I don't see it as internal
16:57 jnthn my $thing := gather ...; # $thing would be whatever the type we're talking about is called
16:58 TimToady okay
16:59 jnthn The "what happens when the thing gets a name so can be iterated multiple times" question is the fun one.
17:00 TimToady does it make sense for me to continue trying to prototype things from the top down?  or will everything naturally rewrite itself from the bottom up in time for us to play with it?
17:00 jnthn Which led me to wonder if the thing gather and friends return has some .memoize() method, and ::='ing it into an @foo would call that for you, at which point it has to remember.
17:01 TimToady I don't think iterators ever promise to be reiterable, but maybe I could be wrong sometimes
17:01 jnthn It's not the *iterator* that promises
17:01 jnthn It's the source of values the iterator lets you move through.
17:01 TimToady well, if you're bind it to something that promises, then you have to remember the values
17:02 TimToady but you're not talking about caching values here?
17:02 timotimo you really mean ::=?
17:02 timotimo compile-time bind?
17:02 smls Btw, what is the motivation for having it as a different type from List (rather than a property that a List may have)?
17:02 jnthn TimToady: I mean "what signature binding does", which we already know is distinct from :=
17:02 TimToady ::= isn't compile-time bind
17:02 jnthn uh, ^ was for timotimo :)
17:03 TimToady smls: what is "it"?
17:03 smls Generator
17:03 timotimo oh, that's :::= ?
17:04 * TimToady looks worriedly at timotimo
17:04 ChoHag Did I stumble into a Gilette board meeting?
17:04 timotimo .. didn't we have something like that at some point?
17:04 jnthn sub foo(@x) { say @x.elems; for @x { .say } }; foo(lines())
17:04 TimToady give away the handle, sell the razors
17:05 TimToady timotimo: are you confusing the readonly that ::= does with compile time?
17:05 jnthn I'm saying that the above isn't going to work if we don't at some point do something to make whatever we bind to @x remember the values produced by lines
17:05 TimToady readonly is still a runtime concept
17:05 timotimo ... maybe? i remember something like that from somewhere ... sorry for the noise
17:05 jnthn And we need to pick carefully any places that happens "magically"
17:05 jnthn sub foo(\x) { say x.elems; for x { .say } }; foo(lines()) # I'd maybe expect this to *not* work out well, for example
17:06 TimToady my inclination is to attach that to the @ sigil
17:06 jnthn Mine too
17:06 TimToady maybe we can sell razor subscriptions as well, and encourage people to change their razors more often than they otherwise would
17:07 jnthn I suspect we're probably at the point where I need to start writing the bottom-up code so we have something more concrete to work around.
17:07 TimToady it would relieve my anxiety a bit if we got started on it :)
17:08 b2gills TimToady: really it should be looked at from both bottom up and top down ( thinking like that has helped John Deere at their manufacturing plants )
17:09 jnthn TimToady: Yes, mine too ;)
17:10 jnthn And now I'm successfully married, relocated, don't have a course to finish writing, and don't feel dizzy half the time any more, I'm in a decent place to work on it :)
17:11 njmurphy joined #perl6
17:11 ChoHag jnthn: Recently married?
17:11 ChoHag I suggest not having kids if you like programming.
17:11 TimToady hey, I had four
17:12 timotimo thing is, babbies don't come with JTAG
17:12 ChoHag You got the rest of the world to do your programming for you.
17:12 jnthn :)
17:13 TimToady actually, I made enough programming that I could afford a stay-at-home wife
17:13 TimToady but yes, in the sense that the real programming is mostly out on CPAN, I agree
17:14 TimToady Perl was the razor handle, and CPAN the blades
17:14 * jnthn needs a keyboard break, not to mention a dinner break...
17:14 jnthn I'l bbl
17:14 * TimToady should go get his car smogged...
17:14 jnthn I thought it was the car that made the smog? :)
17:14 TimToady desmogged
17:14 jnthn Maybe that's just in Beijing...
17:15 jnthn Anyway, back in a bit :)
17:15 TimToady one of those classes of words where the negation means the same thing; I peeled the banana, I unpeeled the banana
17:15 ChoHag Speak of the devil (is that the right phrase...?) my daughter's back.
17:16 jnthn .oO( I untyped on IRC )
17:22 preyalone joined #perl6
17:24 mr-foobar joined #perl6
17:26 diana_olhovik joined #perl6
17:56 Hor|zon joined #perl6
17:59 ChoHag What's the 'right' way to get the class name of self?
17:59 ChoHag self.WHAT.perl works but looks like it a 'wrong' way.
18:00 timotimo self.WHAT.name sounds like a better idea
18:00 timotimo m: say "foo".WHAT.name
18:00 camelia rakudo-moar 31a083: OUTPUT«Method 'name' not found for invocant of class 'Str'␤  in block <unit> at /tmp/JbfgZkudu1:1␤␤»
18:00 timotimo er
18:00 timotimo m: say "foo".WHAT.^name
18:00 camelia rakudo-moar 31a083: OUTPUT«Str␤»
18:00 timotimo is what i meant
18:00 timotimo m: say "foo".^name
18:00 camelia rakudo-moar 31a083: OUTPUT«Str␤»
18:04 ChoHag Thanks.
18:10 cognominal_ joined #perl6
18:10 jinxter joined #perl6
18:21 domidumont joined #perl6
18:23 dwarring joined #perl6
18:26 domidumont joined #perl6
18:29 cognominal__ joined #perl6
18:32 flussenc1 joined #perl6
18:32 TEttinger joined #perl6
18:34 sergot_ joined #perl6
18:34 nowan_ joined #perl6
18:34 zoosha_ joined #perl6
18:36 rindolf joined #perl6
18:37 leont Awesome, moar is crashing with a "double free or corruption"…
18:37 vendethiel joined #perl6
18:37 tadzik Lovely :)
18:38 jinxter joined #perl6
18:38 RabidGravy noice
18:42 timotimo ouch
18:42 timotimo you can Configure.pl your moarvm with --asan
18:42 timotimo that'll give you lots of diagnosis info
18:42 chansen_ joined #perl6
18:46 diana_olhovik_ joined #perl6
18:56 leont It's in mutli-threaded code, so the mistake may be mine, but if so it's subtle
18:57 timotimo right, i'm just now handling a segv in a six-threaded program
18:57 jnthn Well, we still shouldn't SEGV ever, unless you screw up with NativeCall
18:58 jnthn The one timotimo has was hit by someone else not long ago too
18:59 robinsmidsrod joined #perl6
19:00 timotimo well, this is also with nativecall
19:00 timotimo but nativecall shouldn't cause the gc to stumble over a nulled STable
19:00 jnthn Right, this is clearly a GC bug
19:02 Ven joined #perl6
19:03 * [Coke] sees a lot of non-git-friendly commit messages in the past 2 weeks or so.
19:03 timotimo hm?
19:03 * [Coke] thinks git friendly has the gist of the commit in the first...50ish characters.
19:03 timotimo oh, text on the second line?
19:04 hobbs short first line, blank line, paragraphs after
19:04 * jnthn tries to stick to that
19:04 jnthn I edit the messages with Vim which does pretty colors to tell me off if I'm getting it wrong :)
19:04 * timotimo has trouble making the first line very short most of the time
19:04 timotimo yup
19:07 ChoHag "Hacked on stuff. See below."
19:07 timotimo that's not helpful :)
19:07 ChoHag Accurate though.
19:08 timotimo that's both true for so many things :)
19:10 flussence the summary line is supposed to reflect what's in the commit itself, so if the summary itself is too big...
19:10 flussence .oO( ...use a smaller font size )
19:13 dolmen joined #perl6
19:14 zakharyas joined #perl6
19:24 timotimo sometimes i already struggle with a one-line-change
19:25 yqt joined #perl6
19:41 esaym153 joined #perl6
19:41 ChoHag I guess there's always tweet-speak.
19:41 esaym153 so, totally off topic... what cell phone does Larry Wall (TimToady) use? :)
19:42 timotimo is that very different from txtspk?
19:42 ChoHag I don't really know the details. I'm too old for both.
19:42 ChoHag I just know it's basically compression.
19:42 timotimo hm-hm
19:42 ChoHag Lossy.
19:43 llfourn joined #perl6
19:46 amurf joined #perl6
19:56 Ven joined #perl6
20:02 virtualsue joined #perl6
20:07 virtualsue joined #perl6
20:08 virtualsue joined #perl6
20:09 virtualsue joined #perl6
20:11 [Sno] joined #perl6
20:18 dalek perl6-examples: 7e9c6c0 | (Steve Mynott)++ | categories/cookbook/17sockets/17-01tcp_client.pl:
20:18 dalek perl6-examples: .sock to .print
20:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/7e9c6c0f97
20:18 itz__ .send that is :/
20:24 rurban joined #perl6
20:25 dalek doc: 45a260a | paultcochrane++ | lib/Type/IO/ArgFiles.pm:
20:25 dalek doc: Document $*ARGFILES
20:25 dalek doc: review: https://github.com/perl6/doc/commit/45a260a7c6
20:26 lucasb joined #perl6
20:28 lucasb m: fail
20:28 camelia rakudo-moar 31a083: ( no output )
20:30 lucasb should that... fail?
20:31 timotimo hm, the last statement gets sunk
20:31 timotimo it should throw, shouldn't it?
20:33 lucasb yeah, I was expecting it to fail; I'm on an outdated revision locally, and it throws here
20:38 raiph joined #perl6
20:43 llfourn joined #perl6
20:51 Khisanth joined #perl6
20:52 * ab5tract_ is still marvelling at moar's speed when while looping with native integers
20:53 ab5tract_ *when while-looping
21:03 dj_goku_ joined #perl6
21:03 dj_goku_ joined #perl6
21:04 mattp__ joined #perl6
21:05 apejens joined #perl6
21:05 Psyche^ joined #perl6
21:06 leont joined #perl6
21:07 ab5tract_ ugexe: I'm enjoying your posts about zef!
21:08 virtualsue joined #perl6
21:11 ab5tract_ my @basenames = @processes.flatmap(*.flat).​flat>>.id>>.IO>>.basename;   # this line makes me sad though
21:12 ab5tract_ I was going to try to convince you that `@processes.map: *.id.IO.basename;` was an even cleaner why to write what you wanted.
21:13 ab5tract_ but it looks like you've already had to adjust the code for flattening
21:17 jjido joined #perl6
21:22 raiph joined #perl6
21:22 tony-o hail zef
21:30 ab5tract_ m: module N { our $foo = "thingy"; our $thingy = "other thingy"; }; say N::<<\${N::<$foo>}>>; say my $other ="\${N::<$foo>}"; say N::<<$other>>;
21:30 camelia rakudo-moar 31a083: OUTPUT«(Any) (Any)␤$thingy␤other thingy␤»
21:31 ab5tract_ ah, wait.. I'm misunderstanding << >> in this context
21:31 tony-o what are you sinking it means?
21:31 ab5tract_ tony-o: well, actually I was misholding it for every context.
21:32 ab5tract_ m: module N { our $foo = "thingy"; our $thingy = "other thingy"; }; say N::<<"\${N::<$foo>}">>;
21:32 camelia rakudo-moar 31a083: OUTPUT«other thingy␤»
21:34 ab5tract_ I was thinking of it as qq{ } rather than qw( ) (to explain it in p5 terms)
21:55 ugexe ab5tract_: thanks. that line is so convoluted because now my processes structure looks like [[1,2,3],[4],[5,6]] (chunks to process in parallel), so i had to shoehorn that in to get by for now
21:57 TimToady hopefully this gets more betterer after GLR
21:58 timotimo many people are counting on it :P
22:04 geekosaur joined #perl6
22:16 tony-o ===> Precompiling [done]
22:16 tony-o oops
22:20 telex joined #perl6
22:25 dalek rakudo-star-daily: 525a101 | coke++ | log/ (9 files):
22:25 dalek rakudo-star-daily: today (automated commit)
22:25 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/525a1013a5
22:32 rangerprice joined #perl6
22:36 ab5tract_ ugexe: I see.. I wonder if this snippet offers anything useful:
22:36 ab5tract_ m:  my @f.push: [<oo ooo oooo>] xx 20; ( @f.values.map: { [ @($^g)>>.succ ] } ).perl.say
22:36 camelia rakudo-moar 31a083: OUTPUT«(["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["…»
22:39 ab5tract_ that's the (arguably, of course) cleanest approach for operating on every element of a uniformly [ [],[],[],.. ] LoL
22:39 ab5tract_ it was certainly the cleanest that I was able to muster
22:43 skids joined #perl6
22:44 llfourn joined #perl6
22:48 ugexe my @basenames = @processes.values.map: { @($^a)>>.id>>.IO>>.basename } # same number of characters, but agree its cleaner. ab5tract_++
22:48 jjido ab5tract_: funny. I guess operating on the first character instead of last would not be as "clean"
22:49 ugexe >>.reverse>>.succ>>.reverse :o
22:50 ab5tract_ jjido: not sure what you mean
22:51 jjido m:  my @f.push: [<oo ooo oooo>] xx 20; ( @f.values.map: { [ @($^g)>>.succ>>.reverse ] } ).perl.say
22:51 camelia rakudo-moar 31a083: OUTPUT«(["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["op", "oop", "ooop"], ["…»
22:51 jjido m:  my @f.push: [<oo ooo oooo>] xx 20; ( @f.values.map: { [ @($^g)>>.succ]>>.reverse } ).perl.say
22:51 camelia rakudo-moar 31a083: OUTPUT«((("op",), ("oop",), ("ooop",)), (("op",), ("oop",), ("ooop",)), (("op",), ("oop",), ("ooop",)), (("op",), ("oop",), ("ooop",)), (("op",), ("oop",), ("ooop",)), (("op",), ("oop",), ("ooop",)), (("op",), ("oop",), ("ooop",)), (("op",), ("oop",), ("ooop",)),…»
22:52 jjido oh well. I was joking about "poo"
22:52 ab5tract_ ugexe: you know, I've been really enjoying how concise >>. is. then as soon as I have to do something like >>.method>>.chain>>.for>>.days, I start to wish for something even more precise!
22:52 ab5tract_ #perl6-problems
22:53 ugexe i know your pain
22:53 ab5tract_ jjido: haha! it's late here, that was my fault for not getting the joke ;)
22:53 ab5tract_ speaking of which, I think I'm going to call it a night
22:53 jjido ok good night
23:03 ab5tract_ not to poo all over the place but..
23:03 ab5tract_ m: "ooo".succ.comb.reverse.join  # this works
23:03 camelia rakudo-moar 31a083: ( no output )
23:04 ab5tract_ m: "ooo".succ.comb.reverse.join.say  # this works
23:04 camelia rakudo-moar 31a083: OUTPUT«poo␤»
23:04 ab5tract_ @(["ooo" xx 20])>>.succ>>.comb>>.reverse>>.join.say   # should I expect this to work?
23:06 ab5tract_ if not, how can we determine under which conditions a hyper-chain of methods would differ from it's non-hyper behavior
23:06 ab5tract_ m: @(["ooo" xx 20])>>.succ>>.comb>>.reverse>>.join.say   # oop s ;)
23:06 camelia rakudo-moar 31a083: OUTPUT«o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p o o p␤»
23:07 ab5tract_ okay, that was too muc time spent on 'poo'.. out for real now :)
23:11 amurf joined #perl6
23:18 Sgeo_ joined #perl6
23:19 Sgeo_ Does (1|2|3) + (4|5|6) make sense? By analogy with Haskell's List monad, I would expect 5|6|7|6|7|8|7|8|9 or 5|6|7|8|9 if duplicates automatically get removed
23:21 Peter_R joined #perl6
23:29 TimToady m: say (1|2|3) + (4|5|6)
23:29 camelia rakudo-moar 31a083: OUTPUT«any(any(5, 6, 7), any(6, 7, 8), any(7, 8, 9))␤»
23:29 TimToady it doesn't dedup at the moment
23:30 Sgeo_ Would that nesting cause it to behave differently from 5|6|7|6|7|8|7|8|9?
23:31 TimToady well, junctions aren't ordered, but if you wrote that junction, it should work the same, I think
23:31 Sgeo_ m: say so 8 == ((1|2|3) + (4|5|6))
23:31 camelia rakudo-moar 31a083: OUTPUT«True␤»
23:31 TimToady m: say 5|6|7|6|7|8|7|8|9
23:31 camelia rakudo-moar 31a083: OUTPUT«any(5, 6, 7, 6, 7, 8, 7, 8, 9)␤»
23:31 TimToady doesn't dedup even there really
23:32 Sgeo_ Not as interested in the dedup as I am in the nesting
23:33 Sgeo_ I can't make my own not-Anys that twist around the meaning of calls that have them as arguments that are expecting Any, can I?
23:35 TimToady well, the outside of Any is reserved for future concepts, so the intent is to support that sort of thing eventually
23:35 TimToady we only use it for Junction currently
23:37 TimToady so I don't know how hardwired the Junction dispatch is, or whether it would handle other types
23:39 ShimmerFairy IIRC "Each" once existed and was outside of Any too, and it was similar to Junction.

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo