»ö« 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:04 dubi0us_ left 00:05 dubi0us joined 00:07 kurahaupo_ joined 00:09 dubi0us left, kurahaupo left 00:14 dubi0us joined 00:18 dubi0us left 00:22 cyphase_eviltwin is now known as cyphase 00:23 dubi0us joined 00:28 dubi0us left 00:32 dubi0us joined 00:35 ufobat left 00:37 dubi0us left 00:38 Sgeo_ joined 00:40 Sgeo left 00:41 dubi0us joined 00:45 lookatme joined, bwisti joined
lookatme morning 00:45
00:55 dubi0us left 00:57 skids left 01:00 dubi0us joined 01:02 skids joined 01:04 dubi0us left 01:07 astj joined, raschipi joined 01:08 grondilu joined 01:09 dubi0us joined 01:14 dubi0us left 01:18 dubi0us joined 01:23 dubi0us left
Geth ecosystem: scmorrison++ created pull request #349:
Uzu migrated to github
01:25
01:27 dubi0us joined 01:32 dubi0us left 01:37 dubi0us joined 01:46 Cabanossi left 01:48 Cabanossi joined 01:55 dubi0us left 01:57 dubi0us joined, dubi0us_ joined 02:01 dubi0us left 02:02 Sgeo_ left, Sgeo joined 02:10 dubi0us_ left 02:14 dubi0us joined 02:15 dubi0us left 02:19 dubi0us joined, noganex joined 02:21 parv joined 02:23 noganex__ left 02:24 dubi0us left, dubi0us joined 02:25 dubi0us left 02:26 dubi0us joined 02:28 dubi0us left, dubi0us joined, dubi0us_ joined 02:32 dubi0us left 02:42 seatek left, pilne left 02:45 Cabanossi left 02:46 BenGoldberg joined 02:48 Cabanossi joined 02:50 seatek joined 02:55 raschipi left 03:14 seatek left, seatek joined 03:17 Cabanossi left 03:18 Cabanossi joined 03:19 dubi0us_ left 03:26 dubi0us joined 03:41 dubi0us left, astj left 03:42 dubi0us joined 03:47 Cabanossi left 03:48 Cabanossi joined 03:51 dubi0us left 03:57 dubi0us joined 03:59 Cabanossi left 04:02 Cabanossi joined, astj joined 04:06 dubi0us left 04:11 dubi0us joined 04:16 dubi0us left 04:17 dubi0us joined 04:20 dubi0us left 04:27 dubi0us joined 04:36 parv left, dubi0us left 04:37 bwisti left, dubi0us joined 04:39 khw left 04:42 dubi0us left 04:49 curan joined 04:53 Mithaldu left 04:54 curan left 04:55 Mithaldu joined 04:58 dubi0us joined 05:00 Cabanossi left, astj left 05:01 astj joined, Cabanossi joined 05:02 dubi0us left 05:14 BenGoldberg left 05:18 lookatme left 05:19 lookatme joined 05:25 kaare_ joined
Geth ecosystem: 0b28ab15db | (Sam Morrison)++ | META.list
AWS::Pricing META.info > META6.json
05:30
ecosystem: 78e99866dd | (Sam Morrison)++ | 7 files
Uzu migrated to github
ecosystem: 068ee70275 | (Moritz Lenz)++ (committed using GitHub Web editor) | META.list
Merge pull request #349 from scmorrison/master

Uzu migrated to github
05:46 dubi0us joined 05:48 lookatme left 05:49 lookatme joined 05:50 dubi0us left 05:55 lowbro joined, lowbro left, lowbro joined 06:01 wamba joined, dubi0us joined 06:05 dubi0us left 06:12 dubi0us joined 06:16 dubi0us left 06:23 skids left 06:34 abraxxa joined 06:37 dubi0us joined 06:45 ufobat joined
ufobat timotimo, so what could i do to resolve this? 06:45
file a bugreport, or?
06:46 Cabanossi left 06:47 Cabanossi joined 06:49 domidumont joined 06:53 domidumont left 06:54 domidumont joined 06:56 dubi0us left 07:00 astj_ joined, astj left 07:02 darutoko joined 07:14 lookatme left 07:15 lookatme joined, Cabanossi left 07:16 Cabanossi joined 07:18 dubi0us joined 07:23 dubi0us left 07:27 dubi0us joined 07:35 nattefrost joined 07:36 dubi0us left, seatek left 07:37 seatek joined 07:42 rindolf joined 07:43 ufobat left, ufobat joined 07:45 domidumont left 07:46 Cabanossi left 07:47 zakharyas joined, Cabanossi joined, domidumont joined 07:55 mr-foobar left 08:03 jonas1 joined, mr-foobar joined 08:05 nattefrost left, nattefrost joined 08:08 dubi0us joined, tokomer joined 08:10 dakkar joined 08:13 dubi0us left 08:21 dubi0us joined 08:23 seatek left 08:24 [particle] left, [particle] joined 08:26 dubi0us left, robertle joined 08:30 AlexDani` left 08:33 dct joined 08:35 dubi0us joined 08:40 dubi0us left 08:47 dubi0us joined 08:51 dubi0us left, rindolf left, espadrine left 08:57 rindolf joined 09:00 Cabanossi left 09:02 Cabanossi joined 09:11 dubi0us joined 09:12 parv joined 09:15 dubi0us left 09:21 dubi0us joined 09:22 nattefrost left, nattefrost_ joined 09:26 dubi0us left 09:28 tokomer_ joined 09:31 dubi0us joined 09:33 broquaint joined 09:35 dubi0us left 09:47 dubi0us joined 09:48 tokomer_ left 10:00 ChoHag left, dubi0us left 10:07 dubi0us joined 10:08 astj joined, astj_ left 10:11 dubi0us left 10:12 pecastro joined 10:37 TEttinger left, dubi0us joined 10:44 Cabanossi left 10:46 dubi0us left 10:47 Cabanossi joined 10:48 parv left 10:57 dubi0us joined 11:00 ChoHag joined 11:02 dubi0us left 11:03 cog__ joined 11:06 cog_ left 11:07 zakharyas left 11:09 zakharyas joined 11:12 pmurias joined, dubi0us joined 11:17 dubi0us_ joined 11:18 dubi0us left 11:22 dubi0us_ left 11:37 MasterDuke joined, dubi0us_ joined 11:45 Cabanossi left 11:46 dubi0us_ left, Cabanossi joined 11:49 b2gills left 11:55 zengargoyle left 11:58 zengargoyle joined 12:12 dubi0us joined, pmurias left 12:13 pmurias joined 12:16 dubi0us left 12:18 dubi0us joined, raschipi joined 12:19 wamba left, bjz joined 12:21 pmurias left 12:26 dubi0us left 12:29 araraloren joined 12:30 dubi0us joined 12:35 TreyHarris joined 12:44 Khisanth left, Cabanossi left 12:46 Cabanossi joined 12:48 dubi0us left 12:51 sftp joined 12:57 Khisanth joined 13:05 raschipi left 13:08 bjz_ joined 13:09 ufobat left, bjz left 13:12 wamba joined 13:15 Cabanossi left
andrzejku_ hi 13:15
I want to ask something you 13:16
x)
13:16 Cabanossi joined
lizmat andrzejku_: what was the question 13:23
13:24 dubi0us joined
andrzejku_ I am doing small script for the personal use, but I got idea how to move into commercial way however it is very experimental if someone can review my code from time to time I would be happy 13:26
it is perl6 13:27
13:31 bjz joined 13:32 bjz_ left 13:34 raschipi joined
lizmat andrzejku_: is it gistable ? 13:36
andrzejku_ lizmat, yes but it is private 13:38
lizmat do I need to sign an NDA ? 13:39
andrzejku_ lizmat, no I don't think so D: 13:40
lizmat ok, then make a proivat
private gist and send me the url in a privmsg 13:41
13:45 dubi0us left 13:48 dubi0us joined 13:52 dubi0us left 13:55 dubi0us joined 13:59 dogbert17 joined, dubi0us left
dogbert17 .seen moritz 14:00
yoleaux I saw moritz 2 Jul 2017 20:35Z in #perl6: <moritz> you're welcome
14:01 dubi0us joined, dubi0us left 14:02 dubi0us joined 14:03 lucasb joined
moritz last saw moritz when looking at the keyboard, and noticing his hands there 14:05
dogbert17 moritz: do you think that I could take relevant parts of the material from design.perl6.org/S26.html#Pod_comments and add to the recently commited doc for Pod::Block::Comment? 14:07
the Pod documentation at docs.perl6.org is currentlu a bit lacking IMHO 14:11
*currently
hmm, otoh there's quite a bit of documentation here, docs.perl6.org/language/pod#Pod_comments, perhaps that's enough 14:16
14:18 ChoHag left
moritz nods his head 14:19
dogbert17 so perhaps the class documentation can stay the way it is, i.e. somewhat terse 14:22
will add a few more missing classes to the doc, e.g. Table 14:24
14:36 nattefrost_ left
Geth doc: b7f3f2c34d | (Jan-Olof Hendig)++ | doc/Type/Pod/Block/Table.pod6
Added docs for Pod::Block::Table
14:39
14:40 dubi0us left
dogbert17 m: dd $=POD 14:43
camelia 5===SORRY!5=== Error while compiling <tmp>
Pod variable $=POD not yet implemented. Sorry.
at <tmp>:1
------> 3dd $=POD7⏏5<EOL>
dogbert17 :(
14:46 dubi0us joined 14:47 cdg joined 14:49 linuksz joined 14:51 dubi0us left 14:52 dubi0us joined 14:54 MilkmanDan left 14:55 MilkmanDan joined 14:57 dubi0us left 14:58 dubi0us joined
melezhik Hi! 14:59
Say I handle in CATCH block, how can I print the stacktrace?
.Str.say is not enough for me ... 15:00
timotimo docs.perl6.org/type/Exception#method_backtrace
melezhik handle -> handle an exception 15:01
thanks timotimo: will take a look
jnthn .say (without the .Str) includes a bt too, iirc
melezhik ok jnthn: thanks , this one works 15:03
15:08 bjz left 15:09 lowbro left
raschipi melezhik: it's not much a stacktrace in p6 because the frames may be moved to the heap if they are closed over (turned into a closure). That's why it's called "backtrace". 15:13
melezhik ok, thanks I'm awared now
raschipi If that doesn't make sense, just ignore it.
I just said it so you're more likely to remember the name next time you need it. 15:14
melezhik yeah, it's not that important in my case, I only want to get as much as possible at the log in case any errors, and this seems work for me
ok, sure
thanks for clarification 15:15
15:21 alimon joined 15:25 xtreak_ joined 15:29 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Added docs for Pod::Block::Table' 15:29
travis-ci.org/perl6/doc/builds/249657419 github.com/perl6/doc/compare/88421...f3f2c34d0a
15:29 travis-ci left 15:33 zakharyas left 15:34 cdg left 15:35 khw joined 15:38 cdg joined 15:40 TimToady left, ptolemarch left 15:41 ptolemarch joined 15:42 domidumont left 15:44 xtreak_ left 15:46 Cabanossi left, Cabanossi joined 15:47 TimToady joined 15:48 jonas1 left 15:49 nicq20 left 15:51 nicq20 joined 15:52 mr-foobar left 15:56 lichtkind left 15:57 mr-foobar joined 16:00 abraxxa left 16:02 robertle left 16:03 Skarsnik joined
Skarsnik Hello 16:04
timotimo yo! 16:07
16:07 troys joined
Skarsnik I am curious, is there a map of the nqp function? I am trying to find die 16:08
16:09 lichtkind joined
timotimo you mean nqp::blah to moar instruction to moarvm source code? 16:09
github.com/MoarVM/MoarVM/blob/mast...rp.c#L1217
it's just MVM_exception_die that gets called
jnthn Or if nqp:: op docs, there's docs in the NQP repo on many of them 16:10
Skarsnik I don't know, I am trying to find what get called when there is a nqp::die ^^ 16:12
I am trying to figure rt.perl.org/Ticket/Display.html?id=127345
16:14 ChoHag joined
timotimo does it actually have a proper line annotation for that piece of code, or do we pretend it's the same line? 16:14
16:16 sftp left
timotimo you'd be able to figure this out with writing it to an mbc file and moar --dump ing that 16:18
16:19 mack[m] left 16:21 sftp joined 16:24 mienaikage joined 16:25 linuksz left 16:29 dubi0us left 16:31 robertle joined 16:32 araraloren left 16:34 cdg left
Geth doc: 55e1043268 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod6
Expanded the documentation for 'stable'. timotimo++, jnthn++
16:34
16:39 dubi0us joined
Skarsnik timotimo, not sure how to dump thing with moar 16:44
16:44 Cabanossi left 16:47 Cabanossi joined
raschipi Skarsnik: moar --dump 16:48
MasterDuke Skarsnik: perl6 --target=mbc --output=foo.mbc -e 'say "hi"'; moar --dump foo.mbc
Skarsnik Oh thx :)
16:50 tadzik joined, mack[m] joined, Matthew[m] joined, unclechu joined, ilmari[m] joined, dp[m] joined, CIAvash[m] joined, xui_nya[m] joined 16:51 linuksz joined
linuksz how can i pass an object to a subroutine? 16:53
mst the_sub($the_object); 16:55
linuksz my $scalar = MyObject.new;
MySub($scalar); 16:56
16:56 setty1 joined
linuksz it passes a reference, don't it? 16:56
raschipi the signature of the subroutine will determine how it's passed 16:58
linuksz what should be the signature for passing the object, not $scalar 16:59
?
raschipi If $scalar has the object in it, that's the object. 17:00
linuksz i have two arrays @first_array contains pointers for objects. i want modify these objects with a subroutine and make a @second_array, that contains the modified object 17:01
raschipi If you want a copy, use 'is copy', if you want to change it in place, use 'is rw'.
linuksz but it modifies the scalar containing the reference, don't? 17:02
i want to modify a copy of the object
if ($scalar is copy), it makes two reference for the same object, don't? 17:03
raschipi No, it will copy the object. The derreference is automatic.
timotimo uh
raschipi Maybe I'm confused too? 17:04
17:04 troys is now known as troys_
timotimo m: class Test { has $.foo is rw }; sub changetest($param is copy) { $param.foo = 99 }; my $thing = Test.new(foo => 1); say $thing.perl; changetest($thing); say $thing.perl 17:04
camelia Test.new(foo => 1)
Test.new(foo => 99)
timotimo it only copies the scalar variable
raschipi Oh, OK. I'm the one confused. 17:05
timotimo normally you get a read-only "copy" of the container, so you can't change the variable's contents
with "is copy" you get a read-write copy of the container, so you can change what the variable contains 17:06
raschipi But the objects have a separate property that says if you can write to them or not.
17:06 grumble left
timotimo and with "is rw" you get the variable without the read-only change, so whatever you change the variable to will also change on the caller's side 17:06
only the scalar variables have that 17:07
17:07 grumble joined
linuksz ok, but if it is copy, or rw, it will change the object, or the scalar containing the reference? 17:07
timotimo well, attributes like "$.foo" in my example also have the "is rw" flag you can set
this is only about the variable, i.e. "what does the variable reference"
objects have to implement any change-prevention themselves 17:08
17:09 lambd0x joined
raschipi linuksz: So, every object has a .clone method that returns a shallow copy. Maybe that's what you want? 17:13
17:15 cdg joined 17:16 cdg left, cdg joined
linuksz yes. 17:16
17:18 kyan left 17:22 mr-foobar left 17:23 dubi0us left, dubi0us joined 17:25 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Expanded the documentation for 'stable'. timotimo++, jnthn++' 17:25
travis-ci.org/perl6/doc/builds/249700224 github.com/perl6/doc/compare/b7f3f...e104326896
17:25 travis-ci left, mr-foobar joined
timotimo looks like it just hung 17:26
17:28 dubi0us left
Skarsnik timotimo, no annotation for an instruction at the line that has the second part of the if condition 17:29
timotimo aha 17:30
in that case that's because we don't keep line numbers around for every kind of qast node
17:31 kyan joined
Skarsnik so it's in the parser, where the ast is created? 17:32
lambd0x Hi there. I've after testing what I reported yesterday regarding win use of perl6 with zef module manager. paste.ubuntu.com/25012613/. It fails for the last version either using rakudobrew or the latest release of Rakudo Star (2 releases ago) 17:33
timotimo either that or the compiler where the .node attribute of the relevant nodes are ignored
Skarsnik brb dinner 17:34
timotimo can you have a look if "zef --debug update" has more interesting output? 17:35
oh
if things go correct it doesn't output anything form e
aha, it's ZEF_PLUGIN_DEBUG 17:36
lambd0x: can you set that env var to 1 or so and see what it outputs
lambd0x timotimo: how should I do it? 17:37
timotimo: never done it before :P 17:38
timotimo env ZEF_PLUGIN_DEBUG=yes zef update
lambd0x timotimo: ok :D 17:39
timotimo most shells let you do that wihtout writing "env" in front
lambd0x will be right back
17:40 lambd0x left 17:44 Lambd0x joined, Cabanossi left 17:45 dct left
Lambd0x Hi. In Win I suppose there isn't a way to set env var for zef or it's different. 17:45
17:45 dakkar left
timotimo oh 17:46
i think you just have to write set ZEF_PLUGIN_DEBUG=yes
and in the next line the zef command
17:47 Cabanossi joined
Lambd0x didn't work. I had tried it too already :D 17:48
timotimo :(
i don't know how to windowses
Lambd0x haha
It's a bit tricky this problem 17:49
timotimo it should be easy to do :\
17:50 bjz joined
Lambd0x I will try getting a Bash environment for windows to see if then I'm able to do this. 17:50
timotimo huggable: windows 17:52
huggable timotimo, nothing found
timotimo huggable: bash on windows
huggable timotimo, nothing found
timotimo hrm
there's a command you have to run to allow it to work with executable stack disabled 17:53
but i can't find it right now
17:57 bjz left 18:03 ChoHag left
Skarsnik hm 18:06
skarsnik@debian:~/perl6/rakudo$ ./install/bin/perl6 --target=ast --output=foo.ast piko.p6 18:07
===SORRY!===
cannot stringify this
geekosaur huggable, bash on windows :is: sudo execstack -c /usr/lib/libmoar.so
huggable geekosaur, Added bash on windows as sudo execstack -c /usr/lib/libmoar.so
Skarsnik is that a bug or I am just doing something bad?
geekosaur (it's in there as "win10 bash")
timotimo seems like we just don't support --output with --target=ast 18:08
Skarsnik I guess it only keep the line for statement in QAST::Op(if) <sunk> :statement_id<?> if 1 eq 2 \n\t|| $a.piko 18:11
?
zengargoyle what's a -- (foo => $bar)x!!$bar -- replacement in a function call as a named param? 18:14
timotimo i think we only keep Stmt and/or Stmts
zengargoyle: what? :)
18:15 bwisti joined
zengargoyle do-something( a=>"b", (c=>$x)x!!$x ); only do c=>$x if $x is true/defined/exists 18:15
timotimo i wonder where that syntax comes from 18:16
anyway, you'd |%($x ?? c => $x !! ()) probably
Skarsnik do you want the ast output? 18:17
zengargoyle the p5 Enterprise (NC-1701) operator is '()x!!'
timotimo some kind of flattening of a hash in any case
zengargoyle i thought i saw a cool ( .... if .... ) sort of construct somewhere. prolly from Zoffix :) 18:18
18:19 cdg left
timotimo oh, yeah, you can put that inside the ( ), too 18:20
m: say (a => 1 if 1)
camelia a => 1
Lambd0x timotimo: pastebin.com/SwGUPWNd 18:21
timotimo Possible Spam Detected - fantastic 18:22
Lambd0x it seems to require: wget and curl. But Rakudo Star didn't come with it.
18:23 dubi0us joined
timotimo no, not "and" 18:23
it just uses the powershell web request thing instead
Lambd0x it also says metacpan plugin is not enabled hence it fails at last 18:24
18:25 dubi0us left, dct joined
timotimo i don't know what's wrong there, it should be able to grab that five just fine? 18:26
the ecosystems/master/cpan.json
18:26 dubi0us joined
zengargoyle timotimo++ both ??!! and if work inside |%() but if is a few chars shorter. :) 18:27
Lambd0x timotimo I said it appears to be tricky. 18:28
linuksz how can i print of an object's variable's value? 18:29
m: class Test { has $.var }; my $object = Test.new($var => "nothing"); say "$object.var"
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$var' is not declared. Did you mean '&VAR'?
at <tmp>:1
------> 3st { has $.var }; my $object = Test.new(7⏏5$var => "nothing"); say "$object.var"
timotimo you have to spell it var => "nothing"
geekosaur m: class Test { has $.var }; my $object = Test.new(var => "nothing"); say "$object.var.WHAT"
camelia Test<34265360>.var.WHAT
geekosaur heh
timotimo and in the quotation marks you will have to put () after the method call
geekosaur m: class Test { has $.var }; my $object = Test.new(var => "nothing"); say $object.var.WHAT
timotimo or it won't interpolate
camelia (Str)
18:30 ChoHag joined
linuksz m: class Test { has $.var }; my $object = Test.new(var => "nothing"); say "$object.var" 18:30
camelia Test<36350176>.var
linuksz i want it to say "nothing" 18:31
geekosaur m: class Test { has $.var }; my $object = Test.new(var => "nothing"); say $object.var
camelia nothing
geekosaur m: class Test { has $.var }; my $object = Test.new(var => "nothing"); say "$object.var()"
camelia nothing
moritz say "$object.var()" should also work
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/Tld6f2faVL
Variable '$object' is not declared
at /tmp/Tld6f2faVL:1
------> 03say "08⏏04$object.var()" should also work
moritz too slow
evalable6: I didn't want it evaluated
evalable6 moritz, Full output: gist.github.com/c7749a13e6165cab3d...fd4197b5c8
(exit code 1) 04===SORRY!04=== Error while compiling /tmp/DWM3WFRqms
Undecla…
geekosaur heh
m: class Test { has $.var }; my $object = Test.new(var => "nothing"); say "{$object.var}" 18:32
camelia nothing
18:32 MilkmanDan left
linuksz thanks 18:32
timotimo you have to say "thanks for nothing" :D 18:33
18:33 Lambd0x left, MilkmanDan joined 18:34 espadrine joined 18:42 ufobat joined 18:46 dubi0us left 18:47 dubi0us joined, dubi0us left, dubi0us joined 18:50 lucasb left 18:52 troys_ is now known as troys 18:53 mr-foobar left 18:54 mr-foobar joined 18:56 FROGGS joined 19:00 domidumont joined 19:06 skids joined 19:09 andrzejku joined 19:12 domidumont left
andrzejku do you know something about equivalent numpy for perl6? 19:14
19:16 darutoko left 19:23 mr-foobar left
Skarsnik interesting skarsnik@debian:~/perl6/rakudo$ ack-grep "annotated" give me some definition but never a use for the method 19:23
19:24 dubi0us left 19:25 dct left, dct joined
MasterDuke Skarsnik: try src/vm/moar/QAST/QASTCompilerMAST.nqp:2053: in NQP 19:25
moritz that's the definition, not a use 19:26
which seems to be Skarsnik's point
yes, looks like dead code
MasterDuke oops, reading comprehension fail 19:27
Skarsnik and I don't find a call for annotate('line' or annotate('file'
19:30 mr-foobar joined, dubi0us joined 19:32 dubi0us_ joined
MasterDuke an annotate method is called in rakudo and nqp in a bunch of different places 19:33
src/mast/compiler.c:935-936: in MoarVM also looks to be marking file/line info
Skarsnik annotate yes 19:34
but not annotated
19:35 dubi0us left
MasterDuke right, don't see any .annotated( method calls anywhere 19:35
19:36 dubi0us_ left 19:38 dubi0us joined
El_Che andrzejku: if you come to yapce, Dana Jacobsen is the man to talk about that 19:38
yoleaux 2 Jul 2017 00:52Z <zengargoyle> El_Che: you might want to add at least the site directory to PATH so that scripts intalled by zef can be found.
2 Jul 2017 01:20Z <zengargoyle> El_Che: do you want 2 different install_zef scripts?
19:42 dubi0us left, tomaw joined 19:45 dubi0us joined 19:47 dubi0us left
timotimo melezhik: we have shaped native arrays, which is much like a numpy ndarray 19:48
melezhik: and a lot of functions numpy offers you can just do with hyper operators and such
19:49 Sgeo_ joined, dubi0us joined 19:50 Sgeo left, troys is now known as troys_ 19:51 pilne joined 19:53 mr-foobar left 19:57 mr-foobar joined 19:59 TEttinger joined 20:00 dubi0us_ joined, Cabanossi left 20:01 Cabanossi joined 20:03 dubi0us left, tomaw left, tomaw joined 20:06 tomaw left, tomaw joined, rindolf left 20:23 mr-foobar left
kybr what is the difference between Num and num? 20:26
20:27 mr-foobar joined
Skarsnik num is probably a native type 20:28
kybr okay. i'm playing with an example that's using SDL2::Raw and NativeCall, so probably one of those is defining num? 20:30
Skarsnik hm 20:34
should probably be num32 or num64? I don't remember much
num exist I think 20:35
m: my num $b = 42; say $b;
camelia This type cannot unbox to a native number: P6opaque, Int
in block <unit> at <tmp> line 1
Skarsnik m: my num32 $b = 42; say $b;
camelia This type cannot unbox to a native number: P6opaque, Int
in block <unit> at <tmp> line 1
20:35 linuksz left
Skarsnik m: my num32 $b = 42; say $b; 20:36
camelia This type cannot unbox to a native number: P6opaque, Int
in block <unit> at <tmp> line 1
raschipi m: my num $b = 42e0; say $b;
camelia 42
raschipi m: my num $b = 42e0; say $b;
camelia 42
Skarsnik yeah this notation
m: use NativeCall; sub foo is native(num $a);
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3use NativeCall; sub foo is native(num7⏏5 $a);
expecting any of:
infix
infix stopper
statement end
statement mo…
20:37 pmurias joined
Skarsnik m: use NativeCall; sub is native foo(num $a); 20:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3use NativeCall; sub is7⏏5 native foo(num $a);
expecting any of:
new name to be defined
raschipi 42e0 is mantissa 42 and exponent 0, which has the value 42 * 10 ** 0
Skarsnik m: use NativeCall; sub foo(num $a) is native;
camelia 5===SORRY!5=== Error while compiling <tmp>
A unit-scoped sub definition is not allowed except on a MAIN sub;
Please use the block form.
at <tmp>:1
------> 3e NativeCall; sub foo(num $a) is native;7⏏5<EOL>
Skarsnik m: use NativeCall; sub foo(num $a) is native{ * }; 20:38
camelia 5===SORRY!5=== Error while compiling <tmp>
A unit-scoped sub definition is not allowed except on a MAIN sub;
Please use the block form.
at <tmp>:1
------> 3iveCall; sub foo(num $a) is native{ * };7⏏5<EOL>
Skarsnik whatever I don't remember xD
but Nativecall will warn you if you put a bad type in a native sub
kybr okay. thanks. FYI, i was looking at this: www.perlmonks.org/?node_id=1167456 20:39
20:41 andrzejku left
geekosaur space needed 20:42
it thinks the {*} is a parameter to 'is native'
20:43 dubi0us joined
geekosaur and it does need a parameter, which is the C symbol 20:43
20:45 dct left 20:46 dubi0us_ left
Skarsnik I think it's ... not * 20:52
20:54 mr-foobar left
geekosaur * is correct for the body. not correct for the is native(what) 20:55
20:55 dubi0us left
geekosaur and the is native ate the { * } as a parameter because you needed a space before it to indicate it was not a parameter to 'is native', so then the compiler complained that the *sub* had no block 20:56
sorry, the parameter isn;t a symbol, it's a shared object 20:57
is native('foo') => look for libfoo.so, libfoo.dylib, or foo.dll depending on platform
20:57 mr-foobar joined 20:59 Cabanossi left 21:02 Cabanossi joined
Skarsnik m: use NativeCall; sub foo(num $a) is native { * }; 21:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot resolve caller infix:<==>(NQPMu, Int); none of these signatures match:
($?)
(\a, \b)
(Real \a, Real \b)
(Int:D \a, Int:D \b)
(int $a, int $b)
(Num:D \a, Num:D \b …
Skarsnik oh right the space
21:03 setty1 left
Skarsnik m: use NativeCall; sub foo(num $a) is native("foo") { * }; 21:03
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot resolve caller infix:<==>(NQPMu, Int); none of these signatures match:
($?)
(\a, \b)
(Real \a, Real \b)
(Int:D \a, Int:D \b)
(int $a, int $b)
(Num:D \a, Num:D \b …
21:05 bjz joined
geekosaur now I think we have an LTA... 21:06
m: use NativeCall; sub foo(num32 $a) is native("foo") { * };
camelia ( no output )
geekosaur LTA for a bad native type 21:07
Skarsnik hm 21:08
probably my code 21:09
should have been seen at the test?
21:10 raschipi left 21:11 TimToady left 21:12 _p____ joined 21:13 TimToady joined
_p____ Hey is there a reason why the page rakudo.org/how-to-get-rakudo/ says the latest rakudo star is 2017.01 but in the download directory I can see 2017.04.2 ? 21:13
( I mean the release for windows ) 21:15
Skarsnik hm 21:20
21:22 epony left 21:24 skids left, mr-foobar left 21:27 mr-foobar joined
timotimo yeah, that looks kinda wrong 21:27
Skarsnik I got a lot of Parse errors: No plan found in TAP output
for Nativecall test when running make test
timotimo thankfully the download gives you the right file 21:28
Skarsnik: that's a crash before the "plan" has been output
Skarsnik /04-nativecall/16-rt125408.t ............ Dubious, test returned 1 (wstat 256, 0x100) 21:29
No subtests run
is that a crash too?
timotimo looks like 21:30
Skarsnik nvm I mess up my rakudo x) 21:33
m: use NativeCall; sub badnum2(num $a) { * }; 21:35
camelia ( no output )
Skarsnik m: use NativeCall :All; sub badnum2(num $a) { * }; check_routine_sanity(&badnum2); 21:36
camelia 5===SORRY!5=== Error while compiling <tmp>
Error while importing from 'NativeCall': no such tag 'All'
at <tmp>:1
------> 3use NativeCall :All7⏏5; sub badnum2(num $a) { * }; check_rout
Skarsnik m: use NativeCall :ALL; sub badnum2(num $a) { * }; check_routine_sanity(&badnum2); 21:37
camelia Cannot resolve caller infix:<==>(NQPMu, Int); none of these signatures match:
($?)
(\a, \b)
(Real \a, Real \b)
(Int:D \a, Int:D \b)
(int $a, int $b)
(Num:D \a, Num:D \b --> Bool)
(num $a, num $b --> Bool)
(…
_p____ timotimo: true but I had 2017.01 and was checking the page without even bothering to click the linking thinking the windows release was delayed... until today
Skarsnik interesting, the test does not fail
m: use NativeCall :ALL; sub badnum2(num $a) { * }; CONTROL { when CX::Warn { .die } }; check_routine_sanity(&badnum2); 21:38
camelia Cannot resolve caller infix:<==>(NQPMu, Int); none of these signatures match:
($?)
(\a, \b)
(Real \a, Real \b)
(Int:D \a, Int:D \b)
(int $a, int $b)
(Num:D \a, Num:D \b --> Bool)
(num $a, num $b --> Bool)
(…
21:38 lucasb joined
Skarsnik I am confused, why camelia fail on that but the test does not fail 21:40
timotimo yeah, let me have a look
_p____ anyway, looking forward to jnthn's IO improvement in the next release hopefully.
Cheers
21:40 _p____ left
Skarsnik ok it fail when using from the command line 21:41
timotimo i updated the download page up on rakudo.org 21:43
21:44 geekosaur left, user3 joined 21:45 geekosaur joined
Skarsnik nvm 21:45
the test expect a die xD 21:46
21:46 sacomo left
user3 why doesn't this code work at the command line(it works when put in a file): perl6 -e "'myfile'.IO.lines ~~ m:g/mypattern/; for @$/ -> $x {say ~$x}" 21:46
21:46 troys_ is now known as troys
geekosaur because you are on a unix and shells interpolate $ in double quoted strings 21:47
so the shell ate both the '$x's 21:48
21:48 Sgeo_ left
user3 ok, let met try again... 21:48
geekosaur (or a unixy shell on windows)
21:49 espadrine left, bjz left
user3 good. I've fixed it and it works now: perl6 -e '"myfile".IO.lines ~~ m:g/mypattern/; for @$/ -> $x {say ~$x}' 21:49
I just exchanged the quotes 21:50
lol
Skarsnik m: say num.HOW.^can("nativesize"); 21:51
camelia nativesize
user3 by the way, is @$/ ther best way to get the results from a m:g match?
Skarsnik m: say num.HOW.^can("nativesize"); say num.HOW.^nativesize; 21:52
camelia nativesize
X::Method::NotFound exception produced no message
in block <unit> at <tmp> line 1
Skarsnik Did this stuff get changed somehow?
m: say num32.HOW.^can("nativesize"); say num32.HOW.^nativesize; 21:54
camelia nativesize
X::Method::NotFound exception produced no message
in block <unit> at <tmp> line 1
Skarsnik m: say num32.HOW.^can("nativesize"); say num32.^nativesize;
camelia nativesize
32
Skarsnik m: say num.HOW.^can("nativesize"); say num.^nativesize; 21:55
camelia nativesize
No such method 'gist' for invocant of type 'NQPMu'. Did you mean 'isa'?
in block <unit> at <tmp> line 1
Skarsnik should the .^can("nativesize") return false? I think it was the old behavior?
geekosaur that, or nativesize should produce a perl6 undef instead of an NQP undef 21:57
or possibly both
Skarsnik I use it to check for valid type in NC 21:58
return False if T.HOW.^can("nativesize") && T.^nativesize == 0; #to disting int and int32 for example
it's this line that produce the infix error
geekosaur right. it could be argued either way, either all types implement nativesize but it should be either (Int) or a Failure; or it should not exist. I suspect internals are cleaner if it is always defined though 22:00
er, if .^nativesize method always exists
but it should produce something more p6-friendly
22:01 pmurias left, sacomo joined
Skarsnik using Int is bad 22:02
if you want an example of why gist.github.com/Skarsnik/d4e9b31b2859114ac643 ^^ 22:04
22:04 seatek joined
geekosaur er? this is not that case 22:05
nativesize is implemented by the MOP, not by a dylib
Skarsnik I know, but it show why accepting Int in native sub is bad ^^
anyway, checking for nativesize was my hacky way to disting int and int32, but now it return always something with can 22:06
geekosaur right, I'm saying the new case is to see if the result of ^nativesize is defined 22:08
except that it's producing an NQP undef instead of a perl 6 undef, so it explodes
Skarsnik It's compile time check, I don't remember if you can check for def or not 22:09
lizmat and another Perl 6 Weekly hits the net: p6weekly.wordpress.com/2017/07/03/...-on-speed/
Skarsnik this code was very annoying to write
nice :)
geekosaur in that case it's even worse that it is producing NQPMu instead of something you can test 22:10
Skarsnik m: say int.^nativesize === Mu:U;
camelia Cannot resolve caller infix:<===>(NQPMu, Mu:U); none of these signatures match:
($?)
(\a, \b)
(Int:D \a, Int:D \b)
(int $a, int $b)
(Num:D \a, Num:D \b)
(num \a, num \b --> Bool)
(Str:D \a, Str:D \b --> Bool)
22:12 sacomo left 22:13 user3 left
Skarsnik damn, time to go to bed 22:14
will check more this tomorrow
geekosaur m: say int.^nativesize === NQPMu;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
NQPMu used at line 1
geekosaur figures 22:15
oh
m: use MONKEY-GUTS; say int.^nativesize === NQPMu;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
NQPMu used at line 1
geekosaur sigh
22:16 Skarsnik left
geekosaur m: use MONKEY-GUTS; say nqp::defined(int.^nativesize) 22:16
camelia 0
timotimo the best thing is how it interprets the ~ in the shell's prompt as "strike through all the following lines please" 22:17
geekosaur .tell Skarsnik use MONKEY-GUTS; say nqp::defined(int.^nativesize) #`{ which is why it should be a p6 undef not nqp } 22:18
yoleaux geekosaur: I'll pass your message to Skarsnik.
22:24 mr-foobar left 22:26 mr-foobar joined 22:30 wamba left 22:45 Cabanossi left 22:47 Cabanossi joined 22:51 ufobat left 22:54 AlexDani` joined 22:55 AlexDani` is now known as AlexDaniel, mr-foobar left 22:56 raschipi joined, mr-foobar joined 22:57 lucasb left 23:03 leont left 23:09 |oLa| left 23:10 mr-foobar left, BenGoldberg joined 23:11 mr-foobar joined 23:14 Praise joined 23:23 cyphase left, robertle left 23:27 cyphase joined 23:29 doks joined 23:40 mr-foobar left 23:44 mr-foobar joined, troys is now known as troys_ 23:47 troys_ is now known as troys 23:59 Cabanossi left