»ö« 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.
samcv looks like majensen is gone. sent him an email though :) 00:29
TEttinger did the email have lots of unicode? 00:30
the entire email above codepoint 0x10000
samcv no. it probably was sent as ascii
i have my email configured to set it as ascii then if not possible to utf-8 00:31
TEttinger (it would prove the point of unicode being important to handle, though)
samcv XD
m: say 0x10000.chr
camelia 𐀀
TEttinger huh
I wonder if that's even assignd
samcv m: say 0x1FFFFF.chr
camelia Error encoding UTF-8 string: could not encode codepoint 2097151 (0x1FFFFF), codepoint out of bounds. Cannot encode higher than 1114111 (0x10FFFF)
in block <unit> at <tmp> line 1
samcv yey got my nice error message there :)
TEttinger m: say 0x1FFFF.chr 00:32
camelia \x{1FFFF}
TEttinger uh
samcv before it used to just say error could not encode
now it tells you the reason
TEttinger m: say 0x1FFEF.chr
camelia 🿯
samcv if it's out of bounds and tells you the max. and if it's a utf-16 surrogate then it says that as well
TEttinger why does 1FFFF (4 F) print \x{1FFFF}
samcv though not sure why people can't put surrogates in utf-8 even though it's not a great idea
not sure the question 00:33
TEttinger oh
these two print differently:
m: say 0x1FFFF.chr
camelia \x{1FFFF}
TEttinger m: say 0x1FFEF.chr
camelia 🿯
TEttinger they should be in the same block, I think
they're both in range 00:34
samcv oh 00:36
it literally prints \x{1FFFF}
maybe it's camelia doing it? idk
sec 00:37
m: say 0x1FFFF.chr.uniname
camelia <illegal>
samcv ah cause it's illegal
wee wooo call the police!~
samcv my @a; for ^0x1FFFFF { @a.push($_) if .uniname eq '<illegal>' }; say @a[0]; say @a.tail 00:39
Geth perl6-examples: 5f60c7e987 | (David Warring)++ | META6.json
[META6.json] add license
03:33
Geth ecosystem: CurtTilmes++ created pull request #333:
Add Math::Primesieve to ecosystem
03:46
grondilu m: say ([\+] ^Inf) ...^ * > 100; 03:57
camelia (0 1 3 6 10 15 21 28 36 45 55 66 78 91)
grondilu m: say ([\+] grep &is-prime, ^Inf) ...^ * > 100;
camelia (2 5 10 17 28 41 58 77 100)
grondilu ^my bad, ignore that
raschipi samcv: Surrogates shouldn't be put in utf-8 because they're used to detect utf-16, I think. 04:59
samcv shouldn't
i agree lol.
you can encode illegal codepoints. but
i mean you can do plenty of silly things that don't mean anything useful 05:00
i mean does that mean than perl 6 is incapable of encoding all unicode codepoints as utf-8? 05:01
technically
but it's still kind of arbitrary. even though you can do plenty of other dumb things. so idk
though it could be in the utf-8 spec to never do it. idk 05:02
i know our upper limit of 0x1FFFFF is in the utf-8 spec
ok yeah it's not supposed to be done apparently 05:03
raschipi One alternative Unicode gives is to just substitute the illegal codepoint with a (U+FFFD)
samcv m: 0xFFFD.uniname.say 05:04
camelia REPLACEMENT CHARACTER
raschipi REPLACEMENT CHARACTER
samcv oh that one
that's wha i thought it was
samcv the utf8 RFC gods have spoken though. looking at the rfc now 05:04
m: 0xD800.say 05:05
camelia 55296
samcv m: 0xD800.chr.say
camelia Error encoding UTF-8 string: could not encode Unicode Surrogate codepoint 55296 (0xD800)
in block <unit> at <tmp> line 1
samcv hmm maybe should mkae that error a bit more strong and say UTF-8 spec prohibits encoding surrogates 05:06
and to blame them not us :)
m: 0xD800.chr.encode('UTF-16) 05:07
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'"
at <tmp>:1
------> 030xD800.chr.encode('UTF-16)7⏏5<EOL>
expecting any of:
argument list
single quot…
samcv m: 0xD800.chr.encode('UTF-16')
camelia ( no output )
samcv m: 0xD800.chr.encode('UTF-16').say
camelia utf16:0x<d800>
samcv m: 0xD800.chr.encode('UTF-16').decode('utf-8').say
camelia Can not decode a utf-16 buffer as if it were utf-8
in block <unit> at <tmp> line 1
samcv m: 0xD800.chr.encode('UTF-16').Buf.decode('utf-8').say
camelia No such method 'Buf' for invocant of type 'utf16'
in block <unit> at <tmp> line 1
samcv m: 0xD800.chr.encode('UTF-16').^methods.say
camelia (decode encoding COMPARE bytes unpack of allocate join Int Numeric subbuf reverse chars SAME contents Str Stringy WHICH new Method+{<anon|78544448>}.new Method+{<anon|78544448>}.new Bool Method+{<anon|78544448>}.new Method+{<anon|78544448>}.new gist perl…
raschipi I think it shouldn't barf like that at all, just warn and substitute.
samcv hm
that. idk if i like that either 05:08
raschipi Because if the function is used in user input, that's a denial of service attack.
samcv i mean you shouldn't ever encounter it unless your program does something wrong
hm
if user enters some number hmm. and then it tries to encode it. i could see that
samcv m: try { 0xD800.chr.say}; say 'blah' 05:08
camelia blah
samcv they could put it in a try block 05:09
raschipi A database returns something and you need to turn it into a string for manipulation.
samcv hm
m: 0xD800.chr.say; say 'blah'
camelia Error encoding UTF-8 string: could not encode Unicode Surrogate codepoint 55296 (0xD800)
in block <unit> at <tmp> line 1
samcv hm yes
i mean we can have surrogates but just not print it to utf-8 buffers iirc
m: 0xD800.chr
camelia ( no output )
samcv yeH
raschipi It needs to put something in there, and it can't be an illegal codepoint. 05:10
samcv or just not print it out?
raschipi If it doesn't substitute, that makes debugging difficult.
samcv hm yeah
wonder how perl 5 handles it
oh nice 05:11
heh it just prints it out
raschipi If there's an illegal codepoint, it could end up in a CArray and then be emitted. Better just kill it.
Here's a test string: www.cl.cam.ac.uk/~mgk25/ucs/example...8-test.txt
samcv idk if it would be insecure to have a surrogate 05:12
raschipi There's no unicode engina capable of dealing with it.
samcv i think main issue is a NULL ending up someplace by accident from what the UTF-8 spec says
raschipi engine*
samcv you mean no standards compliant one? 05:13
specs say it has to not encode invalid sequences
raschipi If a null ends up sent to C, that's a potential buffer overrun.
samcv though surrogates are just arbitrary
yeah of course. i don't know how you could do that with a surrogate? hm. maybe. a decoder that assumes it will never get a surrogate?
perl5 just prints it out and my terminal renders it as replacement characters like a bunch of them 05:14
eee
hmm i don't think my irc client lets my paste surrogates..
i can paste it into chromium though 05:15
www.google.com/search?q=%EF%BF%BD%...p;ie=UTF-8
i think that's actually encoded as the surrogate probably
url encoding uses utf-8
the hex digits are bytes
or maybe it copies replacement character. argh 05:16
ok i'm gonna pipe output to a file and then check the hex... gotta be super sure 05:17
nope it does output 0xD800
raschipi "When a conversion algorithm encounters such unconvertible data, the usual practice is either to throw an exception or to use a de fined substitution character to represent the unconvertible data. In th e case of conversion to one of the encoding forms of the Unicode Standard, the substitution character is defined as U+FFFD replacement character . However, there are different possible ways to use 05:20
raschipi Section 5.22: "Best Practice for U+FFFD Substitution" 05:23
Geth ecosystem: 2af4592e90 | (Curt Tilmes)++ (committed by Moritz Lenz) | META.list
Add Math::Primesieve to ecosystem

See github.com/CurtTilmes/perl6-primesieve
06:10
lizmat clickbaits p6weekly.wordpress.com/2017/05/01/...tarbright/ 06:39
grlnix hey friends, just wondering, how long does doc typically take to compile nowadays? it was pretty long last time i was involved around here 06:43
lizmat I'm pretty sure it's less nowadays... but I have no idea as I can't say I have ever compiled the docs ever 06:47
otoh there's a *lot* more doc nowadays as well, so YMMV 06:48
grlnix hm :)
lizmat usually just goes to docs.perl6.org
grlnix thx
anton_p does someone use perl6 on ubuntu? what ppa? 06:52
moritz anton_p: I build from source on Ubuntu, but if I wanted a package, I'd go with github.com/nxadm/rakudo-pkg/releases 07:11
eater Do we have any idea how to solve problems like this: github.com/perl6/ecosystem/pull/33...-298500756 ?
On linux is tbh pretty straight forward since they store shared libs in a known place, and so does Mac OSX, but afaik Windows is a bitch to do this correct
samcv hmm hi eater 07:13
eater hi samcv
samcv imo there should be a META field for native pre-requisites
eater samcv: should as in "there isn't but there needs to be one" or should as in "there is one"
samcv there is none in the spec currently 07:14
but if/when/i wouldlike there to be one, that would give bin dependencies and also give shared library dependencies
eater bin dependecies as in executables? 07:15
samcv because package names are different between different such things. but usually the .so files have the same base name. and the bin are the same
yes
like 'libssl' for libssl.so
on openssh for the openssh binary proper. maybe would have seperate fields? idk
but regardless would make it trivial ta check if the person has that dependency installed
if the bin is in the path or not, and if the .so exists and can be located
eater ye 07:16
it would be nice if it could give hints too where to find that shared library
eater but maybe that's too much to ask? 07:16
samcv well. a human readable thing could be useful too. but at least what i said above would be nice for computers to check and be distro neutral
eater so a package manager can install the binary req. it self via apt
yea 07:17
samcv and technically don't even need package installed to meet if if they're in path
yeah often the package managers you can check which thing has a file
some? i know arch has a semiofficial one pkgfile
i think debian has one too
eater VoidLinux has one
but windows :(
samcv tho. libssl is named libssl.dll on windows right? 07:18
they don't ruin the libnames right?
eater Windows doesn't have a 07:18
collection of libraries stored somewhere
most libraries go side to side with the binary 07:19
samcv /^<libname> [32]? '.dll' $/
you mean are stored in the program install folders yes
eater and that's also totally up to the perl application 07:20
samcv what is up to perl application?
eater because for such libraries you just load the full path to the dll for nativecall's
samcv yeah. though binaries would be in path maybe? or hould be
probably named the same 07:21
but uhm dll's though that could be more complex
eater e.g. Mp3TagC isn't even looking for the windows dll 07:22
it just expects in that case that it's given via ENV :')
samcv heh
samcv eater, gist.github.com/samcv/c61f0dcf3d55...976b006719 07:25
thoughts on this?
it would jive with how other things are layed out 07:26
samcv imo. and let us provide "support" with url's 07:26
eater samcv: gl.zt.je/snippets/13 07:29
if we're gonna make a split between lib and bin we need to be /consistent/ in that
samcv yeah sure that's fine too
ofc
perl uses '/' for directories even on windows yes? 07:31
eater Windows /does/ accept it 07:33
samcv no i mean perl 6
eater so I don't know if perl does magic before it
samcv i know it does accept /
no i mean. when you print out a directories location
m: $*CWD.say
camelia "/home/camelia".IO
eater I dont have a Win VM close to me 07:35
sorry
samcv it's ok. not super critical
also can't believe window uses backslash though
so weird
geekosaur historical 07:37
TEttinger windows allows slash as well in most cases, since vista
samcv yeah i know that XD
still though
TEttinger mac classic used, what, :
geekosaur just think, gates could have ripped off zcpr3 instead of ordinary cp/m, and then you'd have to deal with tops-20 filespecs instead >.>
yes
TEttinger also \r for line separator 07:38
geekosaur there are still places in finder which swap : and / in filenames
samcv eater, we must go deeper! gist.github.com/samcv/2afe20aa64f5...on-L20-L63 07:39
u-ou hey 07:40
eater samcv: :'D that was more the point of making the support items an object, so such things can go in there
u-ou what's happening in perl6land tonight?
samcv but that's not really support
idk.
eater samcv: it's ~machine support~
:')
samcv you could have support level under the distribution too
i don't follow 07:41
eater I think this is kind of too big and complex of a structure tho
samcv yes i agree 07:42
eater at the other hand I like to have one object that says what it depends on, what the site is, and where to get it
samcv well you mentioned windows 07:42
and so i came up with a horrible looking solution to it lol 07:43
i liked it better before when we only had to think about linux :X
maybe we need to seperate bin and lib for support. idk. it's meant for for humans i think. though could be better for computers to find the dependency links and show them if they don't have it installed 07:44
eater samcv: gl.zt.je/snippets/13 07:46
samcv maybe could have a package manager key? hm 07:48
eater samcv: would be nice
so ubuntu and debian can use the same key
samcv may be more useful than the distro name
well i'd think for a package manager like zef
it would check for the distro, if not found see if another thing has the same package manager
if so then that's probably fine 07:49
eater ye
and pip etc.
samcv hmm
pip
eater but this proposal keeps all the info about 1 dependecy together
samcv maybe would be better to list package managers instead
eater and name is imo purely optional
samcv yeah. that is nice
yeah 07:50
eater samcv: gl.zt.je/snippets/13 07:51
something like that?
with a default so it can ~try~?
curl e.g. is curl in almost every distro package manager
samcv sure that seems fine 07:51
yeah 07:52
samcv and if they want under distribution they could go down to distro specific things but i think package manager makes like way more sense in the end 07:52
plus could expand to like pip and such
cpan or whatever
eater ye
samcv yeah i like that one very much 07:53
eater plus this add the ability to the ecosystem build system to install the correct packages for the packages that need binaries a/o libraries
samcv you spelled dependecies wrong
eater samcv: :(
samcv it's ok though
eater samcv: why did you say that I spelled something wrong, and then use the exact same wrong spelled word :') 07:54
samcv it was on purpose :)
eater, could even fit in a license thing there too even 07:56
:)
yeah i like this last one very much
eater :> good
so what steps to take now? 07:57
samcv making the easy hard, and impossible within reach
eater :') 07:58
samcv note missed comma. :)
uhm i'm gonna open an ecosystem RFC
eater samcv: cool thanks 08:01
samcv prolly post an issue in github.com/perl6/specs maybe too 08:02
make sure people see it
eater samcv: looking forward to it :> 08:03
samcv oh btw versioning 08:04
lib: [ "libcurl": "*" ]
y/n
or put version there or whatever
eater well
samcv err as its own fields
eater I would use { "libcurl": "*" }
samcv sorry meant
eater but that only works in the package manager rigt?
*right
samcv nah i think it should be optional in the native-dependencies, like on the same level as 'name' and such 08:05
and under distribution i think it can be after the packages name
eater curl>=10.34
like that?
samcv no 08:06
as the value
sec
samcv what? 08:09
oh sorry nvm
masak :) 08:10
masak .oO( as developers, it falls on us to eliminate distrac... ooh, shiny! )
samcv eater, gist.github.com/samcv/ed59c2bf070c...e199f63881
lizmat www.youtube.com/watch?v=EzQpkQ1etdA # whee! 08:11
samcv hah somebody highlighted me in another channel and i thought it was here heh
eater samcv: what for version requirement notation do we use with META6.JSON for dependecies?
samcv that 08:12
* is any + at end means that or newer
samcv m: say v6.2 cmp v6.1+ 08:12
camelia More
eater MORE 08:12
eater okay 08:12
samcv m: say v6.0 cmp v6.1+ 08:13
camelia Less
samcv pretty nifty
eater yeah there are so many notations
samcv yep
eater so didn't know which one perl6 uses
so then imo this is nice
samcv perl 6 has version objects too even
m: say v6.0.WHAT
camelia v6.0.WHAT
samcv dammit
m: say (v6.0).WHAT
camelia (Version)
lizmat m: say WHAT v6.0 08:14
camelia (Version)
samcv patch version WHAT
geekosaur .oO { c'est what? } 08:15
samcv eater, github.com/perl6/ecosystem/issues/334 08:21
eater samcv: your code snippet does not eqaul your linked gist :> 08:25
samcv yes. :)
eater maybe we can even make the "location" key an array so multiple locations are allowed 🤔
samcv huh? 08:28
there are bin and lib under location
you can put more than one under bin
just add a coma
i think [ ] is for an array of scalars not value keys 08:29
or something idk json be json
not sure about the [ ] 100% but for { } you can have multiple entries
err wait. sorry thinking harder 08:30
you mean multiple with the same name. ok
ok should be fixed 08:33
eater hahaha 08:39
samcv: need some sleep maybe?
what you did is exactly what I meant :)
samcv that is possible 08:41
i have a headache though so i think it's that mostly 08:42
eater samcv: don't have pills for it? 08:44
samcv yes. i now have only 3/4 of the headache i had before :) 08:45
eater :') 08:46
get better soon
Geth Swapped META.info → META6.json in 2 dists in github.com/perl6/ecosystem/commit/d18a12ed49 09:05
samcv gotta go to bed night all 10:57
timotimo nite samcv 10:58
grondilu wonders (probably not for the first time), why we don't have a Prime subset of UInt instead of &is-prime. 11:45
raschipi grondilu: submit a PR: github.com/bradclawsie/Subsets-Common 12:24
haxmeister good morning perl 12:36
raschipi morning haxmeister
timotimo raschipi: did you know that json is utf8, but contains surrogate pairs? 12:39
raschipi It's not valid utf-8, then 12:45
timotimo yeah, tell that to those people who invented that
if you ever try to correctly implement a json parser you get to know the deep, deep horrors of this terrible and terrifying format 12:46
raschipi Should be manipulated using utf8-c8 and sanitized before being converted to utf8
timotimo does utf8-c8 accept stuff like out-of-range surrogates? 12:48
i think we still error out for that kind of thing
raschipi JSON is just like a ".perl" dump but for an ancient ECMAScript version, isn't it? A JSON parser is madness because it's a Javascript parser. 12:48
timotimo well, it's madness because it's somewhat thought to be kind of like javascript
but it actually totally differs in a few key areas that can drive you mad
raschipi This page should be changed to include the new linux packages: rakudo.org/how-to-get-rakudo/ 12:50
timotimo i thought they weren't actually finished yet?
yeah, the versions that are up there are still from yesterday 12:51
raschipi Compilation and rakudobrew instructions should be moved for a "developer's intro" page too.
timotimo i thought stmuk had to redo them and would upload 'em today?
or am i 1 day off?
raschipi OK, I didn't know there was a problem with the packages. 12:51
timotimo oh, it was only the windows packages 12:52
timotimo yeah, you're right, the linux and mac package ought to be updated on that page 12:52
however, it's only the text that needs changing, the link is already correct (because it's just -latest.foo)
timotimo updated it, how does it look? 12:54
raschipi It also recommends panda still, should recommend zef
timotimo how about now 12:55
raschipi I'm not seeing any updates on the page. 13:00
timotimo when i ctrl-f panda i get 0 results 13:01
why isn't it updating for others?
[Coke] has to remember to be careful when volunteering to do stuff.
raschipi I see the "zef" update. 13:02
But it still recommends intalling from source or rakudobrew 13:03
nadim hi all, I have a class which has an attribute that I give a default value to. In the .new method I want to access the default value I gave in the class definition. How do I do that ?
raschipi And the download link is still a .tar.gz.
Geth doc: eca21ff851 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
[io grant] Document copy/move behaviour for same target/source

RT#131242: rt.perl.org/Ticket/Display.html?id=131242 Rakudo fix: github.com/rakudo/rakudo/commit/08a8075f91 Tests: github.com/perl6/roast/commit/4fdb8504cd
13:05
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131242
moritz nadim: I don't think there's an easy mechanism for that 13:06
raschipi nadim: compare it to a constant with the value you want as default, then use the value of the constant to know what was assigned as default. 13:07
Solve it with another level of indirection. 13:08
[Coke] mentioned zef to someone who uses perl but not perl6, and was asked "do they know what that means!?!?!?!" 13:10
nadim I could move everything to .new and not use any other mechanism but it seems to me that things declared in the class should be available.
thank you both for the answers 13:11
jnthn It's available via the MOP, but it's something like ::?CLASS.^attributes.grep(*.name eq '$!foo').default or so 13:12
timotimo well, surely .first or >>.default
jnthn Or that
And even then it's a little interesting to call it because it expects an instance of the object 13:13
timotimo wonders if that counts as code-review
moritz and the default tends to be a closure, right?
jnthn I did say "something like" ;)
moritz: Yeah, thus my note on calling it :)
It handles to handle stuff like `has $.x; has Foo $.y .= new(:$!x)` 13:14
nadim can one flatten something that could be undefined?
jnthn Thus why it needs the object reference
m: class FlatAndUndefined does Iterable { method iterator() { Empty.iterator }; method defined() { False } }; my @a = flat 1, FlatAndUndefined.new, 2; say @a; 13:15
camelia [1 2]
nadim I was thinking more in the lines of: | %something // () 13:17
jnthn Oh 13:18
But a %something will probably always be defined? :) 13:19
But |($foo // ()) would work
Or |(%something<blah> // ())
moritz %something can be undefined :( 13:20
m: sub f(%h) { say %h.defined }; f Hash
camelia False
jnthn Well, yes, if you go out of your way... Also it's quite possible that %, @, and & won't imply :D in 6.d. :) 13:23
uh
*will* imply
nadim yes but %something<color> may not
jnthn Gah, I wish sentences came with a test suite for when you refactor them :) 13:24
moritz :-) 13:24
nadim hehe
raschipi m: my @a; say @a 13:26
camelia []
raschipi m: my @a; say @a.defined
camelia True
raschipi What would happen with moritz's code above, then? 13:27
moritz raschipi: try and see? 13:27
raschipi m: use 6.d.PREVIEW; sub f(%h) { say %h.defined }; f Hash 13:28
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
use used at line 1
mscha m: use lib ~$*PROGRAM.sibling('lib'); # This works, but ... 13:29
camelia ( no output )
mscha m: use lib $*PROGRAM.sibling('lib'); # ... it'd be nice if this worked as well.
camelia ===SORRY!===
Type check failed in binding to parameter '$spec'; expected Str but got IO::Path (IO::Path.new("/tmp/li...)
raschipi m: use v6.d.PREVIEW; sub f(%h) { say %h.defined }; f Hash
camelia False
nadim bleah, three flat() needed. nopaste.linux-dev.org/?1123994
raschipi As I understood it, that was a change that might land in 6.d, not something already there.
nadim and the default would have been nicer somewhere in the class declaration indeed 13:30
timotimo nadim: have you tried using | instead? 13:30
m: my %foo; %foo<bar> = 1, 2, 3, 4, 5; %foo<bar> = |<<blah bloo foo bar>>, |(%foo<bar>//()); say %foo.perl 13:31
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed postfix
at <tmp>:1
------> 034, 5; %foo<bar> = |<<blah bloo foo bar>>7⏏5, |(%foo<bar>//()); say %foo.perl
expecting any of:
argument list
postfix
nadim I would have 3 |
timotimo m: my %foo; %foo<bar> = 1, 2, 3, 4, 5; %foo<bar> = <<blah bloo foo bar>>.Slip, |(%foo<bar>//()); say %foo.perl 13:32
camelia {:bar($("blah", "bloo", "foo", "bar", 1, 2, 3, 4, 5))}
timotimo i count only two
raschipi nadim: Think of all the code you're not writing when you want to keep the structure. It would be much more, massaging references and such. 13:35
timotimo aye, we used to hvae automatic flattening 13:36
and it wasn't very good
raschipi The other side of that is that you need to explicitly tell p6 when you don't want to keep it.
timotimo nadim: you can forego | and flat completely and autovivify an array inside the hash with .append 13:38
that seems a whole lot more perl6ish
m: my %foo; %foo<bar>.append(<foo bar baz>>); say %foo.perl
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> 3my %foo; %foo<bar>.append(<foo bar baz>>7⏏5); say %foo.perl
expecting any of:
prefix
term
timotimo m: my %foo; %foo<bar>.append(<<foo bar baz>>); say %foo.perl
camelia {:bar($["foo", "bar", "baz"])}
timotimo now you have an array instead of a list 13:39
lizmat commute to Amsterdam&
timotimo but that should be fine
that also throws out the need for a //
nadim Does indeed look much better! 13:40
no flat not undef testing 13:41
eater timotimo: you edited your comment on #334?
timotimo yeah 13:41
i somehow missed the existence of the distribution key in the hash 13:42
eater ah cool :)
timotimo: what do you think about it tho?
timotimo looks okay at first glance
i'm not good at figuring out the wide range of consequences and corner cases this would have 13:43
eater afraid of them? 13:44
timotimo it could have world-ending consequences!
eater :O 13:46
at least I worked on something great then :>
araraloren Perl 5's structure is auto flat, it's not a clever design ..
timotimo it took long for the six to drop the auto flat
eater auto flat? 13:47
you mean folder structure in /usr/lib/perl5?
araraloren automate flatting
eater oh wait diff convo :') 13:48
btw, why the hashes in the perl6 modules folder 13:49
it's a real bitch to package w/ a package manager
raschipi What is a "folder"?
timotimo eater's refering to CompUnitRepo 13:50
araraloren don't know reason about that ..~~
timotimo it's a combination of "immutable files, so we use their contents as their name" and "modules can have names that the filesystem won't understand"
eater timotimo: is there any docs on it, or is it just ~there~? 13:51
timotimo not sure, haven't looked 13:52
eater perl5 had a very simple structure 13:53
which was nice
monkey patching scripts :>
timotimo perl5 also doesn't support multiple versions of the same module being installed at the same time
eater true
timotimo and you can always just -Imychangedlib
raschipi Is the garbage collection for old versions? 13:54
Is there* 13:55
timotimo *shrug* :) 14:11
pmurias do we run roast rest with 32bit rakudos? 14:20
MasterDuke_ pmurias: dogbert17 does regularly 14:29
nadim I believe, looking at what y code, which may be broken, does, that Clone does not clone roles, am I right? 14:54
jnthn nadim: You mean something like role R { }; R.clone ? 15:03
jnthn In that case the call to .clone will pun the role and call .clone on the resulting class; .clone on a type object is identity 15:04
nadim jnthn: No I mean class A{method do_with_clone{my $o2 = self.clone; $o2.so_something() } } ; my $o = A.new() ; $o does xxx; $o does yyyy; $o.do_with_clone() 15:09
jnthn Oh... 15:12
m: class C { }; role R { has $.x = 10; method tweak() { $!x = 42 } }; my $a = C.new does R; my $b = $a.clone; $b.tweak; say $a; say $b; 15:13
camelia C+{R}.new(x => 10)
C+{R}.new(x => 42)
jnthn Looks cloned to me 15:13
nadim indeed 15:15
raschipi A Microsoft employee making Linux on the desktop marketing: medium.com/@trstringer/the-surfing...06ac72c21e 15:37
Geth Swapped META.info → META6.json in 16 dists in github.com/perl6/ecosystem/commit/15ff25a32a 15:49
nadim jnthn: does Clone call new? 16:35
timotimo nadim: see Mu.pm 16:37
line 645
it just calls nqp::clone
and then it binds a bunch of attributes if there are any twiddles 16:38
well, if there's no twiddles it also does something
but no call to .new
nadim thanks 16:44
TreyHarris that's how you'd implement a prototype-based class system, I guess? 16:48
araraloren Now the .clone does shadow copy or deep copy ? 16:50
Gotta to sleep ~~ night 16:53
timotimo shallow 16:59
Geth ecosystem: Tyil++ created pull request #335:
Add Config::Parser::toml
17:00
Geth ecosystem: 7109f60dfe | (Patrick Spek)++ (committed by eater) | META.list
Add Config::Parser::toml
17:21
nadim RTFM Nadim! Clone makes a shallow copy. Is there a deep copy cloning? 17:36
buggable 🎺🎺🎺 It's time for the monthlyAccidental /win Lottery 😍😍😍 We have ballots submitted by users! And the winner is... 17:45
True
ugexe lol
geekosaur :p 17:46
Zoffix woooops :) 17:47
Zoffix Dammit. I ruined the surprise! :) 17:48
jnthn
.oO( More like accidental /fail... )
17:49
Zoffix Good thing that due to a bug the prize was not revealed :P
ugexe i thought it was on purpose as a joke... since its called buggable 17:50
Zoffix heh :) Nah, I was debugging a new plugin in #zofbot, totally forgetting the channels for the wins were hardcoded :P 17:51
nadim how does one create an anonymous hash from two lists? 17:57
anonymous as "going to be passed as parameter"
tadzik what will be keys and what will be values? 17:58
creating an anonymous hash doesn't differ much from creating any other
m: my @a = 1, 2, 3; my @b = 4, 5, 6; say @a Z=> @b
camelia (1 => 4 2 => 5 3 => 6)
tadzik that did something 17:58
timotimo all you need to know is that if you put a %( ) around it it'll hashift 17:59
nadim that's enough for me
timotimo hashify it*
nadim can one write hash { ... } 18:00
timotimo you'll fo course need to | that if you want it to be named parameters
nadim you mean the two list? yes
timotimo no around the %( ... )
nadim hmm, I don't understan what you mean, the code now works as i intended it. but I certainly want to hear more if you have a minute 18:01
Zoffix nadim: keep in mind Z=> will silently stop when one of the lists exhausts, if they have unequal number of stuff in them
nadim: %(@a Z=> @b) is another way to coerce to a hash 18:02
colomon just wrote @yellow1 Z=> @yellow2; about ten minutes ago in a $work program 18:03
timotimo if you just %( @a Z @b ) or what, it'll pass the hash as a single positional parameter
nadim ah, no the two lists were already key => value, I didn't need to Z them
Zoffix nadim: %(|@a, |@b)
nadim that's what I wrote
so I had that done 18:04
Zoffix m: my @a = 1, 2, 3; my @b = 4, 5, 6; (my %x){@a} = @b; dd %x 18:05
camelia Hash %x = {"1" => 4, "2" => 5, "3" => 6}
Zoffix /win 42 18:13
buggable Zoffix, Thank you for entering Accidental /win Lottery! The next draw will happen in 4 weeks, 2 days, 5 hours, 46 minutes, and 10 seconds
Zoffix buggable: draw
buggable Zoffix, The next Accidental /win Lottery draw will happen in 4 weeks, 2 days, 5 hours, 46 minutes, and 1 second. Currently have 1 ballots submitted by 1 users!
Zoffix ehehehe :) 18:14
DrForr perl6-Games-Shogi on github - collection of roles to let you crate Shogi boards from 3x4 out to 36x36. 19:03
azawawi hi 19:10
raschipi oi
azawawi is working on Term::Caca for some Perl 6 ascii art fun :) 19:12
raschipi What's better ? Sixel or libcaca? 19:13
azawawi raschipi: im nearly done with a hello world for Term::Caca :) 19:17
raschipi azawawi: Does it need any special terminal capabilities? 19:19
azawawi raschipi: github.com/cacalabs/libcaca 19:20
raschipi I already looked at that, didn't see anything about requirements. 19:21
azawawi i already have it running on my ubuntu 19:25
raschipi: sudo apt install caca-utils # for some demos 19:26
azawawi raschipi: github.com/azawawi/perl6-term-caca...-world.pl6 :) 19:28
raschipi Now looking closedr at a generated image, I remeber it, saw in vlc running in pure text mode. 19:29
azawawi i was looking at some ascii art and found it also... so i thought why not Perl 6 :) 19:30
and the license is fun :)
raschipi The license is very bad, but whatever. 19:32
rindolf raschipi: license f what? 19:36
s/f/of/ 19:37
raschipi libcaca
azawawi pasteboard.co/1xvX7W0V8.png
rindolf raschipi: seems like WTFPL 19:38
raschipi azawawi: Draw Camelia next! 19:39
rindolf: sorry, confused it with another license, my bad. 19:40
zengargoyle lol, want to rename «RFC Native Dependency Specs for META6.json (#334)» along the lines of Outside Context Problem en.wikipedia.org/wiki/Excession#Ou...xt_Problem 19:42
azawawi raschipi: sure 19:44
azawawi starts adding travis ci (osx, linux) for Term::Cap
rindolf raschipi: ah 19:45
Geth perl6.org: ac65bcabcb | (Steve Mynott)++ | source/downloads/index.html
Name of replacement MSI
19:53
ecosystem: eee0de8c81 | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list
Add Term::Caca - Perl 6 Colour AsCii Art Library Bindings
19:54
Geth doc: eaa4d3ddeb | (Samantha McVey)++ | 2 files
Add Japanese Yen symbol (¥) to ntfs filename blacklist

  ¥ on ascii codepage is apparently a backslash, so for security reasons
NTFS disallows the ¥ Unicode symbol in directory or filenames. Fun.
21:00
gfldex samcv: windows is held together by workarounds 21:24
gfldex samcv: the name badchar-ntfs is a bit misleading. Besides ':' all those chars are valid for ntfs, it's actually windows that doesn't like them. 21:37
samcv maybe 21:39
tyil samcv: lizmat gave us a sneak preview of her current work :3
samcv oh?
tyil also, I got a sneak peak on the pricelist for YAPC europe 21:40
seems I'll be there
I've asked them wether it would be possible to get you there too
azawawi github.com/azawawi/perl6-terminal-...-world.pl6 # Better Perl6ish API. Feedback is welcomed :) 22:00
Geth ecosystem: cac6f3cb4c | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list
Rename Term::Caca into Terminal::Caca
22:05
azawawi how often is modules.perl6.org/update.log updated? 22:06
tadzik heh, I see Terminal has caught on after all 22:16
azawawi Terminal:: is cooler :) 22:18
samcv azawawi, thank you for ot using WTFPL :)
i firmly believe it doesn't grant users of software any rights becuase people already "Do what the fuck they want to"
;) 22:19
azawawi samcv: :)
tyil wtfpl is a joke license 22:22
samcv i mean it could be made infinity times better as a license if it said "this license grants you the maximum rights allowable under law to do what the fuck yo uwant to with this software"
yeah but people actually use it tyil :(
tyil they sadly do
samcv it's literally not a license. even though some people think it is 22:23
tyil just release it as public domain if you want it to be "do whatever"
samcv since it gives you no rights
CC-0
s/public domain/CC-0
timotimo azawawi: this has little to do with what you're doing, but i've started a binding for libsixel :D
samcv which has fallback clauses in case the law doesn't let you public domain it for whatever reason
and "public domain" is not a license 22:24
tyil yeah, CC-0 is legally a better pick
samcv oh god libtommath is dual licensed under "public domain" and WTFPL
neither of which are licenses
tyil kek
samcv facepalms
i think he lives in canada reading their page it says 22:26
"country of origin" "canada" "follow canadain law" 22:27
"berne convention cuontry" "if item would be in public domain if created in canada then it's in public domain in canada"
which is why public domain is not a license
i'm gonna open a ticket on the libtommath repo 22:29
tyil hot
make it gpl
timotimo hot diggity damn
samcv doubt they gonna do that
timotimo 2-cause BSD?
clause*
samcv they licensed it wtfpl and public domain. would be nice if it could be CC-0/wtfpl or something 22:29
if they wanna be rebels
i'm gonna recommend they do CC-0 22:30
azawawi timotimo: cool :) 22:35
timotimo++
timotimo i wish more terminals supported it. there's already a whole bunch, but not mate-terminal (which i use mostly on my laptopr and konsole (which i use mostly on my desktop)
samcv tyil, github.com/libtom/libtommath/issues/76 22:40
feel free for you guys add it comments on +1 it. would be cool if the devs address this :0 22:41
timotimo hm 22:43
if we had a canadian, could they take it and relicense a copy of it?
samcv lol. what
tyil if that would work, we can ask justin bieber, so he can make amends for his "career"
samcv idk if you can even put in public domain without dying under canada law
i didn't see anything on the canadian copyright and public domain site period 22:44
timotimo yeah, if you die in canada, you die in real life
samcv it clearly said they had to die
XD
tyil kek
samcv tell them to build a time machine and kill themselve 40 years before they publish the software
kill their modern selves in the past, and let the other self continue working on the project that is 22:45
tyil do they have to die in canada
samcv no
tyil invite them over to YAPC, we can kill them there
samcv but they do have to die in rel life
then wiat 40 years?
tyil yes
samcv :(
tyil what if
they wrote the code using redstone in minecraft, but were sitting on their pc in canada 22:46
do they still have to die in real life
samcv oh if they die in minecraft?
tyil or does it depend wether the server is also in canada
samcv no if they're in a Berne convention country
then the laws of where the user of the material is located for public domain stands
if they're not then idk 22:47
so like almost all countries en.wikipedia.org/wiki/Berne_Conven...tories.svg
tyil pls ask a canadian lawyer on this important matter
I must know now
samcv well all countries have to recognize copyrights from other countries as much as they recognize local copyright 22:47
samcv The Convention relies on the concept of "country of origin". Often determining the country of origin is straightforward: when a work is published in a party country and nowhere else, this is the country of origin. However, under Article 5(4), when a work is published simultaneously in several party countries (under Article 3(4), "simultaneously" is defined as "within 30 days" [2]), the country with the shortest term of protection is defined as the 22:49
country of origin.[4]
In the Internet age, unrestricted publication online may be considered publication in every sufficiently internet-connected jurisdiction in the world. haha 22:50
timotimo i hope by "in the world" they also include outer space 22:51
samcv it's an earth convention from 1886
so unlikely
tyil well 22:52
given they were more religious back then
tyil I'd say its pretty likely they considered other world 22:52
s 22:53
samcv so in heaven?
what.
geekosaur the question of space law is actually pretty thorny
samcv if one was in heaven i doubt they would have a concept of copyright
not that thorny
DrForr Our Lord who art routed over IPv8...
samcv there's just not that many laws
en.wikipedia.org/wiki/Outer_Space_Treaty 22:54
azawawi timotimo: github.com/azawawi/perl6-terminal-...its/master # libsixel vs libcaca :) 23:00
timotimo i don't know what you're trying to tell me with that? 23:03
azawawi timotimo: added circle, line, ... 23:05
timotimo ah 23:07
i don't think libsixel has drawing primitives built in 23:08
azawawi timotimo: hopefully i will get draw-bitmap working tomorrow :)
timotimo cool 23:09
timotimo though of course sixel is vastly superior when it comes to resolution of images :) 23:16
azawawi timotimo: i noticed 23:17
what about metacpan.org/pod/Term::Kaka ? :) 23:18
...a subclass of Term::Caca with virtually identical behavior
azawawi good night & 23:23