»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:02 rmgk_ joined, rmgk is now known as Guest94293, Guest94293 left, rmgk_ is now known as rmgk 00:18 rurban1 left 00:21 BenGoldberg joined 00:31 aborazmeh joined 00:35 Mouq joined
rjbs Surely today's Advent post should say p6 isn't installed on most unix systems *yet*. :) 00:46
00:51 dayangkun joined 00:52 dayangkun left 01:05 telex left 01:06 telex joined 01:17 tinyblak joined 01:32 Mouq left
dalek kudo/rt-123116: fbe2009 | (Rob Hoelz)++ | src/Perl6/Actions.nqp:
Allow make_where_block to take a custom QAST block

Normally, when building a where block, we want to use the current value of $_. Sometimes, however, we want to perform additional work (in the case of closure parameters, we want to match against $_.signature rather than $_ itself)
01:53
rakudo/rt-123116: fbc87d2 | (Rob Hoelz)++ | src/Perl6/Grammar.nqp:
rakudo/rt-123116: Parse closure parameters
rakudo/rt-123116:
rakudo/rt-123116: See SO6/Closure parameters. For example:
rakudo/rt-123116:
01:54 dalek joined, ChanServ sets mode: +v dalek 01:59 ssqq joined, davido_ left
ssqq nqp-m: my %h := { key => 'value'; } 02:00
camelia ( no output )
02:01 davido_ joined
ssqq nqp-m: my %h := { key => 'value' }; say(%h); 02:02
camelia nqp-moarvm: OUTPUT«cannot stringify this␤ at gen/moar/stage2/NQPCORE.setting:682 (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPCORE.setting.moarvm:print:13)␤ from gen/moar/stage2/NQPCORE.setting:688 (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPCORE.setting.moarvm:sa…»
ssqq Why the debug information of NQP is *magnificent*, How to reduce it? 02:04
02:04 vendethiel left 02:05 immortal joined 02:06 tinyblak left 02:07 tinyblak joined 02:08 erkan left 02:09 ssqq_ joined 02:11 vendethiel joined 02:12 tinyblak_ joined 02:13 rmgk left 02:16 rmgk joined, tinyblak left 02:22 DarthGandalf joined
ssqq_ MOP = 'meta Object protocol' 02:24
02:30 aborazmeh left 02:32 vendethiel left 02:34 vendethiel joined
geekosaur actually we would not clal that magnificent; arguably it is LTA (it doesn't say what it can't stringify and gives no hints as to why, although I'd guess "function") 02:37
oh, nqp level, you're on your own :p
ssqq_ geekosaur: thanks your reply. I think the debug information is helpful with core programmer. 02:43
geekosaur well, nqp is kinda intended for internals hacking; you should expect internals-style errors 02:44
it's the "implementation language" for perl6, not intended to be visible to users
if you get an nqp error when working in perl6, it IS a bug, if only because the error should be caught by perl6 and turned into something meaningful 02:45
02:56 aborazmeh joined 02:58 kurahaupo joined 03:11 aborazmeh left 03:13 Mso150 joined, noganex joined 03:16 aborazmeh joined, noganex_ left
dalek rakudo/nom: fbc87d2 | (Rob Hoelz)++ | src/Perl6/Grammar.nqp: 03:17
rakudo/nom: Parse closure parameters
rakudo/nom:
rakudo/nom: See SO6/Closure parameters. For example:
rakudo/nom:
03:17 dalek left, dalek joined, ChanServ sets mode: +v dalek 03:18 vendethiel left 03:20 konsolebox joined, chenryn joined 03:21 prime joined, prime left, prime joined 03:25 vendethiel joined 03:27 grettis left 03:28 Mso150 left, Mso150 joined 03:30 Mouq joined 03:49 PZt joined, Mso150 left 03:51 chenryn left 03:52 chenryn joined, aborazmeh left 03:54 aborazmeh joined 03:55 aborazmeh left 03:59 cibs left 04:04 Yamin joined
Yamin what is perl? 04:04
Timbus a miserable pile of syntax 04:07
04:08 adu left 04:10 anaeem1_ joined 04:11 anaeem1_ left 04:12 anaeem1 joined 04:15 immortal left 04:16 erkan joined 04:17 kurahaupo left 04:33 chenryn left 04:52 ssqq_ left, ssqq left 05:01 Yamin left, atroxaper joined 05:03 kaare_ joined 05:07 aborazmeh joined, aborazmeh left, aborazmeh joined, atroxaper left 05:25 aborazmeh left 05:30 Alula joined 05:32 kjs_ joined 05:34 ggoebel111111116 joined 05:35 aborazmeh joined 05:39 ptc_p6 joined 05:45 kjs_ left 05:49 kaare_ left 05:50 chenryn joined, tinyblak_ left, tinyblak joined 05:53 vendethiel left 05:57 vendethiel joined 05:59 ptc_p6 left 06:10 tinyblak_ joined 06:12 aborazmeh left, Mouq left, Akagi201_ joined 06:13 Mouq joined 06:14 tinyblak left 06:16 Akagi201 left
TimToady at least it's not a pile of miserable syntax :) 06:16
06:17 kaare_ joined 06:18 cibs joined 06:19 kurahaupo joined 06:25 kurahaupo left 06:27 [Sno] joined
japhb Three pounds of flax. 06:28
06:30 erkan left, dayangkun joined 06:31 chenryn left, erkan joined 06:38 chenryn joined
eiro \o #perl6 06:39
06:40 vendethiel left 06:41 mr-foobar left 06:42 kurahaupo joined, vendethiel joined 06:49 kaleem joined
eiro any perl6 replacement for for my $mate (qw( joe bob )) { *{$mate} = sub { say "hello $mate" } 06:51
06:52 xinming left 06:53 kurahaupo left, xinming joined
lue m: say "Hello, $_" for <Joe Bob> # one way to do it 06:54
camelia rakudo-moar 662447: OUTPUT«Hello, Joe␤Hello, Bob␤»
06:55 bjz joined 07:00 BenGoldberg left
TimToady eiro: it would be better to use a hash than the symbol table, especially since P6 doesn't look for routines in the current package anymore 07:03
m: for <joe bob> -> $mate { OUR::{'&' ~ $mate} = sub { say "hello $mate" } }; OUR::joe() # about as close as you can get 07:05
camelia rakudo-moar 662447: OUTPUT«Cannot find method 'Any'␤ in block <unit> at /tmp/hyb9p5QKT3:1␤␤»
07:05 dayangkun left
TimToady assuming OUR:: were implemented correctly :) 07:05
but subroutines are all stored in lexical scopes nowadays, which may not be changed at run time 07:06
so you'd have to do it in a macro or BEGIN block
m: BEGIN for <joe bob> -> $mate { MY::{'&' ~ $mate} = sub { say "hello $mate" } }; joe() # probably won't work either 07:08
camelia rakudo-moar 662447: OUTPUT«===SORRY!===␤Cannot modify an immutable Any␤»
07:08 anaeem1 left, anaeem1_ joined
TimToady m: BEGIN for <joe bob> -> $mate { COMPILING::{'&' ~ $mate} = sub { say "hello $mate" } }; joe() # probably won't work either 07:08
camelia rakudo-moar 662447: OUTPUT«===SORRY!=== Error while compiling /tmp/L7sCSGMg_G␤Undeclared routine:␤ joe used at line 1␤␤»
TimToady rakudo is a bit weak on pseudopackages ye 07:09
*yet
doubtless there's a way to do it in the nqp underpinnings, but don't do that :) 07:10
07:13 FROGGS left 07:16 aborazmeh joined
TimToady mutable symbol tables is one of the things that makes it very difficult to optimize Perl 5 07:17
07:19 gfldex joined
eiro lue, not what i wanted :) 07:22
TimToady, just read your lines. thanks for helping. 07:23
indeed: YA thing that doesn't work :(
i'll try to work around with eval 07:24
07:28 darutoko joined
eiro Undeclared routine: eval :( 07:28
let's try macros :) 07:30
07:31 jimmy_ joined
Timbus its EVAL now. you need to yell it 07:33
07:37 FROGGS joined 07:38 gfldex left 07:40 blackbolt joined 07:47 blackbolt left, blackbolt joined
masak morning, #perl6 07:49
eiro \o masak
masak eiro: haven't backlogged -- what is it you're trying to do? 07:50
oh, registering a sub dynamically.
eiro masak, same as perl6-users
but i think i'm close to the solution
TimToady pointed me on EVAL, i now have to do this eval at compile time 07:51
07:51 blackbolt left
eiro (if i don't, the compiler complains when functions are called) 07:52
07:53 atroxaper joined
eiro (and BEGIN { doesn't work: i'm searching in the doc 07:54
but enought perl6 for today: i have to go back to my job :( 07:55
thanks everyone
07:55 denis_boyun_ joined 07:56 chenryn left 07:57 chenryn joined 07:58 tinyblak_ left, atroxaper left, tinyblak joined 08:10 vti joined 08:12 aborazmeh left 08:13 zakharyas joined, aborazmeh joined 08:14 tinyblak_ joined 08:18 tinyblak left, rurban joined 08:23 Mso150 joined 08:29 vendethiel left 08:30 vendethiel joined 08:32 Isp-sec joined 08:38 aborazmeh left 08:43 azawawi joined
azawawi hi 08:43
yoleaux 8 Dec 2014 20:20Z <timotimo> azawawi: tony-o built a little "HiJacking" middleware that allows us to steal sockets at an early point so that we can do special things for websockets and eventsource. websockets are going to require some extra fiddling to get the protocol right, whereas eventsource is easy, but only one-way
azawawi timotimo: thanks for the answer 08:45
08:49 fhelmberger joined 08:50 rurban left 08:55 atroxaper joined, ptc_p6 joined 08:58 fhelmberger left 09:00 azawawi left, khisanth_ joined, abraxxa joined 09:01 atroxaper left 09:02 Khisanth left 09:03 ptc_p6 left, vti left 09:04 ptc_p6 joined 09:08 fhelmberger joined, Rounin joined 09:10 abraxxa1 joined 09:11 abraxxa left 09:18 FROGGS left 09:21 rurban joined, rurban left 09:22 FROGGS joined 09:23 Mouq left 09:24 telex left 09:26 telex joined, virtualsue joined
dalek o: 674f272 | (Rob Hoelz)++ | bin/ufo:
Remove calls to .path in favor of .IO

  .path is deprecated
09:29
o: d9182c8 | moritz++ | bin/ufo:
Merge pull request #22 from hoelzro/master

Fix deprecations - Remove calls to .path in favor of .IO
masak m: role A::B {}; sub foo(A $a) {} 09:40
camelia rakudo-moar 662447: OUTPUT«===SORRY!=== Error while compiling /tmp/TNiNkxUsdd␤Type A cannot be used as a nominal type on a parameter␤at /tmp/TNiNkxUsdd:1␤------> role A::B {}; sub foo(A ⏏$a) {}␤ expecting any of:␤ statement …»
masak submits LTA rakudobug 09:41
it's true that A, which is in some sense less real than A::B (or not "inhabited" or whatever), but the error message should explain that.
it's especially confusing that it calls A a "type". 09:42
09:42 kjs_ joined
masak in fact, I think it would be enough if it just said "Containing package A cannot be used..." 09:45
moritz m: package A { }; sub foo(A $a) { } 09:47
camelia rakudo-moar 662447: OUTPUT«===SORRY!=== Error while compiling /tmp/VqZ7Dwi6I3␤Type A cannot be used as a nominal type on a parameter␤at /tmp/VqZ7Dwi6I3:1␤------> package A { }; sub foo(A ⏏$a) { }␤ expecting any of:␤ statemen…»
moritz masak: not just containing packages
masak good point. 09:51
I mean, in some sense A is a type. in both cases.
jnthn It's not even "in some sense".
masak but the fact that it's not enough of a useful type is the more important fact to highlight in the message.
it's not the kind of type to be used for typing :)
jnthn The message is already a LOT better than it just not accepting anything at runtime. 09:52
masak granted.
09:52 dakkar joined
masak m: role A::B {}; sub foo($a) { say $a }; foo(A) 09:52
camelia rakudo-moar 662447: OUTPUT«(A)␤»
masak I mean, passing these things ain't a problem.
jnthn Just remove the word "Type" at the start of the error and it's probably a lot less misleading. 09:53
masak +1
jnthn Or at least, less scizophrenic :)
masak .oO( schizophrenia != multiple personality disorder ) 09:54
dalek kudo/nom: 0e44d93 | moritz++ | src/Perl6/Actions.nqp:
remove the initial "Type" from "Type A cannot be used as a nominal type" error message

  masak++, jnthn++
09:55
masak m: package A {}; my A $a; say $a 09:56
camelia rakudo-moar 662447: OUTPUT«(A)␤»
masak m: role A::B {}; my A $a; say $a
camelia rakudo-moar 662447: OUTPUT«(A)␤»
masak why is this fine but the parameter case ain't?
jnthn masak: Because that case is missing some checks, apparently... :P
masak submits rakudobug 09:57
moritz: rt.perl.org/Ticket/Display.html?id=123396
jnthn Probably something wants factoring out/re-using...
masak should the "package A" one be forbidden too? 09:58
jnthn Yes, it's the exact same case.
(As in, you can't differentiate the two in terms of the objects being created) 09:59
10:01 rindolf joined
Ulti ok so I notice that in the rakudo source coerce type methods dont declare their return types... and that looks to be how to avoid this weird circular dep problem I'm having. This feels like I am missing something really obvious and important though. What is the Perl6 equivalent of using a header file in C, something that just gives you the ability to use a class rather than include it in a strong way. 10:02
actually that doesn't help me either since I still need to create a new instance 10:03
like I'm not wanting to essentially include all the source from some file at a given line I just want to hint at where the symbols for things I'm talking about are found 10:04
moritz Ulti: well, you can stub types with class A { ... } (with literal ...), but then you have to actually declare it later on in the same compilation unit 10:05
Ulti: but in general, if you want to talk about a type, you must include the module that declares it
Ulti with use or in some other way? 10:06
urgh I cant even move it to the role since obviously they use the role too 10:08
10:08 vti joined
Ulti this feels like I am having a brain fart 10:08
10:09 rurban joined 10:13 denis_boyun_ left 10:21 pecastro joined, jimmy_ left 10:30 telex left 10:32 telex joined 10:34 rurban_ joined 10:35 salv0 joined 10:42 kjs_ left, Sqirrel left 10:44 erkan left 10:45 erkan joined 10:47 chenryn left 10:50 Mso150 left 10:51 abraxxa1 left 10:52 Isp-sec left 10:53 abraxxa joined
Ulti so imagine you wanted to do Num.Str without using the nqp unbox and box string stuff in Rakudo, how would that be done in pure Perl6? 11:00
even in the same file I have the problem of class declaration order
11:07 Mouq joined
rurban_ Oh my. Our IO::CaptureOutput replacement does not work on windows 11:08
oops, wrong channel
11:11 Mouq left 11:17 chenryn joined 11:21 fhelmberger left 11:28 fhelmberger joined 11:37 ssqq joined
ssqq nqp-m: ok( nqp::ishash( { key => 'value'; } ), 'this is a hash'); 11:38
camelia nqp-moarvm: OUTPUT«not ok 1 - this is a hash␤»
arnsholt Wut? 11:39
11:41 woolfy left
ssqq nqp-moarvm: ok( nqp::ishash( {} ), 'this is hash'); 11:41
camelia nqp-moarvm: OUTPUT«ok 1 - this is hash␤»
11:45 kaleem left
colomon nqp-m: ok( nqp::ishash( { key => 'value'\ } ), 'this is a hash'); 11:45
camelia nqp-moarvm: OUTPUT«Unable to parse expression in blockoid; couldn't find final '}' at line 2, near "key => 'va"␤ at gen/moar/stage2/NQPHLL.nqp:485 (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQPHLL.nqp:492 (/home/camelia/rak…»
colomon nqp-m: ok( nqp::ishash( { key => 'value' } ), 'this is a hash');
camelia nqp-moarvm: OUTPUT«not ok 1 - this is a hash␤»
colomon huh
11:47 mvuets joined 11:48 woolfy joined 11:49 fhelmberger left
ssqq nqp-m: ok( nqp::ishash( :key<value> ), "this is hash"); 11:49
camelia nqp-moarvm: OUTPUT«not ok 1 - this is hash␤»
11:51 smls joined, denis_boyun joined
smls o/ 11:51
11:53 ssqq left 11:55 chenryn left 11:56 ssqq joined
jnthn {...} is not a hash composer in NQP 11:56
Uh, I think the empty case works.
arnsholt Oh, right!
I keep forgetting that the hash constructor is nqp::hash(...)
jnthn Right 11:57
11:57 chenryn joined
jnthn Yeah, NQP tends towards small/simple, not DWIM like Perl 6. 11:57
ssqq nqp-m: ok(nqp::ishash( nqp::hash(:key<value>) ), 'this is hash'); 11:58
camelia nqp-moarvm: OUTPUT«Iteration past end of iterator␤ at gen/moar/stage2/QAST.nqp:1933 (/home/camelia/rakudo-inst-2/languages/nqp/lib/QAST.moarvm::20)␤ from gen/moar/stage2/QAST.nqp:1931 (/home/camelia/rakudo-inst-2/languages/nqp/lib/QAST.moarvm::68)␤ from gen/moar/stage2/QAS…»
jnthn You have to do it like this:
nqp::hash('key', 'value')
There's no Pair objects in NQP, they only really make sense in certain special cases (like arguments)
12:01 fhelmberger joined 12:04 perturbation joined 12:12 baest_ joined
colomon ye gads, 20+ new modules failing tests overnight. :( 12:14
hmnmm, NativeCall broken?
s/new modules failing/modules started failing/ 12:15
jnthn I wonder if github.com/jnthn/zavolaj/commit/4d...8da2660262 happened but a version bump to Rakudo and NQP did not 12:18
12:19 atroxaper joined 12:23 atroxaper left
colomon jnthn! \o/ 12:24
I don't see any sign of a version bump in the last 24 hours of rakudo
commits 12:25
jnthn OK, then let's try that :) 12:27
ssqq jnthn: how to write a closure in oneline?
:nqp-m { my sub inner() { say('this is inner sub'); }; }; inner(); 12:28
jnthn ssqq: Use the pointy block syntax
Well, that line won't work in NQP or Perl 6.
But you can do it with a sub or a pointy block or the {...} block syntax if no args are needed. 12:29
All of them should behave right; we use closure semantics a good bit in the compiler.
ssqq jnthn: thanks, I would looking compiler code carefully. 12:32
12:32 lwa joined
jnthn ssqq: What are you using NQP for, out of curiosity? 12:32
12:36 chenryn left
colomon jnthn: I can confirm the NativeCall test you linked above is the one that is failing. 12:36
smls m: sub g ($x) { return { "$x: $_" } }; my &f = g "foo"; say f $_ for <a b c>; 12:37
camelia rakudo-moar 0e44d9: OUTPUT«foo: a␤foo: b␤foo: c␤»
smls Gotta love closures :)
12:39 chenryn joined
jnthn colomon: OK, then goto chance the bump will help 12:39
I'll do it in a bit, just a bit tied up fiddling with some network stuffs at he moment
12:39 kaleem joined
colomon jnthn++ 12:39
jnthn (So if anyone wants to beat me to it... :)) 12:40
colomon has to get a kid ready to go to kindergarten at the moment...
12:41 chenryn left 12:43 perturbation left, chenryn joined 12:44 onebitboy joined
hoelzro o/ #perl6 12:54
12:55 konsolebox left 12:57 anaeem1_ left
tadzik masak, masak, ping 12:58
masak: unping, nevermind :)
12:59 mvuets left 13:01 rurban left
moritz hopes tadzik sent a revocable ICMP paket the first time :-) 13:02
13:03 pecastro left
tadzik me too :) 13:03
Timbus he left you hangin; thats a syn
dalek kudo/newio: 2e16662 | (Elizabeth Mattijsen)++ | src/core/IO (5 files):
Implement IO::Locally role + IO::Local class
13:06
rakudo/newio: fbc87d2 | (Rob Hoelz)++ | src/Perl6/Grammar.nqp: 13:07
rakudo/newio: Parse closure parameters
rakudo/newio:
rakudo/newio: See SO6/Closure parameters. For example:
rakudo/newio:
13:07 dalek left 13:08 dalek joined, ChanServ sets mode: +v dalek
moritz Timbus: if it was a SYN, he can just (SYN) NACK :-) 13:08
smls re "<rjbs> Surely today's Advent post should say p6 isn't installed on most unix systems *yet*. :)" I don't know about that... 13:11
Distros don't bundle scripting language interpreters based on how awesome the language is, they bundle things that are required to boot and run the base system.
dalek ast: 37a17ea | (Rob Hoelz)++ | S06-signature/closure-parameters.t:
Test closure parameters without calling the parameter

This way, we can test if failure is occurring in the as a result of binding arguments in the function that accepts a closure parameter, rather than calling the closure parameter itself. For example:
   my sub call-me(&blondie:(Str)) { blondie('') }
Does `call-me(-> Int $foo { })` fail while binding `call-me` or
  `&blondie`?
smls And with the move to things like systemd on Linux, scripting languages are starting to play a smaller role there.
13:13 ssqq_ joined
ssqq_ NQP support *C-Like-Macro* syntax with '#?'? 13:15
smls Only sh/bash and Perl are really ubiquitous on *nix systems; Python etc. didn't manage to take over that niche, and I don't think Perl 6 will either, because two things that matter a lot there are 1) supporting legacy code and 2) insanely fast script start-up time to support tight shell loops. 13:16
masak tadzik: pong, unpong. 13:18
jnthn ssqq: No, that's just handled by a separate script used in the NQP and Rakudo build process 13:21
They're gone by the time we feed it to NQP itself.
13:22 atroxaper joined
hoelzro jnthn: in github.com/jnthn/zavolaj/issues/51, you mentioned how CArray support for NativeCall was pending 6pe support; is there anything I can do on that? 13:24
jnthn hoelzro: Well, port what I did so far in Moar to the JVM and Parrot backends is one step.
6model on the JVM is structurally quite similar, so that's the easier one 13:25
and there's a test file in the NQP branch to tell you if you got it approximately correct. :)
hoelzro alright 13:26
is there work that needs to be done to make it live on Rakudo?
jnthn On JVM I'd like a full p6e impl (which includes the bounded serialization additions that I've yet to get implemented). For Parrot...the minimal thing that needs doing to not regress what works today will do me.
hoelzro alright 13:27
13:27 dayangkun joined
smls lizmat: Do you know the Path::Tiny module for Perl 5? (I only learned about it recently.) 13:28
jnthn At Rakudo level: it's a little hard for me to delegate things at this point because my first implementation attempt at something is the point I tend to do the fine-grained design work.
smls I has some similarities to Perl 6 built-in I/O, e.g. «my @lines = path("foo.txt")->lines;»
13:28 dayangkun left
jnthn Once we get a bit further along probably I can. 13:28
hoelzro jnthn: I figured as much; either way, porting the Moar work would probably build an understanding I would need for it anyway =) 13:29
jnthn But I'm hopeful that once we get the primitives ported over to JVM, then the additions at the MOP level in Rakudo will Just Work.
smls It occured to me, that «path("foo.txt").lines» might be even more self-explanatory than «"foo".IO.lines».
Might it worth adding as a convenience function?
jnthn hoelzro: Once I get native arrays into Rakudo, it will probably also provide a very clear example that can be used to update CArray in nativecall, so if you're up for taking on that bit, that's another thing I could nicely delegate. 13:30
hoelzro jnthn: I can try
jnthn Sure, I'll be happy to help too :) 13:31
jnthn didn't hack any nativecall stuff for a long while
Though I've used it recently :)
Still quite like it. :)
hoelzro it's awesome; one of Perl 6's killer features, imo 13:32
jnthn Room for improvement, still. :)
ooh, I gotta go catch a train
hoelzro don't worry; I have a list =)
jnthn bbiab...train wifi :)
hoelzro alright, thanks for the guidance jnthn
jnthn Welcome :) 13:33
Lemme know if you need any more hints
&
hoelzro will do
13:35 abraxxa left
hoelzro tadzik: you wrote a library that uses NativeCall to call some native helper code that wraps some not-so-fun bits, right? 13:35
tadzik hoelzro: correct, for steroids
hoelzro how did you manage installation of that native helper? 13:36
13:36 abraxxa joined
hoelzro I mean, if I were to do something simliar, how could I make that module panda-install-able? 13:36
13:37 FROGGS left 13:38 chenryn left 13:39 kurahaupo joined 13:40 vendethiel left
carlin hoelzro: take a look at LibraryMake, and Inline::Perl5 for an example module that uses it 13:41
hoelzro carlin: oh, thanks!
tadzik hoelzro: it's not quite pandable, steroids
hoelzro ='(
tadzik hoelzro: but you could write a custom Build.pm to compile that part
I think one of jnthn's projects does that 13:42
or it used to
used to: github.com/jnthn/rakudo-debugger/b...c/Build.pm 13:43
13:44 vendethiel joined
hoelzro cool, thanks! 13:44
13:46 [Sno] left 13:51 anaeem1 joined
dalek ast: 91a4cc9 | (Rob Hoelz)++ | S06-signature/definite-return.t:
Start on tests for definite return values
13:55
13:56 pecastro joined 13:58 anaeem1 left 14:04 anaeem1 joined 14:10 anaeem1 left 14:14 Alina-malina joined 14:18 FROGGS joined 14:21 BigBear joined 14:28 aborazmeh joined 14:31 dj_goku left
jnthn back 14:42
dalek p: d74907d | jonathan++ | tools/build/MOAR_REVISION:
Bump MoarVM revision for native callback changes.
14:48
14:51 tinyblak_ left
dalek kudo/nom: 37b37fd | jonathan++ | tools/build/NQP_REVISION:
NQP bump to get MoarVM with callbacks changes.
14:52
14:52 tinyblak joined
jnthn colomon: Hopefullly this helps the NativeCall situation. 14:52
colomon jnthn: will check 14:53
jnthn Thanks. 14:56
14:56 tinyblak left
colomon jnthn++ # works! 14:56
jnthn yays 14:58
14:59 molaf joined
colomon launching a new smoke test now 14:59
mathw jnthn++ 15:00
mathw really wanted NativeCall last night
15:06 tinyblak joined, ptc_p6 left
PerlJam Is someone working on a post for Advent day 10? 15:07
jnthn When is day 10?
tadzik . o O ( now )
jnthn I started working on a post about MoarVM
colomon tomorrow
jnthn I may be able to finish it on the train today 15:08
I won't have time to finish it this evening though if it ain't done by the time I get to Stockholm
tadzik seen nine?
yoleaux: help
:(
jnthn So I'd not like to commit to 10th
I see 11th is free; I can certainly have it ready for that. 15:09
15:09 BigBear left 15:15 kaare_ left 15:17 aborazmeh left
carlin I wrote up a quick thing about how to make modules that use NativeCall need to compile C code installable with panda: viennan.net/pandamonium.html 15:24
15:27 pecastro left 15:28 kaleem left 15:32 pecastro joined
ugexe is that type of stuff going to be done by the /hooks folder of a module in the future? 15:35
tadzik was there such plan? 15:36
carlin: nice :)
jnthn never heard of one... :)
ugexe hooks: All files in this directory should contain executable Perl 6 code, to be executed at various stages of the install process of this distribution. 15:38
i guess makefile isnt perl6 though
jnthn Oh no!!!
I really will have to find a better way to do what that article wnats 15:39
15:39 rurban joined
PerlJam That business with the "native" subroutine makes me think that we should have some variation where "is native(&find-my-lib)" could work. 15:39
jnthn Because you're doing something a module load time that is meant to be done at compile time 15:40
and so you'll end up with the effects serialized into a downstream module using your one
Which means if you have a module that does this, lets call it A, and pepole write module B and module C that each use A, and then somebody tries to load both B and C in a program (or another moudle) there'll probably be a deserialization conflict. 15:41
The trait needs applying at module A's compile time. 15:42
15:42 pmichaud joined
pmichaud good morning, #perl6 15:42
PerlJam greetings pm!
jnthn I'll have to come up with something in native call to let us do this dynamic lookup properly, without causing such bustage. :)
pmichaud: o/ 15:43
PerlJam: And yes, that is certainly one possible answer. 15:44
PerlJam: That'd mean we apply the trait at the correct time still. 15:45
15:45 ssqq_ left, ssqq left 15:47 BigBear joined
pmichaud I wanted to give a Pm availability/status update 15:47
Thanksgiving week didn't turn out at all as expected. This week I'm booked with robotics.
colomon pmichaud! \o/
pmichaud Next week I'm completely open, and will be working on GLR. 15:48
mathw \o/ 15:49
jnthn \o/ 15:51
jnthn has Friday mostly free for Perl 6 things, plus should have tuits at the weekend. 15:56
And a limited supply on the next couple of evenings too.
Though not this evening.
I'll continue on 6pe and working towards native array support.
tadzik 6pe? 15:58
15:58 atroxaper left
jnthn 6model parametric extensions 15:58
tadzik oh :)
PerlJam I guess that leaves NFG for TimToady ;)
jnthn A small 6model extension that provides a little bit of missing glue at the runtime level, so we can neatly deal with a bunch of the bugs in typed arrays today, get native arrays without them, implement coercion types in a decent way, and so forth. 16:00
16:01 rurban left
moritz sounds like a useful thing to have :-) 16:03
jnthn Yes, took a while to come up with. 16:04
I like small additions that will help me solve a bunch of design problems at once. :)
mathw it's a bit of a hint that you might have got something right, isn't it? :) 16:05
jnthn Well, it's at least a good clue you're onto the small problem at the heart of the bigger ones. :) 16:06
16:06 denis_boyun left
mathw And that this step might be better than the previous step 16:07
It's a good feeling :) 16:08
mathw out
16:09 BigBear left, Rounin left 16:13 Hor|zon left 16:24 kaare_ joined 16:26 kaleem joined 16:33 zakharyas left 16:34 erkan left 16:38 BigBear joined 16:43 molaf left 16:46 mr-foobar joined 16:48 [Sno] joined 16:49 vti left 16:50 [Sno] left, [Sno] joined, kurahaupo left 16:55 awwaiid joined 16:58 atroxaper joined 17:00 rindolf left 17:04 atroxaper left 17:06 abraxxa left 17:08 pecastro left 17:09 BigBear left 17:13 kaleem left 17:17 Mouq joined, BigBear joined 17:34 telex left, telex joined 17:39 denis_boyun joined 17:40 aborazmeh joined 17:43 isBEKaml joined 17:46 isBEKaml left 17:50 mephinet joined 17:51 robinsmidsrod left 17:53 BigBear left 17:54 robinsmidsrod joined, BigBear joined 17:56 aborazmeh left 18:00 dakkar left 18:02 mvuets joined 18:05 telex left 18:06 BigBear left 18:08 robinsmidsrod left 18:09 robinsmidsrod joined 18:10 rurban joined, rurban1 joined, denis_boyun___ joined 18:11 Mso150 joined 18:12 denis_boyun left, rurban1 left, isBEKaml joined 18:13 vti joined 18:14 rurban left 18:16 robinsmidsrod left
vendethiel oh, did github just add diff highlighting? great! 18:17
Also, (whoever made today p6advent's post)++! It's really good. Of course, (everybody else who contributed)++ :)
jnthn diff highlighting?
moritz vendethiel: it was smls++
18:17 spider-mario joined
[Coke] .u clock face one oclock 18:17
yoleaux U+1F550 CLOCK FACE ONE OCLOCK [So] (🕐)
vendethiel smls++
jnthn: github.com/jashkenas/coffeescript/...3754/files 18:18
18:18 grettis joined
jnthn ohh...shiny :) 18:18
moritz there's nobody signed up for tomorrow
18:18 telex joined
smls Huh? I don't have anything to do with github highlighting... 18:18
moritz I might have some tuits, but I could also spend that on configuring the perl 6 comunity server
jnthn smls: You were being ++'d for the blog post :)
smls oh 18:19
isBEKaml smls: lol, the context! :-)
18:19 robinsmidsrod joined
smls :) 18:19
jnthn I had too many $dayjob bits to tend to on the train journey, so didn't get time to finish up a blog post. I can do the 11th, I think, but not the 10th.
18:20 robinsmidsrod left
jnthn Oooh...snow tomorrow :D 18:20
18:22 robinsmidsrod joined
mvuets m: sub incr($n){$n++}; my $n=0; incr($n) 18:22
camelia rakudo-moar 37b37f: OUTPUT«Cannot assign to a readonly variable or a value␤ in sub postfix:<++> at src/gen/m-CORE.setting:4941␤ in sub incr at /tmp/uma1503w3w:1␤ in block <unit> at /tmp/uma1503w3w:1␤␤»
mvuets sub apnd(@n){push @n, 0}; my @n; apnd(@n); say @n 18:23
jnthn You need to declare it "$n is rw" for that to work out
mvuets hello #perl6!
right
my question is different though (-: 18:24
does the immutable constrain apply to scalars only?
m: sub apnd(@n){push @n, 0}; my @n; apnd(@n); say @n
camelia rakudo-moar 37b37f: OUTPUT«0␤»
jnthn Yes, it's about scalar containers 18:26
18:26 fhelmberger left
jnthn It does apply to slurpys too 18:26
TimToady the intent is for it to work on arrays eventually somehow, so don't rely on it not breaking someday 18:27
jnthn Note that it also doesn't stop you mutating an object through its methods if it lives in a scalar
TimToady: Uh, I don't know that we can change that post-6.0.0.
18:27 robinsmidsrod left
jnthn It *will* be relied on. 18:28
18:28 ptc_p6 joined
jnthn And...we don't have any viable plan for changing it in the near future. 18:29
mvuets m: sub incr(*@ns){for @ns -> $n {$n++}}; incr(1, 2, 3); # slurpys behave!
camelia rakudo-moar 37b37f: OUTPUT«Cannot assign to a readonly variable or a value␤ in sub postfix:<++> at src/gen/m-CORE.setting:4941␤ in sub incr at /tmp/2tjH40lf_K:1␤ in block <unit> at /tmp/2tjH40lf_K:1␤␤»
TimToady that's not slurpy doing that 18:30
that's 1 refusing to be changed
jnthn Slurpy may do it, mind...
I know is rw on a slurpy does something different from it not being there. 18:31
I think it's a bind/assign distinction to the slurping array though
TimToady slurpies are generally exempt from the readonly nature of parameters, since they're not a ref to anything external
(as a whole) 18:32
18:32 robinsmidsrod joined
dalek rl6-roast-data: f45413d | coke++ | / (5 files):
today (automated commit)
18:33
18:34 Mouq left
[Coke] I've been seing commits to rakudo-js happening recently, haven't I? Nothing on github.com/pmurias/rakudo-js 18:35
moritz [Coke]: maybe in a branch?
[Coke]: ^H^H 18:36
[Coke]: or maybe it was nqp-js?
TimToady pretty sure it was nqp-js 18:39
18:40 ptc_p6 left 18:42 robinsmidsrod left 18:44 robinsmidsrod joined 18:47 robinsmidsrod left 18:49 Rounin joined, treehug88 joined
[Coke] ah. 18:50
18:51 robinsmidsrod joined 18:54 kurahaupo joined, kurahaupo left
mvuets what is the rationale behind immutable scalar function parameters? 18:56
in terms that only scalars are immutable.
moritz mvuets: what you call "immutable" generally goes only one level deep in Perl 6 18:57
mvuets i was wondering about it 18:58
moritz mvuets: and array and hash variables contain are a container object, which presents a layer of indirection
18:58 isBEKaml left
smls In case someone wants to use the remaining 5 hours 'til Dec 10, 0:00 UTC to write an advent post, but doesn't have an idea for a topic, here are some not-yet-fully-fleshed-out ideas I had: gist.github.com/smls/116c4e55de020e17829a 18:59
moritz smls: I'm writing about symbol table introspection right now 19:00
... and it's getting way too long
mvuets i appreciate the idea of immutable types
moritz I guess I should split it up
smls ok
mvuets only these immutable scalars looks to be a half-measure to me. i hope i am missing something? 19:01
dalek : 5cd284d | moritz++ | misc/perl6advent-2014/schedule:
p6advent: claim tomorrow
19:01 kurahaupo joined
mvuets do you see what i mean? 19:03
moritz mvuets: we've had some interesting discussions about them, with no clear way forward 19:04
mvuets so you want to support const/immutable variables, but there is no straightforward way to achieve it yet? 19:05
moritz mvuets: what we mostly want is to provide a deeply immutable view of an otherwise mutable object
mvuets: and that seems non-trivial
mvuets i see, sigh 19:06
moritz: thanks for shedding light on the problem 19:07
i have an another question that bugs me. i expected it would work, but now am a bit surprised it actually works... 19:08
m: my @a = <a o e>; my $a = @a; push $a, "u"; say "[@a[]] [$a]"
camelia rakudo-moar 37b37f: OUTPUT«[a o e u] [a o e u]␤»
mvuets what's a distinction between @a and $a? sigils seems redundant in this case )-:
19:09 FROGGS_ joined
moritz m: my @a = <a o e>; my $a = @a; say "a" for @a; say "scalar:"; say "a" for $a 19:09
camelia rakudo-moar 37b37f: OUTPUT«a␤a␤a␤scalar:␤a␤»
19:10 gfldex joined, jerzi joined
moritz mvuets: faq.perl6.org/#ref 19:11
19:12 FROGGS left 19:13 BigBear joined
jerzi What are Other Ways To Do This? my $acc = "abc".subst(/b/, 'c', :g ) 19:13
I dont like calling a method on string. It is sooo boring. I want some crazy operators. 19:14
moritz m: my $acc = 'abc'; $acc ~~ s:g/b/c/; say $acc
camelia rakudo-moar 37b37f: OUTPUT«acc␤»
moritz m: my $acc = 'abc'; $acc ~~ s:g[b] = 'c'; say $acc
camelia rakudo-moar 37b37f: OUTPUT«acc␤»
moritz jerzi: better? :-) 19:15
jerzi somewhat
19:15 rjbs joined
moritz jerzi: what would you have hoped for? 19:16
jerzi I wish my $acc = "abc" ~~ s:g:return_copy_not_bool /b/c worked
PerlJam jerzi: beware the hobgoblin of foolish inconsistency ;) 19:17
raydiak good morning #perl6 19:19
mvuets moritz: mhmm! interesting! so sigils sort of impose behavior on an underlying value, but not necessarily impose a type
PerlJam jerzi: also ... if you want "some crazy operators", you know that you can make your own without much difficulty, right? 19:20
jerzi so if I have an immutable $i and I want to substitute, I have to do my $j = $i.subst… or $j = copy(i); $j ~~ … ?
I don't, but I prefer to be understood over being fancy, so defining operators, no thanks 19:21
raydiak or (my $acc = "abc") ~~ s:g/b/c/
jerzi what is usual Perl name for a throwaway variable? In Go or Haskell it would be _ 19:22
mvuets m: my $a = [<a o e>]; my $b = 8; my @a = $a; my @b = $b; say "@a[], @b[]"
camelia rakudo-moar 37b37f: OUTPUT«a o e, 8␤»
colomon jerzi: $_ maybe?
it's not exactly throwaway, though 19:23
raydiak $ is an anonymous scalar
colomon for a variable you don't ever want to access, just $ works
jerzi my $sum = 0; $sum += (my $ = "x5") ~~ s:g/x// 19:26
hmm, that does not add 5, it adds 1 19:27
[Coke] m: my \_ = 3; say _; 19:28
camelia rakudo-moar 37b37f: OUTPUT«3␤»
PerlJam m: sub x { (state $)++ }; say x; say x; say x; 19:29
camelia rakudo-moar 37b37f: OUTPUT«0␤1␤2␤»
[Coke] .tell pmurias I am unable to get nqp-js to run a test here. Happy to provide more info…
yoleaux [Coke]: I'll pass your message to pmurias.
PerlJam colomon: did I "access" that variable there?
colomon PerlJam: hmmm, good point 19:30
19:31 Mso150 left 19:33 Mouq joined
mvuets in the previous example i was fooled by say() flattening arrays when i thought it was «@a = $a» flattening 19:33
m: my $a = [<a o e>]; my @a1 = $a; my @a2 = @$a; say "@a1[]; @a2[]"; say @a1.perl; say @a2.perl; say @a1 ~~ @a2;
camelia rakudo-moar 37b37f: OUTPUT«a o e; a o e␤Array.new(["a", "o", "e"])␤Array.new("a", "o", "e")␤False␤»
mvuets this is more clear and less confusing 19:34
19:34 Mso150_l_y joined
jerzi does Perl have named result parameters? like Go golang.org/doc/effective_go.html#named-results 19:42
19:45 denis_boyun_ joined, Mouq left 19:46 denis_boyun___ left 19:47 denis_boyun___ joined
colomon jerzi: no. 19:47
mvuets technically perl6 returns a single values, does it? 19:48
which can be of type Array and carry multiple scalar values, for instance
moritz technically, perl6 can return named results 19:49
I don't think it works though
19:49 denis_boyun_ left
colomon m: sub foo() { (5, "hello"); }; say foo.WHAT 19:49
camelia rakudo-moar 37b37f: OUTPUT«(Parcel)␤»
mvuets Parcels, Lists, Arrays /o\
colomon mvuets: or of type Parcel. though I guess that may become List next week? Same effect, anyway
19:53 BigBear left
colomon m: sub foo() { (5, "hello"); }; my ($num, $str) = fool; say $num; say $str; 19:54
camelia rakudo-moar 37b37f: OUTPUT«===SORRY!=== Error while compiling /tmp/zg9wqK1a_M␤Undeclared routine:␤ fool used at line 1. Did you mean 'foo'?␤␤»
colomon m: sub foo() { (5, "hello"); }; my ($num, $str) = foo; say $num; say $str;
camelia rakudo-moar 37b37f: OUTPUT«5␤hello␤»
Woodi evening #perl6 :) 19:56
moritz: how goes with kvm ? still something needs to be researched ? 19:57
PerlJam I wonder if there's a way to use hash unpacking of the return type to do something similar to what jerzi asked for. 19:59
19:59 denis_boyun_ joined, Mso150_l_y_u joined 20:00 denis_boyun___ left, Mso150_l_y left
moritz Woodi: I've managed to install a host for the WWW server 20:02
Woodi: erm, guest 20:03
20:04 denis_boyun___ joined, denis_boyun_ left 20:07 Mso150_l_y_u_x joined, Mso150_l_y_u left
moritz I have some trouble setting up ipv6, but I guess that's not even related to kvm 20:07
jercos yeah the KVM bits should only ever see ethernet frames after all. 20:11
Woodi maybe some special switches for iptables or other ip or what was used ? 20:12
masak m: foo(); sub foo { say "OH HAI" } 20:13
camelia rakudo-moar 37b37f: OUTPUT«OH HAI␤»
masak m: foo(); my $x; sub foo { say $x }
camelia rakudo-moar 37b37f: OUTPUT«(Any)␤»
Woodi anyway, DDR4, yay :) 20:14
20:17 darutoko left 20:19 gluckwunsch joined
jerzi my regex num { \d+ }; my $r = /<num>X<num>/; $r.perl 20:23
Can I get the original regexp from $r?
I mean, /\d+X\d+/ 20:24
m:my regex num { \d+ }; my $r = /<num>X<num>/; $r.perl
m: my regex num { \d+ }; my $r = /<num>X<num>/; $r.perl
camelia ( no output )
jerzi m: my regex num { \d+ }; my $r = /<num>X<num>/; say $r.perl 20:25
camelia rakudo-moar 37b37f: OUTPUT«regex (Mu: *%_) { #`(Regex|46934048) ... }␤»
jerzi I'd like to get /\d+X\d+/
moritz nope (at least not easily) 20:26
colomon m: my regex num { \d+ }; my $r = /<num>X<num>/; say $r<num>.perl 20:27
camelia rakudo-moar 37b37f: OUTPUT«Failure.new(exception => X::AdHoc.new(payload => "postcircumfix:<\{ }> not defined for type Regex"))␤»
colomon wait, you're looking for the actual regex, rather than what it captured? 20:28
jerzi yes, I want to define the regexp in the longwinded way and then get an oneliner from it 20:31
as a string
20:36 virtualsue left
[Coke] There isn't a good way yet to get the textual representation of a regex. 20:38
There's something in the irc logs where jnthn does some magic with a macro to get it. 20:39
20:39 atroxaper joined 20:43 Mouq joined, atroxaper left, virtualsue joined
jerzi m: {'a' => 4}<a> # What's the name for the <a> thing? 20:45
camelia ( no output )
jerzi m: say {'a' => 4}<a> # What's the name for the <a> thing?
camelia rakudo-moar 37b37f: OUTPUT«4␤»
colomon news.ycombinator.com/item?id=8724727 # p6 Advent calendar on front page of Hacker News 20:47
jerzi m: ( {'a' => 4}, {'a' => 5} )».at_key('a') # can I use <a> somehow here? 20:49
camelia ( no output )
jerzi m: say ( {'a' => 4}, {'a' => 5} )».at_key('a') # can I use <a> somehow here?
camelia rakudo-moar 37b37f: OUTPUT«4 5␤»
20:51 nige joined
moritz with .map 20:51
m: ( {'a' => 4}, {'a' => 5} ).map: *<a>
camelia ( no output )
moritz m: say ( {'a' => 4}, {'a' => 5} ).map: *<a>
camelia rakudo-moar 37b37f: OUTPUT«4 5␤»
nige hi 20:52
just a quickie ...
I'm looking at "now"
and trying to drive the REPL to uncover its origins 20:53
is it Cool?
colomon m: say ( {'a' => 4}, {'a' => 5} )».<a>
camelia rakudo-moar 37b37f: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤ in sub METAOP_HYPER_CALL at src/gen/m-CORE.setting:19827␤ in block <unit> at /tmp/SZhGllDqck:1␤␤»
jerzi colomon: I tried that 20:54
moritz nige: what do you mean yb "its origins"?
nige: it's a term. It's not namespaced
colomon jerzi: missed your attempt in the backlog. :)
nige ah ok
jerzi colomon: I tried that offline ;) Still wondering why it did not work 20:55
seemed such a good idea
nige is there any MOPish incantations you can use to show its term origins?
moritz jerzi: because >> goes recursively through arrays and hashes, and only tries to dereference once it finds a leaf position 20:56
jerzi: but of course then there's nothing left to to dereference/index
colomon moritz++
moritz jerzi: though iirc the current spec says otherwise; rakudo still lags behind a bit
m: say CORE.keys.grep(/now/) 20:57
camelia rakudo-moar 37b37f: OUTPUT«␤»
20:57 rurban_ left
moritz nige: not really 20:57
m: say CORE::.keys.grep(/now/)
camelia rakudo-moar 37b37f: OUTPUT«&term:<now>␤»
moritz ah yes
I just have to do correctly
nige ok - interesting 20:58
so now exists in the CORE namespace
21:00 grettis left
nige thanks moritz++ 21:00
moritz perl6advent.wordpress.com/2014/12/1...56bdb7158d preview for tomorrow's post
feedback/corrections very welcome
colomon moritz++ 21:03
21:05 mvuets left
colomon moritz: might need a bit more explanation here? "Instead of OUTER::<$x>, you can also say $OUTER::x" 21:05
I (think) I got it after thinking a bit, but another sentence or two might be a big help for the non-p6 savvy 21:06
overall that's a great post. I learned stuff. :) 21:07
21:09 bjz left
moritz colomon: I've added a small sentence to explain it; if you have a better idea what to add, please do tell :-) 21:13
smls colomon: Ouch, hackernews is not being very charitable in their assessment of my advent post. 21:15
(...or the Perl 6 syntax demonstrated therein)
moritz smls: well, some of that is pretty dense, so it's generally not so well accessible for outsiders 21:17
jerzi thanks for answering my questions 21:19
codereview.stackexchange.com/quest...-text-file reason why I was asking
colomon moritz: is that the right explanation? I was imagining them as two separate mechanisms for solving the same problem that happened to look kind of similiar. But I may be completely full of it. 21:21
smls: hackernews is full of it. It's a fine post.
smls moritz: I could have explained thing in more details for people with no Perl background, but I was already worried that the post was getting a little long. 21:22
arnsholt Yeah, HN is in many ways kind of narrow-minded
Which is actually a bit hilarious, seeing how it's supposed to be all "disruptive" and stuff =) 21:23
moritz smls: no worry, it was fine
smls: it has 27 upvotes, and a few negative comments
21:25 timo1 joined
PerlJam smls: your post was excellent as far as I'm concerned 21:25
21:25 timo1 is now known as timotimo
PerlJam smls++ 21:25
masak so... jnthn is doing Thursday?
21:27 treehug88 left, treehug88 joined 21:28 zakharyas joined
masak smls++ # perl6advent.wordpress.com/2014/12/0...vs-perl-5/ 21:33
'night, #perl6
colomon \o
timotimo wow, look at that peak in visitor counts 21:34
vendethiel timotimo: numbers? :)
21:34 treehug88 left 21:35 virtualsue left
timotimo "have you seen the upgraded stats page? show me!" 21:35
timotimo clicks
are you *fucking* *kidding* *me*
dec 9 has 2k views by 1.2k visitors 21:36
[Coke] ?
timotimo dec 8 had 900 views by 370 visitors
21:36 brrt joined
timotimo the best day before dec 9 was 1.8k views by 1.5k visitors 21:37
21:37 bauerbob joined
timotimo today's post has been hackernewsed 21:37
vendethiel has it been? link?
[Coke] ah
vendethiel news.ycombinator.com/item?id=8724727
21:37 treehug88 joined
timotimo someone needs to point out that the whatever star is not "special syntax to get a one-argument lambda" 21:38
brrt how did i get the HOW magic thingies again for something
m: say "Foo".^HOW 21:39
camelia rakudo-moar 37b37f: OUTPUT«===SORRY!=== Error while compiling /tmp/C4rTvRwl6m␤Cannot use .^ on a non-identifier method call␤at /tmp/C4rTvRwl6m:1␤------> say "Foo".^HOW⏏<EOL>␤ expecting any of:␤ method arguments␤»
smls i.imgur.com/6eJAcRY.png # screenshot of visitor stats, for those who don't have login access to the advent blog backend
timotimo very civil conversation, i see 21:40
hoelzro timotimo: someone should also point out that Scala has this too
geekosaur m: say "Foo".HOW
camelia rakudo-moar 37b37f: OUTPUT«Perl6::Metamodel::ClassHOW.new()␤»
brrt yes, very nice
smls someone should tell them that the Whatever-star is a term, not an operator... :)
geekosaur hm
timotimo hoelzro: but scala is also a horrible horrible language! :)
hoelzro is it? 21:41
hoelzro didn't know
timotimo it's also the duke nukem forever of languages! er, and ... it's slow!
and it uses lots of ram!
21:41 gluckwunsch left
brrt totally unlike perl6 of course 21:42
smls I don't haven't learned Scala, but from the what I've seen of and heard about it, I thought it was one of the better ones?
brrt geekosaur: but but what happened to the .^ syntax
timotimo don't haven't ... so you did do learn it?
yes, scala is generally well-liked
smls tsk, I seem to be a little typing impaired today 21:43
timotimo a friend of mine is in a not entirely unsimilar position compared to me
geekosaur brrt: I think the point is applying HOW directly to a container gets you the container and not the value?
timotimo so kind of sort of core developer
geekosaur I don't recall
brrt m: my @a = 1,2,3; say @a.^HOW;
camelia rakudo-moar 37b37f: OUTPUT«===SORRY!=== Error while compiling /tmp/5PE_b145ht␤Cannot use .^ on a non-identifier method call␤at /tmp/5PE_b145ht:1␤------> my @a = 1,2,3; say @a.^HOW⏏;␤ expecting any of:␤ method arguments␤»
timotimo HOW is a regular method
geekosaur m: my $a = 'foo'; say $a.HOW; say $a.^HOW
camelia rakudo-moar 37b37f: OUTPUT«===SORRY!=== Error while compiling /tmp/a7YCpBGE8h␤Cannot use .^ on a non-identifier method call␤at /tmp/a7YCpBGE8h:1␤------> my $a = 'foo'; say $a.HOW; say $a.^HOW⏏<EOL>␤ expecting any of:␤ method…»
geekosaur hm
brrt m: my @a = 1,2,3; say @a.HOW;
camelia rakudo-moar 37b37f: OUTPUT«Perl6::Metamodel::ClassHOW.new()␤»
geekosaur oh, methods
timotimo .^ is the syntax you use to get the .HOW and the instance passed as first argument to the method 21:44
brrt my @a = 1,2,3; say @a.^methods;
m: my @a = 1,2,3; say @a.^methods;
camelia rakudo-moar 37b37f: OUTPUT«new bind_pos delete_pos flattens name of default dynamic REIFY STORE PARAMETERIZE_TYPE at_pos assign_pos perl new Bool Int end fmt flat list lol flattens Capture Parcel Supply eager elems exists_pos gimme infinite iterator munch pick pop shift plan roll re…»
brrt timotimo: i don't get that at /all/ 21:45
(mostly a civil discussion, not all the way totally civil)
geekosaur I knew/understood this once. I'm totally discombobulated today... 21:47
FROGGS_ foo.^bar(baz) is identical to foo.HOW.bar(foo, baz)
m: say Int.^name 21:48
camelia rakudo-moar 37b37f: OUTPUT«Int␤»
FROGGS_ m: say Int.HOW.name(Int)
camelia rakudo-moar 37b37f: OUTPUT«Int␤»
brrt ahaaah
FROGGS_ it is a shortcut
brrt i see
FROGGS_ and ^ point upwards to the HOW 21:49
timotimo brrt: oh *that*; i was about to apologize for my very poorly formulated explanation of .^ 21:50
brrt :-)
m: .say for dir().shift.lines;
camelia rakudo-moar 37b37f: OUTPUT«Failure.new(exception => X::IO::Directory.new(path => q|rakudo-inst-2|.IO(:SPEC(IO::Spec::Unix),:CWD</home/camelia>), trying => "open", use => Any, os-error => Any))␤»
brrt nice 21:51
timotimo damn, i think i messed up the TERM variable again before starting weechat
21:51 Mouq left 21:57 konsolebox joined 21:58 spider-mario left 22:01 zakharyas left
jerzi m: my @arr; "dog @arr[0] cat" 22:01
camelia rakudo-moar 37b37f: OUTPUT«use of uninitialized value @arr of type Any in string context in block <unit> at /tmp/Ysy1O8Z8q8:1␤␤»
jerzi know any way to silence the warning? "use of uninitialized value @arr of type Any in string context"
timotimo sure, you can {@arr[0].gist} or {@arr[0].perl} 22:02
jerzi and if I want to still get the same result from the expression? 22:03
m: my @arr; say "dog @arr[0] cat"
camelia rakudo-moar 37b37f: OUTPUT«use of uninitialized value @arr of type Any in string context in block <unit> at /tmp/shDYuFpEYy:1␤␤dog cat␤»
jerzi m: my @arr; say "dog {@arr[0].gist} cat"
camelia rakudo-moar 37b37f: OUTPUT«dog (Any) cat␤»
timotimo in that case, you can use "dog { @arr[0] // "" } cat"
jerzi doc.perl6.org/language/operators#infix_%2F%2F oh, good to know 22:05
timotimo yup, // is cool
22:05 andreoss joined 22:06 brrt left
TimToady m: say ( {'a' => 4}, {'a' => 5} )»<a> 22:06
camelia rakudo-moar 37b37f: OUTPUT«4 5␤»
TimToady seems to work fine if you don't put the .
andreoss (! $all-of-them == 0) is not the same as ($all-of-them != 0). why? . $all-of-them is all(...). 22:07
timotimo doesn't see the original code
m: say all( 1, 2, 3) != 0 22:08
camelia rakudo-moar 37b37f: OUTPUT«True␤»
timotimo m: say (all( 1, 2, 3) != 0).perl
camelia rakudo-moar 37b37f: OUTPUT«Bool::True␤»
timotimo er
m: say (all( 1, 2, 3 ) == 0).perl
camelia rakudo-moar 37b37f: OUTPUT«all(Bool::False, Bool::False, Bool::False)␤»
timotimo what terrifying magic does != cause?
did i accidentally break that when i tried to improve METAOP_NEGATE? 22:09
um, != is just callstatic &infix:<!=> so it's at least not my fault 22:11
moritz negated ops are special-cased wrt junctions
so that it behaves more like !(all(1, 2,3) == 0)
timotimo oh, it's that thing
i think at some point i was annoyed about that rule
i don't remember if i came around, though 22:12
anyway, i'll be off :)
moritz feather replacement is now running.
timotimo i'll give you my ssh public key some time this week :)
moritz ok 22:13
moritz will probably blog/mail about it tomorrow
the www server is also running, though not yet configured
timotimo thank you for your organisational efforts and everything! :) 22:14
andreoss fpaste.org/158144/16320714/
moritz I'll build the high-risk virtual machine when necessary
timotimo: you're welcome
timotimo andreoss: you may be interested in how the [&&] operator works 22:15
andreoss why not || ? 22:17
moritz m: sub is-prime(Int $x) { so $x %% none(2..($x-1)) }; say grep &is-prime, ^20
camelia rakudo-moar 37b37f: OUTPUT«0 1 2 3 5 7 11 13 17 19␤»
timotimo because i'm tired and at least a small part of my brain is already in bed
moritz' solution looks good 22:18
andreoss does the negation of all() implies any() or none() ?
TimToady neither 22:19
timotimo oh btw
twitter.com/raocl/status/542360594737688578 ← we have a new nice little benchmark
go wild
please. 22:21
and make me proud :)
22:21 bauerbob left 22:24 Mso150_l_y_u_x left
gtodd m: my @arr; for "11/22/14 21:00:00 5,854 2,105 1,290\n11/22/14 21:02:35 7,692 2,593 2,649\n11/22/14 21:05:10 1,639 5,458 9,444".lines { push @arr, [$_.trans("\,"=>"").split(/\s+/)]; }; for 2..4 -> $col { say [@arr[*;$col].sort(-*)][0] } 22:30
camelia rakudo-moar 37b37f: OUTPUT«7692␤5458␤9444␤»
gtodd oops
timotimo: so we need to get it to go faster before you wake up ? :-) 22:31
22:33 Rounin left 22:34 kaare_ left 22:35 FROGGS_ left
andreoss R has junctions too, but somehow perl6 all() acts like R any() 22:35
22:37 lwa left 22:41 nige left
andreoss in R: ! any( ... == x ) === all( ... != y ) 22:41
dalek c: 1695b5c | raydiak++ | lib/Type/Str.pod:
Tiny adjustment for example consistency
22:42
22:47 aborazmeh joined 22:48 aborazmeh left 22:49 aborazmeh joined 22:50 andreoss left 22:52 ab5tract joined
ab5tract o/ 22:54
raydiak \o
22:55 nige joined, robinsmidsrod left, robinsmidsrod joined
ab5tract how's it going raydiak? 22:55
smls moritz: "Finally, methods live in a classes or roles, and" -- typo 22:56
moritz: "Outer lexicals are accessible through the OUTER:: pseudo package:" -- Will everyone understand what an "outer lexical" is without explanation? 22:57
dalek : da1d983 | jonathan++ | misc/perl6advent-2014/schedule:
Update schedule
22:58
jnthn I've taken 11th. I've got a start on something, and will finish it after tomorrow's teaching.
smls moritz: "It's list, because it includes methods from superclasses" -- missing "a"
ab5tract smls: your blog post was great :) 22:59
22:59 vti left
smls thanks :) 22:59
ab5tract i was thinking about backporting your code example style into my post
smls moritz: ".^methods(:all) includes methods from all superclasses, with the :all, methods from classes Cool, Any and Mu." -- confusing sentence structure 23:00
moritz++ # informative (draft) advent post
(and linking to relevant p6doc pages, which maybe I should have done in mine, too...) 23:01
23:02 sjohnson joined
jnthn Time for some sleep. Evidently the smls++ blog post should be my morning read while on the metro to the butthole of nowhere to teach tomorrow... :) 'night 23:10
raydiak not too bad ab5tract, planning world domination w/math::symbolic n'stuff...what are you up to? 23:11
ab5tract i spent a bit of last night hacking up an example for a potential followup to my advent post 23:12
gist.github.com/ab5tract/e73592ae73516477a522
23:13 BenGoldberg joined 23:14 treehug88 left
raydiak oh nice 23:14
I haven't kept up on the advent posts (or any of my regular reading), but I read yours b/c the picture hooked me :) 23:16
ab5tract hehe
i've been feeling like the entire idea could use a little more excplication. the post maintained it's original diatribe-ish character, and went a bit tangential on the YAPAE 23:20
i'm still developing these ideas a bit 23:21
but in the meantime, coercion could use a more practically minded post 23:23
raydiak sorry my attention is a bit divided atm 23:27
I liked how the original post had a casual sort of exploratory feel
23:27 pecastro joined
raydiak but I see how you could have more content in another way with a direct approach and less story 23:28
definitely coercion in general would be nice to know about...I don't even know what the state of coercion support in rakudo is these days 23:34
23:37 nige left 23:38 smls left
ab5tract I'm glad you liked it. re: coercion, it's an interesting point where sugar happens. what i was attempting was to point out that sugar no longer immediately implies magic in perl6 23:40
leedo_ i'm trying to find a better way to do something like this: @a = <a b c>; (@a.pick(*) Z @a).hash 23:41
ab5tract m: %( this => "does", coerce => "yes?" )
camelia ( no output )
leedo_ but i want to make sure an element doesn't get matched with itself
ab5tract m: %( this => "does", coerce => "yes?" ).say
camelia rakudo-moar 37b37f: OUTPUT«"coerce" => "yes?", "this" => "does"␤»
23:42 araujo left
ab5tract the support seems to be where you would expect it. but the lines can still be fuzzy. for instance i'm now unsure as to whether %() is a composer sugar or a coercer sugar .. 23:43
23:44 pecastro left
ab5tract but in the sense that you can create specialized coercions to any type just by writing a method on your class 23:44
it seems to be all there :)
23:51 grettis joined
ab5tract in the meantime, something i couldn't help writing tonight: sub snow($col) { for 0..Inf { say [~] [ '❆ ','❄ ', '❅ ', ' ' xx 80 ].Bag.roll($col); } }; snow(150) 23:56