»ö« 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!
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
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
Xliff_ m: say "alongwordbeforeadot." ~~ / \w+ <?before '.'> /; 02:25
camelia 「alongwordbeforeadot」
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
Xliff_ lindylex: no problem! 02:41
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
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
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
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.
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
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
geekosaur m: say (|('a', 'b', 'c')).^name 08:21
camelia Slip
pmurias which online repl should I plug rakudo.js in? 08:37
ZzZombo Sorry, what kind of plug you mean? 08:40
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
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
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
pmurias timotimo: I would have to investigate, I'm not really a REPL kind of person I haven't ever used ipython 09:42
timotimo ipython isn't too reply 09:42
it's more matlaby
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
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
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
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
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
Xliff Code was previously working, but now I get "Too few positionals passed; expected 1 argument but got 0" 10:25
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: )"
Xliff Zoffix. Ah. 10:26
jast how? if you talk without voice no other client can even see that
oh, +z, never mind me
Xliff OK. Time to reboot. BBIAS 10:28
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?
Xliff gist.github.com/Xliff/5ed649b319a4...1516ad8d7d 10:47
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?
tison hmm, maybe just use the js backend, know little about that 10:57
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
tison yes, that's why I am quite a bit surprise :P 11:06
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.
AlexDaniel Xliff: use Data::Dump::Tree; in Builder.pm6 11:18
Xliff Commented out. Checking 11:19
No change.
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
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 :-(
timotimo i think you literally just "rakudobrew build whatever-sha1-is-the-parent-of-74ca05f284f2e6668fe7" 11:28
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
tadzik mst: I'm sorry :D 11:33
Xliff ROFL 11:34
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
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
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
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.
tadzik so you want your BUILD to not be a submethod? 11:46
Xliff And the code I want to run should happen AFTER all of the BUILD calls are made. 11:46
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
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"
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
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
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
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.
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
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
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
tadzik and I don't like unicode enough to use a $→ or something 12:21
tadzik oh no, I interfered too much! 12:21
AlexDaniel lizmat: any tests coming? 12:22
lizmat AlexDaniel: he... lemme see 12:23
leont tadzik: how about fixing that with a trait? 12:25
timotimo how do you like $᷂ instead of $,? 12:25
leont has $!foo is constructed('bar') or some such? (names are hard) 12:26
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␤»
AlexDaniel Xliff: yes, seems to be working now 12:29
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
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
Xliff wonders if timotimo needs a hug. 12:35
timotimo: Please... no unicode this early in the morning. My compose key is threatened!
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
ilmari use Syntax::Zalgo; 12:37
tison if perl6 toolchain install slang as truffle framework does :-) 12:43
then perl6 becomes a polyglot platform 12:44
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
tadzik leont, pmurias: I like these 12:57
SmokeMachine lizmat: hi... 12:58
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
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_: 👆
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
moritz_ the other day, I bought a cookie that looked *really* inviting, only to later find out that it tasted like dirt 13:02
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)
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 :/
AlexDaniel tadzik: I haven't tried the impossible burger, but as far as I can see it imitates very well 13:11
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
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
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
timotimo i personally am looking forward to lab-grown meat being widely available 13:22
i'll totally be an early adopter
tadzik oh yes 13:23
timotimo depending on your particular flavor of veganism, lab-grown meat would also be vegan, i'd claim 13:24
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
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
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
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
Xliff_ Still though... worms... 13:46
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
timotimo they were only shown briefly, in my defense :) 13:54
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 :)
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)
jkramer :D 13:58
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
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! )
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? :-)
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 :)
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
timotimo using native ints gets Scalar down to 1 million allocations 14:50
timotimo so 1 mil of Hash, BOOTHash, Scalar, and Point each, and 2 million Ints 14:50
mst tadzik: bahahahahahahaha 14:50
mst tadzik: gotta love mortie's comment on the issue too 14:51
timotimo yes, 2 million Scalars were created in BUILDALL
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!
xinming jkramer: timotimo Thanks for your versions 15:07
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
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&
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
rindolf Michael_S: hi 18:45
Michael_S Hello rindolf.
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
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
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
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
masak claes-magnus: \o 19:24
(that's a little picture of a person waving) :)
claes-magnus masak: :) 19:26
masak m: my $name = "claes-magnus"; say ($name.substr($_, 1) for <6 7 4 2 0>).join 19:27
camelia masac
masak almost...
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
lizmat wonders what masak is trying to show 19:34
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"
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)
_claes-magnus What's the deal with "gives voice to"? 20:01
leont It's against spambots AFAIK 20:03
pmurias_ for code mirror syntax highlighting what should I look at? 20:04
pmurias_ I found: github.com/zoffixznet/perl6.party/...codemirror 20:04
Geth doc: MorayJ++ created pull request #2347:
Clarify interpolation section
22:01
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
buggable New CPAN upload: Terminal-Spinners-1.2.0.tar.gz by RYNIX modules.perl6.org/dist/Terminal::Sp...cpan:RYNIX 22:57
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