»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:17 raiph left 00:27 gcole left 00:36 raiph joined 00:40 gagalicious left 00:42 gagalicious joined 00:53 laouji joined 01:00 aborazmeh joined, aborazmeh left, aborazmeh joined 01:02 Ben_Goldberg joined 01:05 Alina-malina joined 01:08 yeahnoob joined 01:16 laouji left, laouji joined 01:21 telex left 01:22 telex joined 01:31 atroxaper joined 01:36 atroxaper left 01:39 rickbike joined
skids .tell lizmat Re: the Block vs Routine/Any vs Mu issue: github.com/rakudo/rakudo/pull/447 01:52
yoleaux skids: I'll pass your message to lizmat.
02:03 leont left 02:10 noganex joined, dayangkun joined 02:13 noganex_ left 02:14 cognominal left 02:20 mr-fooba_ joined 02:21 mr-foobar left 02:37 Ben_Goldberg left 02:38 rmgk is now known as Guest67918, rmgk_ joined, Guest67918 left, rmgk_ is now known as rmgk 03:06 Celelibi left 03:08 Celelibi joined 03:09 aborazmeh left 03:11 vendethiel joined 03:16 aborazmeh joined, aborazmeh left, aborazmeh joined 03:34 laouji left 03:35 laouji joined 03:37 vendethiel left 03:43 nys left
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␤»
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␤»
zostay that's confusing to me... the type of the box looks different when you look at the elements individually 03:51
03:54 raiph left 03:57 atroxaper joined 04:20 khw left 04:26 raiph joined 04:37 laouji left 04:38 laouji joined 04:41 aborazmeh left 04:44 raiph left 04:47 laouji_ joined 04:48 atroxaper left 04:50 laouji_ left, laouji_ joined 04:51 laouji left 04:52 atroxaper joined 04:55 dayangkun left
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␤»
skids m: my Int @a = 1, 2, 3; @a[1]:delete; (@a,)>>.gist.say;
camelia rakudo-moar a47a3d: OUTPUT«1 (Any) 3␤»
skids m: my Int @a = 1, 2, 3; @a[1]:delete; (@a,)>>.perl.say; 05:00
camelia rakudo-moar a47a3d: OUTPUT«1 Any 3␤»
skids m: my Int @a = 1, 2, 3; @a[1]:delete; @a.list.perl.say;
camelia rakudo-moar a47a3d: OUTPUT«Array[Int].new(1, Int, 3)␤»
skids m: my Int @a = 1, 2, 3; @a[1]:delete; @a.list>>.perl.say; 05:01
camelia rakudo-moar a47a3d: OUTPUT«1 Mu 3␤»
05:11 aditya joined, aindilis left 05:15 aindilis joined
aditya rakudo: say 1..5 05:15
camelia rakudo-moar a47a3d: OUTPUT«1..5␤»
aditya rakudo: print 1..5
camelia rakudo-moar a47a3d: OUTPUT«12345»
aditya Why the difference between say and print? 05:16
1..5 is not evaluated when passed to say.
05:17 skids left 05:23 kapr joined 05:26 kapr left 05:27 aditya left 05:38 rurban joined
b2gills `say` calls `.gist` on the object while `print` just calls `.Str` (effectively) 05:39
05:42 baest_ joined 05:46 Psyche^_ joined
ugexe it looks like say(\x) gets called when maybe say(|) is expected 05:47
05:55 ribasushi left 05:56 atroxaper left 05:57 ribasushi joined 06:02 atroxaper joined, yeahnoob left 06:06 baest_ is now known as baest 06:16 gfldex joined 06:18 diana_olhovik joined 06:28 _mg_ joined 06:30 [Sno] left 06:32 domidumont joined 06:33 vendethiel joined
masak morning, #perl6! 06:33
06:33 gfldex left 06:34 domidumont left 06:35 domidumont joined
moritz good morning, masak, ugexe, b2gills, * 06:35
06:41 espadrine joined 06:48 kaare_ joined
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
(Swedish most certainly does)
xiaomiao masak: there's official german terms, but they are mostly wrong
moritz masak: yes (though there are always a few technophobes who still translate)
xiaomiao e.g. a stack becomes a cellar, and then it's like wtf ur doing
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 :)
moritz: the proper translation is often not the officially accepted word, so german tech words are screwed up badly
06:51 RabidGravy joined
masak xiaomiao: you put your finger on one important aspect of eschewing the non-English terms: they lose their original precise meaning. 06:51
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"
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.
moritz or "Elektronischer Brief"
xiaomiao masak: no, I'm saying, the german official word is plain *wrong* 06:53
a cellar is a heap, not a stack
masak *nod*
xiaomiao moritz: "De-Mail" giggle.
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:55
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 vendethiel left, FROGGS joined
moritz xiaomiao: "Repo" is a German word, right? 06:58
:-)
xiaomiao now it is 06:59
06:59 vendethiel joined 07:00 spider-mario joined
RabidGravy marnin 07:01
07:04 amurf left 07:08 jack_rabbit left
atroxaper morning, #perl6 ! 07:13
07:13 TEttinger left
masak yeah, I tend to say "repo" in Swedish too. 07:17
atroxaper, RabidGravy: morning! 07:18
atroxaper masak: o/
RabidGravy: o/
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
07:19 Foxcool left
xiaomiao nine: well ... I had the luxury of having half the lectures in bad english 07:19
which is even more fun
nine Good thing it's over :) 07:20
xiaomiao yeah, chinglish is even more fun 07:21
JimmyZ as, long time no see? 07:22
07:22 Ven joined
xiaomiao JimmyZ: hmm, let me try to remember the phrase 07:23
"the zero-cash refund policy rubs the tapioca"
JimmyZ cant understand it ...
RabidGravy "my postillion got struck by lightning" 07:24
07:24 vendethiel left
xiaomiao JimmyZ: I'm also not quite sure, but ... China 07:25
just nod and smile ;)
07:25 salva left
masak xiaomiao: I think you would appreciate languagelog.ldc.upenn.edu/nll/?p=17487 07:27
07:29 espadrine left
xiaomiao hah. not bad ... 07:32
07:35 darutoko joined 07:36 [Sno] joined, Ven left 07:38 mj41 joined
mj41 .tell JimmyZ github.com/perl6/docker/pull/2 07:40
yoleaux 25 Jun 2015 16:32Z <tony-o> mj41: i might use that instead of protone :-)
mj41: I'll pass your message to JimmyZ.
07:41 spider-mario left
mj41 .tell hoelzro hi, please review/merge github.com/perl6/docker/pull/2 , thx 07:41
yoleaux mj41: I'll pass your message to hoelzro.
JimmyZ mj41: I think you want to push to github.com/perl6/perl6-docker? 07:42
yoleaux 07:40Z <mj41> JimmyZ: github.com/perl6/docker/pull/2
07:44 atroxaper left
mj41 JimmyZ: thx, I forked the wrong repo 07:45
07:45 atroxaper joined
RabidGravy forking hell 07:46
07:47 TEttinger joined
atroxaper Question: how can i prevent flattering like this: 07:49
rakudo: my @ar; push @ar, %(a => 'aa', b => 'bb'); push @ar, %(A => 'AA', b => 'BB'); say @ar.perl;
camelia rakudo-moar a47a3d: OUTPUT«[:a("aa"), :b("bb"), :A("AA"), :b("BB")]<>␤»
moritz atroxaper: use { } instead of %( )
atroxaper moritz: hm... Works in irc. Going to try in code :) 07:50
mj41 JimmyZ: the right one github.com/perl6/perl6-docker/pull/1
.tell hoelzro err, the right one is here github.com/perl6/perl6-docker/pull/1 07:51
yoleaux mj41: I'll pass your message to hoelzro.
atroxaper moritz: thanks!
07:52 laouji_ left
atroxaper moritz: one more question. I cant make array of hashes from array like this @lines.map: { {key1 => ~$_.value1, key2 => ~$_.value2} }, 07:52
moritz: what i do wrong? 07:53
07:53 dayangkun joined
moritz atroxaper: please specify "I cant" in more detail 07:56
07:56 danaj joined
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␤»
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")))␤»
[Tux] Even slower today :(
test 50000 44.392 44.304
test-t 50000 43.672 43.583
moritz mj41, hoelzro: why do we have perl6/docker and perl6/perl6-docker/? should I delete one of them? if yes, which? 08:00
08:01 espadrine joined
mj41 moritz: IMHO we should delete perl6/perl6-docker or deprecate it ( see my pull request github.com/perl6/perl6-docker/pull/1 ). registry.hub.docker.com/_/rakudo-star/ has link to perl6/docker so this one should stay. 08:04
08:09 laouji joined 08:10 espadrine_ joined
masak hehe... "prevent flattering" 08:11
08:11 espadrine left
masak bonus points to whoever manages to get a slide title into their talk with "Flattening will get you nowhere" :P 08:11
08:13 laouji left 08:19 rickbike left 08:21 laouji joined 08:24 rickbike joined, rickbike left
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:30
[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:31
dalek kudo/nom: 7f96347 | root++ | src/core/ (2 files):
Add an ":elide-type" adverbial parameter to Parameter.perl

depending on the attached code, as blocks and literals have a default signature type of Mu while routines use Any.
Note this affects the output of Signature.perl and Signature.gist, but not for aggregate container sigils (@, %, or &).
08:34
kudo/nom: 3d645fe | lizmat++ | src/core/ (2 files):
Merge pull request #447 from skids/elide_param_types

Add an ":elide-type" adverbial parameter to Parameter.perl
atroxaper moritz: I got list of lists instead of list of hashes.
08:35 zakharyas joined 08:40 _mg_ left 08:41 telex left 08:42 telex joined, cognominal joined
masak oh, skids === root ? 08:42
08:42 cognominal left 08:43 TEttinger left
masak anyway, skids++ lizmat++ 08:43
lizmat masak: I wouldn't now, /me just clicks the buttons :-)
yoleaux 01:52Z <skids> lizmat: Re: the Block vs Routine/Any vs Mu issue: github.com/rakudo/rakudo/pull/447
lizmat *nkw 08:44
*know
grrrr lack of awakeness
Grrrr notes he's in fact awake 08:45
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␤»
lizmat when .perl is called on the deleted element, it is outside of the context of the array
it is effectively an nqp::isnull(), which becomes Mu in P6 speak 08:49
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␤»
lizmat aka an Any, since the Parcel doesn't know about typing its containers 08:51
sorry Grrrr :-)
will grrrrrrrrr from now on
08:53 amurf joined
lizmat perhaps :delete on arrays should have different semantics after all? and be a shortcut to do a splice ? 08:53
(potentially multiple splices)
Grrrr lizmat: it's alright, grrrr away :)
lizmat m: my @a = ^10; @a[1,3,5,7]:delete; say @a.perl
camelia rakudo-moar 3d645f: OUTPUT«[0, Any, 2, Any, 4, Any, 6, Any, 8, 9]<>␤»
lizmat would then have become [0,2,4,6,8,0]<> 08:54
perhaps we should have a :null adverb on arrays (and potentially hashes) ? 08:55
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:57 amurf left
RabidGravy is there any important difference between die Exception.new and Exception.new.throw ? 08:58
08:59 Ven joined
lizmat multi sub die(Exception $e) { $e.throw } # .throw is more direct 08:59
that would be the only difference afaics 09:00
RabidGravy okay, that's what I would do. I was curious as most of the rakudo code does the "die Exception" variant. 09:01
lizmat I guess from a code optimization point of view, the die() would be optimized to the correct candidate at compile time 09:03
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
jnthn: ^^^ does that make sense?
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:05
09:09 husanu1 joined 09:12 Ven left 09:18 husanu1 left 09:23 husanu1 joined, vendethiel joined 09:24 virtualsue joined 09:27 mj41 left 09:28 husanu1 left
lizmat re the %h<a> := nqp::null(), me haz wrought a ticket: #125487 09:28
09:36 rurban left 09:38 rurban joined
dalek kudo/nom: a15dacb | lizmat++ | src/core/ (2 files):
Use die() only for ad-hoc in the settings
09:39
lizmat afk&
09:40 bin_005 joined 09:44 virtualsue left 09:46 rindolf joined 09:47 vendethiel left 09:49 virtualsue joined 09:50 vendethiel joined 09:54 rurban left 09:55 FROGGS left 09:56 rurban joined 10:03 leont joined 10:12 bin_005_o joined 10:13 vendethiel left, coffee` is now known as coffee, coffee left, coffee` joined 10:14 bin_005 left
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:15
grondilu is confused by Template::Mustache 10:17
moritz atroxaper: please blog about it! 10:18
10:20 gcole joined 10:22 rurban left
atroxaper moritz: hm... Good idea. I'll do so in a week. 10:22
10:22 vendethiel joined
atroxaper grondilu: what do you mean? 10:23
10:24 jaffa4 joined
jaffa4 hi all 10:24
atroxaper jaffa4: o/
jaffa4 how can i make a sub visible defined in a block to the outside world? 10:25
10:25 abraxxa joined 10:26 Ven joined
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:26
atroxaper grondilu: It's logic-less templates sustem mustache.github.io 10:28
grondilu ok, meanwhile I was reading en.wikipedia.org/wiki/Mustache_(te...te_system)
moritz jaffa4: one option is my &outer_name = do { block here; sub { anon sub as last statement } } 10:29
jaffa4: another is to write a proper module instead of a block, and import the sub 10:30
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 ShimmerFairy left, Ven left
jaffa4 I mean for () continue {} 10:31
atroxaper jaffa4: next;
jaffa4 continue is outside the for
moritz jaffa4: iirc there's a phaser for that (inside the for block), NEXT or so 10:32
10:32 rurban joined
moritz or you can also use LEAVE 10:32
lizmat LEAVE would also run with last;
moritz m: for 1..2 { LEAVE say "Done."; next when 1; last }
camelia rakudo-moar a15dac: OUTPUT«Done.␤Done.␤»
moritz m: for 1..2 { NEXT say "Done."; next when 1; last }
camelia rakudo-moar a15dac: OUTPUT«Done.␤»
moritz m: for 1..2 { NEXT say "Done $_."; next when 1; last } 10:33
camelia rakudo-moar a15dac: OUTPUT«Cannot call method 'Stringy' on a null object␤ in block <unit> at /tmp/EPLNGnMxGN:1␤␤»
jaffa4 I mean If I am correct, continue block is executed if for is not taken?
in Perl5
moritz jaffa4: no
that would be 'else' in python; perl 5 doesn't have it
jaffa4 What is continue then? 10:34
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␤␤»
lizmat m: for ^2 { NEXT $_.say } # same
camelia rakudo-moar a15dac: OUTPUT«Cannot call method 'say' on a null object␤ in block <unit> at /tmp/2JExRjB36d:1␤␤»
lizmat m: for ^2 { .say } # ok
camelia rakudo-moar a15dac: OUTPUT«0␤1␤»
lizmat moritz: agree ?
10:36 Ven joined
moritz jaffa4: perldoc -f continue 10:37
lizmat: yes
jaffa4 so it is next 10:39
10:39 aborazmeh joined, aborazmeh left, aborazmeh joined 10:41 rindolf left 10:42 amurf joined
jaffa4 FIRST and LAST is useful 10:44
10:45 ShimmerFairy joined, bin_005_o left 10:46 amurf left 10:48 dayangkun left 10:49 rindolf joined, ShimmerFairy left 10:56 espadrine joined
lizmat moritz: #125488 10:59
hmmm... did we lose the synopsebot? 11:00
11:00 espadrine_ left
tadzik PerlJam is restaring synbot6 whenever it's gone, from what I noticed :) 11:01
lunch&
11:03 ShimmerFairy joined
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␤»
lizmat std: native foo;
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␤»
lizmat m: unit native foo; # WAT ?
camelia ( no output )
lizmat jnthn seems to have added this with fc60b905 in 2011 11:08
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 gagalicious left
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;␤»
lizmat m: unit also foo
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␤»
lizmat m: unit foo
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....
they all seem to be package_declarator
jaffa4 What can I use instead of stat in PERL6? 11:12
11:12 Ven left 11:13 gagalicious joined
moritz jaffa4: the appropriate methods on IO::Path objects 11:13
lizmat m: say `ls`
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…»
lizmat m: say dir(".")
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 RabidGravy left
moritz doc.perl6.org/type/IO::FileTestable 11:14
lizmat m: given "star".IO { say "exists" if .e }
camelia rakudo-moar a15dac: OUTPUT«exists␤»
lizmat m: given "star".IO { say "file" if .f }
camelia ( no output )
lizmat m: given "star".IO { say "dir" if .d }
camelia rakudo-moar a15dac: OUTPUT«dir␤» 11:15
jaffa4 Is it a built-in?
lizmat is what a built-in ?
moritz yes
lizmat ah, IO::FileTestable, yes 11:16
moritz why doesn't IO::Path do IO::FileTestable?
oh, because it's gone
lizmat yeah, part of my newio work that made it back into nom 11:17
moritz github.com/perl6/doc/issues/97 opened 11:19
jaffa4 I cannot see any method that can get mode of the file
lizmat m: given "star".IO { say "readable" if .r }
camelia rakudo-moar a15dac: OUTPUT«readable␤»
lizmat m: given "star".IO { say .rwx } 11:20
camelia rakudo-moar a15dac: OUTPUT«True␤»
lizmat m: given "star".IO { say .rx }
camelia rakudo-moar a15dac: OUTPUT«Method 'rx' not found for invocant of class 'IO::Path'␤ in block <unit> at /tmp/UYAHtVmQBj:1␤␤»
lizmat m: given "star".IO { say .rwx }
camelia rakudo-moar a15dac: OUTPUT«True␤»
nine m: given ".cpanm".IO { say .rwx }
camelia rakudo-moar a15dac: OUTPUT«True␤»
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␤␤»
nine m: given ".cpanm".IO { say .f }
camelia rakudo-moar a15dac: OUTPUT«False␤»
nine m: say dir('.').grep: *.f
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␤»
nine m: given ".bash_history".IO { say .f }
camelia rakudo-moar a15dac: OUTPUT«True␤»
nine m: given ".bash_history".IO { say .rwx }
camelia rakudo-moar a15dac: OUTPUT«False␤»
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␤␤»
jaffa4 so how can I get the mode of a file, anyone else? 11:26
timotimo seems like an oversight that we don't have a method that gives the numeric mode of a file 11:29
lizmat if we're talking about a single rwx, that can be done now 11:31
however, we don't actually have the nqp::tools to get the rest of the mode atm, afaik
timotimo just a single of the rwx? why not all three? 11:32
11:36 Ven joined
lizmat because we can only find out for the current user, afaik 11:38
not for group or world
timotimo ah 11:39
and then there's special things like sticky bits and such
and at some point we want to support extended attributes, too
but perhaps not in core? i don't know
lizmat well, that's all unix/posix centric 11:42
on win it works differently, no?
timotimo i think windows has some "extended attributes" equivalent
lizmat m: (sub { $^a }).signature.perl.say # is this correct or not? 11:48
camelia rakudo-moar a15dac: OUTPUT«:(;; $a)␤»
lizmat in other words, do curried parameters matter in MMD or not? I would guess they do?
dalek kudo/nom: 1a743f9 | lizmat++ | src/Perl6/Actions.nqp:
Make auto-generated sigs correct, fixes #125486
11:51
11:52 Ven left
dalek ast: d07b99e | lizmat++ | S06-signature/unspecified.t:
Unfudge now passing tests again
11:55
11:55 MueThoS joined 11:58 aborazmeh left 11:59 rurban left, atroxaper left 12:00 MueThoS left
dalek ast: 8a6d829 | lizmat++ | S02-names-vars/signature.t:
Remove Siglist fossil
12:00
12:04 MueThoS joined
jaffa4 I can do this $input_file_permissions |= 0o0100 if ($input_file.IO.x); 12:06
12:14 rarara joined 12:19 aborazmeh joined, aborazmeh left, aborazmeh joined
dalek kudo/nom: f901553 | lizmat++ | src/core/Signature.pm:
Introduce Signature eqv Signature
12:19
ast: 3a39349 | lizmat++ | S02-names-vars/signature.t:
Some more siglist fossil removal
12:21
ast: 0f1545a | lizmat++ | S02-names-vars/signature.t:
Unfudge now passing Signature eqv Signature tests
12:22 Ven joined 12:34 notch joined
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 ast: 72b85c3 | lizmat++ | S02-names-vars/signature.t:
Add request for sanity check
lizmat notch: yes 12:36
barring unforeseen circumstances involving buses and the like 12:37
notch <lizmat> thanks a lot. 99% probability of success? or less? 12:38
lizmat I would say 99%, yes
12:38 virtualsue left, Ven left
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
Well, or the old semi-colon form
It's the declarator for using the NativeHOW meta-object
I'd guess NativeCall may use it to declare C-sized native types too
lizmat jnthn: not seeing it used in NativeCall.pm ... 12:44
I was assuming it was some kind of fossil that could be removed 12:45
if it can't, then I won't remove it :-)
jnthn Oh, I do
12:46 vendethiel left, synbot6 joined, aborazmeh left
jnthn lizmat: Both CORE.setting *and* NativeCall use it 12:46
It's very much not fossil :) 12:47
12:47 aborazmeh joined, aborazmeh left, aborazmeh joined 12:48 MueThoS left 12:49 MueThoS joined 12:54 Ven joined
lizmat argh, yes, I see it now :-) 12:55
jnthn grepping for "native" in NativeCall is kinda gonna be easy to miss :)
lizmat m: unit knowhow foo;
camelia ( no output )
lizmat m: unit slang foo;
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␤»
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␤»
jnthn hm
lizmat unit is not in std (yet)
jnthn ah, right
and yeah, it knew the knowhow declarator
13:00 atroxaper joined 13:01 Ven left 13:03 aborazmeh left, vendethiel joined 13:04 atroxaper left 13:06 RabidGravy joined 13:10 cognominal joined
dalek kudo-star-daily: 305cdf9 | coke++ | log/ (2 files):
today (automated commit)
13:11
rl6-roast-data: d8c9134 | coke++ | / (9 files):
today (automated commit)
13:13
13:15 Ven joined, telex left 13:16 telex joined 13:18 Ven left, Ven joined 13:19 skids joined
lizmat afk for some hot fresh air& 13:23
13:23 rarara left 13:24 rarara joined
hoelzro o/ #perl6 13:25
yoleaux 07:41Z <mj41> hoelzro: hi, please review/merge github.com/perl6/docker/pull/2 , thx
07:51Z <mj41> hoelzro: err, the right one is here github.com/perl6/perl6-docker/pull/1
hoelzro mj41, moritz: I don't remember why exactly, but perl6/docker is the correct one 13:26
so that PR to perl6-docker should go through 13:27
moritz then why not deleate perl6-docker? 13:30
13:30 JimmyZ_ joined
jaffa4 How can I read a number of bytes in Perl6 now? 13:31
moritz yes.
jaffa4 I mean where is the read function?
moritz in IO::Handle, iirc
m: say $*IN.read(5)
camelia rakudo-moar f90155: OUTPUT«Buf[uint8]:0x<43 c3 a9 61 64>␤»
moritz s/function/method/
jaffa4: doc.perl6.org/routine/read
jaffa4: may I generally warmly suggest doc.perl6.org/? 13:32
hoelzro moritz: I don't have a problem with that; no one should be referring to it
isn't there a way to set up a redirect when deleting a project?
13:33 woshty left
moritz doesn't see one 13:33
gone. 13:34
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
jaffa4 moritz: seek is not documented 13:36
hoelzro moritz: cool, thanks! I think that perl6/docker has all of its contents anyway 13:37
dalek c: 18d2661 | (Steve Mynott)++ | / (3 files):
Change $*PROGRAM_NAME to $*PROGRAM-NAME
13:39
c: 53c6385 | (Steve Mynott)++ | / (2 files):
Change $*EXECUTABLE_NAME to $*EXECUTABLE-NAME
13:42
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:47
13:47 vendethiel left
jaffa4 WHat is :w? 13:50
13:51 raiph joined
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:56
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
13:57 khw joined
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 pan style="color: #395be5">perl6-examples: 4112cad | (Steve Mynott)++ | categories/ (25 files):
Change $*PROGRAM_NAME to $*PROGRAM-NAME
13:59 notch left 14:01 gagalicious left
PerlJam hoelzro: I dunno. I'm not opposed to the feature in open(), but the name just doesn't seem quite right. 14:02
14:02 cygx joined
cygx see also 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?
13 Jun 2015 15:22Z <FROGGS> cygx: now it works in the windows sdk shell too
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:04
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:05
hoelzro: oh ... if it's called :create-anything, you shouldn't have to also pass :w, it should do that for you. 14:07
(IMHO)
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
cygx that was me, and I mentioned it 5 minutes ago ;)
ugexe guess that explains why my grep for skids failed me heh 14:10
PerlJam cygx++ yeah, that looks nice 14:12
jnthn I think we merged the MoarVM part of the cygx++ patch
ferry & 14:13
14:14 vendethiel joined 14:15 gagalicious joined, gagalicious left 14:16 gagalicious joined 14:17 gagalicious left, gagalicious joined, gagalicious left 14:19 gagalicious joined 14:20 amurf joined
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
14:20 cygx left
Ven hoelzro: thanks for that video :) 14:24
14:25 amurf left
hoelzro happy to be of service =) 14:31
commute &
timotimo .o( happy to beef service ) 14:34
14:35 bjz joined 14:38 jaffa4 left 14:41 rurban joined, rurban left 14:42 molaf joined 14:43 Ven left, Ven joined 14:45 laouji left 14:49 [Sno] left 14:50 atroxaper joined 14:54 atroxaper left 14:55 abraxxa left 15:03 molecules joined
molecules rakudo: "A;B;C".comb(/\w/); 15:03
camelia ( no output )
15:03 molecules is now known as Guest48350
Guest48350 p6: "A;B;C".comb(/\w/); 15:04
camelia ( no output )
Guest48350 p6: "A;B;C".comb(/\w/).perl.say; 15:05
camelia rakudo-moar f90155: OUTPUT«("A", "B", "C")␤»
15:06 Guest48350 left
dalek ast: a6f4e66 | (Steve Mynott)++ | S (4 files):
fix various deprecations as spotted by RAKUDO_DEPRECATIONS_FATAL=1
15:08
15:14 Ven_ joined 15:16 Ven left 15:17 diana_olhovik left 15:21 aborazmeh joined, aborazmeh left, aborazmeh joined
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
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 15:34 MueThoS left 15:35 zakharyas left, rindolf left 15:36 jaffa4 joined
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:38
15:38 aborazmeh left
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:39
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
japhb ugexe: It was to have a strict "options to the left of non-options" ordering 15:47
The first non-option prevents any later thing from being treated as an option.
MNSHO is that we already have '--' for that.
colomon is there any reason this cannot be fixed in your code by just rearranging @*ARGS? 15:49
hoelzro japhb, ugexe: same here 15:50
that's part of why I started working on Subcommander
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>, ...)'?
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
I mean, work-aroound-able with one line of code.
japhb I don't think it's dickishness ... I just think it's wrong. :-)
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.
*note 15:54
hoelzro PerlJam: regarding our earlier discussion, how about :exclusive? 15:56
oh, that's in cygx++'s PR =P 15:57
PerlJam yeah ... we should probably just merge cyg++'s PR
dalek c: 973355a | paultcochrane++ | lib/Type/Proc/Status.pod:
Replace Proc::Status::exit with exitcode

The `exit` method has been deprectated since 2015.03 and will be removed in favour of `exitcode` in 2015.09.
15:58
15:58 [Sno] joined 16:01 vendethiel left
hoelzro cygx++ 16:09
that's exactly what I was hoping for!
jaffa4 iDoes caller work in Perl6? 16:11
16:11 vendethiel joined
PerlJam jaffa4: callframe 16:11
16:11 domidumont left
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
simply closing stdin may not be a good idea
16:16 diana_olhovik_ left 16:19 rindolf joined
geekosaur agreed 16:19
JimmyZ_ hoelzro: I think openpipe3 branch is about it
16:19 leont left 16:20 uncleyea1 joined, uncleyear left
ugexe if you dont tap the $proc.stdout isnt it effectively the same? 16:20
hoelzro ugexe: the same as what? 16:21
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
hoelzro JimmyZ_: I think that openpipe3 is orthogonal to the proc async stuff
JimmyZ_ oh 16:23
jaffa4 and how can I get the sub name of the caller? 16:32
timotimo that's via callframe
maybe you can CALLER::&ROUTINE.name or something? 16:33
m: sub caller { callee }; sub callee { say CALLER::&?ROUTINE.name }; caller()
camelia rakudo-moar f90155: OUTPUT«5===SORRY!5=== Error while compiling /tmp/thubT3N9L1␤Undeclared name:␤ ROUTINE used at line 1␤␤»
timotimo m: sub caller { callee }; sub callee { say CALLER::&ROUTINE.name }; caller()
camelia rakudo-moar f90155: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j5LSMvh3zo␤Undeclared name:␤ ROUTINE used at line 1␤␤»
timotimo m: sub caller { callee }; sub callee { say CALLER::('$?ROUTINE').name }; caller()
camelia rakudo-moar f90155: OUTPUT«===SORRY!===␤No such symbol 'CALLER::$?ROUTINE'␤»
dalek rakudo/nom: 36f773e | cygx++ | src/core/IO/Handle.pm:
rakudo/nom: Support more modes in IO::Handle.open
rakudo/nom:
rakudo/nom: Introduces the following named parameters:
rakudo/nom:
timotimo i don't know
16:34 dalek joined, ChanServ sets mode: +v dalek
jaffa4 no problem 16:34
manana 16:35
16:36 vendethiel left
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␤␤»
moritz m: sub f() { g() }; sub g { Backtrace.new[0].code.name }; f 16:38
camelia ( no output )
moritz m: sub f() { g() }; sub g { Backtrace.new[0].code.name }; say f
camelia rakudo-moar f90155: OUTPUT«␤»
moritz m: sub f() { g() }; sub g { Backtrace.new[1].code.name }; say f
camelia rakudo-moar f90155: OUTPUT«new␤»
moritz m: sub f() { g() }; sub g { Backtrace.new[2].code.name }; say f
camelia rakudo-moar f90155: OUTPUT«g␤»
moritz m: sub f() { g() }; sub g { Backtrace.new[3].code.name }; say f
camelia rakudo-moar f90155: OUTPUT«f␤»
16:38 eternaleye left 16:42 eternaleye joined
hoelzro TIL about polypersonal agreement 16:43
reminds me of multiple dispatch =)
colomon japhb: sorry for getting distracted. I believe this will do it: @*ARGS = @*ARGS.grep(/^"--"/), @*ARGS.grep({ $_ !~~ /^"--"/ }); # lightly tested 16:48
16:51 vendethiel joined
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($))␤»
b2gills it could be argued those should be considered equivalent, since they basically are outside of a subroutine definition 16:54
having === return false does make sense though 16:55
moritz m: say sub (:$a){...}.signature eqv sub (:$a){...}.signature 16:57
camelia rakudo-moar 6c62e2: OUTPUT«True␤»
moritz b2gills: eqv is a pretty strict thing
b2gills: and one could argue that they aren't equivalent, because they are distinguishable
a Signature has two API boundaries; one towards the outside, on towards the inside of the routine (or block) 16:58
16:58 diana_olhovik joined
moritz and they aren't equivalent towards the inside of the routine 16:58
b2gills is anyone ever going to use `eqv` inside of a subroutine? 16:59
... 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
colomon: Also, 3. That we don't support single-hyphen short options 17:01
17:01 nys joined
japhb (And don't forget that '-' and '-o' are different, because by convention single hyphen means $*IN) 17:02
17:02 JimmyZ_ left
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:03
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:04
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:05
Mantra: "Only the essential complexity." 17:06
japhb yields the soapbox.
colomon japhb: I would encourage you to write up a formal proposal. Maybe even to implement it.
moritz which contrasts nicely with python's "explicit is better than implicit" 17:07
17:07 |newbie| joined
japhb moritz: Hence the reason the first thing I need to do with any python file I've loaded is *page down*. 17:08
17:08 jaffa4 left
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
japhb colomon++ 17:10
colomon also thinks there must be a better way of saying @*ARGS.grep({ $_ !~~ /^"--"/ }) 17:11
japhb colomon: negative lookahead in the regex? 17:16
moritz @*ARGS.grep: !*.starts-with('--') 17:19
and $_ !~~ /^'--'/ can be simplified to !/^'--'/
17:23 virtualsue joined
|newbie| what is $/.pos measured in? bytes , chars? 17:24
RabidGravy characters I should imagine 17:25
moritz |newbie|: chars aka graphemes 17:26
|newbie| so $./pos<=$s.chars? 17:27
colomon starts-with ?
|newbie| $s~~/hello/ 17:28
PerlJam m: say "foobar".starts-with("foo");
camelia rakudo-moar 6c62e2: OUTPUT«True␤»
PerlJam m: say "foobar".ends-with("bar");
camelia rakudo-moar 6c62e2: OUTPUT«True␤»
jnthn |newbie|: yes 17:29
|newbie| rakudo: say "foobar".ends-with("ba");
camelia rakudo-moar 6c62e2: OUTPUT«False␤»
jnthn m: 'oh hello' ~~ /hello/; say $/.pos
camelia rakudo-moar 6c62e2: OUTPUT«Method 'pos' not found for invocant of class 'Match'␤ in block <unit> at /tmp/gbXl7IrV82:1␤␤»
jnthn m: 'oh hello' ~~ /hello/; say $/.from
camelia rakudo-moar 6c62e2: OUTPUT«3␤»
jnthn Well, and it's called .from, not .pos... :)
|newbie| that is what the documentation says 17:32
17:32 nowan left
|newbie| .pos # the current match position 17:32
source design.perl6.org/S05.html#Positiona...idth_types
17:35 nowan joined
jnthn Oh...you're talking about Cursor, not Match. 17:36
17:36 vendethiel left
jnthn Yes, Cursor has .pos. 17:37
And same answer: it's in graphemes.
pmichaud m: print 2..5 17:38
yoleaux 25 Jun 2015 23:14Z <raiph> pmichaud: GLR feedback gist.github.com/raiph/1dd0891cde8f1cbe78ce
camelia rakudo-moar 6c62e2: OUTPUT«2345»
ugexe m: say (1..5); say (1..5).eager 17:43
camelia rakudo-moar 6c62e2: OUTPUT«1..5␤1 2 3 4 5␤»
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.
hoelzro [ptc]++ # PRs 17:50
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!
hoelzro adds a note to fix
I still need to finish that...
17:55 Ven_ left 17:57 amurf joined 17:59 vendethiel joined
tony-o Stage parse : 36.160 17:59
[ptc] hoelzro: pleasure! :-) 18:00
18:01 amurf left
dalek c: 1eed4d3 | paultcochrane++ | lib/Language/variables.pod:
Remove X<> link to CWD variable

This was being rendered as plain text before the dynamic variables table and was confusing the meaning of what the text was trying to say.
18:04
[ptc] m: say @*INC[0].WHAT
camelia rakudo-moar 6c62e2: OUTPUT«(Str)␤»
18:05 espadrine left
[ptc] aren't the elements of @*INC supposed to be CompUnitRepo objects? 18:05
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…»
[ptc] they're all strings 18:09
the spec mentions a list of CompUnitRepo objects... Or maybe is that only for actual repositories?
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:10
18:11 muraiki joined
[ptc] however, "file#/home/blah/foo/bar" isn't a path which one can use with :e tests, for instance 18:11
[Coke] I thought we couldn't assume that it was a file on disk with the same name anymore. 18:13
[ptc] I don't think we can 18:14
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
I'm trying to get the tests working again for a module, hence my interest
|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:23 vendethiel left
jnthn Bloggage: 6guts.wordpress.com/2015/06/26/thi...ed-arrays/ 18:25
ugexe its a CompUnitRepo::Local::File
if you want to know what modules are installed, then look at the MANIFEST inside the comp unit repo directory 18:26
18:27 atroxaper joined
[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:28
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 atroxaper left, vendethiel joined
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␤»
[ptc] afk & # dinner 18:34
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…»
ugexe probably need something similiar here: github.com/rakudo/rakudo/blob/13af...lly.pm#L10 18:38
18:39 virtualsue left
ugexe m: CompUnitRepo::Local::File.new('file#/home').path-spec.say 18:42
camelia rakudo-moar 6c62e2: OUTPUT«file#/home/camelia/file#/home␤»
ugexe ^ sticks file# in there twice 18:43
18:44 mj41 joined 18:45 spider-mario joined
moritz I guess the leading file# is redundant 18:47
18:48 zakharyas joined
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:50
unless you mean inside the .new... that would make sense 18:53
|newbie| How do I make static variable in C sense?
PerlJam |newbie|: sounds like you want "state" 18:54
m: sub foo { state $x = 5; say $x++ }; foo; foo; foo;
camelia rakudo-moar 6c62e2: OUTPUT«5␤6␤7␤»
18:55 molaf_ joined 18:59 molaf left 19:03 dha joined 19:04 rindolf left 19:12 bin_005 joined 19:22 zakharyas left 19:35 FROGGS joined
FROGGS o/ 19:37
bartolin \o 19:38
19:38 nowan left
FROGGS I'm finally going to add tests for run()/shell() 19:39
19:40 ShimmerFairy left
dha I'm going to go out on a limb and say that's a good thing. 19:41
19:41 ShimmerFairy joined
tony-o is there a mechanism to catch core errors? 19:48
hoelzro tony-o: could you define "core errors"? 19:50
19:50 xfix joined
tony-o occasionally i see errors like the following and can't seem to figure out how to CATCH them: 19:52
WARNING: unhandled Failure detected in DESTROY:
<Internal error while creating backtrace: MVMArray: Can't pop from an empty array in method AT-POS at src/gen/m-CORE.setting:14764
hoelzro I think if you have to catch core errors, those of us working on the compiler aren't doing our job right =) 19:55
but I think you could catch them in NQP land 19:56
19:57 mj41 left
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:57
hoelzro yeah, I think there's an nqp::call that CATCH compiles into 19:59
20:00 TEttinger joined 20:04 yqt joined
timotimo CATCH causes a handler to be inserted for the given code 20:10
i think there's actually an nqp op that is called something like "handle"
tony-o i'll dig into those - ty 20:12
20:14 kaare_ left 20:23 mj41 joined, darutoko left 20:32 telex left 20:34 telex joined 20:53 dalek left, dalek joined, ChanServ sets mode: +v dalek
dalek p: 67c3c31 | FROGGS++ | / (2 files):
map op syncpipe and adjusts tests for latest openpipe
20:56
p: 9d4c5d8 | FROGGS++ | t/nqp/ (2 files):
update tests for nqp::spawn and nqp::shell
p: 9794dfa | FROGGS++ | src/vm/jvm/ (5 files):
extend nqp::shell/nqp::spawn with in/out/err/flags params

This means that we can use shell() and run() in rakudo for purposes we used pipe() for, but with extra freedom and flexibility. nqp::openpipe, as well as nqp::shell1 and nqp::shell3 are removed.
p: 3577fae | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
remove mapping for nqp::openpipe on moar
p: 61aba0b | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
do posix emulation for exit status on jvm
p: 48bfeb3 | FROGGS++ | t/nqp/86-pipes.t:
replace nqp::openpipe by nqp::shell in tests
p: a5d6dda | FROGGS++ | tools/build/MOAR_REVISION:
bump moar for nqp::shell/nqp::spawn improvements
kudo/nom: a3648b3 | FROGGS++ | src/core/ (2 files):
follow recent nqp::openpipe changes
20:59
kudo/nom: 85d924d | FROGGS++ | src/core/control.pm:
adjust use of nqp::spawn and nqp::shell ops
kudo/nom: ecc7a0a | FROGGS++ | / (8 files):
add Proc, Proc.run() and Proc.shell

This deprecates pipe(), and Proc::Status.
kudo/nom: d5a0b7c | FROGGS++ | src/core/IO/Handle.pm:
use nqp::shell instead of removed nqp::openpipe
kudo/nom: 2a4d616 | FROGGS++ | t/01-sanity/55-use-trace.t:
use run() instead of pipe() to capture stdout+err
kudo/nom: 6df6b3c | FROGGS++ | t/spectest.data:
run S32-io/pipe.t on jvm too
kudo/nom: 91212c7 | FROGGS++ | tools/build/NQP_REVISION:
bump nqp/moar for shell/run improvements
ast: 36bb218 | FROGGS++ | S32-io/pipe.t:
add more tests for shel() and run()
21:00
timotimo ^- i am happy about this
FROGGS timotimo: I am too :o) 21:01
bartolin FROGGS++
FROGGS because I really really think it is sane
PerlJam FROGGS++
21:05 bin_005 left 21:06 bin_005 joined 21:09 xfix left
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:10
PerlJam m: my $hex = "abc"; say :16($hex); 21:12
camelia rakudo-moar 6c62e2: OUTPUT«2748␤»
PerlJam There may be something better, that's just what occurred to me right off
dha *nod* 21:13
FROGGS gnight #perl6 21:15
21:15 FROGGS left 21:16 mj41 left, skids left
timotimo m: say 1234.base(16) 21:21
camelia rakudo-moar 91212c: OUTPUT«4D2␤»
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:23
21:25 cognominal left
timotimo you get :16(...) with a variable "16" from the unbase method, right? 21:25
m: say "2748".unbase(16)
camelia rakudo-moar 91212c: OUTPUT«Method 'unbase' not found for invocant of class 'Str'␤ in block <unit> at /tmp/yjqb2DM8H9:1␤␤»
timotimo m: say unbase("2748", 16)
camelia rakudo-moar 91212c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SePVchYe80␤Undeclared routine:␤ unbase used at line 1␤␤»
timotimo hm 21:26
m: my $base = 10; say :$base(1234)
camelia rakudo-moar 91212c: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤ in block <unit> at /tmp/PWcA2hkhGg:1␤␤»
timotimo i don't know how to this
dha m: say 0xaf.base(10);
camelia rakudo-moar 91212c: OUTPUT«175␤»
dha aha!
hoelzro m: say 0xaf
camelia rakudo-moar 91212c: OUTPUT«175␤»
hoelzro =P
21:27 cognominal joined
dha ok, how does *that* work? 21:27
hoelzro the default .Str for numbers uses base 10 21:28
0xaf is just a number literal
PerlJam If Str.base() was implemented, it too could serve as a p5-hex-a-like
dha huh. ok. Wonder if I should bother mentioning that...
hoelzro hmm 21:29
m: say 10.WHERE
camelia rakudo-moar 91212c: OUTPUT«139692075210336␤»
hoelzro m: say 10.WHERE
camelia rakudo-moar 91212c: OUTPUT«140354205423200␤»
hoelzro m: say 10.WHERE; say 10.WHERE
camelia rakudo-moar 91212c: OUTPUT«140698494998112␤140698494998112␤»
hoelzro m: say 10.WHERE; say 0xa.WHERE
camelia rakudo-moar 91212c: OUTPUT«140633771546208␤140633771546208␤»
hoelzro figured as much =)
timotimo only for kinda small numbers 21:31
moar's int cache is pretty tiny 21:32
21:33 muraiki left
hoelzro timotimo: I figured, I was just curious if 10 and 0xa would cache to the same spot 21:37
timotimo yup
hoelzro I expected they would, but you never know!
timotimo until recently, only very few operations for big ints would actually go through the int cache at all
interestingly enough
hoelzro ah ha 21:39
timotimo like addition and such
tony-o m: say 10.base(9); 21:45
camelia rakudo-moar 91212c: OUTPUT«11␤»
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␤␤»
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:48
PerlJam El_Che: nope 21:51
El_Che: well, unless you count "as a text file that's executed by the installed perl 6 compiler" :) 21:52
El_Che it sounds dynamic that new revolutionary way of executing programs :) 21:53
21:53 ShimmerFairy left
dha Should there be an example of index as a method in doc.perl6.org/type/Str#routine_index ? 21:54
22:00 spider-mario left 22:04 atroxaper joined 22:05 |newbie| left
dha In other annoying questions, do we have an equivalent of perl5's C<int>? 22:05
22:05 ShimmerFairy joined 22:09 atroxaper left
dha And then I get to move on to C<ioctl> 22:13
timotimo what does "int" do? 22:14
22:15 diana_olhovik left
flussence perldoc says "truncates toward 0" ...and "you shouldn't use this" 22:15
dha Well, you shouldn't use it to round. 22:16
flussence m: say -3.5.Int
camelia rakudo-moar 91212c: OUTPUT«-3␤»
flussence m: say (-6.725/0.025).Num.Int
camelia rakudo-moar 91212c: OUTPUT«-269␤»
flussence m: say (-6.725e0/0.025e0).Int 22:17
camelia rakudo-moar 91212c: OUTPUT«-268␤»
flussence looks the same :)
[as p5]
dha ok, so you can just C<Int>ize it. good. 22:18
timotimo m: say Int(9.9999) 22:19
camelia rakudo-moar 91212c: OUTPUT«9␤»
dha Ah, and there is also a C<truncate> function, which is C<.Int> returns the equivalent of. 22:20
lizmat ugexe: re CompUnitRepo::Local::File.new('file#/home').path-spec.say 22:21
22:21 uncleyea1 is now known as uncleyear
lizmat when you're directly calling CUR::Local::File, you already indicate what type of CUR you want 22:21
22:21 uncleyear left, uncleyear joined
lizmat so the "file#" prefix is unwanted there 22:21
timotimo is there also CompUnitRepo::RightThingFor('...')? 22:22
lizmat yes:
m: CompUnitRepo.new("file#/home").perl.say
camelia rakudo-moar 91212c: OUTPUT«CompUnitRepo::Local::File.new('/home')␤»
timotimo nice
dha I'm guessing C<ioctl> is gone? 22:23
lizmat dha: it is atm
afaik
flussence well you can do it with nativecall, but ioctls have always been... icky to use
dha Good. I don't want to have to explain it. :-)
lizmat it's only mention in the slushy part of S32/IO 22:24
*mentioned
One can probably easily write one using NativeCall 22:25
and put it in a module
timotimo you still need to manually get the fd of IO objects, but i believe you can nowadays 22:26
i think that feature was introduced to make IO::Socket::SSL possible
lizmat you can? hmmm... must have missed that 22:27
timotimo somehow you must can :) 22:28
lizmat I guess... 22:29
before looking into that, I'm going to get some sleep first
so good night, #perl6!
dha good night lizmat 22:30
22:44 gfldex left 22:49 ][Sno][ joined
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:49
22:50 [Sno] left, RabidGravy left
dha Interestingly, C<unlink> *is* documented. 22:50
...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:55
[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:57
dha Ok. 22:58
23:09 skids joined 23:13 dha left 23:22 krakan joined 23:40 atweiden joined
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␤␤»
atweiden does this need a Capture to work?
if so, how?
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.
camelia rakudo-moar 91212c: OUTPUT«Array[Array[Silo]].new(Array[Silo].new(Silo::ASSETS))␤»
ugexe exitcodes are broke on Proc::Async now 23:46
my $proc = Proc::Async.new("ls"); my $promise = $proc.start; say $promise.result.exitcode; # -1
also if i do $promise = await $proc.start; say $promise.exitcode 23:47
it does execute the command (i see the output of ls) though 23:48
atweiden raiph: tyvm 23:49
raiph yw