»ö« 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:
and the tests in roast
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.
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
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
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
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
in block <unit> at /tmp/UbGlvTRPFm line 1
grondilu m: say .²
camelia Use of uninitialized value of type Any in numeric context
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
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
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
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