Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-06-26

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:36 raiph joined #perl6
00:42 gagalicious joined #perl6
00:53 laouji joined #perl6
01:00 aborazmeh joined #perl6
01:00 aborazmeh joined #perl6
01:02 Ben_Goldberg joined #perl6
01:05 Alina-malina joined #perl6
01:08 yeahnoob joined #perl6
01:16 laouji joined #perl6
01:22 telex joined #perl6
01:31 atroxaper joined #perl6
01:39 rickbike joined #perl6
01:52 skids .tell lizmat Re: the Block vs Routine/Any vs Mu issue: https://github.com/rakudo/rakudo/pull/447
01:52 yoleaux skids: I'll pass your message to lizmat.
02:09 noganex joined #perl6
02:10 dayangkun joined #perl6
02:20 mr-fooba_ joined #perl6
02:38 rmgk_ joined #perl6
03:08 Celelibi joined #perl6
03:11 vendethiel joined #perl6
03:16 aborazmeh joined #perl6
03:16 aborazmeh joined #perl6
03:35 laouji joined #perl6
03:49 zostay m: my Int @a = 1, 2, 3; @a.perl.say; @a>>.perl.say;
03:49 camelia rakudo-moar a47a3d: OUTPUT«Array[Int].new(1, 2, 3)␤1 2 3␤»
03:50 zostay m: my Int @a = 1, 2, 3; @a[1]:delete; @a.perl.say; @a>>.perl.say;
03:50 camelia rakudo-moar a47a3d: OUTPUT«Array[Int].new(1, Int, 3)␤1 Mu 3␤»
03:51 zostay that's confusing to me... the type of the box looks different when you look at the elements individually
03:57 atroxaper joined #perl6
04:26 raiph joined #perl6
04:38 laouji joined #perl6
04:47 laouji_ joined #perl6
04:50 laouji_ joined #perl6
04:52 atroxaper joined #perl6
04:59 skids m: my Int @a = 1, 2, 3; @a[1]:delete; @a[0,1,2]>>.perl.say;
04:59 camelia rakudo-moar a47a3d: OUTPUT«1 Int 3␤»
04:59 skids m: my Int @a = 1, 2, 3; @a[1]:delete; (@a,)>>.gist.say;
04:59 camelia rakudo-moar a47a3d: OUTPUT«1 (Any) 3␤»
04:59 skids m: my Int @a = 1, 2, 3; @a[1]:delete; (@a,)>>.perl.say;
04:59 camelia rakudo-moar a47a3d: OUTPUT«1 Any 3␤»
05:00 skids m: my Int @a = 1, 2, 3; @a[1]:delete; @a.list.perl.say;
05:00 camelia rakudo-moar a47a3d: OUTPUT«Array[Int].new(1, Int, 3)␤»
05:00 skids m: my Int @a = 1, 2, 3; @a[1]:delete; @a.list>>.perl.say;
05:00 camelia rakudo-moar a47a3d: OUTPUT«1 Mu 3␤»
05:10 aditya joined #perl6
05:15 aindilis joined #perl6
05:15 aditya rakudo: say 1..5
05:15 camelia rakudo-moar a47a3d: OUTPUT«1..5␤»
05:15 aditya rakudo: print 1..5
05:15 camelia rakudo-moar a47a3d: OUTPUT«12345»
05:16 aditya Why the difference between say and print?
05:16 aditya 1..5 is not evaluated when passed to say.
05:23 kapr joined #perl6
05:26 kapr left #perl6
05:27 aditya left #perl6
05:38 rurban joined #perl6
05:39 b2gills `say` calls `.gist` on the object while `print` just calls `.Str` (effectively)
05:42 baest_ joined #perl6
05:46 Psyche^_ joined #perl6
05:47 ugexe it looks like say(\x) gets called when maybe say(|) is expected
05:57 ribasushi joined #perl6
06:02 atroxaper joined #perl6
06:16 gfldex joined #perl6
06:18 diana_olhovik joined #perl6
06:28 _mg_ joined #perl6
06:32 domidumont joined #perl6
06:33 vendethiel joined #perl6
06:33 masak morning, #perl6!
06:35 domidumont joined #perl6
06:35 moritz good morning, masak, ugexe, b2gills, *
06:41 espadrine joined #perl6
06:48 kaare_ joined #perl6
06:50 masak moritz: does German have the thing where translating English tech terminology into their corresponding German words isn't done because it sounds so silly to use the non-English term?
06:50 masak (Swedish most certainly does)
06:50 xiaomiao masak: there's official german terms, but they are mostly wrong
06:50 moritz masak: yes (though there are always a few technophobes who still translate)
06:50 xiaomiao e.g. a stack becomes a cellar, and then it's like wtf ur doing
06:51 masak I just had the realization that "markör" would be the perfect translation of "[Git] tag". and "markera" would be the verb. but I don't see a future where I will use the Swedish words a lot.
06:51 xiaomiao a compiler is a translator :)
06:51 xiaomiao moritz: the proper translation is often not the officially accepted word, so german tech words are screwed up badly
06:51 RabidGravy joined #perl6
06:51 masak xiaomiao: you put your finger on one important aspect of eschewing the non-English terms: they lose their original precise meaning.
06:52 masak moritz: I'm not a technophobe (I think), but sometimes I do wonder if I shouldn't translate more.
06:52 moritz xiaomiao: though even public authorities use the word "E-Mail" by now, instead of "Elektronische Post"
06:52 masak moritz: if for no other reason that my brain runs smoother when it doesn't have to context-switch all the time, even for a single word.
06:52 moritz or "Elektronischer Brief"
06:53 xiaomiao masak: no, I'm saying, the german official word is plain *wrong*
06:53 xiaomiao a cellar is a heap, not a stack
06:53 masak *nod*
06:53 xiaomiao moritz: "De-Mail" giggle.
06:55 masak xiaomiao: putting aside the translations that are simply wrong... there's something weird to me about using a Swedish term where I've been using the English one for years. even if it's a good translation.
06:56 xiaomiao masak: it's more fun in french
06:56 masak for example, I've yet to find a Swedish word for "[source code] repository", even though there are lots of Swedish words meaning "a place to store things".
06:57 FROGGS joined #perl6
06:58 moritz xiaomiao: "Repo" is a German word, right?
06:58 moritz :-)
06:58 xiaomiao now it is
06:59 vendethiel joined #perl6
07:00 spider-mario joined #perl6
07:01 RabidGravy marnin
07:13 atroxaper morning, #perl6 !
07:17 masak yeah, I tend to say "repo" in Swedish too.
07:18 masak atroxaper, RabidGravy: morning!
07:18 atroxaper masak: o/
07:18 atroxaper RabidGravy: o/
07:19 nine xiaomiao: oh yes, that confused me a lot when I started studying after having 15 years of experience in software development. They used those strange, non-fitting terms for everything.
07:19 xiaomiao nine: well ... I had the luxury of having half the lectures in bad english
07:19 xiaomiao which is even more fun
07:20 nine Good thing it's over :)
07:21 xiaomiao yeah, chinglish is even more fun
07:22 JimmyZ as, long time no see?
07:22 Ven joined #perl6
07:23 xiaomiao JimmyZ: hmm, let me try to remember the phrase
07:23 xiaomiao "the zero-cash refund policy rubs the tapioca"
07:23 * JimmyZ cant understand it ...
07:23 RabidGravy "my postillion got struck by lightning"
07:25 xiaomiao JimmyZ: I'm also not quite sure, but ... China
07:25 xiaomiao just nod and smile ;)
07:27 masak xiaomiao: I think you would appreciate http://languagelog.ldc.upenn.edu/nll/?p=17487
07:32 xiaomiao hah. not bad ...
07:35 darutoko joined #perl6
07:36 [Sno] joined #perl6
07:38 mj41 joined #perl6
07:40 mj41 .tell JimmyZ https://github.com/perl6/docker/pull/2
07:40 yoleaux 25 Jun 2015 16:32Z <tony-o> mj41: i might use that instead of protone :-)
07:40 yoleaux mj41: I'll pass your message to JimmyZ.
07:41 mj41 .tell hoelzro hi, please review/merge https://github.com/perl6/docker/pull/2 , thx
07:41 yoleaux mj41: I'll pass your message to hoelzro.
07:42 JimmyZ mj41: I think you want to push to https://github.com/perl6/perl6-docker?
07:42 yoleaux 07:40Z <mj41> JimmyZ: https://github.com/perl6/docker/pull/2
07:45 mj41 JimmyZ: thx, I forked the wrong repo
07:45 atroxaper joined #perl6
07:46 RabidGravy forking hell
07:47 TEttinger joined #perl6
07:49 atroxaper Question: how can i prevent flattering like this:
07:49 atroxaper rakudo: my @ar; push @ar, %(a => 'aa', b => 'bb'); push @ar, %(A => 'AA', b => 'BB'); say @ar.perl;
07:49 camelia rakudo-moar a47a3d: OUTPUT«[:a("aa"), :b("bb"), :A("AA"), :b("BB")]<>␤»
07:49 moritz atroxaper: use { } instead of %( )
07:50 atroxaper moritz: hm... Works in irc. Going to try in code :)
07:50 mj41 JimmyZ: the right one https://github.com/perl6/perl6-docker/pull/1
07:50 mj41 .tell hoelzro err, the right one is here https://github.com/perl6/perl6-docker/pull/1
07:50 yoleaux mj41: I'll pass your message to hoelzro.
07:51 atroxaper moritz: thanks!
07:52 atroxaper moritz: one more question. I cant make array of hashes from array like this @lines.map: { {key1 => ~$_.value1, key2 => ~$_.value2}  },
07:53 atroxaper moritz: what i do wrong?
07:53 dayangkun joined #perl6
07:56 moritz atroxaper: please specify "I cant" in more detail
07:56 danaj joined #perl6
07:57 moritz m: say (:a, :b).map: { { key1 => ~$_.key, key2 => ~$_.value }}).perl
07:57 camelia rakudo-moar a47a3d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ptj1UzwV54␤Unexpected closing bracket␤at /tmp/Ptj1UzwV54:1␤------> 3 { key1 => ~$_.key, key2 => ~$_.value }}7⏏5).perl␤»
07:58 moritz m: say ((:a, :b).map: { { key1 => ~$_.key, key2 => ~$_.value } }).perl
07:58 camelia rakudo-moar a47a3d: OUTPUT«((:key1("a"), :key2("True")), (:key1("b"), :key2("True")))␤»
07:58 [Tux] Even slower today :(
07:58 [Tux] test             50000    44.392    44.304
07:58 [Tux] test-t           50000    43.672    43.583
08:00 moritz mj41, hoelzro: why do we have perl6/docker and perl6/perl6-docker/? should I delete one of them? if yes, which?
08:01 espadrine joined #perl6
08:04 mj41 moritz: IMHO we should delete perl6/perl6-docker or deprecate it ( see my pull request https://github.com/perl6/perl6-docker/pull/1 ). https://registry.hub.docker.com/_/rakudo-star/ has link to perl6/docker so this one should stay.
08:09 laouji joined #perl6
08:10 espadrine_ joined #perl6
08:11 masak hehe... "prevent flattering"
08:11 masak bonus points to whoever manages to get a slide title into their talk with "Flattening will get you nowhere" :P
08:21 laouji joined #perl6
08:24 rickbike joined #perl6
08:30 masak [Tux]: thanks for keeping track of the relative speed of things. I'd say it's a worrying trend that it keeps getting slower... but I also know that every now and then there's an optimization of something somewhere that more than offsets all those slowdowns.
08:31 masak [Tux]: I guess in some sense it's inevitable that there will be small slowdowns when people (for example) add more code to the setting. still, it's good to have a canary point them out at regular intervals. :)
08:34 dalek rakudo/nom: 7f96347 | root++ | src/core/ (2 files):
08:34 dalek rakudo/nom: Add an ":elide-type" adverbial parameter to Parameter.perl
08:34 dalek rakudo/nom: Use this parameter in Signature to omit the correct type,
08:34 dalek rakudo/nom: depending on the attached code, as blocks and literals have
08:34 dalek rakudo/nom: a default signature type of Mu while routines use Any.
08:34 dalek rakudo/nom:
08:34 dalek rakudo/nom: Note this affects the output of Signature.perl and Signature.gist,
08:34 dalek rakudo/nom: but not for aggregate container sigils (@, %, or &).
08:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7f96347642
08:34 dalek rakudo/nom: 3d645fe | lizmat++ | src/core/ (2 files):
08:34 dalek rakudo/nom: Merge pull request #447 from skids/elide_param_types
08:34 dalek rakudo/nom:
08:34 dalek rakudo/nom: Add an ":elide-type" adverbial parameter to Parameter.perl
08:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3d645fe4ba
08:34 atroxaper moritz: I got list of lists instead of list of hashes.
08:35 zakharyas joined #perl6
08:42 telex joined #perl6
08:42 cognominal joined #perl6
08:42 masak oh, skids === root ?
08:43 masak anyway, skids++ lizmat++
08:43 lizmat masak: I wouldn't now, /me just clicks the buttons  :-)
08:43 yoleaux 01:52Z <skids> lizmat: Re: the Block vs Routine/Any vs Mu issue: https://github.com/rakudo/rakudo/pull/447
08:44 lizmat *nkw
08:44 lizmat *know
08:44 lizmat grrrr   lack of awakeness
08:45 * Grrrr notes he's in fact awake
08:48 lizmat m: my Int @a = 1, 2, 3; @a[1]:delete; @a.list>>.perl.say;  # I'm not sure how we can fix this
08:48 camelia rakudo-moar a47a3d: OUTPUT«1 Mu 3␤»
08:48 lizmat when .perl is called on the deleted element, it is outside of the context of the array
08:49 lizmat it is effectively an nqp::isnull(), which becomes Mu in P6 speak
08:50 lizmat m: my Int @a = 1, 2, 3; @a[1]:delete; (@a,)>>.perl.say  # similarly, here the Parcel creation has taken the nqp::isnull() and created a default container for it
08:50 camelia rakudo-moar 3d645f: OUTPUT«1 Any 3␤»
08:51 lizmat aka an Any, since the Parcel doesn't know about typing its containers
08:51 lizmat sorry Grrrr   :-)
08:51 lizmat will grrrrrrrrr from now on
08:52 amurf joined #perl6
08:52 lizmat perhaps :delete on arrays should have different semantics after all?   and be a shortcut to do a splice ?
08:53 lizmat (potentially multiple splices)
08:53 Grrrr lizmat: it's alright, grrrr away  :)
08:53 lizmat m: my @a = ^10; @a[1,3,5,7]:delete; say @a.perl
08:53 camelia rakudo-moar 3d645f: OUTPUT«[0, Any, 2, Any, 4, Any, 6, Any, 8, 9]<>␤»
08:54 lizmat would then have become [0,2,4,6,8,0]<>
08:55 lizmat perhaps we should have a :null adverb on arrays (and potentially hashes) ?
08:57 lizmat m: use nqp; my %h; %h<a> := nqp::null()  #hmmmm
08:57 camelia rakudo-moar 3d645f: OUTPUT«Unexpected named parameter 'BIND' passed␤  in block <unit> at /tmp/GYnIiEF0VO:1␤␤»
08:58 RabidGravy is there any important difference between  die Exception.new and Exception.new.throw ?
08:59 Ven joined #perl6
08:59 lizmat multi sub die(Exception $e) { $e.throw }   # .throw is more direct
09:00 lizmat that would be the only difference afaics
09:01 RabidGravy okay, that's what I would do.  I was curious as most of the rakudo code does the "die Exception" variant.
09:03 lizmat I guess from a code optimization point of view, the die() would be optimized to the correct candidate at compile time
09:04 lizmat at the expense of having to do something extra when it triggers, but then we don't care much about performance anyway anymore
09:04 lizmat jnthn: ^^^ does that make sense?
09:05 lizmat hmmm... thinking about it more, it doesn't, as the object is not created until it triggers, so the MMD doesn't happen until then either, I would think
09:09 husanu1 joined #perl6
09:23 husanu1 joined #perl6
09:23 vendethiel joined #perl6
09:24 virtualsue joined #perl6
09:28 lizmat re the %h<a> := nqp::null(), me haz wrought a ticket: #125487
09:38 rurban joined #perl6
09:39 dalek rakudo/nom: a15dacb | lizmat++ | src/core/ (2 files):
09:39 dalek rakudo/nom: Use die() only for ad-hoc in the settings
09:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a15dacbc9d
09:39 lizmat afk&
09:40 bin_005 joined #perl6
09:46 rindolf joined #perl6
09:49 virtualsue joined #perl6
09:50 vendethiel joined #perl6
09:56 rurban joined #perl6
10:03 leont joined #perl6
10:12 bin_005_o joined #perl6
10:13 coffee` joined #perl6
10:15 atroxaper It's so cool to use Perl6 in commercial product! I have to write generator of Java and C++ libraries of OpenFlow standard. Perl6 grammar, actions, Template::Mustache and all done!
10:17 * grondilu is confused by Template::Mustache
10:18 moritz atroxaper: please blog about it!
10:20 gcole joined #perl6
10:22 atroxaper moritz: hm... Good idea. I'll do so in a week.
10:22 vendethiel joined #perl6
10:23 atroxaper grondilu: what do you mean?
10:24 jaffa4 joined #perl6
10:24 jaffa4 hi all
10:24 atroxaper jaffa4: o/
10:25 jaffa4 how can i make a sub visible defined in a block to the outside world?
10:25 abraxxa joined #perl6
10:26 Ven joined #perl6
10:26 grondilu atroxaper: I just have no idea what this is or if it's a joke or something.  I have to look it up I guess.
10:28 atroxaper grondilu: It's logic-less templates sustem http://mustache.github.io
10:28 grondilu ok, meanwhile I was reading https://en.wikipedia.org/wiki/Mustache_(template_system)
10:29 moritz jaffa4: one option is  my &outer_name = do { block here; sub { anon sub as last statement } }
10:30 moritz jaffa4: another is to write a proper module instead of a block, and import the sub
10:31 * lizmat notes that the behaviour of :delete on arrays is actually not specced
10:31 jaffa4 Is there a continue for for in Perl6?
10:31 jaffa4 I mean for () continue {}
10:31 atroxaper jaffa4: next;
10:31 jaffa4 continue is outside the for
10:31 moritz jaffa4: iirc there's a phaser for that (inside the for block), NEXT or so
10:32 rurban joined #perl6
10:32 moritz or you can also use LEAVE
10:32 lizmat LEAVE would also run with last;
10:32 moritz m: for 1..2 { LEAVE say "Done."; next when 1; last }
10:32 camelia rakudo-moar a15dac: OUTPUT«Done.␤Done.␤»
10:32 moritz m: for 1..2 { NEXT say "Done."; next when 1; last }
10:32 camelia rakudo-moar a15dac: OUTPUT«Done.␤»
10:32 moritz m: for 1..2 { NEXT say "Done $_."; next when 1; last }
10:32 camelia rakudo-moar a15dac: OUTPUT«Cannot call method 'Stringy' on a null object␤  in block <unit> at /tmp/EPLNGnMxGN:1␤␤»
10:33 jaffa4 I mean If I am correct, continue block is executed if for is not taken?
10:33 jaffa4 in Perl5
10:33 moritz jaffa4: no
10:33 moritz that would be 'else' in python; perl 5 doesn't have it
10:33 jaffa4 What is continue then?
10:35 lizmat m: for ^2 { NEXT .say }  # feels like a rakudobug
10:35 camelia rakudo-moar a15dac: OUTPUT«Cannot call method 'say' on a null object␤  in block <unit> at /tmp/gV2l9tWyYZ:1␤␤»
10:35 lizmat m: for ^2 { NEXT $_.say }  # same
10:35 camelia rakudo-moar a15dac: OUTPUT«Cannot call method 'say' on a null object␤  in block <unit> at /tmp/2JExRjB36d:1␤␤»
10:35 lizmat m: for ^2 { .say }  # ok
10:35 camelia rakudo-moar a15dac: OUTPUT«0␤1␤»
10:35 lizmat moritz: agree ?
10:36 Ven joined #perl6
10:37 moritz jaffa4: perldoc -f continue
10:37 moritz lizmat: yes
10:39 jaffa4 so it is next
10:39 aborazmeh joined #perl6
10:39 aborazmeh joined #perl6
10:42 amurf joined #perl6
10:44 jaffa4 FIRST and LAST is useful
10:45 ShimmerFairy joined #perl6
10:49 rindolf joined #perl6
10:56 espadrine joined #perl6
10:59 lizmat moritz: #125488
11:00 lizmat hmmm... did we lose the synopsebot?
11:01 tadzik PerlJam is restaring synbot6 whenever it's gone, from what I noticed :)
11:01 tadzik lunch&
11:03 ShimmerFairy joined #perl6
11:06 lizmat std: unit native foo;
11:06 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routines:␤    'foo' used at line 1␤   'native' used at line 1␤        'unit' used at line 1␤Check failed␤FAILED 00:00 135m␤»
11:06 lizmat std: native foo;
11:06 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routines:␤    'foo' used at line 1␤   'native' used at line 1␤Check failed␤FAILED 00:00 135m␤»
11:06 lizmat m: unit native foo;  # WAT ?
11:06 camelia rakudo-moar a15dac: ( no output )
11:08 lizmat jnthn seems to have added this with fc60b905 in 2011
11:09 lizmat m: unit slang foo;
11:09 camelia rakudo-moar a15dac: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cuMhmPGskF␤Cannot resolve meta-object for slang␤at /tmp/cuMhmPGskF:1␤------> 3unit slang foo7⏏5;␤    expecting any of:␤        generic role␤»
11:09 lizmat m: unit trusts foo;
11:09 camelia rakudo-moar a15dac: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dU6N3xTTUX␤Type 'foo' is not declared␤at /tmp/dU6N3xTTUX:1␤------> 3unit trusts foo7⏏5;␤»
11:09 lizmat m: unit also foo
11:09 camelia rakudo-moar a15dac: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bguHu4IDJ2␤No valid trait found after also␤at /tmp/bguHu4IDJ2:1␤------> 3unit also7⏏5 foo␤»
11:09 lizmat m: unit foo
11:09 camelia rakudo-moar a15dac: OUTPUT«5===SORRY!5===␤Type 'foo' is not declared␤at /tmp/HpUlKif_SK:1␤------> 3unit foo7⏏5<EOL>␤Malformed unit␤at /tmp/HpUlKif_SK:1␤------> 3unit7⏏5 foo␤␤»
11:10 lizmat hmmm....
11:10 lizmat they all seem to be package_declarator
11:12 jaffa4 What can I use instead of stat in PERL6?
11:13 gagalicious joined #perl6
11:13 moritz jaffa4: the appropriate methods on IO::Path objects
11:13 lizmat m: say `ls`
11:13 camelia rakudo-moar a15dac: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/2R1JuIDh7p:1␤------> 3say7⏏5 `ls`␤Bogus postfix␤at /tmp/2R1JuIDh7p:1␤------> 3say 7⏏5`ls`␤    expecting any of:␤        infix␤        infix stopper␤        p…»
11:13 lizmat m: say dir(".")
11:13 camelia rakudo-moar a15dac: OUTPUT«"/home/camelia/star".IO "/home/camelia/.cpanm".IO "/home/camelia/.local".IO "/home/camelia/.npm".IO "/home/camelia/.perl6".IO "/home/camelia/.perlbrew".IO "/home/camelia/.rcc".IO "/home/camelia/.ssh".IO "/home/camelia/Perlito".IO "/home/camelia/bin".IO "/h…»
11:14 moritz http://doc.perl6.org/type/IO::FileTestable
11:14 lizmat m: given "star".IO { say "exists" if .e }
11:14 camelia rakudo-moar a15dac: OUTPUT«exists␤»
11:14 lizmat m: given "star".IO { say "file" if .f }
11:14 camelia rakudo-moar a15dac: ( no output )
11:14 lizmat m: given "star".IO { say "dir" if .d }
11:14 camelia rakudo-moar a15dac: OUTPUT«dir␤»
11:14 jaffa4 Is it a built-in?
11:15 lizmat is what a built-in ?
11:15 moritz yes
11:16 lizmat ah, IO::FileTestable, yes
11:16 moritz why doesn't IO::Path do IO::FileTestable?
11:16 moritz oh, because it's gone
11:17 lizmat yeah, part of my newio work that made it back into nom
11:19 moritz https://github.com/perl6/doc/issues/97 opened
11:19 jaffa4 I cannot see any method that can get mode of the file
11:19 lizmat m: given "star".IO { say "readable" if .r }
11:19 camelia rakudo-moar a15dac: OUTPUT«readable␤»
11:20 lizmat m: given "star".IO { say .rwx }
11:20 camelia rakudo-moar a15dac: OUTPUT«True␤»
11:20 lizmat m: given "star".IO { say .rx }
11:20 camelia rakudo-moar a15dac: OUTPUT«Method 'rx' not found for invocant of class 'IO::Path'␤  in block <unit> at /tmp/UYAHtVmQBj:1␤␤»
11:20 lizmat m: given "star".IO { say .rwx }
11:20 camelia rakudo-moar a15dac: OUTPUT«True␤»
11:20 nine m: given ".cpanm".IO { say .rwx }
11:20 camelia rakudo-moar a15dac: OUTPUT«True␤»
11:21 nine m: given ".cpanm".IO { say .file }
11:21 camelia rakudo-moar a15dac: OUTPUT«Method 'file' not found for invocant of class 'IO::Path'␤  in block <unit> at /tmp/ZjGnC0nDof:1␤␤»
11:21 nine m: given ".cpanm".IO { say .f }
11:21 camelia rakudo-moar a15dac: OUTPUT«False␤»
11:21 nine m: say dir('.').grep: *.f
11:21 camelia rakudo-moar a15dac: OUTPUT«"/home/camelia/.bash_history".IO "/home/camelia/.bashrc".IO "/home/camelia/.viminfo".IO "/home/camelia/mbox".IO "/home/camelia/test".IO "/home/camelia/.lesshst".IO "/home/camelia/evalbot.log".IO "/home/camelia/tail".IO "/home/camelia/p6eval-token".IO␤»
11:21 nine m: given ".bash_history".IO { say .f }
11:21 camelia rakudo-moar a15dac: OUTPUT«True␤»
11:21 nine m: given ".bash_history".IO { say .rwx }
11:21 camelia rakudo-moar a15dac: OUTPUT«False␤»
11:22 nine m: given ".bash_history".IO { say .mode }
11:22 camelia rakudo-moar a15dac: OUTPUT«Method 'mode' not found for invocant of class 'IO::Path'␤  in block <unit> at /tmp/9E46JFi8U1:1␤␤»
11:26 jaffa4 so how can I get the mode of a file, anyone else?
11:28 timotimo seems like an oversight that we don't have a method that gives the numeric mode of a file
11:31 lizmat if we're talking about a single rwx, that can be done now
11:31 lizmat however, we don't actually have the nqp::tools to get the rest of the mode atm, afaik
11:32 timotimo just a single of the rwx? why not all three?
11:36 Ven joined #perl6
11:38 lizmat because we can only find out for the current user, afaik
11:38 lizmat not for group or world
11:39 timotimo ah
11:39 timotimo and then there's special things like sticky bits and such
11:39 timotimo and at some point we want to support extended attributes, too
11:39 timotimo but perhaps not in core? i don't know
11:42 lizmat well, that's all unix/posix centric
11:42 lizmat on win it works differently, no?
11:42 timotimo i think windows has some "extended attributes" equivalent
11:48 lizmat m: (sub { $^a }).signature.perl.say   # is this correct or not?
11:48 camelia rakudo-moar a15dac: OUTPUT«:(;; $a)␤»
11:48 lizmat in other words, do curried parameters matter in MMD or not?  I would guess they do?
11:51 dalek rakudo/nom: 1a743f9 | lizmat++ | src/Perl6/Actions.nqp:
11:51 dalek rakudo/nom: Make auto-generated sigs correct, fixes #125486
11:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a743f9d75
11:54 dalek roast: d07b99e | lizmat++ | S06-signature/unspecified.t:
11:54 dalek roast: Unfudge now passing tests again
11:54 dalek roast: review: https://github.com/perl6/roast/commit/d07b99ea80
11:55 MueThoS joined #perl6
12:00 dalek roast: 8a6d829 | lizmat++ | S02-names-vars/signature.t:
12:00 dalek roast: Remove Siglist fossil
12:00 dalek roast: review: https://github.com/perl6/roast/commit/8a6d829a09
12:04 MueThoS joined #perl6
12:06 jaffa4 I can do this $input_file_permissions |= 0o0100 if ($input_file.IO.x);
12:14 rarara joined #perl6
12:19 aborazmeh joined #perl6
12:19 aborazmeh joined #perl6
12:19 dalek rakudo/nom: f901553 | lizmat++ | src/core/Signature.pm:
12:19 dalek rakudo/nom: Introduce Signature eqv Signature
12:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f9015530a9
12:21 dalek roast: 3a39349 | lizmat++ | S02-names-vars/signature.t:
12:21 dalek roast: Some more siglist fossil removal
12:21 dalek roast: review: https://github.com/perl6/roast/commit/3a393496dc
12:21 dalek roast: 0f1545a | lizmat++ | S02-names-vars/signature.t:
12:21 dalek roast: Unfudge now passing Signature eqv Signature tests
12:21 dalek roast: review: https://github.com/perl6/roast/commit/0f1545a48b
12:22 Ven joined #perl6
12:34 notch joined #perl6
12:35 notch hi all! sorry to bother you with this, but anyway - are there going to be a fully functional Rakudo 1.0 release this year?
12:35 dalek roast: 72b85c3 | lizmat++ | S02-names-vars/signature.t:
12:35 dalek roast: Add request for sanity check
12:35 dalek roast: review: https://github.com/perl6/roast/commit/72b85c3972
12:36 lizmat notch: yes
12:37 lizmat barring unforeseen circumstances involving buses and the like
12:38 notch <lizmat> thanks a lot. 99% probability of success? or less?
12:38 lizmat I would say 99%, yes
12:38 virtualsue left #perl6
12:40 jnthn afternoon, #perl6
12:40 notch lizmat: thanks again. just wanted to ask those who know - there is not much one can find in blogs.
12:41 jnthn lizmat: Heh, I've never seen anyone write "unit native foo" :P
12:41 jnthn Well, or the old semi-colon form
12:41 jnthn It's the declarator for using the NativeHOW meta-object
12:41 jnthn I'd guess NativeCall may use it to declare C-sized native types too
12:44 lizmat jnthn: not seeing it used in NativeCall.pm  ...
12:45 lizmat I was assuming it was some kind of fossil that could be removed
12:45 lizmat if it can't, then I won't remove it  :-)
12:45 jnthn Oh, I do
12:46 synbot6 joined #perl6
12:46 jnthn lizmat: Both CORE.setting *and* NativeCall use it
12:47 jnthn It's very much not fossil :)
12:47 aborazmeh joined #perl6
12:47 aborazmeh joined #perl6
12:49 MueThoS joined #perl6
12:54 Ven joined #perl6
12:55 lizmat argh, yes, I see it now  :-)
12:55 jnthn grepping for "native" in NativeCall is kinda gonna be easy to miss :)
12:55 lizmat m: unit knowhow foo;
12:55 camelia rakudo-moar f90155: ( no output )
12:55 lizmat m: unit slang foo;
12:55 camelia rakudo-moar f90155: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1cjItHTtLW␤Cannot resolve meta-object for slang␤at /tmp/1cjItHTtLW:1␤------> 3unit slang foo7⏏5;␤    expecting any of:␤        generic role␤»
12:56 jnthn std: unit knowhow foo;
12:56 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routine:␤     'unit' used at line 1␤Check failed␤FAILED 00:00 135m␤»
12:56 jnthn hm
12:56 lizmat unit is not in std (yet)
12:56 jnthn ah, right
12:56 jnthn and yeah, it knew the knowhow declarator
13:00 atroxaper joined #perl6
13:03 vendethiel joined #perl6
13:06 RabidGravy joined #perl6
13:10 cognominal joined #perl6
13:11 dalek rakudo-star-daily: 305cdf9 | coke++ | log/ (2 files):
13:11 dalek rakudo-star-daily: today (automated commit)
13:11 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/305cdf91c6
13:13 dalek perl6-roast-data: d8c9134 | coke++ | / (9 files):
13:13 dalek perl6-roast-data: today (automated commit)
13:13 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/d8c9134115
13:15 Ven joined #perl6
13:16 telex joined #perl6
13:18 Ven joined #perl6
13:19 skids joined #perl6
13:23 lizmat afk for some hot fresh air&
13:23 rarara joined #perl6
13:25 hoelzro o/ #perl6
13:25 yoleaux 07:41Z <mj41> hoelzro: hi, please review/merge https://github.com/perl6/docker/pull/2 , thx
13:25 yoleaux 07:51Z <mj41> hoelzro: err, the right one is here https://github.com/perl6/perl6-docker/pull/1
13:26 hoelzro mj41, moritz: I don't remember why exactly, but perl6/docker is the correct one
13:26 hoelzro so that PR to perl6-docker should go through
13:29 moritz then why not deleate perl6-docker?
13:30 JimmyZ_ joined #perl6
13:30 jaffa4 How can I read a number of bytes in Perl6 now?
13:31 moritz yes.
13:31 jaffa4 I mean where is the read function?
13:31 moritz in IO::Handle, iirc
13:31 moritz m: say $*IN.read(5)
13:31 camelia rakudo-moar f90155: OUTPUT«Buf[uint8]:0x<43 c3 a9 61 64>␤»
13:31 moritz s/function/method/
13:31 moritz jaffa4: http://doc.perl6.org/routine/read
13:32 moritz jaffa4: may I generally warmly suggest http://doc.perl6.org/?
13:32 hoelzro moritz: I don't have a problem with that; no one should be referring to it
13:32 hoelzro isn't there a way to set up a redirect when deleting a project?
13:33 woshty left #perl6
13:33 * moritz doesn't see one
13:34 moritz gone.
13:34 moritz I've done a git clone --mirror of the repo prior to deleting; it's on hack.p6c.org in ~moritz/backup/perl6-docker.git
13:36 jaffa4 moritz: seek is not documented
13:37 hoelzro moritz: cool, thanks!  I think that perl6/docker has all of its contents anyway
13:39 dalek doc: 18d2661 | (Steve Mynott)++ | / (3 files):
13:39 dalek doc: Change $*PROGRAM_NAME to $*PROGRAM-NAME
13:39 dalek doc: review: https://github.com/perl6/doc/commit/18d266118a
13:42 dalek doc: 53c6385 | (Steve Mynott)++ | / (2 files):
13:42 dalek doc: Change $*EXECUTABLE_NAME to $*EXECUTABLE-NAME
13:42 dalek doc: review: https://github.com/perl6/doc/commit/53c638573e
13:47 hoelzro does anyone have thoughts on adding a new :createonly option to open()?  I think it would be useful and consistent with copy/rename, but maybe it belongs in at a lower-level like something similar to sysopen
13:50 jaffa4 WHat is :w?
13:51 raiph joined #perl6
13:56 PerlJam hoelzro: you've asked that for at least 2 days now  :)    What does :createonly (or :create-only) mean in conjunction with the other open flags?
13:57 hoelzro PerlJam: I have, I just haven't gotten a response and thought I'd try one last time. =) :createonly would be equivalent to O_EXCL in open()
13:57 khw joined #perl6
13:57 hoelzro it only makes sense with :w, and it's a guarantee from the OS that my process is the one that created the file, no other
13:57 dalek perl6-examples: 4112cad | (Steve Mynott)++ | categories/ (25 files):
13:57 dalek perl6-examples: Change $*PROGRAM_NAME to $*PROGRAM-NAME
13:57 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/4112cad63b
14:02 PerlJam hoelzro: I dunno.  I'm not opposed to the feature in open(), but the name just doesn't seem quite right.
14:02 cygx joined #perl6
14:03 cygx see also https://github.com/rakudo/rakudo/pull/430
14:03 yoleaux 13 Jun 2015 13:38Z <FROGGS> cygx: I was able to compile the setting without disabling spesh.... can you tell what windows/perl/gcc versions you have?
14:03 yoleaux 13 Jun 2015 15:22Z <FROGGS> cygx: now it works in the windows sdk shell too
14:04 PerlJam hoelzro: I mean, O_EXCL is named that because the exclusivity is the important bit.  It's O_CREAT that does the file creation part.   Maybe call it :create-exclusive or something.
14:05 PerlJam hoelzro: and that is the extent of my thoughts on the subject.  You'll have to mine other people's brains for more insight.  :)
14:07 PerlJam hoelzro: oh ... if it's called :create-anything, you shouldn't have to also pass :w, it should do that for you.
14:07 PerlJam (IMHO)
14:07 hoelzro PerlJam: all of that makes sense to me!  I only picked :createonly because of consistency with rename/copy
14:08 ugexe i could have swore skids had a PR with a bunch of file related options, including create-only related items but i cant find it now
14:08 cygx that was me, and I mentioned it 5 minutes ago ;)
14:10 ugexe guess that explains why my grep for skids failed me heh
14:12 PerlJam cygx++ yeah, that looks nice
14:12 jnthn I think we merged the MoarVM part of the cygx++ patch
14:13 jnthn ferry &
14:14 vendethiel joined #perl6
14:15 gagalicious joined #perl6
14:16 gagalicious joined #perl6
14:17 gagalicious joined #perl6
14:19 gagalicious joined #perl6
14:20 amurf joined #perl6
14:20 cygx I need to leave as well, but feel free to leave a comment on the PR if you feel there's something off about it
14:20 cygx left #perl6
14:24 Ven hoelzro: thanks for that video :)
14:31 hoelzro happy to be of service =)
14:31 hoelzro commute &
14:34 timotimo .o( happy to beef service )
14:35 bjz joined #perl6
14:41 rurban joined #perl6
14:42 molaf joined #perl6
14:43 Ven joined #perl6
14:50 atroxaper joined #perl6
15:03 molecules joined #perl6
15:03 molecules rakudo: "A;B;C".comb(/\w/);
15:03 camelia rakudo-moar f90155: ( no output )
15:04 Guest48350 p6: "A;B;C".comb(/\w/);
15:04 camelia rakudo-moar f90155: ( no output )
15:05 Guest48350 p6: "A;B;C".comb(/\w/).perl.say;
15:05 camelia rakudo-moar f90155: OUTPUT«("A", "B", "C")␤»
15:08 dalek roast: a6f4e66 | (Steve Mynott)++ | S (4 files):
15:08 dalek roast: fix various deprecations as spotted by RAKUDO_DEPRECATIONS_FATAL=1
15:08 dalek roast: review: https://github.com/perl6/roast/commit/a6f4e6681e
15:14 Ven_ joined #perl6
15:21 aborazmeh joined #perl6
15:21 aborazmeh joined #perl6
15:27 ugexe is there a way to get constants in the MAIN signature to work as the first argument when it has named arguments after?
15:27 ugexe multi MAIN('test', Bool :$flag) # cannot be invoked via 'filename.pl6 test --flag', have to use 'filename.pl6 --flag test'
15:33 diana_olhovik_ joined #perl6
15:36 jaffa4 joined #perl6
15:38 japhb ugexe: That one drives me *nuts*.  Hate, hate, hate.  However, when I was implementing it, and begged for a more modern default behavior, I was told the spec was unlikely to change on this point.  Perhaps time has softened that stance.
15:39 japhb ugexe: Some more work needs to be done to make the parser and usage-generator fully pluggable, so an imported module can just "fix that".
15:41 PerlJam (fixing that)++
15:41 ugexe is there a reason its like that, or did it just end up that way as a side effect? seems odd to require optional paramaters after required in the signature but the opposite for MAIN_HELPERs
15:46 gfldex joined #perl6
15:47 japhb ugexe: It was to have a strict "options to the left of non-options" ordering
15:47 japhb The first non-option prevents any later thing from being treated as an option.
15:47 japhb MNSHO is that we already have '--' for that.
15:49 colomon is there any reason this cannot be fixed in your code by just rearranging @*ARGS?
15:50 hoelzro japhb, ugexe: same here
15:50 hoelzro that's part of why I started working on Subcommander
15:50 japhb colomon: It's a non-trivial rearrangement, and why should every program do that in order to get the obvious behavior that everyone tries as soon as they find out about 'multi MAIN(<constant>, ...)'?
15:52 colomon I’m not exactly against change MAIN’s behavior (though I suspect it’s there for a reason, not just because someone writing the spec wanted to be a dick), but it seems like this is fixable with one-line of code…
15:52 colomon I mean, work-aroound-able with one line of code.
15:52 japhb I don't think it's dickishness ... I just think it's wrong.  :-)
15:53 ugexe even something like multi MAIN(<constant>; ...) (; is taken for this purpose but just used as an example)
15:53 japhb colomon: You'll not that I did not implement '--foo bar' but only '--foo=bar' ... in order to make the rearrangement less painful.  I don't like that.
15:54 japhb *note
15:56 hoelzro PerlJam: regarding our earlier discussion, how about :exclusive?
15:57 hoelzro oh, that's in cygx++'s PR =P
15:57 PerlJam yeah ... we should probably just merge cyg++'s PR
15:58 dalek doc: 973355a | paultcochrane++ | lib/Type/Proc/Status.pod:
15:58 dalek doc: Replace Proc::Status::exit with exitcode
15:58 dalek doc:
15:58 dalek doc: The `exit` method has been deprectated since 2015.03 and will be removed in
15:58 dalek doc: favour of `exitcode` in 2015.09.
15:58 dalek doc: review: https://github.com/perl6/doc/commit/973355af52
15:58 [Sno] joined #perl6
16:09 hoelzro cygx++
16:09 hoelzro that's exactly what I was hoping for!
16:11 jaffa4 iDoes caller work in Perl6?
16:11 vendethiel joined #perl6
16:11 PerlJam jaffa4: callframe
16:15 hoelzro I was looking at Proc::Async, and close-stdin came to my attention.  Is it possible to open stdin of the child process as another file (ex. /dev/null) instead?
16:15 hoelzro simply closing stdin may not be a good idea
16:19 rindolf joined #perl6
16:19 geekosaur agreed
16:19 JimmyZ_ hoelzro: I think openpipe3 branch is about it
16:20 uncleyea1 joined #perl6
16:20 ugexe if you dont tap the $proc.stdout isnt it effectively the same?
16:21 hoelzro ugexe: the same as what?
16:22 ugexe oops, stdout != stdin
16:22 timotimo jaffa4: we also have the CALLER:: pseudo-package, but you only have access to dynamic variables that way
16:22 hoelzro JimmyZ_: I think that openpipe3 is orthogonal to the proc async stuff
16:23 JimmyZ_ oh
16:32 jaffa4 and how can I get the sub name of the caller?
16:32 timotimo that's via callframe
16:33 timotimo maybe you can CALLER::&ROUTINE.name or something?
16:33 timotimo m: sub caller { callee }; sub callee { say CALLER::&?ROUTINE.name }; caller()
16:33 camelia rakudo-moar f90155: OUTPUT«5===SORRY!5=== Error while compiling /tmp/thubT3N9L1␤Undeclared name:␤    ROUTINE used at line 1␤␤»
16:33 timotimo m: sub caller { callee }; sub callee { say CALLER::&ROUTINE.name }; caller()
16:33 camelia rakudo-moar f90155: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j5LSMvh3zo␤Undeclared name:␤    ROUTINE used at line 1␤␤»
16:33 timotimo m: sub caller { callee }; sub callee { say CALLER::('$?ROUTINE').name }; caller()
16:33 camelia rakudo-moar f90155: OUTPUT«===SORRY!===␤No such symbol 'CALLER::$?ROUTINE'␤»
16:33 dalek rakudo/nom: 36f773e | cygx++ | src/core/IO/Handle.pm:
16:33 dalek rakudo/nom: Support more modes in IO::Handle.open
16:33 dalek rakudo/nom:
16:33 dalek rakudo/nom: Introduces the following named parameters:
16:33 dalek rakudo/nom:
16:33 timotimo i don't know
16:34 dalek joined #perl6
16:34 jaffa4 no problem
16:35 jaffa4 manana
16:37 moritz m: sub f() { g() }; sub g { Backtrace.new[0].name }; f
16:37 camelia rakudo-moar f90155: OUTPUT«Method 'name' not found for invocant of class 'Backtrace::Frame'␤  in sub g at /tmp/4lbI33KRTI:1␤  in sub f at /tmp/4lbI33KRTI:1␤  in block <unit> at /tmp/4lbI33KRTI:1␤␤»
16:38 moritz m: sub f() { g() }; sub g { Backtrace.new[0].code.name }; f
16:38 camelia rakudo-moar f90155: ( no output )
16:38 moritz m: sub f() { g() }; sub g { Backtrace.new[0].code.name }; say f
16:38 camelia rakudo-moar f90155: OUTPUT«␤»
16:38 moritz m: sub f() { g() }; sub g { Backtrace.new[1].code.name }; say f
16:38 camelia rakudo-moar f90155: OUTPUT«new␤»
16:38 moritz m: sub f() { g() }; sub g { Backtrace.new[2].code.name }; say f
16:38 camelia rakudo-moar f90155: OUTPUT«g␤»
16:38 moritz m: sub f() { g() }; sub g { Backtrace.new[3].code.name }; say f
16:38 camelia rakudo-moar f90155: OUTPUT«f␤»
16:42 eternaleye joined #perl6
16:43 hoelzro TIL about polypersonal agreement
16:43 hoelzro reminds me of multiple dispatch =)
16:48 colomon japhb: sorry for getting distracted.  I believe this will do it: @*ARGS = @*ARGS.grep(/^"--"/), @*ARGS.grep({ $_ !~~ /^"--"/ }); # lightly tested
16:51 vendethiel joined #perl6
16:53 b2gills m: my $a = sub (:$a){...}.signature; my $b = sub (:a($)){...}.signature; say $a, ( $a eqv $b ?? ' eqv ' !! ' !eqv ' ), $b;
16:53 camelia rakudo-moar 6c62e2: OUTPUT«(:$a) !eqv (:a($))␤»
16:54 b2gills it could be argued those should be considered equivalent, since they basically are outside of a subroutine definition
16:55 b2gills having === return false does make sense though
16:57 moritz m: say sub (:$a){...}.signature eqv sub (:$a){...}.signature
16:57 camelia rakudo-moar 6c62e2: OUTPUT«True␤»
16:57 moritz b2gills: eqv is a pretty strict thing
16:57 moritz b2gills: and one could argue that they aren't equivalent, because they are distinguishable
16:58 moritz a Signature has two API boundaries; one towards the outside, on towards the inside of the routine (or block)
16:58 diana_olhovik joined #perl6
16:58 moritz and they aren't equivalent towards the inside of the routine
16:59 b2gills is anyone ever going to use `eqv` inside of a subroutine?
17:00 b2gills ... going to use it usefully ...
17:00 japhb colomon: That assumes 1. that we never implement '--foo bar' notation in addition to '--foo=bar', and 2. that '--' is no longer special
17:01 japhb colomon: Also, 3. That we don't support single-hyphen short options
17:01 nys joined #perl6
17:02 japhb (And don't forget that '-' and '-o' are different, because by convention single hyphen means $*IN)
17:03 japhb colomon: All of which is not to pick on your free-handed solution, just to say that it's either not a 1-liner, or that's one UGLY one-liner, when all the cases are handled.
17:04 japhb colomon: And again, I don't see the need for every user to do that in this era in which most new command-line tools follow a model similar to git's, with sub-commands and even sub-sub-commands.
17:05 * japhb hates boilerplate, and even grumbles every time he puts 'use v6;' at the top of a file, despite knowing it's the right thing to do.
17:06 japhb Mantra: "Only the essential complexity."
17:06 * japhb yields the soapbox.
17:06 colomon japhb: I would encourage you to write up a formal proposal.  Maybe even to implement it.
17:07 moritz which contrasts nicely with python's "explicit is better than implicit"
17:07 |newbie| joined #perl6
17:08 japhb moritz: Hence the reason the first thing I need to do with any python file I've loaded is *page down*.
17:09 japhb colomon: I may, at some point, but not soon -- ($day-job, $mad-science) are taking much of my coding effort these days.
17:09 * colomon has checked in his one-line fix to the one command that bugs him in the TagTools module
17:10 japhb colomon++
17:11 * colomon also thinks there must be a better way of saying @*ARGS.grep({ $_ !~~ /^"--"/ })
17:16 japhb colomon: negative lookahead in the regex?
17:19 moritz @*ARGS.grep: !*.starts-with('--')
17:19 moritz and $_ !~~ /^'--'/ can be simplified to !/^'--'/
17:23 virtualsue joined #perl6
17:24 |newbie| what is $/.pos measured in?  bytes , chars?
17:25 RabidGravy characters I should imagine
17:26 moritz |newbie|: chars aka graphemes
17:27 |newbie| so $./pos<=$s.chars?
17:27 colomon starts-with ?
17:28 |newbie| $s~~/hello/
17:28 PerlJam m: say "foobar".starts-with("foo");
17:28 camelia rakudo-moar 6c62e2: OUTPUT«True␤»
17:28 PerlJam m: say "foobar".ends-with("bar");
17:28 camelia rakudo-moar 6c62e2: OUTPUT«True␤»
17:29 jnthn |newbie|: yes
17:29 |newbie| rakudo: say "foobar".ends-with("ba");
17:29 camelia rakudo-moar 6c62e2: OUTPUT«False␤»
17:29 jnthn m: 'oh hello' ~~ /hello/; say $/.pos
17:29 camelia rakudo-moar 6c62e2: OUTPUT«Method 'pos' not found for invocant of class 'Match'␤  in block <unit> at /tmp/gbXl7IrV82:1␤␤»
17:29 jnthn m: 'oh hello' ~~ /hello/; say $/.from
17:29 camelia rakudo-moar 6c62e2: OUTPUT«3␤»
17:29 jnthn Well, and it's called .from, not .pos... :)
17:32 |newbie| that is what the documentation says
17:32 |newbie| .pos        # the current match position
17:32 |newbie| source http://design.perl6.org/S05.html#Positional_matching%2C_fixed_width_types
17:35 nowan joined #perl6
17:36 jnthn Oh...you're talking about Cursor, not Match.
17:37 jnthn Yes, Cursor has .pos.
17:37 jnthn And same answer: it's in graphemes.
17:38 pmichaud m: print 2..5
17:38 yoleaux 25 Jun 2015 23:14Z <raiph> pmichaud: GLR feedback https://gist.github.com/raiph/1dd0891cde8f1cbe78ce
17:38 camelia rakudo-moar 6c62e2: OUTPUT«2345»
17:43 ugexe m: say (1..5); say (1..5).eager
17:43 camelia rakudo-moar 6c62e2: OUTPUT«1..5␤1 2 3 4 5␤»
17:49 pmichaud .tell raiph thank you for the excellent GLR feedback!  Comments / reactions posted to the gist.
17:49 yoleaux pmichaud: I'll pass your message to raiph.
17:50 hoelzro [ptc]++ # PRs
17:53 ugexe hoelzro: i think  the depends in subcommander is meant to be "depends" : ["IO::String:ver(0.0.1)",]
17:53 hoelzro ugexe: ah, good point!
17:53 * hoelzro adds a note to fix
17:53 hoelzro I still need to finish that...
17:57 amurf joined #perl6
17:59 vendethiel joined #perl6
17:59 tony-o Stage parse      :  36.160
18:00 [ptc] hoelzro: pleasure!  :-)
18:04 dalek doc: 1eed4d3 | paultcochrane++ | lib/Language/variables.pod:
18:04 dalek doc: Remove X<> link to CWD variable
18:04 dalek doc:
18:04 dalek doc: This was being rendered as plain text before the dynamic variables table and
18:04 dalek doc: was confusing the meaning of what the text was trying to say.
18:04 dalek doc: review: https://github.com/perl6/doc/commit/1eed4d38a9
18:04 [ptc] m: say @*INC[0].WHAT
18:04 camelia rakudo-moar 6c62e2: OUTPUT«(Str)␤»
18:05 [ptc] aren't the elements of @*INC supposed to be CompUnitRepo objects?
18:08 tony-o m: @*INC.perl.say;
18:08 camelia rakudo-moar 6c62e2: OUTPUT«["file#/home/camelia/.perl6/2015.06-76-g6c62e2e/lib", "inst#/home/camelia/.perl6/2015.06-76-g6c62e2e", "file#/home/camelia/rakudo-inst-1/share/perl6/lib", "file#/home/camelia/rakudo-inst-1/share/perl6/vendor/lib", "file#/home/camelia/rakudo-inst-1/share/pe…»
18:09 [ptc] they're all strings
18:09 [ptc] the spec mentions a list of CompUnitRepo objects...  Or maybe is that only for actual repositories?
18:10 [ptc] the problem I'm trying to solve is to process @*INC to see if a particular file exists somewhere within one of the paths in @*INC
18:11 muraiki joined #perl6
18:11 [ptc] however, "file#/home/blah/foo/bar" isn't a path which one can use with :e tests, for instance
18:13 [Coke] I thought we couldn't assume that it was a file on disk with the same name anymore.
18:14 [ptc] I don't think we can
18:15 [ptc] but I don't think that's really the issue; what would be nice is to be able to do loop through @*INC and call (say) a .path method and get an IO::Path back which one can use to do other things
18:15 [ptc] I'm trying to get the tests working again for a module, hence my interest
18:17 |newbie| For perl6, has Pod stayed the same?
18:17 hoelzro |newbie|: Pod has changed; it's similiar to Pod5, but there are a few differences
18:25 jnthn Bloggage: https://6guts.wordpress.com/2015/06/26/this-week-unicode-8-loads-of-fixes-preparing-for-shaped-arrays/
18:25 ugexe its a CompUnitRepo::Local::File
18:26 ugexe if you want to know what modules are installed, then look at the MANIFEST inside the comp unit repo directory
18:27 atroxaper joined #perl6
18:28 [ptc] ugexe: what the module I'm fixing is trying to do, is to look through @*INC and find a shared library to load
18:29 [ptc] ugexe: it used to process @*INC as a list of paths, however the items of @*INC now seem to simply be strings; I thought they would be an object of some kind
18:29 ugexe maybe it should jus tlook at %*CUSTOM_SITE.IO.slurp("MANIFEST")
18:32 vendethiel joined #perl6
18:33 ugexe m: CompUnitRepo::Local::File.new('file#/home').IO.say # doesnt seem right though
18:33 camelia rakudo-moar 6c62e2: OUTPUT«"/home/camelia/file#/home".IO␤»
18:34 [ptc] afk &   # dinner
18:37 ugexe m: say PARSE-INCLUDE-SPEC($_).hash.values for @*INC
18:37 camelia rakudo-moar 6c62e2: OUTPUT«/home/camelia/.perl6/2015.06-76-g6c62e2e/lib␤/home/camelia/.perl6/2015.06-76-g6c62e2e␤/home/camelia/rakudo-inst-1/share/perl6/lib␤/home/camelia/rakudo-inst-1/share/perl6/vendor/lib␤/home/camelia/rakudo-inst-1/share/perl6/site/lib␤/home/camelia/ra…»
18:38 ugexe probably need something similiar here: https://github.com/rakudo/rakudo/blob/13af7e3298510b4766f55c57fd6280fb9ff3c150/src/core/CompUnitRepo/Locally.pm#L10
18:42 ugexe m: CompUnitRepo::Local::File.new('file#/home').path-spec.say
18:42 camelia rakudo-moar 6c62e2: OUTPUT«file#/home/camelia/file#/home␤»
18:43 ugexe ^ sticks file# in there twice
18:44 mj41 joined #perl6
18:45 spider-mario joined #perl6
18:47 moritz I guess the leading file# is redundant
18:48 zakharyas joined #perl6
18:50 ugexe they are suppose to be for telling you what type of ComUnitRepo it is. it would just seem that when they were changed to strings that the IO parts of compunitrepo were not adjusted accordingly
18:53 ugexe unless you mean inside the .new... that would make sense
18:53 |newbie| How do I make static variable in C sense?
18:54 PerlJam |newbie|: sounds like you want "state"
18:54 PerlJam m: sub foo { state $x = 5; say $x++ };  foo; foo; foo;
18:54 camelia rakudo-moar 6c62e2: OUTPUT«5␤6␤7␤»
18:55 molaf_ joined #perl6
19:03 dha joined #perl6
19:12 bin_005 joined #perl6
19:35 FROGGS joined #perl6
19:37 FROGGS o/
19:38 bartolin \o
19:39 FROGGS I'm finally going to add tests for run()/shell()
19:41 dha I'm going to go out on a limb and say that's a good thing.
19:41 ShimmerFairy joined #perl6
19:48 tony-o is there a mechanism to catch core errors?
19:50 hoelzro tony-o: could you define "core errors"?
19:50 xfix joined #perl6
19:50 xfix joined #perl6
19:52 tony-o occasionally i see errors like the following and can't seem to figure out how to CATCH them:
19:52 tony-o WARNING: unhandled Failure detected in DESTROY:
19:52 tony-o <Internal error while creating backtrace: MVMArray: Can't pop from an empty array   in method AT-POS at src/gen/m-CORE.setting:14764
19:55 hoelzro I think if you have to catch core errors, those of us working on the compiler aren't doing our job right =)
19:56 hoelzro but I think you could catch them in NQP land
19:57 tony-o i was looking at nqp and it looked like CATCH was the mechanism there too, is there a different nqp::<whatever> method i should be looking for?
19:59 hoelzro yeah, I think there's an nqp::call that CATCH compiles into
20:00 TEttinger joined #perl6
20:04 yqt joined #perl6
20:10 timotimo CATCH causes a handler to be inserted for the given code
20:10 timotimo i think there's actually an nqp op that is called something like "handle"
20:12 tony-o i'll dig into those - ty
20:23 mj41 joined #perl6
20:34 telex joined #perl6
20:53 dalek joined #perl6
20:56 dalek nqp: 67c3c31 | FROGGS++ | / (2 files):
20:56 dalek nqp: map op syncpipe and adjusts tests for latest openpipe
20:56 dalek nqp: review: https://github.com/perl6/nqp/commit/67c3c314f0
20:56 dalek nqp: 9d4c5d8 | FROGGS++ | t/nqp/ (2 files):
20:56 dalek nqp: update tests for nqp::spawn and nqp::shell
20:56 dalek nqp: review: https://github.com/perl6/nqp/commit/9d4c5d831e
20:56 dalek nqp: 9794dfa | FROGGS++ | src/vm/jvm/ (5 files):
20:56 dalek nqp: extend nqp::shell/nqp::spawn with in/out/err/flags params
20:56 dalek nqp:
20:56 dalek nqp: This means that we can use shell() and run() in rakudo for purposes we
20:56 dalek nqp: used pipe() for, but with extra freedom and flexibility.
20:56 dalek nqp: nqp::openpipe, as well as nqp::shell1 and nqp::shell3 are removed.
20:56 dalek nqp: review: https://github.com/perl6/nqp/commit/9794dfa164
20:56 dalek nqp: 3577fae | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
20:56 dalek nqp: remove mapping for nqp::openpipe on moar
20:56 dalek nqp: review: https://github.com/perl6/nqp/commit/3577fae601
20:56 dalek nqp: 61aba0b | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
20:56 dalek nqp: do posix emulation for exit status on jvm
20:56 dalek nqp: review: https://github.com/perl6/nqp/commit/61aba0bdf9
20:56 dalek nqp: 48bfeb3 | FROGGS++ | t/nqp/86-pipes.t:
20:56 dalek nqp: replace nqp::openpipe by nqp::shell in tests
20:56 dalek nqp: review: https://github.com/perl6/nqp/commit/48bfeb3cd5
20:56 dalek nqp: a5d6dda | FROGGS++ | tools/build/MOAR_REVISION:
20:56 dalek nqp: bump moar for nqp::shell/nqp::spawn improvements
20:56 dalek nqp: review: https://github.com/perl6/nqp/commit/a5d6ddadc7
20:59 dalek rakudo/nom: a3648b3 | FROGGS++ | src/core/ (2 files):
20:59 dalek rakudo/nom: follow recent nqp::openpipe changes
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a3648b321b
20:59 dalek rakudo/nom: 85d924d | FROGGS++ | src/core/control.pm:
20:59 dalek rakudo/nom: adjust use of  nqp::spawn and nqp::shell ops
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/85d924d6a9
20:59 dalek rakudo/nom: ecc7a0a | FROGGS++ | / (8 files):
20:59 dalek rakudo/nom: add Proc, Proc.run() and Proc.shell
20:59 dalek rakudo/nom:
20:59 dalek rakudo/nom: This deprecates pipe(), and Proc::Status.
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ecc7a0a614
20:59 dalek rakudo/nom: d5a0b7c | FROGGS++ | src/core/IO/Handle.pm:
20:59 dalek rakudo/nom: use nqp::shell instead of removed nqp::openpipe
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d5a0b7c2e9
20:59 dalek rakudo/nom: 2a4d616 | FROGGS++ | t/01-sanity/55-use-trace.t:
20:59 dalek rakudo/nom: use run() instead of pipe() to capture stdout+err
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2a4d616f7f
20:59 dalek rakudo/nom: 6df6b3c | FROGGS++ | t/spectest.data:
20:59 dalek rakudo/nom: run S32-io/pipe.t on jvm too
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6df6b3c115
20:59 dalek rakudo/nom: 91212c7 | FROGGS++ | tools/build/NQP_REVISION:
20:59 dalek rakudo/nom: bump nqp/moar for shell/run improvements
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/91212c7e67
21:00 dalek roast: 36bb218 | FROGGS++ | S32-io/pipe.t:
21:00 dalek roast: add more tests for shel() and run()
21:00 dalek roast: review: https://github.com/perl6/roast/commit/36bb21841d
21:00 timotimo ^- i am happy about this
21:01 FROGGS timotimo: I am too :o)
21:01 bartolin FROGGS++
21:01 FROGGS because I really really think it is sane
21:01 PerlJam FROGGS++
21:06 bin_005 joined #perl6
21:10 dha It looks to me like we've lost C<hex()> in Perl 6. Am I correct in that assumption? And has it been replace with something I'm not seeing at first glance?
21:12 PerlJam m: my $hex = "abc";  say :16($hex);
21:12 camelia rakudo-moar 6c62e2: OUTPUT«2748␤»
21:12 PerlJam There may be something better, that's just what occurred to me right off
21:13 dha *nod*
21:15 FROGGS gnight #perl6
21:21 timotimo m: say 1234.base(16)
21:21 camelia rakudo-moar 91212c: OUTPUT«4D2␤»
21:23 PerlJam Perl 5's hex() goes the other way.  Give it a string and it interprets it as hex and gives you the corresponding value.
21:25 timotimo you get :16(...) with a variable "16" from the unbase method, right?
21:25 timotimo m: say "2748".unbase(16)
21:25 camelia rakudo-moar 91212c: OUTPUT«Method 'unbase' not found for invocant of class 'Str'␤  in block <unit> at /tmp/yjqb2DM8H9:1␤␤»
21:25 timotimo m: say unbase("2748", 16)
21:25 camelia rakudo-moar 91212c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SePVchYe80␤Undeclared routine:␤    unbase used at line 1␤␤»
21:26 timotimo hm
21:26 timotimo m: my $base = 10; say :$base(1234)
21:26 camelia rakudo-moar 91212c: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤  in block <unit> at /tmp/PWcA2hkhGg:1␤␤»
21:26 timotimo i don't know how to this
21:26 dha m: say 0xaf.base(10);
21:26 camelia rakudo-moar 91212c: OUTPUT«175␤»
21:26 dha aha!
21:26 hoelzro m: say 0xaf
21:26 camelia rakudo-moar 91212c: OUTPUT«175␤»
21:26 hoelzro =P
21:27 cognominal joined #perl6
21:27 dha ok, how does *that* work?
21:28 hoelzro the default .Str for numbers uses base 10
21:28 hoelzro 0xaf is just a number literal
21:28 PerlJam If Str.base() was implemented, it too could serve as a p5-hex-a-like
21:28 dha huh. ok. Wonder if I should bother mentioning that...
21:29 hoelzro hmm
21:29 hoelzro m: say 10.WHERE
21:29 camelia rakudo-moar 91212c: OUTPUT«139692075210336␤»
21:29 hoelzro m: say 10.WHERE
21:29 camelia rakudo-moar 91212c: OUTPUT«140354205423200␤»
21:29 hoelzro m: say 10.WHERE; say 10.WHERE
21:29 camelia rakudo-moar 91212c: OUTPUT«140698494998112␤140698494998112␤»
21:29 hoelzro m: say 10.WHERE; say 0xa.WHERE
21:29 camelia rakudo-moar 91212c: OUTPUT«140633771546208␤140633771546208␤»
21:29 hoelzro figured as much =)
21:31 timotimo only for kinda small numbers
21:32 timotimo moar's int cache is pretty tiny
21:37 hoelzro timotimo: I figured, I was just curious if 10 and 0xa would cache to the same spot
21:37 timotimo yup
21:37 hoelzro I expected they would, but you never know!
21:37 timotimo until recently, only very few operations for big ints would actually go through the int cache at all
21:37 timotimo interestingly enough
21:39 hoelzro ah ha
21:39 timotimo like addition and such
21:45 tony-o m: say 10.base(9);
21:45 camelia rakudo-moar 91212c: OUTPUT«11␤»
21:46 tony-o m: say 10.base(100);
21:46 camelia rakudo-moar 91212c: OUTPUT«base must be between 2 and 36, got 100␤  in block <unit> at /tmp/rCu7QKTLV8:1␤␤»
21:48 El_Che maybe a silly question: is there default way to deploy a p6 app? like a jar/war or a fatpacked p5 script?
21:51 PerlJam El_Che: nope
21:52 PerlJam El_Che: well, unless you count "as a text file that's executed by the installed perl 6 compiler"  :)
21:53 El_Che it sounds dynamic that new revolutionary way of executing programs :)
21:54 dha Should there be an example of index as a method in http://doc.perl6.org/type/Str#routine_index ?
22:04 atroxaper joined #perl6
22:05 dha In other annoying questions, do we have an equivalent of perl5's C<int>?
22:05 ShimmerFairy joined #perl6
22:13 dha And then I get to move on to C<ioctl>
22:14 timotimo what does "int" do?
22:15 flussence perldoc says "truncates toward 0" ...and "you shouldn't use this"
22:16 dha Well, you shouldn't use it to round.
22:16 flussence m: say -3.5.Int
22:16 camelia rakudo-moar 91212c: OUTPUT«-3␤»
22:16 flussence m: say (-6.725/0.025).Num.Int
22:16 camelia rakudo-moar 91212c: OUTPUT«-269␤»
22:17 flussence m: say (-6.725e0/0.025e0).Int
22:17 camelia rakudo-moar 91212c: OUTPUT«-268␤»
22:17 flussence looks the same :)
22:17 flussence [as p5]
22:18 dha ok, so you can just C<Int>ize it. good.
22:19 timotimo m: say Int(9.9999)
22:19 camelia rakudo-moar 91212c: OUTPUT«9␤»
22:20 dha Ah, and there is also a C<truncate> function, which is C<.Int> returns the equivalent of.
22:21 lizmat ugexe: re CompUnitRepo::Local::File.new('file#/home').path-spec.say
22:21 lizmat when you're directly calling CUR::Local::File, you already indicate what type of CUR you want
22:21 uncleyear joined #perl6
22:21 lizmat so the "file#" prefix is unwanted there
22:22 timotimo is there also CompUnitRepo::RightThingFor('...')?
22:22 lizmat yes:
22:22 lizmat m: CompUnitRepo.new("file#/home").perl.say
22:22 camelia rakudo-moar 91212c: OUTPUT«CompUnitRepo::Local::File.new('/home')␤»
22:22 timotimo nice
22:23 dha I'm guessing C<ioctl> is gone?
22:23 lizmat dha: it is atm
22:23 lizmat afaik
22:23 flussence well you can do it with nativecall, but ioctls have always been... icky to use
22:23 dha Good. I don't want to have to explain it. :-)
22:24 lizmat it's only mention in the slushy part of S32/IO
22:24 lizmat *mentioned
22:25 lizmat One can probably easily write one using NativeCall
22:25 lizmat and put it in a module
22:26 timotimo you still need to manually get the fd of IO objects, but i believe you can nowadays
22:26 timotimo i think that feature was introduced to make IO::Socket::SSL possible
22:27 lizmat you can?  hmmm...  must have missed that
22:28 timotimo somehow you must can :)
22:29 lizmat I guess...
22:29 lizmat before looking into that, I'm going to get some sleep first
22:29 lizmat so good night, #perl6!
22:30 dha good night lizmat
22:49 ][Sno][ joined #perl6
22:49 dha C<link> and C<symlink> are listed in S32, but I don't really see any evidence of them elsewhere. Have they been implemented?
22:50 dha Interestingly, C<unlink> *is* documented.
22:55 dha ...and when I try C<link> and C<symlink>, it doesn't tell me that it can't find the functions, but that it can't find the file I'm trying to link, despite it being right there in the CWD.
22:57 [ptc] dha: if they don't appear on doc.perl6.org however appear to be implemented, open an issue on the doc GitHub page and we'll fix it as soon as we can
22:58 dha Ok.
23:09 skids joined #perl6
23:22 krakan joined #perl6
23:40 atweiden joined #perl6
23:41 atweiden m: enum Silo < ASSETS EXPENSES INCOME LIABILITIES EQUITY >; my Array[Silo] @silos; my Silo @assets = ASSETS; @silos.unshift: @assets; say @silos.perl;
23:41 camelia rakudo-moar 91212c: OUTPUT«Type check failed in assignment to '@silos'; expected 'Array[Silo]' but got 'Silo'␤  in any call_with_capture at src/gen/m-Metamodel.nqp:3479␤  in any call_with_capture at src/gen/m-Metamodel.nqp:3479␤  in block <unit> at /tmp/sBnOUEHpg1:1␤␤»
23:41 atweiden does this need a Capture to work?
23:41 atweiden if so, how?
23:45 raiph m: enum Silo < ASSETS EXPENSES INCOME LIABILITIES EQUITY >; my Array[Silo] @silos; my Silo @assets = ASSETS; @silos.unshift: $@assets; say @silos.perl; # atweiden
23:45 yoleaux 17:49Z <pmichaud> raiph: thank you for the excellent GLR feedback!  Comments / reactions posted to the gist.
23:45 camelia rakudo-moar 91212c: OUTPUT«Array[Array[Silo]].new(Array[Silo].new(Silo::ASSETS))␤»
23:46 ugexe exitcodes are broke on Proc::Async now
23:46 ugexe my $proc = Proc::Async.new("ls"); my $promise =  $proc.start; say $promise.result.exitcode; # -1
23:47 ugexe also if i do $promise = await $proc.start; say $promise.exitcode
23:48 ugexe it does execute the command (i see the output of ls) though
23:49 atweiden raiph: tyvm
23:49 raiph yw

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

Perl 6 | Reference Documentation | Rakudo