»ö« 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.
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
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
timotimo iirc people tend to mix in a role into the Attribute object that has a compose method or so 00:55
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
holyghost I need to use for flat ^$n, ^$m -> $row, $col in the matrix ctor 03:22
Mathx::Matrix 03:23
holyghost it's in with some tests 03:55
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
holyghost If someone wants to test Mathx::Matrix, it's on github.com/theholyghost2 05:07
holyghost So if I understand atribute core pointers are cored as they're not immutable 05:40
holyghost then give it a "is rw" or something for access within a class and then there's @! and @., nice 05:41
holyghost Lisp accessors 05:42
CLOS
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
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
holyghost You could do class C { private: explicit C new(); } maybe in the same sort of way in C++ 05:54
ufobat_ masak, thank you :-) 06:13
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
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
andrzejku .seen araraloren 07:35
yoleaux I saw araraloren 4 Nov 2018 16:06Z in #perl6: <araraloren> Zoffix okay, thanks :)
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
El_Che no, to Leuven 07:48
holyghost ok
I have lived for 2 years at demospel.be
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
holyghost here's picture of the kanarie : www.mediafire.com/folder/7lownzd99b3za/ 08:07
today
holyghost perl6 --backend=moar installed 09:30
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
holyghost if fixed it without tests 10:34
s/if/I've
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
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
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 )
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
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
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!
Woodi masak: reading... 12:32
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
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
Woodi just once noticed someone had better vision abilities :) 12:45
scimon holyghost: I shall take a look at them. 12:46
Woodi probably becouse brain don't store words or visions, all just neurons... 12:47
Woodi goes for coffe
lizmat weekly: medium.com/@jcoterhals/perl-6-smal...0c194ea455 12:48
notable6 lizmat, Noted!
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
SmokeMachine scimon: was going to talk? not any more? 13:08
SmokeMachine scimon: :( 13:09
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.
lizmat hopes Object::Delayed is on it 13:32
holyghost scimon: yeah take a look, it could be that they don't work but it's useful math 13:35
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
holyghost I'm drinking 1 pint then I go off to bed, see you tomorrow at 4am :-) 14:14
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
holyghost scimon: good luck ! 14:36
holyghost is AFK ATM
buggable New CPAN upload: ArrayHash-0.4.tar.gz by HANENKAMP modules.perl6.org/dist/ArrayHash:cpan:HANENKAMP 15:42
[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
[Coke] anyone interested in writing a Perl 6 article for them, see: www.perl.com/article/how-to-write-...-perl-com/ 16:50
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
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
leont Even raw Plack is generally considered a better idea 17:31
El_Che leont: we suck at doing stuff as a community, but CGI is indeed a weird move 17:56
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
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
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
lizmat m: sub a(*@a where { .all ~~ Int } ) { dd @a }; a 1,2,3 # golf 19:09
camelia Array element = [1, 2, 3]
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
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.
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/
[Coke] win 3 19:38
El_Che [Coke]: you win the window lottery. As price you can choose an alias. 19:49
El_Che pmurias: counter argument regarding the JS ecosystem: twitter.com/garybernhardt/status/1...3457514496 19:59
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 ?
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
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 :)
uzl Hello #perl6! 20:27
Woodi hi uzl 20:28
SmokeMachine uses Safari 20:31
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
lizmat also: "$hit\t$dud\t$dist" unless $dist > 0,7 20:42
and lose the next
but yeah, looks much better :-) 20:43
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
SmokeMachine *we 21:17
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
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 :')
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
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
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 :)