Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-29

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:14 TimToady ZoffixLappy: obviously we're already to Step 3: Then they fight you.
00:15 ZoffixLappy :)
00:16 Xliff Next stop: "You Win!"
00:19 pierre_ joined #perl6
00:22 BenGoldberg m: for 1..2 { say $^x, $^y }; for 1..2 { say $^y, $^x };
00:22 camelia rakudo-moar 3cab7c: OUTPUT«12␤21␤»
00:25 BenGoldberg While having placeholder arguments sorted alphabetically makes intuitive sense, istr them being documented as being used in order of appearance... that is, both of the above two ought to produce the same output.
00:29 ZoffixLappy If they're documented that way, it's an error that should be fixed. Perhaps, you're confusing regex captures?
00:29 ZoffixLappy m: 'foobar' ~~ /(foo(bar))/; say $0; say $1
00:29 camelia rakudo-moar 3cab7c: OUTPUT«「foobar」␤ 0 => 「bar」␤Nil␤»
00:29 ZoffixLappy :/ not the output I expected....
00:30 ZoffixLappy m: 'foobar' ~~ /(foo) (bar)/; say $0; say $1
00:30 camelia rakudo-moar 3cab7c: OUTPUT«「foo」␤「bar」␤»
00:30 ZoffixLappy Interesting...
00:31 BenGoldberg https://en.wikibooks.org/wiki/Perl_6_Programming/Blocks_and_Closures#Placeholder_Arguments
00:32 BenGoldberg m: dd 'foobar' ~~ /(foo(bar))/;
00:32 camelia rakudo-moar 3cab7c: OUTPUT«Match.new(ast => Any, list => (Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "foobar", to => 6, from => 3),), hash => Map.new(()), orig => "foobar", to => 6, from => 0),), hash => Map.new(()), orig => "foobar…»
00:34 ZoffixLappy Fixed. Thanks.
00:36 Ben_Goldberg joined #perl6
00:39 ugexe is there a way to get around another subroutine calling `exit()` other than &*EXIT?
00:39 ugexe &exit.wrap({ return; }); still exits
00:43 ZoffixLappy m: sub foo {exit}; &exit.wrap({ ; }); foo; say "Meow"
00:43 camelia rakudo-moar 3cab7c: OUTPUT«Meow␤»
00:43 ZoffixLappy Seems to work?
00:58 Actualeyes joined #perl6
01:09 ZoffixWin_ joined #perl6
01:09 ZoffixWin_ joined #perl6
01:11 tardisx joined #perl6
01:22 Herby_ joined #perl6
01:22 Herby_ Evening, everyone!
01:22 Herby_ o/
01:22 hotel \o
01:26 ZoffixLappy \o
01:26 Herby_ o/
01:26 molaf joined #perl6
01:27 Herby_ ZoffixLappy: you're a blogging machine!
01:27 Herby_ I'm learning quite a bit reading through them, hope you keep it up :)
01:27 hotel oh that's a good idea
01:27 hotel make a blogging machine in p6
01:27 Herby_ when in doubt, blog it out
01:28 hotel someone made a shitpost generator in java for tumblr
01:28 ZoffixLappy Herby_, thanks. I'm doing it for quite selfish reasons of trying to learn the stuff myself :) This morning, I still had no solid idea of how to use the S/// operator and now I do :)
01:33 Herby_ hotel: I just looked it up, here's the tagline for it: "I am a JAVA program who's purpose is to churn out the worst posts imaginable"
01:33 Herby_ thats great
01:33 hotel yep
01:35 Herby_ and the 5th post on that page: "I am the zodiac"
01:36 ZoffixLappy heh
01:36 hotel so like I said, why not make one in p6? :P
01:36 hotel maybe that'll be my first project
01:36 Herby_ blog about the blog project. i'd read it
01:36 Herby_ i don't have the chops for that yet
01:37 hotel I don't have any chops yet, still can't get rakudo to build right
01:38 hotel though that's mostly my fault
01:40 hotel >shiny tools have shiny problems<
01:45 dalek ecosystem: fcf6c5e | (Andy Weidenbaum)++ | META.list:
01:46 dalek ecosystem: Add module TXN::Parser
01:46 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/fcf6c5eab2
01:46 dalek ecosystem: b119fb8 | (Zoffix Znet)++ | META.list:
01:46 dalek ecosystem: Merge pull request #201 from atweiden/txn-parser
01:46 dalek ecosystem:
01:46 dalek ecosystem: Add module TXN::Parser: https://github.com/atweiden/txn-parser
01:46 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/b119fb8d75
01:55 colomon joined #perl6
01:56 AlexDaniel joined #perl6
01:57 pierre_ joined #perl6
02:02 AlexDaniel this is so awesome http://essenmitsosse.de/pixel/?showcase=true&amp;slide=4
02:02 AlexDaniel reminds me of perl a bit :)
02:05 AlexDaniel m: use MONKEY-TYPING; augment class Int { method foo { say self } }; int.foo
02:05 camelia rakudo-moar 3cab7c: OUTPUT«(int)␤»
02:10 ZoffixLappy AlexDaniel, heh... I hope it's not this part that reminds you of Perl: http://i.imgur.com/jp9yT6v.jpg
02:10 ZoffixLappy :)
02:11 ZoffixLappy Pretty cool though... Other than the crash....
02:12 AlexDaniel ZoffixLappy: no, it does not remind me that your browser is broken :)1
02:12 ZoffixLappy lol
02:15 winger_ joined #perl6
02:24 noganex joined #perl6
02:33 hotel_california joined #perl6
02:35 dalek doc: 7ad327f | (Zoffix Znet)++ | doc/Language/operators.pod:
02:35 dalek doc: Fix heading levels
02:35 dalek doc: review: https://github.com/perl6/doc/commit/7ad327fa12
02:47 winger__ joined #perl6
02:48 pierre_ joined #perl6
02:51 pierre_ joined #perl6
02:58 pierre_ joined #perl6
03:05 colomon joined #perl6
03:29 vendethiel joined #perl6
03:41 Amnez777 joined #perl6
03:45 colomon joined #perl6
03:45 Amnez777- joined #perl6
04:19 pierre_ joined #perl6
04:23 pierre_ joined #perl6
04:28 Cabanossi joined #perl6
04:29 Actualeyes joined #perl6
04:33 Amnez777 joined #perl6
04:35 Timbus joined #perl6
04:36 pierre_ joined #perl6
04:39 MadcapJake m: PROCESS::<&EXIT> = -> $_ { Nil }; exit
04:39 camelia rakudo-moar 3cab7c: ( no output )
04:39 MadcapJake ugexe: ^^
04:40 jdv79 ZoffixWin_: are you an educator or well versed presenter?
04:41 jdv79 nice posts lately.
04:55 Actualeyes joined #perl6
05:03 vendethiel joined #perl6
05:16 zhmylove joined #perl6
05:21 al2o3-cr joined #perl6
05:22 rurban joined #perl6
05:24 jjido joined #perl6
05:29 zhmylove joined #perl6
05:30 m0ltar joined #perl6
05:37 pierre_ joined #perl6
05:40 chienjo joined #perl6
05:44 aries_liuxueyang joined #perl6
05:45 domidumont joined #perl6
05:46 domidumont joined #perl6
05:51 domidumont joined #perl6
05:52 finanalyst joined #perl6
05:52 finanalyst hi. Is there any good way to test code containing 'warn'?
05:52 yoleaux 22 Feb 2016 20:37Z <ab6tract> finanalyst: your 'Intro to Sixy Perl' pastebin is awesome! you should consider publishing it somewhere more permanent!
05:54 finanalyst i wrote to perl-users, but thought I would ask here too.
05:56 finanalyst joined #perl6
05:57 CIAvash joined #perl6
05:59 sno joined #perl6
06:02 _mg_ joined #perl6
06:05 finanalyst joined #perl6
06:13 zhmylove joined #perl6
06:20 hotel joined #perl6
06:24 firstdayonthejob joined #perl6
06:25 domidumont joined #perl6
06:30 zhmylove joined #perl6
06:34 CIAvash joined #perl6
06:34 hotel_california joined #perl6
06:35 TimToady finanalyst: warn throws a control exception that can be caught with a CONTROL block
06:36 finanalyst TimToady: that I understand. But it is how to do this in a test snippet that I'm not sure about. Where does the CATCH block go
06:37 finanalyst it would seem intuitive to me that there is a 'warns-ok' routine in TEST
06:38 jjido joined #perl6
06:44 pierre_ joined #perl6
06:44 jjido joined #perl6
06:45 rurban left #perl6
06:47 masak mornin', #perl6
06:48 zhmylove joined #perl6
06:52 RabidGravy joined #perl6
06:53 moritz \o masak, *
06:57 RabidGravy oink!
06:58 _nadim Morning all
07:02 jamesnek1 joined #perl6
07:04 cschwenz joined #perl6
07:04 cschwenz \o #perl6  :-)
07:08 sue joined #perl6
07:10 abraxxa joined #perl6
07:13 cschwenz in perl6, how do i get the computer to do nothing for 0.012 seconds?  (i need to translate some perl5 code which has "select( undef, undef, undef, 0.012 );")
07:14 moritz cschwenz: sleep 0.012
07:15 moritz I hope you're not worried that it only applies to the current thread, not the whole computer :-)
07:15 cschwenz \o/ perl6 has a sane sleep !
07:16 cschwenz moritz: i'm very okay with it only applying to the current thread :-)
07:16 moritz m: sleep 0.012; say now - INIT now
07:16 camelia rakudo-moar 3cab7c: OUTPUT«0.013980␤»
07:17 RabidGravy or if you actually want to do something something in the future but could usefully be doing something in the meantime, see Promise.in($secs)
07:18 boegel joined #perl6
07:19 _nadim Do we have a module that given something that looks like a command line would parse it? The format of the command line itself is not known (user defined)
07:19 cschwenz isn't there a port of Getopt::Long?
07:20 RabidGravy I think so
07:20 _nadim There is, completely undocumented but i wrote "format of options are unknown"
07:20 RabidGravy http://modules.perl6.org/#q=getopt
07:21 _nadim I did that, Getopt:::Long is not documented, Getopt::Tiny makes the same mistake as P5 and the doc is, well, fuzzy, Getopt::Type doesn't fit the work.
07:22 _nadim I smell a Getopt::Whatever module coming
07:22 RabidGravy yes I think you need to read some code
07:23 RabidGravy and/or help make one of the existing modules do what you want
07:23 zhmylove joined #perl6
07:23 _nadim I read the codes, and if there is nothing available, Getopt::Whatever will come, but it would be a pitty to no use what already exists.
07:24 RabidGravy on the face of it, it doesn't seem that difficult
07:24 tardisx joined #perl6
07:25 _nadim No, a grammar and some actions. And not even that is necessary.
07:27 _nadim but I want to finish what I am doing not start another module in the middle of it.
07:27 RabidGravy life sucks like that
07:27 _28_ria joined #perl6
07:29 _nadim specially when the thing one is doing is a template to make starting new modules easier ;)
07:34 telex joined #perl6
07:36 domidumont joined #perl6
07:39 hotel joined #perl6
07:42 daniel-s joined #perl6
07:42 leont joined #perl6
07:43 ufobat joined #perl6
07:43 ufobat god morning!
07:43 RabidGravy erp
07:44 jjido joined #perl6
07:52 darutoko joined #perl6
07:52 zhmylove joined #perl6
07:53 dolmen joined #perl6
07:55 zakharyas joined #perl6
07:56 sue left #perl6
07:56 maybekoo2 joined #perl6
07:57 aries_liuxueyang joined #perl6
08:10 nebuchadnezzar joined #perl6
08:10 Amnez777 joined #perl6
08:12 g4 joined #perl6
08:20 al2o3-cr joined #perl6
08:29 dalek ecosystem: 515bf6e | RabidGravy++ | META.list:
08:29 dalek ecosystem: Add App::ModuleSnap
08:29 dalek ecosystem:
08:29 dalek ecosystem: See https://github.com/jonathanstowe/App-ModuleSnap
08:29 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/515bf6ea8d
08:29 RabidGravy Xliff, ^
08:31 wamba joined #perl6
08:31 RabidGravy thus ensuring that the next one is my fiftieth
08:33 RabidGravy Any objections if I alter the http://doc.perl6.org/language/modules#Distributing_Modules to have META6.json rather than META.info?
08:34 RabidGravy reason being that the future PAUSE thingy requires that afaiu
08:36 RabidGravy also do both zef and panda support the specced "source" now?
08:44 _nadim jnthn: App-ModuleSnap++
08:45 jnthn ...what? :)
08:45 jjido joined #perl6
08:47 _nadim hehe, the other jonathan :)
08:50 Cabanossi joined #perl6
08:52 rindolf joined #perl6
09:04 tardisx joined #perl6
09:13 RabidGravy easy mistake to make, he's the one with the beard
09:13 RabidGravy but jnthn++ just because
09:20 _nadim RabidGravy++ (now I know who you are ;) )
09:24 zhmylove joined #perl6
09:25 RabidGravy :-O
09:26 RabidGravy stmuk_, you about?
09:27 cschwenz so, from http://doc.perl6.org/language/operators#Operator_Precedence , what do "~&", "~<", and "~>" do?  (the only mention of them i can find is in the linked operator precedence table)
09:27 psch cschwenz: bit-wise and, bitshift left, bitshift right, in order
09:27 psch oh no
09:27 psch Str-wise, not bit-wise
09:27 psch i don't know if the semantics are actually clear
09:28 psch hm, char wise maybe, actually?
09:28 moritz they make sense on buffers
09:28 moritz but on Grapheme clusters?
09:28 psch m: say "foo" ~& "fou"
09:28 camelia rakudo-moar 6cb231: OUTPUT«foe␤»
09:28 psch m: say "foò" ~& "fou"
09:28 camelia rakudo-moar 6cb231: OUTPUT«fop␤»
09:28 psch .u snowman
09:28 yoleaux U+2603 SNOWMAN [So] (☃)
09:28 psch .u rocket
09:28 yoleaux U+1F680 ROCKET [So] (????)
09:29 psch m: say "????" +& "????"
09:29 camelia rakudo-moar 6cb231: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5????' (indicated by ⏏)␤  in block <unit> at /tmp/R2_bby_Znw line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/R2_bby_Znw line 1␤␤»
09:29 psch m: say "????" ~& "????"
09:29 camelia rakudo-moar 6cb231: OUTPUT«????␤»
09:29 psch oh ffs :)
09:29 psch m: say "????" ~& "☃"
09:29 camelia rakudo-moar 6cb231: OUTPUT«☀␤»
09:29 cschwenz :-D
09:30 cschwenz so they would appear to work on NFG characters?
09:31 moritz they appear to work, yes
09:31 psch m: say ("????".ord +& "☃".ord).chr # looks equivalent from here
09:31 camelia rakudo-moar 6cb231: OUTPUT«☀␤»
09:32 RabidGravy yeah, bitwise is +< etc
09:32 RabidGravy m: say 2 +< 2
09:32 camelia rakudo-moar 6cb231: OUTPUT«8␤»
09:32 jnthn It works at codepoint level, iirc
09:32 jnthn So it operates on each codepoint in an NFG synthetic
09:32 jnthn Which means you may or may not get another synthetic out :)
09:32 cschwenz jnthn++
09:32 psch .u combining
09:32 yoleaux U+0300 COMBINING GRAVE ACCENT [Mn] (◌̀)
09:32 yoleaux U+0301 COMBINING ACUTE ACCENT [Mn] (◌́)
09:32 yoleaux U+0302 COMBINING CIRCUMFLEX ACCENT [Mn] (◌̂)
09:32 cschwenz that is what i was trying to ask about
09:33 psch m: say "????\c[COMBINING GRAVE ACCENT]" ~& "☃"
09:33 camelia rakudo-moar 6cb231: OUTPUT«☂␤»
09:33 jnthn Whether it's useful for anything outside of ASCII cute tricks is another matter :)
09:35 jnthn oh interesting....
09:35 jnthn I'm not sure it actually is doing what I thought it would be
09:35 jnthn https://github.com/MoarVM/MoarVM/blob/master/src/strings/ops.c#L1373
09:35 moritz well, there is a use case for string bitwise ops
09:35 moritz for example if you want to to find borders in a text table
09:36 moritz you can start with chr(255) x 80, and ~& every line
09:36 moritz and see what columns remain in the end
09:36 moritz if your data is large enough, only separate columns have non-zero bytes in the end
09:37 domidumont joined #perl6
09:37 jnthn Cute :)
09:38 moritz (or if you know the separator character in advance, you can see the string with that instead of the chr(255), and see which columsn remain the same)
09:40 moritz jnthn: that's signed integer arithmetic in MVM_string_bitand, right?
09:41 zhmylove joined #perl6
09:41 moritz can this create the number of a not-yet-created grapheme cluster?
09:42 jnthn moritz: Yeah, that's what I fear might happen
09:42 jnthn It's not clear why it works this way
09:42 moritz m: say "नि" & "5"
09:42 camelia rakudo-moar 6cb231: OUTPUT«all(नि, 5)␤»
09:42 moritz m: say "नि" ~& "5"
09:42 camelia rakudo-moar 6cb231: OUTPUT«4␤»
09:42 moritz m: say "नि" ~& "\r\n"
09:42 camelia rakudo-moar 6cb231: OUTPUT«नि␤»
09:43 RabidGravy can anyone else remember what the github alternative thingy that stmuk_ is using is?
09:43 RabidGravy some GitFoo
09:43 moritz RabidGravy: bitbucket? gitlab?
09:43 RabidGravy gitlab
09:44 RabidGravy cheers, just changing the wording of the modules.pod to make it clear that github is per example rather than an absolute requirement
09:44 moritz m: say "नि" ~> 1
09:44 camelia rakudo-moar 6cb231: OUTPUT«infix:«~>» not yet implemented. Sorry. ␤  in block <unit> at /tmp/3CjJH3GbMW line 1␤␤»
09:45 moritz m: say "नि" ~< 1
09:45 camelia rakudo-moar 6cb231: OUTPUT«infix:«~<» not yet implemented. Sorry. ␤  in block <unit> at /tmp/rBvD9tOSOA line 1␤␤»
09:45 * moritz not sorry at all
09:46 jjido_ joined #perl6
09:50 nowan_ joined #perl6
09:54 stmuk_ RabidGravy: gitlab
09:54 RabidGravy and that works fine for modules doesn't it (before I commit this)
09:55 stmuk_ it pretty much resembles github and you can login with gh creds
09:55 RabidGravy cool
09:55 stmuk_ yes some features aren't visible on modules.perl6.org butapart from that that works fine
09:57 RabidGravy excellent
09:58 RabidGravy is it worth explaining *why* you probably want to use META6.json rather META.info in the modules doc?  I'm torn
09:58 stmuk_ colour syntax in vim
09:58 RabidGravy :)
10:00 RabidGravy I think I'll leave it, not much point describing forward compatibility when it's not quite clear what the end state will be
10:04 zhmylove joined #perl6
10:05 domidumont joined #perl6
10:06 dalek doc: 28989a3 | RabidGravy++ | doc/Language/modules.pod:
10:06 dalek doc: A few small changes:
10:06 dalek doc:
10:06 dalek doc:    * prefer META6.json to META.info
10:06 dalek doc:    * more explanation on 'provides'
10:06 dalek doc:    * make it clear that other repos than github may work
10:06 dalek doc: review: https://github.com/perl6/doc/commit/28989a3f19
10:17 RabidGravy what next?
10:19 psch full SysEx support for Audio::PortMIDI? :P
10:19 RabidGravy I thought you were sending me a patch for that ;-p
10:20 psch yeah, i might eventually :)
10:20 RabidGravy lots of things that I could fix up in my existing modules, also some 5 to 10 modules that I haven't finished yet
10:21 cschwenz error message feature request:  when perl6 cannot find a matching signature, perl6 prints all of the signatures it found for a multi-method; will we please add the signature it was trying to find?
10:21 RabidGravy it does doesn't it?
10:21 psch m: multi f($) { }; multi f($, $) { }; f 1, 2, 3
10:21 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qtM5TzAf4I␤Calling f(Int, Int, Int) will never work with any of these multi signatures:␤    ($) ␤    ($,)␤at /tmp/qtM5TzAf4I:1␤------> 3multi f($) { }; multi f($, $) { }; 7⏏5f 1, 2, 3␤»
10:21 RabidGravy yeah
10:21 psch cschwenz: it does.  at the very beginning :)
10:22 psch ah, we still have a bug with disappearing anon positionals there :/
10:22 RabidGravy it's different for multi methods
10:22 psch m: say :($, $).perl
10:22 camelia rakudo-moar 6cb231: OUTPUT«:($, $)␤»
10:22 psch m: say :($, $).gist
10:22 camelia rakudo-moar 6cb231: OUTPUT«($,)␤»
10:22 RabidGravy eugh
10:23 cschwenz so, i am seeing "Cannot call AUTOGEN( […] ); non of these signatures match: […]"   are you saying the "[…] AUTOGEN( […] ) […]" is the signature it was trying to find?
10:23 RabidGravy ah that old AUTOGEN thingy
10:23 cschwenz do i need to update/upgrade perl6?
10:23 * psch doesn't know about any AUTOGEN thingies
10:24 RabidGravy if you add "proto method <name> (|c) { * }" you will get the right name
10:25 RabidGravy psch, under some circumstances it doesn't create the proto name right so it just leaves it as "AUTOGEN"
10:25 RabidGravy I've never figured out quite what those circumstances are sufficiently to RT IT
10:25 psch o.o
10:25 psch that sounds a bit bad
10:26 psch cschwenz: can you golf the code that gives you that error?
10:27 psch in case it stays around when golfed this might be an angle to try and figure out what's actually happening
10:27 cschwenz psch:  probably
10:27 Actualeyes joined #perl6
10:28 RabidGravy it's something in the area of more than one multi with a certain number of candidates
10:29 cschwenz so, with that solved, next question…   if i have multi-methods which take a single positional value, and said value has a default, why does "$obj.foo()" not do what i mean and use the default?  (instead it complains about not finding a signature match)
10:29 psch m: class A { multi method f($ = "foo") { say "ok" }; }; A.f
10:29 camelia rakudo-moar 6cb231: OUTPUT«ok␤»
10:30 psch there most be more to that issue :)
10:30 RabidGravy I think I've encountered that one before too, can't remember the circumstances
10:31 RabidGravy but yeah a golfed example of that one would be good
10:32 cschwenz p6: class Foo { multi method bar( Int $baz = 1 ) { say "Int $baz"; }; multi method bar( Rat $baz = Rat.new(1, 1) ) { say "Rat $baz"; }; }; my $obj = Foo.new(); $obj.bar();
10:32 camelia rakudo-moar 6cb231: OUTPUT«Ambiguous call to 'bar'; these signatures all match:␤:(Foo $: Int $baz = 1, *%_)␤:(Foo $: Rat $baz = { ... }, *%_)␤  in block <unit> at /tmp/tmpfile line 1␤␤»
10:32 psch oh, that's easy.  two candidates with one parameter with default are two candidates with 0 parameters
10:32 cschwenz hmm, that error message is different than the one i'm seeing
10:32 psch cschwenz: maybe you do have to upgrade your rakudo :)
10:33 cschwenz psch++
10:33 zhmylove joined #perl6
10:33 psch cschwenz: if it sticks around you might simply have golfed too much, too
10:34 psch ...although i'm at a loss to guess what else could cause what you're describing
10:39 cdg joined #perl6
10:47 robertle joined #perl6
10:47 jjido_ joined #perl6
10:47 tbrowder joined #perl6
10:48 tbrowder need help with env var PERL6LIB: rakudo (nom) seems not to recognize the colon path separator
10:50 tbrowder ...I set "export PERL6LIB=path1" and rakudo finds my module; I set "export PERL6LIB=path1:path2" and the module is not found; am I doing something stupid?
10:50 daniel-s joined #perl6
10:51 psch tbrowder: PERL6LIB expects specs seperated by comma
10:51 psch a spec doesn't have to be a path, either
10:51 psch which is why we don't use colon as a separator i guess, as it could be needed for a protocol
10:52 psch like url#git://github.com/someone/something.git
10:53 daniel-s joined #perl6
10:54 Actualeyes joined #perl6
10:54 tbrowder psch: oh! thanks, that works! next question then: how do I get the rakudo to search the paths in another rakudo install where the resources are specified differently?
10:55 psch i don't understand the question.  you want one rakudo executable to include the (sha1'd) module sources from another?
10:56 zhmylove joined #perl6
10:56 tbrowder psch: yes, or else tell me how to install them into the new rakudo build
10:57 psch tbrowder: RabidGravy++ recently published a module for exactly that
10:57 RabidGravy :)
10:57 robertle I have problems with understanding the very basics of modules as well: to get started I create a single module with a single sub with "is export" in it. I can use that module, and call the sub. great. but I am very confused about the namespacing: I seem to be only able to access exported stuff (which is ok), and the export puts it in the namespace of the loader. so the actual namespace of the sub does not
10:57 robertle matter anymore. interestingly the "unit module xyz" at the top of my module does not need to match the path of it (also ok), so effectively the namespace does not matter at all! that can't be right, there must be more to it...
10:58 robertle am I right in assuming that the "use" looks up by filename/path, so that does not have to match the namespace?
10:58 RabidGravy robertle, subs are "my" scoped by default, they aren't in a "namespace", if you want to refer to them with a full package name, qualify them with "our"
10:59 psch tbrowder: App::ModuleSnap, fyi
10:59 RabidGravy but yes, the default behaviour of the repos is to derive the path from the module name supplied to "use" or "require"
11:00 RabidGravy of course a CompUnit::Repository could be made that does something else
11:01 robertle RabidGravy: right, so if I "need" then the contents of the file in question get loaded. if that's "our" then I can access it by namespace, if it is "my" then it's private to the namespace and inaccessible. if I use "use" instead, the loaded bits also are made availabel in the loading namespace, so no need to prefix anymore. that abut right?
11:01 RabidGravy for installed modules it is different again, as the name of the module isn't directly reflected in the installed module name
11:01 RabidGravy robertle, not quite
11:02 tbrowder psch: so how will App::ModuleSnap help me if I can't get it installed for the new rakudo?
11:02 robertle RabidGravy: right, the file vs namespace is a bit academic because you want them to match up anyway, everythign else is just plain confusing
11:02 psch tbrowder: i have no idea how it works, but i'd assume you install it for the old rakudo that already has the modules you need
11:02 Actualeyes joined #perl6
11:02 RabidGravy yes
11:02 psch tbrowder: RabidGravy probably appreciates any feedback re documentation or functionality :)
11:03 RabidGravy it basically traverses the $*REPO.rep-chain, finding all the Distributions which aren't something it made or "CORE" and then writes out a META6.json with all those as dependencies
11:03 RabidGravy so in your other perl6 you do "panda install ." and voila
11:03 tbrowder psch: ah!  okay, I'll give it a shot
11:04 tbrowder I have to go now but will try it and report back--thanks!!
11:05 RabidGravy because I seem to install a lot of modules for testing purposes I find myself with the need to completely eradicate everything once in a while and reinstall the modules
11:08 RabidGravy I've just discovered that "Flash Magic Eraser" is perfect for cleaning the white rubber parts of Converse All Stars, almost box fresh looking ;-)
11:09 kid51 joined #perl6
11:11 RabidGravy is there something other than github "organizations" that people use for organising e.g. a "special interest group"? I'm thinking of starting a "Perl6 Audio" thingy
11:12 psch haha
11:12 DrForr SIGAUD, ISAGN.
11:12 psch special interest group made me laugh :)
11:12 RabidGravy :)
11:12 psch i don't think they have anything like that on github though
11:13 psch i'd totally join an org for that though, even if it might be somewhat inappropriate as an org on github vOv
11:13 ufobat joined #perl6
11:14 RabidGravy well an "organisation" gives you all the github stuff, wiki, issues and a github.io site but yeah it's not so much about the code as collecting and promoting the stuff
11:14 ufobat ola! :D just in case someone cares! my notebook is alive again
11:14 RabidGravy and of course becoming an evil and secretive cabal
11:14 psch right, but a github-page would be a good start for promoting i think
11:15 RabidGravy so yeah, create a github organisation and create the page
11:15 psch i mean, unless you have an appropriate domain lying around... :)
11:16 wamba joined #perl6
11:16 RabidGravy jeezus-knievel.com?
11:17 RabidGravy perlmonkeys.org?  plastic-fernandez.com, its-going-to-be-fabulous.com all unused but not really suitable ;-)
11:17 RabidGravy goatponi.es
11:17 psch its-going-to-be-fabulous.com is pretty close though
11:17 robertle RabidGravy: let me try again for "our" and "need" only. "our" stuff gets put in a namespace according to the enclosing "module". "need" loads a unit and therefore makes the namespaces within and what is "our" in them available. "my" stuff from the loaded unit is unavailable because it is lexically scoped, and the unit is the lexical scope. right?
11:18 RabidGravy yes, but "need" is a red herring here,
11:19 RabidGravy however you load it if the sub in a module isn't our scoped you can't access it at all outside the module
11:21 robertle RabidGravy: right, I said "need" only because "use" does something on top of it. let's check my "use" and "is export" understanding: "is export" or the more elaborate versions thereof takes whatever we are talking about and places it in a special namespace of the module. if you "use" a unit, everything from that special namespace makes it available in the loader. about right? if so: does use put into the t
11:22 RabidGravy m:  module Foo { sub bar() { say "bar" }; our sub baz() { say "baz" };};  Foo::baz();  Foo::bar();
11:22 camelia rakudo-moar 6cb231: OUTPUT«baz␤Could not find symbol '&bar'␤  in block <unit> at /tmp/JljyT__jh2 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/JljyT__jh2 line 1␤␤»
11:22 robertle arget namespace or the target lexical scope?
11:24 psch "use" puts the used module into the current lexical scope, and imports all exported symbols into the current lexical scope
11:24 robertle RabidGravy: understood that part, but that's because bar() isn't part of the Foo namespace, just part of the lexical scope that happens to be created by the module/namespace block. rigt?
11:24 psch well, after (potentially compiling and) loading the source file
11:25 RabidGravy yes
11:25 RabidGravy subroutines are lexically scoped by default
11:26 pmurias joined #perl6
11:26 psch m: say MY::.keys
11:26 camelia rakudo-moar 6cb231: OUTPUT«($=pod !UNIT_MARKER EXPORT $_ $! ::?PACKAGE GLOBALish $¢ $=finish $/ $?PACKAGE)␤»
11:26 psch and lexical scope is a namespace too /o\
11:26 robertle ok, great! somewhat off topic, but is there a way to "use" from a different namespace and put in this *namespace* rather than this lexical scope? there is such a concept in UML, and it is thoroughly confusing and interestingly impossiblt to implement in C++ and java, which makes you wonder why it is in UML in the first place...
11:27 psch robertle: i think reexportation could cover that at least partially, but i don't know in how far that's implemented
11:27 RabidGravy yeah, there are export tricks available
11:27 robertle psch: interesting! I don't really have any use for it, just wondering...
11:28 psch m: module Foo { use Test :EXPORT }; import Foo;
11:28 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g5NffKCkaG␤Error while importing from 'Test': no such tag 'EXPORT'␤at /tmp/g5NffKCkaG:1␤------> 3module Foo { use Test :EXPORT 7⏏5}; import Foo;␤»
11:28 psch that's the speculated syntax, but yeah...
11:29 RabidGravy well at it's simplest you can define a "sub EXPORT" in your compilation unit which returns a hash that is keyed on the names you want to export with *what* as the value
11:30 RabidGravy and some <hand wave> other thing with the EXPORT package
11:31 psch m: module Foo { use Test; }; import Foo; ok 1
11:31 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ExKc1N3mzA␤Undeclared routine:␤    ok used at line 1␤␤»
11:31 psch hm, i don't get the test case we have for that
11:32 psch oh, we're not running it anyway :)
11:32 psch https://github.com/perl6/roast/blob/master/S11-modules/re-export.t this one fyi
11:32 llfourn_ m: module Foo { use Test; BEGIN trait_mod:<is>(&ok,:export) }; import Foo; ok 1 # maybe?
11:32 camelia rakudo-moar 6cb231: OUTPUT«ok 1 - ␤»
11:33 psch llfourn_: yeah, that i'd expect to work, but see the linked test.  that's what was once thought to be the easy way to make it work
11:33 psch it's still in roast, but we're not running it
11:34 llfourn_ mmm
11:34 llfourn_ I wrote a module to do it fyi
11:34 llfourn_ https://github.com/LLFourn/p6-CompUnit-Util#re-exporting
11:37 RabidGravy llfourn_++ # making stuff
11:37 daniel-s joined #perl6
11:37 llfourn_ RabidGravy++ xx 10 :) making stuff
11:44 tbrowder joined #perl6
11:44 RabidGravy but it's nearly may and no-one has made a mailling list manager yet
11:48 jjido_ joined #perl6
11:48 tbrowder psch & RabidGravy: I realize now (I think) if I want to hack on rakudo I should create my own branch and let rakudobrew manage it on my own machine.  That way there shouldn't be any major problems with standard module handling.  Am I right?
11:48 RabidGravy psch, having done a cursory survey of the alternatives I'm thinking that a github organisation is easiest and makes collaboration easier and chuck a custom domain on it later
11:49 psch tbrowder: uhh, for actual hacking on rakudo itself i at most branch rakudo inside its own repo
11:49 psch tbrowder: and build with Configure.pl
11:49 RabidGravy tbrowder, I've always used rakudobrew for day to day stuff then what psch said for hacking on rakudo
11:49 tbrowder but the problem with that has been finding modules
11:50 tbrowder ..installed modules
11:50 psch i don't think i ever needed modules to hack on the compiler
11:50 psch i'd suggest golfing the code module code that is buggy and writing tests from that
11:50 RabidGravy yeah I see it as two different enterprises
11:51 llfourn tbrowder: I just do panda --prefix=/path/to/forked_rakudo/lib if I want to install a module on non-rakudobrew rakudo
11:51 RabidGravy and when I really do need to do it I just use one or more -I<path to module> on checkouts of the modules
11:52 RabidGravy couple of times fixing breakage in my own or other modules from change in rakudo I do that
11:53 RabidGravy or bisection of said breakage
11:53 tbrowder psch, RabidGravy, llfourn: okay, sounds good--thanks; bye
11:55 pierre_ joined #perl6
11:59 rurban joined #perl6
12:00 Actualeyes joined #perl6
12:02 literal if I want to loop over an arrayref stored in a hash, do I always need @() ? as in: for @(%hash<foo>) -> $bar { ... }
12:03 RabidGravy psch (or anyone else who might be interested) any thoughts on what one might call said Perl6 Audio organization? "Perl6 Audio Cabal", "Perl6 Noise Gang", "Butterflies on Acid"?
12:04 llfourn literal: |%hash<foo> is more idiomatic imo
12:04 psch Butterflies on Acid feels more like the first collab album published by the org tbh
12:04 RabidGravy indeed
12:04 literal llfourn: ah, of course
12:04 RabidGravy I'm going with the middle one
12:04 psch i do like Perl 6 Noise Gang yeah
12:04 psch note the space though
12:04 psch the synopses even said it has to be an unbreaking one
12:04 rba_ joined #perl6
12:05 psch ...i put that in a comment in a nqp-j java file once and then the build stopped working :P
12:07 * grondilu wonders if we could not have %hash<foo>@ to mean @(%hash<foo>)
12:07 literal and is there a more straightforward way of getting all the matched strings of a group than this? @matches = $<mygroup>.map({~$_})
12:07 _nadim jnthn: I pushed a pull request for Grammar::Tracer, the output should be like this with the patch http://imgur.com/YoFIvU4
12:07 llfourn in p5 there is $hash{foo}->@* now
12:07 llfourn (or *@..)
12:08 rba_ How to avoid passing getting an error when passing and Inf from a Num to an Int? e.g. > say Inf.Int
12:08 psch m: sub postfix:<@>(\c) { @(c) }; my %h = a => 1, b => 2; say %h@
12:08 camelia rakudo-moar 6cb231: OUTPUT«(a => 1 b => 2)␤»
12:08 grondilu psch: nice
12:08 psch i don't think that's a useful CORE op, fwiw
12:10 psch rba_: there's been a long-standing no-final-word kind of situation around that afaik
12:10 llfourn literal: I haven't seen a better way than that. It mgiht be kinder to write it as .map(*.Str) or .map(~*)
12:10 psch rba_: that's to say that the design documents speculated Int to somehow be able to accomodate Inf, but most implementors find it either wrong or too hard to make work usefully
12:11 psch rba_: practically i'd suggest you add a multi candidate that explicitely accepts Inf and does what you would do if it would be allowed in Int
12:12 psch m: "foo" ~~ /(.)+/; say @0
12:12 camelia rakudo-moar 6cb231: OUTPUT«[「f」 「o」 「o」]␤»
12:12 rba_ psch: I did it like this "return $b != Inf ?? round $b !! False;"
12:12 psch rba_: i'd consider returning the type object Int instead of False
12:13 psch m: "foo" ~~ /(.)+/; say ~<<@0
12:13 camelia rakudo-moar 6cb231: OUTPUT«[f o o]␤»
12:14 psch literal: ^^^ that also works, fwiw
12:14 rba_ psch: like this "return $b != Inf ?? round $b !! Int;" ?
12:14 psch rba_: yeah.  that way you stick to your type at least
12:14 domidumont joined #perl6
12:14 psch rba_: in the end it strongly depends on how what else is going on, of course :)
12:14 RabidGravy So "Perl 6 Noise Gang" it is, I'll just check in the other place to see if there are any objecttions
12:14 gfldex m: my %e = enum <one two three>; say one.WHAT, " It's a ghost!";
12:14 camelia rakudo-moar 6cb231: OUTPUT«() It's a ghost!␤»
12:15 rba_ psch: Got it. Thanks
12:15 psch RabidGravy: ...there's another place for talking about Perl 6 and using it for music?
12:15 RabidGravy no, no #p6dev ;-)
12:15 psch oh :P
12:15 llfourn psch: I think >>/<< is not guaranteed to return it in the same order
12:16 jnthn llfourn: It gives results in order, but side-effects can be parallel/out-of-order
12:16 psch ...which hopefully doesn't matter for stringification of Match objects :)
12:17 psch otherwise i'd think we'd have a problem somewhere
12:17 llfourn jnthn: Ah.. thanks that makes sense now
12:17 gfldex m: my %e = enum <one two three>; say one.WHAT; my $foo = class :: { has $.one = 0 }; say $foo.WHAT; # Is this difference in introspectiveness intentional?
12:17 camelia rakudo-moar 6cb231: OUTPUT«()␤(<anon|81105168>)␤»
12:18 psch m: enum f < a b c >; say a.WHAT
12:18 camelia rakudo-moar 6cb231: OUTPUT«(f)␤»
12:18 psch gfldex: well, considering the enum you assign is anonymous...
12:19 ufobat what does Int(Any) in a Signature mean? https://github.com/supernovus/perl6-psgi/blob/master/lib/PSGI.pm6#L15
12:19 gfldex psch: so is the class
12:19 grondilu m: talk: { say "hi" }  # it occured to me that labels can be used as comments
12:19 camelia rakudo-moar 6cb231: OUTPUT«hi␤»
12:19 zhmylove joined #perl6
12:19 huf joined #perl6
12:19 dalek perl6.org: e64aafc | (Zoffix Znet)++ | fetch-recent-blog-posts.pl:
12:19 dalek perl6.org: Fix bug with recent blog updater
12:19 dalek perl6.org:
12:19 dalek perl6.org: Not all blogs (e.g. masak's) have a `type="text/html"` on the `<link>`. Exclude that restriction from the selector.
12:19 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/e64aafc918
12:20 psch gfldex: oh, right.  yeah, that looks like we want something similar for the enum...
12:20 gfldex i shall rakudobug
12:20 psch m: my %e = enum < a b c >; say a.WHERE
12:20 camelia rakudo-moar 6cb231: OUTPUT«140372698805376␤»
12:20 psch m: my %e = enum < a b c >; say a.WHAT.WHICH
12:20 camelia rakudo-moar 6cb231: OUTPUT«␤»
12:20 llfourn m: sub foo(Int(Any) $i) { $i.say }; foo("5") # In this case it will coerce the Str "5" to Int 5
12:20 camelia rakudo-moar 6cb231: OUTPUT«5␤»
12:21 llfourn ufobat: ^^
12:21 psch m: class A { method Int { 5 } }; sub f(Int(A) $x) { say $x }; f A # more expansive example
12:21 camelia rakudo-moar 6cb231: OUTPUT«5␤»
12:22 psch Int(Any) seems really misleading to me, 'cause it's Cool that allows it and all... vOvo
12:22 psch -o
12:22 ufobat ah! coercion,
12:22 * psch wonders what exactly happened to the COERCE proposal...
12:22 llfourn yes, of sorts
12:23 ufobat i'd like to read the documentation about that :)
12:23 RabidGravy anyone else want an invite to Perl6-Noise-Gang ?
12:23 llfourn ufobat: http://docs.perl6.org/language/functions#Coercion_Types
12:24 dalek perl6.org: b476ad6 | (Zoffix Znet)++ | fetch-recent-blog-posts.pl:
12:24 dalek perl6.org: Make link finder smarter
12:24 dalek perl6.org:
12:24 dalek perl6.org: Commit 061cbe2265a6ed9eb9d5bb3a8daee21f96c7bd8b suggests not restricting <link>s by text/html will give bogus URLs, but some blogs do not have text/html
12:24 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/b476ad6d9d
12:24 ufobat llfourn :D thank you
12:25 sjn RabidGravy: noise gang?
12:25 RabidGravy sjn, audio/music cabal
12:26 RabidGravy :)
12:26 sjn ah, cool
12:26 RabidGravy just thought it was about time we got some application domain specific thingies going
12:26 sjn fair enough
12:27 RabidGravy sjn, want an invite then while I've got the page open?
12:27 * sjn isn't much of an audio geek at all
12:27 llfourn if I have a signature like :(Int $a,Str $b) is there a way to attempt to bind to it and get a useful exception if it doesn't work?
12:27 psch and off goes Music::Helpers
12:27 llfourn :($a,$b).try-bind(1,2,3) # eg throws and exception
12:27 psch now i can slack off on that again, 'cause there's an org to take care of it \o/
12:28 RabidGravy ;-p
12:31 RabidGravy https://github.com/Perl6-Noise-Gang
12:32 RabidGravy anyone a dab hand with photoshop/gimp/paint want to knock up a quick "camelia with some musical thing" logo
12:33 wamba joined #perl6
12:36 dalek doc: 741f52b | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod:
12:36 dalek doc: doc anonymous enums
12:36 dalek doc: review: https://github.com/perl6/doc/commit/741f52b616
12:41 pierre_ joined #perl6
12:41 psch RabidGravy: we also need all kind of domain-appropriate groups i think
12:42 psch ...well, maybe not, i can't even think of one really fitting (and somewhat humorous) example vOv
12:43 _nadim RabidGravy: what would  Perl6-Noise-Gang be?
12:43 RabidGravy for people interested in doing audio/music related stuff
12:44 _nadim Nice but I suck at music, can barely put a song on ;)
12:48 psch hmm, i wonder if travis still does Music::Helpers correctly now...
12:48 jjido_ joined #perl6
12:51 RabidGravy I ought to try putting Audio::PortMIDI in travis, I wasn't sure how much of alsa it had to have the default sequencer ports an shizzle
12:53 psch hm, shouldn't it just work if you send stuff back and forth across the loopback?
12:54 _nadim Can someone look and see if there is a obviously wrong in the grammar?  http://nopaste.linux-dev.org/?1096659
12:54 RabidGravy yeah, it was the presence or not of the "Midi Through" device
12:54 cdg joined #perl6
12:54 grondilu I have the error message:
12:54 grondilu Cannot find method 'package_at_key': no method cache and no .^find_method
12:55 grondilu and yet my results seems fine.  I don't understand what's wrong.
12:55 grondilu I mean it does find the sub since the results are good.
12:55 grondilu (or method whatev)
12:57 domidumont joined #perl6
12:58 grondilu I'll try to golf it
13:02 rurban joined #perl6
13:05 andreoss joined #perl6
13:06 rurban left #perl6
13:07 daniel-s joined #perl6
13:09 tbrowder joined #perl6
13:11 RabidGravy in HTML is it "Perl&nbsp;6"
13:11 perlpilot yes
13:13 RabidGravy yeah that works
13:13 tbrowder psch & llfourn & RabidGravy: yt hints helped to make my hackable rakudo work, but I found some gotchas: (1) panda needs to be executed from OUTSIDE the rakudo repo fork, (2) the best choice of place to install seems to be /path/to/rakudo-repo/install/share, and (3) I still needed to specify the install path with PERL6LIB; but I now have a working solution--thanks!
13:14 RabidGravy cool
13:14 llfourn tbrowder: yep I think I had to do all 3 of those too :)
13:15 andreoss what would be the reverse operation of .uniname?
13:15 andreoss m: "a".uniname.say
13:15 camelia rakudo-moar 6cb231: OUTPUT«LATIN SMALL LETTER A␤»
13:15 andreoss m: "a".uniname.reverse_uniname == "a"
13:15 camelia rakudo-moar 6cb231: OUTPUT«WARNINGS for /tmp/60ucTlAn_h:␤Useless use of "==" in expression ".reverse_uniname == \"a\"" in sink context (line 1)␤Method 'reverse_uniname' not found for invocant of class 'Str'␤  in block <unit> at /tmp/60ucTlAn_h line 1␤␤»
13:15 psch m: say "\c[LATIN SMALL LETTER A"]
13:15 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1jd8KQYr5C␤Unrecognized character name LATIN SMALL LETTER A"␤at /tmp/1jd8KQYr5C:1␤------> 3say "\c[LATIN SMALL LETTER A"7⏏5]␤»
13:16 psch huh
13:16 andreoss as a method probably?
13:16 psch m: say "\c[LATIN SMALL LETTER A]"
13:16 camelia rakudo-moar 6cb231: OUTPUT«a␤»
13:16 psch oohh
13:16 psch "] vs ]"
13:17 psch andreoss: what do you propose that method does?
13:17 psch andreoss: i mean, it has to be a method on Str, right?
13:17 sufrostico joined #perl6
13:18 andreoss it takes uniname and return a string much like charnames::str_vianame in p5
13:18 andreoss *string_vianame
13:18 cdg joined #perl6
13:19 psch i don't think we have anything like that currently
13:20 _4d47 joined #perl6
13:21 tbrowder I think I'll propose the tidbits for the docs...
13:23 andreoss m: "Hello".uninames>>.subst(/^ <?before LATIN | DIGIT >/, "FULLWIDTH ").map({ "\\c[" ~ $_ ~ "]" }).join.say
13:23 camelia rakudo-moar 6cb231: OUTPUT«\c[FULLWIDTH LATIN CAPITAL LETTER H]\c[FULLWIDTH LATIN SMALL LETTER E]\c[FULLWIDTH LATIN SMALL LETTER L]\c[FULLWIDTH LATIN SMALL LETTER L]\c[FULLWIDTH LATIN SMALL LETTER O]␤»
13:25 cdg joined #perl6
13:25 psch m: ('"' ~ ("Hello".uninames>>.subst(/^ <?before LATIN | DIGIT >/, "FULLWIDTH ").map({ '\\c[' ~ $_ ~ ']' }).join) ~ '"').EVAL.say
13:25 camelia rakudo-moar 6cb231: OUTPUT«Hello␤»
13:25 psch andreoss: well, if i'm right and we really don't have anything like that i think i'd agree we could use it
13:26 andreoss EVAL is bad
13:29 jnthn andreoss: Please file a feature request for a sub/method to map a char name into its codepoint, we don't have one of those yet
13:29 jnthn For now either EVAL, or `use nqp` and then nqp::codepointfromname('FULLWIDTH LATIN SMALL LETTER E')
13:30 zwu joined #perl6
13:31 jnthn Guess TimToady++ will be able to supply us a nice name :)
13:31 zwu is using full path name of symbols bypass the compiler check, for example M1::call_foo() in script?
13:31 jnthn (Which reverse_uniname is not. :P)
13:32 _28_ria joined #perl6
13:44 Actualeyes1 joined #perl6
13:45 maybekoo2 joined #perl6
13:46 ZoffixWin joined #perl6
13:47 ZoffixWin jdv79, no. Neither.
13:49 jjido_ joined #perl6
13:50 domidumont joined #perl6
13:52 MadcapJake RabidGravy: I have a repo of Audio::FluidSynth that I started a while back (needs some TLC) but I haven't yet added it to my github, perhaps I could put it up in the Noise Gang org?
13:53 pierre_ joined #perl6
13:53 timotimo what is this noise gang org you're speaking of
13:53 MadcapJake timotimo: https://github.com/Perl6-Noise-Gang
13:53 timotimo neat
13:53 RabidGravy MadcapJake, what's your gh id?
13:53 MadcapJake MadcapJake
13:54 timotimo MadcapJake, MadcapJake.
13:54 RabidGravy timotimo, want an invite? It's "timo" isn't it
13:54 MadcapJake MadcapJake xx 2
13:54 psch ooh, the logo is actually already pretty neat
13:55 RabidGravy just some note clipart I blagged ;-)
13:55 * RabidGravy invites timotimo anyway
13:55 timotimo no, just "timo"
13:55 psch hah, but it has 6 note lines
13:56 timotimo that's perfect
13:56 timotimo for perl 6
13:56 RabidGravy :)
13:56 zwu if both modules have exported a same name sub foo() is export {...}, in the main script use m1; use m2; will give error: Cannot import symbol &foo from m2, because it already exists in this lexical scope. It will stop us to use both of m1 and m2, though the actual foo is defined under m1:: and m2::.
13:56 RabidGravy no
13:56 psch m: sub f { }; sub f { } # this also never works
13:56 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JgRfKimQeH␤Redeclaration of routine f␤at /tmp/JgRfKimQeH:1␤------> 3f { }; sub f { } # this also never works7⏏5<EOL>␤»
13:57 RabidGravy don't export them by default and make them "our" subs
13:57 zwu importance of the export alias is definitly necessary I think.
13:57 RabidGravy you can do that
13:57 psch so merging GLOBALs from two used modules with identical exported symbols can never work either
13:57 zwu sometime we cannot control the modules to not to export.
13:57 ZoffixWin m: use nqp; "Hello".uninames>>.subst(/^ <?before LATIN | DIGIT >/, "FULLWIDTH ")>>.&({nqp::codepointfromname($_)})».chr.join.say
13:57 camelia rakudo-moar 6cb231: OUTPUT«Hello␤»
13:58 neuron joined #perl6
13:58 zwu for example if I use two third party modules, both have exported a same symbol.
13:58 MadcapJake It should default to overwrite globals and then you can still access the other via m1::<&foo> right?
13:58 psch zwu: well, use is lexical.  you can always use the modules in different scopes
13:58 psch MadcapJake: no, if it's < my ... is export > you can't access it via the namespace long name
13:59 MadcapJake oh yeah the `my` makes it non-global
13:59 skids joined #perl6
13:59 RabidGravy use them in different scopes and then re-export them from that scope with different names even
13:59 psch m: module Foo { sub ok is export { say "ok!" } } }; { import Foo; ok }; { import Test; ok 1 }
13:59 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RAw0A8aLfo␤Unexpected closing bracket␤at /tmp/RAw0A8aLfo:1␤------> 3 Foo { sub ok is export { say "ok!" } } 7⏏5}; { import Foo; ok }; { import Test; ok␤»
13:59 psch m: module Foo { sub ok is export { say "ok!" } }; { import Foo; ok }; { import Test; ok 1 }
13:59 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iJP2sqhtvh␤Could not find module Test to import symbols from␤at /tmp/iJP2sqhtvh:1␤------> 3" } }; { import Foo; ok }; { import Test7⏏5; ok 1 }␤»
13:59 psch m: module Foo { sub ok is export { say "ok!" } }; { import Foo; ok }; { use Test; ok 1 } # grr
13:59 camelia rakudo-moar 6cb231: OUTPUT«ok!␤ok 1 - ␤»
14:00 robertle witin a start { ... }, how can I get any idea of the thread I am running under? an id or so?
14:01 psch overwriting symbols is really a bad idea in any case i think
14:01 timotimo m: start { say $*THREAD }; say $*THREAD
14:01 camelia rakudo-moar 6cb231: OUTPUT«Thread #3␤Thread #1 (Initial thread)␤»
14:01 timotimo also interesting is $*SCHEDULER
14:01 psch m: say $*THREAD.WHAT
14:01 camelia rakudo-moar 6cb231: OUTPUT«(Thread)␤»
14:02 grondilu apparently it was the use of race that produced the error mentioned above.
14:02 robertle timotimo: thanks! I knew $*SCHEDULER, but not $*THREAD...
14:02 timotimo at the moment, .race and .hyper are not really stable at all
14:04 RabidGravy m: module Foo { sub ok is export { say "ok!" } }; my &foo-ok; my &test-ok; { import Foo; &foo-ok = &ok }; { use Test; &test-ok = &ok }; foo-ok; test-ok 1;
14:04 camelia rakudo-moar 6cb231: OUTPUT«ok!␤ok 1 - ␤»
14:05 RabidGravy not quite "re-exporting" but doable
14:08 grondilu could have you done 'our &foo-ok is export'?
14:09 moritz I don't think we can export variables at this point
14:09 RabidGravy you can do that as an export sub though
14:09 m0ltar joined #perl6
14:10 _nadim Can we Haz a substr that would do what a lot (well .. ) of people want? when giving an end that is before the start of the sub string, just return an empty one. Although it has not happened lately, the forever checking if one is withing range, if one os going to count from the end or what kind of error, if any, will be send back is tiresome. and it would add some huffman encoding points to the whole handling of strings.
14:10 grondilu I meant it as a way to re-export as you just tried
14:11 grondilu m: module Foo { module Bar { our sub f {} }; import Bar; our &f is export = &Bar::f };
14:11 camelia rakudo-moar 6cb231: ( no output )
14:11 grondilu m: module Foo { module Bar { our sub f {} }; import Bar; our &f is export = &Bar::f }; import Foo; f();
14:11 camelia rakudo-moar 6cb231: ( no output )
14:11 grondilu m: module Foo { module Bar { our sub f { say "hi" } }; import Bar; our &f is export = &Bar::f }; import Foo; f();
14:11 camelia rakudo-moar 6cb231: OUTPUT«hi␤»
14:11 RabidGravy yeah I thought that worked
14:12 grondilu cool, I was wondering how to do this.
14:12 RabidGravy but then moritz made me doubt myself
14:12 moritz sorry for that
14:13 grondilu it'd be easier if we had 'import Bar; re-export Bar;'
14:14 grondilu or just 'export Bar;'
14:14 psch _nadim: what do you mean "end"?  substr takes start position and length
14:15 zwu thanks for ans, i tried to use "{ use m1; ...}" and "{use m2;...}" under individual lexical code, it works. but when I replaced use with require, it doesn't work.
14:15 RabidGravy require doesn't import
14:16 RabidGravy you need to do the import explicitly
14:16 tharkun joined #perl6
14:16 RabidGravy you can also specify the actual symbol to import with require - e.g. "require Foo <&foo>"
14:16 zwu I used require "full path name";
14:17 zwu how can I do if I want to import dynamically?
14:17 grondilu m: module A { our sub term:<§> {} }; say &A::term<§>; # not sure if such syntax is ok
14:17 camelia rakudo-moar 6cb231: OUTPUT«(Any)␤»
14:17 zwu I used required "full path file name"
14:19 grondilu RabidGravy: how would I do it for an infix?
14:19 grondilu I mean I can't write &Bar::infix:<*>, can I?
14:19 RabidGravy the same
14:19 RabidGravy yeah
14:19 grondilu oh wait
14:20 jnthn Use the bracketed infix syntax
14:20 RabidGravy or that
14:20 grondilu m: module A { our sub term:<§> {} }; say &A::term:<§>;
14:20 camelia rakudo-moar 6cb231: OUTPUT«sub term:<§> () { #`(Sub|87002416) ... }␤»
14:20 RabidGravy but they're just subs with funy names
14:20 grondilu I had forgotten a colon earlier.  YEs it works indeed.
14:22 loren joined #perl6
14:23 vendethiel joined #perl6
14:23 grondilu but now, what if they are 'multi' and not 'only'?
14:23 zwu thanks. using the bracket  <&foo> works.
14:25 grondilu I mean I can not add multi candidates to say infix:<*> without using the 'multi infix:<*>(|c) {...}' syntax, can I?
14:25 dalek joined #perl6
14:25 john51_ joined #perl6
14:25 sftp joined #perl6
14:26 geekosaur joined #perl6
14:26 zwu can we use bracket in the "import" or "use" command too?
14:26 MadcapJake grondilu: correct
14:26 psch_ joined #perl6
14:27 grondilu to I can not use the trick above to re-export multis.  It's a bit LTA.
14:27 grondilu s/to I/so I/
14:28 MadcapJake grondilu: yeah I've run into that before too
14:28 tharkun_ joined #perl6
14:28 dalek doc: d42ebaa | VZ++ | doc/Language/regexes.pod:
14:28 dalek doc: Add matching "/" at the end of regex
14:28 dalek doc:
14:28 dalek doc: Trivial change to avoid unterminated regex in an example.
14:28 dalek doc: review: https://github.com/perl6/doc/commit/d42ebaa922
14:28 dalek doc: 3333a9d | (Zoffix Znet)++ | doc/Language/regexes.pod:
14:28 dalek doc: Merge pull request #474 from vadz/patch-2
14:28 dalek doc:
14:28 dalek doc: Add missing matching "/" at the end of regex
14:28 dalek doc: review: https://github.com/perl6/doc/commit/3333a9d689
14:29 BooK is there a better way to write @a».Int ?
14:29 BooK sorry, @a = @a».Int
14:29 grondilu +<<@a
14:29 grondilu ah no
14:30 BooK because nodal, I remember what masak said some days ago :-)
14:30 perlpilot grondilu: Have you seen https://github.com/perlpilot/p6-Test-Class/blob/master/lib/Test/Class.pm6#L4 ?  I dunno if that's helpful or not as I haven't been paying attention.
14:30 * perlpilot meeting &
14:30 grondilu m: my @a = (rand xx 3) X*10; @a [>>.]= Int;
14:30 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/esVRA6WKkR␤Malformed postfix call␤at /tmp/esVRA6WKkR:1␤------> 3my @a = (rand xx 3) X*10; @a [>>.7⏏5]= Int;␤»
14:31 _nadim psch:  youin, that sucks. can't give a negative length, so you must do all the computations before; again and aga
14:31 _nadim psch:  you can't give a negative length, so you must do all the computations before; again and again, that sucks.
14:31 psch m: say "negative length".substr(*-10, *-4)
14:31 camelia rakudo-moar 6cb231: OUTPUT«ive le␤»
14:31 remmie2 joined #perl6
14:31 grondilu m: my @a = (rand xx 3) X*10; @a [X.]= Int;
14:31 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/k9i9Bv2DD6␤Malformed postfix call␤at /tmp/k9i9Bv2DD6:1␤------> 3my @a = (rand xx 3) X*10; @a [X.7⏏5]= Int;␤»
14:32 psch _nadim: that doesn't do what you need?
14:32 grondilu m: my @a = (rand xx 3) X*10; @a X[.=] Int;
14:32 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IvfvBwL_WZ␤Cannot cross with .= because dotty infix operators are too fiddly␤at /tmp/IvfvBwL_WZ:1␤------> 3my @a = (rand xx 3) X*10; @a X[.=]7⏏5 Int;␤»
14:32 * grondilu gives up
14:32 _nadim m: say "negative length".substr(0, -4)
14:32 camelia rakudo-moar 6cb231: OUTPUT«Number of characters argument to substr out of range. Is: -4, should be in 0..Inf; use *-4 if you want to index relative to the end␤  in block <unit> at /tmp/TPuU6HoGeM line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/TPuU6HoGeM line 1␤␤»
14:32 psch m: say "negative length".substr(0, *-4)
14:32 camelia rakudo-moar 6cb231: OUTPUT«negative le␤»
14:32 psch _nadim: it even says "use *-4 if you want to index relative to the end"
14:33 RabidGravy SPLITTERS!
14:33 ribasushi joined #perl6
14:33 _nadim it's not relative to the en, or we'd be doing computation again, it's a length that is negative, big difference
14:33 psch _nadim: but a negative length is a semantically invalid concept.  it doesn't make any sense
14:33 RabidGravy er
14:34 _nadim they said the same thing about the root of negative numbers ;)
14:34 psch yeah, no, it's not the same thing...
14:34 psch anyway, what's your use-case ooc?
14:35 grondilu m: module Foo { module Bar { our sub f is export { say "hi" } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } };
14:35 camelia rakudo-moar 6cb231: ( no output )
14:35 tony-o MadcapJake: ++ for myhtml
14:35 grondilu m: module Foo { module Bar { our sub f is export { say "hi" } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } }; import Foo; f()
14:35 camelia rakudo-moar 6cb231: OUTPUT«hi␤»
14:35 grondilu perlpilot: oh that works
14:35 _nadim psch: well, often it is when you have a string to display and a certain width of display.
14:35 MadcapJake tony-o: thanks!
14:35 grondilu and it's fairly elegant as well
14:36 RabidGravy aah gah doo doo doo
14:36 tony-o just saw it as i'm checking the cron settings for modules.zef.pm
14:36 _nadim psch: I actually met the case earlier when patching Gramar::Tracer
14:36 psch _nadim: why not use comb for that?
14:36 psch instead of substr
14:36 RabidGravy or sprintf
14:37 huf joined #perl6
14:37 aries_liuxueyang joined #perl6
14:37 molaf joined #perl6
14:37 uruwi joined #perl6
14:37 richi235 joined #perl6
14:37 JimmyZ joined #perl6
14:37 vike joined #perl6
14:37 vytas joined #perl6
14:37 M-Illandan joined #perl6
14:37 gtodd joined #perl6
14:37 masak joined #perl6
14:37 [Coke] joined #perl6
14:37 chris2 joined #perl6
14:37 MadcapJake tony-o: 1.6 million downloads wooohoo! ;)
14:37 psch or that i suppose, yeah
14:37 loren joined #perl6
14:37 _nadim EG: $sniplen > 0 ??  colored(' ' ~ $snippet.substr(0, $sniplen).perl, 'white') !! ''
14:38 _nadim sprintf doesn't take negative length either, back to the board
14:39 _nadim as for comb, I need to check again what it accepts for arguments
14:39 _nadim This is _really_ not a big deal, just something Ihave seen a lot of times
14:39 tony-o MadcapJake: wait until you refresh :-p
14:40 RabidGravy _nadim, 90% of programming is bounds checking ;-O
14:40 Juerd joined #perl6
14:40 grondilu perlpilot: trying this trick in one of my modules I got a spectacular fail:  "Interrupted command".  Never seen that before.
14:41 khw joined #perl6
14:41 grondilu probably on shell level since it was "commande interrompue" (in my language)
14:41 psch m: my $foo = lines()[0..2].join; $foo.comb(/. ** 10/)>>.say
14:41 camelia rakudo-moar 6cb231: OUTPUT«Céad slán ␤ag sléibht␤e maorga C␤hontae Dhú␤n na nGall␤Agus dhá c␤héad slán ␤ag an Eire␤agal ard i␤na stua os␤ cionn cao␤r is coll;␤Nuair a gh␤luais mise␤ thart le ␤Loch Dhún ␤Lúich’ go ␤ciúin sa g␤hleann ina␤»
14:41 ggherdov joined #perl6
14:42 RabidGravy yeah, that looks like something bit the dust under the hood
14:42 psch ...making up a regex that doesn't split words is a bit harder - i mostly don't remember the syntax for the anchor right now :P
14:43 grondilu m: module Foo { our class Bar { our multi infix:<*> is export { -1 } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } }; import Foo; say Foo::Bar*Foo::Bar
14:43 camelia rakudo-moar 6cb231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4sfINh6CVr␤Cannot use 'our' with individual multi candidates. Please declare an our-scoped proto instead␤at /tmp/4sfINh6CVr:1␤------> 3r { our multi infix:<*> is export { -1 }7⏏5 }; sub EXPORT { %(Ba…»
14:43 _nadim m: '1234567'.comb(-4 ,1)
14:43 camelia rakudo-moar 6cb231: ( no output )
14:43 _nadim m: '1234567'.comb(-4 ,1).say
14:43 camelia rakudo-moar 6cb231: OUTPUT«(6)␤»
14:43 grondilu m: module Foo { our class Bar { multi infix:<*> is export { -1 } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } }; import Foo; say Foo::Bar*Foo::Bar
14:43 camelia rakudo-moar 6cb231: OUTPUT«Use of uninitialized value of type Foo::Bar in numeric context  in block <unit> at /tmp/sSilg5F3QI line 1␤Use of uninitialized value of type Foo::Bar in numeric context  in block <unit> at /tmp/sSilg5F3QI line 1␤0␤»
14:44 _nadim m: '1234567'.comb(-4 ).say
14:44 camelia rakudo-moar 6cb231: OUTPUT«(1 2 3 4 5 6 7)␤»
14:44 grondilu m: module Foo { our class Bar { multi infix:<*> is export { -1 } }; sub EXPORT { %(Bar::EXPORT::DEFAULT) } }; import Foo; say Foo::Bar.new*Foo::Bar.new
14:44 camelia rakudo-moar 6cb231: OUTPUT«Cannot call Numeric(Foo::Bar: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/Bd7IbQAo5h line 1␤␤»
14:44 _nadim m: '1234567'.comb(-3 ).say
14:44 camelia rakudo-moar 6cb231: OUTPUT«(1 2 3 4 5 6 7)␤»
14:44 zwu I found there is a different behavior between the import and require: module m1 { our sub foo() {...}; our class TestClass {...}};  //// use m1;  I can call m1::foo(); and my $tc = m1::TestClass.new(); //// however, when I use require "m1_filename"; I can call m1:foo() too but my $tc=m1::TestClass.new() gives me error of no symbole of &TestClass.
14:44 pierre_ joined #perl6
14:44 _nadim m: '1234567'.comb(-3, 2 ).say
14:44 camelia rakudo-moar 6cb231: OUTPUT«(5 6)␤»
14:45 gtodd has perl6 scaled enough to begin monetizing ?  :-)
14:45 _nadim m: '1234567'.comb(3, 2 ).say
14:45 camelia rakudo-moar 6cb231: OUTPUT«(123 456)␤»
14:45 _nadim m: '1234567'.comb(-3, 0 ).say
14:45 camelia rakudo-moar 6cb231: OUTPUT«()␤»
14:45 BooK how do I see the canonical form of a Rat? (as numerator/denominator)
14:45 _nadim m: '1234567'.comb(3, 0 ).say
14:45 camelia rakudo-moar 6cb231: OUTPUT«()␤»
14:46 _nadim BooK: .perl does that I believe
14:46 timotimo BooK: you'd have to .nude.join("/") probably
14:46 BooK ah nude
14:46 BooK I had tried with gist and perl
14:46 _nadim Data::Dump::Tree
14:47 _nadim it shows num/denum
14:47 rindolf joined #perl6
14:48 BooK thanks _nadim & timotimo
14:49 _nadim and "$r.numerator ~ '/' ~ $r.denominator" of course
14:50 zwu why does it say no symbole of &TestClass when using m1::TestClass.new(), for which m1 module is loaded by require "m1_filename.pm6", module m1 {our class TestClass ...}
14:50 jjido_ joined #perl6
14:50 lostinfog joined #perl6
14:54 gtodd _nadim: over time you can make all the .things() that do stuff with "strings" be perfectly consistent and better  :-)
14:56 RabidGravy ooh the domain "noisegang.com" is actually available
14:56 ZoffixWin joined #perl6
14:56 ZoffixWin joined #perl6
14:57 timotimo neato
14:57 ZoffixWin I'm looking at this: http://docs.perl6.org/language/5to6-perlfunc#exec .... is there no way at all to basically restart your own script?
14:57 ZoffixWin I want Bailador to watch my source for changes and restart itself when it detects a change
14:58 _nadim yoohoo!!! putting \n* at a start of a grammar makes things happen! why? I need more time.
14:58 Xliff OK. I have a release branch in git. How do I go about adding that branch to the ecosystem?
14:58 perlpilot ZoffixWin: you could use IO::Notification for that.
14:58 ZoffixWin Xliff, click Pencil icon and add URL to *raw* meta file here: https://github.com/perl6/ecosystem/blob/master/META.list
14:59 ZoffixWin perlpilot, thanks, but watching isn't a problem.. it's restarting that's a problem :)
14:59 RabidGravy Xliff, what's your GH id?  I gonna invite you to a party
14:59 perlpilot oh
14:59 Xliff Xliff <clifton.wood@gmail.com>
14:59 RabidGravy well actually a github organisation but the other thing is more fun
15:00 RabidGravy no, no github id
15:00 Xliff ZoffixWin, I've already cloned ecosystem and done that, but before I release, I want to know if I can specify a release branch, or if I will need to create another branch for further development.
15:00 psch Xliff: the links inside the META.list contain the branch
15:01 ZoffixWin Xliff, I think if you link to the meta from the branch, that'll work
15:01 RabidGravy yeah a release branch is fine as long as specify the correct thing in the META.list and the correct urls in the META6.json
15:01 _nadim feedback please, this is the modified output of Grammar::Trace, anything that could be done better?  http://imgur.com/Wimuoso
15:03 gtodd Grammar::Trace or Grammar::Tracer ?
15:04 ZoffixWin exit shell($command); doesn't really do the trick... 'cause the socket is still in use when the second copy of bailador starts :/
15:04 _nadim Grammar::Tracer, jnthn's module
15:07 Xliff So this should work as a source_url in META.info: git://github.com/Xliff/p6-audio-oggvorbis.git#v0.0.1
15:07 ZoffixWin That won't get indexed
15:08 ZoffixWin hm
15:09 perlpilot ZoffixWin: when you figure this out, I expect a module to make it easier for the next guy and a blog post about your adventure  ;-)
15:09 ufobat ZoffixWin++ :D
15:09 perlpilot ZoffixWin++ btw.  Your blog posts have been excellent
15:10 Xliff Do panda and zef use the URL in META.list, or the one in META.info?
15:10 ufobat ZoffixWin, funny, yesterday i tried to kill my webserver with fast requests and it didnt happen as well
15:10 kaare_ joined #perl6
15:11 sno joined #perl6
15:11 gtodd _nadim: I remember being amazed by jnthn's presentation (from youtube ?) and thinking it would be neat if there were Grammar::Tracer plugins that would output the trace in different formats
15:11 ZoffixWin Xliff, I believe they use a JSON file generated by this script: https://github.com/perl6/ecosystem/blob/master/server/updatelist.pl
15:12 gtodd _nadim: wow ... I just checked and that was a long time ago 8-}
15:12 ZoffixWin Xliff, and this part mangles source in META: https://github.com/perl6/ecosystem/blob/master/server/updatelist.pl#L62
15:12 _nadim gtodd: It's a replacement of his format, IMVHO, clearer and much more compact. But maybe it is a good idea to have different formats
15:13 RabidGravy Xliff, yeah the META file in the META.list is retrieved and then the installer will use the source in that to retrieve the actual module source
15:14 perlpilot http://sethgodin.typepad.com/seths_blog/2016/04/closing-the-gate.html seems like something #perl6 should be continually cognizant of
15:14 _nadim ZoffixWin's post are great, except for his aversion for parenthesis, he puts ' :' everywhere ;)
15:14 perlpilot _nadim: feature!
15:14 ZoffixWin Yes, I hate parentheses with passion :)
15:15 zwu hello, is it a bug? it says no symbol of &TestClass when calling m1::TestClass.new() for which m1 module is loaded by require "m1_filename.pm6", module m1 {our class TestClass ...}
15:15 perlpilot ZoffixWin: were you accosted by a LISP variant at some point?  :)
15:16 Xliff OK. So the META.info has to match the release branch. Got it.
15:16 Xliff Thanks.
15:16 gtodd _nadim: I remember (again a long time ago) someone making a video of a web framework of some kind (maybe Django) which showed how a request was handled by the code ... highlighting the actual lines of code and showing how different modules were loaded and handed off the request and reponse etc.  It was really well done but probably a lot of work.  Then a few years later jnthn's module (tiny I think) Grammar::Tracer almost was able to do the sa
15:18 RabidGravy zwu, better show us the actual code as I'm pretty certain that works
15:18 ZoffixWin Xliff, well, I found just one module that doesn't use the default branch as the META file URL, but in their source, they still listed just the URL without branch: https://github.com/nkh/P6-Data-Dump-Tree/blob/release/META.info
15:19 ZoffixWin I guess you get to be the pioneer to figure out whether this stuff actually works :)
15:19 psch the /release/ bit in the path *is* the branch, no?
15:19 ZoffixWin psch, yes. But that's not part of the `source` URL in the META
15:20 psch ZoffixWin: ooh, right.  i misunderstood which level the branch has to be tracked
15:20 _nadim gtodd: Grammar::Trace is very useful, I am trying to figure out why my rammar sucks right now ;), but I think it can be polished a bit more. Conway had a great regex visualizer, there are ideas to get from there.
15:21 RabidGravy ZoffixWin, that should work as long as the META file doesn't change differently in the branch
15:21 gtodd _nadim: exactly ... I was thinking a sort of typescript playback of the parse ... a deep dive into perl6's *brain* .... a plugin architecture for Grammar::Tracer of some kind might lead to something cool ... Grammar::Tracer::Plugin::Animated::MP4 ? :-D
15:22 ZoffixWin RabidGravy, but branch information from the META file URL is not preserved anywhere: http://ecosystem-api.p6c.org/projects.json
15:23 RabidGravy ah I see
15:23 RabidGravy yeah, that's not so useful then
15:23 _nadim gtodd: reminds me of hen I made movies of a build system, where you see the rulestrigger and the graph build up
15:23 colomon joined #perl6
15:23 ZoffixWin And seems that at least panda doesn't switch to any branches: https://github.com/tadzik/panda/blob/2beabe8745c1a0052c2c25c268b39cfc039b691a/lib/Panda/Fetcher.pm#L46
15:23 gtodd _nadim: wow cool ... btw I agree about ZoffixWin's posts ... I think they should have footnotes showing the parenthetcial alternative to  ": "  :)
15:24 zwu here is the test code I have https://gist.github.com/anonymous/35b0e607f4268c5a25e2eab0513a0112
15:24 gtodd also there's too much blood :-D
15:24 ZoffixWin heh
15:24 gtodd ZoffixWin: ++ !
15:25 RabidGravy I'm kinda mixed about the parens on methods
15:25 RabidGravy at first I thought the colons was ugly, now I've warmed to it for single argument methods
15:26 zwu RabidGravy: can you also take a look on the code at https://gist.github.com/anonymous/35b0e607f4268c5a25e2eab0513a0112
15:26 tadzik hmm
15:26 psch i kind of want to make an effort to get used to indirect method invocation syntax :P
15:26 tadzik would you like panda to be able to checkout branches (or specific commits) when you do 'panda install git://foo.bar/baz.git@devel' or something?
15:27 _nadim The problem is that the examples are for beginers too and when you have a colum instead for a well delimited , parenthesis, scope and then you shuffle in adverbs, like Zoffix likes to do, then you need concentration to match things up.
15:27 _nadim gtodd: I'll try to find the movie I made, or maybe I could generated a new one.
15:27 colomon joined #perl6
15:29 gtodd RabidGravy: it will take a while for P6BP to emerge :)
15:31 gtodd with perl5 it's always educational to see how perl -MO=Deparse "sees" your script ...  or how perlcritic would rewrite it :)
15:36 RabidGravy zwu, if you change the line to "my $tc = ::('m1::TestClass').new()" it will work, the reason it doesn't work how you have it is that the symbol isn't there at compile time
15:36 RabidGravy "require" being a runtime thing
15:37 zwu oh, that ::('m1::TestClass') is to by pass the compiler, but why the sub works m1::foo() ?
15:37 Xliff *Whew*
15:38 Xliff I'm off master and on to v0.0.2
15:38 Xliff Now to get v0.0.1 into the ecosystem.
15:38 zwu RabidGravy: I just tested the code ::('m1::TestClass').new(), it works.
15:39 RabidGravy zwu, well it's a "run time symbol lookup", the sub works because the sub isn't looked up until runtime when it's package qualified
15:40 TimToady jnthn: given that we overload \c[] for both \c65 and \c[LATIN CAPITAL LETTER A], I can't offhand think of a really good reason not to overload chr to take either chr(65) or chr("LATIN CAPITAL LETTER A")
15:41 RabidGravy and the reason it blows up the way it does is that rather than dying in compilation when it can't find the symbol it just evaluates to the Failure which is what you are seeing
15:41 zwu ah... thanks RabidGravy. But why the m1::TestClass with packaged qualified does not the same at runtime as the sub?
15:42 RabidGravy because types are handled differently
15:43 psch m: A.new; class A { }
15:43 camelia rakudo-moar 1acf80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/71re6Rxjxj␤Illegally post-declared type:␤    A used at line 1␤␤»
15:43 psch m: ::('A').new; class A { }
15:43 camelia rakudo-moar 1acf80: ( no output )
15:43 zwu thanks!
15:44 Xliff How often does https://raw.githubusercontent.com/ get updated? I just pushed a change on META.info to master and I don't see it reflected in the URL from ecosystem/META.list
15:44 RabidGravy I guess the compiler optimistically thinks that something may come along and actually provide the symbol but makes it a Failure that will happen at run-time if it doesn't
15:45 RabidGravy Xliff, every twenty minutes or so I think
15:45 Xliff Yep. Just saw it. Submitting PR now.
15:47 Xliff Aaand. Done.
15:47 RabidGravy ooh who killed dalek
15:47 dalek ecosystem: ca2ba7a | Xliff++ | META.list:
15:47 dalek ecosystem: New Perl6 Module
15:47 dalek ecosystem:
15:47 dalek ecosystem: Add Audio::OggVorbis to the perl6 ecosystem.
15:47 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/ca2ba7a132
15:47 dalek ecosystem: 2faa6a2 | RabidGravy++ | META.list:
15:47 dalek ecosystem: Merge pull request #202 from Xliff/patch-1
15:47 dalek ecosystem:
15:47 dalek ecosystem: New Perl6 Module
15:47 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/2faa6a2383
15:48 Xliff \o/
15:49 Xliff OK. I'm already late. I wanted to get this in before I had to leave.
15:49 Xliff See ya in the afternoon, #perl6.
15:49 jnthn m: say chr("65")
15:49 camelia rakudo-moar 1acf80: OUTPUT«A␤»
15:49 jnthn TimToady: Only thing is we'd break ^^ :)
15:50 jnthn TimToady: Unless we try numification as a fallback
15:51 jjido_ joined #perl6
15:52 zwu what's the disadvantage is we change to the runtime lookup for types when they are with package qualified?
15:52 TimToady can just look at the first char to see if numeric; don't think any uninames start numeric
15:54 TimToady m: .say if .uniname ~~ / ^ \d / for 0..0x10ffff
15:54 camelia rakudo-moar 1acf80: ( no output )
15:55 TimToady would probably be a bit faster than a fallback
15:55 maybekoo2 joined #perl6
15:55 TimToady though of course we're depending upon the Unicode Consortium to continue following this (unwritten?) policy
15:55 pecastro joined #perl6
15:56 RabidGravy zwu, well typically you should check the result of the lookup for being a Failure rather than it just blowing up if the symbol really isn't defined
15:57 RabidGravy people are doing that in modules when something is optionally loaded at run time
15:58 RabidGravy see e.g. https://github.com/sergot/http-useragent/blob/master/lib/HTTP/UserAgent.pm6#L345
16:04 vendethiel joined #perl6
16:07 TimToady well, something in there is already making the decision to distinguish \c[65] from \c[LATIN CAPITAL LETTER A]
16:07 TimToady and we should use that mechanism, or emulate it
16:09 jnthn TimToady: OK, sounds good. :)
16:09 jnthn I'll see if I can sneak it in at some point...will be a nice break from hunting GC/concurrency issues. :)
16:10 RabidGravy snark hunting
16:12 nd3i joined #perl6
16:13 nd3i eli5? p6: say {my $s ="Camelia"; $s.subst(/<[aeiou]>/, { .uc }, :g)}()
16:14 timotimo sure
16:14 timotimo so, when you call the subst method on the string $s, it'll search for the regex
16:14 timotimo the :g at the end specifies that it's supposed to replace as often as it can, rather than stopping after the first change
16:14 nd3i Oops. I thought the bot would pick that up. I get: CAmElIA
16:15 timotimo right
16:15 timotimo it only reacts when the m: or p6: is at the very beginning; i think even a space character will prevent it from running
16:15 timotimo that setting has its pros and cons :)
16:15 nd3i But when I want to modify the string, I have to use the s/// form
16:16 nd3i p6: say {my $s ="Camelia"; $s ~~ s:g/<[aeiou]>/{ .uc }/; $s}()
16:16 camelia rakudo-moar 1acf80: OUTPUT«CCAMELIAmCAMELIAlCAMELIACAMELIA␤»
16:16 timotimo you can use S/.../.../ when your string is set to $_ (which the "given" statement-suffix does, for example)
16:16 timotimo ah, hehe
16:16 timotimo the smartmatch operator sets the value of $_ to what you match against, i.e. $s
16:17 timotimo so you're replacing every vowel with $s.uc
16:17 timotimo p6: say {my $s ="Camelia"; $s ~~ s:g/<[aeiou]>/{ $/.uc }/; $s}()
16:17 camelia rakudo-moar 1acf80: OUTPUT«CAmElIA␤»
16:17 nd3i so is there something I can use in the s/// form to call a method on the current match?
16:17 nd3i Ahh, u beat me to it! Thanks.
16:18 timotimo :)
16:18 timotimo you're welcome
16:19 BooK what's this signature? (Mu:U \v: *%_)
16:19 nd3i Ack! but $/ doesn't work in the method form
16:19 uruwi joined #perl6
16:19 BooK and where can I read up on signatures?
16:19 TimToady m: say {my $s ="Camelia"; $s.subst-mutate(/<[aeiou]>/, -> $_ { .uc }, :g); $s }()
16:19 camelia rakudo-moar 1acf80: OUTPUT«CAmElIA␤»
16:19 nd3i p6: say {my $s ="Camelia"; $s.subst(/<[aeiou]>/, { $/.uc }, :g)}()
16:19 camelia rakudo-moar 1acf80: OUTPUT«CAmElIA␤»
16:20 nd3i Oops. It works here but not in my REPL ...
16:20 nd3i Ok, it works for me in a new session
16:21 ZoffixWin joined #perl6
16:21 ZoffixWin joined #perl6
16:21 nd3i Maybe the $/ was left over from a previous line?
16:22 RabidGravy BooK, that is a method signature for a method that explcitly requires a type object and has no explicit arguments
16:22 TimToady BooK: Mu:U is a type that accepts any indefinite type object, \v is a sigil-less declaration of a "variable" named "v", the ":" means that's the invocant, and *%_ will slurp up any named arguments into the %_ array
16:23 RabidGravy it would like like "method whatever(Mu:U \v) { ... }"
16:24 RabidGravy and http://doc.perl6.org/type/Signature seems like a good place to read on the matter ;-)
16:24 RabidGravy it wouldn't like what I typed of course because it is missing a colon after the \v
16:25 ZoffixWin Looks like IO::Notification is buggy.... If I run this script, it prints all the directories it finds, but then says 'no such directory'. BUT, if I comment out that 0.1 second sleep on line 7, then the problem doesn't happen: https://gist.github.com/zoffixznet/e07d8961d1db384c3141d04675ff3aef
16:26 ZoffixWin So it seems like creating a lot of IO::Notifications too fast is problematic
16:28 ZoffixWin And if I use design-docs instead of . as the initial watch path, it crashes only about 15% of the time
16:30 timotimo nd3i: you don't need $/ in the method variant, because the method will invoke your code-block with the match as its first (only?) positional parameter; in other words: you can just use $_ inside your block
16:31 ZoffixWin Yes, the Match object is the only arg
16:32 nd3i Ok, so I just have to remember that the s/// form and the method form handle a code block on the RHS differently
16:32 nd3i Sorry, on the replacement
16:32 ZoffixWin m: my $s ="Camelia"; say $s.subst: /<[aeiou]>/, *.uc, :g
16:32 camelia rakudo-moar 1acf80: OUTPUT«CAmElIA␤»
16:33 ZoffixWin m: say "Camelia".subst: /<[aeiou]>/, *.uc, :g
16:33 camelia rakudo-moar 1acf80: OUTPUT«CAmElIA␤»
16:33 ZoffixWin nd3i, BTW, the method form of s/// is .subst-mutate. .subst is the method form of S///
16:34 timotimo well, it's not truly the RHS of the s operator; it's more like the second half inside
16:34 timotimo at least that's how it feels to me
16:34 nd3i I think I'm at the "just enough knowlege to confuse myself" stage
16:35 timotimo the thing is, the right part of the s/// and S/// are regexy, not cody, so you have things like "the $/ has a value here"
16:35 RabidGravy nd3i, I'm permanently at that stage
16:35 nd3i ok, that makes sense; similar to p5
16:35 ZoffixWin m: say {my $s ="Camelia"; $s ~~ s:g[<[aeiou]>] = { $/.uc }() ; $s}()
16:35 camelia rakudo-moar 1acf80: OUTPUT«CAmElIA␤»
16:36 timotimo TimToady: did you have an opinion on what should be allowed to work in the listy part of an enum declaration?
16:38 nd3i right. I'm playing with the different ways to write it and getting different results. Sometimes different results from the same expression!
16:40 nd3i I'll study the suggestions here and see if the fog lifts any. TYVM
16:42 ZoffixWin .tell perlpilot sent you some fixes: https://github.com/perlpilot/p6-IO-Notification-Recursive/pull/1  There's still a problem with it: http://irclog.perlgeek.de/perl6/2016-04-29#i_12411080
16:42 yoleaux ZoffixWin: I'll pass your message to perlpilot.
16:45 mst ZoffixWin: parens are evil because hitting the shift key is hard, that's why I wrote a lisp that uses JSONY as its format so you can use []
16:46 zwu_ joined #perl6
16:48 ZoffixWin heh
16:52 jjido_ joined #perl6
16:57 RabidGravy there I can see the screen again
16:59 firstdayonthejob joined #perl6
17:09 ZoffixWin This seems to be in the wrong queue: https://rt.perl.org/Ticket/Display.html?id=128021
17:10 diakopter joined #perl6
17:11 RabidGravy seems fine to me, perl 5 ticket in the perl 5 queue
17:12 ZoffixWin Oh... brainfart. I just clicked on it in https://rt.perl.org/ forgetting the list includes both queues >_<
17:12 RabidGravy :)
17:19 zwu RabidGravy: thanks!
17:26 * [Coke] sees that someone donated to the perl QA hackathon 2016 as "the perl6 community". Thank you, whoever you are. (I probably know who you are. :P)
17:35 stmuk_ two there are!
17:41 leont joined #perl6
17:41 MadcapJake ZoffixWin: you can change the dashboard to only show the Perl 6 queue (though it's slightly roundabout)
17:45 * ZoffixWin head desks...
17:45 ZoffixWin Can't figure out why my sub is called in duplicate :/
17:46 ZoffixWin Any idea? https://gist.github.com/zoffixznet/50e0a7a14a8115fae14865a521ed4f0a Line #32 prints and you can see there are two dirs, but the output from line #35 is repeated :S
17:47 ZoffixWin It should 'Starting watch...' on each dir just once
17:47 vendethiel ZoffixWin what's |@dirs.map: { find-dirs $_ } ?
17:48 ZoffixWin vendethiel, it looks for each dir in @dirs to find all subdirectories
17:48 rba_ joined #perl6
17:49 vendethiel what's the result of that, I mean
17:49 ZoffixWin vendethiel, it's printed on line 32... the result is "DIRS: [lib|bin]"
17:49 ZoffixWin Just two dirs, but I get 4 calls to watch-it :S
17:50 adu joined #perl6
17:50 RabidGravy there http://perl6-noise-gang.github.io/ - worst possible template I could have chosen but hey
17:51 RabidGravy please feel free to nit-pick, patch, fix or completely re-do
17:51 Relsak joined #perl6
17:52 adu RabidGravy: can I bootstrappify it?
17:52 jjido_ joined #perl6
17:53 RabidGravy feel free, I shouldn't be let anywhere near web pages
17:53 ZoffixWin Seems the supply {} block is executed twice :/
17:53 adu RabidGravy: do you know what bootstrappify means?
17:54 ZoffixWin I print "ZOMFG" just as I enter supply {} and it gets printed twice, even though the "CMON" I print right before it gets printed just once: https://gist.github.com/zoffixznet/66411b043894cb9e276c8d8f193dde04
17:54 ZoffixWin adu, add it :) The current typography is hurting my eyes :)
17:55 adu http://getbootstrap.com/css/#buttons-options
17:55 adu when I think of bootstrap, I usually think of the buttons first :P
17:57 RabidGravy oh I've done stuff with bootstrap, I tend to do so when I start something from scratch because I'm lazy, but GH presented me with a set of templates and I just chose the least offensive looking one ';-)
17:59 RabidGravy ZoffixWin, the block is executed every time the the supply is tapped, which is possibly what is happening there
17:59 ZoffixWin Yeah, I just noticed if I remove the await .Promise; the duplication goes away
18:00 ZoffixWin But then... I'm not sure how to wait for it to be .done
18:06 ZoffixWin *sigh* a rogue loop {} at the end of the program it is....
18:06 _mg_ joined #perl6
18:08 al2o3-cr joined #perl6
18:09 ZoffixWin Heh. Thanks to my program, I now know Atom does two writes whenever you save a file, for some reason.
18:10 perlpilot ZoffixWin++ thanks.
18:10 yoleaux 16:42Z <ZoffixWin> perlpilot: sent you some fixes: https://github.com/perlpilot/p6-IO-Notification-Recursive/pull/1  There's still a problem with it: http://irclog.perlgeek.de/perl6/2016-04-29#i_12411080
18:10 perlpilot ZoffixWin: I'm sure I had updated that module post-xmas, but I guess I never pushed the changes.
18:11 dwarring joined #perl6
18:14 ZoffixWin perlpilot, I think there's still a bug with that code. I'm using what I believe is the same code as in your module, but in my app, when I remove lib/x directory, I'm getting three events: "Change detected [lib/x/x, FileRenamed]. app"
18:14 ZoffixWin "Change detected [lib/x/x, FileRenamed]. app
18:14 ZoffixWin " "Change detected [lib/x, FileRenamed]. app
18:14 ZoffixWin "
18:14 ZoffixWin lib/x/x ?? :S Not even sure how it comes up with that
18:14 * ZoffixWin is too tired to debug that too right now
18:14 perlpilot Did you make an issue for that?
18:14 perlpilot I might have time tonight to look at it.
18:14 ZoffixWin No, I just found that
18:14 ZoffixWin And it's with this code, not your module exactly: https://gist.github.com/zoffixznet/a726ea0b5866fff21b7290a59c3c1b61
18:15 perlpilot Hmm.  ok
18:17 ZoffixWin Ah, I see. It just creates multiple watchers on the same dir. I'm gonna create an Issue with the description of the fix.
18:21 perlpilot ZoffixWin: if you've got any ideas on how to fix the race condition in the conditional of that if statement, that would be nice too  :)
18:21 rindolf joined #perl6
18:29 tadzik hm, I'm considering making :force a default when doing CUR.install() in panda and alikes
18:30 tadzik is there ever any harm done by this action, other than potentially wasting some time on it that wouldn't otherwise needs to be spent?
18:30 tadzik though it may de-motivate people from actually versioning their stuff properly
18:31 tadzik yeah, I'm not in favour of de-educating folks. Thanks for help, #perl6 :)
18:31 RabidGravy couldn't do what it does with the deps?
18:32 RabidGravy or something
18:32 tadzik hm?
18:32 RabidGravy only even try to install if the version you got is newer than an installed on?
18:33 RabidGravy one?
18:33 tadzik it does that, yes
18:33 uruwi joined #perl6
18:33 tadzik but I found that in module development I often go through a cycle of "install this stuff for me please even though I'm not ready to bump the version number yet"
18:34 tadzik or "I'd rather not bump the version number every time I make a change"
18:34 tadzik so now I always do `redpanda -du .`, but it feels like there's a minor annoyance here somewhere that's easily solvable with software :)
18:35 tadzik perhaps tools should default to "yes, really update regardless of the version" when you give it a location (path, git url etc) rather than a module name
18:35 tadzik since you're likely to know what you're doing and this is exactly what you mean
18:39 AlexDaniel joined #perl6
18:40 dalek ecosystem: cdb74b0 | (Zoffix Znet)++ | META.list:
18:40 dalek ecosystem: Add Bailador::Dev::AutoRestarter
18:40 dalek ecosystem:
18:40 dalek ecosystem: script to detect source code changes and auto-restart Bailador app: https://github.com/zoffixznet/perl-Bailador-Dev-AutoRestarter
18:40 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/cdb74b0951
18:40 AlexDaniel ZoffixWin: not sure if you got an answer to your thingy but
18:40 AlexDaniel m: ‘foobar’ ~~ /(foo(bar))/; say $0; say $0[0]
18:40 camelia rakudo-moar 1acf80: OUTPUT«「foobar」␤ 0 => 「bar」␤「bar」␤»
18:40 AlexDaniel ZoffixWin: I guess that ↑ is what you wanted
18:40 pochi left #perl6
18:40 pochi joined #perl6
18:41 tadzik ermagherd
18:41 AlexDaniel m: ‘foobar’ ~~ /(foo(bar))/; say ~$0; say ~$0[0]
18:41 camelia rakudo-moar 1acf80: OUTPUT«foobar␤bar␤»
18:41 tadzik ZoffixWin: that's amazing!
18:41 psch m: ‘foobar’ ~~ /(foo(bar))/; .say for @0
18:41 camelia rakudo-moar 1acf80: OUTPUT«「bar」␤»
18:41 psch aw
18:41 ZoffixWin AlexDaniel, thanks
18:41 psch well, only slightly misleading, isn't it
18:41 psch m: ‘foobar’ ~~ /(foo(bar))/; put $0; put @0
18:41 camelia rakudo-moar 1acf80: OUTPUT«foobar␤bar␤»
18:42 AlexDaniel what is misleading?
18:42 psch that a nested capture is the first multi-capture
18:42 psch m: 'foobar' ~~ /(...) ** 2/; say @0
18:42 camelia rakudo-moar 1acf80: OUTPUT«[「foo」 「bar」]␤»
18:43 psch AlexDaniel: the overload between @0 meaning "the first element of the first capture" as well as "the first capture that captures more than once" feels weird, is my point
18:44 AlexDaniel oh
18:44 AlexDaniel indeed
18:45 psch m: 'foobar' ~~ /(...) ** 2/; say @()
18:45 camelia rakudo-moar 1acf80: OUTPUT«([「foo」 「bar」])␤»
18:45 psch m: 'foobar' ~~ /(...) ** 2/; say $()
18:45 camelia rakudo-moar 1acf80: OUTPUT«foobar␤»
18:45 psch well, those are all magical i suppose... vOv
18:46 AlexDaniel whoa…
18:49 TimToady m: say "bicycle race".substr(2, -1)
18:49 camelia rakudo-moar 1acf80: OUTPUT«Number of characters argument to substr out of range. Is: -1, should be in 0..Inf; use *-1 if you want to index relative to the end␤  in block <unit> at /tmp/HvO12Bmtpt line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/HvO12Bmtpt line 1␤␤»
18:49 TimToady m: say "bicycle race".substr(2, -1) // ''
18:49 camelia rakudo-moar 1acf80: OUTPUT«␤»
18:49 TimToady _nadim: why not just do that? ^^^
19:00 dwarring m: <???? ???? ????>.race
19:00 camelia rakudo-moar 1acf80: ( no output )
19:01 ZoffixWin .u ????
19:01 yoleaux U+1F6B2 BICYCLE [So] (????)
19:01 ZoffixWin heh
19:03 ZoffixWin m: "$_ won".say and exit for <????1 ????2 ????3>.race: :1batch
19:03 camelia rakudo-moar 1acf80: OUTPUT«????1 won␤????2 won␤»
19:03 ufobat joined #perl6
19:04 literal class Foo { constant BAR = 3; }; my $foo = Foo.new; how do I get to BAR from $foo?
19:05 ZoffixWin m: class Foo { constant BAR = 3; }; my $foo = Foo.new; say Foo::BAR
19:05 camelia rakudo-moar 1acf80: OUTPUT«3␤»
19:05 literal ZoffixWin: I mean without hardcoding the class name
19:05 literal $foo.some.method.chain.BAR
19:06 ugexe m: class Foo { constant BAR = 3; method BAR { BAR }; }; Foo.new.BAR.say
19:06 camelia rakudo-moar 1acf80: OUTPUT«3␤»
19:06 ZoffixWin ^name gives Foo in this case.. um... unsure how to get bar from that
19:06 ZoffixWin m: class Foo { constant BAR = 3; }; my $foo = Foo.new; say "$foo.^name()::BAR".EVAL
19:06 camelia rakudo-moar 1acf80: OUTPUT«3␤»
19:07 ZoffixWin heh
19:07 ZoffixWin m: class Foo { constant BAR = 3; }; my $foo = Foo.new; say ::('::')
19:07 camelia rakudo-moar 1acf80: OUTPUT«Start argument to substr out of range. Is: 1, should be in 0..0; use *1 if you want to index relative to the end␤  in block <unit> at /tmp/cktr011TA1 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/cktr011TA1 line 1␤␤»
19:08 * ZoffixWin giggles
19:08 TimToady timotimo: haven't looked at that code in a while, but I expect some of the original enum parse/actions hackery might be interfering with the more general case, which should be able to define pretty much any terms/values from pairs, modulo semantic constraints imposed by the enum type
19:14 timotimo OK, cool :)
19:21 dalek ecosystem: 9c51126 | (Zoffix Znet)++ | META.list:
19:21 dalek ecosystem: Move Audio::MIDI::Note to Perl6-Noise-Gang
19:21 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/9c511266e2
19:22 timotimo what'll the noise gang distribution of rakudo be called?
19:24 ZoffixWin Racket :)
19:24 jnthn Rockudo :P
19:24 ZoffixWin jnthn++
19:25 timotimo damn, that's good
19:25 literal is it possible to topicalize a parameter in method's signature?
19:26 jnthn literal: Just name a parameter $_ ?
19:26 psch m: sub f($_) { .say }; f 2
19:26 camelia rakudo-moar 1acf80: OUTPUT«2␤»
19:26 literal ah
19:27 jjido_ joined #perl6
19:29 stmuk_ whose going to be a Rockudo Star?
19:29 ZoffixWin :D
19:29 yqt joined #perl6
19:32 ugexe a 10x Rockudo Star
19:32 stmuk_ full stack!
19:34 lostinfog joined #perl6
19:37 ZoffixWin FYI: Yapc::eu 2016 <amalia> And we are also lauching the call for speakers https://medium.com/yapc-europe-2016/call-for-speakers-is-on-b8f4c32a8d89#.kspsclkzo
19:52 ufobat strange world, my wive asked me to work on bailador because she has a bad conscience
19:52 ZoffixWin :)
19:54 ufobat ZoffixWin, i like your restart script a lot :)
19:54 spider-mario joined #perl6
19:54 ZoffixWin Thanks.
19:57 nchambers left #perl6
20:05 ZoffixWin looks like panda doesn't know how to --force install scripts. The install succeeds, but the script doesn't update :/
20:07 maybekoo2 joined #perl6
20:07 _nadim TimToady: That's definitely a way!
20:08 dolmen joined #perl6
20:12 _nadim TimToady: what surprises me with >> say "bicycle race".substr(2, -1) // '' << is that the warning is gone!
20:12 user3 joined #perl6
20:13 tadzik ZoffixWin: please tell me more
20:13 user3 at this time, how much slower is the perl6 rakudo compiler compared to perl5?
20:13 user3 for general processing, and in particular for regex
20:14 user3 2x 10x slower/
20:14 user3 ?
20:14 psch m: my $x = "foo".substr(1, -1); say "ok"
20:14 camelia rakudo-moar 1acf80: OUTPUT«ok␤»
20:14 tadzik ZoffixWin: the script handling in general is quite sketchy in CURs :/
20:14 ZoffixWin tadzik, you know the wrapper script that's generated when you install scripts inside the dist? Here's my modified one. https://gist.github.com/zoffixznet/d92b53015d4f4bdd0a6a5461bd0720f1
20:14 psch _nadim: the error "disappears" because substr returns a Failure that only complains when it's evaluated
20:14 ZoffixWin tadzik, I had to add sort { $^b<ver> cmp $^a<ver> },  on line 10 for the wrapper to actually pick the latest version
20:15 psch m: my $x = "foo".substr(1, -1); say $x.WHAT
20:15 camelia rakudo-moar 1acf80: OUTPUT«(Failure)␤»
20:15 psch _nadim: ^^^
20:15 tadzik ZoffixWin: hm, interesting
20:16 ZoffixWin And I have like a dozen version installed, because I did --force install several times.
20:16 tadzik hehe
20:16 BooK when I put a class in a module, should I do  unit module Foo; class Foo { ... } ?
20:16 tadzik so they did get installed, just that the generated script was broken?
20:17 BooK and then use Foo; in the code needing it?
20:17 ZoffixWin BooK, you can. unit class Foo; is also a thing
20:17 ZoffixWin tadzik, yes
20:17 BooK I have some private functions and variables
20:17 _nadim psch: OHHH I like it!
20:20 tadzik oh noes
20:20 ZoffixWin m: sub defuse {so $^a}; my $x = "foo".substr(1, -1); defuse $x; say $x.words[1..4].join: ' '; say "meow"
20:20 camelia rakudo-moar 1acf80: OUTPUT«Number of characters argument␤meow␤»
20:20 ZoffixWin :)
20:20 tadzik ZoffixWin: speaking of 'install --force', may I interest you in being a betatest of what will soon [tm] become part of the new, big, major panda update? :)
20:20 ZoffixWin not really lol
20:21 ZoffixWin I started working on http://perl6.party at 9AM... it's 4:21PM now and I still don't have anything ready. Have been messing with bailador autorestart script lol
20:21 ZoffixWin perl6.party
20:22 tadzik hehe
20:22 ZoffixWin Cool, hexchat recognizes it as a link
20:25 Praise joined #perl6
20:25 Praise joined #perl6
20:30 remmie joined #perl6
20:32 timotimo well, if you put http:// in front ...
20:32 timotimo oh
20:32 ZoffixWin :)
20:32 timotimo ... never mind
20:33 user3 left #perl6
20:33 dalek doc: cd3dd6d | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod:
20:33 dalek doc: fix enum return type in example
20:33 dalek doc: review: https://github.com/perl6/doc/commit/cd3dd6d916
20:33 rurban joined #perl6
20:36 masak hm, is https://github.com/perl6/perl6.org/commit/e64aafc918 somthing I should do something about?
20:36 Praise joined #perl6
20:36 Praise joined #perl6
20:37 masak I recall producing my feed.atom with quite some care, using a validator...
20:37 masak but is there an advantage (for me or others) to have that `type="text/html"` on the `<link>` ?
20:38 rurban left #perl6
20:41 Ven joined #perl6
20:45 RabidGravy anyone else interested in being press ganged into perl 6 noise gang?
20:48 ZoffixWin masak, that attribute declares the type of content the link points to. It's up to the tool parsing it to make use of that information.
20:49 uruwi joined #perl6
20:50 ZoffixWin BTW, did anything happen to the whole make Bailador auto-serve static files from a specific dir thing?
20:50 ZoffixWin I recall there was a conversation
20:50 masak ZoffixWin: my question was more -- why was the expectation of `type="text/html"` there in the first place? is it a common expectation? can I read up on this somewhere? :)
20:51 ZoffixWin masak, ah, it was there because there are multiple <link>s in the XML it's parsing, so adding the extra restriction let it avoid wrong links.
20:51 zwu joined #perl6
20:52 ZoffixWin As for reading, the spec I guess: https://www.w3.org/TR/2011/WD-html5-author-20110705/the-link-element.html#attr-link-type
20:52 ZoffixWin "The type attribute gives the MIME type of the linked resource. It is purely advisory"
20:52 ufobat whats the difference between my sub something and sub something ?
20:53 masak ufobat: none
20:53 ZoffixWin I don't think there is any. It's `my` by default.
20:53 masak ufobat: a sub is lexical by default
20:53 ZoffixWin m: class Foo { our sub bar { say 'bar' }; sub cow { say 'cow' }; my sub meow { say 'meow' } }; Foo::bar; Foo::cow; Foo::meow
20:53 camelia rakudo-moar 1acf80: OUTPUT«bar␤Could not find symbol '&cow'␤  in block <unit> at /tmp/Q2GwJtI1Sh line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/Q2GwJtI1Sh line 1␤␤»
20:53 ZoffixWin m: class Foo { our sub bar { say 'bar' }; sub cow { say 'cow' }; my sub meow { say 'meow' } }; Foo::bar; Foo::meow
20:53 camelia rakudo-moar 1acf80: OUTPUT«bar␤Could not find symbol '&meow'␤  in block <unit> at /tmp/FMSFPqLVyC line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/FMSFPqLVyC line 1␤␤»
20:54 ufobat good! thanks!
20:54 masak ZoffixWin: ok, so this was only on the level of writing a query that found all the right <link> elements. got it.
20:54 ZoffixWin Yeah
20:54 zwu Is the S11-modules.pod? Because the example code  use Sense <&common @horse>; expecting a positional parameter to export sub instead?
20:55 zwu I mean if the S11-moudules.pod documentation is outdated?
21:03 ufobat oh yeah! bailador almost runs on HTTP::Server::Tiny
21:07 ZoffixWin How do I use this %?RESOURCES thing? I'm dumping it, but it's empty
21:09 TEttinger joined #perl6
21:10 ZoffixWin OK. The issue was resource/resources. The spec says "resource" directory but it's actually looking in resources
21:10 sufrostico joined #perl6
21:19 ZoffixWin Does Perl 6 has some sort of construct to ensure a path is *inside* a directory? I thought I saw an example. e.g., "foo/bar" is inside, but "foo/../../../bar" is not. You know what I mean?
21:19 ZoffixWin I need some safe way to open a file
21:21 perlpilot $*SPEC might have a method for that
21:22 dalek star: 87c3a4a | (Steve Mynott)++ | / (2 files):
21:22 dalek star: fix PATH for make modules-install under windows
21:22 dalek star: review: https://github.com/rakudo/star/commit/87c3a4a4ac
21:23 ZoffixWin Don't see one.
21:23 ZoffixWin I guess I should splitpath filter out any updir/curdir and then join back together
21:26 perlpilot ZoffixWin: It still sounds like something that should exist in IO::Spec.   Maybe get lizmat to add it  :)
21:27 ZoffixWin m: say $*SPEC.catdir: $*SPEC.splitdir('foo/../../bar/foo.txt').grep({ $_ ~~ $*SPEC.curupdir })
21:27 camelia rakudo-moar 1acf80: OUTPUT«foo/bar/foo.txt␤»
21:27 ZoffixWin uggly
21:31 ugexe m: my $path = "foo/../bar".IO; say $path.resolve; say $path.resolve.starts-with('bar')
21:31 camelia rakudo-moar 1acf80: OUTPUT«"/home/camelia/bar".IO␤False␤»
21:32 ugexe somethin like that anyway
21:33 ugexe then a good ol `use MONKEY-TYPING; augment IO::Path { method contains-path($path) { <check code> };`
21:33 ZoffixWin ugexe++ those don't seem to be documented
21:34 ugexe theres a warning in resolve though: "# XXXX: Not portable yet; assumes POSIX semantics"
21:40 ugexe (and contains-path is not an original method, thats just a way to add it to your IO::Path objects)
21:42 ufobat good night :)
21:52 Sgeo joined #perl6
21:59 ZoffixLappy joined #perl6
22:00 hotel_california joined #perl6
22:01 nchambers joined #perl6
22:03 sufrostico joined #perl6
22:03 dalek ecosystem: 6e9e9f1 | (Zoffix Znet)++ | META.list:
22:03 dalek ecosystem: Fix incorrect repo name
22:03 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6e9e9f1593
22:08 kid51 joined #perl6
22:12 grondilu joined #perl6
22:16 skids joined #perl6
22:17 * ZoffixLappy eyes https://github.com/ufobat/Bailador/blob/master/lib/Bailador/Route/StaticFile.pm
22:17 ZoffixLappy I wonder what's that for... Not used anywhere.
22:21 tomboy64 joined #perl6
22:21 ZoffixLappy wtf... we *still* can't serve binary files with Bailador?
22:23 perlawhirl joined #perl6
22:23 perlawhirl RabidGravy: the link to 'module list' is borked
22:26 * ZoffixLappy is baffled
22:30 ZoffixLappy Ugh.. good god: https://github.com/supernovus/perl6-psgi/pull/7/files
22:34 literal maybe a silly question...how do I flatten a Pair?
22:34 literal or an entire hash of them
22:34 ugexe lol
22:34 ugexe https://github.com/davepagurek/perl6-psgi/blob/29421eb2490aefbeb331e80e77049ccff53008af/lib/PSGI.pm6#L21-L24
22:35 ugexe then later does $output ~~ Buf
22:35 ZoffixLappy literal, flatten into what? The answer is likely |
22:35 ZoffixLappy (which is a slip)
22:35 literal ZoffixLappy: to go from {1 => 2, 3 => 4} to (1,2,3,4)
22:35 ugexe so no matter what $output gets assigned a string value, so will never ~~ Buf
22:35 perlawhirl .kv
22:36 perlawhirl m: say (this => 'that').kv
22:36 camelia rakudo-moar 1acf80: OUTPUT«(this that)␤»
22:36 literal ah, of course
22:36 ZoffixLappy m: my $p = {1 => 2, 3 => 4}; say ['a', |$p.kv]
22:36 camelia rakudo-moar 1acf80: OUTPUT«[a 1 2 3 4]␤»
22:38 ZoffixLappy ugexe, yeah, and it needs to be a Buf when serving binary files. I opened an Issue saying it needs to accept Buf but the "fix" changed it to Stringy :/
22:38 ugexe Stringy can take a buf. the problem is even if it *is* a buf at initialization of $output, its immediately turned into a string in the following conditional by assigning a string no matter what
22:39 ZoffixLappy hm
22:40 ugexe m: my Stringy $output = Buf.new(1,2,3,4); say $output.WHAT; $outout = "asdf"; say $output.WHAT
22:40 camelia rakudo-moar 1acf80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NHD3uiZGMS␤Variable '$outout' is not declared. Did you mean '$output'?␤at /tmp/NHD3uiZGMS:1␤------> 3t = Buf.new(1,2,3,4); say $output.WHAT; 7⏏5$outout = "asdf"; say $output.WHAT␤»
22:40 ugexe m: my Stringy $output = Buf.new(1,2,3,4); say $output.WHAT; $output = "asdf"; say $output.WHAT
22:40 camelia rakudo-moar 1acf80: OUTPUT«(Buf)␤(Str)␤»
22:40 tomboy64 joined #perl6
22:40 ZoffixLappy Hm. I'm getting "Type check failed in assignment to $output; expected Str but got Buf (Buf.new(72,84,84,80,4...)"
22:42 ZoffixLappy huh.. on this line: https://github.com/supernovus/perl6-psgi/blob/master/lib/PSGI.pm6#L47
22:42 * ZoffixLappy starts to suspect maybe the installed version isn't the latest for some reason
22:44 ZoffixLappy *sigh* Gonna nuke everything and try to use zef instead of panda
22:45 ugexe i dunno, from what i can tell that code should not work properly
22:47 ZoffixLappy BTW, ISTR someone asking if there was a difference between a sub and pointy block. There's this:
22:47 ZoffixLappy m: sub {return}()
22:47 camelia rakudo-moar 1acf80: ( no output )
22:47 ZoffixLappy m: -> {return}()
22:47 camelia rakudo-moar 1acf80: OUTPUT«Attempt to return outside of any Routine␤  in block <unit> at /tmp/oxwDvtWBYK line 1␤␤»
22:56 perlawhirl joined #perl6
22:58 Herby_ joined #perl6
22:58 Herby_ Afternoon, everyone!
22:58 Herby_ o/
22:59 ZoffixLappy \o
23:00 perlawhirl :q
23:00 perlawhirl lol
23:08 ZoffixLappy rakudobrew build zef doesn't work
23:09 ZoffixLappy Well.. it installs zef, but when I run it I get "===SORRY!=== Failed to open file /home/zoffix/.perl6/precomp/27E0B8A90A583776A17689697FE506415BB69CBE.1461970578.11573/F9/F94CA4E91B2AF324B8A925E1F065F40258AE4D90.deps: no such file or directory"
23:09 * ZoffixLappy is exhausted from all the issues experienced today
23:09 ugexe did you `rakudobrew rehash` first?
23:10 ugexe otherwise you probably have to delete .perl6/precomp for some reason
23:11 dolmen joined #perl6
23:12 ZoffixLappy ugexe++ that did the trick
23:14 grondilu m: use MONKEY-SEE-NO-EVAL; (EVAL '-> ($x, $y) {}')();
23:14 camelia rakudo-moar 1acf80: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block  at EVAL_0 line 1␤  in block <unit> at /tmp/fYTPaOL2tt line 1␤␤»
23:15 grondilu m: use MONKEY-SEE-NO-EVAL; (EVAL '-> ($x, $y) {}')(1, 2);
23:15 camelia rakudo-moar 1acf80: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤  in block  at EVAL_0 line 1␤  in block <unit> at /tmp/akFOn5UOKA line 1␤␤»
23:15 grondilu ^not sure why that does not work
23:15 grondilu m: use MONKEY-SEE-NO-EVAL; (EVAL 'sub ($x, $y) {}')(1, 2);
23:15 camelia rakudo-moar 1acf80: ( no output )
23:15 grondilu meh
23:16 wamba joined #perl6
23:18 ZoffixLappy m: my $x = -> ($x, $y) {}; $x(1, 2)
23:18 camelia rakudo-moar 1acf80: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤  in block <unit> at /tmp/1PwAuRxrkO line 1␤␤»
23:18 * ZoffixLappy shrugs
23:18 ZoffixLappy Ahhh
23:19 ZoffixLappy m: use MONKEY-SEE-NO-EVAL; (EVAL '-> $x, $y {}')(1, 2);
23:19 camelia rakudo-moar 1acf80: ( no output )
23:19 ZoffixLappy grondilu, blocks don't need parens. And if you include them, it means destructuring
23:19 ZoffixLappy m: use MONKEY-SEE-NO-EVAL; (EVAL '-> ($x, $y) {}')([1, 2]);
23:19 camelia rakudo-moar 1acf80: ( no output )
23:20 grondilu oh, good to know.
23:27 grondilu I managed to successfully generate code for my Clifford module :)
23:27 grondilu https://github.com/grondilu/clifford/blob/master/lib/MultiVector/BitEncoded/Optimized.pm6
23:27 ZoffixLappy \o/
23:27 grondilu now I'm anxious about testing it though.  Kind of scared of finding out it's all crap :P
23:30 geekosaur it's all crap, yyou will realize this in about 6 months. (approximately a universal truth :p )
23:30 ZoffixLappy :)
23:32 TimToady soulds about 90% true :)
23:32 TimToady *sounds
23:33 arnsholt Definitely. These last few days, I've had to look at code I haven't touched since December 2012 and early 2013, and I've had much the same reaction
23:33 zwu joined #perl6
23:35 grondilu unfortunatly it's something that is often said about perl.
23:35 grondilu but I do believe it's only a matter of writing sensible code, not about the language itself.
23:35 hotel joined #perl6
23:36 grondilu First drafts are always fugly.
23:36 TimToady well, it's true about everything, if you believe Sturgeon.
23:36 ZoffixLappy nonsense. I have a ~100,000 LOC app at work with zero documentation, but I manage it just fine
23:36 TimToady it's in assembly, right?
23:36 ZoffixLappy I hate the code. I wish I had the time to rewrite it. But it's not line noise
23:36 ZoffixLappy Nah, Perl 5
23:37 * geekosaur remembers maintaining about 20,000 LOC of m4 macros around a 4GL, and another 30,000 or so LOC written using those macros
23:39 * ZoffixLappy rages
23:39 ZoffixLappy Well, reinstalling everything fixed my issue with the Buf vs Str stuff, but now it seems content_type 'whatever' doesn't work in Baildator ~_~ my PNG is getting served as text/html :/
23:44 grondilu m: say class A::B::C {}.new.WHAT # a bit surprised about the shortening here
23:44 camelia rakudo-moar 1acf80: OUTPUT«(C)␤»
23:44 ZoffixLappy m: say class A::B::C {}.new.^name
23:44 camelia rakudo-moar 1acf80: OUTPUT«A::B::C␤»
23:47 grondilu oh ok
23:48 ZoffixLappy Aw, cmon... we have arrays, people :( https://github.com/ufobat/Bailador/blob/a7c5dcba7904add2715957294966de519da4d441/lib/Bailador/Response.pm#L22
23:49 ZoffixLappy Well, this app doesn't set Content-Type and calling content_type doesn't set content type :( https://gist.github.com/zoffixznet/cd074318407fafaf817c39465beee7c4
23:50 ZoffixLappy I'm really bummed I wasted about ~2 hours so far on crap errors and issue

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo