»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:02 pecastro left 00:18 emerson joined, p6bannerbot sets mode: +v emerson 00:20 Kaypie left, Kaypie joined, p6bannerbot sets mode: +v Kaypie 00:22 w_richard_w joined, p6bannerbot sets mode: +v w_richard_w
Juerd m: class Foo { has uint16 $.length; has uint32 @.foo[$!length]; }; my $foo = Foo.new(length => 42); # :( 00:30
camelia Cannot look up attributes in a VMNull type object
in block <unit> at <tmp> line 1
Juerd What's a VMNull?
timotimo there's a low-level (well, mid-level, really) null value 00:31
i think the lookpu for $!length happens too early for this to work 00:32
Juerd That's unfortunate :(
Is there a way to impose a maximum index afterwards?
timotimo can always have a "where" clause 00:33
Juerd I'm looking to extend github.com/p6-pdf/Native-Packing-p6 00:34
It's common to have length prefixes in binary data
I shouldn't have said "impose" because I'm not that concerned about actually using the variable, I'm actually after introspecting the length 00:35
So that the right number of bytes can be read and the right number of elements can be added
timotimo perhaps it will work better to have a trait for that 00:37
Juerd Perhaps
timotimo having $!length there is a little problematic, since $!length can change at any time
and i don't think it'd be good to throw an exception at that point when there's too many items in the array to "shrink" it
Juerd m: my $foo = 5; my @bar[$foo]; say @bar.elems; $foo = 1; say @bar.elems 00:38
camelia 5
5
Juerd Shouldn't be too big a problem
But it's a good reason to learn how to use traits, I guess :) 00:39
I can't find documentation on creating traits 00:42
timotimo multi sub trait_mod:<is>(Attribute $a, :$traitname!) { #`( do something with the attribute object ) }
but yeah, docs would be good
Juerd Thanks 00:44
Unfortunately, traits seem to be too early as well; same VMNull 00:45
m: multi sub trait_mod:<is>(Attribute $a, :$length-prefixed!) { }; class Foo { has int $.length; has int @.foo is length-prefixed($!length); }; my $foo = Foo.new(); 00:46
timotimo well, yeah, they run at compile time
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot look up attributes in a VMNull type object
at <tmp>:1
Juerd Maybe a role...
timotimo try a string? :)
or a parameterized role
yeah
Juerd An exception occurred while parameterizing ... 00:47
Cannot look up attributes in a VMNull type object
Nice.
At least it's consistent :)
Let's tweak, er TWEAK.
"This REPR cannot change type." Darn. 00:49
lookatme_q Seems like cannot access the $!length 00:50
Juerd Next attempt: trait with closure 00:52
00:52 cy_d_fect left
Juerd Oh, but in the trait_mod, the instance is not available either 00:53
timotimo not only that
the class is also not yet composed
anything that comes textually after the trait will not yet exist either
Juerd I really hoped to be able to extend this brilliant way of defining unpack templates :( 00:54
But it doesn't seem to be possible to do so declaratively
00:54 ryn1x joined
timotimo iirc people tend to mix in a role into the Attribute object that has a compose method or so 00:55
00:55 p6bannerbot sets mode: +v ryn1x
timotimo i haven't touched traits in a long time 00:55
Juerd The most common case might still work, if I just pass the type directly 00:56
Instead of { has uint32 $.length; has uint32 @foo does Length[$!length]; } it'd be { has uint32 @foo does Length[uint32]; } 00:57
But that wouldn't work if the length is defined first, then something else, and then the array items.
timotimo when the length is immediately in front of the value?
right 00:58
i'd say go with the name of the attribute passed as a string
Juerd Hmmm
timotimo and i think you can't "does" it like that
to apply a trait to the attribute, i think you have to go through a trait
Juerd Can't does a native at all it seems
lookatme_q Is fixed-size native array available ? 01:00
Juerd lookatme_q: Is that question related to what I'm doing or separate? 01:01
lookatme_q :) Maybe the native array part ? 01:02
I just thought about that
Juerd m: role Lengthed[$a] { }; multi sub trait_mod:<is>(Attribute $a, :$length-prefixed!) { $a does Lengthed[$length-prefixed] }; class Foo { has int @.foo is length-prefixed(uint32); }; my $foo = Foo.new().^attributes[0].^roles[0].^role_arguments[0].say
camelia (uint32)
Juerd I'm getting dizzy :)
At least this is something that could work
Three levels of meta deep is not something I'm used to :) 01:04
timotimo i'm going to bed 01:06
o/ 01:07
Juerd Good night, thanks for the help :)
timotimo YW
01:16 ryn1x left 01:20 ryn1x joined, p6bannerbot sets mode: +v ryn1x 01:33 ZzZombo left 01:53 benjikun left 02:05 khisanth_ left 02:06 benjikun joined 02:07 p6bannerbot sets mode: +v benjikun 02:12 tharkun joined, p6bannerbot sets mode: +v tharkun 02:13 lucs joined, p6bannerbot sets mode: +v lucs 02:17 khisanth_ joined 02:18 p6bannerbot sets mode: +v khisanth_ 02:20 ryn1x left 02:24 benjikun left 02:25 ryn1x joined 02:26 p6bannerbot sets mode: +v ryn1x 02:30 leont left 02:39 finanalyst joined 02:40 w_richard_w left, p6bannerbot sets mode: +v finanalyst, ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 02:45 kerframil left, kerframil joined, p6bannerbot sets mode: +v kerframil 02:50 ryn1x left 02:51 molaf left 02:52 ryn1x joined 02:53 p6bannerbot sets mode: +v ryn1x 02:57 ryn1x left 02:59 ryn1x joined 03:00 p6bannerbot sets mode: +v ryn1x 03:02 benjikun joined, p6bannerbot sets mode: +v benjikun 03:04 molaf joined 03:05 p6bannerbot sets mode: +v molaf 03:08 ryn1x left 03:14 ufobat_ joined 03:15 p6bannerbot sets mode: +v ufobat_ 03:18 ufobat___ left 03:19 ZzZombo_ joined, p6bannerbot sets mode: +v ZzZombo_, ryn1x joined 03:20 p6bannerbot sets mode: +v ryn1x, ZzZombo left, ZzZombo_ is now known as ZzZombo
holyghost I need to use for flat ^$n, ^$m -> $row, $col in the matrix ctor 03:22
Mathx::Matrix 03:23
03:45 ferreira left
holyghost it's in with some tests 03:55
04:11 Xliff left, Cabanossi left 04:12 Cabanossi joined
buggable New CPAN upload: WebService-Discourse-0.1.0.tar.gz by AZAWAWI cpan.metacpan.org/authors/id/A/AZ/...1.0.tar.gz 04:12
04:12 p6bannerbot sets mode: +v Cabanossi 04:15 mattp_ joined 04:16 p6bannerbot sets mode: +v mattp_ 04:19 benjikun left 04:23 ZzZombo left 04:38 finanalyst left 04:55 molaf left 04:58 molaf joined 04:59 p6bannerbot sets mode: +v molaf 05:03 molaf left
holyghost If someone wants to test Mathx::Matrix, it's on github.com/theholyghost2 05:07
05:20 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo
holyghost So if I understand atribute core pointers are cored as they're not immutable 05:40
05:40 Kaypie left 05:41 Kaypie joined
holyghost then give it a "is rw" or something for access within a class and then there's @! and @., nice 05:41
05:41 p6bannerbot sets mode: +v Kaypie
holyghost Lisp accessors 05:42
CLOS
05:42 curan joined, p6bannerbot sets mode: +v curan
holyghost I think I 'm beginning to see how the object model works 05:43
it's lisp where everything though is public with smalltalk roles
in CLOS Lisp I mean 05:44
:accessor
So we have our own OOP paradigm/programming system
05:45 ryn1x left
holyghost it's above a quadruple system like public,private,protected 05:45
Objective-C has immutable types such as NSArray 05:46
and mutable as NSMutableArray *a;
We didn't gain on that one, Apple's coolness
but we did get a typeless language in other ways 05:47
CLOS is more difficult to program than perl6 except for perlisms 05:48
perl6isms
05:50 delon joined, p6bannerbot sets mode: +v delon
holyghost You could do class C { private: explicit C new(); } maybe in the same sort of way in C++ 05:54
06:05 kdr23 left 06:06 kdr24 joined, p6bannerbot sets mode: +v kdr24 06:13 molaf joined
ufobat_ masak, thank you :-) 06:13
06:13 p6bannerbot sets mode: +v molaf 06:21 jmerelo joined 06:22 p6bannerbot sets mode: +v jmerelo, sauvin joined, p6bannerbot sets mode: +v sauvin 06:24 molaf left, finanalyst joined 06:25 p6bannerbot sets mode: +v finanalyst 06:31 R3sol joined, p6bannerbot sets mode: +v R3sol 06:37 Sgeo_ joined 06:38 p6bannerbot sets mode: +v Sgeo_ 06:40 Sgeo__ left 06:43 rba left 07:09 domidumont joined 07:10 p6bannerbot sets mode: +v domidumont
El_Che Juerd: It.'s rather dormant, but does what you want: github.com/nxadm/StrictNamedArguments 07:11
Juerd: feel free to change stuff 07:12
07:12 Sound joined, p6bannerbot sets mode: +v Sound
tadzik heh, reminds me of my github.com/tadzik/ClassX-StrictConstructor 07:13
El_Che a role, nice 07:18
I remember being annoyed as Juerd and glfdex showing me how to do it. Haven't used it much, though. 07:20
Coming from 'use script', I consider strict new methods a good thing, but them bot being strict seems to be a feature. 07:21
07:23 troys left 07:24 sena_kun joined 07:25 p6bannerbot sets mode: +v sena_kun
andrzejku .seen araraloren 07:35
yoleaux I saw araraloren 4 Nov 2018 16:06Z in #perl6: <araraloren> Zoffix okay, thanks :)
07:35 jmerelo left
holyghost El_Che: how are you ? Awake in the city of Anwterp ? 07:42
s/Anwterp/Antwerp 07:43
I've am on the point of releasing Mathx::Matrix
for buxelles.pm.or 07:44
s/or/org
I'm compiling 2018.10 right now
El_Che on the train, atm 07:46
holyghost ok, so you're visiting ? 07:47
Go through the Kennedy tunnel then probably
07:48 robertle joined
El_Che no, to Leuven 07:48
holyghost ok
I have lived for 2 years at demospel.be
07:48 p6bannerbot sets mode: +v robertle
holyghost I magiced there and bought minis there which was the old spelfanaat 07:49
spelfanaat still exists in Mechelen
it's based on St.-Jacob's square
finanalyst .seen jj
yoleaux I saw JJ 4 Mar 2018 12:04Z in #perl6: <JJ> Thanks to you all! It's been a pleasure (in a weird kind of way). Cheers!
holyghost anyway, good trip
finanalyst .seen jmerelo 07:50
yoleaux I saw jmerelo 13 Nov 2018 08:23Z in #perl6: <jmerelo> Cheers!
holyghost I bought a kanarie 2 weeks ago, he's whistling here in my appartment 07:52
right now :-)
I gave him some mandarijnen (small St. Nicolas oranges) 07:53
he's ok 07:55
08:07 rindolf joined, rindolf left
holyghost here's picture of the kanarie : www.mediafire.com/folder/7lownzd99b3za/ 08:07
today
08:12 kdr24 left 08:19 rindolf joined 08:20 p6bannerbot sets mode: +v rindolf 08:23 Sound left 08:39 kdr24 joined, p6bannerbot sets mode: +v kdr24 08:43 xoryo left 08:44 xoryo joined, p6bannerbot sets mode: +v xoryo 08:45 dakkar joined 08:46 p6bannerbot sets mode: +v dakkar, xoryo left, xoryo joined, adams.freenode.net sets mode: +v xoryo, p6bannerbot sets mode: +v xoryo 08:49 xoryo left, xoryo joined, adams.freenode.net sets mode: +v xoryo, p6bannerbot sets mode: +v xoryo 09:06 cy_d_fect joined 09:07 p6bannerbot sets mode: +v cy_d_fect 09:11 zakharyas joined 09:12 p6bannerbot sets mode: +v zakharyas 09:19 rba joined 09:20 p6bannerbot sets mode: +v rba
holyghost perl6 --backend=moar installed 09:30
09:36 xinming left 09:43 scimon joined, p6bannerbot sets mode: +v scimon
scimon So a couple of the modules I plan to talk about at the LPW on the 24th are under development (Red and Cro for instance). 09:44
If anyone is working on a Module (even if they haven't released it yet) and would like me to take a look and maybe cover it (I'm doing 24 with a couple of minutes for each) drop me a line. 09:45
(I should probably tweet this too).
holyghost scimon: _FWIW_ Game::Markov, Bayes::Learn 09:55
Bayes::Learn : RPG huptheses, Game::Markov : the timing module and Variances 09:56
like Rao-Blackwell
LPW is probably LinuxPW ? 09:57
they're on github.com/theholyghost2, cpan does not follow
Bayes::Learn is for now brute force Bayesian Infierence 09:58
Game::Markov is Variance/Estimate calculations on samples 09:59
such as in Mathx::Stat
it's more or less game theory, if you want to talk about them
Bayesian Inference is the answer of M$ to age of empires 10:02
It can be used as RPG actions/strategies/hypotheses
every low chance can be used
they are decision theory 10:03
timotimo holyghost: no offense, but your modules don't have a track record of working, so might not be the best material for a talk
holyghost Game:::Markov calculates variances, if you understand a (standard) uniform distribution 10:04
timotimo: scimon said "modules which you;re working on", I mentioned github not CPAN
timotimo: Xliff's server is almost ready for me, so I can get them compiled by 24th (maybe) 10:05
s/compiled/compiled and working
I progressed with Bayes::Learn this week for example, but never mind
timotimo well, they said "[if you] would like me to take a look and maybe cover it" 10:06
holyghost People just don't follow everything
timotimo: there's quite some usefull maths in there
timotimo bayes::learn doesn't seem to have any tests. does it compile? 10:07
holyghost It compiled here 4 days ago
timotimo i see a couple of problems in the code that were also in the other modules
holyghost I know, I was wrong with the .population syntax 10:08
timotimo mostly using ".blah" instead of "self.blah"
yeah
and it'd be good if you used "submethod BUILD" instead of "method BUILD"
holyghost ok
timotimo check out the difference: 10:09
class Base { method BUILD { say "building Base" } }; class Child is Base { }; class ChildChild is Child { }; class ChildChildChild is ChildChild { }; ChildChildChild.new
evalable6 building Base
building Base
building Base
building Base
timotimo m: class Base { submethod BUILD { say "building Base" } }; class Child is Base { }; class ChildChild is Child { }; class ChildChildChild is ChildChild { }; ChildChildChild.new
camelia building Base
holyghost anyway, I might make it when using perl6 on a server, my old perl6 is a bit broken
I see, thanks 10:10
timotimo since methods get inherited, it will call the BUILD method once for every class in the hierarchy
holyghost I knew that
timotimo ok 10:11
holyghost If I get onto Xliff's server, I can fully debug, then it might be ready within a few days
I'm sorry my system is broken
else I'd debug it myself of course 10:12
timotimo: really appreciate your input
I'm going to try to fix Bayes:Learn as we said 10:14
now :-)
timotimo i'm sorry i'm so harsh, it's just my workflow is perhaps the opposite of yours, where there's pretty much little bits of running code right from the start, and it almost always compiles just fine 10:15
10:23 rba_ joined 10:24 p6bannerbot sets mode: +v rba_ 10:25 rba left 10:31 rba joined 10:32 p6bannerbot sets mode: +v rba, rindolf left 10:34 rba_ left
holyghost if fixed it without tests 10:34
s/if/I've
10:37 finanalyst left 10:38 finanalyst joined, p6bannerbot sets mode: +v finanalyst 10:39 rindolf joined 10:40 p6bannerbot sets mode: +v rindolf 10:43 finanalyst left, finanalyst joined 10:44 p6bannerbot sets mode: +v finanalyst 10:46 rba_ joined 10:47 p6bannerbot sets mode: +v rba_ 10:49 rba left 10:52 kerframil left
masak because traits come after the parameter list, does that mean that a user-defined operator can not be used in its own parameter list? 10:54
or can it be used, but with the wrong precedence/associativity?
(not advocating doing this, just curious about the semantics) :)
timotimo perhaps not as operators, but surely as sub calls with their full name 10:55
masak oh for sure. I was thinking about operators, though.
timotimo right 10:56
it would definitely end up surprising you either way :D 10:57
but yeah, i'd assume at the very least prec/assoc would be "wrong" like you said
m: sub test($a, $b = test(1, 2)) { 99 }; say test(1)
camelia 99
timotimo m: sub test($a, $b = test(1, 2)) { say "a is $a, b is $b"; 99 }; say test(1) 10:58
camelia a is 1, b is 2
a is 1, b is 99
99
timotimo that's fun
it's obvious that it ought to work, it's just fun 10:59
11:01 rba joined 11:02 p6bannerbot sets mode: +v rba 11:03 rba_ left 11:09 tobs` joined, domidumont left 11:10 p6bannerbot sets mode: +v tobs` 11:11 finanalyst left 11:13 cy_d_fect left
masak m: sub test(&x = &test, &test = &x) { say &test() }; test(-> { "OH HAI" }) 11:13
camelia OH HAI
masak "don't try this at home" 11:14
11:16 rba_ joined 11:17 p6bannerbot sets mode: +v rba_
Woodi masak: Rakudo announcements say about edvanced macros - what actually is expected to have ? 11:17
sena_kun it matches in a lazy(well, not the right word here) manner, firstly &x is assigned, then &test gets its value. looks recurs-y, but it isn't! .oO ( that's why I tried it at home )
11:18 rba left 11:19 gregf_ joined, p6bannerbot sets mode: +v gregf_
Geth_ doc: interlab++ created pull request #2461:
fix output value for ^^ operator
11:20
SmokeMachine scimon: are you planning to talk about Red? Are you using Red? What are you thinking of it? 11:24
11:26 Actualeyes joined, p6bannerbot sets mode: +v Actualeyes 11:31 rba joined 11:32 p6bannerbot sets mode: +v rba 11:33 rba_ left
Geth_ doc: a1065a88a0 | (Innokenty Shniperson)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
fix output value for ^^ operator
11:34
doc: 39d580d498 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
Merge pull request #2461 from interlab/patch-2

fix output value for ^^ operator
synopsebot_ Link: doc.perl6.org/language/operators
11:46 rba_ joined 11:47 p6bannerbot sets mode: +v rba_ 11:49 rba left 12:01 rba joined 12:02 p6bannerbot sets mode: +v rba 12:03 rba_ left
masak Woodi: in the short term: the four things from github.com/masak/007/blob/7a312a90...priorities 12:06
in the long term, everything to do with `is parsed` and language extension too
Woodi: I'm really happy about this question -- let me know if you need some more information! 12:07
timotimo i'm also looking forward to being able to macro my macros 12:08
masak yes, sure, but that's not a specific feature, any more than function recursion is ;) 12:11
when I set out to implement macros, I thought that any kind of macro recursion would be meaningless, since at the point of the call we haven't even finished parsing the calling macro (!) 12:12
timotimo true
masak but I gradually realized that it does make sense, because quasi quotes don't expand their macros until they're interpolated -- so there's a little bit of breathing room added there
timotimo jemand möchte zu besuch kommen! heute abend! 12:15
zeit zu putzen
ww!
12:17 rba_ joined, p6bannerbot sets mode: +v rba_ 12:18 rba left 12:21 cy_d_fect joined 12:22 p6bannerbot sets mode: +v cy_d_fect 12:31 rba joined 12:32 p6bannerbot sets mode: +v rba
Woodi masak: reading... 12:32
12:33 rba_ left
Woodi masak: I wonder is debugging a kind of macro, runtime maybe ? eg. execution hits breakpoint and an than variables and registers can be checked, values can be changed... or it is another category ? :) 12:34
masak it's outside of the scope of what I'm calling macros :) 12:35
Woodi what about self-modifing code ? it results in similiar brain-twist like macros :)
masak what about it? :)
Woodi just trying to understand that macro business... 12:36
masak yeah, tell me about it
Woodi looking for something magically more general, what could untwist tinking about macros :) 12:38
masak I can tell you with a confidence bordering on certainty after thinking about this for some years now: there's nothing that will untwist thinking about macros :P
the next best thing is that one's own brain twists into the right shape, slowly, gradually, to be able to accommodate thinking about macros 12:39
scimon SmokeMachine: I was going to talk about Red I've not used it yet but it does look very impressive (And I generally don't like ORM's) and I thought it was worth mentioning. :) 12:42
12:44 zakharyas left, yqt joined
Woodi masak: actually, it is like this with learning something :) eg. driving, aikido, karate :) at some point you even start to see in split second what part of the palm hit the target :) 12:45
12:45 p6bannerbot sets mode: +v yqt
Woodi just once noticed someone had better vision abilities :) 12:45
scimon holyghost: I shall take a look at them. 12:46
12:46 rba_ joined
Woodi probably becouse brain don't store words or visions, all just neurons... 12:47
Woodi goes for coffe
12:47 p6bannerbot sets mode: +v rba_
lizmat weekly: medium.com/@jcoterhals/perl-6-smal...0c194ea455 12:48
notable6 lizmat, Noted!
12:48 rba left
kurahaupo Woodi: cameras don't capture visions either, it's all just pixels … 12:49
Woodi kurahaupo: but cameras don't remember ! and not learn :) 12:57
12:57 sftp left 12:59 sftp joined, p6bannerbot sets mode: +v sftp 13:01 rba joined 13:02 p6bannerbot sets mode: +v rba 13:04 rba_ left 13:06 Kaypie left, Kaypie joined 13:07 p6bannerbot sets mode: +v Kaypie 13:08 x[LGWs4x4i]uG2N0 left, x[LGWs4x4i]uG2N0 joined
SmokeMachine scimon: was going to talk? not any more? 13:08
13:09 p6bannerbot sets mode: +v x[LGWs4x4i]uG2N0
SmokeMachine scimon: :( 13:09
13:16 rba_ joined 13:17 p6bannerbot sets mode: +v rba_ 13:18 rba left 13:25 kurahaupo left 13:26 kurahaupo joined, p6bannerbot sets mode: +v kurahaupo
scimon SmokeMachine: So I'm doing a talk on 24 Perl6 modules (because it was the random idea I had) because I wanted to give people an idea of the areas people are using the language in. 13:28
I've not had the time to use it for anything because I don't get to devote a huge amount of time to coding outside of work and I haven't convinced work Perl6 is a valid option yet. 13:29
(Sorry I think the use of past tense was off there. I meant I was *already* going to talk about it. It was on my list already. As opposed to I am now adding it to my slides. 13:30
I indeed AM going to talk about it. I just use English in a weird way sometimes I guess.
13:31 rba joined
lizmat hopes Object::Delayed is on it 13:32
13:32 p6bannerbot sets mode: +v rba 13:34 rba_ left
holyghost scimon: yeah take a look, it could be that they don't work but it's useful math 13:35
13:35 kensanata joined, p6bannerbot sets mode: +v kensanata
holyghost scimon: statistics/game theory 13:35
I'm going to go to bed soon
worked 5 hours for pm
SmokeMachine scimon: that probably was my fault... I have a weird english on my weirder head... :) but thanks! where will be the talk? will it be streamed? 13:36
Woodi seriously needs browser accesible via vnc-likes somewhere on the internets... with sessions... 13:38
13:39 molaf joined 13:40 p6bannerbot sets mode: +v molaf 13:46 rba_ joined 13:47 p6bannerbot sets mode: +v rba_ 13:48 rba left 13:50 Kaypie left, Kaypie joined 13:51 p6bannerbot sets mode: +v Kaypie 13:56 andrzejku left 13:59 zakharyas joined 14:00 p6bannerbot sets mode: +v zakharyas 14:03 kensanata left, rba_ left 14:09 finanalyst joined 14:10 Kaypie left, p6bannerbot sets mode: +v finanalyst
holyghost I'm drinking 1 pint then I go off to bed, see you tomorrow at 4am :-) 14:14
14:15 kdr24 left
holyghost .tell Xliff I will mail you tomorrow morning, I forgot about passed servers 14:16
yoleaux holyghost: I'll pass your message to Xliff.
scimon SmokeMachine: London Perl Workshop on the 24th of November. Not sure about the streaming. Possibly as I think they can reuse the tech from TPCiG. 14:33
14:34 leont joined 14:35 p6bannerbot sets mode: +v leont
holyghost scimon: good luck ! 14:36
holyghost is AFK ATM
14:39 molaf left 14:42 kdr24 joined 14:43 p6bannerbot sets mode: +v kdr24 14:52 Sound joined, p6bannerbot sets mode: +v Sound 14:54 Sound left, rba joined 14:55 rba left 15:09 curan left 15:24 dakkar left, dakkar joined 15:25 p6bannerbot sets mode: +v dakkar, molaf joined 15:26 p6bannerbot sets mode: +v molaf, cy_d_fect left 15:30 angelds joined, p6bannerbot sets mode: +v angelds 15:37 angelds left, scimon left 15:38 kudzo__ joined 15:39 p6bannerbot sets mode: +v kudzo__ 15:40 scimon joined, b2gills left 15:41 p6bannerbot sets mode: +v scimon, kudzo_ left
buggable New CPAN upload: ArrayHash-0.4.tar.gz by HANENKAMP modules.perl6.org/dist/ArrayHash:cpan:HANENKAMP 15:42
15:42 scimon left, lcsr joined, scimon joined 15:43 p6bannerbot sets mode: +v lcsr, p6bannerbot sets mode: +v scimon 15:44 b2gills joined, p6bannerbot sets mode: +v b2gills 15:51 molaf left 15:56 finanalyst left 16:00 cy_d_fect joined, p6bannerbot sets mode: +v cy_d_fect 16:04 ferreira joined, scimon left, p6bannerbot sets mode: +v ferreira 16:11 Kaiepi joined, p6bannerbot sets mode: +v Kaiepi 16:12 scimon joined 16:13 p6bannerbot sets mode: +v scimon 16:15 robertle left 16:27 domidumont joined 16:28 p6bannerbot sets mode: +v domidumont 16:29 lcsr left 16:32 lichtkind joined 16:33 p6bannerbot sets mode: +v lichtkind
[Coke] wonders why perl.com is posting recent articles about how to use CGI.pm 16:34
timotimo sadism? 16:35
or is it masochism?
lichtkind if i have an optional boolean argument i set it true with $obj.method( :arg ) ?
timotimo yeah, :arg is short for arg => True
lichtkind timotimo, thanks now i have to find out why its not working here :) 16:36
timotimo could be many things. a typo for example? or dispatch to the wrong multi method?
since methods accept any and all named arguments silently 16:37
lichtkind timotimo, there are no multi
timotimo, sig is (Math::Matrix:D: Bool :$strict = False --> Bool)
timotimo, i got it its way more basic and stupid, i got tricked by self built lazy attr 16:38
timotimo oh, OK :) 16:40
16:42 zakharyas1 joined 16:43 p6bannerbot sets mode: +v zakharyas1, zakharyas left
[Coke] anyone interested in writing a Perl 6 article for them, see: www.perl.com/article/how-to-write-...-perl-com/ 16:50
16:55 robertle joined, p6bannerbot sets mode: +v robertle 17:06 gregf_ left 17:12 scimon left 17:17 scimon joined 17:18 p6bannerbot sets mode: +v scimon
leont [Coke]: yeah that article was painful 17:19
timotimo don't we have slightly kinder words for that? 17:24
misguided perhaps?
it offers a look into a different mindset
17:29 ferreira left
leont As a community we've been trying to move people away from CGI and especially CGI.pm. 17:29
Its own documentation mentions "CGI.pm is no longer considered good practice for developing web applications, including quick prototyping and small web scripts" 17:30
17:31 ferreira joined
leont Even raw Plack is generally considered a better idea 17:31
17:31 kurahaupo left, kurahaupo joined, p6bannerbot sets mode: +v ferreira 17:32 scimon left, p6bannerbot sets mode: +v kurahaupo 17:35 dakkar left 17:37 kdr2 joined 17:38 p6bannerbot sets mode: +v kdr2, ChoHag_ joined, ChoHag left 17:39 p6bannerbot sets mode: +v ChoHag_, kdr24 left 17:52 tobs` left
El_Che leont: we suck at doing stuff as a community, but CGI is indeed a weird move 17:56
18:14 haukex joined 18:15 p6bannerbot sets mode: +v haukex 18:26 spaz joined, p6bannerbot sets mode: +v spaz 18:27 spaz left 18:35 cy_d_fect left
lichtkind how i spec array of int in a sigß 18:36
?
lizmat m: sub a(int @a) { dd @a }; a my int @ = 1,2,3 18:37
camelia array[int].new(1, 2, 3)
lichtkind lizmat, hugs 18:39
lizmat *blush*
lichtkind dont worry i dont tell wendy 18:40
18:45 pecastro joined
lichtkind m: sub a (array[int] @a){say @a}; a([1,2,3]) 18:45
camelia Type check failed in binding to parameter '@a'; expected Positional[array[int]] but got Array ($[1, 2, 3])
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
18:45 p6bannerbot sets mode: +v pecastro
lichtkind m: sub a (Numeric @a){say @a}; a([1,2,3]) 18:46
camelia Type check failed in binding to parameter '@a'; expected Positional[Numeric] but got Array ($[1, 2, 3])
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat lichtkind: [1,2,3] is *not* a native int array
lichtkind lizmat, so there is no way to do what i want? 18:47
lizmat I'm not sure what you want ? 18:48
lichtkind lizmat, sorry i want signature which checks that an incoming list/array is only full of numbers 18:55
lizmat m: sub a(Int *@a) { dd @a }; a 1,2,3 # alas, that's NYI 18:56
camelia 5===SORRY!5=== Error while compiling <tmp>
Slurpy positional parameters with type constraints are not supported
at <tmp>:1
------> 3sub a(Int *@a7⏏5) { dd @a }; a 1,2,3 # alas, that's NY
expecting any of:
constraint
lichtkind lizmat, thank you but its not the only parameter
lizmat well, this would allow you to do multiple 18:57
m: sub a(*@a where { Rakudo::Internals.ALL_TYPE(@a,Int) } ) { dd @a }; a 1,2,3 18:59
camelia Array element = [1, 2, 3]
lizmat ^^ that does what you want using an internal method
lichtkind but thats not for production code :) 19:00
lizmat m: sub a(*@a where { @a.all ~~ Int } ) { dd @a }; a 1,2,3 # using junctions
camelia Array element = [1, 2, 3]
lizmat m: sub a(*@a where { @a.all ~~ Int } ) { dd @a }; a 1,2,"foo"
camelia Constraint type check failed in binding to parameter '@a'; expected anonymous constraint to be met but got Array ($[1, 2, "foo"])
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
lichtkind i currently using something of than nature but was cuious if there is something more perl6y
19:01 proc joined, p6bannerbot sets mode: +v proc 19:02 dogbert11 left 19:07 cydf joined 19:08 p6bannerbot sets mode: +v cydf
lizmat m: sub a(*@a where { .all ~~ Int } ) { dd @a }; a 1,2,3 # golf 19:09
camelia Array element = [1, 2, 3]
19:10 benjikun joined 19:11 p6bannerbot sets mode: +v benjikun 19:17 pmurias joined, p6bannerbot sets mode: +v pmurias 19:18 proc left
pmurias does it make sense to have rakudo.js use www.npmjs.com/package/jsbi rather than wait for bignums to get implemented in firefox? 19:18
El_Che pmurias: is the dependency used only on firefox?
asking for a friend that's also a FF user :) 19:19
pmurias jsbi uses native bignums when they are available and pure js ones where they aren't (FF and chrome spinoffs with old chrome guts) 19:22
19:22 ExtraCrispy left
El_Che pmurias: it has zero dependencies 19:23
it looks like a good compromise for now
it does not import the kitchensink
pmurias: FF is pretty popular with techies and they are the first target at first, I imagine
pmurias a lot of people on #perl6 seem to be using super weird browsers 19:25
sena_kun uses FF, for example.
19:26 sauvin left
El_Che pmurias: don't tell me you're surprised :) 19:26
pmurias El_Che: I'm surprised some of them exist
sena_kun: FF should get bignums someday soon (I'm spying on their ticket bugzilla.mozilla.org/show_bug.cgi?id=1366287 and they hit some LGPL-- GMP problems but are back on track coping the chrome code) 19:30
haukex pmuritas: imo a polyfill like that is probably a good idea
pmurias but it might take a while till the weirder stuff gets bignum support
sena_kun pmurias, I hope so. Numbers of FF users are decreasing every year, which is sad to see. But, well, disregard that, if you ask me, I'd +1 on polyfill usage. 19:31
El_Che just survived a wireless openwrt router upgrade o/
19:35 pmurias left 19:36 pmurias joined, p6bannerbot sets mode: +v pmurias
[Coke] win 3 19:38
19:41 yqt left 19:47 mornfall joined 19:48 p6bannerbot sets mode: +v mornfall
El_Che [Coke]: you win the window lottery. As price you can choose an alias. 19:49
19:51 zakharyas1 left 19:58 dogbert17 joined 19:59 p6bannerbot sets mode: +v dogbert17
El_Che pmurias: counter argument regarding the JS ecosystem: twitter.com/garybernhardt/status/1...3457514496 19:59
20:02 domidumont left
Woodi El_Che: no... that's not happening... such... such... JS ! 20:04
also could someone drop by to Mozilla office and tell them to copy-paste exporting exporting bookmarks into LDAP from Netscape 4 ? 20:07
El_Che Woodi: I'll bite. Whut? 20:09
Woodi there was Perl6 vs Julia link earlier today, anyone know how to speed up Perl version ? probably v6 version was doing more i/o... 20:10
lizmat Woodi: there are many things that can be done to speed up that code
Woodi El_Che: Netscape4 had browser profile export into LDAP db. after many, many years Mozilla make Sync in Mozilla's db... 20:11
lizmat and I wouldn't be surprised if the parallelization isn't adding more overhead than it's worth
alas, I can't comment on Medium (don't want to add yet another login)
and since Medium is also limiting the number of blogs I can see / month 20:12
El_Che Woodi: I manage a LDAP server setup for 150K live users, and I still don't get it.
lizmat I don't want to further support that
El_Che s/server/27 servers/ :)
Woodi: you want to export bookmarks to a local ldap? 20:13
Woodi El_Che: you use bookmarks ? :) can you have way to export them to LDAP or other db and importing back with a button press in the browser ?
20:13 haukex left
Woodi El_Che: of course ! of course not somewhere behind three oceans ! 20:14
El_Che Woodi: put your profile in a private git repo?
Woodi that's ugly :)
El_Che so is... ok, let's not go there :)
Woodi lizmat: to me looked like Julia code use build in compare func and v6 version have one implemented on spot... 20:15
lizmat I haven't looked at the Julia code, just the P6 code 20:16
pmurias El_Che: the stuff on npm is generally super crazy
El_Che pmurias: 20:18
UPnP is designed to make it easy for computers, printers, phones, and other devices to connect to local networks using code that lets them automatically discover each other. The protocol often eliminates the hassle of figuring out how to configure devices the first time they're connected. But UPnP, as researchers have warned for years, often opens up serious holes inside the networks that use it. In some
cases, UPnP bugs cause devices to respond to discovery requests sent from outside the network. Hackers can exploit the weakness in a way that allows them to take control of the devices. UPnP weaknesses can also allow hackers to bypass firewall protections.
crap
please ignore
sorry
Woodi sure, UPnP - always :) 20:19
pmurias El_Che: jsbi which I'm using is done by google so it's a lot better than random stuff from npm 20:20
El_Che: choose something by google/huge tech company is a super good rule of thumb when choosing js stuff 20:21
El_Che pmurias: I didn't know it was that crazy
we all know of the left-padding fiasco, but this is also really bad 20:22
luckily end users are not affected
pmurias El_Che: I can't tell you what he was installing and what happended 20:24
20:24 uzl joined
pmurias El_Che: in generall packages changing your config files is not expected 20:24
El_Che pmurias: we could add a rakudo install to bump the install base :)
20:25 p6bannerbot sets mode: +v uzl
uzl Hello #perl6! 20:27
Woodi hi uzl 20:28
20:29 _uzl joined, _uzl left 20:31 uzl left
SmokeMachine uses Safari 20:31
20:33 uzl joined, p6bannerbot sets mode: +v uzl
El_Che SmokeMachine: on Windows? 20:33
:)
SmokeMachine El_Che: Mac... 20:34
El_Che jk
we were talking about weird browsers
uzl hello Woodi! 20:35
m: my $x = run 'echo', '"Hi"', :out; say $x.out.get; 20:36
camelia "Hi"
uzl Is it possible to run a bash script inside a .p6 file and store its output? 20:38
lizmat Woodi: cygx worked on that: www.reddit.com/r/perl6/comments/9w...n/e9p9933/
Woodi lizmat: looks much nicer :) 20:40
lizmat I probably would have done $k.lc :)
also: *.comb.head instead of *.comb[0] 20:41
20:41 ChoHag_ left 20:42 ChoHag joined
lizmat also: "$hit\t$dud\t$dist" unless $dist > 0,7 20:42
and lose the next
but yeah, looks much better :-) 20:43
20:43 p6bannerbot sets mode: +v ChoHag 20:46 _uzl joined, _uzl left 20:48 uzl left 21:00 xinming joined 21:01 p6bannerbot sets mode: +v xinming
SmokeMachine m: say StrDistance.new(:before<bla>, :after<bleee>).Int 21:14
camelia 3
SmokeMachine should e encourage to use StrDistance or not? 21:15
Woodi read it as StarDistance... that was like "too many batteries included" :) 21:16
21:17 Kaiepi left
SmokeMachine *we 21:17
21:17 Kaiepi joined 21:18 p6bannerbot sets mode: +v Kaiepi
lizmat SmokeMachine: docs.perl6.org/type/StrDistance so it is documented 21:25
it also appears in tests, but it doesn't appear to be tested itself 21:26
SmokeMachine lizmat: I think it's used to find misspelled methods... right? but users can general use it, right? 21:27
lizmat it's documented 21:29
fwiw, I'm not 100% sure it's intended as a user accessible tool :-)
it's not been optimized in any way, shape or form, that much is sure 21:30
21:31 sena_kun left
Woodi tr/// in old days was doing something other then s///, I'm confused... 21:32
m: my $a = "aabcb"; $a ~~ tr/abc/def/; say $a; say $a.Int 21:39
camelia ddefe
Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5ddefe' (indicated by ⏏)
in block <unit> at <tmp> line 1
leont ufobat_: have an example of the problematic yaml files? 21:40
ufobat_ leont, yeah 21:41
didn't i add small examples in the ticket?
ah you mean where my file origins from? 21:42
leont Yeah
Woodi no, probably me just have problems with readin docs...
leont I have a fix for the comment issue. Not merged yet because I also want to fix another related issue and that one is apparently a bit harder
I've asked about the {bar} issue on #yaml, because the spec is quite clear on that not being allowed, but it seems at least libyaml allows it 21:45
ufobat_ leont, well, I am trying to write openapi 3.0.1 specification with yaml. I might have made a misttake but the online editor editor.swagger.io/ and 2 other online yaml parsers accepted my input 21:46
however, that does not make my yaml valid :-) 21:47
leont Yeah, p5's YAML::XS, which is based on libyaml, also accepts it.
I think most implementations are based on libyaml. Most people aren't insane enough to try to reimplement it :')
21:49 pmurias left
leont Is that something only you do, or is there reason to assume other people also do that? 21:49
ufobat_ leont, swagger.io/docs/specification/path...perations/ <- there is a example where /users/{id} is used 21:50
leont I see 21:51
Apparently, this thing has escaped into the wild, and I guess that means I should propose a change in the spec for 1.3
tinita it's valid
ufobat_ what i am doing is toying around, gitlab.com/ufobat/voteimproved/blo...schema.yml <- with Cro::OpenAPI::RoutesFromDefinition 21:52
good night o/ 21:53
tinita leont: what change would you propose?
leont github.com/Leont/yamlish/issues/24 21:54
tinita hm, I can't see why this should be invalid...
it's not inside of a flow collection
but maybe that's something for #yaml-dev =)
leont I can't really see why that would be invalid either, except for the first character 21:55
tinita "In addition, inside flow collections, or when used as implicit keys, plain scalars must not contain the “[”, “]”, “{”, “}” and “,” characters." 21:57
so it's only forbidden inside flow
leont Then what does "or when used as implicit keys" mean? 21:58
tinita oh, I se ewhat you mean 21:59
what a little "or" can change...
the interesting thing is, hsyaml, which is based on the reference parser, accepts it 22:00
I can't see what ambiguity it would cause outside flow, so of your proposal is to change that sentence, I'm all for it =) 22:01
mornfall so... what's the suggested upgrade path for people who never got really good at perl5 but it's still their first choice for quick/dirty hacks? :p 22:07
lizmat <plug> opensource.com/user_articles/238941/238941 </plug> 22:08
22:20 hamhu3_ left 22:59 ryn1x joined 23:00 p6bannerbot sets mode: +v ryn1x 23:01 dct joined, p6bannerbot sets mode: +v dct 23:02 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 23:08 hamhu3 joined 23:09 p6bannerbot sets mode: +v hamhu3 23:10 hamhu3 left, hamhu3 joined 23:11 p6bannerbot sets mode: +v hamhu3 23:19 kerframil joined, p6bannerbot sets mode: +v kerframil 23:27 Xliff joined 23:28 p6bannerbot sets mode: +v Xliff
Xliff \o 23:28
yoleaux 14:16Z <holyghost> Xliff: I will mail you tomorrow morning, I forgot about passed servers
Xliff Is the best way to write Array.insert($elem, $pos) this: @a = ( |@a[0..$pos], $elem, |@a[$pos..*] ) 23:29
23:32 ryn1x left
timotimo is it allowed to be destructive? 23:33
Xliff ?
timotimo allowed to change the original array
or should it return a copy
Xliff Yeah. I only care about the result.
timotimo then i'd recommend splice
m: my @a = <a b c d e>; @a.splice(3, 0, "hi"); say @a.perl 23:34
camelia ["a", "b", "c", "hi", "d", "e"]
Xliff my @c = <cc bc btc bbc ac>; 23:35
@c.splice(2, 0, 'ec'); @c.say
m: @c.splice(2, 0, 'ec'); @c.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@c' is not declared
at <tmp>:1
------> 3<BOL>7⏏5@c.splice(2, 0, 'ec'); @c.say
Xliff m: my @c = <cc bc btc bbc ac>; @c.splice(2, 0, 'ec'); @c.perl.say
camelia ["cc", "bc", "ec", "btc", "bbc", "ac"]
Xliff timotimo++ # Thanks! 23:36
timotimo :)
23:42 dct left 23:46 lichtkind left 23:52 Sound joined, p6bannerbot sets mode: +v Sound 23:55 benjikun left, pecastro left