»ö« 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 moritz on 22 December 2015.
00:17 pecastro left 00:20 rindolf left 00:26 pecastro joined 00:27 setty1 joined 00:38 cdg joined 00:47 benjisomething joined 00:49 wamba left 00:51 pecastro left 01:05 aborazmeh joined, aborazmeh left, aborazmeh joined 01:06 benjisomething left 01:20 cdg left 01:28 markong left
Xliff_ dmaestro: Still here? 02:18
dmaestro Xliff: just got back 02:35
02:38 stmuk joined 02:39 stmuk_ left 02:45 ilbot3 left 02:47 jeromelanteri joined 02:49 mempko left 02:51 Sgeo_ left 02:55 ilbot3 joined, ChanServ sets mode: +v ilbot3, Sgeo joined 02:57 Nanjizal joined 03:01 mempko joined 03:08 aborazmeh left
Xliff_ dmaestro: Just remove your "unit module" statements and it should work. 03:15
03:23 shinobicl joined 03:26 setty1 left 03:30 shinobicl left, shinobicl joined 03:51 ufobat___ joined, shinobi_cl joined, shinobicl left 03:54 ufobat_ left 03:57 dalek left 04:02 konsolebox left, Geth left 04:03 konsolebox joined 04:06 ogniloud joined 04:14 ogniloud left 04:23 eliasr left 04:32 Nanjizal left 04:33 Cabanossi left 04:34 Cabanossi joined
dmaestro Xliff_: It's appropriate I guess to remove one (It's an auxilliary module anyway), and that worked. Thanks. 04:43
I'd like to know more about the semantics of declaring a "Module" - I don't find the basic docs very helpful yet. 04:45
04:59 konsolebox left 05:01 konsolebox joined 05:12 konsolebox left 05:13 konsolebox joined 05:30 sergot left, psch left, JimmyZ left, dalek joined, ChanServ sets mode: +v dalek, Geth joined, ChanServ sets mode: +v Geth, synopsebot_ joined, ChanServ sets mode: +v synopsebot_, p6lert joined 05:32 BenGoldberg left 05:35 synopsebot_ left, synopsebot joined, ChanServ sets mode: +v synopsebot, SourceBaby joined, ChanServ sets mode: +v SourceBaby 05:50 statisfiable6 left, statisfiable6 joined, ChanServ sets mode: +v statisfiable6 05:56 cdg joined 05:58 khw left 06:01 cdg left
Geth doc: fad52e27eb | (Alex Chen)++ | doc/Language/glossary.pod6
Add link from glossary to detailed doc
06:13
synopsebot Link: doc.perl6.org/language/glossary
Geth doc: dd8a19e0df | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
Update regexes.pod6
06:21
synopsebot Link: doc.perl6.org/language/regexes
06:27 traxex left 06:29 darutoko joined 06:32 traxex joined 06:34 konsolebox left, konsolebox joined 06:42 konsolebox left 06:49 konsolebox joined 07:02 ufobat___ left 07:06 konsolebox left 07:13 konsolebox joined 07:20 shinobi_cl left, konsolebox left 07:21 konsolebox joined 07:27 wamba joined 07:40 cdg joined 07:44 cdg left 07:58 konsolebox left 08:01 konsolebox joined 08:06 konsolebox left 08:07 konsolebox joined 08:19 rindolf joined 08:26 konsolebox left 08:27 Util joined, konsolebox joined 08:30 sena_kun joined 08:39 domidumont joined 08:44 konsolebox left, domidumont left 08:45 domidumont joined 08:46 konsolebox joined 09:20 bioexpress joined 09:37 bioexpress left 09:41 konsolebox left 09:43 konsolebox joined
El_Che twitter.com/chromatic_x/status/954...3781764096 <= we must acknowledge it's funny 09:53
AlexDaniel At least it is not drunk 😂 10:01
Geth doc: 7178b9e62b | (JJ Merelo)++ | CREDITS
Adds $.self to credits
10:02
doc: 70170eae69 | (JJ Merelo)++ | 2 files
Tries to fix XML problems

Addresses #1737 by using a different example.
doc: 8836f0c08e | (JJ Merelo)++ | doc/Language/setbagmix.pod6
Eliminates parentheses due to excess

And closes #1737.
Still, there seems to be a problem with the single-page references when some characters are used. This should probably be checked. Also some commits in this push related to @hyperpape's comment in #728. Hope this is enough, if it is not, just say so.
synopsebot Link: doc.perl6.org/language/setbagmix
El_Che lol 10:03
10:19 konsolebox left 10:20 TEttinger left 10:28 konsolebox joined 10:41 konsolebox left 10:47 konsolebox joined 10:55 domidumont left 10:58 domidumont joined 10:59 espadrine left, foobar` left 11:02 wamba left 11:05 wamba joined
lizmat El_Che: yeah, it says so much :-) 11:14
El_Che lizmat: just saw your interchange on github with him 11:16
he was pretty rude
lizmat on github?
I had an interchange with chromatic on github? 11:17
lizmat must not be awake yet
El_Che sorry, reddit
typing on a tablet and no coffee yet :)
lizmat ah, ok, yeah, lemme check that out, haven't read his last reply yet then I guess 11:18
El_Che you answered it
the respect thing 11:19
on zoffix thread
lizmat yeah 11:21
I've replied
Perl 6 people will know what I meant
gfldex if all the hours spend on argueing on the internet would be spend on something productive … 11:25
:->
Geth doc: 8f45c19d25 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6
Link to a more proper loc
11:28
synopsebot Link: doc.perl6.org/language/glossary
11:31 setty1 joined 11:42 konsolebox left 11:43 konsolebox joined 11:46 markong joined
lizmat gfldex: indeed 11:46
the thinking behind and all of the drafts of my blog post have made a serious dent into my productivity 11:47
but I really felt it was time to *do* something, rather than just continue watching
11:48 releasable6 joined 11:50 setty1 left
stmuk I think a vocal minority of the community are stuck in the early 2000s and scared of change and learning new things. Our energies might be better used in addressing the wider programming community with "look how cool this is" type posts 11:51
gfldex Python 1.0 was released in 1991 and was useless. Python 2.0 was released in 2000 and the first useable release. It took years after that to be used in production. So we are well on track if you ask me. 11:52
lizmat :-)
11:55 cdg joined 12:00 cdg left
stmuk hmm looks like Learning Perl 6 has been pushed back to Aug! 12:02
tadzik what a clever twitter post
I gotta say, this whole drama about renaming stuff *again*, and now looking at moods of people in online discussions really makes me think that I rely on p5 too much given the state of things 12:04
perhaps I should be looking at drama less often :)
lizmat another one: twitter.com/chromatic_x/status/954...6104003584
stmuk github.com/rakudo/rakudo/blob/mast...TS.pl6#L34 12:06
tadzik :o 12:07
markong unfortunately for "Learning Perl 6" and all of the o'reilly digital publications after last September, they are trapped inside "Safari"... and no one with a grain of brain would rent books
lizmat chromatic really still suffers from the demise of Parrot: twitter.com/chromatic_x/status/934...1913198592
12:07 konsolebox left
lizmat and that's less than a month ago 12:07
12:08 konsolebox joined
lizmat oops, two months ago :-) 12:09
stmuk I have him blocked :) 12:11
12:13 konsolebox left 12:19 konsolebox joined 12:20 Nanjizal joined 12:27 vike left 12:28 trnh joined, cdg joined 12:29 vike joined 12:33 cdg left 12:36 reportable6 left, greppable6 joined, benchable6 joined, coverable6 joined, ChanServ sets mode: +v coverable6, reportable6 joined 12:52 trnh left 13:00 eliasr joined
AlexDaniel “if all the hours spend on argueing on the internet would be spend on something productive …” 13:08
like helping with the release!
the we would have released ahead of time :)
n
AlexDaniel unmarks one resolved blocker 13:09
lizmat what's the other blocker again ? 13:12
13:14 xinming joined
AlexDaniel lizmat: none officially, there's a question to you in #perl6-dev though (about one currently-failing 6.c-errata test file). 13:27
I just got the fresh report from toaster, and I see a possible issue or two
so still looking for possible problems :)
13:32 bioexpress joined 13:33 dj_goku left
bioexpress p6: use Term::TablePrint :print-table; my $table = (['c1','c2'],[1,'a'],[2,'b'],[3,'c']); print-table($table,:2max-rows); 13:33
camelia ===SORRY!===
Could not find Term::TablePrint at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/rakudo-m-inst-2/share/perl6
C…
bioexpress Hello, "print-table" (github.com/kuerbis/Term-TablePrint-p6) prints $table (list of lists) on the terminal. The option "max-rows" limits the output to max-rows table rows of $table. I am considering to remove this option - my thoughts: if the user passed $table to print, then that should be OK. Does somebody encourage me to remove "max-row" or does somebody think that I should keep this option?
13:35 dj_goku joined, dj_goku left, dj_goku joined
timotimo m: my $a := Proxy.new(FETCH => -> $ { ++$ }, STORE => -> $, $ { }); say $a for ^3 13:36
camelia 11
22
33
timotimo wat? :) :) :)
lizmat AlexDaniel: I've committed a fix for 6.c-errata 13:37
timotimo m: my $a := Proxy.new(FETCH => -> $ { 1 }, STORE => -> $, $ { }); say $a for ^3
camelia 1
1
1
lizmat timotimo: yeah, there's a *lot* of fetching going on 13:38
13:39 Nanjizal left
timotimo yeah, but as you can see from the values it gets the same value twice in a row 13:39
m: my $a := Proxy.new(FETCH => -> $ { note "fetched"; ++$ }, STORE => -> $, $ { }); say $a for ^3
camelia fetched
11
22
33
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetche…
timotimo that's funny, though
m: my $a := Proxy.new(FETCH => -> $ { say "fetched"; ++$ }, STORE => -> $, $ { }); say $a for ^3
camelia fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
11
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
22
fetched
fetched
f…
timotimo oh!
LOL
i thought it was literally fetching 1 and displaying 1 ~ 1
but it just happened to fetch 11 times, which is the exact amount for this to work :D 13:40
lizmat yup
timotimo that's a much more boring explanation :(
lizmat having recently working on tie() for Perl 6, and using a lot of Proxy's for that, I've run into that quite a lot
timotimo m: my $a := Proxy.new(FETCH => -> $ { say "fetched"; ++$ }, STORE => -> $, $ { }); say $a<> for ^3
camelia fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
16
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetched
fetche…
lizmat I wonder how much of an optimization opportunity that is 13:41
timotimo wowza, deconting makes it fetch *more* often
m: my $a := Proxy.new(FETCH => -> $ { ++$ }, STORE => -> $, $ { }); say $a<> for ^3
camelia 16
32
48
buggable New CPAN upload: P5tie-0.0.7.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.7.tar.gz 13:42
MasterDuke timotimo: how much memory growth did you see with (i think it was Ulti's) MQTT::Client test script? 13:45
timotimo i changed it to read every message there is and it didn't grow terribly much (i looked at rss growth with snapper)
but at some point it would just stop receiving more and i haven't looked into that yet 13:46
MasterDuke after how long? i ran it for a couple hours and mem started at ~150m and ended at ~200m, but was still receiving messages? 13:47
s/\?$//
timotimo you're running the script unmodified? 13:48
MasterDuke yeah
timotimo that'll run for longer, yes 13:49
MasterDuke you added a `whenever $m.subscribe("#") { ... }`? 13:50
timotimo abrtd is consuming 100% of one core right now :\
yeah, that's what i had 13:51
it has more growth towards the beginning, which is likely moarvm's diverse kinds of caches filling up slowly 13:52
MasterDuke oh, that does print a *lot* more stuff 13:54
13:55 konsolebox left
timotimo yes 13:55
13:58 konsolebox joined, Nanjizal joined 14:05 konsolebox left 14:06 aborazmeh joined, aborazmeh left, aborazmeh joined 14:07 konsolebox joined
MasterDuke but memory doesn't go up all that much more. it got up to 230m pretty quickly, but has been sitting there for a while 14:11
14:14 bisectable6 left, bisectable6 joined, ChanServ sets mode: +v bisectable6
MasterDuke Juerd: your foo.pl canary doesn't seem to have much of a memory leak for me. what sort of performance are you expecting? 14:16
14:17 bioexpress left 14:20 Nanjizal left
Juerd MasterDuke: It leaks at about half an MB per minute here 14:22
14:23 dj_goku left
Juerd MasterDuke: I'm expecting negligible memory leaking; the mqtt things that I run all run 24/7. 14:23
MasterDuke Juerd: what version of rakudo?
Juerd This is Rakudo version 2017.10-4-g4fca94743 built on MoarVM version 2017.10
Er 14:24
MasterDuke how do you get your rakudo?
Juerd This means my rakudobrew hasn't been updating the binary and I've been updating weekly for no reason. I never checked to see if I actually got the new version :) 14:25
I'll rm -rf ~/.rakudobrew and try if recent improvements have fixed the issue 14:26
geekosaur heheh
MasterDuke ha. i'd be curious to see if you get the same rate of leak with something newer
geekosaur that happens sometimes... but I bet that's the nom change
(it's master now)
14:26 aborazmeh left
MasterDuke yeah, that has bitten a bunch of people 14:26
AlexDaniel I'd expect the most recent rakudo version to leak more 14:32
at least, that's what I'm hoping for
uh… that sounded wrong
El_Che markong: no, you can buy the book everywhere and the drm-infested ebook on several places. They just don't sell ebooks anymore 14:33
timotimo the nom update would probably not have been a problem if you used "rakudobrew self-upgrade", too? :P 14:35
14:36 natrys joined
AlexDaniel greppable6: whenever 14:47
greppable6 AlexDaniel, gist.github.com/2c6680b0ba52e11e21...2a7275970c
14:54 sergot joined 15:34 hankache joined 15:35 shinobi_cl joined
markong El_Che: right, that's exactly the problem: I can only buy the paper book to *buy* a book (in 2018)! after years of anti-DRM ebook campaigning, o'reilly has finally took off his mask, showing that the bottom line is what count! What they don't understand is that they aren't renting multimedia contents (they have been infested by the netflix virus and joined the band-wagon business model of flat subscription) and that technical manuals are an entirely different 15:37
thing! That's incredible, since it once *was* a technical book publisher and was good at it!
also it is not true that you can buy digital copies: support.oreilly.com/oreilly/topics/...pdf-ebooks they just want you to get something off amazon on your kindle! that's it!
I've always been happy to buy on their shop (Perl related content and other) because of the DRM policy; now no more! 15:38
coincidentally a lot of Perl related literature is published by them: I hope authors and the "community" at large try to pull old content out of there, if that's possible, and surely start to push for publish anything new on other platforms (dunno maybe manning.com) 15:39
at least manning is still making available drm free digital copies (PDF included) and by the rate of publications seems that it is NOT the problem! 15:40
15:44 Nanjizal joined
El_Che markong: yeah, I have a shitload of oreilly books (perl and other) als even more legal pdf's 15:46
I only have access to safari because of work
markong: it's sad, indeed. On the other hand, I wonder if books are an investements as they used to be. I have the impression that nowadays I mostly skim them 15:48
15:49 hankache left, hankache joined, Nanjizal left
markong I understand your situation: that's a shame! Shame on o'reilly! I've personally rewarded them with paper book purchases, after having owned digital copies for a while (legal and illegal). Now no more: I won't buy anything published by them! The PDF killing is outrageous: They simply aren't considering that their audience is not the same as netflix's ! go figure their state of mind! 15:52
15:55 Kaiepi joined
markong the digital (PDF) format is simply the de-facto format for anything technical (academia papers/ manuals / technical books). e.g. I have a "Programming Perl" paper edition standing on my desk, and a legitimate PDF edition...I very often find myself go to the index to look up something while coding, and even more often, doing a search on the PDF edition give me the exact info bit I'm looking for in a third of time compared to the paper one 15:56
15:59 setty1 joined, zakharyas joined
markong El_Che: Yes, there are many alternative literature sources on the net nowadays, but (!) books still have more quality and usually, if well written, are a good source of information for a vast audience. e.g.: I can go down the docs perl6.org to start learning perl6, but I would enjoy to read the "Learning Perl 5" equivalent for the version "6" of the language! having published materials on a topic has enormous benefits on its acceptance (talking about 16:02
programming languages)
Geth doc: titsuki++ created pull request #1738:
Add a link to the binding section
doc: d9d7f209aa | (Itsuki Toyota)++ | doc/Language/variables.pod6
Add a link to the binding section
doc: a593b80c1b | (Itsuki Toyota)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
Merge pull request #1738 from titsuki/add-binding-link

Add a link to the binding section
synopsebot Link: doc.perl6.org/language/variables
markong unfortunately "Learning Perl 6" it's published by O'reilly and I won't *rent* it (nor I will buy the paper copy to reward them of the great damage they are doing!) 16:04
geekosaur has missed something, apparently
oh 16:05
El_Che markong: pdf is the reason I have an ipad instead of a better ereader (programming books and scanned academic books) 16:32
16:37 Nanjizal joined 16:42 Ven`` joined 16:47 ChoHag left 16:48 khw joined, DrForr joined 16:52 Ven`` left, Ven`` joined
DrForr I'm going to regret asking this, but where's the Web <-> Perl 6 gateway ISTR lying around? 16:52
shinobi_cl Hi. How can i convert an array of int in an array of Str? Or any type to its Str representation for that matter?
16:55 hankache left, rindolf left
shinobi_cl Hi. How can i convert an array of int in an array of Str? Or any type to its Str representation for that matter? 16:55
sorry, pasted it again D: 16:56
sena_kun m: <1 2 3>.map(*.Str)
camelia ( no output )
sena_kun m: say <1 2 3>.map(*.Str)
camelia (1 2 3)
sena_kun shinobi_cl, ^
shinobi_cl but <1 2 3> is already an Str array i think
timotimo it's an array of IntStr objects
sena_kun it'll work with any array 16:57
timotimo m: say <1 2 3>.map({.WHAT})
camelia ((IntStr) (IntStr) (IntStr))
sena_kun m: say [1, 2, 3].map(*.Str)[0].^name
camelia Str
sena_kun m: say [1, 2, 3]>>.Str[0].^name 16:59
camelia Str
shinobi_cl m: my Date @arrd = (Date.new("2010-01-01"), Date.new("2010-01-02"), Date.new("2010-01-03")); say @arrd.perl; say @arrd.map(*.Str); 17:00
camelia Array[Date].new(Date.new(2010,1,1), Date.new(2010,1,2), Date.new(2010,1,3))
(2010-01-01 2010-01-02 2010-01-03)
shinobi_cl mmm i see. Thanks!!!!
AlexDaniel m: my @a = 1, 2, 3; @a X= %(); dd @a
camelia Array @a = [1, 2, 3]
AlexDaniel why?
17:00 zakharyas left
AlexDaniel m: my @a = 1, 2, 3; @a X= 42; dd @a 17:00
camelia Array @a = [42, 42, 42]
AlexDaniel 6c: my @a = 1, 2, 3; @a X= %(); dd @a
committable6 AlexDaniel, ¦6c (26 commits): «Array @a = [1, 2, 3]␤»
DrForr NM, found glot.io... 17:04
timotimo oh *that* is what you mean with web <-> perl6 gateway 17:05
i was thoroughly confused
DrForr It's okay, so was I. 17:06
Aaand.. it's in Haskell.
I suppose the right thing to do is use Cro though.
17:07 rindolf joined
DrForr And figure a way not to get walked over by G*gle's legal team. 17:08
17:09 Nanjizal left 17:10 trnh joined 17:13 Ven`` left
Xliff_ If I wanted to make an app that had net portion in the background, I would need a Promise and a Supply, right? 17:25
(just verifying, really)
shinobi_cl m: subset Pos of Int where * >= 1; my Pos @arr = (1,2,3); sub testPosArray(Pos @arr) { say "IT WORKS";}; testPosArray(@arr); 17:28
camelia Constraint type check failed in binding to parameter '@arr'; expected Pos but got Array[Pos] (Array[Pos].new(1, 2, 3))
in sub testPosArray at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff_ m: subset Pos of Int where * >= 1; my Pos @arr = (1,2,3); sub testPosArray(Pos @arr) { say "IT WORKS";}; testPosArray(|@arr); 17:29
camelia Too many positionals passed; expected 1 argument but got 3
in sub testPosArray at <tmp> line 1
in block <unit> at <tmp> line 1
shinobi_cl m: subset Pos of Int where * >= 1; my Pos @arr = (1,2,3); sub testPosArray(Array[Pos] $arr) { say "IT WORKS";}; testPosArray(@arr);
camelia IT WORKS
shinobi_cl what bothers me is the difference in the declaration :( 17:30
I created a "Pos @" but i need to pass an "Array[Pos] $"
Xliff_ Yeah, but the sigil makes all the difference.
subset Pos of Int where * >= 1; my Pos @arr = (1,2,3); sub testPosArray(Array[Pos] @arr) { say "IT WORKS";}; testPosArray(@arr); 17:31
17:31 Ven`` joined
Xliff_ m: subset Pos of Int where * >= 1; my Pos @arr = (1,2,3); sub testPosArray(Array[Pos] @arr) { say "IT WORKS";}; testPosArray(@arr); 17:31
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling testPosArray(Positional[Pos]) will never work with declared signature (Array[Pos] @arr)
at <tmp>:1
------> 3y[Pos] @arr) { say "IT WORKS";}; 7⏏5testPosArray(@arr);
17:31 AlexDaniel left 17:32 AlexDaniel joined
Xliff_ Pos @arr or Array[Pos] $arr should be equiv 17:32
shinobi_cl yep. Should.
Xliff_ At least from my line of thinking. But we all know that doesn't mean squat.
geekosaur perl6advent.wordpress.com/2017/12/02/ 17:33
17:39 zakharyas joined 17:42 AlexDaniel left, Ven`` left 17:44 zakharyas left, zakharyas joined
pmurias m: say ?('fi' ~~ /:i (fi)(i) /); 17:46
camelia True
geekosaur oh, that's what you meant earlier 17:49
"ouch"
17:51 espadrine joined 17:53 S007 joined 17:55 Nanjizal joined 18:03 khisanth_ left
timotimo Xliff_: not equiv, Pos @arr is Positional[Pos], which isn't the same as Array[Pos] 18:04
Array does Positional, though
shinobi_cl I found one that might work, at least for my particular case 18:07
m: subset Pos of Int where 1 .. *; sub f(+@a where {$_.all ~~ Pos}) { say @a.perl }; my Pos @arrpos = (1,2,3); f(@arrpos) 18:08
camelia [1, 2, 3]
shinobi_cl m: subset Pos of Int where 1 .. *; sub f(+@a where {$_.all ~~ Pos}) { say @a.perl }; my Pos @arrpos = (1,2,0); f(@arrpos)
camelia Type check failed in assignment to @arrpos; expected Pos but got Int (0)
in block <unit> at <tmp> line 1
shinobi_cl i cannot get rid of the + in front of the +@a, though
timotimo we recently had a ticket opened that the way such where clauses are applied is different between parameters and variables or something 18:10
18:16 khisanth_ joined 18:28 someuser left 18:30 someuser joined 18:34 trnh left 18:36 zakharyas left 18:39 trnh joined 18:41 nativecallable6 joined, ChanServ sets mode: +v nativecallable6 18:44 epony left 19:01 trnh left 19:04 darutoko left, chakli joined
chakli Hello, How would i give arguments to map? 19:10
m: sub addn($n1, $n2){say $n1+$n2;}; (1..8).race.map(&addn);
camelia 3
7
11
15
chakli m: sub addn($n1, $n2){say $n1+$n2;}; (1..8).race.map(&addn, $_, 2); 19:11
camelia Too many positionals passed; expected 2 arguments but got 4
in block <unit> at <tmp> line 1
moritz map doesn't take more positional arguments
chakli It took 2 from my 1st example 19:12
moritz no
the block that you gave to map took two arguments
chakli it did 1+2, 3+4 ...
moritz m: say (1..8).map(-> $a, $b { $a + $b })
camelia (3 7 11 15)
timotimo you need to either pass a little closure or curry in the arguments with the .assuming method
actually 19:13
moritz chakli: what do you want it to do?
timotimo i think what you really want here is (1..8 X 2).race.map(&addn)
moritz m: sub addn($n1, $n2){say $n1+$n2;}; (1..8).map({ addn($_, 2)})
camelia 3
4
5
6
7
8
9
10
timotimo m: sub addn($n1, $n2){say $n1+$n2;}; (1..8 X 2).race.map(&addn);
camelia 4
4
4
4
timotimo oh, not quite
moritz m: sub addn($n1, $n2){say $n1+$n2;}; (1..8).map(&addn.assuming(2))
camelia 3
4
5
6
7
8
9
10
19:14 yoleaux left
moritz timotimo: map passes it a list of two values, not two arguments, right? 19:14
timotimo yup
m: say (1..8, 2).Int 19:15
camelia 2
chakli @moritx, ill try map({ addn($_, 2)})
@moritz thanks thats working 19:20
moritz chakli: you're welcome 19:21
19:21 trnh joined
buggable New CPAN upload: Tie-Array-0.0.2.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.2.tar.gz 19:22
timotimo .seen skarsnik 19:23
chakli Is it safe to pass a sqlite statement into race.map()? or would i need a mutex (or something like that)?
timotimo sqlite.org/threadsafe.html 19:24
by default it will lock for you so no two threads do something in the database at once, and so it doesn't explode
so using sqlite in a race will not break, but it will only be slightly faster 19:25
it'll be able to compensate for a little bit of perl6's own overhead 19:28
chakli Thanks, I was not sure about the DBIish part of it. My bottleneck is network. was trying to parallelize it 19:29
Xliff_ <Xliff_> If I wanted to make an app that had net portion in the background, I would need a Promise and a Supply, right? 19:30
Promises and Supplys being the areas of P6 I have deliberately not yet explored.
19:31 trnh left
timotimo both are helpful for that 19:31
if you only deal with a single connection at a time, you'll be fine without supplies, too, but they make some things easier to code as well
19:36 quotable6 joined, ChanServ sets mode: +v quotable6
Xliff_ Yeah. Single connection at a time, I think. 19:38
But net code must be in the background. Asynchronous handling.
timotimo right, so you'll just start { } a task that handles the connection for you 19:41
moritz it really depends on what you want to do
if all you want is a single result asynchronously, a Promise is enough
Xliff_ k
timotimo right, with the task started off in the background you'll probably still want to communicate results/events to the main code 19:42
Xliff_ start {} returns a Promise, right?
And the best way to get data from a Promise into the main code is a Supply?
19:43 sftp left
timotimo nah, i'd do that with a channel. if it's just a single result, let the start block return it (but not with "return", just let it be the last statement) 19:43
Xliff_ Erm. Won't I need the Promise from the start block? 19:44
timotimo for many supply situations the thread that emits the value will pay the cost of handling teh results
19:44 sftp joined
timotimo well, depends on whether there's just one result value that falls out at the very end 19:44
in that case you can just have the promise carry the value
Xliff_ Well, the net code will need to be a loop.
net code will listen for connections in the background (Promise) for data transmitted from another client (Supply) 19:45
At least, that's the thinking.
timotimo have my rsi break coming up
Xliff_ OK.
Even if that method is overthinking, as long as its on the right track it will help. 19:46
Will have to read up on Channel
timotimo if you use async sockets you'll get a supply of connections from listening on a port
Xliff_ kk 19:47
timotimo you can then either "start" a task per connection or handle all connections with a single react or supply block, they'll be contending over a lock to run code inside any whenever blocks so accesses to lexicals in and around the react/supply block are safe
19:54 domidumont left 19:57 sftp left 19:58 sftp joined 20:17 R0b0t1 left 20:20 R0b0t1 joined, lizmat left 20:25 lizmat joined 20:32 chakli left, chakli joined 20:33 TEttinger joined 20:38 chakli left 20:41 chakli joined 20:42 Nanjizal left 20:46 mempko left 20:48 ChoHag joined 20:50 uberbaud joined 20:51 evalable6 left, evalable6 joined, ChanServ sets mode: +v evalable6, trnh joined 20:55 rindolf left, epony joined 21:01 uberbaud left, stmuk_ joined 21:03 stmuk left
Xliff_ will a react {} block always stay in place, or do I need to surround it with a loop? 21:07
timotimo the react block will be exited when all whenevers are done, when an unhandled exception occurs, or when "done" is called 21:09
there may be more ways to do it
Xliff_ OK, so loop necessary.
geekosaur that is not how I understood what timotimo said? 21:10
Xliff_ Because each time a message is received, we will close the socket and then listen again for another connection.
timotimo but the whenever on the listening socket should be in the react to begin with
Xliff_ Yes.
timotimo so that whenever will be left when there's some kind of I/O error on the listen socket
21:10 trnh left
timotimo i'm not sure i had that happen yet 21:10
Xliff_ But if the listen socket is closed by the client? 21:11
timotimo that's not something a client can do
Xliff_ my $socket = IO::Socket::Async.bind-udp('localhost', 3333); 21:12
react { whenever $socket.Supply -> $v { ... # DO SOMETHING! } }
timotimo oh, udp!
Xliff_ So the whenever is still in place?
timotimo well, that's another matter entirely
Xliff_ LOL
timotimo because udp doesn't have connections, so a "listen socket" isn't the same as in tcp
where a listen socket will give you new sockets that represent connections that came in from others
21:13 yoleaux joined, ChanServ sets mode: +v yoleaux
timotimo whereas with udp a "connection" doesn't exist per se and you just get all messages that are aimed at a given port 21:13
given ip *and* port
Xliff_ Yes. UDP is for handshake. TCP is for communication
timotimo but even then, that whenever will stay in place as long as you don't "last" the whenever it works with (or exit out in other ways) 21:14
b2gills dmaestro: I would try `use v6;␤unit class Shared::Extra;␤use Shared::Thing;␤also is Shared::Thing;␤…`
Xliff_ Cool!
b2gills: YES! I think he got it though. He said it was working.
b2gills I gathered that much, I was just pointing out something else that might be more to his liking 21:15
Xliff_ Ah.
b2gills m: printf "%#x\n", 111; printf "%#o\n", 111 # stackoverflow.com/q/48371827/1337 21:27
camelia 0x6f
0157
21:27 TEttinger left 21:29 Sgeo left
buggable New CPAN upload: Tie-StdHash-0.0.2.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.2.tar.gz 21:32
timotimo if at first you don't succeed, tie and tie again 21:34
lizmat hehe 21:35
geekosaur .oO { is a Hash wearing a tie a bimap? } 21:36
21:36 mempko joined 21:37 Sgeo joined 21:41 Sgeo_ joined
buggable New CPAN upload: Tie-Hash-0.0.2.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.2.tar.gz 21:42
21:43 ChoHag left 21:44 Sgeo left 21:45 yoleaux left 21:46 yoleaux joined, ChanServ sets mode: +v yoleaux, mtj_ joined 21:50 setty1 left 21:52 pecastro joined 21:54 comborico1611 joined, mtj_ left 21:55 pmurias left
comborico1611 Can someone paraphrase this for me? "The type of a variable holding a value is correlated to its value." 21:55
DrForr Seems to me to be a bit of a bass-ackwards statement. 21:56
21:56 Kaiepi left
comborico1611 This comes after, "The type of a strongly declared empty variable is the type with which it was declared." 21:57
21:57 Kaiepi joined
DrForr Is this something you're writing? It feels very circular to me. 21:58
geekosaur if you declare a variable as holding a Cool, then its type when empty is Cool; if you put an Int in it, then its type is Int.
gfldex Sounds to me as someobody tries to shoehorn abstraction into something that is acually quite real
comborico1611 Heh. It's perl6intro.com/
geekosaur basically that sounds like a terrible way of a variable can hold any type which is a subclass of its declared type 21:59
comborico1611 Section 3.5 Introspection
geekosaur *can hold a value of any type
*a terrible way of saying that
how did I mangle that so badly? maybe you were better off with the original, it at least had all the words >.>
21:59 eliasr left
gfldex or in other words: "Perl 6 containers are hard‼" 21:59
22:00 ChoHag joined, mtj_ joined
gfldex The whole section is a terrible mixup of values, typeobjects, containers and variables 22:01
DrForr Sounds like someone posing a 17th century philosopher in front of a pony, in other words putting Descartes before the horse.
gfldex but then again, containers may just be a bit to hard to fit into an intro to a language
comborico1611 I see. 22:02
DrForr Yeah, that's a bit too advanced of a concept for an intro, I think.
Easier to just explain 'my $variable" can hold variables of any type, and if you want to constrain the type, you can say 'my Type $variable' 22:03
comborico1611 Should we submit a report? 22:04
DrForr Feel free... I'm not sure who owns perl6intro. 22:05
comborico1611 Ahh. I see.
Thanks for the help, fellas! 22:06
Glad to see I'm not the only one mixed-up with that.
DrForr Not saying you shouldn't, I'm just saying I don't know who owns it.
gfldex comborico1611: PRs to the intro are very welcome 22:07
DrForr Wow. 3 hours to fail to install Angular. 22:08
Is there a new web hotness I shoud be using?
gfldex .seen hankache
yoleaux I saw hankache 14 Jan 2018 11:38Z in #perl6-dev: <hankache> sourceforge.net/p/scintilla/featur...ests/1207/
MasterDuke isn't React the new web hotness? 22:09
DrForr Well, after 4 hours or so o watching installers fail on stock Ubuntu it'll have to be whatever I can install tomorrow. 22:10
22:11 uberbaud joined 22:12 uberbaud left
comborico1611 gfldex, PR? 22:15
rightfold m: sub infix:<( ͡° ͜ʖ ͡°)> { } 22:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Too many symbols provided for categorical of type infix; needs only 1
at <tmp>:1
------> 3sub infix:<( ͡° ͜ʖ ͡°)>7⏏5 { }
22:19 yoleaux left 22:20 yoleaux joined, ChanServ sets mode: +v yoleaux
Xliff_ looks at React 22:20
Xliff_ pukes.
Dammit! Quit mixing code with presentation!!!!
That's the same mistake PHP coders make. It drives me bonkers.
22:22 squashable6 left, unicodable6 left, committable6 left, bloatable6 left, squashable6 joined, ChanServ sets mode: +v squashable6, unicodable6 joined, committable6 joined, ChanServ sets mode: +v committable6, bloatable6 joined, ChanServ sets mode: +v bloatable6
gfldex comborico1611: pull request on github 22:23
22:23 Kaiepi left 22:24 Kaiepi joined, yoleaux left 22:31 _Kaiepi joined, Kaiepi left 22:35 dj_goku joined 22:43 Ven`` joined
tadzik Xliff_: yeah, I had a similar impression 22:44
at first: "oh, web people finally figured out this whole «components are nice for GUIs» thing, sick!" 22:45
but then that :|
22:55 Nanjizal joined, sena_kun left
comborico1611 gfldex: thanks! 22:58
22:58 Ven`` left 23:00 Nanjizal left, trnh joined 23:01 natrys left
comborico1611 Xliff_: mixing code with presentation is like using too much indentation and other spacing? 23:02
23:08 _Kaiepi is now known as Kaiepi
Kaiepi some stuff is utterly maddening to write in react 23:09
like modals
23:09 greppable6 left, greppable6 joined
timotimo Kaiepi: do you know about portals? 23:10
Kaiepi they weren't around at the time i was writing this 23:12
i haven't used it since v0.13 so a lot's probably changed since then 23:14
23:21 epony left, TEttinger joined 23:22 epony joined
buggable New CPAN upload: Sys-Hostname-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 23:22
lizmat can't get the NativeCall parts to work :-( Maybe it's MacOS? PR's welcome :-) 23:24
23:27 _Kaiepi joined, Kaiepi left, _Kaiepi is now known as Kaiepi
Kaiepi lizmat: my sub gethostname(Str $name, size_t $len --> int32) is native('c') { * } ? 23:28
lizmat ok, and what do you give when you call gethostname as the first parameter ?
Kaiepi going off the manpage for gethostname, you'd pass a pointer to a string to it 23:31
23:31 epony left
lizmat perl6.online/2018/01/21/31-its-tim...-optimism/ # ashitov++ 23:31
Kaiepi my sub gethostname(Str $name is rw, size_t $len --> int32) is native('c') { * }
my $host = ''; gethostname($host, 255); say $host; 23:32
something like that 23:34
23:35 Zoffix joined
lizmat tries again 23:35
Zoffix AlexDaniel`: "why" because Hash is Iterable 23:38
m: my @a = 1, 2, 3; @a X= $%(); dd @a
camelia Array @a = [{}, {}, {}]
El_Che liz
naughty comment on the blog :) 23:39
23:39 trnh left
lizmat hehe 23:40
but it's true, or not ?
Kaiepi: moar(98990,0x7fffa29803c0) malloc: *** error for object 0x7ffe69051d78: incorrect checksum for freed object - object was probably modified after being freed.
not exactly what I expected :-(
El_Che funny he noticed that I changed the devroom title
lizmat yeah, he's quite observant :-)
23:42 trnh joined 23:45 epony joined
lizmat sleep& 23:49