»ö« 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! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
skids That worked. 00:04
But Task::Star wants Term::ANSIColor wants nqp and nqp is not an ecosystem module.
00:08 aborazmeh left, kurahaupo1 joined 00:09 aborazmeh joined, aborazmeh left, aborazmeh joined
tony-o that sounds wrong 00:12
00:14 aborazmeh left
BenGoldberg . o O (Task::⋆) 00:14
00:15 jack_rabbit joined
BenGoldberg m: say ⓴ 00:16
camelia rakudo-moar d4fd24: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/e2HuBOTfx1:1␤------> 3say7⏏5 ⓴␤Two terms in a row␤at /tmp/e2HuBOTfx1:1␤------> 3say 7⏏5⓴␤ expecting any of:␤ infix␤ infix stopper␤ …»
BenGoldberg m: say +⓴
camelia rakudo-moar d4fd24: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EFm1Am5wYP␤Prefix + requires an argument, but no valid term found␤at /tmp/EFm1Am5wYP:1␤------> 3say +7⏏5⓴␤ expecting any of:␤ prefix␤»
BenGoldberg m: say +'⓴'
camelia rakudo-moar d4fd24: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏⓴' (indicated by ⏏)␤ in method gist at src/gen/m-CORE.setting:15904␤ in sub say at src/gen/m-CORE.setting:18727␤ in block <unit> at /tmp/Vr2KVtQggG:1␤␤»
colomon weird, lots of new fails on the module smoke today 00:17
00:17 aborazmeh joined, aborazmeh left, aborazmeh joined
colomon skids: right, the nqp thing 00:18
skids: looks like FROGGS added the “nqp” dependency this week (to Term::AnsiColor, anyway), and it worked for a few days before starting to fail today. :\ 00:20
00:21 laouji joined
b2gills m: say unival '⓴' 00:21
camelia rakudo-moar d4fd24: OUTPUT«20␤»
skids colomon: because of the latest commit to panda 'treat "test-depends" and "build-depends" like "depends"' 00:22
00:27 lichtkind_ joined, pecastro joined 00:30 lichtkind left
moritz eeks, I just had rakudo segfault on a script that is mostly a loop that alls run() several times :( 00:32
00:34 kurahaupo1 left 00:37 KCL_ left, hobbs joined, hobbs left, hobbs joined 00:38 KCL_ joined 00:39 hobbs left, laouji left
moritz uhm 00:40
so
00:40 huf left
moritz modules declare dependencies on components that rakudo provide 00:40
but panda doesn't understand them, and tries to locate them in the ecosystem? 00:41
00:41 hobbs joined 00:44 laouji joined, laouji left 00:45 laouji joined 00:47 huf joined 00:48 tinyblak joined 00:49 tinyblak_ joined
tony-o that's what it looks like 00:50
00:53 tinyblak left 00:57 lichtkind_ left 00:58 mattp__ left 00:59 mattp__ joined, xxx left 01:01 sirdancealot left 01:02 ingy left, tbrowder left 01:04 ingy joined 01:06 xxx joined 01:10 sirdancealot joined 01:11 tbrowder joined
moritz ok, I added nqp to the hardcoded list of modules that rakudo provides 01:13
01:17 noganex joined 01:21 aborazmeh left, aborazmeh joined, aborazmeh left, aborazmeh joined 01:24 aborazmeh left 01:26 hobbs left 01:28 aborazmeh joined, aborazmeh left, aborazmeh joined 01:31 telex left 01:32 telex joined 01:34 hobbs joined
dalek kudo-star-daily: 301e17f | coke++ | log/ (2 files):
today (automated commit)
01:41
01:46 ilbot3 left 01:47 ilbot3 joined
tony-o moritz: that seems to have worked 01:52
02:00 aborazmeh left 02:03 Sqirrel left 02:10 Sqirrel joined 02:16 noganex_ joined 02:19 noganex left 02:21 BenGoldberg left, gfldex left 02:23 chenryn_ joined 02:27 pdcawley left
dalek href="https://perl6.org:">perl6.org: 7da7a96 | (Zoffix Znet)++ | includes/header:
Declare character encoding within the document

Fixes W3C validator warning: "It is often recommended to declare the character encoding in the document itself, especially if there is a chance that the document will be read from or saved to disk, CD, etc."
02:34
02:39 raiph left 03:20 Sqirrel left 03:22 fhelmberger joined
Zoffix Did we drop IE8 support for perl6.org? 03:23
skids sooo... now with the new precomp db, when I upgrade rakudo, I cannot even then build panda due to stale File::FInd etc.
Zoffix On github, the readme says "IE8 still needs to be considered (2014-03)."... But the site is styleless on IE8 03:24
skids I used to just remove the .moarvm files. But now... ?
jdv79 people still use IE? who. 03:25
Zoffix IE8 is the new IE6... :)
jdv79 even m$ is dumping it
Zoffix I know. But it's the latest version that can run on WinXP. And for some customers upgrading to modern Win would also mean upgrading hardware. Lots of $$$ 03:26
jdv79 and the kinds of people that visit perl6.org would be using IE8?
Zoffix 20% of our users use IE8 :'(
jdv79 idk - just wondering
Zoffix I doubt it, hence my question :D
jdv79 haha
Zoffix will just update the readme :P 03:27
03:27 fhelmberger left 03:31 aborazmeh joined, aborazmeh left, aborazmeh joined
dalek href="https://perl6.org:">perl6.org: 6e8c242 | (Zoffix Znet)++ | source/ (3 files):
Changed download button from image to CSS
03:34
jdv79 [Coke]: only roast stuff at the nyc hackathon? 03:36
03:36 Sqirrel joined
dalek href="https://perl6.org:">perl6.org: b347a09 | (Zoffix Znet)++ | README.md:
Updated note on browser support
03:38
04:02 aborazmeh left 04:06 Sqirrel left 04:07 mattp__ left 04:08 mattp__ joined 04:10 adu joined 04:12 laouji left 04:22 araujo left 04:24 laouji joined 04:28 chenryn_ left 04:29 chenryn_ joined, chenryn_ left 04:31 skids left 04:35 araujo joined 04:37 kst left
[Tux] tony-o, any feedback (other than about style) 04:38
you have approached the problem fresh with a perl6 view
I approached it from my Text::CSV_XS view
04:41 kurahaupo1 joined
[Tux] I's most value feedback that'd give me speedup 04:43
[Tux] now trying to add Parse::CSV to the speed comparison
04:46 ggherdov left 04:47 isacloud left 04:51 ggherdov joined
[Tux] notices that masak already registered Text::CSV on modules.perl6.org :( 04:51
04:52 isacloud joined
[Tux] tony-o exists_key => EXISTS-KEY in CSV::Parser 04:53
04:59 kurahaupo1 left 05:10 chenryn_ joined
dalek c: de2af26 | (Zoffix Znet)++ | lib/Language/modules.pod:
Included instructions about 'provides' META.info section
05:12
c: 4856456 | (Zoffix Znet)++ | lib/Language/modules.pod:
Added note that raw license copy/paste needs modification of copyright owner
[Tux] sad to see CSV::Parse is *much* slower than mine :( 389 seconds for 10000 lines versus mine in 36 seconds 05:18
05:56 adu left 06:03 xfix joined 06:07 yvan1 left
[Tux] Is it possible to set encoding on an already opened file handle? 06:10
Zoffix What should I look up to understand what the matching rule is for this: 06:15
m: my $r = "f\no\no"; say $r ~~ ms['f' 'o' 'o' ] ?? "y" !! "N";
camelia rakudo-moar d4fd24: OUTPUT«y␤»
Zoffix (what's ms['f' 'o' 'o' ] bit?) 06:16
TimToady short for m:sigspace, which is why the spaces in the pattern match the \n in the string 06:20
yoleaux 2 Apr 2015 22:58Z <BenGoldberg> TimToady: TimToady++
Zoffix Thanks
jnthn morning, #perl6 06:28
Zoffix \o
nwc10 good UGT, * 06:29
or is that urrrrrrgh
(Although not sleeping and hence being in the office stupid early does have a POETS payoff) 06:30
06:36 LonelyGM left 06:40 FROGGS joined, sirdancealot left 06:41 aborazmeh joined, aborazmeh left, aborazmeh joined
moritz \o 06:45
06:48 xinming_ left
nwc10 o/ 06:52
06:58 spider-mario left, RabidGravy joined, yeahnoob joined
moritz office? /me tends to forget that most countries have fewer hollidays than Germany 06:59
Zoffix Good Friday here in Canukistan :) 07:00
dalek kudo/nom: 049020f | TimToady++ | src/core/Cool.pm:
introduce has-substr method to access nqp::eqat
07:01
jnthn ooh 07:02
TimToady++
TimToady looks like it's tommorow here in Calfornistan as well
07:07 LonelyGM joined
nwc10 moritz: this seems to be just about the only day that Austria doesn't do as a holiday, that the UK does 07:10
and, apparently, it is a holiday if you're a protestant
and, the other bit I don't get - Good Friday is not a holiday. Easter Monday is. Where is Easter Monday mentioned in the New Testament?
07:11 Ven joined
TimToady well, obviously, if we're supposed to celebrate on Easter, we have to have a day to recover from that... 07:13
nwc10 yes, I found that obvious too :-)
07:19 eli-se joined
moritz we should make every day after a holliday a holiday too 07:20
(recursively)
eli-se m: say "uryyb, jbeyq!".trans('a..mn..z' => 'n..za..m', :ii) 07:21
camelia rakudo-moar 049020: OUTPUT«hello, world!␤»
TimToady sic trans gloria mundi.
07:23 fhelmberger joined
eli-se moritz: I doubt that'll improve the welfare 07:24
though if it applies to me only, then I agree wholeheartedly
07:28 fhelmberger left 07:29 Foxcool joined
eli-se my employer, however, disagrees :[ 07:29
07:29 Sqirrel joined 07:31 fhelmberger joined 07:37 aborazmeh left
Zoffix Where is this Test module from? I don't see it on modules.perl.org: github.com/perl6/Perl6-MIME-Base64...-line.t#L3 07:38
Zoffix wants to look at its source
FROGGS Zoffix: github.com/rakudo/rakudo/blob/nom/lib/Test.pm 07:39
Zoffix Ah. Thanks
07:41 mr-foobar joined
cdc hello #perl6 07:43
07:43 tinyblak_ left
cdc m: say '/'.IO cmp '/'.IO 07:43
camelia rakudo-moar 049020: OUTPUT«Same␤»
cdc m: say '/'.IO eqv '/'.IO
camelia rakudo-moar 049020: OUTPUT«False␤»
cdc Is this ^ expected ?
as of my understanding when cmp returns Order::Same, then eqv should return True. 07:45
RabidGravy gosh "Package rakudo-star.x86_64 0:0.0.2014.12.1_6.10.0-1.fc21 will be an update" that's pretty, er, timely for fedora 07:49
eli-se m: say($_ eqv $_ given '/'.IO)
camelia rakudo-moar 049020: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OY_QIsAeJB␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/OY_QIsAeJB:1␤------> 3say($_ eqv $_ given 7⏏5'/'.IO)␤»
eli-se wat
WHICH hasn't been overridden for IO::Path 07:50
are paths mutable?
Timbus m: say 1 cmp 1.0; say 1 eqv 1.0 07:52
camelia rakudo-moar 049020: OUTPUT«Same␤False␤»
Timbus what gave you that idea
cdc it seems I misunderstood that part of S03: 07:53
The C<cmp> is just like the C<eqv> above except that instead of returning C<Bool::False> or C<Bool::True> values it always ...
I was looking for an operator that returns True when cmp returns Same 07:55
07:55 Ven left
LonelyGM Good morning #perl6 07:56
eli-se m: say '/'.IO cmp==Same '/'.IO
camelia rakudo-moar 049020: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oJJUqqYaL3␤Cannot make assignment out of cmp because structural infix operators are too diffy␤at /tmp/oJJUqqYaL3:1␤------> 3say '/'.IO cmp=7⏏5=Same '/'.IO␤»
eli-se no == meta operator? :(
08:02 eli-se left 08:05 mohij joined 08:07 risou is now known as risou_awy, risou_awy is now known as risou 08:11 Ven joined 08:12 darutoko joined 08:13 tinyblak joined, abraxxa joined, Foxcool left 08:15 Foxcool joined 08:21 mr-fooba_ joined 08:22 mr-foobar left, kjs_ joined 08:23 nbdsp joined 08:24 yvan1 joined, kjs_ left
nbdsp Greetings, could someone advise please how to work with MySQL from perl6? (apart from DBIish, which by some reason doesn't work properly on my machine) 08:27
08:30 jack_rabbit left
jnthn I'm not aware of things aside from DBIish for doing that, but someboy else here may. Also, it's worth mentioning what it was about DBIish that didn't work properly for you, because there are folks here who've worked on it. 08:30
(I'm not one of them, alas.)
08:31 kjs_ joined
nbdsp <jnthn> I submitted a bug report to DBIish git. 08:31
jnthn OK, even better. :) 08:32
08:44 LonelyGM left 08:48 gfldex joined 08:53 Rounin joined 08:54 xfix left 08:55 kjs_ left 08:57 espadrine_ joined
abraxxa nbdsp: did you report the segfaults? 09:04
nbdsp <abraxxa>: Yes, that's my report. 09:05
09:16 mohij left 09:22 rurban_ joined
moritz the solution, obviously, is trying to fix DBIish, not looking for a completely separate alternative 09:23
(or using Inline::Perl5)
09:26 eli-se joined, eli-se left 09:27 Ven left
nbdsp <moritz> Yes, will be following the issue on git. 09:28
09:29 yeahnoob left 09:35 kurahaupo joined
moritz can anybody give me access to a system where the mysql dbiish tests fail? 09:36
otherwise it's rather hard for me debug
and on my machines, all tests pass 09:37
dalek Iish: d588ad9 | moritz++ | lib/DBDish/mysql.pm6:
mysql: fix a signature

mysql_close returns void, not a pointer
09:38
moritz meh, NativeCall *still* can't handle unsigned integers? 09:43
jnthn moritz: How does it fail to, exactly? 09:45
moritz jnthn: "Unknown type uint used in native call."
jnthn: same with uint32 09:46
jnthn Ah
Oddly it probably *does* support unsigned arrays and struct fields... :)
moritz and no int64 either 09:47
dalek Iish: 1f98835 | moritz++ | lib/DBDish/mysql.pm6:
mysql: correct some more nativecall signatures;

also remove some unused declarations
09:50
moritz Zoffix: could you please run the DBIish/mysql tests again? I have not much hope that the situation improved, but it's worth trying anyay 09:52
09:59 kurahaupo left 10:06 chenryn_ left 10:07 lucasb joined 10:09 RabidGravy left 10:10 eli-se joined 10:11 eli-se left
abraxxa i'd need signed/unsigned support for DBDish::Oracle too 10:13
lucasb Good friday, everyone 10:17
m: sub postfix:<^>(Int $n) { $n..Inf }; say 5^[^5].perl 10:19
camelia rakudo-moar 049020: OUTPUT«(5, 6, 7, 8, 9)␤»
lucasb ^^ I liked this; the "to infinity and beyond" and the "upto" operators together :)
10:26 mohij joined, laouji left 10:27 laouji joined 10:36 [Sno] left 10:40 [Tux] left 10:51 [Tux] joined 10:52 [TuxCM] joined
masak good afternoon, #perl6 10:52
[TuxCM] is «return zip (@!colnames, self.getline ($str, meta => $meta)).hash;» perl6-ish enough?
10:54 [Sno] joined
jnthn meta => $meta can be :$meta 11:02
11:02 Ven joined
jnthn I might write it "return hash @!colnames Z self.getline($str, :$meta)" just to convey to the reader that the goal is a hash a littler earlier on 11:03
Uh, return hash (zip (@!colnames, self.getline($str, :$meta))) to match your coding style I guess :) 11:04
The space before zip makes me really want to front-load the hash there as it visually groups better then for folks used to standard Perl 6 syntax :) 11:05
uh, space *after* zip
Apparently I really need lunch, so & :)
11:06 chenryn_ joined 11:21 skids joined 11:24 sirdancealot joined 11:25 KCL joined 11:28 KCL_ left 11:30 mohij left
[TuxCM] FWIW I only want a apace after zip if there is a required paren, so your first suggestion works fine with me! 11:32
11:37 chenryn__ joined 11:38 chenryn_ left 11:41 rurban_ left 11:51 chenryn__ left
nine_ PHP 7 introduces the spaceship operator. Welcome to the 90s! blog.engineyard.com/2015/what-to-expect-php-7 11:54
11:56 Ven left 12:00 skids left
timotimo "The most common usage for this operator is in sorting callbacks:" - why would you want to sort callbacks? 12:00
literal I think you're parsing that sentence wrong 12:01
timotimo yes, i understood that after reading it for the third time :)
12:01 Ven joined
nine_ I like how he wrote a whole section on a backwards incompatible change before coming to the section called "backwards incompatible changes". He writes "most of them are minor", while in the middle of the section he mentions the "removal of all deprecated functionality". I'm just glad that I'm completely out of the PHP upgrade hell as of this year. 12:06
12:08 noganex_ left
lucasb In "my A $x = $x.new", the type is bound at compile time and by the time the RHS is executed at runtime, $x is already initialized with the type object? Is this correct? 12:09
I want to update a comment in a specific line in the specs: S03:5091
my Dog $fido = $fido.new; # wrong: invalid self-reference
and change "wrong: invalid" to "okay: valid". Do I have a confirmation from someone?
Unfortunately, there is this bug in "my (Foo $x)" where $x doesn't get assigned the type object. 12:12
So, I think, right now, you can't do "my (A $x, B $y) = $x.new, $y.new" 12:13
[Coke] jdv79: It's the only project I put out there. Put another project out there. :) 12:15
12:21 [TuxCM] left 12:22 sirdancealot left
[Coke] Anyone wants to show up to hack on perl6 stuff in NYC, let me know, we'll get it on the list and try to drum up interest. 12:23
12:33 muraiki joined
nwc10 nine_: I'm curious when the EOL for PHP 5 will be. Or even, how long until they announce an EOL date (for the first time) 12:33
12:35 mohij joined 12:45 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
abraxxa what is the best performing way to match from the beginning up to a certain character, in my case '.' ? 12:51
i'd do /^([^.]+)\./ 12:53
nine_ nwc10: seems like PHP 5.6 will be supported till 2016-08-28 and get security fixes till 2017-08-28 12:54
12:55 RabidGravy joined
abraxxa that's not much 12:58
rudi_s abraxxa: Maybe .split('.', 1)? 13:06
abraxxa rudi_s: good idea, I was focusing on a regex 13:07
my first attempt failed in case the string doesn't contain a .
nine_ rudi_s: I cannot imagine that being faster. But guesses are guesses and only benchmarks count
rudi_s Yeah. 13:08
13:09 telex left
nine_ I'd try $s.substr(0, $s.index(".") // *-0); 13:10
13:10 telex joined
timotimo are you sure that doesn't turn the whole thing into a whatevercode? 13:11
nine_ timotimo: it at least worked on the command line
timotimo OK
oh, perhaps because substr passes the length argument to the second argument anyway
nine_ m: say $_.substr(0, $_.index(".") // *-0) for <foo.bar foobar> 13:12
camelia rakudo-moar 049020: OUTPUT«foo␤foobar␤»
timotimo so it would just turn into $s.index(".") // 12345-0
13:16 fhelmberger left 13:21 RabidGravy left
mohij Where has lizmat gone? As a bystander I remember her as a rather active an cheerful participant in here... :-( 13:21
nine_ is missing her, too 13:22
dalek osystem: 4e52415 | (Cédric VINCENT)++ | META.list:
Add App::Kains to ecosystem
cdc my first app ^ in Perl 6 :) 13:23
colomon what does it do? 13:24
13:25 FROGGS left
cdc colomon: you can chroot into a rootfs without privileges (à la Docker) 13:26
13:26 laouji left, colomon left
cdc this is similar to lxc-start 13:27
or PRoot, another project of mine.
bartolin_ misses lizmat++, too
13:28 fhelmberger joined
cdc .seen lizmat 13:28
yoleaux I saw lizmat 2 Apr 2015 16:54Z in #perl6: <lizmat> maybe we should find a better wording instead of ridiculing an effort to make sense of the mess that nobody else dared to touch
13:32 RabidGravy joined 13:33 fhelmberger left
timotimo hopes lizmat is just too busy to irc 13:36
13:46 skids joined 13:47 colomon joined
colomon cdc: just did a google search on the phrase, and PRoot was the first thing that came up. :) 13:48
cdc :)
PRoot is slower than Kains, because this former re-implement chroot, mount --bind in user-space, using ptrace to instrument Linux processes 13:49
Kains does nothing but setting Linux namespaces correctly 13:50
Linux namespaces were not available when PRoot has started.
*PRoot devel. 13:51
RabidGravy if one wanted to implement a trait like Str.IO is there an example somewhere of doing that? I can't find the pertinent parts in the source :-\ 13:53
masak I don't think `Str.IO` is a trait... 13:54
RabidGravy well a cursory examination of the code led me to believe that it probably isn't but I'm guessing if one was to make one in a module it probably would be :) 13:56
masak a trait is something like the `is pure` of `sub foo() is pure {}` 13:57
or the `is rw` of `has $.x is rw;`
bartolin_ m: { next; CONTROL { default { } } }; say "alive" 13:59
camelia rakudo-moar 049020: OUTPUT«(signal SEGV)»
bartolin_ m: next; CONTROL { } 14:00
camelia rakudo-moar 049020: OUTPUT«(signal SEGV)»
bartolin_ m: { next; CATCH { default { } } }; say "alive" # this works
camelia rakudo-moar 049020: OUTPUT«alive␤»
bartolin_ does not remember to have seen that one
RabidGravy okay, so leaving the word "trait" aside for a second - if one wanted to modify a type such as Str such that it had a method like .IO which returns another object derived from the Str 14:01
14:02 khisanth_ is now known as Khisanth
RabidGravy say I wanted to be able to do (made up example) "foo.com/".URI.get for instance? 14:04
14:08 tinyblak left
colomon you could use monkey typing to extend Str. 14:08
dunno if that’s recommended, though.
I know I’d be much more inclined to set up a conversion function that takes a Str rather than trying to add a method to Str. 14:09
cdc you can add a .URI postfix operator too
TimToady demoed something like this in the past 14:10
colomon …. huh
skids cdc++ clever. I remember fun with postfix<.oO> now that you mention it. I wonder whether that satisfies most use cases people want. 14:11
hoelzro o/ #perl6
colomon m: sub postfix:<.URI> (Str $str) { $str.IO }; say “hello”.URI
camelia rakudo-moar 049020: OUTPUT«"/home/camelia/hello".IO␤»
colomon yeah, that works. 14:12
Ven heh!
colomon … seems a little wonky to me.
Ven talk about monkey patching :D
colomon but it’s perfectly legal
but you haven’t added a method at all, just something that looks like a method.
timotimo currently, after monkey typing you have to tell rakudo to rebuild all derived classes' stuff; luckily i don't think anything derives from Str
there's a better way to do what you want, though
Ven m: class A{method x{5};}; sub postfix:<.x>(A:D){4}; say A.new.x
camelia rakudo-moar 049020: OUTPUT«4␤»
Ven :)
timotimo how does the multi sub COERCE thing work again?
or was that a method or something?
colomon
.oO(“multi sub COERCE”!!!!)
14:13
Ven timotimo: it was a sub
COERCE(Any:D $from, To:U) iirc (or something..) 14:14
timotimo ah
colomon does that exist?
Ven it was in a branch
colomon it doesn’t seem to be in the spec or Rakudo 14:15
(nom, that is)
Ven and about that postfix 14:16
...did we just invent lexically-scoped monkey patching? :D
RabidGravy Part of the reason I was thinking of the above was because I was fantasizing about coercion and thought a neat way of doing it would be to have the type being coerced from be checked for a method of the name of the type being coerced to 14:18
14:20 abraxxa left 14:21 tinyblak joined
RabidGravy So e.g. using the URI example, if Str had a method URI { URI.new(self) } then a coercion would be possible to URI from Str 14:21
and so forrth
timotimo m: class URI { has $.text }; multi sub COERCE(Str:D $from, URI) { URI.new(text => $from) }; "FOO".URI.say 14:22
camelia rakudo-moar 049020: OUTPUT«No such method 'URI' for invocant of type 'Str'␤ in block <unit> at /tmp/_EAra7hTtr:1␤␤»
timotimo so ... doesn't exist at the moment? 14:23
skids RabidGravy: Yes that's one of two ways in which coercion works in Perl6, but we can't have base types like Str with a method for every little module's class. 14:24
colomon timotimo: yes, see my last comment. ;)
(I did ack on the source and specs.)
timotimo mhm
skids RabidGravy: Also, really what is being sought here is a constructor, not a coercion. Stuff like .IO is a bit of an abuse. 14:25
RabidGravy skids, damn right *but* the classes could supply it
skids In Perl6, the classes can supply it, but to use that, you use the functional form URL($str) 14:26
nine_ I really cannot see any use case for this
skids RabidGravy: there's been some discussion of fallback mechanisms a month or two ago, which is what the talk about COERCE is. 14:28
14:28 colomon left
RabidGravy rich coercions are a good thing in my tiny mind. 14:29
nine_ RabidGravy: in which case would $str.URL be so much better than URL($str)? 14:30
14:31 ASQRD joined
skids m: my Str $a = "foo"; $a does role { method foo { 42.say } }; $a.foo; 14:31
camelia rakudo-moar 049020: OUTPUT«42␤»
ASQRD hi, I am new to perl and I was wondering if there are any good web frameworks like python flask or ruby on rails that you use 14:32
nine_ ASQRD: Perl 5 has excellent frameworks like Dancer, Catalyst and Mojolicious. Perl 6 can use them via Inline::Perl5 and has Bailador which may suffice for simple use cases. 14:34
ASQRD nine_ thanks. Would you recommend perl5 over 6 for now?
skids Depends on your application/intent. 14:35
ASQRD ok, guess i have some reading to do 14:36
nine_ ASQRD: for webdev probably. Perl 6 is shaping up to be a great language and being in the Perl 6 world is fun. Perl 5 on the other hand is mature and dependable. If you need stuff to just work, go with Perl 5 for now.
ASQRD my friend keeps telling me to learn perl and i'll never go back to python so i just wanted to make something simple to test it out
skids You'll find more HOWTO material for perl5 for sure. 14:37
nine_ ASQRD: for me, Perl 5 is much less fighting to get the language to do what I want compared to Python. Perl 6 is a step forward that leaves Python far behind but is quite young yet. 14:38
14:38 caymanboy joined
ASQRD caymanboy is my friend 14:38
he thinks python is better than perl too
so i told him to join
14:38 mohij left
caymanboy There are several frameworks, catalyst,mason, plack,mojo, 14:38
perl > python
leedo plack isn't really a framework though 14:39
it's meant to be used by frameworks
ASQRD caymanboy: what version of perl do you use 14:40
skids
.oO(oh noes a framework framework :-)
leedo skids: better than every framework implementing their own server layers! 14:41
skids leedo: yes if even spastic framework authors get sick of writing certain code and can agree on a core, it definitely deserves to exist. 14:45
caymanboy 5.20.2 generally, toying with rakudo p6 14:47
14:47 kst joined
ASQRD is 6 really going to be a python killer? 14:48
caymanboy p6 is awesome
14:49 molaf_ joined
nine_ ASQRD: we don't want to kill Python. We want to learn from it what we can and use this to improve Perl 6. 14:49
caymanboy it could, the question is whether it will gain popularity that python has which is a totally different animal. Perl6 hasn't really gotten a good start popularity wise to say the least
moritz yes, Perl 6 has a totally different personality than python, and it'll appeal to other programmer personalities 14:52
[Coke] wishes again he could write this project in Perl 6.
14:53 molaf left
nine_ ASQRD: the one advantage Perl has compared to most other languages (including Python) is the ability to evolve. Modern Perl 5 code is vastly different from what it was 15 years ago. And Perl 6 even improves this ability. Python as a language is much harder to improve. Especially since nobody wants to go through another round of backwards incompatible upgrades... 14:53
14:53 Perl6_newbee joined
ASQRD lol, i hear that 14:54
i still use 2.7xx
there is just no real support for 3x
14:55 mr-fooba_ left
hoelzro what's the proper way to link to another POD element within POD? Ex. I have a class, and I want to point to a sub in the same file that provides examples for the usage of both 14:55
flussence hoelzro: I vaguely recall something about L<...> and X<...> here...
nine_ ASQRD: it really feels like they wasted their one shot at breaking backwards compatiblity for very little gain. 14:56
hoelzro flussence: I feel like it's some invocation of L<...>, yeah
hmm, I didn't know about X<...>
I feel like that would be really useful in the synopses 14:57
14:58 mr-foobar joined
flussence AIUI, L<> and X<> are equivalent to HTML href= and id= 14:58
hoelzro good analogy
ah: L<doc:#SECTION> 15:00
or just L<#SECTION>
15:00 nbdsp left
RabidGravy yep, you beat me to it :) (had to check my own code) 15:01
15:03 caymanboy left 15:04 caymanboy joined 15:07 breinbaas left
tony-o [Tux]: you blew csv::parser away 15:08
Zoffix moritz, I won't have access to that box until Monday, however, when I try install at home, it's segfaulting. 15:09
moritz, I think I'm actually experiencing the same issue as here: github.com/perl6/DBIish/issues/8 since it's segfaulting on executing prepared statement
15:11 colomon joined 15:12 Ven left
tony-o [Tux]: will text-csv work with a Buf ? 15:13
Zoffix moritz, posted tests and gdb: github.com/perl6/DBIish/issues/8#i...t-89316279 15:14
(gdb says No symbol table info available. not sure if there's something I can install to make its output more useful) 15:15
tony-o [Tux]: the second line of the README should have 'perl6' instead of 'perl' 15:16
[Tux] *my* Text::CSV will not *yet* work with Buf: see TODO
README perl/perl6: Yes *and* No 15:17
this was from a website. My test has timing for both perl5 and perl6 parsers
tony-o I got an error running this line: time perl csv.pl < /tmp/hello.csv
it looks like a p6 script
[Tux] the first 5 (6 in the bottom table) are perl5 the rest is perl6 15:18
15:18 gcole left
[Tux] seet time.pl 15:18
see
tony-o ok
[Tux] make time (or perl5 time.pl) should do the table
15:19 yvan1 left 15:22 mr-foobar left 15:23 gcole joined
japhb is finally back, sheesh 15:32
15:32 zakharyas joined
japhb moritz: Did you figure out the problem with returning unsigned ints in NativeCall? Or is that still an active issue? 15:32
nine_: No multiplicity in CPython? Ewww. That sucks, for my use case, but waddyagonnado .... 15:33
nine_ japhb: what is your use case? 15:35
japhb nine_: Wrappers for a lot of C++ libraries exist for Python, but NativeCall doesn't support C++ yet. So if I want to use those libraries, I currently need to use them via Python. But since I need to use a lot of them in parallel, 15:36
Currently I'm forking a bunch of Python interpreters, running the code, and collecting the results. 15:37
I was hoping to just have a lot of Inline::Python instances around, to save the horrid Python startup time on each request,
moritz japhb: if by "figure out" you mean "solve", then no
japhb but I think I'm just going to have to run Python processes as servers, and have my Perl 6 code IPC to them 15:38
nine_ japhb: how about using Inline::Python and then forking your Perl 6 process?
japhb moritz: Dang. I'll add them to the list.
nine_: That's more "worst of both worlds" than best. Because then the child processes have Perl 6 memory bloat and slow I/O. 15:39
s/Perl 6/Rakudo/
15:39 tinyblak left 15:40 Ven joined, davido_ left
nine_ japhb: Python servers does sound like the best performing solution, yes. 15:40
15:41 davido_ joined
japhb BTW, I've used "forking" loosely, when I meant "spawning". Does Rakudo (either r-m or r-j) support a real fork() yet? 15:42
nine_ We don't have fork yet? 15:44
RabidGravy you mean more than "use NativeCall;
sub fork() returns Int is native { ... }" ;-)
japhb nine_: Well, you can call it via NativeCall, of course. I meant, as part of the setting.
I suppose now that NativeCall is in core, we can just do what RabidGravy says. :-) 15:45
(Previously NativeCall couldn't be relied on, since it was external, so no one had just done that.
nine_ m: use NativeCall; sub fork() returns Int is native { ... }; say fork(); 15:46
camelia rakudo-moar 049020: OUTPUT«10564␤0␤»
japhb :-)
nine_ That's....amazing :) 15:47
japhb Hmmm, for startup performance, having a 'use NativeCall' in the setting would be LTA, would it not, jnthn?
RabidGravy you'd probably want to do wait() and waitpid() for completeness but hey what's a few zombies among friends
Juerd *impressed* 15:48
That just worked!?
Ven seems dangerous *g* 15:49
15:49 FROGGS joined
FROGGS o/ 15:50
Juerd FROGGS: You just missed a fantastic demo.
17:46 < nine_> m: use NativeCall; sub fork() returns Int is native { ... }; say fork();
17:46 <+camelia> rakudo-moar 049020: OUTPUT«10564␤0␤»
FROGGS O.o 15:52
nine_ If you're really into overblown solutions you could also do use Inline::Perl5; say Inline::Perl5.new.run("fork") :)
colomon That’s a giant hole in security here, eh?
FROGGS nine_: I just installed Inline::Perl5 successfully on my ubuntu box without touching perl libs at all... is that expected to happen? 15:53
hoelzro has anyone else noticed that syntax highlighting works on GH now? =) 15:54
nine_ FROGGS: actually yes? Why would you have to touch perl libs?
FROGGS nine_: I often heard that one would have to recompile libperl or so
nine_ FROGGS: only if it was not compiled with -fPIC. AFAIK distributions all use -fPIC. It's just that perlbrew defaults to not using it. 15:55
FROGGS ahh, very nice :o)
japhb colomon: Our security has to come more from containment and limits on the outside than restrictions on the inside. We're just not sneaky enough to find all the things someone might do to camelia without making it so restricted as to be unusable. Better just to build a containment tank around it. 15:58
15:59 mohij joined
japhb (Not to say we need to ignore obvious stuff, just that we can't reasonably assume we'll catch all the ways someone could attack.) 15:59
moritz also, we rely a lot of obscurity and lack of general interest 16:05
if you're willing to learn enough Perl 6 to get one server under your control, we might have won :-)
Juerd moritz++
moritz I mean, it's simply not economical, coming from a criminal mindset 16:06
16:06 Ven left
nine_ I'd gladly join in if it wasn't _my_ server :) 16:06
16:06 Ven joined
nine_ How much memory does camelia need? 16:06
moritz nine_: not much on its own, but though ~4GB for compiling and running rakudo-j 16:07
Ven ouch
moritz nine_: well, if you prefer, I can work on moving camelia off of your server 16:10
RabidGravy I lost my black hat years ago, but surely something like "sub reboot(Int $cmd) returns Int is native; ...." could be somewhat dangerous depending on the permissions it runs with
nine_ moritz: no need to sink time into that
moritz RabidGravy: it doesn't run as root
RabidGravy which would of course be quite insane 16:12
moritz RabidGravy: there are lots of potential dangers, and yet I think have been running Perl 6 evalbots for about 7.5 years now, and didn't observe a single case of actual malice
RabidGravy: people testing the bounds of the bot, sure, but nobody actually trying to take it over 16:13
jdv79 how does one get a newline to camelia?
moritz jdv79: the newline -> ␤ conversion works the other way round too 16:14
jdv79: so, use ␤ as input
m: say "␤".perl
camelia rakudo-moar 049020: OUTPUT«"\n"␤»
jdv79 m: my @foo; grep {;}␤@foo;
camelia ( no output )
jdv79 is that correct?
i'm porting some p5 to p6 and that tripped me up.
moritz jdv79: }\n ends the current statement 16:15
jdv79: you probably want a comma after the closing brace
16:15 eli-se joined
jdv79 oh, i thought semi did. yeah i know. 16:15
nine_ I could upgrade my server to a new one with an i7 2600 and 32 GiB RAM for a couple of Euros less per month than now. If only moving was not so much pain :/
jdv79 well, that's fun for p5ers. where is that in the docs? 16:16
moritz jdv79: I know it's in S02 somewhere, not sure if it's in doc.perl6.org somewhere 16:17
nine_ With 32 GiB RAM I could easily give camelia a VM with 8 GiB
moritz nine_: is there any way I can help you with the move? 16:18
jdv79 might be a good note for the p5 to p6 type docs
moritz jdv79: aye
RabidGravy I mean it's clear in the docs.perl6.org/routine/map for example 16:19
moritz jdv79: I guess it's time to start working on documenting Perl 6 syntax
jdv79 yeah but i was just iterating on a piece of p5 code and it compiles fine but that's where this bug came to
meh
RabidGravy but yeah some "builtins that previous accepted a bare block followed without a comma by the remainder of the arguments will now require a comma between the block and the arguments e.g. map, grep etc" somewhere might be a start 16:21
moritz so, add it to the docs!
nine_ moritz: I guess not. Most of the pain is getting a hold of the people who host stuff on the server. 16:23
On the other hand, I still got the emails and XMPP messages I sent the last time. So it might not be that much work after all. 16:24
RabidGravy moritz, whaddya reckon in the docs.perl6.org/language/5to6#Functions as a prefatory statement? 16:29
16:29 cdc left
Zoffix RabidGravy, moritz thoughts: gist.github.com/zoffixznet/68519c223cdd208ce7ac 16:30
moritz RabidGravy: you could put it there, yes 16:31
RabidGravy: but the rule is also more general; for example if you write a multi-line eval in perl 5, you still need the ; after the closing }
RabidGravy: you don't in Perl 6
jdv79 moritz: its S04. thanks.
moritz jdv79: that really surprises me; I thought we did the lexical bits all in S02 :/ 16:32
raydiak mornin all 16:33
Zoffix \o 16:34
japhb .tell jnthn My ++jnthn wish list, as requested: gist.github.com/japhb/a20fa0fc0423f11204bf
yoleaux japhb: I'll pass your message to jnthn.
Juerd RabidGravy: It might be worth noting that the "foo BLOCK LIST" syntax was a special case in Perl 5, that existed in no other form.
RabidGravy: And that it was inconsistent with "foo EXPR, LIST" that map and grep also supported
RabidGravy: "foo BLOCK LIST" existed where foo was map, grep, sort, or a function with a prototype of "(&@)". Just the 4 things, it wasn't a general case at all. 16:35
Since the scope is so limited, this may be easier to understand than the seemingly broad "builtins that previously accepted a bare block".
RabidGravy Zoffix, yeah :) Juerd yeah :)
Zoffix Should I push it or are you writing something better? 16:36
Juerd (Or, just: s/,\n etc./,\n sort./ :-)) 16:37
Without the spaces after \n
RabidGravy Zoffix, push! push! I'm pondering how to synthesize Juerd and moritz comments ;-)
moritz Zoffix: agreed, push
Zoffix: it's much better than nothing, and can be improved upon later 16:38
Juerd Commit early, commit often!
Further commits are just as free.
dalek c: e5f11c2 | (Zoffix Znet)++ | lib/Language/5to6.pod:
Built-ins with comma-less blocks now require a comma
hoelzro japhb: I think FROGGS is working on the C++ binding part of your wishlist =) 16:39
16:39 tinyblak joined 16:42 Possum joined
muraiki re: wish list: I'm not sure if p6 promises are A+ compliant, but if they are it's worth noting that they still haven't settled on how to do cancellation: github.com/promises-aplus/cancella...pec/issues 16:42
16:44 nbdsp joined
muraiki that being said, I think it's worth considering if promises should be cancellable at all. this article made me think about promises in a different way (that of trust, not just async): blog.getify.com/promises-part-3 16:44
16:44 tinyblak left 16:46 yqt joined
[Tux] gist.github.com/Tux/540b7068ec54f6ca8a54 <= Anyone care to explain? 16:48
nbdsp Greetings! If one installs with panda one package twice, then it's in the list of installed packages it will be listed one time, but there will two sets of this package's files in the 'rakudo/install/share/perl6/site' directory. Is it meant to be that way? Is it possible to leave only one set of files? 16:49
moritz [Tux]: you write C.new.foo which calls foo without arguments 16:50
[Tux]: but $in isn't optional
[Tux] drat 16:51
that was - of course - a bad cut-n-paste, but now I need to go back to find the real cause :(
C.new.foo($*IN).say; worked fine in the original call, but not in the _hr version 16:52
skids nbdsp: panda just underwent some changes in the way it does things, so I expect there are some frayed edges right now. 16:54
nbdsp skids: OK, thanks. 16:55
skids But sticking around here and complaining will help panda get better, so maybe tell us what files you are seeing? 16:56
[Tux] moritz, I think I found the cause, which brings me to the following question ... 16:57
skids nbdsp: is it that you have both languages/perl6 and lib/perl6? 16:58
[Tux] my @x; @x.push: [ @values ]; @x.push: [ 1, 2 ];
tadzik FROGGS: oh hey
[Tux] to create an aoa
tadzik we need a schema for META.info, badly :)
FROGGS tadzik: what do you mean by schema? 16:59
[Tux] my @x; @x.push: hash @keys Z @values; @x.push: @keys Z @values;
to create an AoH went wrong
moritz [Tux]: nothing in there creates a hash
[Tux] do I need more line noise?
moritz oh wait 17:00
nbdsp I was trying to resolve some problems with DBIish and installed it several times. and currently see in the aforementioned directory multiple copies of files from the DBIsh package all named with different names like 123, 134, 135 etc.
tadzik FROGGS: I'm thinking JSON schema, but any formal-ish specification of what it should contain
moritz [Tux]: @x.push: { @keys Z @values }
tadzik right now, the ecosystem is a mess
FROGGS tadzik: S22:1
[Tux] OK, I need braces
tadzik oh, 22
FROGGS lizmat++ btw 17:01
tadzik I was looking at s1
s11*
skids nbdsp: Ah good, you are on the new code then.
FROGGS tadzik: S22 is about a META6.json, so we need to support both file names at some point
Zoffix Doesn't design.perl6.org/S22.html#provides need to say 'provides' is mandatory? It was a recent change
tadzik FROGGS: yep
skids nsdsp: Yeah I still don't even know how to properly clean the database files of a package.
nbdsp skids: OK, maybe this functionality will be added to Panda. 17:02
17:04 Ven left, wryk joined
skids nbdsp: Well, that won't help in the case that the file that needs to be cleaned is File::Find Shell::Command or JSON::Tiny because if those have stale precomps, panda will not run. 17:04
17:05 wryk left
skids (Which is my current "situation") 17:05
[Tux] moritz, is shows { hash @keys Z @values } as a Parcel ??? 17:06
skids wonders if there is a "dont use precomps" switch/envvar to rakudo. 17:08
hoelzro skids: you mean to skip .moarvm files? 17:09
skids hoelzro: yes 17:10
hoelzro I swear there was one...
hoelzro looks
nwc10 nine_: PHP 5 dies in 2017? That's going to Hack off a lot of people. 17:12
hoelzro hmm, apparently not
nine_ nwc10: at least I could not find anything about a PHP 5.8, so 5.6 may well be the end of PHP 5 17:17
nwc10 I haven't gone looking massively hard, but as best I can see, right now no-one is talking about any 5.* to follow 5.6
17:18 Ven joined
FROGGS Zoffix: btw, "provides" is only needed for non-binary-only dists 17:18
Zoffix FROGGS, noted
nwc10 Ultimately, what will matter in the real world is how long RHEL, SuSE, Debian and similar find it impractical to drop PHP 5.something, and hence have to keep it secured 17:19
and whether it's easier to migrate from 5.foo to HHVM than to 7.bar
but, given that Python 2.7 got a second 5 years of security support, I can't see that 3 years (total) for 5.6 being enough 17:20
not that this matters "here", because v5.24.0 (or even v5.26.0 or v5.28.0) will not be the last Perl 5 "because someone said stop" 17:21
nine_ I've always loved Perl's backwards compatibility 17:22
17:25 LonelyGM joined, espadrine_ left 17:28 breinbaas joined, nbdsp left
raydiak is anyone able to bump moar & nqp for a nativecall patch needed for latest zlib? I sent a PR to Compress::Zlib::Raw which got merged, but forgot it won't work until after a bump :) 17:29
hoelzro could someone review my tab completion branch? I would like to merge it sometime soon =)
jdv79 is .WHICH unique for the entire proc scope unlike a refaddr in p5 which can be reused? 17:30
17:33 caymanboy left 17:35 LonelyGM left 17:37 Psyche^ left, Patterner joined, araujo left 17:43 yqt left 17:44 Perl6_newbee left 17:46 araujo joined
FROGGS jdv79: it is meant to be unique, aye 17:48
moritz jdv79: though note that .WHICH for value types isn't unique
dalek p: 4edc1eb | FROGGS++ | tools/build/MOAR_REVISION:
bump moar for nativecall improvements, hoelzro++
17:49
jdv79 just using it for a cache key over a set of hashes. thanks!
dalek kudo/nom: 752c0c0 | FROGGS++ | tools/build/NQP_REVISION:
bump nqp/moar for nativecall improvements, hoelzro++
17:50
FROGGS moritz: I'll activate the cronjobs now 17:52
hoelzro FROGGS: you didn't merge my MoarVM changes by chance, did you? 17:54
FROGGS hoelzro: I thought you were talking about the VMArray nativecast patch I applied yesterday or so 17:56
hoelzro nope =/
jdv79 is there a more terse way to do %().item?
hoelzro I should probably do a rebase on my branches, though
FROGGS hoelzro: so, what are you talking about? 17:57
hoelzro my tab completion branches
github.com/MoarVM/MoarVM/tree/no-moar-linenoise
github.com/perl6/nqp/tree/no-readlineint
github.com/rakudo/rakudo/tree/tab-completion
FROGGS ohh, I need more time to review than I have today 17:58
hoelzro ok, no worries 17:59
FROGGS ahh dang, I was thinking about raydiak++'s patch all the time here
nine_ what is $*W?
hoelzro I was just checking to see if anyone had had a look
nine_: the current Perl6::World
nine_ hoelzro: thanks 18:00
jdv79 thanks moritz++ - i even cited the wrong part of S04 - sorry.
FROGGS hoelzro: sadly not... I too many projects going on right now (also at $work, where I am working on projects for five ppl atm) 18:01
hoelzro FROGGS: as long as it's considered for 2015.04, I'm happy =)
so we have some time
18:02 Ven left
dalek rl6-roast-data: 4216b51 | coke++ | / (8 files):
today (automated commit)
18:03
FROGGS hoelzro: then we really should get it in this weekend 18:04
hoelzro hmm, that timing will be hard
I'm busy Saturday until late (past you Europeans' bedtimes!), and I'm gone all day Sunday 18:05
18:07 eli-se left 18:10 sirdancealot joined
japhb muraiki: Thank you for the pointers re: Promises, I'll take a look. FWIW, my use case is for latency tail trimming: You send a request to a backend for which you expect a response in N milliseconds on average. M milliseconds later (if no response yet), you 18:24
send another identical request to a different backend. Whichever backend responds first, you cancel the request to the other. 18:25
Tuning N versus M is an interesting problem, and there are further optimizations, but that's the basic idea.
Certainly you can't force the backend to stop processing the request, but you'd like an easy way to inform it that it is allowed to stop processing. 18:26
(And yes, the backend might choose to continue even after getting the cancel notification, because it might for instance be taking this opportunity to fill its caches to respond better to future requests.) 18:27
jercos seems like that could get pretty costly if the request is a transactional write that needs to be rolled back, and impossible to do with non-transactional writes.
japhb jercos: Used mostly for reads. 18:28
jercos nods 18:29
18:29 mohij left
japhb (It *can* be used for writes if the transactional state is distributed intelligently, but that's what I'd call "advanced usage".) 18:29
hoelzro: Yes, I'm aware FROGGS++ is leading the C++ support effort. But I thought I saw he was getting overloaded, and it sounds like the work is partly complete, so I was hoping that if FROGGS was stuck and jnthn had more time, he might be able to complete it, or at least help FROGGS to do it more easily. 18:32
raydiak heh thanks for slipping that into your oversaturated multitasking rotation FROGGS++ :) 18:33
FROGGS :D
japhb: no worries, I can probably finish that in the next weeks
japhb Yes, definitely, thank you VERY much FROGGS. Around here, C++ support would be HUGE. 18:34
dalek kudo/nom: 4162768 | TimToady++ | src/Perl6/Actions.nqp:
catch folks who use p5 syntax on map/grep/sort
18:43
jdv79 lets say i have a string like 'foo*bar{}' and i want to use that a a pattern literal except the * which i'd transform into .*? and want interpolated - what's a good way to do something like that? 18:44
flussence you mean you want a shell glob to regex converter? 18:46
jdv79 no, its a dsl - that's the only metasyntax i want 18:47
moritz jdv79: do an s:g/ '*' / .*? / on it, and then use it as a regex (with /<$regex_str>/)
flussence
.oO( does *anyone* want a shell glob to regex converter? 'cause that'd be an interesting 1-hour project... )
18:49
jercos I don't think a straight conversion quite works in the same manner... 18:50
shell globs are applied to files, but can also return results that don't exist, and patterns fail through as though they were escaped... it's sorta intimately tied, at least, to a map-ish construct that takes in a list and outputs another list 18:51
e.g., ["notafile*", "files*", "notafile{a,b,c}"] becomes ["notafile*", "files_with_stuff", "files_without_stuff", "notafilea", "notafileb", "notafilec"], but that's dependant on files_with_stuff and files_without_stuff existing, and no files starting with notafile existing... 18:53
jdv79 moritz: no, cause they the {} get interpol'ed right? 18:54
dalek ast: cc2c90b | TimToady++ | S29-context/die.t:
some ; that were supposed to be ,
jercos glob-ish stuff though, like [] is mostly verbatim, {,} could be converted to a (?:|), * is a .*?, and ? is a .
you could definitely make a shell-glob-like pattern language and convert it to regex quickly
jdv79 m: my $v=q[foo*bar{1}];$v~~s:g/q{*}/.*?/; "asdf"~~/<$v>/ 18:55
camelia rakudo-moar 752c0c: OUTPUT«5===SORRY!5=== Error while compiling EVAL_0␤Unsupported use of {N,M} as general quantifier; in Perl 6 please use ** N..M (or ** N..*)␤at EVAL_0:1␤------> 3anon regex { ^foo*bar{1}7⏏5}␤»
18:55 cdc joined
cdc re-hello #perl6 18:56
ab5tract o/ cdc 18:57
cdc for information, since a couple of days, the startup time of rakudo/moar is increasing:
time ./moar-4254764254019440911a65739e18633a7141a516/install/bin/perl6 -e '' 18:58
about 0.7s on my Atom
time ./moar-5668f299c9e19bbc0a3677d88429009414d2083f/install/bin/perl6 -e ''
about 0.9s on my Atom
time ./moar-nom/install/bin/perl6 -e ''
about 2s now
ab5tract jercos: it could even be invoked as such: grr:{ ./gimme* } 18:59
jdv79 m: my $v=q[foo*bar{1}];$v~~s:g/'*'/.*?/; "asdf"~~/<$v>/ # lit quoting fix but same result
camelia rakudo-moar 752c0c: OUTPUT«5===SORRY!5=== Error while compiling EVAL_0␤Unsupported use of {N,M} as general quantifier; in Perl 6 please use ** N..M (or ** N..*)␤at EVAL_0:1␤------> 3anon regex { ^foo.*?bar{1}7⏏5}␤»
dalek osystem: 9f94316 | (Zoffix Znet)++ | META.list:
Added Pastebin::Shadowcat to the ecosystem
19:01
jdv79 in p5 i had used quotemeta and then did the * transform after 19:02
moritz well, quotemeta is just an s:g[\W] = '\\' ~ $/; away 19:03
ab5tract jdv79: tbh, first-class globs are about the last thing I look for in a language. But maybe that's because so few languages could handle it responsibly, so far. 19:04
jdv79 i guess that'll have to do for now 19:05
japhb
.oO( What's the punishment for irresponsible globbing? )
ab5tract I think there is a lot of room for Perl 6 to shine it's mettle in the one-liner/interactive "shell" space
jdv79 i'm not globbing
but ok
ab5tract japhb: I believe that is a question that could only be answered in the form of a golf ;) 19:06
jdv79: My apologies. My comments were aimed at jercos, indeed. 19:07
19:07 davido_ left 19:09 davido_ joined
vendethiel- m: my @numbers = ^20; @numbers[5..*] = 3, 9 ... *; say @numbers # is there a way to get "5..*" to turn that list into an infinite one? 19:10
camelia rakudo-moar 752c0c: OUTPUT«0 1 2 3 4 3 9 15 21 27 33 39 45 51 57 63 69 75 81 87␤»
vendethiel- maybe this is considered a feature, and if so, how can I go around that?
19:10 eli-se joined 19:11 colomon left
grondilu m: my @numbers = ^20; @numbers[5..Inf] = 3, 9 ... *; 19:12
camelia ( no output )
grondilu m: my @numbers = ^20; @numbers[5..Inf] = 3, 9 ... *; say @numbers.elems
camelia rakudo-moar 752c0c: OUTPUT«20␤»
ab5tract jdv79: I'm trying to dig in a bit on your use case, but I'm a little fuzzy as to what you really want. It seems like you could create a prefix op that does about what moritz mentioned. But maybe one question could make things clearer: What is the population of things that 'foo*bar{1}' would be matching against? 19:21
19:21 xfix joined
jdv79 ab5tract: random user input. hash keys. 19:23
19:23 colomon joined
jdv79 i don't get what you mean by create a prefix op. 19:24
19:25 zakharyas left
moritz doesn't get why not simply a sub 19:27
ab5tract m: sub prefix:<x> ($s) { return so $s ~~ /thunk/ }; say <thunkadunk thunder>.map: x *; 19:31
camelia rakudo-moar 416276: OUTPUT«True False␤»
ab5tract moritz: that is a legitimate design question 19:33
if the plan is to use it in list processing, one could argue that ops are more appropriate, or superflous. 19:35
19:36 raiph joined
moritz &x is even shorter than x * 19:37
ab5tract moritz: If there is one truth I've learned in my love of TMTOWTDI, it's that shorter is not always better. 19:38
Even so, I'm convincibale on either side. Which is why I love Perl 6, which allows me the choice in a way that is baked into the definition of its own operators. 19:39
masak brevity and clarity are often in opposition. the trick is to write at their equilibrium -- and to realize that the requilibrium is a function of the context you're writing in. 19:40
equilibrium*
19:42 tinyblak joined
dalek p/param-is-rw: b07e78f | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
do not decont NativeRefs, the wonky way

This makes simple tests pass, but should probably get a proper fix. Most likely in MoarVM itself.
19:44
masak tonight I'm pondering whether we don't want a construct which, like macros, can accept ASTs as parameters and return ASTs, but which, unlike macros, don't fire on seeing a callsite but on seeing a particular "configuration" of code -- could be something as simple as "a routine with this particular trait". 19:45
TimToady requilibrium in pacit
masak :)
I believe it's "in pacem"
vendethiel- masak: or just a routine?
will macros be unable to call subs? 19:46
TimToady yer prolly right
masak m: macro foo { bar; quasi { 42 } }; sub bar { say "OH HAI" }; say "runtime"; say foo
camelia rakudo-moar 416276: OUTPUT«OH HAI␤runtime␤42␤»
masak vendethiel-: macros can already call subs. 19:47
19:47 tinyblak left
masak they're just called at apply-time. 19:47
vendethiel- you want something that "quotes" but doesn't doesn't splice, basically?
moritz doesn't think vendethiel- understood what masak meant 19:48
dalek kudo/param-is-rw: 9fbaf1e | FROGGS++ | t/04-nativecall/14-rw-attrs. (2 files):
test rw variables (NativeRefs)
vendethiel- definitely doesn't
vendethiel- understand something like quasi{}
masak my use case is something like CPS transorming a whole routine.
FROGGS jnthn: my proof of concept (param-is-rw branches) works :o) 19:49
moritz masak: what you want is something like a find&replace on an AST with some declarative syntax?
masak vendethiel-: nothing much to do with quasi in particular.
moritz: yep.
vendethiel- reread multiple times masak's sentence, and it looks to him that it's masak's ideas of "is inside" macros
masak moritz: basically a built-in macro that installs a hook into the compiler.
vendethiel-: do you have a reference so I can read up on "is inside" macros? 19:50
vendethiel- masak: your blog?
masak suspects vendethiel- is gonna answer "Let Under Lambda"
vendethiel- didn't :P
masak oh, I wrote about "is inside" macros?
jdv79 ab5tract: trying to port some "well optimized" p5 code over. might need to port a little less literally earlier than i thought because of this.
masak can't have been a very bright idea, then... :P
vendethiel- masak: strangelyconsistent.org/blog/macros...ing-macros
masak ah. 19:51
no, that's also not what I'm talking about.
vendethiel- I can quote let over(:P) lambda, with its code walkers, though
masak ok, let me whip up a fake example as a gist.
"code walkers" is the first thing you've said that might be what I want.
19:52 rivarun joined
masak first I figured this new not-quite-macro would fire at CHECK time, but then I thought it's probably better that they fire ASAP when they match a pattern -- more p6ish for the compiler to do things ASAP. 19:52
vendethiel- (or maybe f# computational expressions are an example of something you want to do...)
masak yes -- ooh -- added to my reading list. vendethiel++ 19:53
vendethiel- okay, so that's something like that you're going for :-)
s/that/it/ # english is hard
masak I don't know. but it sounded interesting. 19:54
vendethiel- the number of "operations" you can overload is limited, tho. there's like 7 methods you can implement
masak I'm intrigued.
vendethiel- sorry, more than that. Bind, Delay, Return, ReturnFrom, Run, Combine, For, TryFinally, TryWith, Using, While, Yield, YieldFrom, Zero, says msdn docs 19:56
so, to use async constructs "while looking like you're writing f#", you just wrap it in a `async {}` block: `async { let! val = somethingThatReturnsAsync() }` 19:57
(for `async`, "let!" is "bind after the RHS is .done") 19:58
rivarun hello. i'm going through the tutorial on perl6maven.com, but it's a bit too hands-on for what i wanted. he jumps to opening files before even working with lists for example. is there another tutorial i can use? 20:01
vendethiel- rivarun: learnxinyminutes.com/docs/perl6/ (sorry for the self-plug :P) 20:02
masak vendethiel-: ok, here's what I ended up with: gist.github.com/masak/0bd3f74fc46d0330dc01
massive grains of salt apply, of course.
vendethiel- masak: yeah, that's definitely in the same vain as computational expressions, and in a broader sense (because it's all calls in lisp) in code walkers 20:03
rivarun vendethiel-: no offense, but that i also looks a bit for those in a hurry. i was hoping for something equivalent to python's official tutorial
masak heh. if these interceptors start being active after their own '{', line 3 is gonna be an infinite compiler loop. but it probably makes more sense for them to activate at the '}'
vendethiel- rivarun: no problem :-)
masak vendethiel-: I'm relieved there's some prior art. 20:04
vendethiel-: I think we want this in Perl 6.
vendethiel- masak: you'd impress me *even more*, tho :)
masak it would help take the moral weight off macros a bit.
vendethiel- I think it'd be a big part of macros
masak I mean, `intercept` would totally be a macro. 20:05
vendethiel- maybe "macros" is a term we should stop using, considering how lax it's used
masak yeah, that's what I've been grumbling for years now :P
and then we just need to fill in the blanks around all these things, so that `intercept` can be implemented in a consistent and non-messy way \o/
vendethiel-
.oO(step 3) ??? step 4) profit)
20:06
[Coke] has a thread problem in java. This problem is solvable... with more threads. 20:09
moritz [Coke]: threads are java's regexes? :-)
mst now two have problems you 20:11
vendethiel- *g*
masak [D/me makes a private note that mst's spirit can be invoked by providing a good enough opportunity for punning 20:14
argh lag.
also s/invoked/summoned/ 20:15
20:15 xfix left 20:19 telex left 20:20 telex joined
moritz invoking is easy, just add a trailing () :-) 20:21
colomon mst() ?
TimToady m: my @foo; grep {;}␤@foo; # for jdv79++
camelia rakudo-moar 416276: OUTPUT«my @foo; ␤@foo; # for jdv79++␤5===SORRY!5=== Error while compiling /tmp/gscLChxkQm␤Missing comma after block argument to grep␤at /tmp/gscLChxkQm:2␤------> 3my @foo; grep {;}7⏏5<EOL>␤»
mst colomon: error: input to mst() must be either caffeine or alcohol 20:22
colomon mst++
tony-o mst<old guarding ale>++ 20:24
s/guarding/guardian/
20:24 muraiki left 20:27 darutoko left
japhb mst: class FourLoko is Caffeine is Alcohol { }; mst(FourLoko.new xx 4); # Throws an exception, or is exceptional? 20:31
mst japhb: so, basically, pre-mixed vodka redbull? 20:33
japhb 'The name "Four" is derived from the original drink's four main ingredients: alcohol, caffeine, taurine, and guarana.' # From en.wikipedia.org/wiki/Four_Loko 20:34
Yeah, I suppose so. :-)
mst so, yeah, basically pre-mixed vodka and energy drink at least
which I do drink on occasion
jercos only on stage during cons? 20:35
skids So like essentially Mad Dog 20/20 with the electrolytes that plants crave?
mst laughs
jercos: I get myself in quite sufficient trouble presenting sober :D
20:40 RabidGravy left
mst www.theatlantic.com/national/archiv...ko/359602/ 20:41
"Neither side of the settlement addressed concerns that Four Loko tastes like garbage"
20:42 kurahaupo1 joined 20:45 tinyblak joined 20:46 raiph left
dalek c: 4b33b96 | moritz++ | lib/Language/syntax.pod:
Add bare-bones syntax document

so far covering only some lexical conventions and comments
20:47
jdv79 i can't golf it but is there any reason anyone can think of that $0 would be Nil for "" ~~ s/(.)/$0/; 20:48
oh :g 20:49
20:50 tinyblak left 20:51 RabidGravy joined
colomon oh what? 20:51
or perhaps, oh why?
moritz and is it Nil inside or outside the substitution? 20:52
jdv79 $0.perl i Nil inside the substitution 20:53
i have $str ~~ s:g/(.)/{ say $0.perl}/ atm 20:54
lucasb moritz: I think embedded comments is #`( ... ), not #^( ... ); Also, s/backticket/backticks/ 20:55
jdv79 super weird. works fine golfed down.
lucasb moritz: But of course, moritz++, Thanks for the document! 20:56
jdv79 so i put my $/; on the line before and it works. *sigh* 20:58
i'll debug it later i guess. 20:59
21:04 espadrine_ joined 21:07 skids left
japhb jdv79: ISTR from the distant fuzzy past that there is some heuristic for whether to magically declare $/ in a given scope (because it's pointlessly expensive if you're not going to use it). However, that heuristic doesn't always work quite right, and sometimes misses declaring $/ when it's needed. 21:11
dalek c: 26335b6 | moritz++ | lib/Language/syntax.pod:
Fix embedded comment examples, lucasb++
japhb Like I said though, fuzzy memory, so take that with a grain of salt.
jdv79 seems like a bug to me 21:14
but i'll get back round to it once i get back round to it i guess
TimToady there's actually an RT for it already, I think 21:15
moritz the other workaround is to use {} inside the regex
jdv79 superb 21:16
altering $_ in map isn't an alias like in p5 i gather 21:18
anyway to do that?
japhb jdv79: Make the block a pointy and declare the argument <-> ? 21:21
jdv79 doesn't seem to work 21:24
i coded around it
TimToady m: my @a = 1,2,3; say map <-> $_ { $_ += 1 }, @a; say @a 21:25
camelia rakudo-moar 416276: OUTPUT«2 3 4␤1 2 3␤»
TimToady odd
japhb m: my @a = 1,2,3; say @a.map: <-> $_ { $_ += 1 }; say @a
camelia rakudo-moar 416276: OUTPUT«2 3 4␤2 3 4␤»
TimToady so something is deconting the listop form 21:26
japhb TimToady: the slurpy argument to 'multi map'? 21:27
jdv79 is "-> $foo is rw" the same as "<-> $foo"?
japhb I see that the non-slurpy multi is commented out in src/core/Any.pm 21:28
TimToady supposed to be
japhb (sorry 'multi sub map', for those grepping)
21:30 fhelmberger joined 21:31 kaare_ left 21:34 fhelmberger left 21:49 lucasb left
flussence if I have :ver<1.1.0> on a module, is the correct META.info «"version": "v1.1.0"», or do I leave the 'v' out? S22's a bit confusing here. 21:50
21:59 [Sno] left
RabidGravy Oh I'd assumed v notation both places :) 22:04
raydiak flussence: some random things I glanced at on the ecosystem like Inline and MIME::Base64 appear to leave the v out 22:12
flussence I'll just go with "be consistent until something breaks" then :) 22:15
RabidGravy a cursory look at the Panda code suggests to me it is used verbatim from the META file 22:16
so my best guess for a comparison between a version onject and a string would be "v1.1.0" in the meta as it currently stands 22:22
22:23 yvan1 joined 22:27 RabidGravy left
sjn reads S22 22:28
22:29 kjs_ joined
ab5tract masak: "can't have been a very bright idea, then..." .. On the contrary, I would hesitate to ever disregard the power of carefully optimized Perl. 22:31
It was wanted ugly for a reason.
22:32 kjs_ left 22:38 Rounin left
masak ab5tract: the backlog is confusing there. I was replying to vendethiel, not to jdv79. 22:42
sjn is S22 up-to-date? 22:43
22:46 BenGoldberg joined 22:50 FROGGS left
Zoffix sjn, provides is mandatory 23:00
sjn, as far as I know at least. I'm a noob and I haven't gotten a solid answer for whether S22 needs to be updated to say provides is mandatory :D 23:01
timotimo what did i miss tonight? 23:02
masak "Building stuff is hard, and you'll always need a thick skin. But we see no need for Hacker News to make the problem worse." -- blog.ycombinator.com/new-hacker-news-guideline
23:07 skids joined
masak 'night, #perl6 23:09
tony-o later
Zoffix bye
timotimo gnite masak
flussence m: use Test as T; # I wasn't expecting this to work, but the error it causes is interesting 23:15
camelia rakudo-moar 416276: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
Zoffix S11 is wonderfully ambiguous on whether you need 'v' or not. My interpretation is that it's a take-it-or-leave it and v2.2 is the same as 2.2.... design.perl6.org/S11.html#Versioning
ab5tract .tell masak Sorry about that then, buddy :) 23:17
yoleaux ab5tract: I'll pass your message to masak.
23:18 vytas left 23:25 KCL_ joined 23:26 vytas joined, raiph joined 23:27 espadrine_ left 23:28 KCL left
sjn Zoffix: right. Just read that there's some mismatch between what's in S22 and what to find in the different repos (e.g. META6.json vs. META.info) 23:35
sjn assumes that S22 is still a work-in-progress 23:39
hoelzro .tell mj41 the docker folk have added an official repo for rakudo-star 23:45
yoleaux hoelzro: I'll pass your message to mj41.
23:47 Sqirrel left 23:55 hobbs left, Sqirrel joined
sjn hoelzro: ooh, nice! 23:55
hoelzro: url?
colomon www.flickr.com/photos/wendyga/1336...2816609433 :) 23:56
hoelzro sjn: registry.hub.docker.com/_/rakudo-star/ 23:58
I don't know if that's permanent, though
my PR to add a description and such is still pending
but those folks are great to work with
really helped me get it all set up 23:59