»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 May 2018.
geekosaur 2013's a long time ago, it's been is DEPRECATED for a while 00:00
but the implenentation was iirc causing problems in precompiled code so lizmat redid it 00:01
but that introduced breaking changes for other cases. but people generally care about not having to recompile everything on the fly
(which is slow)
nd the precompiled deprecations issue was breaking a lot of other stuff, so. 00:02
Xliff_ OK. PR incoming 00:03
Geth DBIish: Xliff++ created pull request #122:
- Commits changes addressing issue #121.
00:05
Xliff_ I can confirm this as now allowing DBIish to install. 00:07
00:22 aindilis left 00:29 w_richard_w joined 00:34 markong left, markong joined 00:38 molaf left 00:40 aindilis joined 00:41 athenot joined 00:43 comborico left 00:47 pilne left, athenot left 00:55 Kaiepi left 00:57 Kaiepi joined 00:58 markong left 01:03 BenGoldberg joined 01:11 [particle] joined 01:13 [particle]1 left 01:15 [particle] left 01:16 [particle] joined 01:19 [particle]1 joined 01:20 [particle] left 01:29 [particle] joined, [particle]1 left 01:33 [particle]1 joined 01:35 [particle] left 01:36 donpdonp joined, comborico1611 left
Geth DBIish: 8d8f59ba72 | [email@hidden.address] | 4 files
- Commits changes addressing issue #121.
01:39
DBIish: b2b7e1edeb | (Zoffix Znet)++ (committed using GitHub Web editor) | 4 files
Merge pull request #122 from Xliff/master

  - Commits changes addressing issue #121.
01:40 [particle]1 left, kjk joined
Geth DBIish: 58d2a4e5d2 | (Zoffix Znet)++ (committed using GitHub Web editor) | META6.json
Bump version and fix incorrect `perl` attribute

  `perl` specifies the minimum perl6 version the module works with,
but `v6` is after `v6.c`
01:41
01:45 ilbot3 left 01:52 [particle] joined 01:56 enheh joined, ilbot3 joined, ChanServ sets mode: +v ilbot3 02:03 [particle] left 02:04 [particle] joined 02:08 [particle] left 02:09 [particle] joined 02:17 [particle]1 joined 02:19 [particle] left 02:22 [particle]1 left 02:25 [particle] joined
rouking jnthn: I was watching your talk on objects & concurrency, and I was wondering why `Supply.start(...)` returns a Supply of Supplies rather than a Supply of Promises, since each Supply will only ever produce one value (which seems more like a Promise). Is this just so that it can be used easily with `.migrate`? 02:27
02:34 [particle] left 02:41 [particle] joined 02:44 [particle]1 joined 02:45 [particle] left 02:49 [particle]1 left 02:59 raynold joined
lookatme rouking, I think this just make one interface/method cooperate with another 03:06
03:07 kjk left 03:44 Herby_ joined
Herby_ \o 03:44
04:02 Herby_ left 04:29 w_richard_w left, w_richard_w joined 04:41 capcassiuscalhou left 04:45 sno left 04:46 parv joined 04:47 curan joined 04:56 [particle] joined, aindilis left 05:05 jmerelo joined 05:06 curan left, curan joined, aindilis joined 05:09 stevie left 05:10 wamba joined 05:32 domidumont joined 05:37 HaraldJoerg joined 05:39 domidumont left 05:40 domidumont joined 05:54 domidumont left 05:59 sno joined
Geth doc: 52d98f7c8d | (JJ Merelo)++ | doc/Language/structures.pod6
Adds blocks refs #114
06:07
synopsebot Link: doc.perl6.org/language/structures
06:09 [particle]1 joined 06:10 BenGoldberg left 06:11 [particle] left 06:12 psychoslave joined 06:14 xtreak joined 06:18 domidumont joined 06:23 domidumont left, domidumont joined 06:30 aindilis left 06:31 Sgeo__ joined, jmerelo left 06:33 Sgeo_ left 06:35 espadrine_ left 06:55 cibs joined 07:10 dct joined 07:15 jmerelo joined 07:16 shareable6 joined 07:31 jmerelo left 07:33 jmerelo joined 07:36 AlexDani` joined 07:37 AlexDaniel left 07:39 wamba left 07:47 wamba joined
Geth doc: 0964154c3c | (JJ Merelo)++ | doc/Language/regexes.pod6
Eliminates :L as shorthand for alpha refs #2060
07:51
doc: d57ea25d6b | (JJ Merelo)++ | doc/Language/regexes.pod6
Checks other references to the equivalence :L <=> alpha

Founds nothing. The OP of #2060 was right, so it has been eliminated. Also some reflow, closes #2060.
synopsebot Link: doc.perl6.org/language/regexes
07:52 darutoko joined
Geth doc: 37279cc8c5 | (JJ Merelo)++ | doc/Language/regexes.pod6
Eliminates non-working conjunctions.

Thanks to @ronaldxs for spotting them. Closes #2064.
Also some reflow around that change.
08:17
synopsebot Link: doc.perl6.org/language/regexes
08:23 shareable6 left
Geth doc: 5e488818db | (JJ Merelo)++ | doc/Language/regexes.pod6
Fixes weird pod error
08:29
synopsebot Link: doc.perl6.org/language/regexes
08:38 wamba left
lizmat weekly: lancewicks.com/2018/05/25/tuning-a-...plication/ 08:52
notable6 lizmat, Noted!
09:04 Schepeers_ joined
Geth doc: 9ef1469d81 | (JJ Merelo)++ | doc/Language/structures.pod6
Adds info on functions refs #114
09:04
synopsebot Link: doc.perl6.org/language/structures
09:07 Schepeers left 09:08 xtreak left
jnthn rouking: Yes, and both .migrate and .flat. Also, since `whenever` on a Promise and on a 1-element Supply look identical, and so does `await`, then most of the time you can get away without knowing. 09:16
09:16 dct left
masak argh, language design 09:18
Feynman's "everything is interesting if you go into it deeply enough" has a dark side to it, too :P 09:20
09:21 w_richard_w left 09:32 xtreak joined
masak interesting thing I never thought about before: all of (Perl 5, Perl 6, Python, JavaScript) run a module when you import it 09:33
that's quite a bit of code that runs at "compile time"
09:34 ChoHag joined
moritz well, in Perl 6, not so much 09:34
masak how do you mean?
moritz the module mainline runs at compile time, not at "use" time
masak "use" time _is_ compile time 09:35
moritz ... unless the module is precompiled
which it is after the first loading
sjn "compile time, or earlier" :)
09:36 robertle joined 09:37 wamba joined
sjn waves hello to #perl6 o/ 09:37
09:37 dustinm` joined
moritz waves back 09:37
09:38 shareable6 joined, ChanServ sets mode: +v shareable6 09:42 ambs joined
Geth doc: 0a43f8e7a2 | (JJ Merelo)++ | doc/Language/structures.pod6
Fixes pod error refs #114
09:43
synopsebot Link: doc.perl6.org/language/structures
masak sjn: *wave* \o 09:50
jnthn Even if the module is precompiled, its mainline code runs on loading. 09:52
masak moritz: I realize I have some gaps wrt precompilation... but I don't think we're in significant disagreement. modulo precompilation, when the parser sees a `use` statement, it goes and *runs* the imported module file.
moritz jnthn: even the compile-time parts of the module, like class declarations?
09:53 scott_ joined
masak um, class declarations don't have any runtime behavior... :P 09:53
jnthn moritz: Class declarations don't compile into code, they're meta-object method calls at compile time.
But no, those aren't re-run
09:53 zostay_ joined 09:54 PotatoGim_ joined
masak jnthn: does an imported module ever run more than once, for example if it's `use`d from multiple places in a code base? 09:54
jnthn I was more referring to things like `my $the-singleton = Whisky.new; sub get-foo() is export { $the-singleton }` :)
masak: No
masak good
jnthn Thus why my singleton example above works :)
masak right
I just arrived at the same conclusion in github.com/masak/007/issues/53#iss...-392474929 09:55
09:55 wamba left
jnthn (Also, this is not an endorsement of the singleton anti-pattern :P) 09:55
masak jnthn: I think there's a bit of an overreaction sometimes to singletons being an anti-pattern
jnthn: my conclusion from this the past few days is that modules *are* singletons, but (sort of) in the best of ways 09:56
El_Che it's only an anti-pattern if you recognize it's a pattern :P
jnthn masak: Yeah, it's not that they're always bad, it's just that I've seen a few too many mis-uses :)
masak El_Che: I disagree. I think many people fruitfully use modules as singletons without realizing they are.
when you import a module in multiple places in a code base, you *expect* the language not to do stupid things with re-running code it already ran 09:57
that's because *modules are singletons*
09:58 huf joined
masak it's one very significant way in which modules differ from the other two big types of abstraction, functions and objects -- both of which have the ability to produce many instances from a common template 09:58
functions and *classes, more like 09:59
jnthn: aye, all the mis-uses of singletons are giving the singleton pattern a bad name.
moritz whenever I consider a singleton, I ask myself "is there a chance I might want to two instances of this? for example when writing tests?" 10:01
10:01 shareable6 left, zostay_ is now known as zostay, scott_ is now known as scott, PotatoGim_ is now known as PotatoGim, squashable6 joined, ChanServ sets mode: +v squashable6
moritz and often I can't think of a good reason first, and when I think about tests, I find some 10:01
masak moritz: right, exactly. the risk inherent in singletons is actually that same old "I can't think of any use for this, so let's disallow it" 10:02
moritz and then I ask myself "would that have any legitimate use cases outside of tests?", and most of the time the answer is "yes"
masak moritz: I remember talking about this with mst, and I recall realizing that static attributes == globals == singletons in terms of the risk they create. 10:03
...and yes, writing tests is a good way to find those risks and limitations. 10:04
applying the question "is there a chance I might want two instances of this?" to modules, I'd say the question is "no, because loading a module from disk into memory a second time should just be a no-op and give you the same module again" 10:05
having two "instances" of the same module in different parts of a program would not add value, only muck things up 10:08
lizmat masak: I assume you mean "same module" as having the same longname, right? (including auth, version, api etc.) 10:10
10:10 wictory[m] joined 10:17 pmurias joined
pmurias masak: isn't the what you refer to as "compile-time" in other dynamic languages more module load time? 10:18
masak: JavaScript often has a separate compile time phase, one could even imagine a babel plugin to add BEGIN blocks to it 10:22
masak: prepack.io/ - a tool to run code at minification time 10:24
lizmat weekly: www.researchgate.net/publication/3...ith_issues 10:25
notable6 lizmat, Noted!
lizmat .tell jmerelo re:twitter.com/jjmerelo/status/999601448718684160 ∅ is already the empty set, so no need to define it 10:30
hmmm... did we lose yoleaux ? 10:31
10:39 stux|RC joined
El_Che 12:03 -!- yoleaux [~yoleaux@xn--ht-1ia18f.nonceword.org] has quit [Ping timeout: 240 seconds] 10:42
masak lizmat: yes. (although this was in the context of 007, which just has "shortnames") :)
lizmat *phew* :-) 10:43
notable6: weekly 10:45
notable6 lizmat, 6 notes: gist.github.com/b7b6a37c8496a99473...ecde4049f9
MasterDuke dpk: looks like yoleaux pinged out of #perl, #perl6, and #moarvm 10:59
11:00 yoleaux joined, ChanServ sets mode: +v yoleaux
dpk fixed, thanks for letting me know 11:00
11:01 curan left
MasterDuke that was fast, thanks! 11:02
lizmat .tell jmerelo re:twitter.com/jjmerelo/status/999601448718684160 ∅ is already the empty set, so no need to define it
yoleaux lizmat: I'll pass your message to jmerelo.
lizmat dpk++
masak pmurias: not sure I understand you completely, but I want to. 11:05
pmurias: are you saying there's a separate "module load" phase that happens apart from compilation? how would that work?
ok, I can see how handling the "lexical" things can happen all at compile time, but then actual module loading, and importing of actual values can happen at the start of runtime 11:07
that seems like a really good idea, actually 11:08
the difference is apparent in what would run first: an ordinary `say "module"` in an imported module, or a `BEGIN { say "main" }` after the `import` line in the main file
11:16 raynold left 11:18 Zoffix joined
Zoffix .tell ktown your upload is broken. Looks like inner dir is packed inside another archive. Try using App::Mi6 it has a CPAN upload feature (but check it didn't bust your README.md file before uploading): irclog.perlgeek.de/perl6/2018-05-24#i_16202607 11:19
yoleaux Zoffix: I'll pass your message to ktown.
Zoffix .tell lizmat it's an illformatted upload (maybe PAUSE should be rejecting those?) So modules.perl6.org doesn't know how to work with it, so it's not on the site: irclog.perlgeek.de/perl6/2018-05-28#i_16213620 11:21
yoleaux Zoffix: I'll pass your message to lizmat.
11:21 Zoffix left, itaipu joined 11:25 Schepeers joined 11:27 markong joined, Schepeers_ left 11:35 webstrand joined 11:37 esh joined
Geth doc: 2bd50837ea | (JJ Merelo)++ | doc/Language/structures.pod6
Adds more role mixing stuff, refs #114
11:42
synopsebot Link: doc.perl6.org/language/structures
pmurias masak: when precompiling the compilation phase and the module loading phase are clearly separated
11:59 ChoHag left 12:00 athenot_ joined
Geth doc: 051f6fefed | (JJ Merelo)++ | doc/Language/structures.pod6
Fixes error and adds text on subsets

Also reflows. Refs #114
12:09
synopsebot Link: doc.perl6.org/language/structures
12:15 athenot_ left 12:16 athenot joined
Geth doc: eb80d063a2 | (JJ Merelo)++ | doc/Language/structures.pod6
Adds intro to introspection refs #114
12:23
synopsebot Link: doc.perl6.org/language/structures
12:25 jmerelo left 12:26 Schepeers left 12:30 margeas joined 12:32 markong left
masak pmurias, jnthn: if `A` imports `b` from `B`, does `b` end up in the precompiled `A` module? 12:33
12:36 margeas is now known as markong 12:38 rindolf joined
masak i.e. how self-contained is each precompiled module? 12:39
12:53 athenot left 12:56 Schepeers joined
jnthn masak: They're statically linked against the modules they used 12:58
masak so, only one copy of `b`: the one in `B`? 13:04
13:06 jmerelo joined
jnthn masak: Yes, in so far as they are linked, so we don't copy the code of b or even the code object. But if B changes then A's precompilation is invalidated. 13:12
So it depends what you mean by "self-contained"
If you write a custom EXPORT in B that does a closure clone per time the module is use'd then those closure clones would end up in the module that does the `use`
Geth doc: 1f5fc5a40d | (JJ Merelo)++ | doc/Language/operators.pod6
Rewrites link, refs #2067
13:16
doc: e8b6eb9b6c | (JJ Merelo)++ | doc/Language/mop.pod6
Improves HOW description

Which would effectively close #2067, besides the change in the link.
synopsebot Link: doc.perl6.org/language/operators
Link: doc.perl6.org/language/mop
13:17 jmerelo left 13:24 domidumont left 13:26 athenot joined 13:28 Zoffix joined 13:29 xtreak left
Zoffix m: say 21824933675221.is-prime 13:29
camelia True
Zoffix m: say sqrt(3) + sqrt(2) - sqrt(21824933675221/10**(pi.chars + pi.Int.chars)) == pi
camelia True
Zoffix AMAZING! :)
13:30 Zoffix left 13:33 domidumont joined 13:41 rindolf left 13:45 rindolf joined 13:46 domidumont1 joined, domidumont left
masak jnthn: right. "we don't copy" means the opposite of what I meant by "self-contained". good, then I understand. 13:47
thanks for the explanation
13:47 Tison joined
Tison m: use nqp; nqp::say(42); 13:48
camelia This type cannot unbox to a native string: P6opaque, Int
in block <unit> at <tmp> line 1
13:49 domidumont1 left
Tison What's wrong with ⬆️? When use `nqp`, it prints 42 as expect. 13:49
13:49 domidumont joined
lizmat Tison: nqp proper does not automatically convert an Int to a Str 13:50
when you say "use nqp" in Perl 6, then you're just enabling nqp:: ops,
13:51 ChoHag joined 13:55 athenot left
Tison I see it prints 42 as expect if I use `nqp` command instead of `perl6`, such inconsistency confuses me 14:06
$ nqp -e 'use nqp; nqp::say(42)' # OUTPUT 42 14:07
timotimo the nqp and rakudo compilers differ noticably in many respects
in respect to their semantics, i mean
jnthn It's because a string literal compiles into different things in Perl 6 and in NQP 14:08
timotimo the most notable is that assignment doesn't exist in nqp
lizmat ah, I got it backwards :-)
timotimo but if you "use nqp" you can still use assignment in your perl6 code
jnthn And the thing it compiles into in Perl 6 won't magically turn itself into a string
Tison get it 14:09
jnthn If you're going to use `nqp::` ops, there's quite a few things that you'll need to spell out
Though it still manages to do quite a few things for you
timotimo you often have to put nqp::decont in many places 14:10
not "as opposed to in nqp" but "as opposed to in perl6" 14:11
Tison XD
14:20 wamba joined 14:21 |oLa| joined 14:22 Zoffix joined
Zoffix Tison: the equivalent bot command is `nqp:` not `m:` 14:22
nqp: nqp::say(42); 14:23
camelia 42
14:23 MasterDuke left
Zoffix m: use nqp; nqp::say(nqp::unbox_i(42)); 14:23
camelia 42
14:23 wamba left
Zoffix m: use nqp; nqp::say(~42); 14:23
camelia 42
Tison thanks 14:25
Xliff_ \o
14:25 Xliff_ is now known as Xliff 14:26 MasterDuke joined
Xliff I really wish HexChat had proper NickServ handling. 14:26
Zoffix Xliff: proper is what?
Xliff Zoffix: NickServ handling at other times than loading. 14:27
And automatic nick reposession.
I wonder how I would add Perl6 support to HexChat...
timotimo worst case build a plugin in another language that just communicates via sockets 14:28
Xliff timotimo++: Exactly my line of thinking
timotimo next step up is probably to load libmoar and actually embed moarvm into the plugin itself, though that can have nasty effects when a plugin misbehaves
14:29 raschipi joined 14:33 skids joined, Zoffix left
Xliff timotimo: That could be one large plugin. 14:35
timotimo your best bet surely is to put the plugin into a docker container! 14:36
Geth doc: KlappeZuAffeTot++ created pull request #2068:
Create README.nl.md
14:40
14:41 |oLa| left 14:42 Tison left
Geth doc: 523a7fe75f | KlappeZuAffeTot++ (committed using GitHub Web editor) | README.nl.md
Create README.nl.md
14:53
doc: 51699b951c | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | README.nl.md
Merge pull request #2068 from KlappeZuAffeTot/patch-1

Create README.nl.md
doc: 9f8c464a92 | (Jonas Kramer)++ (committed using GitHub Web editor) | doc/Type/Promise.pod6
Fix typo
14:58
synopsebot Link: doc.perl6.org/type/Promise
Xliff timotimo: I still need to learn those. :P 15:00
Will ":(:$a, :$b, :$c, *:%e, *@a)" allow %e to slurp all the remaining named parameters into itself and still let @a grab the positionals? 15:03
jnthn Should just be *%e 15:04
Xliff I want just the positionals in @a.
So... 15:05
Will ":(:$a, :$b, :$c, *%e, *@a)" ?
lizmat m: dd :(*@a, :$a, :$b, :$c, *%e)
camelia :(*@a, :$a, :$b, :$c, *%e)
lizmat positionals before nameds
m: dd :(:$a, :$b, :$c, *%e, *@a) 15:06
camelia :(:$a, :$b, :$c, *%e, *@a)
Xliff OK. So that will work with MAIN, too?
lizmat yup, it should
Xliff lizmat++\
lizmat if not, -> Issue
Xliff Will do. 15:07
15:25 rindolf left 15:26 domidumont left 15:29 rindolf joined 15:36 jmerelo joined 15:44 shareable6 joined 15:49 psychoslave left 15:52 domidumont joined 16:00 kaare_ left
raschipi u: 16:02
unicodable6 raschipi, U+0020 SPACE [Zs] ( )
raschipi u: 16:03
unicodable6 raschipi, U+0020 SPACE [Zs] ( )
raschipi u:
unicodable6 raschipi, U+0020 SPACE [Zs] ( )
16:04 kaare_ joined
raschipi \msg unicodable6 16:04
16:08 robertle left 16:15 domidumont1 joined 16:17 sno left 16:18 domidumont left 16:21 molaf joined
Geth doc: 1fe8938c82 | (JJ Merelo)++ | 2 files
Finishes introspection

Adds some links and examples. Refs #114
16:23
16:28 shareable6 left 16:30 wamba joined 16:32 jmerelo left 16:36 wamba left 16:45 wamba joined 16:49 enheh left
Xliff lizmat: You were right. Things didn't work unless I had slurpy positional, first. 16:55
Do you still want me to make an issue for that?
AlexDani` u: a a 17:01
unicodable6 AlexDani`, U+000A <control-000A> [Cc] (control character)
AlexDani`, U+001A <control-001A> [Cc] (control character)
AlexDani`, Cowardly refusing to gist more than 5000 lines
AlexDani` u: a ∞ 17:02
unicodable6 AlexDani`, U+0061 LATIN SMALL LETTER A [Ll] (a)
AlexDani`, U+0020 SPACE [Zs] ( )
AlexDani`, U+221E INFINITY [Sm] (∞)
17:02 AlexDani` is now known as AlexDaniel 17:05 xinming left 17:08 mcmillhj joined 17:13 mcmillhj left 17:20 isBEKaml joined, isBEKaml left 17:21 isBEKaml joined, isBEKaml left 17:22 mcmillhj joined 17:24 isBEKaml joined, isBEKaml left, xinming joined 17:25 isBEKaml joined 17:26 shareable6 joined 17:27 mcmillhj left 17:33 wamba left
masak this text vibed with me and reminded me of the Perl 6 RFC era: open-std.org/JTC1/SC22/WG21/docs/pa...0977r0.pdf 17:37
17:40 mcmillhj joined 17:44 mcmillhj left 18:00 dct joined 18:09 matzek joined
matzek hello, i have fresh installed perl6 just right now on openbsd, freebsd and debian - on all installaations "race" do not work (simple 1 to 4 for loop). Any hints what coud be wrong? 18:11
timotimo how do you measure "works"?
matzek is simply doesnt "fork"
timotimo you probably need to adjust the sizes for the race 18:12
it probably just does all 4 units of work in one thread because it deems forking too expensive
try this instead:
m: (^100_000).hyper.grep(*.is-prime)[10_000].say
18:12 dct left
camelia Nil 18:13
timotimo oh?
matzek hm? 18:14
timotimo m: (^100_000).hyper.grep(*.is-prime)[9_500].say
camelia 98953
timotimo there simply aren't 10_000 primes between 0 and 100_000
18:15 mcmillhj joined
timotimo that's why there was a Nil 18:15
but on my machine this uses ~320% cpu
if you want to hyper over a very short sequence, do it like .hyper(:batch(1)) or so
in the future, we may have a bit of adaptive code in there that tries to find out the right batch size for the work that is involved 18:16
18:18 Zoffix joined
Zoffix matzek: default batch size is 64. So if you only have 4 items, they'll be all in one batch. try .race(:1batch) to set it to batch by 1 item 18:18
18:19 stmuk_ joined
matzek nothing changed :( 18:19
Zoffix matzek: and check you have 2018.01 or newer perl6 installed (perl6 -v). Just mentioning 'cause on some distros the packages are ancient and race was an experimental and largely broken feature until like end of 2017
AlexDaniel matzek: what's your code?
18:20 mcmillhj left
matzek for (1..10).race(batch =>1){ .say; sleep 1;}; 18:20
AlexDaniel m: race for (1..10).race(batch =>1){ .say; sleep 1;};
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block (whitespace needed before curlies taken as a hash subscript?)
at <tmp>:1
------> 3(1..10).race(batch =>1){ .say; sleep 1;}7⏏5;
expecting any of:
block or pointy b…
18:20 stmuk left
AlexDaniel m: race for (1..10).race(batch =>1) { .say; sleep 1;}; 18:20
camelia 1
2
3
4
5
6
7
8
9
10
Zoffix matzek: `for` loops serialize RaceSeqs. Try a map or use `hyper for` to make for not serialize
timotimo ooooh, of course 18:21
Zoffix m: hyper for ^4 .race: :batch { sleep 1 }; say now - ENTER now
matzek but this works in an 2017.* version..could that be?
camelia 1.05845854
Zoffix m: for ^4 .race: :batch { sleep 1 }; say now - ENTER now
camelia 4.00788434
AlexDaniel Zoffix: why hyper for and not race for?
Zoffix m: race for ^4 .race: :batch { sleep 1 }; say now - ENTER now
camelia 1.04862536
Zoffix matzek: right, I meant `race for` not `hyper for` 18:22
AlexDaniel: brainffart
m: ^4 .race(:batch).map: { sleep 1 }; say now - ENTER now
camelia 1.0488654
Zoffix matzek: ^ or use a .map, which doesn't serialize
matzek: based on a bisect, you need about 2017.11 or newer rakudo for .hyper/.race to work right 18:23
matzek mhm..i have someting to learn :D 18:25
18:26 wamba joined, sno joined
timotimo the reasoning behind for requiring a hyper or race in front is that if you have a construction like for something() { } you can't tell if something() returns a Seq or HyperSeq, so a) an API change for something() can suddenly unexpectedly turn your for loop parallel, b) you can't see from just the code whether it'll parallelize or not 18:27
Zoffix There's an open docs Issue D#1897 It has a link to the spreadsheet with the semantics of Race/Hyper Seqs with how they work with various methods. Still needs to be turned into proper docs.
synopsebot D#1897 [open]: github.com/perl6/doc/issues/1897 [docs] Semantics of HyperSeq/RaceSeq appear to be undocumented
matzek hmhm
18:28 itaipu left, itaipu joined
matzek my plan is to have al loop and to start some parallel web requests via qqw{ lynx blabla} 18:28
so i have about 10000 hosts/domains to check its http header for example 18:29
race looks useful for that task 18:30
Zoffix eco: Proc::Q
buggable Zoffix, Proc::Q 'Queue up and run a herd of Procs': modules.perl6.org/dist/Proc::Q:gith...fix%20Znet
Zoffix matzek: ^ don't know if the interface will be over your head, but you could use that module 18:31
matzek ok i will try it. thank you for support! 18:34
18:34 mcmillhj joined
Zoffix matzek: this uses `curl` and prints headers. Default batch is 8: perl6 -MProc::Q -e 'my @domains = "" «~« <perl6.party rakudo.party perl6.org docs.perl6.org>; react whenever proc-q @domains.map({«curl -sD - -o "$*SPEC.devnull()" -- $_»}), :tags[@domains] { "**** {.tag}:\n{.out}".say }' 18:37
18:39 mcmillhj left
matzek wtf :D 18:40
masak could you be more specific 18:44
Zoffix `"" «~« <perl6.party ...>` just prepends `` to all the addresses, so then `@domains` has the domain addresses. Then `proc-q` is the sub from the module. It takes a list of lists of arguments to give to Proc::Async, so `@domains.map({«curl -sD - -o "$*SPEC.devnull()" -- $_»})` converts the list of domains to a list of lists of `curl` command with args and domain name in `$_`. The `:tags` 18:45
just has matching tags for the commands, so when the commands complete you can figure out which command finished (since they'd finish out of order). The `proc-q` sub returns a throttled Supply and `react whenever` reacts whenever a command finishes, and it runs the `"**** {.tag}:\n{.out}".say` code, which just prints the tag (in this case the domain) and the STDOUT of the completed `curl` command that has the
headers for that domain. When all commands finish processing the `react` block ends and the program exits.
18:48 domidumont1 left
Geth doc: 40703f7efb | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
correct typo (should be plural form)
18:49
synopsebot Link: doc.perl6.org/language/regexes
18:50 mcmillhj joined 18:51 Zoffix left
matzek is the a way to tell Proc::Q how many procs it is allowed to handle at a time? 18:52
18:52 fascinum joined 18:54 mcmillhj left 18:57 Zoffix joined
Zoffix matzek: yeah, it's the `:batch` arg to `proc-q` sub: github.com/zoffixznet/perl6-Proc-Q#batch 18:58
18:59 mcmillhj joined
matzek i see 19:02
19:06 espadrine_ joined 19:07 darutoko left 19:09 Zoffix left
matzek ahh.. so your sub puts the arguments in the list as an shell command back into the perl script 19:10
19:11 psychoslave joined 19:14 mcmillhj left
Geth doc: 4caa060cfa | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
fix typo
19:16
synopsebot Link: doc.perl6.org/language/regexes
19:20 xtreak joined
lizmat Xliff: yes, please 19:20
19:21 xtreak left 19:22 shareable6 left 19:25 Luneburg joined
Luneburg Is there a simple way to check if a number is divisible by all numbers in a lazy list? 19:25
lizmat how long do you want to wait ? 19:26
El_Che lol
lizmat Luneburg: is the lazy list finite or not ? 19:27
Luneburg lizmat: Oh yeah, it's quite short
jnthn %number %% all(@the-lazy-list) or some such 19:28
%number %% all(eager @the-lazy-list) if it insists on being forced eager
uh, and $number :)
Luneburg Ah, I was was trying $number %% @lazylist.all 19:29
jnthn: Thanks :D
raschipi m: say so 42 %% all(2,4,6...100), so 34243224702511976248246432895208185975118675053719198827915654463488000000000000 %% all(2,4,6...100) 19:30
camelia FalseTrue
19:32 Ven`` joined 19:33 molaf left, jmerelo joined 19:35 Ven` joined, Ven`` left 19:37 comborico1611 joined 19:42 Ven` left 19:43 mcmillhj joined 19:46 matzek left
Geth doc: 41107b7fe0 | (JJ Merelo)++ | 2 files
Moves the reification tutorial glossary → structures

Which is probably a better place for it. Refs #114
19:47
19:48 mcmillhj left 19:54 silug joined
Xliff How much introspection can you do with tokens, rules and regex's? 19:59
I would like to see if I can look into a rule or token and see what other descendant rules were used in it. Is that possible using rakudo?
20:02 mcmillhj joined
jmerelo Xliff: that's not exactly introspection, which is mainly looking at object metadata 20:02
yoleaux 11:02Z <lizmat> jmerelo: re:twitter.com/jjmerelo/status/999601448718684160 ∅ is already the empty set, so no need to define it
jmerelo m: say ∅.^name 20:03
camelia Set
jmerelo Wow.
lizmat :-)
jmerelo lizmat: thanks!
Running to change the text.
20:03 skids left
Geth doc: fc3b34c2b1 | (JJ Merelo)++ | 2 files
No need to define the empty set (thanks @lizmat)

Also adds some text to the data structures on using eager for early reification.
20:05
jmerelo lizmat: we'll probably have to add it somewhere else...
lizmat: oh, it's added already. Never mind :-) Thanks anyway. 20:06
20:06 mcmillhj left
Xliff jmerelo: But is it possible? 20:08
MasterDuke m: my token foo { "foo" }; my token bar { "bar" }; my $a = token { <foo> <bar> }; say $a.perl 20:10
camelia token { <foo> <bar> }
jmerelo Xliff: I would say Grammar::Tracer is the closest thing
MasterDuke i guess you could parse it out of the .perl output. parsing Perl 6 is easy, right... 20:11
lizmat AlexDaniel: if I'm going to mention the next Squashathon in the P6W, perhaps the Contributing.md should not be a 404 ? 20:12
Xliff jmerelo: OK, thanks. I will look into that.
20:13 mcmillhj joined 20:14 parv left
Geth doc: 216c1ff778 | (JJ Merelo)++ | doc/Language/math.pod6
Reflows and uses lowercase ∅
20:16
synopsebot Link: doc.perl6.org/language/math
20:16 shareable6 joined
Xliff Ah. 20:16
So Grammar::Tracer is cheating.
It takes over the normal grammar find_method and uses it for its own nefarious purposes. 20:17
20:17 mcmillhj left
Xliff Not... quite ... what I was looking for. It's kinda brute force. 20:17
So, replace normal GrammarHOW with CustomGrammarHOW and run rule, in find_method, note all methods called and push them to a list. Restore normal GrammarHOW. 20:18
If that sounds like I'm vaguely near the right track (to oblivion), please let me know. 20:19
Geth doc: 9afe5ee053 | (JJ Merelo)++ | doc/Language/structures.pod6
Document on data structures is completed.

I would be happy as a clam if this closed an issue, but it only means a feeble tick in the humongous #114. However, closer to the end, with just a couple of pages to go...
20:20
synopsebot Link: doc.perl6.org/language/structures
Xliff But might that not catch all rules, especially since the Longest Term Alternation (oh noes! another LTA!) will optimize some out?
jmerelo Xliff: really no idea. You could ask moritz, he's usually around... Or... 20:21
Xliff: ... wait for it ...
Xliff jmerelo: LOL
jmerelo Xliff: ... StackOverflow!
Xliff jmerelo: I'm really typing to myself, ATM
jmerelo He is usually there, as well as, well, everyone else, including many that are not usually in this channel...
Xliff jmerelo: I doubt SO has something this esoteric.
I will wait for a bit and try, later.
jmerelo: Oh, I know. I am on SO as well. 20:22
lizmat
.oO( das rubberducken ist fuer gegen zu reden )
Xliff SO is the Facebook/Twitter for developers.
Or am I wrong and it's more like the Reddit for Developers.
?
Xliff runs.
moritz I am around, occasionally
lizmat
.oO( sparkenspitzen und blowenfusen )
moritz if somebody has a question for me that doesn't require excessive backlogging, I'll try my best 20:23
Xliff Did lizmat just blow a fuse?
<Xliff> How much introspection can you do with tokens, rules and regex's?
<Xliff> I would like to see if I can look into a rule or token and see what other descendant rules were used in it. Is that possible using rakudo?
lizmat no, I was imagining the special effect while you were running :-)
jmerelo And I'm AFK as of now. Take care, see you tomorrow CET
Xliff lizmat: LOL!@
lizmat: LOTS of smoke clouds.
20:24 jmerelo left
moritz Xliff: I'm not aware of that kind of introspection 20:24
Xliff OK. Maybe I am using the wrong word.
I don't know how deeply you can inspect grammars.
Or grammar components for that matter. 20:25
It's just that I have a token with a LOT of terms in it, and I want to try and gracefully unit test it.
20:25 shareable6 left
Xliff (Hint: gracefully is a Xliff-speak for lazy) 20:25
moritz decompose it into a proto token with lots of alternatives 20:26
and test them individually
Xliff But how to do so without a LOT of code? 20:27
moritz table driven
the testing, at least
if you show me an example, maybe I have some more concrete hints
Xliff github.com/Xliff/perl6-Parser-Sql/...s.pm6#L658 20:28
I guess I can grab the list of actual keyword tokens and just run them all through. 20:29
I actually DO have that.
MasterDuke Xliff: for something big, but relatively simple, maybe my half-joking answer would actually work 20:30
raschipi I will close doc issue #114 and open two new issues for the two last pages to make jmerelo happy.
Xliff MasterDuke: And what's that?
moritz Xliff: I'd still rewrite it as a proto token
Xliff moritz: Your reasoning, praytell?
moritz Xliff: that allows adding of keywords through subclassing, for example
MasterDuke m: my token foo { "foo" }; my token bar { "bar" }; my $a = token { <foo> <bar> }; say $a.perl 20:31
camelia token { <foo> <bar> }
moritz or mixing in roles that add alternatives
20:31 mcmillhj joined
moritz extensibility, in a word 20:31
Xliff moritz: Your last reason has serious merit.
Because I would hope to expand this into something not MySQL specific.
I may need to think about renaming the module close to release time for example. 20:32
moritz: Can you give me an example of how you would proto that?
Just 3 lines will help.
moritz proto token keyword_sp { * } 20:33
MasterDuke m: my token foo { "foo" }; my token bar { "bar" }; my $a = token { <foo> <bar> }; say $a.perl ~~ m:g/"<" ~ ">" [\w+]/
camelia (「<foo>」 「<bar>」)
moritz token keyword_sp:sym<ACTION> { <ACTION> } 20:34
token keyword_sp:sym<ADDDATE> { <ADDDATE> }
Xliff Ah! That.
moritz or if you don't need the separate rules, you can write it as
Xliff You'd still need proto keyword_sp:sym<*>
moritz token keyword_sp:sym<ACTION> { <sym> }
token keyword_sp:sym<ADDDATE> { <sym> } 20:35
Xliff No, I'd just need a way to retrieve what keyword_sp matched.
moritz ~$<keyword_sp>
20:35 mcmillhj left
Xliff kk 20:35
moritz: That's an idea I should look into, for real. 20:36
But that will blow my code size up quite a bit.
moritz Xliff: real-world example of a proto token: github.com/moritz/json/blob/master...mar.pm#L11
well, only if you need the separate ACTION etc. rules 20:37
Xliff Wish I could just run that through a loop and do it that way,.
I don't think I will need separate ACTION rules since this will just all end up into a parsing data table.
And if someone wants to do that, they can subclass and change everything.
Or ... maybe fork.... 20:38
Probably fork.
20:45 mcmillhj joined
Luneburg Guys I have some simple (and beautiful ;) ) code that doesn't work properly, could someone take a look please? 20:46
20:46 Libre joined, dct joined
raschipi Sure 20:46
Luneburg raschipi: Cool, I'll put it in a pastebin 20:47
20:49 Kaiepi left
Luneburg raschipi: Here's the link (prepare to be delighted) 0bin.net/paste/Mn9b7jsjVekOMz-L#zZ...dFOvQKvxkA 20:49
20:50 mcmillhj left
raschipi what's the problem with it? 20:50
Luneburg Well, it doesn't display all the positions properly
raschipi why not? 20:51
Luneburg So if I press w from the X in the centre-left, it doesn't go directly up
It goes to the centre up
Even though it looks fine in the code
raschipi You insist on keeping the structure as-is? 20:54
timotimo Luneburg: this might blow your mind, but did you know about heredocs, in particular that you can indent them?
raschipi I don't see where $position is updated... 20:55
Luneburg raschipi: I just haven't thought of a better way to do it yet :P
timotimo are you interested in a tip that'd let you have an $x and $y position integer and it'd place the X for you?
Luneburg timotimo: heredocs? 20:56
timotimo yup! give me a second
Luneburg timotimo: :O
20:56 mcmillhj joined
timotimo actually i need to get dinner out of the oven right now 20:57
Luneburg raschipi: I think that is the problem with this code, as the structure is right now
timotimo so i'll just send a documentation link fo rnow docs.perl6.org/syntax/heredocs%20:to
Luneburg raschipi: Yup, now that I update the $position it works properly :D Thanks for the help 21:00
timotimo: That's cool :D Also, for when you come back from dinner, could you tell me about those $x and $y positions?
raschipi If you put an Order::Same in a variable, it will have numeric value 0, and can only change into Order::More (value 1) or Order::Less (value -1). 21:01
timotimo hub.mybinder.org/user/bduggan-p6-j...name=perl6
can you access this, Luneburg?
21:01 mcmillhj left
raschipi Gotta go, bye. 21:02
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/05/28/...o-you-too/
21:04 rindolf left 21:06 raschipi left 21:07 ChoHag left, rindolf joined
timotimo Luneburg: the approach i'm using there scales poorly to multiple Xes; in that case i would build an actual array of arrays that has single characters in it and access it like @fields[$y][$x] = "X" (and taking care to reset them to " " whenever necessary) 21:07
21:08 aindilis joined
Luneburg timotimo: it's asking for a token or password 21:10
timotimo oh, hmm
21:11 mcmillhj joined
timotimo 0bin.net/paste/IzH1tn-qxJD7vwDk#71...8qFhgy3Qtl - this does not look very good, but it's what i did 21:12
21:15 mcmillhj left
Luneburg timotimo: Looks just fine :) 21:16
timotimo it has the code above and output below
Luneburg timotimo: Ah, it's a bit different 21:19
timotimo: The thing I was doing was getting it to move about with a, d, w, and s 21:20
timotimo yes, now you only need to change $x and $y based on what letter was pressed 21:21
have a "main loop" that goes as long as the player wants to play, show the field, grab a key, change the position, and back to the start
21:23 molaf joined
Luneburg timotimo: Having a main loop that keeps running is a great idea, it solves so many problems. Earlier I was using get statements for a space invaders game, but it was fully deterministic based on where you moved. 21:23
I mean given statements
21:25 Libre left
timotimo yes, that is an extremely tedious approach 21:28
21:30 vike left 21:35 vike joined
moritz lizmat++ # weekly 21:36
21:41 Luneburg left, mcmillhj joined 21:46 ryn1x left, mcmillhj left, ChoHag joined 21:47 vike left, ryn1x joined 21:48 enheh joined 21:51 vike joined 21:54 mcmillhj joined 21:59 mcmillhj left, fascinum left, molaf left 22:12 mcmillhj joined 22:13 ryn1x left 22:14 rindolf left 22:17 mcmillhj left 22:30 HaraldJoerg left 22:32 roguelazer joined 22:33 mcmillhj joined 22:36 fascinum joined 22:37 mcmillhj left 22:43 itaipu left 22:53 titsuki joined 23:00 mcmillhj joined 23:04 fascinum left, mcmillhj left 23:09 giraffe joined 23:10 giraffe is now known as Guest80598 23:12 wamba left, wamba joined 23:15 psychoslave left 23:16 mcmillhj joined 23:19 w_richard_w joined 23:20 mcmillhj left 23:37 dct left, espadrine_ left 23:39 wamba left 23:44 markong left, fascinum joined 23:47 mcmillhj joined 23:51 mcmillhj left 23:56 pmurias left