»ö« 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 httpbin.org/ - this is a site that allows you to ask for specific responses of different kinds, good for seeing what you're sending for example 00:00
perlBird figured I'd do in perl, cause, you know, whipitupitude
timotimo sure :)
perlBird oh excellent that could be usefull
timotimo perhaps the target server actually wants form-data/urlencoded! :P
perlBird it specifies a json payload 00:01
but that very well could be the case
timotimo it could be absolutely terrible in any amount of ways :D 00:02
because it's the web, and the web is like that
perlBird i do love that about the web
timotimo first you use whipuptitude to implement what the API docs or specification specify 00:03
then you use manipulexity to work around all the bugs in the spec and implementation :D
perlBird aint no jargon like perl6 jargon cause perl6 jargon have fun with words 00:04
timotimo i haven't been part of the perl5 world, but i think a lot of the spirit was already alive and well there :)
perlBird tru tru. I just got into playing with perl6, mostly cause my boss was telling me the ridiculosity you can perform with whipitupified perl 00:05
timotimo but yes, we do love puns
oh, that's cool! :)
perlBird it's been fun so far 00:06
I like a language that's basically silly putty, and perl seems to allow for that
timotimo "silly" surely applies :D :D
00:06 AlexDaniel left 00:08 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel
TimToady
.oO(Perl golf is putty...)
00:09
perlBird truely! 00:10
timotimo ah, because just choosing perl puts you on the green already? :)
00:10 MasterDuke_ joined, p6bannerbot sets mode: +v MasterDuke_ 00:11 chenyf joined, p6bannerbot sets mode: +v chenyf
TimToady well, it also takes drive, and a willingness to iron out problems 00:11
perlBird say "\c[Smiling Face with Sunglasses]"
evalable6 😎
timotimo i'm so thankful for the caddies who helped me get this far 00:12
MasterDuke_ but is the experience really up to par?
TimToady don't pitch a fit :P
MasterDuke_ hey, i like to chip in where i can 00:13
perlBird so far it's been a hole-in-one
timotimo TBH, sometimes i'm so enthusiastic and ecstatic that i feel like a little Birdie
perlBird MasterDuke had to wedge himself in there for sure :D
00:13 MasterDuke left
MasterDuke_ what can i can say? perl makes me fly like an eagle 00:14
00:14 MasterDuke_ is now known as MasterDuke
TimToady retreats to his bunker 00:14
00:14 MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 00:15 lizmat left, chenyf left
perlBird when you pun hard enough on a lang that the creator of said lang holes himeself up, you can say you've had a good day, I think 00:17
00:17 pecastro left 00:18 Khisanth left
timotimo :3 00:19
00:19 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 00:22 lucasb left 00:23 mcmillhj left
buggable New CPAN upload: AttrX-Mooish-v0.4.11.tar.gz by VRURG modules.perl6.org/dist/AttrX::Mooish:cpan:VRURG 00:24
00:31 Khisanth joined, p6bannerbot sets mode: +v Khisanth 00:32 mcmillhj joined 00:33 p6bannerbot sets mode: +v mcmillhj 00:36 mcmillhj left 01:03 mcmillhj joined 01:04 p6bannerbot sets mode: +v mcmillhj 01:08 mcmillhj left 01:19 mcmillhj joined 01:20 p6bannerbot sets mode: +v mcmillhj 01:23 mcmillhj left 01:37 chenyf joined, p6bannerbot sets mode: +v chenyf 01:46 lindylex joined 01:47 p6bannerbot sets mode: +v lindylex 01:49 mcmillhj joined 01:50 p6bannerbot sets mode: +v mcmillhj 01:54 mcmillhj left 02:00 lichtkind left
perlBird hey, I'm having this weird thing where calling flat or 02:18
| on a nested array [[1,2,3],[4,5,6]] just returns ([[1,2,3],[4,5,6]]) 02:20
Now I get the feeling that's on purpose and I'm not calling the right stuff, but
what should I be doing
lookatme_q m: dd |[[1,2,3],[4,5,6]] 02:22
camelia Array element = $[1, 2, 3]
Array element = $[4, 5, 6]
02:23 mcmillhj joined 02:24 p6bannerbot sets mode: +v mcmillhj
lookatme_q perlBird, so what do you want to do ? 02:25
perlBird I'd like to return an array of [1,2,3,4,5,6] in this case
,welll heck not i gotta go anyway 02:28
perlawhirl if you have an array like [[1,2,3],[4,5,6]], how is it being created. typically you can flatten it while you create it
02:28 mcmillhj left
perlawhirl you shouldn't really need a 'flatten' function, but if you want, this will do 02:28
m: sub flatten($l) { gather $l.deepmap(*.take) }; say flatten ([[1,2,3],[4,5,6]])
camelia (1 2 3 4 5 6)
02:32 perlBird left
geekosaur surely thats' concatenate 02:32
and you misunderstand |, it flattens *upward* not downward 02:34
it interpolates its parameter into the container it is in directly. so |[[1,2,3],[4.5.6] willstill give you the sublists, but as elements of the outer list 02:35
m: say [1,2,3,|[[4,5,6],[7,8,9]],10]
camelia [1 2 3 [4 5 6] [7 8 9] 10]
geekosaur m: say [1,2,3,[[4,5,6],[7,8,9]],10]
camelia [1 2 3 [[4 5 6] [7 8 9]] 10]
geekosaur "outward" vs. "inward" is probably better description 02:36
02:53 mcmillhj joined 02:54 p6bannerbot sets mode: +v mcmillhj 02:58 mcmillhj left 03:06 mcmillhj joined 03:07 p6bannerbot sets mode: +v mcmillhj 03:11 mcmillhj left 03:13 ccc_ joined 03:14 p6bannerbot sets mode: +v ccc_
ccc_ m: [2,0,1].grep({say $_;False}, :k) 03:15
camelia 2
0
1
ccc_ m: [2,0,1].grep({say $_;False}, :kv) 03:16
camelia 2
0
1
ccc_ m: [2,0,1].grep({say $_;False}, :p)
camelia 2
0
1
ccc_ So the matcher only ever gets the value, the options to grep juse apply to the output?
03:35 ccc_ left 03:38 mcmillhj joined 03:39 p6bannerbot sets mode: +v mcmillhj 03:41 ponbiki joined 03:42 p6bannerbot sets mode: +v ponbiki 03:43 mcmillhj left 04:05 mcmillhj joined 04:06 p6bannerbot sets mode: +v mcmillhj 04:11 mcmillhj left 04:19 Xliff_ joined 04:20 p6bannerbot sets mode: +v Xliff_ 04:22 MasterDuke left, Xliff left, Xliff joined, molaf joined 04:23 p6bannerbot sets mode: +v Xliff, p6bannerbot sets mode: +v molaf, Xliff_ left 04:24 mcmillhj joined 04:25 p6bannerbot sets mode: +v mcmillhj 04:29 mcmillhj left 04:30 vrurg left 04:32 vrurg joined, p6bannerbot sets mode: +v vrurg 04:37 Herby_ left 04:48 mcmillhj joined 04:49 p6bannerbot sets mode: +v mcmillhj 04:54 mcmillhj left 05:03 vrurg left 05:08 mcmillhj joined 05:09 p6bannerbot sets mode: +v mcmillhj 05:12 Hotkeys joined, p6bannerbot sets mode: +v Hotkeys 05:13 mcmillhj left 05:24 graphene left 05:25 molaf left 05:26 graphene joined, p6bannerbot sets mode: +v graphene 05:27 domidumont joined 05:28 p6bannerbot sets mode: +v domidumont
chenyf good afternoon! 05:29
lindylex Greetings 05:32
05:41 mcmillhj joined 05:42 p6bannerbot sets mode: +v mcmillhj 05:46 mcmillhj left 05:53 mcmillhj joined 05:54 p6bannerbot sets mode: +v mcmillhj 05:55 rindolf joined 05:56 rindolf left 05:58 mcmillhj left 05:59 rindolf joined 06:00 p6bannerbot sets mode: +v rindolf 06:20 domidumont left 06:22 mcmillhj joined 06:23 p6bannerbot sets mode: +v mcmillhj 06:27 mcmillhj left 06:36 mcmillhj joined 06:37 p6bannerbot sets mode: +v mcmillhj 06:41 mcmillhj left 06:44 jsimonet left 06:46 sauvin joined, p6bannerbot sets mode: +v sauvin
El_Che Am I a bad person because the formatting on "Learning Perl 6" makes me uneasy? :) 06:47
06:48 aindilis left 06:49 aindilis joined 06:50 p6bannerbot sets mode: +v aindilis
lindylex El_Che : I am big fan of Think Perl 6_ 06:58
07:06 lindylex left 07:13 leont joined, mcmillhj joined 07:14 p6bannerbot sets mode: +v leont, p6bannerbot sets mode: +v mcmillhj
tyil is the weekly delayed? :( 07:15
07:18 mcmillhj left 07:25 graphene left, domidumont joined 07:26 p6bannerbot sets mode: +v domidumont 07:27 graphene joined, p6bannerbot sets mode: +v graphene 07:29 dakkar joined 07:30 p6bannerbot sets mode: +v dakkar 07:34 laminowany joined 07:35 p6bannerbot sets mode: +v laminowany 07:38 mcmillhj joined 07:39 p6bannerbot sets mode: +v mcmillhj 07:40 leont left 07:41 psychoslave joined 07:42 p6bannerbot sets mode: +v psychoslave 07:43 mcmillhj left 07:47 lizmat joined, xinming left 07:48 p6bannerbot sets mode: +v lizmat 07:49 psychoslave left 07:55 mcmillhj joined 07:56 p6bannerbot sets mode: +v mcmillhj 08:00 mcmillhj left 08:01 xinming joined, p6bannerbot sets mode: +v xinming
tyil does Perl 6 have tail call optimization? 08:01
lizmat no, not afaik 08:02
breakfast&
masak the specification? I think it mentions something about tail calls. but not (automatic) tail call optimization. 08:03
08:03 albertferrico joined, p6bannerbot sets mode: +v albertferrico
masak right, `callsame` and `callwith` make tail calls. 08:04
so I guess the answer is "no, Perl 6 allows manual tail calls, but it's not optimized for you automatically"
tyil alright, thanks
masak I know TCO is cool to have, but it also has a "cost", implementation-wise. that's why EcmaScript 6 specifies that TCO should be made, but in practice, browser implementations still don't do that, 3 years after ES6 was released 08:07
08:07 domm joined
masak correction: Safari does. Edge, Firefox, Chrome don't. 08:07
08:08 p6bannerbot sets mode: +v domm
tyil someone in another channel asked 08:08
he seems to be of the opinion that you cant have a serious language without TCO
08:09 graphene left
geekosaur tempted to suggest you point them at haskell. tail cals are an aspect of imperative evaluation, not of graph reduction. 08:09
tyil he's a haskell user
masak tyil: with all due respect to that person and that opinion, it sounds like someone who has either not factored in that cost, or who has and is convinced that it's worth the cost 08:10
tyil masak: I dont know them personally, so I don't know in which category he falls
geekosaur and there are a lot fo new people who ask about tail calls alost mediately; someone is apparently teaching them that tail call elimination is magic pixie dust
masak tyil: I think it's not controversial to say that Haskell is quite a different language. evaluation semantics, for example, is quite different.
08:10 zakharyas joined
masak tyil: I 100% agree that *Haskell* would be worthless without TCO :P 08:10
08:11 graphene joined, p6bannerbot sets mode: +v zakharyas, p6bannerbot sets mode: +v graphene
masak geekosaur: dunno about magic pixie dust, but TCO is quite useful. there are some genuinely useful patterns that would just run you out of stack immediately if you tried them without TCO 08:12
08:12 domm left
masak so I'm not at all making the argument that it's an over-hyped feature. just that it's not easy to add after the fact. 08:12
it's one of those "cross-cutting" features
08:17 mcmillhj joined
albertferrico hello everyone 08:17
tyil hi :>
08:18 p6bannerbot sets mode: +v mcmillhj, domm joined 08:19 p6bannerbot sets mode: +v domm
albertferrico does anyone use CRO? 08:20
08:21 mcmillhj left
masak albertferrico: it sounds like you have a second question you're sitting on if someone says "yes" :) 08:23
albertferrico yep, hehehe 08:25
I want to use Cro as a server and router for a small personal project, but I need to serve dynamic pages with objects so I was wondering if someone can recommend some good ORM for Cro 08:27
08:28 Xliff_ joined, Ven` joined 08:29 p6bannerbot sets mode: +v Xliff_, p6bannerbot sets mode: +v Ven` 08:30 mcmillhj joined, robertle joined, Xliff left 08:31 p6bannerbot sets mode: +v mcmillhj, p6bannerbot sets mode: +v robertle 08:34 mcmillhj left 08:40 Ven` left 08:42 Ven` joined 08:43 p6bannerbot sets mode: +v Ven` 08:47 scimon joined, p6bannerbot sets mode: +v scimon
lookatme_q Where is the new weekly report ? 08:57
I am waiting for it all days :/ 08:58
lizmat lookatme_q: working on it right now...
spent more time in transit yesterday and was too tired to finish it last night
lookatme_q thanks lizmat++ 08:59
09:00 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj
tyil lizmat++ 09:02
I too was worried about
lizmat earlier today: [01:06:31] <+lizmat>PSA: due to extended travel time, the Perl 6 Weekly will be published in about 12 hours 09:03
tyil I was asleep at that time :(
09:04 mcmillhj left 09:07 zakharyas left, zakharyas joined 09:08 p6bannerbot sets mode: +v zakharyas
lizmat tyil: I was very close to that as well, and 15 mins prior to that, behind the wheel still :-) 09:08
tyil did you at least get a good night's rest/
?
lizmat yeah, mostly 09:10
:-)
tyil :D
lizmat can't beat a night's rest in one's own bed
09:15 yoleaux left, dpk left 09:32 dpk joined 09:33 p6bannerbot sets mode: +v dpk 09:36 Ven` left 09:50 laminowany left
Geth doc: 7d40c87080 | (JJ Merelo)++ | doc/Language/operators.pod6
Changes anchors and reflows
10:01
synopsebot Link: doc.perl6.org/language/operators
10:04 zakharyas left 10:05 zakharyas joined, p6bannerbot sets mode: +v zakharyas 10:06 zakharyas left 10:08 jroth joined, zakharyas joined, p6bannerbot sets mode: +v jroth 10:09 p6bannerbot sets mode: +v zakharyas
albertferrico can someone help with a doubt? In this module github.com/tony-o/perl6-db-orm-quicky it says 'Depends DBIish', does it mean that I need to install DBIish and after perl6-db-orm-quicky to make it work? 10:27
tadzik your package manager will do that by itself 10:29
since it's specified here: github.com/tony-o/perl6-db-orm-qui...A6.json#L7
10:31 kerframil joined, p6bannerbot sets mode: +v kerframil
albertferrico oh I see, tadzik thank you very much. So I could install perl6-db-orm-quicky and straight coding my model, and it will create the table for me, and then I can access the object, right? 10:31
I'm planning to play with perl6-db-orm-quicky and modules.perl6.org/dist/cro:cpan:JNTHN 10:32
to have a lite web app where I can have dynamic content 10:33
tadzik albertferrico: well, I don't know how the ORM works :) But you definitely don't need to install the deps manually 10:34
albertferrico great tadzik, thanks a lot for replying! 10:36
10:37 Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix ccc_: that's correct. You can use .kv/.pairs/.keys methods to convert the output prior to grepping stuff; e.g. m: [2,0,1].pairs.grep({say $_;False}, :p) 10:39
El_Che: no, you're not a bad person because of that.
timotimo ccc isn't here any more :(
Zoffix I know, but maybe they read the logs 10:40
timotimo ah
10:40 chenyf_ joined
Zoffix perlawhirl: FWIW that flatten function annihilates hashes: 10:41
m: sub flatten($l) { gather $l.deepmap(*.take) }; say flatten ([[1,2,3],{:42foo, :100bar}])
camelia (1 2 3 42 100)
10:41 telex left, p6bannerbot sets mode: +v chenyf_ 10:42 chenyf left, telex joined 10:43 p6bannerbot sets mode: +v telex
Zoffix perlBird: `flat` doesn't flatten containerized things. Since arrays containerize their elements by default ( perl6advent.wordpress.com/2017/12/02/ ), your inner arrays are containerized and aren't flattened. You often can avoid this sort of problems and the need to flatten everything by using more appropriate datatypes for your stuff, but if you do have to flatten it, just decont the stuff before the 10:44
flat call: `m: dd flat [[1,2,3],[4,5,6]]».<>`
10:44 Zoffix left 10:45 chenyf_ left
lizmat notable6: weekly reset 10:51
notable6 lizmat, Moved existing notes to “weekly_2018-09-11T10:51:36Z”
lizmat blogs.perl.org/users/damian_conway/...riday.html 10:52
10:55 zakharyas left
moritz is going to see Damian Conway tonight in Erlangen 11:03
timotimo ooh, es gibt ja so viel wissenswertes über erlangen!
11:10 yoleaux joined, ChanServ sets mode: +v yoleaux 11:11 p6bannerbot sets mode: +v yoleaux 11:20 Xliff_ left 11:30 chenyf_ joined, p6bannerbot sets mode: +v chenyf_ 11:43 Ven` joined 11:44 p6bannerbot sets mode: +v Ven` 11:51 ZzZombo left
dmaestro m: package TestD { role R { method foo(-->Int) {...} }; class C { has R $.delegate handles * is required; }; class D does R { has Int $.foo; }; }; my $d = TestD::D.new(:foo(2)); my $c = TestD::C.new(delegate => $d); say $d.foo; say $c.foo 11:59
camelia 2
2
dmaestro Can anybody take a look at this issue? Can't figure out what I (might) be doing wrong here ... github.com/rakudo/rakudo/issues/2269 12:00
Loading from a library file doesn't work like the inline code above - throws an error "Cannot invoke this object" 12:02
Any chance someone can duplicate it? 12:07
12:08 kerframil left 12:12 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo
scimon If you put the code into a script rather than on the command line where does it error? (Creating $d, Creating $c, doing $d.foo, doing $c.foo ? ) 12:15
I've had similar issue recently that seemed to be related to the JIT compiler (another thing if you add no precompilation to the class file does it still error?) 12:16
12:19 zakharyas joined
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/09/11/...of-damian/ 12:19
12:19 p6bannerbot sets mode: +v zakharyas
moritz lizmat++ 12:19
12:20 graphene left 12:22 graphene joined 12:23 p6bannerbot sets mode: +v graphene
dmaestro scimon: I'll try those ... 12:37
12:38 albertferrico left
dmaestro Cannot invoke this object (REPR: Null; VMNull) at SETTING::src/core/traits.pm6:439 (/usr/local/opt/rakudo-star-2018.06/share/perl6/runtime/CORE.setting.moarvm:) from gen/moar/Metamodel.nqp:3281 (/usr/local/opt/rakudo-star-2018.06/share/nqp/lib/Perl6/Metamodel.moarvm:find_method_fallback) from gen/moar/Metamodel.nqp:1123 (/usr/local/opt/rakudo-star-2018.06/share/nqp/lib/Perl6/Metamodel.moarvm:find_method) 12:42
Looks like it's looking up the method, trying fallback (!) and failing.
scimon: How do I disable precomp? 12:43
12:44 spycrab0 joined, p6bannerbot sets mode: +v spycrab0
lizmat dmaestro: no precompilation; 12:45
12:49 dmaestro_ joined, p6bannerbot sets mode: +v dmaestro_, dmaestro left
dmaestro_ yes, 'no precompilation' in the loaded module fixes the error. 12:49
12:52 mcmillhj joined 12:53 dmaestro_ left, p6bannerbot sets mode: +v mcmillhj 12:56 cjkinni joined, p6bannerbot sets mode: +v cjkinni 13:04 zakharyas left 13:07 ccc joined, p6bannerbot sets mode: +v ccc
ccc I've been trying to find good examples of using pod to document my exported objects, and it seems that pod isn't used at all in rakudo core. 13:09
Is the intermixed code and documentation style that pod was designed for not used in practice anymore? 13:10
If it is in fact still used, could someone point me to a good example of its use in an existing module? 13:13
13:13 severus joined, p6bannerbot sets mode: +v severus 13:14 severus is now known as Guest39525
moritz ccc: it's not used inside rakudo because the documentation isn't rakudo specific 13:14
13:14 Guest39525 left
ccc I mean the perl6 core modules 13:14
Set.pm6 etc. 13:15
moritz and the second thing is that we want commits to docs to be done pretty freely, but to rakudo we have much stricter review 13:16
yes, I'm also talking about those
13:16 vrurg joined
moritz the documentation lands on docs.perl6.org/ which is not rakudo specific 13:16
so why should the docs be in the rakudo code base?
13:17 p6bannerbot sets mode: +v vrurg
ccc ok then, but where could I find a good example of pod usage? 13:17
the modules I've looked at had no pod or put all the pod at the end 13:18
or in a separate file
13:19 lucasb joined 13:20 p6bannerbot sets mode: +v lucasb
moritz no, sorry. I hope somebody else has good examples 13:25
lucasb let's grep "#=" and "#|" in the modules code base :) 13:28
13:28 zakharyas joined
ccc well, I did grep '^=' and didn't come up with much; thus my question 13:29
13:29 p6bannerbot sets mode: +v zakharyas
ccc is "#=" a pod alias? 13:29
lucasb it's a hash "#", if you want intermixed
I have zero experience with it, but I think it's a POD comment 13:30
ccc /docs.perl6.org/language/pod doesn't mention this
lucasb looking for some examples, but github seems instable right now 13:31
ccc so it seems pod has been abandoned for intermixed usage
lucasb *unstable
ccc is the community moving to perhaps have the documentation in special comments like java or go? 13:34
13:34 molaf joined 13:35 p6bannerbot sets mode: +v molaf, aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh 13:36 p6bannerbot sets mode: +v aborazmeh
ccc or is this just a case that people operating at the frontier don't like doing documentation 13:37
13:37 john_parr left 13:38 Ven` left 13:39 pmurias joined, p6bannerbot sets mode: +v pmurias
lizmat ccc: perhaps, or maybe just not enough time 13:40
13:50 Ven` joined, p6bannerbot sets mode: +v Ven` 13:55 ccc left 13:57 reu left 14:01 reu joined, p6bannerbot sets mode: +v reu 14:02 xq joined, p6bannerbot sets mode: +v xq 14:06 reu left 14:10 xq left, reu joined, p6bannerbot sets mode: +v reu 14:13 kerframil joined, p6bannerbot sets mode: +v kerframil 14:15 reu left 14:17 reu joined, p6bannerbot sets mode: +v reu 14:24 grumble left 14:26 grumble joined, p6bannerbot sets mode: +v grumble 14:27 aborazmeh left
timotimo using #| and #= is for attaching pod to an object so that it becomes available via the .WHY accessor 14:43
AlexDaniel timotimo: geez I hate that syntax so much :D 14:47
in fact I'd normally write #↓ and #← even though it does not “work”
timotimo heh. 14:48
make a slang for that ;)
AlexDaniel 🤷
if #| and #= were supposed to paint arrowy things then maybe we can just add the it right in 14:49
as per github.com/rakudo/rakudo/wiki/save...from-ascii
.oO(wow that page still exists)
TimToady: what's the logic behind #| and #= ? 14:50
I mean in the choice of symbols
lucasb well, there are limited ascii punct chars 14:52
tadzik heh, I remember implementing #= as part of my gsoc, but when afterwards #| was brought up I refused to do it because I considered it ugly :P 14:53
14:53 undersightable6 joined, ChanServ sets mode: +v undersightable6
Geth doc: 12de1c212d | (Itsuki Toyota)++ (committed using GitHub Web editor) | resources/i18n/jp/README.jp.md
Update README.jp.md
14:53
AlexDaniel method cast(#|{ A spell } Spell $s)
AlexDaniel is looking at design speculations 14:54
so in that case ↑ the | symbol is somewhat… meaningless? :)
14:54 p6bannerbot sets mode: +v undersightable6
AlexDaniel ok then #↓ and #← will be misleading. Alright then… 14:55
unless #→ and #↑ are also added of course 14:56
which is… uh… whatever…
14:56 cognominal-p6 joined 14:57 p6bannerbot sets mode: +v cognominal-p6 15:02 mephinet left, mephinet joined, p6bannerbot sets mode: +v mephinet 15:03 psychoslave joined 15:04 p6bannerbot sets mode: +v psychoslave
Geth doc: 28ca78f1cc | (Will "Coke" Coleda)++ | resources/i18n/jp/README.jp.md
whitespace
15:06
15:09 mephinet left 15:10 cognominal-p6 left, reu left, mephinet joined, p6bannerbot sets mode: +v mephinet, cognominal-p6 joined 15:11 p6bannerbot sets mode: +v cognominal-p6 15:12 lizmat left, scimon left 15:13 scimon joined, lizmat joined, p6bannerbot sets mode: +v scimon 15:14 p6bannerbot sets mode: +v lizmat, reu joined, p6bannerbot sets mode: +v reu, psychoslave left 15:15 psychoslave joined, p6bannerbot sets mode: +v psychoslave 15:17 molaf left 15:18 grondilu joined, p6bannerbot sets mode: +v grondilu 15:19 psychoslave left, psychoslave joined 15:20 p6bannerbot sets mode: +v psychoslave 15:21 mephinet left 15:23 mephinet joined, p6bannerbot sets mode: +v mephinet 15:25 Voldenet joined, Voldenet left, Voldenet joined, p6bannerbot sets mode: +v Voldenet 15:26 domidumont left, p6bannerbot sets mode: +v Voldenet 15:49 psychoslave left, psychoslave joined 15:50 p6bannerbot sets mode: +v psychoslave 15:53 Voldenet left, Voldenet joined, Voldenet left, Voldenet joined, p6bannerbot sets mode: +v Voldenet 15:54 psychoslave left, p6bannerbot sets mode: +v Voldenet, psychoslave joined 15:55 p6bannerbot sets mode: +v psychoslave 15:57 pat_js joined 15:58 p6bannerbot sets mode: +v pat_js
TimToady AlexDaniel: the first thing to understand about #| and #= is that, from observation of how people actually use inline docs in most languages that support them, precomments are usually long paragraphs, and postcomments are usually short descriptions that fit on the same line 16:09
so other than the simple fact that you don't want the symbols confusable with each other, the two constructs also operate a bit different psychologically 16:10
AlexDaniel TimToady: ok, so why | and = ? 16:11
TimToady so in the case of #=, we picked something that looks like an assignment operator, because assignment operators take some value on the right and use it to diddle something on the left
in the case of #|, you don't want to have to visually reparse the opener every time you go to another line, so you want something that looks like a fake left margin
16:12 psychoslave left
TimToady the arrows are cute, but a bit distracting from the purpose of documentation, insofar as they point to the mechanism rather than just being functors, much like the different between C's switch/case vs Perl's given/when 16:13
16:15 psychoslave joined 16:16 p6bannerbot sets mode: +v psychoslave, psychoslave left
TimToady and fwiw, people are also used to = setting up a kind of two-column table in an algebraic proof 16:17
16:17 psychoslave joined
TimToady this is that, and this is that, and this is that... 16:17
AlexDaniel alright, I see
16:17 p6bannerbot sets mode: +v psychoslave
TimToady interestingly, some languages use ← for assignment anyway 16:18
AlexDaniel a bit of a stretch though for, say, a beginner trying to remember which is which… but maybe proper documentation can help
TimToady but then it's really distinguishing operational assignment from equality
but the most important point is that the two symbols function differently in mental parsing: with #= you must interrupt the flow on every line with a "THIS is really THAT" thought, or you misparse, and while you can and should line up the #= to help the visual isolation, each one must be considered separately 16:23
with #|, the mental parsing goes two different ways, depending
if you interested in the paragraph, as I mentioned above, you want the lined up #| symbols to disappear as a fake left margin 16:24
but if you're not interested in the paragraph, you want something that drops you straight through to the actual code below
16:25 psychoslave left
AlexDaniel github.com/perl6/doc/issues/2305 16:25
16:25 psychoslave joined
TimToady and I would submit that a vertical row of | is easier to follow down than a vertical row of ↓ 16:25
16:26 p6bannerbot sets mode: +v psychoslave
AlexDaniel and a column of #= should be followed up, right? 16:26
TimToady yes, there's a sort of one-to-one correspondence contract built into #= that isn't built into #| 16:27
16:27 psychoslave left, rfold joined
TimToady so trying to teach them as the identical thing just facing different directions is slightly misguided, in my opinion 16:28
16:28 p6bannerbot sets mode: +v rfold
AlexDaniel not sure I understood that last part. I was thinking about something like this: gist.github.com/AlexDaniel/f5e267f...500d2afaac 16:28
TimToady ah, yes, you can use multiple #= for line overflow, sure 16:29
AlexDaniel #→{ A spell } will definitely look a bit weird though 16:30
TimToady so in that sense it's similar to #|
16:30 dakkar left
AlexDaniel same with #↑ tbh… OK 16:30
TimToady tbh, I'd be tempted to restrict #| to only be beginning of line
culturally, if not syntactically 16:31
16:31 Ven` left 16:33 psychoslave joined, p6bannerbot sets mode: +v psychoslave
TimToady most people find small precommentary to be irritating in actual conversation, and would rather hear the basic nub of what you're saying before you try to modify what you're saying 16:34
"Get to the point" is what you get if you try to do modifications to your thought before you actually say the thought 16:35
AlexDaniel heh :)
TimToady so prefaces need to be easily skippable, which is why we generally put them in a separate section before Chapter 1 :) 16:36
16:38 lucasb left
TimToady to summarize, my thinking on #| and #= is driven primarily by what the human reader is doing, not by what the computer is doing 16:38
16:38 scimon left
AlexDaniel but I love to point at things! ↑ 16:39
TimToady (or the human writer, who is one of those people we love to torment :) 16:40
AlexDaniel though maybe I should be using 👆 :)
anyway, that settles it for now, thanks 16:41
16:45 Xliff joined 16:46 p6bannerbot sets mode: +v Xliff
Xliff Is there a way to set delegation at run-time? 16:46
Or to make a delegate object handle all of the methods of the delegate class without specifying all of the method names using the handles trait?
16:47 psychoslave left, psychoslave joined 16:48 p6bannerbot sets mode: +v psychoslave
timotimo you can always mix in a custom-made role at run time, or you can have a FALLBACK method that handles handles for you 16:48
16:59 chenyf_ left 17:05 pat_js left
vrurg Xliff: I have a construct like this in my code: handles [|@Logger::level-methods, |<log logf>] – but it's not exactly run-time as @level-methods is a constant with predefined method names. But could serve a food for thought. 17:08
Xliff OK, so the thought is... how do I add methods of an entire class, without listing them all. 17:10
Hmmm...
If it is just a delegate class, I guess I could fill in an array with a BEGIN phaser.
our @methodnames = Class::^methods(:local).map(*.^name) 17:11
vrurg Xliff: Make sure that the class was already composed. I would say CHECK or INIT are better candidates for this, but can't tell exactly without prior testing. 17:14
Basically, if you're worried about perfomance matters of FALLBACK you could manually generates the delegates and install them on your class. 17:15
method FALLBACK($name) { my &m = method ( |c ) { self.handler."$name"(|c) }; self.^add_method( $name, &m ); self.&m( |c ) } 17:17
17:17 psychoslave left 17:18 psychoslave joined 17:19 p6bannerbot sets mode: +v psychoslave 17:22 psychoslave left, psychoslave joined
Xliff vrurg: That's a good idea! Thanks!! 17:22
vrurg Xliff: welcome!
17:23 p6bannerbot sets mode: +v psychoslave
Xliff vrug: However, I would like to avoid the situation where $name did not exist in self.handler 17:23
But still.... good stuff!
vrurg I gave you a sceleton, the rest is up to you. For example, you could do FALLBACK( $name where self.handler.^can( * ), |c ) BTW, I forgot about |c in the signature of the first example. 17:24
Xliff Ooh! Nifty! 17:25
Is ".^can( * )" equiv to ".^can($name)"? I'm not well versed in WhateverCode 17:26
17:27 psychoslave left
geekosaur $name won't have a value at that opoint, the potential valeue is passed as a parameter and will b assigned to $name only if it passes the where check 17:27
17:27 psychoslave joined
Xliff Ah! Thanks. 17:28
vrurg Should be. I'm rather a newby too, so might do some mistakes in the syntax. If * doesn't work for you, then when { self.handler.^can( $_ ) } will for sure.
Xliff Ah! Excellent.
17:28 p6bannerbot sets mode: +v psychoslave
vrurg Another possible confusion you'll see with FALLBACL. If $name won't match the clause you'll get a confusing AUTOGEN-related error message. To avoid it it is better to have FALLBACK a multi method and have a more general version of it which will catch all the misses and do whatever you think is right to do about them. 17:30
SmokeMachine m: class A {method a {"a"}; method b {"b"}}; class B { has A $!a handles A.^methods>>.name }; say B.a; say B.b 17:31
camelia Cannot look up attributes in a B type object
in block <unit> at <tmp> line 1
SmokeMachine m: class A {method a {"a"}; method b {"b"}}; class B { has A $!obj-a handles A.^methods>>.name }; say B.a; say B.b
camelia Cannot look up attributes in a B type object
in block <unit> at <tmp> line 1
17:32 psychoslave left
SmokeMachine m: class A {method a {"a"}; method b {"b"}}; class B { has A $!obj-a handles A.^methods>>.name }; say B.new.a; say B.new.b 17:32
camelia a
b
17:32 psychoslave joined 17:33 p6bannerbot sets mode: +v psychoslave
SmokeMachine Xliff: ☝️ 17:33
17:35 psychoslave left
vrurg SmokeMachine: 👍🏻 The elegance in the nutshell... :) 17:36
17:36 itaipu joined
Xliff SmokeMachine++!!! 17:37
17:37 p6bannerbot sets mode: +v itaipu
Xliff That's exactly what I am looking for., 17:37
17:37 vrurg left
Xliff m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; }; class B { has A $!obj-a handles A.^methods>>.name.grep(* ne 'new'); method new { say "B"; }; ] ; say B.new.a; say B.new.b 17:39
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in binding to parameter '$expr'; expected Any but got A (?)
at <tmp>:1
Xliff m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; }; class B { has A $!obj-a handles A.^methods>>.name.grep({$_ ne 'new'}); method new { say "B"; }; ] ; say B.new.a; say B.new.b
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in binding to parameter '$expr'; expected Any but got A (?)
at <tmp>:1
Xliff m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; }; class B { has A $!obj-a handles A.^methods>>.name\; method new { say "B"; }; ] ; say B.new.a; say B.new.b
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in binding to parameter '$expr'; expected Any but got A (?)
at <tmp>:1
Xliff m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; }; class B { has A $!obj-a handles A.^methods>>.name.grep(* ne 'new'); method new { say "B"; }; }; say B.new.a; say B.new.b 17:40
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in binding to parameter '$expr'; expected Any but got A (?)
at <tmp>:1
17:41 molaf joined, graphene left, vrurg joined 17:42 p6bannerbot sets mode: +v molaf, p6bannerbot sets mode: +v vrurg 17:43 graphene joined, colomon left, p6bannerbot sets mode: +v graphene
Xliff m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; self.bless; }}; class B { has A $!obj-a handles A.^methods>>.name; method new { say "B"; self.bless; }; }; say B.new; say B.new.a; say B.new.b; 17:44
camelia B
B.new
B
a
B
b
SmokeMachine m: class A {method a {"a"}; method b {"b"}; method bla { say "WHEE" } }; class B { has A $!obj-a handles A.^methods>>.name; method bla { say "B" } }; say B.new.a; say B.new.b; B.new.bla # Xliff
camelia a
b
B
Xliff Excellent! So A.new isn't included.
m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; self.bless; }}; class B { has A $!obj-a handles A.^methods>>.name; }; say B.new; say B.new.a; say B.new.b;
camelia B.new
a
b
Xliff Yup
m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; self.bless; }}; class B { has A $!obj-a handles A.^methods>>.name; }; say A.new; B.new; say B.new.a; say B.new.b; 17:45
camelia WHEE
A.new
a
b
Xliff m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; self.bless; }}; class B { has A $!obj-a handles A.^methods>>.name; }; say A.new; say B.new; say B.new.a; say B.new.b;
camelia WHEE
A.new
B.new
a
b
SmokeMachine Xliff: is that what you want? 17:48
Xliff Close enough. I need to make sure BUILD initializes $obj-a, though.
m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; self.bless; }}; class B { has A $!obj-a handles A.^methods>>.name; submethod BUILD { $!obj-a = A.new; }; }; say A.new; say B.new; say B.new.a; say B.new.b; 17:49
camelia WHEE
A.new
WHEE
B.new
WHEE
a
WHEE
b
Xliff m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; self.bless; }}; class B { has A $!obj-a handles A.^methods>>.name; submethod BUILD { $!obj-a = A.new; }; }; say B.new.a; say B.new.b;
camelia WHEE
a
WHEE
b
Xliff m: class A {method a {"a"}; method b {"b"}; method new { say "WHEE"; self.bless; }}; class B { has A $!obj-a handles A.^methods>>.name; submethod BUILD { $!obj-a = A.new; }; method new { say "B"; self.bless; }; }; say B.new.a; say B.new.b; 17:50
camelia B
WHEE
a
B
WHEE
b
Xliff Yup. Exactly.
SmokeMachine m: class A {has $.val; method a {"a$!val"}; method b {"b$!val"}}; class B { has A:D $!obj-a handles A.^methods>>.name = A.new: :42val }; say B.new.a; say B.new.b
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable definition of type A:D requires an initializer
at <tmp>:1
------> 3"}}; class B { has A:D $!obj-a handles A7⏏5.^methods>>.name = A.new: :42val }; say
expecting any of:
17:50 zakharyas left
SmokeMachine m: class A {has $.val; method a {"a$!val"}; method b {"b$!val"}}; class B { has A:D $!obj-a = A.new: :42val handles A.^methods>>.name }; say B.new.a; say B.new.b 17:51
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3lass B { has A:D $!obj-a = A.new: :42val7⏏5 handles A.^methods>>.name }; say B.new.
expecting any of:
infix
infix stopper
TreyHarris After the flood of the past few days, I started to write a message to ToddandMargo on p6-l suggesting that as a new learner of Perl 6, they might want to... then I had a moment of recognition, "ToddandMargo?" and did a search--they've been sending messages to p6-l in the same form--"this is confusing I don't get it" since December 2015. Are they just trolling? 17:52
TimToady no, Todd just has a very different learning style from most folks 17:53
TreyHarris Some of the questions they asked in the most recent thread are literally the Subject lines of old messages
TimToady: hmm. Yes. It feels like they're reading a textbook going in alphabetical index order.
TimToady as someone on the verge of senility, I resemble that remark :) 17:54
Xliff Get 10 people. Determine their learinng styles. You'll discover that the number of styles is greater than the number of people.
TimToady yeah, it's almost as bad as borscht... 17:55
Xliff It would be worrisome if that number was less.
But just slightly.
TreyHarris Hey, I reimplemented 'wc' a couple days ago, so I resemble that remark too... I need a brain wash. But not a brainwash.
Xliff LOL! I almost feel into that trap last week, TreyHarris.
Except I wanted to use awk. So don't feel bad. 17:56
TimToady remembers the effort 20-mumble years ago to reimplement all the Unix commands in Perl...
TreyHarris Xliff: One of the astrophysicists at JPL tweeted a couple days ago that they did a websearch to see that the volume of a sphere is 4/3 pi r^3. So, yeah. 17:57
SmokeMachine psh?
Xliff I heard about that, TimToady.
TreyHarris: That reminds me. I need an xkcd dose.
TreyHarris TimToady: oh god, that was _brilliant_ as a learning exercise. Since pretty much everything I ever needed to do could be expressed as "this bit of that command and that bit of the other command" but where a shell pipeline was impractical.
I learned more about how to do proper stdio handling from looking at the "tail -f" reimplementation than anything else. People still get that wrong more often than they get it right, btw 17:58
(In every language.) 17:59
TimToady blames Pascal
TreyHarris Ugh, see the case of "Procedure v. Function". The Court was split and the case was remanded, as I recall. 18:00
TimToady Pascal got one thing right, which was one-pass parsing :)
Xliff TreyHarris: Was that Pascal vs. LISP?
(see! TimToady was right!) 18:01
TreyHarris Xliff: no, that was a cricket test match
It had to be cancelled after it continued into the time the next year's test match was supposed to begin.
Xliff TreyHarris: Who one? Or are they still playing?
18:01 jast left
TimToady
.oO(TimToady was right only after invoking Rule #2 at the turn of the millenium...)
18:01
Xliff Oh! I see.
TreyHarris: Now it would be interesting to see how that match would have played out if left to continue after December 31, 1999. 18:02
s/after/through/
TimToady Perl 5 broke the one-pass parsing rule in so many different ways...
18:03 jast joined
Xliff And Perl6 continues that tradition... and rightfully so. 18:03
TreyHarris TimToady: I recall a very drunken evening at a YAPC many years ago where a certain person on this channel did a fantastic monologue about your invoking Rule 34.
18:03 p6bannerbot sets mode: +v jast
Xliff What's Rule 34? 18:03
And where can I get a whole list?
TreyHarris Xliff: Google it, but don't say I didn't warn you. 18:04
Xliff I yam forewarned.
TreyHarris: xkcd.com/305/ 18:05
geekosaur there's also some repeats; the current discussion about sub vs. method and invocants came upa few months ago
it's not sticking
TreyHarris As I recall, it went something along the lines that the thing the Internet needed to _really_ get interested in Perl 6 development was... and so Rule 34 was invoked.
AlexDaniel O_O 18:06
TreyHarris: have you checked if their questions are answered in the documentation?
because if not, to me it doesn't matter if it's the same person repeating the question or a different one 18:07
Xliff sub_and_method_in_parallel.avi
AlexDaniel the problem is not in the person but in the docs
TreyHarris geekosaur: yup, that was what I saw in searching.
TimToady You can fool all of the people some of the time, and some of the people all of the time, but the docs are always wrong. 18:08
TreyHarris AlexDaniel: perhaps. I was thinking that maybe there should be a "legend" overlay in the corner of every doc page to give a quick reminder of signatures and links to further explication? It is all in the docs, but if one expects a signature to explain itself when you haven't learned how to read signatures, the docs kinda become impenetrable. 18:09
AlexDaniel TreyHarris: possibly. File a ticket and see if doc folks can figure out a way to do that
TreyHarris AlexDaniel: Like my position is "no, Language/Regex should not have a complete introduction to regexes"
TimToady it seems one should be able to find the tutorials from the references, and vice versa 18:11
TreyHarris TimToady++
TimToady what we can't assume is that everyone is going to parachute into the territory in the spot most conducive to their continued sanity 18:12
Xliff Solution: Use proper Portals. 18:13
18:13 mcmillhj left
TreyHarris I have learned that trying to learn a new language by seeking 1:1 mappings between concepts in the new language and a familiar language is the worst possible way to learn a language. Perhaps my first two languages being Haskell and Perl 4 gave me a head-start on that, but when I've needed to port things to a new language I've fallen back into that trap--it's never good. 18:13
TimToady people make the same mistake with natural languages, and with culture in general 18:14
.oO(I want a word-for-word translation of what St Paul said in King James English!)
18:15
even the word Word means different things in Greek vs English 18:16
TreyHarris Perl 6 is especially dangerous for this though, as I just mentioned on p6-l. Being able to create a "mutating method with rw arguments returning a possible Failure that throws exceptions". You _can_ find the 1:1 mapping of anything--it's just almost guaranteed to be incredibly ugly.
Hotkeys mhm, getting out of the translation mindset is an important step in learning a new natural language 18:17
though I think that's not *as much* of a problem with programming languages 18:18
TimToady well, it's fine for a path in, but most people eventually tune into shorter ways to say what they want due to natural Laziness
also, those who do not learn from history are doomed to have it repeated to them...
it takes a village to raise a programmer... 18:20
18:20 mcmillhj joined
Xliff That depends on who coded the village. 18:20
TreyHarris In college I had an Esperanto penpal from Germany, who wrote to me "Mi tracontinenttrajnvojagxos Orientaurbaurbo." ("I will be travelling across the continent by train to the eastern port city." He was writing German in Esperanto.
TimToady I coded this village. :P 18:21
18:21 p6bannerbot sets mode: +v mcmillhj
TimToady though I'm afraid it still has a few bugs... 18:21
TreyHarris It's not that they're bugs, it just DWIMs differently from WIM 18:23
AlexDaniel Hotkeys: but then, with no translation mindset whatsoever you may end up being unable to discuss some topics even in languages that you are proficient with 18:24
Xliff TimToady: I like this village! 18:25
TimToady My grandma used to start telling a joke, then give the punchline in low german. When asked for a translation, she'd say: It's not funny in English.
AlexDaniel Hotkeys: e.g. doing everything related to software development in English, but then somebody asks you a simple question in your first language
Xliff TimToady: Other villages, however, are not so welcoming to newcomers.
huf AlexDaniel: then you start mixing english into your first language until you get something you can use 18:26
and you'll just expect the other party to get with the program of course :D
AlexDaniel huf: that's if you understand the question…
huf well if they're using first-language it-slang then yeah, i probably wont
but that's why we dont do that :) 18:27
18:28 sauvin left
grondilu lernis esperanton de longe 18:29
TimToady Learning a new language is like a kid playing with tools of unknown power and danger. Someone's gonna get hurt, but we don't know who yet... 18:31
grondilu Hi all. What's the status of the JS port?
s/port/target/ 18:32
Xliff TimToady: Isn't that almost like science?
TimToady sure, which is why you stand back :)
Xliff \TimToady++
AlexDaniel pmurias: ↑ 18:33
Xliff wonders if JK Rowling played with Esperanto... it would explain a lot of the "magic" in Harry Potter.
TimToady if you really want to bend your mind, don't just learn another Indo-European langauge... 18:35
which arguably Esperanto is 18:36
TimToady picked to learn a language that actually uses reverse Polish, and I don't mean Polish backwards 18:37
grondilu The vocabulary is mostly latin, but I can vaguely see influences of oriental languages
grondilu admits his knowledge of oriental languages is limited though 18:38
Xliff Taichi in reverse is ChiTai
18:39 graphene left 18:40 lichtkind joined
TimToady in 日本語, the prepositions are all postpositions, and the main verb always comes at the end, not at or near the beginning 18:40
so you have to keep the stack in your head very differently from IE lanuages
grondilu Not related: I like Perl6 "Mix" structure, sadly I see nothing equivalent in other languages. And I'm not sure which word to use to search it.
18:40 p6bannerbot sets mode: +v lichtkind
TimToady sure, that's related to the earlier concept of "This concept doesn't map well into that language" :) 18:41
Hotkeys [iʃtjat]
taichi in reverse :v
grondilu I mean even if a language doesn't support it natively, I would expect a library to exist, but I have no idea how to look for it.
TimToady search for where rosettacode has Mix for the P6, then see what other languages call it? 18:42
maybe RC doesn't call for Mix much...
TreyHarris As a comp ling student, I had to take the entire CS sequence, the entire linguistics sequence, and three semesters each of three languages, one of which had to be non-Indo-European. Since I was part-time, that meant it was literally impossible to ever complete my degree without taking enormous gaps between language semesters--I maybe should have thought of that first. :-) 18:43
grondilu there is one task apparently
TimToady I'll bet most other languages use the term "weighted" in there somewhere
but we like our 3-letter type names a lot :)
grondilu nope, my bad.
TreyHarris grondilu: look at the "associative array/dictionary/hash" thing. People will swear mighily whichever one they learned is the "correct" name for it and the others are implementational or imprecise 18:45
TimToady we don't think "hash" is more correct, it's just shorter :)
TreyHarris TimToady: "People" != you
Uh...
grondilu a hash is not exactly a Mix, though.
TimToady one of the reasons language designers get along fine, but their followers always get into fights 18:46
TreyHarris For some sets of "people", a TimToady is not a subset.
TimToady for at least one set of people, TimToady is an improper subset 18:47
18:47 graphene joined 18:48 p6bannerbot sets mode: +v graphene
Hotkeys You'd probably have more luck with bags aka multisets 18:48
TreyHarris Hmm, now that we're firmly in Unicode-land, we could rename it a "haŝ", to keep the three-letter thing. Or a "haʃ".
18:48 graphene left
Hotkeys but Mixes are a pretty straight forward comrade to the bag 18:48
grondilu "multiset" sounds like a good try 18:49
TimToady some bag or multiset article or other might have an outbound cross reference
grondilu it only takes integer values, though. Not reals.
Hotkeys Real-valued multisets is apparently the name for a mix 18:50
18:51 graphene joined
grondilu is actually much more tired than he though. Goes to bed. 18:51
18:51 p6bannerbot sets mode: +v graphene
Hotkeys now I feel the itch to write an implementation of mixes in haskell 18:52
TreyHarris Hotkeys: Indexed data structures are so rarely useful in Haskell, in my experience. But a mix might be the exception. Interesting. A mix could be easily constructed and traversed with a zipper... could you just make it generally applicative? 18:54
TimToady so...what would a complex-values multiset be called in p6?
*valued
TreyHarris TimToady: Complex, as in real+imaginary complex?
18:54 pmurias left, xq joined, p6bannerbot sets mode: +v xq
TreyHarris A Mjx? 18:54
(pronounced "myiks") 18:55
lizmat
.oO( Commix )
TimToady a Mandel?
TreyHarris That would work better if Perl used j rather than i as the imaginary unit. 18:56
b2gills Confusing?
TimToady so we need something imaginary, I Img
Hotkeys Not sure TreyHarris, I'd have to have a think on it 18:57
or a try at implementing :P
TimToady we could, y'know, break the rule that says all such types have to be 3 letters, since this is, like, way out in the mathosphere 18:58
18:58 graphene left
TreyHarris (Am I the only one who freely switches between Cartesian coordinates, polar coordinates, and complex numbers when doing 2D graphics based on whatever the language library I have makes easiest? No rotation function? That's okay, I can turn the coordinates into complex numbers and multiply!) 18:58
TimToady and, in fact, we chose to spell out Complex for similar reasons 18:59
19:00 ggoebel_ left
TimToady huffman coding doesn't work if everything has to be short; I'm looking at you, APL 19:00
TreyHarris I find complex numbers ridiculously useful for things that have nothing to do with irreal mathematics.
19:00 cpage left
geekosaur I thik most people avoid it because the conversion errors become significant quickly 19:00
TimToady ooh, lunchtime, how'd that happen so quick? 19:01
TreyHarris geekosaur: ah, interesting. I tend to be doing it in the context of plots and diagrams, occassionally UI elements, and generally in something like SVG. It doesn't really catch up to you then. 19:02
19:05 graphene joined
TimToady
.oO(If you don't have to stand back, it's not science.)
19:05
19:05 p6bannerbot sets mode: +v graphene
TreyHarris
.oO(I wish there were a Rosetta Stone for the XY problem. Meaning, if I have X problem, show me the best libraries in any/every language. The Rosetta Stone wiki itself is at slightly lower-level than I'm talking about; not algorithms, but entire problem sets, like "ORM" or "vector drawing")
19:07
19:07 xinming_ joined 19:08 p6bannerbot sets mode: +v xinming_
Hotkeys "Rosetta Library" 19:10
doesn't roll off the tongue very well
19:11 xinming left, chenyf_ joined 19:12 p6bannerbot sets mode: +v chenyf_
TreyHarris Mostly because I'd like to steal shamelessly from them all and make the best version in Perl 6. ;-) 19:13
19:14 ggoebel_ joined 19:15 p6bannerbot sets mode: +v ggoebel_
Hotkeys haha 19:16
19:16 chenyf_ left 19:20 graphene left 19:21 lichtkind left 19:27 graphene joined, p6bannerbot sets mode: +v graphene 19:34 lichtkind joined, pecastro joined, p6bannerbot sets mode: +v lichtkind 19:35 p6bannerbot sets mode: +v pecastro 19:36 pmurias joined, p6bannerbot sets mode: +v pmurias
pmurias grondilu: I'll release a parcel (module bundler plugin) to allow running Perl 6 scripts in the browser tommorow 19:38
grondilu: rakudo.js passes 1005 roast test files on node.js
19:39 Ven` joined 19:40 p6bannerbot sets mode: +v Ven`
pmurias grondilu: that's 77% percent of all of them 19:40
grondilu: a bunch of the failing ones are IO/threads which I'm not focusing on
19:41 yqt joined, p6bannerbot sets mode: +v yqt 19:44 Ven` left, pmurias left 19:49 pmurias joined 19:50 p6bannerbot sets mode: +v pmurias
TreyHarris That's fantastic; who's working on a reactive architecture for it a la Elm? 20:03
20:07 graphene left, yqt left 20:09 graphene joined, p6bannerbot sets mode: +v graphene
SmokeMachine m: class A {has $.val; method a {"a$!val"}; method b {"b$!val"}}; class B { has A:D $!obj-a handles {$_ ne "new"} = A.new: :42val}; say B.new.a; say B.new.b # Xliff I only had time to try it now... 20:12
camelia a42
b42
20:12 ggoebel_ left
pmurias TreyHarris: I'm not aware of working on a reactive architecture for rakudo.js 20:13
TreyHarris (Is Cro able to be repurposed to use rakudo.js for in-page reactive components?) 20:14
pmurias TreyHarris: I would have to think about it
TreyHarris pmurias: I'm sure it will come. I'd make a stab at it myself if I didn't watch Elm development and see how tough a problem it is to do well and in a performant way
20:14 pmurias left
timotimo sounds like something you can just Add To Cro™ 20:14
20:15 pmurias joined
TreyHarris Er, "expressive, performant, and debuggable--pick two" seems to be the way with such things, but Elm struck a very nice balance (well, for those of us who are extremely comfortable with FP, I suppose) 20:15
20:16 p6bannerbot sets mode: +v pmurias
pmurias TreyHarris: I'll have to think about it on a fresh mind 20:17
TreyHarris: using React will work
20:17 spycrab0 left
pmurias TreyHarris: I have a start of a JSX DSL working 20:18
s/DSL/slang
SmokeMachine me too! :)
github.com/FCO/p6-react 20:19
pmurias remembers that there where two JSXes 20:22
SmokeMachine: yours was a bit more perlish rather then trying to be exactly the same thing if I remember correctly right? 20:23
SmokeMachine pmurias: yes
20:25 graphene left 20:27 graphene joined, ggoebel_ joined, p6bannerbot sets mode: +v graphene 20:28 cpage joined, p6bannerbot sets mode: +v ggoebel_ 20:29 p6bannerbot sets mode: +v cpage
pmurias nc 20:36
sorry 20:37
20:37 pmurias left
TreyHarris pmurias, SmokeMachine: That's where I think the Elm architecture is particularly brilliant--it leveraged the nice things about the language as compared to JS to make a react that was much pleasanter to use without being any less expressive. 20:50
20:57 sotona joined 20:58 p6bannerbot sets mode: +v sotona, alpha6 joined 20:59 p6bannerbot sets mode: +v alpha6 21:20 graphene left, itaipu left 21:22 graphene joined, p6bannerbot sets mode: +v graphene 21:25 itaipu joined, rindolf left, p6bannerbot sets mode: +v itaipu
TreyHarris Gah--yeah, I couldn't even make a stab at it--I don't understand either JS or the DOM well enough 21:27
timotimo you can have JSX completely without the dom! :) 21:31
the part that connects JSX and the DOM is the reconciler 21:32
but react native has JSX without HTML DOM
21:32 mcmillhj left 21:36 rindolf joined, p6bannerbot sets mode: +v rindolf 21:40 mcmillhj joined 21:41 p6bannerbot sets mode: +v mcmillhj
TreyHarris timotimo: I'll have to give it a try; the samples reachable from reactjs.org/docs/introducing-jsx.html suggest it's still too JavaScripty for me--I'd want a version of JSX that's Perl6 21:41
timotimo jnthn has been designing a template language that ought to feel perl6ish 21:42
but it's supposed to go into template files rather than directly in your code
which doesn't have to be the case
TreyHarris (Again, my history with Haskell goes so far back that Elm feels far more expressive than JSX, so I'm probably a weird case.) 21:43
21:43 sotona left
timotimo heh 21:43
21:43 itaipu left 21:45 mcmillhj left 21:46 sotona joined 21:47 p6bannerbot sets mode: +v sotona 21:53 mcmillhj joined 21:54 p6bannerbot sets mode: +v mcmillhj 21:55 Ven` joined 21:56 p6bannerbot sets mode: +v Ven` 21:58 mcmillhj left 21:59 Ven` left 22:01 Ven` joined, p6bannerbot sets mode: +v Ven` 22:05 Ven` left 22:07 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 22:11 mcmillhj left 22:21 sotona left 22:22 AAAI344 joined, graphene left 22:23 graphene joined 22:24 p6bannerbot sets mode: +v graphene 22:27 leont joined 22:28 p6bannerbot sets mode: +v leont
TreyHarris geekosaur: Todd just replied but I still don't understand what he was saying was "really a bad idea to use". It feels like I asked "what is it?" and he replied "yes, very much". 22:35
22:35 pecastro left 22:36 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj
timotimo maybe that it's confusing to use rw parameters heavily, and instead if you just have one value that has to go out, return it instead? 22:36
22:38 rfold left
TreyHarris timotimo: ah-hah, yes, I can see that reading. But I'm not sure wanting examples to be a) non-contrived, b) clear and concrete, and c) showing best practice only is compatible with any desire they be d) concise.... 22:39
I frequently find the best examples are ones that include "this won't work" paired with what will work 22:40
geekosaur haven' received it yet
22:40 mcmillhj left
TreyHarris Oh, bizarre--my reply went direct to him, not the list, and he replied likewise, and we had a back-and-forth that was entirely without the list. Something strange about that particular message--Gmail defaults to reply, not reply-all. 22:45
timotimo: I'm impressed you were able to interpret an email you never saw :-D 22:47
timotimo i ... thought i saw that mail 22:50
geekosaur you may have seen something similar in another thread, since there's at least two overlapping ones 22:53
timotimo OK
that's an interpretation i'm completely fine with
TreyHarris I resent my side of the convo anyway. 22:54
geekosaur it's also possible someone's mailer has been deleting recipients
timotimo i'm sad to hear you resent the discussion ;) ;) ;)
TreyHarris re-sent :-)
timotimo i couldn't resist :) 22:55
TreyHarris Ugh, and Gmail mucked with my formatting so that it moved some of my text into the hidden reply portion 22:57
TreyHarris shrugs
timotimo ah dangit 22:59
mail is *really* hard
23:03 vike1 left 23:06 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 23:10 vike1 joined, sotona joined, p6bannerbot sets mode: +v vike1, mcmillhj left 23:11 p6bannerbot sets mode: +v sotona, lizmat left 23:12 chenyf_ joined, p6bannerbot sets mode: +v chenyf_ 23:14 sotona left 23:17 chenyf_ left 23:32 Herby_ joined 23:33 p6bannerbot sets mode: +v Herby_
Herby_ \o 23:33
23:34 leont left 23:38 mcmillhj joined, beeman joined, p6bannerbot sets mode: +v beeman 23:39 p6bannerbot sets mode: +v mcmillhj
Xliff What's the best way to get the name of a module's .moarvm file? 23:39
23:43 mcmillhj left
timotimo querying the comp unit repo's precomp store i guess? 23:44
Xliff Got docs? ;) 23:45
timotimo if it's not easily findable on the doc site, then i'm afraid there might only be the source code 23:46
though there are design docs from the beginning
no clue how far the implementation and design have changed since then