»ö« 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.
mscha m: my @a = 4,5,6; my @b = (1,2,3, |@a); say @b; 00:04
camelia rakudo-moar d4a0e0: OUTPUT«[1 2 3 4 5 6]␤»
mscha Not very well documented, that is...
parabolize tbrowder: here is where I think he posted it irclog.perlgeek.de/perl6/2016-06-23#i_12720216 00:13
00:23 ssotka left
dalek c: b36a6b2 | (Tom Browder)++ | doc/Language/traps.pod:
add info on space probs with function call format
00:33
c: 7d6d5c3 | (Tom Browder)++ | doc/Language/traps.pod:
remove blurb about possible change
c: 90efa03 | (Zoffix Znet)++ | doc/Language/traps.pod:
Merge pull request #637 from tbrowder/func-trap

add info on space probs with function call format (second attempt)
00:34 spider-mario left 00:38 Zoffix joined
lizmat is irclog.perlgeek.de/perl6-dev/today dead only for me, or are there more people not getting it ? 00:41
Zoffix dead here too 00:42
00:45 mscha left
jdv79 is that moritz? mortiz. 00:47
Xliff Dead here, too
jdv79 ditto. nicht gut.
00:52 ssotka joined 00:58 lambd0x joined 01:09 tbrowder left 01:12 tbrowder joined 01:17 tbrowder left 01:18 kurahaupo_ left 01:20 kalkin- left, kalkin-_ joined 01:22 daxim left 01:26 daxim joined 01:31 Bodger1 joined 01:34 jjido joined 01:37 RabidGravy left, Bodger1 left 01:38 Bodger1 joined 01:39 jjido left, TakinOver left 01:41 Ptolemarch joined, Ptolemarch left 01:42 Bodger1 is now known as Bodger1234 01:46 ilbot3 left 01:47 ilbot3 joined
Zoffix Does NQP offer some sort of dd function that I could use to dump data to see what it is? I'm trying to see what $cur_GLOBALish.WHO returns :/ 01:47
01:48 TakinOver joined
Zoffix (but in general, the "dump this to see what it is" comes up often for me) 01:48
01:49 daxim left 01:54 daxim joined
lizmat Zoffix: I'd like an answer to that one as well :-) 01:55
Zoffix :)
02:00 molaf left 02:07 cdg left 02:12 molaf joined 02:14 noganex joined 02:18 noganex_ left 02:20 kaare_ joined 02:31 _mg_ joined 02:32 _mg_ left 02:42 _mg_ joined 02:43 _mg_ left 02:44 _mg_ joined 02:45 _mg_ left 02:47 skids joined 02:50 lambd0x left 03:02 lambd0x joined 03:15 TEttinger joined 03:22 kid51 left
lambd0x :q 03:25
03:26 lambd0x left
lizmat success! :-) 03:28
03:28 pdcawley left
Zoffix :) 03:35
03:39 huggable left 03:54 _mg_ joined
llfourn irclog.perlgeek.de/ # seems to be down atm 03:54
Zoffix It is. The admin is sleeping ATM.
llfourn kk 03:55
03:55 _mg_ left
sammers c 04:02
04:02 pdcawley joined 04:14 dupek joined 04:16 daxim left 04:28 khw left 04:37 djbkd joined 04:41 djbkd left 04:43 xinming joined 04:46 xinming_ left
ugexe nine: for back compat this is probably the only real way: gist.github.com/ugexe/72b5e491fddb...039725872a or else inheritance will be non back compat, in which case it might as well be broken completely to save on all the technical debt shims 04:53
04:55 Cabanossi left 04:58 Cabanossi joined
Xliff can custom trait mods be exported? 05:07
05:09 bjz left
jdv79 can't think of why not at the moment 05:17
05:25 raiph joined
llfourn sub trait_mod:<is>(...) is export {...} # works 05:26
05:49 brrt joined 05:55 grondilu joined 05:57 brrt left 05:58 skids left 06:05 CIAvash joined 06:09 brrt joined 06:17 domidumont joined 06:21 domidumont left, domidumont joined
psch m: module Foo { sub trait_mod:<is>($x, :$fooey) is export { $x but role { method foo { "foo" } } } }; import Foo; class A is Int { } # you probably want a multi though 06:22
camelia rakudo-moar a556a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected named parameter 'export' passed␤at <tmp>:1␤»
llfourn (err yes you want a multi psch++) 06:30
m: module Foo { multi trait_mod:<is>(Mu $x, :$fooey) is export { $x.^add_role(role { method foo { "foo" } }) } }; import Foo; class A is fooey { }; say A.foo # This works but "but" doesn't 06:35
camelia rakudo-moar a556a8: OUTPUT«foo␤»
llfourn I guess but doesn't modify the original thing right? 06:37
m: say Int but Bag
camelia rakudo-moar a556a8: OUTPUT«Cannot mix in non-composable type Bag into object of type Int␤ in block <unit> at <tmp> line 1␤␤»
llfourn m: say Int but Baggy 06:38
camelia rakudo-moar a556a8: OUTPUT«(Int+{Baggy})␤»
llfourn m: my $a = Int; say $a but Baggy; say $a
camelia rakudo-moar a556a8: OUTPUT«(Int+{Baggy})␤(Int)␤»
06:38 brrt left
llfourn and I don't think return value from trait_mod:<is> is used 06:38
psch right, you'd have to either make $x sigilless or 'is rw', but then you get composition order problems or something it looks like 06:41
m: multi sub trait_mod:<is>(Mu $x is rw, :$fooey) { $x but role { method foo { "foo" } } }; class A is fooey { };
camelia rakudo-moar a556a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤'A' cannot inherit from 'fooey' because it is unknown.␤at <tmp>:1␤»
psch m: multi sub trait_mod:<is>($x is rw, :$fooey) { $x but role { method foo { "foo" } } }; class A is fooey { };
camelia rakudo-moar a556a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤'A' cannot inherit from 'fooey' because it is unknown.␤at <tmp>:1␤»
psch m: multi sub trait_mod:<is>(Mu:U $x is rw, :$fooey) { $x but role { method foo { "foo" } } }; class A is fooey { };
camelia rakudo-moar a556a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤'A' cannot inherit from 'fooey' because it is unknown.␤at <tmp>:1␤»
psch ah, no, just dispatch in &trait_mod:<is>
llfourn I think you can't "but" things before they are composed?
m: class Foo { BEGIN say Foo but Int } 06:42
camelia rakudo-moar a556a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while evaluating a BEGIN␤at <tmp>:1␤Exception details:␤ X::Mixin::NotComposable exception produced no message␤ in code at <tmp> line 1␤␤»
psch m: class A { method new { self but role { method m { "foo" } } } };
camelia ( no output )
psch i don't think we're done composing during .new..?
llfourn yeah we are?
psch alright then :)
llfourn the type is composed is what I mean 06:43
psch right
llfourn not any specific object
06:46 wamba joined 06:47 bjz joined
psch yeah, that makes sense 06:49
m: multi sub trait_mod:<is>(Mu \x, :$fooey) { x but role { method foo { "foo" } } }; class A is fooey { }; 06:50
camelia rakudo-moar a556a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤'A+{<anon|73771392>}' cannot inherit from 'A' because 'A' isn't composed yet (maybe it is stubbed)␤at <tmp>:1␤»
psch i like this failure mode :)
it's perfectly sensible too, we're still building the type object for A when A has to be A+{<anon>} 06:51
llfourn yep, rakudo++ 06:52
psch i think it's a bit sad that we can only had new trait_mod keywords via a Slang 06:54
but well, it does seems somewhat reasonable from a "know what language you're in" perspective
s/somewhat//
that's also part of why the fooey trait above doesn't work i guess 06:55
'cause <is> always looks for a typename
06:56 domidumont left
llfourn maybe someday 06:56
06:56 RabidGravy joined
llfourn we already have custom type declarators with EXPORTHOW 06:56
psch right, but that is effectively a Slang 06:57
'cause you're messing with %*LANG, if in a user-unfriendly way
llfourn but so are custom infixes etc? that's just how we change the parser in rakudo.
psch yeah 06:58
that's also why NC had horribly large moarvm bytecode files
because it declares the HAS declarator
which is why it was moved to Perl6::Grammar
llfourn ah I didn't notice that change. 06:59
psch that's something of a medium-effort-high-reward thing, too
figuring out a way to subclass the language braid without having to clone it completely
well, i'd think it's medium effort, but it might be somewhat high vOv
llfourn when you write a slang you have to "clone" the language braid? 07:00
psch well, you subclass it
llfourn so shouldn't that be efficient?
psch which is clone + add stuff, from a memory perspective
(still highlevel-ish "memory perspective" :P ) 07:01
llfourn oh ok. So when you serialize it you serialize the whole thing?
psch yeah, that's what seemed to have happened with NC at least
llfourn I see.
psch i mean, there were something like 50mb precomp files for a module with around 10k loc or so..? 07:02
llfourn o.o
psch don't recall the exact details, it was maybe two weeks ago
07:03 CIAvash left
psch ac0dcddb11e4 is the commit in question 07:04
that day and the day before in the clog has the discussion
i.e. Jun 14
07:05 brrt joined
dupek hey which web perl framework best to use? 07:09
brrt dupek: for perl6? 07:13
for perl5, ymmv, i like mojolicious a lot
for perl6 there are several projects in some stage of development
dupek brrt, when I look at mojolicious it took third place
brrt and i couldn't tell you
ok, well, i guess we like different things :-) 07:14
dupek brrt, not I just think
brrt what would you prefer above mojolicious?
just out of curiosity 07:15
07:16 jjido joined 07:18 CIAvash joined 07:27 dupek left 07:32 TakinOver left 07:35 ilbot3 left, ilbot3 joined 07:40 huggable joined 07:42 ssotka left 07:51 firstdayonthejob joined, lizmat left
Woodi m: my @a = <a b c>; say @a.perl; dd @a 07:52
camelia rakudo-moar a556a8: OUTPUT«["a", "b", "c"]␤Array @a = ["a", "b", "c"]␤»
07:54 lizmat joined, jjido left 07:58 jjido joined 07:59 hankache joined 08:00 jjido left 08:05 dupek joined 08:15 rindolf joined
BooK I'm starting a new project in Perl6, and I plan to write some Perl5 modules if needed (e.g. DBIC modules) if the stuff I want is not available in Perl6 yet 08:46
08:46 jmark joined
BooK so I have two questions: 08:46
1. is that sane and is Inline::Perl5 up to it? 08:47
2. how do I name my lib directories? (I was thinking lib and lib5, since it's supposed to be mainly perl6)
moritz BooK: yes, and sounds sensible 08:49
dogbert17 good morning #perl6 08:52
moritz: regarding my certificate problems yesterday, turns out my antivirus was to blame 08:54
moritz dogbert17: those things are the devil's doing 08:57
dogbert17 indeed, I have now turned off something ESET calls 'SSL/TLS Protocol Filtering' 08:58
and docs.perl6.org comes up without any problems
hankache what's an anti-virus? 09:03
;) 09:04
moritz hankache: a virus made from anti matter
hankache hehe 09:05
09:05 FROGGS joined
hankache any recommendations for a vps? What do you know/think of linode? 09:06
moritz linode has a terrible security track record 09:08
I use OVH, and they are OK 09:09
hosteurope also has a good-ish reputation in the low-cost sector
also digitial ocean 09:11
hankache moritz i'll look at them now
moritz thanks
moritz hankache: if you go with digital ocean or linode, there are a few promo codes that get you one month for free
09:15 brrt left
hankache moritz which OVH vps are you using (SSD/Cloud RAM/Cloud)? 09:15
one of them is RAM supercharged 09:16
moritz hankache: uhm, dunno, I think I have 2GB RM 09:18
VPS 2016 SSD 1 09:20
seems to be the product
09:21 brrt joined
moritz I use it to host sudokugarden.de, which gets about 45k visitors a month 09:21
(and it mostly idles)
hankache aha 09:22
moritz i want to play a bit with perl 6 and bailador do you think 1 GB RAM is enough? 09:29
or should I go for 2?
09:29 rindolf left 09:30 brrt left
moritz hankache: you should go with 2 09:31
simply for compiling rakudo
hankache moritz indeed 09:32
is one core enough? 09:36
hahainternet you don't run out of cores in the same way as ram :) 09:39
hankache yup 09:41
the question is would rakudo compile on a single core? 09:42
or will it take forever
09:42 espadrine joined, rindolf joined 09:47 TEttinger left 09:48 vaisian joined
hahainternet hankache: i compiled rakudo on a dual core 2.8ghz machine with 8gb ram 09:51
it didn't take very long at all iirc
psch i don't think the number of cores really matters
there's very few bits in the rakudo build process that can be paralized
err
parallelized?
hankache hahaha 09:52
indeed
hahainternet looks like it was 8 min 30s for me 09:53
on this crap old machine
so 1 core on a newer machine would probably be faster
09:54 spider-mario joined 09:55 kaare_ left, kaare_ joined
hankache thank you 09:56
hahainternet you're welcome
grondilu "there's very few bits in the rakudo build process that can be 09:59
09:59 AlexDaniel joined
grondilu paralized" I find it surprising 09:59
hahainternet so i've been thinking about perl, perl6 and 'compile time decisions' and it strikes me that a rich, complex object system is also shooting yourself in the foot in some areas 10:01
psch grondilu: why? we're concatenating all of src/ into three or so files that depend on compilation in a specific order
hahainternet like how type subsets for the most part have to be decided at runtime
does anyone have any resources on heavily restricted languages where most if not all expressions can be decided at compile time? 10:02
psch C++?
10:02 iH2O joined
hahainternet C++ is the opposite of a restricted language, the template system is turing complete on its own 10:02
grondilu psch: I was thinking of the many files in src/core and I had hard time imagining that they need to be compiled in sequence.
psch oh, yeah, i must've overlooked that
hahainternet psch: i mean something where you could do NonEmptyWhatever where { .something > 0 }
in perl6, that .something call has to be looked up at runtime afaik
and the fact that the halting problem precludes some 'optimisation' 10:03
psch hahainternet: right, because we cannot decide method dispatch at compile time
tadzik hahainternet: well, it is compile-tiem though :)
hahainternet well i'm not criticising perl6
or trying to make any claims about it
just looking for an alternative option to read about and understand 10:04
i guess f# or haskell or ocaml prly the way as usual
psch grondilu: well, as mentioned, all of src/core/ is compiled as CORE.setting. and it *is* necessary, because e.g. Int.pm needs to be compiled after (and in the same scope as) e.g. Any.pm
10:07 jmark left 10:10 firstdayonthejob left 10:12 firstdayonthejob joined
AlexDaniel think about it positively! If rakudo build is not parallelized, then you can run as many rakudo builds as you have cores! 10:13
not that it makes any sense :D
but e.g. bisectable is building 7 at once
10:23 iH2O left 10:24 ribasushi joined 10:27 Cabanossi left 10:29 Cabanossi joined 10:32 tbrowder joined, hankache left
tbrowder 'mornin #perl6. can anyone explain briefly what a p6 dynamic variable is? I know there is a list of them that essentially are language globals, but what about user-defined ones. Are they the same except that they exist for the life of the program defining them? 10:39
psch thinks the doc page is pretty good and brief 10:40
doc.perl6.org/routine/is%20dynamic 10:41
and yes, the * twigil and the 'dynamic' trait do the same, to the best of my knowledge
doc.perl6.org/syntax/*#language_do..._Variables 10:42
that's a bit more extensive i suppose
10:46 eugen left
tbrowder psch: the second ref gives me something to work with--thanks; I found the first with the search but the second doesn't show up in a search and it's new to me. 10:46
10:46 eugen joined
psch tbrowder: well, i found it searching for * and knowing what to look for, so i agree it's a bit hidden 10:46
tbrowder right, I searched on dynamic 10:47
psch (for reference, i clicked the 'Syntax' entry in the drop down)
tbrowder roger
okay, now that I've looked at the syntax explanation, I don't understand, in a single script, why one would use a dynamic var declared and defined in an inner scope instead of using a file-scoped my var along with other such vars. the specific example is $*DR in htmlify.p6. Since the first time I saw that I wonder what magic is accomplished. 10:53
psch m: sub f { $*foo.say }; sub g { my $*foo = "bar"; f }; sub h { my $*foo = "baz"; f }; g; h; 10:56
camelia rakudo-moar a556a8: OUTPUT«bar␤baz␤»
psch i mean, yeah, functionally it's not much different from a file-scoped lexical
but then, functionally, ASM isn't that much different either, if you look close enough
i find, especially in grammar/action code it's clearer to have a dynamic to follow 10:57
tbrowder okay, that's what I thought--thanks!
psch because you know you can trace upwards through the tokens/methods along your parsetree, and don't have to worry about out-of-band stuff
s/you know/i know/ # :)
tbrowder oops, "ASM"? 10:58
psch assembler
tbrowder ah...
psch i recognize that's not much a valid argument, hence why i followed up with a specific preference :)
+of
tbrowder great, thanks! 10:59
it does look like a personal pref of the original author (or perhaps a last-minute def as he or she realized the var was needed or to emphasize its importance and use in multiple places) 11:00
psch well, there's also the old "global shared state is bad" vOv
tbrowder I agree for sure, but htmlify.p6 I don't think was originally meant as an exercise in "best practices"... 11:01
moritz it was meant as "get *anything* displayed on the web" 11:03
(another priority was to display methods inherited from superclasses and roles on the same page, because I always hated the parent-class-chasing that you have to do for p5's LibXML modules, for example) 11:09
tbrowder moritz: I wasn't criticizing, in fact you say as much near the top of the prog, but I had to look hard to find some stuff because it looks like you used the power of p6 (esp. chained method calls) to minimize code--hard for a newbie to deal with! 11:13
i should say "full power"...
moritz tbrowder: I didn't take it as criticism 11:16
I know myself how hard it is to change and maintain htmlify
Woodi just discovered his perl6-testing host have 2 cores :) Pentium4++ ;) 11:18
...and 2Gb memory newer was limiting factor 11:19
btw. is AMD solding any DDR4 CPUs ? 11:20
dupek hey, what does it mean no dereferencing is needed? 11:23
moritz m: my $a = [ 1, 2, 3 ]; say $a[0]; # for dupek 11:25
camelia rakudo-moar a556a8: OUTPUT«1␤»
moritz no special ->[0] magic as with p5
Xliff How would I specify unicode chars in a regex?
Can I use codes? 11:26
say "\u00E0"
m: say "\u00E0"
camelia rakudo-moar a556a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized backslash sequence: '\u'␤at <tmp>:1␤------> 3say "\7⏏5u00E0"␤ expecting any of:␤ argument list␤ double quotes␤ term␤»
psch m: say "\c[SNOWMAN]" ~~ /\x2603/ 11:27
camelia rakudo-moar a556a8: OUTPUT«「☃」␤»
psch m: say "\c[SNOWMAN]" ~~ /\c[SNOWMAN]/
camelia rakudo-moar a556a8: OUTPUT«「☃」␤»
Xliff psch++
psch m: say "\c[SNOWMAN]" ~~ /☃/
camelia rakudo-moar a556a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex metacharacter ☃ (must be quoted to match literally)␤at <tmp>:1␤------> 3say "\c[SNOWMAN]" ~~ /7⏏5☃/␤ expecting any of:␤ term␤»
psch m: say "\c[SNOWMAN]" ~~ /'☃'/
camelia rakudo-moar a556a8: OUTPUT«「☃」␤»
dogbert17 the code example at docs.perl6.org/language/mop#Metamethods doesn't work, anyone know what's wrong with it? 11:28
AlexDaniel m: say Int.WHY 11:29
camelia rakudo-moar a556a8: OUTPUT«(Any)␤»
AlexDaniel bisect: class MY-CLASSES-ARE-ALL-CAPS { method WHY { "I DONT KNOW" } }; my $c = MY-CLASSES-ARE-ALL-CAPS.new; say $c.WHY; say $c."WHY"() 11:31
bisectable AlexDaniel: on both starting points the exit code is 0 and the output is identical as well
AlexDaniel ah forgot something…
psch m: #| THIS IS A CLASS FOR SHOUTING THINGS␤ class MY-CLASSES-ARE-ALL-CAPS { method WHY { "I DON'T KNOW" } } my $c = MY-CLASSES-ARE-ALL-CAPS.new; say $c.WHY say $c."WHY"() # /o\
camelia rakudo-moar a556a8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method '_add_leading' not found for invocant of class 'Str'␤at <tmp>:2␤»
psch i don't even get why it wants to add to a Str
but then i've never looked at that code 11:32
bisect: #| THIS IS A CLASS FOR SHOUTING THINGS␤ class MY-CLASSES-ARE-ALL-CAPS { method WHY { "I DON'T KNOW" } } my $c = MY-CLASSES-ARE-ALL-CAPS.new; say $c.WHY say $c."WHY"() # /o\ 11:33
bisectable psch: on both starting points the exit code is 0 and the output is identical as well
moritz dogbert17: what exactly doesn't work?
geekosaur at a guess, the part that allows a user provided WHY is NYI, so it's trying to add the #| text to the user provided WHY
dogbert17 moritz: it complains with Method '_add_leading' not found for invocant of class 'Str'␤at
geekosaur moritz, see camelia output 11:34
AlexDaniel psch: I don't think that ␤ is going to work :/
psch AlexDaniel: oh, bisectable doesn't do that?
AlexDaniel yeah :/
psch :/
AlexDaniel well, let me fix that…
psch AlexDaniel++ 11:35
dogbert17 AlexDaniel++
gfldex nine: is precomp supposed to be thread safe? (silly question alert) 11:36
11:39 bisectable left, huggable left 11:40 huggable joined, bisectable joined
AlexDaniel bisect: #| THIS IS A CLASS FOR SHOUTING THINGS␤ class MY-CLASSES-ARE-ALL-CAPS { method WHY { "I DON'T KNOW" } } my $c = MY-CLASSES-ARE-ALL-CAPS.new; say $c.WHY say $c."WHY"() # /o\ 11:40
bisectable AlexDaniel: on both starting points the exit code is 1 and the output is identical as well
AlexDaniel ␤ works now
11:44 tbrowder left
Xliff Hrm.... 11:46
dalek sectbot: 183b6d2 | (Aleks-Daniel Jakimenko-Aleksejev)++ | bot.pl:
Replace ␤ with newlines
11:46 bisectable left, rindolf left
Xliff I just refreshed rakudo and this line used to work "nativecast(::('XML::LibXML::Element'), $node);" but now gives me "Internal error: unhandled target type" 11:46
11:46 bisectable joined 11:50 kid51 joined
nine gfldex: module loading in general is probably not yet thread safe 12:07
gfldex nine: i could make you a tarball that segfaults quite nicely on my end if you want to dig your teeth into it 12:10
loading is fine actually, it only segfaults when the cache is filled
12:14 Harmil joined
Harmil Morning all... quick question. hub.docker.com/r/mj41/perl6-star/ looks like the most current docker image of rakudo. Is that the right one to be using? 12:15
llfourn Harmil: it looks a tad old 12:16
Harmil Is there a more recent star release than 2 months? 12:17
AlexDaniel just a little bit
llfourn Is it the same as: github.com/perl6/docker
12:17 daxim joined
llfourn this looks liek the official one: hub.docker.com/_/rakudo-star/ 12:18
but it looks old too 12:19
shouldn't it be auto-building on commits to rakudo?
Harmil Star != rakudo
llfourn right. sorry. 12:20
Harmil Though, to be fair, I don't actually need star, it's more a matter of wanting a stable reference.
llfourn but you want a docker image right? 12:21
i'd say the official one maintained by hoelzro is the best
but I guess that one you linked is ok "2016.04" is apparently the latest rakudo star 12:22
Harmil Cool, thanks 12:23
stmuk there will probably be a star 2016.07
after next month's rakudo release
psch star-m: say $*PERL.compiler 12:24
camelia star-m 2016.04: OUTPUT«rakudo (2016.04)␤»
llfourn m: $*PERL.compiler.say
camelia rakudo-moar a556a8: OUTPUT«rakudo (2016.06.46.ga.556.a.86)␤»
12:51 bjz left 12:54 AlexDaniel left
lizmat Xliff: could you check whether a556a869ea9a56dc233 is to blame ? 12:56
13:00 bjz joined
Xliff lizmat: One sec 13:03
lizmat Xliff: it probably is, and I pushed just a fix for it (I think) 13:07
if it isn't, someone else should probably revert a556a869ea9a56dc233 and e071e40b37d446c9 13:08
as I'll be afk&
13:08 Harmil left
Xliff I'm checking 6d824ecc8cd8f4671c4f83728f67099d2c7bba11 right now 13:11
timotimo hey 13:13
does anybody know if there's a way to not have processes crashing with segfaults show up in dmesg and such? 13:16
because running afl-fuzz on hack gives me beautiful lines in the dmesg including ones like "show_signal_msg: 381 callbacks suppressed" 13:17
Xliff lizmat: Problem still exists. 13:19
Xliff read "dmesg" and thought "syslog" 13:21
My bad.
timotimo well, there's also a bajillion segfault messages in the journal 13:22
Xliff lizmat: Recompiling to e071e40b37d446c9
lizmat: Problem still exists on latest commit. I will have to git-bisect this and see. I should return to the last known working version and see if the problem really is perl6. 13:28
13:32 hankache joined
timotimo unix.stackexchange.com/questions/2...s-in-dmesg - i implemented this on hack right now 13:32
we still have about 2.7 gigabytes of space taken on our / partition that's nothing but logs about segfaults 13:37
Xliff Felgercarb! 13:38
Looks like the problem is my code and not perl6.
timotimo the what now?
that's a relief
Xliff Yes and no.
Relief for you... nightmare for me.
psch imagine how you'd feel if it was both /o\
Xliff /o\ indeed! 13:39
psch #just-coredev-things
scnr
timotimo :D
Xliff Weird thing is this part of the code didn't change.
Now I will have to revert my code and see if I can make problem go away.
However, first thing is food. Next thing is sleep.
o7 13:40
13:40 Xliff is now known as Xliff_zzzz
timotimo have a good two :) 13:40
13:42 domidumont joined 13:48 kaare_ left 13:49 skids joined 13:54 TakinOver joined 13:56 brrt joined 14:02 zakharyas joined
llfourn so I noticed there was some segfault discussion. I'm now getting non-deterministic segfaults after rebuilding an hour or so ago. 14:05
not sure if it was rebuilding or me adding something to my code though.
gfldex llfourn: are you running more then 1 thread? 14:06
llfourn nope.
gfldex my problems go away when just one thread
do you got that code online?
llfourn no :\ 14:07
I guess I could, I'll investigate a bit further first.
14:07 domidumont left
gfldex <-- code voyeur :-> 14:08
14:08 TakinOver left 14:10 tharkun_ left 14:11 TakinOver joined, tharkun joined 14:14 rindolf joined 14:18 domidumont joined 14:22 khw joined 14:23 skids left 14:26 Zoffix left 14:34 TakinOver left 14:36 TakinOver joined
llfourn gfldex: backtrace: gist.github.com/LLFourn/135680d93e...5f3073b258 14:37
trying to build with debug symbols to get more info
further discussion in #perl6-dev if you're interested :) 14:38
14:39 Zoffix joined
ugexe m: { class Foo { }; }; class Foo { }; # is this intended? (i realize I can `my class ...` it) 14:53
camelia rakudo-moar e071e4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of symbol Foo␤at <tmp>:1␤------> 3{ class Foo { }; }; class Foo7⏏5 { }; # is this intended? (i realize I c␤ expecting any of:␤ generic role␤»
dalek c: 8616126 | (Jan-Olof Hendig)++ | doc/Language/variables.pod:
Added a couple of missing semicolons in code example
14:56
14:57 jluis joined 14:58 jluis left, jluis joined 15:00 buharin__ joined 15:02 dupek left
gfldex ugexe: S12 provides the following wisdom: Without a my or other scoping declarator, a bare class declarator declares an our declarator, that is, a name within the current package. 15:03
15:05 domidumont left, vaisian left 15:08 vaisian joined
ugexe ah. but what am I missing that `sub Bar { class Foo { }; }; class Foo { };` still fails? or that `sub Bar { our $xxx; }; Bar(); say $xxx` gives a symbol $xxx is undeclared (yes, OUR::<$xxx>, but still) 15:08
timotimo variables aren't looked up in package scope unless you ask for it ... or something like that? 15:09
i basically never use package-scoped variables, tbh
15:10 jluis left 15:11 kurahaupo joined
ugexe m: sub Bar { class Foo { }; }; class Foo { }; # sub { } is a scoping declarator isn't it? 15:11
camelia rakudo-moar e071e4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of symbol Foo␤at <tmp>:1␤------> 3sub Bar { class Foo { }; }; class Foo7⏏5 { }; # sub { } is a scoping declarator ␤ expecting any of:␤ generic role␤»
ugexe oh it means on the class declaration, not inside one 15:12
timotimo classes aren't "my" by default 15:13
15:15 kaare_ joined, domidumont joined
Zoffix m: { our $foo = 42 }; our $foo = 32; say $foo 15:16
camelia rakudo-moar e071e4: OUTPUT«32␤»
15:16 spider-mario left
Zoffix m: { our $foo = 42 }; our $foo; say $foo 15:17
camelia rakudo-moar e071e4: OUTPUT«42␤»
Zoffix
.oO( should probably warn, eh? )
ugexe right, but `{ my sub Bar { class Foo { }; }; }; class Foo { };` seems a bit strange in that regard
jnthn It's a weird thing to write, but the error is correct. 15:19
Needs to be `my class Foo ...` to lexically scope the symbol
(Noting also that classes are a compile-time construct, so closure semantics don't come into it.) 15:20
15:22 vaisian left
ugexe m: role Foo { }; class Bar is Foo { }; say Bar.new.^roles # does a role inherited instead of composed get punned first? 15:25
camelia rakudo-moar e071e4: OUTPUT«((Foo))␤»
15:29 lizmat left 15:30 El_Che left
ugexe looks like it composes the role into a new class which gets inherited, hence the role still showing up 15:32
15:37 woolfy left 15:39 huggable left 15:40 huggable joined 15:43 brrt left
buharin__ perl is full of magic ;s 15:50
15:51 V_S_C joined
DrForr_ Yep. And sometimes it even works :) 15:52
15:52 V_S_C left 15:53 wamba left 15:54 wamba joined 16:06 Zoffix left
nine ugexe: I'm not sure it's worth worrying about subclasses of Distribution. Can't imagine anyone writing one. 16:08
mst nine: whichprobably means I'll do it one day, but I haven't yet so 16:11
16:16 TakinOver left 16:18 TakinOver joined
nine mst: but when you do it will be the new role Distribution, not the quite useless class we're replacing ;) 16:19
16:24 kurahaupo left 16:26 araujo joined 16:27 araujo left, araujo joined 16:33 vendethiel- left 16:34 tbrowder joined 16:36 tbrowder left 16:54 setty1 joined 16:57 silug left 16:59 Penguiniator joined 17:09 silug joined 17:15 Zoffix joined
Zoffix m: say GLOBAL::.WHAT; say GLOBAL:: === Stash 17:16
camelia rakudo-moar e071e4: OUTPUT«(Stash)␤False␤»
Zoffix How come it's False?
Oh, nm
hankache m: say GLOBAL::.WHAT; say GLOBAL:: ~~ Stash 17:18
camelia rakudo-moar e071e4: OUTPUT«(Stash)␤True␤»
17:18 lambd0x joined
psch m: say GLOBAL::.WHAT; say GLOBAL::.WHAT === Stash 17:23
camelia rakudo-moar e071e4: OUTPUT«(Stash)␤True␤»
17:29 lambd0x left
kalkin-_ Ǐs there a real life example of some Perl 6 library, which is thoroughly documented via POD? 17:31
I would also see how the different semantic block are used in real life 17:32
17:32 kalkin-_ is now known as kalkin-
Zoffix kalkin-, S26 speculation uses P6 pod: raw.githubusercontent.com/perl6/sp...tation.pod 17:36
I don't think 100% of that stuff is supported tho
17:46 jjido joined
kalkin- Zoffix: I know about S26 and i'm reading it, but I want to see it actually used in a software project 17:46
jdv79 Zoffix: nice blog on the hijacking 17:47
Zoffix Thanks.
jdv79 i wonder if there will eventually be tools/techniques for eco system trust to mitigate that sort of stuff
kalkin- lol, I just wondered, why I am i reading S26 in source code? I can just download it and run p6doc on it. 17:50
nop it doesn't work :)
Zoffix kalkin-, based on a naive grep, these files should have some amount of POD in them: gist.github.com/zoffixznet/57b5b7e...19bae73fcb 17:54
kalkin- Zoffix thanks!
Hmm now do i use =TITLE or =NAME? App::Mi6 auto generates =head1 NAME i think, but what is the semantic difference between a title and a name? Would title be used if you are writing a book/essay in POD? 17:56
kalkin- just saw that Terminal::Print uses title instead of name 17:57
18:07 hankache left, hankache_ joined 18:14 hankache_ left 18:16 pmurias joined, jjido left, jmark joined
pmurias hahainternet: re restricted language, the fact that templates are turning complete doesn't reduce the amount of type stuff that can be determined at compile time 18:17
hahainternet: in fact it increases it
hahainternet pmurias: true that's an orthogonal issue, but i hope i made myself clear, i'm still learning anyhow 18:19
18:21 jjido joined 18:26 espadrine left 18:29 skids joined 18:32 kerframil joined 18:39 zakharyas left, pmurias left 18:40 pmurias joined
ugexe nine: Zef subclasses Distribution 18:43
But again, i'm all for breaking it instead of adding work arounds in rakudo 18:47
18:47 ssotka joined
ugexe you just cant say that enough code uses Distribution.new to warrant a shim but not enough subclasses it to warrant such 18:48
18:55 jjido left 19:01 domidumont left, CIAvash left 19:02 jjido joined 19:05 zakharyas joined
dalek c: 0e6c0cd | (Jan-Olof Hendig)++ | doc/Type/Pair.pod:
Added docs for Pair.Str
19:07
19:10 zakharyas left 19:11 spider-mario joined 19:12 zakharyas joined 19:25 wamba left 19:26 girafe joined, wamba joined 19:29 Zoffix left
dalek c: d9c25c6 | (Jan-Olof Hendig)++ | doc/Type/Map.pod:
Fixed two typos
19:35
c: eb698aa | (Jan-Olof Hendig)++ | doc/Type/Pair.pod:
Added docs for Pair.pairs
19:38 freezerburnV joined 19:39 huggable left, jjido left 19:42 girafe left 19:43 freezerburnV left, girafe joined 19:46 zacts left 19:47 zacts joined 19:52 jjido joined
dalek c: 8ab2db7 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Num.pod:
tell why NaN values are produced
19:56
19:57 freezerburnV joined
dalek c: df8a150 | (Jan-Olof Hendig)++ | doc/Type/Pair.pod:
Revert "Added docs for Pair.pairs". Method was already documented.

This reverts commit eb698aa3593979838f7b7e9c84f81508b07f5983.
20:02
dogbert17 sigh
20:07 lichtkind_ joined 20:09 pmurias left 20:11 lichtkind__ left 20:16 raiph left 20:17 raiph joined, FROGGS left 20:18 jmark left 20:20 raiph left 20:21 raiph joined 20:22 raiph left, raiph joined 20:24 raiph left 20:25 raiph joined 20:26 grondilu left 20:29 kaare_ left 20:32 kid511 joined 20:33 kid51 left
zacts How much does the Perl6 language rely on Rakudo? Like would it be theoretically possible to implement it on another interpreter? 20:34
or at this point does it rely on rakudo specific features?
(like a hypothetical jvm based Perl6 for example) 20:35
(just curious as to how Perl6 is all put together)
(NOT that I like JVM)
kalkin- zacts: afaik you can run perl6 on jvm already
you can use moarvm or jvm
zacts ah nice! :-)
oh cool
that sounds cool 20:36
20:36 Gruber is now known as Grrrr 20:37 raiph left, raiph joined
geekosaur well, in theory you can. the jvm backend is a bit broken currently. historically there were two non-rakudo implementations, but both are bitrotted now (niecza in c# / clr, pugs in haskell) 20:38
there's a javascript backend in development, I gather
kalkin- I ended up reading jnthn's Audio-Hydrogen. It has some nice examples how to use POD to document just a simple class
This is pretty helpful
20:41 zakharyas left
kalkin- Also should i use use v6 or use v6.c? 20:46
I mean I understand that 6 will also match 6.c and 6.d and so on.. But why do people specify in a—for me normal looking perl6—file 6c? 20:47
gfldex there may be some deprications with v6.d (relative to v6.c) 20:48
mst kalkin-: because that allows 6.d to change things if it needs to without breaking their code.
kalkin- mst: no i get that, but we don't even know if 6.d will break anything, do we? Are there already plans? 20:49
20:49 kid51 joined
zacts geekosaur: oh nice 20:49
mst kalkin-: I, personally, would use 6.c and then after 6.d comes out, edit the line and re-run my tests
zacts A Javascript backend sounds nice
kalkin- or is it just being careful? May be it's the better way to specify 6.c?
20:50 kid511 left
kalkin- AFAIK if i have a file using 6c but have 6d perl6 implementation, it still will run, but in 6c mode, so most of the authors will have no pressure migrating 20:50
or even changing this line 20:51
but may be this is ok
gfldex we do have some changes in v6 that are not part of v6.c (like the .cow lizmat++ added 2 days ago). Technically, rakudo should complain when you use .cow and v6.c together. 20:52
m: use v6.c; my @a = <a b c>; my @b = @a.cow; 20:53
camelia ( no output )
kalkin- m: use v6.c; my @a = <a b c>; sau @a.cow.WHY 20:54
camelia rakudo-moar e071e4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ sau used at line 1. Did you mean 'say'?␤␤»
kalkin- m: use v6.c; my @a = <a b c>; say @a.cow.WHY
camelia rakudo-moar e071e4: OUTPUT«(Any)␤»
gfldex someone would have to implement that but someone isn't here right now :)
20:55 raiph left
kalkin- Also should i add the #= comments, to my methods so .WHY will returns something meaningful? I read about it in S26, but is this used at all? 20:55
kalkin- is really missing best practices documentation on like _everything_ in perl6 20:56
gfldex for now there is no software that is using #= comments. If you would implement an editor in perl 6, you could benefit from it.
the problem with best practices is that we don't know what that is yet. 20:57
i personally would have exactly one entry for that list so far
20:57 lambd0x joined
gfldex m: sub f(Int:D $i) { say $i }; # most of the time you actually want :D 20:58
camelia ( no output )
gfldex m: use variables :D; my Int $i;
camelia rakudo-moar e071e4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable definition of type Int:D (implicit :D by pragma) requires an initializer␤at <tmp>:1␤------> 3use variables :D; my Int $i7⏏5;␤ expecting any of:␤ constraint␤»
gfldex what reminds me of ... 20:59
kalkin- Ohh the :D smiley. Is this a good practice to add it every where where i expect some defined value?
In most methods i expect to have some defined value, am I not? So I probably should put it almost everywhere, shouldn't i? 21:00
gfldex if you use it you will get the error message on the sub call. So you don't have to trace it back by hand. 21:02
also, you provide the compiler with more wood to chew on.
m: use variables :D; { use variables :_; my Int $i; } 21:04
camelia ( no output )
kalkin- gfldex: ok, so it's a good idea to use it. 21:05
gfldex it depends a bit on contect ofc. There can be very good reasons to allow undefined values. 21:06
also note that float point numbers are special
m: say NaN.Bool, NaN.defined;
camelia rakudo-moar e071e4: OUTPUT«TrueTrue␤»
21:07 buharin__ left
dalek c: ae5836b | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod:
doc use variables :D
21:07
21:16 freezerburnV left 21:17 jjido left 21:18 Zoffix joined
Zoffix zacts, a JVM backend would still be using Rakudo. Rakudo is the compiler, JVM is one of the VMs it generates code for. The other being MoarVM. 21:21
zacts oh I see
21:22 jjido joined
skids There have been other compilers in the past, most notably neicza which had .NET as a target. 21:25
21:25 girafe left
timotimo we're defining the language perl6 based on the test suite, not on the implementation 21:25
anything that passes the test suite sufficiently is perl6
so it doesn't have to be rakudo or rakudo based
21:26 sdo joined
sdo hello 21:27
gfldex m: say "ohai sdo!"
camelia rakudo-moar e071e4: OUTPUT«ohai sdo!␤»
kalkin- gfldex: ic. thanks for the hint with floating numbers 21:29
sdo I did stupid thing this afternoon I was cleaning my repo and unsubscribe by mistake to perl6 repository. I had a pull requeston it but what should I have to give to register again please? 21:30
on github 21:32
21:32 setty1 left 21:33 tbrowder joined
sdo hello :pmichaud 21:34
parabolize sdo: github says you just need to be mentioned. help.github.com/articles/unsubscri...ersations/ 21:35
21:38 molaf left
sdo parabolize: I had a green button says unsubscribe how to get it back? 21:40
21:43 TEttinger joined
parabolize sdo: help.github.com/articles/watching-repositories/ help.github.com/articles/subscribi...ersations/ 21:44
21:45 Zoffix left 21:51 Upasaka joined
xdg hi. Could someone please explain the difference between a constant and a sigil-less variable? I'm interested in both implementation differences and practical use differences, if any. 21:51
Next Q, given that $ variables can have arrays/hashes assigned to them and pass through subscripting, is there any difference between Q<$x=[1,2,3]> and Q<@x=1,2,3> other than flattening behavior? 21:54
21:55 bt_ joined
gfldex @-sigils are handled differently in string interpolation and in signatures 21:55
m: constant c = Array.new; my \s = Array.new; say c.VAR, s.VAR; c[1] = 11; s[1] = 11; 21:57
camelia rakudo-moar e071e4: OUTPUT«[][]␤»
21:59 bt_ left
xdg gfldex, that implies no difference between constants and sigil-less, yes? 21:59
gfldex looks like it 22:00
however, constant initialisers will be executed at compile time
xdg and the interpolation is just that qq<@foo> doesn't interpolate? 22:01
gfldex you can tell the Q what to interpolate and there are different flags for $ and @ 22:02
xdg I'm finding a number of things in perl6 look different but work the same and I'm trying to both confirm that, and also find a way to explain concisely why one would want to use one or the other
gfldex that compile time thing on constant is a huge difference
m: constant a = BEGIN some-function(now); \a = some-function(now) 22:03
camelia rakudo-moar e071e4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ some-function used at line 1␤␤»
gfldex what the value of a will heavily depends on some-function 22:04
actually BEGIN is likely the wrong phaser, it's a bit late
22:06 jjido left 22:07 Penguiniator left
Xliff_zzzz does anyone know where the ::() operation is documented? 22:09
22:09 Xliff_zzzz is now known as Xliff 22:10 sdo left
gfldex Xliff: doc.perl6.org/language/packages#In...into_names 22:10
Xliff gfldex++ # Thanks 22:11
22:13 _28_ria left 22:15 RabidGravy left, raiph joined 22:17 _28_ria joined 22:19 cdg joined, spider-mario left 22:30 raiph left, jjido joined 22:32 raiph joined 22:35 jjido left
dalek c: 44fa2cc | (Wenzel P. P. Peppmeyer)++ | doc/Language/packages.pod:
add ::() to index
22:37
c: 0cc68d2 | (Wenzel P. P. Peppmeyer)++ | doc/Language/terms.pod:
add constant to index
22:38
22:40 firstdayonthejob left 22:45 lichtkind_ left, lambd0x left 22:47 rindolf left 22:49 _dolmen_ joined 22:51 bjz left 23:03 _dolmen_ left 23:05 kurahaupo joined 23:07 abruanese left 23:10 bjz joined, sufrostico joined 23:17 abruanese joined 23:20 sufrostico left 23:23 bjz left 23:40 huggable joined