»ö« 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.
timotimo oh 00:00
m: constant Color = do { my enum Color <Red Green Blue>; Color }; say Red
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Red used at line 1
timotimo m: constant Color = do { my enum Color <Red Green Blue>; Color }; say Color::Red
camelia Red
timotimo is "our" scoped by default
Garland_g[m] Ah. That makes sense.
Thanks. I have a couple enums with exactly the same key inside, and the "our" scoping was causing compilation errors. 00:03
timotimo the same question was on the channel the other day, unfortunately i forgot the one important word from the Right Answer™ ;) 00:04
Garland_g[m] Hmm... I'm still getting the "A symbol <symbolname> has already been exported" error. I'll be back in a bit. 00:19
For two different enums that happen to have the same key name.
timotimo they'll probably have to get their own blocks 00:20
m: constant Color = do { my enum Color <Red Green Blue>; Color }; constant FinalFantasyCharacter = do { my enum FFC <Cloud Lightning Red>; FFC }; say Color::Red; say FinalFantasyCharacter::Red;
camelia Red
Red
timotimo m: constant Color = do { my enum Color <Red Green Blue>; Color }; constant FinalFantasyCharacter = do { my enum FFC <Cloud Lightning Red>; FFC }; say Red;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Red used at line 1
00:21 sotona joined 00:47 committable6 left, committable6 joined 00:52 committable6 left, committable6 joined, ChanServ sets mode: +v committable6 00:55 bisectable6 left, bisectable6 joined, ChanServ sets mode: +v bisectable6, evalable6 left, evalable6 joined, sotona left 00:56 ChanServ sets mode: +o p6bannerbot, p6bannerbot sets mode: +v evalable6
AlexDaniel if there's anyone on this channel who cannot talk, just rejoin 00:58
our bot was unable to give +v properly
Garland_g[m] I figured out my error. I need to export the constants, not the internal enums. And if I use Mymodule::Color as the enum name, I get to call them the same way both inside and outside the file, which is really nice. 00:59
Thanks!
01:00 ChanServ sets mode: +vv stmuk_ lizmat 01:01 ChanServ sets mode: +vvvv undersightable6 squashable6 benchable6 reportable6, ChanServ sets mode: +v releasable6 01:03 ChanServ sets mode: +v p6lert_ 01:16 molaf left
[Coke] . 01:26
01:29 molaf joined 01:30 p6bannerbot sets mode: +v molaf 01:46 Actualeyes left
SmokeMachine hi! Could some one, please, give me an opinion? im writing an ORM and Id like to know what do you guys think about the way Im thinking to create to describe relationships. Im pretty happy with the `Scalar` (to 1 relationship) and `Positional`(to many relationship) ways... but I have some doubts about the `Associative` (many to many relationships) one. could some one give me an opinion, please? 01:58
github.com/FCO/Red/issues/17
02:08 Guest17046 joined, p6bannerbot sets mode: +v Guest17046 02:09 Guest17046 left 02:10 fryst24 joined 02:11 p6bannerbot sets mode: +v fryst24 02:13 fryst24 left, sotona joined 02:14 p6bannerbot sets mode: +v sotona 02:15 lookatme_q joined, p6bannerbot sets mode: +v lookatme_q 02:18 node9 joined, p6bannerbot sets mode: +v node9 02:21 node9 left 02:23 promote14 joined 02:24 p6bannerbot sets mode: +v promote14 02:25 Deusdeorum joined, Deusdeorum left 02:27 itaipu left 02:30 promote14 left 02:34 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 02:37 itaipu joined, p6bannerbot sets mode: +v itaipu 02:46 weaksauce29 joined, p6bannerbot sets mode: +v weaksauce29, sotona left 02:48 weaksauce29 left 03:17 Ceber joined 03:18 p6bannerbot sets mode: +v Ceber 03:20 Ceber left 03:29 dustinm` joined 03:30 p6bannerbot sets mode: +v dustinm` 03:33 itaipu left 03:51 lichtkind joined, ryn1x joined 03:52 p6bannerbot sets mode: +v lichtkind, p6bannerbot sets mode: +v ryn1x 03:59 spycrab0 left 04:04 sotona joined
lichtkind does anyone know how to make a circumfix op | | work? 04:04
i tried everything i could come up with
04:05 p6bannerbot sets mode: +v sotona 04:12 ryn1x left 04:23 molaf left
lookatme_q lichtkind, maybe because | is a special infix 04:26
04:36 sotona left 05:05 MikeSpears15 joined 05:06 MikeSpears15 left 05:12 vrurg left 05:15 vrurg joined, p6bannerbot sets mode: +v vrurg 05:37 Guest81764 joined, p6bannerbot sets mode: +v Guest81764 05:39 Guest81764 left
moritz m: sub circumfix:<| |>($a) { say "|$a|" }; |a| 05:50
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> 3 circumfix:<| |>($a) { say "|$a|" }; |a|7⏏5<EOL>
expecting any of:
prefix
term
moritz lichtkind: | is already a prefix operator, and the parser cannot chose prefix:| vs. circumfix:| without backtracking 05:51
05:51 Actualeyes joined
moritz m: sub circumfix:<§ §>($a) { say "|$a|" }; §a§ 05:51
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
a used at line 1
moritz m: sub circumfix:<§ §>($a) { say "|$a|" }; §4§
camelia |4|
05:52 p6bannerbot sets mode: +v Actualeyes 05:55 sotona joined, p6bannerbot sets mode: +v sotona 06:02 Kaiepi left
lucs 0 06:04
06:11 vrurg left 06:16 dominix joined, p6bannerbot sets mode: +v dominix 06:25 fake_space_whale left 06:28 jargan is now known as jast, janus25 joined, sotona left 06:29 janus25 left 06:34 MasterDuke left 06:35 abraxxa joined 06:36 p6bannerbot sets mode: +v abraxxa 06:56 rindolf joined 06:57 p6bannerbot sets mode: +v rindolf 07:00 |oLa| left 07:08 jmerelo joined 07:09 p6bannerbot sets mode: +v jmerelo
jmerelo Hi! 07:09
dominix hi J 07:11
07:15 |oLa| joined
jmerelo Hi, dominix 07:16
07:16 p6bannerbot sets mode: +v |oLa| 07:20 zakharyas joined, p6bannerbot sets mode: +v zakharyas 07:39 dominix left
El_Che the discussion on perlmonks and reddit of ovid's talk on the future of Perl 5 is weird. I am almost happy no one has mentioned Perl 6. 07:46
jmerelo El_Che: I'll have to check it out. He mentioned 3 or 4 things that should go into Perl 5 to make it a bit better. Those things are already in Perl 6. So it's like, Perl 5 can be better by becoming even more like Perl 6 07:47
El_Che yes, that's the subtext I get without havibng seen the talk 07:48
jmerelo El_Che: it was gradual typing, signatures, a minimal class system... Don't remember the next, but I was listening to him and thinking "Now he's gonna say that by having this it's become Perl 6"
El_Che a faster perl 6 with more modules, essentially 07:49
lookatme_q :) 07:50
jmerelo El_Che: well, the thing is that he did mention that Perl 6 is going to become eventually faster than Perl 5. There's the potential there in the MoarVM
El_Che yes, indeed 07:52
07:58 araujo joined, araujo left, araujo joined, p6bannerbot sets mode: +v araujo 07:59 Libre joined, p6bannerbot sets mode: +v araujo, p6bannerbot sets mode: +v Libre 08:07 Libre left 08:08 RikcreaInfo joined, p6bannerbot sets mode: +v RikcreaInfo
masak El_Che: I noticed the sentence that said that Perl has no energy, no sense of direction, no long-term strategy. that's exactly why Perl 6 got started once many years ago. 08:21
jmerelo masak++
08:22 pmurias joined 08:23 p6bannerbot sets mode: +v pmurias
masak has power fantasies about the Perl 5 community going "oh noes Perl is dying, we should've done something about this years ago" and Perl 6 jumping out and going "ta-daa!" 08:23
jmerelo masak: Well, as Larry Wall says, "We love Perl for what it is" 08:24
Also, Perl is Perl 08:27
08:29 andrewalker joined 08:30 p6bannerbot sets mode: +v andrewalker 08:32 ZzZombo left
El_Che masak: some pschycologist would argue that it's a repressed fear of the Perl5 people saying: "ah, that's why were dying" :) 08:33
08:34 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo
jast the good thing about being a psychologist is that these types of arguments are untestable :) 08:36
El_Che :)
jast my favourite in that direction is evolutionary psychology (the idea that much of our day-to-day behaviour evolved a long time ago). it's unprovable but easy to talk about at length. 08:38
lizmat weekly: lancewicks.com/2018/08/18/the-euro...apceu2018/ 08:54
notable6 lizmat, Noted!
lizmat weekly: blogs.perl.org/users/mohammad_s_anw...eport.html 08:55
notable6 lizmat, Noted!
lizmat weekly: perlmonks.org/?node_id=1220578
notable6 lizmat, Noted!
lizmat is going to be afk until much later today
09:00 lizmat left
masak lizmat: thanks for the weekly! I wish I were there in Glasgow! 09:09
also, did lizmat just imply she's been up all night and will sleep through the day? :P
09:13 ZzZombo left, ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 09:14 pmurias left 09:15 Ven` joined 09:16 p6bannerbot sets mode: +v Ven` 09:17 scimon joined 09:18 p6bannerbot sets mode: +v scimon, pmurias joined 09:19 p6bannerbot sets mode: +v pmurias
scimon Morning all. 09:24
yoleaux 16 Aug 2018 13:58Z <b2gills> scimon: where clauses can be a statement that is smartmatched automatically (watching livestream) `subset IntOrRat of Numeric where Int|Rat`
16 Aug 2018 13:59Z <timotimo> scimon: i think you had a test for /Hello world/ and expected it to match "Hello world", but whitespace in perl6 regex aren't significant; i think rakudo is supposed to warn about that, though?
16 Aug 2018 14:00Z <timotimo> scimon: sorry, that was actually meant for lancew
scimon b2gills: Thanks 09:25
jnthn: I was thinking of grabbing your StackOverflow answer re environment traits and nicking some of Liz's code from Hash::LRU to make a new module version of it. 09:27
09:28 abraxxa left
jnthn scimon: Feel free :) 09:29
yoleaux 01:55Z <AlexDaniel> jnthn: any pre-golf thoughts on R#2231 ?
synopsebot_ R#2231 [open]: github.com/rakudo/rakudo/issues/2231 [SEGV][regression][⚠ blocker ⚠] SEGV in Audio::Sndfile
jnthn .tell AlexDaniel The ticket doesn't have a stack trace, which I'd need to give any useful pre-golf thoughts :)
yoleaux jnthn: I'll pass your message to AlexDaniel.
lichtkind moritz thank you i thought about that stuff too and was not quite sure since @ ist also a prefix context op and in fact you can use it build a cricumfix or do I moss something? 09:31
09:32 abraxxa joined, abraxxa left
AlexDaniel . 09:32
yoleaux 09:29Z <jnthn> AlexDaniel: The ticket doesn't have a stack trace, which I'd need to give any useful pre-golf thoughts :)
AlexDaniel jnthn: :)
09:33 abraxxa joined 09:34 p6bannerbot sets mode: +v abraxxa
moritz lichtkind: @ is not a prefix op I know 09:38
I know @ as a sigil (which is parsed as part of a term) and I know @( ... ) as a circumfix operator 09:39
09:44 RikcreaInfo left 09:47 lichtkind_ joined 09:48 p6bannerbot sets mode: +v lichtkind_ 09:49 lichtkind left
lichtkind_ moritz, yes I just checked but it once was an context op at least around 2005-6 ish 09:55
09:57 lichtkind_ is now known as lichtkind 10:01 spycrab0 joined, p6bannerbot sets mode: +v spycrab0 10:05 [particle] left 10:16 pmurias left 10:17 pmurias joined 10:18 p6bannerbot sets mode: +v pmurias 10:25 [particle] joined
pmurias masak: it's an interesting questing if Perl 6 got fast and was picking up steam would it help or hinder the Perl 5 language 10:25
10:25 p6bannerbot sets mode: +v [particle] 10:26 lookatme_q left, lookatme_q joined 10:27 p6bannerbot sets mode: +v lookatme_q 10:29 [particle] left 10:40 xiaomiao left 10:41 xiaomiao joined, p6bannerbot sets mode: +v xiaomiao
stmuk_ I don't think perl 5 v perl 6 is a zero sum game 10:44
I also think if ever there is another implemention of perl 5 other than the current it's likely to be written in perl 6 10:45
perl 6 is a potential solution to perl 5's problems. Perl 6 hasn't caused them.
10:48 ZzZombo left
jmerelo stmuk_++ 10:49
squashable6: status
squashable6 jmerelo, Next SQUASHathon in 10 days and ≈23 hours (2018-09-01 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
10:53 [particle] joined 10:54 p6bannerbot sets mode: +v [particle] 10:56 jcarty joined
scimon My favourite bit of Ovid's talk on the future of Perl was the laughter at the question "What would I like to see added to Perl6". 10:56
10:56 p6bannerbot sets mode: +v jcarty 10:59 Ven` left 11:01 Ven` joined, p6bannerbot sets mode: +v Ven`
stmuk_ personally I've always wanted more features removed from languages than added :) (not the perl way I know) 11:04
jmerelo scimon: right. Perl 6 has got everythin _and_ the kitchen sink. Or the kitchen sink context, as it were. 11:05
11:05 [particle] left
jmerelo But Perl 6 is not going to happen by itself. Still a lot of work to do. For instance, in the documentation :-) 11:05
scimon On that note do we have a ticker about adding more documentation for react { whenever {} } blocks? 11:13
11:15 nine_ is now known as nine, zakharyas left
scimon lunches 11:18
11:23 Ven` left 11:25 sergot joined, [particle] joined 11:26 p6bannerbot sets mode: +v sergot, p6bannerbot sets mode: +v [particle]
pmurias re features to add, having a real gradual type system would be cool (OTOH it's likely it would be best to have it on CPAN so you could choose the static type system) 11:32
11:39 pmurias left, pmurias joined 11:40 p6bannerbot sets mode: +v pmurias
scimon pmurias: How do you mean? I thought the current type system was pretty impressive. What's it missing? 11:42
11:45 Ven` joined 11:46 p6bannerbot sets mode: +v Ven`
pmurias scimon: the current "type system" is mostly runtime assertions 11:47
scimon: in a proper gradual type system once you but your types everywhere you get static type checking at compile time
scimon: the gradual type system are called that way because you can gradually convert your dynamically type program into a statically typed one 11:50
11:53 itaipu joined, p6bannerbot sets mode: +v itaipu
jmerelo scimon: yep, there's a ticket. Let me find it for you 11:59
scimon: it literally says "What the hell is react/whenever" github.com/perl6/doc/issues/2135 12:00
lichtkind jmerelo, greetings was insightful to meet you in person, hope we get soemthing done 12:10
jmerelo lichtkind: likewise. :-) 12:12
lichtkind jmerelo, i would like have something like that but most of it you already have so just a similar index page to the according bits tablets.perl6.org/appendix-b-grouped.html 12:14
jmerelo lichtkind: I had no idea that existed. Is it generated from elsewhere, or written from scratch? 12:16
12:18 pmurias left 12:19 pmurias joined 12:20 p6bannerbot sets mode: +v pmurias
lichtkind jmerelo, by my own hands :) 12:21
jmerelo lichtkind++ that's a lot of work. It's hosted in some repo?
12:22 abraxxa left
lichtkind jmerelo, i wroe it 2005-2009 in our german perl forum wiki which is currently down 12:22
12:23 domidumont joined 12:24 abraxxa joined, p6bannerbot sets mode: +v domidumont, p6bannerbot sets mode: +v abraxxa
lichtkind jmerelo, github.com/perl6/tablets 12:24
12:27 JP_ joined, p6bannerbot sets mode: +v JP_
JP_ Hi, I’d like to lear more about perl6 12:29
lichtkind just released Math::Matrix 0.25
Ulti JP you came to the right place :D
JP_ And how can I start? 12:30
Ulti JP_ perl6intro.com/ is a good first place and in many langs
lichtkind JP_, that covered good at perl6.org
or that 12:31
12:31 domidumont left 12:32 domidumont joined
Ulti yeah and the other offical docs location to get started rather than just reference on built in objects is docs.perl6.org/language.html 12:32
12:33 p6bannerbot sets mode: +v domidumont, Ven` left
Ulti JP_: if you dont want to go to the effort of installing Perl 6 yet there are a couple of places you can run example code, one such service can be found here glot.io/new/perl6 12:34
12:35 pmurias left
Geth Pod-To-HTML: JJ++ created pull request #44:
Tries to fix a problem with URLs that started with ?
12:37
12:37 pmurias joined, JP_ left, psychoslave joined, p6bannerbot sets mode: +v pmurias 12:38 Ven` joined, p6bannerbot sets mode: +v psychoslave 12:39 p6bannerbot sets mode: +v Ven` 12:42 psychoslave left
jmerelo lichtkind: wow, 3 year old. We will need to do stuff about that... 12:45
lichtkind jmerelo, but my goals was to port the good parts into docs since i dont have the time to make this as full time work 12:46
jmerelo, and than eventually adandon them
jmerelo lichtkind: that might not be trivial... 12:47
lichtkind sure
12:48 sotona joined
jmerelo lichtkind: and what kind of markup is it using? 12:48
12:48 Kaiepi joined, psychoslave joined
lichtkind markdown 12:48
conversion was painful
12:48 p6bannerbot sets mode: +v sotona 12:49 p6bannerbot sets mode: +v Kaiepi, p6bannerbot sets mode: +v psychoslave
jmerelo lichtkind: there's going to be some impedance with the rest of the documentation, which is in Pod 6. I would say it's better to keep it separate for the time being... 12:49
12:49 Ven` left
jmerelo lichtkind: in fact, for the foreseeable future. 12:49
jmerelo goes afk for lunch now...
12:49 jmerelo left 12:53 sotona left 12:59 zakharyas joined 13:00 p6bannerbot sets mode: +v zakharyas 13:02 Ven` joined 13:03 p6bannerbot sets mode: +v Ven` 13:04 Ven` left 13:15 Luneburg joined, p6bannerbot sets mode: +v Luneburg
Luneburg Is there any way to remove a specific character from a sequence (i.e. "a") without knowing where it is in the sequence? 13:16
moritz yes, with grep 13:17
Luneburg moritz: Ah, I remember now. Thanks.
13:17 Luneburg left
moritz m: my \new_seq = ('a' ... *).grep(none('a')); say new_seq.head(10) 13:17
13:17 Ven` joined
camelia (b c d e f g h i j k) 13:17
moritz m: my \new_seq = ('a' ... *).grep(none('f')); say new_seq.head(10)
camelia (a b c d e g h i j k)
13:18 p6bannerbot sets mode: +v Ven`, vrurg joined 13:19 p6bannerbot sets mode: +v vrurg 13:20 skids joined 13:21 p6bannerbot sets mode: +v skids 13:29 sena_kun joined 13:30 p6bannerbot sets mode: +v sena_kun
SmokeMachine sorry, Im not trying to spam, just sending it again when there's more people logged in 13:31
hi! Could some one, please, give me an opinion? im writing an ORM and Id like to know what do you guys think about the way Im thinking to create to describe relationships. Im pretty happy with the `Scalar` (to 1 relationship) and `Positional`(to many relationship) ways... but I have some doubts about the `Associative` (many to many relationships) one. could some one give me an opinion, please?
22:58 github.com/FCO/Red/issues/17
13:32 domidumont left 13:37 marcusramberg left, marcusramberg joined 13:38 p6bannerbot sets mode: +v marcusramberg 13:40 domidumont joined 13:41 p6bannerbot sets mode: +v domidumont 13:48 lgtaube left
SmokeMachine moritz: I had answered your comment 13:49
13:49 lgtaube joined
SmokeMachine moritz: (thanks for the help!) 13:49
13:50 p6bannerbot sets mode: +v lgtaube, Ven` left
moritz SmokeMachine: somehow this is all too much magic for my taste 13:56
SmokeMachine :( 13:57
moritz: is there a way to do that you would prefer? 13:58
moritz SmokeMachine: as I mentioned before, I like the way that SQLAlchemy does it
you declare an attribute/column to be a foreign key 13:59
13:59 Ven` joined
moritz and then you add a second attribute that is the relationship, and if there is more than one foreign key that maps to the relationship type, you have to specify which one you refer to 14:00
14:00 p6bannerbot sets mode: +v Ven`
moritz and in the relationship constructor, you can add extra arguments for non-default relationship types (for example uselist=False for a 1:1 relationship that is modeled as a foreign key) 14:01
14:01 psychoslave left
moritz the problem with callbacks tend to be: what do you do when you don't have an instance? 14:02
for example, you want to generate the DDL for your classes. What instance of your types can you pass in to discover the foreign key relationships? 14:03
those callbacks give you max flexilibity and min introspectability
I guess Track.cd-id (called on the type object) could return a Column object with enough meta data 14:05
14:05 jcarty left
moritz but then all the callbacks need to work with both instance and type objects, which is not obvious to the user 14:05
14:07 domidumont left
SmokeMachine moritz: it already does... attributes column (as `has $.bla is column`, and `has $.ble is referencing{ Bli.something }`) are Red::AttrColumn and it adds a method on its undefined class that returns the column description. Thats how i can do something like `Question.where: .answer == 42` 14:12
moritz: when I call `.cd-id` on an object, it returns the value of the cd-id 14:16
pmurias SmokeMachine: what do the callback give you? 14:29
scimon Currently I'm working with SQAlchemy and DBIC and muchly prefer DBIC. Mainly because it's easier to have it make SQL requests I'm expecting.
(Good luck BTW)
SmokeMachine pmurias: the column that should be used
scimon: thanks! :) 14:30
pmurias: and that need to be a Block because the column can not be defined yet... 14:31
pmurias so a method will retain a column value when called on an objects and some more general 'column called this' on a type object? 14:33
SmokeMachine pmurias: not a column value, but a column representation... 14:34
pmurias: this: github.com/FCO/Red/blob/master/lib...Column.pm6 14:35
pmurias: I think I didn't get it... :( 14:36
pmurias: yes, that's it! the value on a object and the column description on type object! that's it! 15:04
but on the callback it's always called on a type object... 15:05
if I need to get the value, I get it from the column descriptor and the instance of the object... 15:06
15:07 fake_space_whale joined
SmokeMachine like here: github.com/FCO/Red/blob/master/lib...ip.pm6#L11 15:07
and here: github.com/FCO/Red/blob/master/lib...ip.pm6#L16 15:08
15:08 p6bannerbot sets mode: +v fake_space_whale 15:22 abraxxa1 joined, spider-mario left 15:23 p6bannerbot sets mode: +v abraxxa1 15:24 abraxxa left
Ulti I like the idea of column ORMness shadowing just plain class style representations with plain values 15:42
also I am pro maximum magic and syntactic sugar, so long as there is always an escape hatch
the escape hatch doesn't have to be necessarily pretty but does need to be relatively guessable or discoverable, SQLAlchemy is actually awful for this, just today I was trying to work out how to inject plain SQL into the select part of a query 15:43
fairly sure its not really possible, instead you can create an ORM like query from a statement but its a full query and finalised all you can do is annotate over the top the model/column annotation to what is returned so that it can be combined with other ORM queries in sub selects etc 15:45
which would do what I want, but really all I wanted to do was specify a single nugget of SQL for a single column clause in the select
from what I can see at the moment there isn't much around more arbitrary queries in Re 15:46
*Red
outside of the direct ORM relationships
15:46 jast left 15:50 jast joined 15:51 p6bannerbot sets mode: +v jast
Ulti btw SmokeMachine have you seen Pony in Python? 15:51
ponyorm.com/
Perl 6 definitely has the power to go a step further for nice syntax on queries 15:52
SmokeMachine Util: yes, I did 15:54
Util: Ill take another look
15:55 ExtraCrispy joined
Ulti its kind of crazy what the dev has to do to get that in Python stackoverflow.com/questions/161157...6#16118756 15:55
15:56 p6bannerbot sets mode: +v ExtraCrispy
Ulti a query slang is something I'd be super interested in working on, I really like the SQL one we already have in the ecosystem 15:57
16:08 zakharyas left 16:10 molaf joined, p6bannerbot sets mode: +v molaf
SmokeMachine Util: looking at the first page of pony, I think some day it will be possible to do that query with Red using a code like this one: `Customer.all.grep({ .orders.sum > 1000 })` 16:11
Util: but its far from that currently...
16:12 xinming_ left, xinming joined 16:13 p6bannerbot sets mode: +v xinming
Ulti plus you'd want to use where and subsets right :D 16:14
16:14 pmurias left
SmokeMachine Util: do you think it's a good way to go? 16:16
sorry: `Customer.all.grep({ .orders.price.sum > 1000 })` 16:20
buggable New CPAN upload: Trait-Env-0.0.1.tar.gz by SCIMON cpan.metacpan.org/authors/id/S/SC/...0.1.tar.gz 16:22
scimon So I've been totally hard at work today.
16:24 jmerelo joined 16:25 p6bannerbot sets mode: +v jmerelo
scimon And I'm off. Later folks. 16:31
16:31 scimon left
Ulti SmokeMachine the dream: subset PayingCustomer of Customer where *.orders.sum > 1000; 16:40
a nice way to define views at least :)
SmokeMachine That’s a great idea! 16:41
Ulti especially if you can have relationships on them
SmokeMachine Util: I was planning `Customer.alias(PayingCustomer, :on{ .orders.price.sum > 1000 }) 16:43
But subset makes much more sense
16:44 domidumont joined 16:45 p6bannerbot sets mode: +v domidumont 16:46 domidumont left
Ulti I've never actually checked what subsets produce 16:47
16:48 domidumont joined
Ulti I assume its full subclass with the where function wrapping the constructor and type object comparisson stuff 16:49
16:49 p6bannerbot sets mode: +v domidumont, sabayonuser joined, sabayonuser is now known as Hexaferrum 16:50 p6bannerbot sets mode: +v Hexaferrum, Hexaferrum is now known as epsilonphase
Geth doc: e3c4294708 | (JJ Merelo)++ | htmlify.p6
Adding more info in htmlify to try and find error in #2270
16:55
doc: 984ad94dc6 | (JJ Merelo)++ | doc/Type/Routine.pod6
Adds a simple note on the behavior of is pure on multis

Basically specifying that this could change in the future, if rakudo/rakudo#2215 is solved. This solves #2215
synopsebot_ Link: doc.perl6.org/type/Routine
synopsebot_ RAKUDO#2215 [closed]: github.com/rakudo/rakudo/issues/2215 [regression][testneeded] Blob.subbuf regression since 2018.06
jmerelo Er, I mean 2127. Sorry. Will edit. 16:57
jmerelo realizes you can't edit commits. Well, you can, but once they're pushed they can cause a lot of trouble. Anyway. 17:00
17:01 Ven` left 17:05 domidumont left
epsilonphase Hi, I've been reading about perl6 for a while now, and I 17:09
... Sorry.... In any case, I was wondering how things are turning out with the macro system?
jmerelo epsilonphase: I think it's still not there. 17:39
sena_kun epsilonphase, you can look at github.com/masak/007/ for some, I believe, work in progress on topic. 17:40
jmerelo epsilonphase: I'm checking out the next version, and I don't see anything planned. You can still use it with "use experimental"
epsilonphase That's what I had suspected. Thanks for confirming it. 17:45
17:50 gfldex left
Ulti epsilonphase: this level of macro exists perl6advent.wordpress.com/2012/12/...23-macros/ 17:53
if you do: use experimental :macros;
epsilonphase out of curiosity what makes you specifically interested in macros? 17:54
epsilonphase I've had an interest in lisp for quite a while, but, the prefix order is less readable than postfix or infix, at least, by my eyes. 17:55
Also compile time magic is really neat.
Ulti well you get a lot of that through other means in Perl 6 than the feature called "macros" specifically 17:56
like slangs let you do a lot
17:58 Ven` joined
Ulti you can essentially grab the compiler mid doing something and take over for some defined context and then hand back 17:58
17:58 p6bannerbot sets mode: +v Ven`, Khisanth left
Ulti epsilonphase: this might interest you github.com/tony-o/perl6-slang-sql 18:00
masak epsilonphase: hi! I am an automated response system that triggered on the word "macros". how may I help you? 18:02
18:03 Ven` left
Ulti >:3 18:03
epsilonphase Masak: I was wondering if you'd show up :D I'd read some of your blog posts before coming on. Ulti: That's really neat too. 18:04
masak epsilonphase: I think the 10-word summary is "I'm pleased at how 007 keeps informing Perl 6 macros" 18:05
of course, given that it all happens on the side so far, it's also a little bit obscured
but being able to iterate on a smaller language has helped a lot
epsilonphase I was taken aback when I saw how much it looks like it's also turning into a more or less fully fledged language. Or, rather, I read your intention as that. 18:06
masak yeah... it's a bit of a surprise to me too 18:07
it's already the case that 007 has the fullest implementation of Perl 6 macros to date 18:08
basically, fleshing them out more means cheating less and less with the language 18:10
18:11 Khisanth joined 18:12 p6bannerbot sets mode: +v Khisanth
epsilonphase It's funny how that happens huh? Though.... I'm not sure I see how you operate on the QTrees in 007 in the docs yet. 18:13
masak I'm willing to explain if you feel you have the time and patience
epsilonphase Sure. 18:15
masak simplest case: `moo("something")`, where `moo` is a macro 18:16
epsilonphase Alright.
masak it looks like a normal sub call, but it's a macro call
epsilonphase Lisp would've been out of luck otherwise. 18:17
masak a sub call would invoke during runtime; the macro call invokes sometime during compile time, sometimes as early as right after the `)`
epsilonphase Alright, I think I follow. 18:19
masak in the sub case, the argument is the Str "something"; in the macro case, the argument is the Q::Literal::Str with the value "something"
epsilonphase Okay, so it passes the tokens/syntactic constructs between the ( and )? 18:20
masak yes; basically an argumentlist is a comma-separated list of expr; it passes each expr Qtree as an argument 18:22
similarly, on the other end, a sub returns a regular value but a macro returns a Qtree. that Qtree gets put back into the program in lieu of the macro call 18:23
it's what happens, for example, in examples/name.007
in all of the above, we've not mentioned hygiene. but it's of course there all the time. 18:25
epsilonphase Oh, so, implemented completely, if you had a troublesome area of code doing something silly, could you have it do something like add printing of line numbers between each contained expression?
masak yes, that sounds within the realm of the possible. given something like Perl 6's $?LINE variable 18:27
lately though I've been thinking more about constructions like `amb` and `each`. and syntactic junctions. :)
epsilonphase That sounds like it would definitely simplify the construction of such a macro? Though, I think I know what each does, but what does amb do? 18:28
masak the second-simplest case of a macro invocation is when the macro is an operator. so something like `x == "start" ff x == "end"`, where infix:<ff> is a macro 18:29
oh, `amb` is, hold on, let me link you
github.com/masak/007/issues/13 18:30
18:30 andrzejku_ joined
masak (note the issue isn't really agreed with itself exactly how the syntax should be) 18:30
18:30 p6bannerbot sets mode: +v andrzejku_
epsilonphase That first example kinda reminds me of goal seeking from Prolog.That'd be terrifyingly powerful. 18:30
18:31 sauvin left, [particle] left
masak aye 18:31
jmerelo My take on TPCIG dev.to/jj/perl-is-perl-46cm
masak it's made slightly more concrete with github.com/masak/007/issues/349#is...-408550689 which is more recent
18:32 [particle] joined 18:33 p6bannerbot sets mode: +v [particle], andrzejku left, andrzejku_ is now known as andrzejku
epsilonphase Though, if we could get back to where you were going, (the infix macro), is that going to be kinda like how Haskell handles infix operators? 18:33
SmokeMachine masak: do you think someday will macros make it possible to override `&&` and `||`? 18:34
masak SmokeMachine: yes, I hope so. 18:35
SmokeMachine masak: :) 18:36
masak SmokeMachine: I mean, from a 007 perspective, `&&` and `||` are (built-in) macro infixes
pmichaud++ was doubtful at one point where the whole circularity loop would close wrt booleans, conditionals, and those operators. wow, that must be sometime around 2011. 18:37
I think at this point I have a fairly good answer to that.
I'd define `&&` and `||` in terms of `if`. and then `if` in terms of a lower-level control flow API that told the code generator how to write GOTOs. 18:40
epsilonphase: how does Haskell handle infix operators? I'm not sure I know enough about that. I've seen them declared sometimes -- the precedence level is a number...? 18:42
epsilonphase: maybe gist.github.com/masak/010ba2ab93a5...-operators is a good intro to how 007 thinks of operators 18:44
epsilonphase (Honestly that's not part of them that I understand), but I was referring more to the passing of the arguments to either side being translated into sequential args. $v1 <ack!> $v2 is just <ack!>($v1,$v2)
masak aha. well, then, in that case, yes. :) 18:45
somewhat unrelatedly, I'm (very slowly) coming around to the notion of things like infix:<+> delegating to an .add method on the *left* operand -- something Perl 6 doesn't do but a lot of other languages do 18:46
Perl 6 is very CLOS-y in that it prefers multisubs for that 18:47
18:48 sotona joined, p6bannerbot sets mode: +v sotona
epsilonphase I don't mind that, but it does throw a lot of established OO techniques through a hoop 18:49
masak I think I was slightly swayed by lambda-the-ultimate.org/node/5509 which is a good read 18:50
epsilonphase: anyway, skipping ahead: the unwritten parts of that guide have sections like "The Q hierarchy", "Quasi blocks", "Macros" -- I've now described up to here -- "Stateful macros", "Closures in macros", "Macros that parse", "Contextual macros", "Evaluating expressions", "Interacting with control flow", and "Parsers and slangs" 18:52
so far I've enjoyed fleshing out the first part of the guide, the language/user part 18:53
I think I'm going to enjoy just as much fleshing out the second part, the macros/parsers part
18:56 pmurias joined
epsilonphase Macro closures sound like a nifty feature, though a little thought and I suddenly wonder whether or not compile time object orientation makes any sense at all. 18:56
18:56 p6bannerbot sets mode: +v pmurias 18:57 lgtaube left
masak I think the most powerful example of a macro closure to date is github.com/masak/007/issues/176#is...-240849038 19:00
that `op.identifier` there finds the `infix:<+>` (or whatever) that was the identifier behind the `+` parsed out of a `[+]` 19:01
and yes, it'd find the _right_ `infix:<+>`, the one that was defined in that scope where it parses
SmokeMachine masak: about the `is parsed` how do I tell to the macro what should be used as each argument? 19:05
19:05 eiro joined 19:06 p6bannerbot sets mode: +v eiro
masak SmokeMachine: I'm very vague on the details of that one. it needs to be implemented and tried out in practice. 19:07
SmokeMachine: for a long time it was "magically turn each named match in the regex into an argument to the macro invocation"
SmokeMachine: now I'm leaning towards "if the macro has an `is parsed`, then there's an extra `match` parameter", which is more boring and a bit less reachable, but also maybe more predictable 19:08
SmokeMachine hum... thanks
19:08 hami joined, p6bannerbot sets mode: +v hami
epsilonphase So... the idea is that macro Term:reduce introduces a multimacro(?) which is resolved at compile time specifically for static invocations where the arguments are fixed in advance, then recursively applies the macro to each argument, turning [+] 1 2 3 4 into 1+2+3+4? 19:08
masak there's also a bit of a design hole (in 007) where the actions are in Perl 6. 19:09
epsilonphase: modulo syntax, yes.
timotimo masak: have you ever tried some of the microbenchmarks we sometimes pass around for perl6? do you know if you reach nqp levels of speed with a little care?
masak epsilonphase: in 007, it'd be spelled `[+](1, 2, 3, 4)`; the macro comes across as a term with a value that's a function
eiro ok people: i have the give away from the french consulate of edimburgh. i'll be home tomorrow :)
masak timotimo: not nearly reaching any kinds of speed. 007 is dog slow :) 19:10
timotimo: heh, I/we are still *interpreting* the AST! o.O
timotimo oh, oops :)
eiro (for the ones who don't know the story: i lost my id card at the airport after tpcig, stuck in scotland) 19:11
(there are much worse places to be stuck in: scotland is great)
timotimo still lots of trouble, whew :( 19:12
masak eiro: hugs and good luck
eiro masak, everything is fine now: i can go home tomorrow
masak, i lost my password but saw the /query. reply by mail 19:13
masak oki 19:14
moritz eeks, and glad to know it's turining out OK
hope you didn't miss too much at home
jmerelo eiro: congrats! 19:15
masak epsilonphase: the main takeaway is that the `+` inside the `[+]` is not just "the built-in infix:<+>", but it's whatever infix:<+> you have active when you're parsing that `[+]`. and that's a macro closure.
I recently found how the Dylan Reference Manual describes all this, and I love it 19:17
"This substitution preserves the meanings of names. In other words, each name inserted into the expansion from the macro call refers to the same binding that it referred to in the call, and each name inserted into the expansion from the macro definition refers to the same binding that it referred to in the definition."
"the meanings of names" is a _much_ better term than anything I've used so far
19:17 jmerelo left
masak source: opendylan.org/books/drm/Macros_Syntax 19:18
epsilonphase That's pretty neat. Dylan's on my list of languages I'd like to try out.
masak yeah, same.
19:18 maettu joined
masak if I understand correctly, Dylan was first created with Lisp/sexpr syntax, but later it was decided that it should have more Algol-ish syntax 19:19
19:19 p6bannerbot sets mode: +v maettu
epsilonphase Ot 19:20
It is lisp in pascal, from what I've heard.
19:29 [particle] left 19:30 [particle] joined, gfldex joined 19:31 p6bannerbot sets mode: +v [particle], p6bannerbot sets mode: +v gfldex 19:34 jast left 19:37 jast joined 19:38 p6bannerbot sets mode: +v jast 19:39 hami left 19:43 lizmat joined 19:44 p6bannerbot sets mode: +v lizmat 19:46 kerframil joined, p6bannerbot sets mode: +v kerframil 19:47 kerframil left 19:53 [Coke]_ joined, [Coke]_ left, [Coke]_ joined, p6bannerbot sets mode: +v [Coke]_ 19:54 p6bannerbot sets mode: +v [Coke]_, lizmat_ joined 19:55 p6bannerbot sets mode: +v lizmat_, m0ltar left, a3r0 left, [Coke] left, lizmat left, a3r0 joined, Avi joined, p6bannerbot sets mode: +v Avi 19:56 m0ltar joined, p6bannerbot sets mode: +v a3r0, Avi is now known as Guest23430
Guest23430 help 19:56
19:56 p6bannerbot sets mode: +v m0ltar
timotimo hello avi 19:57
what can we do for you today?
Guest23430 just checking out the irc
19:57 benchable6 left, releasable6 left, bloatable6 left 19:58 bloatable6 joined, releasable6 joined, benchable6 joined
timotimo cool. we got lots of fun irc bots to play with, and many friendly people 19:58
19:58 undersightable6 left
timotimo m: say "he" ~ "l" x 2 ~ "o" 19:58
camelia hello
Guest23430 where is the baseline Rakudo star documentation stored?
19:58 squashable6 left, reportable6 left, p6bannerbot sets mode: +v bloatable6, p6bannerbot sets mode: +v releasable6 19:59 p6bannerbot sets mode: +v benchable6
timotimo github.com/perl6/doc/ - i think you mean this? 19:59
Guest23430 thank-you! 20:00
timotimo no problem!
every page on docs.perl6.org also has a direct link to the source file at the bottom i think
20:03 [particle] left
masak Guest23430: hello avi 20:04
Guest23430: enjoy #perl6 :)
20:05 [particle] joined 20:06 p6bannerbot sets mode: +v [particle]
timotimo dinnertime! TTYL 20:07
20:08 mephinet left 20:09 grumble left, gurmble joined, p6bannerbot sets mode: +v gurmble, gurmble is now known as grumble 20:10 mephinet joined, p6bannerbot sets mode: +v mephinet 20:22 [particle]1 joined 20:23 p6bannerbot sets mode: +v [particle]1, [particle] left 20:25 lizmat joined, p6bannerbot sets mode: +v lizmat
lizmat waves from Tyndrum 20:26
yoleaux 15:03Z <brrt> lizmat: we are seeing travis CI problems on OS X, and I don't have OS X, so maybe you could have a look?
lizmat (switched to 4G as the hotel Wifi is apparently over satellite and very latent)
.tell brrt if this is about t/spec/S32-io/file-tests.t, then yes it fails on MacOS 20:27
yoleaux lizmat: I'll pass your message to brrt.
20:28 lizmat_ left, kerframil joined, p6bannerbot sets mode: +v kerframil 20:30 molaf_ joined, molaf left
lizmat weekly: dev.to/jj/perl-is-perl-46cm 20:30
notable6 lizmat, Noted!
20:30 p6bannerbot sets mode: +v molaf_ 20:31 fake_space_whale left
lizmat weekly: dev.to/scimon/my-first-perl-conference-2j6d 20:35
notable6 lizmat, Noted!
20:42 lgtaube joined 20:43 p6bannerbot sets mode: +v lgtaube, pmurias left 20:55 reportable6 joined, undersightable6 joined, squashable6 joined 20:56 p6bannerbot sets mode: +v reportable6, p6bannerbot sets mode: +v undersightable6, p6bannerbot sets mode: +v squashable6 21:02 skids left 21:03 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke 21:04 MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke
lizmat notable6: weekly 21:23
notable6 lizmat, 11 notes: gist.github.com/fcd6ead769ea84b403...c240c09843
21:30 itaipu left 22:07 kerframil left 22:14 koto joined 22:15 koto left, koto joined 22:16 p6bannerbot sets mode: +v koto 22:17 sena_kun left 22:23 koto is now known as sena_kun 22:38 Ven` joined 22:39 p6bannerbot sets mode: +v Ven` 22:46 sotona left 22:47 sotona joined 22:48 p6bannerbot sets mode: +v sotona 22:51 uzl joined 22:52 sotona left, p6bannerbot sets mode: +v uzl
uzl Hey, #perl6! 22:54
m: class Foo { method greet() { say self.^name(); } }; say Foo.new.greet(); 22:55
camelia Foo
True
uzl m: class Foo { method greet() { say self.^name(); } }; Foo.new.greet();
camelia Foo
uzl m: class Foo { method greet($obj:) { say $obj.^name(); } }; Foo.new.greet(); 22:56
camelia Foo
uzl Is using a named invocant syntactic sugar to just use self instead? What additional advantages does using a named invocant provide? 22:58
doc => docs.perl6.org/language/objects#Cl...ce_methods
22:58 Ven` left 23:03 |oLa| left
uzl m: class Foo { method greet(::?CLASS:D $me:) { say $me.^name(); } }; Foo.new.greet(); 23:03
camelia Foo
uzl m: class Foo { method greet(::?CLASS:D :) { say self.^name(); } }; Foo.new.greet();
camelia Foo
23:05 lichtkind left
jnthn uzl: The only reason I'd do it is to add a :D or :U constraint 23:08
Oh, or if I wanted an rw invocant
vrurg AFAIK, there is no way to have a tempdir which would be autoremoved upon existing a scope. Am I right? 23:09
23:19 jast left
uzl jnthn: Great! Yeah, I just wanted to make sure that I wasn't losing some functionality by not having it explicitly defined. 23:22
Thanks!
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/08/20/...m-tyndrum/
yoleaux 21:45Z <brrt> lizmat: it's not, it's about the NQP build failure because git
b2gills vrurg: You could add a LEAVE phaser that deletes the dir. 23:23
23:23 jast joined, p6bannerbot sets mode: +v jast
uzl lizmat: Wow, that was fast! Feeling better from the cold? It was a cold, right?! 23:24
lizmat yeah... :-)
vrurg b2gills: sure I can, but what if it's a couple of locations in the code? What if it's several temps?
Would be solvable if its possible to install own LEAVE for a block. 23:25
uzl :-) !
23:27 sena_kun left
b2gills It may be possible to auto-install a phaser with a macro, but macros are currently experimental. 23:27
jnthn vrurg: Just write some sub with-temp-file(&code) { my $temp-file = ...; code($temp-file); LEAVE unlink $temp-file; } and then use it as with-temp-file -> $file { ... } 23:28
vrurg jnthn: The solution so far, perhaps. Thanks! 23:30
timotimo lizmat++ # weekly is good 23:31
lizmat goes off to try to find the (small) bed she's going to sleep in tonight
23:34 lizmat left 23:50 uzl left 23:58 sotona joined, p6bannerbot sets mode: +v sotona