»ö« 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:00
cpage_ joined
00:21
dainis left
00:22
AndyBotwin left
00:23
dainis joined
00:26
BenGoldberg joined
00:36
mantovani joined
00:42
mantovani left
00:46
cognominal left
00:47
cpage_ left
00:51
cyphase left
|
|||
MasterDuke | Zoffix: reading your post now, liking so far. however, i think there might be a typo in the filters example | 00:53 | |
the last line of output you have as '<MahBot> Zoffix, <intuit> fpaste.scsys.co.uk/528741' | |||
should it be 'the last line of output you have as '<MahBot> Zoffix, fpaste.scsys.co.uk/528741'? | |||
minus the '<intuit>' | 00:54 | ||
00:57
cyphase joined
01:06
cpage_ joined
01:08
FROGGS_ joined
01:09
FROGGS left
01:10
esh_ left
01:11
labster left,
esh joined,
hwcomcn joined
01:12
dainis left
01:14
esh left
01:15
_4d47 left
01:16
esh joined
01:17
mantovani joined
01:20
bob777 left,
bob777 joined
01:22
labster joined
|
|||
Zoffix | Thanks. Fixed. | 01:23 | |
01:24
cpage_ left
01:33
mantovani left
01:35
trnh left
01:41
mantovani joined
01:50
molaf left
02:01
pisa joined
02:02
pisa left,
molaf joined
|
|||
TEttinger | challenge! can #perl6 write code that will let camelia evaluate this as code, ¯\_(ツ)_/¯ , and get back some suitable response? | 02:17 | |
you have amazing grammar capabilities, can they shrug this one out? | 02:18 | ||
02:19
cyphase left
|
|||
timotimo | um, yeah? duh. | 02:21 | |
m: sub term:<¯\_(ツ)_/¯> { say "hah" }; ¯\_(ツ)_/¯ | |||
camelia | rakudo-moar 22949d: OUTPUT«hah» | ||
timotimo | :) | ||
geekosaur | was going to paste zoffix's from some months back :) | ||
timotimo | yeah, zoffix has been doing that kind of thing for a long time | 02:22 | |
TEttinger | very good | ||
02:24
cyphase joined
|
|||
timotimo | "very good"? you've obviously seen nothing yet ;) | 02:25 | |
sammers | ola | 02:28 | |
Zoffix | That's my patented Shrug Operator | 02:30 | |
Oh, wait never mind. It's ¯\(°_o)/¯ tpm2016.zoffix.com/#/14 | 02:31 | ||
I was about to sue. | |||
geekosaur | 2016 May 05 00:37:02 <ZoffixWin>m: sub term:<¯\_(ツ)_/¯> { say 'hotel shrugs' }; ¯\_(ツ)_/¯ | 02:32 | |
:p | |||
Zoffix | heh | 02:33 | |
02:36
noganex_ joined
|
|||
Zoffix | m: sub infix:<> { $^a + $^b }; say 22 | 02:36 | |
camelia | rakudo-moar 22949d: OUTPUT«4» | ||
Zoffix | TEttinger, ^ try to figure that one out :P | 02:37 | |
TEttinger | is that supposed to be an invisible charactr? it renders visibly in unifont | 02:38 | |
02:38
huggable joined
|
|||
TEttinger | ah, 2063 invisible separator | 02:38 | |
I had to try to figure out what there was to figure out | 02:39 | ||
02:39
noganex left
|
|||
Zoffix | :( | 02:39 | |
timotimo | gnite! | ||
TEttinger | sub infix:<> { $^a + $^b }; say 22 | ||
Zoffix | Yeah, it was supposed to be invisible: perl6.party/post/Anguish--Invisible...Data-Theft | ||
TEttinger | m: sub infix:<> { $^a + $^b }; say 22 | ||
camelia | rakudo-moar 22949d: OUTPUT«4» | ||
Zoffix | night, timo | ||
TEttinger | that is invisible for me | 02:40 | |
\ufeff, the BOM | |||
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 | ||
Zoffix | no it's not intentional | 02:42 | |
02:42
cpage_ joined
|
|||
TEttinger | browser | 02:42 | |
geekosaur | odd. still sounds like a substitution char | ||
TEttinger | i.imgur.com/Dbpqebc.png | 02:43 | |
invisible to the human eye eh? | |||
invisible to a jellyfish eye, yes | 02:44 | ||
they have very nice lenses | |||
Zoffix | Yeah, I see the same thing on my windows box | 02:47 | |
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. | ||
TEttinger | BenGoldberg: tis true! but the reason is surprising | 02:50 | |
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 | ||
really they learned it! | |||
but they can't distinguish nearby colors | 02:52 | ||
they have amazing eyes because their brains can't process more than "more green than yellow" | |||
02:53
xenu left,
cpage_ left
|
|||
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 | |
(they can move the band in all directions, even rotating it, INSIDE THEIR EYE, which is freaky to look at) | |||
02:56
cyphase left
|
|||
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 | ||
(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:57 | ||
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 | 02:59 | ||
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 | ||
it imitates the sillhouette of a big fish to scare away small fish when it's floating high in the water | 03:01 | ||
03:01
Zoffix left,
cyphase joined
|
|||
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 | |
And we'll use perl6 to program it! :) | |||
geekosaur | nearer than you think, although they may not be basing it on cuttlefish skin | 03:03 | |
kurahaupo | xkcd.com/928/ | ||
geekosaur | they already have lab prototypes | ||
BenGoldberg imagines a cross between a lyrebird and a mimic octopus. | 03:08 | ||
03:08
kaare__ joined
|
|||
TEttinger | woah haha | 03:08 | |
kurahaupo | BenGoldberg: a flying octopus? | 03:10 | |
BenGoldberg | A lyrebird can mimic just about any sound it hears. | 03:11 | |
TEttinger | a mimic mimic | 03:12 | |
chainsaws even | |||
now imagine it imitating the sound AND APPEARANCE of a chainsaw murderer | 03:13 | ||
skids | .oO(what, no olfactory mimic?) |
||
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:14 | |
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 | ||
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 | ||
geekosaur | luckily for them there's lots of things that key off a single specific scent | ||
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 | ||
skids | Nothing surprises me anymore since hearing about en.wikipedia.org/wiki/Greater_hone..._of_humans | 03:22 | |
TEttinger | holy crap, skids, and the last thing too. they do the same thing cuckoos do. | 03:25 | |
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. | |||
killer babies | |||
skids | I bet they learned it from watching us. | 03:26 | |
TEttinger | heh | ||
geekosaur | cuckoos are badass. they have "mafia"s too: birds which get too adept at kicking cuckoo eggs out of their nest get mobbed | ||
TEttinger | brood parasitism I would not be surprised if dinosaurs did it | 03:27 | |
(non-avian dinosaurs) | |||
03:38
kid51 left
|
|||
dalek | sectbot: 83b6e73 | (Daniel Green)++ | bisectable.pl: Add the good and bad commits used to the output |
03:40 | |
sectbot: 4a6357a | (Daniel Green)++ | Perl6IRCBotable.pm: Only respond if there's a ':' or ',' immediately after the bot name |
03:47 | ||
03:49
cpage_ joined,
djbkd left
03:50
djbkd joined
03:53
mantovani left
03:54
skids left
04:14
telex left
04:16
khw left,
telex joined
04:33
Woodi joined
|
|||
Woodi | heavy morning #perl6 :) | 04:34 | |
04:43
Cabanossi left
04:45
Cabanossi joined
04:47
mcmillhj joined
04:50
djbkd left
04:51
djbkd joined
04:52
mcmillhj left
04:53
s34n_ left
04:56
djbkd left
04:57
dainis joined
05:04
cibs left
05:05
bisectable left
05:06
cibs joined
05:07
bisectable joined
05:08
committable left,
mcmillhj joined
05:09
committable joined
05:12
bob777 left
05:13
mcmillhj left
05:20
canopus left,
mcmillhj joined
05:24
canopus joined
05:25
mcmillhj left
05:35
mcmillhj joined
|
|||
Xliff | Does anyone know what would happen if you try and use nqp::decont() on a type object? | 05:37 | |
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: github.com/zoffixznet/perl6-IRC-Client#synopsis | ||
Xliff | moritz: Hmmm... OK. | ||
05:39
mcmillhj left
|
|||
Xliff | I'm trying to use nqp::bindattr to NULL out a repr('CPointer') value in a repr('CStruct'). | 05:39 | |
It doesn't seem to be working. | |||
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:41 | ||
But if I do, it looks like the nqp::bindattr turns into a no-op. The attribute value doesn't change. | 05:42 | ||
dalek | sectbot: b19c8e2 | (Daniel Green)++ | / (2 files): Add a total run time limit in addition to the time limit for running each individual commit |
||
05:45
holyghost left,
araujo_ joined
|
|||
Xliff | Eh. Time for bed. I will try and come up with a golf for this, tomorrow. | 05:45 | |
05:47
araujo left
05:49
mcmillhj joined,
mantovani joined
05:50
espadrine joined,
bjz joined
05:51
bob777 joined
05:54
mantovani left,
mcmillhj left,
domidumont joined
05:55
cpage_ left
05:58
BenGoldberg left
05:59
domidumont left,
domidumont joined
06:00
domidumont left
06:01
domidumont joined
06:03
cyphase left
|
|||
AlexDaniel | bisectable++ | 06:05 | |
yoleaux | 29 Jul 2016 23:24Z <Zoffix> AlexDaniel: IRC::Client's rewrite is done. perl6.party/post/IRC-Client-Perl-6-...IRC-Module | ||
06:06
domidumont left
06:07
cyphase joined
06:16
mcmillhj joined
06:17
dainis left
06:19
spider-mario joined
06:22
hwcomcn left,
mcmillhj left,
wamba joined
06:23
ggoebel joined
06:26
wamba left
06:27
wamba joined
06:38
holyghost joined,
holyghost left,
holyghost joined,
huggable left,
huggable joined
06:41
CIAvash joined
06:49
mcmillhj joined
06:54
mcmillhj left
07:10
mantovani joined,
mcmillhj joined
07:11
bjz left,
bjz_ joined
07:15
mcmillhj left
|
|||
AlexDaniel | ===SORRY!=== Missing serialize REPR function for REPR VMException | 07:17 | |
/o\ | |||
07:26
Tonik joined
07:31
firstdayonthejob joined
07:36
freeside joined
07:37
bob777 left
|
|||
AlexDaniel | gist.github.com/AlexDaniel/6933fc3...819f0a4f85 – what am I doing wrong? | 07:42 | |
07:45
holyghost left
07:51
darutoko joined
|
|||
FROGGS_ | maybe the smartquotes in "use lib"? | 08:00 | |
08:00
mcmillhj joined
08:05
girafe joined,
mcmillhj left
08:17
setty1 joined
08:28
kent\n joined
08:29
mcmillhj joined
08:34
mcmillhj left
08:39
rindolf joined
|
|||
TEttinger | smort quates | 08:49 | |
08:52
NEveD left,
freeside left
|
|||
moritz | oh hai | 08:56 | |
unmatched}++ | |||
08:56
TEttinger left
|
|||
konobi | what does bindpos do? | 08:56 | |
moritz | in perl6.party/post/IRC-Client-Perl-6-...IRC-Module the line start $cache.poll or do { self!fetch-quotes; $cache.poll }; trips me up | 08:57 | |
what's the relative precedence of prefix:<start> and infix:<or>? | |||
konobi: @a[0] := $x | |||
AlexDaniel | FROGGS_: no | 08:59 | |
09:03
kurahaupo_ joined
09:05
kurahaupo left
|
|||
AlexDaniel | What can I try? | 09:06 | |
konobi | moritz: i mean underneath... looking at a vm implementation detail | 09:08 | |
09:15
freeside joined
09:18
smls joined
09:19
kurahaupo joined,
kurahaupo_ left
|
|||
smls | m: say {a=>3, b=>2, c=>1}.max(*.value) | 09:21 | |
camelia | rakudo-moar 32f341: OUTPUT«Index out of range. Is: 1, should be in 0..0 in block <unit> at <tmp> line 1Actually thrown at: in any at gen/moar/m-Metamodel.nqp line 3055 in block <unit> at <tmp> line 1» | ||
smls | ^^ Why does .max on a Hash throw 'Index out of range'? | ||
Shouldn't it work like .list.max ? | |||
After all, .grep on a Hash works like .list.grep (and same with .map etc.) | 09:23 | ||
09:29
kurahaupo left
09:30
kurahaupo joined
|
|||
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. | ||
nine | konobi: well, bindpos really is just a (pointer) assignment with a couple of checks added | 09:37 | |
konobi | hhhmmm... | 09:38 | |
nine | Oh, and of course it may have to resize the array | 09:41 | |
moritz | konobi: github.com/MoarVM/MoarVM/blob/mast...#L343-L421 this is what happens, in case of a "normal" array | 09:44 | |
tadzik | hmm, is there already a proxy that makes Bot::BasicBot::Pluggable modules work in IRC::Client? :) | 09:46 | |
09:47
RabidGravy joined
10:03
AlexDaniel left,
mantovani left,
pmqs left
|
|||
sammers | Hi all | 10:08 | |
10:12
holyghost joined
10:14
holyghost left,
holyghost joined
10:15
tx0h_ joined,
pmqs joined
|
|||
moritz | hi sammers | 10:16 | |
10:16
Zoffix joined
|
|||
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 blockSlow is run» | ||
Zoffix | moritz, ^ it seems to be the same as one() or two() for 1..10; | ||
10:16
tx0h left,
tx0h_ is now known as tx0h
|
|||
moritz | Zoffix: I just looked at --target=ast output and came to the same conclusion | 10:18 | |
10:24
holyghost left
|
|||
sammers | hi mortiz | 10:24 | |
10:28
canopus left
10:34
canopus joined,
Zoffix left
10:38
huggable left,
huggable joined
10:40
holyghost joined
10:42
brrt joined
10:44
labster left
10:48
holyghost left
11:01
cognominal joined
11:07
darutoko left
|
|||
masak | greetings, #perl6 | 11:08 | |
MasterDuke | AlexDaniel: putting 'no precompilation' at the top of Foo2.pm6 fixed it for me | 11:09 | |
11:12
smls left
11:18
bob777 joined,
darutoko joined
11:19
bob777 left
|
|||
nine | MasterDuke: AlexDaniel has quit an hour ago | 11:25 | |
MasterDuke | ahh, better .tell him, thanks | 11:26 | |
.tell AlexDaniel putting 'no precompilation' at the top of Foo2.pm6 fixed it for me | |||
yoleaux | MasterDuke: I'll pass your message to AlexDaniel. | ||
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:27 | |
masak | 007 has a (warm) bootup of 0.7s | 11:31 | |
that's... quite cool, actually | |||
it doesn't feel slow | |||
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 | ||
clearly I didn't :-\ | 11:34 | ||
11:34
tbrowder left
|
|||
nine | CIAvash: yes, HTTP::UserAgent does the try require at runtime in a method. | 11:35 | |
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:36 | ||
11:36
espadrine left
11:41
pmqs left
11:45
kalkin- joined
|
|||
kalkin- | hi | 11:45 | |
brrt | hi kalkin | ||
MasterDuke | nine: that does seem to be it. putting the 'try { require ... }' in a sub fixes it | 11:46 | |
brrt | ohai masak | ||
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 | ||
dalek | k-simple: 100d514 | jgrabber++ | .travis.yml: Trying to fix CI builds on mac |
11:50 | |
k-simple: f2d2599 | lizmat++ | .travis.yml: Merge pull request #57 from jobegrabber/fix-travis-ci-on-mac Trying to fix CI builds on mac |
|||
kalkin- | I currently use for an object new(*%params) { my $r = self.bless(|%params); do some stuff like tap events; return $r } | 11:53 | |
But docs on traps say something about using BUILDALL | |||
why does there exists a new method, if actually everything is happening in BUILDALL? | 11:54 | ||
When do i overwrite which method? | |||
11:55
pmqs joined,
sunnavy left
11:56
sunnavy joined
|
|||
lizmat | kalkin-: BUILDALL is actually the workhorse for bless() | 11:56 | |
the default .new calls bless | |||
you can create your own .new in a class, set up a hash, then call bless(|%hash) | |||
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 | ||
brrt wonders how that ties into the representations issue | |||
jnthn | When you want to change the interface to construction, generally | 11:58 | |
lizmat | because it gives you an opportunity to preprocess / test / change the parameters before blessing ? | ||
jnthn | Like if you wanted to expose a positional interface rather than a named args one. | ||
kalkin- | Can't i do the same with BUILDALL? | ||
brrt | eh... | ||
lizmat | you could, but the default BUILDALL is highly optimized... | 11:59 | |
jnthn | I'm not sure you should do anything much with BUILDALL | ||
lizmat | TIMTOWTDI :-) | ||
brrt | bless /creates/ the object in perl6, right? | ||
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 :) | ||
brrt: Strictly, .CREATE does, but bless uses that | 12:00 | ||
brrt | aha | ||
kalkin- | jnthn: But traps to avoid doc page shows how to implement BUILDALL instead of using new | ||
jnthn | kalkin-: I didn't write that. :) | ||
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... | ||
i guess thay BUILDALL is just downstream from new | 12:02 | ||
12:03
kid51 joined,
freeside left
|
|||
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 | ||
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. | ||
brrt | good practices are for mature languages | 12:04 | |
imho at least | |||
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 | ||
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?" | ||
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 | ||
mst | why do you need either? | ||
kalkin- | in perl6 | ||
mst | in python and java having to write my own constructor is why I hate their OO | 12:07 | |
and go back to perl5, which is superior | |||
kalkin-: seriously, __init__ in python to me is "that thing I get forced to write because I'm not using perl5/perl6" :) | 12:08 | ||
brrt | actually __init__ is BUILDALL | ||
kalkin- | yes | ||
jnthn | mst: No idea; if there is I haven't seen it. | ||
brrt | new is __new__ | ||
jnthn | lunch; bbl | ||
12:08
kaare__ left
12:09
bob777 joined
|
|||
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 | |
ohh and one of events is only provided after executing bless() | |||
mst | isn't there a one-line you can put in BUILD's signature that gets the default slot population | ||
and then you do it in BUILD | |||
overriding new() is I think basically always an error, and insane :) | |||
kalkin- | One of event sources i need to tape is only created after calling bless | 12:10 | |
masak | mst: I disagree, though not strongly :) | ||
kalkin- | s/tape/tap | ||
mst | masak: 'basically always' in the same sense as implementing AUTOLOAD in perl5 | ||
masak | m: say Complex.new(3, 4).abs | 12:11 | |
camelia | rakudo-moar 15ee3c: OUTPUT«5» | ||
masak | mst: ^ | ||
mst | masak: surely that's just a custom BUILDARGS | ||
12:11
kurahaupo left,
pmurias joined
|
|||
mst | or did perl6 desugar that as well? | 12:12 | |
12:12
kurahaupo joined
|
|||
pmurias | konobi: the $$foo style methods are the ones used by nqp-js internall (not called directly from Perl 6/NQP) code | 12:12 | |
12:12
kurahaupo left
|
|||
yoleaux | 09:32Z <konobi> pmurias: are all the functions/methods with '$$' internal to the js nqp-runtime? | 12:12 | |
12:12
kurahaupo joined,
kurahaupo left
12:13
kurahaupo joined
|
|||
brrt | there is evidently much documentation yet to be written :-) | 12:13 | |
mst | the 5to6 doc is, compared to my ideal world, missing a section :) | 12:15 | |
brrt | well volunteered? :-p | 12:16 | |
12:16
skids joined
|
|||
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 | |
lizmat: I don't understand how perl6 has ended up more typing than 5 :( | |||
12:18
skids left
|
|||
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 | |
if it didn't completely break object initialisation at the same time | |||
kalkin- | mst: but in in BUILD is the supplier not instantiated yet | ||
(at least in my case) | |||
mst | kalkin-: oh? why not? how are you instantiating it? | ||
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:20
kurahaupo left
|
|||
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 | |
12:21
kurahaupo joined
|
|||
mst | right, but surely the .bless() fills out those values | 12:21 | |
and then calls BUILD with an object with $self.events already filled | |||
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 | ||
mst | why not? | ||
12:22
kurahaupo left
|
|||
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 | ||
kalkin- | mst: docs When you define your own BUILD submethod, you must take care of initializing all attributes yourself | ||
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 | ||
mst | hang on, BUILD kills the 'self.events-supplier.Supply' from firing as well? | ||
lizmat: ok, so, kalkin-'s problem in perl5 is | |||
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 | ||
new/BUILDALL are responsible for populating the attributes' values, and BUILD is your own initialisation logiuc, run after the standard stuff | |||
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 :( | ||
lizmat | mst: well, that could be.... but that's what 6.c is :-) | 12:26 | |
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. | ||
I mean what's bad about overwriting new for this purpose? | |||
are there any drawbacks? | |||
mst | BUILDs are submethods so stack | 12:28 | |
sometimes I've needed that | |||
brrt | kalkin-: code is cheap, try it out, we won't judge | ||
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
|
|||
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 | ||
mst | but oh well | ||
kalkin-: yes, it doesn't seem like a problem to me | |||
baaasically the confusion here is that your | |||
brrt | can't you just call nextsame in BUILDALL | 12:30 | |
mst | new(*%params) { my $r = self.bless(|%params); <stuff>; return $r } | ||
in perl5, is | |||
sub BUILD { <stuff> } | |||
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:32 | ||
mst | I guess in perl6 what I want really is 'after BUILDALL' | ||
kalkin- | mst: is there something like this? | 12:33 | |
brrt | maybe BUILDFINISH | ||
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 | ||
thanks to all :) | |||
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 | ||
pmurias | would having something like "submethod BUILD(%params) {something-with-a-good-short-name-to-to-build-attributes-in-the-default-way; <stuff>}" work? | 12:37 | |
mst: assuming we can come up with a good short name | |||
12:38
Actualeyes joined,
araujo_ left,
araujo joined,
ufobat joined,
araujo left,
araujo joined
|
|||
mst | pmurias: probably. it just ... seems odd to me. | 12:38 | |
I don't think I can really have a proper opinion without managing to draw up a comparison table or something | 12:39 | ||
.. also, I forgot to take my anti-allergy meds when I woke up and I think my sinuses hate me | |||
so I'm not 100% sure I'm actually making sense yet | |||
ufobat | what is the difference between await $p and $p.result()? | ||
pmurias | mst: it would work sort of like {*} in protos does | 12:41 | |
mst | pmurias: metacpan.org/source/MSTROUT/App-Pr.../Client.pm is the pattern | 12:42 | |
if that helps make sense of my waffling | |||
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 | ||
I think basically the difference stems from the fact that perl6 sees it as 'each BUILD is responsible for that class/role's attributes' | |||
whereas in M* the default new() stuff handles all the attribute init, and BUILD is just for additional custom construction | |||
and if you want to handle initialisation of an attribute yourself you set 'init_arg => undef' | 12:48 | ||
which seems like better huffmaning to me, but it's totally possible that's just because it's what I'm used to | |||
brrt | you want an AFTERBUILD, is how i see it | 12:51 | |
mst | yes, pretty much spot on | ||
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? | ||
psch | ah, i must've missed that | ||
yeah, it doesn't afaik | |||
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 | ||
mst | which, when you're used to M*, is ... weird | ||
psch | yeah, i can see that being annoying | ||
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 | ||
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 | ||
and to need to explicitly ask for 'having to write my own slot population code' | |||
since that seems like the less common requirement | |||
I guess if I mentally think of BUILD as POPULATE | |||
then AFTERBUILD being AFTERPOPULATE is completely sane | 12:56 | ||
and possibly a better name for the thing I want than BUILD would've been anyway | |||
brrt | part of the issue may be that BUILD is a submethod, hence overriding it is destructive | ||
mst | if we had before/after/around, I'd be completely happy with 'after submethod BUILD' | 12:57 | |
brrt | hmmmm | 12:58 | |
interesting idea | 12:59 | ||
mst | I mean, it's notable that, in M* *roles*, idiomatic is to write | 13:00 | |
sub BUILD {}; after BUILD => sub { ... }; | |||
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 | ||
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 | ||
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 | ||
maybe i'm also wrongly assuming BUILD itself is what should be traited, and a trait on the class is the better idea | 13:05 | ||
brrt | what i mean is that if you'd have: class Foo { method foo() is after BUILD {...} } | 13:06 | |
and that BUILD should conceptually exist | 13:07 | ||
mst | I think my problem is that ... ok, let's avoid the word BUILD for a second | 13:08 | |
there's two things here, POPULATE, i.e. 'set the attributes up', and POSTPOPULATE, i.e. 'do other tweakage' | |||
brrt | okay :-) | ||
aye | |||
TWEAK :-P | 13:09 | ||
mst | in perl5/M*, POPULATE is inlined into new(), effectively | ||
except you can opt-out on a per-attribute basis with 'init_arg => "undef"' | |||
brrt | submethod? method? | ||
aye... perl6 hav | |||
mst | we don't have submethods, except we sort of emulate them, let's handwave that bit for the moment please | ||
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 | ||
whereas in perl6, BUILD is POPULATE, and so if you only want it for POSTPOPULATE, you need to duplicate the population logic | |||
so that, to me, makes a lot more sense of the differences | 13:11 | ||
brrt | or override new | ||
brrt nods | |||
mst | yeah | ||
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' | ||
so that turns out to to be a problem for us in practice | |||
*to not be | 13:13 | ||
brrt: right, and overriding new by calling bless() like kalkin- did complicates life if you try and do it more than once | |||
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 | ||
agreed and i see why kalkin- asked | 13:15 | ||
mst | BUILDARGS is really just a signature mangler | ||
13:15
itaipu joined
|
|||
mst | so ... presumably you can do something like | 13:15 | |
method new ($foo) { call-original-new(:foo($foo)) } | |||
(not sure what call-original-new is called here) | 13:16 | ||
and that's equivalent to perl5 | |||
brrt | not sure either... | ||
mst | sub BUILDARGS ($class, $foo) { return +{ foo => $foo } } | ||
assuming that's there, I don't think perl6 needs BUILDARGS | |||
brrt | i think calk-original-new is self.bless... | 13:18 | |
13:18
Zoffix joined
|
|||
Zoffix | m: class Foo { has $.foo; method new ($foo) { nextwith :$foo } }.new(42).foo.say | 13:19 | |
camelia | rakudo-moar 15ee3c: OUTPUT«42» | ||
mst | there we go | ||
brrt | Zoffix++ | ||
mst | brrt: except that wouldn't then honour similar stuff in the next new() along | ||
brrt | true... ehm... hmmm | ||
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 | |
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 | |||
(which, I guess in perl6 you'd have to do that by reimplemting the standard BUILD logic for everything but that one, which ... ew?) | |||
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 | ||
that looks like the easiest solution from here | |||
although it clearly still has drawbacks | |||
mst | I feel like what I 'really' want is some sort of magic slurpy | ||
submethod BUILD (*%magic) { | 13:22 | ||
and that causes everything to get populated normally | |||
brrt | hmmm. i think the problem with that is that it completely changes the meaning of BUILD | ||
mst | and then I opt out by having | ||
submethod BUILD ($:optout, *%magic) { | |||
well, I don't think it does, you're effectively saying 'assinging to $magic{foo} attempts to assign $.foo' ? | |||
ufobat | i dont understand the error here, could anyone give me some kind of advice gist.github.com/ufobat/5883b338aec...bb759d6671 | 13:23 | |
13:24
kid51 left,
wamba left,
itaipu left,
kid51 joined
|
|||
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 blockat <tmp>:1------> 3.bar; submethod BUILD(*%args) { nextwith7⏏5<EOL> expecting any of: statement end statement modifier statement modifier loop» | ||
brrt | damnit samsung keyboard | 13:26 | |
moritz | ufobat: are any of those lines in the backtrace part of snipped you pasted? | 13:27 | |
ufobat: also, calling Supply.tap without an argument looks suspicious to me | |||
ufobat | moritz, line 223 of HTTP::Server::Smack is the $promise.result | 13:29 | |
moritz | ufobat: huh, that line appears twice in the stacktrace... is there any recursion going on, possibly through the coercions from that line? | 13:31 | |
ufobat | moritz, no, one is from the $promise.cause.say the other is from the $promise.cause.backtrace.full.Str | 13:33 | |
13:33
rindolf left
|
|||
ufobat | or that is what i was thinking | 13:33 | |
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 | ||
right, i have no idea what is going wrong :( | |||
moritz | you call .say($str) on a Supplier | ||
the $obj.say($thing) form only works for file handles or similar IO objects | 13:35 | ||
ufobat | and where am i doing that? how do i find out? | 13:36 | |
moritz | git grep -F '.say' | 13:37 | |
13:37
bob777 left
|
|||
moritz | I fear rakudo still swallows backtraces when catching exceptions inside start { } blocks :( | 13:38 | |
ufobat | *ggg* | ||
thanks :-) | |||
moritz | or if you know where the promise comes from, add a try { ... } and a backtrace printing yourself inside that start block | 13:39 | |
you're welcome :-) | |||
ufobat | i think i am able of finding the problem now :-) | ||
but first.. bbq :D | |||
moritz | that's later today for me :-) | 13:41 | |
brrt | it still rains here... | 13:42 | |
13:43
Zoffix left,
rindolf joined
|
|||
moritz | I'm starting to hate likes/hearts on twitter | 13:50 | |
I keep thinking "you liked it, but not enough to retweet? thank you!" with no small amount of sarcasm in my mental voice | 13:51 | ||
mst | my client doesn't show me likes | 13:52 | |
I continue to appreciate this fact | |||
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:53 | |
moritz: often I use like for things that contain a link to somthing I want to read more fully | 13:54 | ||
CIAvash | cognominal: docs.perl6.org/syntax/with%20orwith%20without | 13:57 | |
cognominal | CIAvash, this is not the 'with' statemenr modifier | 13:59 | |
on the other hand I missed the fact, the the "with" statemenr setted $_ | |||
CIAvash | cognominal: It is mentioned at the end | ||
cognominal | CIAvash, oops my bad. But is does not fit the stated "control flow" category | 14:01 | |
moritz | m: .say given Any | 14:03 | |
camelia | rakudo-moar 15ee3c: OUTPUT«(Any)» | ||
moritz | m: .say when Any | 14:04 | |
camelia | rakudo-moar 15ee3c: OUTPUT«(Any)» | ||
moritz | when Any { .say } | ||
m: when Any { .say } | |||
camelia | rakudo-moar 15ee3c: OUTPUT«(Any)» | ||
moritz | m: given 42 { .say when Str } | ||
camelia | ( no output ) | ||
moritz | it does look like control flow to me | 14:05 | |
cognominal | moritz, yes, I was thouroughly confused | 14:07 | |
14:08
lichtkind joined
14:09
dainis joined
|
|||
brrt | i continue to be blissfully offline for social media | 14:14 | |
kurahaupo | brrt: does irc count as "social"? | 14:16 | |
brrt | well its social | ||
but not social media expert social | 14:17 | ||
not twitter or facebook, i guess :-) | |||
cognominal | When I say so much insanity, it means I badly need to get out for a walk | ||
brrt | that is a good idea :-) | 14:19 | |
brrt afk too | |||
14:20
brrt left
14:24
ufobat left
14:30
kaare__ joined
14:33
skids joined
14:38
huggable left,
pmurias left
14:41
pmurias joined
14:43
sena_kun joined
14:50
NEveD joined
14:54
djbkd joined
14:55
ufobat joined
|
|||
dalek | c/non-breaking-space: 6a97e5a | Altai-man++ | doc/ (79 files): Now all entries of `Perl 6|5` are written with non-breaking space |
14:56 | |
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 :) | ||
sena_kun | Oops. | 15:00 | |
15:03
khw joined
15:05
wamba joined
|
|||
dalek | c/non-breaking-space: a8747c5 | Altai-man++ | doc/ (7 files): Links with `Perl6`, not `Perl 6`, obviously, were fixed |
15:09 | |
15:13
ldwrf joined
15:15
kaare__ left,
kaare__ joined
15:16
Tonik left
15:17
travis-ci joined
|
|||
travis-ci | Doc build passed. Altai-man 'Now all entries of `Perl 6|5` are written with non-breaking space' | 15:17 | |
travis-ci.org/perl6/doc/builds/148541397 github.com/perl6/doc/commit/6a97e5ae2ddf | |||
15:17
travis-ci left
|
|||
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:20 | |
15:23
Tonik joined
15:24
setty1 left
15:26
ufobat left
15:29
espadrine joined
15:31
Khisanth left
|
|||
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:45
pmurias left
15:55
skids left
15:56
pmurias joined,
bob777 joined
15:58
ldwrf left
16:02
bob777 left
16:09
skids joined
16:15
AndyBotwin joined
16:29
NEveD left
16:50
holyghost joined
16:52
AlexDaniel joined
17:01
RabidGravy left
17:07
Khisanth joined
|
|||
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
|
|||
AlexDaniel | MasterDuke: and thank you for actually fixing it :) | 17:09 | |
17:11
mohae_ left
17:12
NEveD joined
17:24
ldwrf joined
17:25
ldwrf left,
ldwrf_ joined
17:27
firstdayonthejob left
17:30
firstdayonthejob joined
17:36
NEveD left
17:39
yqt joined
|
|||
sena_kun | Can PR for non-breakable 'Perl 6' be merged? cast AlexDaniel, github.com/perl6/doc/pull/780 | 17:46 | |
AlexDaniel | ± 1018 :D | 17:48 | |
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“ | ||
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! | ||
AlexDaniel, the problem is: test fails if you replace it with normal space. | 17:52 | ||
AlexDaniel | :D | ||
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:53 | |
s/Tests/Test | 17:54 | ||
AlexDaniel | “Where is a list of differences between Perl 5 and 6?” | 17:56 | |
again, not sure if we should have a nbsp here | 17:57 | ||
sena_kun: what's going to happen with this link? github.com/perl6/doc/pull/780/file...23b354fL24 | 17:58 | ||
sena_kun: and is everything alright here? github.com/perl6/doc/pull/780/file...0f40520L11 | |||
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 | |
17:59
jgrabber joined
|
|||
AlexDaniel | sena_kun: Perl \d is OK, no problem with that | 17:59 | |
sena_kun | Okay then. | 18:00 | |
AlexDaniel | sena_kun: another link: github.com/perl6/doc/pull/780/file...b58ff9L399 | ||
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 | |
18:02
Faa_ joined,
Faa_ left
|
|||
sena_kun | About '??' symbol... Hmm, it's strange, since in the emacs I see a non-breaking space. | 18:02 | |
And `git diff` sees a non-breaking space also. | 18:03 | ||
18:03
trnh joined
|
|||
sena_kun | I'll check ipc.pod6 better now. | 18:04 | |
AlexDaniel | sena_kun: another file with ?? is doc/Language/tables.pod6 | 18:05 | |
sena_kun: and doc/Programs/00-running.pod6 | 18:06 | ||
may be some encoding issue | |||
sena_kun | Yes, I see 20 occurences using search. | ||
AlexDaniel | yeah | ||
sena_kun: OK, here is a broken example: github.com/perl6/doc/pull/780/file...a490fL1169 | 18:07 | ||
sena_kun: and one more example right below it | |||
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)» | ||
sena_kun | Ah, my bad. | ||
18:09
yqt left
|
|||
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)» | ||
AlexDaniel | m: say "Perl 6".ords; # 80 101 114 108 32 54 | ||
camelia | rakudo-moar 15ee3c: OUTPUT«(80 101 114 108 160 54)» | ||
sena_kun | Yes, it needs reverting. | ||
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
pmqs left
|
|||
sena_kun | And next example. | 18:11 | |
AlexDaniel | yes | ||
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:12 | |
18:13
dainis left
18:14
cdg joined
|
|||
AlexDaniel | sena_kun: yea I'm find the difference | 18:14 | |
18:15
dainis joined
|
|||
sena_kun | Links work as usual locally. | 18:16 | |
AlexDaniel | okay | 18:17 | |
dalek | c/non-breaking-space: ac13c67 | Altai-man++ | doc/Type/Cool.pod6: Examples were fixed |
18:22 | |
18:26
zergey joined
|
|||
AlexDaniel | sena_kun: I think that we can ignore ?? thing | 18:27 | |
sena_kun: it seems like github thinks that the files are not in UTF8 or something | |||
maybe it recognizes them as pod5 files or something, I don't know | 18:28 | ||
sena_kun | AlexDaniel, can you test it locally? | ||
AlexDaniel | sena_kun: I opened it with an editor and see no differences between files | 18:29 | |
I mean, these are just regular files with regular non-breaking spaces in them, no problems whatsoever | 18:30 | ||
sena_kun | `file -i doc/Language/ipc.pod6` gives me `doc/Language/ipc.pod6: text/plain; charset=utf-8`. | 18:31 | |
gfldex | we could add use v6.c; in all *.pod6 to make clear what we mean | 18:33 | |
sena_kun | AlexDaniel, see raw.githubusercontent.com/perl6/do...e/ipc.pod6 | ||
It seems the only place where you can see 'Perl??' thing is github diff. | |||
AlexDaniel | sena_kun: I am pretty sure that it is just github trying to be smart | 18:34 | |
18:35
pmurias_ joined
|
|||
timotimo | thankfully | 18:35 | |
AlexDaniel | gfldex: but we already use .pod6 extension! | ||
dalek | c: 6a97e5a | Altai-man++ | doc/ (79 files): Now all entries of `Perl 6|5` are written with non-breaking space |
18:36 | |
c: a8747c5 | Altai-man++ | doc/ (7 files): Links with `Perl6`, not `Perl 6`, obviously, were fixed |
|||
c: ac13c67 | Altai-man++ | doc/Type/Cool.pod6: Examples were fixed |
|||
c: d82e667 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/ (78 files): Merge pull request #780 from perl6/non-breaking-space Now all entries of `Perl 6|5` are written with non-breaking space |
|||
AlexDaniel | sena_kun: ;) | ||
timotimo | yay | ||
sena_kun | AlexDaniel, thanks a lot for the review! | ||
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. | ||
AlexDaniel | gfldex: right | ||
18:38
pmurias left
|
|||
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:39 | |
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:40 | |
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; | ||
camelia | rakudo-moar 15ee3c: OUTPUT«pleased» | ||
Xliff | FROGGS_, you around? | 18:45 | |
18:47
aries_liuxueyang left,
AlexDani` joined
18:49
AlexDaniel left
18:50
aries_liuxueyang joined
18:51
AlexDani` left
|
|||
dalek | c: fff3317 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/faq.pod6: “Perl 5 and 6” → “Perl 5 and Perl 6” I think that it is technically more correct, and it also does not look so strange with non-breaking space. |
18:54 | |
18:54
cooper left
18:55
cooper joined,
AlexDani` joined
18:56
AlexDani` is now known as AlexDaniel
|
|||
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:57 | |
in fact, maybe it is right | 18:58 | ||
sena_kun | AlexDaniel, if we want our tests to pass, then sure. And I don't think it matters *too much*, yes. | 19:00 | |
AlexDaniel | sena_kun: we can always modify our test to check if it is not “Perl 5-to-6”, heh… | 19:01 | |
sena_kun | AlexDaniel, ...and a bunch of other similar phrases, yes. (: Anyway, issue is closed. | 19:02 | |
kalkin- | How can i check if a given method implements some specific trait? | 19:14 | |
Especially I want to get a list of all mandatory fields from the META6.new() object | |||
19:15
skids left
|
|||
lizmat | kalkin-: there's no mechanism that keeps track of which traits a method has | 19:16 | |
a trait is nothing other than a sub that gets called at compile time on the method object | |||
19:16
THEmrrob joined
|
|||
lizmat | it is free to do whatever it wants | 19:16 | |
kalkin- | That's a pitty | ||
lizmat | for example: the implementation of is-hidden-from-backtrace: | 19:17 | |
multi sub trait_mod:<is>(Routine:D $r, :$hidden-from-backtrace!) { | |||
$r.^mixin( role { method is-hidden-from-backtrace { True } } ); | |||
} | |||
so, if you want to check if a method has this trait, you'd do: | |||
$method.?is-hidden-from-backtrace | 19:18 | ||
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
19:21
jgrabber left
19:23
rindolf left
|
|||
kalkin- | lizmat: Aehm i still kind of confused how i would apply what you explained to github.com/jonathanstowe/META6/blo...b/META6.pm How do I adress a trait which is inside a class | 19:24 | |
from the outside of the class | |||
FROGGS_ | Xliff: I am | 19:25 | |
lizmat | kalkin-: from what I can see, the class doesn't allow that | 19:26 | |
unless the MetaAttribute::Specification role would be exported | 19:27 | ||
19:27
rindolf joined
|
|||
lizmat | or you would use the MOP to get at it, and then smartmatch on that | 19:27 | |
19:27
TEttinger joined,
ldwrf_ left
|
|||
lizmat | perhaps RabidGravy can tell you more about it :-) | 19:27 | |
kalkin- | lizmat: thank you i will experiment some more with that | 19:28 | |
19:32
wamba left
|
|||
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 | |
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
|
|||
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. | ||
s/tesyts/tests/ | 19:36 | ||
OK. I will submit the PR, then and we can whack this thing back into shape!! =D | |||
FROGGS_ | :o) | 19:38 | |
Xliff | github.com/FROGGS/p6-XML-LibXML/pull/5 | 19:40 | |
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 | ||
Thanks, FROGGS_! | |||
19:41
RabidGravy joined
|
|||
FROGGS_ | k | 19:41 | |
19:44
grondilu left
19:45
darutoko left
19:46
BenGoldberg joined
19:54
yqt joined
19:57
s34n_ joined
|
|||
s34n_ | I'm reading a snippet from blogs.perl.org/users/zoffix_znet/20...erl-6.html that I don't understand.. | 19:58 | |
19:59
ldwrf joined
|
|||
s34n_ | Under the heading "But... But... But..." there is a snippet that does: my $copy = $original but Better; | 19:59 | |
lizmat | that mixes in the role or an Enum | 20:00 | |
by the name of "Better" | |||
s34n_ | oops. I just read the next line, which I missed before. nm | ||
lizmat | :-) | ||
s34n_ | how about my $original = (Foo but Better).new: :attr<original>; ? | 20:02 | |
so I don't have to create an object and a copy... | |||
20:02
espadrine left
|
|||
masak | Xliff: one general comment: some `while` loops and `if` statements have parentheses that aren't needed | 20:03 | |
20:03
THEmrrob left
|
|||
s34n_ | my $original = Foo.new: :attr<original> but Better; <--? | 20:04 | |
masak | Xliff: and some of the conditions are tortuous | ||
like `! +$frag.getNodePtr == +$ref.getNodePtr` -- could be written simply as `$frag.getNodePtr != $ref.getNodePtr` | 20:05 | ||
20:09
tbrowder joined
|
|||
s34n_ | what's the perl6 equivalent of AUTOLOAD? | 20:14 | |
FROGGS_ | method FALLBACK | ||
Xliff | masak: LOL! You are absolutely correct. That was me being flustered. | 20:16 | |
And you have to remember, I learned C first before even Perl5. | |||
C-isms are buried in my DNA and are hard to unlearn. | |||
Although I don't know what I was drinking when I wrote `! +$frag.getNodePtr == +$ref.getNodePtr` | 20:17 | ||
Probably Gin. | |||
FROGGS_ | *g* | ||
Xliff | Also, Sublime Text Edit likes "helping" me. Most times I hit tab after a "while" it inserts the parens automatically. | 20:19 | |
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 | ||
s34n_ | why is it so hard to google documentation on FALLBACK? | ||
Xliff | (suuure.... blame your tools, EEDIOT!) | ||
FROGGS_ | hehe | ||
Xliff fits himself for the special dunce cap. | 20:21 | ||
20:21
rindolf left
|
|||
kalkin- | if i have an class field name as string $f how do i set $my-inst."$f" = "foo";? | 20:21 | |
i know that i can call the the getter with $my-inst."$f"(), but how to call the setter? | |||
FROGGS_ | s34n_: github.com/perl6/roast/blob/ab7476...fallback.t | ||
20:22
Zoffix joined
|
|||
timotimo | kalkin-: the getter is the setter | 20:22 | |
Zoffix | kaare__, same way. It returns a writable thing | ||
FROGGS_ | aye, try: $my-inst."$f"() = "foo" | ||
20:22
zergey left
|
|||
Zoffix | *kalkin- | 20:22 | |
kalkin- | ohh, that's not obvious. | ||
Zoffix | s34n_, I don't see it at all. Keep in mind the docs are still work in progress. Perl 6 is pretty new | ||
dj_goku | Zoffix: great article at your updates to irc::client. | ||
Zoffix | Thanks. | 20:23 | |
s34n_, that's all I see: design.perl6.org/S12.html#FALLBACK_methods | |||
kalkin- | thanks friends it works! | ||
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)» | ||
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
cyphase left,
xinming left,
xinming joined
20:35
cyphase joined
20:38
CIAvash left
20:42
cdg left
20:43
cdg joined
20:47
labster joined,
Zoffix left
|
|||
pmurias_ | konobi: woes? | 20:49 | |
20:50
pmurias_ is now known as pmurias
|
|||
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/ | ||
pmurias | konobi: codeRef.$$apply(args) should do the same as codeRef.$$call.apply(codeRef, args) | 20:53 | |
tbrowder | possible pop use of p6: programming interface for the Lego Ev3 robot. current pop prog interface is python. see www.ev3.org for more info | 20:54 | |
folks here with children in school may be already aware of the Lego robot influence in academia | 20:56 | ||
20:56
Possum left
|
|||
dalek | c: 7b9e2ea | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: add FALLBACK to index |
20:58 | |
20:58
kaare__ left
|
|||
pmurias as kid (who had a LEGO robot) always felt they were an excuse for old engineers to play with LEGOs | 20:58 | ||
20:59
skids joined,
s34n_ left,
molaf left
|
|||
tbrowder | pmurias: you may be on to something! | 21:01 | |
21:02
grondilu_ joined
|
|||
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 | |
being lexical and all that | |||
pmurias | kalkin-: why would you want to do that? | ||
moritz | you can however inspect &MY:: for routines declared in the current scope | ||
kalkin- | I want to call it from inside the USAGE() to manipulate the output | ||
moritz | and &OUT::MY | ||
m: sub f() { }; say &MY::.keys | |||
camelia | rakudo-moar 1035ed: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared name: MY used at line 1» | ||
moritz | m: sub f() { }; say MY::.keys | 21:05 | |
camelia | rakudo-moar 1035ed: OUTPUT«($=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ $=finish &f $/ $?PACKAGE)» | ||
moritz | m: sub f() { }; say MY::.keys.grep(Callable) | ||
camelia | rakudo-moar 1035ed: OUTPUT«()» | ||
moritz | m: sub f() { }; say MY::.grep({.value ~~ Callable})>>.key | ||
camelia | rakudo-moar 1035ed: OUTPUT«(&f)» | ||
kalkin- | Thanks! | 21:07 | |
dalek | c: 2b7bed6 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: doc FALLBACK |
21:16 | |
21:17
ldwrf left
21:18
ldwrf joined
21:21
nightfrog left
|
|||
dalek | c: 0eb5e69 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod6: doc subsignatures |
21:23 | |
21:23
ldwrf left,
ldwrf_ joined,
nightfrog joined
21:26
ldwrf_ left
21:28
nightfro` joined
21:30
nightfrog left,
nightfro` is now known as nightfrog
21:36
ribasushi left
21:37
Tonik left
21:39
dainis left,
ribasushi joined
|
|||
dalek | c: 9f1fe4f | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6: link to subsignatures |
21:40 | |
gfldex | Sisyphus told me how to finish the docs. :-> | 21:41 | |
m: say ⸨1,(2,)⸩; | 21:46 | ||
camelia | rakudo-moar 1035ed: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat <tmp>:1------> 3say7⏏5 ⸨1,(2,)⸩;Bogus postfixat <tmp>:1------> 3say 7⏏5⸨1,(2,)⸩; expecting any of: infix infix stopper pos…» | ||
konobi | pmurias: yeah, i seems like it might be caught in some sort of bootstrap loop | 21:48 | |
21:54
dainis joined
|
|||
konobi | pmurias: github.com/konobi/nqp/tree/konobi-tidy | 21:54 | |
dalek | c: 8edb16d | (Wenzel P. P. Peppmeyer)++ | doc/Language/packages.pod6: add pseudo packages to index |
22:06 | |
22:08
setty1 joined
|
|||
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» | ||
masak | rt.perl.org/Ticket/Display.html?id=126975 | ||
22:12
pmurias left
22:19
bpmedley joined
22:22
sena_kun left,
grondilu_ left
22:30
canopus left
22:35
dainis left
22:36
canopus joined,
lichtkind left
22:38
huggable joined
22:46
firstdayonthejob left
22:50
socomm joined
|
|||
socomm | Is Larry Wall here? | 22:51 | |
masak | he's been known to appear in various guises, yes | 22:52 | |
would you like to relay a message? | |||
socomm | Live long and prosper. \/ | ||
masak | consider it relayed | 22:53 | |
22:54
socomm left
|
|||
masak | ...and come back soon | 22:54 | |
gfldex | i just found use for: sub infix:<|,>(@l, @r){ |@l, |@r} | 22:55 | |
in: my @exclude = <. ..>|, $exclude.split(','); | |||
(i don't like flat) | 22:56 | ||
23:00
spider-mario left
23:04
Actualeyes left
|
|||
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. | ||
masak | gfldex: that looks to me like it should be a chaining operator | 23:11 | |
BenGoldberg thinks it looks like linenoise. | 23:18 | ||
23:18
aindilis left
|
|||
BenGoldberg | What happens if you wrote: my @excluse = <. ..>, slip($excluse.split(',')); ? | 23:18 | |
masak | BenGoldberg: did you mean `;` ? | 23:19 | |
oh, wait. you didn't. | |||
BenGoldberg | m: my $ex = 'a,b,c'; my @e = <. ..>, $ex.split(',').slip; @e.say; | ||
camelia | rakudo-moar 373634: OUTPUT«Method 'slip' not found for invocant of class 'List' in block <unit> at <tmp> line 1» | ||
BenGoldberg | m: my $ex = 'a,b,c'; my @e = <. ..>, slip($ex.split(',')); @e.say; | ||
camelia | rakudo-moar 373634: OUTPUT«[(. ..) a b c]» | ||
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]» | ||
masak | seems to work OK. | ||
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«5===SORRY!5=== Error while compiling <tmp>Missing comma after block argument to mapat <tmp>:1------> 3sub infix:<slippy> { map { .Slip }7⏏5 @_ }; my $ex = 'a,b,c'; my @e = <. ..>  expecting any of: infix infix s…» | ||
BenGoldberg | m: sub infix:<slippy> { map *.Slip, @_ }; my $ex = 'a,b,c'; my @e = <. ..> slippy $ex.split: ','; @e.say; | ||
camelia | rakudo-moar 373634: OUTPUT«[. .. a b c]» | ||
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:25 | |
23:26
girafe left
23:28
AlexDaniel left
23:37
s34n_ joined
|
|||
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")]» | ||
gfldex | m: sub infix:<|,>(@l, @r){ |@l, |@r}; dd [<a b c> |, (1,2,3) |, <d e f>] | ||
camelia | rakudo-moar 373634: OUTPUT«["a", "b", "c", 1, 2, 3, "d", "e", "f"]» | ||
gfldex | BenGoldberg: compare the the two ^^^ | 23:41 | |
m: dd [|<a b c>, |(1,2,3), |<d e f>] | |||
camelia | rakudo-moar 373634: OUTPUT«["a", "b", "c", 1, 2, 3, "d", "e", "f"]» | ||
23:43
girafe joined
|
|||
gfldex | ,| is more like a list constructor that creates a flat list. Calling .Slip on each element looks a bit like an afterthought. | 23:44 | |
dalek | c: be93ca1 | (Wenzel P. P. Peppmeyer)++ | / (2 files): add util/extract-examples.p6 and make target extract-examples |
23:46 | |
s34n_ | class A { has $.b; method c(){...} method d(){ return ->{return $.c); } <-- do all the $. point to A? | 23:49 | |
23:49
aindilis joined
|
|||
timotimo | $.foo is just sugar for self.foo | 23:50 | |
23:50
tbrowder left
|
|||
s34n_ | rather, class A { has $.b; method c(){...} method d(){ return ->{return $.c}; }} | 23:50 | |
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 | ||
not necessarily | |||
could be an instance of a class that derives from A | |||
s34n_ | perfect | ||
23:51
cdg left
|
|||
s34n_ | it's the invocant of d, right? | 23:51 | |
23:52
cdg joined
|
|||
timotimo | that's right | 23:52 | |
exact same as if you had something like "my $theself = self;" before the ->{...} and then using $theself inside the block | |||
23:56
cdg left
|