»ö« 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.
raschipi They name RGB values, not colors. An RGB value will map to a different color on every screen. 00:01
HoboWithAShotgun oh sure, you write me something that deaks with color profiles and i put that in a wrapper :) 00:03
It's a rgb to some string map, nothing more aimed for
raschipi And what will they even map to in CMYK? 00:04
Well, I'm not saying you shouldn't do that, just that you should name it accordingly.
HoboWithAShotgun Color::Named::X11, Color::X111Names 00:06
the former leaves room for expansion, don't ya think
raschipi Well, are you doing web rgb naming or x11 rgb naming? 00:07
HoboWithAShotgun those are identical except for four colors 00:08
raschipi Right, which means they're different. 00:08
HoboWithAShotgun in which case you say "web green". "green" is X11
raschipi OK, so it will be both. 00:08
raschipi Well, I could be pedantic and say it's really RGB::Named::X11, but using "Color" will do. Thanks for being understanding and helping educate people on these issues. 00:13
raschipi You could also have a Color::Named::xkcd xkcd.com/color/rgb/ 00:14
HoboWithAShotgun the things when you have too many colors, say 1000 the module takes ages too load. 00:17
HoboWithAShotgun mmh, i could put some csv data in a =finish block and parse that 00:18
nice find raschipi
MasterDuke HoboWithAShotgun: if you can put the colors in a constant, it should get precompiled at first use and then be very quick to load after that 00:20
HoboWithAShotgun i need to be able too look them up by name 00:22
you can't have constant hashes, can you
Zoffix You can 00:23
HoboWithAShotgun: though IIRC there's still a bug where it's really finicky in how you write it 00:24
m: constant %foo = :42foo, :70bar; say %foo<foo>
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in constant declaration of %foo; expected Associative but got List (List)
at <tmp>:1
------> 3constant %foo = :42foo, :70bar7⏏5; say %foo<foo>
Zoffix m: constant %foo = %(:42foo, :70bar); say %foo<foo>
camelia 42
HoboWithAShotgun oh cool. gonna try that out 00:25
but for now,i'll try and catch a bag'o sleep 00:26
perlawhirl How can I get the actual number of, say: 10e-15 01:23
without resorting to printf
m: say (10e-15).fmt('%.14f')
camelia 0.00000000000001
geekosaur define 'actual number' 01:24
perlawhirl that number in my result
how to i print 0.00000000000001 given 10e-15
perlawhirl perl5 gives the right answer: perl -Mbignum -e 'print 10e-15' # OUTPUT: 0.00000000000001 01:28
Seems like Nums < 1 don't coerce to Rat's properly 01:31
m: say "{(10e15).Rat == 10e15}, {(10e-15).Rat == 10e-15}" 01:32
camelia True, False
perlawhirl I'll rakudobug it 01:33
perlawhirl ok, looked at source... default epsilon is 1.0e-6... so that's as small as you can go by default 01:36
m: say (10e-6).Rat; say (10e-7).Rat 01:37
camelia 0.00001
0
perlawhirl but you can pass in a new epsilon 01:37
m: say (12e-15).Rat(1.0e-15)
camelia 0.000000000000012
perlawhirl also, this seems silly. 01:39
m: FatRat.new(1.2)
camelia Type check failed in binding to parameter 'nu'; expected Int but got Rat (1.2)
in block <unit> at <tmp> line 1
perlawhirl is that bug-worthy? 01:40
MasterDuke perlawhirl: i'd say so 01:44
AlexDaniel` perlawhirl: I'd say it is
o/
MasterDuke jinx 01:45
AlexDaniel` 🕺 01:51
(while ilbot is not here)
finanalyst can someone tell me what is happening to the Ecosystem. The old url seems only to have 48 modules listed. 02:02
there's been a progression to cpan, but I haven't seen any announcement about it
raschipi 6lang.party/post/CPAN6-Is-Here 02:04
You can find a list of dists in this page: modules.perl6.org/search/?q= 02:06
AlexDaniel` finanalyst: where do you see only 48 modules listed? 02:07
finanalyst The result is using my ModuleCitation software. I am updating it to include the cpan site, but I seem to be getting spurious results. 02:09
So, there is a bug somewhere. Trying to understand the underlying dynamic of change to ensure correct behaviour
raschipi: thanks for the link to cpan6. Was there an announcement on the perl6 list? If there was, I didn't catch it. 02:11
What is happening to the projects list that was used by panda? 02:12
raschipi I never seen devs sent announcements to a mailing list.
finanalyst So where do devs find out about a change in the ecosystem?
raschipi here 02:13
finanalyst sorry but I have other jobs. Can watch this IRC all day every day
email has its uses
raschipi Or in the weekly
p6weekly.wordpress.com/ 02:14
2017.41 had the CPAN6 announcement.
Herby_ \o 02:15
raschipi Oi
raschipi finanalyst: Is the weekly good enough, do you think sending it as an e-mail to a list would help? You can sign the RSS to get notified of release. 02:20
finanalyst raschipi: where modules are located seems a fairly big deal. surely there should be a bit more information about it
I thought the idea of having a single projects file was to avoid various locations.
are the modules in cpan6 also listed on modules.perl6.org ? 02:22
raschipi No, it was never meant to be like that. Eventually having CPAN working has always been on the radar. GIthub is unreliable too.
Yes, modules.perl6.org lists the modules from cpan too.
finanalyst What was never meant to be like that?
raschipi Having just the ecosystem as a source for modules. It wouldn't scale anyway.] 02:23
finanalyst So the modules in the Ecosystem list are what?
Old modules?
Surely an ecosystem is where the modules are listed, not where they are located 02:24
raschipi Well, it's fine to have modules on both places on just one of them. It's up to developer preference.
or just*
Just ecosystem is fine, just CPAN too, or both
finanalyst Yes but where is the single file for all the modules, whether in Ecosystem or cpan?
Or are there two files? 02:25
I mean, I want to know where there is a cannonical list of modules and their meta information
I currently have two urls and I don't know which is cannonical 02:26
raschipi zef list
finanalyst "ecosystem-api.p6c.org/projects.json" & "raw.githubusercontent.com/ugexe/Pe...cpan.json" 02:27
zef list is 2nd
why are there now two?
raschipi Because there are two ways to host modules.
No, zef supports both the ecosystem and CPAN 02:28
finanalyst That's a mess.
raschipi It prefers CPAN.
finanalyst What if another manager creates another way?
raschipi What about it? 02:29
finanalyst so then there are three different json lists? 02:30
what happens if there is a difference between the lists?
ugexe dont use a list you dont want
finanalyst But I am trying to analyse the whole system, not just what I want 02:31
ugexe what happens if your company is using a private namespace that eventually gets puts into the ecosystem?
finanalyst Suppose a developer puts a module on one site, and then on another, and differences arise between them 02:31
ugexe how does DNS handle difference in lists?
finanalyst I thought the idea was for there to be a single cannonical list of modules, but for the location where the modules reside to be agnostic 02:33
ugexe the idea is no one ones a namespace
finanalyst then it is for the manager to decide which location to use.
ugexe no one owns^
finanalyst how is this about namespaces?
I am talking about a single cannonical list of modules 02:34
raschipi there can be multiple modules with the same name, disambiguated by author. 02:34
finanalyst that is a different question
there can be a single list of modules containing all the differentiated ones
ugexe use only your single list - this does exactly what you want 02:35
raschipi right, but a single list can have a module listed multiple times, why do you think it would be a problem to have them listed in multiple lists? 02:35
ugexe and doesn't allow for darkpans etc
finanalyst but there are two lists
so how does a developer coming to perl6 know where all the lists are?
ugexe google? 02:36
raschipi well, the quick way is to look zef's code.
ugexe public lists will make themselves public. private ones will not.
finanalyst the software running modules.perl6.org knows where the lists are, but that is not public knowledge 02:36
are you trying to understand my question, or have you made up your mind that you are right? 02:37
raschipi just look at the code 02:37
finanalyst oh great. look at the code!!! 02:37
raschipi here: github.com/perl6/modules.perl6.org/ 02:38
finanalyst do you not see how that is a bad answer. It is non transparent. IF looking at the code was the only way to do things, there would be no tutorials, no documentation, etc 02:39
ugexe you want a tutorial on what? how to find the project list? 02:39
finanalyst This idea will lead to chaos. multiple lists, some private, some public, no transparency
finanalyst no not a tutorial on project lists, but a single policy about cannonical project lists 02:40
or better: a single cannonical list that is the property of the community
So that when a new manager comes in to being, there is not the sort of mess that there is now
raschipi finanalyst: that can't work. 02:41
ugexe thats pretty naive
finanalyst just because modules.perl6.org "knows" about cpan6, doesn't mean others do
why is it naive?
Are there multiple perl6 ?
some things need to be coordinated 02:42
some do not
ugexe do you know what darkpan is?
finanalyst information about the community should be transparent and obvious
darkpan is not the public community
if you want perl6 to be about secrecy and non-transparency, then the community wll dy 02:43
die
ugexe do you know what 1/3rd of the modules being on cpan and 2/3rd not would mean for dependencies?
or can you make everyone transition immediately?
finanalyst again, the location of a module is a different thing to the information about the location 02:44
I am not saying that everything should be in cpan6 or git or anywhere
only that modules in the perl6 community should be listed in a single community owned place
finanalyst Or that separate lists are referenced in a single place, like a sort of inheritance tree 02:45
ugexe like everytime you run the zef command and it tells you the list it updates?
finanalyst but that is internal to zef
I want to be able to access the lists independently 02:46
Do I have to look at the zef code all the time to find out where things are?
that is not transparent
ugexe no like i said, zef LITERALLY gives you the url when it updates the list
finanalyst I only found out that there were two lists by change 02:47
so where does zef get the information from?
ugexe &
finanalyst why should zef be in a priviledged postion?
ugexe its not, you are just assuming things without doing due diligence 02:48
finanalyst I am trying to do the due diligence
Originally, when project.json was set up, it was supposed to be for all managers, not just panda 02:49
now zef comes along and uses another list
ugexe are you high?
finanalyst and I discovered about it by chance, because someone asked me to update my ModulesCitation software
no just quite irritated
ugexe use panda then 02:50
finanalyst now the data I have been collecting for years is corrupt and I have to fix it
I dont want to use panda
I want clarity about where the modules for perl6 are located 02:51
raschipi finanalyst: You can look at it as a migration happening. At the moment, they are in two places because some migrated and some not.
finanalyst it seems there has been a change of policy about modules and where information about the modules is located
But that means that any migration process is going to create a mess 02:52
surely that is something that should be avoided
raschipi No, this was ever the intended policy, and it has been this way for decades, way before Perl6 was even a thing.
finanalyst ???? before perl6 was invented 02:52
whose policy if perl6 was not invented? 02:53
raschipi Way before there was language modules installers there were distro installers, and that's how things work there too.
finanalyst who created the policy?
Herby_ Is there a good tutorial for learning OO programming in Perl 6?
raschipi experience created this policy. 02:54
Herby_ OO for beginners, using perl 6
finanalyst raschipi: "that is the way things work" is a poor argument for a new way of doing things, and fixing messes
raschipi it's not a mess, it's working as intended! 02:55
finanalyst raschipi: where is the policy formulated?
who intended it?
raschipi Herby_: greenteapress.com/thinkperl6/thinkperl6.pdf Think Perl6 part II is about OO 02:56
ugexe who get to make the policy?
rakudo dev?
raschipi zef dev
ugexe $other-perl6-impl dev?
Herby_ raschipi: thanks! 02:57
finanalyst ugexe: I was told that "this is the way it was intended", so I ask who "intended"? I get no answer, so how can I find out? 02:59
ugexe you are asking "what is the only blessed version of perl6" except replacing "perl6" with "package list"
finanalyst I was told project.json contains all the meta information for modules and is manager agnostic. Now I am told cpan6.json is where information is# 03:00
no I am asking where is the list of modules that contains all the modules available for perl6
I am told there are two, may be more, and that only special priviledged developers know where they are 03:01
if you want the information, you have to look at the code
ugexe except zef LITERALLY prints them to your terminal every time it updates the package list
finanalyst that is not transparencey
ugexe which i've already mentioned
finanalyst so I have to run zef in order to get the list? 03:02
where does zef get it?
ugexe but you're upset because you were told something wrong or misinterpretted and keep ignoring what hasbeen told to you
finanalyst we are going around in circles. You are not listening to what I have to say
ugexe ok 03:03
buggable New CPAN upload: App-Bob-0.5.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...5.0.tar.gz 04:01
buggable New CPAN upload: App-Bob-0.4.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...4.0.tar.gz 04:11
tyil can a module name start with a number? 05:06
moritz m: class 0ab::cd { } 05:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse class definition
at <tmp>:1
------> 3class7⏏5 0ab::cd { }
expecting any of:
generic role
moritz look like "no"
tyil a sad time to be alive :( 06:01
oh well, cant have it all
besides, its 8 am, I'm done for tonight
I think
buggable New CPAN upload: App-Cpan6-0.6.2.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...6.2.tar.gz
moritz m: class ::('0ab::cd') { } 06:06
camelia ( no output )
moritz m: class ::('0ab::cd') { }; say ::('0ab::cd')
camelia (cd)
moritz tyil: ^^ see above, you *can* use non-identifier names for classes. It's just a hassle 06:07
tyil I think I'll just put the number at the end :p
Geth ecosystem: b5cb2ec567 | (Moritz Lenz)++ | META.list
Grammar::ErrorReporting now lives on CPAN
06:08
moritz tyil: might be easier, yes :-)
lizmat clickbaits p6weekly.wordpress.com/2017/10/16/...seriously/ 08:13
moritz lizmat++ 08:36
HoboWithAShotgun who is in charge of docs.perl6.org? 11:07
lizmat HoboWithAShotgun: you mean the actual running of the site, or the contents ? 11:08
if the latter, check out the links at the bottom of each screen: 11:09
Please report any issues or edit this page. Your contribution is appreciated.
HoboWithAShotgun the latter. here ( docs.perl6.org/language/modules.html ) it only talks about a README.md file, but apparently ( github.com/zoffixznet/perl6-Color/...README.pod ) you can just use a pod file
oh, it's just ya repository 11:11
allright, i know what to do, thanks
lizmat HoboWithAShotgun++ 11:19
wander can I write p6code like `PERL6LIB="..."' to do the same thing as `#!/usr/bin/env perl6 -I .'? 12:01
raschipi yes 12:02
wander or say, I want to use a module which is not in perl6path, can i dynamically change perl6path?
how
raschipi No need to change it, just use the full path. 12:03
tadzik you can also 'use lib' 12:06
wander done. thank you 12:08
ryn1x_ So I have found that the "unable to allocate array of x elements" error only happens on windows machines when trying to slurp binary data in the repl . After letting my laptop with macOS run over night it finally printed the Buf. 13:19
Yesterday Zoffix said there was already a ticket "for allocate array on windows". I am trying to find this ticket to make sure I don't duplicate a bug report. Would it be on github or rt.perl.org? 13:21
wander how about genericity in Perl6 13:22
moritz ryn1x_: if it's a bug in moarvm, it's on github; otherwise RT
wander: Perl 6 has parameterized roles
ryn1x_ Also, is the fact that it takes somewhere 3<x<10 hrs to slurp a 16MB binary file in the repl on unix something that need to be reported? 13:23
moritz yes 13:24
are you using slurp()?
or something else?
ryn1x_ slurp()
jnthn It's not the time to slurp the file, but rather the time to render the Buf containing it, I think?
moritz ryn1x_: are you using :bin ? 13:25
ryn1x_ moritz: yes slurp() using :bin
jnthn: I think you are right. It slurps instantly in a source file. Just takes incredibly long in the repl because it tries to print the Buf? 13:26
raschipi Does the same happen without the REPL? 13:27
ryn1x_ raschipi: no 13:28
I haven't reported a bug before so just trying to figure out what I should do here.
[Coke] in the reply, you can do something like: "slurp.... ; Nil"
that will avoid the printing.
raschipi Can you try some other line editor to see if the same thing applies? 13:29
ryn1x_ [Coke]: adding "; Nil" works fine 13:31
wander After some searching, I still can't find a good way to write something like "class A<T> { has T $.myVar; }" 13:32
jnthn role A[::T] { has T $.my-var } 13:33
ryn1x_ O. I think I found where my issue may have already been fixed for the next release: github.com/MoarVM/MoarVM/issues/686 13:38
ryn1x_ So the time to render a Buf is something that should be reported, or is that is an optimization issue that is already known? 13:40
wander jnthn, it solves my problem, thank you. 13:45
can `class' performs like that? and is it encouraged to use `role' instead of `class'? 13:47
jnthn No, because classes are mutable (can have methods added), which doesn't play at all well with genericity 13:52
Zoffix ryn1x_: the ticket I mentioned was already fixed. Only re-report it if you're having issues on HEAD build on Windows. 14:22
ryn1x_: and Buf.gist was already fixed a week ago.
That's what I showed with the eval
c: 2017.07,HEAD Buf.new(1..26_000).gist; say now - INIT now
Geth doc: W4anD0eR96++ created pull request #1612:
Add hook to "Parameterized Roles"
committable6 Zoffix, ¦2017.07: «2.4700380» ¦HEAD(8a88d14): «0.0591987»
Zoffix ^ that's ~26KB; for 16MB it'd take a lot longer (but still be 0.05 on HEAD) 14:23
melezhik Hi! I am having this error "Cannot invoke this object (REPR: Null; VMNull)" what are possible roots? 14:29
yoleaux 12 Oct 2017 19:36Z <tyil> melezhik: the funtoo build is going to be more of a pain to fix than I anticipated, Funtoo recently updated its package manager, and the docker images havent accounted for this change yet
ryn1x_ Zoffix: Ok, thanks. 14:30
Zoffix melezhik: some bug in the guts causing a null to be attempted as a callable. What's the code?
m: use nqp; nqp::null()()
camelia Cannot invoke this object (REPR: Null; VMNull)
in block <unit> at <tmp> line 1
melezhik I'm afraid stacktrace is quite long ... will try to localize the issue in short example ... 14:31
tyil melezhik: you can paste the stacktrace online and send the link here 14:33
melezhik yeah, I am on it, tring to figure out how ...
melezhik tyil: zoffix: - gist.github.com/melezhik/b30f1bf76...7956e7a336 14:41
melezhik actually simple say "OK"; throws such an error 14:47
melezhik could it be the case that "::('Sparrowdo::' ~ $name ~ '::&tasks')" does not get resolved as a function? 14:54
melezhik seems like the very line upon entering the Sparrowdo::RemoteFile::task results in error 14:55
melezhik zoffix: tyil: I've found the fix 15:02
melezhik as Sparrowdo::* modules get required in runtime I should not "use" them , this was delibirately, but I just forgot abot this :)) , remove "use Sparrowdo::RemoteFile" from Sparrowdo::Prometheus defintion (gist.github.com/melezhik/b30f1bf76...1-txt-L59) 15:04
fixes this
melezhik other vise it results in double Sparrowdo::RemoteFile load and in then in weird REPR: Null; VMNull error 15:05
melezhik so I know how to fix, but I'm not clear what exactly happen and why this result in such an errors :)) 15:06
moritz is "because bug" a satisfactory answer? :-) 15:10
melezhik yes it is 15:11
:-) 15:12
buggable New CPAN upload: Sparrowdo-Prometheus-0.0.1.tar.gz by MELEZHIK cpan.metacpan.org/authors/id/M/ME/...0.1.tar.gz 15:31
callyalater my $plus = &[+]; my $n = $plus(2,3); say $n; 15:48
m: my $plus = &[+]; my $n = $plus(2,3); say $n;
camelia 5
callyalater m: say &[+](2,3); 15:49
camelia 5
raschipi m: say [+] 2,3 15:51
camelia 5
callyalater m: my $n = &[+](&[+](3,4),5); say $n; 15:53
camelia 12
callyalater m: my $n = &[+](3,4,5); say $n;
camelia Too many positionals passed; expected 0 to 2 arguments but got 3
in block <unit> at <tmp> line 1
dakkar_ I've just installed Test::Harness, and p6prove dies with "replace this Array is copy logic"
callyalater m: my $n = &[+](2); say $n; my $m = &[+](); say $m; 15:55
camelia 2
0
dakkar_ aaah, TAP::Harness is the right one 15:58
Geth doc: b8c0cff999 | (Will "Coke" Coleda)++ | doc/Type/Supplier/Preserving.pod6
trailing whitespace
16:04
synopsebot Link: doc.perl6.org/type/Supplier/Preserving
callyalater m: say "Name"++; 16:07
camelia Cannot resolve caller postfix:<++>(Str); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)

The following do not match for other reasons:
(Bool:D $a is rw)
(Bool:U $a is rw --> Bool::False)…
callyalater m: my $s = "Name"++; say $s; 16:08
camelia Cannot resolve caller postfix:<++>(Str); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)

The following do not match for other reasons:
(Bool:D $a is rw)
(Bool:U $a is rw --> Bool::False)…
geekosaur m: say succ "Name"
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
succ used at line 1
geekosaur whoops
callyalater m: my $s = "Name"; $s++; say $s;
camelia Namf
geekosaur m: say "Name".succ 16:09
camelia Namf
atroxaper Hello, #perl6 16:10
Is there a right way to alias imported classes, enums etc. I import some enum an want to short its name. 16:12
atroxaper m: enum A::B::C <x y z>; say A::B::C::y; my \C = A::B::C; say C::{'y'}; 16:12
camelia y
y
atroxaper I just found this way ^. But I do not like {''} form. Is there way to write C::y ? 16:13
Geth doc: 63a0b0f00d | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/objects.pod6
Add hook to "Parameterized Roles"

I think it is worth to be searchable
16:15
synopsebot Link: doc.perl6.org/language/objects
doc: 2bf7125cce | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/objects.pod6
Merge pull request #1612 from W4anD0eR96/patch-1

Add hook to "Parameterized Roles"
callyalater m: enum A::B::C <x y z>; say A::B::C::y; ::C := A::B::C; say C::y;
camelia 5===SORRY!5=== Error while compiling <tmp>
No such symbol 'C'
at <tmp>:1
------> 3num A::B::C <x y z>; say A::B::C::y; ::C7⏏5 := A::B::C; say C::y;
jnthn atroxaper: constant C = A::B::C; 16:16
uh, my constant to keep the scope straight
atroxaper callyalater: jnthn: Thank you! 16:17
callyalater m: enum A::B::C <x y z>; say A::B::C::y; constant C = A::B::C; say C::y; 16:18
camelia y
y
callyalater m: enum A::B::C <x y z>; say A::B::C::y; my constant C = A::B::C; say C::y; 16:19
camelia y
y
atroxaper One more question. I noticed that I have to use sigless variables some times. Is there some paper described when I should do so? As I understand, when get values from sub.
callyalater m: enum A::B::C <x y z>; say A::B::C::y; ::C ::= A::B::C; say C::y; 16:20
camelia 5===SORRY!5=== Error while compiling <tmp>
No such symbol 'C'
at <tmp>:1
------> 3num A::B::C <x y z>; say A::B::C::y; ::C7⏏5 ::= A::B::C; say C::y;
callyalater m: enum A::B::C <x y z>; say A::B::C::y; my ::C ::= A::B::C; say C::y; 16:22
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot use :: as a type name
at <tmp>:1
------> 3:B::C <x y z>; say A::B::C::y; my ::C ::7⏏5= A::B::C; say C::y;
jnthn atroxaper: Generally, they're used when you don't want to enforce any kind of context, and always want to just reference something "as is". 16:23
callyalater I thought that perl6 supported type synonyms with the `::synonym ::= type;` syntax. Is that not true? 16:24
atroxaper went to read Language->Variables and Language->Containers...
jnthn callyalater: No; not now, and I can't recall that syntax every being in use. It doesn't really fit for a name to pop up without a declarator 16:25
atroxaper m: my %h; my @a; @a = <1 2>; %h<a> = @a; my @aa = %h<a>; @aa.say; 16:27
camelia [[1 2]]
atroxaper jnthn: As I understand, in that case I want to reference something 'as is' :) 16:28
jnthn Note that my \foo = ... is actually a bit of a lie, in that it's really a binding, not an assignment 16:29
jnthn back later
callyalater Do we know when `::=` will be implemented? 16:37
m: enum A::B::C <x y z>; say A::B::C::y; ::(C) ::= A::B::C; say C::y;
camelia 5===SORRY!5=== Error while compiling <tmp>
"::=" not yet implemented. Sorry.
at <tmp>:1
------> 3:B::C <x y z>; say A::B::C::y; ::(C) ::=7⏏5 A::B::C; say C::y;
jdv79 how does, or can, one edit a class from teh core setting without having to recompile? 16:53
callyalater MONKEY-TYPING? 16:54
callyalater jdv79: Is this what you 16:55
are looking for? docs.perl6.org/language/typesystem...ng_a_class
jdv79 i guess that might work
i really just wanted to load the entire class from somewhere else 16:56
i'll check
Zoffix m: my $s := Supplier::Preserving.new; $s.emit: 42; my $ss = $s.Supply; react whenever $ss {say "here"; done}; $s.emit: 70; react whenever $ss { say "init" } 16:58
camelia (timeout)here 16:59
Zoffix Is there a way to "unsubscribe" from a Supply so another consumer could take care of the rest of the values?
timotimo i wonder if you can do something with last + LAST 16:59
so like you'll last out of one whenever, but then inside the LAST (or even DONE?) you add another whenever 17:00
Zoffix (asking mostly out of curiously; came across it while testing my code and have a workaround)
timotimo probably a nasty idea to "resurrect" the supply block
Zoffix `last` don't break out from `react` 17:03
m: my $s := Supplier::Preserving.new; $s.emit: 42; my $ss = $s.Supply.on-close: {say "closed"}; react whenever $ss {say "here"; last}; say "sending more stuff"; $s.emit: 70; react whenever $ss { say "init" }
camelia (timeout)here
Zoffix but does if you sub to `react whenever $ss.tap` 17:04
timotimo right, last only goes out of the whenever
timotimo done would go out of the react/supply 17:04
Zoffix m: my $s := Supplier::Preserving.new; $s.emit: 42; my $ss = $s.Supply.on-close: {say "closed"}; react whenever $ss.tap {say "here"; last}; say "sending more stuff"; $s.emit: 70; react whenever $ss { say "init" }
camelia (timeout)here 17:05
Zoffix m: my $s := Supplier::Preserving.new; $s.emit: 42; my $ss = $s.Supply.on-close: {say "closed"}; react whenever $ss.tap {say "here"; done}; say "sending more stuff"; $s.emit: 70; react whenever $ss.tap { say "init" }
camelia here
sending more stuff
init
Zoffix ta-da \o/ :)
timotimo that's not how you use on-close, though?
oh, it is
well, almost
timotimo oh, no, you're assigning the result to $ss and using that 17:05
forget i ever said anything
Zoffix tho seems you gotta continue using `.tap`s. If you try to use just the Supply itself in the second react, it "hangs" and never gets that second emit 17:08
timotimo why are you whenevering $ss.tap? that's weird to me 17:09
Zoffix timotimo: 'cause that's what worked. 17:10
Zoffix I don't know this stuff. I'm blindly trying things 17:10
timotimo whenever is there to create a tap if you pass a supply, but you're passing a tap. it's probably treating it as if it were just a single value and fires the inner block once 17:11
m: my $s := Supplier::Preserving.new; $s.emit: 42; my $ss = $s.Supply.on-close: {say "closed"}; react whenever $ss.tap {say "here"; done}; say "sending more stuff"; $s.emit: 70; react whenever $ss.tap { say "init: $_" }
camelia here
sending more stuff
init: Tap<40767248>
timotimo look, it runs the block for "init" with the tap object
Zoffix oh crap :( 17:12
ryn1x_ Trying to learn how to use a perl5 module in perl6. I was able to install it and import with use. How do I change thise line to work in p6: "my $tif = Graphics::TIFF->Open( 'img2.tif', 'r' );"
timotimo anyway, your use case looks more like what a channel is for
Zoffix ryn1x_: my $tif = Graphics::TIFF.Open: 'img2.tif', 'r'; 17:13
ryn1x_: my $tif = Graphics::TIFF.Open('img2.tif', 'r'); # if you like parens 17:14
timotimo: ok thanks.
timotimo or maybe a .share could do something for you in some place? 17:16
ryn1x_ Zoffix: ty. that worked. 17:17
[Coke] m: my$a=100000000;my$b=1000000;my$c;for ^$b {$c++ if $a.rand.Int gcd $a.rand.Int == 1}; say sqrt(6/($c/$b)); 17:52
camelia 3.14205035935387
[Coke] \o/ 17:53
maths are weird.
Zoffix \o/
[Coke] m: my$a=100000000000;my$b=10000000;my$c;for ^$b {$c++ if $a.rand.Int gcd $a.rand.Int == 1}; say sqrt(6/($c/$b)); 17:54
camelia (timeout)
[Coke] awwww. too much maths 17:55
Zoffix m: say e**(i×π) 17:57
camelia -1+1.22464679914735e-16i
Zoffix m: say e**(i×π) ≅ −1 17:57
camelia True
Zoffix \o/
I mean... 17:58
m: say 𝑒**(i×π) ≅ −1
camelia True
Zoffix :) Unicode FTW
raschipi m: say 𝑒**(2×i×π) ≅ 1
camelia True
Zoffix m: say log −1 17:59
camelia NaN
Zoffix m: say i×π == log −1+0i 18:03
camelia True
raschipi say 𝑒**($_×i×π) ≅ - ($_%2×2 -1) for 1..10 18:05
evalable6 True
True
True
True
True
True
True
True
False
False
raschipi Floats don't work very well. 18:06
timotimo nums are double by default at least
Zoffix m: my \term:<♥> = 42; say 𝑒**(i×♥) == cos(♥) + i×sin ♥
camelia True
raschipi still floating point math
timotimo aye 18:07
enheh Hello, everyone! I'd like to specify in a regex the complement of a character class, for example /<-[ ',' ]>/, but where the actual character is specified with a variable. /<-[$var]>/ doesn't work, and neither does /<-[<{$var}>]>/. Is there a way to do this? 18:08
ugexe m: my $var = ","; say "ab,cd" ~~ m/<- [<$var>] >/ 18:11
camelia 「b」
enheh Thanks, ugexe! 18:18
perlpilot enheh: note that <-[ ',' ]> probably isn't the character class you think it is. :) 18:19
enheh Why is that? 18:20
perlpilot m: "foo" ~~ /<-[ 'o' ]>/; 18:21
camelia Potential difficulties:
Quotes are not metacharacters in character classes
at <tmp>:1
------> 3"foo" ~~ /<-7⏏5[ 'o' ]>/;
Repeated character (') unexpectedly found in character class
at <tmp>:1
------> 3"foo" …
mst enheh: -[ , ] as ugexe said. 18:22
enheh Okay. :)
callyalater m: say ":D"; 18:26
camelia :D
AlexDaniel` e: my@f=1.FatRat,*×++$…*; say (1.FatRat / ((2×(1.FatRat,{($_+2/$_)/2}…∞)[11]).FatRat/9801 × (@f[4*$_] × (1103 + 26390×$_) / (@f[$_]⁴×396**(4*$_)) for ^130).sum)).substr: 0, 1000 18:41
evalable6 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348…
AlexDaniel`, Full output: gist.github.com/9100992306d9af1055...e36ca4a60d
AlexDaniel` one thousand including 3 and the dot 18:42
AlexDaniel` that's really slow tho 18:42
AlexDaniel` I don't really remember what all that magic is though 18:43
but the basic idea is that you get some FatRats in there so that they bite other rats 18:44
and you can increase [11] and ^130 if you need more precision 18:46
raschipi 64 digits is enought to calculate the lenght of the universe within an atom's radius precision, that ought to be enough 18:48
AlexDaniel` well, if all you need is 64 digits then just hardcode it :) 18:50
e: my@f=1.FatRat,*×++$…*; my $FatPi = (1.FatRat / ((2×(1.FatRat,{($_+2/$_)/2}…∞)[11]).FatRat/9801 × (@f[4*$_] × (1103 + 26390×$_) / (@f[$_]⁴×396**(4*$_)) for ^130).sum)); say $FatPi.substr(0, $FatPi.index(‘999999’)), ‘ and so on’ 18:52
evalable6 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348…
AlexDaniel`, Full output: gist.github.com/adca14bf5e40fc9c5f...a7cb21f3e7
AlexDaniel` that didn't work at all
e: my@f=1.FatRat,*×++$…*; my $FatPi = (1.FatRat / ((2×(1.FatRat,{($_+2/$_)/2}…∞)[11]).FatRat/9801 × (@f[4*$_] × (1103 + 26390×$_) / (@f[$_]⁴×396**(4*$_)) for ^130).sum)); say $FatPi.substr(0, $FatPi.index(‘999999’)+6), ‘ and so on’ 18:55
evalable6 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348…
AlexDaniel`, Full output: gist.github.com/b3f625c298b4d43742...4c2afc7b72
HoboWithAShotgun .tell zoffix github.com/zoffixznet/perl6-Color/pull/8 19:21
yoleaux HoboWithAShotgun: I'll pass your message to zoffix.
HoboWithAShotgun .tell HoboWithAShotgun you suck 19:22
yoleaux HoboWithAShotgun: Talking to yourself is the first sign of madness.
HoboWithAShotgun ha!
nine out of ten voices in my head say i am completely normal. 19:23
HoboWithAShotgun you guys are a really viscid audience, does no one want to ask about the tenth? 19:25
geekosaur 'we get stranger stuff than you in our breakfast cereal' 19:31
ufobat is there a key in META6.json for suggested but not required dependencies? 19:38
ufobat i want to suggest IO::Socket::Async::SSL, but it's not required to have it. 19:39
ufobat i cant have [ 'IO::Socket::Async', 'IO::Socket::Async::SSL'] in it, since the first one is part of the core, right? 19:43
timotimo it's not only part of the core, it's not even something you can "use" 19:44
m: use IO::Socket::Async
camelia ===SORRY!===
IO::Socket::Async is a builtin type, not an external module
callyalater .tell callyalater Talking to yourself is the first sign of madness.
yoleaux callyalater: Talking to yourself is the first sign of madness.
HoboWithAShotgun magic!
ufobat aye 19:45
there is no suggests : [] ... :(
geekosaur I think only apt does 'suggests'? 19:46
timotimo you know ... if we have a suggests section of a module, installing something that is suggested by an already-installed module could totally trigger a re-build of that 19:47
moritz "suggests" always felt weird to me
timotimo gentoo has "use flags" 19:48
that's mildly similar
moritz either it's a dependency, or not, or one needed for only a part of the functionality
[Coke] IMO, if it's optional, it belongs in the docs.
kent\n optional dependencies are nice to be visibly forwards declared somewhere that automated tools can expose. 19:49
[Coke] no one is going to be installing optional "deps" off zef, I think. 19:49
geekosaur "suggests" is the sort of thing that makes no sense to experienced techies but is very helpful to ordinary users
kent\n not entirely true...
say a package like Apache::Test 19:50
moritz IMHO bundles are a much better way to help ordinary users, IMHO
kent\n some of the modules bundled with Apache::Test require mod_perl, but most of them don't.
and you can use it just fine without mod_perl
ufobat i am just wondering because the meta file for cpan at perl5 does have suggestions and recommendations in it, dosn't it?
kent\n but if you're using those modules, you'll also want to be using mod_perl 19:51
ufobat moritz, if suggtests feels strange would you rather not state in a meta file that there are features of $something that only work if those requirements are met. (but in gerneral they are no requirements. ) 19:52
kent\n the difference between "suggests" and "recommends" in usage is "recommends" should be installed by all, and only omitted "if you know what you're doing" 19:53
whereas suggests should not be installed by default.
kent\n but "recommends" are not "required" either, they're avoidable, if you're clever. 19:53
ufobat aye 19:55
so in my case, a HTTP Server module should have SSL support nowadays. 19:56
sjn o/ 19:57
'sup #perl6
kent\n has often mapped "recommends" to USE="-minimal" in gentoo, but its a bit frowned on because the flag can change the dependency graph without strictly needed rebuilds, but changing the flag implies a rebuild 19:59
and optional dependencies in the graph really complicate the package mangers solver, and stability-level consistency requirements. :/ 20:01
read: if you can find a good way of avoiding optional deps ... \o/
timotimo remembers fun times with revdep-rebuild 20:06
tadzik and that thingy that updates perl modules 20:07
raschipi The Debian way of doing 'use flags' is called 'build profiles' and it will change the way the package is compiled. 20:10
raschipi recommends and suggests are for noobs and people that just don't care. 20:11
HoboWithAShotgun uh, nice. RPM already has an updated WPA2 package and it is marked wih two big red exlamation marks. coul be important, eh? 20:19
buggable New CPAN upload: App-Cpan6-0.6.16.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/....16.tar.gz 20:21
geekosaur maybe a little...
raschipi m: '/sys/class/net/'.IO.dir>>.add('/carrier').grep(*.slurp.chomp)>>.dirname>>.IO>>.basename.grep({$_ ne 'lo'}).map: *.say 20:22
camelia eth0
tyil there's no way ta make JSON::Fast output the json in a sorted (by keys) fashion, would this be possible to do at all in perl6? 20:42
El_Che so, am I correct stating that rakudo is not relocatable? 20:58
HoboWithAShotgun lets look at the source 21:05
geekosaur not very relocatable. because CURLIs aren't currently 21:07
El_Che related to this? github.com/rakudo/rakudo/commit/e8...ed42dd5f07 21:08
HoboWithAShotgun tyil: No, but it is an easy patch
modules.perl6.org/dist/JSON::Fast:...ON/Fast.pm line 124
tyil oh, I could just throw a sort inbetween there
add in an arg in to-json to enable it 21:09
HoboWithAShotgun yes, add a :$sort-keys argument, the sort and then file a pulll request
i'll walk you trough the process if you need/want 21:10
HoboWithAShotgun heh, i'm hacking on an oldish p5 script of mine and promptly got the sigils wrong 21:21
tyil HoboWithAShotgun: thanks, I think I have it now, I'll put up a PR 21:27
github.com/timo/json_fast/pull/32/files if you're interested
timotimo tyil: i've thought about it a few times already 21:42
it could mix in a role when parsing to store what order keys arrived in and recognize the same role in to-json (and the user could use the role, too, to get their own sorting going on) 21:43
then you're not limited to sorting
sergot .seen masak 21:51
yoleaux 1 Apr 2017 04:35Z <MasterDuke> sergot: fyi, i just created a PR in github.com/sergot/openssl that gave me a measurable speedup using HTTP::UserAgent to get an HTTPS url
I saw masak 15 Oct 2017 12:39Z in #perl6-dev: <masak> besides me*
HoboWithAShotgun dude, tyil. you forgot a say in there. that's like a surgeon forgetting the glove! 21:52
you just virtually killed someone ;-)
timotimo and my test suite doesn't cover nothing being output ... 21:53
tyil HoboWithAShotgun: fixed 22:00
timotimo i think i'll want to refactor JSON::Fast to be based on a class and things like pretty yes/no and sort lists yes/no would become attributes
tyil might be nice 22:01
timotimo performance-wise at least
but it'd also be neat if users could override parts of to-json
tyil this works good enough for me now :'D 22:01
timotimo and i can imagine even allowing the user to pass factories for arrays and hashes
HoboWithAShotgun whatever makes you happy :) 22:03
you could expect the to be jsoned object doing a role that has a to-json method 22:04
like .gist but for json
timotimo ideally something that Just Works with pretty/indent 22:05
HoboWithAShotgun does your module support classes? or just plain datastructures? when i put a dattime in, do i get one back? 22:07
timotimo since a few weeks it explicitly supports DateTime
HoboWithAShotgun of course! but you know what i mean 22:08
timotimo i seemed to remember having once used .Capture for that, but that's bogus, as it'll have a hash and a list part
also i finally need to do proper systematic benchmarking for this 22:09
Zoffix tyil: do you remember what the CPAN bug was? Seems it's now properly showing just the latest version: modules.perl6.org/dist/App::Bob:cpan:TYIL 22:32
And I don't see any new commits going in
tyil Zoffix: the issue was with me uploading newer versions and the old still existing, giving an ambiguity page 22:33
Zoffix tyil: how do I trigger that?
Zoffix Looks like there are several versions of Bob: cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/ 22:34
tyil have one of your modules available via cpan and indexed on modules.perl6.org, push a new version of that module to cpan, then wait for the issue to happen
but it seems to have been fixed, yes
(that module was renamed to App::Cpan6 btw, the App::Bob dists are pending removal on cpan) 22:35
Zoffix can't repro dam
Zoffix reads the sauce
Geth modules.perl6.org: 5864596d6d | (Zoffix Znet)++ | 2 files
Add --no-rsync option

To allow debugging CPAN dists
22:42
Geth modules.perl6.org: 96b5b508f4 | (Zoffix Znet)++ | bin/build-project-list.pl
Document all the new --no-* options
22:44
tyil timotimo: do you want to merge my PR or would you rather refactor it all at once? 22:50
tyil if it gets merged I can commit a change in App::Cpan6 to make use of the new flag 22:50
Zoffix Ah, finally reproed. The problem exists only during the time when the new version is found and processed and before the build run finishes (at the end, it tosses all the "old" dists). 22:58
ZofBot: let's call it a feature and be done with it \o/
ZofBot Zoffix, [Aside] Ay, good leave have you; for you will have leave Till youth take leave and leave you to the crutch
tyil .hug ZofBot 22:59
huggable hugs ZofBot
tyil .hug Zoffix
huggable hugs Zoffix
tyil thanks for looking into it :>
Zoffix tyil: I'm gonna reschedule the fix until next week. The bug is not super severe (it lasts for 1hr when new version is uploaded) and I wanted to squeeze some stuff into upcoming rakudo release. 23:07
|4d fix modules cpan bug 23:08
ZofBot Zoffix, Will remind you on 2017-10-21T19:08:10.999610-04:00 about fix modules cpan bug
tyil its not a high prio issue for me either, just something I noticed that seemed wrong 23:09
HoboWithAShotgun i am doing require ::($provider); and i get a "Cannot find method 'EXISTS-KEY': no method cache and no .^find_method" 23:23
the vaiable contains the correct string, the module in question is a "module" that contains nothing but an our constant 23:24
i also get strange warning when i use the module instead of require-ing 23:26
err, vice versa
geekosaur show the actual source to the module? 23:29
HoboWithAShotgun right now it's just an empty method 23:31
ah, i am doing that in an EXPORT routine 23:37
that's most likely the problem
since i can do perl6 -e 'require ::("thesamemodule")' without problems