ยปรถยซ 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.
buggable ๐ŸŽบ๐ŸŽบ๐ŸŽบ It's time for the monthly Accidental /win Lottery ๐Ÿ˜๐Ÿ˜๐Ÿ˜ We have 4 ballots submitted by 4 users! DRUM ROLL PLEASE!... 00:00
And the winning number is 42! Congratulations to lizmat! You win a can of WD40!
00:01 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh 00:02 p6bannerbot sets mode: +v aborazmeh 00:10 kaare_ left 00:16 hogepodge29 joined, peder3 joined 00:17 p6bannerbot sets mode: +v hogepodge29, p6bannerbot sets mode: +v peder3 00:20 hogepodge29 left 00:22 peder3 left 01:05 sftp left 01:06 lizmat left 01:15 b2gills left
Xliff_ Say I have a perl6 primative value (ie a Str, Num, Int and such). What's the easiest way to get that into pointer form for NativeCall? 01:16
01:27 ZzZombo left 02:05 ExtraCrispy left, aborazmeh left 02:12 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 02:19 lindylex joined 02:20 p6bannerbot sets mode: +v lindylex
lindylex m: say "alongwordbeforeadot." ~~ / \w+ >> <!before '.'> /; 02:21
camelia Nil
lindylex say "alongwordbeforeadot." ~~ / \w+ <!before \w> <!before '.'> /;
evalable6 Nil
lindylex I think I found another bug in the regex. 02:22
Those two example should have given the output >> alongwordbeforeadot
02:25 Guest93736 joined
Xliff_ m: say "alongwordbeforeadot." ~~ / \w+ <?before '.'> /; 02:25
camelia ๏ฝขalongwordbeforeadot๏ฝฃ
02:26 Guest93736 left
Xliff_ m: say "alongwordbeforeadot." ~~ / \w+ >> <?before '.'> /; 02:26
camelia ๏ฝขalongwordbeforeadot๏ฝฃ
Xliff_ m: say "alongwordbeforeadot." ~~ / \w+ <!before \w> <?before '.'> /;
camelia ๏ฝขalongwordbeforeadot๏ฝฃ
Xliff_ lindylex: Using <!before...> means NOT before. 02:27
lindylex Ok got it now right the exclamation means not.
Xliff_ : thanls 02:28
Xliff_ : thanks
02:39 Actualeyes joined 02:40 p6bannerbot sets mode: +v Actualeyes
Xliff_ lindylex: no problem! 02:41
02:51 Actualeyes left 02:53 leont left 03:08 aeruder is now known as aeruder__ 03:11 vike left 03:15 DeeAitch12 joined 03:18 DeeAitch12 left 03:32 b2gills joined 03:33 p6bannerbot sets mode: +v b2gills 03:45 cibs_ is now known as cibs 04:09 fake_space_whale left 04:12 araraloren joined 04:13 p6bannerbot sets mode: +v araraloren 04:29 jmerelo joined, p6bannerbot sets mode: +v jmerelo
Xliff_ Does anyone know of a way to watch what the perl6 compiler is doing as it compiles? 04:30
Is there a command line switch or environment variable that can be set? I used to know it, but I can't remember what it is.
jmerelo Xliff_: if there's one, it must be here github.com/rakudo/rakudo/wiki/Runn...mmand-line 04:57
Xliff_ jmerelo++ # Thanks! 05:03
jmerelo Xliff_: sure :-) 05:13
05:26 spacedbat is now known as nullvoid 05:28 MSHughes joined, nullvoid is now known as ubermonk 05:29 p6bannerbot sets mode: +v MSHughes 05:30 Bucciarati left, MSHughes left
Geth doc: 7f52d31463 | (JJ Merelo)++ | doc/Type/Str.pod6
Eliminate implementation details from definition

The signatures in Rakudo do not match those in the documentation:
  github.com/rakudo/rakudo/blob/e548....pm6#L1700
and the tests in roast
  github.com/perl6/roast/blob/2288d4...t-simple.t
do not test for returning a Seq, so the fact that they actually return a Seq must be considered an implementation detail with no place in the documentation.
05:35
synopsebot Link: doc.perl6.org/type/Str
05:36 vrurg left 05:39 Bucciarati joined 05:40 p6bannerbot sets mode: +v Bucciarati
Geth doc: c454b70006 | (JJ Merelo)++ | doc/Type/Str.pod6
Adapts lines to new definitions, adds examples
05:46
synopsebot Link: doc.perl6.org/type/Str
05:46 ubermonk is now known as sbat 06:02 sbat is now known as ubermonk 06:05 htols9 joined 06:06 p6bannerbot sets mode: +v htols9 06:07 htols9 left 06:10 graphene left 06:11 graphene joined 06:12 p6bannerbot sets mode: +v graphene 06:14 br0dy joined, br0dy left 06:17 MasterDuke left 06:21 Actualeyes joined
jmerelo .tell AlexDaniel I'm working through this: colabti.org/irclogger/irclogger_log...09-28#l722 I guess anouncements will be done only during the Squashathon? 06:21
yoleaux jmerelo: I'll pass your message to AlexDaniel.
06:22 p6bannerbot sets mode: +v Actualeyes 06:40 graphene left 06:42 graphene joined 06:43 p6bannerbot sets mode: +v graphene
Geth ecosystem: b810f06e48 | (JJ Merelo)++ | docs/Hacktoberfest.md
Adds hacktoberfest intro
06:44
jmerelo .tell Alexdaniel I have started a document, will try to finish it this morning with screenshots and all. Please check the draft, linked in the log above this, to see if it's OK 06:45
yoleaux jmerelo: I'll pass your message to Alexdaniel.
buggable New CPAN upload: Getopt-Advance-1.1.1.tar.gz by ALOREN modules.perl6.org/dist/Getopt::Adva...pan:ALOREN 06:47
06:48 Actualeyes left 06:49 Actualeyes joined, p6bannerbot sets mode: +v Actualeyes 06:50 domidumont joined 06:51 p6bannerbot sets mode: +v domidumont 06:52 avalenn left 06:59 abraxxa joined, p6bannerbot sets mode: +v abraxxa 07:00 abraxxa left 07:02 abraxxa joined 07:03 p6bannerbot sets mode: +v abraxxa 07:05 jmerelo left 07:06 HaraldJoerg joined 07:07 p6bannerbot sets mode: +v HaraldJoerg 07:16 kini joined, p6bannerbot sets mode: +v kini 07:28 nikio_ joined, nikio_ left, rindolf joined 07:29 p6bannerbot sets mode: +v rindolf 07:31 willer27 joined 07:32 p6bannerbot sets mode: +v willer27 07:37 willer27 left 07:56 pmurias joined, p6bannerbot sets mode: +v pmurias 08:06 lindylex left 08:07 avar left, avar joined, avar left, avar joined, p6bannerbot sets mode: +v avar 08:08 p6bannerbot sets mode: +v avar 08:09 lizmat joined, p6bannerbot sets mode: +v lizmat 08:12 vike joined, scimon joined, p6bannerbot sets mode: +v vike, p6bannerbot sets mode: +v scimon
Xliff_ m: say |<a b c> 08:17
camelia abc
Xliff_ m: say |<a b c>.^name
camelia List
Xliff_ m: say <a b c>.^name
camelia List
Xliff_ m: say ('a', 'b', 'c').^name
camelia List
08:18 dakkar joined, p6bannerbot sets mode: +v dakkar
geekosaur m: say (|('a', 'b', 'c')).^name 08:21
camelia Slip
pmurias which online repl should I plug rakudo.js in? 08:37
08:40 vike1 joined, vike left
ZzZombo Sorry, what kind of plug you mean? 08:40
08:41 p6bannerbot sets mode: +v vike1 08:43 giraffe joined, p6bannerbot sets mode: +v giraffe, giraffe is now known as Guest51572 08:44 Guest82400 left
pmurias ZzZombo: make it run Perl 6 code using rakudo.js 08:51
ZzZombo Did you try `repl.it`? A solid online REPL I'm fond of. 08:52
pmurias is that still open source? the seemed to have moved from a running stuff in the browser model to running code on their servers 08:55
ZzZombo Yes, as far as I recall. I read their news letters, none indicated changing anything, except offering paid "Hacker" plans, but you can still use it for free, and still open. 08:56
08:57 AlexDaniel left
pmurias they changed the model they use stuff for sure 08:58
they archived their old repo on github and there doesn't seem to be a new one on their github page
09:07 robertle joined 09:08 p6bannerbot sets mode: +v robertle 09:09 pmurias left, sacomo left 09:10 pmurias joined, p6bannerbot sets mode: +v pmurias 09:11 pmurias left 09:17 pmurias_ joined, p6bannerbot sets mode: +v pmurias_ 09:19 pmurias_ left 09:21 pmurias joined, p6bannerbot sets mode: +v pmurias 09:22 pmurias_ joined, p6bannerbot sets mode: +v pmurias_, ExtraCrispy joined 09:23 p6bannerbot sets mode: +v ExtraCrispy 09:24 ExtraCrispy left 09:26 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel, sacomo joined 09:27 p6bannerbot sets mode: +v sacomo
AlexDaniel . 09:28
yoleaux 06:21Z <jmerelo> AlexDaniel: I'm working through this: colabti.org/irclogger/irclogger_log...09-28#l722 I guess anouncements will be done only during the Squashathon?
06:45Z <jmerelo> AlexDaniel: I have started a document, will try to finish it this morning with screenshots and all. Please check the draft, linked in the log above this, to see if it's OK
AlexDaniel โ€œaboveโ€ :)
pmurias how would copying dartpad.dartlang.org/ fit our REPLish needs? 09:39
timotimo you think maybe the ipython notebook could be changed to use an "in-process" kernel? 09:40
09:40 samuelkfYM joined 09:41 samuelkfYM left, Xliff_ left 09:42 the_charlatan joined
pmurias timotimo: I would have to investigate, I'm not really a REPL kind of person I haven't ever used ipython 09:42
09:42 the_charlatan left
timotimo ipython isn't too reply 09:42
it's more matlaby
09:43 khisanth_ left 09:47 retr0h[m]Po joined 09:48 ExtraCrispy joined, pmurias left, pmurias_ left, p6bannerbot sets mode: +v retr0h[m]Po 09:49 p6bannerbot sets mode: +v ExtraCrispy 09:52 retr0h[m]Po left 09:56 khisanth_ joined 09:57 p6bannerbot sets mode: +v khisanth_
AlexDaniel aaaaaaarrrgghhh. Accidentally pressed F5 while I was writing a message in gmail. No, the message is still there, but the whole freaking interface changed. And the message textbox is no longer resizable /o\ 09:58
oh, there's a button to go back to โ€œclassicโ€ version, good enough! 10:00
10:01 tison joined 10:02 Xliff joined, ZzZombo left, p6bannerbot sets mode: +v tison
AlexDaniel also, seems like it has never been resizable anyway. I guess the newer version just has everything bigger which made me want to resize :) 10:02
Ulti yeah I hate the new GMail interface 10:04
10:06 lichtkind joined 10:07 tison left, p6bannerbot sets mode: +v lichtkind 10:08 pmurias joined, p6bannerbot sets mode: +v pmurias, tison joined 10:09 p6bannerbot sets mode: +v tison, pmurias left 10:10 tison left, tison joined, p6bannerbot sets mode: +v tison 10:11 pmurias joined, p6bannerbot sets mode: +v pmurias
pmurias timotimo: ipython seems like something that would have a lot more value then you average REPL 10:12
timotimo do you mean ipython or the jupyter notebook?
(for some reason i still called it ipython notebook up there, but they renamed it a couple of years ago)
pmurias isn't it the same thing under different names?
timotimo jupyter notebooks are big in Science
yeah, just a rename, but since there's kernels for billions of languages now, it'd be strange to keep calling it "ipython notebook" 10:13
10:14 pmurias_ joined, p6bannerbot sets mode: +v pmurias_
pmurias bending it to have it run fully in the browser to squeeze rakudo.js into it seems to be a lot more effort than just cloning dartpad 10:15
timotimo OK 10:16
pmurias putting node.js side rakudo.js seems a lot more doable but it's a different thing 10:17
10:21 Xliff left, Xliff joined 10:22 p6bannerbot sets mode: +v Xliff
Xliff Oy. I've been trying to chat for minutes and didn't realize I wasn't identified. LOL! 10:22
Is there a way to check if a Supply has been tapped? 10:23
jast being identified is immaterial for that... everyone gets speaking permissions on a delay after joining
at least that's the way I think it's *supposed* to work... 10:24
Xliff Yeah, well I was on for minutes, and didn't get voice until I identified, and rejoined.
Was here @ 6:02 my time, didn't get voice until 6:22
At any rate, I've got an issue with 2018.09 that I wasn't experiencing with 2018.08 10:25
10:25 Zoffix joined, p6bannerbot sets mode: +v Zoffix, testf23 joined
Xliff Code was previously working, but now I get "Too few positionals passed; expected 1 argument but got 0" 10:25
10:25 pmurias left, pmurias_ left
Zoffix Xliff: if you keep talking without voice you are assumed to be a bot. 10:26
Xliff Code referred to has this signature: "multi method run (GTK::Application:D: )"
10:26 p6bannerbot sets mode: +v testf23
Xliff Zoffix. Ah. 10:26
jast how? if you talk without voice no other client can even see that
oh, +z, never mind me
10:27 testf23 left
Xliff OK. Time to reboot. BBIAS 10:28
10:28 Xliff left, Zoffix left 10:32 leont joined 10:33 p6bannerbot sets mode: +v leont, Xliff joined 10:34 p6bannerbot sets mode: +v Xliff 10:37 pmurias joined, p6bannerbot sets mode: +v pmurias 10:38 pmurias_ joined, p6bannerbot sets mode: +v pmurias_ 10:40 itaipu left
Xliff Looks to be a definite regression or change of behavior with 2018.09 10:45
pmurias_ how should our dartpad spin-off/clone be called? RakudoPad/6Pad/Perl6Pad?
10:47 ExtraCrispy left
Xliff gist.github.com/Xliff/5ed649b319a4...1516ad8d7d 10:47
10:47 ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy, pmurias left, rindolf left, ExtraCrispy left, pmurias_ is now known as pmurias 10:48 ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy, caseihzT joined 10:49 caseihzT left 10:50 pmurias left 10:51 pmurias joined, p6bannerbot sets mode: +v pmurias 10:52 pmurias_ joined, p6bannerbot sets mode: +v pmurias_
AlexDaniel Xliff: what is that? Is it a module? I don't see it in the ecosystem 10:53
Xliff AlexDaniel: Isn't in the ecosystem, yet. 10:54
AlexDaniel Xliff: ok, what are the steps to reproduce? (including installation of dependencies and stuff like that)
Xliff Near as I can tell, it's the $a.run call, and this was JUST working until I rakudobrew'd
git clone github.com/Xliff/p6-GtkPlus.git 10:55
cd p6-GtkPlus.git; perl6 -Ilib t/08-textview.t
As far as dependencies....
A working installation of libgtk3 10:56
tison pmurias: we are going to porting perl6 to dart backend?
10:57 rindolf joined
tison hmm, maybe just use the js backend, know little about that 10:57
10:57 p6bannerbot sets mode: +v rindolf
pmurias tison: it will be for the js backend 11:02
tison: I'm just "borrowing" the dart-pad interface to have a "run it in the browser" page for rakudo.js 11:03
tison get it :-)
pmurias tison: I'm writing too many rakudo backends already, I don't need a third one ;) 11:04
11:06 itaipu joined
tison yes, that's why I am quite a bit surprise :P 11:06
11:07 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo, p6bannerbot sets mode: +v itaipu
Xliff AlexDaniel: Looks like I got hit with exactly what Zoffix expected. 11:17
colabti.org/irclogger/irclogger_log...09-28#l792
The problem is that his solution didn't work, either.
11:17 pmurias left, pmurias_ left
AlexDaniel Xliff: use Data::Dump::Tree; in Builder.pm6 11:18
Xliff Commented out. Checking 11:19
No change.
11:20 pmurias joined, p6bannerbot sets mode: +v pmurias
AlexDaniel Xliff: not saying it's an issue, just pointing out that it's a dependency that probably shouldn't be there :) 11:20
Xliff Oh. Yeah.
That was for debugging purposes.
It's safe to remove.
It looks like overriding method bless() is a no-no in 2018.09 11:21
11:21 pmurias_ joined, p6bannerbot sets mode: +v pmurias_ 11:23 aindilis joined, pmurias_ left, pmurias left, p6bannerbot sets mode: +v aindilis
lizmat Xliff: could you verify that 74ca05f284f2e6668fe7 is not the cause ? 11:26
Xliff lizmat: Sure. One sec.
Is there a way to do that through rakudobrew? 11:27
lizmat not that I know of :-(
11:27 pmurias joined, p6bannerbot sets mode: +v pmurias
timotimo i think you literally just "rakudobrew build whatever-sha1-is-the-parent-of-74ca05f284f2e6668fe7" 11:28
11:28 pmurias_ joined, p6bannerbot sets mode: +v pmurias_
tadzik perhaps `build moar <sha1>` 11:29
timotimo oh 11:30
tadzik probably best to ask the author..
Xliff Yes
timotimo perhaps
tadzik hmmm
timotimo yeah who is that?
tadzik I wonder if he knows though...
Xliff LOL
tadzik yes, it seems like it's build <impl> <ver> :P
impl being moar and ver being the thing passed to git-checkout 11:31
Xliff So the SHA I want is f989b26282f91c0ac2479d0ccd223454306d1bed
Rebuilding. :) 11:32
tadzik the top comment in bin/rakudobrew says "# I AM RAKUDOBREW. ALSO POSSIBLY SPARTACUS. OUTLOOK CLOUDY, ASK AGAIN LATER."
okay who wrote that
Xliff Then I go to 74ca05f284f2e6668fe7 and see if things break.
tadzik github.com/tadzik/rakudobrew/issues/56 lol 11:33
11:33 ryerkeao joined
tadzik mst: I'm sorry :D 11:33
Xliff ROFL 11:34
11:34 p6bannerbot sets mode: +v ryerkeao, grondilu joined, p6bannerbot sets mode: +v grondilu
grondilu m: say map { .ยฒ }, 1..5; 11:34
yoleaux 15 Sep 2018 17:06Z <thundergnat> grondilu: Any chance you could apply the outstanding pull requests to your Modular module? There are Rosetta code tasks that are broken because it won't install.
camelia (1 4 9 16 25)
grondilu "." can be used instead of "_" in a closure? TIL 11:35
11:35 pmurias left, pmurias_ left
grondilu learnt about it while reading rosettacode.org/wiki/Calculating_th...f_e#Perl_6 11:35
Xliff m: say 1.ยฒ 11:36
camelia 1
Xliff m: say 2.ยฒ
camelia 4
grondilu say .ยฒ
evalable6 Use of uninitialized value of type Any in numeric context
0
in block <unit> at /tmp/UbGlvTRPFm line 1
grondilu m: say .ยฒ
camelia Use of uninitialized value of type Any in numeric context
0
in block <unit> at <tmp> line 1
timotimo m: $_ = 5; say .ยฒ
camelia 25
Xliff ^^ That
timotimo m: $_ = "hi"; .say
camelia hi
grondilu that's neat anyway 11:37
"." is only one character shorter than $_ but it looks better
Xliff m: say map { . + 1 }, 1..5; 11:38
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of . to concatenate strings; in Perl 6 please use ~
at <tmp>:1
------> 3say map { .7โ5 + 1 }, 1..5;
Xliff m: say map { $_ + 1 }, 1..5; 11:39
camelia (2 3 4 5 6)
Xliff Not quite as usuable as you might think. :/
lizmat: Also fails in f989b26282f91c0ac2479d0ccd223454306d1bed
11:40 ryerkeao left
lizmat then I do not have any further direction for investigation atm 11:41
Xliff Thanks for the help. 11:42
Still looks like the problem is in overriding method bless.
I take out the override and it goes away. 11:43
The idea is to have code that is only run ONCE per object initialization. Can't do that in BUILD or TWEAK.
Coz... subclassing.
masak pmurias: 6pad! <3 11:44
Xliff Could do it in method new().... if there were only one.
masak Xliff: wait, BUILD only runs once per object initialization, no?
Xliff masak: Yes... but subclassing 11:45
masak m: class B { submethod BUILD { say "B's BUILD" } }; class C is B { submethod BUILD { say "C's BUILD" } }; C.new
camelia B's BUILD
C's BUILD
11:45 pmurias joined, p6bannerbot sets mode: +v pmurias
Xliff See? 11:45
masak Xliff: I don't see the problem...?
pmurias: 6pad! <3
Geth doc: 891e49386d | (JJ Merelo)++ | doc/Language/packages.pod6
Fixing issue raised by @rahogaboom in email list. :+1:
synopsebot Link: doc.perl6.org/language/packages
Xliff masak: I do NOT want the code to run more than ONCE.
masak Xliff: it... doesn't? 11:46
Xliff Your example runs two instances of BUILD.
masak Xliff: the BUILD in B runs once and the BUILD in C runs once.
Xliff Yes.
masak that's correct, because my C instance is also a B instance
Xliff I know.
11:46 saki joined
tadzik so you want your BUILD to not be a submethod? 11:46
11:46 saki left
Xliff And the code I want to run should happen AFTER all of the BUILD calls are made. 11:46
11:46 pmurias_ joined, p6bannerbot sets mode: +v pmurias_
Xliff but before bless exits. Hence why I wanted to override bless. 11:47
masak usually when I'm banging my head against the OO system, I take a step back and wonder if I'm doing things in the right way
tadzik while we're at it, I recently had a feeling that perhaps the P6/Moo(se) OOP syntax encourages bad OO practices
I know that it does in me, and life taught me that I'm usually not special :)
masak tadzik: I'd love to see a longer explanation of that
11:48 saki joined, saki left
tadzik masak: ah, take a seat :) 11:48
Xliff masak: Trust me. I took that step back.
masak tadzik: (will read asynchronously, as I'm currently teaching)
Xliff: ...but still, your conclusion was "I want to override .bless"? :P
Xliff If I can override new() why not bless()? 11:49
:P # masak
tadzik so, it's been a while since my first C++ books taught me that classes are just structs with functions, and nowadays I tend to think of object as the OG OO masters designed them: as entities that *do* things, are only accidentally happen to be data structures sometimes
now I can feel smug and intelligent people agree with me so I fell like it's I'm on the right track with these
so objects are those things that *do* things, and the things they do also strive to keep the object's state mostly hidden and mostly correct 11:50
masak Xliff: ...because .bless is at a deeper level of the OO system
Xliff: it's not "can't" so much as "probably shouldn't" 11:51
tadzik so that their data-structure properites are merely a useful addition to their core idea, rather than being the core idea itself
now, BUILD and bless kind of ties into that, and so is the discussion you're having
masak tadzik: you're expressing "The Mystical View" of OO, by the way.
Xliff I agree with "Probably shouldn't" but bless() is just a method, no?
masak (there's also "The Scandinavian View" and "The Software Engineering View") 11:52
Xliff I don't see anything in the docs saying that "This should not be done"
11:52 squashable6 joined
masak Xliff: you misunderstand 11:52
tison new/bless/BUILD/TWEAK
tadzik before TWEAK was a thing I remember having arguments here with TimToady, and at some point implementing a custom AFTERPARTY method into rakudo so that I can do things when the object is being initialized
11:52 aeruder__ left
masak Xliff: I'm not setting up a challenge. and you're right that the documentation does not discourage you from overriding .bless 11:52
tadzik the reason I wanted to do this was sound in retrospect: objects should care about correctness of their state, and doing that as they're being created is perhaps the most important part of it all 11:53
11:53 p6bannerbot sets mode: +v squashable6
squashable6 Webhook for perl6/whateverable is now active! Practicality beats purity. 11:53
tison too many if want to know the whole construct process
masak Xliff: it's just a matter of common sense -- it's deeper down in the OO system, so all other things equal, you'd be less wont to override it
tadzik in other words: "constructor" is of upmost importantce in an object, imho
Xliff m: class B { submethod TWEAK { say "B's TWEAK" } }; class C is B { submethod TWEAK { say "C's TWEAK" } }; C.new
camelia B's TWEAK
C's TWEAK
tadzik now the reason why I fought long battles with BUILD, AFTERPARTY and friends is because I didn't want to overload the actual constructor as I should
Xliff masak: But you still haven't said anything meaning that "I shouldn't be able to"
masak tadzik: agree insofar as invariants are important 11:54
tadzik but the reason why I didn't want to do that is because it was *easier* that way
Xliff masak: Just that it should happen rarely.
masak Xliff: that is what I'm saying
tadzik one of the selling points of Moose for me back in the day was "you don't have to write a constructor and this stupid bless() thing that confuses you, just declare your attributes"
masak Xliff: and I'm implying that your mistake *might be* that think you're in a rare situation
Xliff masak: Note that both BUILD and TWEAK run as expected.
tadzik Perl 6 does the same, obviously
11:54 kensanata joined, p6bannerbot sets mode: +v kensanata
Xliff But I don't want to repeatedly run this code in that manner. And those mechanisms you are touting don't let me do that. 11:55
In fact, you are saying that Perl6 is FIGHTING me on that.
I know what I want to do and I'm trying to find the best way to do it. I understand you may think that I'm NOT in this situation.
tadzik so the syntax of the language I used made it all very attribute-centric: object creation was pushed aside as something You Shouldn't Need To Do, and the data structures associated with an object has become not only the core part of creating them, but also a defining part of their interface!
Xliff But after careful analysis.. I AM.
11:56 kbloom joined, p6bannerbot sets mode: +v kbloom
Xliff And listen: this used to work!! 11:56
As recently as 2018.08
tison tadzik: sound like case object in Scala or data class in Kotlin
tadzik in a way, `has` and the autogenerated new() has lured me away from proper OO and back into the days of "I am 12 and C++ is just C with classes"
Xliff So imagine this from the point of view of the end-freaking-user.
Working code. No change. Upgrade Perl. Now broken.
tadzik and it did so sneakily and I only recently realised what I tend to do because of this 11:57
AlexDaniel Xliff: it's a blocker, yes, although I haven't looked at why it happens
Xliff And the push-back I get when I ask for help is that -- "Uh. You're doing it wrong."
AlexDaniel Xliff: is there a gist somewher explaining what's going on there?
sry I'm busy doing stuff for the squashathon
tison just stay away from constructor and delegate the initial of attributes to automate, and introduce a "start"/"init
Xliff And you wonder why people get upset?
tison " method (LOL
tadzik declare attributes in my Moo classes so that I can set them in a constructor, but I don't actually need them to exist: I just want the configuration for the proper attribute of the object available so that I can create the attribute I actually need in BUILD
Xliff AlexDaniel: 11:58
tadzik which is nuts and I feel ashamed of my actions, but I also feel partially excused: after all, that's what I've been conditioned to do *by the language itself*
Xliff AlexDaniel: The only one I've written up is here: gist.github.com/Xliff/5ed649b319a4...1516ad8d7d 11:59
AlexDaniel Xliff: generally if your code is broken by a change in rakudo, a ticket should be filed, and by default I'll slap a blocker label on that. Now, if there's a good justification why the behavior should be changed, then there is a possibility that it will be rejected. But I'd much rather prefer that rejection to be on the ticket, not in a messy IRC discussion :)
tadzik by making the proper way inconvenient and advertising the easy, yet not-very-objecty way as the right way to do things, I ended up writing many very silly classes and probably have made my own and others' programming life harder 12:00
Xliff AlexDaniel: I will file that ticket. However, the issue of assistance is the concern.
So allow me to quietly blow off some steam.
And this discussion is not... that ... messy. :)
tadzik Xliff: sorry for making it messier with my monologue :P 12:01
Xliff tadzik: Hey. It's an open channel. And I've been following your stuff, too.
tadzik :)
Xliff AlexDaniel: Will update gist with an example. 12:02
12:03 saki joined, saki left
tadzik I'm yet to reach a full conclusion of these thoughts, but what sits at the core of it is this: "has", willingly or not, ends up tying the interface of the constructor to the internal state of the object, introducing tight and unnecessary coupling. Yet people still use it because 1) having constructor arguments with declarative defaults and such is nice and convenient and 2) everyone hates writing your their 12:03
own new() because they associate bless() with something discouraged and hard to understand
lizmat And yet another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/10/01/...-than-two/ 12:06
tadzik as a possible way to solve it, perhaps having a separate entity from has would be nice? Something that declares an "input attribute", which the default constructor handles correctly, and *maybe* that "input attribute" sets an actual attribute with itself
I'll try to sketch a prototype 12:07
Xliff AlexDaniel: Here's the updated gist. gist.github.com/Xliff/5ed649b319a4...1516ad8d7d
AlexDaniel Xliff: maybe a golf can help also 12:09
12:10 ExtraCrispy left
Xliff AlexDaniel: Yes. And I have trouble writing those. :/ 12:10
Lesse.
AlexDaniel lizmat: squashathon paragraph does not link to anything squashathon-related, can we please have a link to github.com/rakudo/rakudo/wiki/Mont...Squash-Day or even github.com/perl6/ecosystem/wiki/SQUASHathon if we want to save an extra click :) 12:12
Xliff And lo and behold, I have one.
m: class A { method bless(*%attrinit) { use nqp; my $o = nqp::create(self).BUILDALL(Empty, %attrinit); $o; }; }; say A.new 12:14
camelia Too few positionals passed; expected 1 argument but got 0
in method bless at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff ^^ That didn't error out in 2018.08
AlexDaniel 6c: class A { method bless(*%attrinit) { use nqp; my $o = nqp::create(self).BUILDALL(Empty, %attrinit); $o; }; }; say A.new
committable6 AlexDaniel, gist.github.com/a9066bde66afd2499b...5bc64fb0b5 12:15
AlexDaniel bisect: class A { method bless(*%attrinit) { use nqp; my $o = nqp::create(self).BUILDALL(Empty, %attrinit); $o; }; }; say A.new
bisectable6 AlexDaniel, Bisecting by exit code (old=2015.12 new=5c272ee). Old exit code: 0
AlexDaniel, bisect log: gist.github.com/f045ab8c054ed346e1...4df6e779f0
AlexDaniel, (2018-09-25) github.com/rakudo/rakudo/commit/74...47b787dcf8
Xliff O_o 12:16
I tested the one before that and it still failed.
AlexDaniel bisectable6 is always right
Xliff LOL
lizmat hehe...
AlexDaniel but sometimes the person asking a question is wrong, so let's double check
lizmat so my guess was also right
Xliff 2018.09-68-g5c272ee41
AlexDaniel c: 74ca05f284f^,74ca05f284f class A { method bless(*%attrinit) { use nqp; my $o = nqp::create(self).BUILDALL(Empty, %attrinit); $o; }; }; say A.new
committable6 AlexDaniel, ยฆ74ca05f284f^: ยซA.newโคยป ยฆ74ca05f: ยซToo few positionals passed; expected 1 argument but got 0โค in method bless at /tmp/xM210PD43T line 1โค in block <unit> at /tmp/xM210PD43T line 1โคโค ยซexit code = 1ยปยป
AlexDaniel yes, bisectable6 is right :) 12:17
lizmat I think I found the thinko
compiling now
pmurias_ tadzik: the input attribute would be syntax sugar to make initializing private attributes from constructor arguments easier? 12:18
tadzik masak: gist.github.com/tadzik/37a905d09db...14a986472f a sketch for an alternative
pmurias_: precisely, see the gist above :)
lizmat Xliff: s/nqp::create(self)/self.CREATE/ and you can get rid of 'use nqp' 12:19
yup, that's the one
tadzik pmurias_: my reasoning is: people like declarative attributes-arguments in has, and they don't like writing constructors. Let's give them both while not encouraging bad design
Xliff Oooh!
lizmat Xliff: github.com/rakudo/rakudo/commit/64137bd21c 12:20
pmurias_ tadzik: please don't use a , twigil
Xliff $,pmurias 12:21
timotimo i like woof
tadzik I wondered if I even need a twigil, but went with one to keep the pattern :P
timotimo but yeah, $, sounds like a bad idea :)
Xliff lizmat: Thank you SO much!
lizmat Xliff: yw
pmurias_ tadzik: it interferes with the tokenizing parts of my brain
12:21 pmurias left, cognominal-p6 left
tadzik and I don't like unicode enough to use a $โ†’ or something 12:21
12:21 pmurias_ left, saki joined
tadzik oh no, I interfered too much! 12:21
12:22 saki left
AlexDaniel lizmat: any tests coming? 12:22
12:23 GHAABL41 joined, FAASPJB joined
lizmat AlexDaniel: he... lemme see 12:23
leont tadzik: how about fixing that with a trait? 12:25
12:25 statisfiable6 left, statisfiable6 joined
timotimo how do you like $แท‚ instead of $,? 12:25
12:25 statisfiable6 left 12:26 statisfiable6 joined
leont has $!foo is constructed('bar') or some such? (names are hard) 12:26
12:26 p6bannerbot sets mode: +v statisfiable6
AlexDaniel Xliff: please next time just file a ticket :) 12:26
you see, now it's fixed, so less motivation to file one. But we need testsโ€ฆ which we almost forgot 12:27
and then someone will look at the commit and say โ€œwhoa, why?โ€ and there's no proper thread for discussion
timotimo gist.github.com/timo/e05f3537fdd98...f25f9bf5cf - a whole bunch of choices for y'all!
Xliff AlexDaniel: Do you still want me to file a ticket so you can mark fixed? 12:28
AlexDaniel Xliff: depends on whether lizmat writes tests or not
Xliff Wouldn't that golf work as a test? 12:29
timotimo updated to not put them all into a single column
AlexDaniel Xliff: yes, it should
c: HEAD class A { method bless(*%attrinit) { use nqp; my $o = nqp::create(self).BUILDALL(Empty, %attrinit); $o; }; }; say A.new
committable6 AlexDaniel, ยฆHEAD(64137bd): ยซA.newโคยป
12:29 pmurias joined, p6bannerbot sets mode: +v pmurias
AlexDaniel Xliff: yes, seems to be working now 12:29
12:29 pmurias_ joined, p6bannerbot sets mode: +v pmurias_, ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy
pmurias tadzik: has $!foo is built(-> :$arg-name {BuildItProperly.new($arg-name)}) 12:29
timotimo like, $ฬฆ is already a lot like $, but it doesn't collide with "anonymous scalar, sub call"
Xliff c: HEAD class A { method bless(*%attrinit) { use nqp; my $o = self.CREATE.BUILDALL(Empty, %attrinit); $o; }; }; say A.new 12:30
committable6 Xliff, ยฆHEAD(64137bd): ยซA.newโคยป
timotimo another suggestion
$อœ as a replacement for $_
pmurias tadzik: has $!foo is built(-> :$arg-name! {BuildItProperly.new($arg-name)}) for a required one
12:30 saki joined, saki left
timotimo well, maybe $อŸ would be a more sensible choice 12:31
lizmat AlexDaniel Xliff added the golf as a test
AlexDaniel lizmat++ that was quick, thanks! 12:32
12:35 mcmillhj joined
Xliff wonders if timotimo needs a hug. 12:35
timotimo: Please... no unicode this early in the morning. My compose key is threatened!
12:35 p6bannerbot sets mode: +v mcmillhj
Xliff OK. My gist is updated. masak++, tadzik++, AlexDaniel++ and lizmat+++! 12:35
timotimo i'd actually be amused if we had those in a silly slang module 12:36
use Syntax::Silly;
Xliff People would strangle the writer. 12:37
timotimo a slang that allows variables to start not only in a $, but also any $ with any number of combiners
12:37 araraloren left
ilmari use Syntax::Zalgo; 12:37
12:39 cognominal-p6 joined 12:40 p6bannerbot sets mode: +v cognominal-p6
tison if perl6 toolchain install slang as truffle framework does :-) 12:43
then perl6 becomes a polyglot platform 12:44
12:45 pmurias left 12:46 pmurias joined, p6bannerbot sets mode: +v pmurias
pmurias tison: you mean if we have a slang that switches parsing to a truffle language? 12:47
tison not *a* slang, but if a user-friendly slang implementation approach 12:48
IIRC masak has 007
so maybe we already have it 12:49
hmm..what I am concerned maybe a Inline::XXX series 12:51
12:51 pmurias_ left 12:52 pmurias_ joined, p6bannerbot sets mode: +v pmurias_, void1 joined, void1 left 12:55 pmurias left, pmurias_ left 12:56 Xliff_ joined 12:57 cognominal-p6 left, mahafyi joined, lizmat_ joined, p6bannerbot sets mode: +v lizmat_, cognominal-p6 joined
tadzik leont, pmurias: I like these 12:57
12:57 p6bannerbot sets mode: +v Xliff_, reppie joined, p6bannerbot sets mode: +v mahafyi 12:58 p6bannerbot sets mode: +v cognominal-p6, p6bannerbot sets mode: +v reppie
SmokeMachine lizmat: hi... 12:58
12:58 x[LGWs4x4i]uG2N0 left
tadzik I think declarative attributes are great, and so is the declarative constructor. "has" was a great idea that combined those, but I think it was taken too far by tying these things together 12:58
SmokeMachine lizmat: sorry, but wrong Fernando on Red development... 12:59
12:59 grondilu left
tadzik timotimo: yeah, I'm surprised it's not a thing already, tbh :) I honestly think unicode is insane, but since we're doing it, while not go Full Instane too? :) 12:59
SmokeMachine lizmat: that was me, Fernando Correa de Oliveira...
tadzik that would actually fix some problems people have with it. Like violence, unicode becomes a solution rather than a problem if you apply it excessively 13:00
SmokeMachine lizmat_: ๐Ÿ‘†
13:00 Xliff left, lizmat left
tadzik people have been changing unicode gun to a water gun, salad to a vegan salad... that's stupid! That's what combining characters are for 13:00
SALAD+VEGANISM, GUN+PACIFISM, there
(I'm only half-joking btw :P) 13:01
13:01 saki joined, saki left, grondilu joined, p6bannerbot sets mode: +v grondilu
moritz_ the other day, I bought a cookie that looked *really* inviting, only to later find out that it tasted like dirt 13:02
13:02 lizmat_ left
moritz_ and later sombody told me it was vegan 13:02
so the next time I bought something in the same shop, I was tempted to ask if it was vegan, and not buy it if the answer was yes 13:03
(I could resist, and didn't ask then)
13:04 cognominal-p6 left, lizmat joined, p6bannerbot sets mode: +v lizmat
tadzik moritz_: was the next thing also vegan (and awful?) 13:05
moritz_ tadzik: no idea if it was vegan, but it was tasty :)
tadzik ah, that's the best :) 13:06
I love vegan food sometimes because vegan cooks tend to get really creative and end up making really tasty stuff, rather than taking a piece of meat, some filler, some salad and calling it done
but then again once I went to a party, and because one attendee was vegan they made literally everything from beans. Every single meal. 13:07
Actualeyes I consistently feel like vegan plates are missing something. 13:08
SmokeMachine .tell lizmat sorry, but on p6w โ€œRed developmentsโ€ that was the wrong Fernando, that was me, Fernando Correa de Oliveira... 13:09
yoleaux SmokeMachine: I'll pass your message to lizmat.
tadzik I really like vegan stuff unless it's trying to imitate non-vegan stuff, then it's just a poor ersatz imho :/
13:10 Kaiepi left 13:11 Kaiepi joined
AlexDaniel tadzik: I haven't tried the impossible burger, but as far as I can see it imitates very well 13:11
13:12 p6bannerbot sets mode: +v Kaiepi
AlexDaniel is it vegan though? 13:12
tadzik never heard of it, but I think it's similar to what we have here known as Krowarzywa
which is a magnificent pun
"krowa rzywa" is a typo on "alive cow", and "warzywa" means vegetables :) 13:13
13:13 nwang joined
tadzik never had it either, but iirc it's vegan and actually very good 13:13
AlexDaniel I don't think it's even remotely similar
13:13 p6bannerbot sets mode: +v nwang
Geth doc: 435be23287 | (Tzu-Li "tison" Chen)++ (committed using GitHub Web editor) | doc/Language/hashmap.pod6
improve "Constraint value types" paragraph
13:14
synopsebot Link: doc.perl6.org/language/hashmap
tadzik I had some vegan bacon once. It wasn't bad, but it definitely wasn't bacon either 13:15
13:16 robertle left 13:17 robertle joined, cognominal-p6 joined 13:18 p6bannerbot sets mode: +v robertle, p6bannerbot sets mode: +v cognominal-p6, kaare_ joined 13:19 p6bannerbot sets mode: +v kaare_ 13:20 nwang left 13:21 Guest40687 joined, KingsyOS joined, cognominal-p6 left, lizmat left, Guest40687 left 13:22 cognominal-p6 joined, p6bannerbot sets mode: +v KingsyOS
timotimo i personally am looking forward to lab-grown meat being widely available 13:22
i'll totally be an early adopter
13:23 p6bannerbot sets mode: +v cognominal-p6
tadzik oh yes 13:23
13:24 aeruder joined
timotimo depending on your particular flavor of veganism, lab-grown meat would also be vegan, i'd claim 13:24
13:24 p6bannerbot sets mode: +v aeruder 13:27 knation joined, p6bannerbot sets mode: +v knation, pmurias joined, p6bannerbot sets mode: +v pmurias, pmurias_ joined, p6bannerbot sets mode: +v pmurias_ 13:28 a3Dman joined, KingsyOS left, p6bannerbot sets mode: +v a3Dman 13:29 vrurg joined, a3Dman left 13:30 p6bannerbot sets mode: +v vrurg 13:32 lizmat joined, p6bannerbot sets mode: +v lizmat 13:37 Anton-LatukhajX joined
Xliff_ timotimo: lab grown meat? Are we really there? 13:37
.oO( vat grown beef?!? )
timotimo it already exists, but is not publically available, and i'm not sure if it's legal to eat it for some reason? :D 13:38
13:38 domidumont left
timotimo last i read it was missing some texture because it's all just one type of cells, whereas regular meat would have different kinds intermingled 13:38
jkramer Wasn't there some super rich dude who paid a million for eating the first tiny piece of it?
timotimo could be 13:39
13:39 domidumont joined, p6bannerbot sets mode: +v domidumont
leont It already exists in labs, and is quite edible from what I've heard, but it's ridiculously expensive 13:40
tadzik if it's merely missing textures then it's perfectly releasable as an early alpha :P
Xliff_ Oh My Ghod. We're really getting.... sorta... closeish
www.businessinsider.com/lab-grown-...ble-2018-9
tadzik: Actually, textureless food isn't that palatable. 13:41
AlexDaniel โ€œCalled Meatableโ€
hmmmmmmm
Xliff_
.oO( Are there 2 l's in palatable? )
timotimo have they reached the black triangle stage yet?
Xliff_ Black Triangle? Isn't that for ski-ing. Or are you talking "slippery slope?" 13:42
timotimo nah, it's the stage where you can initialize the hardware to get graphics on the screen, but it still looks uninteresting
but it represents a far bigger achievement than it suggests from just looking at it 13:43
and a black triangle is, well, textureless :)
jkramer Recently I've also seen worm burgers in a supermarket. It's like the future is already here! www.nw.de/nachrichten/wirtschaft/2...rt-up.html
13:43 Anton-LatukhajX left
timotimo oh! 13:43
Xliff_ Worm burgers? 13:44
Heh. Not my thing. There's that texture issue, again.
jkramer Yeah, I think they shockfreeze worms, grind them and use the powder as protein source in some kind of soya burger. 13:45
They say it tastes and feels like a falafel though. So I wonder: why not eat a falafel?
timotimo yeah, 60% of the worms, 40% concentrated soy protien
or soy protein concentrate
or whatever
13:46 jeromelanteri joined
Xliff_ Still though... worms... 13:46
13:46 p6bannerbot sets mode: +v jeromelanteri
Xliff_ Next thing you know we'll have the R-burgers. 13:46
Roaches and Rats. :P 13:47
AlexDaniel (butterfly burgers?)
jkramer I think I'd eat worm powder. I just don't want to see the actual worms. :) 13:48
timotimo "novel food", hell yeah
jkramer Ok I saw the worms. :( l7.alamy.com/zooms/bccc8420cc554ba...cf9c7y.jpg 13:49
timotimo as long as it doesn't move when i thaw it ... :)
haha, i won't click that :D
jkramer :D
timotimo i hope the next squashathon will actually become a flash-freeze-and-grind-a-thon 13:50
jkramer I imagine other insects like crickets could be pretty tasty though. I've seen them fried and covered in chocolate, I might try that some time. :) 13:51
timotimo i think it was crickets that were used in Snowpiercer
jkramer Didn't they eat the poor people from the waggons at the end of the train, like Soylent Green? 13:52
timotimo not in the movie at least. there was also a book, i assume? 13:53
robertle comic book
Xliff_ Heh. Soylent Green. 13:54
Wonder why Hollywood hasn't gotten around to remaking that.
robertle but I can't remember anyone being eaten, "just" enslaved and abused
jkramer In the movie it was protein bars made from cockroches: www.quora.com/What-were-the-protei...-made-from
timotimo oh, it was cockroaches
my mistake
13:54 pyrimidine joined
timotimo they were only shown briefly, in my defense :) 13:54
13:55 p6bannerbot sets mode: +v pyrimidine
jkramer IIRC protein bars made from frozen ground crickets exist in real life though. 13:55
exoprotein.com/ 13:56
Xliff_ Just as long as I don't know what brand that is.
Ok. good. Not the ones I eat. I can avoid them.
jkramer There are several brands :)
13:57 void1 joined, void1 left, void1 joined, p6bannerbot sets mode: +v void1
jkramer But I'm sure it would say it's from crickets on the packaging. 13:57
timotimo d'aaw, rewe has a page about how eating insects is slowly gaining traction, and there's a section for "people who aren't brave enough yet" with food that merely looks like different kinds of insects, and they are really adorable: www.rewe.de/ernaehrung/insekten-essen/ (scroll down 3/4th of the way)
13:58 p6bannerbot sets mode: +v void1
jkramer :D 13:58
13:59 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh
timotimo "mini spider pizza", "vegetable caterpillar", "spider cupcakes", "melon frog", "sausage slug on cucumber salad", and "sweet (or cute) fruit turtles" 13:59
jkramer So if I don't want to eat actual insects I can still eat cupcakes with frosting that looks like a spider? I don't think that's the point of eating insects :D
13:59 p6bannerbot sets mode: +v aborazmeh
timotimo :D 14:00
AlexDaniel can we get this channel back to perl6 support? :D
jkramer Sorry :D
Xliff_ is with AlexDaniel
You all should move that discussion to #weirdfoodies. 14:01
timotimo sorry about that, i'll shut up
actually, i was intending to go afk anyway
jkramer Yup and I need to get some work done actually :)
Xliff_
.oO( There was an implied smiley in that last message. I swear! )
14:06 molaf joined, AlexDaniel left, AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel, p6bannerbot sets mode: +v molaf 14:08 smash_ is now known as smash 14:13 ExtraCrispy left
xinming m: my %h=(:a, :b, :c); $_ = False for %h<a b>:v; %h.perl.say; 14:13
camelia {:!a, :!b, :c}
xinming Is there shortcuts for perl6 to make the $_ = False for %h<a b>:v more sweet? :-)
14:13 ExtraCrispy joined, p6bannerbot sets mode: +v ExtraCrispy
timotimo yeah 14:13
m: my %h=(:a, :b, :c); %h<a b>--; say %h.perl 14:14
camelia Cannot resolve caller postfix:<-->(List); 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)
(Int:D $aโ€ฆ
timotimo m: my %h=(:a, :b, :c); %h<a b>>>--; say %h.perl
camelia {:!a, :!b, :c}
jkramer m: my %h=(:a, :b, :c); %h<a b> = False xx *; say %h 14:15
camelia {a => False, b => False, c => True}
timotimo m: my %h=(:a, :b, :c); %h<a b> X= False; say %h.perl
camelia {:!a, :!b, :c}
lizmat m: my %h is Set = <a b c>; %h<a b>>>--; dd %h
yoleaux 13:09Z <SmokeMachine> lizmat: sorry, but on p6w โ€œRed developmentsโ€ that was the wrong Fernando, that was me, Fernando Correa de Oliveira...
camelia Cannot resolve caller postfix:<-->(Bool); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw)
(Bool:D $a is rw)

The following do not match for other reasons:
(Bool:U $aโ€ฆ
timotimo must be SetHash 14:16
lizmat ?
timotimo in your code, it doesn't work because Set is read-only 14:17
lizmat .tell SmokeMachine fixed, sorry for the confusion
yoleaux lizmat: I'll pass your message to SmokeMachine.
lizmat ah duh
m: my %h is SetHash = <a b c>; %h<a b>>>--; dd %h
camelia SetHash.new("c")
SmokeMachine .
yoleaux 14:17Z <lizmat> SmokeMachine: fixed, sorry for the confusion
SmokeMachine lizmat: no problem! I don't think Fernando is a common name... :)
lizmat it is for Abba fans :-) 14:18
SmokeMachine :)
14:18 reppie is now known as x[LGWs4x4i]uG2N0 14:29 aborazmeh left
timotimo i wonder if the comparison of the benchmark where we create the Point and add their .x and .y to a total is disingenuous because of the nature of the optimization ... 14:34
lizmat timotimo: why ?
timotimo the optimization is that it eliminates the need to allocate an object to hold the two integers 14:41
at least i think that already landed?
i better check my claim before i make it
if that opt is yet to land, then ... oh my. 14:42
jnthn No, there's no EA yet
You're right that once we have EA and scalar replacement and they're working well, then we'll devestate that benchmark, though :) 14:43
timotimo oh jeez
jnthn And it's still actually kinda fair, in that there's loads of short-lived objects used for the purpose of abstraction in real programs. Think of Rat and Complex, for example :)
timotimo true 14:44
jnthn But yes, one'd want a benchmark that keeps the objects around also.
timotimo the pea that we have, does it only work for num and int attributes, or also for object registers?
jnthn Note that pea only exists in a very experimental branch :)
But I put in support for int/num/str too :)
lizmat jnthn: re the performance difference between Zoffix's opt and the standard 14:45
timotimo object attributes*
lizmat perhaps is the "is raw" on the named params the difference ?
nope, scratch that 14:46
jnthn :)
I'm not sure what it'll be without looking :)
timotimo the GC is doing well in this benchmark
7.8% of time is spent in the gc, it did 84 collections of 1.76ms on average 14:47
lizmat looks like making the attributes native ints, only helps a bit
timotimo it also allocates 3x as many Scalar as Point, and it also allocates as many BOOTHash and Hash as Point, and - unsurprisingly - 2x as many Int as Point 14:48
lizmat: perhaps some unnecessary boxing taking place, or usage of NativeRef
lizmat and having the custom new with !SET doesn't help at all if the attributes are *not* native ints
so it's the combination
so perhaps the standard initialization of native attributes is below par 14:49
14:49 lindylex joined
timotimo using native ints gets Scalar down to 1 million allocations 14:50
14:50 Hor|zon_ joined, araraloren joined
timotimo so 1 mil of Hash, BOOTHash, Scalar, and Point each, and 2 million Ints 14:50
14:50 p6bannerbot sets mode: +v lindylex
mst tadzik: bahahahahahahaha 14:50
14:50 p6bannerbot sets mode: +v Hor|zon_, p6bannerbot sets mode: +v araraloren
mst tadzik: gotta love mortie's comment on the issue too 14:51
timotimo yes, 2 million Scalars were created in BUILDALL
14:52 Hor|zon_ left 14:55 hami joined, p6bannerbot sets mode: +v hami
Xliff_ Is there any way to see if a Supply has been tapped? 14:56
timotimo you could give it a promise that gets resolved by the first time the supply block is entered 14:57
if you're in fact using a supply block, that is
buggable New CPAN upload: JSON-Schema-0.9.tar.gz by JNTHN modules.perl6.org/dist/JSON::Schema:cpan:JNTHN
Xliff_ No. I'm not.
timotimo OK, that's a bit different then
but i'll be afk for a bit first
i know about on-close, but not sure of an on-tap
Xliff_ No worries. If you do find something, just PM me... or leave a message on the bot.
timotimo you can build a supply that does nothing except set a value to "True" 14:58
and pass on every other value
Xliff_ I guess I could, at that.
But am surprised that wasn't already in there.
However, if it wasn't in the synopses, then it wouldn't make it to implementation. ;) 14:59
timotimo like sub supply-snitch(Supply $other, atomicint $sentinel is rw) { supply { atomic-inc($sentinel); whenever $other { emit $_ } } }
Xliff_ And with that, I nap.
timotimo good nap!
15:05 hami left 15:06 fake_space_whale joined, p6bannerbot sets mode: +v fake_space_whale
xinming jkramer: timotimo Thanks for your versions 15:07
15:17 jmerelo joined 15:18 p6bannerbot sets mode: +v jmerelo 15:21 jeromelanteri left
lizmat jnthn: looks like changing replacing "if existskey / atkey" combo by a ifnull(my \a = atkey) could save about 10% for native attributes 15:23
15:24 kensanata left
jnthn lizmat: ah yes, sounds worthwhile 15:24
lizmat alas, my QAST generating foo seems to have left me atm 15:25
will look again at it when I get back from some cycling&
15:27 lindylex left, kybr joined 15:28 p6bannerbot sets mode: +v kybr 15:33 Kaiepi left 15:34 Kaiepi joined 15:35 p6bannerbot sets mode: +v Kaiepi, AlexDaniel left, AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 15:36 AlexDaniel left 15:38 graphene left 15:39 graphene joined 15:40 p6bannerbot sets mode: +v graphene 15:57 domidumont left 16:01 pmurias_ left, pmurias left, pmurias joined, p6bannerbot sets mode: +v pmurias, pmurias_ joined, p6bannerbot sets mode: +v pmurias_ 16:05 lizmat left 16:10 lichtkind left 16:12 Actualeyes left 16:20 zxcvz joined, p6bannerbot sets mode: +v zxcvz 16:22 kiwi_77 joined, p6bannerbot sets mode: +v kiwi_77, cobax left, kiwi_77 left, kiwi_41 joined, p6bannerbot sets mode: +v kiwi_41 16:24 kiwi_41 left, scimon left, graphene left 16:26 graphene joined, p6bannerbot sets mode: +v graphene 16:27 dakkar left 16:28 Actualeyes joined 16:29 p6bannerbot sets mode: +v Actualeyes 16:30 knation left 16:34 zxcvz left 16:37 microcoloneldX joined 16:38 molaf left 16:43 microcoloneldX left 16:44 rindolf left 16:51 rindolf joined 16:52 p6bannerbot sets mode: +v rindolf, domidumont joined 16:53 p6bannerbot sets mode: +v domidumont 16:55 kbloom left 16:57 natrys joined, p6bannerbot sets mode: +v natrys 16:59 grondilu left 17:01 araraloren left 17:02 molaf joined, molaf left 17:20 panicbit left 17:21 patrickb joined, p6bannerbot sets mode: +v patrickb 17:27 knation joined, p6bannerbot sets mode: +v knation 17:44 alloholaU joined, p6bannerbot sets mode: +v alloholaU 17:45 alloholaU left, pmurias left, pmurias_ left 17:47 modin joined 17:51 modin left 18:04 kbloom joined, p6bannerbot sets mode: +v kbloom 18:13 pmurias joined, p6bannerbot sets mode: +v pmurias, pmurias_ joined, p6bannerbot sets mode: +v pmurias_, mcmillhj left 18:16 mcmillhj joined 18:17 p6bannerbot sets mode: +v mcmillhj 18:18 silvermerelu joined 18:21 sauvin left 18:22 mcmillhj left, silvermerelu left 18:24 knation left 18:32 lizmat joined, p6bannerbot sets mode: +v lizmat, graphene left 18:33 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 18:34 graphene joined, p6bannerbot sets mode: +v graphene 18:38 mcmillhj left, jmerelo left 18:41 Michael_S joined, p6bannerbot sets mode: +v Michael_S, mcmillhj joined 18:42 p6bannerbot sets mode: +v mcmillhj
Michael_S Hello, I have what I hope is a quick question. I'm trying to figure out the syntax for a function definition that returns a two item List/array/whatever. If I omit types, it works fine. But I'd like to use the type system, and I can't figure out how to get something like "returns (ClassX, ClassY)" past the compiler. 18:44
18:44 kurahaupo left 18:45 kurahaupo joined
rindolf Michael_S: hi 18:45
Michael_S Hello rindolf.
18:46 p6bannerbot sets mode: +v kurahaupo
rindolf Michael_S: are nt there tuples for that? 18:46
El_Che Michael_S: you want to type each element? Return an object 18:47
m: sub foo(-->List) { 1,2,3 }; foo()
camelia ( no output )
Michael_S I could define a custom class to hold the two otherwise unrelated classes I want to return. But I was hoping to avoid the overhead.
El_Che m: sub foo(-->List) { 1,2,3 }; foo().say
camelia (1 2 3)
El_Che only 2? A tuple will do then 18:48
Michael_S Hmm... let me play with it locally, just a minute.
El_Che it depends on how do you want to type them 18:51
Michael_S Using a List in the signature works. It's not an important feature, but I was hoping for something like Scala's typed tuples. In Scala you can do: def foo(): (Int, String) = { 1, "hello" }; val x = foo(); println(x._1); /* prints numeric 1 */ println(x._2); /*prints numeric 2 */ 18:52
18:52 domidumont left
Michael_S Sorry, I got that second part wrong. x._2 is a string. 18:52
And in the same example if I tried to set x._1 to something not numeric or x._2 to something not a String, it's an error. Not a killer feature by any means, just nice. Anyway, thanks very much for your help, I appreciate the quick responses. 18:54
lizmat m: subset Foo of List where { .elems == 2 && .[0] ~~ Int && .[1] ~~ Str }; sub a(--> Foo) { "1","foo" }; dd a
camelia Type check failed for return value; expected Foo but got List ($("1", "foo"))
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
El_Che I wonder if a return type can have a where
lizmat m: subset Foo of List where { .elems == 2 && .[0] ~~ Int && .[1] ~~ Str }; sub a(--> Foo) { 1,"foo" }; dd a
camelia (1, "foo")
El_Che of, by a subset 18:55
s/of/ok/
I was thinkig of this non-working code:
lizmat m: subset Foo of List where { $_ ~~ (Int,Str) }; sub a(--> Foo) { 1,"foo" }; dd a # shorter
camelia (1, "foo")
El_Che m: sub foo(-->Pair where .key ~~ Int) { 1,2,3 }; foo()
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot do non-typename cases of type_constraint yet
at <tmp>:1
------> 3sub foo(-->Pair where .key ~~ Int7โ5) { 1,2,3 }; foo()
El_Che m: subset Foo of List where { $_ ~~ (Str,Int) }; sub a(--> Foo) { 1,"foo" }; dd a 18:56
camelia Type check failed for return value; expected Foo but got List ($(1, "foo"))
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
El_Che nice
lizmat m: subset Foo of List where * ~~ (Int,Str); sub a(--> Foo) { 1,"foo" }; dd a # shorter with a WhateverCode 18:57
camelia (1, "foo")
Michael_S Thanks, very cool. 18:58
El_Che lizmat: should I document your example? 19:00
it's pretty cool
Michael_S Next question, and then I'll stop bothering people for today. I'm writing a script to automate video file encoding. At the beginning I'm going to setup the Linux cpulimit utility to limit encoder CPU usage, and then when the encode is finished it'll be killed by the script. I could do that part by hand, but this is one more way for me to explore Perl6.
lizmat El_Che: sure :-)
El_Che lizmat: here? docs.perl6.org/language/typesystem...set-subset 19:01
lizmat looks like a good place to me
SmokeMachine m: subset Foo of List where (Int,Str); sub a(--> Foo) { 1,"foo" }; dd a 19:02
camelia (1, "foo")
lizmat SmokeMachine++ # even shorter indeed :-)
El_Che damn 19:03
Michael_S So I enter the function that starts a Proc::Async with cpulimit and returns it. But I don't always want to use cpulimit, if I'm not going to use my machine for a while I don't want it. But I can't figure out a clean way to tell whether the Proc::Async has been initialized and started.
lizmat Michael_S: you're not looking for docs.perl6.org/type/Proc::Async#method_started are you? 19:04
or maybe "ready" ? 19:05
Michael_S I could have *sworn* I was getting errors when I used the .started call. I beat my head against that for twenty minutes. I just tried it again, and it worked fine.
My tuple digression there was for returning (Proc::Async, Bool). But I don't need it, I justed tested again and 'started' worked flawlessly. 19:08
Well, I learned some things anyway. Thanks again to rindolf, El_Che, lizmat, and SmokeMachine for the help. 19:09
lizmat Michael_S: /me learned as well :-)
rindolf Michael_S: you're welcome
19:13 claes-magnus joined, p6bannerbot sets mode: +v claes-magnus
claes-magnus hey! my name is claes-magnus; I actually don't know any perl but I like to program and was told by a teacher this was the place. I know some JavaScript but are interested in learning other langs as well... :) 19:16
19:16 Antaresln joined
lizmat claes-magnus: you might want to have a look at greenteapress.com/wp/think-perl-6/ in that case 19:17
claes-magnus lizmat: sure will do! thanks 19:18
Geth doc: nxadm++ created pull request #2346:
Document typing of returns in signature
19:20
doc: 0eb8d39ff5 | (Claudio Ramirez)++ | doc/Language/typesystem.pod6
Document typing of returns in signature
doc: e696e37cc3 | nxadm++ (committed using GitHub Web editor) | doc/Language/typesystem.pod6
Merge pull request #2346 from nxadm/master

Document typing of returns in signature
synopsebot Link: doc.perl6.org/language/typesystem
19:23 sftp joined, p6bannerbot sets mode: +v sftp, mcmillhj left
masak claes-magnus: \o 19:24
(that's a little picture of a person waving) :)
19:25 Antaresln left
claes-magnus masak: :) 19:26
19:27 mcmillhj joined
masak m: my $name = "claes-magnus"; say ($name.substr($_, 1) for <6 7 4 2 0>).join 19:27
camelia masac
masak almost...
19:28 p6bannerbot sets mode: +v mcmillhj
masak m: for 4..9 -> $n { say "$n is ", ("1" x $n ~~ /^ [(..+?) $0+] $/ ?? "composite" !! "prime") } 19:32
camelia 4 is composite
5 is prime
6 is composite
7 is prime
8 is composite
9 is composite
masak claes-magnus: dunno if you've seen the regex that checks for primality before
claes-magnus no, can't say I have! 19:33
masak hm, superstitious brackets there...
m: for 4..9 -> $n { say "$n is ", ("1" x $n ~~ /^ (..+?) $0+ $/ ?? "composite" !! "prime") }
camelia 4 is composite
5 is prime
6 is composite
7 is prime
8 is composite
9 is composite
19:33 claes-magnus left, _claes-magnus joined
lizmat wonders what masak is trying to show 19:34
19:34 pecastro joined
masak lizmat: just showing some Perl 6 regexes :) 19:34
the (..+?) means "match one character, and then (frugally) one or more characters"
the $0+ means "one or more of the (..+?) group"
19:34 p6bannerbot sets mode: +v pecastro
El_Che "so, is this new Perl 6 thing easier to read than Perl 6?" 19:35
"hallo? Halloooo?"
lizmat ?
masak together, those two mean that the regex will backtrack until it finds two factors that make up the number
(or fail, if it's a prime)
19:41 pmurias_ left, pmurias left 19:51 pmurias joined, p6bannerbot sets mode: +v pmurias 19:52 pmurias_ joined, p6bannerbot sets mode: +v pmurias_ 19:55 Mava joined 19:56 p6bannerbot sets mode: +v Mava 19:57 Mava left 19:58 _claes-magnus left 19:59 _claes-magnus joined 20:00 p6bannerbot sets mode: +v _claes-magnus, robooki joined
_claes-magnus What's the deal with "gives voice to"? 20:01
leont It's against spambots AFAIK 20:03
20:03 ExtraCrispy_ joined, p6bannerbot sets mode: +v ExtraCrispy_, finlstrmYC joined 20:04 _claes-magnus left, p6bannerbot sets mode: +v finlstrmYC, finlstrmYC left, robooki left
pmurias_ for code mirror syntax highlighting what should I look at? 20:04
20:04 mcmillhj left
pmurias_ I found: github.com/zoffixznet/perl6.party/...codemirror 20:04
20:05 claes-magnus joined, ExtraCrispy left 20:06 p6bannerbot sets mode: +v claes-magnus 20:07 W4RL0RD__ joined, p6bannerbot sets mode: +v W4RL0RD__ 20:09 ExtraCrispy_ left 20:11 W4RL0RD__ left 20:14 claes-magnus left 20:52 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 20:59 HaraldJoerg left, HaraldJoerg joined, AlexDaniel left 21:00 AlexDaniel joined, p6bannerbot sets mode: +v HaraldJoerg 21:01 p6bannerbot sets mode: +v AlexDaniel 21:21 Michael_S left 21:22 pmurias_ left, pmurias left 21:28 AlexDaniel left 21:29 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 21:30 HaraldJoerg left 21:31 Blacker47 joined 21:36 Blacker47 left 21:38 rindolf left 21:58 rindolf joined, itaipu left 21:59 p6bannerbot sets mode: +v rindolf
Geth doc: MorayJ++ created pull request #2347:
Clarify interpolation section
22:01
22:03 happysatIh joined 22:04 p6bannerbot sets mode: +v happysatIh 22:05 happysatIh left 22:09 Ven`` joined, p6bannerbot sets mode: +v Ven``, AlexDaniel left 22:10 AlexDaniel joined, Ven`` left 22:11 p6bannerbot sets mode: +v AlexDaniel 22:13 zahlman joined, p6bannerbot sets mode: +v zahlman 22:16 zahlman left, patrickb left
Geth doc: 3666b8be66 | MorayJ++ | doc/Language/regexes.pod6
Clarify interpolation section

Attempts to clarify regex interpolation by starting with two examples and a simple explanation.
Leaving in the more complicated examples should people want more.
22:16
synopsebot Link: doc.perl6.org/language/regexes
doc: 7a9095c4d5 | MorayJ++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
Merge pull request #2347 from MorayJ/regex-interpolation

Clarify interpolation section
22:30 natrys left 22:34 rindolf left 22:49 nightfrog left 22:50 nightfrog joined 22:51 p6bannerbot sets mode: +v nightfrog
buggable New CPAN upload: Terminal-Spinners-1.2.0.tar.gz by RYNIX modules.perl6.org/dist/Terminal::Sp...cpan:RYNIX 22:57
22:57 vrurg left 22:58 vrurg joined 22:59 p6bannerbot sets mode: +v vrurg 23:00 Bucciarati left 23:01 vrurg left 23:02 pecastro left 23:05 vrurg joined 23:06 p6bannerbot sets mode: +v vrurg 23:18 lindylex joined, p6bannerbot sets mode: +v lindylex 23:36 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke
buggable New CPAN upload: App-Mi6-0.2.0.tar.gz by SKAJI modules.perl6.org/dist/App::Mi6:cpan:SKAJI 23:37
Geth doc: MasterDuke17++ created pull request #2348:
Fix some typos
23:41
doc: ba7cdebfc7 | MasterDuke17++ | doc/Language/typesystem.pod6
Fix some typos
synopsebot Link: doc.perl6.org/language/typesystem
23:45 manchicken joined 23:46 p6bannerbot sets mode: +v manchicken 23:59 graphene left