»ö« 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:00 gfldex left
AlexDaniel here's the ticket: github.com/rakudo/rakudo/issues/1259 00:00
jnthn That's the flags. 4 is MVM_FRAME, 16 is MVM_CF_SECOND_GEN, 128 is MVM_CF_GEN2_LIVE
Nothing looks out of order there, MVM_gc_debug_find_region agrees the memroy address is in thread 1's gen2, and owner is gen2 00:01
00:04 gfldex joined 00:05 mr-foobar joined
jnthn Not immediately sure what's up, will need to poke further when it's not 1am. :) The object doesn't seem corrupt in general, but the SC indexes are indeed pretty bonkers 00:05
timotimo is it at all possible to record this run with rr? 00:06
i believe rr is installed on that server
AlexDaniel it is instaled, and I can install more stuff if needed
timotimo then you could set a watchpoint on the sc idx
and reverse-cont to the place it gets changed at 00:07
AlexDaniel has no idea how to do that 00:08
00:10 khw joined
jnthn It's a good idea, and I can probably figure it out when better rested. :) 00:10
timotimo put "rr record -n" in front of the /foo/bar/moar ... perl6.moar ... commandline
then later you can "rr replay" and it'll be just like a gdb session 00:12
00:21 Rawriful left
jnthn Will try and give that a go tomorrow 00:23
For now, 'night all o/
ZzZombo What does it mean "Cannot resolve caller AUTOGEN(<...>), none of these signatures match: <...>"? 00:24
timotimo calling a multi with arguments that don't match
i'm not sure why it sometimes gives that kind of error
ZzZombo um... out of all of the candidates, one is supposed to handle the base class of my argument, but it fails? 00:31
00:33 itaipu left
ZzZombo `multi method unset(::?CLASS:D: Grammar::VDF::Node:D $kv --> ::?CLASS:D)` 00:33
`if $el ~~ Grammar::VDF::Section|Grammar::VDF::Key-Value` # the calling code checks for stricter type
What gives?
00:34 itaipu joined 00:38 astronavt joined
timotimo not sure, what does it claim to have in the caller portion of the error? 00:39
ZzZombo `Grammar::VDF::Section.new(<...>)`... 00:40
timotimo so a section or key-value, those are both nodes? 00:41
ZzZombo yes, they inherit from it. 00:42
timotimo ISTR a bug with :D types that could cause things to be confused about things coming in from modules
ZzZombo but they are declared in the same module.
That still counts?
timotimo oh, hmm 00:43
does anything change when you drop the :D?
00:43 astronavt left 00:44 astronavt joined, astronavt left, cdg joined 00:45 aborazmeh joined, aborazmeh left, aborazmeh joined, char_var[buffer] joined 00:46 astronavt joined 00:48 cdg left
ZzZombo Same thing. 00:49
timotimo ok, so it's not that
i'll go to bed now, so can't help much more :( 00:50
ZzZombo gn 00:51
timotimo seeya
00:52 itaipu left
ZzZombo something actually changed 00:52
the new stack trace points to a different calling site. I'm investigating it.
00:54 ryn1x_ left 00:56 bisectable6 joined, committable6 joined, ChanServ sets mode: +v committable6, evalable6 joined 00:57 unicodable6 joined, releasable6 joined
ZzZombo You were right, timotimo, I overlooked it first because the error message was exactly the same, but the code did get further a step. 01:03
01:07 ryn1x_ joined 01:09 rindolf left 01:19 Xliff joined 01:23 lookatme joined
Xliff m: class A { has $.a = 'AA' }; A.a.say; 01:26
camelia Cannot look up attributes in a A type object
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: class A { has $.a = 'AA' }; A.new.a.say;
camelia AA
Xliff m: class A { has $.a = 'AA' }; A.instance.a.say; 01:27
camelia No such method 'instance' for invocant of type 'A'
in block <unit> at <tmp> line 1
01:31 comborico1611 joined
comborico1611 Good morning, Vietnam! 01:32
01:33 tejr left
comborico1611 Lieutenant Dan! 01:35
01:50 Aaronepower joined
ZzZombo This bug is nasty, it completely gobbles multiple dispatch in methods! 01:51
01:54 hello joined 01:56 ilbot3 left 01:58 Util left 01:59 ryn1x_ left, sergot left, masak joined, Util joined, masak is now known as Guest78206, sergot joined 02:01 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:04 llfourn left
lookatme :) o/ 02:06
comborico1611 Ah, you're back! 02:07
Good morning, Vietnam!
02:08 llfourn joined
lookatme Vietnam ? 02:08
02:10 Cabanossi left
geekosaur movie quote 02:12
(also the title of that movie iirc)
02:13 Cabanossi joined 02:29 cdg joined
Xliff Is GTK::Simple still the best way to build GUI Apps with Perl6? 02:32
02:33 cdg left 02:42 Cabanossi left 02:43 Cabanossi joined 02:44 mr-foobar left 02:45 ilbot3 left 02:54 Kyo91 joined 02:55 ilbot3 joined, ChanServ sets mode: +v ilbot3 03:02 comborico1611 left 03:07 noganex joined 03:10 noganex_ left 03:15 ufobat_ joined 03:16 Kyo91 left 03:17 HoboWithAShotgun left 03:18 ufobat left 03:26 pilne left
ZzZombo Why does multiple dispatch not redispatch to the other candidate here: 03:34
`nextwith (*.name eq $name),$default;`?
03:40 aborazmeh left 03:48 samcv left, samcv joined 04:02 raiph joined 04:05 astronavt left, astronavt joined 04:06 astronavt left 04:07 astronav_ joined 04:10 mson joined, astronav_ left
piojo1 ZzZombo: do you have an example with subs and args? 04:15
ZzZombo ah, I have rewritten the code by directly calling methods. 04:16
piojo1 nextwith worked in a little test I made, but there was probably a detail in your parameters that made it fail. Perhaps the parameters didn't actually agree with the other candidate? 04:17
ZzZombo but it's just two multis, one with a string parameter that turns that into a Block that returns whether $_.name matches the string, and the second takes a Callable matcher and returns first element from an internal array that the matcher matches. 04:18
04:21 astronav_ joined
piojo1 ZzZombo: sounds like it didn't work because the two multis weren't both candidates 04:22
nextwith calls the next candidate, for example if you have a multi that takes a scalar, a multi that takes a scalar where ~~ Int, and a multi that takes an Int 04:23
That would be 3 candidates, and the most specific is called
ZzZombo but in my REPL test, doing `$instance.can('method').candidates` showed just them.
if I were to guess, it's because of that `AUTOGEN` thing that somehow gets called instead of my methods, as was shown above. 04:26
04:27 Cabanossi left, Cabanoss- joined
ZzZombo What in hell?.. 04:28
04:28 Cabanoss- is now known as Cabanossi
ZzZombo `say "\n$kv.WHAT()\n$kv";` 04:29
returns
'Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block at tooltip-enhance.p6 line 318
"AbilityUnitDamageType" "DAMAGE_TYPE_MAGICAL"'
teatime oh man, are you theorycrafting? 04:30
piojo1 teatime: making shit up to try explaining an error? 04:31
ZzZombo so what's wrong with this is, $kv somehow is a Seq, even tho it's result of a `first` call that returns an object, then, the supposed object did correctly get stringified below the warning, but then calling a method on it finally dies because it thinks it's a Seq. 04:32
how am I making shit up??
piojo1 No, I'm making shit up
teatime piojo1: hehe, no, it's a gamer term, for figuring out the math behind the game, and optimizing builds etc. 04:33
geekosaur assumed that wwas a reference to what appears to be a dungeon crawler or sth?
piojo1 m: class C { multi method f($) { dd; }; multi method f(Int $) { dd; nextwith 5; }; }; C.new.f(4); 04:34
camelia method f(C $: Int, *%_)
method f(C $: $, *%_)
piojo1 m: class C { multi method f(Str $) { dd; }; multi method f(Int $) { dd; nextwith '5'; }; }; C.new.f(4);
camelia method f(C $: Int, *%_)
ZzZombo I omitted "Use of uninitialized value of type Seq in string context." at the start accidentally. Seriously, how can `$kv` be both a Seq and my object at the same time?
Again, it did get stringified correctly. 04:35
piojo1 ZzZombo: the results above agree with my explanation
It seems the `candidates` method isn't the same as the actual candidates when you have parameters. (And this is what I'd expect, but it does seem a weird naming contradiction)
teatime: oh, haha. Thanks 04:36
04:37 eliasr left
ZzZombo piojo1: okay, seems so. 04:37
04:58 eroux left 05:09 abhi12ravi joined
abhi12ravi .hug 05:09
huggable hugs everyone
05:09 abhi12ravi left 05:11 Cabanossi left 05:12 Cabanossi joined 05:13 hello left, xtreak joined
ZzZombo huh, I figured the last one out, one my method calls another as an one liner, implicitly returning the latter's value. Somehow, it ends up in another layer of `Seq` when in the first method, so I get a Seq in another Seq. 05:18
how can I fix that?
Marked the methods as raw, let's see if it fixes anything. 05:20
Nope. 05:23
05:28 hello joined
lookatme :) 05:39
05:42 Cabanossi left, Cabanossi joined 05:51 astronav_ left
ZzZombo So apparently there is subtle (or huge???) difference between doing `$.method-call` and `self.method-call` inside a method. 06:01
I can't explain it, but it's what caused the double-wrapping issue.
Converting the former to the latter solved it. 06:02
06:03 Guest78206 is now known as masak
ZzZombo timotimo, samcv, piojo1, geekosaur, can you explain it? 06:04
and everybody else as well, if you please.
teatime I didn't think $ was an alias for self 06:06
isn't it just the automatic state variable? 06:07
06:07 xtreak left
ZzZombo yea, but that's not that 06:07
teatime docs.perl6.org/language/variables#...$_Variable
ZzZombo in there, it's at least `$.`, a twigil
geekosaur this should be listed as a trap, I think? 06:09
(sorry, helping someone elsechannel)
06:09 khw left
ZzZombo heh, that was relevant. 06:09
piojo1 I also wasn't aware you could use $. to refer to a method (except the autogenerated methods) 06:10
06:11 itaipu joined
piojo1 ZzZombo: where the methods autogenerated (has $.foo) or written by hand? 06:11
*were
teatime right, you'd have to declare it like a scalar instance variable and assign to it
ZzZombo by hand
piojo1 teatime: I tested, and you can write it by hand and still call it as $.method-name
ZzZombo method foo {}
teatime piojo1: I see
piojo1 Where are methods stored, anyway? 06:12
ZzZombo in the class? where else?
teatime yeah, your test seems to answer that 06:13
well, not that I actually know
docs.perl6.org/language/variables#The_._Twigil 06:14
also documented here
geekosaur feh. I recall there being noted a difference there but can;t recall what it is and don't see it in the traps doc
if you do track one down, please file a doc bug to have it listed in the traps doc
oh, looks like you might have sorted it 06:15
geekosaur was back elsechannel. why everyoen gotta ask for help at once? :p
06:15 ilbot3 left 06:16 ilbot3 joined, ChanServ sets mode: +v ilbot3 06:19 xtreak joined, s0me0n3-unkn0wn joined 06:22 ugexe joined, s0me0ne-unkn0wn left
lookatme I think you should use samewith instead of nextwith 06:22
m: class C { multi method f(Str $) { dd; }; multi method f(Int $) { dd; nextwith("5"); }; }; C.new.f(5); say C.new.^find_method("f").candidates.>>.signature; 06:24
camelia method f(C $: Int, *%_)
((C $: Str, *%_) (C $: Int, *%_))
lookatme The document said nextwith will call the next routine. So what is the `next` mean ? 06:25
teatime in the inheritence hierarchy
so yeah, need samewith
lookatme yeah, that's easily misunderstand 06:26
06:31 ugexe left
raiph m: { Failure.new for 1 } # does what I'd expect 06:31
camelia Failed
in block <unit> at <tmp> line 1

Actually thrown at:
in block at <tmp> line 1
in block <unit> at <tmp> line 1
06:31 ugexe joined
raiph m: { Failure.new for 1 }() # doesn't .oO ( why not? ) 06:31
camelia ( no output )
raiph m: { Failure.new given 1 }() # does what I'd expect 06:33
camelia Failed
in block <unit> at <tmp> line 1
06:33 darutoko joined
piojo1 raiph: I'm getting different results than camelia 06:36
p6: { Failure.new for 1 }
camelia Failed
in block <unit> at <tmp> line 1

Actually thrown at:
in block at <tmp> line 1
in block <unit> at <tmp> line 1
piojo1 oh, same bot
oh, it's the REPL that's giving different output. The actual perl6 agrees with camelia. 06:37
lookatme perl6
The REPL did not throw exception for { Failure.new for 1 }() and { Failure.new for 1 } 06:38
06:40 wamba joined
ZzZombo how thread-safe is accessing/modifying DIFFERENT hash keys, without deleting or creating them? 06:46
lookatme It's not thread-safe 06:47
ZzZombo got a source? 06:48
lookatme The document not said it's thread-safe, so it is not thread-safe 06:49
ZzZombo what document?
lookatme docs.perl6.org 06:50
ZzZombo that's as unhelpful as it can be 06:51
now I just gotta grep it all to find your source
lookatme :)
You should use Lock protect your Hash
docs.perl6.org/type/Hash
ZzZombo Sorry, but I'll wait for someone I know to be more knowledgeable in P6 stuff. 06:52
lookatme :) Okay 06:53
raiph maybe jnthn's SO answer about thread safety of using *arrays* is of interest: stackoverflow.com/a/43792718/1077672 06:54
06:55 HoboWithAShotgun joined
ZzZombo Yea, it was. Thanks. 06:59
07:01 lowbro joined, lowbro left, lowbro joined 07:05 domidumont joined 07:09 domidumont left 07:10 domidumont joined 07:43 llfourn left 07:50 mson left, Ven joined, Ven is now known as Guest85501 07:56 BenGoldberg left 08:04 Guest85501 left 08:07 xtreak left, xtreak joined 08:08 Ven joined 08:09 Ven is now known as Guest409 08:10 xtreak_ joined 08:11 xtreak left 08:12 Guest409 left 08:13 Ven joined, Ven is now known as Guest63647 08:16 raiph left 08:17 zakharyas joined
tyil how can I depend on a minimum version of a dependency in my META6? 08:23
08:26 Cabanossi left 08:28 Cabanossi joined
tyil also, is their an idiomatic way to see if a directory is empty in perl 6? 08:28
08:28 lookatme left
moritz !dir($path) 08:29
08:30 abraxxa joined
tyil neat, thanks 08:30
08:33 lookatme joined
tyil is there also an idiomatic way to check if a certain file exists in a given path, so i can check whether I can use it in a `run` 08:40
if it exists in PATH*
I `run « git init »` in my code, but I want to do it only if git is available 08:41
moritz tyil: github.com/azawawi/perl6-file-which 08:42
lookatme PATH or path ?
tyil PATH
lookatme ^^ above is the answer
tyil moritz: awesome
how do you know everything
lookatme Just write read and talk 08:43
moritz sadly I don't know next week's lottery numbers :-)
lookatme :) 08:44
tyil yet!
08:45 cdg joined, xtreak_ left 08:49 scimon joined 08:50 cdg left
moritz when I know them next week, it'll be too late :( 08:50
lookatme Create a time machine use Perl6, return to the past, buy that number :) 08:53
08:55 Cabanossi left 08:58 Cabanossi joined 09:01 HoboWithAShotgun left 09:14 lookatme left 09:18 dakkar joined
ZzZombo what `?|` is? 09:30
is incorrectly described at docs.perl6.org/routine/?| 09:31
m: my $a=True;$a ?|= False;$a.say 09:32
camelia True
ZzZombo got it
still, how do one fix the docs? 09:33
does*
09:33 robertle joined
timotimo ZzZombo: the difference between self.foo and $.foo is that the latter contextualizes it like a scalar would 09:36
let me cook up an example
m: class test { method bloop { (1, 2, 3) }; method one { .say for $.bloop }; method two { .say for self.bloop } }; test.one; test.two 09:37
09:37 gregf_ left
camelia (1 2 3)
1
2
3
09:37
timotimo see how the first one iterates only once and the second one iterates three times?
09:37 xtreak joined
timotimo this should really be in the docs for the "The . Twigil" section of "variables", because it might not be clear that "things starting in $ behave like items" in this case, too 09:38
09:39 Guest63647 left
timotimo the reason why your "$kv.WHAT()" thing gives a warning about stringifying a type object is because .WHAT gives you the type object, and trying to stringify that is usually a sign of doing something wrong 09:39
ZzZombo yea, but why did it in my case wrap return values in an additional layer of... uh, containers? If I returned a Seq at the innermost routine, the second innermost wrapped it again in a Seq, if I returned an Array, the second returned an Array of Arrays, and if I returned a List... 09:40
you get the picture.
timotimo so instead you want $kv.^name() or $kv.WHAT.gist
do you have some code for me?
09:41 Ven joined, Ven is now known as Guest85201
ZzZombo multi method values(*@names,Bool:D :$keys=Bool::False --> Seq:D) { self.values({!@names || .name eq @names.any},:$keys) } 09:41
multi method values(&matcher,Bool:D :$keys=Bool::False --> Seq:D) { @!children.map( { if .isa(Grammar::VDF::Key-Value) && matcher($_) { $keys ?? $_ !! .value; } }); }
replace `self.values` with `$.values` 09:42
09:42 Cabanossi left
ZzZombo `@!children` is just an array of items. 09:42
09:43 Cabanossi joined, sena_kun joined 09:46 dogbert17 left
timotimo i'll use 09:46
er
09:46 rindolf joined
timotimo i'll use Pair instead of the Key-Value class 09:46
ZzZombo yea, shouldn't matter. 09:47
timotimo yeah, what you're seeing is that it puts the result of the values call into a scalar container 09:48
just like with method bloop in my example
Brumbazz nine: Do you have a moment sometime to help me debugging a perl5-perl6 problem ? If not, should I fill in a ticket somewhere? Thanks in advance :>
timotimo same if you use "my $ = self.values(...)" 09:49
nine Brumbazz: I can have a look.
ZzZombo timotimo: uh, can you tell me step-by-step how it does all go? The very moment when the wrapping occurs slips from me. 09:50
timotimo aye, grokking scalar containers can be difficult, but it's much easier since the Great List Refactor happened 09:52
almost every operation looks right through any container you might have, but a few operations will introspect if there's a container around the value or not. iteration is a big one 09:53
m: my $foo = (1, 2, 3); say $foo.VAR.^name; my @foo = (1, 2, 3); say @foo.VAR.^name
camelia Scalar
Array
timotimo also, putting $( ) around something is the same as calling .item on it 09:55
as things contained in a scalar will behave "like an item"
Brumbazz nine: Ah thanks :) This is my code: pastebin.com/tk3FD2Hx. When I run it with perl6 it throws: [1] 10664 segmentation fault perl6 xmpp_who_am_i.pl. A gdb full backtrace says: pastebin.com/pZZ2dUcp. I'm using rakuku version 2017.10 and perl-inline v.0.29
El_Che releasable6: status 09:56
releasable6 El_Che, Next release will happen when it's ready. No blockers. 213 out of 215 commits logged
El_Che, Details: gist.github.com/061aeda0c529427116...3d2e2e9f92
timotimo for iteration, having a Slip will overrule scalarness
09:57 Guest85201 left, Ven joined, Ven is now known as Guest16662 09:58 Ven joined, Guest16662 left 09:59 Ven is now known as Guest4030
timotimo ZzZombo: i'll need more questions form you to continue explaining i think 09:59
ZzZombo so to clarify, at what place the return value from the last routine gets wrapped? 10:00
timotimo which one is the last routine?
ZzZombo placed last in the code I gave you 10:01
m: sub x(Str:D() $x){ $x.say };x(1)
m: sub x(Str() $x){ $x.say };x(1)
camelia Type check failed in binding to parameter '$x'; expected Str but got Int (1)
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
1
ZzZombo m: sub x(Str:D() $x){ $x.say };x('1')
camelia 1
ZzZombo m: sub x(Str:D() $x){ $x.say };x(Str)
camelia Parameter '$x' of routine 'x' must be an object instance of type 'Str', not a type object of type 'Str'. Did you forget a '.new'?
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo intended? 10:02
timotimo it's not generally possible to convert a type object into a defined object
the return value of the last routine gets wrapped in a scalar container because you're calling it as $.values(blah) 10:03
ZzZombo but the first example fails to do anything but die with the argument I gave
timotimo and $.values(blah) is equivalent to (my $ = self.values(blah)) or self.values(blah).item 10:04
ZzZombo it either shouldn't compile, or should just behave as without the smiley 10:05
timotimo yeah, looks like NYI
10:05 gfldex is now known as Guest81820, Guest81820 left, gfldex_ joined, gfldex_ left
ZzZombo m: sub x(Str() $x){ $x.say };x(Str) 10:05
camelia (Str) 10:06
ZzZombo m: sub x(Str() $x){ $x.say };x(Int)
camelia Use of uninitialized value of type Int in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.

in sub x at <tmp> line 1
10:06 gfldex_ joined, gfldex_ is now known as gfldex, gfldex left, gfldex joined
nine Brumbazz: can reproduce the segfault here 10:08
Brumbazz Ah ok :> 10:09
nine Brumbazz: pushed a fix to Inline::Perl5 git 10:14
10:14 llfourn joined, Geth_ joined
Brumbazz woaw that was fast :O so can I use zef to install that or should I clone it from github and compile it ? 10:14
nine Brumbazz: the latter. I still need to make a release 10:15
Brumbazz ah alright :) I'll try, thanks a lot !
nine you're welcome!
scimon Are there known issues with Regexs in threads? Before I dive into trying and replicating an error. 10:20
tyil I have a Path::IO, and I want to see what the first directory of this path is called, but I cant seem to find a method that allows me to split it up into a list of "parts" of the path
the .parts method that does exist is just a shorthand for getting 3 different parts of the path, not splitting up each dir/filename into its own element 10:21
i could just take .path and split it on /, but that won't do well on windows I guess
10:22 Aaronepower left, Aaronepo_ joined
Brumbazz nine: After I've removed my existing version with zef uninstall .... and compile your version from github, I'm getting: This type cannot unbox to a native string: P6opaque, Failure 10:24
nine Brumbazz: you did perl6 configure.pl6 && make install? 10:29
Brumbazz yes
ahh, I ran "make install" as root, I just ran it again but without sudo and now that error dissapered ! 10:30
This type cannot unbox to a native string: P6opaque, Failure 10:31
woops
disappeared*
10:31 comborico1611 joined
Brumbazz yiiiiir my xmpp script now runs ! :D You are a life safer nine, thanks :> 10:31
10:33 hello left
sacomo hi all 10:33
ZzZombo timotimo: let me remind I still want to hear your opinion on gist.github.com/ZzZombo/e78cad5672...b33ad6bb5. 10:34
sacomo is there a way to redirect a local ./lib/.precomp to another directory? 10:38
10:41 Cabanossi left 10:43 gregf_ joined, Cabanossi joined
timotimo ZzZombo: you want general feedback on the implementation or help to make the whole thing work? 10:44
ZzZombo "did I get everything right", more of 10:45
timotimo don't see an obvious problem 10:46
ZzZombo what is the difference between "eat all characters" and "eat available ones"?
10:47 xtreak left 10:50 xtreak joined 10:54 Guest4030 left 10:55 Ven joined, Ven is now known as Guest21780 10:56 eliasr joined
ZzZombo maybe I am missing something very obvious, but I don't see how can I in binary mode, remove a chunk, shifting the rest of content, or overwrite it, or write over and have bytes not fitting in the overwritten chunk shift the rest of the file. 10:57
10:58 Guest21780 left, Ven_ joined
timotimo sorry, i don't quite understand what you want to do there? 11:02
ZzZombo say, I wanna write 10 bytes in the middle of a file, 1) by inserting them, 2) by overwriting the same amount of byte, 3) by overwriting less amount of bytes, inserting excessive, 4) by overwriting more, shifting the rest of file. 11:05
jnthn 2 is just .seek($the-position); .write($the-stuff-to-overwrite) 11:08
11:08 wamba left
jnthn 1 would be seek to the position, read everything from there up to the end of the file, write the stuff you want to insert, then write the stuff you read 11:08
11:12 rindolf left 11:13 rgrau joined
timotimo yeah, files don't have an api that would let you insert stuff, you can only overwrite or append to the end (which is just overwriting with smarter positioning) 11:18
11:25 Cabanossi left 11:28 Cabanossi joined
Geth doc: c07264f5d1 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6
tweak definition
11:28
synopsebot Link: doc.perl6.org/language/glossary
11:29 rindolf joined 11:49 japanois- is now known as japanoise 11:55 Ven_ left 11:56 Ven joined, Ven is now known as Guest96202
Ulti Xliff: re best way to do GUI apps, is there a reason you wouldn't just write everything as a webapp now? 11:59
neat there are Electron bindings in the ecosystem too github.com/azawawi/perl6-electron 12:00
Xliff Ulti: Good point, and one I thought about, however web-apps imply a number of moving parts, and I'd rather just have one. 12:03
m: 0.001.^name.say
camelia Rat
Xliff m: +0.001.^name.say
camelia WARNINGS for <tmp>:
Rat
Useless use of "+" in expression "+0.001.^name.say" in sink context (line 1)
Xliff m: (+0.001).^name.say
camelia Rat
Xliff m: 0.001.Num.^name.say
camelia Num
12:04 geospeck joined
Xliff Hrm. 12:05
12:06 wamba joined
timotimo m: say 0.001.Numeric.^name 12:06
camelia Rat
12:06 araujo joined
Xliff Yeah. I guess thing thing to do here would be to use RatNum 12:07
Ulti dunno Im more averse to native deps as a horrible moving part I guess, Windows for example no one is going to have that laying around unless they installed GIMP 12:08
ZzZombo m: class A{multi sub trait_mod:<is>(Attribute:D $s, :$foo){};has $.a is foo<bar>};class B is A { has $!b is foo} # any easy way to have the trait available ONLY to A and its subclasses? 12:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is foo' in an attribute declaration.
at <tmp>:1
expecting any of:
rw
readonly
box_target
leading_docs
trailing_docs
12:11 Guest96202 left
jast hmm, I've built rakudo star 2017.10 on an armv7l system and now trying to run 'perl6' yields a bus error... 12:11
specifically, BUS_ADRALN 12:13
I haven't asked a question, have I? so, what would be a good way to track down the issue? given someone with pretty much no experience with moar/nqp 12:18
12:22 zakharyas left 12:30 Aaronepo_ left 12:34 aborazmeh joined, aborazmeh left, aborazmeh joined 12:40 xtreak left 12:41 Cabanossi left 12:43 Cabanossi joined, wamba left 12:44 xtreak joined, xtreak left
ZzZombo is there any actual difference between `does <role>` and `is <role>` 12:45
?
12:45 cdg joined
AlexDaniel jast: that's interesting 12:47
jast I've rebuilt with debug info and found the source line from moar that triggers it 12:48
AlexDaniel jast: a bug report would be nice to have
jast just dump gdb output in there, or should I add anything else? 12:49
also what's the preferred place to report bugs, RT?
AlexDaniel huggable: rakudobug
huggable AlexDaniel, Report bugs on github.com/rakudo/rakudo/issues/new If you don't have access to GitHub, you can email your report to [email@hidden.address] . See also: github.com/rakudo/rakudo/wiki/rt-introduction
12:51 Aaronepower joined
tyil I cant find anything useful on the %?RESOURCES var in the docs, does anyone know where it's sourcefile is so I can look into making docs for it? 12:57
13:16 comborico1611 left 13:17 comborico1611 joined
perlpilot ZzZombo: yes. The latter adds an extra layer in the inheritance hierarchy for the implied class created while the former composes all of the role's methods and attributes into the class upon which it has been "does"-ed. 13:18
13:32 llfourn left 13:42 comborico1611 left, sjn left 13:44 wamba joined 13:46 zakharyas joined 13:49 mcmillhj joined 13:58 sjn joined, aborazmeh left 14:00 HoboWithAShotgun joined 14:12 wamba left
s0me0n3-unkn0wn Need some help with NativeCalls 14:12
I created a test library containing function int *test_ppint(int **a, int **b) 14:13
Declared it in p6 as sub test_ppint(Pointer[int32] is rw, Pointer[int32] is rw) returns Pointer[int32] is native('test') {*}
Given I have variables my int32 $a and my int32 $b, how cat I pass pointers to pointers to them as function parameters? 14:14
I tried something like my Pointer[int32] $pa = Pointer[int32].new($a); 14:15
But that did not work out :(
14:17 pmurias joined 14:20 itaipu left 14:22 itaipu joined 14:23 geospeck left, geospeck joined
ZzZombo wow, nice, effortless auto-ID increment in class instances: 14:25
m: class A {has $.a=$++};say do for 1..3 { A.new }
camelia (A.new(a => 0) A.new(a => 1) A.new(a => 2))
masak wonders idly how thread-safe that is 14:26
timotimo it's a flat-out race :) 14:27
14:27 mson joined
moritz it should be safe, as long as you don't do it in multiple threads at the same time 14:27
14:27 geospeck left
masak haha :P 14:28
moritz, I like your attitude :)
moritz :-)
masak .oO( this tiger will not harm you, as long as you do not enter is cage and poke it with a stick )
ilmari m: class A {has $.a = state atomicint $⚛++ }; await start { say A.new } xx 5; 14:29
camelia ===SORRY!===
Natively typed state variables not yet implemented
ilmari :(
timotimo it should work to have it in a lexically scoped variable inside the class body
ilmari m: class A { my atomicint $c = 0; has $.a = ++⚛$c }; await start { say A.new } xx 5; 14:30
camelia A.new(a => 1)
A.new(a => 2)
A.new(a => 3)
A.new(a => 4)
A.new(a => 5)
ilmari m: class A { my int $c = 0; has $.a = ++$c }; await start { say A.new } xx 5;
camelia A.new(a => 1)
A.new(a => 2)
A.new(a => 3)
A.new(a => 4)
A.new(a => 5)
pmurias hmm, I'm looking at the collation tests and it seems we don't set a language there?
ilmari I guess 5 .new calls isn't enough to make it actuall spawn multiple threads 14:31
14:31 wamba joined, araujo left
timotimo not enough contention to actually hit a conflict 14:33
m: class A { my int $c = 0; has $.a = ++$c }; await start { A.new } xx 5000; say A.new 14:34
camelia A.new(a => 5001)
timotimo m: class A { my int $c = 0; has $.a = ++$c }; await start { A.new } xx 50000; say A.new
camelia A.new(a => 50001)
timotimo could very well be it's running on just one thread, let me "time" it
i get 150% cpu usage 14:35
ZzZombo heh, this actually breaks it:
m: class A {my $lock=Lock.new;has $.a=$lock.protect: {$++}};say do for 1..3 { A.new }
camelia (A.new(a => 0) A.new(a => 0) A.new(a => 0))
timotimo it works much better when you xx inside the start block 14:36
class A { my int $c = 0; has $.a = ++$c }; await start { A.new xx 10_000 } xx 500; say A.new
m: class A { my int $c = 0; has $.a = ++$c }; await start { A.new xx 10_000 } xx 500; say A.new
camelia A.new(a => 4609695)
Xliff s0me0n3-unkn0wn: It would be better to use the following signature: sub test_ppint(CArray[int32] is rw, CArray[int32] is rw) returns CArray[int32] 14:37
If the pointers are being allocated by the test lib, then the following might work better, as well:
(OpaquePointer is rw, OpaquePointer is rw) returns OpaquePointer 14:38
14:38 cdg left
Xliff You will then have to nativecast() them all back to whatever you would prefer to use. 14:38
timotimo if you have so many start blocks that only do a few microseconds of work each, they'll be done before the next worker gets to pull a task out of the queue i suppose
14:39 comborico1611 joined, itaipu left
ZzZombo but why the lock doesn't fly? 14:39
s0me0n3-unkn0wn Xliff: Probabply, but it's not an array pointer, it's just a pointer to pointer to single int. Indeed, I need to pass pointers to pointers to structures, I just want to understand a principle with those ints
ZzZombo m: my $lock=Lock.new;class A {has $.a=$lock.protect: {$++}};say do for 1..3 { A.new } 14:40
camelia (A.new(a => 0) A.new(a => 0) A.new(a => 0))
14:40 cdg joined, kerframil joined
timotimo the block that has the $++ inside it gets closure-cloned each time the lock.protect runs it i expect 14:40
m: my $lock=Lock.new;class A {has $.a=$lock.protect: $++ };say do for 1..3 { A.new }
camelia Attempt to unlock mutex by thread not holding it
in method at <tmp> line 1
in submethod BUILDALL at <tmp> line 1
in code at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo that's weird
Xliff s0me0n3-unkn0wn: It's weird, I've always had problems with the Pointer[<type>] spec. So have others. That's why CArray and OpaquePointer generally get used, even though each has its own drawback.
s0me0n3-unkn0wn: Just try them and see if they work better. 14:41
timotimo anyway, you're getting a fresh state var each time that runs
so use a lexical variable there, as well
ZzZombo ye, I see, but can't explain
s0me0n3-unkn0wn Xliff: Okay, thanks, I'll try to proceed with opaque ones (docs says OpaquePointer is deprecated in favor of just Pointer, btw) 14:42
Xliff Yes, the docs say one thing, experience says something else.
timotimo m: for ^5 { for ^2 { say $++ } }
camelia 0
1
0
1
0
1
0
1
0
1
Xliff It could be that things are shifting back to Pointer, now.
ZzZombo m: my $lock=Lock.new;class A {my $id;has $.a=$lock.protect: {$id++}};say do for 1..3 { A.new }
camelia (A.new(a => 0) A.new(a => 1) A.new(a => 2))
moritz masak: regarding the thread saftey comment earlier, that was only half tongue in cheek. In Perl 5 there are many things (like DB handles) that you can't use from another thread than the one they were created in, even if the access is serialized 14:43
timotimo i'd suggest putting the lexical inside the class so nothing can get to it
Xliff s0me0n3-unkn0wn: If that is the case, then just use "Pointer". Don't specify a type.
ZzZombo m: class A {my $lock=Lock.new;my $id;has $.a=$lock.protect: {$id++}};say do for 1..3 { A.new }
camelia (A.new(a => 0) A.new(a => 1) A.new(a => 2))
ZzZombo hey, before I forget again
what is the difference between "eat all characters" and "eat available ones"? 14:44
for the decoder stuff
14:45 cdg left
jnthn ZzZombo: "eat all characters" means it can assume that it's not going to be getting any further bytes; "eat available characters" means it should only hand back things that more bytes arriving couldn't change 14:53
That includes incomplete multi-byte sequences and potentially incomplete grapheme sequences
ZzZombo so in the first case, I should error out in case of broken byte sequence, whereas in the second I should wait for more? 14:55
14:55 Cabanossi left 14:58 Cabanossi joined, wamba left 14:59 itaipu joined 15:06 holyghost joined
jnthn Yes 15:06
ZzZombo thanks! 15:07
jnthn And also, to support NFG, if the next thing might combine with the previous
Whether that's an issue depends on whether the encoding you're writing includes combining chars etc.
ZzZombo if you don't mind, can you also take a look at my decoder implementation? I had to figure it out from github.com/rakudo/rakudo/blob/mast...uiltin.pm, and I'm not sure I translated the code right. 15:08
gist.github.com/ZzZombo/e78cad5672...0b33ad6bb5
15:11 geospeck joined
jnthn Looks OK having had a quick glance over it, though I think UCS2 does include combining chars 15:11
ZzZombo yea, but I think UTF-16 should handle t, once I rewrite the code to handle the distinction you've made. 15:12
15:13 geospeck left, geospeck joined
pmurias is there a channel for asking unicode questions? 15:14
moritz pmurias: you mean except here? :-) 15:16
15:18 sena_kun left
ZzZombo jnthn: oh and also, what does `$eof` in arguments mean? 15:20
jnthn "end of file", as in "you can assume nothing more is coming"
For lines handling, it means we can return an incomplete final line 15:21
15:21 zakharyas left
pmurias samcv: the unicmp_s op is passed a 0 0 country/region codes by the high level unicmp op, what high level locale can I use for that 15:23
?
ZzZombo jnthn: For lines handling, it means we can return an incomplete final line
as in? 15:24
jnthn Well, imagine a file containing "foo\nbar\nbaz"
ZzZombo yes
jnthn The $eof being true is what lets us know that we can hand back baz, rather than refuse 'cus we might get more bytes
If it's False, we should not do that
15:25 mcmillhj left
jnthn So, $eof in consume-line-chars really means "hand back everything if we didn't fine the line separator" 15:25
15:25 zakharyas joined
ZzZombo ah, now makes sense 15:25
jnthn Which could be done by, after failing to find the sep, just calling the "eat all chars" thingy
pmurias samcv: I want to use developer.mozilla.org/en-US/docs/W...s/Collator for the collation, so I need something that can select a most defaulitsh locale
jnthn (Pretty sure that's how the built-in impls do it) 15:26
15:38 bdmatatu joined 15:40 holyghost left 15:41 cdg joined 15:43 cdg left, cdg joined 15:48 troys joined 15:54 zakharyas left 15:55 Cabanossi left 15:56 khw joined 15:58 Cabanossi joined 16:00 markong joined 16:01 Geth left, Geth joined, ChanServ sets mode: +v Geth 16:23 lowbro left 16:27 Cabanossi left 16:28 Cabanossi joined 16:29 domidumont left 16:37 mson left 16:41 rgrau left 16:50 mson joined 16:52 jaush joined 16:54 abraxxa left 16:55 Ven`` joined 16:56 mcmillhj joined
jaush hello! windows question: is there a recommended way to get sensible unicode support with command-line perl6 usage under windows (windows 10 or server 2012 or newer, if that matters)? 16:58
16:59 zakharyas joined
jaush playing last night i saw that both cmd.exe and powershell.exe using Consolas weren't displaying the fancy quotes that are printed for matches 16:59
is that just a font issue, or a deeper problem?
17:00 scimon left 17:01 robertle left
moritz jaush: if it's only the corner brackets that are missing, it's likely a font issue 17:02
those characters are present in surprisingly few fonts, and in nearly no monospace fonts at all
jaush what font would you recommend?
moritz the only monospace font I found that contains them is github.com/be5invis/Iosevka
(though my terminal (not windows) typically does character substitution, and simply displays non-monospace versions) 17:03
jaush okay; another question - how do i configure what quotes the interpreter prints?
moritz you don't
jaush really?
timotimo well, you could override the method that pretty-prints the thing you're interested in 17:04
moritz or apply a .subst or .trans to its return value
jaush this needs to be something the REPL picks up
AlexDaniel relevant tickets: RT#132441 RT#132452 17:05
synopsebot RT#132441 [open]: rt.perl.org/Ticket/Display.html?id=132441 [SEVERE] Windows REPL cannot handle «, » characters
RT#132452 [open]: rt.perl.org/Ticket/Display.html?id=132452 Unicode: Windows shells print garbage instead of "「」"
jaush proposed solution: the world standardizes on ascii english ^_^ 17:09
moritz how about UTF-8 instead? :-)
jaush so i am reminded of something that postgresql's command-line interface does 17:10
when there is a code page mismatch it tells you on startup
El_Che someone with a bad character (pun!) would start with s/shells print// 17:11
jaush it would be Super Neet (TM) if perl6 did the same
i'm not convinced this is a font issue? is 'HALFWIDTH LEFT CORNER BRACKET' (U+FF62) the actual open-quote character that is supposed to be printed? 17:15
timotimo m: "hi" ~~ /./; say $/.gist.uninames 17:16
camelia (HALFWIDTH LEFT CORNER BRACKET LATIN SMALL LETTER H HALFWIDTH RIGHT CORNER BRACKET)
timotimo yes, indeed
jaush and the "chcp 65001" remedy mentioned in the quoted bug reports did something, but not the correct something
mst Ulti: looks like one of the ones we uploaded, I wasn't directly involved but if you need anything try '/msg tbsliver' and tell him I sent you 17:18
timotimo mst: can i have a /developer/ cloak? :) 17:19
mst you're a committer, right? 17:20
timotimo i am
jaush alternatively, 1) bundle a font with the rakudo star distribution that actually includes glyphs for all the characters that the interpreter emits under normal operation; 2) modify the perl6 startup script to perform whatever code page or other magic required to get it to work? 17:21
timotimo github.com/orgs/rakudo/teams?query=%40timo - mst, can you see this? 17:22
jaush "can't even read the interpreter's output on my common OS on earth" isn't really ... yay-ful (not windows apologia)
*on most common OS
AlexDaniel timotimo: I don't think he can 17:23
but yes, timo is a dev :)
mst I'm happy to take people's word on the assumption somebody would correct it 17:25
17:25 troys is now known as troys_ 17:26 Cabanossi left
timotimo and even if you give it to me wrongly, you can just take it away again, can't you? 17:27
mst precisely
17:28 Cabanossi joined
mst I just wanted to hear you say 'yes' first (I've now put the request in) 17:28
timotimo oh, me? yes yes :)
mst :D
17:29 timotimo joined
timotimo i see my cloak! yay 17:30
17:32 dakkar left
Geth mu: 27a965b182 | (Zoffix Znet)++ | misc/perl6advent-2017/schedule
Revert "Remove post"

This reverts commit f595b21d00a9185c726e4008bb8e481e54b56476.
17:32
mst \o/ 17:33
timotimo now who do i ask to get some daggers
ilmari mst: hey, can I get a /perl/developer/ (not perl6) cloak? 17:35
17:35 setty1 joined 17:36 dogbert17 joined 17:39 jaush left, pmurias left 17:40 pmurias joined 17:42 ilmari left, ilmari joined, ilmari[m] left, ilmari[m] joined 17:44 [Coke] joined
Geth doc: d209e6e6c8 | (Jan-Olof Hendig)++ | doc/Type/IO/CatHandle.pod6
Fix two broken links
17:45
synopsebot Link: doc.perl6.org/type/IO/CatHandle
AlexDaniel wonders what difference it makes
having a cloak that is
Ulti mst: cool, its just I processed the audio which is probably better than what's currently on the vid
audacity++ 17:46
mst I know very little about AV but tbsliver actually has a clue so please do talk to him :)
17:47 domidumont joined
Ulti re bundling a font try nerdfonts.com/ with FIRA ligatures 17:52
samcv .tell pmurias you want "ducet" for co 17:57
yoleaux samcv: I'll pass your message to pmurias.
17:58 troys_ is now known as troys
samcv not sure about the rest yet. gonna have some eggs then will get let you know 17:58
18:00 nhywyll joined
Geth doc: bd1feb09a7 | (Jan-Olof Hendig)++ | 2 files
Fix a few incorrect links
18:16
18:18 Ven`` left
s0me0n3-unkn0wn is beating his head against the wall 18:19
I have a Buf[uint8] slurped from a file 18:20
I put the bytes to CArray[uint8]
Now I need to pass a POINTER to that CArray[uint8] to native function which accepts `const unsigned char **` argument 18:21
HOW? How the hell do I create that pointer?
18:21 robertle joined
s0me0n3-unkn0wn How do I even declare the function? 18:22
Right now playing with `sub d2i_PKCS12(Pointer, Pointer[CArray[uint8]], long) returns Pointer is native('test2') {*}` 18:23
I have an array `my $ca = CArray[uint8].new($p12);`
Xliff You are thinking too literally. I did the same thing when I started with NativeCall.
s0me0n3-unkn0wn I create the pointer `my $pca = Pointer[CArray[int8]].new;`
How do I tell the pointer to point to array? 18:24
Xliff Instead, try: sub d2i_PKCS12(Pointer, CArray[Pointer] long) returns Pointer... 18:25
Oops: sub d2i_PKCS12(Pointer, CArray[Pointer], long) returns Pointer...
18:25 Cabanossi left
s0me0n3-unkn0wn Okaaay, and how do I pass the buffer then? 18:26
Xliff nativecast() the CArray created from the Buf to a Pointer. 18:27
s0me0n3-unkn0wn Mother of god
18:28 Cabanossi joined
Xliff There are a lot of indirect ways to work around things. 18:28
s0me0n3-unkn0wn That doesn't sound intuitive :))
Xliff *shrug*
18:29 wamba joined
Xliff Of course, it's been a while since I've done NativeCall stuff at that detail. Things could have changed since then, and there might be another, more intuitive method. 18:30
Geth doc: 9782bf86e4 | (Jan-Olof Hendig)++ | doc/Language/nativecall.pod6
Indentation fixes
18:33
synopsebot Link: doc.perl6.org/language/nativecall
s0me0n3-unkn0wn Xliff: Didn't work exactly like you suggested, but you gave me an idea an it finally worked out, THANK YOU SO MUCH 18:34
Declared `unsigned char **` argument as `CArray[CArray[uint8]]` 18:35
Then called like `CArray[CArray[uint8]].new([CArray[uint8].new($p12)])`
Xliff \o/
s0me0n3-unkn0wn Still looks terribly wrong but works
18:38 mcmillhj left 18:39 ___luke___ joined
___luke___ Hello to all 18:39
Xliff s0me0n3-unkn0wn: Yeah. If you are working on an API, you should abstract that all out so a user on the P6 side never sees the nasty. =-) 18:40
moritz hello ___luke___, maybe the Perl 6 be with you!
Xliff We have an image to maintain, here. ;)
___luke___ Thanks moritz 18:41
Funny you bring Perl 6 up, because I've been working on a program for the last few minutes, and you'll never believe what language it uses. 18:42
Perl 6
s0me0n3-unkn0wn Xliff: Ok, I'll try to bury it as deep as possible :)
___luke___ More seriously: apparently unnamed lambda function arguments (like $^a, $^b and the like) are read-only 18:43
Or am I doing something wrong?
mst s0me0n3-unkn0wn: sufficiently encapsulated insanity is indistinguishable from technology
Xliff mst: Black boxing FTW!
___luke___ m: my &z={$^a++}; z(4); 18:44
camelia Cannot resolve caller postfix:<++>(Int); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw)

The following do not match for other reasons:
(Bool:D $a is rw)
(Bool:U $a …
mst Xliff: I see a red box and I want to paint it black
Xliff mst: If the paint is good enough, they will never know the difference. 18:45
m: my &z = -> $ is rw { $^a++ }; z(4); 18:46
camelia 5===SORRY!5=== Error while compiling <tmp>
Placeholder variable '$^a' cannot override existing signature
at <tmp>:1
------> 3my &z = 7⏏5-> $ is rw { $^a++ }; z(4);
Xliff m: my &z = -> $a is rw { $a++.say }; z(4);
camelia Parameter '$a' expected a writable container, but got Int value
in block <unit> at <tmp> line 1
18:46 mcmillhj joined
Xliff m: my &z = -> is rw { $^a++ }; z(4); 18:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'is' in parameter declaration.
at <tmp>:1
------> 3my &z = -> is7⏏5 rw { $^a++ }; z(4);
Xliff Hrm... 18:48
18:48 ShalokShalom joined 18:55 darutoko left 18:58 asdsdfgh joined
asdsdfgh m: my $l := List.new: <foo bar>; $l.^name.say; $l[0] := 100; say $l; 18:58
camelia List
(100)
asdsdfgh m: my $l := <foo bar>; $l.^name.say; $l[0] := 100; say $l;
camelia List
Cannot use bind operator with this left-hand side
in block <unit> at <tmp> line 1
asdsdfgh Why's one allowed buit not the other?
18:59 ufobat joined
moritz m: my $l := List.new: <foo bar>; say $l.perl; 19:00
camelia ($("foo", "bar"),)
moritz this is actually a list inside a one-element list 19:01
19:01 mcmillhj left
moritz and the $(...) in there means the inner list is inside a scalar container 19:01
which enables the binding operation
m: my $l := List.new: |<foo bar>; say $l.perl;
camelia ("foo", "bar")
moritz m: my $l := List.new: |<foo bar>; $l[0] := 'x'; say $l.perl
camelia ("x", "bar")
moritz now *that* surprises me 19:02
19:02 mcmillhj joined
ufobat what did you expect? 19:03
asdsdfgh m: my $l := List.new: <foo bar>; say $l[0] = 42;
camelia 42
asdsdfgh Why does it get a scalar container though?
m: my $l := List.new: 42; say $l[0] = 42; 19:04
camelia 42
asdsdfgh It's meant to be immutable
El_Che releasable6: status
releasable6 El_Che, Next release will happen when it's ready. No blockers. 213 out of 216 commits logged
El_Che, Details: gist.github.com/f85bd7bc3bd4adaf4b...2072aef9ce
asdsdfgh moritz: it's not surprising. The "foo" and "bar" are each in their own container., 19:06
That answers my question. Thanks, moritz++ 19:07
moritz I didn't expect the elements to be in containers, because it's a List, not an Array
and I didn't do anything to create a container, afaict
asdsdfgh Yeah. The signature in `List.new` has `**@items`. Containers comes from there. 19:09
moritz using an array to construct a list: what could possibly go wrong :-) 19:10
asdsdfgh :)
19:11 lizmat joined
asdsdfgh R#1260 19:14
synopsebot R#1260 [open]: github.com/rakudo/rakudo/issues/1260 List.new creates unwanted containers
19:14 asdsdfgh left 19:18 zakharyas left
Geth doc: a37ea721e9 | (Jan-Olof Hendig)++ | 5 files
More formatting fixes
19:18
19:22 rindolf left, mcmillhj left, mr-foobar joined 19:25 dhsfgjgfk joined
dhsfgjgfk moritz: how come you can bind to just `$x`? Is there a Scalar container involved? I thought it existed only when assigning 19:25
moritz dhsfgjgfk: the binding replaces the the scalar container, and is special-cased for variables in the compiler 19:26
dhsfgjgfk Ah. Thanks.
19:31 mr-foobar left 19:33 ___luke___ left 19:37 troys is now known as troys_, levex joined, levex is now known as Guest98560 19:38 dhsfgjgfk left, mcmillhj joined 19:41 ryn1x_ joined
ryn1x_ Regex question. How can I match ": 7312500" but only return the numbers? I can match with /^ ': '\d+ $/ but I don't know how to return only the digits.. 19:44
timotimo you can put a <( in front of \d+ 19:46
moritz m: say 'abc: 1234' ~~ /':' \s+ <( \d+ / 19:48
camelia 「1234」
perlpilot Also, I wonder if it matters that that's a Match object and not just a number
19:49 mcmillhj left
ryn1x_ timotimo: thanks that is working! 19:51
perlpilot: I was going to return $/.Str
perlpilot ryn1x_: well, you could have also captured the digits and returned $0.Str 19:52
19:53 comborico1611 left
ryn1x_ Can you give an example? 19:54
19:54 comborico1611 joined
perlpilot m: 'abc: 1234' ~~ /':' \s+ (\d+) /; say $0.Str; 19:54
camelia 1234
19:54 mr_ron joined
perlpilot m: 'abc: 1234' ~~ / <after ':' \s+ > \d+ /; say $/.Str; # another way 19:55
camelia 1234
19:55 mr_ron left
perlpilot but, of course, timotimo's way is nice and succinct. 19:55
comborico1611 Greetings, everyone.
timotimo it also creates fewer objects :P
perlpilot timotimo: sure ... timtowtdi too :-) 19:56
timotimo though as an internals hacker i know how cheap very short-lived objects are 19:57
ryn1x_ Thank you. /':' \s+ (\d+) /; say $0.Str looks nice and readable to me... as someone who is still new to regexs 19:59
I am guessing the parens make groups and you refer to each with $x instead of $/ ? 20:00
20:01 cdg left
comborico1611 Parens are captured grouping. (Versus brackets, which are just grouping.) 20:01
20:01 domidumont left
comborico1611 But I'm a newbie, so. I just wanted to add that. 20:02
moritz ryn1x_: correct. You can also use $/ as a list, so $/[0]
ryn1x_ Ah ok. Thanks moritz. I have your regex book on pre-order. Can't wait for that! 20:03
moritz ryn1x_: I hope to get a final review of the manuscript tomorrow or Wednesday; then it can go into print soon 20:06
20:09 rindolf joined 20:10 raiph joined
perlpilot moritz: Can you write a book on NativeCall or async/concurrency next? ;-) 20:11
moritz perlpilot: no. I'll leave async/conc/parallel to jnthn++ :-) 20:12
and nativecall to nine++, maybe? :-)
perlpilot that's a good plan ... what about NativeCall ?
raiph m: { Failure.new for 1 }() # I haven't found doc or RT covering why this doesn't report the Failure; any thoughts/pointers? 20:13
camelia ( no output )
moritz seriously, I think I'm done with writing Perl 6 books for a while
perlpilot I wonder if there's a place for a book entitled "Perl 6's killer features and how to use them" :) 20:14
moritz if I continue in that area, I might consider a grant proposal to add more structured introductory material to the docs
perlpilot: now *that* is for you to write :-)
perlpilot moritz: I'll add it to The List. :-) 20:15
20:23 pmurias left 20:32 rindolf left
HoboWithAShotgun perlpilot: Part 2: "Perl 6's killer features and how to shoot yourself in the foot with them" 20:33
moritz HoboWithAShotgun: you can write that :-)
perlpilot HoboWithAShotgun: as long as Part 3 ends up being something like "How to rewind time and otherwise defy the laws of physics with Perl 6" 20:34
HoboWithAShotgun was soll das denn bitte heissen?
perlpilot But that sounds like something for Damian to write
HoboWithAShotgun ;-)
It's german. I don't know how to express the fake "outrage" in english 20:35
perlpilot well, you're the only one with a gun in his nick, so naturally you'd be the expert on shooting things :) 20:36
moritz HoboWithAShotgun: pretty much the same, "what's *that* supposed to mean?"
HoboWithAShotgun perlpilot: How to solve the halting problem with Perl 6 :)
perlpilot whoa whoa whoa! Let's not get crazy! 20:37
teatime Perl = NP, discuss
moritz isn't there a quote like "It's easy to solve the halting problem with a shotgun" by our very own TimToady++ in some fortune files? 20:38
teatime lol
perlpilot That's how you know TimToady is american ... the causal use of guns to solve a problem ;-> 20:39
moritz speaking of P and NP, blog.computationalcomplexity.org/20...ed-by.html 20:40
that wasn't the post I wanted to link to, let me search the other one...
20:41 AndChat|688961 joined, Cabanossi left, comborico1611 left
moritz can't find it now :( 20:42
20:42 mcmillhj joined
HoboWithAShotgun you guys all have a compsi degree? i'm not, just application and web programming 20:42
20:42 Cabanossi joined
TEttinger that's computers and psionics, right? 20:43
HoboWithAShotgun i'm terrible at math
lizmat HoboWithAShotgun: when I went to Uni, there was no CompSci there :-(
HoboWithAShotgun *compsci
lizmat which may have been a good thing, actually :-)
TEttinger :)
moritz my degree is actually physics 20:44
HoboWithAShotgun oh cool.
teatime HoboWithAShotgun: I don't.
I originally started in CS, dropped out pretty quick. Went back later for a liberal arts degree, and took several CS classes, also stuff like logic. 20:45
perlpilot HoboWithAShotgun: Yeah, I have a BS and MS in computer science (because I was too lazy to do a degree in math or physics)
teatime You can go far in programming w/o the advanced math and CS, but I have gotten to the point where I really wish I had it.
moritz teatime: the nice thing is that, typically, you don't need *all* the CS stuff 20:46
perlpilot teatime: do you know of an understand big-O notation?
s/an/and/
moritz need a bit of graph theory? read a bit about, learn some, you're good
teatime perlpilot: yeah, to a degree.
HoboWithAShotgun yeah me too. the document just linked to, for me it could as well contain lore ipsum
perlpilot teatime: you're doing better than most :)
teatime perlpilot: I don't really get how to look at an algorithm and determine it's O() though
moritz need a bit of compiler knowledge? it's not actually rocket science
teatime moritz: def. true, but it can be frustrating to find good resources when you don't know e.g. what stuff is called 20:47
HoboWithAShotgun moritz: the problem often isnt the learning of x but knowing that you need to learn x
teatime there are unknown unknowns. but then I just ask you fine folks, which tends to work out great.
HoboWithAShotgun: exactly
moritz that's when it's great to have friends or mentors who have a greater breadth of knowledge 20:48
perlpilot Actually ... trying to write a compiler will teach you all the things you need to learn in computer science I think.
HoboWithAShotgun do you want to be my friend?
:-)
moritz "speak friend and enter!" :-) 20:49
though seriously, I don't have a problem with nudging people towards fields of CS or programming or so that I read about 20:50
perlpilot Lots of people that I've encountered over the years who are top-notch Perl programmers have come from non-computer science backgrounds. 20:51
20:51 troys_ is now known as troys
HoboWithAShotgun speaking of top notch programmers: blob:imgur.com/b8b267eb-e218-44e9-a5ba-56d93eb36424 20:54
meh, imgur.com/a/N1m2t
youtube can't even do markup right 20:55
i mean what the... 20:56
moritz pro tip: your life will be better when you ignore the fact that youtube comments exist 20:58
HoboWithAShotgun nah, i have way too much fun exchanging insults with flat earthers and creationists 20:59
and it's the perfect place to live out my trolling lust. if the fbi ever checks my YT profile, i've been everything 21:00
21:01 mcmillhj left
HoboWithAShotgun from dentists wife to judge 21:01
*** crickets chirping *** 21:06
AndChat|688961 I believe YouTube intentionally makes their comment system atrocious. 21:07
HoboWithAShotgun for what reason?
AndChat|688961 Go get your tinfoil hat. 21:08
HoboWithAShotgun go get? i'm wearing it
AndChat|688961 Haha! Very funny.
I think from the very beginning after Google purchased YouTube and before, they knew it was going to be the main source of traffic on the internet. And they knew a comment system what generates valuable information. So they made it difficult for others, other than themselves, to navigate through the data. 21:10
Common system would* generate
HoboWithAShotgun i see. that's why they wrote an api (developers.google.com/youtube/v3/d...ents/list) for it 21:11
s0me0n3-unkn0wn sergot: ping
ugexe: ping 21:12
Guys I'm sure I'm not the only one who's not happy with that `gen-lib` hack in OpenSSL
But I need to add an another one :)
I need to import functions from libcrypto.so to implement PKCS12 parsing in IO::Socket::Async:SSL
Are there any better suggestions besides just copy-pasting `sub gen-lib` to `sub crypto-lib` ?
HoboWithAShotgun no, the yt comment is just another flat thread system, it's just buggy as hell
AndChat|688961 Where are the programs that use that api?
HoboWithAShotgun and that inconsistently.
ugexe s0me0n3-unkn0wn: depends, you might not have to use that. the reason it exists is because the openssl DLLs cannot be renamed (on windows), but all files get renamed upon installation 21:13
AndChat|688961 Why didn't YouTube implement a forum-type comment system? One that could be searched? 21:14
ugexe the deeper problem regarding file renaming will be fixed in the core eventually, but until then it sucks 21:15
HoboWithAShotgun because there are probably 100 Million new comments A DAY and having them all searchable is just not feasible?
AndChat|688961 YouTube can host thousands, millions of live streams at once, but they can't archive comments in a searchable form? 21:17
s0me0n3-unkn0wn ugexe: The problem is I need OPENSSL_add_all_algorithms_noconf() which resides in libcrypto.so on Linux and in libeay32.dll on Win. So my only option is to copy-paste the whole `sub gen-lib` and create something like `sub gen-crypto-lib` specifically for libcrypto.so. And considering the OpenSSL module is a duct tape warehouse already, I don't see a better place to implement it. Tell me if you have better solution, otherwise I'll 21:19
submit pull request with that `sub gen-crypto-lib`. Hope that ends up soon :)
ugexe yeah just try and follow the hack that is implemented, since I do actually know how to turn it into something proper once its possible 21:27
21:27 mcmillhj joined
HoboWithAShotgun possible? sure. but also costly for little benefit. 21:27
HoboWithAShotgun is off to attempt a 42cm pizza. 21:28
i'll be back if i survive that
:)
21:29 kitsunenokenja joined 21:40 geospeck left, geospeck joined 21:45 geospeck left 21:50 zacts joined 21:51 troys is now known as troys_ 21:55 ryn1x_ left, ShalokShalom left 22:01 cdg joined 22:02 bdmatatu left
AndChat|688961 Enjoy. Pizza is heavenly. 22:04
Anyone want to answer a question I have on C? 22:05
22:06 cdg left, mcmillhj left 22:10 dzove855 joined 22:14 s0me0n3-unkn0wn left, s0me0n3-unkn0wn joined
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/11/20/...ia-videos/ 22:28
Geth doc: e9b668c223 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
Add an examples check for use of 'dd'

For #1680
22:30
22:32 Sgeo left, tokik joined 22:36 AndChat|688961 left 22:37 mcmillhj joined, comborico1611 joined
comborico1611 Gj, lizmat. 22:37
22:38 setty1 left 22:41 robertle left 22:42 mcmillhj left 22:43 flatwhite joined 22:45 nhywyll left
Geth doc: 20ae84b4fb | (Will "Coke" Coleda)++ | 2 files
learn new words
22:45
22:47 kitsunenokenja left, kerframil left 22:51 raiph left 22:53 mcmillhj joined 22:54 flatwhite left 22:57 itaipu left
Geth doc: 738b5c8212 | (Will "Coke" Coleda)++ | EXAMPLES.md
Add refrence to new ok-test value: dd
22:58
doc: c6b5104830 | (Will "Coke" Coleda)++ | doc/Language/faq.pod6
This snippet is explicitly about dd, ok it
synopsebot Link: doc.perl6.org/language/faq
22:58 mcmillhj left 22:59 itaipu joined 23:09 mcmillhj joined 23:11 Cabanossi left, pilne joined 23:13 Cabanossi joined 23:14 mcmillhj left 23:15 Brumbazz left 23:22 kyan joined 23:25 mcmillhj joined 23:30 mcmillhj left
Altreus Is there a mode for exemel where it removes whitespace text nodes? 23:32
cos I'm finding it hard to reliably parse an XML file that may or may not have been reformatted
23:33 mcmillhj joined
Altreus cos if I pretty-print it, the zeroth node becomes an empty text node instead of another element, meaning all my things have to be greps, which gets cumbersome 23:33
23:33 troys_ is now known as troys 23:34 Sgeo joined 23:38 mcmillhj left, regreg joined 23:39 lizmat left 23:42 lizmat joined 23:49 mcmillhj joined 23:53 mcmillhj left 23:55 comborico1611 left, comborico1611 joined