»ö« 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.
00:02 mcmillhj left
Bowlslaw ungoogled chromium? 00:03
00:31 mcmillhj joined 00:35 mcmillhj left 00:46 mcmillhj joined 00:50 mcmillhj left, raschipi left 00:55 BenGoldberg joined 01:01 mcmillhj joined
benjikun I like the new firefox alright 01:01
01:05 raymond_ joined, mcmillhj left
kjk say I have two Seq's, seq1 and seq2; how do I create a new Seq, seq3, such that when iterated, it will go through seq1 and then seq2 ? 01:07
01:12 raymond__ joined 01:14 raymond_ left
Xliff kjk: Why would you want to use sequences for that? 01:15
kjk p6: my $seq1 = 1...5; my $seq2 = 6...10; my $seq3 = flat $seq1, |$seq2
camelia Potential difficulties:
Useless use of ... in sink context
at <tmp>:1
------> 3my $seq1 = 1...7⏏055; my $seq2 = 6...10; my $seq3 = flat $s
Useless use of ... in sink context
at <tmp>:1
------> 3my $seq1 = 1..…
Xliff Because $seq3 is just a list of sequences, not a sequence in itself.
lizmat Seq.new(List.iterator) would turn a List into a Seq 01:16
kjk p6: my $seq1 = 1...5; my $seq2 = 6...10; (flat $seq1, |$seq2).WHAT
camelia Potential difficulties:
Useless use of ... in sink context
at <tmp>:1
------> 3my $seq1 = 1...7⏏055; my $seq2 = 6...10; (flat $seq1, |$seq
Useless use of ... in sink context
at <tmp>:1
------> 3my $seq1 = 1..…
kjk Xliff: because I'm getting Seq from .pairs and I'm going to call .pairs a few times to get multiple Seq's, but in the end I want to iterate through them as if I'm iterating through just one Seq 01:17
Xliff m: my $s1 = lazy 1..10; my $s2 = lazy 11..20; my $s3 = ($s1,$s2); for |$s3 { $_.eager.say }
camelia (1 2 3 4 5 6 7 8 9 10)
(11 12 13 14 15 16 17 18 19 20)
Xliff That gives you both sequences.
You'd still need to iterate again over both. 01:18
m: my $s1 = lazy 1..10; my $s2 = lazy 11..20; my $s3 = ($s1,$s2); for |$s3 { say "A$_" for $_.eager }
camelia A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
A11
A12
A13
A14
A15
A16
A17
A18
A19
A20
kjk lizmat: I'd like to avoid turning the Seq's into List's if possible
lizmat but you have a List of Seqs is what you're saying, right ? 01:19
kjk yes
oh ic
get a list of Seqs and then turn the list into another Seq 01:20
would that give me a Seq of Seq's ?
p6: Seq.new(((1...3), (4...6)).iterator) 01:21
camelia ( no output )
kjk p6: Seq.new(((1...3), (4...6)).iterator).WHAT 01:22
camelia ( no output )
kjk p6: Seq.new(((1...3), (4...6)).iterator).WHAT.say
camelia (Seq)
kjk hmm, since I'm goting to iterate through the Seq's, I guess there's no need to turn them into a single Seq. I see.., thanks Xliff, I'll use: for |($seq1, $seq2) { ... } 01:24
01:24 aborazmeh joined, aborazmeh left, aborazmeh joined
kjk hmm, no. actually I want the effect of: my $s1 = lazy 1..10; my $s2 = lazy 11..20; my @s3 := (|$s1, |$s2); for @s3 { .put } 01:31
p6: my $s1 = lazy 1..10; my $s2 = lazy 11..20; my @s3 := (|$s1, |$s2); for @s3 { .put }
camelia 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
kjk but I'm not sure if creating the @s3 above would have already iterated both $s1 and $s2 01:32
Xliff It does, which is why I leave them as separate sequences. 01:34
01:34 mcmillhj joined
Xliff You don't iterate through them until you need to. 01:34
By creating @s3, you iterate both and store the results.
Oh, wait... I missed the bind. That's not a bad idea. 01:35
kjk I see. But I don't want to iterate through them separately
Xliff But you still flatten them, which causes the iteration.
OK, so what's the problem. You have to use the sequences eventually. 01:36
lizmat gist.github.com/lizmat/0f8272c91cd...e08231c286
Xliff The advantage of iterating through them separately means that you don't need to store them all at once.
kjk I want to be able to "chain" them 01:37
lizmat kjk: that's what my solution in the gist does
kjk like python's itertools.chain
Xliff kjk: The problem with that is that it wouldn't be a sequence. It would be a list.
01:39 mcmillhj left
kjk hmm, thanks lizmat, will take a closer look, but it seems to be harder than I expect 01:39
lizmat what makes it harder is what you want to achieve: laziness all along 01:40
Xliff Yeah. I see it now.
kjk maybe it would be easier to write a sub that uses gather take plus some for-loop?
lizmat if you want to have a single Seq as the result, you need an iterator: that's basically what my gist does 01:41
Xliff m: Seq.new(4, 5, 8).say
camelia Too many positionals passed; expected 2 arguments but got 4
in block <unit> at <tmp> line 1
Xliff m: Seq.new((4, 5, 8).iterator).say 01:42
camelia (4 5 8)
lizmat Seq.new only takes instantiated iterators
Xliff I see it now.
lizmat goes back to trying to sleep even if it is too hot 01:43
AlexDaniel m: my $s1 := (1 … 5); my $s2 := (10, {sleep 1; $_ + 1} … 20); my $x := (|$s1, |$s2); say $x[^7]; say now - BEGIN now 01:44
camelia (1 2 3 4 5 10 11)
1.0141914
AlexDaniel laziness seems to be preserved, no?
what am I missing?
AlexDaniel is late to the discussion 01:45
kjk: ↑ ?
01:46 Bowlslaw left 01:48 mcmillhj joined
kjk AlexDaniel: the goal is to avoid turning the Seqs into Lists, that is, I want to be lazy all the way 01:50
AlexDaniel kjk: so what is not lazy in my example?
kjk I guess when you do my $x := (|$s1, |$s2) you'd essentially iterate both $s1 and $s2 01:51
AlexDaniel kjk: if you iterate $s2 it will sleep for 10 seconds 01:52
it slept only for 1, because only 1 slow element was consumed
it is lazy
Xliff m: my $s1 := (1 … 5); my $s2 := (10, {sleep 1; $_ + 1} … 20); my $x := (|$s1, |$s2); say $x[^8]; say now - BEGIN now
camelia (1 2 3 4 5 10 11 12)
2.015284
Xliff m: my $s1 := (1 … 5); my $s2 := (10, {sleep 1; $_ + 1} … 20); my $x := (|$s1, |$s2); say $x[^8]; say now - BEGIN now
camelia (1 2 3 4 5 10 11 12)
2.0154122
Xliff ^^ 2 slow elements.
AlexDaniel the first one is 10 01:53
ah yeah, right
01:53 raymond__ left
Xliff If it goes to 13, there will be 3 slow elements, because they are being evaluated lazily. 01:53
01:53 mcmillhj left
Xliff m: my $s1 := (1 … 5); my $s2 := (10, {sleep 1; $_ + 1} … 20); my $x := (|$s1, |$s2); say $x[10]; say now - BEGIN now 01:54
camelia 15
5.0144948
Xliff Note, DIRECT to 10. 5 slow elements.
AlexDaniel kjk: also, it seems like you assume that a List cannot be lazy, but it can 01:55
in the example above $x will be a lazy list
there's an issue with that if you're generating a lot of elements and you don't want to keep track of them 01:56
kjk hmm, interesting 01:58
so it looks like when you slip a Seq into a list, its laziness is preserved? 02:01
02:02 mcmillhj joined 02:05 Zoffix joined 02:07 mcmillhj left
AlexDaniel kjk: and if you actually want a Seq there, I think (|$s1, |$s2).Seq should work fine 02:08
Zoffix kjk: I think you're confusing "laziness" and "reification". `1 … 5` isn't lazy. It's just isn't reified. You can convert that to a list without having to reify it, and it's only when you reify it would the values be produced
02:10 aborazmeh left
Zoffix kjk: the `flat` you originally had is good enough. Just don't slip anything 02:10
m: my $seq1 := (1…5); my $seq2 := (6…10); my $seq3 = flat $seq1, $seq2; .say for $seq3 02:11
camelia (1 2 3 4 5 6 7 8 9 10)
Zoffix m: my $seq1 := (1…5); my $seq2 := (6…10); my $seq3 = flat $seq1, $seq2; $seq3.^name.say
camelia Seq
Zoffix Relevant materials: rakudo.party/post/Perl-6-Seqs-Drug...ock-n-Roll rakudo.party/post/Perl-6-Seqs-Drug...ll--Part-2 perl6advent.wordpress.com/2017/12/...oneandonly 02:12
(the last one has a bit on why slipping seqs can be a bad idea)
kjk yeah, gotcha, thanks Zoffix and AlexDaniel! 02:14
AlexDaniel Zoffix: what do you mean when you say that `1 … 5` isn't lazy and is just not reified? 02:16
Zoffix: can't you say the same thing about any sequence then?
Zoffix m: say (1 … 5).is-lazy
camelia False
Zoffix m: say (1 … Inf).is-lazy
camelia True
Zoffix That's what I mean. 02:17
I remember writing something that overuse of "lazy" in perl 6 docs creates this sort of confusion and we should use something better.... It might've been on some docs Issue
AlexDaniel using “potentially infinite” as the definition of “lazy”?
Zoffix Using result of .is-lazy as definition of "lazy". 02:18
Xliff .tell jnthn Is there a way to get the actual JSON from a Cro::HTTP::Response object without re-serializing the returned value?
02:18 mcmillhj joined
yoleaux Xliff: I'll pass your message to jnthn. 02:18
AlexDaniel m: (0...-∞).is-lazy.say
camelia False
Zoffix That's a bug IMO
AlexDaniel IMO that's the problem with the definition :) 02:19
Zoffix Whatever
02:19 Zoffix left 02:23 mcmillhj left, lizmat left
kjk I suppose you can be lazy yet still reified. laziness seems to imply that it supports some kind of api that at least gives the appearance of being lazy. 02:23
Xliff m: (4 ~~ 2..6).say 02:24
camelia True
Xliff m: (4 ~~ 2..3).say
camelia False
Xliff (2..^5).say 02:25
evalable6 2..^5
Xliff (2..^5).eager.say
evalable6 (2 3 4)
Xliff (2^..^5).eager.say
evalable6 (3 4)
02:28 roguelazer joined 02:29 kaare_ joined 02:30 mcmillhj joined 02:34 mcmillhj left 02:41 DeepIO_ joined, DeepIO_ left 02:42 DeepIO_ joined 03:03 mcmillhj joined 03:08 mcmillhj left 03:30 konsolebox joined 03:36 BenGoldberg left 03:48 mcmillhj joined, jjww joined 03:52 kaare_ left 03:53 mcmillhj left
Geth ¦ p6-sake: AlexDaniel self-assigned Using run in (non-)sink context github.com/perl6/p6-sake/issues/12 04:04
¦ p6-sake: AlexDaniel self-assigned Shell injection through filenames github.com/perl6/p6-sake/issues/13
¦ p6-sake: AlexDaniel self-assigned Pass the current task into the block github.com/perl6/p6-sake/issues/7
¦ p6-sake: AlexDaniel self-assigned Test framework for half-resolved issues github.com/perl6/p6-sake/issues/16
¦ p6-sake: AlexDaniel self-assigned `file` tasks should run if one of the dependencies were updated github.com/perl6/p6-sake/issues/17
¦ p6-sake: AlexDaniel self-assigned `task` can probably do what `file` does if an IO path is passed github.com/perl6/p6-sake/issues/18
¦ p6-sake: AlexDaniel self-assigned “Sake” is overused, come up with something else github.com/perl6/p6-sake/issues/19
04:36 kaare_ joined 04:37 mcmillhj joined 04:41 mcmillhj left 04:43 Ven` joined 04:48 Ven` left 04:51 skids left 04:53 mcmillhj joined 04:57 curan joined, mcmillhj left 05:02 jmerelo joined
jmerelo squashable6: status 05:05
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in 3 days and ≈4 hours (2018-07-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
05:29 mcmillhj joined 05:31 giraffe joined, giraffe is now known as Guest56583 05:33 mcmillhj left 05:37 ufobat joined
daxim http -v perl6.org/compilers/features|rg Content-Length 05:40
Content-Length: 0
web page is b0rked
geekosaur ? doesn't that mean it's generated and therefore dynamic? 05:45
hm, only when there's actually content :) 05:47
(which there is, just not useful content)
but just looking at Content-Length doesn't prove anything, if you want to say it's rendering a blank page, say so 05:48
05:54 mcmillhj joined 05:55 xtreak joined
daxim can you fix it? 05:56
Geth doc: 7255125bb4 | (JJ Merelo)++ | doc/Type/Variable.pod6
Adding constant constraints, refs #1464
doc: ac0623506b | (JJ Merelo)++ | doc/Language/containers.pod6
Adding subset constraints, refs #1464
synopsebot Link: doc.perl6.org/type/Variable
Link: doc.perl6.org/language/containers
doc: b4dda29783 | (JJ Merelo)++ | doc/Type/Signature.pod6
Reflows and adds subset constraints, closes #1464
synopsebot Link: doc.perl6.org/type/Signature
jmerelo daxim: not sure... 05:58
geekosaur I can't, no. just saying that "clever" ways to point out a problemsaren't necessarily very clever
05:58 mcmillhj left
jmerelo geekosaur: he's helped by pointing out the problem (or she). He's shown that it's not only generating a blank page, but a zero-length page. Good for me. Thanks, daxim. 06:00
geekosaur except that, as I said, zero length doesn't necessarily mean zero length. it can also mean "web server fed you output of a program that isn't telling you how much spew up front"
daxim I feel vindicated. I'm also a man, don't you know me?
geekosaur (not supposed to, but they do)
(which is no different from everything else in html) 06:01
jmerelo daxim: probably. Any hint?
daxim from yapc
06:01 domidumont joined
jmerelo daxim: not by nick, in this case... maybe by real name? Sorry... 06:02
daxim: that page was changed a month ago. I can't figure out what's happening. We'll have to wait for moritz, I guess. 06:03
06:04 sno joined
daxim ok, I guess process.pl runs as a cron job or something 06:04
06:08 domidumont left 06:09 domidumont joined
jmerelo daxim: I have access to the server, but I haven't worked on that particular domain, only in docs.perl6.org. We'll have to wait for El_Che or moritz 06:09
06:09 mcmillhj joined 06:14 mcmillhj left, spycrab0 joined 06:17 psychoslave joined 06:19 domidumont left 06:20 jjww left 06:21 mcmillhj joined
El_Che jmerelo: I only have access to hack 06:25
jmerelo: is that where it runs?
06:26 mcmillhj left
jmerelo El_Che: looks like it. 06:26
El_Che: and congrats for .be going forward. I'll be supporting it from now on! 06:27
06:27 obfusk joined
El_Che jmerelo: lol, it looks that they could join Spain, Argentina and Germany 06:29
looked
jmerelo El_Che: yep, literally last-minute goal. But that has worked in the past, so why not?
El_Che if Japan had gone through, they would have deserved it
jmerelo El_Che: right. And Oliver and Benji would have been very happy about it. 06:31
06:36 kjk left, robertle joined 06:38 konsolebox left
jmerelo scimon's pull request yesterday was the 7000th build in travis: travis-ci.org/perl6/doc/builds/399079301 06:38
06:41 fake_space_whale left, konsolebox joined, kaare_ left 06:48 kaare_ joined 06:49 sno left 06:52 mcmillhj joined
masak m: class A {}; class B {}; sub foo(A $a?, B $b?) { say "{$a // 0} {$b // 0}" }; foo(B.new) 06:54
camelia Type check failed in binding to parameter '$a'; expected A but got B (B.new)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
masak mh. makes sense.
(thinking about signature binders) :) 06:55
daxim literal binders full of signatures 06:56
06:56 mcmillhj left
masak .oO( Mitteral binders ) 06:56
daxim it is no coincidence that mitten rhymes with kitten 06:57
masak of course not. a mitten is just a baby mat. 06:58
the English language is nothing if not consistent
07:15 rindolf joined
jmerelo masak: :-) 07:20
07:22 wamba joined 07:23 mcmillhj joined 07:28 mcmillhj left 07:38 mcmillhj joined 07:42 mcmillhj left 07:47 dakkar joined, pmurias joined 07:54 domidumont joined, rindolf left 07:56 scimon joined, xtreak left
jmerelo Analysis of score given to documentation in the perl 6 survey rpubs.com/jjmerelo/p6survey-documentation-score 08:00
08:00 rindolf joined
jmerelo After comments, I can republish it in Medium or some other place like that. 08:00
TL;DR: even filtering out possible trolls and segmenting by experience, score is low and does not seem to be improving comparing experienced vs. newcomers. So we need to keep working on it. 08:02
08:02 pmurias left 08:05 obfusk left 08:07 mcmillhj joined 08:08 ChoHag joined 08:10 imcsk8 joined 08:12 mcmillhj left, obfusk joined, jargan joined 08:13 dogbert17 joined 08:14 robertle left, robertle joined, pmurias joined, sno joined, pmichaud joined, [Coke] joined 08:15 [Coke] left, [Coke] joined, dakkar left 08:17 xtreak joined 08:20 mcmillhj joined 08:25 mcmillhj left 08:27 dakkar joined 08:32 Ven` joined 08:35 lizmat joined 08:49 sarna joined
lizmat clickbaits p6weekly.wordpress.com/2018/07/02/...-surveyed/ 08:55
yoleaux 02:04Z <AlexDaniel> lizmat: how can I get nth element of a Seq without caching it?
02:07Z <AlexDaniel> lizmat: nevermind, forgot about .skip
08:58 mcmillhj joined
sarna hey, is it true that Zoffix won't contribute to future releases? I've seen a thing on /r/perl and I'm a bit confused about the situation 09:02
(sorry for bringing this up if it's a sensitive matter)
09:03 mcmillhj left, pmurias left, pmurias joined 09:09 wamba left 09:11 mcmillhj joined
gfldex is there a way to call an overloaded method's (by a role that is punned in with but) overloaded candidate? 09:11
lizmat sarna: please be more specific: "a thing on /r/perl" could mean a lot of things 09:12
Ven` gfldex: like nextwith/callsame? 09:13
09:13 eliasr joined
lizmat sarna: also, perhaps better to /privmsg that with Zoffix ? 09:13
afk until much later today& 09:14
09:14 lizmat left
gfldex Ven`: yes, but callsame wont cut it becaue I want to call iterator() (of the overloaded class/role) from new() and I can't provide a method name to callsame 09:14
09:14 wamba joined 09:15 mcmillhj left
sarna .tell lizmat oh, it's even your post. I meant a link to IRC logs, here: colabti.org/irclogger/irclogger_log...07-10#l134 09:17
yoleaux sarna: I'll pass your message to lizmat.
sarna .tell lizmat and why didn't I privmsg them - I didn't want to bother them if they were done with contributing. I shouldn't really bring this up in the first place, my bad 09:19
yoleaux sarna: I'll pass your message to lizmat.
Ven` sarna: how is a link to an irc message from a year ago relevant here? 09:22
sarna Ven`: I've just been wondering if it's still relevant, as it sounded really out of place 09:23
Ven` I think if you had checked any other day from that one onwards (let's say with a week pause) you'd have seen zoffix is pretty much here all the time. 09:24
sarna Ven`: that's why I got confused. I could've just checked if they were still contributing on github rather than asking here, it was really stupid of me 09:26
Ven` Plus they're very present in the weekly reports that lizmat++ compiles :)
sarna I'm new here, I'm sorry :( 09:27
Ven` contributors leaving is a weird thing to focus on when you're new to a community. anyway... 09:29
sarna *can we please move on I'm so embarrassed* 09:30
Ven` m: role Zero { } role Suc[::N] { } multi sub count(Zero) { 0 } multi sub count(Suc[::N]) { 1 + count(N) }; subset _0 of Zero; role Add[Zero, ::N, Result = N] {} 09:31
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3role Zero { }7⏏5 role Suc[::N] { } multi sub count(Zero)
expecting any of:
infix
infix stop…
Ven` m: role Zero { }; role Suc[::N] { }; subset _0 of Zero; role Add[Zero, ::N, Result = N] {}
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'Result' in parameter declaration.
at <tmp>:1
------> 3t _0 of Zero; role Add[Zero, ::N, Result7⏏5 = N] {}
09:33 xtreak left 09:34 zakharyas joined 09:44 mcmillhj joined 09:49 mcmillhj left 09:52 Xliff left 09:57 xtreak joined 10:00 xtreak left 10:03 xtreak joined 10:10 obfusk left 10:12 sena_kun joined 10:20 obfusk joined
sarna will the END block execute when a program crashes/its process is killed? 10:21
10:23 MasterDuke left
Ven` m: END say "hello"; exit 1; 10:25
camelia hello
Ven` If it crashes, well, no. Killed, not sure, depends how you kill it. 10:26
masak if I ^C a program with `END say "hello"`, it doesn't print anything 10:30
^C is a relatively "nice" kill
so I think we might conclude from that one data point that nothing runs on process kill
sarna thanks 10:31
jnthn You can probably install a signal handler for SIGINT and call exit in that to get it more orderly 10:32
yoleaux 02:18Z <Xliff> jnthn: Is there a way to get the actual JSON from a Cro::HTTP::Response object without re-serializing the returned value?
jnthn .tell Xliff Not exactly, but you can just get the json and the set-body to that and then there's nothing to re-serialize 10:33
yoleaux jnthn: I'll pass your message to Xliff.
10:39 lookatme joined 10:51 Ven` left 11:02 jargan is now known as jast, DeepIO_ left 11:09 obfusk left 11:11 markoong joined 11:13 brabo joined 11:17 brabo left 11:20 obfusk joined
Juerd m: say "127.0.0.1" ~~ /^ [ <{ 0 .. 255 }> ]**4 % \. $/; say now - INIT now # whoa 11:37
camelia 「127.0.0.1」
6.28851386
11:42 S007 joined
Ulti pmurias cool news about NQP on truffle/graal I guess Truffle is actually a good fit for an NQP back end given its AST like? or does it basically make no difference because its different enough 11:45
11:46 domm joined
Juerd 1;0 juerd@cxien:~$ perl6 --profile -e'say "127.0.0.1" ~~ /^ [ <{ 0 .. 255 }> ]**4 % \. $/; say now - INIT now' 11:46
Segmentation fault
:(
11:48 koto joined, sena_kun left
Ulti me too 11:52
Juerd Filed as #2013 11:53
sarna I'm getting a segfault when trying to profile a program that consumes a lot of memory 11:56
I guess it just runs out of memory (max is 2gb, it seems) and gives up 11:57
12:06 wamba left
jkramer Is shlomif (from github.com/shlomif/) active here? 12:13
jmerelo .seen shlomif 12:17
yoleaux I haven't seen shlomif around.
jmerelo jkramer: but he's around, under another nick.
rindolf jkramer: hi
jkramer: i am shlomif 12:18
12:24 g- joined
jkramer rindolf: Oh hi. :) I just read in the p6weekly that you're collecting euler problems as P6 benchmarks and I happen to have implemented a couple of euler problems in P6. Just wanted to ask if you're interested in them for your repo 12:25
I don't have implementations in other languages for comparison though 12:26
El_Che or merge the repos :)
12:27 jmerelo left
jkramer El_Che: I don't have them in a repo yet, I've just done them for fun/learning/profit :) 12:27
rindolf jkramer: can you put them under a foss licence? 12:28
jkramer rindolf: Sure 12:29
rindolf jkramer: ok
jkramer: note that github.com/perl6/perl6-examples/tr...ries/euler 12:30
jkramer: thanks
jkramer Oh nice, didn't know that repo
rindolf jkramer: also see github.com/shlomif/project-euler 12:31
jkramer rindolf: Do you consider multithreading cheating in benchmarks/comparison with other implementations? Because I made use of MT a lot to speed things up :)
rindolf jkramer: kinda 12:32
jkramer: the programs should have the same algo
jkramer Hmm ok
I gotta look through my implementations then and maybe remove threading. 12:33
stmuk_ I'm now seeing Sept 30 for my preorder of "Learning Perl 6" ... I hope its released "for Xmas" :) 12:34
12:36 kaare_ left 12:40 Ven` joined, mcmillhj joined 12:51 Ven` left 12:53 Ven` joined
El_Che moritz: did jmerelo pinged you about a problem he had with the site? 12:56
moritz El_Che: which site?
El_Che moritz: I think it was docs.perl6.org/features.html 12:57
moritz: about something wrong with the generation, but I don't know the details. He will pop up soon enough :) 12:58
13:04 curan left 13:05 xtreak left, turdmonkey joined, turdmonkey is now known as Bowlslaw
moritz the perlbrew'd perl that is used in the update process misses some required modules 13:07
perl6.org/compilers/features works again 13:09
13:12 kaare_ joined
Bowlslaw Good morning, everyone. 13:12
I can't stop coding in Perl 6.
@_@
moritz El_Che: I've created github.com/perl6/perl6.org/issues/117 13:14
13:15 kerframil joined
benjikun Good morning Bowlslaw 13:19
Yeah, same. It's grown on me too far lol
13:26 uzl joined 13:27 Schepeers joined 13:31 Xliff joined
uzl Good morning everyone! 13:34
yoleaux 28 Jun 2018 16:08Z <jmerelo> uzl: the Perl6 crowd is, in general, very welcoming. You'll feel at home.
28 Jun 2018 17:02Z <b2gills> uzl: `'abcccccd'.comb.Bag.max(*.value)`
benjikun morning uzl 13:35
uzl Good morning!
Bowlslaw Good morning. 13:36
uzl m: my $s = set(set(1, 3), set(20, 4)); .say for ($s.Str.comb(/\d+/));
camelia 4
20
1
3
uzl Is there a more direct way of creating an array from a set of set? I want to preserve the "set of set" structure as an "array of arrays" bu haven't been able to. 13:38
However, with this example, I was able to at least iterate over the elements of the set.
tobs m: my $s = set(set(1, 3), set(20, 4)); my &s2a = { .keys.Array }; say $s.&s2a».&s2a 13:42
camelia [[3 1] [4 20]]
tobs uzl: that seems to work, but I'm very insecure with conversions like that in P6.
uzl tobs: why's that? btw, what's »? 13:45
benjikun uzl: docs.perl6.org/language/unicode_en...Guillemets 13:47
He's using it for hyper operators :) 13:50
13:51 scovit joined
tobs uzl: I'm new to it. When transforming data structures (recursively), I sometimes accidentally create additional scalar containers instead of Slip'ing the new data in. 13:51
scovit Is it normal that naming a method in a Class "of" introduces bugs? What is so special about "of" 13:52
benjikun scovit: Perhaps the routine 13:53
docs.perl6.org/routine/of
jnthn m: my Int @array; say @array.of
camelia (Int)
uzl tobs: oh, I see!
benjikun: will look into it!
scovit I see that it is very special 13:55
13:59 mcmillhj left 14:00 benjikun left, zakharyas left, benjikun joined, benjikun left, benjikun joined 14:05 sarna__ joined 14:07 Zoffix joined
Zoffix sarna: what does it matter what I will or won't contribute to? 14:07
sarna__ Zoffix: it's just that I'd be very sad to see you go 14:08
scovit Plase tell me if I should report a bug, the situation is the following, create a file called Bugged.pm6 in your directory and the following content: gist.github.com/scovit/c59c2db4531...71abc8cd95 14:11
then try this: use NativeCall;
class Bugged is repr('CPointer') is export {
method of() { }
}
class Fine is repr('CPointer') is export {
method nana() { }
}
no!
this: PERL6LIB=. perl6 -MNativeCall -MBugged -e 'sub memcpy(Fine, Pointer, size_t) is native {*}'
and this: PERL6LIB=. perl6 -MNativeCall -MBugged -e 'sub memcpy(Bugged, Pointer, size_t) is native {*}'
you see that the error at least is not clear 14:12
Zoffix FWIW a shorter way to write PERL6LIB=. is to pass -I. option
scovit thanks Zoffix, but should I report or not?
Zoffix scovit: yeah, I think so 14:14
It's the definition of method `of` that makes it cry
And it's calling it here: github.com/rakudo/rakudo/blob/mast...l.pm6#L695 14:16
scovit: so you just wanted to define a method `of` for some feature unrelated to its normal usage or were you trying to override what `of` returns? 14:19
scovit I'm checking 14:20
normally a CPointer would not have any of 14:21
so that line 695 is atleast weird
I think I was implementing it for my class, and I didn't do it the way it should be done to play well with NativeCall 14:22
do you know of any repr("CPointer") type that implement .of?
Zoffix I don't know much about CPointer 14:23
scovit m: class Fine is repr("CPointer") { }; say Fine.new().of;
Zoffix *about NativeCall
camelia No such method 'of' for invocant of type 'Fine'
in block <unit> at <tmp> line 1
Zoffix m: use NativeCall; say [.REPR, .of] without Pointer[uint32] 14:24
camelia [CPointer (uint32)]
Zoffix That method's set when you parametarize stuff
14:25 eliasr left
scovit Yea.. it is parametrized pointer.. Do you know how do you create a parametrized class? 14:25
Zoffix I think you mix in a parametarized role 14:26
14:26 mcmillhj joined, mcmillhj left
scovit Not in this case, here: github.com/rakudo/rakudo/blob/mast...es.pm6#L18 and here: github.com/rakudo/rakudo/blob/mast...es.pm6#L79 14:27
well it mixes in 14:28
Zoffix ¯\_(ツ)_/¯ 14:29
14:29 Zoffix left 14:32 skids joined
scovit I don't think I will report. functioning of of() in NativeCall is very complicated and I was not doing it right 14:42
14:46 xtreak joined
scovit When you inherit a class, do you inherit also the repr ? It does not feel like 14:49
14:54 xtreak left 15:02 jmerelo joined
jmerelo squashable6: status 15:02
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in 2 days and ≈18 hours (2018-07-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
El_Che releasable6: status
releasable6 El_Che, Next release in ≈18 days and ≈3 hours. 1 blocker. 0 out of 62 commits logged
El_Che, Details: gist.github.com/ebd2cadd666d3a3918...2d9e30e402
sarna__ can a hash sometimes implicitly coerce to an array? 15:11
jmerelo sarna__: in an array context, it might.
15:12 xtreak joined, gfldex joined 15:16 xtreak left 15:21 zakharyas joined, Xliff left 15:22 fake_space_whale joined
jmerelo Right now, 750 questions labeled "Perl6" in StackOverflow stackoverflow.com/questions/tagged/perl6 15:22
sarna__ can I make a program quit when a constraint fails? now I only get a "type check failed" after it's done 15:26
15:26 mcmillhj joined
jmerelo sarna__: but that's normally a Failure that, if uncaught, will stop the program 15:27
sarna__ jmerelo: weird, I'm not catching it anywhere
jmerelo sarna__: maybe an example will help 15:30
sarna__ jmerelo: it's kind of weird.. I'll try to shorten it as much as possible 15:33
15:37 uzl left 15:40 uzl joined 15:47 pmurias left
sarna__ jmerelo: p.teknik.io/RWiSQ 15:48
to reproduce: run it, give it an invalid number and then something in range 1-10
(by invalid number I mean something not in range 1..10) 15:49
it tries to run foo($x) for some reason
15:55 wamba joined 16:08 zakharyas left 16:11 sarna__ left 16:13 psychoslave left, xtreak joined 16:18 stee3 left, robertle left 16:21 domidumont left 16:22 zakharyas joined, gtodd joined
jmerelo .tell sarna__ it's returning from samewith and getting back to the original number that was assigned the first time. 16:25
yoleaux jmerelo: I'll pass your message to sarna__.
jmerelo .tell sarna__ sarna sarna_ you should probably use a normal loop. Samewith is not repeating the loop but calling again the same function... and returning from it 16:26
yoleaux jmerelo: I'll pass your message to sarna__.
El_Che lol
m: say sarna.permutations 16:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
sarna used at line 1. Did you mean 'srand', 'warn'?
sarna hey, my client borked, no need to publicly shame me for that
El_Che m: say "sarna".permutations
camelia ((sarna))
El_Che mm
:)
jmerelo sarna: I was just trying to send it to every possible way... I assumed you were not coming back as sarna__ 16:28
El_Che shaaaame!
jmerelo sarna: did you see the message above?
sarna jmelero: yeah, I know :) just joking
yep
I don't quite understand it yet
El_Che it sounds like a scene of GoT
jmerelo sarna: samewith is calling the same bar function 16:29
sarna shouldn't it jump to the top, ask for another number and run foo with that another number (if it's valid)?
jmerelo sarna: yep, it does, but then it returns and the value it has is the original before samewith was called.
I'm going to upload it with says
16:30 scimon left
jmerelo sarna: github.com/JJ/my-perl6-examples/bl...m-sarna.p6 16:30
sarna jmerelo: oh! how can I skip the returning part? 16:31
El_Che from-sarna-to-picazón.p6
jmerelo sarna: run it and enter first 33 and then 3. If you do 33, it says "wrong number 33", then samewith, you enter 3, says "out of the loop with 3", then "in foo say 3", but then it goes back to the original
sarna 's head begins to hurt 16:32
jmerelo sarna: declare $x before the loop, put the prompt inside the loop and get rid of samewith.
sarna: and don't pay any attention to El_Che :-)
El_Che as a general rule?
jmerelo El_Che: only when you're talking about cooking and/or football. 16:33
El_Che: maybe docker and packaging.
sarna jmerelo: alright, I'll try it when I'm back from a walk :^) thank you
jmerelo sarna: sure :-)
sarna what's so bad about El_Che's cooking 16:34
El_Che Deja que los perros ladren Sancho amigo, es señal que vamos pasando. (apócrifa)
geekosaur samewith is not a looping construct, it is used to "rethink" dispatch between multis. perhaps you were looking for redo
jmerelo sarna: no, that's the good part. The bad part is Spanish jokes...
El_Che: :-) "Ladran, luego cabalgamos..." 16:35
El_Che :)
sarna geekosaur: whew, I thought it was like recur in clojure
16:38 zakharyas left
sarna jmerelo: Spanish swears are really interesting though 16:39
defecating into the sea when one's angry..
jmerelo sarna: the "salty" sea. Not just the sea. Yep, that's colorful. 16:40
sarna jmerelo: oh! I missed the crucial part 16:41
El_Che Iberic spanish swearing is interesting, indeed
a lot of defecating 16:42
masak jmerelo: reminds me of these expressions: twitter.com/intifadarling/status/1...5839505408
16:42 dakkar left 16:44 MasterDuke joined
jmerelo masak: Inspiring :-) 16:45
16:46 lizmat joined
sarna Catalans even put a defecating man next to baby Jesus on Christmas 16:52
16:53 uzl left
sarna (the infamous caganer) 16:54
16:55 ChoHag left 16:56 ChoHag joined
jmerelo sarna: hey, shepherds do their number twos too! It gives everything a point of realism. 17:00
17:02 koto left, uzl joined
sarna jmerelo: Jesus did it too! 17:03
Geth doc: 8e9251bfa7 | (JJ Merelo)++ | doc/Language/list.pod6
Some reflow and rephrasing
17:05
synopsebot Link: doc.perl6.org/language/list
jmerelo sarna: but of course :-) 17:12
17:15 wamba left 17:20 xtreak left 17:26 psychoslave joined
Geth doc: a7691bee21 | (JJ Merelo)++ | doc/Language/list.pod6
Improves and fixes some errors in the lazy "lists" section

  * Changes indexing
  * Changes the link to Iterator to a link to Iterable
  * Refers generically to objects, not specifically to lists.
This refs #2139, but there's some more work to do. Including, possibly, moving the whole section to another page, such as Iterators.
17:28
synopsebot Link: doc.perl6.org/language/list
17:28 zakharyas joined 17:37 sno left, domidumont joined 17:45 eliasr joined 17:49 wamba joined 17:54 uzl left 17:55 zakharyas left
Altreus From Testing: IO::Socket::Async::SSL:ver<0.7.0>: Cannot locate symbol 'sk_num' in native library 'libssl.so' 17:57
Known issue? :s
oh good 18:00
I found the github from zef :)
El_Che Does The Github have a The Facebook page? 18:05
Geth doc: b856651f24 | (JJ Merelo)++ | doc/Language/list.pod6
Clarifying the dual Iterable/Iterator roles in a lazy contest refs #2139
doc: f3052b8f48 | (JJ Merelo)++ | doc/Language/list.pod6
Adding examples of casting among lazyfiable objects

Which refs #2139
I won't close until we decide if we leave it here or move to the new Iterating page, since this not only refers to lists, but also to Seqs and Maps.
synopsebot Link: doc.perl6.org/language/list
jmerelo El_Che: does The Facebook has a The Twitter nick? 18:06
18:17 stee joined 18:22 sena_kun joined 18:29 benjikun2 joined, jmerelo left 18:30 sauvin left, benjikun left 18:51 domidumont left, Ven` left 18:52 kerframil left 19:27 grumble joined 19:28 musca joined, pecastro joined 19:29 lizmat left 19:33 zakharyas joined 19:38 sena_kun left 19:39 lizmat joined
Geth doc: Kaiepi++ created pull request #2140:
More documentation on library paths and names
19:40
19:46 Aceeri_ joined, lizmat left 20:06 Possum left 20:13 Possum joined 20:14 zachk joined, zachk left, zachk joined 20:15 psychoslave left 20:24 sno joined 20:27 mscha joined
mscha m: my @foo = (1,2),(3,4),(5,6),(7,8); say [Z+] @foo; # fine 20:28
camelia (16 20)
mscha m: my @foo = (1,2),(3,4); say [Z+] @foo; # fine
camelia (4 6)
mscha m: my @foo = (1,2),; say [Z+] @foo; # grrrr
camelia (3)
20:32 rindolf left 20:36 rindolf joined 20:39 sarna left 20:52 raynold joined 20:54 AlexDaniel joined 20:58 zakharyas left
spycrab0 Is there more in-depth documentation on NativeCall then docs.perl6.org/language/nativecall? 21:08
21:10 skids left 21:11 mcmillhj left, DrForr joined
DrForr o/ 21:12
AlexDaniel squashable6: next 21:16
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 2 days and ≈12 hours (2018-07-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel o/
21:16 Kaiepi joined 21:17 sena_kun joined 21:18 sena_kun left
DrForr Sitting here contemplating a UI for Spreadsheet::Excel. 21:20
jnthn
.oO( Isn't that called Excel? :) )
21:25
DrForr Already done so I won't have to? Yay...
Or you just mean the GUI... 21:26
jnthn I meant the GUI :)
DrForr Thought as much...
jnthn Do we have a Perl 6 Spreadsheet::Excel?
DrForr Not that I'm aware of. 21:27
jnthn Aww :) 21:28
21:45 Xliff joined 21:58 rindolf left 22:11 Xliff left 22:30 Bowlslaw left 22:45 cog joined 22:55 mscha left 23:11 cog left 23:12 cog joined 23:19 daxim joined, Kaiepi left 23:21 Kaiepi joined, benji__ joined 23:25 benjikun2 left