»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:01 cpage_ left 00:02 ChoHag left 00:09 troys is now known as troys_ 00:15 mson joined 00:17 lookatme joined
lookatme o/ 00:17
00:20 Actualeyes left 00:25 Cabanossi left 00:28 Cabanossi joined 00:30 mniip left 00:35 mniip joined 00:38 mcmillhj joined 00:47 BenGoldberg joined, ctilmes left 00:48 Spock2428 joined, margeas left 00:49 Spock2428 left, cdg left, cdg joined 00:51 Morfent left
BenGoldberg So I have a question, which is perhaps a bit mad. I know that one of Rakudo's backends is the jvm. I know that android apps must be written in java (or at least, be made of jars containing java class files). So, can rakudo run on an android phone or tablet? 00:52
BenGoldberg wonders if he might have accidentally stumbled onto perl6's "killer app" ;)
00:54 cdg left, patrickz joined
perigrin I look forward to your excellent blog post about the trials and tribulations of getting it working 00:54
perigrin runs away and hides 00:55
00:55 Cabanossi left
BenGoldberg Ha, that's waaay beyond my skill level! 00:55
Now, if someone else created a rakudroid deployment deployment system, I'd be happy to write a game of tetris in perl6 to play on my phone ;) 00:56
00:58 patrickz_ left, Cabanossi joined
perigrin so one of the hiccups is that android doesn't use the JVM 00:58
00:59 evalable6 left, evalable6 joined
perigrin however castaway got pretty far at one point cross-compiling perl5 for the NDK APIs on android ... so someone might get further getting MOAR via the NDK. 01:01
01:08 cpage_ joined
BenGoldberg Even though android does not literally use a jvm for itself, all apps which run on it must use java bytecode, which, as they get loaded, are transparently compiled into dalvik bytecode or native instructions. 01:16
sacomo hi all, question about methods using `is export`, is there any way to make their class attributes / self. available from the exported method? bar() instead of Foo.bar() 01:19
01:20 kitsunenokenja joined 01:21 cdg joined 01:24 AlexDaniel left 01:27 ctilmes joined, Cabanossi left 01:28 Cabanossi joined, someuser left, pilne joined 01:30 someuser_ left
lookatme sacomo, what do you mean, a singleton ? 01:32
And I think self is can only using inside class . :) 01:33
sacomo I read somewhere that we can use "method foo() is export {}" and access foo like with exported subs. Not sure if that is possible. I know we can export subs from inside a class, but we don't have access to self. from those subs. 01:34
I could be wrong though. I am usually wrong.
01:35 mcmillhj left, jeromelanteri joined
lookatme m: class Foo { method bar() is export { } }; say ::.keys 01:35
camelia ($=pod $_ $/ !UNIT_MARKER $=finish EXPORT Foo $! ::?PACKAGE GLOBALish $¢ $?PACKAGE)
lookatme m: module A { class Foo is export { method bar(Int $s) is export { say $s; } }; }; import A; say &bar(Foo, 25) 01:38
camelia 25
True
01:38 Actualeyes joined
lookatme sacomo, works ^^ 01:38
sacomo hmm 01:40
01:46 someuser joined, someuser_ joined 01:47 mcmillhj joined 01:49 troys_ is now known as troys 01:51 mcmillhj left 01:55 AlexDaniel joined 01:58 bisectable6 left, bisectable6_ joined, bisectable6_ left, bisectable6 joined, ChanServ sets mode: +v bisectable6 01:59 ryn1x left 02:02 ryn1x joined, mcmillhj joined 02:07 mcmillhj left 02:14 ZzZombo left, ZzZombo joined 02:23 mcmillhj joined 02:25 cpage_ left, Cabanossi left 02:28 mcmillhj left, Cabanossi joined 02:29 cpage_ joined
piojo Is there any way to use bisectable to test precompilation problems? 02:36
02:38 mson left 02:39 dayangkun left 02:44 cpage_ left 02:45 ilbot3 left
MasterDuke piojo: it'd be a little tricky. does using the 'no precompilation' directive show whatever behavior you're trying to test? 02:50
02:56 mson joined
piojo MasterDuke: the error still happens. It could be related to "use"ing files rather than precompilation 02:57
02:57 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:58 comborico1611 left
piojo But I still can't test it with a single file. The error doesn't happen. (I already reported it as rt.perl.org/Public/Bug/Display.html?id=132525 ) 02:58
03:01 cpage_ joined
AlexDaniel eval: spurt ‘sandbox/Foo.pm6’, ‘unit module Foo; sub foo is export { say 42 };’ 03:03
evalable6
AlexDaniel c: 2015.12,HEAD use lib ‘sandbox/’; use Foo; foo
committable6 AlexDaniel, ¦2015.12,HEAD(ae02bc2): «42␤»
AlexDaniel piojo: ↑
piojo: depends on what kind of precomp issue you're seeing (e.g. can you reproduce it with every run, or only on the first run?) 03:04
03:04 yoleaux joined, ChanServ sets mode: +v yoleaux
AlexDaniel eval: spurt ‘sandbox/MyModule.pm6’, ‘our sub get-array(--> Array[Pair]) { return my Pair @pairs; }’ 03:04
evalable6
AlexDaniel c: 2015.12,HEAD use lib ‘sandbox/’; use MyModule; MyModule::get-array 03:05
committable6 AlexDaniel, ¦2015.12: «» ¦HEAD(ae02bc2): «Could not find symbol '&get-array'␤ in block <unit> at /tmp/vyQheWsEH3 line 1␤␤ «exit code = 1»»
03:05 pew_ joined
piojo eval: spurt ‘sandbox/MyModule.pm6’, ‘unit module MyModule; our sub get-array(--> Array[Pair]) { return my Pair @pairs; }’ 03:06
evalable6
03:06 pew_ left
piojo c: 2015.12,HEAD use lib ‘sandbox/’; use MyModule; MyModule::get-array 03:06
committable6 piojo, gist.github.com/b893b2be5f5bc343d3...b43b02641c
AlexDaniel awesome
piojo Huh, this never worked
AlexDaniel it did
look closely
c: 2015.12,HEAD use lib ‘sandbox/’; use MyModule; say MyModule::get-array 03:07
committable6 AlexDaniel, gist.github.com/e89da827024d2d9f12...ea3e57700b
03:07 troys is now known as troys_
AlexDaniel so, let's bisect 03:07
6c: 2015.12,HEAD use lib ‘sandbox/’; use MyModule; say MyModule::get-array
piojo AlexDaniel: oh, I was misreading the output. I've never used bisectable/committable before. 03:08
committable6 AlexDaniel, gist.github.com/936b29d5aba6c4c7e0...c4efb9a423
AlexDaniel piojo: using it like this is also new to me
ahhh
6c: use lib ‘sandbox/’; use MyModule; say MyModule::get-array
committable6 AlexDaniel, gist.github.com/86281d3cb838846f3b...2e3fd02b08 03:09
AlexDaniel ok so just bisect: should work
bisect: use lib ‘sandbox/’; use MyModule; say MyModule::get-array
bisectable6 AlexDaniel, Bisecting by exit code (old=2015.12 new=ae02bc2). Old exit code: 0
AlexDaniel, bisect log: gist.github.com/8d02a2cf2c1a32607e...0c49b48c27
AlexDaniel, (2016-02-11) github.com/rakudo/rakudo/commit/22...bccf1f08ed
03:09 dayangkun joined
AlexDaniel that doesn't look relevant 03:10
so we should probably double-check
c: 22b4ef05b1f^,22b4ef05b1f use lib ‘sandbox/’; use MyModule; say MyModule::get-array
committable6 AlexDaniel, gist.github.com/fe6c74fe514ade0118...d48d794706
AlexDaniel hm… that confirms it
piojo AlexDaniel: thanks for showing me how to do that!
But that's really not a commit I woud expect to cause this! 03:11
03:12 Cabanossi left, Actualeyes left
AlexDaniel piojo: heh, yeah, but it is (as confirmed above). sha^ gives a parent of that commit, and on a commit before there's no problem 03:13
03:13 Cabanossi joined
AlexDaniel I think the issue comes from this line: + my Pair @arg-help; 03:13
and something in CORE.setting just goes crazy because of it? No idea actually
03:15 llfourn left 03:18 pilne left, someuser1 joined, someuser2 joined
piojo AlexDaniel: Seems like I should do a more difficult bisect, manually applying 22b4ef05b to each revision and seeing if that can trigger the underlying problem 03:19
AlexDaniel piojo: sorry, what for? :) 03:20
piojo AlexDaniel: because it seems to me that 22b4ef05b isn't the real problem. It's more of a diagnostic tool. 03:21
AlexDaniel piojo: if you really want to, you can try reverting 22b4ef05b on HEAD
03:21 ctilmes left
AlexDaniel piojo: and that will definitely make the problem go away 03:21
03:22 someuser left
AlexDaniel piojo: and then, you can try changing “my Pair @arg-help;” to just “my @arg-help;” 03:22
and that'll probably make the problem go away, at least if my hypothesis is correct :)
03:22 someuser_ left
piojo AlexDaniel: Do you have a more specific guess about what the underlying problem is that that change would help with? 03:22
BTW, the problem is also showing itself with Array[CustomClass], not just Array[Pair] 03:23
From where I stand, that commit is useful because it reveals a deep bug which may have other manifestations 03:24
AlexDaniel eval: spurt ‘sandbox/MyModule.pm6’, ‘our sub get-array(--> Array[Int]) { return my Int @pairs; }’ 03:26
evalable6
AlexDaniel c: 22b4ef05b1f^,22b4ef05b1f use lib ‘sandbox/’; use MyModule; say MyModule::get-array
committable6 AlexDaniel, ¦22b4ef05b1f^,22b4ef0: «[]␤»
AlexDaniel c: 2015.12,22b4ef05b1f^,22b4ef05b1f,HEAD use lib ‘sandbox/’; use MyModule; say MyModule::get-array
committable6 AlexDaniel, ¦2015.12,22b4ef05b1f^,22b4ef0: «[]␤» ¦HEAD(ae02bc2): «Could not find symbol '&get-array'␤ in block <unit> at /tmp/JUpgC8yueT line 1␤␤ «exit code = 1»»
AlexDaniel huh? :D 03:27
6c: use lib ‘sandbox/’; use MyModule; say MyModule::get-array
committable6 AlexDaniel, gist.github.com/921e695ee7b3732119...98652203b2
AlexDaniel bisect: use lib ‘sandbox/’; use MyModule; say MyModule::get-array
bisectable6 AlexDaniel, Bisecting by exit code (old=2015.12 new=ae02bc2). Old exit code: 0
AlexDaniel, bisect log: gist.github.com/f66026e29439175b55...3b31f3c75d
AlexDaniel, (2016-12-19) github.com/rakudo/rakudo/commit/4b...95a09a8e80
AlexDaniel ah 03:29
eval: spurt ‘sandbox/MyModule.pm6’, ‘unit module MyModule; our sub get-array(--> Array[Int]) { return my Int @pairs; }’ 03:30
evalable6
AlexDaniel c: 2015.12,22b4ef05b1f^,22b4ef05b1f,HEAD use lib ‘sandbox/’; use MyModule; say MyModule::get-array
committable6 AlexDaniel, ¦2015.12,22b4ef05b1f^,22b4ef0,HEAD(ae02bc2): «[]␤»
AlexDaniel piojo: so using Int instead of Pair is OK
piojo AlexDaniel: right, Int works. I haven't explored which types of classes show the problem. 03:31
the only big difference I see is that Int is (Cool) and custom types and pairs aren't 03:32
AlexDaniel piojo: I don't have an educated guess on why exactly it is behaving like this :) 03:33
03:34 ufobat_ joined
piojo AlexDaniel: That's why I think a more labor-intensive bisect could help, if I can force the bug to reveal itself prior to the 22b4ef05 commit. Though that might not be possible if the code changed too much. 03:34
03:35 kitsunenokenja left
Geth doc: lefth++ created pull request #1699:
Describe how to look up class members
03:35
03:37 ufobat left
AlexDaniel piojo: not sure I understand. You have a non-intermittent bug and you know which commit caused it, what are you looking for now? 03:38
03:41 silug left
piojo AlexDaniel: are you suggesting a workaround for me, or a fix for the next rakudo release? If we changed this in rakudo, it seems like it would be sweeping a problem under the rug, and it could come back when a different core function uses a parameterized array. 03:47
Though the situation can be improved if I add a unit test for this
we can hope the next time this occurs, it will do a better job of illuminating whatever is wrong in nqp or moarvm
AlexDaniel piojo: am suggesting a rakudo fix, yes. Would be great to have tests that go over a bunch of types (not just Pair)
piojo AlexDaniel: my concern is just this: something is wrong with the type system, and 22b4ef05 did not cause it, since there's no error in that commit. I will try to find the underlying bug, and if I can't, I'm okay with a workaround 03:49
AlexDaniel piojo: ok, a way to do it would be to apply 22b4ef05 to some old revisions (e.g. 2015.12) and see if it breaks the same way there 03:55
piojo AlexDaniel: yes, that's my intention. It doesn't apply cleanly, so by-hand changes will be needed. I'm not sure whether it'll succeed, but it's worth the try. 03:56
04:00 thou joined
thou \o Good evening 04:00
piojo AlexDaniel: thanks for showing me the module bisect, and for your tips on this :)
AlexDaniel piojo: sure, let me know if you have any other bisectable challanges :)
piojo Thanks!
perlbot chenyf pasted a new file at f.perlbot.pl/p/3jg9le -
thou Does anyone know if there's current activity refactoring Pod::To::* modules to use a common framework, and to fix outstanding [POD] bugs in Rakudo? I've been making some tweaks to Pod::To::Markdown, and am wanting to get rid of warts rather than paste over them.
04:00 jcallen joined
thou There's a branch in Pod::To::HTML for example called autarch/use-pod-treewalker , and several other related attempts there. 04:00
04:00 Cabanossi left
AlexDaniel piojo: possibly relevant: github.com/rakudo/rakudo/blob/ae02...e.pm#L1-L2 04:00
04:00 perlpilot_ joined, cpage_ left
thou A recent branch, emit-raw-HTML, is related to Rakudo's broken (IMO) implementation of Named blocks, and various Pod formatters are not coordinated on how to handle things. 04:00
It's suggested to make Pod part of the language braid to fix various parsing problems. That sounds very interesting to me!
04:00 Cabanossi joined
AlexDaniel thou: tbrowder is working on some [POD] bugs in rakudo, perhaps you should talk to him 04:00
thou awesome, thanks
04:00 nightfrog joined
AlexDaniel thou: IMO almost anything POD-related is underdeveloped, so feel free to jump in and do some serious changes 04:00
04:00 klapperl joined 04:02 kannan joined 04:04 kannan left 04:10 SourceBaby left 04:11 SourceBaby joined 04:12 Herby_ joined
Herby_ o/ 04:12
04:12 explorer joined, mcmillhj joined, Cabanossi left, jhill_ joined, Cabanossi joined, EXAAUWM3 joined, ChanServ sets mode: +v SourceBaby, jhill_ is now known as jhill, someuser joined 04:14 mcmillhj left 04:15 someuser2 left, someuser1 left 04:16 raiph joined
MasterDuke thou: i think moritz and DrForr and wander have all been talking about Pod::To::HTML recently 04:24
could try searching for "Pod::To::" at irclog.perlgeek.de/perl6/search and see what shows up 04:25
04:26 mcmillhj joined 04:27 wamba joined 04:30 mcmillhj left
thou Thanks for that info! 04:31
04:32 dayangkun left 04:33 BenGoldberg left 04:42 mcmillhj joined
explorer hi, does someone know if there is a library function to get the first Promise ~~ Kept but try all of them in case they all break? I have something, but I think it is a bit elaborate pastebin.com/DUV1X7Vf 04:43
04:46 mcmillhj left
Herby_ .tell ctilmes ++ on the advent article 04:47
yoleaux Herby_: I'll pass your message to ctilmes.
Herby_ dumb question but I really like the font and look of the code in gist.github.com 04:48
is it possible to get that font in Vim?
04:48 khw left
explorer I would guess you would need to change the font in your favourite terminal 04:51
04:51 mcmillhj joined, perlpilot_ left
AlexDaniel this is an awesome post indeed 04:51
ctilmes++
piojo Wow, this needs fixing: rosettacode.org/wiki/Determine_if_...ric#Perl_6 04:52
04:53 eliasr left 04:54 TimToady left
AlexDaniel piojo: what's exactly wrong with it? 04:55
Herby_ the new Advent of Code puzzle unlocks in about 5 minutes: adventofcode.com/
piojo My thought is that the real answer is: $_ !eq '' && try { $_ eq $_ }
AlexDaniel: it only works because <5> produces IntStr
m: say <4>.WHAT
camelia (IntStr)
04:55 mcmillhj left
piojo AlexDaniel: it fails on all real strings 04:55
04:56 TimToady joined
piojo I'll fix it if the test try { $_ == $_ } is the right one. (Also, it needs to eliminate "" because "" is castable to a string) 04:56
Sorry, that's slower than needed 04:57
AlexDaniel piojo: what about ?($term ~~ /\d/) and ?$term.Numeric;
04:58 cpage_ joined
piojo AlexDaniel: Nice! I didn't realize .Numeric returned Failure 04:58
AlexDaniel piojo: why does it need ($term ~~ /\d/) check at all? 04:59
piojo still, I don't see why we need regexes for this
I didn't write it!
it just needs to check that the string isn't empty.
05:00 cpage_ left, mcmillhj joined 05:01 Actualeyes joined
piojo oh, ?$term.Numeric fails for 0 05:01
AlexDaniel piojo: what about: defined $term.Numeric 05:02
or more explicit $term.Numeric !~~ Failure
explorer: not that I know of 05:03
piojo AlexDaniel: both seem fine. Is Str.Numeric being Failure part of the spec, or an implementation detail? 05:04
AlexDaniel piojo: part of the spec
piojo AlexDaniel: thanks, then that seems a solid and short solution :)
05:05 mcmillhj left
piojo m: say "\t".Numeric; # uh-oh 05:07
camelia 0
piojo m: say "½".Numeric; 05:08
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5½' (indicated by ⏏)
in block <unit> at <tmp> line 1
piojo m: say "1½".Numeric
camelia Cannot convert string to number: trailing characters after number in '031⏏5½' (indicated by ⏏)
in block <unit> at <tmp> line 1
piojo I don't disagree with that, actually. It seems like a source parse needs to be more thorough than a mere string conversion. 05:09
thou explorer, you could use .Supply and specify a :quit routine that does nothing
and Supply.grep() and .head() might help, too 05:10
AlexDaniel piojo: these are the tests: github.com/perl6/roast/blob/8da277....t#L83-L91
piojo: I wish it was tested more thoroughly, but maybe it is in other files 05:11
thou Or maybe :quit() doesn't work that way, I'm not positive....
05:11 explorer left
AlexDaniel piojo: whitespace characters being turned into 0 is weird :( 05:12
thou hrm, looks like I jumped the gun on that solution, I didn't read .Supply() description clearly
piojo AlexDaniel: and 'i' and 'e' can be Numeric but not '½'. That seems inconsistent 05:13
No, my mistake
I wasn't using the string in that test
AlexDaniel m: react { whenever Supply.merge: (Promise.in(3), Promise.in(2))».Supply { say $_; } } 05:15
camelia True
True
AlexDaniel maybe something like this can be hacked to do what's needed? 05:16
m: react { whenever Supply.merge: (Promise.in(3), Promise.in(2))».Supply { done if $_; say ‘hello’ } }
camelia ( no output )
AlexDaniel m: react { whenever Supply.merge: (Promise.in(3), Promise.in(2))».Supply { say ‘hello’; done if $_ } }
05:16 mcmillhj joined
camelia hello 05:16
AlexDaniel piojo: so that's why the regex check is there :) 05:17
piojo AlexDaniel: yep. But we're looking at this the wrong way: according to every other part of the test, this is a check about whether a string is a valid perl6 number. It's wrong to exclude '' as being a number 05:19
05:19 angelds joined
piojo If "1.3e+12" is a number, then "" should be considered a number as well 05:19
If the code were to detect integers and simply written decimal numbers, that would be a totally different test. 05:20
AlexDaniel uhhh I think I found some issue…
05:20 mcmillhj left
AlexDaniel huggable: 05:23
huggable AlexDaniel, nothing found
AlexDaniel huggable:
huggable AlexDaniel, nothing found
AlexDaniel huggable: gc
huggable AlexDaniel, nothing found
AlexDaniel huggable: force gc
huggable AlexDaniel, nothing found
AlexDaniel anyone remembers how to force gc?
m: use nqp; nqp::force_gc()
camelia ( no output )
AlexDaniel mch: for ^400 { my $x = 300.chr.Numeric; $=1 } 05:25
committable6 AlexDaniel, gist.github.com/522f5794fed3618f41...9b40d4da68
AlexDaniel bisect: for ^400 { my $x = 300.chr.Numeric; $=1 }
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=ae02bc2) because on both starting points the exit code is 0
05:25 cdg left
bisectable6 AlexDaniel, bisect log: gist.github.com/e796429812443838c7...a07c7b1788 05:25
AlexDaniel, (2015-12-29) github.com/rakudo/rakudo/commit/0e...28097cd28b
AlexDaniel mch: for ^10000 { my $x = 300.chr.Numeric; $=1 } 05:26
05:26 cdg joined
committable6 AlexDaniel, gist.github.com/370cfa2605da389369...a85545e994 05:26
05:30 cdg left, Herby_ left 05:32 mcmillhj joined
AlexDaniel GH#1298 05:33
synopsebot GH#1298 [open]: github.com/rakudo/rakudo/issues/1298 GC is blowing up failures needlessly
05:36 mcmillhj left 05:38 wamba left 05:48 mcmillhj joined 05:53 mcmillhj left 05:56 xxpor_ joined 06:04 releasable6 left, releasable6 joined, greppable6 left, greppable6 joined, ChanServ sets mode: +v greppable6, mcmillhj joined, squashable6 left 06:05 squashable6 joined, ChanServ sets mode: +v squashable6 06:09 mcmillhj left 06:14 troys_ is now known as troys 06:20 mcmillhj joined
piojo Can anyone think of a reason why a pair of strings is not being found in an array? 06:21
m: my Pair @array = ['47' => '4',]; say ('47' => '4') ∈ @array; 06:22
camelia True
piojo In a longer example, this same check is failing
When the array is constructed by "input.map( $_.map( given input.x.y { } )).flat 06:23
06:24 Cabanossi left 06:25 mcmillhj left
piojo Is there anything strange about a pair of ints that makes it not usable as a key in a set? 06:25
I mean a pair of Str
06:27 Cabanossi joined 06:28 aindilis left
Geth doc: 9065949496 | (Alex Chen)++ | doc/Language/functions.pod6
Update functions.pod6
06:28
synopsebot Link: doc.perl6.org/language/functions
piojo m: my %data1 = ('4' => '47' => {}); my Pair @data-array = [%data1.keys[0] => %data1{%data1.keys[0]}.keys[0],]; say ('47'=>'4') ∈ @data-array; 06:30
camelia False
AlexDaniel m: my %data1 = ('4' => '47' => {}); my Pair @data-array = [%data1.keys[0] => %data1{%data1.keys[0]}.keys[0],]; say ('4'=>'47') ∈ @data-array; 06:34
camelia True
06:36 mcmillhj joined 06:37 darutoko joined
piojo m: my ($one, $two) = ('1', '2'); my Pair @data-array = [$one => $two]; say "Pair is in the list: " ~ so ($one => $two) ∈ @data-array; 06:38
camelia Pair is in the list: False
piojo Containers are breaking this!
m: my ($one, two) = ('1', '2'); my Pair @data-array = [$one => $two]; say "Pair is in the list: " ~ so ($one => $two) ∈ @data-array;
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'two' in parameter declaration.
at <tmp>:1
------> 3my ($one, two7⏏5) = ('1', '2'); my Pair @data-array = [$
piojo m: my (\one, \two) = ('1', '2'); my Pair @data-array = [one => two]; say "Pair is in the list: " ~ so (one => two) ∈ @data-array;
camelia Pair is in the list: False
piojo oh, that doesn't agree with my last test...
06:39 relaxed left
piojo AlexDaniel: there was another way I wrote it in which using sigilless variables made the test pass 06:39
but in the simplest version, that doesn't help
06:41 mcmillhj left
piojo 6c: 2015.12,HEAD my ($one, two) = ('1', '2'); my Pair @data-array = [$one => $two]; so ($one => $two) ∈ @data-array; 06:41
committable6 piojo, gist.github.com/fd5644d38b839e51dd...d406e08fcb
AlexDaniel 6c by itself is all releases 06:42
so either
c: 2015.12,HEAD my ($one, two) = ('1', '2'); my Pair @data-array = [$one => $two]; so ($one => $two) ∈ @data-array;
committable6 AlexDaniel, gist.github.com/831abdc41e417a4dc1...d6143de919
AlexDaniel or
piojo sorry, typo
AlexDaniel 6c: my ($one, two) = ('1', '2'); my Pair @data-array = [$one => $two]; so ($one => $two) ∈ @data-array;
piojo my ($one, $two) = ('1', '2'); my Pair @data-array = [$one => $two]; say "Pair is in the list: " ~ so ($one => $two) ∈ @data-array;
committable6 AlexDaniel, gist.github.com/6d4ecc23e13b08f0ac...ae13527927
AlexDaniel 6c: my ($one, $two) = ('1', '2'); my Pair @data-array = [$one => $two]; say "Pair is in the list: " ~ so ($one => $two) ∈ @data-array;
committable6 AlexDaniel, ¦6c (25 commits): «Pair is in the list: False␤» 06:43
06:44 kyan joined
piojo AlexDaniel: that means this never worked? 06:44
06:44 troys is now known as troys_
AlexDaniel where never = 2015.12 (first release supporting v6.c), yes 06:44
c: all my ($one, $two) = ('1', '2'); my Pair @data-array = [$one => $two]; say "Pair is in the list: " ~ so ($one => $two) ∈ @data-array; 06:45
piojo Is that because a =>b won't reliably equal a =>b due to Pair being a certain type of class?
committable6 AlexDaniel, gist.github.com/d882fd4eb666562d87...99d666708e
AlexDaniel “all” is all releases starting from 2014.01
( which is rarely useful, but sometimes you want to know :) ) 06:46
piojo m: my Pair @data-array = ['1' => '2']; say "Pair of literal strings is in the list: " ~ so ('1' => '2') ∈ @data-array;
camelia Pair of literal strings is in the list: True
piojo m: my ($one, $two) = <1 2>.map(*.Str); say so $one => $two === $one => $two; 06:47
camelia True
piojo m: my ($one, $two) = <1 2>.map(*.Str); say so $one => $two === '1' => '2'; 06:48
camelia True
AlexDaniel m: my ($one, $two) = (‘1’, ‘2’); my Pair @data-array = (‘1’ => ‘2’); my $p = ($one => $two); say $p.WHICH; say @data-array[0].WHICH; dd @data-array; dd $p; say $p ∈ @data-array 06:49
camelia Pair|69757440
Array[Pair] @data-array = Array[Pair].new("1" => "2")
Pair|Str|1|Str|2
False
Pair $p = "1" => "2"
AlexDaniel m: my ($one, $two) = (‘1’, ‘2’); my Pair @data-array = (‘1’ => ‘2’); my $p = (‘1’ => ‘2’); say $p.WHICH; say @data-array[0].WHICH; dd @data-array; dd $p; say $p ∈ @data-array
camelia Pair|Str|1|Str|2
Array[Pair] @data-array = Array[Pair].new("1" => "2")
Pair|Str|1|Str|2
True
Pair $p = "1" => "2"
AlexDaniel m: my ($one, $two) = (‘1’, ‘2’); my Pair @data-array = (‘1’ => ‘2’); my $p = (‘1’ => ‘2’); note $p.WHICH; say @data-array[0].WHICH; dd @data-array; dd $p; note $p ∈ @data-array 06:50
camelia Pair|Str|1|Str|2
Pair|Str|1|Str|2
Array[Pair] @data-array = Array[Pair].new("1" => "2")
Pair $p = "1" => "2"
True
AlexDaniel m: my ($one, $two) = (‘1’, ‘2’); my Pair @data-array = (‘1’ => ‘2’); my $p = ($one => $two); note $p.WHICH; say @data-array[0].WHICH; dd @data-array; dd $p; note $p ∈ @data-array
camelia Pair|79595008
Pair|Str|1|Str|2
Array[Pair] @data-array = Array[Pair].new("1" => "2")
Pair $p = "1" => "2"
False
AlexDaniel piojo: that's not cool :)
but maybe it makes sense?
hmmm… I don't know 06:51
piojo m: my $two = '2'; say '2' === $two; say ('1' => '2') === ('1' => '2'); say ('1' => '2') === ('1' => $two)
camelia True
True
False
piojo I'll post this on stackoverflow. thanks! 06:52
err, I need to read your output first :)
06:52 mcmillhj joined
AlexDaniel m: say (‘1’ => ‘2’).WHICH; my $one = ‘1’; my $two = ‘2’; say ($one => $two).WHICH 06:53
camelia Pair|Str|1|Str|2
Pair|81741704
AlexDaniel piojo: ↑ here's the golfed version
piojo AlexDaniel: thanks, that explains it perfectly 06:57
06:57 mcmillhj left
piojo but it drives me mad that Pair can either have a static or dynamic WHICH depending on how it's defined 06:58
okay, "drives me mad" is an exaggeration
but it's troubling
06:58 mson left
piojo I thought I could either treat WHICH as a point in memory, or as a 1:1 description of the object, but not both for the same type of object! 06:59
06:59 ZzZombo left, ZzZombo joined
piojo s/point in memory/object ID/ 06:59
07:04 lowbro joined, lowbro left, lowbro joined
AlexDaniel piojo: I think lizmat is our expert on whichcraft, perhaps that's who you should ping 07:04
07:04 wamba joined
piojo AlexDaniel: do you know if lizmat's background is c++? 07:06
07:06 troys_ is now known as troys
piojo Since perl isn't turtles all the way down... 07:07
AlexDaniel I don't know, but there's a lot of perl foreground
piojo haha
Thanks
07:08 mcmillhj joined 07:09 Cabanossi left 07:10 geospeck joined 07:12 Cabanossi joined 07:13 mcmillhj left
piojo .ask lizmat Would you say it's a bad idea to use Pair as a member in a Set (or check $pair ∈ @array)? Because it seems awkward that Pair.WHICH is sometimes static (Pair.new(1,2)) but sometimes dynamic (Pair.new($a,2)). The ambiguity makes causes hard debugging since $foo !== EVAL($foo.perl), but EVAL($foo.perl) === EVAL($foo.perl) 07:13
yoleaux piojo: I'll pass your message to lizmat.
07:14 domidumont joined
AlexDaniel 👍 07:18
07:20 domidumont left 07:21 domidumont joined, avalenn joined, aindilis joined
piojo stackoverflow user lisprogtor, are you me? 07:22
(stackoverflow.com/questions/476674...opertions)
buggable New CPAN upload: IRC-Client-Plugin-Github-0.1.5.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...1.5.tar.gz 07:23
07:25 mcmillhj joined
thou .tell moritz In your Advent post, "matches" should be "fails" in this sentence: "A second call to keyval matches pretty quickly (in the call to key)." 07:29
yoleaux thou: I'll pass your message to moritz.
07:29 mcmillhj left 07:31 parv joined 07:35 reportable6 left, reportable6 joined, troys left 07:38 relaxed joined
AlexDaniel piojo: “2 hours ago” seems to be you :D 07:40
07:41 mcmillhj joined 07:43 geospeck left
piojo Faster than light. 07:45
07:45 mcmillhj left 07:46 wamba left 07:50 wamba joined 07:52 mson joined 07:57 mcmillhj joined 07:59 itaylor57 joined, cdg joined 08:02 mcmillhj left, cdg_ joined 08:03 cdg left 08:06 cdg_ left 08:07 chansen_ left 08:09 pnu__ joined 08:10 iviv joined 08:13 thou left, mcmillhj joined 08:17 kyan left 08:18 mcmillhj left 08:20 mcmillhj joined 08:21 ZzZombo left, pdcawley joined, ZzZombo joined 08:25 mcmillhj left, mithaldu_ left 08:26 mithaldu_ joined 08:31 pdcawley left 08:32 pdcawley joined, Ven`` joined, Ven`` left, pdcawley left, pdcawley joined 08:33 pdcawley left, angelds left, pdcawley joined 08:34 pdcawley left, pdcawley joined, angelds joined 08:35 pdcawley left, dakkar joined, pdcawley joined 08:39 Cabanossi left, llfourn joined
DrForr o/ 08:40
lookatme ls
DrForr Desktop Music Repositories Videos 08:41
08:42 Cabanossi joined
jast good thing someone else answered, my answer would have been 424 bytes of listing 08:42
08:45 zostay joined
DrForr Mine would have been that way too, and probably revealed private corporate data. I just pasted the bottom line though. 08:45
jast Movies bin ejabberd-17.08-rosterpatch.tgz messenger-fsm.dot.png userdotfiles.tgz 08:47
that's not too secret, I hope
08:48 pdcawley left
DrForr Not now, anyway :) 08:58
08:59 rindolf joined 09:01 zakharyas joined 09:02 zakharyas left 09:03 zakharyas joined 09:09 angelds left 09:14 parv left 09:25 Actualeyes left 09:30 melezhik joined
lizmat piojo: The key of a Pair is always decontainerized, the value is not 09:31
m: Pair.new("a", my $ = 42) # you could argue that this is incorrect 09:32
camelia ( no output )
lizmat m: dd Pair.new("a", my $ = 42) # rather
camelia :a(42)
lizmat as it's the same output as:
09:32 angelds joined
lizmat m: dd Pair.new("a", 42) 09:32
camelia :a(42)
piojo lizmat: so a pair should not be considered a 2-tuple
lizmat it should
why do you say that ?
piojo I would expect it to treat the every value the same 09:33
but a k-v pair can treat the first element like a key
buggable New CPAN upload: Sparky-Plugin-Hello-0.0.1.tar.gz by MELEZHIK cpan.metacpan.org/authors/id/M/ME/...0.1.tar.gz
piojo lizmat: the basic problem is that I was getting bad results for: $pair ∈ @array 09:34
because $pair.WHICH isn't based on decontainerized values
that's not wrong, but I think it may be a trap. 09:35
lizmat well, then you shouldn't create your Pairs with containers
piojo lizmat: haha
lizmat m: say Pair.new("a", 42).WHICH # value type
camelia Pair|Str|a|Int|42
tbrowder o/ #perl6, can someone answer questions about scheduling an advent post on the perl6 wordpress site?
lizmat m: say Pair.new("a",my $ = 42).WHICH # container type
camelia Pair|57164056
DrForr I did it last night, ergo I'm an expert :) 09:36
(scheduled a post, that is)
piojo m: my $one = 1; my \decontainerized = $one; say decontainerized.WHICH; 09:37
camelia Int|1
piojo lizmat: is that the right way to remove a container? (Not that I'm necessarily going to store all the data without containers, but it's good to know how)
lizmat m: my $a = 1; say $a.WHICH # you could argue this is wron 09:38
camelia Int|1
lizmat piojo: you've made me realize we may need to reconsider Pair.WHICH 09:40
tbrowder ok, question 1: is the time shown in my display taken as my time zone (utc - 6) so i have to make the adjustments for midnight in utc? 09:41
lizmat piojo: need to be afk for an hour so, will get back to this
tbrowder i think the answer is yes so, for 8 dec post i need to schedule publishing on 7 dec at 1800 09:42
piojo lizmat: I'll be AFK then, but I'll log on later
09:44 geospeck joined
tbrowder question 2: can i continue to edit the post, after scheduling, throughout its existence? 09:44
lizmat tbrowder: you can 09:45
afk&
tbrowder question 3: can the post’s title be safely changed if need be without losing the body?
09:46 wamba left
tbrowder lizmat: thanks 09:46
DrForr I'd be wary of changing the title, that could affect permalinks.
moritz no, wordpress handles that fine
yoleaux 5 Dec 2017 23:16Z <DrForr> moritz: Scheduled Day 7 for Thursday 11:59 AM so we've got time for last minute critiquing.
07:29Z <thou> moritz: In your Advent post, "matches" should be "fails" in this sentence: "A second call to keyval matches pretty quickly (in the call to key)." 09:47
09:47 itaylor57 left
tbrowder ok, i feel better now, whew! i’ll post a link to my 8 dec post later today for any early criticisms. 09:48
DrForr Also, mine is ready and in the queue for 11:59 as mentioned above, feel free to change any settings. 09:49
09:50 wander left 09:52 setty1 left, llfourn left
moritz I'll change it to midnight, just so that the publication meta data matches the day in the title 09:53
DrForr: uhm, the post looks empty here :(
09:53 itaylor57 joined
DrForr Huh? 09:53
moritz perl6advent.wordpress.com/?p=6867&...eview=true
that's the one, right? 09:54
DrForr Oh, no, you're off by one, I shared the wrong link.
post=6868
Let me delete the old one just so we dont' get confused.
moritz much better, thanks :-) 09:55
Geth doc: fluca1978++ created pull request #1700:
Fix readme
09:56
09:58 mson left 10:04 chansen_ joined 10:08 dzove855 left 10:15 AlexDaniel left 10:19 ZzZombo left 10:26 Cabanossi left, cdg joined 10:27 Cabanossi joined 10:30 margeas joined 10:31 ZzZombo joined, cdg left 10:32 angelds left 10:37 AlexDaniel joined 10:42 wander joined
wander \o 10:42
tyil o/ 10:46
10:51 domidumont left, Grauwolf joined 11:00 wamba joined, ExtraCrispy joined 11:05 AlexDaniel left 11:13 virtualsue joined 11:17 sena_kun joined 11:19 domidumont joined 11:33 mscha joined
mscha % perl -E 'say "hello"; say "world";' | head -1 11:33
hello
% perl6 -e 'say "hello"; say "world";' | head -1
hello 11:34
Unhandled exception: Failed to write bytes to filehandle: Broken pipe
11:34 S007 joined
mscha Is that on purpose? It's kinda annoying. Most command-line utilities don't complain when you `| head -1` them. 11:34
DrForr I don't think it's intentional. 11:36
Not that I know where to look in the code or how to fix it or anything like that.
jnthn I think it's a result of SIGPIPE being ignored by default, which is in turn the result of fixing a bug where a spawned child process could bring down the spawning process also 11:38
See MoarVM commit 2c5974bc119384132 11:39
DrForr Also please do file a bug, at least others can weigh in on whether it's an issue or not, though I imagine it is one. 11:45
jnthn There's already an RT about this 11:48
mscha OK, thanks. I won't file a new bug report then. 11:50
jnthn Feel free to comment on the existing one. Also, patches very much welcome for anyone who can figure out how to solve the original issue without introducing this new one :) 11:52
*from anyone
11:57 raiph left 11:58 virtualsue left 12:02 konsolebox left 12:07 konsolebox joined
Phlogistique I can't find the ":" of "foo.map: -> $i {...}" in the docs.perl6.org/language/operators page 12:07
there is an "infix :" but its description does not seem to match
am I looking at the wrong place?
moritz it's not an operator, it's method invocation syntax 12:08
Phlogistique ok.
I thought it was an operator, similar to haskell $
moritz I think it's similar in spirit, but not implemented as an operator 12:09
Phlogistique alright, thanks
jast it's documented here btw: docs.perl6.org/language/syntax#Subroutine_calls
moritz jast++ 12:10
jast and the link to 'Methods' is 404 ;)
also the link to 'Sub' 12:11
12:12 setty1 joined 12:16 traxex joined
Geth doc: fluca1978++ created pull request #1702:
Fix slice table.
12:16
doc: 00b53b12f1 | (Alex Chen)++ | doc/Language/syntax.pod6
Fix broken link, jast++
12:18
synopsebot Link: doc.perl6.org/language/syntax
wander since we might merge classtut.pod6 with objects.pod6, it will be broken link some time :) 12:20
when write L<> tag in our doc, it will be better to use absolute location, like `/language/classtut#Methods`. although htmlify.p6 convert L<Class> to `/Type/Class`, but I think it makes htmlify logic mess while save(?) writer's time. 12:25
moritz wander: you can add redirects in html/.htaccess for moved/renamed pages
wander see :) 12:26
12:27 domidumont left 12:31 margeas left, woolfy joined, ZzZombo left 12:32 woolfy left, xcm left 12:33 ZzZombo joined 12:34 xcm joined 12:41 Cabanossi left 12:42 Cabanossi joined 12:46 cdg joined 12:50 cdg left 12:56 zakharyas left 12:57 ZzZombo left, ZzZombo joined 13:01 mscha left 13:08 cschwenz joined 13:09 cschwenz left
buggable New CPAN upload: Sparky-Plugin-Hello-0.0.2.tar.gz by MELEZHIK cpan.metacpan.org/authors/id/M/ME/...0.2.tar.gz 13:13
13:21 geospeck left 13:22 mcmillhj joined 13:23 geospeck joined 13:24 jeromelanteri left, sena_kun left 13:27 mcmillhj left 13:32 abraxxa joined 13:36 domidumont joined 13:42 domidumont1 joined 13:46 domidumont left 13:47 mcmillhj joined 13:48 cdg joined 13:54 Morfent joined 13:56 zakharyas joined 14:02 xtreak joined 14:13 wamba left 14:31 comborico1611 joined 14:33 xtreak left 14:43 sjn joined
buggable New CPAN upload: Sparky-Plugin-Notify-Email-0.0.1.tar.gz by MELEZHIK cpan.metacpan.org/authors/id/M/ME/...0.1.tar.gz 14:43
14:44 eliasr joined 14:52 geospeck left 15:04 Actualeyes joined 15:05 geospeck joined 15:06 silug joined 15:07 scimon joined 15:10 piojo_ joined 15:11 Cabanossi left 15:12 Cabanossi joined
piojo_ lizmat: I was just thinking that if we had an :eqv adverb for set operations and the ∈ operator, it would solve a lot of problems 15:13
Because there are times when you know your objects are equal, and times when you know the operation should work based on a looser type of equality
15:14 mson joined
piojo_ lizmat: I also noticed lists aren't that different from pairs: they can also surprise about when .WHICH is a repeatable value versus dynamic. 15:16
m: say ('a').WHICH; say ('a', 'b').WHICH;
camelia Str|a
List|61131552
15:17
timotimo if you go with an equality function, you're suddenly going far up in complexity cost of operations
checking for presence of a single item in a set is amortized O(1), but if you have an equality function, you have to check against every entry of the set, which is O(n)
if you want to get the union or intersection or whatever of two sets, you're looking at O(m*n) instead of O(m+n) 15:18
piojo_ ‎timotimo: good point.
15:18 mcmillhj left
piojo_ Still, $elem ∈ @array is O(n) either way 15:19
But we care about more than that one case.
15:20 rindolf left 15:25 zakharyas left 15:28 zakharyas joined 15:29 mcmillhj joined 15:30 rindolf joined 15:35 geospeck left 15:36 philomath_ joined 15:38 traxex_ joined 15:40 setty1 left 15:41 traxex left 15:44 luiz_lha joined, luiz_lha is now known as Guest52692 15:46 Guest52692 is now known as luiz_lha 15:47 khw joined 15:53 ExtraCrispy left
comborico1611 Have you guys check out my article in the Perl 6 Advent calendar? 15:54
!
DrForr Yep, read it this morning. 15:55
15:57 mcmillhj left
comborico1611 Ah! 15:58
That's exciting.
15:59 abraxxa left 16:02 mcmillhj joined 16:03 troys joined 16:04 wamba joined, traxex_ left, traxex joined
scimon Not sure why an intro to programming book needs to cover the Principle of Least Privilege. I mean... I had to go look it up just now. 16:14
But I am not one to talk. I've still got to write my article. Working on it. 16:16
DrForr Mine's coming up tomorrow... 16:17
I've been doing programming for the last 25+ years and I think this is the first time I'v heard of Principle of Least Privilege. Not being critical, but curious. 16:18
Oh, that. Yeah, that makes perfect sense, maybe it just needs to be restated differently. 16:20
scimon Meanwhile I'm getting my head around WHICH and putting Objects in Sets. Which is fun. 16:21
comborico1611 It may not be known by that name, but what is it commonly called? 16:23
(speaking of principle of least privilege) 16:24
16:24 lowbro left
scimon It's a good name it's just... It's not something I think you need to know when you're initially learning to code. IMO. 16:25
tbrowder comborico11: i scanned it—looks like some good thoughts 16:30
16:30 damnlie left 16:33 scimon left, troys is now known as troys_, damnlie joined 16:37 troys_ is now known as troys 16:41 domidumont1 left, st_elmo joined 16:46 wamba left 16:47 wander left
DrForr I find that starting without typing and adding typing later on is a great approach. You can get very deep into typing, some languages like ML and Haskell rely on it. 16:51
16:54 mcmillhj left, pok_ joined, damnlie left, pok_ left, damnlie joined 17:02 ShalokShalom left
perlpilot As a corollary to that I guess, we have some code at $work where the author came from a Java background and put type constraints on everything and over the last several months we've been removing type constraints where they were over-zealous because it was causing problems as things were refactored or new features were added. 17:06
so, yeah, starting with minimal types and adding as-needed is the way to go.
17:06 ChoHag joined 17:07 luiz_lha left, mcmillhj joined 17:16 troys is now known as troys_
Ulti Id say type distracts a lot from whats more important to learn starting out in programming, it puts people in the mindset programming is about correct syntax and boiler plate than solving real problems and they run into immediate frustration a number isnt just a number etc. 17:18
comborico1611 Thanks, tbrowder! 17:20
17:21 natrys joined
comborico1611 perlpilot, interesting. I should have added more language in the article that spoke to my preference that are programmers first language captures most of the other languages, in case they decide to move on to a different language it will be an easy transition. But I definitely learned something from your remark just now. 17:22
17:22 wamba joined
comborico1611 That a programmer's first* 17:23
17:23 mson left
comborico1611 Ulti, good point. I think your comment speaks to what I call Computer scientists in my article. 17:24
Ulti on twitter there was a nice example between python and perl6, reverse the order of digits in a number P6 1234.flip Py int(str(1234)[::-1]) I know which of those two is easier to teach to someone without having to get into what type is immediately
comborico1611 It is a balance between quickly being able to do something versus understanding how computer programs work. 17:25
perlpilot comborico1611++ for the advent article btw. My only suggestion would be to shorten the next one ;)
Ulti comborico1611: its more different languages pick different abstractions of how programs work, none of it is how a computer works 17:26
comborico1611 Haha. My wife said the same.
Ulti even assembly now isnt how a CPU works
comborico1611 Ulti, true. But some programming languages do much better at that than others.
Ulti given the whole thing is running a unix on the inside with a web server...
17:27 wamba left
comborico1611 perlpilot, I really had to go into the details of the book review because I didn't want to just say things and not have it backed up, and I already done the work of meticulous notes. 17:27
And I felt I really had to explain how I'm not like most computer programmers. If you can even consider me a computer programmer. 17:28
Ulti if you tell computers who's boss you are a computer programmer 17:29
comborico1611 heh
Ulti I think writing a blog post about programming probably qualifies you fairly immediately
17:29 araujo joined, AlexDaniel joined
comborico1611 But you're welcome, perlilot, it was a good opportunity to be able to right such an article for you all. 17:30
Haha, you kid.
Ulti no really
perlpilot comborico1611: I agree with Ulti here.
Ulti the idea of someone having imposter syndrome about being a programmer is kind of fun 17:31
17:31 albongo joined
comborico1611 Heh. Time will tell if i am. 17:32
Ulti someone should make a webpage where you accidentally write a program on the landing page to a test to find out if you're a programmer and you just immediately pass
perlpilot I've known many people who primarily identify as "journalist" or "scientist" or "mathematician" or "geographer" or "surveyor" or "physicist" .. etc. who are nevertheless "computer programmers"
It's just that they come at programming from a different need or mindset than those you'd call "CS types" 17:33
comborico1611 I see. That makes sense. 17:34
perlpilot In fact, even though I got a degree in CS, I think I know more people who are *not* CS types, but are still programmers.
17:35 domidumont joined 17:39 khisanth_ left
comborico1611 The real interesting part is that I want to master computer networking. I wonder how that looks for someone who is not the C S type. 17:39
I think it was moritz I told me a few weeks ago that he knows people that are really good at networking that don't program that much.
Who told me* 17:40
17:40 khisanth_ joined 17:41 ChoHag left
moritz yes. They know all about BGP, routing, VPLS and that stuff 17:41
comborico1611 The routing algorithms were tough for me. I skipped them... 17:42
Did you read my article, moritz?!
17:43 ChoHag joined, traxex left
comborico1611 You, and that Brian d foy guy, and lawrence, are the target our audience. 17:43
Ulti I mean people working from sockets consider that network code too though
17:44 traxex joined
Ulti application level protocols you dont need to be down and dirty with union types inspecting packets 17:44
17:45 wamba joined 17:47 dakkar left, geospeck joined 17:48 cdg left 17:49 cdg joined, wamba left
moritz comborico1611, did you read my book? :-) 17:52
comborico1611: I've read parts of your article, but not all
17:53 piojo_ left 17:54 zakharyas left, domidumont1 joined 17:57 domidumont left 17:59 setty1 joined
comborico1611 Haha. Nope. But my article is free. Haha 18:04
Thanks!
I don't expect you to. I'm just curious if you did. I guess I should wait for people to comment first.
18:07 traxex left 18:08 traxex joined 18:12 rindolf left 18:14 rindolf joined 18:18 troys_ is now known as troys, philomath_ left 18:24 rindolf left 18:30 rindolf joined 18:35 mson joined
hahainternet is there a way to use non string keys for a hash in a way that doesn't require overriding the WHICH method? for example, lists? 18:38
18:39 darutoko left
timotimo subclass the hash and implement the stuff there? :S 18:44
hahainternet timotimo: :/ that is a bit of a wart 18:46
looks like it'd be better to define custom list type and make it a 'value type' by p6's defs?
timotimo that's also possible, but i thought that falls under "overriding the WHICH method" 18:47
[Coke] what's wrong with the existing non-string-key hash variant?
hahainternet [Coke]: it uses ===, and so (1,2,3) === (1,2,3) is false 18:48
timotimo: ah, yeah my fault for constraining that
i should have asked for the nicest way, ideally not overriding WHICH
timotimo time to bring parcel back %) 18:49
hahainternet doesn't get it ☺
timotimo it was a thing that existed before the GLR
think of it as "lazi decision whether to flatten or to structurize listy things"
hahainternet roger 18:50
well i would throw a vote behind immutable lists testing equality based on values
ie 'value types'
but i don't know what issues that would cause
and i'd appreciate advice on the best way to implement my own type
MasterDuke hahainternet: you couldn't use a set instead of a list?
timotimo List is doing double-duty for lazy lists as well, so there'd have to be a lot of care taken with regards to WHICH on lazy lists vs fully reified lazy lists etc 18:51
hahainternet MasterDuke: the same issue occurs doesn't it?
hmm, apparently not
lists and sets are unfortunately not synonymous
perhaps a Tuple type? ;)
timotimo yeah, sets are lists minus ordering and multi-containering
DrForr waves at MasterDuke 18:52
hahainternet i assume i should be able to construct this as List but Tuple or similar if my Tuple type implements WHICH based on values? 18:54
MasterDuke DrForr: hello hello. btw, do you know if your talk is online yet? since i got in late i missed it
DrForr Dunno. 18:55
18:55 rindolf left
DrForr Let me check. 18:55
timotimo hahainternet: and take extra care to decontainerize everything and anything that comes in
18:55 wamba joined
timotimo and not allowing anything mutable in it 18:56
hahainternet the mutable part is certainly important
but as long as i called WHICH on any container, that should be fine right?
i suppose given it returns basically plaintext
that's not safe
timotimo well, if you want to have something compare truthfully against something you put into a hash, you'll have to be able to produce the same WHICH
DrForr I don't see 2017 up at all yet. 18:57
It wsn't much of a talk; I was on early enough that I just did a brief routine and then got some audience participation going.
hahainternet interesting that sets seem to encode their contents in some form
-> Set.pm 18:58
(in calls to WHICH i mean)
timotimo it's a sha1 hash
hahainternet roger, i shall adopt the asme
as that is safe
timotimo zefram found a million different ways to create things that are very much not the same, but have the same WHICH
basically WHICH-injection attacks :)
hahainternet indeed, which is quite a serious issue 18:59
but hashing the contents makes perfect sense
and is what's used elsewhere safely, so that answers my q
lizmat FWIW, I would be in favour of List.WHICH as a value type if it doesn't have any containers 19:03
[Coke] what's wrong with the existing non-string-key hash variant? 19:06
(oops)
lizmat ? 19:07
hahainternet lizmat: can you elucidate on the issue with containers? couldn't it 'simply' call WHICH on them also and hash them?
lizmat hahainternet: what we don't want is that the .WHICH of an object changes over the lifetime of the object 19:08
hahainternet ah, so it should be memoizable etc
i'm with you
lizmat if you would call .WHICH on it like that, you would be able to change either the content of the object without .WHICH changing (it being memoized) 19:09
19:09 cdg left
lizmat or change .WHICH if it was not memoized 19:09
either one of those are bad
hahainternet roger, it's semi irrelevant for my use case at the second but i understand why it's an issue now
19:09 cdg joined 19:10 rindolf joined
hahainternet i would say a Tuple type or similar would be a good match there, a List which cannot store containers? I don't know the fine grained details though ☺ 19:10
lizmat now, List.WHICH not having a value type .WHICH is really an optimization issue
19:10 troys is now known as troys_ 19:14 cdg left
DrForr Design question - I'm doing a rewrite of Pod::To::HTML so that it can hopefully be subclassed. The core is an object tree of Pod::Heading.new( :content(Pod::Item.new(...)) and so on. I'm writing one multi method visit(Pod::Item $node){} per class that Pod::To::RawHTML's children can subclass and pervert at will. Short of trying to injet a 'walk' method into the Pod::* class hierarchy, is there a better way to do what I"m after? 19:21
It's not too fragile in that I can have a multi method visit( $node ) {} that catches stuff I'm not aware of, but I"m ondering if there's a better way. 19:25
19:25 thou joined
hahainternet seems i can't use 'but' as it creates some sort of implicit middle type with its own WHICH implementation 19:26
19:29 rindolf left
geekosaur that's its purpose 19:32
it's generating a class on the fly with the lhs's type and the rhs's type mixed in 19:33
timotimo i believe most which implementations will put their type name (longname?) in the beginning 19:34
and mixing in something will influence the type's name
m: say (1 but "foo").^name
camelia Int+{<anon|64479952>}
lizmat DrForr: that feels like an iterator to me ? 19:35
DrForr Ah, right, thanks for the reminder.
19:36 unicodable6 left
DrForr I'll do it this way then switch over... 19:36
19:36 unicodable6 joined, ChanServ sets mode: +v unicodable6, committable6 left, committable6 joined, ChanServ sets mode: +v committable6
hahainternet geekosaur: yeah understood, i was hoping i'd be able to override things on it 19:38
defining a proper class seems sufficient though
geekosaur yes
'but's the quick and dirty one, if you need more control then you need to make the mixin yourself 19:39
(although in fact you can use it to make behavior changes. x but { method x { ... } } iirc
it's just annoying enough that you;re usually better off making a real mixin class 19:40
19:45 cdg joined 19:48 silug left 19:50 cdg left 19:53 rindolf joined 19:55 domidumont1 left
thou DrForr, have you looked at this branch in Pod::To::HTML? github.com/perl6/Pod-To-HTML/tree/...od/To/HTML 20:00
yoleaux 05:26 MST <tbrowder> thou: can you list the pod bugs you need to have fixed?
DrForr No, I hadn't. And that's about what I was looking for. 20:01
thou++ 20:02
thou DrForr, I'm maintaining Pod::To::Markdown, I'm hoping to rewrite based on Pod::TreeWalker 20:03
20:03 Cabanossi left
thou I'd like to rewrite all of them w/ common underlying framework 20:03
hahainternet so i'm running into a problem in experimenting with this in that I can't find a way to build a class that `is List` that can be constructed without replacing each list element with a scalar container 20:04
i hope that is clear, it's tricky to know how to explain it
20:06 Cabanossi joined
DrForr fires of a 'git clone'... 20:06
*off
El_Che it's not that bad, don't burn it
git revert will do :)
20:09 nightfrog left, mcmillhj left
thou tbrowder, I'm especially concerned with 114480, and the recently-"fixed" =Html as raw HTML changes, and Pod::Block::Named in general is not right, IMO. The Pod::Raw is what named blocks are supposed to be for. The things that are currently called named blocks shouldn't be, e.g. the current Pod::Block::Named with .name 'para' should be a normal Block::Para (core should join the lines together for us, that shouldn't be something Pod formatters are handling!). 20:09
tbrowder, I'm basing my "should" language on what S26 says, as I *love* S26 in all ways and think it's a flawless design which can never be improved upon. 20:11
Or, at least, the status quo is certainly no improvement on S26. Hopefully I can get assent on that much. ;-) 20:12
DrForr, there's a couple older branches in there attempting the same thing. I haven't dug into them, but Pod::TreeWalker is fairly complete. There's also an old branch of docs that uses autarch's Pod::To::HTML branch. It has a subclassed renderer IIRC that you might find interesting. 20:15
DrForr If you're woring with Pod::TreeWalker I'm happy with starting with that as a basis.
*working 20:16
hahainternet so from what i can tell, the | operator will change list contents into scalar containers of their content for all the invocations i have tried
including Captures, which is a bit odd
DrForr I admit I'm a touch surprised yet gratified to see autarch doing P6 work, helps ratify things a bit. 20:17
thou So far I don't have anything worked up, I've just been exploring the universe of what's been done. I wanted to reach you / tbrowder / wander / whoever before forging ahead. 20:18
20:18 rindolf left
thou 'tis stale for 2 years, but I agree I was pretty happy. He wrote a nice blog post around that time saying that he was enjoying working with it. 20:18
DrForr Good to know. I've been thinking of making a clean break from the current Pod::To::HTML because the existing code is pretty much impossible to subclass. 20:19
thou And apparently got a new job shortly after, ...
20:30 natrys left, mingdao left, xinming left, jeek left, BinGOs left, perigrin left, robinsmidsrod left, tailgate left, noganex left, stmuk left, Actualeyes left, lookatme left, titsuki_ left, john_parr left, Cabanossi left, geospeck left, ChoHag left, albongo left, Morfent left, S007 left, bisectable6 left, patrickz left, m0ltar left, scovit left, SHODAN left, iviv left, pnu__ left 20:31 karthyk left, jnap_ left, traxex left, setty1 left, sjn left, melezhik left, xxpor_ left, itaipu left, sergot left, a3f left, khw left, comborico1611 left, Grauwolf left, jhill left, arnsholt left, joy left, integral left, skaji left, MasterDuke left, tyil[m] left, mspo left, alpha6 left, KotH left, khisanth_ left, itaylor57 left, reportable6 left, releasable6 left, ufobat_ left, yoleaux left, evalable6 left, benchable6 left, epony left, sivoais left, cibs left, marcusramberg left, troys_ left, nebuchadnezzar left, profan left, f3ew left, damnlie left, ZzZombo left, relaxed left, leah2 left, s0me0ne-unkn0wn left, mst left, timeless left, st_elmo left, chansen_ left, zostay left, squashable6 left, greppable6 left, dj_goku left, riatre left, ccakes left, Phlogistique left, araujo left, klapperl left, ryn1x left, lizmat left, jnthn left, dogbert17 left, Util left, ilbelkyr left, Sgeo_ left, piojo left, telex left, krunen left, wamba left, mson left, eliasr left, xcm left, avalenn left, TimToady left, jcallen left, gdonald left, geekosaur left, daxim left, Voldenet left, NEveD left, ccntrq left, kaare__ left, TreyHarris left, timotimo left, DickClarke left, sftp left, jsimonet left, rodarmor left, jkva_ left, peteretep left, ingy left, Mithaldu left, dylanwh left, thou left, aindilis left, ilbot3 left, mniip left, samcv left, R0b0t1` left, notbenh left, cpup left, konsolebox left, TEttinger left, astj left, Levex left, mantovani left, tony-o left, musca left, shadowpaste left, protium left, DrForr left, sunnavy left 20:48 salva joined, cpage joined, go|dfish joined, pecastro joined, APic joined, mingdao joined, natrys joined, pdcawley joined, cgfbee joined, xcm joined, ccakes joined, benchable6 joined, ggherdov joined, BooK joined, rindolf joined, SHODAN joined, squashable6 joined, Cabanossi joined, thou joined, wamba joined, mson joined, traxex joined, setty1 joined, geospeck joined, ChoHag joined, khisanth_ joined, albongo joined, araujo joined, damnlie joined, st_elmo joined, troys_ joined, khw joined, Actualeyes joined, eliasr joined, sjn joined, comborico1611 joined, Morfent joined, ZzZombo joined, konsolebox joined, S007 joined, Grauwolf joined, chansen_ joined, itaylor57 joined, melezhik joined, zostay joined, iviv joined, pnu__ joined, leguin.freenode.net sets mode: +v squashable6, relaxed joined, aindilis joined, avalenn joined, greppable6 joined, xxpor_ joined, TimToady joined, jhill joined, klapperl joined, jcallen joined, ufobat_ joined, ilbot3 joined, ryn1x joined, bisectable6 joined, patrickz joined, mniip joined, lookatme joined, m0ltar joined, TEttinger joined, xinming joined, itaipu joined, gdonald joined, epony joined, arnsholt joined, leah2 joined, geekosaur joined, jnthn joined, jeek joined, lizmat joined, daxim joined, BinGOs joined, samcv joined, Voldenet joined, perigrin joined, NEveD joined, ccntrq joined, kaare__ joined, dogbert17 joined, TreyHarris joined, timotimo joined, DickClarke joined, sftp joined, scovit joined, Util joined, Phlogistique joined, astj joined, titsuki_ joined, dj_goku joined, leguin.freenode.net sets mode: +vvv greppable6 ilbot3 bisectable6, R0b0t1` joined, cpup joined, robinsmidsrod joined, sergot joined, john_parr joined, ilbelkyr joined, MasterDuke joined, Sgeo_ joined, tailgate joined, noganex joined, piojo joined, stmuk joined, a3f joined, riatre joined, notbenh joined, sivoais joined, joy joined, nebuchadnezzar joined, integral joined, s0me0ne-unkn0wn joined, telex joined, krunen joined, yubimusubi joined, bhm_ joined, perlbot joined, Levex joined, grumble joined, dustinm` joined, ribasushi joined, mtj_ joined, eythian joined, john51 joined, Juerd joined, ecocode_ joined, xi- joined, vike joined, huf joined, eater joined, b2gills joined, squain joined, Celelibi joined, dogbert2 joined, perlpilot joined, BuildTheRobots joined, parisba joined, tomaw joined, SCHAPiE joined, charsbar joined, breinbaas joined, preaction joined, leedo joined, giraffe joined, ponbiki joined, Alikzus joined, japhb joined, MilkmanDan joined, gfldex joined, aeruder_ joined, mephinet joined, reu joined, jferrero joined, Grrrr joined, a3r0 joined, tokik joined, masak joined, mattp_ joined, phogg joined, Exodist joined, syntaxman joined, imcsk8_ joined, hcit joined, cxreg joined, tinita joined, teatime joined, incredible_ joined, moritz joined, samebchase joined, obra joined, literal joined, avar joined, leedo__ joined, Gothmog_ joined, gabiruh joined, [particle]1 joined, japanoise joined, bonsaikitten joined, El_Che joined, hythm joined, TeamBlast joined, tabv joined, erdic joined, [Coke] joined, hobbs joined, u-ou joined, afresh1 joined, diegok joined, hahainternet joined, ambs_ joined, buggable joined, huggable joined, nekomune joined, cosimo joined, broquaint joined, dpk joined, Spot__ joined, lumimies joined, notbenh_ joined, Praise joined, jdv79 joined, obfusk joined, kipd joined, scott joined, shmibs joined, SmokeMachine joined, clkao joined, Altreus joined, pm5 joined, stux|RC joined, lucs joined, perlawhirl joined, olinkl joined, hoelzro_ joined, plicease_ joined, ilmari joined, andrewalker joined, domm joined, Bucciarati joined, roguelazer joined, raydiak__ joined, cono joined, bartolin joined, esh joined, camelia joined, renormalist joined, simcop2387 joined, rjbs joined, no-n joined, ZofBot joined, leguin.freenode.net sets mode: +vvvv buggable huggable camelia ZofBot, kent\n joined, stux|RC-only joined, PotatoGim joined, tardisx joined, tyil joined, Ulti joined, dg joined, jantore joined, pierrot joined, mrsolo joined, spider-mario joined, DarthGandalf joined, nine joined, [ptc] joined, sacomo joined, mspo joined, skaji joined, jsimonet joined, karthyk joined, alpha6 joined, profan joined, KotH joined, rodarmor joined, f3ew joined, jkva_ joined, peteretep joined, mantovani joined, tony-o joined, mst joined, musca joined, cibs joined, jnap_ joined, shadowpaste joined, protium joined, timeless joined, marcusramberg joined, DrForr joined, sunnavy joined, ingy joined, Mithaldu joined, dylanwh joined, go|dfish left, APic left 20:49 go|dfish joined, mcmillhj joined 20:52 APic joined 20:54 mcmillhj left 20:56 khisanth_ left 20:58 st_elmo left
MasterDuke dpk: you run yoleaux, correct? it dropped from #perl6, #perl6-dev, and #moarvm 20:59
20:59 yoleaux joined 21:00 ChanServ sets mode: +v yoleaux
dpk fixed 21:00
it's been doing that a lot lately. dunno why
it's supposed to restart automatically when it loses connection
MasterDuke dpk: cool, thanks
21:06 troys_ is now known as troys 21:07 cdg joined 21:08 mcmillhj joined 21:09 khisanth_ joined
thou advent admins: it may be considered LTA to have an unanswered question from 2009 as the only comment on perl6advent.wordpress.com/about/ ? I think it'd be ethical to remove that comment, and would improve user experience IMO. 21:14
Also, I guess it is a reasonable question to have answered on the About page, too. :-D 21:15
tbrowder thou: i’ve taken a look at RT #114480 and a possible solution with what we have now with no grammar change, just all in src/Perl6/Pod.nqp and src/core/Pod.pm. It would invove adding attrs to the Perl 6 Pod::Block::Table class and could be backwardly compatible if need be. Otherwise, I would make each cell a pod formatting class.
synopsebot RT#114480 [open]: rt.perl.org/Ticket/Display.html?id=114480 [POD] Pod table cell contents should be parsed as para
thou tbrowder, I think incremental improvement is good. I am interested in making grammar fixes, but (especially if I'm doing it) those can take longer to work out. 21:17
hahainternet so, it seems that if you use a slip in List.new() it will containerise every element of that list, the only obvious reason i can see is perhaps that List's new Signature is **@things, and I believe that is coercing the slip (or Capture) to an array, enforcing the containers 21:18
tbrowder But before any of that happens I would like to see LLfourn’s PR merged (PR #651) to simplify twines 21:19
hahainternet when a function takes a capture, that doesn't seem to happen, although i don't know if captures destructure embedded lists 21:22
but i'd like some comment on whether this is correct behaviour, as it's certainly surprising
OVH seems to be having proper internet issues too so apologies if i don't reply promptly if anyone wants to comment 21:23
21:23 geospeck left
thou I've been thinking about creating a facade, maybe in userspace (i.e., Pod::TreeWalker, Perl6::Pod, or something) that takes the current parse and munges it with whatever hacks needed. E.g., to fix my pet peeve about named blocks, it would rewrite ::Named objects to ::Para or ::Heading or whatever is appropriate, etc. Then the user-facing tools (Pod::To::HTML, etc.) could be rewritten to use the facade whenever, and then as the grammar is fixed the facade 21:24
can be reduced until eventually it's just passing everything through. That would enable gradually fixing the parsing without breaking stuff too much, maybe. It sounds kind of baroque to describe it but I think it could be doable.
21:24 eliasr left
perlpilot thou: "as the grammar is fixed"? you're an optimist ;) 21:25
21:26 comborico1611 left, comborico1611 joined 21:27 comborico1611 left
thou Well, I see I opened 114480 5 years ago, and now tbrowder has a fix planned, so it seems like I have good reason for my optimism! 21:27
DrForr gets a skeleton together for the new BlogspotHTML parser. 21:28
s/parser/walker-and-generator/
21:29 rgrau joined
thou cool 21:29
21:30 comborico1611 joined 21:31 kitsunenokenja joined, comborico1611 left 21:32 benchable6 left
DrForr 'end' "events" don't seem to be firing. 21:33
21:38 cdg_ joined
DrForr Ah, nm, 'start' needs to return True. Probably useful for something. 21:38
21:38 troys left, nebuchadnezzar left, vike left, squain left, japhb left, phogg left, cosimo left, raydiak__ left, bartolin left, spider-mario left, profan left, f3ew left 21:40 cdg left
thou tbrowder, is PR #651 in progress still? 21:42
21:43 raiph joined
thou DrForr, yes, it's like `find ... -prune`, to skip chunks of Pod that you're not interested in 21:43
DrForr Ah, right, chidren in a heading, that sort of thing. 21:44
*children
tbrowder thou: it looks like it stalled, but should be fixable. i haven't talked to anyone about it except to make a comment there.
moritz \o 21:45
thou So it likely needs merged into current and spectest updates, at the very least.
moritz it looks like the regex+grammar book is being release right now 21:46
proof-readers are getting their ebook copy now
and www.apress.com/us/book/9781484232279 lists it as available (though a commenter on the p6 advent thread mentioned it disappears later in the checkout process)
thou congratulations! 21:47
El_Che moritz: nice to hear
tbrowder anyone having trouble with Zoffix's advent highlighter?
El_Che moritz: finished your previous book today
tbrowder I keep getting exceptions and am about to go back to the original one.
moritz ... and github.com/apress/perl-6-regexes-and-grammars/ is live (source code examples)
DrForr tbrowder: Did yesterday with either timeout or socket fail. 21:48
moritz El_Che: that's nice. Please write a review on amazon! :-)
El_Che moritz: I will
moritz tbrowder: thanks
tbrowder moritz: for...?
21:49 wamba left
timotimo tbrowder: will you tell us what kind of exceptions you're getting? 21:50
moritz sorry, meant thou :-)
mis-tab-completed 21:51
tbrowder www.irccloud.com/pastebin/Nf7DvjGl/
thou ;)
21:52 natrys left
tbrowder i've upgraded or forced install of all the modules mentioned. my src file isn't in pretty form which could be the problem i guess. 21:52
21:52 comborico1611 joined
tbrowder i have the github gist auth token defined in the required env var 21:53
21:54 ctilmes joined
timotimo did you look ta the gist it made? 21:55
hahainternet hey timotimo, got a second?
21:55 mson left
timotimo hahainternet: i'll be a bit distracted, but maybe i'll be able to help 21:55
what's up?
hahainternet nevermind, lizmat just fixed it lol
tbrowder no...
hahainternet timotimo: github.com/rakudo/rakudo/commit/d8...4122802698 21:56
lizmat: many thanks ♥
timotimo cool
hahainternet sorry to bug you, you authored the original line at issue you see 21:57
timotimo gist.github.com/tbrowder/5b639366a...28465d93e1 - tbrowder does that ring any bells?
tbrowder yep--i think the code is too ugly to handle at the moment...i'll report later if i have any trouble after clean up 21:58
timotimo which one was the line you stumbled upon ooc?
hahainternet timotimo: the method signature 21:59
22:02 troys joined, nebuchadnezzar joined, vike joined, squain joined, japhb joined, phogg joined, cosimo joined, raydiak__ joined, bartolin joined, spider-mario joined, profan joined, f3ew joined
timotimo i was much less smarter then ... 22:02
22:02 ctilmes left, troys left
Morfent how come i can call idn2_to_ascii_8z(''), but trying to call idn2_to_ascii_8z('', 0) or idn2_to_ascii_8z('', 0, $code) throws X::Multi::NoMatch? hastebin.com/bogiqapepu.pl 22:03
22:03 raiph left, raiph joined 22:05 rindolf left, mcmillhj left
timotimo does it get better if you make the proto's signature Str, $?, $? or something? 22:06
Morfent nope 22:07
timotimo and without a proto entirely? 22:08
Morfent Cannot use 'our' with individual multi candidates. Please declare an our-scoped proto instead 22:09
timotimo ah
ok, can you try "is export" instead of "our proto"
i.e. no "our" in front of the multis, either
tbrowder timotimo: looks like this line which was not within code brackets: "===SORRY!=== Cannot iterate object with P6opaque representation" 22:11
thou multi sub idn2_to_ascii_8z(Str $input, int32 $flags) {
("in:", $input, " flags:", $flags).gist;
}
say idn2_to_ascii_8z('HI', 0);
^ That fails, but remove 'multi' and it succeeds 22:12
with multi, Int works, but int32 doesn't 22:13
22:14 setty1 left
hahainternet lizmat: the behaviour seems the same to me after doing `rakudobrew build moar d80df073ada4d4bc3e32afc2d11f974122802698` 22:16
i'll see if i can figure out what i'm doing wrong tomorrow, thanks for looking though! 22:17
guess i should add a test
lizmat yes, pls :-)
tbrowder timotimo: even within ``` the line causes a failure.
Voldenet well, that's because Int isn't int32
m: multi sub idn2_to_ascii_8z(Str $input, int32 $flags --> Str) { "" }; idn2_to_ascii_8z("", 0); #fails 22:18
camelia Cannot resolve caller idn2_to_ascii_8z(Str, Int); none of these signatures match:
(Str $input, int32 $flags --> Str)
in block <unit> at <tmp> line 1
Voldenet m: use nqp; multi sub idn2_to_ascii_8z(Str $input, int32 $flags --> Str) { "" }; idn2_to_ascii_8z("", nqp::unbox_i(0)); #works
camelia ( no output )
DrForr There, did a subclassable renderer for the NAME, AUTHOR &c tags.
22:20 Zoffix joined
Zoffix hahainternet: along with lizmat's fix, you.d need `List.new: |@a.List` or `List.new: |@a».<>` 22:21
Morfent ah there we go 22:22
thanks thou
Zoffix Morfent: thou: Ints automatically get downgraded to int32 (or other natives) only for `only` routines. For multies, the match need to be exact (you'd need to pass a native to natives). So you'd either need an `Int` candidate or call with `idn2_to_ascii_8z('', my int32 = 0)` 22:23
hahainternet Zoffix: sorry i was getting some food, i am already doing that :)
the problem is that the list becomes containerised
Zoffix `idn2_to_ascii_8z('', my int32 $ = 0)`, I mean
hahainternet: for which code?
thou thanks, Zoffix++
hahainternet Zoffix: List.new(<1 2 3>».Int) or similar exhibits it
sorry i have to eat this before it gets cold, i'll be around briefly afterwards if i can help to resolve this 22:24
it seems using a capture works, but i don't know nqp well enough to help there
22:24 itaipu left
Zoffix hahainternet: you don't need ».Int part on it. You don't have containers in the first place and that will create a List with a single item in it: the other list 22:24
hahainternet Zoffix: i think i've tried every combination, so an example would be superb :) 22:25
Zoffix hahainternet: you're missing the slip
hahainternet: not sure what example to use, considering the code you showed above doesn't need a List.new 22:26
hahainternet m: say List.new(|<1 2 3 4>)[0].VAR.^name 22:27
camelia IntStr
hahainternet interesting
i get a different result locally
Zoffix hahainternet: did you build lizmat's commit?
hahainternet i thought so
22:27 itaipu joined
Zoffix hahainternet: perl6 -v 22:27
hahainternet i specified it to build moar, but i guess i'll go off and build it indivdualy
2017.10-4-g4fca94743 22:28
so i guess not :/
Zoffix hahainternet: that's over a month old
hahainternet yes, i guess rakudobrew did not switch correctly
Zoffix hahainternet: you didn't switch
It doesn't switch automatically, unless you just re-do `rakudobrew build moar` to re-build the head 22:29
22:29 kitsunenokenja left
hahainternet Zoffix: seems if you do 'build moar commitid' then do 'switch moard-commitid' it will say it is switching, but do nothing :) 22:29
that solves why that's happening though at least
doing a self-upgrade atm just in case 22:30
Zoffix hahainternet: works fine for me. Do you even need multiple versions of rakudo tho?
hahainternet Zoffix: probably not, moar-blead or just moar for including lizmat's commit?
22:30 cdg_ left
hahainternet or just moar commitid? 22:30
Zoffix hahainternet: just moar 22:31
huggable: sauce
huggable Zoffix, Install untested latest development version of Rakudo from source: github.com/zoffixznet/r#table-of-contents
22:31 cdg joined
Zoffix hahainternet: ^ or you can toss rakudobrew altogether and not deal with its quirks 22:31
hahainternet roger that, thank you
Zoffix hahainternet: anyway, that will fix `List.new(|<1 2 3 4>)[0].VAR.^name` for you. But that'd fail for very large lists 22:32
m: List.new: |(^10_0000)
camelia Too many arguments in flattening array.
in block <unit> at <tmp> line 1
Zoffix hahainternet: so you should consider coersing some other way. Like, just use .List coercer instead of List.new
m: (^10_0000).List
camelia ( no output )
Zoffix But as I've said, <1 2 3 4> is already a List. Not sure why List.new is needed.
hahainternet Zoffix: this was originally about creating a subclass that 'is List' but has a WHICH behaving as a value type 22:33
and degenerated into finding why suddenly my list was full of containers
Zoffix Ah
OK.
Zoffix &
22:33 Zoffix left
hahainternet that limit in flattening above seems exceedingly strange 22:35
i'd like to read why that's a thing 22:36
timotimo you mean "too many arguments in flattening argument list"? 22:38
hahainternet yeah, it seems like it means you can't really construct anything analogous to a list 22:39
tbqh it seems stranger than that, because why would there be an arbitrary limit on list flattening? 22:40
timotimo because of how arguments are passed
MasterDuke it's not really a limit on how big a list can be flattened (i believe), but on how many arguments can be passed to a function 22:41
timotimo m: say(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) 22:42
camelia 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
timotimo hm, that's enough
mspo 1, damn it!
hahainternet so i don't mean to sound negative, but doesn't that mean 'is List' can't actually work, as if your list is long enough, you can't construct your new type? 22:44
perhaps it just means you can't use the default List constructor :/
22:49 cdg_ joined 22:50 mcsnolte joined
jnthn You can use .from-iterator instead 22:51
22:52 cdg left
jnthn Which, I'd hope, respects subclassing 22:53
timotimo m: say [//] 1 xx 100000
camelia 1
timotimo m: say [//] 1 xx 10000000
camelia 1
timotimo ISTR that also gave the "too many items in flattening list" error at one point
bisect: say [//] 1 xx 100000
bisectable6 timotimo, On both starting points (old=2015.12 new=d80df07) the exit code is 0 and the output is identical as well
timotimo, Output on both points: «1␤»
timotimo OK!
jnthn In general, though, avoid flattening huge numbers of arguments.
timotimo well, for other ops maybe
22:53 cdg_ left
timotimo but then we got [+] special-cased 22:54
jnthn It's a sure-fire way to make sure things will run slow.
22:55 traxex left
lizmat what's the idiom again to mix in an attribute into an existing object and assign a value to that attribute in one go ? 23:02
jnthn $obj does RoleName($value) 23:05
23:05 mson joined
lizmat jnthn++ 23:05
23:09 llfourn joined
comborico1611 What does the ++ do? 23:10
lizmat increases karma for jnthn on an imaginary karma keeper
tbrowder .tell timotimo the old advent md2html from Zoffix seems to do fine.
yoleaux tbrowder: I'll pass your message to timotimo.
23:11 Geth left, Geth joined, ChanServ sets mode: +v Geth
comborico1611 Oh. Thanks! 23:11
lizmat sleep& 23:12
23:13 Sgeo_ left 23:15 Sgeo joined 23:20 kerframil joined 23:21 daxim left 23:22 tinita left 23:23 daxim joined, tinita joined 23:30 Aceeri joined, Aceeri is now known as Guest11217 23:32 kerframil left 23:40 Cabanossi left 23:42 Cabanossi joined 23:49 raschipi joined 23:55 rgrau left 23:59 Sgeo left