»ö« 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.
squashable6 🍕 vrurg++ wrote a comment on a review for “ Fix non-reloc install &…”: github.com/rakudo/rakudo/pull/2939...r289622067 00:09
🍕 vrurg++ submitted a review on pull request “ Fix non-reloc install &…”: github.com/rakudo/rakudo/pull/2939...-244605150
squashable6 🍕 vrurg++ wrote a comment on “ Fix non-reloc install &…”: github.com/rakudo/rakudo/pull/2939...-497987454 00:14
squashable6 🍕 vrurg++ opened pull request “Make subsets validate ag…”: github.com/rakudo/rakudo/pull/2946 01:05
🍕 vrurg++ wrote a comment on “Make subsets validate ag…”: github.com/rakudo/rakudo/pull/2946...-497989584 01:06
cpan-p6 New module released to CPAN! Cofra (0.1.1) by 03HANENKAMP 03:48
hythm is there equivalent to `callsame` and `callwith` (not for dmulti dispatch) but for individual methods or subs, (instead of writing the name of the method or sub again)? 04:42
hythm p6: sub s ( $i ) { say $i; return if $i == 7; samewith $i + 1 }; s 1 04:50
camelia 1
2
3
4
5
6
7
hythm nvm, its working already 04:51
hythm p6: class C { method m ( $i ) { say $i; return if $i == 7; samewith: $i + 1 } }; C.new.m 04:56
camelia Too few positionals passed; expected 2 arguments but got 1
in method m at <tmp> line 1
in block <unit> at <tmp> line 1
hythm ^ does it work for methods though? 05:01
gfldex hythm: see docs.perl6.org/language/variables#&?ROUTINE 06:13
hythm thanks gfldex, checking... 06:19
Geth doc: b85bfd3974 | (JJ Merelo)++ | doc/Type/Any.pod6
Changes and qualifies links

These subs were moved away from List since they are actually not defined there. Changed links, eliminated sub definition from Any. Closes #2834
07:37
synopsebot Link: doc.perl6.org/type/Any
cpan-p6 New module released to CPAN! Term::TablePrint (1.4.8) by 03KUERBIS 07:46
New module released to CPAN! Term::Form (1.2.5) by 03KUERBIS
New module released to CPAN! Term::Choose (1.5.7) by 03KUERBIS
New module released to CPAN! Term::Choose::Util (1.2.8) by 03KUERBIS
Geth doc: 63490e6d5a | (JJ Merelo)++ | assets/sass/_jquery-ui.scss
Debugging CSS, refs #2837
08:42
doc: d69b311217 | (JJ Merelo)++ | 2 files
Eliminates CSS errors in Firefox

This closes #2837. Checked #2836, still failing in the same way.
squashable6 🍕 lizmat++ wrote a comment on “Possible slowdown in is-prime”: github.com/rakudo/rakudo/issues/29...-498012336 08:53
lizmat weekly: digitalbarbedwire.com/2019/06/01/c...in-perl-6/ 08:56
notable6 lizmat, Noted!
squashable6 🍕 lizmat++ wrote a comment on “.reverse takes time when it probably shouldn't”: github.com/rakudo/rakudo/issues/29...-498014999 09:32
🍕 lizmat++ wrote a comment on “.reverse takes time when it probably shouldn't”: github.com/rakudo/rakudo/issues/29...-498015185 09:35
BigBadaboom Well, hello you beautiful people 10:02
BigBadaboom is there a tool to bootstrap a new module? i'm looking at zef but dont see an option like "zef new" 10:04
jmerelo BigBadaboom: you're looking for App::Mi6 10:06
BigBadaboom Looks promising. Tx 10:11
squashable6 🍕 MasterDuke17++ wrote a comment on “Possible slowdown in is-prime”: github.com/rakudo/rakudo/issues/29...-498022281 11:23
bfisher Guile 15:00
Python 15:01
bfisher maxima 15:09
bfisher integrate(sqrt(16*t^2 + 9*t^4), t, 0, 2); 15:10
factor(%);
AlexDaniel bfisher: sorry? 15:15
antoniogamiz » operator is sooo useful 15:20
bfisher quit(); 15:21
clear
antoniogamiz AlexDaniel: is possible that a hash does not find some of its keys? 15:42
I'm running the same code and sometimes it does not find the key I'm consulting
AlexDaniel antoniogamiz: O_O
antoniogamiz: that sounds too bad to be a bug :) 15:43
antoniogamiz: could it be an issue in your code?
antoniogamiz even I'm printing the keys before and it's there
AlexDaniel hmmm… can we see the code?
moritz antoniogamiz: might be something like a non-printable character (like a zero-width space) that you don't notice? 15:44
antoniogamiz here it is: gist.github.com/antoniogamiz/99294...a98e8aa6c2 15:45
here a screenshot: paste.pics/5POHD 15:47
moritz: mmm I dont think, but maybe? idk
btw, pretty cool all your work in docs 15:48
moritz antoniogamiz: ok, so it looks like the hash access isn't the problem. Sometimes I get "No such method 'name' for invocant of type 'Any'. Did you mean any of these?" 15:51
antoniogamiz: which means that .super must have returned an empty list 15:52
antoniogamiz oh you're right :ooo
but that still quite strange because it should work always mmm
moritz agreed
antoniogamiz I mean is the same code xd 15:53
moritz so, either there's some bug in rakudo, or Perl6::TypeGraph has some non-deterministic behavior 15:56
antoniogamiz yep :/ 15:58
moritz antoniogamiz: if I remove all sections except the first one from test-type-graph, it triggers the same bug 15:59
antoniogamiz mmmm 16:00
jmerelo antoniogamiz: is that code also here? github.com/antoniogamiz/Perl6-TypeGraph 16:02
moritz (fwiw I'm testing with Perl6::TypeGraph from the perl6/doc repo)
antoniogamiz not yet
jmerelo antoniogamiz: add the test there, please, even if does not pass. Easier to test it that way. 16:03
antoniogamiz moritz: I've done the same and also happens, with the same input
jmerelo: ok
moritz and the weird thing is that the code that applies the "Any" superclass is super simple 16:05
hm
I've added some debugging output, and this is what I get when I run it multiple times: perlpunks.de/paste/show/5cf3f3eb.1160.116 16:06
so it seems that the application of superclasses is in random order, and doesn't always work for all classes 16:07
and I know why :(
or maybe not...
but the application of superclasses happens while iterating %.types.values, which is in random order, and it modifies the elements 16:08
and at least the @roles iteration can add superclasses
so it would be safer to do the Any default in a separate iteration 16:09
antoniogamiz moritz: ty for the help, I will do that :)
moritz no, that's not it, since it's even random when I remove roles from the example file :(
antoniogamiz :,( 16:10
jmerelo moritz: the QAST is a hash, right? It should be random... 16:11
moritz jmerelo: yes
moritz fuuuu 16:15
I think I know why, volume 2
so, $t.super.append: $get-type('Any') can modify %.types
because if Any hasn't been parsed, $get-type inserts Any into %.types 16:16
and that messes up the iterator over %.types
which leads to one key being iterated over twice, and one key being missed
antoniogamiz so initializing %.types with a Perl6::Type of Any should fix it right? 16:17
moritz antoniogamiz: it seems you've found a bug that only happens when there is no class "Any" in the type graph
jmerelo antoniogamiz: you shouldn't use % as a lexical variable
moritz antoniogamiz: either that, or assert that %.types<Any> exists after the initial parse 16:17
though initializing with Any sounds cleaner
antoniogamiz mm yep, I will do that then 16:18
jmerelo moritz: still. $get-type has side effects.
antoniogamiz jmerelo: what should I use then? $?
jmerelo moritz, antoniogamiz: over a state variable
moritz huh? 16:19
moritz confused
jmerelo antoniogamiz: simply have $get-type return a value, not modify a state variable %.
moritz jmerelo: that's no good 16:20
jmerelo antoniogamiz: that's kind of a cache, but still, you can cache some other way. Easiest way would be to make it a external routine and make it "is pure"
jmerelo antoniogamiz: you might get a bit of speed by caching, but I don't think it's worth the while. 16:20
moritz if a type is referenced in multiple places and it's not in %.types, it will create several instance of it 16:21
jmerelo Ah, OK, I'm being dumb here 16:22
anyway, better not to have side effects. You can assign %!types (better this way) outside the function. 16:23
Line 89 is kinda a hack, too. Imagine $t is a "Junction" or simply a class that's not core. 16:25
moritz anyway, that class is designed to deal with core, so it makes some assumptions 16:26
so, there are generally two ways to deal with that:
1) if it detects those assumptions don't hold, die instead of introducing subtle bugs
2) harden it do not make those assumptions 16:27
2) is harder, but might be necessary depending on intended future use cases
jmerelo moritz: the basic idea is to have a tested, documented version of what's in there for use in documentation, in general. Could be used, in principle, outside perl6/doc 16:28
antoniogamiz moritz: the future use cases is to delete type-graph.txt
moritz antoniogamiz: then it doesn't make sense to investigate much effort into it
jmerelo moritz: I mean, right now it's only perl6/doc the one that draws pretty graphs, but imagine something complicated like Cro or Mojo (for Perl 6). Automatically generating a chart might help.
antoniogamiz jmerelo: if I declare it as %!types then it can be accessed 16:29
ugexe maybe im missing something, but `for %.types.values` isn't going to be deterministic
antoniogamiz cannot from outside*
moritz ugexe: that's known and not the point
ugexe ok, im still trying to catch up
moritz ugexe: the problem is that the code modifies %!types during iteration, under (admittedly undocumented) circumstances 16:29
that confuses the iterator
jmerelo antoniogamiz: well, it's hidden but you probably want that. Depends on what you really want.
ugexe ah ok
antoniogamiz jmerelo: $typegraph.types is used a lot in htmlify 16:30
moritz m: my @keys = <a b c d e f>; my %h = @keys Z=> 1; for %h { %h<g> = 1 if $_ eq 'c'; say $_ } 16:31
camelia a => 1
jmerelo antoniogamiz: Ah, OK. Let's leave it that way. Anyway, that you declare it like that does not mean you can't use it like %!types. Quite the opposite.
moritz m: my @keys = <a b c d e f>; my %h = @keys Z=> 1; for %h.values { %h<g> = 1 if $_ eq 'c'; say $_ }
camelia 1
moritz m: my @keys = <a b c d e f>; my %h = @keys Z=> @keys; for %h.values { %h<g> = 1 if $_ eq 'c'; say $_ }
camelia f
a
e
d
b
c
moritz m: my @keys = <a b c d e f>; my %h = @keys Z=> @keys; for %h.values { %h<g> = 1 if $_ eq 'c'; say $_ }
camelia d
a
f
b
c
e
antoniogamiz jmerelo: I know but you still need to be able to do .types
moritz m: my @keys = <a b c d e f>; my %h = @keys Z=> @keys; for %h.values { %h<g> = 1 if $_ eq 'c'; say $_ }
camelia f
c
b
d
e
a
1
moritz you see that this last time, it iterated over the 'g' key, but not the other times 16:32
jmerelo antoniogamiz: that depends on how you declare it. You can still declare it the way it is, but use it like %!types.
antoniogamiz aaaah ok ok, sorry I didnt get it 16:33
%.types{"Any"} = Perl6::Type.new(:name("Any")); 16:34
ugexe yeah ok. although now that i'm fully aware its not exactly surprising. getting to the fully aware part was not immediately intuitive
antoniogamiz %!types{"Any"} = Perl6::Type.new(:name("Any"));
that solves the problem, as moritz said
jmerelo antoniogamiz++ moritz++ 16:36
antoniogamiz mm unit class Perl6::sth {...code...}, the syntax is correct? 16:37
jmerelo no curly braces 16:38
antoniogamiz oh
jmerelo The whole point of unit is not to use curly braces
ugexe its really to differentiate it from perl 5 16:39
class Foo; used to work
antoniogamiz o/ 16:44
cpan-p6 New module released to CPAN! FindBin (0.4.0) by 03LEMBARK 17:24
andrzejku hey, people 17:35
jmerelo andrzejku: hey! 17:42
andrzejku jmerelo, I took a risk to keep learning Perl6 again :D even if there no job 17:43
but actually I think to try to use it instead of shell
do you think it is quite good substitution?
sena_kun with an ability to run jobs nicely and various constructions out of the box - I'd say "yes", but shell is much more widely accepted, of course 17:45
andrzejku sena_kun, I know however I tried to learn shell more in deep but it looks very hard 17:46
to write smth
it is not intuitive
sena_kun can't disagree with this. :) (though there are people who can) 17:47
Xliff \o 18:13
github.com/Xliff/p6-Clutter/commit...0e0aa79647
jmerelo andrzejku: it's quite good for everything... It gives you a very rich set of tools for OS automation... 18:15
Xliff: congratulations! Those are a lot of lines of code :-)
Xliff jmerelo: You have no idea! ;)
jmerelo: Thanks much tho!
Xliff jmerelo: docs.google.com/spreadsheets/d/12j...1199858184 18:20
Xliff jmerelo: This link might work better: drive.google.com/file/d/12j1Dy6zIc...w?ths=true 18:21
AlexDaniel sena_kun: I mean… piping is really hard 18:23
sena_kun: when compared to shells, of course 18:24
sena_kun AlexDaniel, when compared to shells, yes. Why not define a DSL? ;)
iirc in Haskell there is a just ok DSL for such a things. You can define a `|` operator and boom.
AlexDaniel sena_kun: because I don't want to develop that myself :)
Xliff jmerelo: 4th p6 related project I've taken over 10kloc, 5th if you include p6-GtkPlus
sena_kun AlexDaniel, Perl 6 right now is not particularly a language one should take when afraid of writing things, though the situation improves over time, of course. 18:27
Xliff sena_kun++ 18:29
AlexDaniel so are you saying that perl 6 is not for me? :)
Xliff LOL
Xliff wonders if he should flee, or make popcorn. 18:30
ugexe perl6 piping doesn't work on windows
Xliff sena_kun: See drive.google.com/file/d/12j1Dy6zIc...w?ths=true to see why I find your previous comment extremely humorous.
AlexDaniel “You need permission” 18:31
Xliff WTF?
OK, then lets try....
drive.google.com/file/d/12j1Dy6zIc...sp=sharing
xinming perl6: src/6model/sc.c:401: MVM_SC_WB_OBJ: Assertion `!(obj->header.flags & MVM_CF_FORWARDER_VALID)' failed. 18:33
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3src/67⏏5model/sc.c:401: MVM_SC_WB_OBJ: Assertion
5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3src/67⏏5model/sc.c:401: MVM_SC_WB_OBJ: Assertion
xinming I just encounter this once, Is this a big issue?
AlexDaniel xinming: not sure, but it needs to be fixed 18:34
xinming I'll try if I can repeat the problem, Maybe because of memory error. 18:34
ugexe seems like jit issue 18:37
sena_kun AlexDaniel, not sure when I became a moderator allowing or forbidding usage of someting! 18:41
xinming It seems, the problem is in old version of Moar 18:47
I just compiled to the newest version, I don't see that anymore.
uzl Hello, #perl6! 22:00
uzl So I'm wondering how do I access a module documentation after it's installed. 22:01
I mean the doc created by the declarator blocks (#| and #=). I could access each module's doc (`PERL6LIB=lib p6doc lib/Module.pm6`) if I have the source but how would someone who just installed it would do it? 22:03
uzl I just remembered that you just specify module's full qualified name. 22:18
cpan-p6 New module released to CPAN! Ranker (0.0.1) by 03UZLUISF 23:31