Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-07-30

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 cpage_ joined #perl6
00:23 dainis joined #perl6
00:26 BenGoldberg joined #perl6
00:36 mantovani joined #perl6
00:53 MasterDuke Zoffix: reading your post now, liking so far. however, i think there might be a typo in the filters example
00:53 MasterDuke the last line of output you have as '<MahBot> Zoffix, <intuit> http://fpaste.scsys.co.uk/528741'
00:53 MasterDuke should it be 'the last line of output you have as '<MahBot> Zoffix, http://fpaste.scsys.co.uk/528741'?
00:54 MasterDuke minus the '<intuit>'
00:57 cyphase joined #perl6
01:06 cpage_ joined #perl6
01:07 FROGGS_ joined #perl6
01:11 esh joined #perl6
01:11 hwcomcn joined #perl6
01:15 _4d47 left #perl6
01:16 esh joined #perl6
01:17 mantovani joined #perl6
01:20 bob777 joined #perl6
01:22 labster joined #perl6
01:22 Zoffix Thanks. Fixed.
01:41 mantovani joined #perl6
02:01 pisa joined #perl6
02:02 molaf joined #perl6
02:17 TEttinger challenge! can #perl6 write code that will let camelia evaluate this as code, ¯\_(ツ)_/¯  , and get back some suitable response?
02:18 TEttinger you have amazing grammar capabilities, can they shrug this one out?
02:21 timotimo um, yeah? duh.
02:21 timotimo m: sub term:<¯\_(ツ)_/¯> { say "hah" }; ¯\_(ツ)_/¯
02:21 camelia rakudo-moar 22949d: OUTPUT«hah␤»
02:21 timotimo :)
02:21 geekosaur was going to paste zoffix's from some months back :)
02:22 timotimo yeah, zoffix has been doing that kind of thing for a long time
02:22 TEttinger very good
02:24 cyphase joined #perl6
02:25 timotimo "very good"? you've obviously seen nothing yet ;)
02:28 sammers ola
02:30 Zoffix That's my patented Shrug Operator
02:31 Zoffix Oh, wait never mind. It's ¯\(°_o)/¯ http://tpm2016.zoffix.com/#/14
02:31 Zoffix I was about to sue.
02:32 geekosaur 2016 May 05 00:37:02 <ZoffixWin>m: sub term:<¯\_(ツ)_/¯> { say 'hotel shrugs' }; ¯\_(ツ)_/¯
02:32 geekosaur :p
02:33 Zoffix heh
02:36 noganex_ joined #perl6
02:36 Zoffix m: sub infix:<⁣> { $^a + $^b }; say 2⁣2
02:36 camelia rakudo-moar 22949d: OUTPUT«4␤»
02:36 Zoffix TEttinger, ^ try to figure that one out :P
02:38 TEttinger is that supposed to be an invisible charactr? it renders visibly in unifont
02:38 huggable joined #perl6
02:38 TEttinger ah, 2063 invisible separator
02:39 TEttinger I had to try to figure out what there was to figure out
02:39 Zoffix :(
02:39 timotimo gnite!
02:39 TEttinger sub infix:<> { $^a + $^b }; say 22
02:39 Zoffix Yeah, it was supposed to be invisible: http://perl6.party/post/Anguish--Invisible-P​rogramming-Language-and-Invisible-Data-Theft
02:39 TEttinger m: sub infix:<> { $^a + $^b }; say 22
02:39 camelia rakudo-moar 22949d: OUTPUT«4␤»
02:39 Zoffix night, timo
02:40 TEttinger that is invisible for me
02:40 TEttinger \ufeff, the BOM
02:41 TEttinger interesting, all of your 0-width chars render as red circles for me, was that intentional, Zoffix?
02:41 geekosaur that sounds like your client (or terminal) using a substitution char
02:42 Zoffix no it's not intentional
02:42 cpage_ joined #perl6
02:42 TEttinger browser
02:42 geekosaur odd. still sounds like a substitution char
02:43 TEttinger http://i.imgur.com/Dbpqebc.png
02:43 TEttinger invisible to the human eye eh?
02:43 TEttinger invisible to a jellyfish eye, yes
02:44 TEttinger they have very nice lenses
02:47 Zoffix Yeah, I see the same thing on my windows box
02:47 Zoffix They were all invisible on the box where I actually wrote that article on :) (Ancient Ubuntu with sauce-built Englightenment desktop)
02:48 BenGoldberg Maybe a mantis shrimp could see the invisible character?  They've got the most interesting eyes of any animal discovered, iirc.
02:49 TEttinger BenGoldberg: tis true! but the reason is surprising
02:51 TEttinger they have amazing eyes, able to distinguish something like 12 individual components of a color (not sure the exact term, for humans it's 3, red green blue), but show them a green crab that's good for food and a greenish-yellow crab that's completely poisonous, makes them puke hard, and they will eat the poisonous one half the time, never "learning"
02:51 TEttinger really they learned it!
02:51 TEttinger but they can't distinguish nearby colors
02:52 TEttinger they have amazing eyes because their brains can't process more than "more green than yellow"
02:54 TEttinger there's the other weird feature that they only have that supervision in a single band of their compound eye, the rest sees black and white with low detail
02:55 TEttinger (they can move the band in all directions, even rotating it, INSIDE THEIR EYE, which is freaky to look at)
02:56 BenGoldberg Don't forget polarization :)
02:56 TEttinger it's a common feature in crustaceans though. lobsters have a similar thing, where the mechanics of the eye are extremely elegant and sophisticated to offload complexity from their miniscule brains
02:56 TEttinger (human eyes receive a vertically inverted image, the brain needs to flip it. lobsters have a mirror in the rods and cones of their eyes)
02:59 TEttinger it's absolutely amazing and it makes you think, "haha we vertebrates went the right way with big ol' brains! I'm gonna eat at red lobster tonight." then you look at octopus, squid, and cuttlefish, particularly the last ones, and they have no backbone but can still actually communicate really involved messages by changing color/patterning of thousands of individual blobs in their skin
03:00 TEttinger mimic octopus can figure out that a particular predator won't go after a starfish, so it squishes some of its arms to mimic the shape of a starfish, and moves its skin to imitate its texture
03:00 TEttinger it imitates the sillhouette of a big fish to scare away small fish when it's floating high in the water
03:01 Zoffix left #perl6
03:01 cyphase joined #perl6
03:02 BenGoldberg One day in the distant future, scientists will create electronic tattoos based on cuttlefish skin, so you can have a biological computer screen on your wrist.
03:02 BenGoldberg And we'll use perl6 to program it! :)
03:02 geekosaur nearer than you think, although they may not be basing it on cuttlefish skin
03:03 kurahaupo http://xkcd.com/928/
03:03 geekosaur they already have lab prototypes
03:08 * BenGoldberg imagines a cross between a lyrebird and a mimic octopus.
03:08 kaare__ joined #perl6
03:08 TEttinger woah haha
03:10 kurahaupo BenGoldberg: a flying octopus?
03:11 BenGoldberg A lyrebird can mimic just about any sound it hears.
03:12 TEttinger a mimic mimic
03:12 TEttinger chainsaws even
03:13 TEttinger now imagine it imitating the sound AND APPEARANCE of a chainsaw murderer
03:13 skids .oO(what, no olfactory mimic?)
03:14 BenGoldberg A mimic octopus can change it's skin coloring and texture, and can contort itself in a variety of ways to scare off predators; it makes itself look like something poisonous when threatened.
03:15 BenGoldberg Except "something poisonous" can be any of over a dozen different animals.
03:15 TEttinger it must be possible, but because olfaction is the detection of specific compounds (like vanillin smells like vanilla, and comes from the vanilla plant, but can also be extracted from beaver musk) and approximate "silhouettes" wouldn't trigger a match, it would need a lot more detail or a lot less acute of a sensor to fool
03:17 geekosaur there are olfactory mimics in nature, but yes, they rely on the thing they're trying to confuse not being too precise
03:17 kurahaupo several bird species are excellent auditory mimics
03:17 geekosaur luckily for them there's lots of things that key off a single specific scent
03:20 kurahaupo BenGoldberg: of course to be completely convincing they would have to mimic flavour too, so that they taste exactly like something else ... oh, wait ...
03:20 TEttinger if vision could be compared to an extremely poor hashing function (optical illusions are a great example of causing a "hash collision", the McCollough effect means it's like a hashing function with limited access to RAM that isn't its own), smell is like a lookup from an exact bit pattern to an exact smell, but the bit patterns are hard-coded at compile time
03:21 skids Nothing surprises me anymore since hearing about https://en.wikipedia.org/wiki/Gre​ater_honeyguide#Guiding_of_humans
03:24 TEttinger holy crap, skids, and the last thing too. they do the same thing cuckoos do.
03:24 TEttinger The chick has a membranous hook on the bill that it uses, while still blind and featherless, to kill the host's young outright or by repeated wounds.
03:25 TEttinger killer babies
03:26 skids I bet they learned it from watching us.
03:26 TEttinger heh
03:26 geekosaur cuckoos are badass. they have "mafia"s too: birds which get too adept at kicking cuckoo eggs out of their nest get mobbed
03:27 TEttinger brood parasitism I would not be surprised if dinosaurs did it
03:27 TEttinger (non-avian dinosaurs)
03:40 dalek bisectbot: 83b6e73 | (Daniel Green)++ | bisectable.pl:
03:40 dalek bisectbot: Add the good and bad commits used to the output
03:40 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/83b6e737c1
03:47 dalek bisectbot: 4a6357a | (Daniel Green)++ | Perl6IRCBotable.pm:
03:47 dalek bisectbot: Only respond if there's a ':' or ',' immediately after the bot name
03:47 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/4a6357a74b
03:49 cpage_ joined #perl6
03:50 djbkd joined #perl6
04:16 telex joined #perl6
04:33 Woodi joined #perl6
04:34 Woodi heavy morning #perl6 :)
04:45 Cabanossi joined #perl6
04:47 mcmillhj joined #perl6
04:51 djbkd joined #perl6
04:57 dainis joined #perl6
05:06 cibs joined #perl6
05:07 bisectable joined #perl6
05:08 mcmillhj joined #perl6
05:09 committable joined #perl6
05:20 mcmillhj joined #perl6
05:24 canopus joined #perl6
05:35 mcmillhj joined #perl6
05:37 Xliff Does anyone know what would happen if you try and use nqp::decont() on a type object?
05:38 moritz Xliff: iirc a decont on a non-container simply returns the non-container object
05:38 yoleaux 29 Jul 2016 23:24Z <Zoffix> moritz: I recall you being interested in a P6 IRC Client. IRC::Client should do the trick. It's poorly tested yet, but the API has been finalized: https://github.com/zoffixzne​t/perl6-IRC-Client#synopsis
05:38 Xliff moritz: Hmmm... OK.
05:39 Xliff I'm trying to use nqp::bindattr to NULL out a repr('CPointer') value in a repr('CStruct').
05:39 Xliff It doesn't seem to be working.
05:41 Xliff If I don't use nqp::decont() when setting to a type object I get "Can only store CPointer attribute in CPointer slot in CStruct" ... which I kinda expected.
05:42 Xliff But if I do, it looks like the nqp::bindattr turns into a no-op. The attribute value doesn't change.
05:42 dalek bisectbot: b19c8e2 | (Daniel Green)++ | / (2 files):
05:42 dalek bisectbot: Add a total run time limit in addition to the time limit for running each individual commit
05:42 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/b19c8e2df3
05:45 araujo_ joined #perl6
05:45 Xliff Eh. Time for bed. I will try and come up with a golf for this, tomorrow.
05:49 mcmillhj joined #perl6
05:49 mantovani joined #perl6
05:50 espadrine joined #perl6
05:50 bjz joined #perl6
05:51 bob777 joined #perl6
05:54 domidumont joined #perl6
05:59 domidumont joined #perl6
06:00 domidumont joined #perl6
06:05 AlexDaniel bisectable++
06:05 yoleaux 29 Jul 2016 23:24Z <Zoffix> AlexDaniel: IRC::Client's rewrite is done. http://perl6.party/post/IRC-Clien​t-Perl-6-Multi-Server-IRC-Module
06:07 cyphase joined #perl6
06:16 mcmillhj joined #perl6
06:19 spider-mario joined #perl6
06:22 wamba joined #perl6
06:23 ggoebel joined #perl6
06:27 wamba joined #perl6
06:38 holyghost joined #perl6
06:38 holyghost left #perl6
06:38 holyghost joined #perl6
06:38 huggable joined #perl6
06:41 CIAvash joined #perl6
06:49 mcmillhj joined #perl6
07:10 mantovani joined #perl6
07:10 mcmillhj joined #perl6
07:11 bjz_ joined #perl6
07:17 AlexDaniel ===SORRY!=== Missing serialize REPR function for REPR VMException
07:17 AlexDaniel /o\
07:26 Tonik joined #perl6
07:31 firstdayonthejob joined #perl6
07:36 freeside joined #perl6
07:42 AlexDaniel https://gist.github.com/AlexDaniel​/6933fc3292a7cce2f746dc819f0a4f85 – what am I doing wrong?
07:51 darutoko joined #perl6
08:00 FROGGS_ maybe the smartquotes in "use lib"?
08:00 mcmillhj joined #perl6
08:05 girafe joined #perl6
08:17 setty1 joined #perl6
08:28 kent\n joined #perl6
08:29 mcmillhj joined #perl6
08:39 rindolf joined #perl6
08:49 TEttinger smort quates
08:56 moritz oh hai
08:56 moritz unmatched}++
08:56 konobi what does bindpos do?
08:57 moritz in http://perl6.party/post/IRC-Clien​t-Perl-6-Multi-Server-IRC-Module the line start $cache.poll or do { self!fetch-quotes; $cache.poll }; trips me up
08:57 moritz what's the relative precedence of prefix:<start> and infix:<or>?
08:57 moritz konobi: @a[0] := $x
08:59 AlexDaniel FROGGS_: no
09:03 kurahaupo_ joined #perl6
09:06 AlexDaniel What can I try?
09:08 konobi moritz: i mean underneath... looking at a vm implementation detail
09:15 freeside joined #perl6
09:18 smls joined #perl6
09:18 kurahaupo joined #perl6
09:20 smls m: say {a=>3, b=>2, c=>1}.max(*.value)
09:20 camelia rakudo-moar 32f341: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3055␤  in block <unit> at <tmp> line 1␤␤»
09:21 smls ^^ Why does .max on a Hash throw 'Index out of range'?
09:21 smls Shouldn't it work like  .list.max  ?
09:23 smls After all,  .grep  on a Hash works like  .list.grep  (and same with .map etc.)
09:30 kurahaupo joined #perl6
09:32 konobi .tell pmurias are all the functions/methods with '$$' internal to the js nqp-runtime?
09:32 yoleaux konobi: I'll pass your message to pmurias.
09:37 nine konobi: well, bindpos really is just a (pointer) assignment with a couple of checks added
09:38 konobi hhhmmm...
09:41 nine Oh, and of course it may have to resize the array
09:44 moritz konobi: https://github.com/MoarVM/MoarVM/blob/mas​ter/src/6model/reprs/MVMArray.c#L343-L421 this is what happens, in case of a "normal" array
09:46 tadzik hmm, is there already a proxy that makes Bot::BasicBot::Pluggable modules work in IRC::Client? :)
09:47 RabidGravy joined #perl6
10:08 sammers Hi all
10:12 holyghost joined #perl6
10:14 holyghost joined #perl6
10:15 tx0h_ joined #perl6
10:15 pmqs joined #perl6
10:16 moritz hi sammers
10:16 Zoffix joined #perl6
10:16 Zoffix m: sub slow { sleep 2; say "Slow is run" }; start 0 or slow; say "non block"; sleep 3
10:16 camelia rakudo-moar 15ee3c: OUTPUT«non block␤Slow is run␤»
10:16 Zoffix moritz, ^ it seems to be the same as one() or two() for 1..10;
10:18 moritz Zoffix: I just looked at --target=ast output and came to the same conclusion
10:24 sammers hi mortiz
10:34 canopus joined #perl6
10:34 Zoffix left #perl6
10:38 huggable joined #perl6
10:40 holyghost joined #perl6
10:42 brrt joined #perl6
11:01 cognominal joined #perl6
11:08 masak greetings, #perl6
11:09 MasterDuke AlexDaniel: putting 'no precompilation' at the top of Foo2.pm6 fixed it for me
11:18 bob777 joined #perl6
11:18 darutoko joined #perl6
11:25 nine MasterDuke: AlexDaniel has quit an hour ago
11:26 MasterDuke ahh, better .tell him, thanks
11:26 MasterDuke .tell AlexDaniel putting 'no precompilation' at the top of Foo2.pm6 fixed it for me
11:26 yoleaux MasterDuke: I'll pass your message to AlexDaniel.
11:26 nine MasterDuke: IRC::Client has a try require in its mainline. Reminds me of LWP::Simple which does the same and also seems to have precompilation issues.
11:30 masak 007 has a (warm) bootup of 0.7s
11:31 masak that's... quite cool, actually
11:31 masak it doesn't feel slow
11:32 CIAvash nine: I think HTTP::UserAgent had the same issue but RabidGravy fixed it
11:33 RabidGravy yes, a while back, though I thought I sent a patch to LWP::Simple too
11:34 RabidGravy clearly I didn't :-\
11:34 tbrowder left #perl6
11:35 nine CIAvash: yes, HTTP::UserAgent does the try require at runtime in a method.
11:36 nine Oddly enough though, I fail to write a minimal testcase for this issue. But I should be lying down and get some rest anyway.
11:45 kalkin- joined #perl6
11:45 kalkin- hi
11:45 brrt hi kalkin
11:46 MasterDuke nine: that does seem to be it. putting the 'try { require ... }' in a sub fixes it
11:46 brrt ohai masak
11:47 MasterDuke Zoffix: ^^^ re precomp and IRC::Client
11:47 kalkin- Just wanted to thank for extending the documentation page "Traps to avoid". It helped me
11:50 dalek gtk-simple: 100d514 | jgrabber++ | .travis.yml:
11:50 dalek gtk-simple: Trying to fix CI builds on mac
11:50 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/100d514b25
11:50 dalek gtk-simple: f2d2599 | lizmat++ | .travis.yml:
11:50 dalek gtk-simple: Merge pull request #57 from jobegrabber/fix-travis-ci-on-mac
11:50 dalek gtk-simple:
11:50 dalek gtk-simple: Trying to fix CI builds on mac
11:50 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/f2d2599ce8
11:53 kalkin- I currently use for an object new(*%params) { my $r = self.bless(|%params); do some stuff like tap events; return $r }
11:53 kalkin- But docs on traps say something about using BUILDALL
11:54 kalkin- why does there exists a new method, if actually everything is happening in BUILDALL?
11:54 kalkin- When do i overwrite which method?
11:55 pmqs joined #perl6
11:56 sunnavy joined #perl6
11:56 lizmat kalkin-: BUILDALL is actually the workhorse for bless()
11:56 lizmat the default .new calls bless
11:56 lizmat you can create your own .new in a class, set up a hash, then call bless(|%hash)
11:57 lizmat if you don't want to use the standard build methods, you can do all the work in .new if you want
11:57 kalkin- lizmat: yes i know about bless -> BUILDALL. But what is the purpose of using new instead of using BUILD/BUILDALL
11:57 * brrt wonders how that ties into the representations issue
11:57 jnthn When you want to change the interface to construction, generally
11:57 lizmat because it gives you an opportunity to preprocess / test / change the parameters before blessing ?
11:58 jnthn Like if you wanted to expose a positional interface rather than a named args one.
11:58 kalkin- Can't i do the same with BUILDALL?
11:58 brrt eh...
11:59 lizmat you could, but the default BUILDALL is highly optimized...
11:59 jnthn I'm not sure you should do anything much with BUILDALL
11:59 lizmat TIMTOWTDI  :-)
11:59 brrt bless /creates/ the object in perl6, right?
11:59 jnthn Because my expectation is we'll start to code-gen specialized BUILDALLs at some point, but having your own custom one will force the slow path :)
11:59 jnthn brrt: Strictly, .CREATE does, but bless uses that
12:00 brrt aha
12:00 kalkin- jnthn: But traps to avoid doc page shows how to implement BUILDALL instead of using new
12:00 jnthn kalkin-: I didn't write that. :)
12:01 kalkin- In the BUILD preverents automatic attribute initialization from constructor arguments. Before reading that i achieved the same results with implementing an own new
12:01 brrt well you can do both...
12:02 brrt i guess thay BUILDALL is just downstream from new
12:03 kid51 joined #perl6
12:03 jnthn Yes, the presumption is that if you write a BUILD, you'll be taking care of initialization. I don't personally find that much of a pain, but apparently some people do and so go looking to patch up BUILDALL instead :)
12:03 brrt typically in OO we try  to add/change functionality in just the right method
12:03 kalkin- brrt: yes but what is the supposed perl6 way? I think especially now at the beginning of learning perl6 I need (and may be whole perl6 community) to establish good praxises. And currently if I think about new/BUILD/BUILDALL I'm not sure what good practise is.
12:04 brrt good practices are for mature languages
12:04 brrt imho at least
12:05 mst jnthn: is there an example comparing this to Moose somewhere for those of us coming from perl5?
12:05 brrt i'd argue for using BUILDALL because it leaves more of the regular initialization chain intact
12:05 mst every time I look at new/BUILD/BUILDALL in perl6 I end up at "I'm not sure what good practice is, because everything seems less DWIM than perl5, and are we sure this isn't misdesigned?"
12:06 kalkin- ok I will try to ask the other way round: which one is my __init__() [python] or my public MyObject() {}  [java]
12:06 brrt it may be overdesigned/overdecomposed
12:06 mst why do you need either?
12:06 kalkin- in perl6
12:07 mst in python and java having to write my own constructor is why I hate their OO
12:07 mst and go back to perl5, which is superior
12:07 mst kalkin-: seriously, __init__ in python to me is "that thing I get forced to write because I'm not using perl5/perl6" :)
12:07 brrt actually __init__ is BUILDALL
12:08 kalkin- yes
12:08 jnthn mst: No idea; if there is I haven't seen it.
12:08 brrt new is __new__
12:08 jnthn lunch; bbl
12:08 bob777 joined #perl6
12:09 kalkin- ok i just need to tap some signals and events, I currently do it in new(). Is it okay? or may be i could even get rid of new and do it differently?
12:09 kalkin- ohh and one of events is only provided after executing bless()
12:09 mst isn't there a one-line you can put in BUILD's signature that gets the default slot population
12:09 mst and then you do it in BUILD
12:09 mst overriding new() is I think basically always an error, and insane :)
12:10 kalkin- One of event sources i need to tape is only created after calling bless
12:10 masak mst: I disagree, though not strongly :)
12:10 kalkin- s/tape/tap
12:10 mst masak: 'basically always' in the same sense as implementing AUTOLOAD in perl5
12:11 masak m: say Complex.new(3, 4).abs
12:11 camelia rakudo-moar 15ee3c: OUTPUT«5␤»
12:11 masak mst: ^
12:11 mst masak: surely that's just a custom BUILDARGS
12:11 pmurias joined #perl6
12:12 mst or did perl6 desugar that as well?
12:12 kurahaupo joined #perl6
12:12 pmurias konobi: the $$foo style methods are the ones used by nqp-js internall (not called directly from Perl 6/NQP) code
12:12 yoleaux 09:32Z <konobi> pmurias: are all the functions/methods with '$$' internal to the js nqp-runtime?
12:12 kurahaupo joined #perl6
12:13 kurahaupo joined #perl6
12:13 brrt there is evidently much documentation yet to be written :-)
12:15 mst the 5to6 doc is, compared to my ideal world, missing a section :)
12:15 brrt well volunteered? :-p
12:16 skids joined #perl6
12:17 mst I doubt that'd be a good idea, given if I wrote it right now, it'd say "BUILD and BUILDALL are backwards, use perl5 and Moo(se) if you need to write a BUILD and hope 6.d makes perl6 OO usable"
12:17 mst lizmat: I don't understand how perl6 has ended up more typing than 5 :(
12:18 El_Che I try to avoid init() in go when possible. It seems to be adviced for things like logging initiation and db and the like
12:18 mst tapping supplies seems like a sensible thing to do in BUILD
12:19 mst if it didn't completely break object initialisation at the same time
12:19 kalkin- mst: but in in BUILD is the supplier not instantiated yet
12:19 kalkin- (at least in my case)
12:19 mst kalkin-: oh? why not? how are you instantiating it?
12:20 lizmat mst: personally, I'm in favour of "method new($foo) { self.CREATE!SET-SELF($foo) }; method SET-SELF($!foo) { self }
12:20 mst lizmat: hm?
12:21 kalkin- unit class Term; has $.events-supplier = Supplier.new; has $.events = self.events-supplier.Supply;  method new(*%params) { my $r = self.bless(|%params) $r.events.tap{}; return $r}
12:21 kurahaupo joined #perl6
12:21 mst right, but surely the .bless() fills out those values
12:21 mst and then calls BUILD with an object with $self.events already filled
12:22 kalkin- yes, but i can't move the tapping into BUILD, can I?
12:22 lizmat mst: aka bypass the entire BUILD/BUILDALL/named interface machinery
12:22 mst why not?
12:22 mst lizmat: oh, and do java style constructors manually? ew :)
12:22 lizmat mst: but then again, I am old-school without any Moose exposure
12:22 kalkin- mst: docs When you define your own BUILD submethod, you must take care of initializing all attributes yourself
12:23 kalkin- I don't want to do that
12:23 lizmat mst: well, or you just *don't* define anything:  class A { has $.foo }; A.new(:foo<bar>)   # done
12:23 mst hang on, BUILD kills the 'self.events-supplier.Supply' from firing as well?
12:23 mst lizmat: ok, so, kalkin-'s problem in perl5 is
12:24 mst package Term { use Moo; has supplier => (is => 'ro', required => 1), has events => (is => 'lazy', builder => sub { shift->supplier->Supply }); sub BUILD { my ($self) = @_; $self->events->tap(...) } }
12:24 mst new/BUILDALL are responsible for populating the attributes' values, and BUILD is your own initialisation logiuc, run after the standard stuff
12:25 lizmat mst: I don't know enough of Moose to grasp that  :-(
12:25 mst lizmat: what it mostly boils down to is that perl6 OO appears to've made decisions that make it more typing and less DWIM than perl5 :(
12:26 lizmat mst: well, that could be....  but that's what 6.c is  :-)
12:27 mst yep. we can always fix it for 6.d, and in the meantime, there's Inline::Perl5 to get at Moose for when perl6 doesn't work right yet
12:27 kalkin- I'm not sure if it's really a problem.
12:27 kalkin- I mean what's bad about overwriting new for this purpose?
12:27 kalkin- are there any drawbacks?
12:28 mst BUILDs are submethods so stack
12:28 mst sometimes I've needed that
12:28 brrt kalkin-: code is cheap, try it out, we won't judge
12:28 kalkin- Actually it looks to me like neatly wrapping the boring initialization stuff (like Pythons self.foo = foo :-O ) and just writing code that matters
12:28 kurahaupo joined #perl6
12:29 mst yes. which is what BUILD was supposed to be, and is in perl5
12:29 kalkin- brrt: well i have it running, it's okay
12:29 mst but oh well
12:29 mst kalkin-: yes, it doesn't seem like a problem to me
12:29 mst baaasically the confusion here is that your
12:30 brrt can't you just call nextsame in BUILDALL
12:30 mst new(*%params) { my $r = self.bless(|%params); <stuff>; return $r }
12:30 mst in perl5, is
12:30 mst sub BUILD { <stuff> }
12:31 mst I'm trying to translate the perl5 ways to perl6 and then getting stuck because perl6 is uglier and more typing, and that isn't what's happened when I translate other perl5 to perl6 ;)
12:31 kalkin- i see
12:31 kalkin- :)
12:32 mst I guess in perl6 what I want really is 'after BUILDALL'
12:33 kalkin- mst: is there something like this?
12:33 brrt maybe BUILDFINISH
12:33 mst kalkin-: I dunno, I'm now lost
12:34 kalkin- well the good thing about the whole discussion is, that i don't need to change the code, I seem to be doing it the way it supposed to be
12:34 kalkin- thanks to all :)
12:34 pmurias mst: your problem is that you want to have custom initialization in BUILD + have the default behavior of setting attributes?
12:35 mst pmurias: yeah, cos that's how M* OO works and is something that, for pretty much kalkin-'s exact case, I do all the time in reactive code
12:37 pmurias would having something like "submethod BUILD(%params) {something-with-a-good-short-name-to-t​o-build-attributes-in-the-default-way; <stuff>}" work?
12:37 pmurias mst: assuming we can come up with a good short name
12:37 Actualeyes joined #perl6
12:38 araujo joined #perl6
12:38 ufobat joined #perl6
12:38 araujo joined #perl6
12:38 mst pmurias: probably. it just ... seems odd to me.
12:39 mst I don't think I can really have a proper opinion without managing to draw up a comparison table or something
12:39 mst .. also, I forgot to take my anti-allergy meds when I woke up and I think my sinuses hate me
12:39 mst so I'm not 100% sure I'm actually making sense yet
12:39 ufobat what is the difference between await $p and $p.result()?
12:41 pmurias mst: it would work sort of like {*} in protos does
12:42 mst pmurias: https://metacpan.org/source/MSTROUT/App-Pr​ocapult-0.009001/lib/Proc/Apult/Client.pm is the pattern
12:42 mst if that helps make sense of my waffling
12:47 pmurias mst: so it would end up something like: submethod BUILD(%params) { {*}; $!stream.configure(on_read => -> *@args {self.handle_read(|@args)}, on_closed => -> *$args {self.handle_closed(|@args)})}
12:47 mst yeah
12:47 mst I think basically the difference stems from the fact that perl6 sees it as 'each BUILD is responsible for that class/role's attributes'
12:47 mst whereas in M* the default new() stuff handles all the attribute init, and BUILD is just for additional custom construction
12:48 mst and if you want to handle initialisation of an attribute yourself you set 'init_arg => undef'
12:48 mst which seems like better huffmaning to me, but it's totally possible that's just because it's what I'm used to
12:51 brrt you want an AFTERBUILD, is how i see it
12:51 mst yes, pretty much spot on
12:52 psch am i misunderstanding that this is mostly about "listing all the Attributes in the BUILD signature is too much to type"?
12:52 mst also that, unless I'm completely confused, 'has $.foo = <default>' doesn't fire the <default> this way?
12:52 psch ah, i must've missed that
12:52 psch yeah, it doesn't afaik
12:53 mst right, so adding a BUILD means I (a) have to repeat my attribute names (b) have to move my default code
12:53 brrt okay..  i d
12:53 mst which, when you're used to M*, is ... weird
12:53 psch yeah, i can see that being annoying
12:53 mst and, yeah, basically an AFTERBUILD would do what I'm used to M* BUILD doing and make it all go away
12:54 brrt i see your point and i think you are correct
12:54 brrt i have no idea how much wiggleroom we now have in implementing it
12:55 mst I would, naively, have expected BUILD to do the simple thing by default
12:55 mst and to need to explicitly ask for 'having to write my own slot population code'
12:55 mst since that seems like the less common requirement
12:55 mst I guess if I mentally think of BUILD as POPULATE
12:55 mst then AFTERBUILD being AFTERPOPULATE is completely sane
12:56 mst and possibly a better name for the thing I want than BUILD would've been anyway
12:56 brrt part of the issue may be that BUILD is a submethod, hence overriding it is destructive
12:57 mst if we had before/after/around, I'd be completely happy with 'after submethod BUILD'
12:58 brrt hmmmm
12:59 brrt interesting idea
13:00 mst I mean, it's notable that, in M* *roles*, idiomatic is to write
13:00 mst sub BUILD {}; after BUILD => sub { ... };
13:00 mst so 'after BUILD' is already an idiom M* people should be familiar with
13:01 brrt i'm inclined to think that 'after' could be implemented with some metahackery or as a trait
13:02 mst I really don't mind it being different, I'm just coming from the principle of "a common case in perl5 OO should not be harder or more typing in perl6, because wtf"
13:02 psch the problem with an 'after' trait as i see it is that you don't really want to declare BUILD, because you want the default behavior
13:03 psch so there's not really a spot to trait it
13:03 brrt that seems a binding issue to me?
13:04 psch i'm not sure what that means
13:05 psch maybe i'm also wrongly assuming BUILD itself is what should be traited, and a trait on the class is the better idea
13:06 brrt what i mean is that if you'd have: class Foo { method foo() is after BUILD {...} }
13:07 brrt and that BUILD should conceptually exist
13:08 mst I think my problem is that ... ok, let's avoid the word BUILD for a second
13:08 mst there's two things here, POPULATE, i.e. 'set the attributes up', and POSTPOPULATE, i.e. 'do other tweakage'
13:08 brrt okay :-)
13:08 brrt aye
13:08 brrt TWEAK :-P
13:09 mst in perl5/M*, POPULATE is inlined into new(), effectively
13:09 mst except you can opt-out on a per-attribute basis with 'init_arg => "undef"'
13:09 brrt submethod? method?
13:09 brrt aye... perl6 hav
13:09 mst we don't have submethods, except we sort of emulate them, let's handwave that bit for the moment please
13:10 mst and so M* BUILD is POSTPOPULATE, but can be used for population of an init_arg undef attribute in the (rare IME) case you want that
13:10 mst whereas in perl6, BUILD is POPULATE, and so if you only want it for POSTPOPULATE, you need to duplicate the population logic
13:11 mst so that, to me, makes a lot more sense of the differences
13:11 brrt or override new
13:11 * brrt nods
13:11 mst yeah
13:12 brrt so i think that postpopulate is a valid hook
13:12 mst note that overriding new() is basically nonviable in M*, but we have BUILDARGS that handles 'convert the arguments to new() into a hash of values for attributes'
13:12 mst so that turns out to to be a problem for us in practice
13:13 mst *to not be
13:13 mst brrt: right, and overriding new by calling bless() like kalkin- did complicates life if you try and do it more than once
13:14 mst I think *something* submethod like for this (i.e. that composes like BUILD submethods do) would be well worthwhile
13:14 brrt i'm not sure if we have something like BUILDARGS and I'm not sure we should either
13:14 brrt agreed and i see why kalkin- asked
13:15 mst BUILDARGS is really just a signature mangler
13:15 itaipu joined #perl6
13:15 mst so ... presumably you can do something like
13:15 mst method new ($foo) { call-original-new(:foo($foo)) }
13:16 mst (not sure what call-original-new is called here)
13:16 mst and that's equivalent to perl5
13:16 brrt not sure either...
13:16 mst sub BUILDARGS ($class, $foo) { return +{ foo => $foo } }
13:16 mst assuming that's there, I don't think perl6 needs BUILDARGS
13:18 brrt i think calk-original-new is self.bless...
13:18 Zoffix joined #perl6
13:18 Zoffix m: class Foo { has $.foo; method new ($foo) { nextwith :$foo } }.new(42).foo.say
13:18 camelia rakudo-moar 15ee3c: OUTPUT«42␤»
13:19 mst there we go
13:19 brrt Zoffix++
13:19 mst brrt: except that wouldn't then honour similar stuff in the next new() along
13:19 brrt true... ehm... hmmm
13:19 mst but, basically, it seems strange to me that just defining a submethod BUILD suddenly opts -all- my attributes out of auto-construction
13:20 mst I definitely, in terms of how often I need that, like the M* approach of being able to opt -one- of them out but not others
13:20 mst (which, I guess in perl6 you'd have to do that by reimplemting the standard BUILD logic for everything but that one, which ... ew?)
13:21 brrt yeah i see
13:21 psch i suppose we could check the custom BUILD's signature and only opt out for params given there
13:21 psch that looks like the easiest solution from here
13:21 psch although it clearly still has drawbacks
13:21 mst I feel like what I 'really' want is some sort of magic slurpy
13:22 mst submethod BUILD (*%magic) {
13:22 mst and that causes everything to get populated normally
13:22 brrt hmmm. i think the problem with that is that it completely changes the meaning of BUILD
13:22 mst and then I opt out by having
13:22 mst submethod BUILD ($:optout, *%magic) {
13:22 mst well, I don't think it does, you're effectively saying 'assinging to $magic{foo} attempts to assign $.foo' ?
13:23 ufobat i dont understand the error here, could anyone give me some kind of advice https://gist.github.com/ufobat/5​883b338aecb4ebf37b359bb759d6671
13:24 kid51 joined #perl6
13:25 brrt m: class A { has $.foo = 3; has $.bar; submethod BUILD(*%args) { nextwith
13:25 camelia rakudo-moar 15ee3c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3.bar; submethod BUILD(*%args) { nextwith7⏏5<EOL>␤    expecting any of:␤        statement end␤        statement modifier␤        statement modifier loop␤»
13:26 brrt damnit samsung keyboard
13:27 moritz ufobat: are any of those lines in the backtrace part of snipped you pasted?
13:27 moritz ufobat: also, calling Supply.tap without an argument looks suspicious to me
13:29 ufobat moritz, line 223 of HTTP::Server::Smack is the $promise.result
13:31 moritz ufobat: huh, that line appears twice in the stacktrace... is there any recursion going on, possibly through the coercions from that line?
13:33 ufobat moritz, no, one is from the $promise.cause.say the other is from the $promise.cause.backtrace.full.Str
13:33 ufobat or that is what i was thinking
13:34 moritz ufobat: ah, right. So the error isn't from the piece of code you've shown us, that's just where the error is printed out
13:34 ufobat yeah it is
13:34 ufobat right, i have no idea what is going wrong :(
13:34 moritz you call .say($str) on a Supplier
13:35 moritz the $obj.say($thing) form only works for file handles or similar IO objects
13:36 ufobat and where am i doing that? how do i find out?
13:37 moritz git grep -F '.say'
13:38 moritz I fear rakudo still swallows backtraces when catching exceptions inside start { } blocks :(
13:38 ufobat *ggg*
13:38 ufobat thanks :-)
13:39 moritz or if you know where the promise comes from, add a try { ... } and a backtrace printing yourself inside that start block
13:39 moritz you're welcome :-)
13:39 ufobat i think i am able of finding the problem now :-)
13:39 ufobat but first.. bbq :D
13:41 moritz that's later today for me :-)
13:42 brrt it still rains here...
13:43 Zoffix left #perl6
13:43 rindolf joined #perl6
13:50 moritz I'm starting to hate likes/hearts on twitter
13:51 moritz I keep thinking "you liked it, but not enough to retweet? thank you!" with no small amount of sarcasm in my mental voice
13:52 mst my client doesn't show me likes
13:52 mst I continue to appreciate this fact
13:52 cognominal 'with' statement and 'with' statement modifier have an altogether different meaning. This is weird. Also 'with' statement modifier is absent from docs.perl6.org. Not sure if it fits in an existing category
13:54 cognominal moritz: often I use like for things that contain a link to somthing I want to read more fully
13:57 CIAvash cognominal: https://docs.perl6.org/synt​ax/with%20orwith%20without
13:59 cognominal CIAvash, this is not the 'with' statemenr modifier
13:59 cognominal on the other hand I missed the fact, the the "with" statemenr setted $_
13:59 CIAvash cognominal: It is mentioned at the end
14:01 cognominal CIAvash, oops my bad. But is does not fit the stated "control flow" category
14:03 moritz m: .say given Any
14:03 camelia rakudo-moar 15ee3c: OUTPUT«(Any)␤»
14:03 moritz m: .say when Any
14:03 camelia rakudo-moar 15ee3c: OUTPUT«(Any)␤»
14:04 moritz when Any { .say }
14:04 moritz m: when Any { .say }
14:04 camelia rakudo-moar 15ee3c: OUTPUT«(Any)␤»
14:04 moritz m: given 42 { .say when Str }
14:04 camelia rakudo-moar 15ee3c: ( no output )
14:04 moritz it does look like control flow to me
14:06 cognominal moritz, yes, I was thouroughly confused
14:08 lichtkind joined #perl6
14:09 dainis joined #perl6
14:13 brrt i continue to be blissfully offline for social media
14:16 kurahaupo brrt: does irc count as "social"?
14:16 brrt well its social
14:17 brrt but not social media expert social
14:17 brrt not twitter or facebook, i guess :-)
14:17 cognominal When I say so much insanity, it means I badly need to get out for a walk
14:19 brrt that is a good idea :-)
14:19 * brrt afk too
14:30 kaare__ joined #perl6
14:33 skids joined #perl6
14:40 pmurias joined #perl6
14:43 sena_kun joined #perl6
14:50 NEveD joined #perl6
14:54 djbkd joined #perl6
14:55 ufobat joined #perl6
14:56 dalek doc/non-breaking-space: 6a97e5a | Altai-man++ | doc/ (79 files):
14:56 dalek doc/non-breaking-space: Now all entries of `Perl 6|5` are written with non-breaking space
14:56 dalek doc/non-breaking-space: review: https://github.com/perl6/doc/commit/6a97e5ae2d
14:57 TimToady now if we could just teach our editors to autocorrect that...
14:58 mst or we could just use Perl6 and Perl5 like the perl5 community mostly does :)
15:00 sena_kun Oops.
15:02 khw joined #perl6
15:05 wamba joined #perl6
15:09 dalek doc/non-breaking-space: a8747c5 | Altai-man++ | doc/ (7 files):
15:09 dalek doc/non-breaking-space: Links with `Perl6`, not `Perl 6`, obviously, were fixed
15:09 dalek doc/non-breaking-space: review: https://github.com/perl6/doc/commit/a8747c55c3
15:13 ldwrf joined #perl6
15:15 kaare__ joined #perl6
15:17 travis-ci joined #perl6
15:17 travis-ci Doc build passed. Altai-man 'Now all entries of `Perl 6|5` are written with non-breaking space'
15:17 travis-ci https://travis-ci.org/perl6/doc/builds/148541397 https://github.com/perl6/doc/commit/6a97e5ae2ddf
15:17 travis-ci left #perl6
15:20 sena_kun About the editor thing... For example, emacs has predictive mode and clones, I think, vim has such tools too. And on linux, checking/fixing it automatically with grep/sed is very simple.
15:23 Tonik joined #perl6
15:28 espadrine joined #perl6
15:38 nine mst: but then you wouldn't see the difference between the Perl 6 and Perl5 communities! Oh...wait a second...
15:38 mst nine: NEIN NEIN (pun urgency)
15:56 pmurias joined #perl6
15:56 bob777 joined #perl6
16:05 cosarara left #perl6
16:09 skids joined #perl6
16:15 AndyBotwin joined #perl6
16:50 holyghost joined #perl6
16:52 AlexDaniel joined #perl6
17:07 Khisanth joined #perl6
17:08 AlexDaniel thanks ↓
17:08 yoleaux 11:26Z <MasterDuke> AlexDaniel: putting 'no precompilation' at the top of Foo2.pm6 fixed it for me
17:08 mohae joined #perl6
17:09 AlexDaniel MasterDuke: and thank you for actually fixing it :)
17:12 NEveD joined #perl6
17:23 ldwrf joined #perl6
17:25 ldwrf_ joined #perl6
17:30 firstdayonthejob joined #perl6
17:39 yqt joined #perl6
17:46 sena_kun Can PR for non-breakable 'Perl 6' be merged? cast AlexDaniel, https://github.com/perl6/doc/pull/780
17:48 AlexDaniel ± 1018 :D
17:50 sena_kun It seems I make only good for nothing contributions these days.
17:50 AlexDaniel sena_kun: “This project is a suite of Perl cross-compilers, including Perl 5-to-6 translation“
17:51 AlexDaniel not sure if it should have a non-breaking space there, hm…
17:51 sena_kun Oh no, somebody actually tried to read the result. Time to run!
17:52 sena_kun AlexDaniel, the problem is: test fails if you replace it with normal space.
17:52 AlexDaniel :D
17:53 sena_kun Tests exactly checks the word 'Perl', space and any digit after it. It will fail in this place with normal space character.
17:54 sena_kun s/Tests/Test
17:56 AlexDaniel “Where is a list of differences between Perl 5 and 6?”
17:57 AlexDaniel again, not sure if we should have a nbsp here
17:58 AlexDaniel sena_kun: what's going to happen with this link? https://github.com/perl6/doc/pull/780/file​s#diff-3cee04317a0ec3e5d9495b0f923b354fL24
17:58 AlexDaniel sena_kun: and is everything alright here? https://github.com/perl6/doc/pull/780/file​s#diff-5c218739c39557454db3d5fe30f40520L11
17:59 sena_kun AlexDaniel, maybe we should correct the test itself a bit? For example, not 'Perl $digit', but only 'Perl 6' occurences? But `Perl 5` seems needed too.
17:59 jgrabber joined #perl6
17:59 AlexDaniel sena_kun: Perl \d is OK, no problem with that
18:00 sena_kun Okay then.
18:00 AlexDaniel sena_kun: another link: https://github.com/perl6/doc/pull/780/files​#diff-2c3170192542bebdd8141f8eb6b58ff9L399
18:01 sena_kun AlexDaniel, 1.The link is changed only in name part, so I think, it's okay, if Pod parser is okay with that. I'll build docs now and check it.
18:01 Faa_ joined #perl6
18:02 sena_kun About '??' symbol... Hmm, it's strange, since in the emacs I see a non-breaking space.
18:03 sena_kun And `git diff` sees a non-breaking space also.
18:03 trnh joined #perl6
18:04 sena_kun I'll check ipc.pod6 better now.
18:05 AlexDaniel sena_kun: another file with ?? is doc/Language/tables.pod6
18:05 AlexDaniel sena_kun: and doc/Programs/00-running.pod6
18:06 AlexDaniel may be some encoding issue
18:06 sena_kun Yes, I see 20 occurences using search.
18:06 AlexDaniel yeah
18:07 AlexDaniel sena_kun: OK, here is a broken example: https://github.com/perl6/doc/pull/780/files​#diff-5ea33ed4c36cc3533068127d13fa490fL1169
18:07 AlexDaniel sena_kun: and one more example right below it
18:08 sena_kun m: say "Perl 6".ords; # 80 101 114 108 32 54
18:08 camelia rakudo-moar 15ee3c: OUTPUT«(80 101 114 108 32 54)␤»
18:08 sena_kun Ah, my bad.
18:09 AlexDaniel m: say "Perl 6".ords;              # 80 101 114 108 32 54
18:09 camelia rakudo-moar 15ee3c: OUTPUT«(80 101 114 108 32 54)␤»
18:09 AlexDaniel m: say "Perl 6".ords;              # 80 101 114 108 32 54
18:09 camelia rakudo-moar 15ee3c: OUTPUT«(80 101 114 108 160 54)␤»
18:09 sena_kun Yes, it needs reverting.
18:10 sena_kun But I'm not sure I can fix '??' issue, since `grep -r "Perl??" doc` gives me nothing.
18:10 AlexDaniel sena_kun: well, just change the comment?
18:10 sena_kun And next example.
18:10 AlexDaniel yes
18:12 sena_kun Just started local build: all '??' characters seem as normal non-breaking space. But it gives us nothing, since it can be only my result, not the others.
18:14 cdg joined #perl6
18:14 AlexDaniel sena_kun: yea I'm find the difference
18:15 dainis joined #perl6
18:16 sena_kun Links work as usual locally.
18:17 AlexDaniel okay
18:22 dalek doc/non-breaking-space: ac13c67 | Altai-man++ | doc/Type/Cool.pod6:
18:22 dalek doc/non-breaking-space: Examples were fixed
18:22 dalek doc/non-breaking-space: review: https://github.com/perl6/doc/commit/ac13c6794d
18:26 zergey joined #perl6
18:27 AlexDaniel sena_kun: I think that we can ignore ?? thing
18:27 AlexDaniel sena_kun: it seems like github thinks that the files are not in UTF8 or something
18:28 AlexDaniel maybe it recognizes them as pod5 files or something, I don't know
18:28 sena_kun AlexDaniel, can you test it locally?
18:29 AlexDaniel sena_kun: I opened it with an editor and see no differences between files
18:30 AlexDaniel I mean, these are just regular files with regular non-breaking spaces in them, no problems whatsoever
18:31 sena_kun `file -i doc/Language/ipc.pod6` gives me `doc/Language/ipc.pod6: text/plain; charset=utf-8`.
18:33 gfldex we could add use v6.c; in all *.pod6 to make clear what we mean
18:33 sena_kun AlexDaniel, see https://raw.githubusercontent.com/pe​rl6/doc/ac13c6794d6c434ec85507ffa1bd​280ee3086293/doc/Language/ipc.pod6
18:33 sena_kun It seems the only place where you can see 'Perl??' thing is github diff.
18:33 AlexDaniel sena_kun: I am pretty sure that it is just github trying to be smart
18:35 pmurias_ joined #perl6
18:35 timotimo thankfully
18:35 AlexDaniel gfldex: but we already use .pod6 extension!
18:36 dalek doc: 6a97e5a | Altai-man++ | doc/ (79 files):
18:36 dalek doc: Now all entries of `Perl 6|5` are written with non-breaking space
18:36 dalek doc: review: https://github.com/perl6/doc/commit/6a97e5ae2d
18:36 dalek doc: a8747c5 | Altai-man++ | doc/ (7 files):
18:36 dalek doc: Links with `Perl6`, not `Perl 6`, obviously, were fixed
18:36 dalek doc: review: https://github.com/perl6/doc/commit/a8747c55c3
18:36 dalek doc: ac13c67 | Altai-man++ | doc/Type/Cool.pod6:
18:36 dalek doc: Examples were fixed
18:36 dalek doc: review: https://github.com/perl6/doc/commit/ac13c6794d
18:36 dalek doc: d82e667 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/ (78 files):
18:36 dalek doc: Merge pull request #780 from perl6/non-breaking-space
18:36 dalek doc:
18:36 dalek doc: Now all entries of `Perl 6|5` are written with non-breaking space
18:36 dalek doc: review: https://github.com/perl6/doc/commit/d82e667baa
18:36 AlexDaniel sena_kun: ;)
18:36 timotimo yay
18:36 sena_kun AlexDaniel, thanks a lot for the review!
18:37 AlexDaniel I am sure that everything is alright, but if I missed anything we can fix it later. No reason to merge I think :)
18:37 gfldex AlexDaniel: file names and extensions don't survive pipes. There is good reasion why *nix got the magic file and what happens in its absense can be observed on windows.
18:37 AlexDaniel gfldex: right
18:39 gfldex AlexDaniel: it's not just pipes ofc. If you look on he we deal with it when we use modules, you will see that the compunit that hold MAIN will pretty much all the time slurps before stuff is handed over to a module.
18:40 jgrabber Hello! When trying to load a library (.dll) for NativeCall directly from a module's resource folder I get the error 'Cannot locate native library '..rakudo\share\perl6\site\resources\...dll': error 0x7e' . Copying the dll to a temporary folder enables me to load the copy. Is this behaviour expected?
18:41 AlexDaniel no reason not to merge*, hehe
18:41 gfldex m: my role MIME::Perl6 {}; my IO::File $f does MIME::Perl6; say "pleased" if $f ~~ MIME::Perl6;
18:41 camelia rakudo-moar 15ee3c: OUTPUT«pleased␤»
18:45 Xliff FROGGS_, you around?
18:47 AlexDani` joined #perl6
18:49 aries_liuxueyang joined #perl6
18:54 dalek doc: fff3317 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/faq.pod6:
18:54 dalek doc: “Perl 5 and 6” → “Perl 5 and Perl 6”
18:54 dalek doc:
18:54 dalek doc: I think that it is technically more correct, and it also does not look so
18:54 dalek doc: strange with non-breaking space.
18:54 dalek doc: review: https://github.com/perl6/doc/commit/fff3317a09
18:55 cooper joined #perl6
18:55 AlexDani` joined #perl6
18:57 AlexDaniel sena_kun: I think we'll just leave “Perl 5-to-6 translation” as is with nbsp… It doesn't really matter I think
18:58 AlexDaniel in fact, maybe it is right
19:00 sena_kun AlexDaniel, if we want our tests to pass, then sure. And I don't think it matters *too much*, yes.
19:01 AlexDaniel sena_kun: we can always modify our test to check if it is not “Perl 5-to-6”, heh…
19:02 sena_kun AlexDaniel, ...and a bunch of other similar phrases, yes. (: Anyway, issue is closed.
19:14 kalkin- How can i check if a given method implements some specific trait?
19:14 kalkin- Especially I want to get a list of all mandatory fields from the META6.new() object
19:15 lizmat kalkin-: there's no mechanism that keeps track of which traits a method has
19:16 lizmat a trait is nothing other than a sub that gets called at compile time on the method object
19:16 THEmrrob joined #perl6
19:16 lizmat it is free to do whatever it wants
19:16 kalkin- That's a pitty
19:17 lizmat for example: the implementation of is-hidden-from-backtrace:
19:17 lizmat multi sub trait_mod:<is>(Routine:D $r, :$hidden-from-backtrace!) {
19:17 lizmat $r.^mixin( role { method is-hidden-from-backtrace { True } } );
19:17 lizmat }
19:17 lizmat so, if you want to check if a method has this trait, you'd do:
19:18 lizmat $method.?is-hidden-from-backtrace
19:20 lizmat m: sub a() is hidden-from-backtrace { }; say &a.?is-hidden-from-backtrace   # example
19:20 camelia rakudo-moar 15ee3c: OUTPUT«True␤»
19:20 grondilu joined #perl6
19:24 kalkin- lizmat: Aehm i still kind of confused how i would apply what you explained to https://github.com/jonathanstowe​/META6/blob/master/lib/META6.pm How do I adress a trait which is inside a class
19:24 kalkin- from the outside of the class
19:25 FROGGS_ Xliff: I am
19:26 lizmat kalkin-: from what I can see, the class doesn't allow that
19:27 lizmat unless the MetaAttribute::Specification role would be exported
19:27 rindolf joined #perl6
19:27 lizmat or you would use the MOP to get at it, and then smartmatch on that
19:27 TEttinger joined #perl6
19:27 lizmat perhaps RabidGravy can tell you more about it  :-)
19:28 kalkin- lizmat: thank you i will experiment some more with that
19:33 Xliff FROGGS_,  I am running into serious issues with 07dtd. Do you mind me submitting the PR as is and you taking a look at it to help me figure out what is wrong?
19:34 Xliff Some seriously weird issues, too. I have checked in my copy of it. Would you mind checkout my fork, 07dtd branch, and taking a look at the later tests?
19:35 NEveD joined #perl6
19:35 FROGGS_ sure
19:35 Xliff In addition, I know there is a style you have adopted for classes and such. Would really appreciate your criticism on the later changes I have made to get 07dtd to the point where it fails the last 11 out of 52 tesyts.
19:35 Xliff s/tesyts/tests/
19:36 Xliff OK. I will submit the PR, then and we can whack this thing back into shape!! =D
19:38 FROGGS_ :o)
19:40 Xliff https://github.com/FROGGS/p6-XML-LibXML/pull/5
19:41 Xliff I will be in and out during the day. I think the best bet would be to comment on the PR. Feel free to ping me here, as well.
19:41 Xliff Thanks, FROGGS_!
19:41 RabidGravy joined #perl6
19:41 FROGGS_ k
19:46 BenGoldberg joined #perl6
19:54 yqt joined #perl6
19:57 s34n_ joined #perl6
19:58 s34n_ I'm reading a snippet from http://blogs.perl.org/users/zoffix_zn​et/2016/04/extra-typical-perl-6.html that I don't understand..
19:59 ldwrf joined #perl6
19:59 s34n_ Under the heading "But... But... But..." there is a snippet that does: my $copy = $original but Better;
20:00 lizmat that mixes in the role or an Enum
20:00 lizmat by the name of "Better"
20:00 s34n_ oops. I just read the next line, which I missed before. nm
20:00 lizmat :-)
20:02 s34n_ how about my $original = (Foo but Better).new: :attr<original>;     ?
20:02 s34n_ so I don't have to create an object and a copy...
20:03 masak Xliff: one general comment: some `while` loops and `if` statements have parentheses that aren't needed
20:03 s34n_ my $original = Foo.new: :attr<original> but Better;     <--?
20:04 masak Xliff: and some of the conditions are tortuous
20:05 masak like `! +$frag.getNodePtr == +$ref.getNodePtr` -- could be written simply as `$frag.getNodePtr != $ref.getNodePtr`
20:09 tbrowder joined #perl6
20:14 s34n_ what's the perl6 equivalent of AUTOLOAD?
20:14 FROGGS_ method FALLBACK
20:16 Xliff masak: LOL! You are absolutely correct. That was me being flustered.
20:16 Xliff And you have to remember, I learned C first before even Perl5.
20:16 Xliff C-isms are buried in my DNA and are hard to unlearn.
20:17 Xliff Although I don't know what I was drinking when I wrote `! +$frag.getNodePtr == +$ref.getNodePtr`
20:17 Xliff Probably Gin.
20:17 FROGGS_ *g*
20:19 Xliff Also, Sublime Text Edit likes "helping" me. Most times I hit tab after a "while" it inserts the parens automatically.
20:20 Xliff I would try and fix that, but I haven't had the time to learn how to adjust Sublime's plugin structure.
20:20 FROGGS_ I guess that's why I love SciTe
20:20 s34n_ why is it so hard to google documentation on FALLBACK?
20:20 Xliff (suuure.... blame your tools, EEDIOT!)
20:20 FROGGS_ hehe
20:20 * Xliff fits himself for the special dunce cap.
20:21 kalkin- if i have an class field name as string $f how do i set $my-inst."$f" = "foo";?
20:21 kalkin- i know that i can call the the getter with $my-inst."$f"(), but how to call the setter?
20:21 FROGGS_ s34n_: https://github.com/perl6/roast/blob/ab74762da156fa​6fda5dd39281f7ffcc361d5a88/S12-methods/fallback.t
20:21 Zoffix joined #perl6
20:21 timotimo kalkin-: the getter is the setter
20:22 Zoffix kaare__, same way. It returns a writable thing
20:22 FROGGS_ aye, try:  $my-inst."$f"() = "foo"
20:22 Zoffix *kalkin-
20:22 kalkin- ohh, that's not obvious.
20:22 Zoffix s34n_, I don't see it at all. Keep in mind the docs are still work in progress. Perl 6 is pretty new
20:22 dj_goku Zoffix: great article at your updates to irc::client.
20:23 Zoffix Thanks.
20:23 Zoffix s34n_, that's all I see: https://design.perl6.org/S12.html#FALLBACK_methods
20:23 kalkin- thanks friends it works!
20:24 Zoffix m: class Foo { method FALLBACK ($name, |args) { say "You called $name with {args.perl}" } }.new.blah: 'blah', :blah
20:24 camelia rakudo-moar 15ee3c: OUTPUT«You called blah with \("blah", :blah)␤»
20:26 konobi .tell pmurias getting a bunch of woes with CodeRef and $call vs $apply... =0/
20:26 yoleaux konobi: I'll pass your message to pmurias.
20:31 xinming joined #perl6
20:35 cyphase joined #perl6
20:43 cdg joined #perl6
20:46 labster joined #perl6
20:47 Zoffix left #perl6
20:49 pmurias_ konobi: woes?
20:52 pmurias konobi: is that causing problems or just confussion?
20:52 yoleaux 20:26Z <konobi> pmurias: getting a bunch of woes with CodeRef and $call vs $apply... =0/
20:53 pmurias konobi: codeRef.$$apply(args) should do the same as codeRef.$$call.apply(codeRef, args)
20:54 tbrowder possible pop use of p6: programming interface for the Lego Ev3 robot. current pop prog interface is python. see http://www.ev3.org for more info
20:56 tbrowder folks here with children in school may be already aware of the Lego  robot influence in academia
20:58 dalek doc: 7b9e2ea | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
20:58 dalek doc: add FALLBACK to index
20:58 dalek doc: review: https://github.com/perl6/doc/commit/7b9e2eae42
20:58 * pmurias as kid (who had a LEGO robot) always felt they were an excuse for old engineers to play with LEGOs
20:59 skids joined #perl6
21:01 tbrowder pmurias: you may be on to something!
21:02 grondilu_ joined #perl6
21:03 kalkin- how can i get all the subroutines existing in the current script?
21:03 moritz kalkin-: you can't. Subroutines can exists in inner scopes, and you can't get those
21:04 moritz being lexical and all that
21:04 pmurias kalkin-: why would you want to do that?
21:04 moritz you can however inspect &MY:: for routines declared in the current scope
21:04 kalkin- I want to call it from inside the USAGE() to manipulate the output
21:04 moritz and &OUT::MY
21:04 moritz m: sub f() { }; say &MY::.keys
21:04 camelia rakudo-moar 1035ed: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    MY used at line 1␤␤»
21:04 moritz m: sub f() { }; say MY::.keys
21:04 camelia rakudo-moar 1035ed: OUTPUT«($=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ $=finish &f $/ $?PACKAGE)␤»
21:05 moritz m: sub f() { }; say MY::.keys.grep(Callable)
21:05 camelia rakudo-moar 1035ed: OUTPUT«()␤»
21:05 moritz m: sub f() { }; say MY::.grep({.value ~~ Callable})>>.key
21:05 camelia rakudo-moar 1035ed: OUTPUT«(&f)␤»
21:06 kalkin- Thanks!
21:16 dalek doc: 2b7bed6 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
21:16 dalek doc: doc FALLBACK
21:16 dalek doc: review: https://github.com/perl6/doc/commit/2b7bed664a
21:18 ldwrf joined #perl6
21:23 dalek doc: 0eb5e69 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod6:
21:23 dalek doc: doc subsignatures
21:23 dalek doc: review: https://github.com/perl6/doc/commit/0eb5e699ca
21:23 ldwrf_ joined #perl6
21:23 nightfrog joined #perl6
21:28 nightfro` joined #perl6
21:39 ribasushi joined #perl6
21:40 dalek doc: 9f1fe4f | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
21:40 dalek doc: link to subsignatures
21:40 dalek doc: review: https://github.com/perl6/doc/commit/9f1fe4f3dd
21:41 gfldex Sisyphus told me how to finish the docs. :->
21:46 gfldex m: say ⸨1,(2,)⸩;
21:46 camelia rakudo-moar 1035ed: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 3say7⏏5 ⸨1,(2,)⸩;␤Bogus postfix␤at <tmp>:1␤------> 3say 7⏏5⸨1,(2,)⸩;␤    expecting any of:␤        infix␤        infix stopper␤        pos…»
21:48 konobi pmurias: yeah, i seems like it might be caught in some sort of bootstrap loop
21:54 dainis joined #perl6
21:54 konobi pmurias: https://github.com/konobi/nqp/tree/konobi-tidy
22:06 dalek doc: 8edb16d | (Wenzel P. P. Peppmeyer)++ | doc/Language/packages.pod6:
22:06 dalek doc: add pseudo packages to index
22:06 dalek doc: review: https://github.com/perl6/doc/commit/8edb16dd3f
22:08 setty1 joined #perl6
22:08 masak m: class A::B {}; class C { has A::B $.ab .= new }
22:08 camelia rakudo-moar dd0fe7: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol A::B␤»
22:08 masak https://rt.perl.org/Ticket/Display.html?id=126975
22:19 bpmedley joined #perl6
22:36 canopus joined #perl6
22:38 huggable joined #perl6
22:50 socomm joined #perl6
22:50 socomm Is Larry Wall here?
22:52 masak he's been known to appear in various guises, yes
22:52 masak would you like to relay a message?
22:52 socomm Live long and prosper. \/
22:53 masak consider it relayed
22:54 masak ...and come back soon
22:55 gfldex i just found use for: sub infix:<|,>(@l, @r){ |@l, |@r}
22:55 gfldex in: my @exclude = <. ..>|, $exclude.split(',');
22:56 gfldex (i don't like flat)
23:09 konobi .tell pmurias yeah, there seems to be some mismatch between the code-ref.js and the Operations.nqp
23:09 yoleaux konobi: I'll pass your message to pmurias.
23:11 masak gfldex: that looks to me like it should be a chaining operator
23:17 * BenGoldberg thinks it looks like linenoise.
23:18 BenGoldberg What happens if you wrote: my @excluse = <. ..>, slip($excluse.split(',')); ?
23:19 masak BenGoldberg: did you mean `;` ?
23:19 masak oh, wait. you didn't.
23:19 BenGoldberg m: my $ex = 'a,b,c'; my @e = <. ..>, $ex.split(',').slip; @e.say;
23:19 camelia rakudo-moar 373634: OUTPUT«Method 'slip' not found for invocant of class 'List'␤  in block <unit> at <tmp> line 1␤␤»
23:19 BenGoldberg m: my $ex = 'a,b,c'; my @e = <. ..>, slip($ex.split(',')); @e.say;
23:19 camelia rakudo-moar 373634: OUTPUT«[(. ..) a b c]␤»
23:19 BenGoldberg m: my $ex = 'a,b,c'; my @e = <. ..>.Slip, $ex.split(',').Slip; @e.say;
23:20 camelia rakudo-moar 373634: OUTPUT«[. .. a b c]␤»
23:20 masak seems to work OK.
23:21 BenGoldberg m: sub infix:<slippy> { map { .Slip } @_ }; my $ex = 'a,b,c'; my @e = <. ..> slippy $ex.split: ','; @e.say;
23:21 camelia rakudo-moar 373634: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing comma after block argument to map␤at <tmp>:1␤------> 3sub infix:<slippy> { map { .Slip }7⏏5 @_ }; my $ex = 'a,b,c'; my @e = <. ..> ␤    expecting any of:␤        infix␤        infix s…»
23:22 BenGoldberg m: sub infix:<slippy> { map *.Slip, @_ }; my $ex = 'a,b,c'; my @e = <. ..> slippy $ex.split: ','; @e.say;
23:22 camelia rakudo-moar 373634: OUTPUT«[. .. a b c]␤»
23:25 BenGoldberg On the one hand, I'm aware that | is the same as slip, on the other hand, I think that spelling things out can result in more comprehensible code.
23:37 s34n_ joined #perl6
23:40 gfldex m: dd [<a b c>, (1,2,3).Slip, <d e f>]
23:40 camelia rakudo-moar 373634: OUTPUT«[("a", "b", "c"), 1, 2, 3, ("d", "e", "f")]␤»
23:40 gfldex m: sub infix:<|,>(@l, @r){ |@l, |@r}; dd [<a b c> |, (1,2,3) |, <d e f>]
23:40 camelia rakudo-moar 373634: OUTPUT«["a", "b", "c", 1, 2, 3, "d", "e", "f"]␤»
23:41 gfldex BenGoldberg: compare the the two ^^^
23:41 gfldex m: dd [|<a b c>, |(1,2,3), |<d e f>]
23:41 camelia rakudo-moar 373634: OUTPUT«["a", "b", "c", 1, 2, 3, "d", "e", "f"]␤»
23:43 girafe joined #perl6
23:44 gfldex ,| is more like a list constructor that creates a flat list. Calling .Slip on each element looks a bit like an afterthought.
23:46 dalek doc: be93ca1 | (Wenzel P. P. Peppmeyer)++ | / (2 files):
23:46 dalek doc: add util/extract-examples.p6 and make target extract-examples
23:46 dalek doc: review: https://github.com/perl6/doc/commit/be93ca1816
23:49 s34n_ class A { has $.b; method c(){...} method d(){ return ->{return $.c); }  <-- do all the $. point to A?
23:49 aindilis joined #perl6
23:50 timotimo $.foo is just sugar for self.foo
23:50 tbrowder left #perl6
23:50 s34n_ rather, class A { has $.b; method c(){...} method d(){ return ->{return $.c}; }}
23:50 s34n_ timotimo: yes. so is self an instance on A?
23:51 timotimo the little block you return from d closes over the self that was used for calling method d
23:51 timotimo not necessarily
23:51 timotimo could be an instance of a class that derives from A
23:51 s34n_ perfect
23:51 s34n_ it's the invocant of d, right?
23:51 cdg joined #perl6
23:51 timotimo that's right
23:52 timotimo exact same as if you had something like "my $theself = self;" before the ->{...} and then using $theself inside the block

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

Perl 6 | Reference Documentation | Rakudo